diff --git a/.gitignore b/.gitignore index 4d29575..075d712 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,6 @@ # testing /coverage -# production -/build - # misc .DS_Store .env.local @@ -21,3 +18,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +/build/**/*.map \ No newline at end of file diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..e927d0c --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +multisig.credix.finance \ No newline at end of file diff --git a/README.md b/README.md index 5d6bbe8..cb21dfd 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo ## Available Scripts -In the project directory, you can run: +In the project directory, you can run ### `yarn start` @@ -45,7 +45,11 @@ You can learn more in the [Create React App documentation](https://facebook.gith To learn React, check out the [React documentation](https://reactjs.org/). -### Port Multisig Address -Multisig address: `6ExGdhoUeqzExzXWx1tW2RPojuRnfXeTRwQ7sCeEcnKy` +### Credix Multisig Addresses +#### Mainnet +Multisig address: `AM194gsNqRnmu8CZKi5GBPRGMC4Bq4Egkj2GQ4Yz4JZ4` +Program derived address: `9GKiJfzjUUpWxKm1owKwAA2QWMQc7UXg4btXPF1BEbLV` -Program derived address: `8jJSYeg13LwDP3jNdPdKsG88pNEgmKuwn5W4kPZ13dn8` +#### Devnet +Multisig address: `5xwnWVbJuU3DQH6S6tBjr7D49nhMV9t8ZDNFLFYL4nPH` +Program derived address: `Du6efvMcXXLGyEea4SrTnVGHgBZmu4xU7SM9vDfRDqrp` \ No newline at end of file diff --git a/build/asset-manifest.json b/build/asset-manifest.json new file mode 100644 index 0000000..69301db --- /dev/null +++ b/build/asset-manifest.json @@ -0,0 +1,15 @@ +{ + "files": { + "main.css": "./static/css/main.a0d8d90f.css", + "main.js": "./static/js/main.827183f4.js", + "static/js/806.21b30677.chunk.js": "./static/js/806.21b30677.chunk.js", + "index.html": "./index.html", + "main.a0d8d90f.css.map": "./static/css/main.a0d8d90f.css.map", + "main.827183f4.js.map": "./static/js/main.827183f4.js.map", + "806.21b30677.chunk.js.map": "./static/js/806.21b30677.chunk.js.map" + }, + "entrypoints": [ + "static/css/main.a0d8d90f.css", + "static/js/main.827183f4.js" + ] +} \ No newline at end of file diff --git a/build/credix.svg b/build/credix.svg new file mode 100644 index 0000000..ad2a524 --- /dev/null +++ b/build/credix.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/build/favicon.ico b/build/favicon.ico new file mode 100644 index 0000000..a11777c Binary files /dev/null and b/build/favicon.ico differ diff --git a/build/index.html b/build/index.html new file mode 100644 index 0000000..484f43d --- /dev/null +++ b/build/index.html @@ -0,0 +1 @@ +Multisig UI
\ No newline at end of file diff --git a/build/logo192.png b/build/logo192.png new file mode 100644 index 0000000..fc44b0a Binary files /dev/null and b/build/logo192.png differ diff --git a/build/logo512.png b/build/logo512.png new file mode 100644 index 0000000..a4e47a6 Binary files /dev/null and b/build/logo512.png differ diff --git a/build/manifest.json b/build/manifest.json new file mode 100644 index 0000000..080d6c7 --- /dev/null +++ b/build/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/build/robots.txt b/build/robots.txt new file mode 100644 index 0000000..e9e57dc --- /dev/null +++ b/build/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/build/static/css/main.a0d8d90f.css b/build/static/css/main.a0d8d90f.css new file mode 100644 index 0000000..9877d50 --- /dev/null +++ b/build/static/css/main.a0d8d90f.css @@ -0,0 +1,2 @@ +body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.react-calendar{background:#fff;border:1px solid #a0a096;font-family:Arial,Helvetica,sans-serif;line-height:1.125em;max-width:100%;width:350px}.react-calendar--doubleView{width:700px}.react-calendar--doubleView .react-calendar__viewContainer{display:flex;margin:-.5em}.react-calendar--doubleView .react-calendar__viewContainer>*{margin:.5em;width:50%}.react-calendar,.react-calendar *,.react-calendar :after,.react-calendar :before{box-sizing:border-box}.react-calendar button{border:0;margin:0;outline:none}.react-calendar button:enabled:hover{cursor:pointer}.react-calendar__navigation{display:flex;height:44px;margin-bottom:1em}.react-calendar__navigation button{background:none;min-width:44px}.react-calendar__navigation button:disabled{background-color:#f0f0f0}.react-calendar__navigation button:enabled:focus,.react-calendar__navigation button:enabled:hover{background-color:#e6e6e6}.react-calendar__month-view__weekdays{font-size:.75em;font-weight:700;text-align:center;text-transform:uppercase}.react-calendar__month-view__weekdays__weekday{padding:.5em}.react-calendar__month-view__weekNumbers .react-calendar__tile{align-items:center;display:flex;font-size:.75em;font-weight:700;justify-content:center}.react-calendar__month-view__days__day--weekend{color:#d10000}.react-calendar__month-view__days__day--neighboringMonth{color:#757575}.react-calendar__century-view .react-calendar__tile,.react-calendar__decade-view .react-calendar__tile,.react-calendar__year-view .react-calendar__tile{padding:2em .5em}.react-calendar__tile{background:none;line-height:16px;max-width:100%;padding:10px 6.6667px;text-align:center}.react-calendar__tile:disabled{background-color:#f0f0f0}.react-calendar__tile:enabled:focus,.react-calendar__tile:enabled:hover{background-color:#e6e6e6}.react-calendar__tile--now{background:#ffff76}.react-calendar__tile--now:enabled:focus,.react-calendar__tile--now:enabled:hover{background:#ffffa9}.react-calendar__tile--hasActive{background:#76baff}.react-calendar__tile--hasActive:enabled:focus,.react-calendar__tile--hasActive:enabled:hover{background:#a9d4ff}.react-calendar__tile--active{background:#006edc;color:#fff}.react-calendar__tile--active:enabled:focus,.react-calendar__tile--active:enabled:hover{background:#1087ff}.react-calendar--selectRange .react-calendar__tile--hover{background-color:#e6e6e6}.react-clock{display:block;position:relative}.react-clock,.react-clock *,.react-clock :after,.react-clock :before{box-sizing:border-box}.react-clock__face{border:1px solid #000;border-radius:50%;bottom:0;left:0;position:absolute;right:0;top:0}.react-clock__hand{bottom:0;left:50%;position:absolute;right:50%;top:0}.react-clock__hand__body{background-color:#000;position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.react-clock__mark{bottom:0;left:50%;position:absolute;right:50%;top:0}.react-clock__mark__body{background-color:#000;position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.react-clock__mark__number{left:-40px;position:absolute;text-align:center;width:80px}.react-clock__second-hand__body{background-color:red}.react-datetime-picker{display:inline-flex;position:relative}.react-datetime-picker,.react-datetime-picker *,.react-datetime-picker :after,.react-datetime-picker :before{box-sizing:border-box}.react-datetime-picker--disabled{background-color:#f0f0f0;color:#6d6d6d}.react-datetime-picker__wrapper{border:thin solid gray;display:flex;flex-grow:1;flex-shrink:0}.react-datetime-picker__inputGroup{flex-grow:1;min-width:calc(16px + 3.674em);padding:0 2px}.react-datetime-picker__inputGroup__divider{padding:1px 0;white-space:pre}.react-datetime-picker__inputGroup__divider,.react-datetime-picker__inputGroup__leadingZero{display:inline-block}.react-datetime-picker__inputGroup__input{-webkit-appearance:textfield;appearance:textfield;background:none;border:0;box-sizing:initial;font:inherit;height:calc(100% - 2px);min-width:.54em;padding:1px;position:relative}.react-datetime-picker__inputGroup__input::-webkit-inner-spin-button,.react-datetime-picker__inputGroup__input::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.react-datetime-picker__inputGroup__input:invalid{background:rgba(255,0,0,.1)}.react-datetime-picker__inputGroup__input--hasLeadingZero{margin-left:-.54em;padding-left:calc(1px + .54em)}.react-datetime-picker__inputGroup__amPm{-webkit-appearance:menulist;appearance:menulist;font:inherit}.react-datetime-picker__button{background:transparent;border:0;padding:4px 6px}.react-datetime-picker__button:enabled{cursor:pointer}.react-datetime-picker__button:enabled:focus .react-datetime-picker__button__icon,.react-datetime-picker__button:enabled:hover .react-datetime-picker__button__icon{stroke:#0078d7}.react-datetime-picker__button:disabled .react-datetime-picker__button__icon{stroke:#6d6d6d}.react-datetime-picker__button svg{display:inherit}.react-datetime-picker__calendar,.react-datetime-picker__clock{z-index:1}.react-datetime-picker__calendar--closed,.react-datetime-picker__clock--closed{display:none}.react-datetime-picker__calendar{max-width:100vw;width:350px}.react-datetime-picker__calendar .react-calendar{border-width:thin}.react-datetime-picker__clock{background-color:#fff;border:thin solid #a0a096;height:200px;max-width:100vw;padding:25px;width:200px}.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite}}.App-header{align-items:center;background-color:#282c34;color:#fff;display:flex;flex-direction:column;font-size:calc(10px + 2vmin);justify-content:center;min-height:100vh}.App-link{color:#61dafb}.makeStyles-root-3 div.MuiDialogTitle-root{background-color:#bcbcbd}.makeStyles-root-3 .MuiDialogContent-root .MuiList-root{background:#fff!important}@-webkit-keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} +/*# sourceMappingURL=main.a0d8d90f.css.map*/ \ No newline at end of file diff --git a/build/static/css/main.a0d8d90f.css.map b/build/static/css/main.a0d8d90f.css.map new file mode 100644 index 0000000..a6de9c1 --- /dev/null +++ b/build/static/css/main.a0d8d90f.css.map @@ -0,0 +1 @@ +{"version":3,"file":"static/css/main.a0d8d90f.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAEY,CAHZ,QAMF,CAEA,KACE,uEAEF,CCZA,gBAGE,eAAiB,CACjB,wBAAyB,CACzB,sCAAyC,CACzC,mBAAoB,CAJpB,cAAe,CADf,WAMF,CACA,4BACE,WACF,CACA,2DACE,YAAa,CACb,YACF,CACA,6DAEE,WAAa,CADb,SAEF,CACA,iFAME,qBACF,CACA,uBAEE,QAAS,CADT,QAAS,CAET,YACF,CACA,qCACE,cACF,CACA,4BACE,YAAa,CACb,WAAY,CACZ,iBACF,CACA,mCAEE,eAAgB,CADhB,cAEF,CACA,4CACE,wBACF,CACA,kGAEE,wBACF,CACA,sCAIE,eAAiB,CADjB,eAAiB,CAFjB,iBAAkB,CAClB,wBAGF,CACA,+CACE,YACF,CACA,+DAEE,kBAAmB,CADnB,YAAa,CAGb,eAAiB,CACjB,eAAiB,CAFjB,sBAGF,CACA,gDACE,aACF,CACA,yDACE,aACF,CACA,wJAGE,gBACF,CACA,sBAGE,eAAgB,CAEhB,gBAAiB,CAJjB,cAAe,CACf,qBAAsB,CAEtB,iBAEF,CACA,+BACE,wBACF,CACA,wEAEE,wBACF,CACA,2BACE,kBACF,CACA,kFAEE,kBACF,CACA,iCACE,kBACF,CACA,8FAEE,kBACF,CACA,8BACE,kBAAmB,CACnB,UACF,CACA,wFAEE,kBACF,CACA,0DACE,wBACF,CCpHA,aACE,aAAc,CACd,iBACF,CAEA,qEAME,qBACF,CAEA,mBAME,qBAAuB,CACvB,iBAAkB,CAJlB,QAAS,CACT,MAAO,CAHP,iBAAkB,CAIlB,OAAQ,CAHR,KAMF,CAEA,mBAGE,QAAS,CACT,QAAS,CAHT,iBAAkB,CAIlB,SAAU,CAHV,KAIF,CAEA,yBAEE,qBAAuB,CADvB,iBAAkB,CAElB,kCAA2B,CAA3B,0BACF,CAEA,mBAGE,QAAS,CACT,QAAS,CAHT,iBAAkB,CAIlB,SAAU,CAHV,KAIF,CAEA,yBAEE,qBAAuB,CADvB,iBAAkB,CAElB,kCAA2B,CAA3B,0BACF,CAEA,2BAEE,UAAW,CADX,iBAAkB,CAGlB,iBAAkB,CADlB,UAEF,CAEA,gCACE,oBACF,CC7DA,uBACE,mBAAoB,CACpB,iBACF,CAEA,6GAME,qBACF,CAEA,iCACE,wBAAyB,CACzB,aACF,CAEA,gCAIE,sBAAuB,CAHvB,YAAa,CACb,WAAY,CACZ,aAEF,CAEA,mCAEE,WAAY,CADZ,8BAA2D,CAE3D,aACF,CAEA,4CACE,aAAc,CACd,eACF,CAEA,4FAEE,oBACF,CAEA,0CASE,4BAA6B,CAE7B,oBAAqB,CALrB,eAAgB,CADhB,QAAS,CAGT,kBAAuB,CADvB,YAAa,CALb,uBAAwB,CADxB,eAAiB,CAGjB,WAAY,CADZ,iBASF,CAEA,0IAEE,uBAAwB,CAExB,eAAgB,CAChB,QACF,CAEA,kDACE,2BACF,CAEA,0DACE,kBAAoB,CACpB,8BACF,CAEA,yCAEE,2BAA4B,CAE5B,mBAAoB,CAHpB,YAIF,CAEA,+BAEE,sBAAuB,CADvB,QAAS,CAET,eACF,CAEA,uCACE,cACF,CAEA,oKAEE,cACF,CAEA,6EACE,cACF,CAEA,mCACE,eACF,CAEA,+DAEE,SACF,CAEA,+EAEE,YACF,CAEA,iCAEE,eAAgB,CADhB,WAEF,CAEA,iDACE,iBACF,CAEA,8BAKE,qBAAuB,CACvB,yBAA0B,CAJ1B,YAAa,CACb,eAAgB,CAChB,YAAa,CAHb,WAMF,CCjIA,KACE,iBACF,CAEA,UACE,aAAc,CACd,mBACF,CAEA,8CACE,UACE,mDAA4C,CAA5C,2CACF,CACF,CAEA,YAKE,kBAAmB,CAJnB,wBAAyB,CAOzB,UAAY,CALZ,YAAa,CACb,qBAAsB,CAGtB,4BAA6B,CAD7B,sBAAuB,CAJvB,gBAOF,CAEA,UACE,aACF,CAEA,2CACE,wBACF,CAEA,wDACE,yBACF,CAEA,iCACE,GACE,8BAAuB,CAAvB,sBACF,CACA,GACE,+BAAyB,CAAzB,uBACF,CACF,CAPA,yBACE,GACE,8BAAuB,CAAvB,sBACF,CACA,GACE,+BAAyB,CAAzB,uBACF,CACF","sources":["index.css","../node_modules/react-calendar/dist/Calendar.css","../node_modules/react-clock/dist/Clock.css","../node_modules/react-datetime-picker/dist/DateTimePicker.css","App.css"],"sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\",\n \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, \"Courier New\",\n monospace;\n}\n",".react-calendar {\n width: 350px;\n max-width: 100%;\n background: white;\n border: 1px solid #a0a096;\n font-family: Arial, Helvetica, sans-serif;\n line-height: 1.125em;\n}\n.react-calendar--doubleView {\n width: 700px;\n}\n.react-calendar--doubleView .react-calendar__viewContainer {\n display: flex;\n margin: -0.5em;\n}\n.react-calendar--doubleView .react-calendar__viewContainer > * {\n width: 50%;\n margin: 0.5em;\n}\n.react-calendar,\n.react-calendar *,\n.react-calendar *:before,\n.react-calendar *:after {\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.react-calendar button {\n margin: 0;\n border: 0;\n outline: none;\n}\n.react-calendar button:enabled:hover {\n cursor: pointer;\n}\n.react-calendar__navigation {\n display: flex;\n height: 44px;\n margin-bottom: 1em;\n}\n.react-calendar__navigation button {\n min-width: 44px;\n background: none;\n}\n.react-calendar__navigation button:disabled {\n background-color: #f0f0f0;\n}\n.react-calendar__navigation button:enabled:hover,\n.react-calendar__navigation button:enabled:focus {\n background-color: #e6e6e6;\n}\n.react-calendar__month-view__weekdays {\n text-align: center;\n text-transform: uppercase;\n font-weight: bold;\n font-size: 0.75em;\n}\n.react-calendar__month-view__weekdays__weekday {\n padding: 0.5em;\n}\n.react-calendar__month-view__weekNumbers .react-calendar__tile {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 0.75em;\n font-weight: bold;\n}\n.react-calendar__month-view__days__day--weekend {\n color: #d10000;\n}\n.react-calendar__month-view__days__day--neighboringMonth {\n color: #757575;\n}\n.react-calendar__year-view .react-calendar__tile,\n.react-calendar__decade-view .react-calendar__tile,\n.react-calendar__century-view .react-calendar__tile {\n padding: 2em 0.5em;\n}\n.react-calendar__tile {\n max-width: 100%;\n padding: 10px 6.6667px;\n background: none;\n text-align: center;\n line-height: 16px;\n}\n.react-calendar__tile:disabled {\n background-color: #f0f0f0;\n}\n.react-calendar__tile:enabled:hover,\n.react-calendar__tile:enabled:focus {\n background-color: #e6e6e6;\n}\n.react-calendar__tile--now {\n background: #ffff76;\n}\n.react-calendar__tile--now:enabled:hover,\n.react-calendar__tile--now:enabled:focus {\n background: #ffffa9;\n}\n.react-calendar__tile--hasActive {\n background: #76baff;\n}\n.react-calendar__tile--hasActive:enabled:hover,\n.react-calendar__tile--hasActive:enabled:focus {\n background: #a9d4ff;\n}\n.react-calendar__tile--active {\n background: #006edc;\n color: white;\n}\n.react-calendar__tile--active:enabled:hover,\n.react-calendar__tile--active:enabled:focus {\n background: #1087ff;\n}\n.react-calendar--selectRange .react-calendar__tile--hover {\n background-color: #e6e6e6;\n}\n",".react-clock {\n display: block;\n position: relative;\n}\n\n.react-clock,\n.react-clock *,\n.react-clock *:before,\n.react-clock *:after {\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.react-clock__face {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border: 1px solid black;\n border-radius: 50%;\n}\n\n.react-clock__hand {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n right: 50%;\n}\n\n.react-clock__hand__body {\n position: absolute;\n background-color: black;\n transform: translateX(-50%);\n}\n\n.react-clock__mark {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n right: 50%;\n}\n\n.react-clock__mark__body {\n position: absolute;\n background-color: black;\n transform: translateX(-50%);\n}\n\n.react-clock__mark__number {\n position: absolute;\n left: -40px;\n width: 80px;\n text-align: center;\n}\n\n.react-clock__second-hand__body {\n background-color: red;\n}\n",".react-datetime-picker {\n display: inline-flex;\n position: relative;\n}\n\n.react-datetime-picker,\n.react-datetime-picker *,\n.react-datetime-picker *:before,\n.react-datetime-picker *:after {\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.react-datetime-picker--disabled {\n background-color: #f0f0f0;\n color: #6d6d6d;\n}\n\n.react-datetime-picker__wrapper {\n display: flex;\n flex-grow: 1;\n flex-shrink: 0;\n border: thin solid gray;\n}\n\n.react-datetime-picker__inputGroup {\n min-width: calc(4px + (4px * 3) + 0.54em * 6 + 0.217em * 2);\n flex-grow: 1;\n padding: 0 2px;\n}\n\n.react-datetime-picker__inputGroup__divider {\n padding: 1px 0;\n white-space: pre;\n}\n\n.react-datetime-picker__inputGroup__divider,\n.react-datetime-picker__inputGroup__leadingZero {\n display: inline-block;\n}\n\n.react-datetime-picker__inputGroup__input {\n min-width: 0.54em;\n height: calc(100% - 2px);\n position: relative;\n padding: 1px;\n border: 0;\n background: none;\n font: inherit;\n box-sizing: content-box;\n -webkit-appearance: textfield;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n\n.react-datetime-picker__inputGroup__input::-webkit-outer-spin-button,\n.react-datetime-picker__inputGroup__input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n margin: 0;\n}\n\n.react-datetime-picker__inputGroup__input:invalid {\n background: rgba(255, 0, 0, 0.1);\n}\n\n.react-datetime-picker__inputGroup__input--hasLeadingZero {\n margin-left: -0.54em;\n padding-left: calc(1px + 0.54em);\n}\n\n.react-datetime-picker__inputGroup__amPm {\n font: inherit;\n -webkit-appearance: menulist;\n -moz-appearance: menulist;\n appearance: menulist;\n}\n\n.react-datetime-picker__button {\n border: 0;\n background: transparent;\n padding: 4px 6px;\n}\n\n.react-datetime-picker__button:enabled {\n cursor: pointer;\n}\n\n.react-datetime-picker__button:enabled:hover .react-datetime-picker__button__icon,\n.react-datetime-picker__button:enabled:focus .react-datetime-picker__button__icon {\n stroke: #0078d7;\n}\n\n.react-datetime-picker__button:disabled .react-datetime-picker__button__icon {\n stroke: #6d6d6d;\n}\n\n.react-datetime-picker__button svg {\n display: inherit;\n}\n\n.react-datetime-picker__calendar,\n.react-datetime-picker__clock {\n z-index: 1;\n}\n\n.react-datetime-picker__calendar--closed,\n.react-datetime-picker__clock--closed {\n display: none;\n}\n\n.react-datetime-picker__calendar {\n width: 350px;\n max-width: 100vw;\n}\n\n.react-datetime-picker__calendar .react-calendar {\n border-width: thin;\n}\n\n.react-datetime-picker__clock {\n width: 200px;\n height: 200px;\n max-width: 100vw;\n padding: 25px;\n background-color: white;\n border: thin solid #a0a096;\n}\n",".App {\n text-align: center;\n}\n\n.App-logo {\n height: 40vmin;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .App-logo {\n animation: App-logo-spin infinite 20s linear;\n }\n}\n\n.App-header {\n background-color: #282c34;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n}\n\n.App-link {\n color: #61dafb;\n}\n\n.makeStyles-root-3 div.MuiDialogTitle-root {\n background-color: #bcbcbd;\n}\n\n.makeStyles-root-3 .MuiDialogContent-root .MuiList-root {\n background: #ffffff !important;\n}\n\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/static/js/806.21b30677.chunk.js b/build/static/js/806.21b30677.chunk.js new file mode 100644 index 0000000..4c7af50 --- /dev/null +++ b/build/static/js/806.21b30677.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkmultisig_ui=self.webpackChunkmultisig_ui||[]).push([[806],{17806:function(n,e,t){t.r(e),t.d(e,{CLSThresholds:function(){return F},FCPThresholds:function(){return S},FIDThresholds:function(){return N},INPThresholds:function(){return G},LCPThresholds:function(){return X},TTFBThresholds:function(){return $},getCLS:function(){return I},getFCP:function(){return P},getFID:function(){return R},getINP:function(){return W},getLCP:function(){return Z},getTTFB:function(){return en},onCLS:function(){return I},onFCP:function(){return P},onFID:function(){return R},onINP:function(){return W},onLCP:function(){return Z},onTTFB:function(){return en}});var r,i,o,a,u,c=-1,f=function(n){addEventListener("pageshow",(function(e){e.persisted&&(c=e.timeStamp,n(e))}),!0)},s=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},d=function(){var n=s();return n&&n.activationStart||0},l=function(n,e){var t=s(),r="navigate";return c>=0?r="back-forward-cache":t&&(r=document.prerendering||d()>0?"prerender":document.wasDiscarded?"restore":t.type.replace(/_/g,"-")),{name:n,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},p=function(n,e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(n)){var r=new PerformanceObserver((function(n){Promise.resolve().then((function(){e(n.getEntries())}))}));return r.observe(Object.assign({type:n,buffered:!0},t||{})),r}}catch(n){}},v=function(n,e,t,r){var i,o;return function(a){e.value>=0&&(a||r)&&((o=e.value-(i||0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(n,e){return n>e[1]?"poor":n>e[0]?"needs-improvement":"good"}(e.value,t),n(e))}},m=function(n){requestAnimationFrame((function(){return requestAnimationFrame((function(){return n()}))}))},h=function(n){var e=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||n(e)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},g=function(n){var e=!1;return function(t){e||(n(t),e=!0)}},T=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},C=function(n){"hidden"===document.visibilityState&&T>-1&&(T="visibilitychange"===n.type?n.timeStamp:0,L())},E=function(){addEventListener("visibilitychange",C,!0),addEventListener("prerenderingchange",C,!0)},L=function(){removeEventListener("visibilitychange",C,!0),removeEventListener("prerenderingchange",C,!0)},b=function(){return T<0&&(T=y(),E(),f((function(){setTimeout((function(){T=y(),E()}),0)}))),{get firstHiddenTime(){return T}}},w=function(n){document.prerendering?addEventListener("prerenderingchange",(function(){return n()}),!0):n()},S=[1800,3e3],P=function(n,e){e=e||{},w((function(){var t,r=b(),i=l("FCP"),o=p("paint",(function(n){n.forEach((function(n){"first-contentful-paint"===n.name&&(o.disconnect(),n.startTimer.value&&(r.value=i,r.entries=o,t())},u=p("layout-shift",a);u&&(t=v(n,r,F,e.reportAllChanges),h((function(){a(u.takeRecords()),t(!0)})),f((function(){i=0,r=l("CLS",0),t=v(n,r,F,e.reportAllChanges),m((function(){return t()}))})),setTimeout(t,0))})))},A={passive:!0,capture:!0},k=new Date,D=function(n,e){r||(r=e,i=n,o=new Date,x(removeEventListener),M())},M=function(){if(i>=0&&i1e12?new Date:performance.now())-n.timeStamp;"pointerdown"==n.type?function(n,e){var t=function(){D(n,e),i()},r=function(){i()},i=function(){removeEventListener("pointerup",t,A),removeEventListener("pointercancel",r,A)};addEventListener("pointerup",t,A),addEventListener("pointercancel",r,A)}(e,n):D(e,n)}},x=function(n){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return n(e,B,A)}))},N=[100,300],R=function(n,e){e=e||{},w((function(){var t,o=b(),u=l("FID"),c=function(n){n.startTimee.latency){if(t)t.entries.push(n),t.latency=Math.max(t.latency,n.duration);else{var r={id:n.interactionId,latency:n.duration,entries:[n]};U[r.id]=r,Q.push(r)}Q.sort((function(n,e){return e.latency-n.latency})),Q.splice(10).forEach((function(n){delete U[n.id]}))}},W=function(n,e){e=e||{},w((function(){z();var t,r=l("INP"),i=function(n){n.forEach((function(n){n.interactionId&&V(n),"first-input"===n.entryType&&!Q.some((function(e){return e.entries.some((function(e){return n.duration===e.duration&&n.startTime===e.startTime}))}))&&V(n)}));var e,i=(e=Math.min(Q.length-1,Math.floor(K()/50)),Q[e]);i&&i.latency!==r.value&&(r.value=i.latency,r.entries=i.entries,t())},o=p("event",i,{durationThreshold:e.durationThreshold||40});t=v(n,r,G,e.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),h((function(){i(o.takeRecords()),r.value<0&&K()>0&&(r.value=0,r.entries=[]),t(!0)})),f((function(){Q=[],J=j(),r=l("INP"),t=v(n,r,G,e.reportAllChanges)})))}))},X=[2500,4e3],Y={},Z=function(n,e){e=e||{},w((function(){var t,r=b(),i=l("LCP"),o=function(n){var e=n[n.length-1];e&&e.startTimeperformance.now())return;t.value=Math.max(o-d(),0),t.entries=[i],r(!0),f((function(){t=l("TTFB",0),(r=v(n,t,$,e.reportAllChanges))(!0)}))}}))}}}]); +//# sourceMappingURL=806.21b30677.chunk.js.map \ No newline at end of file diff --git a/build/static/js/main.827183f4.js b/build/static/js/main.827183f4.js new file mode 100644 index 0000000..a47f192 --- /dev/null +++ b/build/static/js/main.827183f4.js @@ -0,0 +1,3 @@ +/*! For license information please see main.827183f4.js.LICENSE.txt */ +(function(){var __webpack_modules__={85335:function(e,t,n){var a=n(65218);e.exports=function(){return e={418:function(e,t){!function(e,t){for(var n in t)e[n]=t[n]}(t,function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={splitValues:!1});var n,o=this;this.headersMap={},e&&("undefined"!=typeof Headers&&e instanceof Headers?a.getHeaderKeys(e).forEach((function(n){a.getHeaderValues(e,n).forEach((function(e){t.splitValues?o.append(n,a.splitHeaderValue(e)):o.append(n,e)}))})):"object"==typeof(n=e)&&"object"==typeof n.headersMap&&"function"==typeof n.forEach?e.forEach((function(e,t){o.append(e,t)})):"undefined"!=typeof Map&&e instanceof Map?e.forEach((function(e,t){o.append(t,e)})):"string"==typeof e?this.appendFromString(e):"object"==typeof e&&Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];Array.isArray(n)?n.forEach((function(e){o.append(t,e)})):o.append(t,n)})))}return e.prototype.appendFromString=function(e){for(var t=e.split("\r\n"),n=0;n0){var r=a.substring(0,o).trim(),i=a.substring(o+1).trim();this.append(r,i)}}},e.prototype.delete=function(e,t){var n=a.normalizeName(e);if(void 0===t)delete this.headersMap[n];else{var o=this.headersMap[n];if(o){var r=o.indexOf(t);r>=0&&o.splice(r,1),0===o.length&&delete this.headersMap[n]}}},e.prototype.append=function(e,t){var n=this,o=a.normalizeName(e);Array.isArray(this.headersMap[o])||(this.headersMap[o]=[]),Array.isArray(t)?t.forEach((function(e){n.headersMap[o].push(a.normalizeValue(e))})):this.headersMap[o].push(a.normalizeValue(t))},e.prototype.set=function(e,t){var n=a.normalizeName(e);if(Array.isArray(t)){var o=[];t.forEach((function(e){o.push(a.normalizeValue(e))})),this.headersMap[n]=o}else this.headersMap[n]=[a.normalizeValue(t)]},e.prototype.has=function(e,t){var n=this.headersMap[a.normalizeName(e)];if(!Array.isArray(n))return!1;if(void 0!==t){var o=a.normalizeValue(t);return n.indexOf(o)>=0}return!0},e.prototype.get=function(e){var t=this.headersMap[a.normalizeName(e)];return void 0!==t?t.concat():[]},e.prototype.forEach=function(e){var t=this;Object.getOwnPropertyNames(this.headersMap).forEach((function(n){e(n,t.headersMap[n])}),this)},e.prototype.toHeaders=function(){if("undefined"!=typeof Headers){var e=new Headers;return this.forEach((function(t,n){n.forEach((function(n){e.append(t,n)}))})),e}throw new Error("Headers class is not defined")},e}();t.BrowserHeaders=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0);t.BrowserHeaders=a.BrowserHeaders},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterateHeaders=function(e,t){for(var n=e[Symbol.iterator](),a=n.next();!a.done;)t(a.value[0]),a=n.next()},t.iterateHeadersKeys=function(e,t){for(var n=e.keys(),a=n.next();!a.done;)t(a.value),a=n.next()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(2);t.normalizeName=function(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()},t.normalizeValue=function(e){return"string"!=typeof e&&(e=String(e)),e},t.getHeaderValues=function(e,t){var n=e;if(n instanceof Headers&&n.getAll)return n.getAll(t);var a=n.get(t);return a&&"string"==typeof a?[a]:a},t.getHeaderKeys=function(e){var t=e,n={},o=[];return t.keys?a.iterateHeadersKeys(t,(function(e){n[e]||(n[e]=!0,o.push(e))})):t.forEach?t.forEach((function(e,t){n[t]||(n[t]=!0,o.push(t))})):a.iterateHeaders(t,(function(e){var t=e[0];n[t]||(n[t]=!0,o.push(t))})),o},t.splitHeaderValue=function(e){var t=[];return e.split(", ").forEach((function(e){e.split(",").forEach((function(e){t.push(e)}))})),t}}]))},617:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkParser=t.ChunkType=t.encodeASCII=t.decodeASCII=void 0;var a,o=n(65);function r(e){return 9===(t=e)||10===t||13===t||e>=32&&e<=126;var t}function i(e){for(var t=0;t!==e.length;++t)if(!r(e[t]))throw new Error("Metadata is not valid (printable) ASCII");return String.fromCharCode.apply(String,Array.prototype.slice.call(e))}function s(e){return 128==(128&e.getUint8(0))}function c(e){return e.getUint32(1,!1)}function u(e,t,n){return e.byteLength-t>=n}function d(e,t,n){if(e.slice)return e.slice(t,n);var a=e.length;void 0!==n&&(a=n);for(var o=new Uint8Array(a-t),r=0,i=t;i=0?n:r.httpStatusToCode(t);this.props.debug&&i.debug("onHeaders.code",a);var o=e.get("grpc-message")||[];if(this.props.debug&&i.debug("onHeaders.gRPCMessage",o),this.rawOnHeaders(e),a!==r.Code.OK){var s=this.decodeGRPCStatus(o[0]);this.rawOnError(a,s,e)}}},e.prototype.onTransportChunk=function(e){var t=this;if(this.closed)this.props.debug&&i.debug("grpc.onChunk received after request was closed - ignoring");else{var n=[];try{n=this.parser.parse(e)}catch(e){return this.props.debug&&i.debug("onChunk.parsing error",e,e.message),void this.rawOnError(r.Code.Internal,"parsing error: "+e.message)}n.forEach((function(e){if(e.chunkType===o.ChunkType.MESSAGE){var n=t.methodDefinition.responseType.deserializeBinary(e.data);t.rawOnMessage(n)}else e.chunkType===o.ChunkType.TRAILERS&&(t.responseHeaders?(t.responseTrailers=new a.Metadata(e.trailers),t.props.debug&&i.debug("onChunk.trailers",t.responseTrailers)):(t.responseHeaders=new a.Metadata(e.trailers),t.rawOnHeaders(t.responseHeaders)))}))}},e.prototype.onTransportEnd=function(){if(this.props.debug&&i.debug("grpc.onEnd"),this.closed)this.props.debug&&i.debug("grpc.onEnd received after request was closed - ignoring");else if(void 0!==this.responseTrailers){var e=d(this.responseTrailers);if(null!==e){var t=this.responseTrailers.get("grpc-message"),n=this.decodeGRPCStatus(t[0]);this.rawOnEnd(e,n,this.responseTrailers)}else this.rawOnError(r.Code.Internal,"Response closed without grpc-status (Trailers provided)")}else{if(void 0===this.responseHeaders)return void this.rawOnError(r.Code.Unknown,"Response closed without headers");var a=d(this.responseHeaders),o=this.responseHeaders.get("grpc-message");if(this.props.debug&&i.debug("grpc.headers only response ",a,o),null===a)return void this.rawOnEnd(r.Code.Unknown,"Response closed without grpc-status (Headers only)",this.responseHeaders);var s=this.decodeGRPCStatus(o[0]);this.rawOnEnd(a,s,this.responseHeaders)}},e.prototype.decodeGRPCStatus=function(e){if(!e)return"";try{return decodeURIComponent(e)}catch(t){return e}},e.prototype.rawOnEnd=function(e,t,n){var a=this;this.props.debug&&i.debug("rawOnEnd",e,t,n),this.completed||(this.completed=!0,this.onEndCallbacks.forEach((function(o){if(!a.closed)try{o(e,t,n)}catch(e){setTimeout((function(){throw e}),0)}})))},e.prototype.rawOnHeaders=function(e){this.props.debug&&i.debug("rawOnHeaders",e),this.completed||this.onHeadersCallbacks.forEach((function(t){try{t(e)}catch(e){setTimeout((function(){throw e}),0)}}))},e.prototype.rawOnError=function(e,t,n){var o=this;void 0===n&&(n=new a.Metadata),this.props.debug&&i.debug("rawOnError",e,t),this.completed||(this.completed=!0,this.onEndCallbacks.forEach((function(a){if(!o.closed)try{a(e,t,n)}catch(e){setTimeout((function(){throw e}),0)}})))},e.prototype.rawOnMessage=function(e){var t=this;this.props.debug&&i.debug("rawOnMessage",e.toObject()),this.completed||this.closed||this.onMessageCallbacks.forEach((function(n){if(!t.closed)try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))},e.prototype.onHeaders=function(e){this.onHeadersCallbacks.push(e)},e.prototype.onMessage=function(e){this.onMessageCallbacks.push(e)},e.prototype.onEnd=function(e){this.onEndCallbacks.push(e)},e.prototype.start=function(e){if(this.started)throw new Error("Client already started - cannot .start()");this.started=!0;var t=new a.Metadata(e||{});t.set("content-type","application/grpc-web+proto"),t.set("x-grpc-web","1"),this.transport.start(t)},e.prototype.send=function(e){if(!this.started)throw new Error("Client not started - .start() must be called before .send()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .send()");if(!this.methodDefinition.requestStream&&this.sentFirstMessage)throw new Error("Message already sent for non-client-streaming method - cannot .send()");this.sentFirstMessage=!0;var t=c.frameRequest(e);this.transport.sendMessage(t)},e.prototype.finishSend=function(){if(!this.started)throw new Error("Client not started - .finishSend() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .finishSend()");this.finishedSending=!0,this.transport.finishSend()},e.prototype.close=function(){if(!this.started)throw new Error("Client not started - .start() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .close()");this.closed=!0,this.props.debug&&i.debug("request.abort aborting request"),this.transport.cancel()},e}();function d(e){var t=e.get("grpc-status")||[];if(t.length>0)try{var n=t[0];return parseInt(n,10)}catch(e){return null}return null}},346:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0,t.debug=function(){for(var e=[],t=0;t=55296&&n<=56319){var a=e.charCodeAt(t+1);a>=56320&&a<=57343&&(n=65536+(n-55296<<10)+(a-56320))}return n}function l(e){for(var t=new Uint8Array(e.length),n=0,a=0;a "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},d=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new a(e):u(e)})(e)}:u};function l(){var e=new r(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw s(this,8);return new r(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=d(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},c.prototype.skip=function(e){if("number"===typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){a=e,c.create=d(),a._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return l.call(this)[t](!1)},uint64:function(){return l.call(this)[t](!0)},sint64:function(){return l.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},72009:function(e,t,n){"use strict";e.exports=r;var a=n(48450);(r.prototype=Object.create(a.prototype)).constructor=r;var o=n(68628);function r(e){a.call(this,e)}r._configure=function(){o.Buffer&&(r.prototype._slice=o.Buffer.prototype.slice)},r.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},r._configure()},89030:function(e){"use strict";e.exports={}},90517:function(e,t,n){"use strict";t.Service=n(87681)},87681:function(e,t,n){"use strict";e.exports=o;var a=n(68628);function o(e,t,n){if("function"!==typeof e)throw TypeError("rpcImpl must be a function");a.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(a.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,r,i){if(!r)throw TypeError("request must be specified");var s=this;if(!i)return a.asPromise(e,s,t,n,o,r);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](r).finish(),(function(e,n){if(e)return s.emit("error",e,t),i(e);if(null!==n){if(!(n instanceof o))try{n=o[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),i(e)}return s.emit("data",n,t),i(null,n)}s.end(!0)}))}catch(c){return s.emit("error",c,t),void setTimeout((function(){i(c)}),0)}else setTimeout((function(){i(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},57810:function(e,t,n){"use strict";e.exports=o;var a=n(68628);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var r=o.zero=new o(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var i=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return r;var t=e<0;t&&(e=-e);var n=e>>>0,a=(e-n)/4294967296>>>0;return t&&(a=~a>>>0,n=~n>>>0,++n>4294967295&&(n=0,++a>4294967295&&(a=0))),new o(n,a)},o.from=function(e){if("number"===typeof e)return o.fromNumber(e);if(a.isString(e)){if(!a.Long)return o.fromNumber(parseInt(e,10));e=a.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):r},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return a.Long?new a.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===i?r:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},68628:function(e,t,n){"use strict";var a=t;function o(e,t,n){for(var a=Object.keys(t),o=0;o0)},a.Buffer=function(){try{var e=a.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),a._Buffer_from=null,a._Buffer_allocUnsafe=null,a.newBuffer=function(e){return"number"===typeof e?a.Buffer?a._Buffer_allocUnsafe(e):new a.Array(e):a.Buffer?a._Buffer_from(e):"undefined"===typeof Uint8Array?e:new Uint8Array(e)},a.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,a.Long=a.global.dcodeIO&&a.global.dcodeIO.Long||a.global.Long||a.inquire("long"),a.key2Re=/^true|false|0|1$/,a.key32Re=/^-?(?:0|[1-9][0-9]*)$/,a.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,a.longToHash=function(e){return e?a.LongBits.from(e).toHash():a.LongBits.zeroHash},a.longFromHash=function(e,t){var n=a.LongBits.fromHash(e);return a.Long?a.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},a.merge=o,a.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},a.newError=r,a.ProtocolError=r("ProtocolError"),a.oneOfGetter=function(e){for(var t={},n=0;n-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},a.oneOfSetter=function(e){return function(t){for(var n=0;n>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function h(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=f(),l.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(l.alloc=o.pool(l.alloc,o.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},b.prototype=Object.create(c.prototype),b.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new b((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(m,10,r.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=r.from(e);return this._push(m,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=r.from(e).zzEncode();return this._push(m,t.length(),t)},l.prototype.bool=function(e){return this._push(p,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(h,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=r.from(e);return this._push(h,4,t.lo)._push(h,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var a=0;a>>0;if(!t)return this._push(p,1,0);if(o.isString(e)){var n=l.alloc(t=i.length(e));i.decode(e,n,0),e=n}return this.uint32(t)._push(g,t,e)},l.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(p,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){a=e,l.create=f(),a._configure()}},29896:function(e,t,n){"use strict";e.exports=r;var a=n(58698);(r.prototype=Object.create(a.prototype)).constructor=r;var o=n(68628);function r(){a.call(this)}function i(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}r._configure=function(){r.alloc=o._Buffer_allocUnsafe,r.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var a=0;a>>0;return this.uint32(t),t&&this._push(r.writeBytesBuffer,t,e),this},r.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(i,t,e),this},r._configure()},74875:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,o,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},c=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n=n.length||3===n.readIntBE(c,1)&&(t.Meta="TokenBridge Transfer With Payload",t.Type=n.readIntBE(c,1),c+=1,t.Amount=C(e,c,32),c+=32,t.Contract=m.uint8ArrayToHex(C(e,c,32)),c+=32,t.FromChain=n.readIntBE(c,2),c+=2,t.ToAddress=C(e,c,32),c+=32,t.ToChain=n.readIntBE(c,2),c+=2,t.FromAddress=C(e,c,32),c+=32,t.Payload=e.slice(c)),t}function R(e,t,n){return o(this,void 0,void 0,(function(){var o,s,c,u,d,l,f,p,b,m,h,g,y,v,w,k,A,x,I,T,S;return r(this,(function(r){switch(r.label){case 0:return o=null,[4,e.accountInformation(n).do()];case 1:s=r.sent();try{for(c=i(s["apps-local-state"]),u=c.next();!u.done;u=c.next())if(d=u.value,BigInt(d.id)===t){o=d["key-value"];break}}catch(C){x={error:C}}finally{try{u&&!u.done&&(I=c.return)&&I.call(c)}finally{if(x)throw x.error}}if(l=a.alloc(0),f=a.alloc(0),o){p=a.alloc(127),b=a.from("meta"),m=[],h=new Map;try{for(g=i(o),y=g.next();!y.done;y=g.next())v=y.value,w=a.from(v.key,"base64"),k=w.readInt8(),a.compare(w,b)&&(A=a.from(v.value.bytes,"base64"),a.compare(A,p)&&(h.set(k.toString(),A),m.push(k.toString())))}catch(E){T={error:E}}finally{try{y&&!y.done&&(S=g.return)&&S.call(g)}finally{if(T)throw T.error}}m.sort((function(e,t){return e.localeCompare(t,"en",{numeric:!0})})),m.forEach((function(e){l=a.concat([l,h.get(e)||f])}))}return[2,new Uint8Array(l)]}}))}))}function M(e,t,n){return o(this,void 0,void 0,(function(){var a,o,i;return r(this,(function(r){switch(r.label){case 0:return[4,e.accountInformation(n).do()];case 1:return a=r.sent(),o=a.assets,i=!1,o.forEach((function(e){BigInt(e["asset-id"])!==t||(i=!0)})),[2,i]}}))}))}t.getMessageFee=function(e,t){return o(this,void 0,void 0,(function(){var n,o,i,s;return r(this,(function(r){switch(r.label){case 0:return[4,e.getApplicationByID(h.safeBigIntToNumber(t)).do()];case 1:return n=r.sent(),o=n.params["global-state"],i=a.from("MessageFee","binary").toString("base64"),s=BigInt(0),o.forEach((function(e){e.key!==i||(s=BigInt(e.value.uint))})),[2,s]}}))}))},t.accountExists=I,t.calcLogicSigAccount=T,t.optin=S,t._parseVAAAlgorand=E,t.METADATA_REPLACE=new RegExp("\0","g"),t._parseNFTAlgorand=function(e){var n=E(e),o=a.from(n.Body);n.action=o.readUInt8(0),n.Contract=o.slice(1,33).toString("hex"),n.FromChain=o.readUInt16BE(33),n.Symbol=a.from(o.slice(35,67)),n.Name=a.from(o.slice(67,99)),n.TokenId=o.slice(99,131);var r=o.readUInt8(131);n.uri=a.from(o.slice(132,132+r)).toString("utf8").replace(t.METADATA_REPLACE,"");var i=132+r;return n.ToAddress=o.slice(i,i+32),n.ToChain=o.readUInt16BE(i+32),n},t.decodeLocalState=R,t.assetOptinCheck=M;var P=function(e,t,n,a){this.vaaMap=e,this.accounts=t,this.txs=n,this.guardianAddr=a};function U(e,n,a,i,u){return o(this,void 0,void 0,(function(){var o,l,f,b,g,y,v,x,I,T,C,M,U,_,B,D,N,O,F,L,j,H,G,z,K,W,Z,V,q,Q,J,Y;return r(this,(function(r){switch(r.label){case 0:return o=E(a),l=o.sequence/BigInt(t.MAX_BITS),f=o.chainRaw,b=o.emitter,g=o.index,y=[],[4,S(e,i,u,l,f+b)];case 1:return v=r.sent(),x=v.addr,I=v.txs,y.push.apply(y,c([],s(I))),T=m.textToHexString("guardian"),[4,S(e,i,n,BigInt(g),T)];case 2:return C=r.sent(),M=C.addr,U=C.txs,y.push.apply(y,c([],s(U))),_=[x,M],[4,R(e,n,M)];case 3:return B=r.sent(),[4,e.getTransactionParams().do()];case 4:for(D=r.sent(),N=p.keccak256(p.keccak256(o.digest)).slice(2),O=o.siglen,F=Math.floor(O/w)+1,66,L=66*w,j=o.signatures,H=m.textToUint8Array("verifySigs"),G=new d.LogicSigAccount(A),z=0;zL&&(K=K.slice(0,L)),20,W=K.length/66,Z=new Uint8Array(20*W),V=0;V8&&(O=a.from(N.slice(0,8)),_.push(h.safeBigIntToNumber(O.readBigUInt64BE(0)))),b.push({tx:d.makePaymentTxnWithSuggestedParamsFromObject({from:u,to:I,amount:1e5,suggestedParams:E}),signer:null}),(P=new Uint8Array(1))[0]=1,b.push({tx:d.makeApplicationCallTxnFromObject({appArgs:[m.textToUint8Array("nop"),P],appIndex:h.safeBigIntToNumber(t),from:u,onComplete:d.OnApplicationComplete.NoOpOC,suggestedParams:E}),signer:null}),(P=new Uint8Array(1))[0]=2,b.push({tx:d.makeApplicationCallTxnFromObject({appArgs:[m.textToUint8Array("nop"),P],appIndex:h.safeBigIntToNumber(t),from:u,onComplete:d.OnApplicationComplete.NoOpOC,suggestedParams:E}),signer:null}),b.push({tx:d.makeApplicationCallTxnFromObject({accounts:p,appArgs:[m.textToUint8Array("receiveAttest"),i],appIndex:h.safeBigIntToNumber(t),foreignAssets:_,from:u,onComplete:d.OnApplicationComplete.NoOpOC,suggestedParams:E}),signer:null}),b[b.length-1].tx.fee=2*b[b.length-1].tx.fee,r.label=11;case 11:return"TokenBridge Transfer"!==x&&"TokenBridge Transfer With Payload"!==x||void 0===f.Contract?[3,17]:(_=[],D=0,f.FromChain===m.CHAIN_ID_ALGORAND?[3,13]:[4,R(e,t,I)]);case 12:return(N=r.sent()).length>8&&(O=a.from(N.slice(0,8)),D=h.safeBigIntToNumber(O.readBigUInt64BE(0))),[3,14];case 13:D=parseInt(f.Contract,16),r.label=14;case 14:return F=0,L="",void 0!==f.ToAddress&&(8===f.ToChain&&3===f.Type?(F=Number(B(m.uint8ArrayToHex(f.ToAddress))),L=d.getApplicationAddress(F)):L=d.encodeAddress(f.ToAddress)),0===D?[3,16]:(_.push(D),[4,M(e,BigInt(D),L)]);case 15:if(!r.sent()){if(u!=L)throw new Error("cannot ASA optin for somebody else (asset "+D.toString()+")");b.unshift({tx:d.makeAssetTransferTxnWithSuggestedParamsFromObject({amount:0,assetIndex:D,from:u,suggestedParams:E,to:u}),signer:null})}r.label=16;case 16:p.push(L),b.push({tx:d.makeApplicationCallTxnFromObject({accounts:p,appArgs:[m.textToUint8Array("completeTransfer"),i],appIndex:h.safeBigIntToNumber(t),foreignAssets:_,from:u,onComplete:d.OnApplicationComplete.NoOpOC,suggestedParams:E}),signer:null}),void 0!==f.Fee&&0===a.compare(f.Fee,a.from(v,"hex"))?b[b.length-1].tx.fee=2*b[b.length-1].tx.fee:b[b.length-1].tx.fee=3*b[b.length-1].tx.fee,"TokenBridge Transfer With Payload"===x&&(b[b.length-1].tx.appForeignApps=[F],j=l.default.ABIMethod.fromSignature("portal_transfer(byte[])byte[]"),b.push({tx:d.makeApplicationCallTxnFromObject({appArgs:[j.getSelector(),j.args[0].type.encode(i)],appIndex:F,foreignAssets:_,from:u,onComplete:d.OnApplicationComplete.NoOpOC,suggestedParams:E}),signer:null})),r.label=17;case 17:return[2,b]}}))}))},t.uint8ArrayToNativeStringAlgorand=_,t.hexToNativeStringAlgorand=function(e){return _(m.hexToUint8Array(e))},t.nativeStringToHexAlgorand=function(e){return m.uint8ArrayToHex(d.decodeAddress(e).publicKey)},t.hexToNativeAssetBigIntAlgorand=B,t.hexToNativeAssetStringAlgorand=function(e){return f.BigNumber.from(m.hexToUint8Array(e)).toString()},t.signSendAndConfirmAlgorand=function(e,t,n){return o(this,void 0,void 0,(function(){var a,o,s,c,u,l,f,p,b;return r(this,(function(r){switch(r.label){case 0:d.assignGroupID(t.map((function(e){return e.tx}))),a=[],r.label=1;case 1:r.trys.push([1,7,8,9]),o=i(t),s=o.next(),r.label=2;case 2:return s.done?[3,6]:(c=s.value).signer?(l=(u=a).push,[4,c.signer.signTxn(c.tx)]):[3,4];case 3:return l.apply(u,[r.sent()]),[3,5];case 4:a.push(c.tx.signTxn(n.sk)),r.label=5;case 5:return s=o.next(),[3,2];case 6:return[3,9];case 7:return f=r.sent(),p={error:f},[3,9];case 8:try{s&&!s.done&&(b=o.return)&&b.call(o)}finally{if(p)throw p.error}return[7];case 9:return[4,e.sendRawTransaction(a).do()];case 10:return r.sent(),[4,d.waitForConfirmation(e,t[t.length-1].tx.txID(),4)];case 11:return[2,r.sent()]}}))}))}},34778:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encodeHex=t.encode=t.encodingLength=void 0;var o=BigInt(127);function r(e){for(var t=0;e>=BigInt(128);t++)e>>=BigInt(7);return t+1}function i(e,t,n){if(e>=BigInt(7);return i[s]=Number(e),i}t.encodingLength=r,t.encode=i,t.encodeHex=function(e,t,n){return a.from(i(e,t,n)).toString("hex")},t.decode=function(e,t){void 0===t&&(t=0);var n,a=BigInt(0),o=0;do{if(void 0===(n=e[t+o]))throw new RangeError("offset out of range");a+=BigInt(127&n)<0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.parseSequenceFromLogAptos=t.parseSequenceFromLogNear=t.parseSequenceFromLogAlgorand=t.parseSequencesFromLogSolana=t.parseSequenceFromLogSolana=t.parseSequenceFromLogInjective=t.parseSequencesFromLogTerra=t.parseSequenceFromLogXpla=t.parseSequenceFromLogTerra=t.parseSequencesFromLogEth=t.parseSequenceFromLogEth=void 0;var o=n(93519),r=n(51585);t.parseSequenceFromLogEth=function(e,t){var n=e.logs.filter((function(e){return e.address===t}))[0];return r.Implementation__factory.createInterface().parseLog(n).args.sequence.toString()},t.parseSequencesFromLogEth=function(e,t){return e.logs.filter((function(e){return e.address===t})).map((function(e){return r.Implementation__factory.createInterface().parseLog(e).args.sequence.toString()}))},t.parseSequenceFromLogTerra=function(e){var t="";return JSON.parse(e.raw_log).map((function(e){e.events.map((function(e){e.attributes.map((function(e){"message.sequence"===e.key&&(t=e.value)}))}))})),t.toString()},t.parseSequenceFromLogXpla=function(e){var t="";return JSON.parse(e.raw_log).map((function(e){e.events.map((function(e){e.attributes.map((function(e){"message.sequence"===e.key&&(t=e.value)}))}))})),t.toString()},t.parseSequencesFromLogTerra=function(e){var t=[];return JSON.parse(e.raw_log).map((function(e){e.events.map((function(e){e.attributes.map((function(e){"message.sequence"===e.key&&t.push(e.value.toString())}))}))})),t},t.parseSequenceFromLogInjective=function(e){var t="";return JSON.parse(e.rawLog).map((function(e){e.events.map((function(e){e.attributes.map((function(e){"message.sequence"===e.key&&(t=e.value)}))}))})),t.toString()};var i="Program log: Sequence: ";t.parseSequenceFromLogSolana=function(e){var t,n,a,o,r=null===(o=null===(a=null===(n=null===(t=e.meta)||void 0===t?void 0:t.logMessages)||void 0===n?void 0:n.filter((function(e){return e.startsWith(i)})))||void 0===a?void 0:a[0])||void 0===o?void 0:o.replace(i,"");if(!r)throw new Error("sequence not found");return r.toString()},t.parseSequencesFromLogSolana=function(e){var t,n;return null===(n=null===(t=e.meta)||void 0===t?void 0:t.logMessages)||void 0===n?void 0:n.filter((function(e){return e.startsWith(i)})).map((function(e){return e.replace(i,"")}))},t.parseSequenceFromLogAlgorand=function(e){var t="";if(e["inner-txns"]){e["inner-txns"].forEach((function(e){e.logs&&(t=o.BigNumber.from(e.logs[0].slice(0,8)).toString())}))}return t};var s="EVENT_JSON:";t.parseSequenceFromLogNear=function(e){var t,n,o,r;try{for(var i=a(e.receipts_outcome),c=i.next();!c.done;c=i.next()){var u=c.value;try{for(var d=(o=void 0,a(u.outcome.logs)),l=d.next();!l.done;l=d.next()){var f=l.value;if(f.startsWith(s)){var p=JSON.parse(f.slice(s.length));if("wormhole"===p.standard&&"publish"===p.event)return p.seq.toString()}}}catch(b){o={error:b}}finally{try{l&&!l.done&&(r=d.return)&&r.call(d)}finally{if(o)throw o.error}}}}catch(m){t={error:m}}finally{try{c&&!c.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return null},t.parseSequenceFromLogAptos=function(e,t){if(t.success){var n=t.events.find((function(t){return t.type===e+"::state::WormholeMessage"}));return(null===n||void 0===n?void 0:n.data.sequence)||null}return null}},35676:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.humanAddress=t.canonicalAddress=void 0;var a=n(22714);t.canonicalAddress=function(e){return new Uint8Array(a.bech32.fromWords(a.bech32.decode(e).words))},t.humanAddress=function(e,t){return a.bech32.encode(e,a.bech32.toWords(t))}},43074:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(35676),t)},27303:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},i=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.createPostSignedVaaTransactions=t.postVaa=t.postVaaWithRetry=void 0;var c=n(8594),u=n(46462),d=n(40046),l=n(5019);function f(e,t,n,s,u){return a(this,void 0,void 0,(function(){var a,f,p,b,m,h;return o(this,(function(o){switch(o.label){case 0:return a=l.isBytes(s)?l.parseVaa(s):s,f=c.Keypair.generate(),[4,d.createVerifySignaturesInstructions(e,t,n,a,f.publicKey,u)];case 1:for(p=o.sent(),b=[],m=0;m0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o.write(t.toString("hex"),1,"hex"),o}function c(e){var t=e.nonce,n=e.amount,o=e.fee,r=e.targetAddress,i=e.targetChain;if("bigint"!=typeof n&&(n=BigInt(n)),"bigint"!=typeof o&&(o=BigInt(o)),!a.isBuffer(r))throw new Error("targetAddress must be Buffer");var s=a.alloc(54);return s.writeUInt32LE(t,0),s.writeBigUInt64LE(n,4),s.writeBigUInt64LE(o,12),s.write(r.toString("hex"),20,"hex"),s.writeUInt16LE(i,52),s}function u(e){var t=e.nonce,n=e.amount,o=e.targetAddress,r=e.targetChain,i=e.payload;if("bigint"!=typeof n&&(n=BigInt(n)),!a.isBuffer(o))throw new Error("targetAddress must be Buffer");if(!a.isBuffer(i))throw new Error("payload must be Buffer");var s=a.alloc(50);return s.writeUInt32LE(t,0),s.writeBigUInt64LE(n,4),s.write(o.toString("hex"),12,"hex"),s.writeUInt16LE(r,44),s.writeUInt32LE(i.length,46),a.concat([s,i,a.alloc(1)])}t.TokenBridgeInstructionCoder=i,function(e){e[e.Initialize=0]="Initialize",e[e.AttestToken=1]="AttestToken",e[e.CompleteNative=2]="CompleteNative",e[e.CompleteWrapped=3]="CompleteWrapped",e[e.TransferWrapped=4]="TransferWrapped",e[e.TransferNative=5]="TransferNative",e[e.RegisterChain=6]="RegisterChain",e[e.CreateWrapped=7]="CreateWrapped",e[e.UpgradeContract=8]="UpgradeContract",e[e.CompleteNativeWithPayload=9]="CompleteNativeWithPayload",e[e.CompleteWrappedWithPayload=10]="CompleteWrappedWithPayload",e[e.TransferWrappedWithPayload=11]="TransferWrappedWithPayload",e[e.TransferNativeWithPayload=12]="TransferNativeWithPayload"}(o=t.TokenBridgeInstruction||(t.TokenBridgeInstruction={}))},30337:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenBridgeStateCoder=void 0;var n=function(){function e(e){}return e.prototype.encode=function(e,t){throw new Error("Token Bridge program does not have state")},e.prototype.decode=function(e){throw new Error("Token Bridge program does not have state")},e}();t.TokenBridgeStateCoder=n},63064:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenBridgeTypesCoder=void 0;var n=function(){function e(e){}return e.prototype.encode=function(e,t){throw new Error("Token Bridge program does not have user-defined types")},e.prototype.decode=function(e,t){throw new Error("Token Bridge program does not have user-defined types")},e}();t.TokenBridgeTypesCoder=n},63637:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCompleteTransferWrappedWithPayloadCpiAccounts=t.getCompleteTransferNativeWithPayloadCpiAccounts=t.getTransferWrappedWithPayloadCpiAccounts=t.getTransferNativeWithPayloadCpiAccounts=t.getTokenBridgeDerivedAccounts=void 0;var a=n(97180),o=n(8594),r=n(59219),i=n(40046),s=n(69321),c=n(44647);t.getTokenBridgeDerivedAccounts=function(e,t,n){var a=i.getWormholeDerivedAccounts(t,n),o=a.wormholeEmitter,r=a.wormholeBridge,c=a.wormholeFeeCollector,u=a.wormholeSequence;return{tokenBridgeConfig:s.deriveTokenBridgeConfigKey(t),tokenBridgeAuthoritySigner:s.deriveAuthoritySignerKey(t),tokenBridgeCustodySigner:s.deriveCustodySignerKey(t),tokenBridgeMintAuthority:s.deriveMintAuthorityKey(t),tokenBridgeSender:s.deriveSenderAccountKey(e),tokenBridgeRedeemer:s.deriveRedeemerAccountKey(e),wormholeBridge:r,tokenBridgeEmitter:o,wormholeFeeCollector:c,tokenBridgeSequence:u}},t.getTransferNativeWithPayloadCpiAccounts=function(e,t,n,a,o,r,i){var s=c.getTransferNativeWithPayloadAccounts(t,n,a,o,r,i,e);return{payer:s.payer,tokenBridgeConfig:s.config,fromTokenAccount:s.from,mint:s.mint,tokenBridgeCustody:s.custody,tokenBridgeAuthoritySigner:s.authoritySigner,tokenBridgeCustodySigner:s.custodySigner,wormholeBridge:s.wormholeBridge,wormholeMessage:s.wormholeMessage,tokenBridgeEmitter:s.wormholeEmitter,tokenBridgeSequence:s.wormholeSequence,wormholeFeeCollector:s.wormholeFeeCollector,clock:s.clock,tokenBridgeSender:s.sender,rent:s.rent,systemProgram:s.systemProgram,tokenProgram:s.tokenProgram,wormholeProgram:s.wormholeProgram}},t.getTransferWrappedWithPayloadCpiAccounts=function(e,t,n,a,o,r,i,s,u){var d=c.getTransferWrappedWithPayloadAccounts(t,n,a,o,r,void 0===u?e:u,i,s,e);return{payer:d.payer,tokenBridgeConfig:d.config,fromTokenAccount:d.from,fromTokenAccountOwner:d.fromOwner,tokenBridgeWrappedMint:d.mint,tokenBridgeWrappedMeta:d.wrappedMeta,tokenBridgeAuthoritySigner:d.authoritySigner,wormholeBridge:d.wormholeBridge,wormholeMessage:d.wormholeMessage,tokenBridgeEmitter:d.wormholeEmitter,tokenBridgeSequence:d.wormholeSequence,wormholeFeeCollector:d.wormholeFeeCollector,clock:d.clock,tokenBridgeSender:d.sender,rent:d.rent,systemProgram:d.systemProgram,tokenProgram:d.tokenProgram,wormholeProgram:d.wormholeProgram}},t.getCompleteTransferNativeWithPayloadCpiAccounts=function(e,t,n,c,u){var d=r.isBytes(c)?r.parseTokenTransferVaa(c):c,l=new o.PublicKey(d.tokenAddress),f=new o.PublicKey(d.to);return{payer:new o.PublicKey(n),tokenBridgeConfig:s.deriveTokenBridgeConfigKey(e),vaa:i.derivePostedVaaKey(t,d.hash),tokenBridgeClaim:i.deriveClaimKey(e,d.emitterAddress,d.emitterChain,d.sequence),tokenBridgeForeignEndpoint:s.deriveEndpointKey(e,d.emitterChain,d.emitterAddress),toTokenAccount:new o.PublicKey(u),tokenBridgeRedeemer:s.deriveRedeemerAccountKey(f),toFeesTokenAccount:new o.PublicKey(u),tokenBridgeCustody:s.deriveCustodyKey(e,l),mint:l,tokenBridgeCustodySigner:s.deriveCustodySignerKey(e),rent:o.SYSVAR_RENT_PUBKEY,systemProgram:o.SystemProgram.programId,tokenProgram:a.TOKEN_PROGRAM_ID,wormholeProgram:new o.PublicKey(t)}},t.getCompleteTransferWrappedWithPayloadCpiAccounts=function(e,t,n,c,u){var d=r.isBytes(c)?r.parseTokenTransferVaa(c):c,l=s.deriveWrappedMintKey(e,d.tokenChain,d.tokenAddress),f=new o.PublicKey(d.to);return{payer:new o.PublicKey(n),tokenBridgeConfig:s.deriveTokenBridgeConfigKey(e),vaa:i.derivePostedVaaKey(t,d.hash),tokenBridgeClaim:i.deriveClaimKey(e,d.emitterAddress,d.emitterChain,d.sequence),tokenBridgeForeignEndpoint:s.deriveEndpointKey(e,d.emitterChain,d.emitterAddress),toTokenAccount:new o.PublicKey(u),tokenBridgeRedeemer:s.deriveRedeemerAccountKey(f),toFeesTokenAccount:new o.PublicKey(u),tokenBridgeWrappedMint:l,tokenBridgeWrappedMeta:s.deriveWrappedMetaKey(e,l),tokenBridgeMintAuthority:s.deriveMintAuthorityKey(e),rent:o.SYSVAR_RENT_PUBKEY,systemProgram:o.SystemProgram.programId,tokenProgram:a.TOKEN_PROGRAM_ID,wormholeProgram:new o.PublicKey(t)}}},16378:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createApproveAuthoritySignerInstruction=void 0;var a=n(97180),o=n(8594),r=n(69321);t.createApproveAuthoritySignerInstruction=function(e,t,n,i){return a.createApproveInstruction(new o.PublicKey(t),r.deriveAuthoritySignerKey(e),new o.PublicKey(n),i)}},61180:function(e,t,n){"use strict";var a=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,o,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},r=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},r=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},r=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},r=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.getMetadata=t.Metadata=t.Key=t.deriveSplTokenMetadataKey=t.SplTokenMetadataProgram=t.CreateMetadataAccountArgs=t.Data=t.Creator=void 0;var c=n(8594),u=n(32090),d=function(){function e(e,t,n){this.address=new c.PublicKey(e),this.verified=t,this.share=n}return e.prototype.serialize=function(){var t=a.alloc(e.size);return t.write(this.address.toBuffer().toString("hex"),0,"hex"),this.verified&&t.writeUInt8(1,32),t.writeUInt8(this.share,33),t},e.deserialize=function(t){return new e(t.subarray(0,32),t.readUInt8(32)>0,t.readUInt8(33))},e.size=34,e}();t.Creator=d;var l=function(){function e(e,t,n,a,o){this.name=e,this.symbol=t,this.uri=n,this.sellerFeeBasisPoints=a,this.creators=o}return e.prototype.serialize=function(){var e=this.name.length,t=this.symbol.length,n=this.uri.length,o=this.creators,r=s(function(){if(null===o)return[0,0];var e=o.length;return[e,4+e*d.size]}(),2),i=r[0],c=r[1],u=a.alloc(15+e+t+n+c);if(u.writeUInt32LE(e,0),u.write(this.name,4),u.writeUInt32LE(t,4+e),u.write(this.symbol,8+e),u.writeUInt32LE(n,8+e+t),u.write(this.uri,12+e+t),u.writeUInt16LE(this.sellerFeeBasisPoints,12+e+t+n),null===o)u.writeUInt8(0,14+e+t+n);else{u.writeUInt8(1,14+e+t+n),u.writeUInt32LE(i,15+e+t+n);for(var l=0;l0,t.readUInt8(66+i)>0)},e}();t.Metadata=m,t.getMetadata=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(a){return[2,e.getAccountInfo(b(t),n).then((function(e){return m.deserialize(u.getAccountData(e))}))]}))}))}},18762:function(e,t,n){"use strict";var a=n(65218),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},c=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.sendAndConfirmTransactionsWithRetry=t.signSendAndConfirmTransaction=t.NodeWallet=t.modifySignTransaction=t.signTransactionFactory=void 0;var d=n(8594);function l(){for(var e=[],t=0;tc)return[2,Promise.reject("Reached the maximum number of retries.")];i.label=12;case 12:return m=b.next(),[3,2];case 13:return[3,16];case 14:return A=i.sent(),x={error:A},[3,16];case 15:try{m&&!m.done&&(I=b.return)&&I.call(b)}finally{if(x)throw x.error}return[7];case 16:return[2,Promise.resolve(p)]}}))}))}},28133:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},i=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},c=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},i=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenIdFromTokenHash=t.deriveTokenHashFromTokenId=t.deriveCollectionHashFromTokenId=t.deriveResourceAccountAddress=t.coalesceModuleAddress=t.getTypeFromExternalAddress=t.getExternalAddressFromType=t.isValidAptosType=t.getForeignAssetAddress=t.getAssetFullyQualifiedType=t.generateSignAndSubmitScript=t.generateSignAndSubmitEntryFunction=void 0;var c=n(319),u=n(20747),d=n(61117),l=n(31778);t.generateSignAndSubmitEntryFunction=function(e,t,n,a){return e.generateTransaction(t.address(),n,a).then((function(n){return f(e,t,n)}))};t.generateSignAndSubmitScript=function(e,t,n,a){return r(void 0,void 0,void 0,(function(){var o,r,u,d,l;return i(this,(function(i){switch(i.label){case 0:return o=Object.assign({gas_unit_price:"100",max_gas_amount:"30000"},a),[4,Promise.all([e.getAccount(t.address()),e.getChainId()])];case 1:return r=s.apply(void 0,[i.sent(),2]),u=r[0].sequence_number,d=r[1],l=new c.TxnBuilderTypes.RawTransaction(c.TxnBuilderTypes.AccountAddress.fromHex(t.address()),BigInt(u),n,BigInt(o.max_gas_amount),BigInt(o.gas_unit_price),BigInt(Math.floor(Date.now()/1e3)+10),new c.TxnBuilderTypes.ChainId(d)),[2,f(e,t,l)]}}))}))};t.getAssetFullyQualifiedType=function(e,n,o){if(n===l.CHAIN_ID_APTOS)return t.isValidAptosType(o)?l.ensureHexPrefix(o):(a.error("Invalid qualified type"),null);var r=t.getForeignAssetAddress(e,n,o);return r?l.ensureHexPrefix(r)+"::coin::T":null};t.getForeignAssetAddress=function(e,t,n){if(t===l.CHAIN_ID_APTOS)return null;var a=o.alloc(1);a.writeUInt8(255);var r=o.alloc(2);return r.writeUInt16BE(t),d.sha3_256(o.concat([l.hex(u.hexZeroPad(l.ensureHexPrefix(e),32)),r,o.from("::","ascii"),l.hex(u.hexZeroPad(l.ensureHexPrefix(n),32)),a]))};t.isValidAptosType=function(e){return/^(0x)?[0-9a-fA-F]+::\w+::\w+$/.test(e)};t.getExternalAddressFromType=function(e){return d.sha3_256(e)},t.getTypeFromExternalAddress=function(e,t,n){return r(this,void 0,void 0,(function(){var a,r,s,c,u;return i(this,(function(i){switch(i.label){case 0:return t=l.ensureHexPrefix(t),[4,e.getAccountResource(t,t+"::state::State")];case 1:a=i.sent().data,r=a.native_infos.handle,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,e.getTableItem(r,{key_type:t+"::token_hash::TokenHash",value_type:"0x1::type_info::TypeInfo",key:{hash:n}})];case 3:return(s=i.sent())?(c=o.from(s.module_name.substring(2),"hex").toString("ascii"),u=o.from(s.struct_name.substring(2),"hex").toString("ascii"),[2,s.account_address+"::"+c+"::"+u]):[2,null];case 4:return i.sent(),[2,null];case 5:return[2]}}))}))};t.coalesceModuleAddress=function(e){return e.split("::")[0]};t.deriveResourceAccountAddress=function(e,t,n){return r(void 0,void 0,void 0,(function(){var a,r,s;return i(this,(function(i){switch(i.label){case 0:return(a=l.coalesceChainId(t))===l.CHAIN_ID_APTOS?[2,null]:((r=o.alloc(2)).writeUInt16BE(a),s=o.concat([r,o.from(n)]),[4,c.AptosAccount.getResourceAccountAddress(e,s)]);case 1:return[2,i.sent().toString()]}}))}))};t.deriveCollectionHashFromTokenId=function(e){return r(void 0,void 0,void 0,(function(){var t;return i(this,(function(n){return t=o.concat([c.BCS.bcsToBytes(c.TxnBuilderTypes.AccountAddress.fromHex(e.token_data_id.creator)),o.from(d.sha3_256(e.token_data_id.collection),"hex")]),[2,new Uint8Array(o.from(d.sha3_256(t),"hex"))]}))}))};t.deriveTokenHashFromTokenId=function(e){return r(void 0,void 0,void 0,(function(){var t,n;return i(this,(function(a){return(t=o.alloc(8)).writeBigUInt64BE(BigInt(e.property_version)),n=o.concat([c.BCS.bcsToBytes(c.TxnBuilderTypes.AccountAddress.fromHex(e.token_data_id.creator)),o.from(d.sha3_256(e.token_data_id.collection),"hex"),o.from(d.sha3_256(e.token_data_id.name),"hex"),t]),[2,new Uint8Array(o.from(d.sha3_256(n),"hex"))]}))}))};t.getTokenIdFromTokenHash=function(e,t,n){return r(void 0,void 0,void 0,(function(){var a,o,r,s,u;return i(this,(function(i){switch(i.label){case 0:return[4,e.getAccountResource(t,t+"::state::State")];case 1:return a=i.sent().data,o=a.native_infos.handle,[4,e.getTableItem(o,{key_type:t+"::token_hash::TokenHash",value_type:"0x3::token::TokenId",key:{hash:c.HexString.fromUint8Array(n).hex()}})];case 2:return r=i.sent(),s=r.token_data_id,u=r.property_version,[2,{token_data_id:s,property_version:u}]}}))}))};var f=function(e,t,n){return r(void 0,void 0,void 0,(function(){return i(this,(function(a){switch(a.label){case 0:return[4,e.simulateTransaction(t,n).then((function(e){return e.forEach((function(e){if(!e.success)throw new Error("Transaction failed: "+e.vm_status+"\n"+JSON.stringify(e,null,2))}))}))];case 1:return a.sent(),[2,e.signTransaction(t,n).then((function(t){return e.submitTransaction(t)})).then((function(t){return e.waitForTransactionWithResult(t.hash)}))]}}))}))}},31714:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]BigInt(Number.MAX_SAFE_INTEGER))throw new Error("integer is unsafe");return Number(e)}},84465:function(e,t){"use strict";var n=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,o,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_VAA_DECIMALS=t.WSOL_DECIMALS=t.WSOL_ADDRESS=t.assertEVMChain=t.isTerraChain=t.isCosmWasmChain=t.isEVMChain=t.coalesceChainName=t.coalesceChainId=t.coalesceCosmWasmChainId=t.toCosmWasmChainId=t.toChainName=t.toChainId=t.assertChain=t.isChain=t.CHAIN_ID_TO_NAME=t.CHAIN_ID_SEPOLIA=t.CHAIN_ID_WORMCHAIN=t.CHAIN_ID_BASE=t.CHAIN_ID_BTC=t.CHAIN_ID_XPLA=t.CHAIN_ID_PYTHNET=t.CHAIN_ID_GNOSIS=t.CHAIN_ID_OPTIMISM=t.CHAIN_ID_ARBITRUM=t.CHAIN_ID_APTOS=t.CHAIN_ID_SUI=t.CHAIN_ID_OSMOSIS=t.CHAIN_ID_INJECTIVE=t.CHAIN_ID_TERRA2=t.CHAIN_ID_NEON=t.CHAIN_ID_MOONBEAM=t.CHAIN_ID_NEAR=t.CHAIN_ID_CELO=t.CHAIN_ID_KLAYTN=t.CHAIN_ID_ACALA=t.CHAIN_ID_KARURA=t.CHAIN_ID_FANTOM=t.CHAIN_ID_AURORA=t.CHAIN_ID_ALGORAND=t.CHAIN_ID_OASIS=t.CHAIN_ID_AVAX=t.CHAIN_ID_POLYGON=t.CHAIN_ID_BSC=t.CHAIN_ID_TERRA=t.CHAIN_ID_ETH=t.CHAIN_ID_SOLANA=t.CHAIN_ID_UNSET=t.CONTRACTS=t.CHAINS=void 0,t.TERRA_REDEEMED_CHECK_WALLET_ADDRESS=t.APTOS_TOKEN_BRIDGE_EMITTER_ADDRESS=t.APTOS_DEPLOYER_ADDRESS_DEVNET=t.APTOS_DEPLOYER_ADDRESS=void 0,t.CHAINS={unset:0,solana:1,ethereum:2,terra:3,bsc:4,polygon:5,avalanche:6,oasis:7,algorand:8,aurora:9,fantom:10,karura:11,acala:12,klaytn:13,celo:14,near:15,moonbeam:16,neon:17,terra2:18,injective:19,osmosis:20,sui:21,aptos:22,arbitrum:23,optimism:24,gnosis:25,pythnet:26,xpla:28,btc:29,base:30,wormchain:3104,sepolia:10002};var a={unset:{core:void 0,token_bridge:void 0,nft_bridge:void 0},solana:{core:"worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth",token_bridge:"wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb",nft_bridge:"WnFt12ZrnzZrFZkt2xsNsaNWoQribnuQ5B5FrDbwDhD"},ethereum:{core:"0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B",token_bridge:"0x3ee18B2214AFF97000D974cf647E7C347E8fa585",nft_bridge:"0x6FFd7EdE62328b3Af38FCD61461Bbfc52F5651fE"},terra:{core:"terra1dq03ugtd40zu9hcgdzrsq6z2z4hwhc9tqk2uy5",token_bridge:"terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf",nft_bridge:void 0},bsc:{core:"0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B",token_bridge:"0xB6F6D86a8f9879A9c87f643768d9efc38c1Da6E7",nft_bridge:"0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE"},polygon:{core:"0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7",token_bridge:"0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE",nft_bridge:"0x90BBd86a6Fe93D3bc3ed6335935447E75fAb7fCf"},avalanche:{core:"0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c",token_bridge:"0x0e082F06FF657D94310cB8cE8B0D9a04541d8052",nft_bridge:"0xf7B6737Ca9c4e08aE573F75A97B73D7a813f5De5"},oasis:{core:"0xfE8cD454b4A1CA468B57D79c0cc77Ef5B6f64585",token_bridge:"0x5848C791e09901b40A9Ef749f2a6735b418d7564",nft_bridge:"0x04952D522Ff217f40B5Ef3cbF659EcA7b952a6c1"},algorand:{core:"842125965",token_bridge:"842126029",nft_bridge:void 0},aurora:{core:"0xa321448d90d4e5b0A732867c18eA198e75CAC48E",token_bridge:"0x51b5123a7b0F9b2bA265f9c4C8de7D78D52f510F",nft_bridge:"0x6dcC0484472523ed9Cdc017F711Bcbf909789284"},fantom:{core:"0x126783A6Cb203a3E35344528B26ca3a0489a1485",token_bridge:"0x7C9Fc5741288cDFdD83CeB07f3ea7e22618D79D2",nft_bridge:"0xA9c7119aBDa80d4a4E0C06C8F4d8cF5893234535"},karura:{core:"0xa321448d90d4e5b0A732867c18eA198e75CAC48E",token_bridge:"0xae9d7fe007b3327AA64A32824Aaac52C42a6E624",nft_bridge:"0xb91e3638F82A1fACb28690b37e3aAE45d2c33808"},acala:{core:"0xa321448d90d4e5b0A732867c18eA198e75CAC48E",token_bridge:"0xae9d7fe007b3327AA64A32824Aaac52C42a6E624",nft_bridge:"0xb91e3638F82A1fACb28690b37e3aAE45d2c33808"},klaytn:{core:"0x0C21603c4f3a6387e241c0091A7EA39E43E90bb7",token_bridge:"0x5b08ac39EAED75c0439FC750d9FE7E1F9dD0193F",nft_bridge:"0x3c3c561757BAa0b78c5C025CdEAa4ee24C1dFfEf"},celo:{core:"0xa321448d90d4e5b0A732867c18eA198e75CAC48E",token_bridge:"0x796Dff6D74F3E27060B71255Fe517BFb23C93eed",nft_bridge:"0xA6A377d75ca5c9052c9a77ED1e865Cc25Bd97bf3"},near:{core:"contract.wormhole_crypto.near",token_bridge:"contract.portalbridge.near",nft_bridge:void 0},injective:{core:"inj17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9l2q74d",token_bridge:"inj1ghd753shjuwexxywmgs4xz7x2q732vcnxxynfn",nft_bridge:void 0},osmosis:{core:void 0,token_bridge:void 0,nft_bridge:void 0},aptos:{core:"0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625",token_bridge:"0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f",nft_bridge:"0x1bdffae984043833ed7fe223f7af7a3f8902d04129b14f801823e64827da7130"},sui:{core:void 0,token_bridge:void 0,nft_bridge:void 0},moonbeam:{core:"0xC8e2b0cD52Cf01b0Ce87d389Daa3d414d4cE29f3",token_bridge:"0xb1731c586ca89a23809861c6103f0b96b3f57d92",nft_bridge:"0x453cfbe096c0f8d763e8c5f24b441097d577bde2"},neon:{core:void 0,token_bridge:void 0,nft_bridge:void 0},terra2:{core:"terra12mrnzvhx3rpej6843uge2yyfppfyd3u9c3uq223q8sl48huz9juqffcnhp",token_bridge:"terra153366q50k7t8nn7gec00hg66crnhkdggpgdtaxltaq6xrutkkz3s992fw9",nft_bridge:void 0},arbitrum:{core:"0xa5f208e072434bC67592E4C49C1B991BA79BCA46",token_bridge:"0x0b2402144Bb366A632D14B83F244D2e0e21bD39c",nft_bridge:"0x3dD14D553cFD986EAC8e3bddF629d82073e188c8"},optimism:{core:"0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722",token_bridge:"0x1D68124e65faFC907325e3EDbF8c4d84499DAa8b",nft_bridge:"0xfE8cD454b4A1CA468B57D79c0cc77Ef5B6f64585"},gnosis:{core:"0xa321448d90d4e5b0A732867c18eA198e75CAC48E",token_bridge:void 0,nft_bridge:void 0},pythnet:{core:"H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU",token_bridge:void 0,nft_bridge:void 0},xpla:{core:"xpla1jn8qmdda5m6f6fqu9qv46rt7ajhklg40ukpqchkejcvy8x7w26cqxamv3w",token_bridge:"xpla137w0wfch2dfmz7jl2ap8pcmswasj8kg06ay4dtjzw7tzkn77ufxqfw7acv",nft_bridge:void 0},btc:{core:void 0,token_bridge:void 0,nft_bridge:void 0},base:{core:void 0,token_bridge:void 0,nft_bridge:void 0},wormchain:{core:void 0,token_bridge:void 0,nft_bridge:void 0},sepolia:{core:void 0,token_bridge:void 0,nft_bridge:void 0}},o={unset:{core:void 0,token_bridge:void 0,nft_bridge:void 0},solana:{core:"3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5",token_bridge:"DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe",nft_bridge:"2rHhojZ7hpu1zA91nvZmT8TqWWvMcKmmNBCr2mKTtMq4"},terra:{core:"terra1pd65m0q9tl3v8znnz5f5ltsfegyzah7g42cx5v",token_bridge:"terra1pseddrv0yfsn76u4zxrjmtf45kdlmalswdv39a",nft_bridge:void 0},ethereum:{core:"0x706abc4E45D419950511e474C7B9Ed348A4a716c",token_bridge:"0xF890982f9310df57d00f659cf4fd87e65adEd8d7",nft_bridge:"0xD8E4C2DbDd2e2bd8F1336EA691dBFF6952B1a6eB"},bsc:{core:"0x68605AD7b15c732a30b1BbC62BE8F2A509D74b4D",token_bridge:"0x9dcF9D205C9De35334D646BeE44b2D2859712A09",nft_bridge:"0xcD16E5613EF35599dc82B24Cb45B5A93D779f1EE"},polygon:{core:"0x0CBE91CF822c73C2315FB05100C2F714765d5c20",token_bridge:"0x377D55a7928c046E18eEbb61977e714d2a76472a",nft_bridge:"0x51a02d0dcb5e52F5b92bdAA38FA013C91c7309A9"},avalanche:{core:"0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C",token_bridge:"0x61E44E506Ca5659E6c0bba9b678586fA2d729756",nft_bridge:"0xD601BAf2EEE3C028344471684F6b27E789D9075D"},oasis:{core:"0xc1C338397ffA53a2Eb12A7038b4eeb34791F8aCb",token_bridge:"0x88d8004A9BdbfD9D28090A02010C19897a29605c",nft_bridge:"0xC5c25B41AB0b797571620F5204Afa116A44c0ebA"},algorand:{core:"86525623",token_bridge:"86525641",nft_bridge:void 0},aurora:{core:"0xBd07292de7b505a4E803CEe286184f7Acf908F5e",token_bridge:"0xD05eD3ad637b890D68a854d607eEAF11aF456fba",nft_bridge:"0x8F399607E9BA2405D87F5f3e1B78D950b44b2e24"},fantom:{core:"0x1BB3B4119b7BA9dfad76B0545fb3F531383c3bB7",token_bridge:"0x599CEa2204B4FaECd584Ab1F2b6aCA137a0afbE8",nft_bridge:"0x63eD9318628D26BdCB15df58B53BB27231D1B227"},karura:{core:"0xE4eacc10990ba3308DdCC72d985f2a27D20c7d03",token_bridge:"0xd11De1f930eA1F7Dd0290Fe3a2e35b9C91AEFb37",nft_bridge:"0x0A693c2D594292B6Eb89Cb50EFe4B0b63Dd2760D"},acala:{core:"0x4377B49d559c0a9466477195C6AdC3D433e265c0",token_bridge:"0xebA00cbe08992EdD08ed7793E07ad6063c807004",nft_bridge:"0x96f1335e0AcAB3cfd9899B30b2374e25a2148a6E"},klaytn:{core:"0x1830CC6eE66c84D2F177B94D544967c774E624cA",token_bridge:"0xC7A13BE098720840dEa132D860fDfa030884b09A",nft_bridge:"0x94c994fC51c13101062958b567e743f1a04432dE"},celo:{core:"0x88505117CA88e7dd2eC6EA1E13f0948db2D50D56",token_bridge:"0x05ca6037eC51F8b712eD2E6Fa72219FEaE74E153",nft_bridge:"0xaCD8190F647a31E56A656748bC30F69259f245Db"},near:{core:"wormhole.wormhole.testnet",token_bridge:"token.wormhole.testnet",nft_bridge:void 0},injective:{core:"inj1xx3aupmgv3ce537c0yce8zzd3sz567syuyedpg",token_bridge:"inj1q0e70vhrv063eah90mu97sazhywmeegp7myvnh",nft_bridge:void 0},osmosis:{core:"osmo1hggkxr0hpw83f8vuft7ruvmmamsxmwk2hzz6nytdkzyup9krt0dq27sgyx",token_bridge:void 0,nft_bridge:void 0},aptos:{core:"0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625",token_bridge:"0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f",nft_bridge:void 0},sui:{core:void 0,token_bridge:void 0,nft_bridge:void 0},moonbeam:{core:"0xa5B7D85a8f27dd7907dc8FdC21FA5657D5E2F901",token_bridge:"0xbc976D4b9D57E57c3cA52e1Fd136C45FF7955A96",nft_bridge:"0x98A0F4B96972b32Fcb3BD03cAeB66A44a6aB9Edb"},neon:{core:"0x268557122Ffd64c85750d630b716471118F323c8",token_bridge:"0xEe3dB83916Ccdc3593b734F7F2d16D630F39F1D0",nft_bridge:"0x66E5BcFD45D2F3f166c567ADa663f9d2ffb292B4"},terra2:{core:"terra19nv3xr5lrmmr7egvrk2kqgw4kcn43xrtd5g0mpgwwvhetusk4k7s66jyv0",token_bridge:"terra1c02vds4uhgtrmcw7ldlg75zumdqxr8hwf7npseuf2h58jzhpgjxsgmwkvk",nft_bridge:void 0},arbitrum:{core:"0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e",token_bridge:"0x23908A62110e21C04F3A4e011d24F901F911744A",nft_bridge:"0xEe3dB83916Ccdc3593b734F7F2d16D630F39F1D0"},optimism:{core:"0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35",token_bridge:"0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e",nft_bridge:"0x23908A62110e21C04F3A4e011d24F901F911744A"},gnosis:{core:"0xE4eacc10990ba3308DdCC72d985f2a27D20c7d03",token_bridge:void 0,nft_bridge:void 0},pythnet:{core:"EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z",token_bridge:void 0,nft_bridge:void 0},xpla:{core:"xpla1upkjn4mthr0047kahvn0llqx4qpqfn75lnph4jpxfn8walmm8mqsanyy35",token_bridge:"xpla1kek6zgdaxcsu35nqfsyvs2t9vs87dqkkq6hjdgczacysjn67vt8sern93x",nft_bridge:void 0},btc:{core:void 0,token_bridge:void 0,nft_bridge:void 0},base:{core:"0x23908A62110e21C04F3A4e011d24F901F911744A",token_bridge:"0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780",nft_bridge:"0xF681d1cc5F25a3694E348e7975d7564Aa581db59"},wormchain:{core:void 0,token_bridge:void 0,nft_bridge:void 0},sepolia:{core:"0x4a8bc80Ed5a4067f1CCf107057b8270E0cC11A78",token_bridge:"0xDB5492265f6038831E89f495670FF909aDe94bd9",nft_bridge:"0x6a0B52ac198e4870e5F3797d5B403838a5bbFD99"}},r={unset:{core:void 0,token_bridge:void 0,nft_bridge:void 0},solana:{core:"Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o",token_bridge:"B6RHG3mfcckmrYN1UhmJzyS1XX3fZKbkeUcpJe9Sy3FE",nft_bridge:"NFTWqJR8YnRVqPDvTJrYuLrQDitTG5AScqbeghi4zSA"},terra:{core:"terra18vd8fpwxzck93qlwghaj6arh4p7c5n896xzem5",token_bridge:"terra10pyejy66429refv3g35g2t7am0was7ya7kz2a4",nft_bridge:"terra1plju286nnfj3z54wgcggd4enwaa9fgf5kgrgzl"},ethereum:{core:"0xC89Ce4735882C9F0f0FE26686c53074E09B0D550",token_bridge:"0x0290FB167208Af455bB137780163b7B7a9a10C16",nft_bridge:"0x26b4afb60d6c903165150c6f0aa14f8016be4aec"},bsc:{core:"0xC89Ce4735882C9F0f0FE26686c53074E09B0D550",token_bridge:"0x0290FB167208Af455bB137780163b7B7a9a10C16",nft_bridge:"0x26b4afb60d6c903165150c6f0aa14f8016be4aec"},polygon:{core:void 0,token_bridge:void 0,nft_bridge:void 0},avalanche:{core:void 0,token_bridge:void 0,nft_bridge:void 0},oasis:{core:void 0,token_bridge:void 0,nft_bridge:void 0},algorand:{core:"4",token_bridge:"6",nft_bridge:void 0},aurora:{core:void 0,token_bridge:void 0,nft_bridge:void 0},fantom:{core:void 0,token_bridge:void 0,nft_bridge:void 0},karura:{core:void 0,token_bridge:void 0,nft_bridge:void 0},acala:{core:void 0,token_bridge:void 0,nft_bridge:void 0},klaytn:{core:void 0,token_bridge:void 0,nft_bridge:void 0},celo:{core:void 0,token_bridge:void 0,nft_bridge:void 0},near:{core:"wormhole.test.near",token_bridge:"token.test.near",nft_bridge:void 0},injective:{core:void 0,token_bridge:void 0,nft_bridge:void 0},osmosis:{core:void 0,token_bridge:void 0,nft_bridge:void 0},aptos:{core:"0xde0036a9600559e295d5f6802ef6f3f802f510366e0c23912b0655d972166017",token_bridge:"0x84a5f374d29fc77e370014dce4fd6a55b58ad608de8074b0be5571701724da31",nft_bridge:"0x46da3d4c569388af61f951bdd1153f4c875f90c2991f6b2d0a38e2161a40852c"},sui:{core:void 0,token_bridge:void 0,nft_bridge:void 0},moonbeam:{core:void 0,token_bridge:void 0,nft_bridge:void 0},neon:{core:void 0,token_bridge:void 0,nft_bridge:void 0},terra2:{core:"terra14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9ssrc8au",token_bridge:"terra1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrquka9l6",nft_bridge:void 0},arbitrum:{core:void 0,token_bridge:void 0,nft_bridge:void 0},optimism:{core:void 0,token_bridge:void 0,nft_bridge:void 0},gnosis:{core:void 0,token_bridge:void 0,nft_bridge:void 0},pythnet:{core:void 0,token_bridge:void 0,nft_bridge:void 0},xpla:{core:void 0,token_bridge:void 0,nft_bridge:void 0},btc:{core:void 0,token_bridge:void 0,nft_bridge:void 0},base:{core:void 0,token_bridge:void 0,nft_bridge:void 0},wormchain:{core:"wormhole1ap5vgur5zlgys8whugfegnn43emka567dtq0jl",token_bridge:"wormhole1zugu6cajc4z7ue29g9wnes9a5ep9cs7yu7rn3z",nft_bridge:void 0},sepolia:{core:void 0,token_bridge:void 0,nft_bridge:void 0}};function i(e){return"number"===typeof e?e in t.CHAIN_ID_TO_NAME:e in t.CHAINS}function s(e){return t.CHAINS[e]}function c(e){return t.CHAIN_ID_TO_NAME[e]}function u(e){return t.CHAINS[e]}function d(e){return"number"===typeof e&&i(e)?e:s(e)}function l(e){var n=d(e);return n===t.CHAIN_ID_ETH||n===t.CHAIN_ID_BSC||n===t.CHAIN_ID_AVAX||n===t.CHAIN_ID_POLYGON||n===t.CHAIN_ID_OASIS||n===t.CHAIN_ID_AURORA||n===t.CHAIN_ID_FANTOM||n===t.CHAIN_ID_KARURA||n===t.CHAIN_ID_ACALA||n===t.CHAIN_ID_KLAYTN||n===t.CHAIN_ID_CELO||n===t.CHAIN_ID_MOONBEAM||n===t.CHAIN_ID_NEON||n===t.CHAIN_ID_ARBITRUM||n===t.CHAIN_ID_OPTIMISM||n===t.CHAIN_ID_GNOSIS||n===t.CHAIN_ID_BASE||n===t.CHAIN_ID_SEPOLIA}function f(e){var n=d(e);return n===t.CHAIN_ID_TERRA||n===t.CHAIN_ID_TERRA2||n===t.CHAIN_ID_INJECTIVE||n===t.CHAIN_ID_XPLA}t.CONTRACTS={MAINNET:a,TESTNET:o,DEVNET:r},t.CHAIN_ID_UNSET=t.CHAINS.unset,t.CHAIN_ID_SOLANA=t.CHAINS.solana,t.CHAIN_ID_ETH=t.CHAINS.ethereum,t.CHAIN_ID_TERRA=t.CHAINS.terra,t.CHAIN_ID_BSC=t.CHAINS.bsc,t.CHAIN_ID_POLYGON=t.CHAINS.polygon,t.CHAIN_ID_AVAX=t.CHAINS.avalanche,t.CHAIN_ID_OASIS=t.CHAINS.oasis,t.CHAIN_ID_ALGORAND=t.CHAINS.algorand,t.CHAIN_ID_AURORA=t.CHAINS.aurora,t.CHAIN_ID_FANTOM=t.CHAINS.fantom,t.CHAIN_ID_KARURA=t.CHAINS.karura,t.CHAIN_ID_ACALA=t.CHAINS.acala,t.CHAIN_ID_KLAYTN=t.CHAINS.klaytn,t.CHAIN_ID_CELO=t.CHAINS.celo,t.CHAIN_ID_NEAR=t.CHAINS.near,t.CHAIN_ID_MOONBEAM=t.CHAINS.moonbeam,t.CHAIN_ID_NEON=t.CHAINS.neon,t.CHAIN_ID_TERRA2=t.CHAINS.terra2,t.CHAIN_ID_INJECTIVE=t.CHAINS.injective,t.CHAIN_ID_OSMOSIS=t.CHAINS.osmosis,t.CHAIN_ID_SUI=t.CHAINS.sui,t.CHAIN_ID_APTOS=t.CHAINS.aptos,t.CHAIN_ID_ARBITRUM=t.CHAINS.arbitrum,t.CHAIN_ID_OPTIMISM=t.CHAINS.optimism,t.CHAIN_ID_GNOSIS=t.CHAINS.gnosis,t.CHAIN_ID_PYTHNET=t.CHAINS.pythnet,t.CHAIN_ID_XPLA=t.CHAINS.xpla,t.CHAIN_ID_BTC=t.CHAINS.btc,t.CHAIN_ID_BASE=t.CHAINS.base,t.CHAIN_ID_WORMCHAIN=t.CHAINS.wormchain,t.CHAIN_ID_SEPOLIA=t.CHAINS.sepolia,t.CHAIN_ID_TO_NAME=Object.entries(t.CHAINS).reduce((function(e,t){var a=n(t,2),o=a[0];return e[a[1]]=o,e}),{}),t.isChain=i,t.assertChain=function(e){if(!i(e))throw"number"===typeof e?Error("Unknown chain id: "+e):Error("Unknown chain: "+e)},t.toChainId=s,t.toChainName=c,t.toCosmWasmChainId=u,t.coalesceCosmWasmChainId=function(e){return"number"===typeof e&&f(e)?e:u(e)},t.coalesceChainId=d,t.coalesceChainName=function(e){return c(d(e))},t.isEVMChain=l,t.isCosmWasmChain=f,t.isTerraChain=function(e){var n=d(e);return n===t.CHAIN_ID_TERRA||n===t.CHAIN_ID_TERRA2},t.assertEVMChain=function(e){if(!l(e))throw Error("Expected an EVM chain, but "+e+" is not")},t.WSOL_ADDRESS="So11111111111111111111111111111111111111112",t.WSOL_DECIMALS=9,t.MAX_VAA_DECIMALS=8,t.APTOS_DEPLOYER_ADDRESS="0108bc32f7de18a5f6e1e7d6ee7aff9f5fc858d0d87ac0da94dd8d2a5d267d6b",t.APTOS_DEPLOYER_ADDRESS_DEVNET="277fa055b6a73c42c0662d5236c65c864ccbf2d4abd21f174a30c8b786eab84b",t.APTOS_TOKEN_BRIDGE_EMITTER_ADDRESS="0000000000000000000000000000000000000000000000000000000000000001",t.TERRA_REDEEMED_CHECK_WALLET_ADDRESS="terra1x46rqay4d3cssq8gxxvqz8xt6nwlz4td20k38v"},10773:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createNonce=void 0,t.createNonce=function(){var e=1e5*Math.random(),t=a.alloc(4);return t.writeUInt32LE(e,0),t}},31778:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(89931),t),o(n(31714),t),o(n(27296),t),o(n(84465),t),o(n(10773),t),o(n(51775),t),o(n(3605),t),o(n(34879),t),o(n(46547),t)},51775:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.callFunctionNear=t.registerAccount=t.hashLookup=t.hashAccount=t.logNearGas=void 0;var u=c(n(41564)),d=c(n(43811));function l(e,t,n,a){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,e.query({request_type:"call_function",account_id:t,method_name:n,args_base64:a?o.from(JSON.stringify(a)).toString("base64"):"",finality:"final"})];case 1:return r=i.sent(),[2,JSON.parse(o.from(r.result).toString())]}}))}))}t.logNearGas=function(e,t){var n=e.receipts_outcome.reduce((function(e,t){return e.totalGasBurned+=t.outcome.gas_burnt,e.totalTokensBurned+=u.default.utils.format.formatNearAmount(t.outcome.tokens_burnt),e}),{totalGasBurned:e.transaction_outcome.outcome.gas_burnt,totalTokensBurned:u.default.utils.format.formatNearAmount(e.transaction_outcome.outcome.tokens_burnt)}),o=n.totalGasBurned,r=n.totalTokensBurned;a.log(t,"totalGasBurned",o,"totalTokensBurned",r)},t.hashAccount=function(e,t,n){return r(this,void 0,void 0,(function(){var a,o,r;return i(this,(function(i){switch(i.label){case 0:return[4,l(e,t,"hash_account",{account:n})];case 1:return a=s.apply(void 0,[i.sent(),2]),o=a[0],r=a[1],[2,{isRegistered:o,accountHash:r}]}}))}))},t.hashLookup=function(e,t,n){return r(this,void 0,void 0,(function(){var a,o,r;return i(this,(function(i){switch(i.label){case 0:return[4,l(e,t,"hash_lookup",{hash:n})];case 1:return a=s.apply(void 0,[i.sent(),2]),o=a[0],r=a[1],[2,{found:o,value:r}]}}))}))},t.registerAccount=function(e,t){return{contractId:t,methodName:"register_account",args:{account:e},gas:new d.default("100000000000000"),attachedDeposit:new d.default("2000000000000000000000")}},t.callFunctionNear=l},34879:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTransferPayload=t.parseNFTPayload=t.METADATA_REPLACE=void 0;var a=n(75139),o=n(59219);t.METADATA_REPLACE=new RegExp("\0","g"),t.parseNFTPayload=function(e){var t=o.parseNftTransferPayload(e);return{originAddress:t.tokenAddress.toString("hex"),originChain:t.tokenChain,symbol:t.symbol,name:t.name,tokenId:a.BigNumber.from(t.tokenId),uri:t.uri,targetAddress:t.to.toString("hex"),targetChain:t.toChain}},t.parseTransferPayload=function(e){var t=o.parseTokenTransferPayload(e);return{amount:t.amount,originAddress:t.tokenAddress.toString("hex"),originChain:t.tokenChain,targetAddress:t.to.toString("hex"),targetChain:t.toChain,fee:null===t.fee?void 0:t.fee,fromAddress:null===t.fromAddress?void 0:t.fromAddress.toString("hex")}}},41198:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},u=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},k={unset:0,solana:1,ethereum:2,terra:3,bsc:4,polygon:5,avalanche:6,oasis:7,algorand:8,aurora:9,fantom:10,karura:11,acala:12,klaytn:13,celo:14,near:15,moonbeam:16,neon:17,terra2:18,injective:19,osmosis:20,sui:21,aptos:22,arbitrum:23,optimism:24,gnosis:25,pythnet:26,xpla:28,btc:29,base:30,wormchain:3104,sepolia:10002},A={unset:{core:void 0,token_bridge:void 0,nft_bridge:void 0},solana:{core:"worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth",token_bridge:"wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb",nft_bridge:"WnFt12ZrnzZrFZkt2xsNsaNWoQribnuQ5B5FrDbwDhD"},ethereum:{core:"0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B",token_bridge:"0x3ee18B2214AFF97000D974cf647E7C347E8fa585",nft_bridge:"0x6FFd7EdE62328b3Af38FCD61461Bbfc52F5651fE"},terra:{core:"terra1dq03ugtd40zu9hcgdzrsq6z2z4hwhc9tqk2uy5",token_bridge:"terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf",nft_bridge:void 0},bsc:{core:"0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B",token_bridge:"0xB6F6D86a8f9879A9c87f643768d9efc38c1Da6E7",nft_bridge:"0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE"},polygon:{core:"0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7",token_bridge:"0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE",nft_bridge:"0x90BBd86a6Fe93D3bc3ed6335935447E75fAb7fCf"},avalanche:{core:"0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c",token_bridge:"0x0e082F06FF657D94310cB8cE8B0D9a04541d8052",nft_bridge:"0xf7B6737Ca9c4e08aE573F75A97B73D7a813f5De5"},oasis:{core:"0xfE8cD454b4A1CA468B57D79c0cc77Ef5B6f64585",token_bridge:"0x5848C791e09901b40A9Ef749f2a6735b418d7564",nft_bridge:"0x04952D522Ff217f40B5Ef3cbF659EcA7b952a6c1"},algorand:{core:"842125965",token_bridge:"842126029",nft_bridge:void 0},aurora:{core:"0xa321448d90d4e5b0A732867c18eA198e75CAC48E",token_bridge:"0x51b5123a7b0F9b2bA265f9c4C8de7D78D52f510F",nft_bridge:"0x6dcC0484472523ed9Cdc017F711Bcbf909789284"},fantom:{core:"0x126783A6Cb203a3E35344528B26ca3a0489a1485",token_bridge:"0x7C9Fc5741288cDFdD83CeB07f3ea7e22618D79D2",nft_bridge:"0xA9c7119aBDa80d4a4E0C06C8F4d8cF5893234535"},karura:{core:"0xa321448d90d4e5b0A732867c18eA198e75CAC48E",token_bridge:"0xae9d7fe007b3327AA64A32824Aaac52C42a6E624",nft_bridge:"0xb91e3638F82A1fACb28690b37e3aAE45d2c33808"},acala:{core:"0xa321448d90d4e5b0A732867c18eA198e75CAC48E",token_bridge:"0xae9d7fe007b3327AA64A32824Aaac52C42a6E624",nft_bridge:"0xb91e3638F82A1fACb28690b37e3aAE45d2c33808"},klaytn:{core:"0x0C21603c4f3a6387e241c0091A7EA39E43E90bb7",token_bridge:"0x5b08ac39EAED75c0439FC750d9FE7E1F9dD0193F",nft_bridge:"0x3c3c561757BAa0b78c5C025CdEAa4ee24C1dFfEf"},celo:{core:"0xa321448d90d4e5b0A732867c18eA198e75CAC48E",token_bridge:"0x796Dff6D74F3E27060B71255Fe517BFb23C93eed",nft_bridge:"0xA6A377d75ca5c9052c9a77ED1e865Cc25Bd97bf3"},near:{core:"contract.wormhole_crypto.near",token_bridge:"contract.portalbridge.near",nft_bridge:void 0},injective:{core:"inj17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9l2q74d",token_bridge:"inj1ghd753shjuwexxywmgs4xz7x2q732vcnxxynfn",nft_bridge:void 0},osmosis:{core:void 0,token_bridge:void 0,nft_bridge:void 0},aptos:{core:"0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625",token_bridge:"0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f",nft_bridge:"0x1bdffae984043833ed7fe223f7af7a3f8902d04129b14f801823e64827da7130"},sui:{core:void 0,token_bridge:void 0,nft_bridge:void 0},moonbeam:{core:"0xC8e2b0cD52Cf01b0Ce87d389Daa3d414d4cE29f3",token_bridge:"0xb1731c586ca89a23809861c6103f0b96b3f57d92",nft_bridge:"0x453cfbe096c0f8d763e8c5f24b441097d577bde2"},neon:{core:void 0,token_bridge:void 0,nft_bridge:void 0},terra2:{core:"terra12mrnzvhx3rpej6843uge2yyfppfyd3u9c3uq223q8sl48huz9juqffcnhp",token_bridge:"terra153366q50k7t8nn7gec00hg66crnhkdggpgdtaxltaq6xrutkkz3s992fw9",nft_bridge:void 0},arbitrum:{core:"0xa5f208e072434bC67592E4C49C1B991BA79BCA46",token_bridge:"0x0b2402144Bb366A632D14B83F244D2e0e21bD39c",nft_bridge:"0x3dD14D553cFD986EAC8e3bddF629d82073e188c8"},optimism:{core:"0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722",token_bridge:"0x1D68124e65faFC907325e3EDbF8c4d84499DAa8b",nft_bridge:"0xfE8cD454b4A1CA468B57D79c0cc77Ef5B6f64585"},gnosis:{core:"0xa321448d90d4e5b0A732867c18eA198e75CAC48E",token_bridge:void 0,nft_bridge:void 0},pythnet:{core:"H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU",token_bridge:void 0,nft_bridge:void 0},xpla:{core:"xpla1jn8qmdda5m6f6fqu9qv46rt7ajhklg40ukpqchkejcvy8x7w26cqxamv3w",token_bridge:"xpla137w0wfch2dfmz7jl2ap8pcmswasj8kg06ay4dtjzw7tzkn77ufxqfw7acv",nft_bridge:void 0},btc:{core:void 0,token_bridge:void 0,nft_bridge:void 0},base:{core:void 0,token_bridge:void 0,nft_bridge:void 0},wormchain:{core:void 0,token_bridge:void 0,nft_bridge:void 0},sepolia:{core:void 0,token_bridge:void 0,nft_bridge:void 0}},x={unset:{core:void 0,token_bridge:void 0,nft_bridge:void 0},solana:{core:"3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5",token_bridge:"DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe",nft_bridge:"2rHhojZ7hpu1zA91nvZmT8TqWWvMcKmmNBCr2mKTtMq4"},terra:{core:"terra1pd65m0q9tl3v8znnz5f5ltsfegyzah7g42cx5v",token_bridge:"terra1pseddrv0yfsn76u4zxrjmtf45kdlmalswdv39a",nft_bridge:void 0},ethereum:{core:"0x706abc4E45D419950511e474C7B9Ed348A4a716c",token_bridge:"0xF890982f9310df57d00f659cf4fd87e65adEd8d7",nft_bridge:"0xD8E4C2DbDd2e2bd8F1336EA691dBFF6952B1a6eB"},bsc:{core:"0x68605AD7b15c732a30b1BbC62BE8F2A509D74b4D",token_bridge:"0x9dcF9D205C9De35334D646BeE44b2D2859712A09",nft_bridge:"0xcD16E5613EF35599dc82B24Cb45B5A93D779f1EE"},polygon:{core:"0x0CBE91CF822c73C2315FB05100C2F714765d5c20",token_bridge:"0x377D55a7928c046E18eEbb61977e714d2a76472a",nft_bridge:"0x51a02d0dcb5e52F5b92bdAA38FA013C91c7309A9"},avalanche:{core:"0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C",token_bridge:"0x61E44E506Ca5659E6c0bba9b678586fA2d729756",nft_bridge:"0xD601BAf2EEE3C028344471684F6b27E789D9075D"},oasis:{core:"0xc1C338397ffA53a2Eb12A7038b4eeb34791F8aCb",token_bridge:"0x88d8004A9BdbfD9D28090A02010C19897a29605c",nft_bridge:"0xC5c25B41AB0b797571620F5204Afa116A44c0ebA"},algorand:{core:"86525623",token_bridge:"86525641",nft_bridge:void 0},aurora:{core:"0xBd07292de7b505a4E803CEe286184f7Acf908F5e",token_bridge:"0xD05eD3ad637b890D68a854d607eEAF11aF456fba",nft_bridge:"0x8F399607E9BA2405D87F5f3e1B78D950b44b2e24"},fantom:{core:"0x1BB3B4119b7BA9dfad76B0545fb3F531383c3bB7",token_bridge:"0x599CEa2204B4FaECd584Ab1F2b6aCA137a0afbE8",nft_bridge:"0x63eD9318628D26BdCB15df58B53BB27231D1B227"},karura:{core:"0xE4eacc10990ba3308DdCC72d985f2a27D20c7d03",token_bridge:"0xd11De1f930eA1F7Dd0290Fe3a2e35b9C91AEFb37",nft_bridge:"0x0A693c2D594292B6Eb89Cb50EFe4B0b63Dd2760D"},acala:{core:"0x4377B49d559c0a9466477195C6AdC3D433e265c0",token_bridge:"0xebA00cbe08992EdD08ed7793E07ad6063c807004",nft_bridge:"0x96f1335e0AcAB3cfd9899B30b2374e25a2148a6E"},klaytn:{core:"0x1830CC6eE66c84D2F177B94D544967c774E624cA",token_bridge:"0xC7A13BE098720840dEa132D860fDfa030884b09A",nft_bridge:"0x94c994fC51c13101062958b567e743f1a04432dE"},celo:{core:"0x88505117CA88e7dd2eC6EA1E13f0948db2D50D56",token_bridge:"0x05ca6037eC51F8b712eD2E6Fa72219FEaE74E153",nft_bridge:"0xaCD8190F647a31E56A656748bC30F69259f245Db"},near:{core:"wormhole.wormhole.testnet",token_bridge:"token.wormhole.testnet",nft_bridge:void 0},injective:{core:"inj1xx3aupmgv3ce537c0yce8zzd3sz567syuyedpg",token_bridge:"inj1q0e70vhrv063eah90mu97sazhywmeegp7myvnh",nft_bridge:void 0},osmosis:{core:"osmo1hggkxr0hpw83f8vuft7ruvmmamsxmwk2hzz6nytdkzyup9krt0dq27sgyx",token_bridge:void 0,nft_bridge:void 0},aptos:{core:"0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625",token_bridge:"0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f",nft_bridge:void 0},sui:{core:void 0,token_bridge:void 0,nft_bridge:void 0},moonbeam:{core:"0xa5B7D85a8f27dd7907dc8FdC21FA5657D5E2F901",token_bridge:"0xbc976D4b9D57E57c3cA52e1Fd136C45FF7955A96",nft_bridge:"0x98A0F4B96972b32Fcb3BD03cAeB66A44a6aB9Edb"},neon:{core:"0x268557122Ffd64c85750d630b716471118F323c8",token_bridge:"0xEe3dB83916Ccdc3593b734F7F2d16D630F39F1D0",nft_bridge:"0x66E5BcFD45D2F3f166c567ADa663f9d2ffb292B4"},terra2:{core:"terra19nv3xr5lrmmr7egvrk2kqgw4kcn43xrtd5g0mpgwwvhetusk4k7s66jyv0",token_bridge:"terra1c02vds4uhgtrmcw7ldlg75zumdqxr8hwf7npseuf2h58jzhpgjxsgmwkvk",nft_bridge:void 0},arbitrum:{core:"0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e",token_bridge:"0x23908A62110e21C04F3A4e011d24F901F911744A",nft_bridge:"0xEe3dB83916Ccdc3593b734F7F2d16D630F39F1D0"},optimism:{core:"0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35",token_bridge:"0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e",nft_bridge:"0x23908A62110e21C04F3A4e011d24F901F911744A"},gnosis:{core:"0xE4eacc10990ba3308DdCC72d985f2a27D20c7d03",token_bridge:void 0,nft_bridge:void 0},pythnet:{core:"EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z",token_bridge:void 0,nft_bridge:void 0},xpla:{core:"xpla1upkjn4mthr0047kahvn0llqx4qpqfn75lnph4jpxfn8walmm8mqsanyy35",token_bridge:"xpla1kek6zgdaxcsu35nqfsyvs2t9vs87dqkkq6hjdgczacysjn67vt8sern93x",nft_bridge:void 0},btc:{core:void 0,token_bridge:void 0,nft_bridge:void 0},base:{core:"0x23908A62110e21C04F3A4e011d24F901F911744A",token_bridge:"0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780",nft_bridge:"0xF681d1cc5F25a3694E348e7975d7564Aa581db59"},wormchain:{core:void 0,token_bridge:void 0,nft_bridge:void 0},sepolia:{core:"0x4a8bc80Ed5a4067f1CCf107057b8270E0cC11A78",token_bridge:"0xDB5492265f6038831E89f495670FF909aDe94bd9",nft_bridge:"0x6a0B52ac198e4870e5F3797d5B403838a5bbFD99"}},I={unset:{core:void 0,token_bridge:void 0,nft_bridge:void 0},solana:{core:"Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o",token_bridge:"B6RHG3mfcckmrYN1UhmJzyS1XX3fZKbkeUcpJe9Sy3FE",nft_bridge:"NFTWqJR8YnRVqPDvTJrYuLrQDitTG5AScqbeghi4zSA"},terra:{core:"terra18vd8fpwxzck93qlwghaj6arh4p7c5n896xzem5",token_bridge:"terra10pyejy66429refv3g35g2t7am0was7ya7kz2a4",nft_bridge:"terra1plju286nnfj3z54wgcggd4enwaa9fgf5kgrgzl"},ethereum:{core:"0xC89Ce4735882C9F0f0FE26686c53074E09B0D550",token_bridge:"0x0290FB167208Af455bB137780163b7B7a9a10C16",nft_bridge:"0x26b4afb60d6c903165150c6f0aa14f8016be4aec"},bsc:{core:"0xC89Ce4735882C9F0f0FE26686c53074E09B0D550",token_bridge:"0x0290FB167208Af455bB137780163b7B7a9a10C16",nft_bridge:"0x26b4afb60d6c903165150c6f0aa14f8016be4aec"},polygon:{core:void 0,token_bridge:void 0,nft_bridge:void 0},avalanche:{core:void 0,token_bridge:void 0,nft_bridge:void 0},oasis:{core:void 0,token_bridge:void 0,nft_bridge:void 0},algorand:{core:"4",token_bridge:"6",nft_bridge:void 0},aurora:{core:void 0,token_bridge:void 0,nft_bridge:void 0},fantom:{core:void 0,token_bridge:void 0,nft_bridge:void 0},karura:{core:void 0,token_bridge:void 0,nft_bridge:void 0},acala:{core:void 0,token_bridge:void 0,nft_bridge:void 0},klaytn:{core:void 0,token_bridge:void 0,nft_bridge:void 0},celo:{core:void 0,token_bridge:void 0,nft_bridge:void 0},near:{core:"wormhole.test.near",token_bridge:"token.test.near",nft_bridge:void 0},injective:{core:void 0,token_bridge:void 0,nft_bridge:void 0},osmosis:{core:void 0,token_bridge:void 0,nft_bridge:void 0},aptos:{core:"0xde0036a9600559e295d5f6802ef6f3f802f510366e0c23912b0655d972166017",token_bridge:"0x84a5f374d29fc77e370014dce4fd6a55b58ad608de8074b0be5571701724da31",nft_bridge:"0x46da3d4c569388af61f951bdd1153f4c875f90c2991f6b2d0a38e2161a40852c"},sui:{core:void 0,token_bridge:void 0,nft_bridge:void 0},moonbeam:{core:void 0,token_bridge:void 0,nft_bridge:void 0},neon:{core:void 0,token_bridge:void 0,nft_bridge:void 0},terra2:{core:"terra14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9ssrc8au",token_bridge:"terra1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrquka9l6",nft_bridge:void 0},arbitrum:{core:void 0,token_bridge:void 0,nft_bridge:void 0},optimism:{core:void 0,token_bridge:void 0,nft_bridge:void 0},gnosis:{core:void 0,token_bridge:void 0,nft_bridge:void 0},pythnet:{core:void 0,token_bridge:void 0,nft_bridge:void 0},xpla:{core:void 0,token_bridge:void 0,nft_bridge:void 0},btc:{core:void 0,token_bridge:void 0,nft_bridge:void 0},base:{core:void 0,token_bridge:void 0,nft_bridge:void 0},wormchain:{core:"wormhole1ap5vgur5zlgys8whugfegnn43emka567dtq0jl",token_bridge:"wormhole1zugu6cajc4z7ue29g9wnes9a5ep9cs7yu7rn3z",nft_bridge:void 0},sepolia:{core:void 0,token_bridge:void 0,nft_bridge:void 0}},T={MAINNET:A,TESTNET:x,DEVNET:I},S=k.unset,C=k.solana,E=k.ethereum,R=k.terra,M=k.bsc,P=k.polygon,U=k.avalanche,_=k.oasis,B=k.algorand,D=k.aurora,N=k.fantom,O=k.karura,F=k.acala,L=k.klaytn,j=k.celo,H=k.near,G=k.moonbeam,z=k.neon,K=k.terra2,W=k.injective,Z=k.osmosis,V=k.sui,q=k.aptos,Q=k.arbitrum,J=k.optimism,Y=k.gnosis,X=k.pythnet,$=k.xpla,ee=k.btc,te=k.base,ne=k.wormchain,ae=k.sepolia,oe=Object.entries(k).reduce((function(e,t){var n=w(t,2),a=n[0];return e[n[1]]=a,e}),{});function re(e){return"number"===typeof e?e in oe:e in k}function ie(e){if(!re(e))throw"number"===typeof e?Error("Unknown chain id: "+e):Error("Unknown chain: "+e)}function se(e){return k[e]}function ce(e){return oe[e]}function ue(e){return k[e]}function de(e){return"number"===typeof e&&be(e)?e:ue(e)}function le(e){return"number"===typeof e&&re(e)?e:se(e)}function fe(e){return ce(le(e))}function pe(e){var t=le(e);return t===E||t===M||t===U||t===P||t===_||t===D||t===N||t===O||t===F||t===L||t===j||t===G||t===z||t===Q||t===J||t===Y||t===te||t===ae}function be(e){var t=le(e);return t===R||t===K||t===W||t===$}function me(e){var t=le(e);return t===R||t===K}function he(e){if(!pe(e))throw Error("Expected an EVM chain, but "+e+" is not")}var ge="So11111111111111111111111111111111111111112",ye=9,ve=8,we="0108bc32f7de18a5f6e1e7d6ee7aff9f5fc858d0d87ac0da94dd8d2a5d267d6b",ke="277fa055b6a73c42c0662d5236c65c864ccbf2d4abd21f174a30c8b786eab84b",Ae="0000000000000000000000000000000000000000000000000000000000000001",xe="terra1x46rqay4d3cssq8gxxvqz8xt6nwlz4td20k38v";var Ie=null;try{Ie=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(sK){}function Te(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function Se(e){return!0===(e&&e.__isLong__)}function Ce(e){var t=Math.clz32(e&-e);return e?31-t:t}Te.prototype.__isLong__,Object.defineProperty(Te.prototype,"__isLong__",{value:!0}),Te.isLong=Se;var Ee={},Re={};function Me(e,t){var n,a,o;return t?(o=0<=(e>>>=0)&&e<256)&&(a=Re[e])?a:(n=Ue(e,0,!0),o&&(Re[e]=n),n):(o=-128<=(e|=0)&&e<128)&&(a=Ee[e])?a:(n=Ue(e,e<0?-1:0,!1),o&&(Ee[e]=n),n)}function Pe(e,t){if(isNaN(e))return t?He:je;if(t){if(e<0)return He;if(e>=Oe)return Ze}else{if(e<=-Fe)return Ve;if(e+1>=Fe)return We}return e<0?Pe(-e,t).neg():Ue(e%Ne|0,e/Ne|0,t)}function Ue(e,t,n){return new Te(e,t,n)}Te.fromInt=Me,Te.fromNumber=Pe,Te.fromBits=Ue;var _e=Math.pow;function Be(e,t,n){if(0===e.length)throw Error("empty string");if("number"===typeof t?(n=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?He:je;if((n=n||10)<2||360)throw Error("interior hyphen");if(0===a)return Be(e.substring(1),t,n).neg();for(var o=Pe(_e(n,8)),r=je,i=0;i>>0:this.low},qe.toNumber=function(){return this.unsigned?(this.high>>>0)*Ne+(this.low>>>0):this.high*Ne+(this.low>>>0)},qe.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((r=s).isZero())return c+i;for(;c.length<6;)c="0"+c;i=""+c+i}},qe.getHighBits=function(){return this.high},qe.getHighBitsUnsigned=function(){return this.high>>>0},qe.getLowBits=function(){return this.low},qe.getLowBitsUnsigned=function(){return this.low>>>0},qe.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Ve)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},qe.isOdd=function(){return 1===(1&this.low)},qe.isEven=function(){return 0===(1&this.low)},qe.equals=function(e){return Se(e)||(e=De(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&(this.high===e.high&&this.low===e.low)},qe.eq=qe.equals,qe.notEquals=function(e){return!this.eq(e)},qe.neq=qe.notEquals,qe.ne=qe.notEquals,qe.lessThan=function(e){return this.comp(e)<0},qe.lt=qe.lessThan,qe.lessThanOrEqual=function(e){return this.comp(e)<=0},qe.lte=qe.lessThanOrEqual,qe.le=qe.lessThanOrEqual,qe.greaterThan=function(e){return this.comp(e)>0},qe.gt=qe.greaterThan,qe.greaterThanOrEqual=function(e){return this.comp(e)>=0},qe.gte=qe.greaterThanOrEqual,qe.ge=qe.greaterThanOrEqual,qe.compare=function(e){if(Se(e)||(e=De(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},qe.comp=qe.compare,qe.negate=function(){return!this.unsigned&&this.eq(Ve)?Ve:this.not().add(Ge)},qe.neg=qe.negate,qe.add=function(e){Se(e)||(e=De(e));var t=this.high>>>16,n=65535&this.high,a=this.low>>>16,o=65535&this.low,r=e.high>>>16,i=65535&e.high,s=e.low>>>16,c=0,u=0,d=0,l=0;return d+=(l+=o+(65535&e.low))>>>16,u+=(d+=a+s)>>>16,c+=(u+=n+i)>>>16,c+=t+r,Ue((d&=65535)<<16|(l&=65535),(c&=65535)<<16|(u&=65535),this.unsigned)},qe.subtract=function(e){return Se(e)||(e=De(e)),this.add(e.neg())},qe.sub=qe.subtract,qe.multiply=function(e){if(this.isZero())return this;if(Se(e)||(e=De(e)),Ie)return Ue(Ie.mul(this.low,this.high,e.low,e.high),Ie.get_high(),this.unsigned);if(e.isZero())return this.unsigned?He:je;if(this.eq(Ve))return e.isOdd()?Ve:je;if(e.eq(Ve))return this.isOdd()?Ve:je;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(Le)&&e.lt(Le))return Pe(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,a=this.low>>>16,o=65535&this.low,r=e.high>>>16,i=65535&e.high,s=e.low>>>16,c=65535&e.low,u=0,d=0,l=0,f=0;return l+=(f+=o*c)>>>16,d+=(l+=a*c)>>>16,l&=65535,d+=(l+=o*s)>>>16,u+=(d+=n*c)>>>16,d&=65535,u+=(d+=a*s)>>>16,d&=65535,u+=(d+=o*i)>>>16,u+=t*c+n*s+a*i+o*r,Ue((l&=65535)<<16|(f&=65535),(u&=65535)<<16|(d&=65535),this.unsigned)},qe.mul=qe.multiply,qe.divide=function(e){if(Se(e)||(e=De(e)),e.isZero())throw Error("division by zero");var t,n,a;if(Ie)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?Ue((this.unsigned?Ie.div_u:Ie.div_s)(this.low,this.high,e.low,e.high),Ie.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?He:je;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return He;if(e.gt(this.shru(1)))return ze;a=He}else{if(this.eq(Ve))return e.eq(Ge)||e.eq(Ke)?Ve:e.eq(Ve)?Ge:(t=this.shr(1).div(e).shl(1)).eq(je)?e.isNegative()?Ge:Ke:(n=this.sub(e.mul(t)),a=t.add(n.div(e)));if(e.eq(Ve))return this.unsigned?He:je;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();a=je}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(t)/Math.LN2),r=o<=48?1:_e(2,o-48),i=Pe(t),s=i.mul(e);s.isNegative()||s.gt(n);)s=(i=Pe(t-=r,this.unsigned)).mul(e);i.isZero()&&(i=Ge),a=a.add(i),n=n.sub(s)}return a},qe.div=qe.divide,qe.modulo=function(e){return Se(e)||(e=De(e)),Ie?Ue((this.unsigned?Ie.rem_u:Ie.rem_s)(this.low,this.high,e.low,e.high),Ie.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},qe.mod=qe.modulo,qe.rem=qe.modulo,qe.not=function(){return Ue(~this.low,~this.high,this.unsigned)},qe.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},qe.clz=qe.countLeadingZeros,qe.countTrailingZeros=function(){return this.low?Ce(this.low):Ce(this.high)+32},qe.ctz=qe.countTrailingZeros,qe.and=function(e){return Se(e)||(e=De(e)),Ue(this.low&e.low,this.high&e.high,this.unsigned)},qe.or=function(e){return Se(e)||(e=De(e)),Ue(this.low|e.low,this.high|e.high,this.unsigned)},qe.xor=function(e){return Se(e)||(e=De(e)),Ue(this.low^e.low,this.high^e.high,this.unsigned)},qe.shiftLeft=function(e){return Se(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?Ue(this.low<>>32-e,this.unsigned):Ue(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):Ue(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},qe.shr=qe.shiftRight,qe.shiftRightUnsigned=function(e){return Se(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?Ue(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):Ue(32===e?this.high:this.high>>>e-32,0,this.unsigned)},qe.shru=qe.shiftRightUnsigned,qe.shr_u=qe.shiftRightUnsigned,qe.rotateLeft=function(e){var t;return Se(e)&&(e=e.toInt()),0===(e&=63)?this:32===e?Ue(this.high,this.low,this.unsigned):e<32?(t=32-e,Ue(this.low<>>t,this.high<>>t,this.unsigned)):(t=32-(e-=32),Ue(this.high<>>t,this.low<>>t,this.unsigned))},qe.rotl=qe.rotateLeft,qe.rotateRight=function(e){var t;return Se(e)&&(e=e.toInt()),0===(e&=63)?this:32===e?Ue(this.high,this.low,this.unsigned):e<32?(t=32-e,Ue(this.high<>>e,this.low<>>e,this.unsigned)):(t=32-(e-=32),Ue(this.low<>>e,this.high<>>e,this.unsigned))},qe.rotr=qe.rotateRight,qe.toSigned=function(){return this.unsigned?Ue(this.low,this.high,!1):this},qe.toUnsigned=function(){return this.unsigned?this:Ue(this.low,this.high,!0)},qe.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},qe.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},qe.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},Te.fromBytes=function(e,t,n){return n?Te.fromBytesLE(e,t):Te.fromBytesBE(e,t)},Te.fromBytesLE=function(e,t){return new Te(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},Te.fromBytesBE=function(e,t){return new Te(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var Qe=Te,Je=n(93177),Ye=n.n(Je);Ye().util.Long!==Qe&&(Ye().util.Long=Qe,Ye().configure());Ye().util.Long!==Qe&&(Ye().util.Long=Qe,Ye().configure());var Xe,$e,et,tt,nt,at;!function(e){e[e.TYPE_DOUBLE=1]="TYPE_DOUBLE",e[e.TYPE_FLOAT=2]="TYPE_FLOAT",e[e.TYPE_INT64=3]="TYPE_INT64",e[e.TYPE_UINT64=4]="TYPE_UINT64",e[e.TYPE_INT32=5]="TYPE_INT32",e[e.TYPE_FIXED64=6]="TYPE_FIXED64",e[e.TYPE_FIXED32=7]="TYPE_FIXED32",e[e.TYPE_BOOL=8]="TYPE_BOOL",e[e.TYPE_STRING=9]="TYPE_STRING",e[e.TYPE_GROUP=10]="TYPE_GROUP",e[e.TYPE_MESSAGE=11]="TYPE_MESSAGE",e[e.TYPE_BYTES=12]="TYPE_BYTES",e[e.TYPE_UINT32=13]="TYPE_UINT32",e[e.TYPE_ENUM=14]="TYPE_ENUM",e[e.TYPE_SFIXED32=15]="TYPE_SFIXED32",e[e.TYPE_SFIXED64=16]="TYPE_SFIXED64",e[e.TYPE_SINT32=17]="TYPE_SINT32",e[e.TYPE_SINT64=18]="TYPE_SINT64",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(Xe||(Xe={})),function(e){e[e.LABEL_OPTIONAL=1]="LABEL_OPTIONAL",e[e.LABEL_REQUIRED=2]="LABEL_REQUIRED",e[e.LABEL_REPEATED=3]="LABEL_REPEATED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}($e||($e={})),function(e){e[e.SPEED=1]="SPEED",e[e.CODE_SIZE=2]="CODE_SIZE",e[e.LITE_RUNTIME=3]="LITE_RUNTIME",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(et||(et={})),function(e){e[e.STRING=0]="STRING",e[e.CORD=1]="CORD",e[e.STRING_PIECE=2]="STRING_PIECE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(tt||(tt={})),function(e){e[e.JS_NORMAL=0]="JS_NORMAL",e[e.JS_STRING=1]="JS_STRING",e[e.JS_NUMBER=2]="JS_NUMBER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(nt||(nt={})),function(e){e[e.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",e[e.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",e[e.IDEMPOTENT=2]="IDEMPOTENT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(at||(at={}));var ot=function(){if("undefined"!==typeof ot)return ot;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}();ot.atob;ot.btoa;Ye().util.Long!==Qe&&(Ye().util.Long=Qe,Ye().configure());var rt=function(){return rt=Object.assign||function(e){for(var t,n=1,a=arguments.length;n=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},st={nodeName:"",counter:"0",timestamp:"0",version:"",guardianAddr:"",bootTimestamp:"0",features:""},ct=function(e,t){var n,a,o,r;void 0===t&&(t=Ye().Writer.create()),""!==e.nodeName&&t.uint32(10).string(e.nodeName),"0"!==e.counter&&t.uint32(16).int64(e.counter),"0"!==e.timestamp&&t.uint32(24).int64(e.timestamp);try{for(var i=it(e.networks),s=i.next();!s.done;s=i.next()){var c=s.value;bt.encode(c,t.uint32(34).fork()).ldelim()}}catch(l){n={error:l}}finally{try{s&&!s.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}""!==e.version&&t.uint32(42).string(e.version),""!==e.guardianAddr&&t.uint32(50).string(e.guardianAddr),"0"!==e.bootTimestamp&&t.uint32(56).int64(e.bootTimestamp);try{for(var u=it(e.features),d=u.next();!d.done;d=u.next()){c=d.value;t.uint32(66).string(c)}}catch(f){o={error:f}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(o)throw o.error}}return t},ut=function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=rt({},st);for(o.networks=[],o.features=[];n.pos>>3){case 1:o.nodeName=n.string();break;case 2:o.counter=Ct(n.int64());break;case 3:o.timestamp=Ct(n.int64());break;case 4:o.networks.push(bt.decode(n,n.uint32()));break;case 5:o.version=n.string();break;case 6:o.guardianAddr=n.string();break;case 7:o.bootTimestamp=Ct(n.int64());break;case 8:o.features.push(n.string());break;default:n.skipType(7&r)}}return o},dt=function(e){var t,n,a,o,r=rt({},st);if(r.networks=[],r.features=[],void 0!==e.nodeName&&null!==e.nodeName?r.nodeName=String(e.nodeName):r.nodeName="",void 0!==e.counter&&null!==e.counter?r.counter=String(e.counter):r.counter="0",void 0!==e.timestamp&&null!==e.timestamp?r.timestamp=String(e.timestamp):r.timestamp="0",void 0!==e.networks&&null!==e.networks)try{for(var i=it(e.networks),s=i.next();!s.done;s=i.next()){var c=s.value;r.networks.push(bt.fromJSON(c))}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}if(void 0!==e.version&&null!==e.version?r.version=String(e.version):r.version="",void 0!==e.guardianAddr&&null!==e.guardianAddr?r.guardianAddr=String(e.guardianAddr):r.guardianAddr="",void 0!==e.bootTimestamp&&null!==e.bootTimestamp?r.bootTimestamp=String(e.bootTimestamp):r.bootTimestamp="0",void 0!==e.features&&null!==e.features)try{for(var u=it(e.features),d=u.next();!d.done;d=u.next()){c=d.value;r.features.push(String(c))}}catch(f){a={error:f}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(a)throw a.error}}return r},lt=function(e){var t={};return void 0!==e.nodeName&&(t.nodeName=e.nodeName),void 0!==e.counter&&(t.counter=e.counter),void 0!==e.timestamp&&(t.timestamp=e.timestamp),e.networks?t.networks=e.networks.map((function(e){return e?bt.toJSON(e):void 0})):t.networks=[],void 0!==e.version&&(t.version=e.version),void 0!==e.guardianAddr&&(t.guardianAddr=e.guardianAddr),void 0!==e.bootTimestamp&&(t.bootTimestamp=e.bootTimestamp),e.features?t.features=e.features.map((function(e){return e})):t.features=[],t},ft=function(e){var t,n,a,o,r=rt({},st);if(r.networks=[],r.features=[],void 0!==e.nodeName&&null!==e.nodeName?r.nodeName=e.nodeName:r.nodeName="",void 0!==e.counter&&null!==e.counter?r.counter=e.counter:r.counter="0",void 0!==e.timestamp&&null!==e.timestamp?r.timestamp=e.timestamp:r.timestamp="0",void 0!==e.networks&&null!==e.networks)try{for(var i=it(e.networks),s=i.next();!s.done;s=i.next()){var c=s.value;r.networks.push(bt.fromPartial(c))}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}if(void 0!==e.version&&null!==e.version?r.version=e.version:r.version="",void 0!==e.guardianAddr&&null!==e.guardianAddr?r.guardianAddr=e.guardianAddr:r.guardianAddr="",void 0!==e.bootTimestamp&&null!==e.bootTimestamp?r.bootTimestamp=e.bootTimestamp:r.bootTimestamp="0",void 0!==e.features&&null!==e.features)try{for(var u=it(e.features),d=u.next();!d.done;d=u.next()){c=d.value;r.features.push(c)}}catch(f){a={error:f}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(a)throw a.error}}return r},pt={id:0,height:"0",contractAddress:"",errorCount:"0"},bt={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.id&&t.uint32(8).uint32(e.id),"0"!==e.height&&t.uint32(16).int64(e.height),""!==e.contractAddress&&t.uint32(26).string(e.contractAddress),"0"!==e.errorCount&&t.uint32(32).uint64(e.errorCount),t},decode:function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=rt({},pt);n.pos>>3){case 1:o.id=n.uint32();break;case 2:o.height=Ct(n.int64());break;case 3:o.contractAddress=n.string();break;case 4:o.errorCount=Ct(n.uint64());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=rt({},pt);return void 0!==e.id&&null!==e.id?t.id=Number(e.id):t.id=0,void 0!==e.height&&null!==e.height?t.height=String(e.height):t.height="0",void 0!==e.contractAddress&&null!==e.contractAddress?t.contractAddress=String(e.contractAddress):t.contractAddress="",void 0!==e.errorCount&&null!==e.errorCount?t.errorCount=String(e.errorCount):t.errorCount="0",t},toJSON:function(e){var t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.height&&(t.height=e.height),void 0!==e.contractAddress&&(t.contractAddress=e.contractAddress),void 0!==e.errorCount&&(t.errorCount=e.errorCount),t},fromPartial:function(e){var t=rt({},pt);return void 0!==e.id&&null!==e.id?t.id=e.id:t.id=0,void 0!==e.height&&null!==e.height?t.height=e.height:t.height="0",void 0!==e.contractAddress&&null!==e.contractAddress?t.contractAddress=e.contractAddress:t.contractAddress="",void 0!==e.errorCount&&null!==e.errorCount?t.errorCount=e.errorCount:t.errorCount="0",t}},mt={},ht={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.vaa.length&&t.uint32(10).bytes(e.vaa),t},decode:function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=rt({},mt);for(o.vaa=new Uint8Array;n.pos>>3===1)o.vaa=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=rt({},mt);return t.vaa=new Uint8Array,void 0!==e.vaa&&null!==e.vaa&&(t.vaa=It(e.vaa)),t},toJSON:function(e){var t={};return void 0!==e.vaa&&(t.vaa=St(void 0!==e.vaa?e.vaa:new Uint8Array)),t},fromPartial:function(e){var t=rt({},mt);return void 0!==e.vaa&&null!==e.vaa?t.vaa=e.vaa:t.vaa=new Uint8Array,t}},gt={chainId:0},yt=function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.chainId&&t.uint32(8).uint32(e.chainId),0!==e.txHash.length&&t.uint32(18).bytes(e.txHash),t},vt=function(e){var t=rt({},gt);return void 0!==e.chainId&&null!==e.chainId?t.chainId=e.chainId:t.chainId=0,void 0!==e.txHash&&null!==e.txHash?t.txHash=e.txHash:t.txHash=new Uint8Array,t},wt={chainId:0,nonce:0,batchId:""},kt={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.batchVaa.length&&t.uint32(10).bytes(e.batchVaa),0!==e.chainId&&t.uint32(16).uint32(e.chainId),0!==e.txId.length&&t.uint32(26).bytes(e.txId),0!==e.nonce&&t.uint32(32).uint32(e.nonce),""!==e.batchId&&t.uint32(42).string(e.batchId),t},decode:function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=rt({},wt);for(o.batchVaa=new Uint8Array,o.txId=new Uint8Array;n.pos>>3){case 1:o.batchVaa=n.bytes();break;case 2:o.chainId=n.uint32();break;case 3:o.txId=n.bytes();break;case 4:o.nonce=n.uint32();break;case 5:o.batchId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=rt({},wt);return t.batchVaa=new Uint8Array,t.txId=new Uint8Array,void 0!==e.batchVaa&&null!==e.batchVaa&&(t.batchVaa=It(e.batchVaa)),void 0!==e.chainId&&null!==e.chainId?t.chainId=Number(e.chainId):t.chainId=0,void 0!==e.txId&&null!==e.txId&&(t.txId=It(e.txId)),void 0!==e.nonce&&null!==e.nonce?t.nonce=Number(e.nonce):t.nonce=0,void 0!==e.batchId&&null!==e.batchId?t.batchId=String(e.batchId):t.batchId="",t},toJSON:function(e){var t={};return void 0!==e.batchVaa&&(t.batchVaa=St(void 0!==e.batchVaa?e.batchVaa:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.txId&&(t.txId=St(void 0!==e.txId?e.txId:new Uint8Array)),void 0!==e.nonce&&(t.nonce=e.nonce),void 0!==e.batchId&&(t.batchId=e.batchId),t},fromPartial:function(e){var t=rt({},wt);return void 0!==e.batchVaa&&null!==e.batchVaa?t.batchVaa=e.batchVaa:t.batchVaa=new Uint8Array,void 0!==e.chainId&&null!==e.chainId?t.chainId=e.chainId:t.chainId=0,void 0!==e.txId&&null!==e.txId?t.txId=e.txId:t.txId=new Uint8Array,void 0!==e.nonce&&null!==e.nonce?t.nonce=e.nonce:t.nonce=0,void 0!==e.batchId&&null!==e.batchId?t.batchId=e.batchId:t.batchId="",t}},At=function(){if("undefined"!==typeof At)return At;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),xt=At.atob||function(e){return At.Buffer.from(e,"base64").toString("binary")};function It(e){for(var t=xt(e),n=new Uint8Array(t.length),a=0;a=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ut={currentSetIndex:0,timestamp:0},_t=function(e,t){var n,a;void 0===t&&(t=Ye().Writer.create()),0!==e.currentSetIndex&&t.uint32(8).uint32(e.currentSetIndex);try{for(var o=Pt(e.messages),r=o.next();!r.done;r=o.next()){var i=r.value;Nt.encode(i,t.uint32(18).fork()).ldelim()}}catch(s){n={error:s}}finally{try{r&&!r.done&&(a=o.return)&&a.call(o)}finally{if(n)throw n.error}}return 0!==e.timestamp&&t.uint32(24).uint32(e.timestamp),t},Bt=function(e){var t,n,a=Mt({},Ut);if(a.messages=[],void 0!==e.currentSetIndex&&null!==e.currentSetIndex?a.currentSetIndex=e.currentSetIndex:a.currentSetIndex=0,void 0!==e.messages&&null!==e.messages)try{for(var o=Pt(e.messages),r=o.next();!r.done;r=o.next()){var i=r.value;a.messages.push(Nt.fromPartial(i))}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return void 0!==e.timestamp&&null!==e.timestamp?a.timestamp=e.timestamp:a.timestamp=0,a},Dt={sequence:"0",nonce:0},Nt={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),"0"!==e.sequence&&t.uint32(16).uint64(e.sequence),0!==e.nonce&&t.uint32(24).uint32(e.nonce),void 0!==e.guardianSet&&jt.encode(e.guardianSet,t.uint32(82).fork()).ldelim(),void 0!==e.contractUpgrade&&Zt.encode(e.contractUpgrade,t.uint32(90).fork()).ldelim(),void 0!==e.bridgeRegisterChain&&Kt.encode(e.bridgeRegisterChain,t.uint32(98).fork()).ldelim(),void 0!==e.bridgeContractUpgrade&&qt.encode(e.bridgeContractUpgrade,t.uint32(106).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},Dt);n.pos>>3){case 2:o.sequence=Vn(n.uint64());break;case 3:o.nonce=n.uint32();break;case 10:o.guardianSet=jt.decode(n,n.uint32());break;case 11:o.contractUpgrade=Zt.decode(n,n.uint32());break;case 12:o.bridgeRegisterChain=Kt.decode(n,n.uint32());break;case 13:o.bridgeContractUpgrade=qt.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Mt({},Dt);return void 0!==e.sequence&&null!==e.sequence?t.sequence=String(e.sequence):t.sequence="0",void 0!==e.nonce&&null!==e.nonce?t.nonce=Number(e.nonce):t.nonce=0,void 0!==e.guardianSet&&null!==e.guardianSet?t.guardianSet=jt.fromJSON(e.guardianSet):t.guardianSet=void 0,void 0!==e.contractUpgrade&&null!==e.contractUpgrade?t.contractUpgrade=Zt.fromJSON(e.contractUpgrade):t.contractUpgrade=void 0,void 0!==e.bridgeRegisterChain&&null!==e.bridgeRegisterChain?t.bridgeRegisterChain=Kt.fromJSON(e.bridgeRegisterChain):t.bridgeRegisterChain=void 0,void 0!==e.bridgeContractUpgrade&&null!==e.bridgeContractUpgrade?t.bridgeContractUpgrade=qt.fromJSON(e.bridgeContractUpgrade):t.bridgeContractUpgrade=void 0,t},toJSON:function(e){var t={};return void 0!==e.sequence&&(t.sequence=e.sequence),void 0!==e.nonce&&(t.nonce=e.nonce),void 0!==e.guardianSet&&(t.guardianSet=e.guardianSet?jt.toJSON(e.guardianSet):void 0),void 0!==e.contractUpgrade&&(t.contractUpgrade=e.contractUpgrade?Zt.toJSON(e.contractUpgrade):void 0),void 0!==e.bridgeRegisterChain&&(t.bridgeRegisterChain=e.bridgeRegisterChain?Kt.toJSON(e.bridgeRegisterChain):void 0),void 0!==e.bridgeContractUpgrade&&(t.bridgeContractUpgrade=e.bridgeContractUpgrade?qt.toJSON(e.bridgeContractUpgrade):void 0),t},fromPartial:function(e){var t=Mt({},Dt);return void 0!==e.sequence&&null!==e.sequence?t.sequence=e.sequence:t.sequence="0",void 0!==e.nonce&&null!==e.nonce?t.nonce=e.nonce:t.nonce=0,void 0!==e.guardianSet&&null!==e.guardianSet?t.guardianSet=jt.fromPartial(e.guardianSet):t.guardianSet=void 0,void 0!==e.contractUpgrade&&null!==e.contractUpgrade?t.contractUpgrade=Zt.fromPartial(e.contractUpgrade):t.contractUpgrade=void 0,void 0!==e.bridgeRegisterChain&&null!==e.bridgeRegisterChain?t.bridgeRegisterChain=Kt.fromPartial(e.bridgeRegisterChain):t.bridgeRegisterChain=void 0,void 0!==e.bridgeContractUpgrade&&null!==e.bridgeContractUpgrade?t.bridgeContractUpgrade=qt.fromPartial(e.bridgeContractUpgrade):t.bridgeContractUpgrade=void 0,t}},Ot={},Ft=function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},Ot);for(o.digests=[];n.pos>>3===1)o.digests.push(n.bytes());else n.skipType(7&r)}return o},Lt={},jt={encode:function(e,t){var n,a;void 0===t&&(t=Ye().Writer.create());try{for(var o=Pt(e.guardians),r=o.next();!r.done;r=o.next()){var i=r.value;Gt.encode(i,t.uint32(26).fork()).ldelim()}}catch(s){n={error:s}}finally{try{r&&!r.done&&(a=o.return)&&a.call(o)}finally{if(n)throw n.error}}return t},decode:function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},Lt);for(o.guardians=[];n.pos>>3===3)o.guardians.push(Gt.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t,n,a=Mt({},Lt);if(a.guardians=[],void 0!==e.guardians&&null!==e.guardians)try{for(var o=Pt(e.guardians),r=o.next();!r.done;r=o.next()){var i=r.value;a.guardians.push(Gt.fromJSON(i))}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},toJSON:function(e){var t={};return e.guardians?t.guardians=e.guardians.map((function(e){return e?Gt.toJSON(e):void 0})):t.guardians=[],t},fromPartial:function(e){var t,n,a=Mt({},Lt);if(a.guardians=[],void 0!==e.guardians&&null!==e.guardians)try{for(var o=Pt(e.guardians),r=o.next();!r.done;r=o.next()){var i=r.value;a.guardians.push(Gt.fromPartial(i))}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a}},Ht={pubkey:"",name:""},Gt={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),""!==e.pubkey&&t.uint32(10).string(e.pubkey),""!==e.name&&t.uint32(18).string(e.name),t},decode:function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},Ht);n.pos>>3){case 1:o.pubkey=n.string();break;case 2:o.name=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Mt({},Ht);return void 0!==e.pubkey&&null!==e.pubkey?t.pubkey=String(e.pubkey):t.pubkey="",void 0!==e.name&&null!==e.name?t.name=String(e.name):t.name="",t},toJSON:function(e){var t={};return void 0!==e.pubkey&&(t.pubkey=e.pubkey),void 0!==e.name&&(t.name=e.name),t},fromPartial:function(e){var t=Mt({},Ht);return void 0!==e.pubkey&&null!==e.pubkey?t.pubkey=e.pubkey:t.pubkey="",void 0!==e.name&&null!==e.name?t.name=e.name:t.name="",t}},zt={module:"",chainId:0,emitterAddress:""},Kt={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),""!==e.module&&t.uint32(10).string(e.module),0!==e.chainId&&t.uint32(16).uint32(e.chainId),""!==e.emitterAddress&&t.uint32(26).string(e.emitterAddress),t},decode:function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},zt);n.pos>>3){case 1:o.module=n.string();break;case 2:o.chainId=n.uint32();break;case 3:o.emitterAddress=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Mt({},zt);return void 0!==e.module&&null!==e.module?t.module=String(e.module):t.module="",void 0!==e.chainId&&null!==e.chainId?t.chainId=Number(e.chainId):t.chainId=0,void 0!==e.emitterAddress&&null!==e.emitterAddress?t.emitterAddress=String(e.emitterAddress):t.emitterAddress="",t},toJSON:function(e){var t={};return void 0!==e.module&&(t.module=e.module),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.emitterAddress&&(t.emitterAddress=e.emitterAddress),t},fromPartial:function(e){var t=Mt({},zt);return void 0!==e.module&&null!==e.module?t.module=e.module:t.module="",void 0!==e.chainId&&null!==e.chainId?t.chainId=e.chainId:t.chainId=0,void 0!==e.emitterAddress&&null!==e.emitterAddress?t.emitterAddress=e.emitterAddress:t.emitterAddress="",t}},Wt={chainId:0,newContract:""},Zt={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.chainId&&t.uint32(8).uint32(e.chainId),""!==e.newContract&&t.uint32(18).string(e.newContract),t},decode:function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},Wt);n.pos>>3){case 1:o.chainId=n.uint32();break;case 2:o.newContract=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Mt({},Wt);return void 0!==e.chainId&&null!==e.chainId?t.chainId=Number(e.chainId):t.chainId=0,void 0!==e.newContract&&null!==e.newContract?t.newContract=String(e.newContract):t.newContract="",t},toJSON:function(e){var t={};return void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.newContract&&(t.newContract=e.newContract),t},fromPartial:function(e){var t=Mt({},Wt);return void 0!==e.chainId&&null!==e.chainId?t.chainId=e.chainId:t.chainId=0,void 0!==e.newContract&&null!==e.newContract?t.newContract=e.newContract:t.newContract="",t}},Vt={module:"",targetChainId:0,newContract:""},qt={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),""!==e.module&&t.uint32(10).string(e.module),0!==e.targetChainId&&t.uint32(16).uint32(e.targetChainId),""!==e.newContract&&t.uint32(26).string(e.newContract),t},decode:function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},Vt);n.pos>>3){case 1:o.module=n.string();break;case 2:o.targetChainId=n.uint32();break;case 3:o.newContract=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Mt({},Vt);return void 0!==e.module&&null!==e.module?t.module=String(e.module):t.module="",void 0!==e.targetChainId&&null!==e.targetChainId?t.targetChainId=Number(e.targetChainId):t.targetChainId=0,void 0!==e.newContract&&null!==e.newContract?t.newContract=String(e.newContract):t.newContract="",t},toJSON:function(e){var t={};return void 0!==e.module&&(t.module=e.module),void 0!==e.targetChainId&&(t.targetChainId=e.targetChainId),void 0!==e.newContract&&(t.newContract=e.newContract),t},fromPartial:function(e){var t=Mt({},Vt);return void 0!==e.module&&null!==e.module?t.module=e.module:t.module="",void 0!==e.targetChainId&&null!==e.targetChainId?t.targetChainId=e.targetChainId:t.targetChainId=0,void 0!==e.newContract&&null!==e.newContract?t.newContract=e.newContract:t.newContract="",t}},Qt={emitterChain:0,emitterAddress:"",rpcBackfill:!1,backfillNodes:""},Jt=function(e,t){var n,a;void 0===t&&(t=Ye().Writer.create()),0!==e.emitterChain&&t.uint32(8).uint32(e.emitterChain),""!==e.emitterAddress&&t.uint32(18).string(e.emitterAddress),!0===e.rpcBackfill&&t.uint32(24).bool(e.rpcBackfill);try{for(var o=Pt(e.backfillNodes),r=o.next();!r.done;r=o.next()){var i=r.value;t.uint32(34).string(i)}}catch(s){n={error:s}}finally{try{r&&!r.done&&(a=o.return)&&a.call(o)}finally{if(n)throw n.error}}return t},Yt=function(e){var t,n,a=Mt({},Qt);if(a.backfillNodes=[],void 0!==e.emitterChain&&null!==e.emitterChain?a.emitterChain=e.emitterChain:a.emitterChain=0,void 0!==e.emitterAddress&&null!==e.emitterAddress?a.emitterAddress=e.emitterAddress:a.emitterAddress="",void 0!==e.rpcBackfill&&null!==e.rpcBackfill?a.rpcBackfill=e.rpcBackfill:a.rpcBackfill=!1,void 0!==e.backfillNodes&&null!==e.backfillNodes)try{for(var o=Pt(e.backfillNodes),r=o.next();!r.done;r=o.next()){var i=r.value;a.backfillNodes.push(i)}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},Xt={missingMessages:"",firstSequence:"0",lastSequence:"0"},$t=function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},Xt);for(o.missingMessages=[];n.pos>>3){case 1:o.missingMessages.push(n.string());break;case 2:o.firstSequence=Vn(n.uint64());break;case 3:o.lastSequence=Vn(n.uint64());break;default:n.skipType(7&r)}}return o},en={},tn=function(e,t){return void 0===t&&(t=Ye().Writer.create()),void 0!==e.observationRequest&&yt(e.observationRequest,t.uint32(10).fork()).ldelim(),t},nn=function(e){var t=Mt({},en);return void 0!==e.observationRequest&&null!==e.observationRequest?t.observationRequest=vt(e.observationRequest):t.observationRequest=void 0,t},an={},on=function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},an);n.pos>>3===1)o.response=n.string();else n.skipType(7&r)}return o},ln={},fn=function(e,t){return void 0===t&&(t=Ye().Writer.create()),t},pn=function(e){return Mt({},ln)},bn={response:""},mn=function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},bn);n.pos>>3===1)o.response=n.string();else n.skipType(7&r)}return o},hn={vaaId:""},gn=function(e,t){return void 0===t&&(t=Ye().Writer.create()),""!==e.vaaId&&t.uint32(10).string(e.vaaId),t},yn=function(e){var t=Mt({},hn);return void 0!==e.vaaId&&null!==e.vaaId?t.vaaId=e.vaaId:t.vaaId="",t},vn={response:""},wn=function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},vn);n.pos>>3===1)o.response=n.string();else n.skipType(7&r)}return o},kn={vaaId:""},An=function(e,t){return void 0===t&&(t=Ye().Writer.create()),""!==e.vaaId&&t.uint32(10).string(e.vaaId),t},xn=function(e){var t=Mt({},kn);return void 0!==e.vaaId&&null!==e.vaaId?t.vaaId=e.vaaId:t.vaaId="",t},In={response:""},Tn=function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},In);n.pos>>3===1)o.response=n.string();else n.skipType(7&r)}return o},Sn={vaaId:""},Cn=function(e,t){return void 0===t&&(t=Ye().Writer.create()),""!==e.vaaId&&t.uint32(10).string(e.vaaId),t},En=function(e){var t=Mt({},Sn);return void 0!==e.vaaId&&null!==e.vaaId?t.vaaId=e.vaaId:t.vaaId="",t},Rn={response:""},Mn=function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},Rn);n.pos>>3===1)o.response=n.string();else n.skipType(7&r)}return o},Pn={daysOld:"0",logOnly:!1},Un=function(e,t){return void 0===t&&(t=Ye().Writer.create()),"0"!==e.daysOld&&t.uint32(8).uint64(e.daysOld),!0===e.logOnly&&t.uint32(16).bool(e.logOnly),t},_n=function(e){var t=Mt({},Pn);return void 0!==e.daysOld&&null!==e.daysOld?t.daysOld=e.daysOld:t.daysOld="0",void 0!==e.logOnly&&null!==e.logOnly?t.logOnly=e.logOnly:t.logOnly=!1,t},Bn={response:""},Dn=function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Mt({},Bn);n.pos>>3===1)o.response=n.string();else n.skipType(7&r)}return o},Nn=(function(){function e(e){this.rpc=e,this.InjectGovernanceVAA=this.InjectGovernanceVAA.bind(this),this.FindMissingMessages=this.FindMissingMessages.bind(this),this.SendObservationRequest=this.SendObservationRequest.bind(this),this.ChainGovernorStatus=this.ChainGovernorStatus.bind(this),this.ChainGovernorReload=this.ChainGovernorReload.bind(this),this.ChainGovernorDropPendingVAA=this.ChainGovernorDropPendingVAA.bind(this),this.ChainGovernorReleasePendingVAA=this.ChainGovernorReleasePendingVAA.bind(this),this.ChainGovernorResetReleaseTimer=this.ChainGovernorResetReleaseTimer.bind(this),this.PurgePythNetVaas=this.PurgePythNetVaas.bind(this)}e.prototype.InjectGovernanceVAA=function(e,t){return this.rpc.unary(On,Bt(e),t)},e.prototype.FindMissingMessages=function(e,t){return this.rpc.unary(Fn,Yt(e),t)},e.prototype.SendObservationRequest=function(e,t){return this.rpc.unary(Ln,nn(e),t)},e.prototype.ChainGovernorStatus=function(e,t){return this.rpc.unary(jn,cn(e),t)},e.prototype.ChainGovernorReload=function(e,t){return this.rpc.unary(Hn,pn(e),t)},e.prototype.ChainGovernorDropPendingVAA=function(e,t){return this.rpc.unary(Gn,yn(e),t)},e.prototype.ChainGovernorReleasePendingVAA=function(e,t){return this.rpc.unary(zn,xn(e),t)},e.prototype.ChainGovernorResetReleaseTimer=function(e,t){return this.rpc.unary(Kn,En(e),t)},e.prototype.PurgePythNetVaas=function(e,t){return this.rpc.unary(Wn,_n(e),t)}}(),{serviceName:"node.v1.NodePrivilegedService"}),On={methodName:"InjectGovernanceVAA",service:Nn,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return _t(this).finish()}},responseType:{deserializeBinary:function(e){return Mt(Mt({},Ft(e)),{toObject:function(){return this}})}}},Fn={methodName:"FindMissingMessages",service:Nn,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return Jt(this).finish()}},responseType:{deserializeBinary:function(e){return Mt(Mt({},$t(e)),{toObject:function(){return this}})}}},Ln={methodName:"SendObservationRequest",service:Nn,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return tn(this).finish()}},responseType:{deserializeBinary:function(e){return Mt(Mt({},on(e)),{toObject:function(){return this}})}}},jn={methodName:"ChainGovernorStatus",service:Nn,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return sn(this).finish()}},responseType:{deserializeBinary:function(e){return Mt(Mt({},dn(e)),{toObject:function(){return this}})}}},Hn={methodName:"ChainGovernorReload",service:Nn,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return fn(this).finish()}},responseType:{deserializeBinary:function(e){return Mt(Mt({},mn(e)),{toObject:function(){return this}})}}},Gn={methodName:"ChainGovernorDropPendingVAA",service:Nn,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return gn(this).finish()}},responseType:{deserializeBinary:function(e){return Mt(Mt({},wn(e)),{toObject:function(){return this}})}}},zn={methodName:"ChainGovernorReleasePendingVAA",service:Nn,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return An(this).finish()}},responseType:{deserializeBinary:function(e){return Mt(Mt({},Tn(e)),{toObject:function(){return this}})}}},Kn={methodName:"ChainGovernorResetReleaseTimer",service:Nn,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return Cn(this).finish()}},responseType:{deserializeBinary:function(e){return Mt(Mt({},Mn(e)),{toObject:function(){return this}})}}},Wn={methodName:"PurgePythNetVaas",service:Nn,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return Un(this).finish()}},responseType:{deserializeBinary:function(e){return Mt(Mt({},Dn(e)),{toObject:function(){return this}})}}},Zn=(function(){function e(e,t){this.host=e,this.options=t}e.prototype.unary=function(e,t,n){var a,o=this,r=Mt(Mt({},t),e.requestType),i=n&&this.options.metadata?new Rt.BrowserHeaders(Mt(Mt({},null===(a=this.options)||void 0===a?void 0:a.metadata.headersMap),null===n||void 0===n?void 0:n.headersMap)):n||this.options.metadata;return new Promise((function(t,n){Et.grpc.unary(e,{request:r,host:o.host,metadata:i,transport:o.options.transport,debug:o.options.debug,onEnd:function(e){if(e.status===Et.grpc.Code.OK)t(e.message);else{var a=new Error(e.statusMessage);a.code=e.status,a.metadata=e.trailers,n(a)}}})}))}}(),function(){if("undefined"!==typeof Zn)return Zn;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}());Zn.atob;Zn.btoa;function Vn(e){return e.toString()}Ye().util.Long!==Qe&&(Ye().util.Long=Qe,Ye().configure());var qn,Qn=function(){return Qn=Object.assign||function(e){for(var t,n=1,a=arguments.length;n=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(e){e[e.CHAIN_ID_UNSPECIFIED=0]="CHAIN_ID_UNSPECIFIED",e[e.CHAIN_ID_SOLANA=1]="CHAIN_ID_SOLANA",e[e.CHAIN_ID_ETHEREUM=2]="CHAIN_ID_ETHEREUM",e[e.CHAIN_ID_TERRA=3]="CHAIN_ID_TERRA",e[e.CHAIN_ID_BSC=4]="CHAIN_ID_BSC",e[e.CHAIN_ID_POLYGON=5]="CHAIN_ID_POLYGON",e[e.CHAIN_ID_AVALANCHE=6]="CHAIN_ID_AVALANCHE",e[e.CHAIN_ID_OASIS=7]="CHAIN_ID_OASIS",e[e.CHAIN_ID_ALGORAND=8]="CHAIN_ID_ALGORAND",e[e.CHAIN_ID_AURORA=9]="CHAIN_ID_AURORA",e[e.CHAIN_ID_FANTOM=10]="CHAIN_ID_FANTOM",e[e.CHAIN_ID_KARURA=11]="CHAIN_ID_KARURA",e[e.CHAIN_ID_ACALA=12]="CHAIN_ID_ACALA",e[e.CHAIN_ID_KLAYTN=13]="CHAIN_ID_KLAYTN",e[e.CHAIN_ID_CELO=14]="CHAIN_ID_CELO",e[e.CHAIN_ID_NEAR=15]="CHAIN_ID_NEAR",e[e.CHAIN_ID_MOONBEAM=16]="CHAIN_ID_MOONBEAM",e[e.CHAIN_ID_NEON=17]="CHAIN_ID_NEON",e[e.CHAIN_ID_TERRA2=18]="CHAIN_ID_TERRA2",e[e.CHAIN_ID_INJECTIVE=19]="CHAIN_ID_INJECTIVE",e[e.CHAIN_ID_OSMOSIS=20]="CHAIN_ID_OSMOSIS",e[e.CHAIN_ID_SUI=21]="CHAIN_ID_SUI",e[e.CHAIN_ID_APTOS=22]="CHAIN_ID_APTOS",e[e.CHAIN_ID_ARBITRUM=23]="CHAIN_ID_ARBITRUM",e[e.CHAIN_ID_OPTIMISM=24]="CHAIN_ID_OPTIMISM",e[e.CHAIN_ID_GNOSIS=25]="CHAIN_ID_GNOSIS",e[e.CHAIN_ID_PYTHNET=26]="CHAIN_ID_PYTHNET",e[e.CHAIN_ID_XPLA=28]="CHAIN_ID_XPLA",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(qn||(qn={}));var Yn={emitterChain:0,emitterAddress:"",sequence:"0"},Xn=function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.emitterChain&&t.uint32(8).int32(e.emitterChain),""!==e.emitterAddress&&t.uint32(18).string(e.emitterAddress),"0"!==e.sequence&&t.uint32(24).uint64(e.sequence),t},$n=function(e){var t=Qn({},Yn);return void 0!==e.emitterChain&&null!==e.emitterChain?t.emitterChain=e.emitterChain:t.emitterChain=0,void 0!==e.emitterAddress&&null!==e.emitterAddress?t.emitterAddress=e.emitterAddress:t.emitterAddress="",void 0!==e.sequence&&null!==e.sequence?t.sequence=e.sequence:t.sequence="0",t},ea={emitterChain:0,nonce:0},ta=function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.emitterChain&&t.uint32(8).int32(e.emitterChain),0!==e.txId.length&&t.uint32(18).bytes(e.txId),0!==e.nonce&&t.uint32(24).uint32(e.nonce),t},na=function(e){var t=Qn({},ea);return void 0!==e.emitterChain&&null!==e.emitterChain?t.emitterChain=e.emitterChain:t.emitterChain=0,void 0!==e.txId&&null!==e.txId?t.txId=e.txId:t.txId=new Uint8Array,void 0!==e.nonce&&null!==e.nonce?t.nonce=e.nonce:t.nonce=0,t},aa={},oa=function(e,t){return void 0===t&&(t=Ye().Writer.create()),void 0!==e.messageId&&Xn(e.messageId,t.uint32(10).fork()).ldelim(),t},ra=function(e){var t=Qn({},aa);return void 0!==e.messageId&&null!==e.messageId?t.messageId=$n(e.messageId):t.messageId=void 0,t},ia={},sa=function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},ia);for(o.vaaBytes=new Uint8Array;n.pos>>3===1)o.vaaBytes=n.bytes();else n.skipType(7&r)}return o},ca={},ua=function(e,t){return void 0===t&&(t=Ye().Writer.create()),void 0!==e.batchId&&ta(e.batchId,t.uint32(10).fork()).ldelim(),t},da=function(e){var t=Qn({},ca);return void 0!==e.batchId&&null!==e.batchId?t.batchId=na(e.batchId):t.batchId=void 0,t},la={},fa=function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},la);n.pos>>3===1)o.signedBatchVaa=kt.decode(n,n.uint32());else n.skipType(7&r)}return o},pa={},ba=function(e,t){return void 0===t&&(t=Ye().Writer.create()),t},ma=function(e){return Qn({},pa)},ha={},ga=function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},ha);for(o.entries=[];n.pos>>3===1)o.entries.push(va.decode(n,n.uint32()));else n.skipType(7&r)}return o},ya={verifiedGuardianAddr:"",p2pNodeAddr:""},va={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),""!==e.verifiedGuardianAddr&&t.uint32(10).string(e.verifiedGuardianAddr),""!==e.p2pNodeAddr&&t.uint32(18).string(e.p2pNodeAddr),void 0!==e.rawHeartbeat&&ct(e.rawHeartbeat,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},ya);n.pos>>3){case 1:o.verifiedGuardianAddr=n.string();break;case 2:o.p2pNodeAddr=n.string();break;case 3:o.rawHeartbeat=ut(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Qn({},ya);return void 0!==e.verifiedGuardianAddr&&null!==e.verifiedGuardianAddr?t.verifiedGuardianAddr=String(e.verifiedGuardianAddr):t.verifiedGuardianAddr="",void 0!==e.p2pNodeAddr&&null!==e.p2pNodeAddr?t.p2pNodeAddr=String(e.p2pNodeAddr):t.p2pNodeAddr="",void 0!==e.rawHeartbeat&&null!==e.rawHeartbeat?t.rawHeartbeat=dt(e.rawHeartbeat):t.rawHeartbeat=void 0,t},toJSON:function(e){var t={};return void 0!==e.verifiedGuardianAddr&&(t.verifiedGuardianAddr=e.verifiedGuardianAddr),void 0!==e.p2pNodeAddr&&(t.p2pNodeAddr=e.p2pNodeAddr),void 0!==e.rawHeartbeat&&(t.rawHeartbeat=e.rawHeartbeat?lt(e.rawHeartbeat):void 0),t},fromPartial:function(e){var t=Qn({},ya);return void 0!==e.verifiedGuardianAddr&&null!==e.verifiedGuardianAddr?t.verifiedGuardianAddr=e.verifiedGuardianAddr:t.verifiedGuardianAddr="",void 0!==e.p2pNodeAddr&&null!==e.p2pNodeAddr?t.p2pNodeAddr=e.p2pNodeAddr:t.p2pNodeAddr="",void 0!==e.rawHeartbeat&&null!==e.rawHeartbeat?t.rawHeartbeat=ft(e.rawHeartbeat):t.rawHeartbeat=void 0,t}},wa={},ka=function(e,t){return void 0===t&&(t=Ye().Writer.create()),t},Aa=function(e){return Qn({},wa)},xa={},Ia=function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},xa);n.pos>>3===1)o.guardianSet=Sa.decode(n,n.uint32());else n.skipType(7&r)}return o},Ta={index:0,addresses:""},Sa={encode:function(e,t){var n,a;void 0===t&&(t=Ye().Writer.create()),0!==e.index&&t.uint32(8).uint32(e.index);try{for(var o=Jn(e.addresses),r=o.next();!r.done;r=o.next()){var i=r.value;t.uint32(18).string(i)}}catch(s){n={error:s}}finally{try{r&&!r.done&&(a=o.return)&&a.call(o)}finally{if(n)throw n.error}}return t},decode:function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},Ta);for(o.addresses=[];n.pos>>3){case 1:o.index=n.uint32();break;case 2:o.addresses.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t,n,a=Qn({},Ta);if(a.addresses=[],void 0!==e.index&&null!==e.index?a.index=Number(e.index):a.index=0,void 0!==e.addresses&&null!==e.addresses)try{for(var o=Jn(e.addresses),r=o.next();!r.done;r=o.next()){var i=r.value;a.addresses.push(String(i))}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},toJSON:function(e){var t={};return void 0!==e.index&&(t.index=e.index),e.addresses?t.addresses=e.addresses.map((function(e){return e})):t.addresses=[],t},fromPartial:function(e){var t,n,a=Qn({},Ta);if(a.addresses=[],void 0!==e.index&&null!==e.index?a.index=e.index:a.index=0,void 0!==e.addresses&&null!==e.addresses)try{for(var o=Jn(e.addresses),r=o.next();!r.done;r=o.next()){var i=r.value;a.addresses.push(i)}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a}},Ca={},Ea=function(e,t){return void 0===t&&(t=Ye().Writer.create()),t},Ra=function(e){return Qn({},Ca)},Ma={},Pa=function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},Ma);for(o.entries=[];n.pos>>3===1)o.entries.push(_a.decode(n,n.uint32()));else n.skipType(7&r)}return o},Ua={chainId:0,remainingAvailableNotional:"0",notionalLimit:"0",bigTransactionSize:"0"},_a={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.chainId&&t.uint32(8).uint32(e.chainId),"0"!==e.remainingAvailableNotional&&t.uint32(16).uint64(e.remainingAvailableNotional),"0"!==e.notionalLimit&&t.uint32(24).uint64(e.notionalLimit),"0"!==e.bigTransactionSize&&t.uint32(32).uint64(e.bigTransactionSize),t},decode:function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},Ua);n.pos>>3){case 1:o.chainId=n.uint32();break;case 2:o.remainingAvailableNotional=fo(n.uint64());break;case 3:o.notionalLimit=fo(n.uint64());break;case 4:o.bigTransactionSize=fo(n.uint64());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Qn({},Ua);return void 0!==e.chainId&&null!==e.chainId?t.chainId=Number(e.chainId):t.chainId=0,void 0!==e.remainingAvailableNotional&&null!==e.remainingAvailableNotional?t.remainingAvailableNotional=String(e.remainingAvailableNotional):t.remainingAvailableNotional="0",void 0!==e.notionalLimit&&null!==e.notionalLimit?t.notionalLimit=String(e.notionalLimit):t.notionalLimit="0",void 0!==e.bigTransactionSize&&null!==e.bigTransactionSize?t.bigTransactionSize=String(e.bigTransactionSize):t.bigTransactionSize="0",t},toJSON:function(e){var t={};return void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.remainingAvailableNotional&&(t.remainingAvailableNotional=e.remainingAvailableNotional),void 0!==e.notionalLimit&&(t.notionalLimit=e.notionalLimit),void 0!==e.bigTransactionSize&&(t.bigTransactionSize=e.bigTransactionSize),t},fromPartial:function(e){var t=Qn({},Ua);return void 0!==e.chainId&&null!==e.chainId?t.chainId=e.chainId:t.chainId=0,void 0!==e.remainingAvailableNotional&&null!==e.remainingAvailableNotional?t.remainingAvailableNotional=e.remainingAvailableNotional:t.remainingAvailableNotional="0",void 0!==e.notionalLimit&&null!==e.notionalLimit?t.notionalLimit=e.notionalLimit:t.notionalLimit="0",void 0!==e.bigTransactionSize&&null!==e.bigTransactionSize?t.bigTransactionSize=e.bigTransactionSize:t.bigTransactionSize="0",t}},Ba={},Da=function(e,t){return void 0===t&&(t=Ye().Writer.create()),t},Na=function(e){return Qn({},Ba)},Oa={},Fa=function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},Oa);for(o.entries=[];n.pos>>3===1)o.entries.push(ja.decode(n,n.uint32()));else n.skipType(7&r)}return o},La={emitterChain:0,emitterAddress:"",sequence:"0",releaseTime:0,notionalValue:"0",txHash:""},ja={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.emitterChain&&t.uint32(8).uint32(e.emitterChain),""!==e.emitterAddress&&t.uint32(18).string(e.emitterAddress),"0"!==e.sequence&&t.uint32(24).uint64(e.sequence),0!==e.releaseTime&&t.uint32(32).uint32(e.releaseTime),"0"!==e.notionalValue&&t.uint32(40).uint64(e.notionalValue),""!==e.txHash&&t.uint32(50).string(e.txHash),t},decode:function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},La);n.pos>>3){case 1:o.emitterChain=n.uint32();break;case 2:o.emitterAddress=n.string();break;case 3:o.sequence=fo(n.uint64());break;case 4:o.releaseTime=n.uint32();break;case 5:o.notionalValue=fo(n.uint64());break;case 6:o.txHash=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Qn({},La);return void 0!==e.emitterChain&&null!==e.emitterChain?t.emitterChain=Number(e.emitterChain):t.emitterChain=0,void 0!==e.emitterAddress&&null!==e.emitterAddress?t.emitterAddress=String(e.emitterAddress):t.emitterAddress="",void 0!==e.sequence&&null!==e.sequence?t.sequence=String(e.sequence):t.sequence="0",void 0!==e.releaseTime&&null!==e.releaseTime?t.releaseTime=Number(e.releaseTime):t.releaseTime=0,void 0!==e.notionalValue&&null!==e.notionalValue?t.notionalValue=String(e.notionalValue):t.notionalValue="0",void 0!==e.txHash&&null!==e.txHash?t.txHash=String(e.txHash):t.txHash="",t},toJSON:function(e){var t={};return void 0!==e.emitterChain&&(t.emitterChain=e.emitterChain),void 0!==e.emitterAddress&&(t.emitterAddress=e.emitterAddress),void 0!==e.sequence&&(t.sequence=e.sequence),void 0!==e.releaseTime&&(t.releaseTime=e.releaseTime),void 0!==e.notionalValue&&(t.notionalValue=e.notionalValue),void 0!==e.txHash&&(t.txHash=e.txHash),t},fromPartial:function(e){var t=Qn({},La);return void 0!==e.emitterChain&&null!==e.emitterChain?t.emitterChain=e.emitterChain:t.emitterChain=0,void 0!==e.emitterAddress&&null!==e.emitterAddress?t.emitterAddress=e.emitterAddress:t.emitterAddress="",void 0!==e.sequence&&null!==e.sequence?t.sequence=e.sequence:t.sequence="0",void 0!==e.releaseTime&&null!==e.releaseTime?t.releaseTime=e.releaseTime:t.releaseTime=0,void 0!==e.notionalValue&&null!==e.notionalValue?t.notionalValue=e.notionalValue:t.notionalValue="0",void 0!==e.txHash&&null!==e.txHash?t.txHash=e.txHash:t.txHash="",t}},Ha={},Ga=function(e,t){return void 0===t&&(t=Ye().Writer.create()),void 0!==e.messageId&&Xn(e.messageId,t.uint32(10).fork()).ldelim(),t},za=function(e){var t=Qn({},Ha);return void 0!==e.messageId&&null!==e.messageId?t.messageId=$n(e.messageId):t.messageId=void 0,t},Ka={isEnqueued:!1},Wa=function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},Ka);n.pos>>3===1)o.isEnqueued=n.bool();else n.skipType(7&r)}return o},Za={},Va=function(e,t){return void 0===t&&(t=Ye().Writer.create()),t},qa=function(e){return Qn({},Za)},Qa={},Ja=function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},Qa);for(o.entries=[];n.pos>>3===1)o.entries.push(Xa.decode(n,n.uint32()));else n.skipType(7&r)}return o},Ya={originChainId:0,originAddress:"",price:0},Xa={encode:function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.originChainId&&t.uint32(8).uint32(e.originChainId),""!==e.originAddress&&t.uint32(18).string(e.originAddress),0!==e.price&&t.uint32(29).float(e.price),t},decode:function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=Qn({},Ya);n.pos>>3){case 1:o.originChainId=n.uint32();break;case 2:o.originAddress=n.string();break;case 3:o.price=n.float();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Qn({},Ya);return void 0!==e.originChainId&&null!==e.originChainId?t.originChainId=Number(e.originChainId):t.originChainId=0,void 0!==e.originAddress&&null!==e.originAddress?t.originAddress=String(e.originAddress):t.originAddress="",void 0!==e.price&&null!==e.price?t.price=Number(e.price):t.price=0,t},toJSON:function(e){var t={};return void 0!==e.originChainId&&(t.originChainId=e.originChainId),void 0!==e.originAddress&&(t.originAddress=e.originAddress),void 0!==e.price&&(t.price=e.price),t},fromPartial:function(e){var t=Qn({},Ya);return void 0!==e.originChainId&&null!==e.originChainId?t.originChainId=e.originChainId:t.originChainId=0,void 0!==e.originAddress&&null!==e.originAddress?t.originAddress=e.originAddress:t.originAddress="",void 0!==e.price&&null!==e.price?t.price=e.price:t.price=0,t}},$a=function(){function e(e){this.rpc=e,this.GetLastHeartbeats=this.GetLastHeartbeats.bind(this),this.GetSignedVAA=this.GetSignedVAA.bind(this),this.GetSignedBatchVAA=this.GetSignedBatchVAA.bind(this),this.GetCurrentGuardianSet=this.GetCurrentGuardianSet.bind(this),this.GovernorGetAvailableNotionalByChain=this.GovernorGetAvailableNotionalByChain.bind(this),this.GovernorGetEnqueuedVAAs=this.GovernorGetEnqueuedVAAs.bind(this),this.GovernorIsVAAEnqueued=this.GovernorIsVAAEnqueued.bind(this),this.GovernorGetTokenList=this.GovernorGetTokenList.bind(this)}return e.prototype.GetLastHeartbeats=function(e,t){return this.rpc.unary(to,ma(e),t)},e.prototype.GetSignedVAA=function(e,t){return this.rpc.unary(no,ra(e),t)},e.prototype.GetSignedBatchVAA=function(e,t){return this.rpc.unary(ao,da(e),t)},e.prototype.GetCurrentGuardianSet=function(e,t){return this.rpc.unary(oo,Aa(e),t)},e.prototype.GovernorGetAvailableNotionalByChain=function(e,t){return this.rpc.unary(ro,Ra(e),t)},e.prototype.GovernorGetEnqueuedVAAs=function(e,t){return this.rpc.unary(io,Na(e),t)},e.prototype.GovernorIsVAAEnqueued=function(e,t){return this.rpc.unary(so,za(e),t)},e.prototype.GovernorGetTokenList=function(e,t){return this.rpc.unary(co,qa(e),t)},e}(),eo={serviceName:"publicrpc.v1.PublicRPCService"},to={methodName:"GetLastHeartbeats",service:eo,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return ba(this).finish()}},responseType:{deserializeBinary:function(e){return Qn(Qn({},ga(e)),{toObject:function(){return this}})}}},no={methodName:"GetSignedVAA",service:eo,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return oa(this).finish()}},responseType:{deserializeBinary:function(e){return Qn(Qn({},sa(e)),{toObject:function(){return this}})}}},ao={methodName:"GetSignedBatchVAA",service:eo,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return ua(this).finish()}},responseType:{deserializeBinary:function(e){return Qn(Qn({},fa(e)),{toObject:function(){return this}})}}},oo={methodName:"GetCurrentGuardianSet",service:eo,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return ka(this).finish()}},responseType:{deserializeBinary:function(e){return Qn(Qn({},Ia(e)),{toObject:function(){return this}})}}},ro={methodName:"GovernorGetAvailableNotionalByChain",service:eo,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return Ea(this).finish()}},responseType:{deserializeBinary:function(e){return Qn(Qn({},Pa(e)),{toObject:function(){return this}})}}},io={methodName:"GovernorGetEnqueuedVAAs",service:eo,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return Da(this).finish()}},responseType:{deserializeBinary:function(e){return Qn(Qn({},Fa(e)),{toObject:function(){return this}})}}},so={methodName:"GovernorIsVAAEnqueued",service:eo,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return Ga(this).finish()}},responseType:{deserializeBinary:function(e){return Qn(Qn({},Wa(e)),{toObject:function(){return this}})}}},co={methodName:"GovernorGetTokenList",service:eo,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return Va(this).finish()}},responseType:{deserializeBinary:function(e){return Qn(Qn({},Ja(e)),{toObject:function(){return this}})}}},uo=function(){function e(e,t){this.host=e,this.options=t}return e.prototype.unary=function(e,t,n){var a,o=this,r=Qn(Qn({},t),e.requestType),i=n&&this.options.metadata?new Rt.BrowserHeaders(Qn(Qn({},null===(a=this.options)||void 0===a?void 0:a.metadata.headersMap),null===n||void 0===n?void 0:n.headersMap)):n||this.options.metadata;return new Promise((function(t,n){Et.grpc.unary(e,{request:r,host:o.host,metadata:i,transport:o.options.transport,debug:o.options.debug,onEnd:function(e){if(e.status===Et.grpc.Code.OK)t(e.message);else{var a=new Error(e.statusMessage);a.code=e.status,a.metadata=e.trailers,n(a)}}})}))},e}(),lo=function(){if("undefined"!==typeof lo)return lo;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}();lo.atob;lo.btoa;function fo(e){return e.toString()}Ye().util.Long!==Qe&&(Ye().util.Long=Qe,Ye().configure());var po=n(41100);function bo(e){return"function"===typeof e}function mo(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var ho=mo((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function go(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var yo=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,a,o;if(!this.closed){this.closed=!0;var r=this._parentage;if(r)if(this._parentage=null,Array.isArray(r))try{for(var i=(0,po.__values)(r),s=i.next();!s.done;s=i.next()){s.value.remove(this)}}catch(p){e={error:p}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}else r.remove(this);var c=this.initialTeardown;if(bo(c))try{c()}catch(sK){o=sK instanceof ho?sK.errors:[sK]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=(0,po.__values)(u),l=d.next();!l.done;l=d.next()){var f=l.value;try{ko(f)}catch(b){o=null!==o&&void 0!==o?o:[],b instanceof ho?o=(0,po.__spreadArray)((0,po.__spreadArray)([],(0,po.__read)(o)),(0,po.__read)(b.errors)):o.push(b)}}}catch(m){n={error:m}}finally{try{l&&!l.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}}if(o)throw new ho(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)ko(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&go(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&go(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),vo=yo.EMPTY;function wo(e){return e instanceof yo||e&&"closed"in e&&bo(e.remove)&&bo(e.add)&&bo(e.unsubscribe)}function ko(e){bo(e)?e():e.unsubscribe()}var Ao={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},xo={setTimeout:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){for(var n=[],a=2;a0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,a=n.hasError,o=n.isStopped,r=n.observers;return a||o?vo:(this.currentObservers=null,r.push(e),new yo((function(){t.currentObservers=null,go(r,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,a=t.thrownError,o=t.isStopped;n?e.error(a):o&&e.complete()},t.prototype.asObservable=function(){var e=new Ho;return e.source=this,e},t.create=function(e,t){return new Qo(e,t)},t}(Ho),Qo=function(e){function t(t,n){var a=e.call(this)||this;return a.destination=t,a.source=n,a}return(0,po.__extends)(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:vo},t}(qo);function Jo(e){return function(t){if(function(e){return bo(null===e||void 0===e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(n){this.error(n)}}));throw new TypeError("Unable to lift unknown Observable type")}}function Yo(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new qo}:t,a=e.resetOnError,o=void 0===a||a,r=e.resetOnComplete,i=void 0===r||r,s=e.resetOnRefCountZero,c=void 0===s||s;return function(e){var t,a,r,s=0,u=!1,d=!1,l=function(){null===a||void 0===a||a.unsubscribe(),a=void 0},f=function(){l(),t=r=void 0,u=d=!1},p=function(){var e=t;f(),null===e||void 0===e||e.unsubscribe()};return Jo((function(e,b){s++,d||u||l();var m=r=null!==r&&void 0!==r?r:n();b.add((function(){0!==--s||d||u||(a=Xo(p,c))})),m.subscribe(b),!t&&s>0&&(t=new Bo({next:function(e){return m.next(e)},error:function(e){d=!0,l(),a=Xo(f,o,e),m.error(e)},complete:function(){u=!0,l(),a=Xo(f,i),m.complete()}}),Wo(e).subscribe(t))}))(e)}}function Xo(e,t){for(var n=[],a=2;a=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},tr={chainId:0,emitterAddress:""},nr=function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.chainId&&t.uint32(8).int32(e.chainId),""!==e.emitterAddress&&t.uint32(18).string(e.emitterAddress),t},ar=function(e){var t=$o({},tr);return void 0!==e.chainId&&null!==e.chainId?t.chainId=e.chainId:t.chainId=0,void 0!==e.emitterAddress&&null!==e.emitterAddress?t.emitterAddress=e.emitterAddress:t.emitterAddress="",t},or={chainId:0,nonce:0},rr=function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.chainId&&t.uint32(8).int32(e.chainId),0!==e.txId.length&&t.uint32(18).bytes(e.txId),0!==e.nonce&&t.uint32(24).uint32(e.nonce),t},ir=function(e){var t=$o({},or);return void 0!==e.chainId&&null!==e.chainId?t.chainId=e.chainId:t.chainId=0,void 0!==e.txId&&null!==e.txId?t.txId=e.txId:t.txId=new Uint8Array,void 0!==e.nonce&&null!==e.nonce?t.nonce=e.nonce:t.nonce=0,t},sr={chainId:0},cr=function(e,t){return void 0===t&&(t=Ye().Writer.create()),0!==e.chainId&&t.uint32(8).int32(e.chainId),0!==e.txId.length&&t.uint32(18).bytes(e.txId),t},ur=function(e){var t=$o({},sr);return void 0!==e.chainId&&null!==e.chainId?t.chainId=e.chainId:t.chainId=0,void 0!==e.txId&&null!==e.txId?t.txId=e.txId:t.txId=new Uint8Array,t},dr={},lr=function(e,t){return void 0===t&&(t=Ye().Writer.create()),void 0!==e.emitterFilter&&nr(e.emitterFilter,t.uint32(10).fork()).ldelim(),void 0!==e.batchFilter&&rr(e.batchFilter,t.uint32(18).fork()).ldelim(),void 0!==e.batchTransactionFilter&&cr(e.batchTransactionFilter,t.uint32(26).fork()).ldelim(),t},fr=function(e){var t=$o({},dr);return void 0!==e.emitterFilter&&null!==e.emitterFilter?t.emitterFilter=ar(e.emitterFilter):t.emitterFilter=void 0,void 0!==e.batchFilter&&null!==e.batchFilter?t.batchFilter=ir(e.batchFilter):t.batchFilter=void 0,void 0!==e.batchTransactionFilter&&null!==e.batchTransactionFilter?t.batchTransactionFilter=ur(e.batchTransactionFilter):t.batchTransactionFilter=void 0,t},pr={},br=function(e,t){var n,a;void 0===t&&(t=Ye().Writer.create());try{for(var o=er(e.filters),r=o.next();!r.done;r=o.next()){var i=r.value;lr(i,t.uint32(10).fork()).ldelim()}}catch(s){n={error:s}}finally{try{r&&!r.done&&(a=o.return)&&a.call(o)}finally{if(n)throw n.error}}return t},mr=function(e){var t,n,a=$o({},pr);if(a.filters=[],void 0!==e.filters&&null!==e.filters)try{for(var o=er(e.filters),r=o.next();!r.done;r=o.next()){var i=r.value;a.filters.push(fr(i))}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},hr={},gr=function(e,t){var n,a;void 0===t&&(t=Ye().Writer.create());try{for(var o=er(e.filters),r=o.next();!r.done;r=o.next()){var i=r.value;lr(i,t.uint32(10).fork()).ldelim()}}catch(s){n={error:s}}finally{try{r&&!r.done&&(a=o.return)&&a.call(o)}finally{if(n)throw n.error}}return t},yr=function(e){var t,n,a=$o({},hr);if(a.filters=[],void 0!==e.filters&&null!==e.filters)try{for(var o=er(e.filters),r=o.next();!r.done;r=o.next()){var i=r.value;a.filters.push(fr(i))}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},vr={},wr=function(e,t){var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=$o({},vr);for(o.vaaBytes=new Uint8Array;n.pos>>3===1)o.vaaBytes=n.bytes();else n.skipType(7&r)}return o},kr={},Ar=function(e,t){for(var n=e instanceof Ye().Reader?e:new(Ye().Reader)(e),a=void 0===t?n.len:n.pos+t,o=$o({},kr);n.pos>>3){case 1:o.signedVaa=ht.decode(n,n.uint32());break;case 2:o.signedBatchVaa=kt.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},xr=(function(){function e(e){this.rpc=e,this.SubscribeSignedVAA=this.SubscribeSignedVAA.bind(this),this.SubscribeSignedVAAByType=this.SubscribeSignedVAAByType.bind(this)}e.prototype.SubscribeSignedVAA=function(e,t){return this.rpc.invoke(Ir,mr(e),t)},e.prototype.SubscribeSignedVAAByType=function(e,t){return this.rpc.invoke(Tr,yr(e),t)}}(),{serviceName:"spy.v1.SpyRPCService"}),Ir={methodName:"SubscribeSignedVAA",service:xr,requestStream:!1,responseStream:!0,requestType:{serializeBinary:function(){return br(this).finish()}},responseType:{deserializeBinary:function(e){return $o($o({},wr(e)),{toObject:function(){return this}})}}},Tr={methodName:"SubscribeSignedVAAByType",service:xr,requestStream:!1,responseStream:!0,requestType:{serializeBinary:function(){return gr(this).finish()}},responseType:{deserializeBinary:function(e){return $o($o({},Ar(e)),{toObject:function(){return this}})}}},Sr=(function(){function e(e,t){this.host=e,this.options=t}e.prototype.unary=function(e,t,n){var a,o=this,r=$o($o({},t),e.requestType),i=n&&this.options.metadata?new Rt.BrowserHeaders($o($o({},null===(a=this.options)||void 0===a?void 0:a.metadata.headersMap),null===n||void 0===n?void 0:n.headersMap)):n||this.options.metadata;return new Promise((function(t,n){Et.grpc.unary(e,{request:r,host:o.host,metadata:i,transport:o.options.transport,debug:o.options.debug,onEnd:function(e){if(e.status===Et.grpc.Code.OK)t(e.message);else{var a=new Error(e.statusMessage);a.code=e.status,a.metadata=e.trailers,n(a)}}})}))},e.prototype.invoke=function(e,t,n){var a,o=this,r=[2,4,8,9,10,13,14,15],i=$o($o({},t),e.requestType),s=n&&this.options.metadata?new Rt.BrowserHeaders($o($o({},null===(a=this.options)||void 0===a?void 0:a.metadata.headersMap),null===n||void 0===n?void 0:n.headersMap)):n||this.options.metadata;return new Ho((function(t){!function n(){var a=Et.grpc.invoke(e,{host:o.host,request:i,transport:o.options.streamingTransport||o.options.transport,metadata:s,debug:o.options.debug,onMessage:function(e){return t.next(e)},onEnd:function(e,a){0===e?t.complete():r.includes(e)?setTimeout(n,3e3):t.error(new Error("Error ".concat(e," ").concat(a)))}});t.add((function(){return a.close()}))}()})).pipe(Yo())}}(),function(){if("undefined"!==typeof Sr)return Sr;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}());Sr.atob;Sr.btoa;Ye().util.Long!==Qe&&(Ye().util.Long=Qe,Ye().configure());var Cr=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},Er=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]1?t-1:0),a=1;a0&&!n.includes(e.length))throw new TypeError("Expected Uint8Array of length ".concat(n,", not of length=").concat(e.length))}var ni={number:ei,bool:function(e){if("boolean"!==typeof e)throw new Error("Expected boolean, not ".concat(e))},bytes:ti,hash:function(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");ei(e.outputLen),ei(e.blockLen)},exists:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},output:function(e,t){ti(e);var n=t.outputLen;if(e.length1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&oi),l:Number(e>>ri&oi)}:{h:0|Number(e>>ri&oi),l:0|Number(e&oi)}}for(var si={fromBig:ii,split:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Uint32Array(e.length),a=new Uint32Array(e.length),o=0;o>>0)<>>0)},shrSH:function(e,t,n){return e>>>n},shrSL:function(e,t,n){return e<<32-n|t>>>n},rotrSH:function(e,t,n){return e>>>n|t<<32-n},rotrSL:function(e,t,n){return e<<32-n|t>>>n},rotrBH:function(e,t,n){return e<<64-n|t>>>n-32},rotrBL:function(e,t,n){return e>>>n-32|t<<64-n},rotr32H:function(e,t){return t},rotr32L:function(e,t){return e},rotlSH:function(e,t,n){return e<>>32-n},rotlSL:function(e,t,n){return t<>>32-n},rotlBH:function(e,t,n){return t<>>64-n},rotlBL:function(e,t,n){return e<>>64-n},add:function(e,t,n,a){var o=(t>>>0)+(a>>>0);return{h:e+n+(o/Math.pow(2,32)|0)|0,l:0|o}},add3L:function(e,t,n){return(e>>>0)+(t>>>0)+(n>>>0)},add3H:function(e,t,n,a){return t+n+a+(e/Math.pow(2,32)|0)|0},add4L:function(e,t,n,a){return(e>>>0)+(t>>>0)+(n>>>0)+(a>>>0)},add4H:function(e,t,n,a,o){return t+n+a+o+(e/Math.pow(2,32)|0)|0},add5H:function(e,t,n,a,o,r){return t+n+a+o+r+(e/Math.pow(2,32)|0)|0},add5L:function(e,t,n,a,o){return(e>>>0)+(t>>>0)+(n>>>0)+(a>>>0)+(o>>>0)}},ci=si,ui=[],di=[],li=[],fi=BigInt(0),pi=BigInt(1),bi=BigInt(2),mi=BigInt(7),hi=BigInt(256),gi=BigInt(113),yi=0,vi=pi,wi=1,ki=0;yi<24;yi++){var Ai=[ki,(2*wi+3*ki)%5];wi=Ai[0],ki=Ai[1],ui.push(2*(5*ki+wi)),di.push((yi+1)*(yi+2)/2%64);for(var xi=fi,Ii=0;Ii<7;Ii++)(vi=(vi<>mi)*gi)%hi)&bi&&(xi^=pi<<(pi<32?ci.rotlBH(e,t,n):ci.rotlSH(e,t,n)},Mi=function(e,t,n){return n>32?ci.rotlBL(e,t,n):ci.rotlSL(e,t,n)};var Pi=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(e,a,o){var r,i,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if((0,Gr.Z)(this,n),(r=t.call(this)).blockLen=e,r.suffix=a,r.outputLen=o,r.enableXOF=s,r.rounds=c,r.pos=0,r.posOut=0,r.finished=!1,r.destroyed=!1,ai.number(o),0>=r.blockLen||r.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");return r.state=new Uint8Array(200),r.state32=(i=r.state,new Uint32Array(i.buffer,i.byteOffset,Math.floor(i.byteLength/4))),r}return(0,zr.Z)(n,[{key:"keccak",value:function(){!function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=new Uint32Array(10),a=24-t;a<24;a++){for(var o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(var r=0;r<10;r+=2)for(var i=(r+8)%10,s=(r+2)%10,c=n[s],u=n[s+1],d=Ri(c,u,1)^n[i],l=Mi(c,u,1)^n[i+1],f=0;f<50;f+=10)e[r+f]^=d,e[r+f+1]^=l;for(var p=e[2],b=e[3],m=0;m<24;m++){var h=di[m],g=Ri(p,b,h),y=Mi(p,b,h),v=ui[m];p=e[v],b=e[v+1],e[v]=g,e[v+1]=y}for(var w=0;w<50;w+=10){for(var k=0;k<10;k++)n[k]=e[w+k];for(var A=0;A<10;A++)e[w+A]^=~n[(A+2)%10]&n[(A+4)%10]}e[0]^=Ci[a],e[1]^=Ei[a]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}},{key:"update",value:function(e){ai.exists(this);for(var t=this.blockLen,n=this.state,a=(e=Yr(e)).length,o=0;o=n&&this.keccak();var r=Math.min(n-this.posOut,o-a);e.set(t.subarray(this.posOut,this.posOut+r),a),this.posOut+=r,a+=r}return e}},{key:"xofInto",value:function(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}},{key:"xof",value:function(e){return ai.number(e),this.xofInto(new Uint8Array(e))}},{key:"digestInto",value:function(e){if(ai.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}},{key:"digest",value:function(){return this.digestInto(new Uint8Array(this.outputLen))}},{key:"destroy",value:function(){this.destroyed=!0,this.state.fill(0)}},{key:"_cloneInto",value:function(e){var t=this.blockLen,a=this.suffix,o=this.outputLen,r=this.rounds,i=this.enableXOF;return e||(e=new n(t,a,o,i,r)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=r,e.suffix=a,e.outputLen=o,e.enableXOF=i,e.destroyed=this.destroyed,e}}]),n}(Xr),Ui=function(e,t,n){return $r((function(){return new Pi(t,e,n)}))},_i=(Ui(6,144,28),Ui(6,136,32)),Bi=(Ui(6,104,48),Ui(6,72,64),Ui(1,144,28),Ui(1,136,32),Ui(1,104,48),Ui(1,72,64),function(e,t,n){return function(e){var t=function(t,n){return e(n).update(Yr(t)).digest()},n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=function(t){return e(t)},t}((function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Pi(t,e,void 0===a.dkLen?n:a.dkLen,!0)}))}),Di=(Bi(31,168,16),Bi(31,136,32),function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(e,a){var o;(0,Gr.Z)(this,n),(o=t.call(this)).finished=!1,o.destroyed=!1,ai.hash(e);var r=Yr(a);if(o.iHash=e.create(),"function"!==typeof o.iHash.update)throw new TypeError("Expected instance of class which extends utils.Hash");o.blockLen=o.iHash.blockLen,o.outputLen=o.iHash.outputLen;var i=o.blockLen,s=new Uint8Array(i);s.set(r.length>i?e.create().update(r).digest():r);for(var c=0;ca-r&&(this.process(n,0),r=0);for(var i=r;i>o&r),s=Number(n&r),c=a?4:0,u=a?0:4;e.setUint32(t+c,i,a),e.setUint32(t+u,s,a)}(n,a-8,BigInt(8*this.length),o),this.process(n,0);var s=Vr(e);this.get().forEach((function(e,t){return s.setUint32(4*t,e,o)}))}},{key:"digest",value:function(){var e=this.buffer,t=this.outputLen;this.digestInto(e);var n=e.slice(0,t);return this.destroy(),n}},{key:"_cloneInto",value:function(e){var t;e||(e=new this.constructor),(t=e).set.apply(t,(0,Kr.Z)(this.get()));var n=this.blockLen,a=this.buffer,o=this.length,r=this.finished,i=this.destroyed,s=this.pos;return e.length=o,e.pos=s,e.finished=r,e.destroyed=i,o%n&&e.buffer.set(a),e}}]),n}(Xr),Fi=ci.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((function(e){return BigInt(e)}))),Li=(0,Nr.Z)(Fi,2),ji=Li[0],Hi=Li[1],Gi=new Uint32Array(80),zi=new Uint32Array(80),Ki=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(){var e;return(0,Gr.Z)(this,n),(e=t.call(this,128,64,16,!1)).Ah=1779033703,e.Al=-205731576,e.Bh=-1150833019,e.Bl=-2067093701,e.Ch=1013904242,e.Cl=-23791573,e.Dh=-1521486534,e.Dl=1595750129,e.Eh=1359893119,e.El=-1377402159,e.Fh=-1694144372,e.Fl=725511199,e.Gh=528734635,e.Gl=-79577749,e.Hh=1541459225,e.Hl=327033209,e}return(0,zr.Z)(n,[{key:"get",value:function(){return[this.Ah,this.Al,this.Bh,this.Bl,this.Ch,this.Cl,this.Dh,this.Dl,this.Eh,this.El,this.Fh,this.Fl,this.Gh,this.Gl,this.Hh,this.Hl]}},{key:"set",value:function(e,t,n,a,o,r,i,s,c,u,d,l,f,p,b,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|a,this.Ch=0|o,this.Cl=0|r,this.Dh=0|i,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|d,this.Fl=0|l,this.Gh=0|f,this.Gl=0|p,this.Hh=0|b,this.Hl=0|m}},{key:"process",value:function(e,t){for(var n=0;n<16;n++,t+=4)Gi[n]=e.getUint32(t),zi[n]=e.getUint32(t+=4);for(var a=16;a<80;a++){var o=0|Gi[a-15],r=0|zi[a-15],i=ci.rotrSH(o,r,1)^ci.rotrSH(o,r,8)^ci.shrSH(o,r,7),s=ci.rotrSL(o,r,1)^ci.rotrSL(o,r,8)^ci.shrSL(o,r,7),c=0|Gi[a-2],u=0|zi[a-2],d=ci.rotrSH(c,u,19)^ci.rotrBH(c,u,61)^ci.shrSH(c,u,6),l=ci.rotrSL(c,u,19)^ci.rotrBL(c,u,61)^ci.shrSL(c,u,6),f=ci.add4L(s,l,zi[a-7],zi[a-16]),p=ci.add4H(f,i,d,Gi[a-7],Gi[a-16]);Gi[a]=0|p,zi[a]=0|f}for(var b=this.Ah,m=this.Al,h=this.Bh,g=this.Bl,y=this.Ch,v=this.Cl,w=this.Dh,k=this.Dl,A=this.Eh,x=this.El,I=this.Fh,T=this.Fl,S=this.Gh,C=this.Gl,E=this.Hh,R=this.Hl,M=0;M<80;M++){var P=ci.rotrSH(A,x,14)^ci.rotrSH(A,x,18)^ci.rotrBH(A,x,41),U=ci.rotrSL(A,x,14)^ci.rotrSL(A,x,18)^ci.rotrBL(A,x,41),_=A&I^~A&S,B=x&T^~x&C,D=ci.add5L(R,U,B,Hi[M],zi[M]),N=ci.add5H(D,E,P,_,ji[M],Gi[M]),O=0|D,F=ci.rotrSH(b,m,28)^ci.rotrBH(b,m,34)^ci.rotrBH(b,m,39),L=ci.rotrSL(b,m,28)^ci.rotrBL(b,m,34)^ci.rotrBL(b,m,39),j=b&h^b&y^h&y,H=m&g^m&v^g&v;E=0|S,R=0|C,S=0|I,C=0|T,I=0|A,T=0|x;var G=ci.add(0|w,0|k,0|N,0|O);A=G.h,x=G.l,w=0|y,k=0|v,y=0|h,v=0|g,h=0|b,g=0|m;var z=ci.add3L(O,L,H);b=ci.add3H(z,N,F,j),m=0|z}var K=ci.add(0|this.Ah,0|this.Al,0|b,0|m);b=K.h,m=K.l;var W=ci.add(0|this.Bh,0|this.Bl,0|h,0|g);h=W.h,g=W.l;var Z=ci.add(0|this.Ch,0|this.Cl,0|y,0|v);y=Z.h,v=Z.l;var V=ci.add(0|this.Dh,0|this.Dl,0|w,0|k);w=V.h,k=V.l;var q=ci.add(0|this.Eh,0|this.El,0|A,0|x);A=q.h,x=q.l;var Q=ci.add(0|this.Fh,0|this.Fl,0|I,0|T);I=Q.h,T=Q.l;var J=ci.add(0|this.Gh,0|this.Gl,0|S,0|C);S=J.h,C=J.l;var Y=ci.add(0|this.Hh,0|this.Hl,0|E,0|R);E=Y.h,R=Y.l,this.set(b,m,h,g,y,v,w,k,A,x,I,T,S,C,E,R)}},{key:"roundClean",value:function(){Gi.fill(0),zi.fill(0)}},{key:"destroy",value:function(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}]),n}(Oi),Wi=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(){var e;return(0,Gr.Z)(this,n),(e=t.call(this)).Ah=573645204,e.Al=-64227540,e.Bh=-1621794909,e.Bl=-934517566,e.Ch=596883563,e.Cl=1867755857,e.Dh=-1774684391,e.Dl=1497426621,e.Eh=-1775747358,e.El=-1467023389,e.Fh=-1101128155,e.Fl=1401305490,e.Gh=721525244,e.Gl=746961066,e.Hh=246885852,e.Hl=-2117784414,e.outputLen=32,e}return(0,zr.Z)(n)}(Ki),Zi=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(){var e;return(0,Gr.Z)(this,n),(e=t.call(this)).Ah=-876896931,e.Al=-1056596264,e.Bh=1654270250,e.Bl=914150663,e.Ch=-1856437926,e.Cl=812702999,e.Dh=355462360,e.Dl=-150054599,e.Eh=1731405415,e.El=-4191439,e.Fh=-1900787065,e.Fl=1750603025,e.Gh=-619958771,e.Gl=1694076839,e.Hh=1203062813,e.Hl=-1090891868,e.outputLen=48,e}return(0,zr.Z)(n)}(Ki),Vi=$r((function(){return new Ki})),qi=($r((function(){return new Wi})),$r((function(){return new Zi})),n(41786)),Qi=n(84032),Ji=n(65218),Yi=["sender"],Xi=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,es=function(e,t){for(var n in t)Xi(e,n,{get:t[n],enumerable:!0})},ts=function(e,t,n,a){for(var o,r=a>1?void 0:a?$i(t,n):t,i=e.length-1;i>=0;i--)(o=e[i])&&(r=(a?o(t,n,r):o(r))||r);return a&&r&&Xi(t,n,r),r},ns=/^m(\/[0-9]+')+$/,as=function(e){return e.replace("'","")},os=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2147483648;if(!function(e){return!!ns.test(e)&&!e.split("/").slice(1).map(as).some(Number.isNaN)}(e))throw new Error("Invalid derivation path");var a=function(e){var t=Ni.create(Vi,"ed25519 seed").update(Jr(e)).digest();return{key:t.slice(0,32),chainCode:t.slice(32)}}(t),o=a.key,r=a.chainCode;return e.split("/").slice(1).map(as).map((function(e){return parseInt(e,10)})).reduce((function(e,t){return function(e,t){var n=e.key,a=e.chainCode,o=new ArrayBuffer(4);new DataView(o).setUint32(0,t);var r=new Uint8Array(o),i=new Uint8Array([0]),s=new Uint8Array([].concat((0,Kr.Z)(i),(0,Kr.Z)(n),(0,Kr.Z)(r))),c=Ni.create(Vi,a).update(s).digest();return{key:c.slice(0,32),chainCode:c.slice(32)}}(e,t+n)}),{key:o,chainCode:r})},rs=function(){function e(t){(0,Gr.Z)(this,e),t.startsWith("0x")?this.hexString=t:this.hexString="0x".concat(t)}return(0,zr.Z)(e,[{key:"hex",value:function(){return this.hexString}},{key:"noPrefix",value:function(){return this.hexString.slice(2)}},{key:"toString",value:function(){return this.hex()}},{key:"toShortString",value:function(){var e=this.hexString.replace(/^0x0*/,"");return"0x".concat(e)}},{key:"toUint8Array",value:function(){return Uint8Array.from(Jr(this.noPrefix()))}}],[{key:"fromBuffer",value:function(t){return e.fromUint8Array(t)}},{key:"fromUint8Array",value:function(t){return new e(Qr(t))}},{key:"ensure",value:function(t){return"string"===typeof t?new e(t):t}}]),e}();function is(e){return ss.apply(this,arguments)}function ss(){return(ss=(0,Hr.Z)((0,Dr.Z)().mark((function e(t){return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){setTimeout(e,t)})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var cs="/v1";var us=2e5,ds="0x1::aptos_coin::AptosCoin";function ls(e){var t,n,a;return"object"===typeof e?(t=e.hashFunction,n=e.ttlMs,a=e.tags):t=e,function(e,o,r){if(null!=r.value)r.value=ps(r.value,t,n,a);else{if(null==r.get)throw new Error("Only put a Memoize() decorator on a method or get accessor.");r.get=ps(r.get,t,n,a)}}}var fs=new Map;function ps(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3?arguments[3]:void 0,o=Symbol("__memoized_map__");return function(){var r,i=this;i.hasOwnProperty(o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!1,writable:!1,value:new Map});var s=i[o];if(Array.isArray(a)){var c,u=(0,jr.Z)(a);try{for(u.s();!(c=u.n()).done;){var d=c.value;fs.has(d)?fs.get(d).push(s):fs.set(d,[s])}}catch(v){u.e(v)}finally{u.f()}}for(var l=arguments.length,f=new Array(l),p=0;p0||n>0){var b;b=!0===t?f.map((function(e){return e.toString()})).join("!"):t?t.apply(i,f):f[0];var m="".concat(b,"__timestamp"),h=!1;if(n>0)if(s.has(m)){var g=s.get(m);h=Date.now()-g>n}else h=!0;s.has(b)&&!h?r=s.get(b):(r=e.apply(i,f),s.set(b,r),n>0&&s.set(m,Date.now()))}else{var y=i;s.has(y)?r=s.get(y):(r=e.apply(i,f),s.set(y,r))}return r}}function bs(e,t,n,a){return ms.apply(this,arguments)}function ms(){return(ms=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o){var r,i,s,c;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=[];case 1:return e.next=4,t(rs.ensure(n).hex(),null==(r=null==o?void 0:o.ledgerVersion)?void 0:r.toString(),s,a);case 4:if(c=e.sent,s=c.__headers["x-aptos-cursor"],delete c.__headers,i.push.apply(i,(0,Kr.Z)(c)),null!==s&&void 0!==s){e.next=10;break}return e.abrupt("break",12);case 10:e.next=1;break;case 12:return e.abrupt("return",i);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var hs={};es(hs,{AccountAddress:function(){return Hs},AccountAuthenticator:function(){return Ys},AccountAuthenticatorEd25519:function(){return Xs},AccountAuthenticatorMultiEd25519:function(){return $s},ArgumentABI:function(){return Hc},AuthenticationKey:function(){return Zc},ChainId:function(){return Cc},ChangeSet:function(){return vc},Ed25519PublicKey:function(){return Gs},Ed25519Signature:function(){return zs},EntryFunction:function(){return hc},EntryFunctionABI:function(){return Kc},Identifier:function(){return ec},Module:function(){return gc},ModuleId:function(){return yc},MultiAgentRawTransaction:function(){return xc},MultiEd25519PublicKey:function(){return Ks},MultiEd25519Signature:function(){return Zs},RawTransaction:function(){return bc},RawTransactionWithData:function(){return Ac},RotationProofChallenge:function(){return Vc},Script:function(){return mc},ScriptABI:function(){return Gc},SignedTransaction:function(){return kc},StructTag:function(){return pc},Transaction:function(){return Fc},TransactionArgument:function(){return Ec},TransactionArgumentAddress:function(){return Dc},TransactionArgumentBool:function(){return Oc},TransactionArgumentU128:function(){return _c},TransactionArgumentU16:function(){return Mc},TransactionArgumentU256:function(){return Bc},TransactionArgumentU32:function(){return Pc},TransactionArgumentU64:function(){return Uc},TransactionArgumentU8:function(){return Rc},TransactionArgumentU8Vector:function(){return Nc},TransactionAuthenticator:function(){return Vs},TransactionAuthenticatorEd25519:function(){return qs},TransactionAuthenticatorMultiAgent:function(){return Js},TransactionAuthenticatorMultiEd25519:function(){return Qs},TransactionPayload:function(){return Ic},TransactionPayloadEntryFunction:function(){return Sc},TransactionPayloadScript:function(){return Tc},TransactionScriptABI:function(){return zc},TypeArgumentABI:function(){return jc},TypeTag:function(){return tc},TypeTagAddress:function(){return uc},TypeTagBool:function(){return nc},TypeTagSigner:function(){return dc},TypeTagStruct:function(){return fc},TypeTagU128:function(){return sc},TypeTagU16:function(){return oc},TypeTagU256:function(){return cc},TypeTagU32:function(){return rc},TypeTagU64:function(){return ic},TypeTagU8:function(){return ac},TypeTagVector:function(){return lc},UserTransaction:function(){return Lc},WriteSet:function(){return wc}});var gs={};es(gs,{Deserializer:function(){return Ss},Serializer:function(){return Is},bcsSerializeBool:function(){return Ns},bcsSerializeBytes:function(){return Fs},bcsSerializeFixedBytes:function(){return Ls},bcsSerializeStr:function(){return Os},bcsSerializeU128:function(){return Ds},bcsSerializeU16:function(){return _s},bcsSerializeU32:function(){return Bs},bcsSerializeU8:function(){return Us},bcsSerializeUint64:function(){return Ps},bcsToBytes:function(){return Ms},deserializeVector:function(){return Rs},serializeVector:function(){return Cs},serializeVectorWithFunc:function(){return Es}});var ys=Math.pow(2,8)-1,vs=Math.pow(2,16)-1,ws=Math.pow(2,32)-1,ks=BigInt(Math.pow(2,64))-BigInt(1),As=BigInt(Math.pow(2,128))-BigInt(1),xs=BigInt(Math.pow(2,256))-BigInt(1),Is=function(){function e(){(0,Gr.Z)(this,e),this.buffer=new ArrayBuffer(64),this.offset=0}return(0,zr.Z)(e,[{key:"ensureBufferWillHandleSize",value:function(e){for(;this.buffer.byteLength>BigInt(32);this.serializeU32(Number(t)),this.serializeU32(Number(n))}},{key:"serializeU128",value:function(e){var t=BigInt(e.toString())&ks,n=BigInt(e.toString())>>BigInt(64);this.serializeU64(t),this.serializeU64(n)}},{key:"serializeU256",value:function(e){var t=BigInt(e.toString())&As,n=BigInt(e.toString())>>BigInt(128);this.serializeU128(t),this.serializeU128(n)}},{key:"serializeU32AsUleb128",value:function(e){for(var t=e,n=[];t>>>7!==0;)n.push(127&t|128),t>>>=7;n.push(t),this.serialize(new Uint8Array(n))}},{key:"getBytes",value:function(){return new Uint8Array(this.buffer).slice(0,this.offset)}}]),e}();function Ts(e,t,n){return function(a,o,r){var i=r.value;return r.value=function(a){var o=BigInt(a.toString());if(o>BigInt(t.toString())||othis.buffer.byteLength)throw new Error("Reached to the end of buffer");var t=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t}},{key:"deserializeStr",value:function(){var e=this.deserializeBytes();return(new TextDecoder).decode(e)}},{key:"deserializeBytes",value:function(){var e=this.deserializeUleb128AsU32();return new Uint8Array(this.read(e))}},{key:"deserializeFixedBytes",value:function(e){return new Uint8Array(this.read(e))}},{key:"deserializeBool",value:function(){var e=new Uint8Array(this.read(1))[0];if(1!==e&&0!==e)throw new Error("Invalid boolean value");return 1===e}},{key:"deserializeU8",value:function(){return new DataView(this.read(1)).getUint8(0)}},{key:"deserializeU16",value:function(){return new DataView(this.read(2)).getUint16(0,!0)}},{key:"deserializeU32",value:function(){return new DataView(this.read(4)).getUint32(0,!0)}},{key:"deserializeU64",value:function(){var e=this.deserializeU32(),t=this.deserializeU32();return BigInt(BigInt(t)<ws)throw new Error("Overflow while parsing uleb128-encoded uint32 value");return Number(e)}}]),e}();function Cs(e,t){t.serializeU32AsUleb128(e.length),e.forEach((function(e){e.serialize(t)}))}function Es(e,t){var n=new Is;n.serializeU32AsUleb128(e.length);var a=n[t];return e.forEach((function(e){a.call(n,e)})),n.getBytes()}function Rs(e,t){for(var n=e.deserializeUleb128AsU32(),a=[],o=0;oe.LENGTH)throw new Error("Hex string is too long. Address's length is 32 bytes.");if(a.length===e.LENGTH)return new e(a);var o=new Uint8Array(e.LENGTH);return o.set(a,e.LENGTH-a.length),new e(o)}},{key:"isValid",value:function(t){if(""===t)return!1;var n=rs.ensure(t);return n.noPrefix().length%2!==0&&(n=new rs("0".concat(n.noPrefix()))),n.toUint8Array().length<=e.LENGTH}},{key:"deserialize",value:function(t){return new e(t.deserializeFixedBytes(e.LENGTH))}}]),e}(),Hs=js;Hs.LENGTH=32,Hs.CORE_CODE_ADDRESS=js.fromHex("0x1");var Gs=function(){function e(t){if((0,Gr.Z)(this,e),t.length!==e.LENGTH)throw new Error("Ed25519PublicKey length should be ".concat(e.LENGTH));this.value=t}return(0,zr.Z)(e,[{key:"toBytes",value:function(){return this.value}},{key:"serialize",value:function(e){e.serializeBytes(this.value)}}],[{key:"deserialize",value:function(t){return new e(t.deserializeBytes())}}]),e}();Gs.LENGTH=32;var zs=function(){function e(t){if((0,Gr.Z)(this,e),this.value=t,t.length!==e.LENGTH)throw new Error("Ed25519Signature length should be ".concat(e.LENGTH))}return(0,zr.Z)(e,[{key:"serialize",value:function(e){e.serializeBytes(this.value)}}],[{key:"deserialize",value:function(t){return new e(t.deserializeBytes())}}]),e}();zs.LENGTH=64;var Ks=function(){function e(t,n){if((0,Gr.Z)(this,e),this.public_keys=t,this.threshold=n,n>32)throw new Error('"threshold" cannot be larger than '.concat(32))}return(0,zr.Z)(e,[{key:"toBytes",value:function(){var e=new Uint8Array(this.public_keys.length*Gs.LENGTH+1);return this.public_keys.forEach((function(t,n){e.set(t.value,n*Gs.LENGTH)})),e[this.public_keys.length*Gs.LENGTH]=this.threshold,e}},{key:"serialize",value:function(e){e.serializeBytes(this.toBytes())}}],[{key:"deserialize",value:function(t){for(var n=t.deserializeBytes(),a=n[n.length-1],o=[],r=0;r=32)throw new Error("Invalid bit value ".concat(e,"."));if(n.has(e))throw new Error("Duplicated bits detected.");n.add(e);var a=Math.floor(e/8),o=t[a];o|=128>>e%8,t[a]=o})),t}},{key:"deserialize",value:function(t){for(var n=t.deserializeBytes(),a=n.subarray(n.length-4),o=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:new Map;(0,Gr.Z)(this,e),this.jar=t}return(0,zr.Z)(e,[{key:"setCookie",value:function(t,n){var a,o=t.origin.toLowerCase();this.jar.has(o)||this.jar.set(o,[]);var r=e.parse(n);this.jar.set(o,[].concat((0,Kr.Z)((null==(a=this.jar.get(o))?void 0:a.filter((function(e){return e.name!==r.name})))||[]),[r]))}},{key:"getCookies",value:function(e){var t,n=e.origin.toLowerCase();return this.jar.get(n)&&(null==(t=this.jar.get(n))?void 0:t.filter((function(e){return!e.expires||e.expires>new Date})))||[]}}],[{key:"parse",value:function(e){if("string"!==typeof e)throw new Error("argument str must be a string");var t,n=e.split(";").map((function(e){return e.trim()}));if(!(n.length>0))throw new Error("Invalid cookie");var a=n[0].split("="),o=(0,Nr.Z)(a,2),r=o[0],i=o[1];if(!r||!i)throw new Error("Invalid cookie");return t={name:r,value:i},n.slice(1).forEach((function(e){var n=e.split("="),a=(0,Nr.Z)(n,2),o=a[0],r=a[1];if(!o.trim())throw new Error("Invalid cookie");var i=o.toLowerCase(),s="'"===(null==r?void 0:r.charAt(0))||'"'===(null==r?void 0:r.charAt(0))?null==r?void 0:r.slice(1,-1):r;if("expires"===i&&(t.expires=new Date(s)),"path"===i&&(t.path=s),"samesite"===i){if("Lax"!==s&&"None"!==s&&"Strict"!==s)throw new Error("Invalid cookie SameSite value");t.sameSite=s}"secure"===i&&(t.secure=!0)})),t}}]),e}(),nu=new tu;qi.interceptors.response.use((function(e){return Array.isArray(e.headers["set-cookie"])&&e.headers["set-cookie"].forEach((function(t){nu.setCookie(new URL(e.config.url),t)})),e})),qi.interceptors.request.use((function(e){var t=nu.getCookies(new URL(e.url));return(null==t?void 0:t.length)>0&&e.headers&&(e.headers.cookie=t.map((function(e){return"".concat(e.name,"=").concat(e.value)})).join("; ")),e}));var au=function(e){return void 0!==e&&null!==e},ou=function(e){return"string"===typeof e},ru=function(e){return ou(e)&&""!==e},iu=function(e){return"object"===typeof e&&"string"===typeof e.type&&"function"===typeof e.stream&&"function"===typeof e.arrayBuffer&&"function"===typeof e.constructor&&"string"===typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])},su=function(e){var t=[],n=function e(n,a){au(a)&&(Array.isArray(a)?a.forEach((function(t){e(n,t)})):"object"===typeof a?Object.entries(a).forEach((function(t){var a=(0,Nr.Z)(t,2),o=a[0],r=a[1];e("".concat(n,"[").concat(o,"]"),r)})):function(e,n){t.push("".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(String(n))))}(n,a))};return Object.entries(e).forEach((function(e){var t=(0,Nr.Z)(e,2),a=t[0],o=t[1];n(a,o)})),t.length>0?"?".concat(t.join("&")):""},cu=function(e,t){var n=e.ENCODE_PATH||encodeURI,a=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(function(e,a){var o;return(null==(o=t.path)?void 0:o.hasOwnProperty(a))?n(String(t.path[a])):e})),o="".concat(e.BASE).concat(a);return t.query?"".concat(o).concat(su(t.query)):o},uu=function(e){if(e.formData){var t=new Qi,n=function(e,n){ou(n)||iu(n)?t.append(e,n):t.append(e,JSON.stringify(n))};return Object.entries(e.formData).filter((function(e){var t=(0,Nr.Z)(e,2),n=(t[0],t[1]);return au(n)})).forEach((function(e){var t=(0,Nr.Z)(e,2),a=t[0],o=t[1];Array.isArray(o)?o.forEach((function(e){return n(a,e)})):n(a,o)})),t}},du=function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n){return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof n){e.next=2;break}return e.abrupt("return",n(t));case 2:return e.abrupt("return",n);case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),lu=function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o,r,i,s,c,u,d;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,du(n,t.TOKEN);case 2:return o=e.sent,e.next=5,du(n,t.USERNAME);case 5:return r=e.sent,e.next=8,du(n,t.PASSWORD);case 8:return i=e.sent,e.next=11,du(n,t.HEADERS);case 11:return s=e.sent,c="function"===typeof(null==a?void 0:a.getHeaders)&&(null==a?void 0:a.getHeaders())||{},u=Object.entries((0,Br.Z)((0,Br.Z)((0,Br.Z)({Accept:"application/json"},s),n.headers),c)).filter((function(e){var t=(0,Nr.Z)(e,2),n=(t[0],t[1]);return au(n)})).reduce((function(e,t){var n=(0,Nr.Z)(t,2),a=n[0],o=n[1];return(0,Br.Z)((0,Br.Z)({},e),{},(0,_r.Z)({},a,String(o)))}),{}),ru(o)&&(u.Authorization="Bearer ".concat(o)),ru(r)&&ru(i)&&(l="".concat(r,":").concat(i),d=btoa(l),u.Authorization="Basic ".concat(d)),n.body&&(n.mediaType?u["Content-Type"]=n.mediaType:iu(n.body)?u["Content-Type"]=n.body.type||"application/octet-stream":ou(n.body)?u["Content-Type"]="text/plain":n.body instanceof Qi||(u["Content-Type"]="application/json")),e.abrupt("return",u);case 18:case"end":return e.stop()}var l}),e)})));return function(t,n,a){return e.apply(this,arguments)}}(),fu=function(e){if(e.body)return e.body},pu=function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o,r,i,s){var c,u,d;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=qi.CancelToken.source(),u={url:a,headers:i,data:null!=o?o:r,method:n.method,withCredentials:t.WITH_CREDENTIALS,cancelToken:c.token},Object.keys(t.HEADERS||{}).filter((function(e){return"accept"===e.toLowerCase()})).map((function(e){return t.HEADERS[e]})).includes("application/x-bcs")&&(u.responseType="arraybuffer"),s((function(){return c.cancel("The user aborted a request.")})),e.prev=5,e.next=8,qi.request(u);case 8:return e.abrupt("return",e.sent);case 11:if(e.prev=11,e.t0=e.catch(5),!(d=e.t0).response){e.next=16;break}return e.abrupt("return",d.response);case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,null,[[5,11]])})));return function(t,n,a,o,r,i,s){return e.apply(this,arguments)}}(),bu=function(e,t){if(t){var n=e.headers[t];if(ou(n))return n}},mu=function(e){if(204!==e.status)return e.data},hu=function(e,t){var n=(0,Br.Z)({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},e.errors)[t.status];if(n)throw new Xc(e,t,n);if(!t.ok)throw new Xc(e,t,"Generic Error")},gu=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(e){return(0,Gr.Z)(this,n),t.call(this,e)}return(0,zr.Z)(n,[{key:"request",value:function(e){return function(e,t){return new eu(function(){var n=(0,Hr.Z)((0,Dr.Z)().mark((function n(a,o,r){var i,s,c,u,d,l,f,p,b;return(0,Dr.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,i=cu(e,t),s=uu(t),c=fu(t),n.next=6,lu(e,t,s);case 6:if(u=n.sent,r.isCancelled){n.next=18;break}return n.next=10,pu(e,t,i,c,s,u,r);case 10:d=n.sent,l=mu(d),f=bu(d,t.responseHeader),p={url:i,ok:(m=d.status,m>=200&&m<300),status:d.status,statusText:d.statusText,body:null!=f?f:l},hu(t,p),b=p.body;try{b.__headers=d.headers}catch(h){}a(b);case 18:n.next=23;break;case 20:n.prev=20,n.t0=n.catch(0),o(n.t0);case 23:case"end":return n.stop()}var m}),n,null,[[0,20]])})));return function(e,t,a){return n.apply(this,arguments)}}())}(this.config,e)}}]),n}(Yc),yu=function(){function e(t){(0,Gr.Z)(this,e),this.httpRequest=t}return(0,zr.Z)(e,[{key:"getAccount",value:function(e,t){return this.httpRequest.request({method:"GET",url:"/accounts/{address}",path:{address:e},query:{ledger_version:t}})}},{key:"getAccountResources",value:function(e,t,n,a){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/resources",path:{address:e},query:{ledger_version:t,start:n,limit:a}})}},{key:"getAccountModules",value:function(e,t,n,a){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/modules",path:{address:e},query:{ledger_version:t,start:n,limit:a}})}},{key:"getAccountResource",value:function(e,t,n){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/resource/{resource_type}",path:{address:e,resource_type:t},query:{ledger_version:n}})}},{key:"getAccountModule",value:function(e,t,n){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/module/{module_name}",path:{address:e,module_name:t},query:{ledger_version:n}})}}]),e}(),vu=function(){function e(t){(0,Gr.Z)(this,e),this.httpRequest=t}return(0,zr.Z)(e,[{key:"getBlockByHeight",value:function(e,t){return this.httpRequest.request({method:"GET",url:"/blocks/by_height/{block_height}",path:{block_height:e},query:{with_transactions:t}})}},{key:"getBlockByVersion",value:function(e,t){return this.httpRequest.request({method:"GET",url:"/blocks/by_version/{version}",path:{version:e},query:{with_transactions:t}})}}]),e}(),wu=function(){function e(t){(0,Gr.Z)(this,e),this.httpRequest=t}return(0,zr.Z)(e,[{key:"getEventsByCreationNumber",value:function(e,t,n,a){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/events/{creation_number}",path:{address:e,creation_number:t},query:{start:n,limit:a}})}},{key:"getEventsByEventHandle",value:function(e,t,n,a,o){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/events/{event_handle}/{field_name}",path:{address:e,event_handle:t,field_name:n},query:{start:a,limit:o}})}}]),e}(),ku=function(){function e(t){(0,Gr.Z)(this,e),this.httpRequest=t}return(0,zr.Z)(e,[{key:"spec",value:function(){return this.httpRequest.request({method:"GET",url:"/spec"})}},{key:"healthy",value:function(e){return this.httpRequest.request({method:"GET",url:"/-/healthy",query:{duration_secs:e}})}},{key:"getLedgerInfo",value:function(){return this.httpRequest.request({method:"GET",url:"/"})}}]),e}(),Au=function(){function e(t){(0,Gr.Z)(this,e),this.httpRequest=t}return(0,zr.Z)(e,[{key:"getTableItem",value:function(e,t,n){return this.httpRequest.request({method:"POST",url:"/tables/{table_handle}/item",path:{table_handle:e},query:{ledger_version:n},body:t,mediaType:"application/json"})}},{key:"getRawTableItem",value:function(e,t,n){return this.httpRequest.request({method:"POST",url:"/tables/{table_handle}/raw_item",path:{table_handle:e},query:{ledger_version:n},body:t,mediaType:"application/json"})}}]),e}(),xu=function(){function e(t){(0,Gr.Z)(this,e),this.httpRequest=t}return(0,zr.Z)(e,[{key:"getTransactions",value:function(e,t){return this.httpRequest.request({method:"GET",url:"/transactions",query:{start:e,limit:t}})}},{key:"submitTransaction",value:function(e){return this.httpRequest.request({method:"POST",url:"/transactions",body:e,mediaType:"application/json"})}},{key:"getTransactionByHash",value:function(e){return this.httpRequest.request({method:"GET",url:"/transactions/by_hash/{txn_hash}",path:{txn_hash:e}})}},{key:"getTransactionByVersion",value:function(e){return this.httpRequest.request({method:"GET",url:"/transactions/by_version/{txn_version}",path:{txn_version:e}})}},{key:"getAccountTransactions",value:function(e,t,n){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/transactions",path:{address:e},query:{start:t,limit:n}})}},{key:"submitBatchTransactions",value:function(e){return this.httpRequest.request({method:"POST",url:"/transactions/batch",body:e,mediaType:"application/json"})}},{key:"simulateTransaction",value:function(e,t,n,a){return this.httpRequest.request({method:"POST",url:"/transactions/simulate",query:{estimate_max_gas_amount:t,estimate_gas_unit_price:n,estimate_prioritized_gas_unit_price:a},body:e,mediaType:"application/json"})}},{key:"encodeSubmission",value:function(e){return this.httpRequest.request({method:"POST",url:"/transactions/encode_submission",body:e,mediaType:"application/json"})}},{key:"estimateGasPrice",value:function(){return this.httpRequest.request({method:"GET",url:"/estimate_gas_price"})}}]),e}(),Iu=function(){function e(t){(0,Gr.Z)(this,e),this.httpRequest=t}return(0,zr.Z)(e,[{key:"view",value:function(e,t){return this.httpRequest.request({method:"POST",url:"/view",query:{ledger_version:t},body:e,mediaType:"application/json"})}}]),e}(),Tu=(0,zr.Z)((function e(t){var n,a,o,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gu;(0,Gr.Z)(this,e),this.request=new i({BASE:null!=(n=null==t?void 0:t.BASE)?n:"/v1",VERSION:null!=(a=null==t?void 0:t.VERSION)?a:"1.2.0",WITH_CREDENTIALS:null!=(o=null==t?void 0:t.WITH_CREDENTIALS)&&o,CREDENTIALS:null!=(r=null==t?void 0:t.CREDENTIALS)?r:"include",TOKEN:null==t?void 0:t.TOKEN,USERNAME:null==t?void 0:t.USERNAME,PASSWORD:null==t?void 0:t.PASSWORD,HEADERS:null==t?void 0:t.HEADERS,ENCODE_PATH:null==t?void 0:t.ENCODE_PATH}),this.accounts=new yu(this.request),this.blocks=new vu(this.request),this.events=new wu(this.request),this.general=new ku(this.request),this.tables=new Au(this.request),this.transactions=new xu(this.request),this.view=new Iu(this.request)})),Su={BASE:"/v1",VERSION:"1.2.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0},Cu=function(e){return e.ACCOUNT_NOT_FOUND="account_not_found",e.RESOURCE_NOT_FOUND="resource_not_found",e.MODULE_NOT_FOUND="module_not_found",e.STRUCT_FIELD_NOT_FOUND="struct_field_not_found",e.VERSION_NOT_FOUND="version_not_found",e.TRANSACTION_NOT_FOUND="transaction_not_found",e.TABLE_ITEM_NOT_FOUND="table_item_not_found",e.BLOCK_NOT_FOUND="block_not_found",e.VERSION_PRUNED="version_pruned",e.BLOCK_PRUNED="block_pruned",e.INVALID_INPUT="invalid_input",e.INVALID_TRANSACTION_UPDATE="invalid_transaction_update",e.SEQUENCE_NUMBER_TOO_OLD="sequence_number_too_old",e.VM_ERROR="vm_error",e.HEALTH_CHECK_FAILED="health_check_failed",e.MEMPOOL_IS_FULL="mempool_is_full",e.INTERNAL_ERROR="internal_error",e.WEB_FRAMEWORK_ERROR="web_framework_error",e.BCS_NOT_SUPPORTED="bcs_not_supported",e.API_DISABLED="api_disabled",e}(Cu||{}),Eu=function(e){return e.PRIVATE="private",e.PUBLIC="public",e.FRIEND="friend",e}(Eu||{}),Ru=function(e){return e.VALIDATOR="validator",e.FULL_NODE="full_node",e}(Ru||{}),Mu={description:"Account data\n\n A simplified version of the onchain Account resource",properties:{sequence_number:{type:"U64",isRequired:!0},authentication_key:{type:"HexEncodedBytes",isRequired:!0}}},Pu={type:"one-of",description:"Account signature scheme\n\n The account signature scheme allows you to have two types of accounts:\n\n 1. A single Ed25519 key account, one private key\n 2. A k-of-n multi-Ed25519 key account, multiple private keys, such that k-of-n must sign a transaction.",contains:[{type:"AccountSignature_Ed25519Signature"},{type:"AccountSignature_MultiEd25519Signature"}]},Uu={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"Ed25519Signature"}]},_u={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"MultiEd25519Signature"}]},Bu={type:"string",description:"A hex encoded 32 byte Aptos account address.\n\n This is represented in a string as a 64 character hex string, sometimes\n shortened by stripping leading 0s, and adding a 0x.\n\n For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.\n ",format:"hex"},Du={description:"This is the generic struct we use for all API errors, it contains a string\n message and an Aptos API specific error code.",properties:{message:{type:"string",description:"A message describing the error",isRequired:!0},error_code:{type:"AptosErrorCode",isRequired:!0},vm_error_code:{type:"number",description:"A code providing VM error details when submitting transactions to the VM",format:"uint64"}}},Nu={type:"Enum"},Ou={description:"A Block with or without transactions\n\n This contains the information about a transactions along with\n associated transactions if requested",properties:{block_height:{type:"U64",isRequired:!0},block_hash:{type:"HashValue",isRequired:!0},block_timestamp:{type:"U64",isRequired:!0},first_version:{type:"U64",isRequired:!0},last_version:{type:"U64",isRequired:!0},transactions:{type:"array",contains:{type:"Transaction"}}}},Fu={description:"A block metadata transaction\n\n This signifies the beginning of a block, and contains information\n about the specific block",properties:{version:{type:"U64",isRequired:!0},hash:{type:"HashValue",isRequired:!0},state_change_hash:{type:"HashValue",isRequired:!0},event_root_hash:{type:"HashValue",isRequired:!0},state_checkpoint_hash:{type:"HashValue"},gas_used:{type:"U64",isRequired:!0},success:{type:"boolean",description:"Whether the transaction was successful",isRequired:!0},vm_status:{type:"string",description:"The VM status of the transaction, can tell useful information in a failure",isRequired:!0},accumulator_root_hash:{type:"HashValue",isRequired:!0},changes:{type:"array",contains:{type:"WriteSetChange"},isRequired:!0},id:{type:"HashValue",isRequired:!0},epoch:{type:"U64",isRequired:!0},round:{type:"U64",isRequired:!0},events:{type:"array",contains:{type:"Event"},isRequired:!0},previous_block_votes_bitvec:{type:"array",contains:{type:"number",format:"uint8"},isRequired:!0},proposer:{type:"Address",isRequired:!0},failed_proposer_indices:{type:"array",contains:{type:"number",format:"uint32"},isRequired:!0},timestamp:{type:"U64",isRequired:!0}}},Lu={description:"Decoded table data",properties:{key:{description:"Key of table in JSON",properties:{},isRequired:!0},key_type:{type:"string",description:"Type of key",isRequired:!0},value:{description:"Value of table in JSON",properties:{},isRequired:!0},value_type:{type:"string",description:"Type of value",isRequired:!0}}},ju={description:"Deleted table data",properties:{key:{description:"Deleted key",properties:{},isRequired:!0},key_type:{type:"string",description:"Deleted key type",isRequired:!0}}},Hu={description:"Delete a module",properties:{address:{type:"Address",isRequired:!0},state_key_hash:{type:"string",description:"State key hash",isRequired:!0},module:{type:"MoveModuleId",isRequired:!0}}},Gu={description:"Delete a resource",properties:{address:{type:"Address",isRequired:!0},state_key_hash:{type:"string",description:"State key hash",isRequired:!0},resource:{type:"MoveStructTag",isRequired:!0}}},zu={description:"Delete a table item",properties:{state_key_hash:{type:"string",isRequired:!0},handle:{type:"HexEncodedBytes",isRequired:!0},key:{type:"HexEncodedBytes",isRequired:!0},data:{type:"DeletedTableData"}}},Ku={properties:{changes:{type:"array",contains:{type:"WriteSetChange"},isRequired:!0},events:{type:"array",contains:{type:"Event"},isRequired:!0}}},Wu={description:"A single Ed25519 signature",properties:{public_key:{type:"HexEncodedBytes",isRequired:!0},signature:{type:"HexEncodedBytes",isRequired:!0}}},Zu={description:"Request to encode a submission",properties:{sender:{type:"Address",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},max_gas_amount:{type:"U64",isRequired:!0},gas_unit_price:{type:"U64",isRequired:!0},expiration_timestamp_secs:{type:"U64",isRequired:!0},payload:{type:"TransactionPayload",isRequired:!0},secondary_signers:{type:"array",contains:{type:"Address"}}}},Vu={type:"string",description:"Entry function id is string representation of a entry function defined on-chain.\n\n Format: `{address}::{module name}::{function name}`\n\n Both `module name` and `function name` are case-sensitive.\n "},qu={description:"Payload which runs a single entry function",properties:{function:{type:"EntryFunctionId",isRequired:!0},type_arguments:{type:"array",contains:{type:"MoveType"},isRequired:!0},arguments:{type:"array",contains:{properties:{}},isRequired:!0}}},Qu={description:"An event from a transaction",properties:{guid:{type:"EventGuid",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},type:{type:"MoveType",isRequired:!0},data:{description:"The JSON representation of the event",properties:{},isRequired:!0}}},Ju={properties:{creation_number:{type:"U64",isRequired:!0},account_address:{type:"Address",isRequired:!0}}},Yu={description:"Struct holding the outputs of the estimate gas API",properties:{deprioritized_gas_estimate:{type:"number",description:"The deprioritized estimate for the gas unit price",format:"uint64"},gas_estimate:{type:"number",description:"The current estimate for the gas unit price",isRequired:!0,format:"uint64"},prioritized_gas_estimate:{type:"number",description:"The prioritized estimate for the gas unit price",format:"uint64"}}},Xu={type:"one-of",description:"The writeset payload of the Genesis transaction",contains:[{type:"GenesisPayload_WriteSetPayload"}]},$u={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"WriteSetPayload"}]},ed={description:"The genesis transaction\n\n This only occurs at the genesis transaction (version 0)",properties:{version:{type:"U64",isRequired:!0},hash:{type:"HashValue",isRequired:!0},state_change_hash:{type:"HashValue",isRequired:!0},event_root_hash:{type:"HashValue",isRequired:!0},state_checkpoint_hash:{type:"HashValue"},gas_used:{type:"U64",isRequired:!0},success:{type:"boolean",description:"Whether the transaction was successful",isRequired:!0},vm_status:{type:"string",description:"The VM status of the transaction, can tell useful information in a failure",isRequired:!0},accumulator_root_hash:{type:"HashValue",isRequired:!0},changes:{type:"array",contains:{type:"WriteSetChange"},isRequired:!0},payload:{type:"GenesisPayload",isRequired:!0},events:{type:"array",contains:{type:"Event"},isRequired:!0}}},td={type:"string"},nd={description:"Representation of a successful healthcheck",properties:{message:{type:"string",isRequired:!0}}},ad={type:"string",description:"All bytes (Vec) data is represented as hex-encoded string prefixed with `0x` and fulfilled with\n two hex digits per byte.\n\n Unlike the `Address` type, HexEncodedBytes will not trim any zeros.\n ",format:"hex"},od={type:"string"},rd={description:'The struct holding all data returned to the client by the\n index endpoint (i.e., GET "/"). Only for responding in JSON',properties:{chain_id:{type:"number",description:"Chain ID of the current chain",isRequired:!0,format:"uint8"},epoch:{type:"U64",isRequired:!0},ledger_version:{type:"U64",isRequired:!0},oldest_ledger_version:{type:"U64",isRequired:!0},ledger_timestamp:{type:"U64",isRequired:!0},node_role:{type:"RoleType",isRequired:!0},oldest_block_height:{type:"U64",isRequired:!0},block_height:{type:"U64",isRequired:!0},git_hash:{type:"string",description:"Git hash of the build of the API endpoint. Can be used to determine the exact\n software version used by the API endpoint."}}},id={properties:{modules:{type:"array",contains:{type:"MoveModuleBytecode"},isRequired:!0}}},sd={type:"string"},cd={description:"Move function",properties:{name:{type:"IdentifierWrapper",isRequired:!0},visibility:{type:"MoveFunctionVisibility",isRequired:!0},is_entry:{type:"boolean",description:"Whether the function can be called as an entry function directly in a transaction",isRequired:!0},generic_type_params:{type:"array",contains:{type:"MoveFunctionGenericTypeParam"},isRequired:!0},params:{type:"array",contains:{type:"MoveType"},isRequired:!0},return:{type:"array",contains:{type:"MoveType"},isRequired:!0}}},ud={description:"Move function generic type param",properties:{constraints:{type:"array",contains:{type:"MoveAbility"},isRequired:!0}}},dd={type:"Enum"},ld={description:"A Move module",properties:{address:{type:"Address",isRequired:!0},name:{type:"IdentifierWrapper",isRequired:!0},friends:{type:"array",contains:{type:"MoveModuleId"},isRequired:!0},exposed_functions:{type:"array",contains:{type:"MoveFunction"},isRequired:!0},structs:{type:"array",contains:{type:"MoveStruct"},isRequired:!0}}},fd={description:"Move module bytecode along with it's ABI",properties:{bytecode:{type:"HexEncodedBytes",isRequired:!0},abi:{type:"MoveModule"}}},pd={type:"string",description:"Move module id is a string representation of Move module.\n\n Format: `{address}::{module name}`\n\n `address` should be hex-encoded 32 byte account address that is prefixed with `0x`.\n\n Module name is case-sensitive.\n "},bd={description:"A parsed Move resource",properties:{type:{type:"MoveStructTag",isRequired:!0},data:{type:"MoveStructValue",isRequired:!0}}},md={description:"Move script bytecode",properties:{bytecode:{type:"HexEncodedBytes",isRequired:!0},abi:{type:"MoveFunction"}}},hd={description:"A move struct",properties:{name:{type:"IdentifierWrapper",isRequired:!0},is_native:{type:"boolean",description:"Whether the struct is a native struct of Move",isRequired:!0},abilities:{type:"array",contains:{type:"MoveAbility"},isRequired:!0},generic_type_params:{type:"array",contains:{type:"MoveStructGenericTypeParam"},isRequired:!0},fields:{type:"array",contains:{type:"MoveStructField"},isRequired:!0}}},gd={description:"Move struct field",properties:{name:{type:"IdentifierWrapper",isRequired:!0},type:{type:"MoveType",isRequired:!0}}},yd={description:"Move generic type param",properties:{constraints:{type:"array",contains:{type:"MoveAbility"},isRequired:!0}}},vd={type:"string",description:"String representation of a MoveStructTag (on-chain Move struct type). This exists so you\n can specify MoveStructTags as path / query parameters, e.g. for get_events_by_event_handle.\n\n It is a combination of:\n 1. `move_module_address`, `module_name` and `struct_name`, all joined by `::`\n 2. `struct generic type parameters` joined by `, `\n\n Examples:\n * `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>`\n * `0x1::account::Account`\n\n Note:\n 1. Empty chars should be ignored when comparing 2 struct tag ids.\n 2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).\n\n See [doc](https://aptos.dev/concepts/accounts) for more details.\n ",pattern:"^0x[0-9a-zA-Z:_<>]+$"},wd={description:'This is a JSON representation of some data within an account resource. More specifically,\n it is a map of strings to arbitrary JSON values / objects, where the keys are top level\n fields within the given resource.\n\n To clarify, you might query for 0x1::account::Account and see the example data.\n\n Move `bool` type value is serialized into `boolean`.\n\n Move `u8`, `u16` and `u32` type value is serialized into `integer`.\n\n Move `u64`, `u128` and `u256` type value is serialized into `string`.\n\n Move `address` type value (32 byte Aptos account address) is serialized into a HexEncodedBytes string.\n For example:\n - `0x1`\n - `0x1668f6be25668c1a17cd8caf6b8d2f25`\n\n Move `vector` type value is serialized into `array`, except `vector` which is serialized into a\n HexEncodedBytes string with `0x` prefix.\n For example:\n - `vector{255, 255}` => `["255", "255"]`\n - `vector{255, 255}` => `0xffff`\n\n Move `struct` type value is serialized into `object` that looks like this (except some Move stdlib types, see the following section):\n ```json\n {\n field1_name: field1_value,\n field2_name: field2_value,\n ......\n }\n ```\n\n For example:\n `{ "created": "0xa550c18", "role_id": "0" }`\n\n **Special serialization for Move stdlib types**:\n - [0x1::string::String](https://github.com/aptos-labs/aptos-core/blob/main/language/move-stdlib/docs/ascii.md)\n is serialized into `string`. For example, struct value `0x1::string::String{bytes: b"Hello World!"}`\n is serialized as `"Hello World!"` in JSON.\n ',properties:{}},kd={type:"string",description:"String representation of an on-chain Move type tag that is exposed in transaction payload.\n Values:\n - bool\n - u8\n - u16\n - u32\n - u64\n - u128\n - u256\n - address\n - signer\n - vector: `vector<{non-reference MoveTypeId}>`\n - struct: `{address}::{module_name}::{struct_name}::<{generic types}>`\n\n Vector type value examples:\n - `vector`\n - `vector>`\n - `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>`\n\n Struct type value examples:\n - `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>\n - `0x1::account::Account`\n\n Note:\n 1. Empty chars should be ignored when comparing 2 struct tag ids.\n 2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).\n ",pattern:"^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$"},Ad={type:"any-of",description:"An enum of the possible Move value types",contains:[{type:"number",format:"uint8"},{type:"number",format:"uint16"},{type:"number",format:"uint32"},{type:"U64"},{type:"U128"},{type:"U256"},{type:"boolean"},{type:"Address"},{type:"array",contains:{type:"MoveValue"}},{type:"HexEncodedBytes"},{type:"MoveStructValue"},{type:"string"}]},xd={description:"Multi agent signature for multi agent transactions\n\n This allows you to have transactions across multiple accounts",properties:{sender:{type:"AccountSignature",isRequired:!0},secondary_signer_addresses:{type:"array",contains:{type:"Address"},isRequired:!0},secondary_signers:{type:"array",contains:{type:"AccountSignature"},isRequired:!0}}},Id={description:"A Ed25519 multi-sig signature\n\n This allows k-of-n signing for a transaction",properties:{public_keys:{type:"array",contains:{type:"HexEncodedBytes"},isRequired:!0},signatures:{type:"array",contains:{type:"HexEncodedBytes"},isRequired:!0},threshold:{type:"number",description:"The number of signatures required for a successful transaction",isRequired:!0,format:"uint8"},bitmap:{type:"HexEncodedBytes",isRequired:!0}}},Td={description:"A transaction waiting in mempool",properties:{hash:{type:"HashValue",isRequired:!0},sender:{type:"Address",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},max_gas_amount:{type:"U64",isRequired:!0},gas_unit_price:{type:"U64",isRequired:!0},expiration_timestamp_secs:{type:"U64",isRequired:!0},payload:{type:"TransactionPayload",isRequired:!0},signature:{type:"TransactionSignature"}}},Sd={description:"Table Item request for the GetTableItemRaw API",properties:{key:{type:"HexEncodedBytes",isRequired:!0}}},Cd={type:"Enum"},Ed={description:"Payload which runs a script that can run multiple functions",properties:{code:{type:"MoveScriptBytecode",isRequired:!0},type_arguments:{type:"array",contains:{type:"MoveType"},isRequired:!0},arguments:{type:"array",contains:{properties:{}},isRequired:!0}}},Rd={properties:{execute_as:{type:"Address",isRequired:!0},script:{type:"ScriptPayload",isRequired:!0}}},Md={description:"A state checkpoint transaction",properties:{version:{type:"U64",isRequired:!0},hash:{type:"HashValue",isRequired:!0},state_change_hash:{type:"HashValue",isRequired:!0},event_root_hash:{type:"HashValue",isRequired:!0},state_checkpoint_hash:{type:"HashValue"},gas_used:{type:"U64",isRequired:!0},success:{type:"boolean",description:"Whether the transaction was successful",isRequired:!0},vm_status:{type:"string",description:"The VM status of the transaction, can tell useful information in a failure",isRequired:!0},accumulator_root_hash:{type:"HashValue",isRequired:!0},changes:{type:"array",contains:{type:"WriteSetChange"},isRequired:!0},timestamp:{type:"U64",isRequired:!0}}},Pd={type:"string",description:"Representation of a StateKey as a hex string. This is used for cursor based pagination.\n "},Ud={description:"A request to submit a transaction\n\n This requires a transaction and a signature of it",properties:{sender:{type:"Address",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},max_gas_amount:{type:"U64",isRequired:!0},gas_unit_price:{type:"U64",isRequired:!0},expiration_timestamp_secs:{type:"U64",isRequired:!0},payload:{type:"TransactionPayload",isRequired:!0},signature:{type:"TransactionSignature",isRequired:!0}}},_d={description:"Table Item request for the GetTableItem API",properties:{key_type:{type:"MoveType",isRequired:!0},value_type:{type:"MoveType",isRequired:!0},key:{description:"The value of the table item's key",properties:{},isRequired:!0}}},Bd={type:"one-of",description:"Enum of the different types of transactions in Aptos",contains:[{type:"Transaction_PendingTransaction"},{type:"Transaction_UserTransaction"},{type:"Transaction_GenesisTransaction"},{type:"Transaction_BlockMetadataTransaction"},{type:"Transaction_StateCheckpointTransaction"}]},Dd={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"BlockMetadataTransaction"}]},Nd={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"GenesisTransaction"}]},Od={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"PendingTransaction"}]},Fd={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"StateCheckpointTransaction"}]},Ld={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"UserTransaction"}]},jd={type:"one-of",description:"An enum of the possible transaction payloads",contains:[{type:"TransactionPayload_EntryFunctionPayload"},{type:"TransactionPayload_ScriptPayload"},{type:"TransactionPayload_ModuleBundlePayload"}]},Hd={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"EntryFunctionPayload"}]},Gd={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"ModuleBundlePayload"}]},zd={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"ScriptPayload"}]},Kd={description:"Information telling which batch submission transactions failed",properties:{error:{type:"AptosError",isRequired:!0},transaction_index:{type:"number",description:"The index of which transaction failed, same as submission order",isRequired:!0,format:"uint64"}}},Wd={description:"Batch transaction submission result\n\n Tells which transactions failed",properties:{transaction_failures:{type:"array",contains:{type:"TransactionsBatchSingleSubmissionFailure"},isRequired:!0}}},Zd={type:"one-of",description:"An enum representing the different transaction signatures available",contains:[{type:"TransactionSignature_Ed25519Signature"},{type:"TransactionSignature_MultiEd25519Signature"},{type:"TransactionSignature_MultiAgentSignature"}]},Vd={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"Ed25519Signature"}]},qd={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"MultiAgentSignature"}]},Qd={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"MultiEd25519Signature"}]},Jd={type:"string",description:"A string containing a 128-bit unsigned integer.\n\n We represent u128 values as a string to ensure compatibility with languages such\n as JavaScript that do not parse u128s in JSON natively.\n ",format:"uint128"},Yd={type:"string",description:"A string containing a 256-bit unsigned integer.\n\n We represent u256 values as a string to ensure compatibility with languages such\n as JavaScript that do not parse u256s in JSON natively.\n ",format:"uint256"},Xd={type:"string",description:"A string containing a 64-bit unsigned integer.\n\n We represent u64 values as a string to ensure compatibility with languages such\n as JavaScript that do not parse u64s in JSON natively.\n ",format:"uint64"},$d={description:"A transaction submitted by a user to change the state of the blockchain",properties:{version:{type:"U64",isRequired:!0},hash:{type:"HashValue",isRequired:!0},state_change_hash:{type:"HashValue",isRequired:!0},event_root_hash:{type:"HashValue",isRequired:!0},state_checkpoint_hash:{type:"HashValue"},gas_used:{type:"U64",isRequired:!0},success:{type:"boolean",description:"Whether the transaction was successful",isRequired:!0},vm_status:{type:"string",description:"The VM status of the transaction, can tell useful information in a failure",isRequired:!0},accumulator_root_hash:{type:"HashValue",isRequired:!0},changes:{type:"array",contains:{type:"WriteSetChange"},isRequired:!0},sender:{type:"Address",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},max_gas_amount:{type:"U64",isRequired:!0},gas_unit_price:{type:"U64",isRequired:!0},expiration_timestamp_secs:{type:"U64",isRequired:!0},payload:{type:"TransactionPayload",isRequired:!0},signature:{type:"TransactionSignature"},events:{type:"array",contains:{type:"Event"},isRequired:!0},timestamp:{type:"U64",isRequired:!0}}},el={description:"An event from a transaction with a version",properties:{version:{type:"U64",isRequired:!0},guid:{type:"EventGuid",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},type:{type:"MoveType",isRequired:!0},data:{description:"The JSON representation of the event",properties:{},isRequired:!0}}},tl={description:"View request for the Move View Function API",properties:{function:{type:"EntryFunctionId",isRequired:!0},type_arguments:{type:"array",contains:{type:"MoveType"},isRequired:!0},arguments:{type:"array",contains:{properties:{}},isRequired:!0}}},nl={description:"Write a new module or update an existing one",properties:{address:{type:"Address",isRequired:!0},state_key_hash:{type:"string",description:"State key hash",isRequired:!0},data:{type:"MoveModuleBytecode",isRequired:!0}}},al={description:"Write a resource or update an existing one",properties:{address:{type:"Address",isRequired:!0},state_key_hash:{type:"string",description:"State key hash",isRequired:!0},data:{type:"MoveResource",isRequired:!0}}},ol={type:"one-of",description:"The associated writeset with a payload",contains:[{type:"WriteSet_ScriptWriteSet"},{type:"WriteSet_DirectWriteSet"}]},rl={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"DirectWriteSet"}]},il={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"ScriptWriteSet"}]},sl={type:"one-of",description:"A final state change of a transaction on a resource or module",contains:[{type:"WriteSetChange_DeleteModule"},{type:"WriteSetChange_DeleteResource"},{type:"WriteSetChange_DeleteTableItem"},{type:"WriteSetChange_WriteModule"},{type:"WriteSetChange_WriteResource"},{type:"WriteSetChange_WriteTableItem"}]},cl={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"DeleteModule"}]},ul={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"DeleteResource"}]},dl={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"DeleteTableItem"}]},ll={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"WriteModule"}]},fl={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"WriteResource"}]},pl={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"WriteTableItem"}]},bl={description:"A writeset payload, used only for genesis",properties:{write_set:{type:"WriteSet",isRequired:!0}}},ml={description:"Change set to write a table item",properties:{state_key_hash:{type:"string",isRequired:!0},handle:{type:"HexEncodedBytes",isRequired:!0},key:{type:"HexEncodedBytes",isRequired:!0},value:{type:"HexEncodedBytes",isRequired:!0},data:{type:"DecodedTableData"}}},hl=new pc(Hs.fromHex("0x1"),new ec("string"),new ec("String"),[]);function gl(e,t,n){if(!(null==t?void 0:t.includes(typeof e)))throw new Error(n||"Invalid arg: ".concat(e," type should be ").concat(t instanceof Array?t.join(" or "):t))}function yl(e){throw new Error(e)}function vl(e){return!!e.match(/\s/)}function wl(e){return!!e.match(/[_A-Za-z0-9]/g)}function kl(e,t){var n=e[t];if(":"===n){if("::"===e.slice(t,t+2))return[["COLON","::"],2];yl("Unrecognized token.")}else{if("<"===n)return[["LT","<"],1];if(">"===n)return[["GT",">"],1];if(","===n)return[["COMMA",","],1];if(vl(n)){for(var a="",o=t;o0&&this.tokens[0][1]===e))&&(this.consume(","),!(this.tokens.length>0&&this.tokens[0][1]===e&&t));)this.tokens.length<=0&&yl("Invalid type tag.");return n}},{key:"parseTypeTag",value:function(){0===this.tokens.length&&yl("Invalid type tag.");var e=this.tokens.shift(),t=(0,Nr.Z)(e,2),n=t[0],a=t[1];if("u8"===a)return new ac;if("u16"===a)return new oc;if("u32"===a)return new rc;if("u64"===a)return new ic;if("u128"===a)return new sc;if("u256"===a)return new cc;if("bool"===a)return new nc;if("address"===a)return new uc;if("vector"===a){this.consume("<");var o=this.parseTypeTag();return this.consume(">"),new lc(o)}if("IDENT"===n&&(a.startsWith("0x")||a.startsWith("0X"))){var r=a;this.consume("::");var i=this.tokens.shift(),s=(0,Nr.Z)(i,2),c=s[0],u=s[1];"IDENT"!==c&&yl("Invalid type tag."),this.consume("::");var d=this.tokens.shift(),l=(0,Nr.Z)(d,2),f=l[0],p=l[1];"IDENT"!==f&&yl("Invalid type tag.");var b=[];this.tokens.length>0&&"<"===this.tokens[0][1]&&(this.consume("<"),b=this.parseCommaList(">",!0),this.consume(">"));var m=new pc(Hs.fromHex(r),new ec(u),new ec(p),b);return new fc(m)}throw new Error("Invalid type tag.")}}]),e}();function xl(e){if(gl(e,["boolean","string"]),"boolean"===typeof e)return e;if("true"===e)return!0;if("false"===e)return!1;throw new Error("Invalid boolean string.")}function Il(e){if(gl(e,["number","string"]),"number"===typeof e)return e;var t=Number.parseInt(e,10);if(Number.isNaN(t))throw new Error("Invalid number string.");return t}function Tl(e){return gl(e,["number","bigint","string"]),BigInt(e)}function Sl(e,t,n){if(t instanceof nc)n.serializeBool(xl(e));else if(t instanceof ac)n.serializeU8(Il(e));else if(t instanceof oc)n.serializeU16(Il(e));else if(t instanceof rc)n.serializeU32(Il(e));else if(t instanceof ic)n.serializeU64(Tl(e));else if(t instanceof sc)n.serializeU128(Tl(e));else if(t instanceof cc)n.serializeU256(Tl(e));else{if(!(t instanceof uc)){if(t instanceof lc){if(t.value instanceof ac){if(e instanceof Uint8Array)return void n.serializeBytes(e);if("string"===typeof e)return void n.serializeStr(e)}if(!(e instanceof Array))throw new Error("Invalid vector args.");return n.serializeU32AsUleb128(e.length),void e.forEach((function(e){return Sl(e,t.value,n)}))}if(t instanceof fc){var a=t.value,o=a.address,r=a.module_name,i=a.name;if("0x1::string::String"!=="".concat(rs.fromUint8Array(o.address).toShortString(),"::").concat(r.value,"::").concat(i.value))throw new Error("The only supported struct arg is of type 0x1::string::String");return gl(e,["string"]),void n.serializeStr(e)}throw new Error("Unsupported arg type.")}var s;if("string"===typeof e||e instanceof rs)s=Hs.fromHex(e);else{if(!(e instanceof Hs))throw new Error("Invalid account address.");s=e}s.serialize(n)}}var Cl,El,Rl=function(){function e(t,n){(0,Gr.Z)(this,e),this.rawTxnBuilder=n,this.signingFunction=t}return(0,zr.Z)(e,[{key:"build",value:function(e,t,n){if(!this.rawTxnBuilder)throw new Error("this.rawTxnBuilder doesn't exist.");return this.rawTxnBuilder.build(e,t,n)}}],[{key:"getSigningMessage",value:function(e){var t=_i.create();if(e instanceof bc)t.update("APTOS::RawTransaction");else{if(!(e instanceof xc))throw new Error("Unknown transaction type.");t.update("APTOS::RawTransactionWithData")}var n=t.digest(),a=Ms(e),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),o}}]),e}(),Ml=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(e,a,o){var r;return(0,Gr.Z)(this,n),(r=t.call(this,e,o)).publicKey=a,r}return(0,zr.Z)(n,[{key:"rawToSigned",value:function(e){var t=Rl.getSigningMessage(e),n=this.signingFunction(t),a=new qs(new Gs(this.publicKey),n);return new kc(e,a)}},{key:"sign",value:function(e){return Ms(this.rawToSigned(e))}}]),n}(Rl),Pl=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(e,a){var o;return(0,Gr.Z)(this,n),(o=t.call(this,e)).publicKey=a,o}return(0,zr.Z)(n,[{key:"rawToSigned",value:function(e){var t=Rl.getSigningMessage(e),n=this.signingFunction(t),a=new Qs(this.publicKey,n);return new kc(e,a)}},{key:"sign",value:function(e){return Ms(this.rawToSigned(e))}}]),n}(Rl),Ul=function(){function e(t,n){var a=this;(0,Gr.Z)(this,e),this.abiMap=new Map,t.forEach((function(e){var t,n=new Ss(e),o=Gc.deserialize(n);if(o instanceof Kc){var r=o,i=r.module_name,s=i.address,c=i.name;t="".concat(rs.fromUint8Array(s.address).toShortString(),"::").concat(c.value,"::").concat(r.name)}else{t=o.name}if(a.abiMap.has(t))throw new Error("Found conflicting ABI interfaces");a.abiMap.set(t,o)})),this.builderConfig=(0,Br.Z)({maxGasAmount:BigInt(us),expSecFromNow:20},n)}return(0,zr.Z)(e,[{key:"setSequenceNumber",value:function(e){this.builderConfig.sequenceNumber=BigInt(e)}},{key:"buildTransactionPayload",value:function(t,n,a){var o,r=n.map((function(e){return new Al(e).parseTypeTag()}));if(!this.abiMap.has(t))throw new Error("Cannot find function: ".concat(t));var i=this.abiMap.get(t);if(i instanceof Kc){var s=i,c=e.toBCSArgs(s.args,a);o=new Sc(new hc(s.module_name,new ec(s.name),r,c))}else{if(!(i instanceof zc))throw new Error("Unknown ABI format.");var u=i,d=e.toTransactionArguments(u.args,a);o=new Tc(new mc(u.code,r,d))}return o}},{key:"build",value:function(e,t,n){var a=this.builderConfig,o=a.sender,r=a.sequenceNumber,i=a.gasUnitPrice,s=a.maxGasAmount,c=a.expSecFromNow,u=a.chainId;if(!i)throw new Error("No gasUnitPrice provided.");var d=o instanceof Hs?o:Hs.fromHex(o),l=BigInt(Math.floor(Date.now()/1e3)+Number(c)),f=this.buildTransactionPayload(e,t,n);if(f)return new bc(d,BigInt(r),f,BigInt(s),BigInt(i),l,new Cc(Number(u)));throw new Error("Invalid ABI.")}}],[{key:"toBCSArgs",value:function(e,t){if(e.length!==t.length)throw new Error("Wrong number of args provided.");return t.map((function(t,n){var a=new Is;return Sl(t,e[n].type_tag,a),a.getBytes()}))}},{key:"toTransactionArguments",value:function(e,t){if(e.length!==t.length)throw new Error("Wrong number of args provided.");return t.map((function(t,n){return function(e,t){if(t instanceof nc)return new Oc(xl(e));if(t instanceof ac)return new Rc(Il(e));if(t instanceof oc)return new Mc(Il(e));if(t instanceof rc)return new Pc(Il(e));if(t instanceof ic)return new Uc(Tl(e));if(t instanceof sc)return new _c(Tl(e));if(t instanceof cc)return new Bc(Tl(e));if(t instanceof uc){var n;if("string"===typeof e||e instanceof rs)n=Hs.fromHex(e);else{if(!(e instanceof Hs))throw new Error("Invalid account address.");n=e}return new Dc(n)}if(t instanceof lc&&t.value instanceof ac){if(!(e instanceof Uint8Array))throw new Error("".concat(e," should be an instance of Uint8Array"));return new Nc(e)}throw new Error("Unknown type for TransactionArgument.")}(t,e[n].type_tag)}))}}]),e}(),_l=function(){function e(t,n){(0,Gr.Z)(this,e),this.aptosClient=t,this.builderConfig=n}return(0,zr.Z)(e,[{key:"fetchABI",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t){var n,a,o;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.aptosClient.getAccountModules(t);case 2:return n=e.sent,a=n.map((function(e){return e.abi})).flatMap((function(e){return e.exposed_functions.filter((function(e){return e.is_entry})).map((function(t){return(0,Br.Z)({fullName:"".concat(e.address,"::").concat(e.name,"::").concat(t.name)},t)}))})),o=new Map,a.forEach((function(e){o.set(e.fullName,e)})),e.abrupt("return",o);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"build",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o,r,i,s,c,u,d,l,f,p,b,m,h,g,y,v,w,k,A;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(e){return e.replace(/^0[xX]0*/g,"0x")}(t),3===t.split("::").length){e.next=5;break}throw new Error("'func' needs to be a fully qualified function name in format
::::, e.g. 0x1::coins::transfer");case 5:return o=t.split("::"),r=(0,Nr.Z)(o,2),i=r[0],s=r[1],e.next=8,this.fetchABI(i);case 8:if((c=e.sent).has(t)){e.next=11;break}throw new Error("".concat(t," doesn't exist."));case 11:return u=c.get(t),d=u.params.filter((function(e){return"signer"!==e&&"&signer"!==e})),l=d.map((function(e,t){return new Hc("var".concat(t),new Al(e).parseTypeTag())})),f=new Kc(u.name,yc.fromStr("".concat(i,"::").concat(s)),"",u.generic_type_params.map((function(e,t){return new jc("".concat(t))})),l),p=this.builderConfig,b=p.sender,m=(0,Ur.Z)(p,Yi),h=b instanceof Hs?rs.fromUint8Array(b.address):b,e.next=19,Promise.all([(null==m?void 0:m.sequenceNumber)?Promise.resolve({sequence_number:null==m?void 0:m.sequenceNumber}):this.aptosClient.getAccount(h),(null==m?void 0:m.chainId)?Promise.resolve(null==m?void 0:m.chainId):this.aptosClient.getChainId(),(null==m?void 0:m.gasUnitPrice)?Promise.resolve({gas_estimate:null==m?void 0:m.gasUnitPrice}):this.aptosClient.estimateGasPrice()]);case 19:return g=e.sent,y=(0,Nr.Z)(g,3),v=y[0].sequence_number,w=y[1],k=y[2].gas_estimate,A=new Ul([Ms(f)],(0,Br.Z)({sender:b,sequenceNumber:v,chainId:w,gasUnitPrice:BigInt(k)},m)),e.abrupt("return",A.build(t,n,a));case 26:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()}]),e}();ts([(Cl=6e5,ls({ttlMs:Cl,hashFunction:El}))],_l.prototype,"fetchABI",1);var Bl=function(){function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if((0,Gr.Z)(this,e),!t)throw new Error("Node URL cannot be empty.");var o=void 0===n||null===n?{}:(0,Br.Z)({},n);this.nodeUrl=a?t:function(e){var t="".concat(e);return t.endsWith("/")&&(t=t.substring(0,t.length-1)),t.endsWith(cs)||(t="".concat(t).concat(cs)),t}(t),o.BASE=this.nodeUrl,!1===(null==n?void 0:n.WITH_CREDENTIALS)?o.WITH_CREDENTIALS=!1:o.WITH_CREDENTIALS=!0,this.client=new Tu(o)}return(0,zr.Z)(e,[{key:"getAccount",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t){return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.accounts.getAccount(rs.ensure(t).hex()));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getAccountTransactions",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n){var a;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.transactions.getAccountTransactions(rs.ensure(t).hex(),null==(a=null==n?void 0:n.start)?void 0:a.toString(),null==n?void 0:n.limit));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getAccountModules",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n){var a,o;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.client.accounts.getAccountModules.bind({httpRequest:this.client.request}),e.next=3,bs(a,t,1e3,n);case 3:return o=e.sent,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getAccountModule",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.accounts.getAccountModule(rs.ensure(t).hex(),n,null==(o=null==a?void 0:a.ledgerVersion)?void 0:o.toString()));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getAccountResources",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n){var a,o;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.client.accounts.getAccountResources.bind({httpRequest:this.client.request}),e.next=3,bs(a,t,9999,n);case 3:return o=e.sent,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getAccountResource",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.accounts.getAccountResource(rs.ensure(t).hex(),n,null==(o=null==a?void 0:a.ledgerVersion)?void 0:o.toString()));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"generateTransaction",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o,r,i;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={sender:t},(null==a?void 0:a.sequence_number)&&(o.sequenceNumber=a.sequence_number),(null==a?void 0:a.gas_unit_price)&&(o.gasUnitPrice=a.gas_unit_price),(null==a?void 0:a.max_gas_amount)&&(o.maxGasAmount=a.max_gas_amount),(null==a?void 0:a.expiration_timestamp_secs)&&(r=Number.parseInt(a.expiration_timestamp_secs,10),o.expSecFromNow=r-Math.floor(Date.now()/1e3)),i=new _l(this,o),e.abrupt("return",i.build(n.function,n.type_arguments,n.arguments));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"signTransaction",value:function(){var t=(0,Hr.Z)((0,Dr.Z)().mark((function t(n,a){return(0,Dr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.resolve(e.generateBCSTransaction(n,a)));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"getEventsByCreationNumber",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.events.getEventsByCreationNumber(rs.ensure(t).hex(),n.toString(),null==(o=null==a?void 0:a.start)?void 0:o.toString(),null==a?void 0:a.limit));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getEventsByEventHandle",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o){var r;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.events.getEventsByEventHandle(rs.ensure(t).hex(),n,a,null==(r=null==o?void 0:o.start)?void 0:r.toString(),null==o?void 0:o.limit));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"submitTransaction",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t){return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.submitSignedBCSTransaction(t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"simulateTransaction",value:function(){var t=(0,Hr.Z)((0,Dr.Z)().mark((function t(n,a,o){var r,i,s;return(0,Dr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n instanceof Qc?r=e.generateBCSSimulation(n,a):n instanceof Ks?(i=new Pl((function(){for(var e=n.threshold,t=[],a=[],o=0;o=r)){e.next=7;break}return e.abrupt("break",27);case 7:return e.prev=7,e.next=10,this.client.transactions.getTransactionByHash(t);case 10:if(u=e.sent,s="pending_transaction"===u.type){e.next=14;break}return e.abrupt("break",27);case 14:e.next=22;break;case 16:if(e.prev=16,e.t0=e.catch(7),d=e.t0 instanceof Xc,l=d&&404!==e.t0.status&&e.t0.status>=400&&e.t0.status<500,d&&!l){e.next=22;break}throw e.t0;case 22:return e.next=24,is(1e3);case 24:c+=1,e.next=4;break;case 27:if(void 0!==u){e.next=29;break}throw new Error("Waiting for transaction ".concat(t," failed"));case 29:if(!s){e.next=31;break}throw new Ol("Waiting for transaction ".concat(t," timed out after ").concat(r," seconds"),u);case 31:if(i){e.next=33;break}return e.abrupt("return",u);case 33:if(null==u?void 0:u.success){e.next=35;break}throw new Fl("Transaction ".concat(t," committed to the blockchain but execution failed"),u);case 35:return e.abrupt("return",u);case 36:case"end":return e.stop()}}),e,this,[[7,16]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"waitForTransaction",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n){return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.waitForTransactionWithResult(t,n);case 2:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getLedgerInfo",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(){return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.general.getLedgerInfo());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getChainId",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(){var t;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getLedgerInfo();case 2:return t=e.sent,e.abrupt("return",t.chain_id);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getTableItem",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o,r;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.tables.getTableItem(t,n,null==(o=null==a?void 0:a.ledgerVersion)?void 0:o.toString());case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"generateRawTransaction",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o,r,i,s,c,u,d,l,f;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this.getAccount(t),this.getChainId(),(null==a?void 0:a.gasUnitPrice)?Promise.resolve({gas_estimate:a.gasUnitPrice}):this.estimateGasPrice()]);case 2:return o=e.sent,r=(0,Nr.Z)(o,3),i=r[0].sequence_number,s=r[1],c=r[2].gas_estimate,u=(0,Br.Z)({maxGasAmount:BigInt(us),gasUnitPrice:BigInt(c),expireTimestamp:BigInt(Math.floor(Date.now()/1e3)+20)},a),d=u.maxGasAmount,l=u.gasUnitPrice,f=u.expireTimestamp,e.abrupt("return",new hs.RawTransaction(hs.AccountAddress.fromHex(t),BigInt(i),n,d,l,f,new hs.ChainId(s)));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"generateSignSubmitTransaction",value:function(){var t=(0,Hr.Z)((0,Dr.Z)().mark((function t(n,a,o){var r,i,s;return(0,Dr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.generateRawTransaction(n.address(),a,o);case 2:return r=t.sent,i=e.generateBCSTransaction(n,r),t.next=6,this.submitSignedBCSTransaction(i);case 6:return s=t.sent,t.abrupt("return",s.hash);case 8:case"end":return t.stop()}}),t,this)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"publishPackage",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o){var r,i;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new Is,Cs(a,r),i=new hs.TransactionPayloadEntryFunction(hs.EntryFunction.natural("0x1::code","publish_package_txn",[],[Fs(n),r.getBytes()])),e.abrupt("return",this.generateSignSubmitTransaction(t,i,o));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"generateSignSubmitWaitForTransaction",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.generateSignSubmitTransaction(t,n,a);case 2:return o=e.sent,e.abrupt("return",this.waitForTransactionWithResult(o,a));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"estimateGasPrice",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(){return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.transactions.estimateGasPrice());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"estimateMaxGasAmount",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t){var n,a,o,r,i,s,c;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="0x1::coin::CoinStore<".concat(ds,">"),e.next=3,Promise.all([this.estimateGasPrice(),this.getAccountResources(t)]);case 3:return a=e.sent,o=(0,Nr.Z)(a,2),r=o[0].gas_estimate,i=o[1],s=i.find((function(e){return e.type===n})),c=BigInt(s.data.coin.value),e.abrupt("return",c/BigInt(r));case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"rotateAuthKeyEd25519",value:function(){var t=(0,Hr.Z)((0,Dr.Z)().mark((function t(n,a,o){var r,i,s,c,u,d,l,f,p,b,m;return(0,Dr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getAccount(n.address());case 2:return r=t.sent,i=r.sequence_number,s=r.authentication_key,c=new Qc(a),u=new hs.RotationProofChallenge(hs.AccountAddress.CORE_CODE_ADDRESS,"account","RotationProofChallenge",BigInt(i),hs.AccountAddress.fromHex(n.address()),new hs.AccountAddress(new rs(s).toUint8Array()),c.pubKey().toUint8Array()),d=rs.fromUint8Array(Ms(u)),l=n.signHexString(d),f=c.signHexString(d),p=new hs.TransactionPayloadEntryFunction(hs.EntryFunction.natural("0x1::account","rotate_authentication_key",[],[Us(0),Fs(n.pubKey().toUint8Array()),Us(0),Fs(c.pubKey().toUint8Array()),Fs(l.toUint8Array()),Fs(f.toUint8Array())])),t.next=13,this.generateRawTransaction(n.address(),p,o);case 13:return b=t.sent,m=e.generateBCSTransaction(n,b),t.abrupt("return",this.submitSignedBCSTransaction(m));case 16:case"end":return t.stop()}}),t,this)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"lookupOriginalAddress",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t){var n,a,o;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccountResource("0x1","0x1::account::OriginatingAddress");case 2:return n=e.sent,a=n.data.address_map.handle,e.next=6,this.getTableItem(a,{key_type:"address",value_type:"address",key:rs.ensure(t).hex()});case 6:return o=e.sent,e.abrupt("return",new rs(o));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getBlockByHeight",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n){return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.blocks.getBlockByHeight(t,n));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getBlockByVersion",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n){return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.blocks.getBlockByVersion(t,n));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"clearCache",value:function(e){!function(e){var t,n=new Set,a=(0,jr.Z)(e);try{for(a.s();!(t=a.n()).done;){var o=t.value,r=fs.get(o);if(r){var i,s=(0,jr.Z)(r);try{for(s.s();!(i=s.n()).done;){var c=i.value;n.has(c)||(c.clear(),n.add(c))}}catch(u){s.e(u)}finally{s.f()}}}}catch(u){a.e(u)}finally{a.f()}n.size}(e)}}],[{key:"generateBCSTransaction",value:function(e,t){return new Ml((function(t){var n=e.signBuffer(t);return new hs.Ed25519Signature(n.toUint8Array())}),e.pubKey().toUint8Array()).sign(t)}},{key:"generateBCSSimulation",value:function(e,t){return new Ml((function(e){var t=new Uint8Array(64);return new hs.Ed25519Signature(t)}),e.pubKey().toUint8Array()).sign(t)}}]),e}(),Dl=Bl;ts([Ll],Dl.prototype,"getAccount",1),ts([Ll],Dl.prototype,"getAccountTransactions",1),ts([Ll],Dl.prototype,"getAccountModules",1),ts([Ll],Dl.prototype,"getAccountModule",1),ts([Ll],Dl.prototype,"getAccountResources",1),ts([Ll],Dl.prototype,"getAccountResource",1),ts([Ll],Dl.prototype,"getEventsByCreationNumber",1),ts([Ll],Dl.prototype,"getEventsByEventHandle",1),ts([Ll],Dl.prototype,"submitSignedBCSTransaction",1),ts([Ll],Dl.prototype,"submitBCSSimulation",1),ts([Ll],Dl.prototype,"getTransactions",1),ts([Ll],Dl.prototype,"getTransactionByHash",1),ts([Ll],Dl.prototype,"getTransactionByVersion",1),ts([Ll],Dl.prototype,"getLedgerInfo",1),ts([ls()],Dl.prototype,"getChainId",1),ts([Ll],Dl.prototype,"getTableItem",1),ts([Ll,ls({ttlMs:3e5,tags:["gas_estimates"]})],Dl.prototype,"estimateGasPrice",1),ts([Ll],Dl.prototype,"estimateMaxGasAmount",1),ts([Ll],Dl.prototype,"getBlockByHeight",1),ts([Ll],Dl.prototype,"getBlockByVersion",1);var Nl=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(e,a,o,r){var i;return(0,Gr.Z)(this,n),(i=t.call(this,a)).status=e,i.message=a,i.errorCode=o,i.vmErrorCode=r,i}return(0,zr.Z)(n)}((0,Or.Z)(Error)),Ol=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(e,a){var o;return(0,Gr.Z)(this,n),(o=t.call(this,e)).lastSubmittedTransaction=a,o}return(0,zr.Z)(n)}((0,Or.Z)(Error)),Fl=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(e,a){var o;return(0,Gr.Z)(this,n),(o=t.call(this,e)).transaction=a,o}return(0,zr.Z)(n)}((0,Or.Z)(Error));function Ll(e,t,n){var a=n.value;return n.value=function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(){var t,n,o,r,i,s,c=arguments;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(e.prev=0,o=c.length,r=new Array(o),i=0;i4&&void 0!==c[4]?c[4]:ks,i=c.length>5?c[5]:void 0,s=this.transactionBuilder.buildTransactionPayload("0x3::token::create_collection_script",[],[n,a,o,r,[!1,!1,!1]]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,s,i));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"createToken",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o,r,i){var s,c,u,d,l,f,p,b,m,h=arguments;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=h.length>6&&void 0!==h[6]?h[6]:ks,c=h.length>7&&void 0!==h[7]?h[7]:t.address(),u=h.length>8&&void 0!==h[8]?h[8]:0,d=h.length>9&&void 0!==h[9]?h[9]:0,l=h.length>10&&void 0!==h[10]?h[10]:[],f=h.length>11&&void 0!==h[11]?h[11]:[],p=h.length>12&&void 0!==h[12]?h[12]:[],b=h.length>13?h[13]:void 0,m=this.transactionBuilder.buildTransactionPayload("0x3::token::create_token_script",[],[n,a,o,r,s,i,c,u,d,[!1,!1,!1,!1,!1],l,Kl(f,p),p]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,m,b));case 10:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i){return e.apply(this,arguments)}}()},{key:"createTokenWithMutabilityConfig",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o,r,i){var s,c,u,d,l,f,p,b,m,h,g=arguments;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=g.length>6&&void 0!==g[6]?g[6]:ks,c=g.length>7&&void 0!==g[7]?g[7]:t.address(),u=g.length>8&&void 0!==g[8]?g[8]:0,d=g.length>9&&void 0!==g[9]?g[9]:0,l=g.length>10&&void 0!==g[10]?g[10]:[],f=g.length>11&&void 0!==g[11]?g[11]:[],p=g.length>12&&void 0!==g[12]?g[12]:[],b=g.length>13&&void 0!==g[13]?g[13]:[!1,!1,!1,!1,!1],m=g.length>14?g[14]:void 0,h=this.transactionBuilder.buildTransactionPayload("0x3::token::create_token_script",[],[n,a,o,r,s,i,c,u,d,b,l,f,p]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,h,m));case 11:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i){return e.apply(this,arguments)}}()},{key:"offerToken",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o,r,i){var s,c,u,d=arguments;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=d.length>6&&void 0!==d[6]?d[6]:0,c=d.length>7?d[7]:void 0,u=this.transactionBuilder.buildTransactionPayload("0x3::token_transfers::offer_script",[],[n,a,o,r,s,i]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,u,c));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i){return e.apply(this,arguments)}}()},{key:"claimToken",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o,r){var i,s,c,u=arguments;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>5&&void 0!==u[5]?u[5]:0,s=u.length>6?u[6]:void 0,c=this.transactionBuilder.buildTransactionPayload("0x3::token_transfers::claim_script",[],[n,a,o,r,i]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,c,s));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r){return e.apply(this,arguments)}}()},{key:"cancelTokenOffer",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o,r){var i,s,c,u=arguments;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>5&&void 0!==u[5]?u[5]:0,s=u.length>6?u[6]:void 0,c=this.transactionBuilder.buildTransactionPayload("0x3::token_transfers::cancel_offer_script",[],[n,a,o,r,i]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,c,s));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r){return e.apply(this,arguments)}}()},{key:"directTransferToken",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o,r,i){var s,c,u,d,l,f,p,b,m,h,g,y,v=arguments;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=v.length>6&&void 0!==v[6]?v[6]:0,c=v.length>7?v[7]:void 0,u=this.transactionBuilder.buildTransactionPayload("0x3::token::direct_transfer_script",[],[a,o,r,s,i]),e.next=5,this.aptosClient.generateRawTransaction(t.address(),u,c);case 5:return d=e.sent,l=new hs.MultiAgentRawTransaction(d,[hs.AccountAddress.fromHex(n.address())]),f=new hs.Ed25519Signature(t.signBuffer(Rl.getSigningMessage(l)).toUint8Array()),p=new hs.AccountAuthenticatorEd25519(new hs.Ed25519PublicKey(t.signingKey.publicKey),f),b=new hs.Ed25519Signature(n.signBuffer(Rl.getSigningMessage(l)).toUint8Array()),m=new hs.AccountAuthenticatorEd25519(new hs.Ed25519PublicKey(n.signingKey.publicKey),b),h=new hs.TransactionAuthenticatorMultiAgent(p,[hs.AccountAddress.fromHex(n.address())],[m]),g=Ms(new hs.SignedTransaction(d,h)),e.next=15,this.aptosClient.submitSignedBCSTransaction(g);case 15:return y=e.sent,e.abrupt("return",y.hash);case 17:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i){return e.apply(this,arguments)}}()},{key:"optInTokenTransfer",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.transactionBuilder.buildTransactionPayload("0x3::token::opt_in_direct_transfer",[],[n]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,o,a));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"transferWithOptIn",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o,r,i,s,c){var u;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=new Tc(new mc(new rs("a11ceb0b0500000006010004020408030c0a05161d073339086c400000010100020700010307000104030100010504020007060c0508000800030503010801000405080008000304060c0801050306737472696e6705746f6b656e06537472696e6707546f6b656e4964136372656174655f746f6b656e5f69645f726177087472616e73666572000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000030000010c0b010b020b030b0411000c070b000b070b050b06110102").toUint8Array(),[],[new Dc(hs.AccountAddress.fromHex(n)),new Nc((new TextEncoder).encode(a)),new Nc((new TextEncoder).encode(o)),new Uc(BigInt(r)),new Dc(hs.AccountAddress.fromHex(i)),new Uc(BigInt(s))])),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,u,c));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i,s,c){return e.apply(this,arguments)}}()},{key:"burnByCreator",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o,r,i,s){var c;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=this.transactionBuilder.buildTransactionPayload("0x3::token::burn_by_creator",[],[n,a,o,r,i]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,c,s));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i,s){return e.apply(this,arguments)}}()},{key:"burnByOwner",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o,r,i,s){var c;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=this.transactionBuilder.buildTransactionPayload("0x3::token::burn",[],[n,a,o,r,i]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,c,s));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i,s){return e.apply(this,arguments)}}()},{key:"mutateTokenProperties",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a,o,r,i,s,c,u,d,l){var f;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f=this.transactionBuilder.buildTransactionPayload("0x3::token::mutate_token_properties",[],[n,a,o,r,i,s,c,u,d]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,f,l));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i,s,c,u,d,l){return e.apply(this,arguments)}}()},{key:"getCollectionData",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n){var a,o,r,i,s;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.aptosClient.getAccountResources(t);case 2:return a=e.sent,o=a.find((function(e){return"0x3::token::Collections"===e.type})),r=o.data.collection_data.handle,i={key_type:"0x1::string::String",value_type:"0x3::token::CollectionData",key:n},e.next=8,this.aptosClient.getTableItem(r,i);case 8:return s=e.sent,e.abrupt("return",s);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getTokenData",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o,r,i,s,c;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t instanceof rs?t.hex():t,e.next=3,this.aptosClient.getAccountResource(o,"0x3::token::Collections");case 3:return r=e.sent,i=r.data.token_data.handle,s={key_type:"0x3::token::TokenDataId",value_type:"0x3::token::TokenData",key:{creator:o,collection:n,name:a}},e.next=9,this.aptosClient.getTableItem(i,s);case 9:return c=e.sent,e.abrupt("return",new Zl(c.collection,c.description,c.name,c.maximum,c.supply,c.uri,c.default_properties,c.mutability_config));case 11:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getToken",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n,a){var o,r,i=arguments;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=i.length>3&&void 0!==i[3]?i[3]:"0",r={creator:t instanceof rs?t.hex():t,collection:n,name:a},e.abrupt("return",this.getTokenForAccount(t,{token_data_id:r,property_version:o}));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getTokenForAccount",value:function(){var e=(0,Hr.Z)((0,Dr.Z)().mark((function e(t,n){var a,o,r,i;return(0,Dr.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.aptosClient.getAccountResource(t instanceof rs?t.hex():t,"0x3::token::TokenStore");case 2:return a=e.sent,o=a.data.tokens.handle,r={key_type:"0x3::token::TokenId",value_type:"0x3::token::Token",key:n},e.prev=5,e.next=8,this.aptosClient.getTableItem(o,r);case 8:return i=e.sent,e.abrupt("return",new Vl(i.id,i.amount,i.token_properties));case 12:if(e.prev=12,e.t0=e.catch(5),404!==(null==e.t0?void 0:e.t0.status)){e.next=16;break}return e.abrupt("return",{id:n,amount:"0",token_properties:new Gl});case 16:return e.abrupt("return",e.t0);case 17:case"end":return e.stop()}}),e,this,[[5,12]])})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),Ql=n(20747),Jl=n(61117),Yl=n(65218),Xl=n(54659).Buffer,$l=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},ef=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},nf=function(e,t,n,a){return e.generateTransaction(t.address(),n,a).then((function(n){return mf(e,t,n)}))},af=function(e,t,n,a){return $l(void 0,void 0,void 0,(function(){var o,r,i,s,c;return ef(this,(function(u){switch(u.label){case 0:return o=Object.assign({gas_unit_price:"100",max_gas_amount:"30000"},a),[4,Promise.all([e.getAccount(t.address()),e.getChainId()])];case 1:return r=tf.apply(void 0,[u.sent(),2]),i=r[0].sequence_number,s=r[1],c=new hs.RawTransaction(hs.AccountAddress.fromHex(t.address()),BigInt(i),n,BigInt(o.max_gas_amount),BigInt(o.gas_unit_price),BigInt(Math.floor(Date.now()/1e3)+10),new hs.ChainId(s)),[2,mf(e,t,c)]}}))}))},of=function(e,t,n){if(t===q)return sf(n)?cT(n):(Yl.error("Invalid qualified type"),null);var a=rf(e,t,n);return a?cT(a)+"::coin::T":null},rf=function(e,t,n){if(t===q)return null;var a=Xl.alloc(1);a.writeUInt8(255);var o=Xl.alloc(2);return o.writeUInt16BE(t),(0,Jl.sha3_256)(Xl.concat([sT((0,Ql.hexZeroPad)(cT(e),32)),o,Xl.from("::","ascii"),sT((0,Ql.hexZeroPad)(cT(n),32)),a]))},sf=function(e){return/^(0x)?[0-9a-fA-F]+::\w+::\w+$/.test(e)},cf=function(e){return(0,Jl.sha3_256)(e)};function uf(e,t,n){return $l(this,void 0,void 0,(function(){var a,o,r,i,s;return ef(this,(function(c){switch(c.label){case 0:return t=cT(t),[4,e.getAccountResource(t,t+"::state::State")];case 1:a=c.sent().data,o=a.native_infos.handle,c.label=2;case 2:return c.trys.push([2,4,,5]),[4,e.getTableItem(o,{key_type:t+"::token_hash::TokenHash",value_type:"0x1::type_info::TypeInfo",key:{hash:n}})];case 3:return(r=c.sent())?(i=Xl.from(r.module_name.substring(2),"hex").toString("ascii"),s=Xl.from(r.struct_name.substring(2),"hex").toString("ascii"),[2,r.account_address+"::"+i+"::"+s]):[2,null];case 4:return c.sent(),[2,null];case 5:return[2]}}))}))}var df=function(e){return e.split("::")[0]},lf=function(e,t,n){return $l(void 0,void 0,void 0,(function(){var a,o,r;return ef(this,(function(i){switch(i.label){case 0:return(a=le(t))===q?[2,null]:((o=Xl.alloc(2)).writeUInt16BE(a),r=Xl.concat([o,Xl.from(n)]),[4,Qc.getResourceAccountAddress(e,r)]);case 1:return[2,i.sent().toString()]}}))}))},ff=function(e){return $l(void 0,void 0,void 0,(function(){var t;return ef(this,(function(n){return t=Xl.concat([gs.bcsToBytes(hs.AccountAddress.fromHex(e.token_data_id.creator)),Xl.from((0,Jl.sha3_256)(e.token_data_id.collection),"hex")]),[2,new Uint8Array(Xl.from((0,Jl.sha3_256)(t),"hex"))]}))}))},pf=function(e){return $l(void 0,void 0,void 0,(function(){var t,n;return ef(this,(function(a){return(t=Xl.alloc(8)).writeBigUInt64BE(BigInt(e.property_version)),n=Xl.concat([gs.bcsToBytes(hs.AccountAddress.fromHex(e.token_data_id.creator)),Xl.from((0,Jl.sha3_256)(e.token_data_id.collection),"hex"),Xl.from((0,Jl.sha3_256)(e.token_data_id.name),"hex"),t]),[2,new Uint8Array(Xl.from((0,Jl.sha3_256)(n),"hex"))]}))}))},bf=function(e,t,n){return $l(void 0,void 0,void 0,(function(){var a,o,r,i,s;return ef(this,(function(c){switch(c.label){case 0:return[4,e.getAccountResource(t,t+"::state::State")];case 1:return a=c.sent().data,o=a.native_infos.handle,[4,e.getTableItem(o,{key_type:t+"::token_hash::TokenHash",value_type:"0x3::token::TokenId",key:{hash:rs.fromUint8Array(n).hex()}})];case 2:return r=c.sent(),i=r.token_data_id,s=r.property_version,[2,{token_data_id:i,property_version:s}]}}))}))},mf=function(e,t,n){return $l(void 0,void 0,void 0,(function(){return ef(this,(function(a){switch(a.label){case 0:return[4,e.simulateTransaction(t,n).then((function(e){return e.forEach((function(e){if(!e.success)throw new Error("Transaction failed: "+e.vm_status+"\n"+JSON.stringify(e,null,2))}))}))];case 1:return a.sent(),[2,e.signTransaction(t,n).then((function(t){return e.submitTransaction(t)})).then((function(t){return e.waitForTransactionWithResult(t.hash)}))]}}))}))},hf=n(7965),gf=n(8594),yf=n(77728),vf=n(60492);function wf(e,t){return gf.PublicKey.findProgramAddressSync(e,new gf.PublicKey(t))[0]}function kf(e,t){return{pubkey:new gf.PublicKey(e),isWritable:!0,isSigner:t}}function Af(e,t){return{pubkey:new gf.PublicKey(e),isWritable:!1,isSigner:t}}function xf(e){if(null===e)throw Error("account info is null");return e.data}var If=function(){function e(){}return e.programId=new gf.PublicKey("BPFLoaderUpgradeab1e11111111111111111111111"),e}();function Tf(e){return wf([new gf.PublicKey(e).toBuffer()],If.programId)}function Sf(e){if(void 0!==e)return{connection:e}}var Cf=n(54659).Buffer,Ef=65,Rf=20;function Mf(e,t,n){return{keys:[],programId:gf.Secp256k1Program.programId,data:Uf.serialize(e,t,n)}}var Pf,Uf=function(){function e(){}return e.serialize=function(e,t,n){if(0==e.length)throw Error("signatures.length == 0");if(e.length!=t.length)throw Error("signatures.length != keys.length");if(32!=n.length)throw Error("message.length != 32");var a=e.length,o=11,r=1+a*o,i=Ef+Rf,s=r+a*i,c=Cf.alloc(s+32);c.writeUInt8(a,0),c.write(n.toString("hex"),s,"hex");for(var u=0;u0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},Ff=function(){function e(e,t,n){this.address=new gf.PublicKey(e),this.verified=t,this.share=n}return e.prototype.serialize=function(){var t=_f.alloc(e.size);return t.write(this.address.toBuffer().toString("hex"),0,"hex"),this.verified&&t.writeUInt8(1,32),t.writeUInt8(this.share,33),t},e.deserialize=function(t){return new e(t.subarray(0,32),t.readUInt8(32)>0,t.readUInt8(33))},e.size=34,e}(),Lf=function(){function e(e,t,n,a,o){this.name=e,this.symbol=t,this.uri=n,this.sellerFeeBasisPoints=a,this.creators=o}return e.prototype.serialize=function(){var e=this.name.length,t=this.symbol.length,n=this.uri.length,a=this.creators,o=Of(function(){if(null===a)return[0,0];var e=a.length;return[e,4+e*Ff.size]}(),2),r=o[0],i=o[1],s=_f.alloc(15+e+t+n+i);if(s.writeUInt32LE(e,0),s.write(this.name,4),s.writeUInt32LE(t,4+e),s.write(this.symbol,8+e),s.writeUInt32LE(n,8+e+t),s.write(this.uri,12+e+t),s.writeUInt16LE(this.sellerFeeBasisPoints,12+e+t+n),null===a)s.writeUInt8(0,14+e+t+n);else{s.writeUInt8(1,14+e+t+n),s.writeUInt32LE(r,15+e+t+n);for(var c=0;c0,t.readUInt8(66+i)>0)},e}();function Kf(e,t,n){return Df(this,void 0,void 0,(function(){return Nf(this,(function(a){return[2,e.getAccountInfo(Gf(t),n).then((function(e){return zf.deserialize(xf(e))}))]}))}))}var Wf=n(65218),Zf=function(){return Zf=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},Jf=function(e,t){for(var n=0,a=t.length,o=e.length;n=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Xf(){for(var e=[],t=0;to)return[2,Promise.reject("Reached the maximum number of retries.")];w.label=12;case 12:return d=u.next(),[3,2];case 13:return[3,16];case 14:return g=w.sent(),y={error:g},[3,16];case 15:try{d&&!d.done&&(v=u.return)&&v.call(u)}finally{if(y)throw y.error}return[7];case 16:return[2,Promise.resolve(c)]}}))}))}var ap=n(54659).Buffer,op=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},rp=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},Bp=function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("uint8",e,t)}},{key:"uint16",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN(this.useThisEndian("uint16"),e,t)}},{key:"uint16le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("uint16le",e,t)}},{key:"uint16be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("uint16be",e,t)}},{key:"uint32",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN(this.useThisEndian("uint32"),e,t)}},{key:"uint32le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("uint32le",e,t)}},{key:"uint32be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("uint32be",e,t)}},{key:"int8",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("int8",e,t)}},{key:"int16",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN(this.useThisEndian("int16"),e,t)}},{key:"int16le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("int16le",e,t)}},{key:"int16be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("int16be",e,t)}},{key:"int32",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN(this.useThisEndian("int32"),e,t)}},{key:"int32le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("int32le",e,t)}},{key:"int32be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("int32be",e,t)}},{key:"bigIntVersionCheck",value:function(){if(!DataView.prototype.getBigInt64)throw new Error("BigInt64 is unsupported on this runtime")}},{key:"int64",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("int64"),e,t)}},{key:"int64be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN("int64be",e,t)}},{key:"int64le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN("int64le",e,t)}},{key:"uint64",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("uint64"),e,t)}},{key:"uint64be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN("uint64be",e,t)}},{key:"uint64le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN("uint64le",e,t)}},{key:"floatle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("floatle",e,t)}},{key:"floatbe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("floatbe",e,t)}},{key:"doublele",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("doublele",e,t)}},{key:"doublebe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("doublebe",e,t)}},{key:"bitN",value:function(e,t,n){return n.length=e,this.setNextParser("bit",t,n)}},{key:"bit1",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(1,e,t)}},{key:"bit2",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(2,e,t)}},{key:"bit3",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(3,e,t)}},{key:"bit4",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(4,e,t)}},{key:"bit5",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(5,e,t)}},{key:"bit6",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(6,e,t)}},{key:"bit7",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(7,e,t)}},{key:"bit8",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(8,e,t)}},{key:"bit9",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(9,e,t)}},{key:"bit10",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(10,e,t)}},{key:"bit11",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(11,e,t)}},{key:"bit12",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(12,e,t)}},{key:"bit13",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(13,e,t)}},{key:"bit14",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(14,e,t)}},{key:"bit15",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(15,e,t)}},{key:"bit16",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(16,e,t)}},{key:"bit17",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(17,e,t)}},{key:"bit18",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(18,e,t)}},{key:"bit19",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(19,e,t)}},{key:"bit20",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(20,e,t)}},{key:"bit21",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(21,e,t)}},{key:"bit22",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(22,e,t)}},{key:"bit23",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(23,e,t)}},{key:"bit24",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(24,e,t)}},{key:"bit25",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(25,e,t)}},{key:"bit26",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(26,e,t)}},{key:"bit27",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(27,e,t)}},{key:"bit28",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(28,e,t)}},{key:"bit29",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(29,e,t)}},{key:"bit30",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(30,e,t)}},{key:"bit31",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(31,e,t)}},{key:"bit32",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(32,e,t)}},{key:"namely",value:function(e){return Lp.set(e,this),this.alias=e,this}},{key:"skip",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.seek(e,t)}},{key:"seek",value:function(e){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).assert)throw new Error("assert option on seek is not allowed.");return this.setNextParser("seek","",{length:e})}},{key:"string",value:function(e,t){if(!t.zeroTerminated&&!t.length&&!t.greedy)throw new Error("One of length, zeroTerminated, or greedy must be defined for string.");if((t.zeroTerminated||t.length)&&t.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(t.stripNull&&!t.length&&!t.greedy)throw new Error("length or greedy must be defined if stripNull is enabled.");return t.encoding=t.encoding||"utf8",this.setNextParser("string",e,t)}},{key:"buffer",value:function(e,t){if(!t.length&&!t.readUntil)throw new Error("length or readUntil must be defined for buffer.");return this.setNextParser("buffer",e,t)}},{key:"wrapped",value:function(e,t){if("object"!==typeof t&&"object"===typeof e&&(t=e,e=""),!t||!t.wrapper||!t.type)throw new Error("Both wrapper and type must be defined for wrapped.");if(!t.length&&!t.readUntil)throw new Error("length or readUntil must be defined for wrapped.");return this.setNextParser("wrapper",e,t)}},{key:"array",value:function(e,t){if(!t.readUntil&&!t.length&&!t.lengthInBytes)throw new Error("One of readUntil, length and lengthInBytes must be defined for array.");if(!t.type)throw new Error("type is required for array.");if("string"===typeof t.type&&!Lp.has(t.type)&&!(t.type in Hp))throw new Error('Array element type "'.concat(t.type,'" is unkown.'));return this.setNextParser("array",e,t)}},{key:"choice",value:function(e,t){if("object"!==typeof t&&"object"===typeof e&&(t=e,e=""),!t)throw new Error("tag and choices are are required for choice.");if(!t.tag)throw new Error("tag is requird for choice.");if(!t.choices)throw new Error("choices is required for choice.");for(var n in t.choices){var a=parseInt(n,10),o=t.choices[a];if(isNaN(a))throw new Error('Choice key "'.concat(n,'" is not a number.'));if("string"===typeof o&&!Lp.has(o)&&!(o in Hp))throw new Error('Choice type "'.concat(o,'" is unkown.'))}return this.setNextParser("choice",e,t)}},{key:"nest",value:function(t,n){if("object"!==typeof n&&"object"===typeof t&&(n=t,t=""),!n||!n.type)throw new Error("type is required for nest.");if(!(n.type instanceof e)&&!Lp.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof e)&&!t)throw new Error("type must be a Parser object if the variable name is omitted.");return this.setNextParser("nest",t,n)}},{key:"pointer",value:function(e,t){if(!t.offset)throw new Error("offset is required for pointer.");if(!t.type)throw new Error("type is required for pointer.");if("string"===typeof t.type&&!(t.type in Hp)&&!Lp.has(t.type))throw new Error('Pointer type "'.concat(t.type,'" is unkown.'));return this.setNextParser("pointer",e,t)}},{key:"saveOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.setNextParser("saveOffset",e,t)}},{key:"endianness",value:function(e){switch(e.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error('endianness must be one of "little" or "big"')}return this}},{key:"endianess",value:function(e){return this.endianness(e)}},{key:"useContextVars",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.useContextVariables=e,this}},{key:"create",value:function(e){if(!(e instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=e,this}},{key:"getContext",value:function(e){var t=new Fp(e,this.useContextVariables);return t.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(t),t.pushCode("return ".concat(jp+this.alias,"(0).result;"))):this.addRawCode(t),t}},{key:"getCode",value:function(){return this.getContext("imports").code}},{key:"addRawCode",value:function(e){e.pushCode("var offset = 0;"),e.pushCode("var vars = ".concat(this.constructorFn?"new constructorFn()":"{}",";")),e.pushCode("vars.$parent = null;"),e.pushCode("vars.$root = vars;"),this.generate(e),this.resolveReferences(e),e.pushCode("delete vars.$parent;"),e.pushCode("delete vars.$root;"),e.pushCode("return vars;")}},{key:"addAliasedCode",value:function(e){return e.pushCode("function ".concat(jp+this.alias,"(offset, context) {")),e.pushCode("var vars = ".concat(this.constructorFn?"new constructorFn()":"{}",";")),e.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"),e.pushCode("vars = Object.assign(vars, ctx);"),this.generate(e),e.markResolved(this.alias),this.resolveReferences(e),e.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"),e.pushCode("return { offset: offset, result: vars };"),e.pushCode("}"),e}},{key:"resolveReferences",value:function(e){var t=e.getUnresolvedReferences();e.markRequested(t),t.forEach((function(t){var n;null===(n=Lp.get(t))||void 0===n||n.addAliasedCode(e)}))}},{key:"compile",value:function(){var e="imports",t=this.getContext(e);this.compiled=new Function(e,"TextDecoder","return function (buffer, constructorFn) { ".concat(t.code," };"))(t.imports,TextDecoder)}},{key:"sizeOf",value:function(){var t=NaN;if(Object.keys(Hp).indexOf(this.type)>=0)t=Hp[this.type];else if("string"===this.type&&"number"===typeof this.options.length)t=this.options.length;else if("buffer"===this.type&&"number"===typeof this.options.length)t=this.options.length;else if("array"===this.type&&"number"===typeof this.options.length){var n=NaN;"string"===typeof this.options.type?n=Hp[this.options.type]:this.options.type instanceof e&&(n=this.options.type.sizeOf()),t=this.options.length*n}else"seek"===this.type?t=this.options.length:"nest"===this.type?t=this.options.type.sizeOf():this.type||(t=0);return this.next&&(t+=this.next.sizeOf()),t}},{key:"parse",value:function(e){return this.compiled||this.compile(),this.compiled(e,this.constructorFn)}},{key:"setNextParser",value:function(t,n,a){var o=new e;return o.type=t,o.varName=n,o.options=a,o.endian=this.endian,this.head?this.head.next=o:this.next=o,this.head=o,this}},{key:"generate",value:function(e){if(this.type){switch(this.type){case"uint8":case"uint16le":case"uint16be":case"uint32le":case"uint32be":case"int8":case"int16le":case"int16be":case"int32le":case"int32be":case"int64be":case"int64le":case"uint64be":case"uint64le":case"floatle":case"floatbe":case"doublele":case"doublebe":this.primitiveGenerateN(this.type,e);break;case"bit":this.generateBit(e);break;case"string":this.generateString(e);break;case"buffer":this.generateBuffer(e);break;case"seek":this.generateSeek(e);break;case"nest":this.generateNest(e);break;case"array":this.generateArray(e);break;case"choice":this.generateChoice(e);break;case"pointer":this.generatePointer(e);break;case"saveOffset":this.generateSaveOffset(e);break;case"wrapper":this.generateWrapper(e)}"bit"!==this.type&&this.generateAssert(e)}var t=e.generateVariable(this.varName);return this.options.formatter&&"bit"!==this.type&&this.generateFormatter(e,t,this.options.formatter),this.generateNext(e)}},{key:"generateAssert",value:function(e){if(this.options.assert){var t=e.generateVariable(this.varName);switch(typeof this.options.assert){case"function":var n=e.addImport(this.options.assert);e.pushCode("if (!".concat(n,".call(vars, ").concat(t,")) {"));break;case"number":e.pushCode("if (".concat(this.options.assert," !== ").concat(t,") {"));break;case"string":e.pushCode("if (".concat(JSON.stringify(this.options.assert)," !== ").concat(t,") {"));break;default:throw new Error("assert option must be a string, number or a function.")}e.generateError('"Assertion error: '.concat(t,' is " + ').concat(JSON.stringify(this.options.assert.toString()))),e.pushCode("}")}}},{key:"generateNext",value:function(e){return this.next&&(e=this.next.generate(e)),e}},{key:"generateBit",value:function(e){var t=JSON.parse(JSON.stringify(this));if(t.options=this.options,t.generateAssert=this.generateAssert.bind(this),t.generateFormatter=this.generateFormatter.bind(this),t.varName=e.generateVariable(t.varName),e.bitFields.push(t),!this.next||this.next&&["bit","nest"].indexOf(this.next.type)<0){var n=e.generateTmpVariable();e.pushCode("var ".concat(n," = 0;"));var a=0,o="be"===this.endian,r=0,i=0;e.bitFields.forEach((function(t,s){var c=t.options.length;if(c>i){if(i){var u=-1>>>32-i;e.pushCode("".concat(t.varName," = (").concat(n," & 0x").concat(u.toString(16),") << ").concat(c-i,";")),c-=i}a=0,i=r=function(t){return t<=8?(e.pushCode("".concat(n," = dataView.getUint8(offset);")),t=8):t<=16?(e.pushCode("".concat(n," = dataView.getUint16(offset);")),t=16):t<=24?(e.pushCode("".concat(n," = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);")),t=24):(e.pushCode("".concat(n," = dataView.getUint32(offset);")),t=32),e.pushCode("offset += ".concat(t/8,";")),t}(function(){for(var t=0,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;n32)break;t+=a}return t}(s)-i)}var d=o?r-a-c:a,l=-1>>>32-c;e.pushCode("".concat(t.varName," ").concat(c> ").concat(d," & 0x").concat(l.toString(16),";")),32===t.options.length&&e.pushCode("".concat(t.varName," >>>= 0")),t.options.assert&&t.generateAssert(e),t.options.formatter&&t.generateFormatter(e,t.varName,t.options.formatter),a+=c,i-=c})),e.bitFields=[]}}},{key:"generateSeek",value:function(e){var t=e.generateOption(this.options.length);e.pushCode("offset += ".concat(t,";"))}},{key:"generateString",value:function(e){var t=e.generateVariable(this.varName),n=e.generateTmpVariable(),a=this.options.encoding,o="hex"===a.toLowerCase(),r='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){var i=this.options.length;e.pushCode("var ".concat(n," = offset;")),e.pushCode("while(dataView.getUint8(offset++) !== 0 && offset - ".concat(n," < ").concat(i,");"));var s="offset - ".concat(n," < ").concat(i," ? offset - 1 : offset");e.pushCode(o?"".concat(t," = Array.from(buffer.subarray(").concat(n,", ").concat(s,"), ").concat(r,").join('');"):"".concat(t," = new TextDecoder('").concat(a,"').decode(buffer.subarray(").concat(n,", ").concat(s,"));"))}else if(this.options.length){var c=e.generateOption(this.options.length);e.pushCode(o?"".concat(t," = Array.from(buffer.subarray(offset, offset + ").concat(c,"), ").concat(r,").join('');"):"".concat(t," = new TextDecoder('").concat(a,"').decode(buffer.subarray(offset, offset + ").concat(c,"));")),e.pushCode("offset += ".concat(c,";"))}else this.options.zeroTerminated?(e.pushCode("var ".concat(n," = offset;")),e.pushCode("while(dataView.getUint8(offset++) !== 0);"),e.pushCode(o?"".concat(t," = Array.from(buffer.subarray(").concat(n,", offset - 1), ").concat(r,").join('');"):"".concat(t," = new TextDecoder('").concat(a,"').decode(buffer.subarray(").concat(n,", offset - 1));"))):this.options.greedy&&(e.pushCode("var ".concat(n," = offset;")),e.pushCode("while(buffer.length > offset++);"),e.pushCode(o?"".concat(t," = Array.from(buffer.subarray(").concat(n,", offset), ").concat(r,").join('');"):"".concat(t," = new TextDecoder('").concat(a,"').decode(buffer.subarray(").concat(n,", offset));")));this.options.stripNull&&e.pushCode("".concat(t," = ").concat(t,".replace(/\\x00+$/g, '')"))}},{key:"generateBuffer",value:function(e){var t=e.generateVariable(this.varName);if("function"===typeof this.options.readUntil){var n=this.options.readUntil,a=e.generateTmpVariable(),o=e.generateTmpVariable();e.pushCode("var ".concat(a," = offset;")),e.pushCode("var ".concat(o," = 0;")),e.pushCode("while (offset < buffer.length) {"),e.pushCode("".concat(o," = dataView.getUint8(offset);"));var r=e.addImport(n);e.pushCode("if (".concat(r,".call(").concat(e.generateVariable(),", ").concat(o,", buffer.subarray(offset))) break;")),e.pushCode("offset += 1;"),e.pushCode("}"),e.pushCode("".concat(t," = buffer.subarray(").concat(a,", offset);"))}else if("eof"===this.options.readUntil)e.pushCode("".concat(t," = buffer.subarray(offset);"));else{var i=e.generateOption(this.options.length);e.pushCode("".concat(t," = buffer.subarray(offset, offset + ").concat(i,");")),e.pushCode("offset += ".concat(i,";"))}this.options.clone&&e.pushCode("".concat(t," = buffer.constructor.from(").concat(t,");"))}},{key:"generateArray",value:function(t){var n=t.generateOption(this.options.length),a=t.generateOption(this.options.lengthInBytes),o=this.options.type,r=t.generateTmpVariable(),i=t.generateVariable(this.varName),s=t.generateTmpVariable(),c=this.options.key,u="string"===typeof c;if(u?t.pushCode("".concat(i," = {};")):t.pushCode("".concat(i," = [];")),"function"===typeof this.options.readUntil?t.pushCode("do {"):"eof"===this.options.readUntil?t.pushCode("for (var ".concat(r," = 0; offset < buffer.length; ").concat(r,"++) {")):void 0!==a?t.pushCode("for (var ".concat(r," = offset + ").concat(a,"; offset < ").concat(r,"; ) {")):t.pushCode("for (var ".concat(r," = ").concat(n,"; ").concat(r," > 0; ").concat(r,"--) {")),"string"===typeof o)if(Lp.get(o)){var d=t.generateTmpVariable();if(t.pushCode("var ".concat(d," = ").concat(jp+o,"(offset, {")),t.useContextVariables){var l=t.generateVariable();t.pushCode("$parent: ".concat(l,",")),t.pushCode("$root: ".concat(l,".$root,")),this.options.readUntil||void 0!==a||t.pushCode("$index: ".concat(n," - ").concat(r,","))}t.pushCode("});"),t.pushCode("var ".concat(s," = ").concat(d,".result; offset = ").concat(d,".offset;")),o!==this.alias&&t.addReference(o)}else{var f=Gp[o],p=zp[o];t.pushCode("var ".concat(s," = dataView.get").concat(f,"(offset, ").concat(p,");")),t.pushCode("offset += ".concat(Hp[o],";"))}else if(o instanceof e){t.pushCode("var ".concat(s," = {};"));var b=t.generateVariable();t.pushScope(s),t.useContextVariables&&(t.pushCode("".concat(s,".$parent = ").concat(b,";")),t.pushCode("".concat(s,".$root = ").concat(b,".$root;")),this.options.readUntil||void 0!==a||t.pushCode("".concat(s,".$index = ").concat(n," - ").concat(r,";"))),o.generate(t),t.useContextVariables&&(t.pushCode("delete ".concat(s,".$parent;")),t.pushCode("delete ".concat(s,".$root;")),t.pushCode("delete ".concat(s,".$index;"))),t.popScope()}if(u?t.pushCode("".concat(i,"[").concat(s,".").concat(c,"] = ").concat(s,";")):t.pushCode("".concat(i,".push(").concat(s,");")),t.pushCode("}"),"function"===typeof this.options.readUntil){var m=this.options.readUntil,h=t.addImport(m);t.pushCode("while (!".concat(h,".call(").concat(t.generateVariable(),", ").concat(s,", buffer.subarray(offset)));"))}}},{key:"generateChoiceCase",value:function(t,n,a){if("string"===typeof a){var o=t.generateVariable(this.varName);if(Lp.has(a)){var r=t.generateTmpVariable();t.pushCode("var ".concat(r," = ").concat(jp+a,"(offset, {")),t.useContextVariables&&(t.pushCode("$parent: ".concat(o,".$parent,")),t.pushCode("$root: ".concat(o,".$root,"))),t.pushCode("});"),t.pushCode("".concat(o," = ").concat(r,".result; offset = ").concat(r,".offset;")),a!==this.alias&&t.addReference(a)}else{var i=Gp[a],s=zp[a];t.pushCode("".concat(o," = dataView.get").concat(i,"(offset, ").concat(s,");")),t.pushCode("offset += ".concat(Hp[a]))}}else a instanceof e&&(t.pushPath(n),a.generate(t),t.popPath(n))}},{key:"generateChoice",value:function(e){var t=e.generateOption(this.options.tag),n=e.generateVariable(this.varName);if(this.varName&&(e.pushCode("".concat(n," = {};")),e.useContextVariables)){var a=e.generateVariable();e.pushCode("".concat(n,".$parent = ").concat(a,";")),e.pushCode("".concat(n,".$root = ").concat(a,".$root;"))}for(var o in e.pushCode("switch(".concat(t,") {")),this.options.choices){var r=parseInt(o,10),i=this.options.choices[r];e.pushCode("case ".concat(r,":")),this.generateChoiceCase(e,this.varName,i),e.pushCode("break;")}e.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(e,this.varName,this.options.defaultChoice):e.generateError('"Met undefined tag value " + '.concat(t,' + " at choice"')),e.pushCode("}"),this.varName&&e.useContextVariables&&(e.pushCode("delete ".concat(n,".$parent;")),e.pushCode("delete ".concat(n,".$root;")))}},{key:"generateNest",value:function(t){var n=t.generateVariable(this.varName);if(this.options.type instanceof e){if(this.varName&&(t.pushCode("".concat(n," = {};")),t.useContextVariables)){var a=t.generateVariable();t.pushCode("".concat(n,".$parent = ").concat(a,";")),t.pushCode("".concat(n,".$root = ").concat(a,".$root;"))}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),this.varName&&t.useContextVariables&&t.useContextVariables&&(t.pushCode("delete ".concat(n,".$parent;")),t.pushCode("delete ".concat(n,".$root;")))}else if(Lp.has(this.options.type)){var o=t.generateTmpVariable();if(t.pushCode("var ".concat(o," = ").concat(jp+this.options.type,"(offset, {")),t.useContextVariables){var r=t.generateVariable();t.pushCode("$parent: ".concat(r,",")),t.pushCode("$root: ".concat(r,".$root,"))}t.pushCode("});"),t.pushCode("".concat(n," = ").concat(o,".result; offset = ").concat(o,".offset;")),this.options.type!==this.alias&&t.addReference(this.options.type)}}},{key:"generateWrapper",value:function(t){var n=t.generateVariable(this.varName),a=t.generateTmpVariable();if("function"===typeof this.options.readUntil){var o=this.options.readUntil,r=t.generateTmpVariable(),i=t.generateTmpVariable();t.pushCode("var ".concat(r," = offset;")),t.pushCode("var ".concat(i," = 0;")),t.pushCode("while (offset < buffer.length) {"),t.pushCode("".concat(i," = dataView.getUint8(offset);"));var s=t.addImport(o);t.pushCode("if (".concat(s,".call(").concat(t.generateVariable(),", ").concat(i,", buffer.subarray(offset))) break;")),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode("".concat(a," = buffer.subarray(").concat(r,", offset);"))}else if("eof"===this.options.readUntil)t.pushCode("".concat(a," = buffer.subarray(offset);"));else{var c=t.generateOption(this.options.length);t.pushCode("".concat(a," = buffer.subarray(offset, offset + ").concat(c,");")),t.pushCode("offset += ".concat(c,";"))}this.options.clone&&t.pushCode("".concat(a," = buffer.constructor.from(").concat(a,");"));var u=t.generateTmpVariable(),d=t.generateTmpVariable(),l=t.generateTmpVariable(),f=t.addImport(this.options.wrapper);if(t.pushCode("".concat(a," = ").concat(f,".call(this, ").concat(a,").subarray(0);")),t.pushCode("var ".concat(u," = buffer;")),t.pushCode("var ".concat(d," = offset;")),t.pushCode("var ".concat(l," = dataView;")),t.pushCode("buffer = ".concat(a,";")),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof e)this.varName&&t.pushCode("".concat(n," = {};")),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(Lp.has(this.options.type)){var p=t.generateTmpVariable();t.pushCode("var ".concat(p," = ").concat(jp+this.options.type,"(0);")),t.pushCode("".concat(n," = ").concat(p,".result;")),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode("buffer = ".concat(u,";")),t.pushCode("dataView = ".concat(l,";")),t.pushCode("offset = ".concat(d,";"))}},{key:"generateFormatter",value:function(e,t,n){if("function"===typeof n){var a=e.addImport(n);e.pushCode("".concat(t," = ").concat(a,".call(").concat(e.generateVariable(),", ").concat(t,");"))}}},{key:"generatePointer",value:function(t){var n=this.options.type,a=t.generateOption(this.options.offset),o=t.generateTmpVariable(),r=t.generateVariable(this.varName);if(t.pushCode("var ".concat(o," = offset;")),t.pushCode("offset = ".concat(a,";")),this.options.type instanceof e){if(t.pushCode("".concat(r," = {};")),t.useContextVariables){var i=t.generateVariable();t.pushCode("".concat(r,".$parent = ").concat(i,";")),t.pushCode("".concat(r,".$root = ").concat(i,".$root;"))}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode("delete ".concat(r,".$parent;")),t.pushCode("delete ".concat(r,".$root;")))}else if(Lp.has(this.options.type)){var s=t.generateTmpVariable();if(t.pushCode("var ".concat(s," = ").concat(jp+this.options.type,"(offset, {")),t.useContextVariables){var c=t.generateVariable();t.pushCode("$parent: ".concat(c,",")),t.pushCode("$root: ".concat(c,".$root,"))}t.pushCode("});"),t.pushCode("".concat(r," = ").concat(s,".result; offset = ").concat(s,".offset;")),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(Hp).indexOf(this.options.type)>=0){var u=Gp[n],d=zp[n];t.pushCode("".concat(r," = dataView.get").concat(u,"(offset, ").concat(d,");")),t.pushCode("offset += ".concat(Hp[n],";"))}t.pushCode("offset = ".concat(o,";"))}},{key:"generateSaveOffset",value:function(e){var t=e.generateVariable(this.varName);e.pushCode("".concat(t," = offset"))}}],[{key:"start",value:function(){return new e}}]),e}(),Wp=n(60956),Zp=n(69205),Vp=n(54659).Buffer,qp=function(){return qp=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},Jp=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},qb=function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},dm=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},Am=function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},Em=function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function mx(e,t){var n=e.logs.filter((function(e){return e.address===t}))[0];return xw.createInterface().parseLog(n).args.sequence.toString()}function hx(e,t){return e.logs.filter((function(e){return e.address===t})).map((function(e){return xw.createInterface().parseLog(e).args.sequence.toString()}))}function gx(e){var t="";return JSON.parse(e.raw_log).map((function(e){e.events.map((function(e){e.attributes.map((function(e){"message.sequence"===e.key&&(t=e.value)}))}))})),t.toString()}function yx(e){var t="";return JSON.parse(e.raw_log).map((function(e){e.events.map((function(e){e.attributes.map((function(e){"message.sequence"===e.key&&(t=e.value)}))}))})),t.toString()}function vx(e){var t=[];return JSON.parse(e.raw_log).map((function(e){e.events.map((function(e){e.attributes.map((function(e){"message.sequence"===e.key&&t.push(e.value.toString())}))}))})),t}function wx(e){var t="";return JSON.parse(e.rawLog).map((function(e){e.events.map((function(e){e.attributes.map((function(e){"message.sequence"===e.key&&(t=e.value)}))}))})),t.toString()}var kx="Program log: Sequence: ";function Ax(e){var t,n,a,o,r=null===(o=null===(a=null===(n=null===(t=e.meta)||void 0===t?void 0:t.logMessages)||void 0===n?void 0:n.filter((function(e){return e.startsWith(kx)})))||void 0===a?void 0:a[0])||void 0===o?void 0:o.replace(kx,"");if(!r)throw new Error("sequence not found");return r.toString()}function xx(e){var t,n;return null===(n=null===(t=e.meta)||void 0===t?void 0:t.logMessages)||void 0===n?void 0:n.filter((function(e){return e.startsWith(kx)})).map((function(e){return e.replace(kx,"")}))}function Ix(e){var t="";if(e["inner-txns"]){e["inner-txns"].forEach((function(e){e.logs&&(t=vf.O$.from(e.logs[0].slice(0,8)).toString())}))}return t}var Tx="EVENT_JSON:";function Sx(e){var t,n,a,o;try{for(var r=bx(e.receipts_outcome),i=r.next();!i.done;i=r.next()){var s=i.value;try{for(var c=(a=void 0,bx(s.outcome.logs)),u=c.next();!u.done;u=c.next()){var d=u.value;if(d.startsWith(Tx)){var l=JSON.parse(d.slice(Tx.length));if("wormhole"===l.standard&&"publish"===l.event)return l.seq.toString()}}}catch(f){a={error:f}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(a)throw a.error}}}}catch(p){t={error:p}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return null}function Cx(e,t){if(t.success){var n=t.events.find((function(t){return t.type===e+"::state::WormholeMessage"}));return(null===n||void 0===n?void 0:n.data.sequence)||null}return null}function Ex(e){if(eBigInt(Number.MAX_SAFE_INTEGER))throw new Error("integer is unsafe");return Number(e)}var Rx=n(54659).Buffer,Mx=BigInt(127);function Px(e,t,n){if(e=BigInt(128);t++)e>>=BigInt(7);return t+1}(e);if(n=n||0,(t=t||new ArrayBuffer(a)).byteLength>=BigInt(7);return o[r]=Number(e),o}function Ux(e,t,n){return Rx.from(Px(e,t,n)).toString("hex")}var _x=n(54659).Buffer,Bx=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},Dx=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Hx=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,o,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},Gx=function(e,t){for(var n=0,a=t.length,o=e.length;n=n.length||3===n.readIntBE(s,1)&&(t.Meta="TokenBridge Transfer With Payload",t.Type=n.readIntBE(s,1),s+=1,t.Amount=tI(e,s,32),s+=32,t.Contract=ZI(tI(e,s,32)),s+=32,t.FromChain=n.readIntBE(s,2),s+=2,t.ToAddress=tI(e,s,32),s+=32,t.ToChain=n.readIntBE(s,2),s+=2,t.FromAddress=tI(e,s,32),s+=32,t.Payload=e.slice(s)),t}var aI=new RegExp("\0","g");function oI(e){var t=nI(e),n=Ox.from(t.Body);t.action=n.readUInt8(0),t.Contract=n.slice(1,33).toString("hex"),t.FromChain=n.readUInt16BE(33),t.Symbol=Ox.from(n.slice(35,67)),t.Name=Ox.from(n.slice(67,99)),t.TokenId=n.slice(99,131);var a=n.readUInt8(131);t.uri=Ox.from(n.slice(132,132+a)).toString("utf8").replace(aI,"");var o=132+a;return t.ToAddress=n.slice(o,o+32),t.ToChain=n.readUInt16BE(o+32),t}function rI(e,t,n){return Fx(this,void 0,void 0,(function(){var a,o,r,i,s,c,u,d,l,f,p,b,m,h,g,y,v,w,k,A,x;return Lx(this,(function(I){switch(I.label){case 0:return a=null,[4,e.accountInformation(n).do()];case 1:o=I.sent();try{for(r=jx(o["apps-local-state"]),i=r.next();!i.done;i=r.next())if(s=i.value,BigInt(s.id)===t){a=s["key-value"];break}}catch(T){w={error:T}}finally{try{i&&!i.done&&(k=r.return)&&k.call(r)}finally{if(w)throw w.error}}if(c=Ox.alloc(0),u=Ox.alloc(0),a){d=Ox.alloc(127),l=Ox.from("meta"),f=[],p=new Map;try{for(b=jx(a),m=b.next();!m.done;m=b.next())h=m.value,g=Ox.from(h.key,"base64"),y=g.readInt8(),Ox.compare(g,l)&&(v=Ox.from(h.value.bytes,"base64"),Ox.compare(v,d)&&(p.set(y.toString(),v),f.push(y.toString())))}catch(S){A={error:S}}finally{try{m&&!m.done&&(x=b.return)&&x.call(b)}finally{if(A)throw A.error}}f.sort((function(e,t){return e.localeCompare(t,"en",{numeric:!0})})),f.forEach((function(e){c=Ox.concat([c,p.get(e)||u])}))}return[2,new Uint8Array(c)]}}))}))}function iI(e,t,n){return Fx(this,void 0,void 0,(function(){var a,o,r;return Lx(this,(function(i){switch(i.label){case 0:return[4,e.accountInformation(n).do()];case 1:return a=i.sent(),o=a.assets,r=!1,o.forEach((function(e){BigInt(e["asset-id"])!==t||(r=!0)})),[2,r]}}))}))}var sI=function(e,t,n,a){this.vaaMap=e,this.accounts=t,this.txs=n,this.guardianAddr=a};function cI(e,t,n,a,o){return Fx(this,void 0,void 0,(function(){var r,i,s,c,u,d,l,f,p,b,m,h,g,y,v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B,D,N;return Lx(this,(function(O){switch(O.label){case 0:return r=nI(n),i=r.sequence/BigInt(Zx),s=r.chainRaw,c=r.emitter,u=r.index,d=[],[4,eI(e,a,o,i,s+c)];case 1:return l=O.sent(),f=l.addr,p=l.txs,d.push.apply(d,Gx([],Hx(p))),b=rT("guardian"),[4,eI(e,a,t,BigInt(u),b)];case 2:return m=O.sent(),h=m.addr,g=m.txs,d.push.apply(d,Gx([],Hx(g))),y=[f,h],[4,rI(e,t,h)];case 3:return v=O.sent(),[4,e.getTransactionParams().do()];case 4:for(w=O.sent(),k=(0,Ql.keccak256)((0,Ql.keccak256)(r.digest)).slice(2),A=r.siglen,x=Math.floor(A/Vx)+1,66,I=66*Vx,T=r.signatures,S=iT("verifySigs"),C=new yf.LogicSigAccount(Qx),E=0;EI&&(R=R.slice(0,I)),20,M=R.length/66,P=new Uint8Array(20*M),U=0;U8&&(x=Ox.from(A.slice(0,8)),w.push(Ex(x.readBigUInt64BE(0)))),c.push({tx:(0,yf.makePaymentTxnWithSuggestedParamsFromObject)({from:o,to:m,amount:1e5,suggestedParams:y}),signer:null}),(v=new Uint8Array(1))[0]=1,c.push({tx:(0,yf.makeApplicationCallTxnFromObject)({appArgs:[iT("nop"),v],appIndex:Ex(t),from:o,onComplete:yf.OnApplicationComplete.NoOpOC,suggestedParams:y}),signer:null}),(v=new Uint8Array(1))[0]=2,c.push({tx:(0,yf.makeApplicationCallTxnFromObject)({appArgs:[iT("nop"),v],appIndex:Ex(t),from:o,onComplete:yf.OnApplicationComplete.NoOpOC,suggestedParams:y}),signer:null}),c.push({tx:(0,yf.makeApplicationCallTxnFromObject)({accounts:s,appArgs:[iT("receiveAttest"),a],appIndex:Ex(t),foreignAssets:w,from:o,onComplete:yf.OnApplicationComplete.NoOpOC,suggestedParams:y}),signer:null}),c[c.length-1].tx.fee=2*c[c.length-1].tx.fee,C.label=11;case 11:return"TokenBridge Transfer"!==b&&"TokenBridge Transfer With Payload"!==b||void 0===i.Contract?[3,17]:(w=[],k=0,i.FromChain===B?[3,13]:[4,rI(e,t,m)]);case 12:return(A=C.sent()).length>8&&(x=Ox.from(A.slice(0,8)),k=Ex(x.readBigUInt64BE(0))),[3,14];case 13:k=parseInt(i.Contract,16),C.label=14;case 14:return I=0,T="",void 0!==i.ToAddress&&(8===i.ToChain&&3===i.Type?(I=Number(pI(ZI(i.ToAddress))),T=(0,yf.getApplicationAddress)(I)):T=(0,yf.encodeAddress)(i.ToAddress)),0===k?[3,16]:(w.push(k),[4,iI(e,BigInt(k),T)]);case 15:if(!C.sent()){if(o!=T)throw new Error("cannot ASA optin for somebody else (asset "+k.toString()+")");c.unshift({tx:(0,yf.makeAssetTransferTxnWithSuggestedParamsFromObject)({amount:0,assetIndex:k,from:o,suggestedParams:y,to:o}),signer:null})}C.label=16;case 16:s.push(T),c.push({tx:(0,yf.makeApplicationCallTxnFromObject)({accounts:s,appArgs:[iT("completeTransfer"),a],appIndex:Ex(t),foreignAssets:w,from:o,onComplete:yf.OnApplicationComplete.NoOpOC,suggestedParams:y}),signer:null}),void 0!==i.Fee&&0===Ox.compare(i.Fee,Ox.from(Kx,"hex"))?c[c.length-1].tx.fee=2*c[c.length-1].tx.fee:c[c.length-1].tx.fee=3*c[c.length-1].tx.fee,"TokenBridge Transfer With Payload"===b&&(c[c.length-1].tx.appForeignApps=[I],S=yf.default.ABIMethod.fromSignature("portal_transfer(byte[])byte[]"),c.push({tx:(0,yf.makeApplicationCallTxnFromObject)({appArgs:[S.getSelector(),S.args[0].type.encode(a)],appIndex:I,foreignAssets:w,from:o,onComplete:yf.OnApplicationComplete.NoOpOC,suggestedParams:y}),signer:null})),C.label=17;case 17:return[2,c]}}))}))}function dI(e){return(0,yf.encodeAddress)(e)}function lI(e){return dI(VI(e))}function fI(e){return ZI((0,yf.decodeAddress)(e).publicKey)}function pI(e){return vf.O$.from(VI(e)).toBigInt()}function bI(e){return vf.O$.from(VI(e)).toString()}function mI(e,t,n){return Fx(this,void 0,void 0,(function(){var a,o,r,i,s,c,u,d,l;return Lx(this,(function(f){switch(f.label){case 0:(0,yf.assignGroupID)(t.map((function(e){return e.tx}))),a=[],f.label=1;case 1:f.trys.push([1,7,8,9]),o=jx(t),r=o.next(),f.label=2;case 2:return r.done?[3,6]:(i=r.value).signer?(c=(s=a).push,[4,i.signer.signTxn(i.tx)]):[3,4];case 3:return c.apply(s,[f.sent()]),[3,5];case 4:a.push(i.tx.signTxn(n.sk)),f.label=5;case 5:return r=o.next(),[3,2];case 6:return[3,9];case 7:return u=f.sent(),d={error:u},[3,9];case 8:try{r&&!r.done&&(l=o.return)&&l.call(o)}finally{if(d)throw d.error}return[7];case 9:return[4,e.sendRawTransaction(a).do()];case 10:return f.sent(),[4,(0,yf.waitForConfirmation)(e,t[t.length-1].tx.txID(),4)];case 11:return[2,f.sent()]}}))}))}function hI(e){return new Uint8Array(Fm.bech32.fromWords(Fm.bech32.decode(e).words))}function gI(e,t){return Fm.bech32.encode(e,Fm.bech32.toWords(t))}var yI=function(e){return void 0===e&&(e=""),e.startsWith("u")&&4===e.length},vI=function(e){return void 0===e&&(e=""),yI(e)||"uluna"===e};function wI(e){for(var t=[],n=0;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i};function NI(e,t){var n=e.receipts_outcome.reduce((function(e,t){return e.totalGasBurned+=t.outcome.gas_burnt,e.totalTokensBurned+=MI().utils.format.formatNearAmount(t.outcome.tokens_burnt),e}),{totalGasBurned:e.transaction_outcome.outcome.gas_burnt,totalTokensBurned:MI().utils.format.formatNearAmount(e.transaction_outcome.outcome.tokens_burnt)}),a=n.totalGasBurned,o=n.totalTokensBurned;PI.log(t,"totalGasBurned",a,"totalTokensBurned",o)}function OI(e,t,n){return _I(this,void 0,void 0,(function(){var a,o,r;return BI(this,(function(i){switch(i.label){case 0:return[4,jI(e,t,"hash_account",{account:n})];case 1:return a=DI.apply(void 0,[i.sent(),2]),o=a[0],r=a[1],[2,{isRegistered:o,accountHash:r}]}}))}))}function FI(e,t,n){return _I(this,void 0,void 0,(function(){var a,o,r;return BI(this,(function(i){switch(i.label){case 0:return[4,jI(e,t,"hash_lookup",{hash:n})];case 1:return a=DI.apply(void 0,[i.sent(),2]),o=a[0],r=a[1],[2,{found:o,value:r}]}}))}))}function LI(e,t){return{contractId:t,methodName:"register_account",args:{account:e},gas:new(vm())("100000000000000"),attachedDeposit:new(vm())("2000000000000000000000")}}function jI(e,t,n,a){return _I(this,void 0,void 0,(function(){var o;return BI(this,(function(r){switch(r.label){case 0:return[4,e.query({request_type:"call_function",account_id:t,method_name:n,args_base64:a?UI.from(JSON.stringify(a)).toString("base64"):"",finality:"final"})];case 1:return o=r.sent(),[2,JSON.parse(UI.from(o.result).toString())]}}))}))}var HI=n(54659).Buffer,GI=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},zI=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]i)throw l;return[3,6];case 6:return[3,1];case 7:return[2,u]}}))}))}var TT=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},ST=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]i)throw l;return[3,6];case 6:return[3,1];case 7:return[2,u]}}))}))}var _T=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},BT=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]i)throw l;return[3,6];case 6:return[3,1];case 7:return[2,u]}}))}))}var HT=n(40083),GT=n(37753),zT=n(97326),KT=n(18415);function WT(e,t,n,a){return WT="undefined"!==typeof Reflect&&Reflect.set?Reflect.set:function(e,t,n,a){var o,r=(0,KT.Z)(e,t);if(r){if((o=Object.getOwnPropertyDescriptor(r,t)).set)return o.set.call(a,n),!0;if(!o.writable)return!1}if(o=Object.getOwnPropertyDescriptor(a,t)){if(!o.writable)return!1;o.value=n,Object.defineProperty(a,t,o)}else(0,_r.Z)(a,t,n);return!0},WT(e,t,n,a)}function ZT(e,t,n,a,o){if(!WT(e,t,n,a||e)&&o)throw new TypeError("failed to set property");return n}var VT,qT,QT,JT,YT,XT,$T,eS,tS,nS,aS,oS,rS,iS,sS,cS,uS,dS,lS,fS=n(61120);!function(e){e.Erc20Contract="erc20-contract",e.Peggy="peggy-contract",e.PeggyOld="peggy-old-contract"}(VT||(VT={})),function(e){e.Auction="chain-auction",e.Auth="chain-auth",e.Bank="chain-bank",e.Distribution="chain-distribution",e.Exchange="chain-exchange",e.Gov="chain-gov",e.Ibc="chain-ibc",e.InsuranceFund="chain-insurance",e.Mint="chain-mint",e.Oracle="chain-oracle",e.Peggy="chain-peggy",e.Staking="chain-staking",e.Wasm="chain-wasm",e.WasmX="chain-wasmx",e.Tendermint="chain-tendermint"}(qT||(qT={})),function(e){e.Account="indexer-account",e.Auction="indexer-auction",e.Derivatives="indexer-derivatives",e.Explorer="indexer-explorer",e.InsuranceFund="indexer-insurance-fund",e.Meta="indexer-meta",e.Mito="indexer-mito",e.Oracle="indexer-oracle",e.Portfolio="indexer-portfolio",e.Spot="indexer-spot",e.Transaction="indexer-transaction",e.ChronosDerivative="indexer-chronos-derivative",e.ChronosSpot="indexer-chronos-spot",e.ChronosMarkets="indexer-chronos-markets"}(QT||(QT={})),function(e){e.SignTransaction="sign-transaction",e.SignEthereumTransaction="sign-ethereum-transaction",e.SendTransaction="send-transaction",e.SendEthereumTransaction="send-ethereum-transaction",e.GetAccounts="get-accounts",e.GetNetworkId="get-network-id",e.GetChainId="get-chain-id",e.GetEthereumTransactionReceipt="get-ethereum-transaction-receipt"}(JT||(JT={})),function(e){e.Auction="auction",e.CosmosSdk="sdk",e.Staking="staking",e.Bank="bank",e.Distribution="distribution",e.Gov="gov",e.Exchange="exchange",e.Insurance="insurance",e.Ocr="ocr",e.Oracle="oracle",e.Peggy="peggy",e.TokenFactory="tokenfactory",e.Wasmx="wasmx",e.Wasm="wasm",e.Authz="authz"}(YT||(YT={})),function(e){e[e.ErrTxDecode=2]="ErrTxDecode",e[e.ErrInvalidSequence=3]="ErrInvalidSequence",e[e.ErrUnauthorized=4]="ErrUnauthorized",e[e.ErrInsufficientFunds=5]="ErrInsufficientFunds",e[e.ErrUnknownRequest=6]="ErrUnknownRequest",e[e.ErrInvalidAddress=7]="ErrInvalidAddress",e[e.ErrInvalidPubKey=8]="ErrInvalidPubKey",e[e.ErrUnknownAddress=9]="ErrUnknownAddress",e[e.ErrInvalidCoins=10]="ErrInvalidCoins",e[e.ErrOutOfGas=11]="ErrOutOfGas",e[e.ErrMemoTooLarge=12]="ErrMemoTooLarge",e[e.ErrInsufficientFee=13]="ErrInsufficientFee",e[e.ErrTooManySignatures=14]="ErrTooManySignatures",e[e.ErrNoSignatures=15]="ErrNoSignatures",e[e.ErrJSONMarshal=16]="ErrJSONMarshal",e[e.ErrJSONUnmarshal=17]="ErrJSONUnmarshal",e[e.ErrInvalidRequest=18]="ErrInvalidRequest",e[e.ErrTxInMempoolCache=19]="ErrTxInMempoolCache",e[e.ErrMempoolIsFull=20]="ErrMempoolIsFull",e[e.ErrTxTooLarge=21]="ErrTxTooLarge",e[e.ErrKeyNotFound=22]="ErrKeyNotFound",e[e.ErrWrongPassword=23]="ErrWrongPassword",e[e.ErrorInvalidSigner=24]="ErrorInvalidSigner",e[e.ErrorInvalidGasAdjustment=25]="ErrorInvalidGasAdjustment",e[e.ErrInvalidHeight=26]="ErrInvalidHeight",e[e.ErrInvalidVersion=27]="ErrInvalidVersion",e[e.ErrInvalidChainID=28]="ErrInvalidChainID",e[e.ErrInvalidType=29]="ErrInvalidType",e[e.ErrTxTimeoutHeight=30]="ErrTxTimeoutHeight",e[e.ErrUnknownExtensionOptions=31]="ErrUnknownExtensionOptions",e[e.ErrWrongSequence=32]="ErrWrongSequence",e[e.ErrPackAny=33]="ErrPackAny",e[e.ErrUnpackAny=34]="ErrUnpackAny",e[e.ErrLogic=35]="ErrLogic",e[e.ErrConflict=36]="ErrConflict",e[e.ErrNotSupported=37]="ErrNotSupported",e[e.ErrNotFound=38]="ErrNotFound",e[e.ErrIO=39]="ErrIO",e[e.ErrAppConfig=40]="ErrAppConfig",e[e.ErrInvalidGasLimit=41]="ErrInvalidGasLimit"}(XT||(XT={})),function(e){e[e.ErrOrderInvalid=1]="ErrOrderInvalid",e[e.ErrSpotMarketNotFound=2]="ErrSpotMarketNotFound",e[e.ErrSpotMarketExists=3]="ErrSpotMarketExists",e[e.ErrBadField=4]="ErrBadField",e[e.ErrMarketInvalid=5]="ErrMarketInvalid",e[e.ErrInsufficientDeposit=6]="ErrInsufficientDeposit",e[e.ErrUnrecognizedOrderType=7]="ErrUnrecognizedOrderType",e[e.ErrInsufficientPositionQuantity=8]="ErrInsufficientPositionQuantity",e[e.ErrOrderHashInvalid=9]="ErrOrderHashInvalid",e[e.ErrBadSubaccountID=10]="ErrBadSubaccountID",e[e.ErrInvalidTicker=11]="ErrInvalidTicker",e[e.ErrInvalidBaseDenom=12]="ErrInvalidBaseDenom",e[e.ErrInvalidQuoteDenom=13]="ErrInvalidQuoteDenom",e[e.ErrInvalidOracle=14]="ErrInvalidOracle",e[e.ErrInvalidExpiry=15]="ErrInvalidExpiry",e[e.ErrInvalidPrice=16]="ErrInvalidPrice",e[e.ErrInvalidQuantity=17]="ErrInvalidQuantity",e[e.ErrUnsupportedOracleType=18]="ErrUnsupportedOracleType",e[e.ErrOrderDoesntExist=19]="ErrOrderDoesntExist",e[e.ErrOrderbookFillInvalid=20]="ErrOrderbookFillInvalid",e[e.ErrPerpetualMarketExists=21]="ErrPerpetualMarketExists",e[e.ErrExpiryFuturesMarketExists=22]="ErrExpiryFuturesMarketExists",e[e.ErrExpiryFuturesMarketExpired=23]="ErrExpiryFuturesMarketExpired",e[e.ErrNoLiquidity=24]="ErrNoLiquidity",e[e.ErrSlippageExceedsWorstPrice=25]="ErrSlippageExceedsWorstPrice",e[e.ErrInsufficientOrderMargin=26]="ErrInsufficientOrderMargin",e[e.ErrDerivativeMarketNotFound=27]="ErrDerivativeMarketNotFound",e[e.ErrPositionNotFound=28]="ErrPositionNotFound",e[e.ErrInvalidReduceOnlyPositionDirection=29]="ErrInvalidReduceOnlyPositionDirection",e[e.ErrPriceSurpassesBankruptcyPrice=30]="ErrPriceSurpassesBankruptcyPrice",e[e.ErrPositionNotLiquidable=31]="ErrPositionNotLiquidable",e[e.ErrInvalidTriggerPrice=32]="ErrInvalidTriggerPrice",e[e.ErrInvalidOracleType=33]="ErrInvalidOracleType",e[e.ErrInvalidPriceTickSize=34]="ErrInvalidPriceTickSize",e[e.ErrInvalidQuantityTickSize=35]="ErrInvalidQuantityTickSize",e[e.ErrInvalidMargin=36]="ErrInvalidMargin",e[e.ErrExceedsOrderSideCount=37]="ErrExceedsOrderSideCount",e[e.ErrMarketOrderAlreadyExists=38]="ErrMarketOrderAlreadyExists",e[e.ErrConditionalMarketOrderAlreadyExists=39]="ErrConditionalMarketOrderAlreadyExists",e[e.ErrMarketLaunchProposalAlreadyExists=40]="ErrMarketLaunchProposalAlreadyExists",e[e.ErrInvalidMarketStatus=41]="ErrInvalidMarketStatus",e[e.ErrSameDenoms=42]="ErrSameDenoms",e[e.ErrSameOracles=43]="ErrSameOracles",e[e.ErrFeeRatesRelation=44]="ErrFeeRatesRelation",e[e.ErrMarginsRelation=45]="ErrMarginsRelation",e[e.ErrExceedsMaxOracleScaleFactor=46]="ErrExceedsMaxOracleScaleFactor",e[e.ErrSpotExchangeNotEnabled=47]="ErrSpotExchangeNotEnabled",e[e.ErrDerivativesExchangeNotEnabled=48]="ErrDerivativesExchangeNotEnabled",e[e.ErrOraclePriceDeltaExceedsThreshold=49]="ErrOraclePriceDeltaExceedsThreshold",e[e.ErrInvalidHourlyInterestRate=50]="ErrInvalidHourlyInterestRate",e[e.ErrInvalidHourlyFundingRateCap=51]="ErrInvalidHourlyFundingRateCap",e[e.ErrInvalidMarketFundingParamUpdate=52]="ErrInvalidMarketFundingParamUpdate",e[e.ErrInvalidTradingRewardCampaign=53]="ErrInvalidTradingRewardCampaign",e[e.ErrInvalidFeeDiscountSchedule=54]="ErrInvalidFeeDiscountSchedule",e[e.ErrInvalidLiquidationOrder=55]="ErrInvalidLiquidationOrder",e[e.ErrTradingRewardCampaignDistributionError=56]="ErrTradingRewardCampaignDistributionError",e[e.ErrInvalidTradingRewardsPendingPointsUpdate=57]="ErrInvalidTradingRewardsPendingPointsUpdate",e[e.ErrInvalidBatchMsgUpdate=58]="ErrInvalidBatchMsgUpdate",e[e.ErrExceedsTopOfBookPrice=59]="ErrExceedsTopOfBookPrice",e[e.ErrInvalidOrderTypeForMessage=60]="ErrInvalidOrderTypeForMessage",e[e.ErrInvalidDMMSender=61]="ErrInvalidDMMSender",e[e.ErrAlreadyOptedOutOfRewards=62]="ErrAlreadyOptedOutOfRewards",e[e.ErrInvalidMarginRatio=63]="ErrInvalidMarginRatio",e[e.ErrBelowMinimalContribution=64]="ErrBelowMinimalContribution",e[e.ErrLowPositionMargin=65]="ErrLowPositionMargin",e[e.ErrInvalidTotalSupply=66]="ErrInvalidTotalSupply",e[e.ErrInvalidLpTokenBurnAmount=67]="ErrInvalidLpTokenBurnAmount",e[e.ErrUnsupportedAction=68]="ErrUnsupportedAction",e[e.ErrNegativePositionQuantity=69]="ErrNegativePositionQuantity",e[e.ErrBinaryOptionsMarketExists=70]="ErrBinaryOptionsMarketExists",e[e.ErrBinaryOptionsMarketNotFound=71]="ErrBinaryOptionsMarketNotFound",e[e.ErrInvalidSettlement=72]="ErrInvalidSettlement",e[e.ErrAccountDoesntExist=73]="ErrAccountDoesntExist",e[e.ErrSenderIsNotAnAdmin=74]="ErrSenderIsNotAnAdmin",e[e.ErrMarketAlreadyScheduledToSettle=75]="ErrMarketAlreadyScheduledToSettle",e[e.ErrGenericMarketNotFound=76]="ErrGenericMarketNotFound",e[e.ErrInvalidDenomDecimal=77]="ErrInvalidDenomDecimal",e[e.ErrInvalidState=78]="ErrInvalidState",e[e.ErrTransientOrdersUpToCancelNotSupported=79]="ErrTransientOrdersUpToCancelNotSupported",e[e.ErrInvalidTrade=80]="ErrInvalidTrade",e[e.ErrNoMarginLocked=81]="ErrNoMarginLocked",e[e.ErrInvalidAccessLevel=82]="ErrInvalidAccessLevel",e[e.ErrInvalidAddress=83]="ErrInvalidAddress",e[e.ErrInvalidArgument=84]="ErrInvalidArgument",e[e.ErrInvalidFundsDirection=85]="ErrInvalidFundsDirection",e[e.ErrNoFundsProvided=86]="ErrNoFundsProvided",e[e.ErrInvalidSignature=87]="ErrInvalidSignature",e[e.ErrNoFundsToUnlock=88]="ErrNoFundsToUnlock",e[e.ErrNoMsgsProvided=89]="ErrNoMsgsProvided",e[e.ErrNoMsgProvided=90]="ErrNoMsgProvided",e[e.ErrInvalidAmount=91]="ErrInvalidAmount",e[e.ErrFeatureDisabled=92]="ErrFeatureDisabled",e[e.ErrTooMuchOrderMargin=93]="ErrTooMuchOrderMargin"}($T||($T={})),function(e){e[e.ErrBidInvalid=1]="ErrBidInvalid",e[e.ErrBidRound=2]="ErrBidRound"}(eS||(eS={})),function(e){e[e.ErrInsuranceFundAlreadyExists=1]="ErrInsuranceFundAlreadyExists",e[e.ErrInsuranceFundNotFound=2]="ErrInsuranceFundNotFound",e[e.ErrRedemptionAlreadyExists=3]="ErrRedemptionAlreadyExists",e[e.ErrInvalidDepositAmount=4]="ErrInvalidDepositAmount",e[e.ErrInvalidDepositDenom=5]="ErrInvalidDepositDenom",e[e.ErrPayoutTooLarge=6]="ErrPayoutTooLarge",e[e.ErrInvalidTicker=7]="ErrInvalidTicker",e[e.ErrInvalidQuoteDenom=8]="ErrInvalidQuoteDenom",e[e.ErrInvalidOracle=9]="ErrInvalidOracle",e[e.ErrInvalidExpirationTime=10]="ErrInvalidExpirationTime",e[e.ErrInvalidMarketID=11]="ErrInvalidMarketID",e[e.ErrInvalidShareDenom=12]="ErrInvalidShareDenom"}(tS||(tS={})),function(e){e[e.ErrStaleReport=1]="ErrStaleReport",e[e.ErrIncompleteProposal=2]="ErrIncompleteProposal",e[e.ErrRepeatedAddress=3]="ErrRepeatedAddress",e[e.ErrTooManySigners=4]="ErrTooManySigners",e[e.ErrIncorrectConfig=5]="ErrIncorrectConfig",e[e.ErrConfigDigestNotMatch=6]="ErrConfigDigestNotMatch",e[e.ErrWrongNumberOfSignatures=7]="ErrWrongNumberOfSignatures",e[e.ErrIncorrectSignature=8]="ErrIncorrectSignature",e[e.ErrNoTransmitter=9]="ErrNoTransmitter",e[e.ErrIncorrectTransmissionData=10]="ErrIncorrectTransmissionData",e[e.ErrNoTransmissionsFound=11]="ErrNoTransmissionsFound",e[e.ErrMedianValueOutOfBounds=12]="ErrMedianValueOutOfBounds",e[e.ErrIncorrectRewardPoolDenom=13]="ErrIncorrectRewardPoolDenom",e[e.ErrNoRewardPool=14]="ErrNoRewardPool",e[e.ErrInvalidPayees=15]="ErrInvalidPayees",e[e.ErrModuleAdminRestricted=16]="ErrModuleAdminRestricted",e[e.ErrFeedAlreadyExists=17]="ErrFeedAlreadyExists",e[e.ErrFeedDoesntExists=19]="ErrFeedDoesntExists",e[e.ErrAdminRestricted=20]="ErrAdminRestricted",e[e.ErrInsufficientRewardPool=21]="ErrInsufficientRewardPool",e[e.ErrPayeeAlreadySet=22]="ErrPayeeAlreadySet",e[e.ErrPayeeRestricted=23]="ErrPayeeRestricted",e[e.ErrFeedConfigNotFound=24]="ErrFeedConfigNotFound"}(nS||(nS={})),function(e){e[e.ErrEmptyRelayerAddr=1]="ErrEmptyRelayerAddr",e[e.ErrBadRatesCount=2]="ErrBadRatesCount",e[e.ErrBadResolveTimesCount=3]="ErrBadResolveTimesCount",e[e.ErrBadRequestIDsCount=4]="ErrBadRequestIDsCount",e[e.ErrRelayerNotAuthorized=5]="ErrRelayerNotAuthorized",e[e.ErrBadPriceFeedBaseCount=6]="ErrBadPriceFeedBaseCount",e[e.ErrBadPriceFeedQuoteCount=7]="ErrBadPriceFeedQuoteCount",e[e.ErrUnsupportedOracleType=8]="ErrUnsupportedOracleType",e[e.ErrBadMessagesCount=9]="ErrBadMessagesCount",e[e.ErrBadCoinbaseMessage=10]="ErrBadCoinbaseMessage",e[e.ErrInvalidEthereumSignature=11]="ErrInvalidEthereumSignature",e[e.ErrBadCoinbaseMessageTimestamp=12]="ErrBadCoinbaseMessageTimestamp",e[e.ErrCoinbasePriceNotFound=13]="ErrCoinbasePriceNotFound",e[e.ErrBadPrice=14]="ErrBadPrice",e[e.ErrPriceTooLarge=15]="ErrPriceTooLarge",e[e.ErrInvalidBandIBCRequest=16]="ErrInvalidBandIBCRequest",e[e.ErrSample=17]="ErrSample",e[e.ErrInvalidPacketTimeout=18]="ErrInvalidPacketTimeout",e[e.ErrBadSymbolsCount=19]="ErrBadSymbolsCount",e[e.ErrBadIBCPortBind=20]="ErrBadIBCPortBind",e[e.ErrInvalidPortID=21]="ErrInvalidPortID",e[e.ErrInvalidChannelID=22]="ErrInvalidChannelID",e[e.ErrBadRequestInterval=23]="ErrBadRequestInterval",e[e.ErrInvalidBandIBCUpdateRequest=24]="ErrInvalidBandIBCUpdateRequest",e[e.ErrBandIBCRequestNotFound=25]="ErrBandIBCRequestNotFound",e[e.ErrEmptyBaseInfo=26]="ErrEmptyBaseInfo",e[e.ErrEmptyProvider=27]="ErrEmptyProvider",e[e.ErrInvalidProvider=28]="ErrInvalidProvider",e[e.ErrInvalidSymbol=29]="ErrInvalidSymbol",e[e.ErrRelayerAlreadyExists=30]="ErrRelayerAlreadyExists",e[e.ErrProviderPriceNotFound=31]="ErrProviderPriceNotFound",e[e.ErrInvalidOracleRequest=32]="ErrInvalidOracleRequest",e[e.ErrOraclePriceNotFound=33]="ErrOraclePriceNotFound"}(aS||(aS={})),function(e){e[e.ErrInternal=1]="ErrInternal",e[e.ErrDuplicate=2]="ErrDuplicate",e[e.ErrInvalid=3]="ErrInvalid",e[e.ErrTimeout=4]="ErrTimeout",e[e.ErrUnknown=5]="ErrUnknown",e[e.ErrEmpty=6]="ErrEmpty",e[e.ErrOutdated=7]="ErrOutdated",e[e.ErrUnsupported=8]="ErrUnsupported",e[e.ErrNonContiguousEventNonce=9]="ErrNonContiguousEventNonce",e[e.ErrNoUnbatchedTxsFound=10]="ErrNoUnbatchedTxsFound",e[e.ErrResetDelegateKeys=11]="ErrResetDelegateKeys",e[e.ErrSupplyOverflow=12]="ErrSupplyOverflow",e[e.ErrInvalidEthSender=13]="ErrInvalidEthSender",e[e.ErrInvalidEthDestination=14]="ErrInvalidEthDestination"}(oS||(oS={})),function(e){e[e.ErrDenomExists=2]="ErrDenomExists",e[e.ErrUnauthorized=3]="ErrUnauthorized",e[e.ErrInvalidDenom=4]="ErrInvalidDenom",e[e.ErrInvalidCreator=5]="ErrInvalidCreator",e[e.ErrInvalidAuthorityMetadata=6]="ErrInvalidAuthorityMetadata",e[e.ErrInvalidGenesis=7]="ErrInvalidGenesis",e[e.ErrSubdenomTooLong=8]="ErrSubdenomTooLong",e[e.ErrSubdenomTooShort=9]="ErrSubdenomTooShort",e[e.ErrSubdenomNestedTooShort=10]="ErrSubdenomNestedTooShort",e[e.ErrCreatorTooLong=11]="ErrCreatorTooLong",e[e.ErrDenomDoesNotExist=12]="ErrDenomDoesNotExist",e[e.ErrAmountNotPositive=13]="ErrAmountNotPositive"}(rS||(rS={})),function(e){e[e.ErrInvalidGasLimit=1]="ErrInvalidGasLimit",e[e.ErrInvalidGasPrice=2]="ErrInvalidGasPrice",e[e.ErrInvalidContractAddress=3]="ErrInvalidContractAddress",e[e.ErrAlreadyRegistered=4]="ErrAlreadyRegistered",e[e.ErrDuplicateContract=5]="ErrDuplicateContract",e[e.ErrNoContractAddresses=6]="ErrNoContractAddresses",e[e.ErrInvalidCodeId=7]="ErrInvalidCodeId"}(iS||(iS={})),function(e){e[e.ErrEmptyValidatorAddr=2]="ErrEmptyValidatorAddr",e[e.ErrNoValidatorFound=3]="ErrNoValidatorFound",e[e.ErrValidatorOwnerExists=4]="ErrValidatorOwnerExists",e[e.ErrValidatorPubKeyExists=5]="ErrValidatorPubKeyExists",e[e.ErrValidatorPubKeyTypeNotSupported=6]="ErrValidatorPubKeyTypeNotSupported",e[e.ErrValidatorJailed=7]="ErrValidatorJailed",e[e.ErrBadRemoveValidator=8]="ErrBadRemoveValidator",e[e.ErrCommissionNegative=9]="ErrCommissionNegative",e[e.ErrCommissionHuge=10]="ErrCommissionHuge",e[e.ErrCommissionGTMaxRate=11]="ErrCommissionGTMaxRate",e[e.ErrCommissionUpdateTime=12]="ErrCommissionUpdateTime",e[e.ErrCommissionChangeRateNegative=13]="ErrCommissionChangeRateNegative",e[e.ErrCommissionChangeRateGTMaxRate=14]="ErrCommissionChangeRateGTMaxRate",e[e.ErrCommissionGTMaxChangeRate=15]="ErrCommissionGTMaxChangeRate",e[e.ErrSelfDelegationBelowMinimum=16]="ErrSelfDelegationBelowMinimum",e[e.ErrMinSelfDelegationDecreased=17]="ErrMinSelfDelegationDecreased",e[e.ErrEmptyDelegatorAddr=18]="ErrEmptyDelegatorAddr",e[e.ErrNoDelegation=19]="ErrNoDelegation",e[e.ErrBadDelegatorAddr=20]="ErrBadDelegatorAddr",e[e.ErrNoDelegatorForAddress=21]="ErrNoDelegatorForAddress",e[e.ErrInsufficientShares=22]="ErrInsufficientShares",e[e.ErrDelegationValidatorEmpty=23]="ErrDelegationValidatorEmpty",e[e.ErrNotEnoughDelegationShares=24]="ErrNotEnoughDelegationShares",e[e.ErrNotMature=25]="ErrNotMature",e[e.ErrNoUnbondingDelegation=26]="ErrNoUnbondingDelegation",e[e.ErrMaxUnbondingDelegationEntries=27]="ErrMaxUnbondingDelegationEntries",e[e.ErrNoRedelegation=28]="ErrNoRedelegation",e[e.ErrSelfRedelegation=29]="ErrSelfRedelegation",e[e.ErrTinyRedelegationAmount=30]="ErrTinyRedelegationAmount",e[e.ErrBadRedelegationDst=31]="ErrBadRedelegationDst",e[e.ErrTransitiveRedelegation=32]="ErrTransitiveRedelegation",e[e.ErrMaxRedelegationEntries=33]="ErrMaxRedelegationEntries",e[e.ErrDelegatorShareExRateInvalid=34]="ErrDelegatorShareExRateInvalid",e[e.ErrBothShareMsgsGiven=35]="ErrBothShareMsgsGiven",e[e.ErrNeitherShareMsgsGiven=36]="ErrNeitherShareMsgsGiven",e[e.ErrInvalidHistoricalInfo=37]="ErrInvalidHistoricalInfo",e[e.ErrNoHistoricalInfo=38]="ErrNoHistoricalInfo",e[e.ErrEmptyValidatorPubKey=39]="ErrEmptyValidatorPubKey",e[e.ErrCommissionLTMinRate=40]="ErrCommissionLTMinRate",e[e.ErrUnbondingNotFound=41]="ErrUnbondingNotFound",e[e.ErrUnbondingOnHoldRefCountNegative=42]="ErrUnbondingOnHoldRefCountNegative"}(sS||(sS={})),function(e){e[e.ErrUnknownProposal=2]="ErrUnknownProposal",e[e.ErrInactiveProposal=3]="ErrInactiveProposal",e[e.ErrAlreadyActiveProposal=4]="ErrAlreadyActiveProposal",e[e.ErrInvalidProposalContent=5]="ErrInvalidProposalContent",e[e.ErrInvalidProposalType=6]="ErrInvalidProposalType",e[e.ErrInvalidVote=7]="ErrInvalidVote",e[e.ErrInvalidGenesis=8]="ErrInvalidGenesis",e[e.ErrNoProposalHandlerExists=9]="ErrNoProposalHandlerExists",e[e.ErrUnroutableProposalMsg=10]="ErrUnroutableProposalMsg",e[e.ErrNoProposalMsgs=11]="ErrNoProposalMsgs",e[e.ErrInvalidProposalMsg=12]="ErrInvalidProposalMsg",e[e.ErrInvalidSigner=13]="ErrInvalidSigner",e[e.ErrInvalidSignalMsg=14]="ErrInvalidSignalMsg",e[e.ErrMetadataTooLong=15]="ErrMetadataTooLong",e[e.ErrMinDepositTooSmall=16]="ErrMinDepositTooSmall",e[e.ErrProposalNotFound=17]="ErrProposalNotFound",e[e.ErrInvalidProposer=18]="ErrInvalidProposer",e[e.ErrNoDeposits=19]="ErrNoDeposits",e[e.ErrVotingPeriodEnded=20]="ErrVotingPeriodEnded",e[e.ErrInvalidProposal=21]="ErrInvalidProposal"}(cS||(cS={})),function(e){e[e.ErrEmptyDelegatorAddr=2]="ErrEmptyDelegatorAddr",e[e.ErrEmptyWithdrawAddr=3]="ErrEmptyWithdrawAddr",e[e.ErrEmptyValidatorAddr=4]="ErrEmptyValidatorAddr",e[e.ErrEmptyDelegationDistInfo=5]="ErrEmptyDelegationDistInfo",e[e.ErrNoValidatorDistInfo=6]="ErrNoValidatorDistInfo",e[e.ErrNoValidatorCommission=7]="ErrNoValidatorCommission",e[e.ErrSetWithdrawAddrDisabled=8]="ErrSetWithdrawAddrDisabled",e[e.ErrBadDistribution=9]="ErrBadDistribution",e[e.ErrInvalidProposalAmount=10]="ErrInvalidProposalAmount",e[e.ErrEmptyProposalRecipient=11]="ErrEmptyProposalRecipient",e[e.ErrNoValidatorExists=12]="ErrNoValidatorExists",e[e.ErrNoDelegationExists=13]="ErrNoDelegationExists"}(uS||(uS={})),function(e){e[e.ErrNoInputs=2]="ErrNoInputs",e[e.ErrNoOutputs=3]="ErrNoOutputs",e[e.ErrInputOutputMismatch=4]="ErrInputOutputMismatch",e[e.ErrSendDisabled=5]="ErrSendDisabled",e[e.ErrDenomMetadataNotFound=6]="ErrDenomMetadataNotFound",e[e.ErrInvalidKey=7]="ErrInvalidKey",e[e.ErrDuplicateEntry=8]="ErrDuplicateEntry",e[e.ErrMultipleSenders=9]="ErrMultipleSenders"}(dS||(dS={})),function(e){e[e.ErrCreateFailed=2]="ErrCreateFailed",e[e.ErrAccountExists=3]="ErrAccountExists",e[e.ErrInstantiateFailed=4]="ErrInstantiateFailed",e[e.ErrExecuteFailed=5]="ErrExecuteFailed",e[e.ErrGasLimit=6]="ErrGasLimit",e[e.ErrInvalidGenesis=7]="ErrInvalidGenesis",e[e.ErrNotFound=8]="ErrNotFound",e[e.ErrQueryFailed=9]="ErrQueryFailed",e[e.ErrInvalidMsg=10]="ErrInvalidMsg",e[e.ErrMigrationFailed=11]="ErrMigrationFailed",e[e.ErrEmpty=12]="ErrEmpty",e[e.ErrLimit=13]="ErrLimit",e[e.ErrInvalid=14]="ErrInvalid",e[e.ErrDuplicate=15]="ErrDuplicate",e[e.ErrMaxIBCChannels=16]="ErrMaxIBCChannels",e[e.ErrUnsupportedForContract=17]="ErrUnsupportedForContract",e[e.ErrPinContractFailed=18]="ErrPinContractFailed",e[e.ErrUnpinContractFailed=19]="ErrUnpinContractFailed",e[e.ErrUnknownMsg=20]="ErrUnknownMsg",e[e.ErrInvalidEvent=21]="ErrInvalidEvent"}(lS||(lS={}));var pS,bS;!function(e){e.Get="GET",e.Post="POST",e.Options="OPTIONS"}(pS||(pS={})),function(e){e.Unspecified="unspecified",e.ChainError="chain-error",e.ExecutionError="execution-error",e.NotFoundError="not-found-error",e.ValidationError="validation-error",e.WalletError="wallet-error",e.WalletNotInstalledError="wallet-not-installed-error",e.GrpcUnaryRequest="grpc-unary-request",e.HttpRequest="http-request",e.Web3="web3"}(bS||(bS={}));var mS=function(e){return"".concat(e).toLowerCase().replace(new RegExp(/[-_]+/,"g")," ").replace(new RegExp(/[^\w\s]/,"g"),"").replace(new RegExp(/\s+(.)(\w*)/,"g"),(function(e,t,n){return"".concat(t.toUpperCase()+n)})).replace(new RegExp(/\w/),(function(e){return e.toUpperCase()}))},hS=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(e,a){var o;return(0,Gr.Z)(this,n),o=t.call(this,e.message),(0,_r.Z)((0,zT.Z)(o),"type",bS.Unspecified),(0,_r.Z)((0,zT.Z)(o),"code",-1),(0,_r.Z)((0,zT.Z)(o),"name",void 0),(0,_r.Z)((0,zT.Z)(o),"errorClass",void 0),(0,_r.Z)((0,zT.Z)(o),"context",void 0),(0,_r.Z)((0,zT.Z)(o),"contextModule",void 0),(0,_r.Z)((0,zT.Z)(o),"contextCode",void 0),(0,_r.Z)((0,zT.Z)(o),"message",""),(0,_r.Z)((0,zT.Z)(o),"stack",""),(0,_r.Z)((0,zT.Z)(o),"errorMessage",""),o.parseError(e),o.parseContext(a),o.parse(),o}return(0,zr.Z)(n,[{key:"parse",value:function(){}},{key:"parseError",value:function(e){this.setName(this.errorClass||this.constructor.name),this.setStack(e.stack||""),this.setMessage(e.message),this.errorMessage=e.message}},{key:"parseContext",value:function(e){var t=e||{contextModule:"",context:"",code:-1,type:bS.Unspecified},n=t.contextModule,a=t.type,o=t.code,r=t.context;this.context=r,this.contextModule=n,this.type=a||bS.Unspecified,this.code=o||-1}},{key:"setType",value:function(e){this.type=e}},{key:"setCode",value:function(e){this.code=e}},{key:"setContext",value:function(e){this.context=e}},{key:"setStack",value:function(e){ZT((0,fS.Z)(n.prototype),"stack",e,this,!0),this.stack=e}},{key:"setName",value:function(e){ZT((0,fS.Z)(n.prototype),"name",e,this,!0),this.name=e,this.errorClass=e}},{key:"setMessage",value:function(e){ZT((0,fS.Z)(n.prototype),"message",e,this,!0),this.message=e}},{key:"setContextModule",value:function(e){this.contextModule=e}},{key:"setContextCode",value:function(e){this.contextCode=e}},{key:"toOriginalError",value:function(){var e=new Error(this.errorMessage);return e.stack=this.stack,e.name=this.name||"",e}},{key:"toError",value:function(){var e=new Error(this.message);return e.stack=this.stack,e.name=this.name||"",e}},{key:"toCompactError",value:function(){var e=this.name||mS(this.type),t=new Error("".concat(this.message," | ").concat(JSON.stringify({message:this.message,errorClass:e,code:this.code,type:this.type,context:this.context,contextModule:this.contextModule,contextCode:this.contextCode})));return t.stack=this.stack,t.name=this.name||mS(this.type),t}},{key:"toJson",value:function(){return JSON.stringify({error:this.message,stack:this.stack})}},{key:"toObject",value:function(){var e=this.name||mS(this.type);return{message:this.message,errorClass:e,code:this.code,type:this.type,context:this.context,contextModule:this.contextModule,contextCode:this.contextCode}}},{key:"toString",value:function(){return this.message}}]),n}((0,Or.Z)(Error));(0,_r.Z)(hS,"errorClass","");var gS,yS,vS,wS,kS,AS,xS,IS,TS,SS,CS,ES,RS,MS,PS,US,_S=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(){var e;(0,Gr.Z)(this,n);for(var a=arguments.length,o=new Array(a),r=0;r1&&void 0!==arguments[1]?arguments[1]:18;return new eC.O(e).multipliedBy(new eC.O(10).pow(t))}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:18)}}],[{key:"make",value:function(e){return new n(e)}}]),n}(tC);n(22148);!function(e){e[e.ACCEPTED=202]="ACCEPTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.CONFLICT=409]="CONFLICT",e[e.CONTINUE=100]="CONTINUE",e[e.CREATED=201]="CREATED",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.GONE=410]="GONE",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.LOCKED=423]="LOCKED",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.OK=200]="OK",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.PROCESSING=102]="PROCESSING",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.USE_PROXY=305]="USE_PROXY",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST"}(US||(US={}));var aC;!function(e){e.Idle="idle",e.Loading="loading",e.Completed="completed",e.Error="error",e.Confirmed="confirmed"}(aC||(aC={}));var oC="inj",rC=4e5,iC=5e8,sC=(new tC(rC).times(iC).toString(),rC.toString(),new tC(86400),tC.clone({ROUNDING_MODE:tC.ROUND_DOWN}),tC.clone({ROUNDING_MODE:tC.ROUND_DOWN}),function(e){return new tC(e).toFixed(18)}),cC=function e(t){var n=t.object,a=t.messageType,o=t.primaryType,r=void 0===o?"MsgValue":o,i=["order_mask","order_type","oracle_type","round","oracle_scale_factor","expiry","option","proposal_id"],s=new Map,c=new Array;for(var u in GT(n)){var d=GT(n)[u];if("@type"!==u){var l=typeof d;if("boolean"===l)c.push({name:u,type:"bool"});else if("number"===l||"bigint"===l||i.includes(u))c.push({name:u,type:uC(u)});else if("string"===l)c.push({name:u,type:"string"});else{if("object"!==l)throw new _S(new Error("Type ".concat(u," not found")));if(Array.isArray(d)&&0===d.length)throw new _S(new Error("Array with length 0 found"));if(Array.isArray(d)&&d.length>0){var f=typeof d[0];if("boolean"===f||"number"===f||"string"===f){for(var p in d)if(typeof p!==f)throw new _S(new Error("Array with different types found"));"boolean"===f?c.push({name:u,type:"bool[]"}):"number"===f?c.push({name:u,type:"number[]"}):"string"===f&&c.push({name:u,type:"string[]"})}else{if("object"!==f)throw new _S(new Error("Array with elements of unknown type found"));var b=lC({property:XS(u),parentProperty:r,messageType:a}),m=e({object:d[0],primaryType:b,messageType:a}),h=m.get(b);c.push({name:u,type:"".concat(b,"[]")}),s.set(b,h);var g,y=(0,jr.Z)(m.keys());try{for(y.s();!(g=y.n()).done;){var v=g.value;v!==r&&s.set(v,m.get(v))}}catch(S){y.e(S)}finally{y.f()}}}else if(d instanceof Date)c.push({name:u,type:"string"});else{var w=lC({property:XS(u),parentProperty:r,messageType:a}),k=e({object:d,primaryType:w,messageType:a}),A=k.get(w);c.push({name:u,type:w}),s.set(w,A);var x,I=(0,jr.Z)(k.keys());try{for(I.s();!(x=I.n()).done;){var T=x.value;T!==r&&s.set(T,k.get(T))}}catch(S){I.e(S)}finally{I.f()}}}}}return s.set(r,c),s},uC=function(e){switch(e){case"order_mask":case"order_type":case"oracle_type":case"option":return"int32";case"round":case"oracle_scale_factor":case"proposal_id":default:return"uint64";case"expiry":return"int64"}},dC=function e(t,n){var a=["proposal_id","round","oracle_scale_factor","timeout_timestamp","revision_height","revision_number","expiry"],o=["min_price_tick_size","price","quantity","margin","trigger_price","min_quantity_tick_size"],r={"exchange/MsgIncreasePositionMargin":["amount"]},i={"wasmx/MsgExecuteContractCompat":["funds"]};return Object.keys(t).reduce((function(s,c){var u=t[c];if(!u){if(n){var d=Object.keys(i).find((function(e){return e===n}));if(d)if(i[d].includes(c))return(0,Br.Z)((0,Br.Z)({},s),{},(0,_r.Z)({},c,u))}return s}if("object"===typeof u)return u instanceof Date?(0,Br.Z)((0,Br.Z)({},s),{},(0,_r.Z)({},c,u.toJSON().split(".")[0]+"Z")):Array.isArray(u)?(0,Br.Z)((0,Br.Z)({},s),{},(0,_r.Z)({},c,u.map((function(t){return e(t)})))):(0,Br.Z)((0,Br.Z)({},s),{},(0,_r.Z)({},c,e(u)));if(function(e){return"number"===typeof e||!isNaN(parseFloat(e))}(u)&&a.includes(c))return(0,Br.Z)((0,Br.Z)({},s),{},(0,_r.Z)({},c,u.toString()));if("string"===typeof u){if(o.includes(c))return(0,Br.Z)((0,Br.Z)({},s),{},(0,_r.Z)({},c,sC(u)));if(n){var l=Object.keys(r).find((function(e){return e===n}));if(l)if(r[l].includes(c))return(0,Br.Z)((0,Br.Z)({},s),{},(0,_r.Z)({},c,sC(u)))}}return(0,Br.Z)((0,Br.Z)({},s),{},(0,_r.Z)({},c,u))}),{})},lC=function(e){var t=e.property,n=e.parentProperty;return"wasm/MsgExecuteContract"===e.messageType?fC(t,n):pC(t,n)},fC=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="CosmwasmInnerMsgMarker",a=e.replace("Type","");if("Msg"===a)return n;var o=t.replace(n,"");return"".concat(o+a,"Value")},pC=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.replace("Type",""),a="MsgValue"===t?"":t.replace("Type","");return"Type".concat(a+n)};function bC(e){if(Array.isArray(e))return e.map(bC);if("object"!==typeof e||null===e)return e;var t={};return Object.keys(e).sort().forEach((function(n){void 0!==e[n]&&null!==e[n]&&(t[n]=bC(e[n]))})),t}var mC,hC,gC=function(){function e(t){(0,Gr.Z)(this,e),(0,_r.Z)(this,"params",void 0),this.params=t}return(0,zr.Z)(e,[{key:"toJSON",value:function(){return JSON.stringify(bC(this.toData()))}},{key:"toEip712Types",value:function(){var e=this.toAmino();return cC({object:e.value,messageType:e.type})}},{key:"toEip712",value:function(){var e=this.toAmino(),t=e.type,n=e.value;return{type:t,value:dC(n,t)}}},{key:"toDirectSignJSON",value:function(){return JSON.stringify(bC(this.toDirectSign()))}}]),e}(),yC=n(27833);!function(e){e[e.NO_HASH=0]="NO_HASH",e[e.SHA256=1]="SHA256",e[e.SHA512=2]="SHA512",e[e.KECCAK=3]="KECCAK",e[e.RIPEMD160=4]="RIPEMD160",e[e.BITCOIN=5]="BITCOIN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(mC||(mC={})),function(e){e[e.NO_PREFIX=0]="NO_PREFIX",e[e.VAR_PROTO=1]="VAR_PROTO",e[e.VAR_RLP=2]="VAR_RLP",e[e.FIXED32_BIG=3]="FIXED32_BIG",e[e.FIXED32_LITTLE=4]="FIXED32_LITTLE",e[e.FIXED64_BIG=5]="FIXED64_BIG",e[e.FIXED64_LITTLE=6]="FIXED64_LITTLE",e[e.REQUIRE_32_BYTES=7]="REQUIRE_32_BYTES",e[e.REQUIRE_64_BYTES=8]="REQUIRE_64_BYTES",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(hC||(hC={}));!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();var vC=null;try{vC=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(sK){}function wC(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function kC(e){return!0===(e&&e.__isLong__)}function AC(e){var t=Math.clz32(e&-e);return e?31-t:t}wC.prototype.__isLong__,Object.defineProperty(wC.prototype,"__isLong__",{value:!0}),wC.isLong=kC;var xC={},IC={};function TC(e,t){var n,a,o;return t?(o=0<=(e>>>=0)&&e<256)&&(a=IC[e])?a:(n=CC(e,0,!0),o&&(IC[e]=n),n):(o=-128<=(e|=0)&&e<128)&&(a=xC[e])?a:(n=CC(e,e<0?-1:0,!1),o&&(xC[e]=n),n)}function SC(e,t){if(isNaN(e))return t?NC:DC;if(t){if(e<0)return NC;if(e>=UC)return HC}else{if(e<=-_C)return GC;if(e+1>=_C)return jC}return e<0?SC(-e,t).neg():CC(e%PC|0,e/PC|0,t)}function CC(e,t,n){return new wC(e,t,n)}wC.fromInt=TC,wC.fromNumber=SC,wC.fromBits=CC;var EC=Math.pow;function RC(e,t,n){if(0===e.length)throw Error("empty string");if("number"===typeof t?(n=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?NC:DC;if((n=n||10)<2||360)throw Error("interior hyphen");if(0===a)return RC(e.substring(1),t,n).neg();for(var o=SC(EC(n,8)),r=DC,i=0;i>>0:this.low},zC.toNumber=function(){return this.unsigned?(this.high>>>0)*PC+(this.low>>>0):this.high*PC+(this.low>>>0)},zC.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((r=s).isZero())return c+i;for(;c.length<6;)c="0"+c;i=""+c+i}},zC.getHighBits=function(){return this.high},zC.getHighBitsUnsigned=function(){return this.high>>>0},zC.getLowBits=function(){return this.low},zC.getLowBitsUnsigned=function(){return this.low>>>0},zC.getNumBitsAbs=function(){if(this.isNegative())return this.eq(GC)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},zC.isOdd=function(){return 1===(1&this.low)},zC.isEven=function(){return 0===(1&this.low)},zC.equals=function(e){return kC(e)||(e=MC(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&(this.high===e.high&&this.low===e.low)},zC.eq=zC.equals,zC.notEquals=function(e){return!this.eq(e)},zC.neq=zC.notEquals,zC.ne=zC.notEquals,zC.lessThan=function(e){return this.comp(e)<0},zC.lt=zC.lessThan,zC.lessThanOrEqual=function(e){return this.comp(e)<=0},zC.lte=zC.lessThanOrEqual,zC.le=zC.lessThanOrEqual,zC.greaterThan=function(e){return this.comp(e)>0},zC.gt=zC.greaterThan,zC.greaterThanOrEqual=function(e){return this.comp(e)>=0},zC.gte=zC.greaterThanOrEqual,zC.ge=zC.greaterThanOrEqual,zC.compare=function(e){if(kC(e)||(e=MC(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},zC.comp=zC.compare,zC.negate=function(){return!this.unsigned&&this.eq(GC)?GC:this.not().add(OC)},zC.neg=zC.negate,zC.add=function(e){kC(e)||(e=MC(e));var t=this.high>>>16,n=65535&this.high,a=this.low>>>16,o=65535&this.low,r=e.high>>>16,i=65535&e.high,s=e.low>>>16,c=0,u=0,d=0,l=0;return d+=(l+=o+(65535&e.low))>>>16,u+=(d+=a+s)>>>16,c+=(u+=n+i)>>>16,c+=t+r,CC((d&=65535)<<16|(l&=65535),(c&=65535)<<16|(u&=65535),this.unsigned)},zC.subtract=function(e){return kC(e)||(e=MC(e)),this.add(e.neg())},zC.sub=zC.subtract,zC.multiply=function(e){if(this.isZero())return this;if(kC(e)||(e=MC(e)),vC)return CC(vC.mul(this.low,this.high,e.low,e.high),vC.get_high(),this.unsigned);if(e.isZero())return this.unsigned?NC:DC;if(this.eq(GC))return e.isOdd()?GC:DC;if(e.eq(GC))return this.isOdd()?GC:DC;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(BC)&&e.lt(BC))return SC(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,a=this.low>>>16,o=65535&this.low,r=e.high>>>16,i=65535&e.high,s=e.low>>>16,c=65535&e.low,u=0,d=0,l=0,f=0;return l+=(f+=o*c)>>>16,d+=(l+=a*c)>>>16,l&=65535,d+=(l+=o*s)>>>16,u+=(d+=n*c)>>>16,d&=65535,u+=(d+=a*s)>>>16,d&=65535,u+=(d+=o*i)>>>16,u+=t*c+n*s+a*i+o*r,CC((l&=65535)<<16|(f&=65535),(u&=65535)<<16|(d&=65535),this.unsigned)},zC.mul=zC.multiply,zC.divide=function(e){if(kC(e)||(e=MC(e)),e.isZero())throw Error("division by zero");var t,n,a;if(vC)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?CC((this.unsigned?vC.div_u:vC.div_s)(this.low,this.high,e.low,e.high),vC.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?NC:DC;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return NC;if(e.gt(this.shru(1)))return FC;a=NC}else{if(this.eq(GC))return e.eq(OC)||e.eq(LC)?GC:e.eq(GC)?OC:(t=this.shr(1).div(e).shl(1)).eq(DC)?e.isNegative()?OC:LC:(n=this.sub(e.mul(t)),a=t.add(n.div(e)));if(e.eq(GC))return this.unsigned?NC:DC;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();a=DC}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(t)/Math.LN2),r=o<=48?1:EC(2,o-48),i=SC(t),s=i.mul(e);s.isNegative()||s.gt(n);)s=(i=SC(t-=r,this.unsigned)).mul(e);i.isZero()&&(i=OC),a=a.add(i),n=n.sub(s)}return a},zC.div=zC.divide,zC.modulo=function(e){return kC(e)||(e=MC(e)),vC?CC((this.unsigned?vC.rem_u:vC.rem_s)(this.low,this.high,e.low,e.high),vC.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},zC.mod=zC.modulo,zC.rem=zC.modulo,zC.not=function(){return CC(~this.low,~this.high,this.unsigned)},zC.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},zC.clz=zC.countLeadingZeros,zC.countTrailingZeros=function(){return this.low?AC(this.low):AC(this.high)+32},zC.ctz=zC.countTrailingZeros,zC.and=function(e){return kC(e)||(e=MC(e)),CC(this.low&e.low,this.high&e.high,this.unsigned)},zC.or=function(e){return kC(e)||(e=MC(e)),CC(this.low|e.low,this.high|e.high,this.unsigned)},zC.xor=function(e){return kC(e)||(e=MC(e)),CC(this.low^e.low,this.high^e.high,this.unsigned)},zC.shiftLeft=function(e){return kC(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?CC(this.low<>>32-e,this.unsigned):CC(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):CC(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},zC.shr=zC.shiftRight,zC.shiftRightUnsigned=function(e){return kC(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?CC(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):CC(32===e?this.high:this.high>>>e-32,0,this.unsigned)},zC.shru=zC.shiftRightUnsigned,zC.shr_u=zC.shiftRightUnsigned,zC.rotateLeft=function(e){var t;return kC(e)&&(e=e.toInt()),0===(e&=63)?this:32===e?CC(this.high,this.low,this.unsigned):e<32?(t=32-e,CC(this.low<>>t,this.high<>>t,this.unsigned)):(t=32-(e-=32),CC(this.high<>>t,this.low<>>t,this.unsigned))},zC.rotl=zC.rotateLeft,zC.rotateRight=function(e){var t;return kC(e)&&(e=e.toInt()),0===(e&=63)?this:32===e?CC(this.high,this.low,this.unsigned):e<32?(t=32-e,CC(this.high<>>e,this.low<>>e,this.unsigned)):(t=32-(e-=32),CC(this.low<>>e,this.high<>>e,this.unsigned))},zC.rotr=zC.rotateRight,zC.toSigned=function(){return this.unsigned?CC(this.low,this.high,!1):this},zC.toUnsigned=function(){return this.unsigned?this:CC(this.low,this.high,!0)},zC.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},zC.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},zC.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},wC.fromBytes=function(e,t,n){return n?wC.fromBytesLE(e,t):wC.fromBytesBE(e,t)},wC.fromBytesLE=function(e,t){return new wC(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},wC.fromBytesBE=function(e,t){return new wC(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var KC=wC;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var WC=n(79652);!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;var ZC=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();ZC.Error;var VC={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={denom:"",amount:""};n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{denom:qC(e.denom)?String(e.denom):"",amount:qC(e.amount)?String(e.amount):""}},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},create:function(e){return VC.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={denom:"",amount:""};return a.denom=null!==(t=e.denom)&&void 0!==t?t:"",a.amount=null!==(n=e.amount)&&void 0!==n?n:"",a}};function qC(e){return null!==e&&void 0!==e}(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var QC,JC;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure()),function(e){e[e.BLOCK_ID_FLAG_UNKNOWN=0]="BLOCK_ID_FLAG_UNKNOWN",e[e.BLOCK_ID_FLAG_ABSENT=1]="BLOCK_ID_FLAG_ABSENT",e[e.BLOCK_ID_FLAG_COMMIT=2]="BLOCK_ID_FLAG_COMMIT",e[e.BLOCK_ID_FLAG_NIL=3]="BLOCK_ID_FLAG_NIL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(QC||(QC={})),function(e){e[e.SIGNED_MSG_TYPE_UNKNOWN=0]="SIGNED_MSG_TYPE_UNKNOWN",e[e.SIGNED_MSG_TYPE_PREVOTE=1]="SIGNED_MSG_TYPE_PREVOTE",e[e.SIGNED_MSG_TYPE_PRECOMMIT=2]="SIGNED_MSG_TYPE_PRECOMMIT",e[e.SIGNED_MSG_TYPE_PROPOSAL=32]="SIGNED_MSG_TYPE_PROPOSAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(JC||(JC={}));var YC,XC,$C,eE;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure()),function(e){e[e.NEW=0]="NEW",e[e.RECHECK=1]="RECHECK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(YC||(YC={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.DUPLICATE_VOTE=1]="DUPLICATE_VOTE",e[e.LIGHT_CLIENT_ATTACK=2]="LIGHT_CLIENT_ATTACK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(XC||(XC={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ACCEPT=1]="ACCEPT",e[e.ABORT=2]="ABORT",e[e.REJECT=3]="REJECT",e[e.REJECT_FORMAT=4]="REJECT_FORMAT",e[e.REJECT_SENDER=5]="REJECT_SENDER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}($C||($C={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ACCEPT=1]="ACCEPT",e[e.ABORT=2]="ABORT",e[e.RETRY=3]="RETRY",e[e.RETRY_SNAPSHOT=4]="RETRY_SNAPSHOT",e[e.REJECT_SNAPSHOT=5]="REJECT_SNAPSHOT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(eE||(eE={}));var tE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());tE.Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var nE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());nE.Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var aE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());aE.Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;var oE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();oE.Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var rE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();rE.Error;(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;var iE,sE;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();!function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",e[e.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",e[e.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",e[e.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",e[e.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(iE||(iE={})),function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",e[e.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",e[e.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",e[e.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",e[e.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",e[e.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(sE||(sE={}));!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var cE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());cE.Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var uE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());uE.Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var dE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();dE.Error;(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var lE;(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;!function(e){e[e.BOND_STATUS_UNSPECIFIED=0]="BOND_STATUS_UNSPECIFIED",e[e.BOND_STATUS_UNBONDED=1]="BOND_STATUS_UNBONDED",e[e.BOND_STATUS_UNBONDING=2]="BOND_STATUS_UNBONDING",e[e.BOND_STATUS_BONDED=3]="BOND_STATUS_BONDED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(lE||(lE={}));yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var fE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());fE.Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var pE;(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;!function(e){e[e.AUTHORIZATION_TYPE_UNSPECIFIED=0]="AUTHORIZATION_TYPE_UNSPECIFIED",e[e.AUTHORIZATION_TYPE_DELEGATE=1]="AUTHORIZATION_TYPE_DELEGATE",e[e.AUTHORIZATION_TYPE_UNDELEGATE=2]="AUTHORIZATION_TYPE_UNDELEGATE",e[e.AUTHORIZATION_TYPE_REDELEGATE=3]="AUTHORIZATION_TYPE_REDELEGATE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(pE||(pE={}));yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var bE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());bE.Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var mE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var hE;mE.Error;!function(e){e[e.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",e[e.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",e[e.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",e[e.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(hE||(hE={}));!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var gE,yE;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure()),function(e){e[e.ORDER_BY_UNSPECIFIED=0]="ORDER_BY_UNSPECIFIED",e[e.ORDER_BY_ASC=1]="ORDER_BY_ASC",e[e.ORDER_BY_DESC=2]="ORDER_BY_DESC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(gE||(gE={})),function(e){e[e.BROADCAST_MODE_UNSPECIFIED=0]="BROADCAST_MODE_UNSPECIFIED",e[e.BROADCAST_MODE_BLOCK=1]="BROADCAST_MODE_BLOCK",e[e.BROADCAST_MODE_SYNC=2]="BROADCAST_MODE_SYNC",e[e.BROADCAST_MODE_ASYNC=3]="BROADCAST_MODE_ASYNC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(yE||(yE={}));var vE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var wE,kE;vE.Error;!function(e){e[e.ACCESS_TYPE_UNSPECIFIED=0]="ACCESS_TYPE_UNSPECIFIED",e[e.ACCESS_TYPE_NOBODY=1]="ACCESS_TYPE_NOBODY",e[e.ACCESS_TYPE_ONLY_ADDRESS=2]="ACCESS_TYPE_ONLY_ADDRESS",e[e.ACCESS_TYPE_EVERYBODY=3]="ACCESS_TYPE_EVERYBODY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(wE||(wE={})),function(e){e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED=0]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT=1]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE=2]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS=3]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(kE||(kE={}));!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var AE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());AE.Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var xE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());xE.Error;var IE,TE,SE,CE,EE,RE;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();!function(e){e[e.TYPE_DOUBLE=1]="TYPE_DOUBLE",e[e.TYPE_FLOAT=2]="TYPE_FLOAT",e[e.TYPE_INT64=3]="TYPE_INT64",e[e.TYPE_UINT64=4]="TYPE_UINT64",e[e.TYPE_INT32=5]="TYPE_INT32",e[e.TYPE_FIXED64=6]="TYPE_FIXED64",e[e.TYPE_FIXED32=7]="TYPE_FIXED32",e[e.TYPE_BOOL=8]="TYPE_BOOL",e[e.TYPE_STRING=9]="TYPE_STRING",e[e.TYPE_GROUP=10]="TYPE_GROUP",e[e.TYPE_MESSAGE=11]="TYPE_MESSAGE",e[e.TYPE_BYTES=12]="TYPE_BYTES",e[e.TYPE_UINT32=13]="TYPE_UINT32",e[e.TYPE_ENUM=14]="TYPE_ENUM",e[e.TYPE_SFIXED32=15]="TYPE_SFIXED32",e[e.TYPE_SFIXED64=16]="TYPE_SFIXED64",e[e.TYPE_SINT32=17]="TYPE_SINT32",e[e.TYPE_SINT64=18]="TYPE_SINT64",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(IE||(IE={})),function(e){e[e.LABEL_OPTIONAL=1]="LABEL_OPTIONAL",e[e.LABEL_REQUIRED=2]="LABEL_REQUIRED",e[e.LABEL_REPEATED=3]="LABEL_REPEATED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(TE||(TE={})),function(e){e[e.SPEED=1]="SPEED",e[e.CODE_SIZE=2]="CODE_SIZE",e[e.LITE_RUNTIME=3]="LITE_RUNTIME",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(SE||(SE={})),function(e){e[e.STRING=0]="STRING",e[e.CORD=1]="CORD",e[e.STRING_PIECE=2]="STRING_PIECE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(CE||(CE={})),function(e){e[e.JS_NORMAL=0]="JS_NORMAL",e[e.JS_STRING=1]="JS_STRING",e[e.JS_NUMBER=2]="JS_NUMBER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(EE||(EE={})),function(e){e[e.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",e[e.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",e[e.IDEMPOTENT=2]="IDEMPOTENT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(RE||(RE={}));!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var ME=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());ME.Error;var PE,UE;!function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.STATE_CLOSED=4]="STATE_CLOSED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(PE||(PE={})),function(e){e[e.ORDER_NONE_UNSPECIFIED=0]="ORDER_NONE_UNSPECIFIED",e[e.ORDER_UNORDERED=1]="ORDER_UNORDERED",e[e.ORDER_ORDERED=2]="ORDER_ORDERED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(UE||(UE={}));!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var _E=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());_E.Error;var BE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());BE.Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var DE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());DE.Error;var NE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();NE.Error;var OE;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();!function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(OE||(OE={}));yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var FE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());FE.Error;var LE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());LE.Error;(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;var jE;!function(e){e[e.DATA_TYPE_UNINITIALIZED_UNSPECIFIED=0]="DATA_TYPE_UNINITIALIZED_UNSPECIFIED",e[e.DATA_TYPE_CLIENT_STATE=1]="DATA_TYPE_CLIENT_STATE",e[e.DATA_TYPE_CONSENSUS_STATE=2]="DATA_TYPE_CONSENSUS_STATE",e[e.DATA_TYPE_CONNECTION_STATE=3]="DATA_TYPE_CONNECTION_STATE",e[e.DATA_TYPE_CHANNEL_STATE=4]="DATA_TYPE_CHANNEL_STATE",e[e.DATA_TYPE_PACKET_COMMITMENT=5]="DATA_TYPE_PACKET_COMMITMENT",e[e.DATA_TYPE_PACKET_ACKNOWLEDGEMENT=6]="DATA_TYPE_PACKET_ACKNOWLEDGEMENT",e[e.DATA_TYPE_PACKET_RECEIPT_ABSENCE=7]="DATA_TYPE_PACKET_RECEIPT_ABSENCE",e[e.DATA_TYPE_NEXT_SEQUENCE_RECV=8]="DATA_TYPE_NEXT_SEQUENCE_RECV",e[e.DATA_TYPE_HEADER=9]="DATA_TYPE_HEADER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(jE||(jE={}));var HE;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure()),function(e){e[e.DATA_TYPE_UNINITIALIZED_UNSPECIFIED=0]="DATA_TYPE_UNINITIALIZED_UNSPECIFIED",e[e.DATA_TYPE_CLIENT_STATE=1]="DATA_TYPE_CLIENT_STATE",e[e.DATA_TYPE_CONSENSUS_STATE=2]="DATA_TYPE_CONSENSUS_STATE",e[e.DATA_TYPE_CONNECTION_STATE=3]="DATA_TYPE_CONNECTION_STATE",e[e.DATA_TYPE_CHANNEL_STATE=4]="DATA_TYPE_CHANNEL_STATE",e[e.DATA_TYPE_PACKET_COMMITMENT=5]="DATA_TYPE_PACKET_COMMITMENT",e[e.DATA_TYPE_PACKET_ACKNOWLEDGEMENT=6]="DATA_TYPE_PACKET_ACKNOWLEDGEMENT",e[e.DATA_TYPE_PACKET_RECEIPT_ABSENCE=7]="DATA_TYPE_PACKET_RECEIPT_ABSENCE",e[e.DATA_TYPE_NEXT_SEQUENCE_RECV=8]="DATA_TYPE_NEXT_SEQUENCE_RECV",e[e.DATA_TYPE_HEADER=9]="DATA_TYPE_HEADER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(HE||(HE={}));!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var GE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());GE.Error;var zE=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());zE.Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();var KE,WE;function ZE(e){switch(e){case 0:case"Unspecified":return KE.Unspecified;case 1:case"Band":return KE.Band;case 2:case"PriceFeed":return KE.PriceFeed;case 3:case"Coinbase":return KE.Coinbase;case 4:case"Chainlink":return KE.Chainlink;case 5:case"Razor":return KE.Razor;case 6:case"Dia":return KE.Dia;case 7:case"API3":return KE.API3;case 8:case"Uma":return KE.Uma;case 9:case"Pyth":return KE.Pyth;case 10:case"BandIBC":return KE.BandIBC;case 11:case"Provider":return KE.Provider;default:return KE.UNRECOGNIZED}}function VE(e){switch(e){case KE.Unspecified:return"Unspecified";case KE.Band:return"Band";case KE.PriceFeed:return"PriceFeed";case KE.Coinbase:return"Coinbase";case KE.Chainlink:return"Chainlink";case KE.Razor:return"Razor";case KE.Dia:return"Dia";case KE.API3:return"API3";case KE.Uma:return"Uma";case KE.Pyth:return"Pyth";case KE.BandIBC:return"BandIBC";case KE.Provider:return"Provider";case KE.UNRECOGNIZED:default:return"UNRECOGNIZED"}}!function(e){e[e.Unspecified=0]="Unspecified",e[e.Band=1]="Band",e[e.PriceFeed=2]="PriceFeed",e[e.Coinbase=3]="Coinbase",e[e.Chainlink=4]="Chainlink",e[e.Razor=5]="Razor",e[e.Dia=6]="Dia",e[e.API3=7]="API3",e[e.Uma=8]="Uma",e[e.Pyth=9]="Pyth",e[e.BandIBC=10]="BandIBC",e[e.Provider=11]="Provider",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(KE||(KE={})),function(e){e[e.Unknown=0]="Unknown",e[e.Trading=1]="Trading",e[e.Halted=2]="Halted",e[e.Auction=3]="Auction",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(WE||(WE={}));var qE={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return 0!==e.groupCount&&t.uint32(8).uint32(e.groupCount),0!==e.recordsSampleSize&&t.uint32(16).uint32(e.recordsSampleSize),""!==e.mean&&t.uint32(26).string(e.mean),""!==e.twap&&t.uint32(34).string(e.twap),"0"!==e.firstTimestamp&&t.uint32(40).int64(e.firstTimestamp),"0"!==e.lastTimestamp&&t.uint32(48).int64(e.lastTimestamp),""!==e.minPrice&&t.uint32(58).string(e.minPrice),""!==e.maxPrice&&t.uint32(66).string(e.maxPrice),""!==e.medianPrice&&t.uint32(74).string(e.medianPrice),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={groupCount:0,recordsSampleSize:0,mean:"",twap:"",firstTimestamp:"0",lastTimestamp:"0",minPrice:"",maxPrice:"",medianPrice:""};n.pos>>3){case 1:o.groupCount=n.uint32();break;case 2:o.recordsSampleSize=n.uint32();break;case 3:o.mean=n.string();break;case 4:o.twap=n.string();break;case 5:o.firstTimestamp=eR(n.int64());break;case 6:o.lastTimestamp=eR(n.int64());break;case 7:o.minPrice=n.string();break;case 8:o.maxPrice=n.string();break;case 9:o.medianPrice=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{groupCount:tR(e.groupCount)?Number(e.groupCount):0,recordsSampleSize:tR(e.recordsSampleSize)?Number(e.recordsSampleSize):0,mean:tR(e.mean)?String(e.mean):"",twap:tR(e.twap)?String(e.twap):"",firstTimestamp:tR(e.firstTimestamp)?String(e.firstTimestamp):"0",lastTimestamp:tR(e.lastTimestamp)?String(e.lastTimestamp):"0",minPrice:tR(e.minPrice)?String(e.minPrice):"",maxPrice:tR(e.maxPrice)?String(e.maxPrice):"",medianPrice:tR(e.medianPrice)?String(e.medianPrice):""}},toJSON:function(e){var t={};return void 0!==e.groupCount&&(t.groupCount=Math.round(e.groupCount)),void 0!==e.recordsSampleSize&&(t.recordsSampleSize=Math.round(e.recordsSampleSize)),void 0!==e.mean&&(t.mean=e.mean),void 0!==e.twap&&(t.twap=e.twap),void 0!==e.firstTimestamp&&(t.firstTimestamp=e.firstTimestamp),void 0!==e.lastTimestamp&&(t.lastTimestamp=e.lastTimestamp),void 0!==e.minPrice&&(t.minPrice=e.minPrice),void 0!==e.maxPrice&&(t.maxPrice=e.maxPrice),void 0!==e.medianPrice&&(t.medianPrice=e.medianPrice),t},create:function(e){return qE.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i,s,c,u,d={groupCount:0,recordsSampleSize:0,mean:"",twap:"",firstTimestamp:"0",lastTimestamp:"0",minPrice:"",maxPrice:"",medianPrice:""};return d.groupCount=null!==(t=e.groupCount)&&void 0!==t?t:0,d.recordsSampleSize=null!==(n=e.recordsSampleSize)&&void 0!==n?n:0,d.mean=null!==(a=e.mean)&&void 0!==a?a:"",d.twap=null!==(o=e.twap)&&void 0!==o?o:"",d.firstTimestamp=null!==(r=e.firstTimestamp)&&void 0!==r?r:"0",d.lastTimestamp=null!==(i=e.lastTimestamp)&&void 0!==i?i:"0",d.minPrice=null!==(s=e.minPrice)&&void 0!==s?s:"",d.maxPrice=null!==(c=e.maxPrice)&&void 0!==c?c:"",d.medianPrice=null!==(u=e.medianPrice)&&void 0!==u?u:"",d}};var QE,JE,YE,XE,$E;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();function eR(e){return e.toString()}function tR(e){return null!==e&&void 0!==e}function nR(e){switch(e){case 0:case"Nobody":return QE.Nobody;case 1:case"BeginBlockerSmartContractsOnly":return QE.BeginBlockerSmartContractsOnly;case 2:case"SmartContractsOnly":return QE.SmartContractsOnly;case 3:case"Everyone":return QE.Everyone;default:return QE.UNRECOGNIZED}}function aR(e){switch(e){case 0:case"Unspecified":return JE.Unspecified;case 1:case"Active":return JE.Active;case 2:case"Paused":return JE.Paused;case 3:case"Demolished":return JE.Demolished;case 4:case"Expired":return JE.Expired;default:return JE.UNRECOGNIZED}}function oR(e){switch(e){case JE.Unspecified:return"Unspecified";case JE.Active:return"Active";case JE.Paused:return"Paused";case JE.Demolished:return"Demolished";case JE.Expired:return"Expired";case JE.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function rR(e){switch(e){case 0:case"UNSPECIFIED":return YE.UNSPECIFIED;case 1:case"BUY":return YE.BUY;case 2:case"SELL":return YE.SELL;case 3:case"STOP_BUY":return YE.STOP_BUY;case 4:case"STOP_SELL":return YE.STOP_SELL;case 5:case"TAKE_BUY":return YE.TAKE_BUY;case 6:case"TAKE_SELL":return YE.TAKE_SELL;case 7:case"BUY_PO":return YE.BUY_PO;case 8:case"SELL_PO":return YE.SELL_PO;case 9:case"BUY_ATOMIC":return YE.BUY_ATOMIC;case 10:case"SELL_ATOMIC":return YE.SELL_ATOMIC;default:return YE.UNRECOGNIZED}}function iR(e){switch(e){case YE.UNSPECIFIED:return"UNSPECIFIED";case YE.BUY:return"BUY";case YE.SELL:return"SELL";case YE.STOP_BUY:return"STOP_BUY";case YE.STOP_SELL:return"STOP_SELL";case YE.TAKE_BUY:return"TAKE_BUY";case YE.TAKE_SELL:return"TAKE_SELL";case YE.BUY_PO:return"BUY_PO";case YE.SELL_PO:return"SELL_PO";case YE.BUY_ATOMIC:return"BUY_ATOMIC";case YE.SELL_ATOMIC:return"SELL_ATOMIC";case YE.UNRECOGNIZED:default:return"UNRECOGNIZED"}}yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure()),function(e){e[e.Nobody=0]="Nobody",e[e.BeginBlockerSmartContractsOnly=1]="BeginBlockerSmartContractsOnly",e[e.SmartContractsOnly=2]="SmartContractsOnly",e[e.Everyone=3]="Everyone",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(QE||(QE={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.Active=1]="Active",e[e.Paused=2]="Paused",e[e.Demolished=3]="Demolished",e[e.Expired=4]="Expired",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(JE||(JE={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.BUY=1]="BUY",e[e.SELL=2]="SELL",e[e.STOP_BUY=3]="STOP_BUY",e[e.STOP_SELL=4]="STOP_SELL",e[e.TAKE_BUY=5]="TAKE_BUY",e[e.TAKE_SELL=6]="TAKE_SELL",e[e.BUY_PO=7]="BUY_PO",e[e.SELL_PO=8]="SELL_PO",e[e.BUY_ATOMIC=9]="BUY_ATOMIC",e[e.SELL_ATOMIC=10]="SELL_ATOMIC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(YE||(YE={})),function(e){e[e.UnspecifiedExecutionType=0]="UnspecifiedExecutionType",e[e.Market=1]="Market",e[e.LimitFill=2]="LimitFill",e[e.LimitMatchRestingOrder=3]="LimitMatchRestingOrder",e[e.LimitMatchNewOrder=4]="LimitMatchNewOrder",e[e.MarketLiquidation=5]="MarketLiquidation",e[e.ExpiryMarketSettlement=6]="ExpiryMarketSettlement",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(XE||(XE={})),function(e){e[e.UNUSED=0]="UNUSED",e[e.ANY=1]="ANY",e[e.REGULAR=2]="REGULAR",e[e.CONDITIONAL=4]="CONDITIONAL",e[e.DIRECTION_BUY_OR_HIGHER=8]="DIRECTION_BUY_OR_HIGHER",e[e.DIRECTION_SELL_OR_LOWER=16]="DIRECTION_SELL_OR_LOWER",e[e.TYPE_MARKET=32]="TYPE_MARKET",e[e.TYPE_LIMIT=64]="TYPE_LIMIT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}($E||($E={}));var sR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.spotMarketInstantListingFee&&VC.encode(e.spotMarketInstantListingFee,t.uint32(10).fork()).ldelim(),void 0!==e.derivativeMarketInstantListingFee&&VC.encode(e.derivativeMarketInstantListingFee,t.uint32(18).fork()).ldelim(),""!==e.defaultSpotMakerFeeRate&&t.uint32(26).string(e.defaultSpotMakerFeeRate),""!==e.defaultSpotTakerFeeRate&&t.uint32(34).string(e.defaultSpotTakerFeeRate),""!==e.defaultDerivativeMakerFeeRate&&t.uint32(42).string(e.defaultDerivativeMakerFeeRate),""!==e.defaultDerivativeTakerFeeRate&&t.uint32(50).string(e.defaultDerivativeTakerFeeRate),""!==e.defaultInitialMarginRatio&&t.uint32(58).string(e.defaultInitialMarginRatio),""!==e.defaultMaintenanceMarginRatio&&t.uint32(66).string(e.defaultMaintenanceMarginRatio),"0"!==e.defaultFundingInterval&&t.uint32(72).int64(e.defaultFundingInterval),"0"!==e.fundingMultiple&&t.uint32(80).int64(e.fundingMultiple),""!==e.relayerFeeShareRate&&t.uint32(90).string(e.relayerFeeShareRate),""!==e.defaultHourlyFundingRateCap&&t.uint32(98).string(e.defaultHourlyFundingRateCap),""!==e.defaultHourlyInterestRate&&t.uint32(106).string(e.defaultHourlyInterestRate),0!==e.maxDerivativeOrderSideCount&&t.uint32(112).uint32(e.maxDerivativeOrderSideCount),""!==e.injRewardStakedRequirementThreshold&&t.uint32(122).string(e.injRewardStakedRequirementThreshold),"0"!==e.tradingRewardsVestingDuration&&t.uint32(128).int64(e.tradingRewardsVestingDuration),""!==e.liquidatorRewardShareRate&&t.uint32(138).string(e.liquidatorRewardShareRate),void 0!==e.binaryOptionsMarketInstantListingFee&&VC.encode(e.binaryOptionsMarketInstantListingFee,t.uint32(146).fork()).ldelim(),0!==e.atomicMarketOrderAccessLevel&&t.uint32(152).int32(e.atomicMarketOrderAccessLevel),""!==e.spotAtomicMarketOrderFeeMultiplier&&t.uint32(162).string(e.spotAtomicMarketOrderFeeMultiplier),""!==e.derivativeAtomicMarketOrderFeeMultiplier&&t.uint32(170).string(e.derivativeAtomicMarketOrderFeeMultiplier),""!==e.binaryOptionsAtomicMarketOrderFeeMultiplier&&t.uint32(178).string(e.binaryOptionsAtomicMarketOrderFeeMultiplier),""!==e.minimalProtocolFeeRate&&t.uint32(186).string(e.minimalProtocolFeeRate),!0===e.isInstantDerivativeMarketLaunchEnabled&&t.uint32(192).bool(e.isInstantDerivativeMarketLaunchEnabled),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={spotMarketInstantListingFee:void 0,derivativeMarketInstantListingFee:void 0,defaultSpotMakerFeeRate:"",defaultSpotTakerFeeRate:"",defaultDerivativeMakerFeeRate:"",defaultDerivativeTakerFeeRate:"",defaultInitialMarginRatio:"",defaultMaintenanceMarginRatio:"",defaultFundingInterval:"0",fundingMultiple:"0",relayerFeeShareRate:"",defaultHourlyFundingRateCap:"",defaultHourlyInterestRate:"",maxDerivativeOrderSideCount:0,injRewardStakedRequirementThreshold:"",tradingRewardsVestingDuration:"0",liquidatorRewardShareRate:"",binaryOptionsMarketInstantListingFee:void 0,atomicMarketOrderAccessLevel:0,spotAtomicMarketOrderFeeMultiplier:"",derivativeAtomicMarketOrderFeeMultiplier:"",binaryOptionsAtomicMarketOrderFeeMultiplier:"",minimalProtocolFeeRate:"",isInstantDerivativeMarketLaunchEnabled:!1};n.pos>>3){case 1:o.spotMarketInstantListingFee=VC.decode(n,n.uint32());break;case 2:o.derivativeMarketInstantListingFee=VC.decode(n,n.uint32());break;case 3:o.defaultSpotMakerFeeRate=n.string();break;case 4:o.defaultSpotTakerFeeRate=n.string();break;case 5:o.defaultDerivativeMakerFeeRate=n.string();break;case 6:o.defaultDerivativeTakerFeeRate=n.string();break;case 7:o.defaultInitialMarginRatio=n.string();break;case 8:o.defaultMaintenanceMarginRatio=n.string();break;case 9:o.defaultFundingInterval=qR(n.int64());break;case 10:o.fundingMultiple=qR(n.int64());break;case 11:o.relayerFeeShareRate=n.string();break;case 12:o.defaultHourlyFundingRateCap=n.string();break;case 13:o.defaultHourlyInterestRate=n.string();break;case 14:o.maxDerivativeOrderSideCount=n.uint32();break;case 15:o.injRewardStakedRequirementThreshold=n.string();break;case 16:o.tradingRewardsVestingDuration=qR(n.int64());break;case 17:o.liquidatorRewardShareRate=n.string();break;case 18:o.binaryOptionsMarketInstantListingFee=VC.decode(n,n.uint32());break;case 19:o.atomicMarketOrderAccessLevel=n.int32();break;case 20:o.spotAtomicMarketOrderFeeMultiplier=n.string();break;case 21:o.derivativeAtomicMarketOrderFeeMultiplier=n.string();break;case 22:o.binaryOptionsAtomicMarketOrderFeeMultiplier=n.string();break;case 23:o.minimalProtocolFeeRate=n.string();break;case 24:o.isInstantDerivativeMarketLaunchEnabled=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{spotMarketInstantListingFee:QR(e.spotMarketInstantListingFee)?VC.fromJSON(e.spotMarketInstantListingFee):void 0,derivativeMarketInstantListingFee:QR(e.derivativeMarketInstantListingFee)?VC.fromJSON(e.derivativeMarketInstantListingFee):void 0,defaultSpotMakerFeeRate:QR(e.defaultSpotMakerFeeRate)?String(e.defaultSpotMakerFeeRate):"",defaultSpotTakerFeeRate:QR(e.defaultSpotTakerFeeRate)?String(e.defaultSpotTakerFeeRate):"",defaultDerivativeMakerFeeRate:QR(e.defaultDerivativeMakerFeeRate)?String(e.defaultDerivativeMakerFeeRate):"",defaultDerivativeTakerFeeRate:QR(e.defaultDerivativeTakerFeeRate)?String(e.defaultDerivativeTakerFeeRate):"",defaultInitialMarginRatio:QR(e.defaultInitialMarginRatio)?String(e.defaultInitialMarginRatio):"",defaultMaintenanceMarginRatio:QR(e.defaultMaintenanceMarginRatio)?String(e.defaultMaintenanceMarginRatio):"",defaultFundingInterval:QR(e.defaultFundingInterval)?String(e.defaultFundingInterval):"0",fundingMultiple:QR(e.fundingMultiple)?String(e.fundingMultiple):"0",relayerFeeShareRate:QR(e.relayerFeeShareRate)?String(e.relayerFeeShareRate):"",defaultHourlyFundingRateCap:QR(e.defaultHourlyFundingRateCap)?String(e.defaultHourlyFundingRateCap):"",defaultHourlyInterestRate:QR(e.defaultHourlyInterestRate)?String(e.defaultHourlyInterestRate):"",maxDerivativeOrderSideCount:QR(e.maxDerivativeOrderSideCount)?Number(e.maxDerivativeOrderSideCount):0,injRewardStakedRequirementThreshold:QR(e.injRewardStakedRequirementThreshold)?String(e.injRewardStakedRequirementThreshold):"",tradingRewardsVestingDuration:QR(e.tradingRewardsVestingDuration)?String(e.tradingRewardsVestingDuration):"0",liquidatorRewardShareRate:QR(e.liquidatorRewardShareRate)?String(e.liquidatorRewardShareRate):"",binaryOptionsMarketInstantListingFee:QR(e.binaryOptionsMarketInstantListingFee)?VC.fromJSON(e.binaryOptionsMarketInstantListingFee):void 0,atomicMarketOrderAccessLevel:QR(e.atomicMarketOrderAccessLevel)?nR(e.atomicMarketOrderAccessLevel):0,spotAtomicMarketOrderFeeMultiplier:QR(e.spotAtomicMarketOrderFeeMultiplier)?String(e.spotAtomicMarketOrderFeeMultiplier):"",derivativeAtomicMarketOrderFeeMultiplier:QR(e.derivativeAtomicMarketOrderFeeMultiplier)?String(e.derivativeAtomicMarketOrderFeeMultiplier):"",binaryOptionsAtomicMarketOrderFeeMultiplier:QR(e.binaryOptionsAtomicMarketOrderFeeMultiplier)?String(e.binaryOptionsAtomicMarketOrderFeeMultiplier):"",minimalProtocolFeeRate:QR(e.minimalProtocolFeeRate)?String(e.minimalProtocolFeeRate):"",isInstantDerivativeMarketLaunchEnabled:!!QR(e.isInstantDerivativeMarketLaunchEnabled)&&Boolean(e.isInstantDerivativeMarketLaunchEnabled)}},toJSON:function(e){var t={};return void 0!==e.spotMarketInstantListingFee&&(t.spotMarketInstantListingFee=e.spotMarketInstantListingFee?VC.toJSON(e.spotMarketInstantListingFee):void 0),void 0!==e.derivativeMarketInstantListingFee&&(t.derivativeMarketInstantListingFee=e.derivativeMarketInstantListingFee?VC.toJSON(e.derivativeMarketInstantListingFee):void 0),void 0!==e.defaultSpotMakerFeeRate&&(t.defaultSpotMakerFeeRate=e.defaultSpotMakerFeeRate),void 0!==e.defaultSpotTakerFeeRate&&(t.defaultSpotTakerFeeRate=e.defaultSpotTakerFeeRate),void 0!==e.defaultDerivativeMakerFeeRate&&(t.defaultDerivativeMakerFeeRate=e.defaultDerivativeMakerFeeRate),void 0!==e.defaultDerivativeTakerFeeRate&&(t.defaultDerivativeTakerFeeRate=e.defaultDerivativeTakerFeeRate),void 0!==e.defaultInitialMarginRatio&&(t.defaultInitialMarginRatio=e.defaultInitialMarginRatio),void 0!==e.defaultMaintenanceMarginRatio&&(t.defaultMaintenanceMarginRatio=e.defaultMaintenanceMarginRatio),void 0!==e.defaultFundingInterval&&(t.defaultFundingInterval=e.defaultFundingInterval),void 0!==e.fundingMultiple&&(t.fundingMultiple=e.fundingMultiple),void 0!==e.relayerFeeShareRate&&(t.relayerFeeShareRate=e.relayerFeeShareRate),void 0!==e.defaultHourlyFundingRateCap&&(t.defaultHourlyFundingRateCap=e.defaultHourlyFundingRateCap),void 0!==e.defaultHourlyInterestRate&&(t.defaultHourlyInterestRate=e.defaultHourlyInterestRate),void 0!==e.maxDerivativeOrderSideCount&&(t.maxDerivativeOrderSideCount=Math.round(e.maxDerivativeOrderSideCount)),void 0!==e.injRewardStakedRequirementThreshold&&(t.injRewardStakedRequirementThreshold=e.injRewardStakedRequirementThreshold),void 0!==e.tradingRewardsVestingDuration&&(t.tradingRewardsVestingDuration=e.tradingRewardsVestingDuration),void 0!==e.liquidatorRewardShareRate&&(t.liquidatorRewardShareRate=e.liquidatorRewardShareRate),void 0!==e.binaryOptionsMarketInstantListingFee&&(t.binaryOptionsMarketInstantListingFee=e.binaryOptionsMarketInstantListingFee?VC.toJSON(e.binaryOptionsMarketInstantListingFee):void 0),void 0!==e.atomicMarketOrderAccessLevel&&(t.atomicMarketOrderAccessLevel=function(e){switch(e){case QE.Nobody:return"Nobody";case QE.BeginBlockerSmartContractsOnly:return"BeginBlockerSmartContractsOnly";case QE.SmartContractsOnly:return"SmartContractsOnly";case QE.Everyone:return"Everyone";case QE.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.atomicMarketOrderAccessLevel)),void 0!==e.spotAtomicMarketOrderFeeMultiplier&&(t.spotAtomicMarketOrderFeeMultiplier=e.spotAtomicMarketOrderFeeMultiplier),void 0!==e.derivativeAtomicMarketOrderFeeMultiplier&&(t.derivativeAtomicMarketOrderFeeMultiplier=e.derivativeAtomicMarketOrderFeeMultiplier),void 0!==e.binaryOptionsAtomicMarketOrderFeeMultiplier&&(t.binaryOptionsAtomicMarketOrderFeeMultiplier=e.binaryOptionsAtomicMarketOrderFeeMultiplier),void 0!==e.minimalProtocolFeeRate&&(t.minimalProtocolFeeRate=e.minimalProtocolFeeRate),void 0!==e.isInstantDerivativeMarketLaunchEnabled&&(t.isInstantDerivativeMarketLaunchEnabled=e.isInstantDerivativeMarketLaunchEnabled),t},create:function(e){return sR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i,s,c,u,d,l,f,p,b,m,h,g,y,v,w,k,A={spotMarketInstantListingFee:void 0,derivativeMarketInstantListingFee:void 0,defaultSpotMakerFeeRate:"",defaultSpotTakerFeeRate:"",defaultDerivativeMakerFeeRate:"",defaultDerivativeTakerFeeRate:"",defaultInitialMarginRatio:"",defaultMaintenanceMarginRatio:"",defaultFundingInterval:"0",fundingMultiple:"0",relayerFeeShareRate:"",defaultHourlyFundingRateCap:"",defaultHourlyInterestRate:"",maxDerivativeOrderSideCount:0,injRewardStakedRequirementThreshold:"",tradingRewardsVestingDuration:"0",liquidatorRewardShareRate:"",binaryOptionsMarketInstantListingFee:void 0,atomicMarketOrderAccessLevel:0,spotAtomicMarketOrderFeeMultiplier:"",derivativeAtomicMarketOrderFeeMultiplier:"",binaryOptionsAtomicMarketOrderFeeMultiplier:"",minimalProtocolFeeRate:"",isInstantDerivativeMarketLaunchEnabled:!1};return A.spotMarketInstantListingFee=void 0!==e.spotMarketInstantListingFee&&null!==e.spotMarketInstantListingFee?VC.fromPartial(e.spotMarketInstantListingFee):void 0,A.derivativeMarketInstantListingFee=void 0!==e.derivativeMarketInstantListingFee&&null!==e.derivativeMarketInstantListingFee?VC.fromPartial(e.derivativeMarketInstantListingFee):void 0,A.defaultSpotMakerFeeRate=null!==(t=e.defaultSpotMakerFeeRate)&&void 0!==t?t:"",A.defaultSpotTakerFeeRate=null!==(n=e.defaultSpotTakerFeeRate)&&void 0!==n?n:"",A.defaultDerivativeMakerFeeRate=null!==(a=e.defaultDerivativeMakerFeeRate)&&void 0!==a?a:"",A.defaultDerivativeTakerFeeRate=null!==(o=e.defaultDerivativeTakerFeeRate)&&void 0!==o?o:"",A.defaultInitialMarginRatio=null!==(r=e.defaultInitialMarginRatio)&&void 0!==r?r:"",A.defaultMaintenanceMarginRatio=null!==(i=e.defaultMaintenanceMarginRatio)&&void 0!==i?i:"",A.defaultFundingInterval=null!==(s=e.defaultFundingInterval)&&void 0!==s?s:"0",A.fundingMultiple=null!==(c=e.fundingMultiple)&&void 0!==c?c:"0",A.relayerFeeShareRate=null!==(u=e.relayerFeeShareRate)&&void 0!==u?u:"",A.defaultHourlyFundingRateCap=null!==(d=e.defaultHourlyFundingRateCap)&&void 0!==d?d:"",A.defaultHourlyInterestRate=null!==(l=e.defaultHourlyInterestRate)&&void 0!==l?l:"",A.maxDerivativeOrderSideCount=null!==(f=e.maxDerivativeOrderSideCount)&&void 0!==f?f:0,A.injRewardStakedRequirementThreshold=null!==(p=e.injRewardStakedRequirementThreshold)&&void 0!==p?p:"",A.tradingRewardsVestingDuration=null!==(b=e.tradingRewardsVestingDuration)&&void 0!==b?b:"0",A.liquidatorRewardShareRate=null!==(m=e.liquidatorRewardShareRate)&&void 0!==m?m:"",A.binaryOptionsMarketInstantListingFee=void 0!==e.binaryOptionsMarketInstantListingFee&&null!==e.binaryOptionsMarketInstantListingFee?VC.fromPartial(e.binaryOptionsMarketInstantListingFee):void 0,A.atomicMarketOrderAccessLevel=null!==(h=e.atomicMarketOrderAccessLevel)&&void 0!==h?h:0,A.spotAtomicMarketOrderFeeMultiplier=null!==(g=e.spotAtomicMarketOrderFeeMultiplier)&&void 0!==g?g:"",A.derivativeAtomicMarketOrderFeeMultiplier=null!==(y=e.derivativeAtomicMarketOrderFeeMultiplier)&&void 0!==y?y:"",A.binaryOptionsAtomicMarketOrderFeeMultiplier=null!==(v=e.binaryOptionsAtomicMarketOrderFeeMultiplier)&&void 0!==v?v:"",A.minimalProtocolFeeRate=null!==(w=e.minimalProtocolFeeRate)&&void 0!==w?w:"",A.isInstantDerivativeMarketLaunchEnabled=null!==(k=e.isInstantDerivativeMarketLaunchEnabled)&&void 0!==k&&k,A}};var cR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),""!==e.feeMultiplier&&t.uint32(18).string(e.feeMultiplier),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",feeMultiplier:""};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.feeMultiplier=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:QR(e.marketId)?String(e.marketId):"",feeMultiplier:QR(e.feeMultiplier)?String(e.feeMultiplier):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.feeMultiplier&&(t.feeMultiplier=e.feeMultiplier),t},create:function(e){return cR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={marketId:"",feeMultiplier:""};return a.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",a.feeMultiplier=null!==(n=e.feeMultiplier)&&void 0!==n?n:"",a}};var uR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.ticker&&t.uint32(10).string(e.ticker),""!==e.oracleBase&&t.uint32(18).string(e.oracleBase),""!==e.oracleQuote&&t.uint32(26).string(e.oracleQuote),0!==e.oracleType&&t.uint32(32).int32(e.oracleType),0!==e.oracleScaleFactor&&t.uint32(40).uint32(e.oracleScaleFactor),""!==e.quoteDenom&&t.uint32(50).string(e.quoteDenom),""!==e.marketId&&t.uint32(58).string(e.marketId),""!==e.initialMarginRatio&&t.uint32(66).string(e.initialMarginRatio),""!==e.maintenanceMarginRatio&&t.uint32(74).string(e.maintenanceMarginRatio),""!==e.makerFeeRate&&t.uint32(82).string(e.makerFeeRate),""!==e.takerFeeRate&&t.uint32(90).string(e.takerFeeRate),""!==e.relayerFeeShareRate&&t.uint32(98).string(e.relayerFeeShareRate),!0===e.isPerpetual&&t.uint32(104).bool(e.isPerpetual),0!==e.status&&t.uint32(112).int32(e.status),""!==e.minPriceTickSize&&t.uint32(122).string(e.minPriceTickSize),""!==e.minQuantityTickSize&&t.uint32(130).string(e.minQuantityTickSize),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={ticker:"",oracleBase:"",oracleQuote:"",oracleType:0,oracleScaleFactor:0,quoteDenom:"",marketId:"",initialMarginRatio:"",maintenanceMarginRatio:"",makerFeeRate:"",takerFeeRate:"",relayerFeeShareRate:"",isPerpetual:!1,status:0,minPriceTickSize:"",minQuantityTickSize:""};n.pos>>3){case 1:o.ticker=n.string();break;case 2:o.oracleBase=n.string();break;case 3:o.oracleQuote=n.string();break;case 4:o.oracleType=n.int32();break;case 5:o.oracleScaleFactor=n.uint32();break;case 6:o.quoteDenom=n.string();break;case 7:o.marketId=n.string();break;case 8:o.initialMarginRatio=n.string();break;case 9:o.maintenanceMarginRatio=n.string();break;case 10:o.makerFeeRate=n.string();break;case 11:o.takerFeeRate=n.string();break;case 12:o.relayerFeeShareRate=n.string();break;case 13:o.isPerpetual=n.bool();break;case 14:o.status=n.int32();break;case 15:o.minPriceTickSize=n.string();break;case 16:o.minQuantityTickSize=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{ticker:QR(e.ticker)?String(e.ticker):"",oracleBase:QR(e.oracleBase)?String(e.oracleBase):"",oracleQuote:QR(e.oracleQuote)?String(e.oracleQuote):"",oracleType:QR(e.oracleType)?ZE(e.oracleType):0,oracleScaleFactor:QR(e.oracleScaleFactor)?Number(e.oracleScaleFactor):0,quoteDenom:QR(e.quoteDenom)?String(e.quoteDenom):"",marketId:QR(e.marketId)?String(e.marketId):"",initialMarginRatio:QR(e.initialMarginRatio)?String(e.initialMarginRatio):"",maintenanceMarginRatio:QR(e.maintenanceMarginRatio)?String(e.maintenanceMarginRatio):"",makerFeeRate:QR(e.makerFeeRate)?String(e.makerFeeRate):"",takerFeeRate:QR(e.takerFeeRate)?String(e.takerFeeRate):"",relayerFeeShareRate:QR(e.relayerFeeShareRate)?String(e.relayerFeeShareRate):"",isPerpetual:!!QR(e.isPerpetual)&&Boolean(e.isPerpetual),status:QR(e.status)?aR(e.status):0,minPriceTickSize:QR(e.minPriceTickSize)?String(e.minPriceTickSize):"",minQuantityTickSize:QR(e.minQuantityTickSize)?String(e.minQuantityTickSize):""}},toJSON:function(e){var t={};return void 0!==e.ticker&&(t.ticker=e.ticker),void 0!==e.oracleBase&&(t.oracleBase=e.oracleBase),void 0!==e.oracleQuote&&(t.oracleQuote=e.oracleQuote),void 0!==e.oracleType&&(t.oracleType=VE(e.oracleType)),void 0!==e.oracleScaleFactor&&(t.oracleScaleFactor=Math.round(e.oracleScaleFactor)),void 0!==e.quoteDenom&&(t.quoteDenom=e.quoteDenom),void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.initialMarginRatio&&(t.initialMarginRatio=e.initialMarginRatio),void 0!==e.maintenanceMarginRatio&&(t.maintenanceMarginRatio=e.maintenanceMarginRatio),void 0!==e.makerFeeRate&&(t.makerFeeRate=e.makerFeeRate),void 0!==e.takerFeeRate&&(t.takerFeeRate=e.takerFeeRate),void 0!==e.relayerFeeShareRate&&(t.relayerFeeShareRate=e.relayerFeeShareRate),void 0!==e.isPerpetual&&(t.isPerpetual=e.isPerpetual),void 0!==e.status&&(t.status=oR(e.status)),void 0!==e.minPriceTickSize&&(t.minPriceTickSize=e.minPriceTickSize),void 0!==e.minQuantityTickSize&&(t.minQuantityTickSize=e.minQuantityTickSize),t},create:function(e){return uR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i,s,c,u,d,l,f,p,b,m,h,g={ticker:"",oracleBase:"",oracleQuote:"",oracleType:0,oracleScaleFactor:0,quoteDenom:"",marketId:"",initialMarginRatio:"",maintenanceMarginRatio:"",makerFeeRate:"",takerFeeRate:"",relayerFeeShareRate:"",isPerpetual:!1,status:0,minPriceTickSize:"",minQuantityTickSize:""};return g.ticker=null!==(t=e.ticker)&&void 0!==t?t:"",g.oracleBase=null!==(n=e.oracleBase)&&void 0!==n?n:"",g.oracleQuote=null!==(a=e.oracleQuote)&&void 0!==a?a:"",g.oracleType=null!==(o=e.oracleType)&&void 0!==o?o:0,g.oracleScaleFactor=null!==(r=e.oracleScaleFactor)&&void 0!==r?r:0,g.quoteDenom=null!==(i=e.quoteDenom)&&void 0!==i?i:"",g.marketId=null!==(s=e.marketId)&&void 0!==s?s:"",g.initialMarginRatio=null!==(c=e.initialMarginRatio)&&void 0!==c?c:"",g.maintenanceMarginRatio=null!==(u=e.maintenanceMarginRatio)&&void 0!==u?u:"",g.makerFeeRate=null!==(d=e.makerFeeRate)&&void 0!==d?d:"",g.takerFeeRate=null!==(l=e.takerFeeRate)&&void 0!==l?l:"",g.relayerFeeShareRate=null!==(f=e.relayerFeeShareRate)&&void 0!==f?f:"",g.isPerpetual=null!==(p=e.isPerpetual)&&void 0!==p&&p,g.status=null!==(b=e.status)&&void 0!==b?b:0,g.minPriceTickSize=null!==(m=e.minPriceTickSize)&&void 0!==m?m:"",g.minQuantityTickSize=null!==(h=e.minQuantityTickSize)&&void 0!==h?h:"",g}};var dR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.ticker&&t.uint32(10).string(e.ticker),""!==e.oracleSymbol&&t.uint32(18).string(e.oracleSymbol),""!==e.oracleProvider&&t.uint32(26).string(e.oracleProvider),0!==e.oracleType&&t.uint32(32).int32(e.oracleType),0!==e.oracleScaleFactor&&t.uint32(40).uint32(e.oracleScaleFactor),"0"!==e.expirationTimestamp&&t.uint32(48).int64(e.expirationTimestamp),"0"!==e.settlementTimestamp&&t.uint32(56).int64(e.settlementTimestamp),""!==e.admin&&t.uint32(66).string(e.admin),""!==e.quoteDenom&&t.uint32(74).string(e.quoteDenom),""!==e.marketId&&t.uint32(82).string(e.marketId),""!==e.makerFeeRate&&t.uint32(90).string(e.makerFeeRate),""!==e.takerFeeRate&&t.uint32(98).string(e.takerFeeRate),""!==e.relayerFeeShareRate&&t.uint32(106).string(e.relayerFeeShareRate),0!==e.status&&t.uint32(112).int32(e.status),""!==e.minPriceTickSize&&t.uint32(122).string(e.minPriceTickSize),""!==e.minQuantityTickSize&&t.uint32(130).string(e.minQuantityTickSize),""!==e.settlementPrice&&t.uint32(138).string(e.settlementPrice),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={ticker:"",oracleSymbol:"",oracleProvider:"",oracleType:0,oracleScaleFactor:0,expirationTimestamp:"0",settlementTimestamp:"0",admin:"",quoteDenom:"",marketId:"",makerFeeRate:"",takerFeeRate:"",relayerFeeShareRate:"",status:0,minPriceTickSize:"",minQuantityTickSize:"",settlementPrice:""};n.pos>>3){case 1:o.ticker=n.string();break;case 2:o.oracleSymbol=n.string();break;case 3:o.oracleProvider=n.string();break;case 4:o.oracleType=n.int32();break;case 5:o.oracleScaleFactor=n.uint32();break;case 6:o.expirationTimestamp=qR(n.int64());break;case 7:o.settlementTimestamp=qR(n.int64());break;case 8:o.admin=n.string();break;case 9:o.quoteDenom=n.string();break;case 10:o.marketId=n.string();break;case 11:o.makerFeeRate=n.string();break;case 12:o.takerFeeRate=n.string();break;case 13:o.relayerFeeShareRate=n.string();break;case 14:o.status=n.int32();break;case 15:o.minPriceTickSize=n.string();break;case 16:o.minQuantityTickSize=n.string();break;case 17:o.settlementPrice=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{ticker:QR(e.ticker)?String(e.ticker):"",oracleSymbol:QR(e.oracleSymbol)?String(e.oracleSymbol):"",oracleProvider:QR(e.oracleProvider)?String(e.oracleProvider):"",oracleType:QR(e.oracleType)?ZE(e.oracleType):0,oracleScaleFactor:QR(e.oracleScaleFactor)?Number(e.oracleScaleFactor):0,expirationTimestamp:QR(e.expirationTimestamp)?String(e.expirationTimestamp):"0",settlementTimestamp:QR(e.settlementTimestamp)?String(e.settlementTimestamp):"0",admin:QR(e.admin)?String(e.admin):"",quoteDenom:QR(e.quoteDenom)?String(e.quoteDenom):"",marketId:QR(e.marketId)?String(e.marketId):"",makerFeeRate:QR(e.makerFeeRate)?String(e.makerFeeRate):"",takerFeeRate:QR(e.takerFeeRate)?String(e.takerFeeRate):"",relayerFeeShareRate:QR(e.relayerFeeShareRate)?String(e.relayerFeeShareRate):"",status:QR(e.status)?aR(e.status):0,minPriceTickSize:QR(e.minPriceTickSize)?String(e.minPriceTickSize):"",minQuantityTickSize:QR(e.minQuantityTickSize)?String(e.minQuantityTickSize):"",settlementPrice:QR(e.settlementPrice)?String(e.settlementPrice):""}},toJSON:function(e){var t={};return void 0!==e.ticker&&(t.ticker=e.ticker),void 0!==e.oracleSymbol&&(t.oracleSymbol=e.oracleSymbol),void 0!==e.oracleProvider&&(t.oracleProvider=e.oracleProvider),void 0!==e.oracleType&&(t.oracleType=VE(e.oracleType)),void 0!==e.oracleScaleFactor&&(t.oracleScaleFactor=Math.round(e.oracleScaleFactor)),void 0!==e.expirationTimestamp&&(t.expirationTimestamp=e.expirationTimestamp),void 0!==e.settlementTimestamp&&(t.settlementTimestamp=e.settlementTimestamp),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.quoteDenom&&(t.quoteDenom=e.quoteDenom),void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.makerFeeRate&&(t.makerFeeRate=e.makerFeeRate),void 0!==e.takerFeeRate&&(t.takerFeeRate=e.takerFeeRate),void 0!==e.relayerFeeShareRate&&(t.relayerFeeShareRate=e.relayerFeeShareRate),void 0!==e.status&&(t.status=oR(e.status)),void 0!==e.minPriceTickSize&&(t.minPriceTickSize=e.minPriceTickSize),void 0!==e.minQuantityTickSize&&(t.minQuantityTickSize=e.minQuantityTickSize),void 0!==e.settlementPrice&&(t.settlementPrice=e.settlementPrice),t},create:function(e){return dR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i,s,c,u,d,l,f,p,b,m,h,g,y={ticker:"",oracleSymbol:"",oracleProvider:"",oracleType:0,oracleScaleFactor:0,expirationTimestamp:"0",settlementTimestamp:"0",admin:"",quoteDenom:"",marketId:"",makerFeeRate:"",takerFeeRate:"",relayerFeeShareRate:"",status:0,minPriceTickSize:"",minQuantityTickSize:"",settlementPrice:""};return y.ticker=null!==(t=e.ticker)&&void 0!==t?t:"",y.oracleSymbol=null!==(n=e.oracleSymbol)&&void 0!==n?n:"",y.oracleProvider=null!==(a=e.oracleProvider)&&void 0!==a?a:"",y.oracleType=null!==(o=e.oracleType)&&void 0!==o?o:0,y.oracleScaleFactor=null!==(r=e.oracleScaleFactor)&&void 0!==r?r:0,y.expirationTimestamp=null!==(i=e.expirationTimestamp)&&void 0!==i?i:"0",y.settlementTimestamp=null!==(s=e.settlementTimestamp)&&void 0!==s?s:"0",y.admin=null!==(c=e.admin)&&void 0!==c?c:"",y.quoteDenom=null!==(u=e.quoteDenom)&&void 0!==u?u:"",y.marketId=null!==(d=e.marketId)&&void 0!==d?d:"",y.makerFeeRate=null!==(l=e.makerFeeRate)&&void 0!==l?l:"",y.takerFeeRate=null!==(f=e.takerFeeRate)&&void 0!==f?f:"",y.relayerFeeShareRate=null!==(p=e.relayerFeeShareRate)&&void 0!==p?p:"",y.status=null!==(b=e.status)&&void 0!==b?b:0,y.minPriceTickSize=null!==(m=e.minPriceTickSize)&&void 0!==m?m:"",y.minQuantityTickSize=null!==(h=e.minQuantityTickSize)&&void 0!==h?h:"",y.settlementPrice=null!==(g=e.settlementPrice)&&void 0!==g?g:"",y}};var lR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),"0"!==e.expirationTimestamp&&t.uint32(16).int64(e.expirationTimestamp),"0"!==e.twapStartTimestamp&&t.uint32(24).int64(e.twapStartTimestamp),""!==e.expirationTwapStartPriceCumulative&&t.uint32(34).string(e.expirationTwapStartPriceCumulative),""!==e.settlementPrice&&t.uint32(42).string(e.settlementPrice),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",expirationTimestamp:"0",twapStartTimestamp:"0",expirationTwapStartPriceCumulative:"",settlementPrice:""};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.expirationTimestamp=qR(n.int64());break;case 3:o.twapStartTimestamp=qR(n.int64());break;case 4:o.expirationTwapStartPriceCumulative=n.string();break;case 5:o.settlementPrice=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:QR(e.marketId)?String(e.marketId):"",expirationTimestamp:QR(e.expirationTimestamp)?String(e.expirationTimestamp):"0",twapStartTimestamp:QR(e.twapStartTimestamp)?String(e.twapStartTimestamp):"0",expirationTwapStartPriceCumulative:QR(e.expirationTwapStartPriceCumulative)?String(e.expirationTwapStartPriceCumulative):"",settlementPrice:QR(e.settlementPrice)?String(e.settlementPrice):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.expirationTimestamp&&(t.expirationTimestamp=e.expirationTimestamp),void 0!==e.twapStartTimestamp&&(t.twapStartTimestamp=e.twapStartTimestamp),void 0!==e.expirationTwapStartPriceCumulative&&(t.expirationTwapStartPriceCumulative=e.expirationTwapStartPriceCumulative),void 0!==e.settlementPrice&&(t.settlementPrice=e.settlementPrice),t},create:function(e){return lR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i={marketId:"",expirationTimestamp:"0",twapStartTimestamp:"0",expirationTwapStartPriceCumulative:"",settlementPrice:""};return i.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",i.expirationTimestamp=null!==(n=e.expirationTimestamp)&&void 0!==n?n:"0",i.twapStartTimestamp=null!==(a=e.twapStartTimestamp)&&void 0!==a?a:"0",i.expirationTwapStartPriceCumulative=null!==(o=e.expirationTwapStartPriceCumulative)&&void 0!==o?o:"",i.settlementPrice=null!==(r=e.settlementPrice)&&void 0!==r?r:"",i}};var fR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),""!==e.hourlyFundingRateCap&&t.uint32(18).string(e.hourlyFundingRateCap),""!==e.hourlyInterestRate&&t.uint32(26).string(e.hourlyInterestRate),"0"!==e.nextFundingTimestamp&&t.uint32(32).int64(e.nextFundingTimestamp),"0"!==e.fundingInterval&&t.uint32(40).int64(e.fundingInterval),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",hourlyFundingRateCap:"",hourlyInterestRate:"",nextFundingTimestamp:"0",fundingInterval:"0"};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.hourlyFundingRateCap=n.string();break;case 3:o.hourlyInterestRate=n.string();break;case 4:o.nextFundingTimestamp=qR(n.int64());break;case 5:o.fundingInterval=qR(n.int64());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:QR(e.marketId)?String(e.marketId):"",hourlyFundingRateCap:QR(e.hourlyFundingRateCap)?String(e.hourlyFundingRateCap):"",hourlyInterestRate:QR(e.hourlyInterestRate)?String(e.hourlyInterestRate):"",nextFundingTimestamp:QR(e.nextFundingTimestamp)?String(e.nextFundingTimestamp):"0",fundingInterval:QR(e.fundingInterval)?String(e.fundingInterval):"0"}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.hourlyFundingRateCap&&(t.hourlyFundingRateCap=e.hourlyFundingRateCap),void 0!==e.hourlyInterestRate&&(t.hourlyInterestRate=e.hourlyInterestRate),void 0!==e.nextFundingTimestamp&&(t.nextFundingTimestamp=e.nextFundingTimestamp),void 0!==e.fundingInterval&&(t.fundingInterval=e.fundingInterval),t},create:function(e){return fR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i={marketId:"",hourlyFundingRateCap:"",hourlyInterestRate:"",nextFundingTimestamp:"0",fundingInterval:"0"};return i.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",i.hourlyFundingRateCap=null!==(n=e.hourlyFundingRateCap)&&void 0!==n?n:"",i.hourlyInterestRate=null!==(a=e.hourlyInterestRate)&&void 0!==a?a:"",i.nextFundingTimestamp=null!==(o=e.nextFundingTimestamp)&&void 0!==o?o:"0",i.fundingInterval=null!==(r=e.fundingInterval)&&void 0!==r?r:"0",i}};var pR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.cumulativeFunding&&t.uint32(10).string(e.cumulativeFunding),""!==e.cumulativePrice&&t.uint32(18).string(e.cumulativePrice),"0"!==e.lastTimestamp&&t.uint32(24).int64(e.lastTimestamp),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={cumulativeFunding:"",cumulativePrice:"",lastTimestamp:"0"};n.pos>>3){case 1:o.cumulativeFunding=n.string();break;case 2:o.cumulativePrice=n.string();break;case 3:o.lastTimestamp=qR(n.int64());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{cumulativeFunding:QR(e.cumulativeFunding)?String(e.cumulativeFunding):"",cumulativePrice:QR(e.cumulativePrice)?String(e.cumulativePrice):"",lastTimestamp:QR(e.lastTimestamp)?String(e.lastTimestamp):"0"}},toJSON:function(e){var t={};return void 0!==e.cumulativeFunding&&(t.cumulativeFunding=e.cumulativeFunding),void 0!==e.cumulativePrice&&(t.cumulativePrice=e.cumulativePrice),void 0!==e.lastTimestamp&&(t.lastTimestamp=e.lastTimestamp),t},create:function(e){return pR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o={cumulativeFunding:"",cumulativePrice:"",lastTimestamp:"0"};return o.cumulativeFunding=null!==(t=e.cumulativeFunding)&&void 0!==t?t:"",o.cumulativePrice=null!==(n=e.cumulativePrice)&&void 0!==n?n:"",o.lastTimestamp=null!==(a=e.lastTimestamp)&&void 0!==a?a:"0",o}};var bR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),""!==e.settlementPrice&&t.uint32(18).string(e.settlementPrice),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",settlementPrice:""};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.settlementPrice=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:QR(e.marketId)?String(e.marketId):"",settlementPrice:QR(e.settlementPrice)?String(e.settlementPrice):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.settlementPrice&&(t.settlementPrice=e.settlementPrice),t},create:function(e){return bR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={marketId:"",settlementPrice:""};return a.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",a.settlementPrice=null!==(n=e.settlementPrice)&&void 0!==n?n:"",a}};var mR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.ticker&&t.uint32(10).string(e.ticker),""!==e.baseDenom&&t.uint32(18).string(e.baseDenom),""!==e.quoteDenom&&t.uint32(26).string(e.quoteDenom),""!==e.makerFeeRate&&t.uint32(34).string(e.makerFeeRate),""!==e.takerFeeRate&&t.uint32(42).string(e.takerFeeRate),""!==e.relayerFeeShareRate&&t.uint32(50).string(e.relayerFeeShareRate),""!==e.marketId&&t.uint32(58).string(e.marketId),0!==e.status&&t.uint32(64).int32(e.status),""!==e.minPriceTickSize&&t.uint32(74).string(e.minPriceTickSize),""!==e.minQuantityTickSize&&t.uint32(82).string(e.minQuantityTickSize),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={ticker:"",baseDenom:"",quoteDenom:"",makerFeeRate:"",takerFeeRate:"",relayerFeeShareRate:"",marketId:"",status:0,minPriceTickSize:"",minQuantityTickSize:""};n.pos>>3){case 1:o.ticker=n.string();break;case 2:o.baseDenom=n.string();break;case 3:o.quoteDenom=n.string();break;case 4:o.makerFeeRate=n.string();break;case 5:o.takerFeeRate=n.string();break;case 6:o.relayerFeeShareRate=n.string();break;case 7:o.marketId=n.string();break;case 8:o.status=n.int32();break;case 9:o.minPriceTickSize=n.string();break;case 10:o.minQuantityTickSize=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{ticker:QR(e.ticker)?String(e.ticker):"",baseDenom:QR(e.baseDenom)?String(e.baseDenom):"",quoteDenom:QR(e.quoteDenom)?String(e.quoteDenom):"",makerFeeRate:QR(e.makerFeeRate)?String(e.makerFeeRate):"",takerFeeRate:QR(e.takerFeeRate)?String(e.takerFeeRate):"",relayerFeeShareRate:QR(e.relayerFeeShareRate)?String(e.relayerFeeShareRate):"",marketId:QR(e.marketId)?String(e.marketId):"",status:QR(e.status)?aR(e.status):0,minPriceTickSize:QR(e.minPriceTickSize)?String(e.minPriceTickSize):"",minQuantityTickSize:QR(e.minQuantityTickSize)?String(e.minQuantityTickSize):""}},toJSON:function(e){var t={};return void 0!==e.ticker&&(t.ticker=e.ticker),void 0!==e.baseDenom&&(t.baseDenom=e.baseDenom),void 0!==e.quoteDenom&&(t.quoteDenom=e.quoteDenom),void 0!==e.makerFeeRate&&(t.makerFeeRate=e.makerFeeRate),void 0!==e.takerFeeRate&&(t.takerFeeRate=e.takerFeeRate),void 0!==e.relayerFeeShareRate&&(t.relayerFeeShareRate=e.relayerFeeShareRate),void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.status&&(t.status=oR(e.status)),void 0!==e.minPriceTickSize&&(t.minPriceTickSize=e.minPriceTickSize),void 0!==e.minQuantityTickSize&&(t.minQuantityTickSize=e.minQuantityTickSize),t},create:function(e){return mR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i,s,c,u,d,l={ticker:"",baseDenom:"",quoteDenom:"",makerFeeRate:"",takerFeeRate:"",relayerFeeShareRate:"",marketId:"",status:0,minPriceTickSize:"",minQuantityTickSize:""};return l.ticker=null!==(t=e.ticker)&&void 0!==t?t:"",l.baseDenom=null!==(n=e.baseDenom)&&void 0!==n?n:"",l.quoteDenom=null!==(a=e.quoteDenom)&&void 0!==a?a:"",l.makerFeeRate=null!==(o=e.makerFeeRate)&&void 0!==o?o:"",l.takerFeeRate=null!==(r=e.takerFeeRate)&&void 0!==r?r:"",l.relayerFeeShareRate=null!==(i=e.relayerFeeShareRate)&&void 0!==i?i:"",l.marketId=null!==(s=e.marketId)&&void 0!==s?s:"",l.status=null!==(c=e.status)&&void 0!==c?c:0,l.minPriceTickSize=null!==(u=e.minPriceTickSize)&&void 0!==u?u:"",l.minQuantityTickSize=null!==(d=e.minQuantityTickSize)&&void 0!==d?d:"",l}};var hR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.availableBalance&&t.uint32(10).string(e.availableBalance),""!==e.totalBalance&&t.uint32(18).string(e.totalBalance),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={availableBalance:"",totalBalance:""};n.pos>>3){case 1:o.availableBalance=n.string();break;case 2:o.totalBalance=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{availableBalance:QR(e.availableBalance)?String(e.availableBalance):"",totalBalance:QR(e.totalBalance)?String(e.totalBalance):""}},toJSON:function(e){var t={};return void 0!==e.availableBalance&&(t.availableBalance=e.availableBalance),void 0!==e.totalBalance&&(t.totalBalance=e.totalBalance),t},create:function(e){return hR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={availableBalance:"",totalBalance:""};return a.availableBalance=null!==(t=e.availableBalance)&&void 0!==t?t:"",a.totalBalance=null!==(n=e.totalBalance)&&void 0!==n?n:"",a}};var gR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return 0!==e.nonce&&t.uint32(8).uint32(e.nonce),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={nonce:0};n.pos>>3===1)o.nonce=n.uint32();else n.skipType(7&r)}return o},fromJSON:function(e){return{nonce:QR(e.nonce)?Number(e.nonce):0}},toJSON:function(e){var t={};return void 0!==e.nonce&&(t.nonce=Math.round(e.nonce)),t},create:function(e){return gR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={nonce:0};return n.nonce=null!==(t=e.nonce)&&void 0!==t?t:0,n}};var yR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),""!==e.feeRecipient&&t.uint32(18).string(e.feeRecipient),""!==e.price&&t.uint32(26).string(e.price),""!==e.quantity&&t.uint32(34).string(e.quantity),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",feeRecipient:"",price:"",quantity:""};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.feeRecipient=n.string();break;case 3:o.price=n.string();break;case 4:o.quantity=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:QR(e.subaccountId)?String(e.subaccountId):"",feeRecipient:QR(e.feeRecipient)?String(e.feeRecipient):"",price:QR(e.price)?String(e.price):"",quantity:QR(e.quantity)?String(e.quantity):""}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.feeRecipient&&(t.feeRecipient=e.feeRecipient),void 0!==e.price&&(t.price=e.price),void 0!==e.quantity&&(t.quantity=e.quantity),t},create:function(e){return yR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r={subaccountId:"",feeRecipient:"",price:"",quantity:""};return r.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",r.feeRecipient=null!==(n=e.feeRecipient)&&void 0!==n?n:"",r.price=null!==(a=e.price)&&void 0!==a?a:"",r.quantity=null!==(o=e.quantity)&&void 0!==o?o:"",r}};function vR(){return{orderInfo:void 0,orderType:0,fillable:"",triggerPrice:"",orderHash:new Uint8Array}}var wR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.orderInfo&&yR.encode(e.orderInfo,t.uint32(10).fork()).ldelim(),0!==e.orderType&&t.uint32(16).int32(e.orderType),""!==e.fillable&&t.uint32(26).string(e.fillable),""!==e.triggerPrice&&t.uint32(34).string(e.triggerPrice),0!==e.orderHash.length&&t.uint32(42).bytes(e.orderHash),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o=vR();n.pos>>3){case 1:o.orderInfo=yR.decode(n,n.uint32());break;case 2:o.orderType=n.int32();break;case 3:o.fillable=n.string();break;case 4:o.triggerPrice=n.string();break;case 5:o.orderHash=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{orderInfo:QR(e.orderInfo)?yR.fromJSON(e.orderInfo):void 0,orderType:QR(e.orderType)?rR(e.orderType):0,fillable:QR(e.fillable)?String(e.fillable):"",triggerPrice:QR(e.triggerPrice)?String(e.triggerPrice):"",orderHash:QR(e.orderHash)?ZR(e.orderHash):new Uint8Array}},toJSON:function(e){var t={};return void 0!==e.orderInfo&&(t.orderInfo=e.orderInfo?yR.toJSON(e.orderInfo):void 0),void 0!==e.orderType&&(t.orderType=iR(e.orderType)),void 0!==e.fillable&&(t.fillable=e.fillable),void 0!==e.triggerPrice&&(t.triggerPrice=e.triggerPrice),void 0!==e.orderHash&&(t.orderHash=VR(void 0!==e.orderHash?e.orderHash:new Uint8Array)),t},create:function(e){return wR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r=vR();return r.orderInfo=void 0!==e.orderInfo&&null!==e.orderInfo?yR.fromPartial(e.orderInfo):void 0,r.orderType=null!==(t=e.orderType)&&void 0!==t?t:0,r.fillable=null!==(n=e.fillable)&&void 0!==n?n:"",r.triggerPrice=null!==(a=e.triggerPrice)&&void 0!==a?a:"",r.orderHash=null!==(o=e.orderHash)&&void 0!==o?o:new Uint8Array,r}};var kR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return 0!==e.vanillaLimitOrderCount&&t.uint32(8).uint32(e.vanillaLimitOrderCount),0!==e.reduceOnlyLimitOrderCount&&t.uint32(16).uint32(e.reduceOnlyLimitOrderCount),""!==e.aggregateReduceOnlyQuantity&&t.uint32(26).string(e.aggregateReduceOnlyQuantity),""!==e.aggregateVanillaQuantity&&t.uint32(34).string(e.aggregateVanillaQuantity),0!==e.vanillaConditionalOrderCount&&t.uint32(40).uint32(e.vanillaConditionalOrderCount),0!==e.reduceOnlyConditionalOrderCount&&t.uint32(48).uint32(e.reduceOnlyConditionalOrderCount),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={vanillaLimitOrderCount:0,reduceOnlyLimitOrderCount:0,aggregateReduceOnlyQuantity:"",aggregateVanillaQuantity:"",vanillaConditionalOrderCount:0,reduceOnlyConditionalOrderCount:0};n.pos>>3){case 1:o.vanillaLimitOrderCount=n.uint32();break;case 2:o.reduceOnlyLimitOrderCount=n.uint32();break;case 3:o.aggregateReduceOnlyQuantity=n.string();break;case 4:o.aggregateVanillaQuantity=n.string();break;case 5:o.vanillaConditionalOrderCount=n.uint32();break;case 6:o.reduceOnlyConditionalOrderCount=n.uint32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{vanillaLimitOrderCount:QR(e.vanillaLimitOrderCount)?Number(e.vanillaLimitOrderCount):0,reduceOnlyLimitOrderCount:QR(e.reduceOnlyLimitOrderCount)?Number(e.reduceOnlyLimitOrderCount):0,aggregateReduceOnlyQuantity:QR(e.aggregateReduceOnlyQuantity)?String(e.aggregateReduceOnlyQuantity):"",aggregateVanillaQuantity:QR(e.aggregateVanillaQuantity)?String(e.aggregateVanillaQuantity):"",vanillaConditionalOrderCount:QR(e.vanillaConditionalOrderCount)?Number(e.vanillaConditionalOrderCount):0,reduceOnlyConditionalOrderCount:QR(e.reduceOnlyConditionalOrderCount)?Number(e.reduceOnlyConditionalOrderCount):0}},toJSON:function(e){var t={};return void 0!==e.vanillaLimitOrderCount&&(t.vanillaLimitOrderCount=Math.round(e.vanillaLimitOrderCount)),void 0!==e.reduceOnlyLimitOrderCount&&(t.reduceOnlyLimitOrderCount=Math.round(e.reduceOnlyLimitOrderCount)),void 0!==e.aggregateReduceOnlyQuantity&&(t.aggregateReduceOnlyQuantity=e.aggregateReduceOnlyQuantity),void 0!==e.aggregateVanillaQuantity&&(t.aggregateVanillaQuantity=e.aggregateVanillaQuantity),void 0!==e.vanillaConditionalOrderCount&&(t.vanillaConditionalOrderCount=Math.round(e.vanillaConditionalOrderCount)),void 0!==e.reduceOnlyConditionalOrderCount&&(t.reduceOnlyConditionalOrderCount=Math.round(e.reduceOnlyConditionalOrderCount)),t},create:function(e){return kR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i,s={vanillaLimitOrderCount:0,reduceOnlyLimitOrderCount:0,aggregateReduceOnlyQuantity:"",aggregateVanillaQuantity:"",vanillaConditionalOrderCount:0,reduceOnlyConditionalOrderCount:0};return s.vanillaLimitOrderCount=null!==(t=e.vanillaLimitOrderCount)&&void 0!==t?t:0,s.reduceOnlyLimitOrderCount=null!==(n=e.reduceOnlyLimitOrderCount)&&void 0!==n?n:0,s.aggregateReduceOnlyQuantity=null!==(a=e.aggregateReduceOnlyQuantity)&&void 0!==a?a:"",s.aggregateVanillaQuantity=null!==(o=e.aggregateVanillaQuantity)&&void 0!==o?o:"",s.vanillaConditionalOrderCount=null!==(r=e.vanillaConditionalOrderCount)&&void 0!==r?r:0,s.reduceOnlyConditionalOrderCount=null!==(i=e.reduceOnlyConditionalOrderCount)&&void 0!==i?i:0,s}};var AR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.price&&t.uint32(10).string(e.price),""!==e.quantity&&t.uint32(18).string(e.quantity),!0===e.isReduceOnly&&t.uint32(24).bool(e.isReduceOnly),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={price:"",quantity:"",isReduceOnly:!1};n.pos>>3){case 1:o.price=n.string();break;case 2:o.quantity=n.string();break;case 3:o.isReduceOnly=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{price:QR(e.price)?String(e.price):"",quantity:QR(e.quantity)?String(e.quantity):"",isReduceOnly:!!QR(e.isReduceOnly)&&Boolean(e.isReduceOnly)}},toJSON:function(e){var t={};return void 0!==e.price&&(t.price=e.price),void 0!==e.quantity&&(t.quantity=e.quantity),void 0!==e.isReduceOnly&&(t.isReduceOnly=e.isReduceOnly),t},create:function(e){return AR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o={price:"",quantity:"",isReduceOnly:!1};return o.price=null!==(t=e.price)&&void 0!==t?t:"",o.quantity=null!==(n=e.quantity)&&void 0!==n?n:"",o.isReduceOnly=null!==(a=e.isReduceOnly)&&void 0!==a&&a,o}};function xR(){return{order:void 0,orderHash:new Uint8Array}}var IR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.order&&AR.encode(e.order,t.uint32(10).fork()).ldelim(),0!==e.orderHash.length&&t.uint32(18).bytes(e.orderHash),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o=xR();n.pos>>3){case 1:o.order=AR.decode(n,n.uint32());break;case 2:o.orderHash=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{order:QR(e.order)?AR.fromJSON(e.order):void 0,orderHash:QR(e.orderHash)?ZR(e.orderHash):new Uint8Array}},toJSON:function(e){var t={};return void 0!==e.order&&(t.order=e.order?AR.toJSON(e.order):void 0),void 0!==e.orderHash&&(t.orderHash=VR(void 0!==e.orderHash?e.orderHash:new Uint8Array)),t},create:function(e){return IR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n=xR();return n.order=void 0!==e.order&&null!==e.order?AR.fromPartial(e.order):void 0,n.orderHash=null!==(t=e.orderHash)&&void 0!==t?t:new Uint8Array,n}};function TR(){return{orderInfo:void 0,orderType:0,margin:"",fillable:"",triggerPrice:"",orderHash:new Uint8Array}}var SR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.orderInfo&&yR.encode(e.orderInfo,t.uint32(10).fork()).ldelim(),0!==e.orderType&&t.uint32(16).int32(e.orderType),""!==e.margin&&t.uint32(26).string(e.margin),""!==e.fillable&&t.uint32(34).string(e.fillable),""!==e.triggerPrice&&t.uint32(42).string(e.triggerPrice),0!==e.orderHash.length&&t.uint32(50).bytes(e.orderHash),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o=TR();n.pos>>3){case 1:o.orderInfo=yR.decode(n,n.uint32());break;case 2:o.orderType=n.int32();break;case 3:o.margin=n.string();break;case 4:o.fillable=n.string();break;case 5:o.triggerPrice=n.string();break;case 6:o.orderHash=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{orderInfo:QR(e.orderInfo)?yR.fromJSON(e.orderInfo):void 0,orderType:QR(e.orderType)?rR(e.orderType):0,margin:QR(e.margin)?String(e.margin):"",fillable:QR(e.fillable)?String(e.fillable):"",triggerPrice:QR(e.triggerPrice)?String(e.triggerPrice):"",orderHash:QR(e.orderHash)?ZR(e.orderHash):new Uint8Array}},toJSON:function(e){var t={};return void 0!==e.orderInfo&&(t.orderInfo=e.orderInfo?yR.toJSON(e.orderInfo):void 0),void 0!==e.orderType&&(t.orderType=iR(e.orderType)),void 0!==e.margin&&(t.margin=e.margin),void 0!==e.fillable&&(t.fillable=e.fillable),void 0!==e.triggerPrice&&(t.triggerPrice=e.triggerPrice),void 0!==e.orderHash&&(t.orderHash=VR(void 0!==e.orderHash?e.orderHash:new Uint8Array)),t},create:function(e){return SR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i=TR();return i.orderInfo=void 0!==e.orderInfo&&null!==e.orderInfo?yR.fromPartial(e.orderInfo):void 0,i.orderType=null!==(t=e.orderType)&&void 0!==t?t:0,i.margin=null!==(n=e.margin)&&void 0!==n?n:"",i.fillable=null!==(a=e.fillable)&&void 0!==a?a:"",i.triggerPrice=null!==(o=e.triggerPrice)&&void 0!==o?o:"",i.orderHash=null!==(r=e.orderHash)&&void 0!==r?r:new Uint8Array,i}};function CR(){return{orderInfo:void 0,orderType:0,margin:"",marginHold:"",triggerPrice:"",orderHash:new Uint8Array}}var ER={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.orderInfo&&yR.encode(e.orderInfo,t.uint32(10).fork()).ldelim(),0!==e.orderType&&t.uint32(16).int32(e.orderType),""!==e.margin&&t.uint32(26).string(e.margin),""!==e.marginHold&&t.uint32(34).string(e.marginHold),""!==e.triggerPrice&&t.uint32(42).string(e.triggerPrice),0!==e.orderHash.length&&t.uint32(50).bytes(e.orderHash),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o=CR();n.pos>>3){case 1:o.orderInfo=yR.decode(n,n.uint32());break;case 2:o.orderType=n.int32();break;case 3:o.margin=n.string();break;case 4:o.marginHold=n.string();break;case 5:o.triggerPrice=n.string();break;case 6:o.orderHash=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{orderInfo:QR(e.orderInfo)?yR.fromJSON(e.orderInfo):void 0,orderType:QR(e.orderType)?rR(e.orderType):0,margin:QR(e.margin)?String(e.margin):"",marginHold:QR(e.marginHold)?String(e.marginHold):"",triggerPrice:QR(e.triggerPrice)?String(e.triggerPrice):"",orderHash:QR(e.orderHash)?ZR(e.orderHash):new Uint8Array}},toJSON:function(e){var t={};return void 0!==e.orderInfo&&(t.orderInfo=e.orderInfo?yR.toJSON(e.orderInfo):void 0),void 0!==e.orderType&&(t.orderType=iR(e.orderType)),void 0!==e.margin&&(t.margin=e.margin),void 0!==e.marginHold&&(t.marginHold=e.marginHold),void 0!==e.triggerPrice&&(t.triggerPrice=e.triggerPrice),void 0!==e.orderHash&&(t.orderHash=VR(void 0!==e.orderHash?e.orderHash:new Uint8Array)),t},create:function(e){return ER.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i=CR();return i.orderInfo=void 0!==e.orderInfo&&null!==e.orderInfo?yR.fromPartial(e.orderInfo):void 0,i.orderType=null!==(t=e.orderType)&&void 0!==t?t:0,i.margin=null!==(n=e.margin)&&void 0!==n?n:"",i.marginHold=null!==(a=e.marginHold)&&void 0!==a?a:"",i.triggerPrice=null!==(o=e.triggerPrice)&&void 0!==o?o:"",i.orderHash=null!==(r=e.orderHash)&&void 0!==r?r:new Uint8Array,i}};var RR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return!0===e.isLong&&t.uint32(8).bool(e.isLong),""!==e.quantity&&t.uint32(18).string(e.quantity),""!==e.entryPrice&&t.uint32(26).string(e.entryPrice),""!==e.margin&&t.uint32(34).string(e.margin),""!==e.cumulativeFundingEntry&&t.uint32(42).string(e.cumulativeFundingEntry),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={isLong:!1,quantity:"",entryPrice:"",margin:"",cumulativeFundingEntry:""};n.pos>>3){case 1:o.isLong=n.bool();break;case 2:o.quantity=n.string();break;case 3:o.entryPrice=n.string();break;case 4:o.margin=n.string();break;case 5:o.cumulativeFundingEntry=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{isLong:!!QR(e.isLong)&&Boolean(e.isLong),quantity:QR(e.quantity)?String(e.quantity):"",entryPrice:QR(e.entryPrice)?String(e.entryPrice):"",margin:QR(e.margin)?String(e.margin):"",cumulativeFundingEntry:QR(e.cumulativeFundingEntry)?String(e.cumulativeFundingEntry):""}},toJSON:function(e){var t={};return void 0!==e.isLong&&(t.isLong=e.isLong),void 0!==e.quantity&&(t.quantity=e.quantity),void 0!==e.entryPrice&&(t.entryPrice=e.entryPrice),void 0!==e.margin&&(t.margin=e.margin),void 0!==e.cumulativeFundingEntry&&(t.cumulativeFundingEntry=e.cumulativeFundingEntry),t},create:function(e){return RR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i={isLong:!1,quantity:"",entryPrice:"",margin:"",cumulativeFundingEntry:""};return i.isLong=null!==(t=e.isLong)&&void 0!==t&&t,i.quantity=null!==(n=e.quantity)&&void 0!==n?n:"",i.entryPrice=null!==(a=e.entryPrice)&&void 0!==a?a:"",i.margin=null!==(o=e.margin)&&void 0!==o?o:"",i.cumulativeFundingEntry=null!==(r=e.cumulativeFundingEntry)&&void 0!==r?r:"",i}};var MR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.makerPointsMultiplier&&t.uint32(10).string(e.makerPointsMultiplier),""!==e.takerPointsMultiplier&&t.uint32(18).string(e.takerPointsMultiplier),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={makerPointsMultiplier:"",takerPointsMultiplier:""};n.pos>>3){case 1:o.makerPointsMultiplier=n.string();break;case 2:o.takerPointsMultiplier=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{makerPointsMultiplier:QR(e.makerPointsMultiplier)?String(e.makerPointsMultiplier):"",takerPointsMultiplier:QR(e.takerPointsMultiplier)?String(e.takerPointsMultiplier):""}},toJSON:function(e){var t={};return void 0!==e.makerPointsMultiplier&&(t.makerPointsMultiplier=e.makerPointsMultiplier),void 0!==e.takerPointsMultiplier&&(t.takerPointsMultiplier=e.takerPointsMultiplier),t},create:function(e){return MR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={makerPointsMultiplier:"",takerPointsMultiplier:""};return a.makerPointsMultiplier=null!==(t=e.makerPointsMultiplier)&&void 0!==t?t:"",a.takerPointsMultiplier=null!==(n=e.takerPointsMultiplier)&&void 0!==n?n:"",a}};var PR={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.boostedSpotMarketIds);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(b){a.e(b)}finally{a.f()}var r,i=(0,jr.Z)(e.spotMarketMultipliers);try{for(i.s();!(r=i.n()).done;){var s=r.value;MR.encode(s,n.uint32(18).fork()).ldelim()}}catch(b){i.e(b)}finally{i.f()}var c,u=(0,jr.Z)(e.boostedDerivativeMarketIds);try{for(u.s();!(c=u.n()).done;){var d=c.value;n.uint32(26).string(d)}}catch(b){u.e(b)}finally{u.f()}var l,f=(0,jr.Z)(e.derivativeMarketMultipliers);try{for(f.s();!(l=f.n()).done;){var p=l.value;MR.encode(p,n.uint32(34).fork()).ldelim()}}catch(b){f.e(b)}finally{f.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={boostedSpotMarketIds:[],spotMarketMultipliers:[],boostedDerivativeMarketIds:[],derivativeMarketMultipliers:[]};n.pos>>3){case 1:o.boostedSpotMarketIds.push(n.string());break;case 2:o.spotMarketMultipliers.push(MR.decode(n,n.uint32()));break;case 3:o.boostedDerivativeMarketIds.push(n.string());break;case 4:o.derivativeMarketMultipliers.push(MR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{boostedSpotMarketIds:Array.isArray(null===e||void 0===e?void 0:e.boostedSpotMarketIds)?e.boostedSpotMarketIds.map((function(e){return String(e)})):[],spotMarketMultipliers:Array.isArray(null===e||void 0===e?void 0:e.spotMarketMultipliers)?e.spotMarketMultipliers.map((function(e){return MR.fromJSON(e)})):[],boostedDerivativeMarketIds:Array.isArray(null===e||void 0===e?void 0:e.boostedDerivativeMarketIds)?e.boostedDerivativeMarketIds.map((function(e){return String(e)})):[],derivativeMarketMultipliers:Array.isArray(null===e||void 0===e?void 0:e.derivativeMarketMultipliers)?e.derivativeMarketMultipliers.map((function(e){return MR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.boostedSpotMarketIds?t.boostedSpotMarketIds=e.boostedSpotMarketIds.map((function(e){return e})):t.boostedSpotMarketIds=[],e.spotMarketMultipliers?t.spotMarketMultipliers=e.spotMarketMultipliers.map((function(e){return e?MR.toJSON(e):void 0})):t.spotMarketMultipliers=[],e.boostedDerivativeMarketIds?t.boostedDerivativeMarketIds=e.boostedDerivativeMarketIds.map((function(e){return e})):t.boostedDerivativeMarketIds=[],e.derivativeMarketMultipliers?t.derivativeMarketMultipliers=e.derivativeMarketMultipliers.map((function(e){return e?MR.toJSON(e):void 0})):t.derivativeMarketMultipliers=[],t},create:function(e){return PR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r={boostedSpotMarketIds:[],spotMarketMultipliers:[],boostedDerivativeMarketIds:[],derivativeMarketMultipliers:[]};return r.boostedSpotMarketIds=(null===(t=e.boostedSpotMarketIds)||void 0===t?void 0:t.map((function(e){return e})))||[],r.spotMarketMultipliers=(null===(n=e.spotMarketMultipliers)||void 0===n?void 0:n.map((function(e){return MR.fromPartial(e)})))||[],r.boostedDerivativeMarketIds=(null===(a=e.boostedDerivativeMarketIds)||void 0===a?void 0:a.map((function(e){return e})))||[],r.derivativeMarketMultipliers=(null===(o=e.derivativeMarketMultipliers)||void 0===o?void 0:o.map((function(e){return MR.fromPartial(e)})))||[],r}};var UR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();"0"!==e.startTimestamp&&t.uint32(8).int64(e.startTimestamp);var n,a=(0,jr.Z)(e.maxCampaignRewards);try{for(a.s();!(n=a.n()).done;){var o=n.value;VC.encode(o,t.uint32(18).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={startTimestamp:"0",maxCampaignRewards:[]};n.pos>>3){case 1:o.startTimestamp=qR(n.int64());break;case 2:o.maxCampaignRewards.push(VC.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{startTimestamp:QR(e.startTimestamp)?String(e.startTimestamp):"0",maxCampaignRewards:Array.isArray(null===e||void 0===e?void 0:e.maxCampaignRewards)?e.maxCampaignRewards.map((function(e){return VC.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.startTimestamp&&(t.startTimestamp=e.startTimestamp),e.maxCampaignRewards?t.maxCampaignRewards=e.maxCampaignRewards.map((function(e){return e?VC.toJSON(e):void 0})):t.maxCampaignRewards=[],t},create:function(e){return UR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={startTimestamp:"0",maxCampaignRewards:[]};return a.startTimestamp=null!==(t=e.startTimestamp)&&void 0!==t?t:"0",a.maxCampaignRewards=(null===(n=e.maxCampaignRewards)||void 0===n?void 0:n.map((function(e){return VC.fromPartial(e)})))||[],a}};var _R={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();"0"!==e.campaignDurationSeconds&&t.uint32(8).int64(e.campaignDurationSeconds);var n,a=(0,jr.Z)(e.quoteDenoms);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.uint32(18).string(o)}}catch(c){a.e(c)}finally{a.f()}void 0!==e.tradingRewardBoostInfo&&PR.encode(e.tradingRewardBoostInfo,t.uint32(26).fork()).ldelim();var r,i=(0,jr.Z)(e.disqualifiedMarketIds);try{for(i.s();!(r=i.n()).done;){var s=r.value;t.uint32(34).string(s)}}catch(c){i.e(c)}finally{i.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={campaignDurationSeconds:"0",quoteDenoms:[],tradingRewardBoostInfo:void 0,disqualifiedMarketIds:[]};n.pos>>3){case 1:o.campaignDurationSeconds=qR(n.int64());break;case 2:o.quoteDenoms.push(n.string());break;case 3:o.tradingRewardBoostInfo=PR.decode(n,n.uint32());break;case 4:o.disqualifiedMarketIds.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{campaignDurationSeconds:QR(e.campaignDurationSeconds)?String(e.campaignDurationSeconds):"0",quoteDenoms:Array.isArray(null===e||void 0===e?void 0:e.quoteDenoms)?e.quoteDenoms.map((function(e){return String(e)})):[],tradingRewardBoostInfo:QR(e.tradingRewardBoostInfo)?PR.fromJSON(e.tradingRewardBoostInfo):void 0,disqualifiedMarketIds:Array.isArray(null===e||void 0===e?void 0:e.disqualifiedMarketIds)?e.disqualifiedMarketIds.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.campaignDurationSeconds&&(t.campaignDurationSeconds=e.campaignDurationSeconds),e.quoteDenoms?t.quoteDenoms=e.quoteDenoms.map((function(e){return e})):t.quoteDenoms=[],void 0!==e.tradingRewardBoostInfo&&(t.tradingRewardBoostInfo=e.tradingRewardBoostInfo?PR.toJSON(e.tradingRewardBoostInfo):void 0),e.disqualifiedMarketIds?t.disqualifiedMarketIds=e.disqualifiedMarketIds.map((function(e){return e})):t.disqualifiedMarketIds=[],t},create:function(e){return _R.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o={campaignDurationSeconds:"0",quoteDenoms:[],tradingRewardBoostInfo:void 0,disqualifiedMarketIds:[]};return o.campaignDurationSeconds=null!==(t=e.campaignDurationSeconds)&&void 0!==t?t:"0",o.quoteDenoms=(null===(n=e.quoteDenoms)||void 0===n?void 0:n.map((function(e){return e})))||[],o.tradingRewardBoostInfo=void 0!==e.tradingRewardBoostInfo&&null!==e.tradingRewardBoostInfo?PR.fromPartial(e.tradingRewardBoostInfo):void 0,o.disqualifiedMarketIds=(null===(a=e.disqualifiedMarketIds)||void 0===a?void 0:a.map((function(e){return e})))||[],o}};var BR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.makerDiscountRate&&t.uint32(10).string(e.makerDiscountRate),""!==e.takerDiscountRate&&t.uint32(18).string(e.takerDiscountRate),""!==e.stakedAmount&&t.uint32(26).string(e.stakedAmount),""!==e.volume&&t.uint32(34).string(e.volume),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={makerDiscountRate:"",takerDiscountRate:"",stakedAmount:"",volume:""};n.pos>>3){case 1:o.makerDiscountRate=n.string();break;case 2:o.takerDiscountRate=n.string();break;case 3:o.stakedAmount=n.string();break;case 4:o.volume=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{makerDiscountRate:QR(e.makerDiscountRate)?String(e.makerDiscountRate):"",takerDiscountRate:QR(e.takerDiscountRate)?String(e.takerDiscountRate):"",stakedAmount:QR(e.stakedAmount)?String(e.stakedAmount):"",volume:QR(e.volume)?String(e.volume):""}},toJSON:function(e){var t={};return void 0!==e.makerDiscountRate&&(t.makerDiscountRate=e.makerDiscountRate),void 0!==e.takerDiscountRate&&(t.takerDiscountRate=e.takerDiscountRate),void 0!==e.stakedAmount&&(t.stakedAmount=e.stakedAmount),void 0!==e.volume&&(t.volume=e.volume),t},create:function(e){return BR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r={makerDiscountRate:"",takerDiscountRate:"",stakedAmount:"",volume:""};return r.makerDiscountRate=null!==(t=e.makerDiscountRate)&&void 0!==t?t:"",r.takerDiscountRate=null!==(n=e.takerDiscountRate)&&void 0!==n?n:"",r.stakedAmount=null!==(a=e.stakedAmount)&&void 0!==a?a:"",r.volume=null!==(o=e.volume)&&void 0!==o?o:"",r}};var DR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();"0"!==e.bucketCount&&t.uint32(8).uint64(e.bucketCount),"0"!==e.bucketDuration&&t.uint32(16).int64(e.bucketDuration);var n,a=(0,jr.Z)(e.quoteDenoms);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.uint32(26).string(o)}}catch(l){a.e(l)}finally{a.f()}var r,i=(0,jr.Z)(e.tierInfos);try{for(i.s();!(r=i.n()).done;){var s=r.value;BR.encode(s,t.uint32(34).fork()).ldelim()}}catch(l){i.e(l)}finally{i.f()}var c,u=(0,jr.Z)(e.disqualifiedMarketIds);try{for(u.s();!(c=u.n()).done;){var d=c.value;t.uint32(42).string(d)}}catch(l){u.e(l)}finally{u.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={bucketCount:"0",bucketDuration:"0",quoteDenoms:[],tierInfos:[],disqualifiedMarketIds:[]};n.pos>>3){case 1:o.bucketCount=qR(n.uint64());break;case 2:o.bucketDuration=qR(n.int64());break;case 3:o.quoteDenoms.push(n.string());break;case 4:o.tierInfos.push(BR.decode(n,n.uint32()));break;case 5:o.disqualifiedMarketIds.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{bucketCount:QR(e.bucketCount)?String(e.bucketCount):"0",bucketDuration:QR(e.bucketDuration)?String(e.bucketDuration):"0",quoteDenoms:Array.isArray(null===e||void 0===e?void 0:e.quoteDenoms)?e.quoteDenoms.map((function(e){return String(e)})):[],tierInfos:Array.isArray(null===e||void 0===e?void 0:e.tierInfos)?e.tierInfos.map((function(e){return BR.fromJSON(e)})):[],disqualifiedMarketIds:Array.isArray(null===e||void 0===e?void 0:e.disqualifiedMarketIds)?e.disqualifiedMarketIds.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.bucketCount&&(t.bucketCount=e.bucketCount),void 0!==e.bucketDuration&&(t.bucketDuration=e.bucketDuration),e.quoteDenoms?t.quoteDenoms=e.quoteDenoms.map((function(e){return e})):t.quoteDenoms=[],e.tierInfos?t.tierInfos=e.tierInfos.map((function(e){return e?BR.toJSON(e):void 0})):t.tierInfos=[],e.disqualifiedMarketIds?t.disqualifiedMarketIds=e.disqualifiedMarketIds.map((function(e){return e})):t.disqualifiedMarketIds=[],t},create:function(e){return DR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i={bucketCount:"0",bucketDuration:"0",quoteDenoms:[],tierInfos:[],disqualifiedMarketIds:[]};return i.bucketCount=null!==(t=e.bucketCount)&&void 0!==t?t:"0",i.bucketDuration=null!==(n=e.bucketDuration)&&void 0!==n?n:"0",i.quoteDenoms=(null===(a=e.quoteDenoms)||void 0===a?void 0:a.map((function(e){return e})))||[],i.tierInfos=(null===(o=e.tierInfos)||void 0===o?void 0:o.map((function(e){return BR.fromPartial(e)})))||[],i.disqualifiedMarketIds=(null===(r=e.disqualifiedMarketIds)||void 0===r?void 0:r.map((function(e){return e})))||[],i}};var NR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return"0"!==e.tier&&t.uint32(8).uint64(e.tier),"0"!==e.ttlTimestamp&&t.uint32(16).int64(e.ttlTimestamp),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={tier:"0",ttlTimestamp:"0"};n.pos>>3){case 1:o.tier=qR(n.uint64());break;case 2:o.ttlTimestamp=qR(n.int64());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{tier:QR(e.tier)?String(e.tier):"0",ttlTimestamp:QR(e.ttlTimestamp)?String(e.ttlTimestamp):"0"}},toJSON:function(e){var t={};return void 0!==e.tier&&(t.tier=e.tier),void 0!==e.ttlTimestamp&&(t.ttlTimestamp=e.ttlTimestamp),t},create:function(e){return NR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={tier:"0",ttlTimestamp:"0"};return a.tier=null!==(t=e.tier)&&void 0!==t?t:"0",a.ttlTimestamp=null!==(n=e.ttlTimestamp)&&void 0!==n?n:"0",a}};var OR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.makerVolume&&t.uint32(10).string(e.makerVolume),""!==e.takerVolume&&t.uint32(18).string(e.takerVolume),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={makerVolume:"",takerVolume:""};n.pos>>3){case 1:o.makerVolume=n.string();break;case 2:o.takerVolume=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{makerVolume:QR(e.makerVolume)?String(e.makerVolume):"",takerVolume:QR(e.takerVolume)?String(e.takerVolume):""}},toJSON:function(e){var t={};return void 0!==e.makerVolume&&(t.makerVolume=e.makerVolume),void 0!==e.takerVolume&&(t.takerVolume=e.takerVolume),t},create:function(e){return OR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={makerVolume:"",takerVolume:""};return a.makerVolume=null!==(t=e.makerVolume)&&void 0!==t?t:"",a.takerVolume=null!==(n=e.takerVolume)&&void 0!==n?n:"",a}};var FR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();""!==e.marketId&&t.uint32(10).string(e.marketId);var n,a=(0,jr.Z)(e.latestTradeRecords);try{for(a.s();!(n=a.n()).done;){var o=n.value;LR.encode(o,t.uint32(18).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",latestTradeRecords:[]};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.latestTradeRecords.push(LR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:QR(e.marketId)?String(e.marketId):"",latestTradeRecords:Array.isArray(null===e||void 0===e?void 0:e.latestTradeRecords)?e.latestTradeRecords.map((function(e){return LR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),e.latestTradeRecords?t.latestTradeRecords=e.latestTradeRecords.map((function(e){return e?LR.toJSON(e):void 0})):t.latestTradeRecords=[],t},create:function(e){return FR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={marketId:"",latestTradeRecords:[]};return a.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",a.latestTradeRecords=(null===(n=e.latestTradeRecords)||void 0===n?void 0:n.map((function(e){return LR.fromPartial(e)})))||[],a}};var LR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return"0"!==e.timestamp&&t.uint32(8).int64(e.timestamp),""!==e.price&&t.uint32(18).string(e.price),""!==e.quantity&&t.uint32(26).string(e.quantity),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={timestamp:"0",price:"",quantity:""};n.pos>>3){case 1:o.timestamp=qR(n.int64());break;case 2:o.price=n.string();break;case 3:o.quantity=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{timestamp:QR(e.timestamp)?String(e.timestamp):"0",price:QR(e.price)?String(e.price):"",quantity:QR(e.quantity)?String(e.quantity):""}},toJSON:function(e){var t={};return void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.price&&(t.price=e.price),void 0!==e.quantity&&(t.quantity=e.quantity),t},create:function(e){return LR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o={timestamp:"0",price:"",quantity:""};return o.timestamp=null!==(t=e.timestamp)&&void 0!==t?t:"0",o.price=null!==(n=e.price)&&void 0!==n?n:"",o.quantity=null!==(a=e.quantity)&&void 0!==a?a:"",o}};var jR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.p&&t.uint32(10).string(e.p),""!==e.q&&t.uint32(18).string(e.q),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={p:"",q:""};n.pos>>3){case 1:o.p=n.string();break;case 2:o.q=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{p:QR(e.p)?String(e.p):"",q:QR(e.q)?String(e.q):""}},toJSON:function(e){var t={};return void 0!==e.p&&(t.p=e.p),void 0!==e.q&&(t.q=e.q),t},create:function(e){return jR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={p:"",q:""};return a.p=null!==(t=e.p)&&void 0!==t?t:"",a.q=null!==(n=e.q)&&void 0!==n?n:"",a}};var HR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();""!==e.subaccountId&&t.uint32(10).string(e.subaccountId);var n,a=(0,jr.Z)(e.marketVolumes);try{for(a.s();!(n=a.n()).done;){var o=n.value;zR.encode(o,t.uint32(18).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",marketVolumes:[]};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.marketVolumes.push(zR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:QR(e.subaccountId)?String(e.subaccountId):"",marketVolumes:Array.isArray(null===e||void 0===e?void 0:e.marketVolumes)?e.marketVolumes.map((function(e){return zR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),e.marketVolumes?t.marketVolumes=e.marketVolumes.map((function(e){return e?zR.toJSON(e):void 0})):t.marketVolumes=[],t},create:function(e){return HR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={subaccountId:"",marketVolumes:[]};return a.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",a.marketVolumes=(null===(n=e.marketVolumes)||void 0===n?void 0:n.map((function(e){return zR.fromPartial(e)})))||[],a}};var GR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();""!==e.account&&t.uint32(10).string(e.account);var n,a=(0,jr.Z)(e.marketVolumes);try{for(a.s();!(n=a.n()).done;){var o=n.value;zR.encode(o,t.uint32(18).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={account:"",marketVolumes:[]};n.pos>>3){case 1:o.account=n.string();break;case 2:o.marketVolumes.push(zR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{account:QR(e.account)?String(e.account):"",marketVolumes:Array.isArray(null===e||void 0===e?void 0:e.marketVolumes)?e.marketVolumes.map((function(e){return zR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.account&&(t.account=e.account),e.marketVolumes?t.marketVolumes=e.marketVolumes.map((function(e){return e?zR.toJSON(e):void 0})):t.marketVolumes=[],t},create:function(e){return GR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={account:"",marketVolumes:[]};return a.account=null!==(t=e.account)&&void 0!==t?t:"",a.marketVolumes=(null===(n=e.marketVolumes)||void 0===n?void 0:n.map((function(e){return zR.fromPartial(e)})))||[],a}};var zR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),void 0!==e.volume&&OR.encode(e.volume,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",volume:void 0};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.volume=OR.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:QR(e.marketId)?String(e.marketId):"",volume:QR(e.volume)?OR.fromJSON(e.volume):void 0}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.volume&&(t.volume=e.volume?OR.toJSON(e.volume):void 0),t},create:function(e){return zR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:"",volume:void 0};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n.volume=void 0!==e.volume&&null!==e.volume?OR.fromPartial(e.volume):void 0,n}};var KR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),"0"!==e.decimals&&t.uint32(16).uint64(e.decimals),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={denom:"",decimals:"0"};n.pos>>3){case 1:o.denom=n.string();break;case 2:o.decimals=qR(n.uint64());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{denom:QR(e.denom)?String(e.denom):"",decimals:QR(e.decimals)?String(e.decimals):"0"}},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.decimals&&(t.decimals=e.decimals),t},create:function(e){return KR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={denom:"",decimals:"0"};return a.denom=null!==(t=e.denom)&&void 0!==t?t:"",a.decimals=null!==(n=e.decimals)&&void 0!==n?n:"0",a}},WR=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();function ZR(e){if(WR.Buffer)return Uint8Array.from(WR.Buffer.from(e,"base64"));for(var t=WR.atob(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();void 0!==e.params&&sR.encode(e.params,t.uint32(10).fork()).ldelim();var n,a=(0,jr.Z)(e.spotMarkets);try{for(a.s();!(n=a.n()).done;){var o=n.value;mR.encode(o,t.uint32(18).fork()).ldelim()}}catch(Ue){a.e(Ue)}finally{a.f()}var r,i=(0,jr.Z)(e.derivativeMarkets);try{for(i.s();!(r=i.n()).done;){var s=r.value;uR.encode(s,t.uint32(26).fork()).ldelim()}}catch(Ue){i.e(Ue)}finally{i.f()}var c,u=(0,jr.Z)(e.spotOrderbook);try{for(u.s();!(c=u.n()).done;){var d=c.value;aM.encode(d,t.uint32(34).fork()).ldelim()}}catch(Ue){u.e(Ue)}finally{u.f()}var l,f=(0,jr.Z)(e.derivativeOrderbook);try{for(f.s();!(l=f.n()).done;){var p=l.value;oM.encode(p,t.uint32(42).fork()).ldelim()}}catch(Ue){f.e(Ue)}finally{f.f()}var b,m=(0,jr.Z)(e.balances);try{for(m.s();!(b=m.n()).done;){var h=b.value;iM.encode(h,t.uint32(50).fork()).ldelim()}}catch(Ue){m.e(Ue)}finally{m.f()}var g,y=(0,jr.Z)(e.positions);try{for(y.s();!(g=y.n()).done;){var v=g.value;sM.encode(v,t.uint32(58).fork()).ldelim()}}catch(Ue){y.e(Ue)}finally{y.f()}var w,k=(0,jr.Z)(e.subaccountTradeNonces);try{for(k.s();!(w=k.n()).done;){var A=w.value;cM.encode(A,t.uint32(66).fork()).ldelim()}}catch(Ue){k.e(Ue)}finally{k.f()}var x,I=(0,jr.Z)(e.expiryFuturesMarketInfoState);try{for(I.s();!(x=I.n()).done;){var T=x.value;uM.encode(T,t.uint32(74).fork()).ldelim()}}catch(Ue){I.e(Ue)}finally{I.f()}var S,C=(0,jr.Z)(e.perpetualMarketInfo);try{for(C.s();!(S=C.n()).done;){var E=S.value;fR.encode(E,t.uint32(82).fork()).ldelim()}}catch(Ue){C.e(Ue)}finally{C.f()}var R,M=(0,jr.Z)(e.perpetualMarketFundingState);try{for(M.s();!(R=M.n()).done;){var P=R.value;lM.encode(P,t.uint32(90).fork()).ldelim()}}catch(Ue){M.e(Ue)}finally{M.f()}var U,_=(0,jr.Z)(e.derivativeMarketSettlementScheduled);try{for(_.s();!(U=_.n()).done;){var B=U.value;bR.encode(B,t.uint32(98).fork()).ldelim()}}catch(Ue){_.e(Ue)}finally{_.f()}!0===e.isSpotExchangeEnabled&&t.uint32(104).bool(e.isSpotExchangeEnabled),!0===e.isDerivativesExchangeEnabled&&t.uint32(112).bool(e.isDerivativesExchangeEnabled),void 0!==e.tradingRewardCampaignInfo&&_R.encode(e.tradingRewardCampaignInfo,t.uint32(122).fork()).ldelim();var D,N=(0,jr.Z)(e.tradingRewardPoolCampaignSchedule);try{for(N.s();!(D=N.n()).done;){var O=D.value;UR.encode(O,t.uint32(130).fork()).ldelim()}}catch(Ue){N.e(Ue)}finally{N.f()}var F,L=(0,jr.Z)(e.tradingRewardCampaignAccountPoints);try{for(L.s();!(F=L.n()).done;){var j=F.value;tM.encode(j,t.uint32(138).fork()).ldelim()}}catch(Ue){L.e(Ue)}finally{L.f()}void 0!==e.feeDiscountSchedule&&DR.encode(e.feeDiscountSchedule,t.uint32(146).fork()).ldelim();var H,G=(0,jr.Z)(e.feeDiscountAccountTierTtl);try{for(G.s();!(H=G.n()).done;){var z=H.value;XR.encode(z,t.uint32(154).fork()).ldelim()}}catch(Ue){G.e(Ue)}finally{G.f()}var K,W=(0,jr.Z)(e.feeDiscountBucketVolumeAccounts);try{for(W.s();!(K=W.n()).done;){var Z=K.value;$R.encode(Z,t.uint32(162).fork()).ldelim()}}catch(Ue){W.e(Ue)}finally{W.f()}!0===e.isFirstFeeCycleFinished&&t.uint32(168).bool(e.isFirstFeeCycleFinished);var V,q=(0,jr.Z)(e.pendingTradingRewardPoolCampaignSchedule);try{for(q.s();!(V=q.n()).done;){var Q=V.value;UR.encode(Q,t.uint32(178).fork()).ldelim()}}catch(Ue){q.e(Ue)}finally{q.f()}var J,Y=(0,jr.Z)(e.pendingTradingRewardCampaignAccountPoints);try{for(Y.s();!(J=Y.n()).done;){var X=J.value;nM.encode(X,t.uint32(186).fork()).ldelim()}}catch(Ue){Y.e(Ue)}finally{Y.f()}var $,ee=(0,jr.Z)(e.rewardsOptOutAddresses);try{for(ee.s();!($=ee.n()).done;){var te=$.value;t.uint32(194).string(te)}}catch(Ue){ee.e(Ue)}finally{ee.f()}var ne,ae=(0,jr.Z)(e.historicalTradeRecords);try{for(ae.s();!(ne=ae.n()).done;){var oe=ne.value;FR.encode(oe,t.uint32(202).fork()).ldelim()}}catch(Ue){ae.e(Ue)}finally{ae.f()}var re,ie=(0,jr.Z)(e.binaryOptionsMarkets);try{for(ie.s();!(re=ie.n()).done;){var se=re.value;dR.encode(se,t.uint32(210).fork()).ldelim()}}catch(Ue){ie.e(Ue)}finally{ie.f()}var ce,ue=(0,jr.Z)(e.binaryOptionsMarketIdsScheduledForSettlement);try{for(ue.s();!(ce=ue.n()).done;){var de=ce.value;t.uint32(218).string(de)}}catch(Ue){ue.e(Ue)}finally{ue.f()}var le,fe=(0,jr.Z)(e.spotMarketIdsScheduledToForceClose);try{for(fe.s();!(le=fe.n()).done;){var pe=le.value;t.uint32(226).string(pe)}}catch(Ue){fe.e(Ue)}finally{fe.f()}var be,me=(0,jr.Z)(e.denomDecimals);try{for(me.s();!(be=me.n()).done;){var he=be.value;KR.encode(he,t.uint32(234).fork()).ldelim()}}catch(Ue){me.e(Ue)}finally{me.f()}var ge,ye=(0,jr.Z)(e.conditionalDerivativeOrderbooks);try{for(ye.s();!(ge=ye.n()).done;){var ve=ge.value;rM.encode(ve,t.uint32(242).fork()).ldelim()}}catch(Ue){ye.e(Ue)}finally{ye.f()}var we,ke=(0,jr.Z)(e.marketFeeMultipliers);try{for(ke.s();!(we=ke.n()).done;){var Ae=we.value;cR.encode(Ae,t.uint32(250).fork()).ldelim()}}catch(Ue){ke.e(Ue)}finally{ke.f()}var xe,Ie=(0,jr.Z)(e.orderbookSequences);try{for(Ie.s();!(xe=Ie.n()).done;){var Te=xe.value;YR.encode(Te,t.uint32(258).fork()).ldelim()}}catch(Ue){Ie.e(Ue)}finally{Ie.f()}var Se,Ce=(0,jr.Z)(e.subaccountVolumes);try{for(Ce.s();!(Se=Ce.n()).done;){var Ee=Se.value;HR.encode(Ee,t.uint32(266).fork()).ldelim()}}catch(Ue){Ce.e(Ue)}finally{Ce.f()}var Re,Me=(0,jr.Z)(e.marketVolumes);try{for(Me.s();!(Re=Me.n()).done;){var Pe=Re.value;zR.encode(Pe,t.uint32(274).fork()).ldelim()}}catch(Ue){Me.e(Ue)}finally{Me.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={params:void 0,spotMarkets:[],derivativeMarkets:[],spotOrderbook:[],derivativeOrderbook:[],balances:[],positions:[],subaccountTradeNonces:[],expiryFuturesMarketInfoState:[],perpetualMarketInfo:[],perpetualMarketFundingState:[],derivativeMarketSettlementScheduled:[],isSpotExchangeEnabled:!1,isDerivativesExchangeEnabled:!1,tradingRewardCampaignInfo:void 0,tradingRewardPoolCampaignSchedule:[],tradingRewardCampaignAccountPoints:[],feeDiscountSchedule:void 0,feeDiscountAccountTierTtl:[],feeDiscountBucketVolumeAccounts:[],isFirstFeeCycleFinished:!1,pendingTradingRewardPoolCampaignSchedule:[],pendingTradingRewardCampaignAccountPoints:[],rewardsOptOutAddresses:[],historicalTradeRecords:[],binaryOptionsMarkets:[],binaryOptionsMarketIdsScheduledForSettlement:[],spotMarketIdsScheduledToForceClose:[],denomDecimals:[],conditionalDerivativeOrderbooks:[],marketFeeMultipliers:[],orderbookSequences:[],subaccountVolumes:[],marketVolumes:[]};n.pos>>3){case 1:o.params=sR.decode(n,n.uint32());break;case 2:o.spotMarkets.push(mR.decode(n,n.uint32()));break;case 3:o.derivativeMarkets.push(uR.decode(n,n.uint32()));break;case 4:o.spotOrderbook.push(aM.decode(n,n.uint32()));break;case 5:o.derivativeOrderbook.push(oM.decode(n,n.uint32()));break;case 6:o.balances.push(iM.decode(n,n.uint32()));break;case 7:o.positions.push(sM.decode(n,n.uint32()));break;case 8:o.subaccountTradeNonces.push(cM.decode(n,n.uint32()));break;case 9:o.expiryFuturesMarketInfoState.push(uM.decode(n,n.uint32()));break;case 10:o.perpetualMarketInfo.push(fR.decode(n,n.uint32()));break;case 11:o.perpetualMarketFundingState.push(lM.decode(n,n.uint32()));break;case 12:o.derivativeMarketSettlementScheduled.push(bR.decode(n,n.uint32()));break;case 13:o.isSpotExchangeEnabled=n.bool();break;case 14:o.isDerivativesExchangeEnabled=n.bool();break;case 15:o.tradingRewardCampaignInfo=_R.decode(n,n.uint32());break;case 16:o.tradingRewardPoolCampaignSchedule.push(UR.decode(n,n.uint32()));break;case 17:o.tradingRewardCampaignAccountPoints.push(tM.decode(n,n.uint32()));break;case 18:o.feeDiscountSchedule=DR.decode(n,n.uint32());break;case 19:o.feeDiscountAccountTierTtl.push(XR.decode(n,n.uint32()));break;case 20:o.feeDiscountBucketVolumeAccounts.push($R.decode(n,n.uint32()));break;case 21:o.isFirstFeeCycleFinished=n.bool();break;case 22:o.pendingTradingRewardPoolCampaignSchedule.push(UR.decode(n,n.uint32()));break;case 23:o.pendingTradingRewardCampaignAccountPoints.push(nM.decode(n,n.uint32()));break;case 24:o.rewardsOptOutAddresses.push(n.string());break;case 25:o.historicalTradeRecords.push(FR.decode(n,n.uint32()));break;case 26:o.binaryOptionsMarkets.push(dR.decode(n,n.uint32()));break;case 27:o.binaryOptionsMarketIdsScheduledForSettlement.push(n.string());break;case 28:o.spotMarketIdsScheduledToForceClose.push(n.string());break;case 29:o.denomDecimals.push(KR.decode(n,n.uint32()));break;case 30:o.conditionalDerivativeOrderbooks.push(rM.decode(n,n.uint32()));break;case 31:o.marketFeeMultipliers.push(cR.decode(n,n.uint32()));break;case 32:o.orderbookSequences.push(YR.decode(n,n.uint32()));break;case 33:o.subaccountVolumes.push(HR.decode(n,n.uint32()));break;case 34:o.marketVolumes.push(zR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{params:pM(e.params)?sR.fromJSON(e.params):void 0,spotMarkets:Array.isArray(null===e||void 0===e?void 0:e.spotMarkets)?e.spotMarkets.map((function(e){return mR.fromJSON(e)})):[],derivativeMarkets:Array.isArray(null===e||void 0===e?void 0:e.derivativeMarkets)?e.derivativeMarkets.map((function(e){return uR.fromJSON(e)})):[],spotOrderbook:Array.isArray(null===e||void 0===e?void 0:e.spotOrderbook)?e.spotOrderbook.map((function(e){return aM.fromJSON(e)})):[],derivativeOrderbook:Array.isArray(null===e||void 0===e?void 0:e.derivativeOrderbook)?e.derivativeOrderbook.map((function(e){return oM.fromJSON(e)})):[],balances:Array.isArray(null===e||void 0===e?void 0:e.balances)?e.balances.map((function(e){return iM.fromJSON(e)})):[],positions:Array.isArray(null===e||void 0===e?void 0:e.positions)?e.positions.map((function(e){return sM.fromJSON(e)})):[],subaccountTradeNonces:Array.isArray(null===e||void 0===e?void 0:e.subaccountTradeNonces)?e.subaccountTradeNonces.map((function(e){return cM.fromJSON(e)})):[],expiryFuturesMarketInfoState:Array.isArray(null===e||void 0===e?void 0:e.expiryFuturesMarketInfoState)?e.expiryFuturesMarketInfoState.map((function(e){return uM.fromJSON(e)})):[],perpetualMarketInfo:Array.isArray(null===e||void 0===e?void 0:e.perpetualMarketInfo)?e.perpetualMarketInfo.map((function(e){return fR.fromJSON(e)})):[],perpetualMarketFundingState:Array.isArray(null===e||void 0===e?void 0:e.perpetualMarketFundingState)?e.perpetualMarketFundingState.map((function(e){return lM.fromJSON(e)})):[],derivativeMarketSettlementScheduled:Array.isArray(null===e||void 0===e?void 0:e.derivativeMarketSettlementScheduled)?e.derivativeMarketSettlementScheduled.map((function(e){return bR.fromJSON(e)})):[],isSpotExchangeEnabled:!!pM(e.isSpotExchangeEnabled)&&Boolean(e.isSpotExchangeEnabled),isDerivativesExchangeEnabled:!!pM(e.isDerivativesExchangeEnabled)&&Boolean(e.isDerivativesExchangeEnabled),tradingRewardCampaignInfo:pM(e.tradingRewardCampaignInfo)?_R.fromJSON(e.tradingRewardCampaignInfo):void 0,tradingRewardPoolCampaignSchedule:Array.isArray(null===e||void 0===e?void 0:e.tradingRewardPoolCampaignSchedule)?e.tradingRewardPoolCampaignSchedule.map((function(e){return UR.fromJSON(e)})):[],tradingRewardCampaignAccountPoints:Array.isArray(null===e||void 0===e?void 0:e.tradingRewardCampaignAccountPoints)?e.tradingRewardCampaignAccountPoints.map((function(e){return tM.fromJSON(e)})):[],feeDiscountSchedule:pM(e.feeDiscountSchedule)?DR.fromJSON(e.feeDiscountSchedule):void 0,feeDiscountAccountTierTtl:Array.isArray(null===e||void 0===e?void 0:e.feeDiscountAccountTierTtl)?e.feeDiscountAccountTierTtl.map((function(e){return XR.fromJSON(e)})):[],feeDiscountBucketVolumeAccounts:Array.isArray(null===e||void 0===e?void 0:e.feeDiscountBucketVolumeAccounts)?e.feeDiscountBucketVolumeAccounts.map((function(e){return $R.fromJSON(e)})):[],isFirstFeeCycleFinished:!!pM(e.isFirstFeeCycleFinished)&&Boolean(e.isFirstFeeCycleFinished),pendingTradingRewardPoolCampaignSchedule:Array.isArray(null===e||void 0===e?void 0:e.pendingTradingRewardPoolCampaignSchedule)?e.pendingTradingRewardPoolCampaignSchedule.map((function(e){return UR.fromJSON(e)})):[],pendingTradingRewardCampaignAccountPoints:Array.isArray(null===e||void 0===e?void 0:e.pendingTradingRewardCampaignAccountPoints)?e.pendingTradingRewardCampaignAccountPoints.map((function(e){return nM.fromJSON(e)})):[],rewardsOptOutAddresses:Array.isArray(null===e||void 0===e?void 0:e.rewardsOptOutAddresses)?e.rewardsOptOutAddresses.map((function(e){return String(e)})):[],historicalTradeRecords:Array.isArray(null===e||void 0===e?void 0:e.historicalTradeRecords)?e.historicalTradeRecords.map((function(e){return FR.fromJSON(e)})):[],binaryOptionsMarkets:Array.isArray(null===e||void 0===e?void 0:e.binaryOptionsMarkets)?e.binaryOptionsMarkets.map((function(e){return dR.fromJSON(e)})):[],binaryOptionsMarketIdsScheduledForSettlement:Array.isArray(null===e||void 0===e?void 0:e.binaryOptionsMarketIdsScheduledForSettlement)?e.binaryOptionsMarketIdsScheduledForSettlement.map((function(e){return String(e)})):[],spotMarketIdsScheduledToForceClose:Array.isArray(null===e||void 0===e?void 0:e.spotMarketIdsScheduledToForceClose)?e.spotMarketIdsScheduledToForceClose.map((function(e){return String(e)})):[],denomDecimals:Array.isArray(null===e||void 0===e?void 0:e.denomDecimals)?e.denomDecimals.map((function(e){return KR.fromJSON(e)})):[],conditionalDerivativeOrderbooks:Array.isArray(null===e||void 0===e?void 0:e.conditionalDerivativeOrderbooks)?e.conditionalDerivativeOrderbooks.map((function(e){return rM.fromJSON(e)})):[],marketFeeMultipliers:Array.isArray(null===e||void 0===e?void 0:e.marketFeeMultipliers)?e.marketFeeMultipliers.map((function(e){return cR.fromJSON(e)})):[],orderbookSequences:Array.isArray(null===e||void 0===e?void 0:e.orderbookSequences)?e.orderbookSequences.map((function(e){return YR.fromJSON(e)})):[],subaccountVolumes:Array.isArray(null===e||void 0===e?void 0:e.subaccountVolumes)?e.subaccountVolumes.map((function(e){return HR.fromJSON(e)})):[],marketVolumes:Array.isArray(null===e||void 0===e?void 0:e.marketVolumes)?e.marketVolumes.map((function(e){return zR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.params&&(t.params=e.params?sR.toJSON(e.params):void 0),e.spotMarkets?t.spotMarkets=e.spotMarkets.map((function(e){return e?mR.toJSON(e):void 0})):t.spotMarkets=[],e.derivativeMarkets?t.derivativeMarkets=e.derivativeMarkets.map((function(e){return e?uR.toJSON(e):void 0})):t.derivativeMarkets=[],e.spotOrderbook?t.spotOrderbook=e.spotOrderbook.map((function(e){return e?aM.toJSON(e):void 0})):t.spotOrderbook=[],e.derivativeOrderbook?t.derivativeOrderbook=e.derivativeOrderbook.map((function(e){return e?oM.toJSON(e):void 0})):t.derivativeOrderbook=[],e.balances?t.balances=e.balances.map((function(e){return e?iM.toJSON(e):void 0})):t.balances=[],e.positions?t.positions=e.positions.map((function(e){return e?sM.toJSON(e):void 0})):t.positions=[],e.subaccountTradeNonces?t.subaccountTradeNonces=e.subaccountTradeNonces.map((function(e){return e?cM.toJSON(e):void 0})):t.subaccountTradeNonces=[],e.expiryFuturesMarketInfoState?t.expiryFuturesMarketInfoState=e.expiryFuturesMarketInfoState.map((function(e){return e?uM.toJSON(e):void 0})):t.expiryFuturesMarketInfoState=[],e.perpetualMarketInfo?t.perpetualMarketInfo=e.perpetualMarketInfo.map((function(e){return e?fR.toJSON(e):void 0})):t.perpetualMarketInfo=[],e.perpetualMarketFundingState?t.perpetualMarketFundingState=e.perpetualMarketFundingState.map((function(e){return e?lM.toJSON(e):void 0})):t.perpetualMarketFundingState=[],e.derivativeMarketSettlementScheduled?t.derivativeMarketSettlementScheduled=e.derivativeMarketSettlementScheduled.map((function(e){return e?bR.toJSON(e):void 0})):t.derivativeMarketSettlementScheduled=[],void 0!==e.isSpotExchangeEnabled&&(t.isSpotExchangeEnabled=e.isSpotExchangeEnabled),void 0!==e.isDerivativesExchangeEnabled&&(t.isDerivativesExchangeEnabled=e.isDerivativesExchangeEnabled),void 0!==e.tradingRewardCampaignInfo&&(t.tradingRewardCampaignInfo=e.tradingRewardCampaignInfo?_R.toJSON(e.tradingRewardCampaignInfo):void 0),e.tradingRewardPoolCampaignSchedule?t.tradingRewardPoolCampaignSchedule=e.tradingRewardPoolCampaignSchedule.map((function(e){return e?UR.toJSON(e):void 0})):t.tradingRewardPoolCampaignSchedule=[],e.tradingRewardCampaignAccountPoints?t.tradingRewardCampaignAccountPoints=e.tradingRewardCampaignAccountPoints.map((function(e){return e?tM.toJSON(e):void 0})):t.tradingRewardCampaignAccountPoints=[],void 0!==e.feeDiscountSchedule&&(t.feeDiscountSchedule=e.feeDiscountSchedule?DR.toJSON(e.feeDiscountSchedule):void 0),e.feeDiscountAccountTierTtl?t.feeDiscountAccountTierTtl=e.feeDiscountAccountTierTtl.map((function(e){return e?XR.toJSON(e):void 0})):t.feeDiscountAccountTierTtl=[],e.feeDiscountBucketVolumeAccounts?t.feeDiscountBucketVolumeAccounts=e.feeDiscountBucketVolumeAccounts.map((function(e){return e?$R.toJSON(e):void 0})):t.feeDiscountBucketVolumeAccounts=[],void 0!==e.isFirstFeeCycleFinished&&(t.isFirstFeeCycleFinished=e.isFirstFeeCycleFinished),e.pendingTradingRewardPoolCampaignSchedule?t.pendingTradingRewardPoolCampaignSchedule=e.pendingTradingRewardPoolCampaignSchedule.map((function(e){return e?UR.toJSON(e):void 0})):t.pendingTradingRewardPoolCampaignSchedule=[],e.pendingTradingRewardCampaignAccountPoints?t.pendingTradingRewardCampaignAccountPoints=e.pendingTradingRewardCampaignAccountPoints.map((function(e){return e?nM.toJSON(e):void 0})):t.pendingTradingRewardCampaignAccountPoints=[],e.rewardsOptOutAddresses?t.rewardsOptOutAddresses=e.rewardsOptOutAddresses.map((function(e){return e})):t.rewardsOptOutAddresses=[],e.historicalTradeRecords?t.historicalTradeRecords=e.historicalTradeRecords.map((function(e){return e?FR.toJSON(e):void 0})):t.historicalTradeRecords=[],e.binaryOptionsMarkets?t.binaryOptionsMarkets=e.binaryOptionsMarkets.map((function(e){return e?dR.toJSON(e):void 0})):t.binaryOptionsMarkets=[],e.binaryOptionsMarketIdsScheduledForSettlement?t.binaryOptionsMarketIdsScheduledForSettlement=e.binaryOptionsMarketIdsScheduledForSettlement.map((function(e){return e})):t.binaryOptionsMarketIdsScheduledForSettlement=[],e.spotMarketIdsScheduledToForceClose?t.spotMarketIdsScheduledToForceClose=e.spotMarketIdsScheduledToForceClose.map((function(e){return e})):t.spotMarketIdsScheduledToForceClose=[],e.denomDecimals?t.denomDecimals=e.denomDecimals.map((function(e){return e?KR.toJSON(e):void 0})):t.denomDecimals=[],e.conditionalDerivativeOrderbooks?t.conditionalDerivativeOrderbooks=e.conditionalDerivativeOrderbooks.map((function(e){return e?rM.toJSON(e):void 0})):t.conditionalDerivativeOrderbooks=[],e.marketFeeMultipliers?t.marketFeeMultipliers=e.marketFeeMultipliers.map((function(e){return e?cR.toJSON(e):void 0})):t.marketFeeMultipliers=[],e.orderbookSequences?t.orderbookSequences=e.orderbookSequences.map((function(e){return e?YR.toJSON(e):void 0})):t.orderbookSequences=[],e.subaccountVolumes?t.subaccountVolumes=e.subaccountVolumes.map((function(e){return e?HR.toJSON(e):void 0})):t.subaccountVolumes=[],e.marketVolumes?t.marketVolumes=e.marketVolumes.map((function(e){return e?zR.toJSON(e):void 0})):t.marketVolumes=[],t},create:function(e){return JR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i,s,c,u,d,l,f,p,b,m,h,g,y,v,w,k,A,x,I,T,S,C,E,R,M,P,U={params:void 0,spotMarkets:[],derivativeMarkets:[],spotOrderbook:[],derivativeOrderbook:[],balances:[],positions:[],subaccountTradeNonces:[],expiryFuturesMarketInfoState:[],perpetualMarketInfo:[],perpetualMarketFundingState:[],derivativeMarketSettlementScheduled:[],isSpotExchangeEnabled:!1,isDerivativesExchangeEnabled:!1,tradingRewardCampaignInfo:void 0,tradingRewardPoolCampaignSchedule:[],tradingRewardCampaignAccountPoints:[],feeDiscountSchedule:void 0,feeDiscountAccountTierTtl:[],feeDiscountBucketVolumeAccounts:[],isFirstFeeCycleFinished:!1,pendingTradingRewardPoolCampaignSchedule:[],pendingTradingRewardCampaignAccountPoints:[],rewardsOptOutAddresses:[],historicalTradeRecords:[],binaryOptionsMarkets:[],binaryOptionsMarketIdsScheduledForSettlement:[],spotMarketIdsScheduledToForceClose:[],denomDecimals:[],conditionalDerivativeOrderbooks:[],marketFeeMultipliers:[],orderbookSequences:[],subaccountVolumes:[],marketVolumes:[]};return U.params=void 0!==e.params&&null!==e.params?sR.fromPartial(e.params):void 0,U.spotMarkets=(null===(t=e.spotMarkets)||void 0===t?void 0:t.map((function(e){return mR.fromPartial(e)})))||[],U.derivativeMarkets=(null===(n=e.derivativeMarkets)||void 0===n?void 0:n.map((function(e){return uR.fromPartial(e)})))||[],U.spotOrderbook=(null===(a=e.spotOrderbook)||void 0===a?void 0:a.map((function(e){return aM.fromPartial(e)})))||[],U.derivativeOrderbook=(null===(o=e.derivativeOrderbook)||void 0===o?void 0:o.map((function(e){return oM.fromPartial(e)})))||[],U.balances=(null===(r=e.balances)||void 0===r?void 0:r.map((function(e){return iM.fromPartial(e)})))||[],U.positions=(null===(i=e.positions)||void 0===i?void 0:i.map((function(e){return sM.fromPartial(e)})))||[],U.subaccountTradeNonces=(null===(s=e.subaccountTradeNonces)||void 0===s?void 0:s.map((function(e){return cM.fromPartial(e)})))||[],U.expiryFuturesMarketInfoState=(null===(c=e.expiryFuturesMarketInfoState)||void 0===c?void 0:c.map((function(e){return uM.fromPartial(e)})))||[],U.perpetualMarketInfo=(null===(u=e.perpetualMarketInfo)||void 0===u?void 0:u.map((function(e){return fR.fromPartial(e)})))||[],U.perpetualMarketFundingState=(null===(d=e.perpetualMarketFundingState)||void 0===d?void 0:d.map((function(e){return lM.fromPartial(e)})))||[],U.derivativeMarketSettlementScheduled=(null===(l=e.derivativeMarketSettlementScheduled)||void 0===l?void 0:l.map((function(e){return bR.fromPartial(e)})))||[],U.isSpotExchangeEnabled=null!==(f=e.isSpotExchangeEnabled)&&void 0!==f&&f,U.isDerivativesExchangeEnabled=null!==(p=e.isDerivativesExchangeEnabled)&&void 0!==p&&p,U.tradingRewardCampaignInfo=void 0!==e.tradingRewardCampaignInfo&&null!==e.tradingRewardCampaignInfo?_R.fromPartial(e.tradingRewardCampaignInfo):void 0,U.tradingRewardPoolCampaignSchedule=(null===(b=e.tradingRewardPoolCampaignSchedule)||void 0===b?void 0:b.map((function(e){return UR.fromPartial(e)})))||[],U.tradingRewardCampaignAccountPoints=(null===(m=e.tradingRewardCampaignAccountPoints)||void 0===m?void 0:m.map((function(e){return tM.fromPartial(e)})))||[],U.feeDiscountSchedule=void 0!==e.feeDiscountSchedule&&null!==e.feeDiscountSchedule?DR.fromPartial(e.feeDiscountSchedule):void 0,U.feeDiscountAccountTierTtl=(null===(h=e.feeDiscountAccountTierTtl)||void 0===h?void 0:h.map((function(e){return XR.fromPartial(e)})))||[],U.feeDiscountBucketVolumeAccounts=(null===(g=e.feeDiscountBucketVolumeAccounts)||void 0===g?void 0:g.map((function(e){return $R.fromPartial(e)})))||[],U.isFirstFeeCycleFinished=null!==(y=e.isFirstFeeCycleFinished)&&void 0!==y&&y,U.pendingTradingRewardPoolCampaignSchedule=(null===(v=e.pendingTradingRewardPoolCampaignSchedule)||void 0===v?void 0:v.map((function(e){return UR.fromPartial(e)})))||[],U.pendingTradingRewardCampaignAccountPoints=(null===(w=e.pendingTradingRewardCampaignAccountPoints)||void 0===w?void 0:w.map((function(e){return nM.fromPartial(e)})))||[],U.rewardsOptOutAddresses=(null===(k=e.rewardsOptOutAddresses)||void 0===k?void 0:k.map((function(e){return e})))||[],U.historicalTradeRecords=(null===(A=e.historicalTradeRecords)||void 0===A?void 0:A.map((function(e){return FR.fromPartial(e)})))||[],U.binaryOptionsMarkets=(null===(x=e.binaryOptionsMarkets)||void 0===x?void 0:x.map((function(e){return dR.fromPartial(e)})))||[],U.binaryOptionsMarketIdsScheduledForSettlement=(null===(I=e.binaryOptionsMarketIdsScheduledForSettlement)||void 0===I?void 0:I.map((function(e){return e})))||[],U.spotMarketIdsScheduledToForceClose=(null===(T=e.spotMarketIdsScheduledToForceClose)||void 0===T?void 0:T.map((function(e){return e})))||[],U.denomDecimals=(null===(S=e.denomDecimals)||void 0===S?void 0:S.map((function(e){return KR.fromPartial(e)})))||[],U.conditionalDerivativeOrderbooks=(null===(C=e.conditionalDerivativeOrderbooks)||void 0===C?void 0:C.map((function(e){return rM.fromPartial(e)})))||[],U.marketFeeMultipliers=(null===(E=e.marketFeeMultipliers)||void 0===E?void 0:E.map((function(e){return cR.fromPartial(e)})))||[],U.orderbookSequences=(null===(R=e.orderbookSequences)||void 0===R?void 0:R.map((function(e){return YR.fromPartial(e)})))||[],U.subaccountVolumes=(null===(M=e.subaccountVolumes)||void 0===M?void 0:M.map((function(e){return HR.fromPartial(e)})))||[],U.marketVolumes=(null===(P=e.marketVolumes)||void 0===P?void 0:P.map((function(e){return zR.fromPartial(e)})))||[],U}};var YR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return"0"!==e.sequence&&t.uint32(8).uint64(e.sequence),""!==e.marketId&&t.uint32(18).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={sequence:"0",marketId:""};n.pos>>3){case 1:o.sequence=fM(n.uint64());break;case 2:o.marketId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{sequence:pM(e.sequence)?String(e.sequence):"0",marketId:pM(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.sequence&&(t.sequence=e.sequence),void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return YR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={sequence:"0",marketId:""};return a.sequence=null!==(t=e.sequence)&&void 0!==t?t:"0",a.marketId=null!==(n=e.marketId)&&void 0!==n?n:"",a}};var XR={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.account&&t.uint32(10).string(e.account),void 0!==e.tierTtl&&NR.encode(e.tierTtl,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={account:"",tierTtl:void 0};n.pos>>3){case 1:o.account=n.string();break;case 2:o.tierTtl=NR.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{account:pM(e.account)?String(e.account):"",tierTtl:pM(e.tierTtl)?NR.fromJSON(e.tierTtl):void 0}},toJSON:function(e){var t={};return void 0!==e.account&&(t.account=e.account),void 0!==e.tierTtl&&(t.tierTtl=e.tierTtl?NR.toJSON(e.tierTtl):void 0),t},create:function(e){return XR.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={account:"",tierTtl:void 0};return n.account=null!==(t=e.account)&&void 0!==t?t:"",n.tierTtl=void 0!==e.tierTtl&&null!==e.tierTtl?NR.fromPartial(e.tierTtl):void 0,n}};var $R={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();"0"!==e.bucketStartTimestamp&&t.uint32(8).int64(e.bucketStartTimestamp);var n,a=(0,jr.Z)(e.accountVolume);try{for(a.s();!(n=a.n()).done;){var o=n.value;eM.encode(o,t.uint32(18).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={bucketStartTimestamp:"0",accountVolume:[]};n.pos>>3){case 1:o.bucketStartTimestamp=fM(n.int64());break;case 2:o.accountVolume.push(eM.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{bucketStartTimestamp:pM(e.bucketStartTimestamp)?String(e.bucketStartTimestamp):"0",accountVolume:Array.isArray(null===e||void 0===e?void 0:e.accountVolume)?e.accountVolume.map((function(e){return eM.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.bucketStartTimestamp&&(t.bucketStartTimestamp=e.bucketStartTimestamp),e.accountVolume?t.accountVolume=e.accountVolume.map((function(e){return e?eM.toJSON(e):void 0})):t.accountVolume=[],t},create:function(e){return $R.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={bucketStartTimestamp:"0",accountVolume:[]};return a.bucketStartTimestamp=null!==(t=e.bucketStartTimestamp)&&void 0!==t?t:"0",a.accountVolume=(null===(n=e.accountVolume)||void 0===n?void 0:n.map((function(e){return eM.fromPartial(e)})))||[],a}};var eM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.account&&t.uint32(10).string(e.account),""!==e.volume&&t.uint32(18).string(e.volume),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={account:"",volume:""};n.pos>>3){case 1:o.account=n.string();break;case 2:o.volume=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{account:pM(e.account)?String(e.account):"",volume:pM(e.volume)?String(e.volume):""}},toJSON:function(e){var t={};return void 0!==e.account&&(t.account=e.account),void 0!==e.volume&&(t.volume=e.volume),t},create:function(e){return eM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={account:"",volume:""};return a.account=null!==(t=e.account)&&void 0!==t?t:"",a.volume=null!==(n=e.volume)&&void 0!==n?n:"",a}};var tM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.account&&t.uint32(10).string(e.account),""!==e.points&&t.uint32(18).string(e.points),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={account:"",points:""};n.pos>>3){case 1:o.account=n.string();break;case 2:o.points=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{account:pM(e.account)?String(e.account):"",points:pM(e.points)?String(e.points):""}},toJSON:function(e){var t={};return void 0!==e.account&&(t.account=e.account),void 0!==e.points&&(t.points=e.points),t},create:function(e){return tM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={account:"",points:""};return a.account=null!==(t=e.account)&&void 0!==t?t:"",a.points=null!==(n=e.points)&&void 0!==n?n:"",a}};var nM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();"0"!==e.rewardPoolStartTimestamp&&t.uint32(8).int64(e.rewardPoolStartTimestamp);var n,a=(0,jr.Z)(e.accountPoints);try{for(a.s();!(n=a.n()).done;){var o=n.value;tM.encode(o,t.uint32(18).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={rewardPoolStartTimestamp:"0",accountPoints:[]};n.pos>>3){case 1:o.rewardPoolStartTimestamp=fM(n.int64());break;case 2:o.accountPoints.push(tM.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{rewardPoolStartTimestamp:pM(e.rewardPoolStartTimestamp)?String(e.rewardPoolStartTimestamp):"0",accountPoints:Array.isArray(null===e||void 0===e?void 0:e.accountPoints)?e.accountPoints.map((function(e){return tM.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.rewardPoolStartTimestamp&&(t.rewardPoolStartTimestamp=e.rewardPoolStartTimestamp),e.accountPoints?t.accountPoints=e.accountPoints.map((function(e){return e?tM.toJSON(e):void 0})):t.accountPoints=[],t},create:function(e){return nM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={rewardPoolStartTimestamp:"0",accountPoints:[]};return a.rewardPoolStartTimestamp=null!==(t=e.rewardPoolStartTimestamp)&&void 0!==t?t:"0",a.accountPoints=(null===(n=e.accountPoints)||void 0===n?void 0:n.map((function(e){return tM.fromPartial(e)})))||[],a}};var aM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();""!==e.marketId&&t.uint32(10).string(e.marketId),!0===e.isBuySide&&t.uint32(16).bool(e.isBuySide);var n,a=(0,jr.Z)(e.orders);try{for(a.s();!(n=a.n()).done;){var o=n.value;wR.encode(o,t.uint32(26).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",isBuySide:!1,orders:[]};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.isBuySide=n.bool();break;case 3:o.orders.push(wR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:pM(e.marketId)?String(e.marketId):"",isBuySide:!!pM(e.isBuySide)&&Boolean(e.isBuySide),orders:Array.isArray(null===e||void 0===e?void 0:e.orders)?e.orders.map((function(e){return wR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.isBuySide&&(t.isBuySide=e.isBuySide),e.orders?t.orders=e.orders.map((function(e){return e?wR.toJSON(e):void 0})):t.orders=[],t},create:function(e){return aM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o={marketId:"",isBuySide:!1,orders:[]};return o.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",o.isBuySide=null!==(n=e.isBuySide)&&void 0!==n&&n,o.orders=(null===(a=e.orders)||void 0===a?void 0:a.map((function(e){return wR.fromPartial(e)})))||[],o}};var oM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();""!==e.marketId&&t.uint32(10).string(e.marketId),!0===e.isBuySide&&t.uint32(16).bool(e.isBuySide);var n,a=(0,jr.Z)(e.orders);try{for(a.s();!(n=a.n()).done;){var o=n.value;SR.encode(o,t.uint32(26).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",isBuySide:!1,orders:[]};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.isBuySide=n.bool();break;case 3:o.orders.push(SR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:pM(e.marketId)?String(e.marketId):"",isBuySide:!!pM(e.isBuySide)&&Boolean(e.isBuySide),orders:Array.isArray(null===e||void 0===e?void 0:e.orders)?e.orders.map((function(e){return SR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.isBuySide&&(t.isBuySide=e.isBuySide),e.orders?t.orders=e.orders.map((function(e){return e?SR.toJSON(e):void 0})):t.orders=[],t},create:function(e){return oM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o={marketId:"",isBuySide:!1,orders:[]};return o.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",o.isBuySide=null!==(n=e.isBuySide)&&void 0!==n&&n,o.orders=(null===(a=e.orders)||void 0===a?void 0:a.map((function(e){return SR.fromPartial(e)})))||[],o}};var rM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();""!==e.marketId&&t.uint32(10).string(e.marketId);var n,a=(0,jr.Z)(e.limitBuyOrders);try{for(a.s();!(n=a.n()).done;){var o=n.value;SR.encode(o,t.uint32(18).fork()).ldelim()}}catch(b){a.e(b)}finally{a.f()}var r,i=(0,jr.Z)(e.marketBuyOrders);try{for(i.s();!(r=i.n()).done;){var s=r.value;ER.encode(s,t.uint32(26).fork()).ldelim()}}catch(b){i.e(b)}finally{i.f()}var c,u=(0,jr.Z)(e.limitSellOrders);try{for(u.s();!(c=u.n()).done;){var d=c.value;SR.encode(d,t.uint32(34).fork()).ldelim()}}catch(b){u.e(b)}finally{u.f()}var l,f=(0,jr.Z)(e.marketSellOrders);try{for(f.s();!(l=f.n()).done;){var p=l.value;ER.encode(p,t.uint32(42).fork()).ldelim()}}catch(b){f.e(b)}finally{f.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",limitBuyOrders:[],marketBuyOrders:[],limitSellOrders:[],marketSellOrders:[]};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.limitBuyOrders.push(SR.decode(n,n.uint32()));break;case 3:o.marketBuyOrders.push(ER.decode(n,n.uint32()));break;case 4:o.limitSellOrders.push(SR.decode(n,n.uint32()));break;case 5:o.marketSellOrders.push(ER.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:pM(e.marketId)?String(e.marketId):"",limitBuyOrders:Array.isArray(null===e||void 0===e?void 0:e.limitBuyOrders)?e.limitBuyOrders.map((function(e){return SR.fromJSON(e)})):[],marketBuyOrders:Array.isArray(null===e||void 0===e?void 0:e.marketBuyOrders)?e.marketBuyOrders.map((function(e){return ER.fromJSON(e)})):[],limitSellOrders:Array.isArray(null===e||void 0===e?void 0:e.limitSellOrders)?e.limitSellOrders.map((function(e){return SR.fromJSON(e)})):[],marketSellOrders:Array.isArray(null===e||void 0===e?void 0:e.marketSellOrders)?e.marketSellOrders.map((function(e){return ER.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),e.limitBuyOrders?t.limitBuyOrders=e.limitBuyOrders.map((function(e){return e?SR.toJSON(e):void 0})):t.limitBuyOrders=[],e.marketBuyOrders?t.marketBuyOrders=e.marketBuyOrders.map((function(e){return e?ER.toJSON(e):void 0})):t.marketBuyOrders=[],e.limitSellOrders?t.limitSellOrders=e.limitSellOrders.map((function(e){return e?SR.toJSON(e):void 0})):t.limitSellOrders=[],e.marketSellOrders?t.marketSellOrders=e.marketSellOrders.map((function(e){return e?ER.toJSON(e):void 0})):t.marketSellOrders=[],t},create:function(e){return rM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i={marketId:"",limitBuyOrders:[],marketBuyOrders:[],limitSellOrders:[],marketSellOrders:[]};return i.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",i.limitBuyOrders=(null===(n=e.limitBuyOrders)||void 0===n?void 0:n.map((function(e){return SR.fromPartial(e)})))||[],i.marketBuyOrders=(null===(a=e.marketBuyOrders)||void 0===a?void 0:a.map((function(e){return ER.fromPartial(e)})))||[],i.limitSellOrders=(null===(o=e.limitSellOrders)||void 0===o?void 0:o.map((function(e){return SR.fromPartial(e)})))||[],i.marketSellOrders=(null===(r=e.marketSellOrders)||void 0===r?void 0:r.map((function(e){return ER.fromPartial(e)})))||[],i}};var iM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),""!==e.denom&&t.uint32(18).string(e.denom),void 0!==e.deposits&&hR.encode(e.deposits,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",denom:"",deposits:void 0};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.denom=n.string();break;case 3:o.deposits=hR.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:pM(e.subaccountId)?String(e.subaccountId):"",denom:pM(e.denom)?String(e.denom):"",deposits:pM(e.deposits)?hR.fromJSON(e.deposits):void 0}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.denom&&(t.denom=e.denom),void 0!==e.deposits&&(t.deposits=e.deposits?hR.toJSON(e.deposits):void 0),t},create:function(e){return iM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={subaccountId:"",denom:"",deposits:void 0};return a.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",a.denom=null!==(n=e.denom)&&void 0!==n?n:"",a.deposits=void 0!==e.deposits&&null!==e.deposits?hR.fromPartial(e.deposits):void 0,a}};var sM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),""!==e.marketId&&t.uint32(18).string(e.marketId),void 0!==e.position&&RR.encode(e.position,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",marketId:"",position:void 0};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.marketId=n.string();break;case 3:o.position=RR.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:pM(e.subaccountId)?String(e.subaccountId):"",marketId:pM(e.marketId)?String(e.marketId):"",position:pM(e.position)?RR.fromJSON(e.position):void 0}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.position&&(t.position=e.position?RR.toJSON(e.position):void 0),t},create:function(e){return sM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={subaccountId:"",marketId:"",position:void 0};return a.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",a.marketId=null!==(n=e.marketId)&&void 0!==n?n:"",a.position=void 0!==e.position&&null!==e.position?RR.fromPartial(e.position):void 0,a}};var cM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),void 0!==e.subaccountTradeNonce&&gR.encode(e.subaccountTradeNonce,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",subaccountTradeNonce:void 0};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.subaccountTradeNonce=gR.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:pM(e.subaccountId)?String(e.subaccountId):"",subaccountTradeNonce:pM(e.subaccountTradeNonce)?gR.fromJSON(e.subaccountTradeNonce):void 0}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.subaccountTradeNonce&&(t.subaccountTradeNonce=e.subaccountTradeNonce?gR.toJSON(e.subaccountTradeNonce):void 0),t},create:function(e){return cM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={subaccountId:"",subaccountTradeNonce:void 0};return n.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",n.subaccountTradeNonce=void 0!==e.subaccountTradeNonce&&null!==e.subaccountTradeNonce?gR.fromPartial(e.subaccountTradeNonce):void 0,n}};var uM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),void 0!==e.marketInfo&&lR.encode(e.marketInfo,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",marketInfo:void 0};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.marketInfo=lR.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:pM(e.marketId)?String(e.marketId):"",marketInfo:pM(e.marketInfo)?lR.fromJSON(e.marketInfo):void 0}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.marketInfo&&(t.marketInfo=e.marketInfo?lR.toJSON(e.marketInfo):void 0),t},create:function(e){return uM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:"",marketInfo:void 0};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n.marketInfo=void 0!==e.marketInfo&&null!==e.marketInfo?lR.fromPartial(e.marketInfo):void 0,n}};var dM,lM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),void 0!==e.funding&&pR.encode(e.funding,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",funding:void 0};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.funding=pR.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:pM(e.marketId)?String(e.marketId):"",funding:pM(e.funding)?pR.fromJSON(e.funding):void 0}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.funding&&(t.funding=e.funding?pR.toJSON(e.funding):void 0),t},create:function(e){return lM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:"",funding:void 0};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n.funding=void 0!==e.funding&&null!==e.funding?pR.fromPartial(e.funding):void 0,n}};function fM(e){return e.toString()}function pM(e){return null!==e&&void 0!==e}function bM(e){switch(e){case 0:case"UnspecifiedOrder":return dM.UnspecifiedOrder;case 1:case"FromWorstToBest":return dM.FromWorstToBest;case 2:case"FromBestToWorst":return dM.FromBestToWorst;default:return dM.UNRECOGNIZED}}function mM(e){switch(e){case dM.UnspecifiedOrder:return"UnspecifiedOrder";case dM.FromWorstToBest:return"FromWorstToBest";case dM.FromBestToWorst:return"FromBestToWorst";case dM.UNRECOGNIZED:default:return"UNRECOGNIZED"}}yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure()),function(e){e[e.UnspecifiedOrder=0]="UnspecifiedOrder",e[e.FromWorstToBest=1]="FromWorstToBest",e[e.FromBestToWorst=2]="FromBestToWorst",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(dM||(dM={}));var hM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.trader&&t.uint32(10).string(e.trader),0!==e.subaccountNonce&&t.uint32(16).uint32(e.subaccountNonce),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={trader:"",subaccountNonce:0};n.pos>>3){case 1:o.trader=n.string();break;case 2:o.subaccountNonce=n.uint32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{trader:E_(e.trader)?String(e.trader):"",subaccountNonce:E_(e.subaccountNonce)?Number(e.subaccountNonce):0}},toJSON:function(e){var t={};return void 0!==e.trader&&(t.trader=e.trader),void 0!==e.subaccountNonce&&(t.subaccountNonce=Math.round(e.subaccountNonce)),t},create:function(e){return hM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={trader:"",subaccountNonce:0};return a.trader=null!==(t=e.trader)&&void 0!==t?t:"",a.subaccountNonce=null!==(n=e.subaccountNonce)&&void 0!==n?n:0,a}};var gM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),""!==e.marketId&&t.uint32(18).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",marketId:""};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.marketId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return gM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={subaccountId:"",marketId:""};return a.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",a.marketId=null!==(n=e.marketId)&&void 0!==n?n:"",a}};var yM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.buyOrders);try{for(a.s();!(t=a.n()).done;){var o=t.value;IR.encode(o,n.uint32(10).fork()).ldelim()}}catch(c){a.e(c)}finally{a.f()}var r,i=(0,jr.Z)(e.sellOrders);try{for(i.s();!(r=i.n()).done;){var s=r.value;IR.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){i.e(c)}finally{i.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={buyOrders:[],sellOrders:[]};n.pos>>3){case 1:o.buyOrders.push(IR.decode(n,n.uint32()));break;case 2:o.sellOrders.push(IR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{buyOrders:Array.isArray(null===e||void 0===e?void 0:e.buyOrders)?e.buyOrders.map((function(e){return IR.fromJSON(e)})):[],sellOrders:Array.isArray(null===e||void 0===e?void 0:e.sellOrders)?e.sellOrders.map((function(e){return IR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.buyOrders?t.buyOrders=e.buyOrders.map((function(e){return e?IR.toJSON(e):void 0})):t.buyOrders=[],e.sellOrders?t.sellOrders=e.sellOrders.map((function(e){return e?IR.toJSON(e):void 0})):t.sellOrders=[],t},create:function(e){return yM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={buyOrders:[],sellOrders:[]};return a.buyOrders=(null===(t=e.buyOrders)||void 0===t?void 0:t.map((function(e){return IR.fromPartial(e)})))||[],a.sellOrders=(null===(n=e.sellOrders)||void 0===n?void 0:n.map((function(e){return IR.fromPartial(e)})))||[],a}};var vM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.metadata&&kR.encode(e.metadata,t.uint32(10).fork()).ldelim(),""!==e.marketId&&t.uint32(18).string(e.marketId),!0===e.isBuy&&t.uint32(24).bool(e.isBuy),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={metadata:void 0,marketId:"",isBuy:!1};n.pos>>3){case 1:o.metadata=kR.decode(n,n.uint32());break;case 2:o.marketId=n.string();break;case 3:o.isBuy=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{metadata:E_(e.metadata)?kR.fromJSON(e.metadata):void 0,marketId:E_(e.marketId)?String(e.marketId):"",isBuy:!!E_(e.isBuy)&&Boolean(e.isBuy)}},toJSON:function(e){var t={};return void 0!==e.metadata&&(t.metadata=e.metadata?kR.toJSON(e.metadata):void 0),void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.isBuy&&(t.isBuy=e.isBuy),t},create:function(e){return vM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={metadata:void 0,marketId:"",isBuy:!1};return a.metadata=void 0!==e.metadata&&null!==e.metadata?kR.fromPartial(e.metadata):void 0,a.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",a.isBuy=null!==(n=e.isBuy)&&void 0!==n&&n,a}};var wM={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create()},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.params&&sR.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={params:void 0};n.pos>>3===1)o.params=sR.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{params:E_(e.params)?sR.fromJSON(e.params):void 0}},toJSON:function(e){var t={};return void 0!==e.params&&(t.params=e.params?sR.toJSON(e.params):void 0),t},create:function(e){return kM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={params:void 0};return t.params=void 0!==e.params&&null!==e.params?sR.fromPartial(e.params):void 0,t}};var AM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),void 0!==e.subaccount&&hM.encode(e.subaccount,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",subaccount:void 0};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.subaccount=hM.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",subaccount:E_(e.subaccount)?hM.fromJSON(e.subaccount):void 0}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.subaccount&&(t.subaccount=e.subaccount?hM.toJSON(e.subaccount):void 0),t},create:function(e){return AM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={subaccountId:"",subaccount:void 0};return n.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",n.subaccount=void 0!==e.subaccount&&null!==e.subaccount?hM.fromPartial(e.subaccount):void 0,n}};var xM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return Object.entries(e.deposits).forEach((function(e){var n=(0,Nr.Z)(e,2),a=n[0],o=n[1];IM.encode({key:a,value:o},t.uint32(10).fork()).ldelim()})),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={deposits:{}};n.pos>>3===1){var i=IM.decode(n,n.uint32());void 0!==i.value&&(o.deposits[i.key]=i.value)}else n.skipType(7&r)}return o},fromJSON:function(e){return{deposits:(t=e.deposits,"object"===typeof t&&null!==t?Object.entries(e.deposits).reduce((function(e,t){var n=(0,Nr.Z)(t,2),a=n[0],o=n[1];return e[a]=hR.fromJSON(o),e}),{}):{})};var t},toJSON:function(e){var t={deposits:{}};return e.deposits&&Object.entries(e.deposits).forEach((function(e){var n=(0,Nr.Z)(e,2),a=n[0],o=n[1];t.deposits[a]=hR.toJSON(o)})),t},create:function(e){return xM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={deposits:{}};return n.deposits=Object.entries(null!==(t=e.deposits)&&void 0!==t?t:{}).reduce((function(e,t){var n=(0,Nr.Z)(t,2),a=n[0],o=n[1];return void 0!==o&&(e[a]=hR.fromPartial(o)),e}),{}),n}};var IM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.key&&t.uint32(10).string(e.key),void 0!==e.value&&hR.encode(e.value,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={key:"",value:void 0};n.pos>>3){case 1:o.key=n.string();break;case 2:o.value=hR.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{key:E_(e.key)?String(e.key):"",value:E_(e.value)?hR.fromJSON(e.value):void 0}},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=e.value?hR.toJSON(e.value):void 0),t},create:function(e){return IM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={key:"",value:void 0};return n.key=null!==(t=e.key)&&void 0!==t?t:"",n.value=void 0!==e.value&&null!==e.value?hR.fromPartial(e.value):void 0,n}};var TM={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create()},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.balances);try{for(a.s();!(t=a.n()).done;){var o=t.value;iM.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={balances:[]};n.pos>>3===1)o.balances.push(iM.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{balances:Array.isArray(null===e||void 0===e?void 0:e.balances)?e.balances.map((function(e){return iM.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.balances?t.balances=e.balances.map((function(e){return e?iM.toJSON(e):void 0})):t.balances=[],t},create:function(e){return SM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={balances:[]};return n.balances=(null===(t=e.balances)||void 0===t?void 0:t.map((function(e){return iM.fromPartial(e)})))||[],n}};var CM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.account&&t.uint32(10).string(e.account),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={account:""};n.pos>>3===1)o.account=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{account:E_(e.account)?String(e.account):""}},toJSON:function(e){var t={};return void 0!==e.account&&(t.account=e.account),t},create:function(e){return CM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={account:""};return n.account=null!==(t=e.account)&&void 0!==t?t:"",n}};var EM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.aggregateVolumes);try{for(a.s();!(t=a.n()).done;){var o=t.value;zR.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={aggregateVolumes:[]};n.pos>>3===1)o.aggregateVolumes.push(zR.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{aggregateVolumes:Array.isArray(null===e||void 0===e?void 0:e.aggregateVolumes)?e.aggregateVolumes.map((function(e){return zR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.aggregateVolumes?t.aggregateVolumes=e.aggregateVolumes.map((function(e){return e?zR.toJSON(e):void 0})):t.aggregateVolumes=[],t},create:function(e){return EM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={aggregateVolumes:[]};return n.aggregateVolumes=(null===(t=e.aggregateVolumes)||void 0===t?void 0:t.map((function(e){return zR.fromPartial(e)})))||[],n}};var RM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.accounts);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(c){a.e(c)}finally{a.f()}var r,i=(0,jr.Z)(e.marketIds);try{for(i.s();!(r=i.n()).done;){var s=r.value;n.uint32(18).string(s)}}catch(c){i.e(c)}finally{i.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={accounts:[],marketIds:[]};n.pos>>3){case 1:o.accounts.push(n.string());break;case 2:o.marketIds.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{accounts:Array.isArray(null===e||void 0===e?void 0:e.accounts)?e.accounts.map((function(e){return String(e)})):[],marketIds:Array.isArray(null===e||void 0===e?void 0:e.marketIds)?e.marketIds.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return e.accounts?t.accounts=e.accounts.map((function(e){return e})):t.accounts=[],e.marketIds?t.marketIds=e.marketIds.map((function(e){return e})):t.marketIds=[],t},create:function(e){return RM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={accounts:[],marketIds:[]};return a.accounts=(null===(t=e.accounts)||void 0===t?void 0:t.map((function(e){return e})))||[],a.marketIds=(null===(n=e.marketIds)||void 0===n?void 0:n.map((function(e){return e})))||[],a}};var MM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.aggregateAccountVolumes);try{for(a.s();!(t=a.n()).done;){var o=t.value;GR.encode(o,n.uint32(10).fork()).ldelim()}}catch(c){a.e(c)}finally{a.f()}var r,i=(0,jr.Z)(e.aggregateMarketVolumes);try{for(i.s();!(r=i.n()).done;){var s=r.value;zR.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){i.e(c)}finally{i.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={aggregateAccountVolumes:[],aggregateMarketVolumes:[]};n.pos>>3){case 1:o.aggregateAccountVolumes.push(GR.decode(n,n.uint32()));break;case 2:o.aggregateMarketVolumes.push(zR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{aggregateAccountVolumes:Array.isArray(null===e||void 0===e?void 0:e.aggregateAccountVolumes)?e.aggregateAccountVolumes.map((function(e){return GR.fromJSON(e)})):[],aggregateMarketVolumes:Array.isArray(null===e||void 0===e?void 0:e.aggregateMarketVolumes)?e.aggregateMarketVolumes.map((function(e){return zR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.aggregateAccountVolumes?t.aggregateAccountVolumes=e.aggregateAccountVolumes.map((function(e){return e?GR.toJSON(e):void 0})):t.aggregateAccountVolumes=[],e.aggregateMarketVolumes?t.aggregateMarketVolumes=e.aggregateMarketVolumes.map((function(e){return e?zR.toJSON(e):void 0})):t.aggregateMarketVolumes=[],t},create:function(e){return MM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={aggregateAccountVolumes:[],aggregateMarketVolumes:[]};return a.aggregateAccountVolumes=(null===(t=e.aggregateAccountVolumes)||void 0===t?void 0:t.map((function(e){return GR.fromPartial(e)})))||[],a.aggregateMarketVolumes=(null===(n=e.aggregateMarketVolumes)||void 0===n?void 0:n.map((function(e){return zR.fromPartial(e)})))||[],a}};var PM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return PM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var UM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.volume&&OR.encode(e.volume,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={volume:void 0};n.pos>>3===1)o.volume=OR.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{volume:E_(e.volume)?OR.fromJSON(e.volume):void 0}},toJSON:function(e){var t={};return void 0!==e.volume&&(t.volume=e.volume?OR.toJSON(e.volume):void 0),t},create:function(e){return UM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={volume:void 0};return t.volume=void 0!==e.volume&&null!==e.volume?OR.fromPartial(e.volume):void 0,t}};var _M={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={denom:""};n.pos>>3===1)o.denom=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{denom:E_(e.denom)?String(e.denom):""}},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),t},create:function(e){return _M.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={denom:""};return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n}};var BM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return"0"!==e.decimal&&t.uint32(8).uint64(e.decimal),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={decimal:"0"};n.pos>>3===1)o.decimal=C_(n.uint64());else n.skipType(7&r)}return o},fromJSON:function(e){return{decimal:E_(e.decimal)?String(e.decimal):"0"}},toJSON:function(e){var t={};return void 0!==e.decimal&&(t.decimal=e.decimal),t},create:function(e){return BM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={decimal:"0"};return n.decimal=null!==(t=e.decimal)&&void 0!==t?t:"0",n}};var DM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.denoms);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={denoms:[]};n.pos>>3===1)o.denoms.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){return{denoms:Array.isArray(null===e||void 0===e?void 0:e.denoms)?e.denoms.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return e.denoms?t.denoms=e.denoms.map((function(e){return e})):t.denoms=[],t},create:function(e){return DM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={denoms:[]};return n.denoms=(null===(t=e.denoms)||void 0===t?void 0:t.map((function(e){return e})))||[],n}};var NM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.denomDecimals);try{for(a.s();!(t=a.n()).done;){var o=t.value;KR.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={denomDecimals:[]};n.pos>>3===1)o.denomDecimals.push(KR.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{denomDecimals:Array.isArray(null===e||void 0===e?void 0:e.denomDecimals)?e.denomDecimals.map((function(e){return KR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.denomDecimals?t.denomDecimals=e.denomDecimals.map((function(e){return e?KR.toJSON(e):void 0})):t.denomDecimals=[],t},create:function(e){return NM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={denomDecimals:[]};return n.denomDecimals=(null===(t=e.denomDecimals)||void 0===t?void 0:t.map((function(e){return KR.fromPartial(e)})))||[],n}};var OM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.marketIds);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketIds:[]};n.pos>>3===1)o.marketIds.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){return{marketIds:Array.isArray(null===e||void 0===e?void 0:e.marketIds)?e.marketIds.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return e.marketIds?t.marketIds=e.marketIds.map((function(e){return e})):t.marketIds=[],t},create:function(e){return OM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketIds:[]};return n.marketIds=(null===(t=e.marketIds)||void 0===t?void 0:t.map((function(e){return e})))||[],n}};var FM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.volumes);try{for(a.s();!(t=a.n()).done;){var o=t.value;zR.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={volumes:[]};n.pos>>3===1)o.volumes.push(zR.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{volumes:Array.isArray(null===e||void 0===e?void 0:e.volumes)?e.volumes.map((function(e){return zR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.volumes?t.volumes=e.volumes.map((function(e){return e?zR.toJSON(e):void 0})):t.volumes=[],t},create:function(e){return FM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={volumes:[]};return n.volumes=(null===(t=e.volumes)||void 0===t?void 0:t.map((function(e){return zR.fromPartial(e)})))||[],n}};var LM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),""!==e.denom&&t.uint32(18).string(e.denom),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",denom:""};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.denom=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",denom:E_(e.denom)?String(e.denom):""}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.denom&&(t.denom=e.denom),t},create:function(e){return LM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={subaccountId:"",denom:""};return a.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",a.denom=null!==(n=e.denom)&&void 0!==n?n:"",a}};var jM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.deposits&&hR.encode(e.deposits,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={deposits:void 0};n.pos>>3===1)o.deposits=hR.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{deposits:E_(e.deposits)?hR.fromJSON(e.deposits):void 0}},toJSON:function(e){var t={};return void 0!==e.deposits&&(t.deposits=e.deposits?hR.toJSON(e.deposits):void 0),t},create:function(e){return jM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={deposits:void 0};return t.deposits=void 0!==e.deposits&&null!==e.deposits?hR.fromPartial(e.deposits):void 0,t}};var HM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.status&&t.uint32(10).string(e.status),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={status:""};n.pos>>3===1)o.status=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{status:E_(e.status)?String(e.status):""}},toJSON:function(e){var t={};return void 0!==e.status&&(t.status=e.status),t},create:function(e){return HM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={status:""};return n.status=null!==(t=e.status)&&void 0!==t?t:"",n}};var GM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.markets);try{for(a.s();!(t=a.n()).done;){var o=t.value;mR.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={markets:[]};n.pos>>3===1)o.markets.push(mR.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{markets:Array.isArray(null===e||void 0===e?void 0:e.markets)?e.markets.map((function(e){return mR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.markets?t.markets=e.markets.map((function(e){return e?mR.toJSON(e):void 0})):t.markets=[],t},create:function(e){return GM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={markets:[]};return n.markets=(null===(t=e.markets)||void 0===t?void 0:t.map((function(e){return mR.fromPartial(e)})))||[],n}};var zM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return zM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var KM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.market&&mR.encode(e.market,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={market:void 0};n.pos>>3===1)o.market=mR.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{market:E_(e.market)?mR.fromJSON(e.market):void 0}},toJSON:function(e){var t={};return void 0!==e.market&&(t.market=e.market?mR.toJSON(e.market):void 0),t},create:function(e){return KM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={market:void 0};return t.market=void 0!==e.market&&null!==e.market?mR.fromPartial(e.market):void 0,t}};var WM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),"0"!==e.limit&&t.uint32(16).uint64(e.limit),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",limit:"0"};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.limit=C_(n.uint64());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):"",limit:E_(e.limit)?String(e.limit):"0"}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.limit&&(t.limit=e.limit),t},create:function(e){return WM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={marketId:"",limit:"0"};return a.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",a.limit=null!==(n=e.limit)&&void 0!==n?n:"0",a}};var ZM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.buysPriceLevel);try{for(a.s();!(t=a.n()).done;){var o=t.value;jR.encode(o,n.uint32(10).fork()).ldelim()}}catch(c){a.e(c)}finally{a.f()}var r,i=(0,jr.Z)(e.sellsPriceLevel);try{for(i.s();!(r=i.n()).done;){var s=r.value;jR.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){i.e(c)}finally{i.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={buysPriceLevel:[],sellsPriceLevel:[]};n.pos>>3){case 1:o.buysPriceLevel.push(jR.decode(n,n.uint32()));break;case 2:o.sellsPriceLevel.push(jR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{buysPriceLevel:Array.isArray(null===e||void 0===e?void 0:e.buysPriceLevel)?e.buysPriceLevel.map((function(e){return jR.fromJSON(e)})):[],sellsPriceLevel:Array.isArray(null===e||void 0===e?void 0:e.sellsPriceLevel)?e.sellsPriceLevel.map((function(e){return jR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.buysPriceLevel?t.buysPriceLevel=e.buysPriceLevel.map((function(e){return e?jR.toJSON(e):void 0})):t.buysPriceLevel=[],e.sellsPriceLevel?t.sellsPriceLevel=e.sellsPriceLevel.map((function(e){return e?jR.toJSON(e):void 0})):t.sellsPriceLevel=[],t},create:function(e){return ZM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={buysPriceLevel:[],sellsPriceLevel:[]};return a.buysPriceLevel=(null===(t=e.buysPriceLevel)||void 0===t?void 0:t.map((function(e){return jR.fromPartial(e)})))||[],a.sellsPriceLevel=(null===(n=e.sellsPriceLevel)||void 0===n?void 0:n.map((function(e){return jR.fromPartial(e)})))||[],a}};var VM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();""!==e.marketId&&t.uint32(10).string(e.marketId),""!==e.subaccountId&&t.uint32(18).string(e.subaccountId);var n,a=(0,jr.Z)(e.orderHashes);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.uint32(26).string(o)}}catch(r){a.e(r)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",subaccountId:"",orderHashes:[]};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.subaccountId=n.string();break;case 3:o.orderHashes.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):"",subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",orderHashes:Array.isArray(null===e||void 0===e?void 0:e.orderHashes)?e.orderHashes.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),e.orderHashes?t.orderHashes=e.orderHashes.map((function(e){return e})):t.orderHashes=[],t},create:function(e){return VM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o={marketId:"",subaccountId:"",orderHashes:[]};return o.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",o.subaccountId=null!==(n=e.subaccountId)&&void 0!==n?n:"",o.orderHashes=(null===(a=e.orderHashes)||void 0===a?void 0:a.map((function(e){return e})))||[],o}};var qM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.orders);try{for(a.s();!(t=a.n()).done;){var o=t.value;JM.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={orders:[]};n.pos>>3===1)o.orders.push(JM.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{orders:Array.isArray(null===e||void 0===e?void 0:e.orders)?e.orders.map((function(e){return JM.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.orders?t.orders=e.orders.map((function(e){return e?JM.toJSON(e):void 0})):t.orders=[],t},create:function(e){return qM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={orders:[]};return n.orders=(null===(t=e.orders)||void 0===t?void 0:t.map((function(e){return JM.fromPartial(e)})))||[],n}};var QM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),""!==e.subaccountId&&t.uint32(18).string(e.subaccountId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",subaccountId:""};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.subaccountId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):"",subaccountId:E_(e.subaccountId)?String(e.subaccountId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),t},create:function(e){return QM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={marketId:"",subaccountId:""};return a.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",a.subaccountId=null!==(n=e.subaccountId)&&void 0!==n?n:"",a}};var JM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.price&&t.uint32(10).string(e.price),""!==e.quantity&&t.uint32(18).string(e.quantity),""!==e.fillable&&t.uint32(26).string(e.fillable),!0===e.isBuy&&t.uint32(32).bool(e.isBuy),""!==e.orderHash&&t.uint32(42).string(e.orderHash),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={price:"",quantity:"",fillable:"",isBuy:!1,orderHash:""};n.pos>>3){case 1:o.price=n.string();break;case 2:o.quantity=n.string();break;case 3:o.fillable=n.string();break;case 4:o.isBuy=n.bool();break;case 5:o.orderHash=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{price:E_(e.price)?String(e.price):"",quantity:E_(e.quantity)?String(e.quantity):"",fillable:E_(e.fillable)?String(e.fillable):"",isBuy:!!E_(e.isBuy)&&Boolean(e.isBuy),orderHash:E_(e.orderHash)?String(e.orderHash):""}},toJSON:function(e){var t={};return void 0!==e.price&&(t.price=e.price),void 0!==e.quantity&&(t.quantity=e.quantity),void 0!==e.fillable&&(t.fillable=e.fillable),void 0!==e.isBuy&&(t.isBuy=e.isBuy),void 0!==e.orderHash&&(t.orderHash=e.orderHash),t},create:function(e){return JM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i={price:"",quantity:"",fillable:"",isBuy:!1,orderHash:""};return i.price=null!==(t=e.price)&&void 0!==t?t:"",i.quantity=null!==(n=e.quantity)&&void 0!==n?n:"",i.fillable=null!==(a=e.fillable)&&void 0!==a?a:"",i.isBuy=null!==(o=e.isBuy)&&void 0!==o&&o,i.orderHash=null!==(r=e.orderHash)&&void 0!==r?r:"",i}};var YM={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.orders);try{for(a.s();!(t=a.n()).done;){var o=t.value;JM.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={orders:[]};n.pos>>3===1)o.orders.push(JM.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{orders:Array.isArray(null===e||void 0===e?void 0:e.orders)?e.orders.map((function(e){return JM.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.orders?t.orders=e.orders.map((function(e){return e?JM.toJSON(e):void 0})):t.orders=[],t},create:function(e){return YM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={orders:[]};return n.orders=(null===(t=e.orders)||void 0===t?void 0:t.map((function(e){return JM.fromPartial(e)})))||[],n}};var XM={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return XM.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var $M={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.midPrice&&t.uint32(10).string(e.midPrice),""!==e.bestBuyPrice&&t.uint32(18).string(e.bestBuyPrice),""!==e.bestSellPrice&&t.uint32(26).string(e.bestSellPrice),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={midPrice:"",bestBuyPrice:"",bestSellPrice:""};n.pos>>3){case 1:o.midPrice=n.string();break;case 2:o.bestBuyPrice=n.string();break;case 3:o.bestSellPrice=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{midPrice:E_(e.midPrice)?String(e.midPrice):"",bestBuyPrice:E_(e.bestBuyPrice)?String(e.bestBuyPrice):"",bestSellPrice:E_(e.bestSellPrice)?String(e.bestSellPrice):""}},toJSON:function(e){var t={};return void 0!==e.midPrice&&(t.midPrice=e.midPrice),void 0!==e.bestBuyPrice&&(t.bestBuyPrice=e.bestBuyPrice),void 0!==e.bestSellPrice&&(t.bestSellPrice=e.bestSellPrice),t},create:function(e){return $M.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o={midPrice:"",bestBuyPrice:"",bestSellPrice:""};return o.midPrice=null!==(t=e.midPrice)&&void 0!==t?t:"",o.bestBuyPrice=null!==(n=e.bestBuyPrice)&&void 0!==n?n:"",o.bestSellPrice=null!==(a=e.bestSellPrice)&&void 0!==a?a:"",o}};var eP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return eP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var tP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.midPrice&&t.uint32(10).string(e.midPrice),""!==e.bestBuyPrice&&t.uint32(18).string(e.bestBuyPrice),""!==e.bestSellPrice&&t.uint32(26).string(e.bestSellPrice),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={midPrice:"",bestBuyPrice:"",bestSellPrice:""};n.pos>>3){case 1:o.midPrice=n.string();break;case 2:o.bestBuyPrice=n.string();break;case 3:o.bestSellPrice=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{midPrice:E_(e.midPrice)?String(e.midPrice):"",bestBuyPrice:E_(e.bestBuyPrice)?String(e.bestBuyPrice):"",bestSellPrice:E_(e.bestSellPrice)?String(e.bestSellPrice):""}},toJSON:function(e){var t={};return void 0!==e.midPrice&&(t.midPrice=e.midPrice),void 0!==e.bestBuyPrice&&(t.bestBuyPrice=e.bestBuyPrice),void 0!==e.bestSellPrice&&(t.bestSellPrice=e.bestSellPrice),t},create:function(e){return tP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o={midPrice:"",bestBuyPrice:"",bestSellPrice:""};return o.midPrice=null!==(t=e.midPrice)&&void 0!==t?t:"",o.bestBuyPrice=null!==(n=e.bestBuyPrice)&&void 0!==n?n:"",o.bestSellPrice=null!==(a=e.bestSellPrice)&&void 0!==a?a:"",o}};var nP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),"0"!==e.limit&&t.uint32(16).uint64(e.limit),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",limit:"0"};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.limit=C_(n.uint64());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):"",limit:E_(e.limit)?String(e.limit):"0"}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.limit&&(t.limit=e.limit),t},create:function(e){return nP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={marketId:"",limit:"0"};return a.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",a.limit=null!==(n=e.limit)&&void 0!==n?n:"0",a}};var aP={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.buysPriceLevel);try{for(a.s();!(t=a.n()).done;){var o=t.value;jR.encode(o,n.uint32(10).fork()).ldelim()}}catch(c){a.e(c)}finally{a.f()}var r,i=(0,jr.Z)(e.sellsPriceLevel);try{for(i.s();!(r=i.n()).done;){var s=r.value;jR.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){i.e(c)}finally{i.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={buysPriceLevel:[],sellsPriceLevel:[]};n.pos>>3){case 1:o.buysPriceLevel.push(jR.decode(n,n.uint32()));break;case 2:o.sellsPriceLevel.push(jR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{buysPriceLevel:Array.isArray(null===e||void 0===e?void 0:e.buysPriceLevel)?e.buysPriceLevel.map((function(e){return jR.fromJSON(e)})):[],sellsPriceLevel:Array.isArray(null===e||void 0===e?void 0:e.sellsPriceLevel)?e.sellsPriceLevel.map((function(e){return jR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.buysPriceLevel?t.buysPriceLevel=e.buysPriceLevel.map((function(e){return e?jR.toJSON(e):void 0})):t.buysPriceLevel=[],e.sellsPriceLevel?t.sellsPriceLevel=e.sellsPriceLevel.map((function(e){return e?jR.toJSON(e):void 0})):t.sellsPriceLevel=[],t},create:function(e){return aP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={buysPriceLevel:[],sellsPriceLevel:[]};return a.buysPriceLevel=(null===(t=e.buysPriceLevel)||void 0===t?void 0:t.map((function(e){return jR.fromPartial(e)})))||[],a.sellsPriceLevel=(null===(n=e.sellsPriceLevel)||void 0===n?void 0:n.map((function(e){return jR.fromPartial(e)})))||[],a}};var oP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),""!==e.subaccountId&&t.uint32(18).string(e.subaccountId),""!==e.baseAmount&&t.uint32(26).string(e.baseAmount),""!==e.quoteAmount&&t.uint32(34).string(e.quoteAmount),0!==e.strategy&&t.uint32(40).int32(e.strategy),""!==e.referencePrice&&t.uint32(50).string(e.referencePrice),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",subaccountId:"",baseAmount:"",quoteAmount:"",strategy:0,referencePrice:""};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.subaccountId=n.string();break;case 3:o.baseAmount=n.string();break;case 4:o.quoteAmount=n.string();break;case 5:o.strategy=n.int32();break;case 6:o.referencePrice=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):"",subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",baseAmount:E_(e.baseAmount)?String(e.baseAmount):"",quoteAmount:E_(e.quoteAmount)?String(e.quoteAmount):"",strategy:E_(e.strategy)?bM(e.strategy):0,referencePrice:E_(e.referencePrice)?String(e.referencePrice):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.baseAmount&&(t.baseAmount=e.baseAmount),void 0!==e.quoteAmount&&(t.quoteAmount=e.quoteAmount),void 0!==e.strategy&&(t.strategy=mM(e.strategy)),void 0!==e.referencePrice&&(t.referencePrice=e.referencePrice),t},create:function(e){return oP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i,s={marketId:"",subaccountId:"",baseAmount:"",quoteAmount:"",strategy:0,referencePrice:""};return s.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",s.subaccountId=null!==(n=e.subaccountId)&&void 0!==n?n:"",s.baseAmount=null!==(a=e.baseAmount)&&void 0!==a?a:"",s.quoteAmount=null!==(o=e.quoteAmount)&&void 0!==o?o:"",s.strategy=null!==(r=e.strategy)&&void 0!==r?r:0,s.referencePrice=null!==(i=e.referencePrice)&&void 0!==i?i:"",s}};var rP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),""!==e.subaccountId&&t.uint32(18).string(e.subaccountId),""!==e.quoteAmount&&t.uint32(26).string(e.quoteAmount),0!==e.strategy&&t.uint32(32).int32(e.strategy),""!==e.referencePrice&&t.uint32(42).string(e.referencePrice),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",subaccountId:"",quoteAmount:"",strategy:0,referencePrice:""};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.subaccountId=n.string();break;case 3:o.quoteAmount=n.string();break;case 4:o.strategy=n.int32();break;case 5:o.referencePrice=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):"",subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",quoteAmount:E_(e.quoteAmount)?String(e.quoteAmount):"",strategy:E_(e.strategy)?bM(e.strategy):0,referencePrice:E_(e.referencePrice)?String(e.referencePrice):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.quoteAmount&&(t.quoteAmount=e.quoteAmount),void 0!==e.strategy&&(t.strategy=mM(e.strategy)),void 0!==e.referencePrice&&(t.referencePrice=e.referencePrice),t},create:function(e){return rP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i={marketId:"",subaccountId:"",quoteAmount:"",strategy:0,referencePrice:""};return i.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",i.subaccountId=null!==(n=e.subaccountId)&&void 0!==n?n:"",i.quoteAmount=null!==(a=e.quoteAmount)&&void 0!==a?a:"",i.strategy=null!==(o=e.strategy)&&void 0!==o?o:0,i.referencePrice=null!==(r=e.referencePrice)&&void 0!==r?r:"",i}};var iP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),""!==e.subaccountId&&t.uint32(18).string(e.subaccountId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",subaccountId:""};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.subaccountId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):"",subaccountId:E_(e.subaccountId)?String(e.subaccountId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),t},create:function(e){return iP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={marketId:"",subaccountId:""};return a.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",a.subaccountId=null!==(n=e.subaccountId)&&void 0!==n?n:"",a}};var sP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.price&&t.uint32(10).string(e.price),""!==e.quantity&&t.uint32(18).string(e.quantity),""!==e.margin&&t.uint32(26).string(e.margin),""!==e.fillable&&t.uint32(34).string(e.fillable),!0===e.isBuy&&t.uint32(40).bool(e.isBuy),""!==e.orderHash&&t.uint32(50).string(e.orderHash),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={price:"",quantity:"",margin:"",fillable:"",isBuy:!1,orderHash:""};n.pos>>3){case 1:o.price=n.string();break;case 2:o.quantity=n.string();break;case 3:o.margin=n.string();break;case 4:o.fillable=n.string();break;case 5:o.isBuy=n.bool();break;case 6:o.orderHash=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{price:E_(e.price)?String(e.price):"",quantity:E_(e.quantity)?String(e.quantity):"",margin:E_(e.margin)?String(e.margin):"",fillable:E_(e.fillable)?String(e.fillable):"",isBuy:!!E_(e.isBuy)&&Boolean(e.isBuy),orderHash:E_(e.orderHash)?String(e.orderHash):""}},toJSON:function(e){var t={};return void 0!==e.price&&(t.price=e.price),void 0!==e.quantity&&(t.quantity=e.quantity),void 0!==e.margin&&(t.margin=e.margin),void 0!==e.fillable&&(t.fillable=e.fillable),void 0!==e.isBuy&&(t.isBuy=e.isBuy),void 0!==e.orderHash&&(t.orderHash=e.orderHash),t},create:function(e){return sP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i,s={price:"",quantity:"",margin:"",fillable:"",isBuy:!1,orderHash:""};return s.price=null!==(t=e.price)&&void 0!==t?t:"",s.quantity=null!==(n=e.quantity)&&void 0!==n?n:"",s.margin=null!==(a=e.margin)&&void 0!==a?a:"",s.fillable=null!==(o=e.fillable)&&void 0!==o?o:"",s.isBuy=null!==(r=e.isBuy)&&void 0!==r&&r,s.orderHash=null!==(i=e.orderHash)&&void 0!==i?i:"",s}};var cP={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.orders);try{for(a.s();!(t=a.n()).done;){var o=t.value;sP.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={orders:[]};n.pos>>3===1)o.orders.push(sP.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{orders:Array.isArray(null===e||void 0===e?void 0:e.orders)?e.orders.map((function(e){return sP.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.orders?t.orders=e.orders.map((function(e){return e?sP.toJSON(e):void 0})):t.orders=[],t},create:function(e){return cP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={orders:[]};return n.orders=(null===(t=e.orders)||void 0===t?void 0:t.map((function(e){return sP.fromPartial(e)})))||[],n}};var uP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();""!==e.marketId&&t.uint32(10).string(e.marketId),""!==e.subaccountId&&t.uint32(18).string(e.subaccountId);var n,a=(0,jr.Z)(e.orderHashes);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.uint32(26).string(o)}}catch(r){a.e(r)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",subaccountId:"",orderHashes:[]};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.subaccountId=n.string();break;case 3:o.orderHashes.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):"",subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",orderHashes:Array.isArray(null===e||void 0===e?void 0:e.orderHashes)?e.orderHashes.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),e.orderHashes?t.orderHashes=e.orderHashes.map((function(e){return e})):t.orderHashes=[],t},create:function(e){return uP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o={marketId:"",subaccountId:"",orderHashes:[]};return o.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",o.subaccountId=null!==(n=e.subaccountId)&&void 0!==n?n:"",o.orderHashes=(null===(a=e.orderHashes)||void 0===a?void 0:a.map((function(e){return e})))||[],o}};var dP={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.orders);try{for(a.s();!(t=a.n()).done;){var o=t.value;sP.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={orders:[]};n.pos>>3===1)o.orders.push(sP.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{orders:Array.isArray(null===e||void 0===e?void 0:e.orders)?e.orders.map((function(e){return sP.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.orders?t.orders=e.orders.map((function(e){return e?sP.toJSON(e):void 0})):t.orders=[],t},create:function(e){return dP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={orders:[]};return n.orders=(null===(t=e.orders)||void 0===t?void 0:t.map((function(e){return sP.fromPartial(e)})))||[],n}};var lP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.status&&t.uint32(10).string(e.status),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={status:""};n.pos>>3===1)o.status=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{status:E_(e.status)?String(e.status):""}},toJSON:function(e){var t={};return void 0!==e.status&&(t.status=e.status),t},create:function(e){return lP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={status:""};return n.status=null!==(t=e.status)&&void 0!==t?t:"",n}};var fP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.price&&t.uint32(10).string(e.price),""!==e.quantity&&t.uint32(18).string(e.quantity),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={price:"",quantity:""};n.pos>>3){case 1:o.price=n.string();break;case 2:o.quantity=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{price:E_(e.price)?String(e.price):"",quantity:E_(e.quantity)?String(e.quantity):""}},toJSON:function(e){var t={};return void 0!==e.price&&(t.price=e.price),void 0!==e.quantity&&(t.quantity=e.quantity),t},create:function(e){return fP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={price:"",quantity:""};return a.price=null!==(t=e.price)&&void 0!==t?t:"",a.quantity=null!==(n=e.quantity)&&void 0!==n?n:"",a}};var pP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.marketInfo&&fR.encode(e.marketInfo,t.uint32(10).fork()).ldelim(),void 0!==e.fundingInfo&&pR.encode(e.fundingInfo,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketInfo:void 0,fundingInfo:void 0};n.pos>>3){case 1:o.marketInfo=fR.decode(n,n.uint32());break;case 2:o.fundingInfo=pR.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketInfo:E_(e.marketInfo)?fR.fromJSON(e.marketInfo):void 0,fundingInfo:E_(e.fundingInfo)?pR.fromJSON(e.fundingInfo):void 0}},toJSON:function(e){var t={};return void 0!==e.marketInfo&&(t.marketInfo=e.marketInfo?fR.toJSON(e.marketInfo):void 0),void 0!==e.fundingInfo&&(t.fundingInfo=e.fundingInfo?pR.toJSON(e.fundingInfo):void 0),t},create:function(e){return pP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={marketInfo:void 0,fundingInfo:void 0};return t.marketInfo=void 0!==e.marketInfo&&null!==e.marketInfo?fR.fromPartial(e.marketInfo):void 0,t.fundingInfo=void 0!==e.fundingInfo&&null!==e.fundingInfo?pR.fromPartial(e.fundingInfo):void 0,t}};var bP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.market&&uR.encode(e.market,t.uint32(10).fork()).ldelim(),void 0!==e.perpetualInfo&&pP.encode(e.perpetualInfo,t.uint32(18).fork()).ldelim(),void 0!==e.futuresInfo&&lR.encode(e.futuresInfo,t.uint32(26).fork()).ldelim(),""!==e.markPrice&&t.uint32(34).string(e.markPrice),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={market:void 0,perpetualInfo:void 0,futuresInfo:void 0,markPrice:""};n.pos>>3){case 1:o.market=uR.decode(n,n.uint32());break;case 2:o.perpetualInfo=pP.decode(n,n.uint32());break;case 3:o.futuresInfo=lR.decode(n,n.uint32());break;case 4:o.markPrice=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{market:E_(e.market)?uR.fromJSON(e.market):void 0,perpetualInfo:E_(e.perpetualInfo)?pP.fromJSON(e.perpetualInfo):void 0,futuresInfo:E_(e.futuresInfo)?lR.fromJSON(e.futuresInfo):void 0,markPrice:E_(e.markPrice)?String(e.markPrice):""}},toJSON:function(e){var t={};return void 0!==e.market&&(t.market=e.market?uR.toJSON(e.market):void 0),void 0!==e.perpetualInfo&&(t.perpetualInfo=e.perpetualInfo?pP.toJSON(e.perpetualInfo):void 0),void 0!==e.futuresInfo&&(t.futuresInfo=e.futuresInfo?lR.toJSON(e.futuresInfo):void 0),void 0!==e.markPrice&&(t.markPrice=e.markPrice),t},create:function(e){return bP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={market:void 0,perpetualInfo:void 0,futuresInfo:void 0,markPrice:""};return n.market=void 0!==e.market&&null!==e.market?uR.fromPartial(e.market):void 0,n.perpetualInfo=void 0!==e.perpetualInfo&&null!==e.perpetualInfo?pP.fromPartial(e.perpetualInfo):void 0,n.futuresInfo=void 0!==e.futuresInfo&&null!==e.futuresInfo?lR.fromPartial(e.futuresInfo):void 0,n.markPrice=null!==(t=e.markPrice)&&void 0!==t?t:"",n}};var mP={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.markets);try{for(a.s();!(t=a.n()).done;){var o=t.value;bP.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={markets:[]};n.pos>>3===1)o.markets.push(bP.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{markets:Array.isArray(null===e||void 0===e?void 0:e.markets)?e.markets.map((function(e){return bP.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.markets?t.markets=e.markets.map((function(e){return e?bP.toJSON(e):void 0})):t.markets=[],t},create:function(e){return mP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={markets:[]};return n.markets=(null===(t=e.markets)||void 0===t?void 0:t.map((function(e){return bP.fromPartial(e)})))||[],n}};var hP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return hP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var gP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.market&&bP.encode(e.market,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={market:void 0};n.pos>>3===1)o.market=bP.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{market:E_(e.market)?bP.fromJSON(e.market):void 0}},toJSON:function(e){var t={};return void 0!==e.market&&(t.market=e.market?bP.toJSON(e.market):void 0),t},create:function(e){return gP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={market:void 0};return t.market=void 0!==e.market&&null!==e.market?bP.fromPartial(e.market):void 0,t}};var yP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return yP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var vP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.address&&t.uint32(10).string(e.address),""!==e.subaccountId&&t.uint32(18).string(e.subaccountId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={address:"",subaccountId:""};n.pos>>3){case 1:o.address=n.string();break;case 2:o.subaccountId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{address:E_(e.address)?String(e.address):"",subaccountId:E_(e.subaccountId)?String(e.subaccountId):""}},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),t},create:function(e){return vP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={address:"",subaccountId:""};return a.address=null!==(t=e.address)&&void 0!==t?t:"",a.subaccountId=null!==(n=e.subaccountId)&&void 0!==n?n:"",a}};var wP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:""};n.pos>>3===1)o.subaccountId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{subaccountId:E_(e.subaccountId)?String(e.subaccountId):""}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),t},create:function(e){return wP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={subaccountId:""};return n.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",n}};var kP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:""};n.pos>>3===1)o.subaccountId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{subaccountId:E_(e.subaccountId)?String(e.subaccountId):""}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),t},create:function(e){return kP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={subaccountId:""};return n.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",n}};var AP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),""!==e.marketId&&t.uint32(18).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",marketId:""};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.marketId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return AP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={subaccountId:"",marketId:""};return a.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",a.marketId=null!==(n=e.marketId)&&void 0!==n?n:"",a}};var xP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),""!==e.marketId&&t.uint32(18).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",marketId:""};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.marketId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return xP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={subaccountId:"",marketId:""};return a.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",a.marketId=null!==(n=e.marketId)&&void 0!==n?n:"",a}};var IP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:""};n.pos>>3===1)o.subaccountId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{subaccountId:E_(e.subaccountId)?String(e.subaccountId):""}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),t},create:function(e){return IP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={subaccountId:""};return n.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",n}};var TP={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.state);try{for(a.s();!(t=a.n()).done;){var o=t.value;sM.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={state:[]};n.pos>>3===1)o.state.push(sM.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{state:Array.isArray(null===e||void 0===e?void 0:e.state)?e.state.map((function(e){return sM.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.state?t.state=e.state.map((function(e){return e?sM.toJSON(e):void 0})):t.state=[],t},create:function(e){return TP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={state:[]};return n.state=(null===(t=e.state)||void 0===t?void 0:t.map((function(e){return sM.fromPartial(e)})))||[],n}};var SP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.state&&RR.encode(e.state,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={state:void 0};n.pos>>3===1)o.state=RR.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{state:E_(e.state)?RR.fromJSON(e.state):void 0}},toJSON:function(e){var t={};return void 0!==e.state&&(t.state=e.state?RR.toJSON(e.state):void 0),t},create:function(e){return SP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={state:void 0};return t.state=void 0!==e.state&&null!==e.state?RR.fromPartial(e.state):void 0,t}};var CP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return!0===e.isLong&&t.uint32(8).bool(e.isLong),""!==e.quantity&&t.uint32(18).string(e.quantity),""!==e.entryPrice&&t.uint32(26).string(e.entryPrice),""!==e.effectiveMargin&&t.uint32(34).string(e.effectiveMargin),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={isLong:!1,quantity:"",entryPrice:"",effectiveMargin:""};n.pos>>3){case 1:o.isLong=n.bool();break;case 2:o.quantity=n.string();break;case 3:o.entryPrice=n.string();break;case 4:o.effectiveMargin=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{isLong:!!E_(e.isLong)&&Boolean(e.isLong),quantity:E_(e.quantity)?String(e.quantity):"",entryPrice:E_(e.entryPrice)?String(e.entryPrice):"",effectiveMargin:E_(e.effectiveMargin)?String(e.effectiveMargin):""}},toJSON:function(e){var t={};return void 0!==e.isLong&&(t.isLong=e.isLong),void 0!==e.quantity&&(t.quantity=e.quantity),void 0!==e.entryPrice&&(t.entryPrice=e.entryPrice),void 0!==e.effectiveMargin&&(t.effectiveMargin=e.effectiveMargin),t},create:function(e){return CP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r={isLong:!1,quantity:"",entryPrice:"",effectiveMargin:""};return r.isLong=null!==(t=e.isLong)&&void 0!==t&&t,r.quantity=null!==(n=e.quantity)&&void 0!==n?n:"",r.entryPrice=null!==(a=e.entryPrice)&&void 0!==a?a:"",r.effectiveMargin=null!==(o=e.effectiveMargin)&&void 0!==o?o:"",r}};var EP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.state&&CP.encode(e.state,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={state:void 0};n.pos>>3===1)o.state=CP.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{state:E_(e.state)?CP.fromJSON(e.state):void 0}},toJSON:function(e){var t={};return void 0!==e.state&&(t.state=e.state?CP.toJSON(e.state):void 0),t},create:function(e){return EP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={state:void 0};return t.state=void 0!==e.state&&null!==e.state?CP.fromPartial(e.state):void 0,t}};var RP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return RP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var MP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.info&&fR.encode(e.info,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={info:void 0};n.pos>>3===1)o.info=fR.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{info:E_(e.info)?fR.fromJSON(e.info):void 0}},toJSON:function(e){var t={};return void 0!==e.info&&(t.info=e.info?fR.toJSON(e.info):void 0),t},create:function(e){return MP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={info:void 0};return t.info=void 0!==e.info&&null!==e.info?fR.fromPartial(e.info):void 0,t}};var PP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return PP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var UP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.info&&lR.encode(e.info,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={info:void 0};n.pos>>3===1)o.info=lR.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{info:E_(e.info)?lR.fromJSON(e.info):void 0}},toJSON:function(e){var t={};return void 0!==e.info&&(t.info=e.info?lR.toJSON(e.info):void 0),t},create:function(e){return UP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={info:void 0};return t.info=void 0!==e.info&&null!==e.info?lR.fromPartial(e.info):void 0,t}};var _P={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return _P.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var BP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.state&&pR.encode(e.state,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={state:void 0};n.pos>>3===1)o.state=pR.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{state:E_(e.state)?pR.fromJSON(e.state):void 0}},toJSON:function(e){var t={};return void 0!==e.state&&(t.state=e.state?pR.toJSON(e.state):void 0),t},create:function(e){return BP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={state:void 0};return t.state=void 0!==e.state&&null!==e.state?pR.fromPartial(e.state):void 0,t}};var DP={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.metadata);try{for(a.s();!(t=a.n()).done;){var o=t.value;vM.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={metadata:[]};n.pos>>3===1)o.metadata.push(vM.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{metadata:Array.isArray(null===e||void 0===e?void 0:e.metadata)?e.metadata.map((function(e){return vM.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.metadata?t.metadata=e.metadata.map((function(e){return e?vM.toJSON(e):void 0})):t.metadata=[],t},create:function(e){return DP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={metadata:[]};return n.metadata=(null===(t=e.metadata)||void 0===t?void 0:t.map((function(e){return vM.fromPartial(e)})))||[],n}};var NP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return 0!==e.nonce&&t.uint32(8).uint32(e.nonce),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={nonce:0};n.pos>>3===1)o.nonce=n.uint32();else n.skipType(7&r)}return o},fromJSON:function(e){return{nonce:E_(e.nonce)?Number(e.nonce):0}},toJSON:function(e){var t={};return void 0!==e.nonce&&(t.nonce=Math.round(e.nonce)),t},create:function(e){return NP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={nonce:0};return n.nonce=null!==(t=e.nonce)&&void 0!==t?t:0,n}};var OP={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create()},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.state&&JR.encode(e.state,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={state:void 0};n.pos>>3===1)o.state=JR.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{state:E_(e.state)?JR.fromJSON(e.state):void 0}},toJSON:function(e){var t={};return void 0!==e.state&&(t.state=e.state?JR.toJSON(e.state):void 0),t},create:function(e){return FP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={state:void 0};return t.state=void 0!==e.state&&null!==e.state?JR.fromPartial(e.state):void 0,t}};var LP={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create()},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.state);try{for(a.s();!(t=a.n()).done;){var o=t.value;sM.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={state:[]};n.pos>>3===1)o.state.push(sM.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{state:Array.isArray(null===e||void 0===e?void 0:e.state)?e.state.map((function(e){return sM.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.state?t.state=e.state.map((function(e){return e?sM.toJSON(e):void 0})):t.state=[],t},create:function(e){return jP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={state:[]};return n.state=(null===(t=e.state)||void 0===t?void 0:t.map((function(e){return sM.fromPartial(e)})))||[],n}};var HP={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.accounts);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(r){a.e(r)}finally{a.f()}return"0"!==e.pendingPoolTimestamp&&n.uint32(16).int64(e.pendingPoolTimestamp),n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={accounts:[],pendingPoolTimestamp:"0"};n.pos>>3){case 1:o.accounts.push(n.string());break;case 2:o.pendingPoolTimestamp=C_(n.int64());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{accounts:Array.isArray(null===e||void 0===e?void 0:e.accounts)?e.accounts.map((function(e){return String(e)})):[],pendingPoolTimestamp:E_(e.pendingPoolTimestamp)?String(e.pendingPoolTimestamp):"0"}},toJSON:function(e){var t={};return e.accounts?t.accounts=e.accounts.map((function(e){return e})):t.accounts=[],void 0!==e.pendingPoolTimestamp&&(t.pendingPoolTimestamp=e.pendingPoolTimestamp),t},create:function(e){return HP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={accounts:[],pendingPoolTimestamp:"0"};return a.accounts=(null===(t=e.accounts)||void 0===t?void 0:t.map((function(e){return e})))||[],a.pendingPoolTimestamp=null!==(n=e.pendingPoolTimestamp)&&void 0!==n?n:"0",a}};var GP={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.accountTradeRewardPoints);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={accountTradeRewardPoints:[]};n.pos>>3===1)o.accountTradeRewardPoints.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){return{accountTradeRewardPoints:Array.isArray(null===e||void 0===e?void 0:e.accountTradeRewardPoints)?e.accountTradeRewardPoints.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return e.accountTradeRewardPoints?t.accountTradeRewardPoints=e.accountTradeRewardPoints.map((function(e){return e})):t.accountTradeRewardPoints=[],t},create:function(e){return GP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={accountTradeRewardPoints:[]};return n.accountTradeRewardPoints=(null===(t=e.accountTradeRewardPoints)||void 0===t?void 0:t.map((function(e){return e})))||[],n}};var zP={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create()},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();void 0!==e.tradingRewardCampaignInfo&&_R.encode(e.tradingRewardCampaignInfo,t.uint32(10).fork()).ldelim();var n,a=(0,jr.Z)(e.tradingRewardPoolCampaignSchedule);try{for(a.s();!(n=a.n()).done;){var o=n.value;UR.encode(o,t.uint32(18).fork()).ldelim()}}catch(l){a.e(l)}finally{a.f()}""!==e.totalTradeRewardPoints&&t.uint32(26).string(e.totalTradeRewardPoints);var r,i=(0,jr.Z)(e.pendingTradingRewardPoolCampaignSchedule);try{for(i.s();!(r=i.n()).done;){var s=r.value;UR.encode(s,t.uint32(34).fork()).ldelim()}}catch(l){i.e(l)}finally{i.f()}var c,u=(0,jr.Z)(e.pendingTotalTradeRewardPoints);try{for(u.s();!(c=u.n()).done;){var d=c.value;t.uint32(42).string(d)}}catch(l){u.e(l)}finally{u.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={tradingRewardCampaignInfo:void 0,tradingRewardPoolCampaignSchedule:[],totalTradeRewardPoints:"",pendingTradingRewardPoolCampaignSchedule:[],pendingTotalTradeRewardPoints:[]};n.pos>>3){case 1:o.tradingRewardCampaignInfo=_R.decode(n,n.uint32());break;case 2:o.tradingRewardPoolCampaignSchedule.push(UR.decode(n,n.uint32()));break;case 3:o.totalTradeRewardPoints=n.string();break;case 4:o.pendingTradingRewardPoolCampaignSchedule.push(UR.decode(n,n.uint32()));break;case 5:o.pendingTotalTradeRewardPoints.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{tradingRewardCampaignInfo:E_(e.tradingRewardCampaignInfo)?_R.fromJSON(e.tradingRewardCampaignInfo):void 0,tradingRewardPoolCampaignSchedule:Array.isArray(null===e||void 0===e?void 0:e.tradingRewardPoolCampaignSchedule)?e.tradingRewardPoolCampaignSchedule.map((function(e){return UR.fromJSON(e)})):[],totalTradeRewardPoints:E_(e.totalTradeRewardPoints)?String(e.totalTradeRewardPoints):"",pendingTradingRewardPoolCampaignSchedule:Array.isArray(null===e||void 0===e?void 0:e.pendingTradingRewardPoolCampaignSchedule)?e.pendingTradingRewardPoolCampaignSchedule.map((function(e){return UR.fromJSON(e)})):[],pendingTotalTradeRewardPoints:Array.isArray(null===e||void 0===e?void 0:e.pendingTotalTradeRewardPoints)?e.pendingTotalTradeRewardPoints.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.tradingRewardCampaignInfo&&(t.tradingRewardCampaignInfo=e.tradingRewardCampaignInfo?_R.toJSON(e.tradingRewardCampaignInfo):void 0),e.tradingRewardPoolCampaignSchedule?t.tradingRewardPoolCampaignSchedule=e.tradingRewardPoolCampaignSchedule.map((function(e){return e?UR.toJSON(e):void 0})):t.tradingRewardPoolCampaignSchedule=[],void 0!==e.totalTradeRewardPoints&&(t.totalTradeRewardPoints=e.totalTradeRewardPoints),e.pendingTradingRewardPoolCampaignSchedule?t.pendingTradingRewardPoolCampaignSchedule=e.pendingTradingRewardPoolCampaignSchedule.map((function(e){return e?UR.toJSON(e):void 0})):t.pendingTradingRewardPoolCampaignSchedule=[],e.pendingTotalTradeRewardPoints?t.pendingTotalTradeRewardPoints=e.pendingTotalTradeRewardPoints.map((function(e){return e})):t.pendingTotalTradeRewardPoints=[],t},create:function(e){return KP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r={tradingRewardCampaignInfo:void 0,tradingRewardPoolCampaignSchedule:[],totalTradeRewardPoints:"",pendingTradingRewardPoolCampaignSchedule:[],pendingTotalTradeRewardPoints:[]};return r.tradingRewardCampaignInfo=void 0!==e.tradingRewardCampaignInfo&&null!==e.tradingRewardCampaignInfo?_R.fromPartial(e.tradingRewardCampaignInfo):void 0,r.tradingRewardPoolCampaignSchedule=(null===(t=e.tradingRewardPoolCampaignSchedule)||void 0===t?void 0:t.map((function(e){return UR.fromPartial(e)})))||[],r.totalTradeRewardPoints=null!==(n=e.totalTradeRewardPoints)&&void 0!==n?n:"",r.pendingTradingRewardPoolCampaignSchedule=(null===(a=e.pendingTradingRewardPoolCampaignSchedule)||void 0===a?void 0:a.map((function(e){return UR.fromPartial(e)})))||[],r.pendingTotalTradeRewardPoints=(null===(o=e.pendingTotalTradeRewardPoints)||void 0===o?void 0:o.map((function(e){return e})))||[],r}};var WP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.account&&t.uint32(10).string(e.account),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={account:""};n.pos>>3===1)o.account=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{account:E_(e.account)?String(e.account):""}},toJSON:function(e){var t={};return void 0!==e.account&&(t.account=e.account),t},create:function(e){return WP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={account:""};return n.account=null!==(t=e.account)&&void 0!==t?t:"",n}};var ZP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return!0===e.isOptedOut&&t.uint32(8).bool(e.isOptedOut),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={isOptedOut:!1};n.pos>>3===1)o.isOptedOut=n.bool();else n.skipType(7&r)}return o},fromJSON:function(e){return{isOptedOut:!!E_(e.isOptedOut)&&Boolean(e.isOptedOut)}},toJSON:function(e){var t={};return void 0!==e.isOptedOut&&(t.isOptedOut=e.isOptedOut),t},create:function(e){return ZP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={isOptedOut:!1};return n.isOptedOut=null!==(t=e.isOptedOut)&&void 0!==t&&t,n}};var VP={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create()},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.accounts);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={accounts:[]};n.pos>>3===1)o.accounts.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){return{accounts:Array.isArray(null===e||void 0===e?void 0:e.accounts)?e.accounts.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return e.accounts?t.accounts=e.accounts.map((function(e){return e})):t.accounts=[],t},create:function(e){return qP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={accounts:[]};return n.accounts=(null===(t=e.accounts)||void 0===t?void 0:t.map((function(e){return e})))||[],n}};var QP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.account&&t.uint32(10).string(e.account),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={account:""};n.pos>>3===1)o.account=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{account:E_(e.account)?String(e.account):""}},toJSON:function(e){var t={};return void 0!==e.account&&(t.account=e.account),t},create:function(e){return QP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={account:""};return n.account=null!==(t=e.account)&&void 0!==t?t:"",n}};var JP={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return"0"!==e.tierLevel&&t.uint32(8).uint64(e.tierLevel),void 0!==e.accountInfo&&BR.encode(e.accountInfo,t.uint32(18).fork()).ldelim(),void 0!==e.accountTtl&&NR.encode(e.accountTtl,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={tierLevel:"0",accountInfo:void 0,accountTtl:void 0};n.pos>>3){case 1:o.tierLevel=C_(n.uint64());break;case 2:o.accountInfo=BR.decode(n,n.uint32());break;case 3:o.accountTtl=NR.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{tierLevel:E_(e.tierLevel)?String(e.tierLevel):"0",accountInfo:E_(e.accountInfo)?BR.fromJSON(e.accountInfo):void 0,accountTtl:E_(e.accountTtl)?NR.fromJSON(e.accountTtl):void 0}},toJSON:function(e){var t={};return void 0!==e.tierLevel&&(t.tierLevel=e.tierLevel),void 0!==e.accountInfo&&(t.accountInfo=e.accountInfo?BR.toJSON(e.accountInfo):void 0),void 0!==e.accountTtl&&(t.accountTtl=e.accountTtl?NR.toJSON(e.accountTtl):void 0),t},create:function(e){return JP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={tierLevel:"0",accountInfo:void 0,accountTtl:void 0};return n.tierLevel=null!==(t=e.tierLevel)&&void 0!==t?t:"0",n.accountInfo=void 0!==e.accountInfo&&null!==e.accountInfo?BR.fromPartial(e.accountInfo):void 0,n.accountTtl=void 0!==e.accountTtl&&null!==e.accountTtl?NR.fromPartial(e.accountTtl):void 0,n}};var YP={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create()},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return void 0!==e.feeDiscountSchedule&&DR.encode(e.feeDiscountSchedule,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={feeDiscountSchedule:void 0};n.pos>>3===1)o.feeDiscountSchedule=DR.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){return{feeDiscountSchedule:E_(e.feeDiscountSchedule)?DR.fromJSON(e.feeDiscountSchedule):void 0}},toJSON:function(e){var t={};return void 0!==e.feeDiscountSchedule&&(t.feeDiscountSchedule=e.feeDiscountSchedule?DR.toJSON(e.feeDiscountSchedule):void 0),t},create:function(e){return XP.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t={feeDiscountSchedule:void 0};return t.feeDiscountSchedule=void 0!==e.feeDiscountSchedule&&null!==e.feeDiscountSchedule?DR.fromPartial(e.feeDiscountSchedule):void 0,t}};var $P={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return"0"!==e.dustFactor&&t.uint32(8).int64(e.dustFactor),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={dustFactor:"0"};n.pos>>3===1)o.dustFactor=C_(n.int64());else n.skipType(7&r)}return o},fromJSON:function(e){return{dustFactor:E_(e.dustFactor)?String(e.dustFactor):"0"}},toJSON:function(e){var t={};return void 0!==e.dustFactor&&(t.dustFactor=e.dustFactor),t},create:function(e){return $P.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={dustFactor:"0"};return n.dustFactor=null!==(t=e.dustFactor)&&void 0!==t?t:"0",n}};var eU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),""!==e.denom&&t.uint32(18).string(e.denom),""!==e.available&&t.uint32(26).string(e.available),""!==e.total&&t.uint32(34).string(e.total),""!==e.balanceHold&&t.uint32(42).string(e.balanceHold),""!==e.expectedTotal&&t.uint32(50).string(e.expectedTotal),""!==e.difference&&t.uint32(58).string(e.difference),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",denom:"",available:"",total:"",balanceHold:"",expectedTotal:"",difference:""};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.denom=n.string();break;case 3:o.available=n.string();break;case 4:o.total=n.string();break;case 5:o.balanceHold=n.string();break;case 6:o.expectedTotal=n.string();break;case 7:o.difference=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",denom:E_(e.denom)?String(e.denom):"",available:E_(e.available)?String(e.available):"",total:E_(e.total)?String(e.total):"",balanceHold:E_(e.balanceHold)?String(e.balanceHold):"",expectedTotal:E_(e.expectedTotal)?String(e.expectedTotal):"",difference:E_(e.difference)?String(e.difference):""}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.denom&&(t.denom=e.denom),void 0!==e.available&&(t.available=e.available),void 0!==e.total&&(t.total=e.total),void 0!==e.balanceHold&&(t.balanceHold=e.balanceHold),void 0!==e.expectedTotal&&(t.expectedTotal=e.expectedTotal),void 0!==e.difference&&(t.difference=e.difference),t},create:function(e){return eU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i,s,c={subaccountId:"",denom:"",available:"",total:"",balanceHold:"",expectedTotal:"",difference:""};return c.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",c.denom=null!==(n=e.denom)&&void 0!==n?n:"",c.available=null!==(a=e.available)&&void 0!==a?a:"",c.total=null!==(o=e.total)&&void 0!==o?o:"",c.balanceHold=null!==(r=e.balanceHold)&&void 0!==r?r:"",c.expectedTotal=null!==(i=e.expectedTotal)&&void 0!==i?i:"",c.difference=null!==(s=e.difference)&&void 0!==s?s:"",c}};var tU={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.balanceMismatches);try{for(a.s();!(t=a.n()).done;){var o=t.value;eU.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={balanceMismatches:[]};n.pos>>3===1)o.balanceMismatches.push(eU.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{balanceMismatches:Array.isArray(null===e||void 0===e?void 0:e.balanceMismatches)?e.balanceMismatches.map((function(e){return eU.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.balanceMismatches?t.balanceMismatches=e.balanceMismatches.map((function(e){return e?eU.toJSON(e):void 0})):t.balanceMismatches=[],t},create:function(e){return tU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={balanceMismatches:[]};return n.balanceMismatches=(null===(t=e.balanceMismatches)||void 0===t?void 0:t.map((function(e){return eU.fromPartial(e)})))||[],n}};var nU={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create()},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),""!==e.denom&&t.uint32(18).string(e.denom),""!==e.available&&t.uint32(26).string(e.available),""!==e.total&&t.uint32(34).string(e.total),""!==e.balanceHold&&t.uint32(42).string(e.balanceHold),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",denom:"",available:"",total:"",balanceHold:""};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.denom=n.string();break;case 3:o.available=n.string();break;case 4:o.total=n.string();break;case 5:o.balanceHold=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",denom:E_(e.denom)?String(e.denom):"",available:E_(e.available)?String(e.available):"",total:E_(e.total)?String(e.total):"",balanceHold:E_(e.balanceHold)?String(e.balanceHold):""}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.denom&&(t.denom=e.denom),void 0!==e.available&&(t.available=e.available),void 0!==e.total&&(t.total=e.total),void 0!==e.balanceHold&&(t.balanceHold=e.balanceHold),t},create:function(e){return aU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i={subaccountId:"",denom:"",available:"",total:"",balanceHold:""};return i.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",i.denom=null!==(n=e.denom)&&void 0!==n?n:"",i.available=null!==(a=e.available)&&void 0!==a?a:"",i.total=null!==(o=e.total)&&void 0!==o?o:"",i.balanceHold=null!==(r=e.balanceHold)&&void 0!==r?r:"",i}};var oU={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.balanceWithBalanceHolds);try{for(a.s();!(t=a.n()).done;){var o=t.value;aU.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={balanceWithBalanceHolds:[]};n.pos>>3===1)o.balanceWithBalanceHolds.push(aU.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{balanceWithBalanceHolds:Array.isArray(null===e||void 0===e?void 0:e.balanceWithBalanceHolds)?e.balanceWithBalanceHolds.map((function(e){return aU.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.balanceWithBalanceHolds?t.balanceWithBalanceHolds=e.balanceWithBalanceHolds.map((function(e){return e?aU.toJSON(e):void 0})):t.balanceWithBalanceHolds=[],t},create:function(e){return oU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={balanceWithBalanceHolds:[]};return n.balanceWithBalanceHolds=(null===(t=e.balanceWithBalanceHolds)||void 0===t?void 0:t.map((function(e){return aU.fromPartial(e)})))||[],n}};var rU={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create()},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return"0"!==e.tier&&t.uint32(8).uint64(e.tier),"0"!==e.count&&t.uint32(16).uint64(e.count),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={tier:"0",count:"0"};n.pos>>3){case 1:o.tier=C_(n.uint64());break;case 2:o.count=C_(n.uint64());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{tier:E_(e.tier)?String(e.tier):"0",count:E_(e.count)?String(e.count):"0"}},toJSON:function(e){var t={};return void 0!==e.tier&&(t.tier=e.tier),void 0!==e.count&&(t.count=e.count),t},create:function(e){return iU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={tier:"0",count:"0"};return a.tier=null!==(t=e.tier)&&void 0!==t?t:"0",a.count=null!==(n=e.count)&&void 0!==n?n:"0",a}};var sU={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.statistics);try{for(a.s();!(t=a.n()).done;){var o=t.value;iU.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={statistics:[]};n.pos>>3===1)o.statistics.push(iU.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{statistics:Array.isArray(null===e||void 0===e?void 0:e.statistics)?e.statistics.map((function(e){return iU.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.statistics?t.statistics=e.statistics.map((function(e){return e?iU.toJSON(e):void 0})):t.statistics=[],t},create:function(e){return sU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={statistics:[]};return n.statistics=(null===(t=e.statistics)||void 0===t?void 0:t.map((function(e){return iU.fromPartial(e)})))||[],n}};var cU={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create()},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.masterAddresses);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(b){a.e(b)}finally{a.f()}var r,i=(0,jr.Z)(e.derivativeAddresses);try{for(i.s();!(r=i.n()).done;){var s=r.value;n.uint32(18).string(s)}}catch(b){i.e(b)}finally{i.f()}var c,u=(0,jr.Z)(e.spotAddresses);try{for(u.s();!(c=u.n()).done;){var d=c.value;n.uint32(26).string(d)}}catch(b){u.e(b)}finally{u.f()}var l,f=(0,jr.Z)(e.cw20Addresses);try{for(f.s();!(l=f.n()).done;){var p=l.value;n.uint32(34).string(p)}}catch(b){f.e(b)}finally{f.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={masterAddresses:[],derivativeAddresses:[],spotAddresses:[],cw20Addresses:[]};n.pos>>3){case 1:o.masterAddresses.push(n.string());break;case 2:o.derivativeAddresses.push(n.string());break;case 3:o.spotAddresses.push(n.string());break;case 4:o.cw20Addresses.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{masterAddresses:Array.isArray(null===e||void 0===e?void 0:e.masterAddresses)?e.masterAddresses.map((function(e){return String(e)})):[],derivativeAddresses:Array.isArray(null===e||void 0===e?void 0:e.derivativeAddresses)?e.derivativeAddresses.map((function(e){return String(e)})):[],spotAddresses:Array.isArray(null===e||void 0===e?void 0:e.spotAddresses)?e.spotAddresses.map((function(e){return String(e)})):[],cw20Addresses:Array.isArray(null===e||void 0===e?void 0:e.cw20Addresses)?e.cw20Addresses.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return e.masterAddresses?t.masterAddresses=e.masterAddresses.map((function(e){return e})):t.masterAddresses=[],e.derivativeAddresses?t.derivativeAddresses=e.derivativeAddresses.map((function(e){return e})):t.derivativeAddresses=[],e.spotAddresses?t.spotAddresses=e.spotAddresses.map((function(e){return e})):t.spotAddresses=[],e.cw20Addresses?t.cw20Addresses=e.cw20Addresses.map((function(e){return e})):t.cw20Addresses=[],t},create:function(e){return uU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r={masterAddresses:[],derivativeAddresses:[],spotAddresses:[],cw20Addresses:[]};return r.masterAddresses=(null===(t=e.masterAddresses)||void 0===t?void 0:t.map((function(e){return e})))||[],r.derivativeAddresses=(null===(n=e.derivativeAddresses)||void 0===n?void 0:n.map((function(e){return e})))||[],r.spotAddresses=(null===(a=e.spotAddresses)||void 0===a?void 0:a.map((function(e){return e})))||[],r.cw20Addresses=(null===(o=e.cw20Addresses)||void 0===o?void 0:o.map((function(e){return e})))||[],r}};var dU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.vaultSubaccountId&&t.uint32(10).string(e.vaultSubaccountId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={vaultSubaccountId:""};n.pos>>3===1)o.vaultSubaccountId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{vaultSubaccountId:E_(e.vaultSubaccountId)?String(e.vaultSubaccountId):""}},toJSON:function(e){var t={};return void 0!==e.vaultSubaccountId&&(t.vaultSubaccountId=e.vaultSubaccountId),t},create:function(e){return dU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={vaultSubaccountId:""};return n.vaultSubaccountId=null!==(t=e.vaultSubaccountId)&&void 0!==t?t:"",n}};var lU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return lU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var fU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return fU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var pU={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.tradeRecords);try{for(a.s();!(t=a.n()).done;){var o=t.value;FR.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={tradeRecords:[]};n.pos>>3===1)o.tradeRecords.push(FR.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{tradeRecords:Array.isArray(null===e||void 0===e?void 0:e.tradeRecords)?e.tradeRecords.map((function(e){return FR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.tradeRecords?t.tradeRecords=e.tradeRecords.map((function(e){return e?FR.toJSON(e):void 0})):t.tradeRecords=[],t},create:function(e){return pU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={tradeRecords:[]};return n.tradeRecords=(null===(t=e.tradeRecords)||void 0===t?void 0:t.map((function(e){return FR.fromPartial(e)})))||[],n}};var bU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return"0"!==e.tradeGroupingSec&&t.uint32(8).uint64(e.tradeGroupingSec),"0"!==e.maxAge&&t.uint32(16).uint64(e.maxAge),!0===e.includeRawHistory&&t.uint32(32).bool(e.includeRawHistory),!0===e.includeMetadata&&t.uint32(40).bool(e.includeMetadata),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={tradeGroupingSec:"0",maxAge:"0",includeRawHistory:!1,includeMetadata:!1};n.pos>>3){case 1:o.tradeGroupingSec=C_(n.uint64());break;case 2:o.maxAge=C_(n.uint64());break;case 4:o.includeRawHistory=n.bool();break;case 5:o.includeMetadata=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{tradeGroupingSec:E_(e.tradeGroupingSec)?String(e.tradeGroupingSec):"0",maxAge:E_(e.maxAge)?String(e.maxAge):"0",includeRawHistory:!!E_(e.includeRawHistory)&&Boolean(e.includeRawHistory),includeMetadata:!!E_(e.includeMetadata)&&Boolean(e.includeMetadata)}},toJSON:function(e){var t={};return void 0!==e.tradeGroupingSec&&(t.tradeGroupingSec=e.tradeGroupingSec),void 0!==e.maxAge&&(t.maxAge=e.maxAge),void 0!==e.includeRawHistory&&(t.includeRawHistory=e.includeRawHistory),void 0!==e.includeMetadata&&(t.includeMetadata=e.includeMetadata),t},create:function(e){return bU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r={tradeGroupingSec:"0",maxAge:"0",includeRawHistory:!1,includeMetadata:!1};return r.tradeGroupingSec=null!==(t=e.tradeGroupingSec)&&void 0!==t?t:"0",r.maxAge=null!==(n=e.maxAge)&&void 0!==n?n:"0",r.includeRawHistory=null!==(a=e.includeRawHistory)&&void 0!==a&&a,r.includeMetadata=null!==(o=e.includeMetadata)&&void 0!==o&&o,r}};var mU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),void 0!==e.tradeHistoryOptions&&bU.encode(e.tradeHistoryOptions,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:"",tradeHistoryOptions:void 0};n.pos>>3){case 1:o.marketId=n.string();break;case 2:o.tradeHistoryOptions=bU.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):"",tradeHistoryOptions:E_(e.tradeHistoryOptions)?bU.fromJSON(e.tradeHistoryOptions):void 0}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),void 0!==e.tradeHistoryOptions&&(t.tradeHistoryOptions=e.tradeHistoryOptions?bU.toJSON(e.tradeHistoryOptions):void 0),t},create:function(e){return mU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:"",tradeHistoryOptions:void 0};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n.tradeHistoryOptions=void 0!==e.tradeHistoryOptions&&null!==e.tradeHistoryOptions?bU.fromPartial(e.tradeHistoryOptions):void 0,n}};var hU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();""!==e.volatility&&t.uint32(10).string(e.volatility),void 0!==e.historyMetadata&&qE.encode(e.historyMetadata,t.uint32(18).fork()).ldelim();var n,a=(0,jr.Z)(e.rawHistory);try{for(a.s();!(n=a.n()).done;){var o=n.value;LR.encode(o,t.uint32(26).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={volatility:"",historyMetadata:void 0,rawHistory:[]};n.pos>>3){case 1:o.volatility=n.string();break;case 2:o.historyMetadata=qE.decode(n,n.uint32());break;case 3:o.rawHistory.push(LR.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{volatility:E_(e.volatility)?String(e.volatility):"",historyMetadata:E_(e.historyMetadata)?qE.fromJSON(e.historyMetadata):void 0,rawHistory:Array.isArray(null===e||void 0===e?void 0:e.rawHistory)?e.rawHistory.map((function(e){return LR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.volatility&&(t.volatility=e.volatility),void 0!==e.historyMetadata&&(t.historyMetadata=e.historyMetadata?qE.toJSON(e.historyMetadata):void 0),e.rawHistory?t.rawHistory=e.rawHistory.map((function(e){return e?LR.toJSON(e):void 0})):t.rawHistory=[],t},create:function(e){return hU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={volatility:"",historyMetadata:void 0,rawHistory:[]};return a.volatility=null!==(t=e.volatility)&&void 0!==t?t:"",a.historyMetadata=void 0!==e.historyMetadata&&null!==e.historyMetadata?qE.fromPartial(e.historyMetadata):void 0,a.rawHistory=(null===(n=e.rawHistory)||void 0===n?void 0:n.map((function(e){return LR.fromPartial(e)})))||[],a}};var gU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.status&&t.uint32(10).string(e.status),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={status:""};n.pos>>3===1)o.status=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{status:E_(e.status)?String(e.status):""}},toJSON:function(e){var t={};return void 0!==e.status&&(t.status=e.status),t},create:function(e){return gU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={status:""};return n.status=null!==(t=e.status)&&void 0!==t?t:"",n}};var yU={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.markets);try{for(a.s();!(t=a.n()).done;){var o=t.value;dR.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={markets:[]};n.pos>>3===1)o.markets.push(dR.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{markets:Array.isArray(null===e||void 0===e?void 0:e.markets)?e.markets.map((function(e){return dR.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.markets?t.markets=e.markets.map((function(e){return e?dR.toJSON(e):void 0})):t.markets=[],t},create:function(e){return yU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={markets:[]};return n.markets=(null===(t=e.markets)||void 0===t?void 0:t.map((function(e){return dR.fromPartial(e)})))||[],n}};var vU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.subaccountId&&t.uint32(10).string(e.subaccountId),""!==e.marketId&&t.uint32(18).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={subaccountId:"",marketId:""};n.pos>>3){case 1:o.subaccountId=n.string();break;case 2:o.marketId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{subaccountId:E_(e.subaccountId)?String(e.subaccountId):"",marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.subaccountId&&(t.subaccountId=e.subaccountId),void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return vU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a={subaccountId:"",marketId:""};return a.subaccountId=null!==(t=e.subaccountId)&&void 0!==t?t:"",a.marketId=null!==(n=e.marketId)&&void 0!==n?n:"",a}};var wU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.price&&t.uint32(10).string(e.price),""!==e.quantity&&t.uint32(18).string(e.quantity),""!==e.margin&&t.uint32(26).string(e.margin),""!==e.triggerPrice&&t.uint32(34).string(e.triggerPrice),!0===e.isBuy&&t.uint32(40).bool(e.isBuy),!0===e.isLimit&&t.uint32(48).bool(e.isLimit),""!==e.orderHash&&t.uint32(58).string(e.orderHash),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={price:"",quantity:"",margin:"",triggerPrice:"",isBuy:!1,isLimit:!1,orderHash:""};n.pos>>3){case 1:o.price=n.string();break;case 2:o.quantity=n.string();break;case 3:o.margin=n.string();break;case 4:o.triggerPrice=n.string();break;case 5:o.isBuy=n.bool();break;case 6:o.isLimit=n.bool();break;case 7:o.orderHash=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{price:E_(e.price)?String(e.price):"",quantity:E_(e.quantity)?String(e.quantity):"",margin:E_(e.margin)?String(e.margin):"",triggerPrice:E_(e.triggerPrice)?String(e.triggerPrice):"",isBuy:!!E_(e.isBuy)&&Boolean(e.isBuy),isLimit:!!E_(e.isLimit)&&Boolean(e.isLimit),orderHash:E_(e.orderHash)?String(e.orderHash):""}},toJSON:function(e){var t={};return void 0!==e.price&&(t.price=e.price),void 0!==e.quantity&&(t.quantity=e.quantity),void 0!==e.margin&&(t.margin=e.margin),void 0!==e.triggerPrice&&(t.triggerPrice=e.triggerPrice),void 0!==e.isBuy&&(t.isBuy=e.isBuy),void 0!==e.isLimit&&(t.isLimit=e.isLimit),void 0!==e.orderHash&&(t.orderHash=e.orderHash),t},create:function(e){return wU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r,i,s,c={price:"",quantity:"",margin:"",triggerPrice:"",isBuy:!1,isLimit:!1,orderHash:""};return c.price=null!==(t=e.price)&&void 0!==t?t:"",c.quantity=null!==(n=e.quantity)&&void 0!==n?n:"",c.margin=null!==(a=e.margin)&&void 0!==a?a:"",c.triggerPrice=null!==(o=e.triggerPrice)&&void 0!==o?o:"",c.isBuy=null!==(r=e.isBuy)&&void 0!==r&&r,c.isLimit=null!==(i=e.isLimit)&&void 0!==i&&i,c.orderHash=null!==(s=e.orderHash)&&void 0!==s?s:"",c}};var kU={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create(),a=(0,jr.Z)(e.orders);try{for(a.s();!(t=a.n()).done;){var o=t.value;wU.encode(o,n.uint32(10).fork()).ldelim()}}catch(r){a.e(r)}finally{a.f()}return n},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={orders:[]};n.pos>>3===1)o.orders.push(wU.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{orders:Array.isArray(null===e||void 0===e?void 0:e.orders)?e.orders.map((function(e){return wU.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.orders?t.orders=e.orders.map((function(e){return e?wU.toJSON(e):void 0})):t.orders=[],t},create:function(e){return kU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={orders:[]};return n.orders=(null===(t=e.orders)||void 0===t?void 0:t.map((function(e){return wU.fromPartial(e)})))||[],n}};var AU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.marketId&&t.uint32(10).string(e.marketId),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={marketId:""};n.pos>>3===1)o.marketId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{marketId:E_(e.marketId)?String(e.marketId):""}},toJSON:function(e){var t={};return void 0!==e.marketId&&(t.marketId=e.marketId),t},create:function(e){return AU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={marketId:""};return n.marketId=null!==(t=e.marketId)&&void 0!==t?t:"",n}};var xU={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.multiplier&&t.uint32(10).string(e.multiplier),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={multiplier:""};n.pos>>3===1)o.multiplier=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{multiplier:E_(e.multiplier)?String(e.multiplier):""}},toJSON:function(e){var t={};return void 0!==e.multiplier&&(t.multiplier=e.multiplier),t},create:function(e){return xU.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n={multiplier:""};return n.multiplier=null!==(t=e.multiplier)&&void 0!==t?t:"",n}},IU=function(){function e(t){(0,Gr.Z)(this,e),this.rpc=t,this.QueryExchangeParams=this.QueryExchangeParams.bind(this),this.SubaccountDeposits=this.SubaccountDeposits.bind(this),this.SubaccountDeposit=this.SubaccountDeposit.bind(this),this.ExchangeBalances=this.ExchangeBalances.bind(this),this.AggregateVolume=this.AggregateVolume.bind(this),this.AggregateVolumes=this.AggregateVolumes.bind(this),this.AggregateMarketVolume=this.AggregateMarketVolume.bind(this),this.AggregateMarketVolumes=this.AggregateMarketVolumes.bind(this),this.DenomDecimal=this.DenomDecimal.bind(this),this.DenomDecimals=this.DenomDecimals.bind(this),this.SpotMarkets=this.SpotMarkets.bind(this),this.SpotMarket=this.SpotMarket.bind(this),this.SpotOrderbook=this.SpotOrderbook.bind(this),this.TraderSpotOrders=this.TraderSpotOrders.bind(this),this.SpotOrdersByHashes=this.SpotOrdersByHashes.bind(this),this.SubaccountOrders=this.SubaccountOrders.bind(this),this.TraderSpotTransientOrders=this.TraderSpotTransientOrders.bind(this),this.SpotMidPriceAndTOB=this.SpotMidPriceAndTOB.bind(this),this.DerivativeMidPriceAndTOB=this.DerivativeMidPriceAndTOB.bind(this),this.DerivativeOrderbook=this.DerivativeOrderbook.bind(this),this.TraderDerivativeOrders=this.TraderDerivativeOrders.bind(this),this.DerivativeOrdersByHashes=this.DerivativeOrdersByHashes.bind(this),this.TraderDerivativeTransientOrders=this.TraderDerivativeTransientOrders.bind(this),this.DerivativeMarkets=this.DerivativeMarkets.bind(this),this.DerivativeMarket=this.DerivativeMarket.bind(this),this.DerivativeMarketAddress=this.DerivativeMarketAddress.bind(this),this.SubaccountTradeNonce=this.SubaccountTradeNonce.bind(this),this.ExchangeModuleState=this.ExchangeModuleState.bind(this),this.Positions=this.Positions.bind(this),this.SubaccountPositions=this.SubaccountPositions.bind(this),this.SubaccountPositionInMarket=this.SubaccountPositionInMarket.bind(this),this.SubaccountEffectivePositionInMarket=this.SubaccountEffectivePositionInMarket.bind(this),this.PerpetualMarketInfo=this.PerpetualMarketInfo.bind(this),this.ExpiryFuturesMarketInfo=this.ExpiryFuturesMarketInfo.bind(this),this.PerpetualMarketFunding=this.PerpetualMarketFunding.bind(this),this.SubaccountOrderMetadata=this.SubaccountOrderMetadata.bind(this),this.TradeRewardPoints=this.TradeRewardPoints.bind(this),this.PendingTradeRewardPoints=this.PendingTradeRewardPoints.bind(this),this.TradeRewardCampaign=this.TradeRewardCampaign.bind(this),this.FeeDiscountAccountInfo=this.FeeDiscountAccountInfo.bind(this),this.FeeDiscountSchedule=this.FeeDiscountSchedule.bind(this),this.BalanceMismatches=this.BalanceMismatches.bind(this),this.BalanceWithBalanceHolds=this.BalanceWithBalanceHolds.bind(this),this.FeeDiscountTierStatistics=this.FeeDiscountTierStatistics.bind(this),this.MitoVaultInfos=this.MitoVaultInfos.bind(this),this.QueryMarketIDFromVault=this.QueryMarketIDFromVault.bind(this),this.HistoricalTradeRecords=this.HistoricalTradeRecords.bind(this),this.IsOptedOutOfRewards=this.IsOptedOutOfRewards.bind(this),this.OptedOutOfRewardsAccounts=this.OptedOutOfRewardsAccounts.bind(this),this.MarketVolatility=this.MarketVolatility.bind(this),this.BinaryOptionsMarkets=this.BinaryOptionsMarkets.bind(this),this.TraderDerivativeConditionalOrders=this.TraderDerivativeConditionalOrders.bind(this),this.MarketAtomicExecutionFeeMultiplier=this.MarketAtomicExecutionFeeMultiplier.bind(this)}return(0,zr.Z)(e,[{key:"QueryExchangeParams",value:function(e,t){return this.rpc.unary(SU,wM.fromPartial(e),t)}},{key:"SubaccountDeposits",value:function(e,t){return this.rpc.unary(CU,AM.fromPartial(e),t)}},{key:"SubaccountDeposit",value:function(e,t){return this.rpc.unary(EU,LM.fromPartial(e),t)}},{key:"ExchangeBalances",value:function(e,t){return this.rpc.unary(RU,TM.fromPartial(e),t)}},{key:"AggregateVolume",value:function(e,t){return this.rpc.unary(MU,CM.fromPartial(e),t)}},{key:"AggregateVolumes",value:function(e,t){return this.rpc.unary(PU,RM.fromPartial(e),t)}},{key:"AggregateMarketVolume",value:function(e,t){return this.rpc.unary(UU,PM.fromPartial(e),t)}},{key:"AggregateMarketVolumes",value:function(e,t){return this.rpc.unary(_U,OM.fromPartial(e),t)}},{key:"DenomDecimal",value:function(e,t){return this.rpc.unary(BU,_M.fromPartial(e),t)}},{key:"DenomDecimals",value:function(e,t){return this.rpc.unary(DU,DM.fromPartial(e),t)}},{key:"SpotMarkets",value:function(e,t){return this.rpc.unary(NU,HM.fromPartial(e),t)}},{key:"SpotMarket",value:function(e,t){return this.rpc.unary(OU,zM.fromPartial(e),t)}},{key:"SpotOrderbook",value:function(e,t){return this.rpc.unary(FU,WM.fromPartial(e),t)}},{key:"TraderSpotOrders",value:function(e,t){return this.rpc.unary(LU,QM.fromPartial(e),t)}},{key:"SpotOrdersByHashes",value:function(e,t){return this.rpc.unary(jU,VM.fromPartial(e),t)}},{key:"SubaccountOrders",value:function(e,t){return this.rpc.unary(HU,gM.fromPartial(e),t)}},{key:"TraderSpotTransientOrders",value:function(e,t){return this.rpc.unary(GU,QM.fromPartial(e),t)}},{key:"SpotMidPriceAndTOB",value:function(e,t){return this.rpc.unary(zU,XM.fromPartial(e),t)}},{key:"DerivativeMidPriceAndTOB",value:function(e,t){return this.rpc.unary(KU,eP.fromPartial(e),t)}},{key:"DerivativeOrderbook",value:function(e,t){return this.rpc.unary(WU,nP.fromPartial(e),t)}},{key:"TraderDerivativeOrders",value:function(e,t){return this.rpc.unary(ZU,iP.fromPartial(e),t)}},{key:"DerivativeOrdersByHashes",value:function(e,t){return this.rpc.unary(VU,uP.fromPartial(e),t)}},{key:"TraderDerivativeTransientOrders",value:function(e,t){return this.rpc.unary(qU,iP.fromPartial(e),t)}},{key:"DerivativeMarkets",value:function(e,t){return this.rpc.unary(QU,lP.fromPartial(e),t)}},{key:"DerivativeMarket",value:function(e,t){return this.rpc.unary(JU,hP.fromPartial(e),t)}},{key:"DerivativeMarketAddress",value:function(e,t){return this.rpc.unary(YU,yP.fromPartial(e),t)}},{key:"SubaccountTradeNonce",value:function(e,t){return this.rpc.unary(XU,wP.fromPartial(e),t)}},{key:"ExchangeModuleState",value:function(e,t){return this.rpc.unary($U,OP.fromPartial(e),t)}},{key:"Positions",value:function(e,t){return this.rpc.unary(e_,LP.fromPartial(e),t)}},{key:"SubaccountPositions",value:function(e,t){return this.rpc.unary(t_,kP.fromPartial(e),t)}},{key:"SubaccountPositionInMarket",value:function(e,t){return this.rpc.unary(n_,AP.fromPartial(e),t)}},{key:"SubaccountEffectivePositionInMarket",value:function(e,t){return this.rpc.unary(a_,xP.fromPartial(e),t)}},{key:"PerpetualMarketInfo",value:function(e,t){return this.rpc.unary(o_,RP.fromPartial(e),t)}},{key:"ExpiryFuturesMarketInfo",value:function(e,t){return this.rpc.unary(r_,PP.fromPartial(e),t)}},{key:"PerpetualMarketFunding",value:function(e,t){return this.rpc.unary(i_,_P.fromPartial(e),t)}},{key:"SubaccountOrderMetadata",value:function(e,t){return this.rpc.unary(s_,IP.fromPartial(e),t)}},{key:"TradeRewardPoints",value:function(e,t){return this.rpc.unary(c_,HP.fromPartial(e),t)}},{key:"PendingTradeRewardPoints",value:function(e,t){return this.rpc.unary(u_,HP.fromPartial(e),t)}},{key:"TradeRewardCampaign",value:function(e,t){return this.rpc.unary(d_,zP.fromPartial(e),t)}},{key:"FeeDiscountAccountInfo",value:function(e,t){return this.rpc.unary(l_,QP.fromPartial(e),t)}},{key:"FeeDiscountSchedule",value:function(e,t){return this.rpc.unary(f_,YP.fromPartial(e),t)}},{key:"BalanceMismatches",value:function(e,t){return this.rpc.unary(p_,$P.fromPartial(e),t)}},{key:"BalanceWithBalanceHolds",value:function(e,t){return this.rpc.unary(b_,nU.fromPartial(e),t)}},{key:"FeeDiscountTierStatistics",value:function(e,t){return this.rpc.unary(m_,rU.fromPartial(e),t)}},{key:"MitoVaultInfos",value:function(e,t){return this.rpc.unary(h_,cU.fromPartial(e),t)}},{key:"QueryMarketIDFromVault",value:function(e,t){return this.rpc.unary(g_,dU.fromPartial(e),t)}},{key:"HistoricalTradeRecords",value:function(e,t){return this.rpc.unary(y_,fU.fromPartial(e),t)}},{key:"IsOptedOutOfRewards",value:function(e,t){return this.rpc.unary(v_,WP.fromPartial(e),t)}},{key:"OptedOutOfRewardsAccounts",value:function(e,t){return this.rpc.unary(w_,VP.fromPartial(e),t)}},{key:"MarketVolatility",value:function(e,t){return this.rpc.unary(k_,mU.fromPartial(e),t)}},{key:"BinaryOptionsMarkets",value:function(e,t){return this.rpc.unary(A_,gU.fromPartial(e),t)}},{key:"TraderDerivativeConditionalOrders",value:function(e,t){return this.rpc.unary(x_,vU.fromPartial(e),t)}},{key:"MarketAtomicExecutionFeeMultiplier",value:function(e,t){return this.rpc.unary(I_,AU.fromPartial(e),t)}}]),e}(),TU={serviceName:"injective.exchange.v1beta1.Query"},SU={methodName:"QueryExchangeParams",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return wM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=kM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},CU={methodName:"SubaccountDeposits",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return AM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=xM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},EU={methodName:"SubaccountDeposit",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return LM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=jM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},RU={methodName:"ExchangeBalances",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return TM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=SM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},MU={methodName:"AggregateVolume",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return CM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=EM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},PU={methodName:"AggregateVolumes",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return RM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=MM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},UU={methodName:"AggregateMarketVolume",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return PM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=UM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},_U={methodName:"AggregateMarketVolumes",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return OM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=FM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},BU={methodName:"DenomDecimal",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return _M.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=BM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},DU={methodName:"DenomDecimals",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return DM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=NM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},NU={methodName:"SpotMarkets",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return HM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=GM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},OU={methodName:"SpotMarket",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return zM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=KM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},FU={methodName:"SpotOrderbook",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return WM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=ZM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},LU={methodName:"TraderSpotOrders",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return QM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=YM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},jU={methodName:"SpotOrdersByHashes",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return VM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=qM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},HU={methodName:"SubaccountOrders",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return gM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=yM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},GU={methodName:"TraderSpotTransientOrders",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return QM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=YM.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},zU={methodName:"SpotMidPriceAndTOB",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return XM.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=$M.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},KU={methodName:"DerivativeMidPriceAndTOB",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return eP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=tP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},WU={methodName:"DerivativeOrderbook",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return nP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=aP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},ZU={methodName:"TraderDerivativeOrders",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return iP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=cP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},VU={methodName:"DerivativeOrdersByHashes",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return uP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=dP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},qU={methodName:"TraderDerivativeTransientOrders",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return iP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=cP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},QU={methodName:"DerivativeMarkets",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return lP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=mP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},JU={methodName:"DerivativeMarket",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return hP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=gP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},YU={methodName:"DerivativeMarketAddress",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return yP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=vP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},XU={methodName:"SubaccountTradeNonce",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return wP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=NP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},$U={methodName:"ExchangeModuleState",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return OP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=FP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},e_={methodName:"Positions",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return LP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=jP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},t_={methodName:"SubaccountPositions",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return kP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=TP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},n_={methodName:"SubaccountPositionInMarket",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return AP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=SP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},a_={methodName:"SubaccountEffectivePositionInMarket",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return xP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=EP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},o_={methodName:"PerpetualMarketInfo",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return RP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=MP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},r_={methodName:"ExpiryFuturesMarketInfo",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return PP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=UP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},i_={methodName:"PerpetualMarketFunding",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return _P.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=BP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},s_={methodName:"SubaccountOrderMetadata",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return IP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=DP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},c_={methodName:"TradeRewardPoints",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return HP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=GP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},u_={methodName:"PendingTradeRewardPoints",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return HP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=GP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},d_={methodName:"TradeRewardCampaign",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return zP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=KP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},l_={methodName:"FeeDiscountAccountInfo",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return QP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=JP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},f_={methodName:"FeeDiscountSchedule",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return YP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=XP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},p_={methodName:"BalanceMismatches",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return $P.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=tU.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},b_={methodName:"BalanceWithBalanceHolds",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return nU.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=oU.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},m_={methodName:"FeeDiscountTierStatistics",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return rU.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=sU.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},h_={methodName:"MitoVaultInfos",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return cU.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=uU.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},g_={methodName:"QueryMarketIDFromVault",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return dU.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=lU.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},y_={methodName:"HistoricalTradeRecords",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return fU.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=pU.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},v_={methodName:"IsOptedOutOfRewards",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return WP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=ZP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},w_={methodName:"OptedOutOfRewardsAccounts",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return VP.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=qP.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},k_={methodName:"MarketVolatility",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return mU.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=hU.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},A_={methodName:"BinaryOptionsMarkets",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return gU.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=yU.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},x_={methodName:"TraderDerivativeConditionalOrders",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return vU.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=kU.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},I_={methodName:"MarketAtomicExecutionFeeMultiplier",service:TU,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return AU.encode(this).finish()}},responseType:{deserializeBinary:function(e){var t=xU.decode(e);return Object.assign(Object.assign({},t),{toObject:function(){return t}})}}},T_=function(){function e(t,n){(0,Gr.Z)(this,e),this.host=t,this.options=n}return(0,zr.Z)(e,[{key:"unary",value:function(e,t,n){var a,o=this,r=Object.assign(Object.assign({},t),e.requestType),i=n&&this.options.metadata?new Rt.BrowserHeaders(Object.assign(Object.assign({},null===(a=this.options)||void 0===a?void 0:a.metadata.headersMap),null===n||void 0===n?void 0:n.headersMap)):n||this.options.metadata;return new Promise((function(t,n){WC.grpc.unary(e,{request:r,host:o.host,metadata:i,transport:o.options.transport,debug:o.options.debug,onEnd:function(e){if(e.status===WC.grpc.Code.OK)t(e.message.toObject());else{var a=new M_(e.statusMessage,e.status,e.trailers);n(a)}}})}))}}]),e}(),S_=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();function C_(e){return e.toString()}function E_(e){return null!==e&&void 0!==e}yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var R_,M_=function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(e,a,o){var r;return(0,Gr.Z)(this,n),(r=t.call(this,e)).code=a,r.metadata=o,r}return(0,zr.Z)(n)}(S_.Error);!function(e){e[e.EXCHANGE_UNSPECIFIED=0]="EXCHANGE_UNSPECIFIED",e[e.SPOT=1]="SPOT",e[e.DERIVATIVES=2]="DERIVATIVES",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(R_||(R_={}));var P_=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());P_.Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;var U_=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());U_.Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var __=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());__.Error;var B_=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());B_.Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var D_=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());D_.Error;var N_=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());N_.Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var O_;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure()),function(e){e[e.CLAIM_TYPE_UNKNOWN=0]="CLAIM_TYPE_UNKNOWN",e[e.CLAIM_TYPE_DEPOSIT=1]="CLAIM_TYPE_DEPOSIT",e[e.CLAIM_TYPE_WITHDRAW=2]="CLAIM_TYPE_WITHDRAW",e[e.CLAIM_TYPE_ERC20_DEPLOYED=3]="CLAIM_TYPE_ERC20_DEPLOYED",e[e.CLAIM_TYPE_VALSET_UPDATED=4]="CLAIM_TYPE_VALSET_UPDATED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(O_||(O_={}));yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var F_=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());F_.Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var L_=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var j_;L_.Error;!function(e){e[e.SIGN_TYPE_UNKNOWN=0]="SIGN_TYPE_UNKNOWN",e[e.SIGN_TYPE_ORCHESTRATOR_SIGNED_MULTI_SIG_UPDATE=1]="SIGN_TYPE_ORCHESTRATOR_SIGNED_MULTI_SIG_UPDATE",e[e.SIGN_TYPE_ORCHESTRATOR_SIGNED_WITHDRAW_BATCH=2]="SIGN_TYPE_ORCHESTRATOR_SIGNED_WITHDRAW_BATCH",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(j_||(j_={}));!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());(function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"})().Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var H_={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yC.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),""!==e.msg&&t.uint32(26).string(e.msg),""!==e.funds&&t.uint32(34).string(e.funds),t},decode:function(e,t){for(var n=e instanceof yC.Reader?e:new yC.Reader(e),a=void 0===t?n.len:n.pos+t,o={sender:"",contract:"",msg:"",funds:""};n.pos>>3){case 1:o.sender=n.string();break;case 2:o.contract=n.string();break;case 3:o.msg=n.string();break;case 4:o.funds=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{sender:z_(e.sender)?String(e.sender):"",contract:z_(e.contract)?String(e.contract):"",msg:z_(e.msg)?String(e.msg):"",funds:z_(e.funds)?String(e.funds):""}},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.msg&&(t.msg=e.msg),void 0!==e.funds&&(t.funds=e.funds),t},create:function(e){return H_.fromPartial(null!==e&&void 0!==e?e:{})},fromPartial:function(e){var t,n,a,o,r={sender:"",contract:"",msg:"",funds:""};return r.sender=null!==(t=e.sender)&&void 0!==t?t:"",r.contract=null!==(n=e.contract)&&void 0!==n?n:"",r.msg=null!==(a=e.msg)&&void 0!==a?a:"",r.funds=null!==(o=e.funds)&&void 0!==o?o:"",r}};var G_=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();function z_(e){return null!==e&&void 0!==e}yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());G_.Error;yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();var K_=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();K_.Error;!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());!function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());yC.util.Long!==KC&&(yC.util.Long=KC,yC.configure());var W_,Z_,V_,q_,Q_,J_,Y_,X_,$_,eB,tB,nB,aB;n(54659).Buffer;!function(e){e[e.Mainnet=1]="Mainnet",e[e.Ropsten=3]="Ropsten",e[e.Rinkeby=4]="Rinkeby",e[e.Goerli=5]="Goerli",e[e.Kovan=42]="Kovan",e[e.Injective=888]="Injective",e[e.Ganache=1337]="Ganache",e[e.HardHat=31337]="HardHat"}(W_||(W_={})),function(e){e.Mainnet="injective-1",e.Testnet="injective-888",e.Devnet="injective-777"}(Z_||(Z_={})),function(e){e.MsgExec="cosmos.authz.v1beta1.MsgExec",e.MsgGrant="cosmos.authz.v1beta1.MsgGrant",e.MsgSend="cosmos.bank.v1beta1.MsgSend",e.MsgWithdrawDelegatorReward="cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",e.MsgGrantAllowance="cosmos.feegrant.v1beta1.MsgGrantAllowance",e.MsgDepositCosmos="cosmos.gov.v1beta1.MsgDeposit",e.MsgSubmitProposal="cosmos.gov.v1beta1.MsgSubmitProposal",e.MsgVote="cosmos.gov.v1beta1.MsgVote",e.MsgUnjail="cosmos.slashing.v1beta1.MsgUnjail",e.MsgBeginRedelegate="cosmos.staking.v1beta1.MsgBeginRedelegate",e.MsgCreateValidator="cosmos.staking.v1beta1.MsgCreateValidator",e.MsgDelegate="cosmos.staking.v1beta1.MsgDelegate",e.MsgEditValidator="cosmos.staking.v1beta1.MsgEditValidator",e.MsgUndelegate="cosmos.staking.v1beta1.MsgUndelegate",e.MsgExecuteContract="cosmwasm.wasm.v1.MsgExecuteContract",e.MsgInstantiateContract="cosmwasm.wasm.v1.MsgInstantiateContract",e.MsgInstantiateContract2="cosmwasm.wasm.v1.MsgInstantiateContract2",e.MsgMigrateContract="cosmwasm.wasm.v1.MsgMigrateContract",e.MsgStoreCode="cosmwasm.wasm.v1.MsgStoreCode",e.MsgUpdateAdmin="cosmwasm.wasm.v1.MsgUpdateAdmin",e.MsgTransfer="ibc.applications.transfer.v1.MsgTransfer",e.MsgAcknowledgement="ibc.core.channel.v1.MsgAcknowledgement",e.MsgChannelOpenAck="ibc.core.channel.v1.MsgChannelOpenAck",e.MsgChannelOpenConfirm="ibc.core.channel.v1.MsgChannelOpenConfirm",e.MsgChannelOpenInit="ibc.core.channel.v1.MsgChannelOpenInit",e.MsgChannelOpenTry="ibc.core.channel.v1.MsgChannelOpenTry",e.MsgRecvPacket="ibc.core.channel.v1.MsgRecvPacket",e.MsgTimeout="ibc.core.channel.v1.MsgTimeout",e.MsgCreateClient="ibc.core.client.v1.MsgCreateClient",e.MsgUpdateClient="ibc.core.client.v1.MsgUpdateClient",e.MsgConnectionOpenAck="ibc.core.connection.v1.MsgConnectionOpenAck",e.MsgConnectionOpenConfirm="ibc.core.connection.v1.MsgConnectionOpenConfirm",e.MsgConnectionOpenInit="ibc.core.connection.v1.MsgConnectionOpenInit",e.MsgConnectionOpenTry="ibc.core.connection.v1.MsgConnectionOpenTry",e.MsgBid="injective.auction.v1beta1.MsgBid",e.MsgAdminUpdateBinaryOptionsMarket="injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket",e.MsgBatchCancelDerivativeOrders="injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders",e.MsgBatchCancelSpotOrders="injective.exchange.v1beta1.MsgBatchCancelSpotOrders",e.MsgBatchCreateDerivativeLimitOrders="injective.exchange.v1beta1.MsgBatchCreateDerivativeLimitOrders",e.MsgBatchCreateSpotLimitOrders="injective.exchange.v1beta1.MsgBatchCreateSpotLimitOrders",e.MsgBatchUpdateOrders="injective.exchange.v1beta1.MsgBatchUpdateOrders",e.MsgCancelBinaryOptionsOrder="injective.exchange.v1beta1.MsgCancelBinaryOptionsOrder",e.MsgCancelDerivativeOrder="injective.exchange.v1beta1.MsgCancelDerivativeOrder",e.MsgCancelSpotOrder="injective.exchange.v1beta1.MsgCancelSpotOrder",e.MsgCreateBinaryOptionsLimitOrder="injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrder",e.MsgCreateBinaryOptionsMarketOrder="injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrder",e.MsgCreateDerivativeLimitOrder="injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder",e.MsgCreateDerivativeMarketOrder="injective.exchange.v1beta1.MsgCreateDerivativeMarketOrder",e.MsgCreateSpotLimitOrder="injective.exchange.v1beta1.MsgCreateSpotLimitOrder",e.MsgCreateSpotMarketOrder="injective.exchange.v1beta1.MsgCreateSpotMarketOrder",e.MsgDeposit="injective.exchange.v1beta1.MsgDeposit",e.MsgExternalTransfer="injective.exchange.v1beta1.MsgExternalTransfer",e.MsgIncreasePositionMargin="injective.exchange.v1beta1.MsgIncreasePositionMargin",e.MsgInstantBinaryOptionsMarketLaunch="injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunch",e.MsgInstantPerpetualMarketLaunch="injective.exchange.v1beta1.MsgInstantPerpetualMarketLaunch",e.MsgInstantSpotMarketLaunch="injective.exchange.v1beta1.MsgInstantSpotMarketLaunch",e.MsgReclaimLockedFunds="injective.exchange.v1beta1.MsgReclaimLockedFunds",e.MsgRewardsOptOut="injective.exchange.v1beta1.MsgRewardsOptOut",e.MsgSubaccountTransfer="injective.exchange.v1beta1.MsgSubaccountTransfer",e.MsgWithdraw="injective.exchange.v1beta1.MsgWithdraw",e.MsgCreateInsuranceFund="injective.insurance.v1beta1.MsgCreateInsuranceFund",e.MsgRequestRedemption="injective.insurance.v1beta1.MsgRequestRedemption",e.MsgUnderwrite="injective.insurance.v1beta1.MsgUnderwrite",e.MsgConfirmBatch="injective.peggy.v1.MsgConfirmBatch",e.MsgDepositClaim="injective.peggy.v1.MsgDepositClaim",e.MsgERC20DeployedClaim="injective.peggy.v1.MsgERC20DeployedClaim",e.MsgRequestBatch="injective.peggy.v1.MsgRequestBatch",e.MsgSendToEth="injective.peggy.v1.MsgSendToEth",e.MsgSetOrchestratorAddresses="injective.peggy.v1.MsgSetOrchestratorAddresses",e.MsgValsetConfirm="injective.peggy.v1.MsgValsetConfirm",e.MsgValsetUpdatedClaim="injective.peggy.v1.MsgValsetUpdatedClaim",e.MsgWithdrawClaim="injective.peggy.v1.MsgWithdrawClaim",e.MsgBurn="injective.tokenfactory.v1beta1.MsgBurn",e.MsgCreateDenom="injective.tokenfactory.v1beta1.MsgCreateDenom",e.MsgMint="injective.tokenfactory.v1beta1.MsgMint",e.MsgExecuteContractCompat="injective.wasmx.v1.MsgExecuteContractCompat"}(V_||(V_={})),function(e){e.Success="success",e.Fail="fail"}(q_||(q_={})),function(e){e.Insert="insert",e.Delete="delete",e.Replace="replace",e.Update="update",e.Invalidate="invalidate"}(Q_||(Q_={})),function(e){e.Injective="injective-1",e.Cosmoshub="cosmoshub-4",e.Juno="juno-1",e.Osmosis="osmosis-1",e.Terra="columbus-5",e.TerraUST="columbus-5",e.Chihuahua="chihuahua-1",e.Axelar="axelar-dojo-1",e.Evmos="evmos_9001-2",e.Persistence="core-1",e.Secret="secret-4",e.Stride="stride-1",e.Crescent="crescent-1",e.Sommelier="sommelier-3",e.Canto="canto_7700-1"}(J_||(J_={})),function(e){e.Injective="injective-888",e.Cosmoshub="cosmoshub-testnet"}(Y_||(Y_={})),function(e){e.Injective="injective-777",e.Injective1="injective-777"}(X_||(X_={})),function(e){e.Market="market",e.LimitFill="limitFill",e.LimitMatchRestingOrder="limitMatchRestingOrder",e.LimitMatchNewOrder="limitMatchNewOrder"}($_||($_={})),function(e){e.Maker="maker",e.Taker="taker"}(eB||(eB={})),function(e){e.Buy="buy",e.Sell="sell",e.Long="long",e.Short="short"}(tB||(tB={})),function(e){e.Unfilled="unfilled",e.Booked="booked",e.PartialFilled="partial_filled",e.PartiallyFilled="partially_filled",e.Filled="filled",e.Canceled="canceled",e.Triggered="triggered"}(nB||(nB={})),function(e){e.Unspecified="unspecified",e.Buy="buy",e.Sell="sell",e.StopBuy="stop_buy",e.StopSell="stop_sell",e.TakeBuy="take_buy",e.TakeSell="take_sell",e.BuyPO="buy_po",e.SellPO="sell_po",e.BuyAtomic="buy_atomic",e.SellAtomic="sell_atomic",e.Unrecognized="unrecognized"}(aB||(aB={}));var oB,rB,iB,sB,cB={feeDenom:"inj",chainId:Z_.Mainnet,ethereumChainId:W_.Mainnet,env:"mainnet"},uB={feeDenom:"inj",chainId:Z_.Testnet,ethereumChainId:W_.Goerli,env:"testnet"},dB={feeDenom:"inj",chainId:Z_.Devnet,ethereumChainId:W_.Goerli,env:"devnet"},lB={feeDenom:"inj",chainId:Z_.Devnet,ethereumChainId:W_.Goerli,env:"local"},fB={indexerApi:"https://k8s.testnet.exchange.grpc-web.injective.network",sentryGrpcApi:"https://k8s.testnet.chain.grpc-web.injective.network",tendermintApi:"https://k8s.testnet.tm.injective.network",sentryHttpApi:"https://k8s.testnet.lcd.injective.network"},pB=(0,Br.Z)({},fB),bB={indexer:"https://staging.api.injective.network",grpc:"https://staging.grpc.injective.network",rpc:"https://staging.tm.injective.network",rest:"https://staging.lcd.injective.network",chronos:"https://staging.api.injective.network",explorer:"https://staging.api.injective.network"},mB=(0,Br.Z)({},bB);!function(e){e.MainnetK8s="mainnetK8s",e.MainnetLB="mainnetLB",e.Mainnet="mainnet",e.Staging="staging",e.Public="public",e.TestnetK8s="testnetK8s",e.TestnetOld="testnetOld",e.Testnet="testnet",e.Devnet1="devnet1",e.Devnet2="devnet2",e.Devnet="devnet",e.Local="local"}(oB||(oB={}));rB={},(0,_r.Z)(rB,oB.MainnetK8s,{indexerApi:"https://k8s.mainnet.exchange.grpc-web.injective.network",sentryGrpcApi:"https://k8s.mainnet.chain.grpc-web.injective.network",tendermintApi:"https://k8s.mainnet.tm.injective.network",sentryHttpApi:"https://k8s.mainnet.lcd.injective.network"}),(0,_r.Z)(rB,oB.MainnetLB,{indexerApi:"https://k8s.mainnet.exchange.grpc-web.injective.network",sentryGrpcApi:"https://k8s.mainnet.chain.grpc-web.injective.network",tendermintApi:"https://k8s.mainnet.tm.injective.network",sentryHttpApi:"https://k8s.mainnet.lcd.injective.network"}),(0,_r.Z)(rB,oB.Staging,{indexerApi:"https://staging.api.injective.network",sentryGrpcApi:"https://staging.grpc.injective.network",tendermintApi:"https://staging.tm.injective.network",sentryHttpApi:"https://staging.lcd.injective.network"}),(0,_r.Z)(rB,oB.Mainnet,{indexerApi:"https://api.injective.network",sentryGrpcApi:"https://grpc.injective.network",tendermintApi:"https://tm.injective.network",sentryHttpApi:"https://lcd.injective.network"}),(0,_r.Z)(rB,oB.Public,{indexerApi:"https://public.api.injective.network",sentryGrpcApi:"https://public.grpc.injective.network",tendermintApi:"https://tm.injective.network",sentryHttpApi:"https://public.lcd.injective.network"}),(0,_r.Z)(rB,oB.Devnet,{indexerApi:"https://devnet.api.injective.dev",sentryGrpcApi:"https://devnet.grpc.injective.dev",tendermintApi:"https://devnet.tm.injective.dev",sentryHttpApi:"https://devnet.lcd.injective.dev"}),(0,_r.Z)(rB,oB.Devnet1,{indexerApi:"https://devnet-1.api.injective.dev",sentryGrpcApi:"https://devnet-1.grpc.injective.dev",tendermintApi:"https://devnet-1.tm.injective.dev",sentryHttpApi:"https://devnet-1.lcd.injective.dev"}),(0,_r.Z)(rB,oB.Devnet2,{indexerApi:"https://devnet-2.api.injective.dev",sentryGrpcApi:"https://devnet-2.grpc.injective.dev",tendermintApi:"https://devnet-2.tm.injective.dev",sentryHttpApi:"https://devnet-2.lcd.injective.dev"}),(0,_r.Z)(rB,oB.Testnet,pB),(0,_r.Z)(rB,oB.TestnetK8s,fB),(0,_r.Z)(rB,oB.TestnetOld,{indexerApi:"https://testnet.api.injective.dev",sentryGrpcApi:"https://testnet.grpc.injective.dev",tendermintApi:"https://testnet.tm.injective.dev",sentryHttpApi:"https://testnet.lcd.injective.dev"}),(0,_r.Z)(rB,oB.Local,{indexerApi:"https://localhost:4444",sentryGrpcApi:"http://localhost:9091",tendermintApi:"http://localhost:9091",sentryHttpApi:"http://localhost:9091"}),iB={},(0,_r.Z)(iB,oB.MainnetLB,{indexer:"https://k8s.global.mainnet.exchange.grpc-web.injective.network",grpc:"https://k8s.global.mainnet.chain.grpc-web.injective.network",rpc:"https://k8s.global.mainnet.tm.injective.network",rest:"https://k8s.global.mainnet.lcd.injective.network",chronos:"https://k8s.global.mainnet.chronos.grpc-web.injective.network",explorer:"https://k8s.global.mainnet.explorer.grpc-web.injective.network"}),(0,_r.Z)(iB,oB.MainnetK8s,{indexer:"https://k8s.mainnet.exchange.grpc-web.injective.network",grpc:"https://k8s.mainnet.chain.grpc-web.injective.network",rpc:"https://k8s.mainnet.tm.injective.network",rest:"https://k8s.mainnet.lcd.injective.network",chronos:"https://k8s.mainnet.chronos.grpc-web.injective.network",explorer:"https://k8s.mainnet.explorer.grpc-web.injective.network"}),(0,_r.Z)(iB,oB.Staging,bB),(0,_r.Z)(iB,oB.Mainnet,{indexer:"https://api.injective.network",grpc:"https://grpc.injective.network",rpc:"https://tm.injective.network",rest:"https://lcd.injective.network",chronos:"https://api.injective.network",explorer:"https://api.injective.network"}),(0,_r.Z)(iB,oB.Public,mB),(0,_r.Z)(iB,oB.Devnet,{indexer:"https://devnet.api.injective.dev",grpc:"https://devnet.grpc.injective.dev",rpc:"https://devnet.tm.injective.dev",rest:"https://devnet.lcd.injective.dev",chronos:"https://devnet.api.injective.dev",explorer:"https://devnet.api.injective.dev"}),(0,_r.Z)(iB,oB.Devnet1,{indexer:"https://devnet-1.api.injective.dev",grpc:"https://devnet-1.grpc.injective.dev",rpc:"https://devnet-1.tm.injective.dev",rest:"https://devnet-1.lcd.injective.dev",chronos:"https://devnet-1.api.injective.dev",explorer:"https://devnet-1.api.injective.dev"}),(0,_r.Z)(iB,oB.Devnet2,{indexer:"https://devnet-2.api.injective.dev",grpc:"https://devnet-2.grpc.injective.dev",rpc:"https://devnet-2.tm.injective.dev",rest:"https://devnet-2.lcd.injective.dev",chronos:"https://devnet-2.api.injective.dev",explorer:"https://devnet-2.api.injective.dev"}),(0,_r.Z)(iB,oB.Testnet,{indexer:"https://testnet.exchange.grpc-web.injective.network",grpc:"https://testnet.chain.grpc-web.injective.network",rpc:"https://testnet.tm.injective.network",rest:"https://testnet.lcd.injective.network",chronos:"https://testnet.exchange.grpc-web.injective.network",explorer:"https://testnet.exchange.grpc-web.injective.network"}),(0,_r.Z)(iB,oB.TestnetK8s,{indexer:"https://k8s.testnet.exchange.grpc-web.injective.network",grpc:"https://k8s.testnet.chain.grpc-web.injective.network",rpc:"https://k8s.testnet.tm.injective.network",rest:"https://k8s.testnet.lcd.injective.network",chronos:"https://k8s.testnet.exchange.grpc-web.injective.network",explorer:"https://k8s.testnet.explorer.grpc-web.injective.network"}),(0,_r.Z)(iB,oB.TestnetOld,{indexer:"https://testnet.exchange.grpc-web.injective.dev",grpc:"https://testnet.chain.grpc-web.injective.dev",rpc:"https://testnet.tm.injective.dev",rest:"https://testnet.lcd.injective.dev",chronos:"https://testnet.exchange.grpc-web.injective.dev",explorer:"https://testnet.exchange.grpc-web.injective.dev"}),(0,_r.Z)(iB,oB.Local,{indexer:"https://localhost:4444",grpc:"http://localhost:9091",rpc:"http://localhost:9091",rest:"http://localhost:9091",chronos:"https://localhost:4445",explorer:"https://localhost:4446"}),sB={},(0,_r.Z)(sB,oB.MainnetLB,cB),(0,_r.Z)(sB,oB.MainnetK8s,cB),(0,_r.Z)(sB,oB.Staging,cB),(0,_r.Z)(sB,oB.Mainnet,cB),(0,_r.Z)(sB,oB.Public,cB),(0,_r.Z)(sB,oB.Devnet,dB),(0,_r.Z)(sB,oB.Devnet1,dB),(0,_r.Z)(sB,oB.Devnet2,dB),(0,_r.Z)(sB,oB.Testnet,uB),(0,_r.Z)(sB,oB.TestnetOld,uB),(0,_r.Z)(sB,oB.TestnetK8s,uB),(0,_r.Z)(sB,oB.Local,lB);var hB,gB=n(47772),yB=(hB={},(0,_r.Z)(hB,oB.Mainnet,"inj14ejqjyq8um4p3xfqj74yld5waqljf88f9eneuk"),(0,_r.Z)(hB,oB.MainnetLB,"inj14ejqjyq8um4p3xfqj74yld5waqljf88f9eneuk"),(0,_r.Z)(hB,oB.MainnetK8s,"inj14ejqjyq8um4p3xfqj74yld5waqljf88f9eneuk"),(0,_r.Z)(hB,oB.Public,"inj14ejqjyq8um4p3xfqj74yld5waqljf88f9eneuk"),(0,_r.Z)(hB,oB.Staging,"inj14ejqjyq8um4p3xfqj74yld5waqljf88f9eneuk"),(0,_r.Z)(hB,oB.Testnet,"inj1hdvy6tl89llqy3ze8lv6mz5qh66sx9enn0jxg6"),(0,_r.Z)(hB,oB.TestnetK8s,"inj1hdvy6tl89llqy3ze8lv6mz5qh66sx9enn0jxg6"),(0,_r.Z)(hB,oB.TestnetOld,"inj1hdvy6tl89llqy3ze8lv6mz5qh66sx9enn0jxg6"),(0,_r.Z)(hB,oB.Devnet,"inj1hdvy6tl89llqy3ze8lv6mz5qh66sx9enn0jxg6"),(0,_r.Z)(hB,oB.Devnet1,"inj1hdvy6tl89llqy3ze8lv6mz5qh66sx9enn0jxg6"),(0,_r.Z)(hB,oB.Devnet2,"inj1hdvy6tl89llqy3ze8lv6mz5qh66sx9enn0jxg6"),(0,_r.Z)(hB,oB.Local,"inj1hdvy6tl89llqy3ze8lv6mz5qh66sx9enn0jxg6"),n(54659).Buffer,n(54659).Buffer,function(e){return e?(0,Br.Z)((0,Br.Z)({},e),{},{to:parseInt(e.to.toString()||"0",10),from:parseInt(e.from.toString()||"0",10),total:parseInt(e.total||"0",10)}):{to:0,from:0,total:0}});n(19868),n(54659).Buffer,n(54659).Buffer;n(47738),n(71409),n(79916),n(33638),n(29371),n(79698),n(54659).Buffer,n(54659).Buffer,n(54659).Buffer;var vB,wB=n(36130),kB=n(27904),AB=function(){return QS()?(0,kB.ReactNativeTransport)({withCredentials:!0}):JS()?(0,wB.NodeHttpTransport)():void 0};!function(e){e.UnBonded="UnBonded",e.UnBonding="UnBonding",e.Bonded="Bonded"}(vB||(vB={}));n(54659).Buffer,(0,Br.Z)({},qT);YS()||WC.grpc.setDefaultTransport(AB());n(54659).Buffer;var xB,IB,TB="SpotOrder",SB="DerivativeOrder",CB=("0x".concat(new tC(888).toString(16)),xB={EIP712Domain:[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"}]},(0,_r.Z)(xB,TB,[{name:"MarketId",type:"string"},{name:"OrderInfo",type:"OrderInfo"},{name:"Salt",type:"string"},{name:"OrderType",type:"string"},{name:"TriggerPrice",type:"string"}]),(0,_r.Z)(xB,SB,[{name:"MarketId",type:"string"},{name:"OrderInfo",type:"OrderInfo"},{name:"OrderType",type:"string"},{name:"Margin",type:"string"},{name:"TriggerPrice",type:"string"},{name:"Salt",type:"string"}]),(0,_r.Z)(xB,"OrderInfo",[{name:"SubaccountId",type:"string"},{name:"FeeRecipient",type:"string"},{name:"Price",type:"string"},{name:"Quantity",type:"string"}]),n(54659).Buffer,n(86578),n(54659).Buffer,function(e){(0,Fr.Z)(n,e);var t=(0,Lr.Z)(n);function n(){return(0,Gr.Z)(this,n),t.apply(this,arguments)}return(0,zr.Z)(n,[{key:"toProto",value:function(){var e=this.params,t=H_.create(),n=this.getMsgObject();if(t.msg=JSON.stringify(n),t.sender=e.sender,t.contract=e.contractAddress,e.funds){var a=(Array.isArray(e.funds)?e.funds:[e.funds]).map((function(e){return"".concat(e.amount).concat(e.denom)}));t.funds=a.join(",")}else t.funds="0";return H_.fromPartial(t)}},{key:"toData",value:function(){var e=this.toProto();return(0,Br.Z)({"@type":"/injective.wasmx.v1.MsgExecuteContractCompat"},e)}},{key:"toAmino",value:function(){var e=this.toProto(),t=(0,Br.Z)((0,Br.Z)({},GT(e)),{},{msg:JSON.stringify(this.getMsgObject())});return delete t.funds_list,{type:"wasmx/MsgExecuteContractCompat",value:t}}},{key:"toWeb3",value:function(){var e=this.toAmino().value;return(0,Br.Z)({"@type":"/injective.wasmx.v1.MsgExecuteContractCompat"},e)}},{key:"toDirectSign",value:function(){return{type:"/injective.wasmx.v1.MsgExecuteContractCompat",message:this.toProto()}}},{key:"toBinary",value:function(){return H_.encode(this.toProto()).finish()}},{key:"getMsgObject",value:function(){var e=this.params;if((e.exec||e.msg)&&e.execArgs)throw new _S(new Error("Please provide only one exec|msg argument"));if(e.execArgs)return e.execArgs.toExecData();if(e.exec)return(0,_r.Z)({},e.exec.action,e.exec.msg);if(e.msg)return e.msg;throw new _S(new Error("Please provide at least one exec argument"))}}],[{key:"fromJSON",value:function(e){return new n(e)}}]),n}(gC));!function(e){e.Sync="BROADCAST_MODE_SYNC",e.Async="BROADCAST_MODE_ASYNC",e.Block="BROADCAST_MODE_BLOCK"}(IB||(IB={}));n(54659).Buffer,n(47264),hE.SIGN_MODE_DIRECT,hE.SIGN_MODE_LEGACY_AMINO_JSON,n(26995),n(54659).Buffer,n(54659).Buffer;var EB,RB,MB,PB=function(){function e(){(0,Gr.Z)(this,e)}return(0,zr.Z)(e,null,[{key:"accountPortfolioResponseToAccountPortfolio",value:function(t){var n=t.portfolio,a=n.subaccounts||[];return{portfolioValue:n.portfolioValue,availableBalance:n.availableBalance,lockedBalance:n.lockedBalance,unrealizedPnl:n.unrealizedPnl,subaccountsList:a.map(e.grpcSubaccountPortfolioToSubaccountPortfolio)}}},{key:"grpcSubaccountPortfolioToSubaccountPortfolio",value:function(e){return{subaccountId:e.subaccountId,availableBalance:e.availableBalance,lockedBalance:e.lockedBalance,unrealizedPnl:e.unrealizedPnl}}},{key:"grpcAccountPortfolioToAccountPortfolio",value:function(t){return{portfolioValue:t.portfolioValue,availableBalance:t.availableBalance,lockedBalance:t.lockedBalance,unrealizedPnl:t.unrealizedPnl,subaccountsList:t.subaccounts.map(e.grpcSubaccountPortfolioToSubaccountPortfolio)}}},{key:"grpcAmountToAmount",value:function(e){return{amount:e.amount,denom:e.denom}}},{key:"grpcDepositToDeposit",value:function(e){return{totalBalance:e.totalBalance,availableBalance:e.availableBalance}}},{key:"balancesResponseToBalances",value:function(t){return t.balances.map((function(t){return e.grpcBalanceToBalance(t)}))}},{key:"balanceResponseToBalance",value:function(t){return e.grpcBalanceToBalance(t.balance)}},{key:"grpcBalanceToBalance",value:function(t){var n=t.deposit;return{subaccountId:t.subaccountId,accountAddress:t.accountAddress,denom:t.denom,deposit:n?e.grpcDepositToDeposit(n):void 0}}},{key:"grpcBalancesToBalances",value:function(t){return t.map((function(t){return e.grpcBalanceToBalance(t)}))}},{key:"grpcTransferHistoryEntryToTransferHistoryEntry",value:function(t){var n=t.amount;return{transferType:t.transferType,srcSubaccountId:t.srcSubaccountId,srcSubaccountAddress:t.srcAccountAddress,dstSubaccountId:t.dstSubaccountId,dstSubaccountAddress:t.dstAccountAddress,executedAt:parseInt(t.executedAt,10),amount:n?e.grpcAmountToAmount(n):void 0}}},{key:"tradingRewardsResponseToTradingRewards",value:function(t){return t.rewards.map(e.grpcTradingRewardToTradingReward)}},{key:"grpcTradingRewardsToTradingRewards",value:function(t){return t.map(e.grpcTradingRewardToTradingReward)}},{key:"grpcTradingRewardToTradingReward",value:function(e){return{accountAddress:e.accountAddress,rewards:e.rewards.map((function(e){return{amount:e.amount,denom:e.denom}})),distributedAt:parseInt(e.distributedAt,10)}}},{key:"transferHistoryResponseToTransferHistory",value:function(t){var n=t.transfers,a=t.paging;return{transfers:n.map((function(t){return e.grpcTransferHistoryEntryToTransferHistoryEntry(t)})),pagination:yB(a)}}},{key:"grpcTransferHistoryToTransferHistory",value:function(t){return t.map((function(t){return e.grpcTransferHistoryEntryToTransferHistoryEntry(t)}))}}]),e}();!function(e){e.Market="market",e.LimitFill="limitFill",e.LimitMatchRestingOrder="limitMatchRestingOrder",e.LimitMatchNewOrder="limitMatchNewOrder"}(EB||(EB={})),function(e){e.Maker="maker",e.Taker="taker"}(RB||(RB={})),function(e){e.Buy="buy",e.Sell="sell",e.Long="long",e.Short="short"}(MB||(MB={}));var UB;!function(e){e.Insert="insert",e.Delete="delete",e.Replace="replace",e.Update="update",e.Invalidate="invalidate"}(UB||(UB={}));var _B=(0,zr.Z)((function e(){(0,Gr.Z)(this,e)}));(0,_r.Z)(_B,"balanceStreamCallback",(function(e){var t=e.balance;return{balance:t?PB.grpcBalanceToBalance(t):void 0,operation:UB.Update,timestamp:e.timestamp}}));var BB=(0,zr.Z)((function e(){(0,Gr.Z)(this,e)}));(0,_r.Z)(BB,"accountPortfolioStreamCallback",(function(e){return{type:e.type,denom:e.denom,amount:e.amount,subaccountId:e.subaccountId}}));var DB=(0,zr.Z)((function e(){(0,Gr.Z)(this,e)}));(0,_r.Z)(DB,"bidsStreamCallback",(function(e){return{bid:{bidder:e.bidder,bidAmount:e.bidAmount,bidTimestamp:parseInt(e.timestamp,10)},operation:Q_.Insert}}));var NB=function(){function e(){(0,Gr.Z)(this,e)}return(0,zr.Z)(e,null,[{key:"grpcTokenMetaToTokenMeta",value:function(e){if(e)return{name:e.name,address:e.address,symbol:e.symbol,logo:e.logo,decimals:e.decimals,updatedAt:e.updatedAt,coinGeckoId:""}}},{key:"grpcPerpetualMarketInfoToPerpetualMarketInfo",value:function(e){if(e)return{hourlyFundingRateCap:e.hourlyFundingRateCap,hourlyInterestRate:e.hourlyInterestRate,nextFundingTimestamp:parseInt(e.nextFundingTimestamp,10),fundingInterval:parseInt(e.fundingInterval,10)}}},{key:"grpcPerpetualMarketFundingToPerpetualMarketFunding",value:function(e){if(e)return{cumulativeFunding:e.cumulativeFunding,cumulativePrice:e.cumulativePrice,lastTimestamp:parseInt(e.lastTimestamp,10)}}},{key:"grpcExpiryFuturesMarketInfoToExpiryFuturesMarketInfo",value:function(e){if(e)return{expirationTimestamp:parseInt(e.expirationTimestamp,10),settlementPrice:e.settlementPrice}}},{key:"marketResponseToMarket",value:function(t){var n=t.market;return e.grpcMarketToMarket(n)}},{key:"marketsResponseToMarkets",value:function(t){var n=t.markets;return e.grpcMarketsToMarkets(n)}},{key:"ordersResponseToOrders",value:function(t){var n=t.orders,a=t.paging;return{orders:e.grpcOrdersToOrders(n),pagination:yB(a)}}},{key:"orderHistoryResponseToOrderHistory",value:function(t){var n=t.orders,a=t.paging;return{orderHistory:e.grpcOrderHistoryListToOrderHistoryList(n),pagination:yB(a)}}},{key:"positionsResponseToPositions",value:function(t){var n=t.positions,a=t.paging;return{positions:e.grpcPositionsToPositions(n),pagination:yB(a)}}},{key:"tradesResponseToTrades",value:function(t){var n=t.trades,a=t.paging;return{trades:e.grpcTradesToTrades(n),pagination:yB(a)}}},{key:"subaccountTradesListResponseToSubaccountTradesList",value:function(t){var n=t.trades;return e.grpcTradesToTrades(n)}},{key:"fundingPaymentsResponseToFundingPayments",value:function(t){var n=t.payments,a=t.paging;return{fundingPayments:e.grpcFundingPaymentsToFundingPayments(n),pagination:yB(a)}}},{key:"fundingRatesResponseToFundingRates",value:function(t){var n=t.fundingRates,a=t.paging;return{fundingRates:e.grpcFundingRatesToFundingRates(n),pagination:yB(a)}}},{key:"orderbookV2ResponseToOrderbookV2",value:function(t){var n=t.orderbook;return e.grpcOrderbookV2ToOrderbookV2({sequence:parseInt(n.sequence,10),buys:null===n||void 0===n?void 0:n.buys,sells:null===n||void 0===n?void 0:n.sells})}},{key:"orderbooksV2ResponseToOrderbooksV2",value:function(t){return t.orderbooks.map((function(t){var n=t.orderbook;return{marketId:t.marketId,orderbook:e.grpcOrderbookV2ToOrderbookV2({sequence:parseInt(n.sequence,10),buys:n.buys,sells:n.sells})}}))}},{key:"binaryOptionsMarketResponseToBinaryOptionsMarket",value:function(t){var n=t.market;return e.grpcBinaryOptionsMarketToBinaryOptionsMarket(n)}},{key:"binaryOptionsMarketResponseWithPaginationToBinaryOptionsMarket",value:function(t){var n=t.markets,a=t.paging;return{markets:e.grpcBinaryOptionsMarketsToBinaryOptionsMarkets(n),pagination:yB(a)}}},{key:"binaryOptionsMarketsResponseToBinaryOptionsMarkets",value:function(t){var n=t.markets;return e.grpcBinaryOptionsMarketsToBinaryOptionsMarkets(n)}},{key:"grpcBinaryOptionsMarketToBinaryOptionsMarket",value:function(t){return{marketId:t.marketId,marketStatus:t.marketStatus,ticker:t.ticker,oracleSymbol:t.oracleSymbol,oracleProvider:t.oracleProvider,oracleType:t.oracleType,oracleScaleFactor:t.oracleScaleFactor,expirationTimestamp:parseInt(t.expirationTimestamp,10),settlementTimestamp:parseInt(t.settlementTimestamp,10),quoteDenom:t.quoteDenom,quoteToken:e.grpcTokenMetaToTokenMeta(t.quoteTokenMeta),makerFeeRate:t.makerFeeRate,takerFeeRate:t.takerFeeRate,serviceProviderFee:t.serviceProviderFee,minPriceTickSize:t.minPriceTickSize,minQuantityTickSize:t.minQuantityTickSize,settlementPrice:t.settlementPrice}}},{key:"grpcBinaryOptionsMarketsToBinaryOptionsMarkets",value:function(t){return t.map(e.grpcBinaryOptionsMarketToBinaryOptionsMarket)}},{key:"grpcMarketToMarket",value:function(t){return{oracleBase:t.oracleBase,oracleQuote:t.oracleQuote,oracleType:t.oracleType,oracleScaleFactor:t.oracleScaleFactor,initialMarginRatio:t.initialMarginRatio,maintenanceMarginRatio:t.maintenanceMarginRatio,isPerpetual:t.isPerpetual,marketId:t.marketId,marketStatus:t.marketStatus,ticker:t.ticker,quoteDenom:t.quoteDenom,quoteToken:e.grpcTokenMetaToTokenMeta(t.quoteTokenMeta),makerFeeRate:t.makerFeeRate,takerFeeRate:t.takerFeeRate,serviceProviderFee:t.serviceProviderFee,minPriceTickSize:new tC(t.minPriceTickSize).toNumber(),minQuantityTickSize:new tC(t.minQuantityTickSize).toNumber(),perpetualMarketInfo:e.grpcPerpetualMarketInfoToPerpetualMarketInfo(t.perpetualMarketInfo),perpetualMarketFunding:e.grpcPerpetualMarketFundingToPerpetualMarketFunding(t.perpetualMarketFunding),expiryFuturesMarketInfo:e.grpcExpiryFuturesMarketInfoToExpiryFuturesMarketInfo(t.expiryFuturesMarketInfo)}}},{key:"grpcMarketsToMarkets",value:function(t){return t.map((function(t){return e.grpcMarketToMarket(t)}))}},{key:"grpcPositionDeltaToPositionDelta",value:function(e){return{tradeDirection:e.tradeDirection,executionPrice:e.executionPrice,executionQuantity:e.executionQuantity,executionMargin:e.executionMargin}}},{key:"grpcPriceLevelToPriceLevel",value:function(e){return{price:e.price,quantity:e.quantity,timestamp:parseInt(e.timestamp,10)}}},{key:"grpcPriceLevelsToPriceLevels",value:function(t){return t.map((function(t){return e.grpcPriceLevelToPriceLevel(t)}))}},{key:"grpcOrderbookToOrderbook",value:function(t){var n=t.buys,a=t.sells;return{buys:e.grpcPriceLevelsToPriceLevels(n),sells:e.grpcPriceLevelsToPriceLevels(a)}}},{key:"grpcOrderbookV2ToOrderbookV2",value:function(t){var n=t.sequence,a=t.buys,o=t.sells;return{sequence:n,buys:e.grpcPriceLevelsToPriceLevels(a),sells:e.grpcPriceLevelsToPriceLevels(o)}}},{key:"grpcOrderToOrder",value:function(e){return{orderHash:e.orderHash,orderSide:e.orderSide,marketId:e.marketId,subaccountId:e.subaccountId,isReduceOnly:e.isReduceOnly,margin:e.margin,price:e.price,quantity:e.quantity,unfilledQuantity:e.unfilledQuantity,triggerPrice:e.triggerPrice,feeRecipient:e.feeRecipient,state:e.state,createdAt:parseInt(e.createdAt,10),updatedAt:parseInt(e.updatedAt,10),orderNumber:parseInt(e.orderNumber,10),triggerAt:parseInt(e.triggerAt,10),orderType:e.orderType,isConditional:e.isConditional,placedOrderHash:e.placedOrderHash,executionType:e.executionType}}},{key:"grpcOrdersToOrders",value:function(t){return t.map((function(t){return e.grpcOrderToOrder(t)}))}},{key:"grpcOrderHistoryToOrderHistory",value:function(e){return{orderHash:e.orderHash,marketId:e.marketId,isActive:e.isActive,subaccountId:e.subaccountId,executionType:e.executionType,orderType:e.orderType,price:e.price,triggerPrice:e.triggerPrice,quantity:e.quantity,filledQuantity:e.filledQuantity,state:e.state,createdAt:parseInt(e.createdAt,10),updatedAt:parseInt(e.updatedAt,10),triggerAt:parseInt(e.triggerAt,10),isReduceOnly:e.isReduceOnly,direction:e.direction,isConditional:e.isConditional,placedOrderHash:e.placedOrderHash,margin:e.margin}}},{key:"grpcOrderHistoryListToOrderHistoryList",value:function(t){return t.map((function(t){return e.grpcOrderHistoryToOrderHistory(t)}))}},{key:"grpcPositionToPosition",value:function(e){return{marketId:e.marketId,subaccountId:e.subaccountId,direction:e.direction,quantity:e.quantity,entryPrice:e.entryPrice,margin:e.margin,aggregateReduceOnlyQuantity:e.aggregateReduceOnlyQuantity,liquidationPrice:e.liquidationPrice,markPrice:e.markPrice,ticker:e.ticker,updatedAt:parseInt(e.updatedAt,10)}}},{key:"grpcPositionsToPositions",value:function(t){return t.map((function(t){return e.grpcPositionToPosition(t)}))}},{key:"grpcTradeToTrade",value:function(t){var n=t.positionDelta,a=n?e.grpcPositionDeltaToPositionDelta(n):{tradeDirection:tB.Buy,executionPrice:"0",executionQuantity:"0",executionMargin:"0"};return(0,Br.Z)({orderHash:t.orderHash,tradeId:t.tradeId,subaccountId:t.subaccountId,marketId:t.marketId,executedAt:parseInt(t.executedAt,10),tradeExecutionType:t.tradeExecutionType,executionSide:t.executionSide,fee:t.fee,feeRecipient:t.feeRecipient,isLiquidation:t.isLiquidation,payout:t.payout},a)}},{key:"grpcTradesToTrades",value:function(t){return t.map((function(t){return e.grpcTradeToTrade(t)}))}},{key:"grpcFundingPaymentToFundingPayment",value:function(e){return{marketId:e.marketId,subaccountId:e.subaccountId,amount:e.amount,timestamp:parseInt(e.timestamp,10)}}},{key:"grpcFundingPaymentsToFundingPayments",value:function(t){return t.map(e.grpcFundingPaymentToFundingPayment)}},{key:"grpcFundingRateToFundingRate",value:function(e){return{marketId:e.marketId,rate:e.rate,timestamp:parseInt(e.timestamp,10)}}},{key:"grpcFundingRatesToFundingRates",value:function(t){return t.map(e.grpcFundingRateToFundingRate)}}]),e}(),OB=(0,zr.Z)((function e(){(0,Gr.Z)(this,e)}));(0,_r.Z)(OB,"tradesStreamCallback",(function(e){var t=e.trade;return{trade:t?NB.grpcTradeToTrade(t):void 0,operation:e.operationType,timestamp:e.timestamp}})),(0,_r.Z)(OB,"positionStreamCallback",(function(e){var t=e.position;return{position:t?NB.grpcPositionToPosition(t):void 0,timestamp:e.timestamp}})),(0,_r.Z)(OB,"ordersStreamCallback",(function(e){var t=e.order;return{order:t?NB.grpcOrderToOrder(t):void 0,operation:e.operationType,timestamp:e.timestamp}})),(0,_r.Z)(OB,"orderHistoryStreamCallback",(function(e){var t=e.order;return{order:t?NB.grpcOrderHistoryToOrderHistory(t):void 0,operation:e.operationType,timestamp:e.timestamp}})),(0,_r.Z)(OB,"orderbookV2StreamCallback",(function(e){var t=e.orderbook;return{orderbook:t?NB.grpcOrderbookV2ToOrderbookV2({sequence:parseInt(t.sequence,10),buys:t.buys,sells:t.sells}):void 0,operation:e.operationType,marketId:e.marketId,timestamp:e.timestamp}})),(0,_r.Z)(OB,"orderbookUpdateStreamCallback",(function(e){var t=e.orderbookLevelUpdates;return{orderbook:t?NB.grpcOrderbookV2ToOrderbookV2({sequence:parseInt(t.sequence,10),buys:t.buys,sells:t.sells}):void 0,operation:e.operationType,marketId:e.marketId,timestamp:e.timestamp}}));var FB=n(54659).Buffer,LB=function(){function e(){(0,Gr.Z)(this,e)}return(0,zr.Z)(e,null,[{key:"getTxByTxHashResponseToTx",value:function(t){return e.grpcTransactionToTransaction(t)}},{key:"getAccountTxsResponseToAccountTxs",value:function(t){var n=t.data,a=t.paging;return{txs:e.grpcTransactionsToTransactionsFromDetail(n),pagination:yB(a)}}},{key:"getValidatorUptimeResponseToValidatorUptime",value:function(t){return t.data.map((function(t){return e.grpcValidatorUptimeToValidatorUptime(t)}))}},{key:"getPeggyDepositTxsResponseToPeggyDepositTxs",value:function(t){return t.field.map((function(t){return e.grpcPeggyDepositTx(t)}))}},{key:"getPeggyWithdrawalTxsResponseToPeggyWithdrawalTxs",value:function(t){return t.field.map((function(t){return e.grpcPeggyWithdrawalTx(t)}))}},{key:"getIBCTransferTxsResponseToIBCTransferTxs",value:function(t){return t.field.map((function(t){return e.grpcIBCTransferTxToIBCTransferTx(t)}))}},{key:"validatorResponseToValidator",value:function(t){var n=t.data;return{id:n.id,moniker:n.moniker,operatorAddress:n.operatorAddress,consensusAddress:n.consensusAddress,jailed:n.jailed,status:n.status,tokens:n.tokens,delegatorShares:n.delegatorShares,description:e.grpcValidatorDescriptionToValidatorDescription(n.description),unbondingHeight:parseInt(n.unbondingHeight,10),unbondingTime:n.unbondingTime,commissionRate:n.commissionRate,commissionMaxRate:n.commissionMaxRate,commissionMaxChangeRate:n.commissionMaxChangeRate,commissionUpdateTime:n.commissionUpdateTime,proposed:parseInt(n.proposed,10),signed:parseInt(n.signed,10),missed:parseInt(n.missed,10),uptimePercentage:n.uptimePercentage,timestamp:n.timestamp,uptimesList:n.uptimes.map(e.grpcValidatorUptimeToValidatorUptime),slashingEventsList:n.slashingEvents.map(e.grpcValidatorSlashingEventToValidatorSlashingEvent)}}},{key:"streamTxResponseToTxs",value:function(e){return{id:e.id,blockNumber:parseInt(e.blockNumber,10),blockTimestamp:e.blockTimestamp,hash:e.hash,codespace:e.codespace,messages:e.messages,txNumber:parseInt(e.txNumber,10),errorLog:e.errorLog,code:e.code}}},{key:"grpcGasFeeToGasFee",value:function(e){return{amounts:e.amount.map((function(e){return{amount:e.amount,denom:e.denom}})),gasLimit:parseInt(e.gasLimit,10),payer:e.payer,granter:e.granter}}},{key:"grpcTransactionToBankMsgSendTransaction",value:function(e){var t=e.data,n=JSON.parse(FB.from(t.messages).toString()),a=(0,Nr.Z)(n,1)[0];return{blockNumber:parseInt(t.blockNumber,10),blockTimestamp:t.blockTimestamp,hash:t.hash,amount:a.value.amount[0].amount,denom:a.value.amount[0].denom,sender:a.value.from_address,receiver:a.value.to_address}}},{key:"grpcTransactionToTransaction",value:function(t){var n=t.data;return{id:n.id,blockNumber:parseInt(n.blockNumber,10),blockTimestamp:n.blockTimestamp,hash:n.hash,code:n.code,info:n.info,gasWanted:parseInt(n.gasWanted,10),gasUsed:parseInt(n.gasUsed,10),codespace:n.codespace,data:n.data,gasFee:e.grpcGasFeeToGasFee(n.gasFee),txType:n.txType,signatures:n.signatures.map((function(e){return{pubkey:e.pubkey,address:e.address,sequence:parseInt(e.sequence,10),signature:e.signature}})),events:n.events.map((function(e){return{type:e.type,attributes:e.attributes}})),messages:JSON.parse(FB.from(n.messages).toString())}}},{key:"grpcTransactionsToTransactions",value:function(t){return t.map((function(t){return e.grpcTransactionToTransaction(t)}))}},{key:"grpcTransactionToTransactionFromDetail",value:function(t){var n=JSON.parse(FB.from(t.messages).toString("utf8"));return(0,Br.Z)((0,Br.Z)({},t),{},{gasWanted:parseInt(t.gasWanted,10),gasUsed:parseInt(t.gasUsed,10),blockNumber:parseInt(t.blockNumber,10),signatures:t.signatures.map((function(e){return{pubkey:e.pubkey,address:e.address,sequence:parseInt(e.sequence,10),signature:e.signature}})),gasFee:t.gasFee?e.grpcGasFeeToGasFee(t.gasFee):{gasLimit:0,payer:"",granter:"",amounts:[]},events:t.events.map((function(e){return{type:e.type,attributes:e.attributes}})),messages:n})}},{key:"grpcTransactionsToTransactionsFromDetail",value:function(t){return t.map(e.grpcTransactionToTransactionFromDetail)}},{key:"grpcBlockToBlock",value:function(e){return{height:parseInt(e.height,10),proposer:e.proposer,moniker:e.moniker,blockHash:e.blockHash,parentHash:e.parentHash,numPreCommits:parseInt(e.numPreCommits,10),numTxs:parseInt(e.numTxs,10),timestamp:e.timestamp}}},{key:"grpcBlockToBlockWithTxs",value:function(e){return{height:parseInt(e.height,10),proposer:e.proposer,moniker:e.moniker,blockHash:e.blockHash,parentHash:e.parentHash,numPreCommits:parseInt(e.numPreCommits,10),numTxs:parseInt(e.numTxs,10),timestamp:e.timestamp}}},{key:"grpcBlocksToBlocks",value:function(t){return t.map((function(t){return e.grpcBlockToBlock(t)}))}},{key:"grpcBlocksToBlocksWithTxs",value:function(t){return t.map((function(t){return e.grpcBlockToBlockWithTxs(t)}))}},{key:"grpcValidatorDescriptionToValidatorDescription",value:function(e){return{moniker:e.moniker,identity:e.identity,website:e.website,securityContact:e.securityContact,details:e.details}}},{key:"grpcValidatorUptimeToValidatorUptime",value:function(e){return{blockNumber:parseInt(e.blockNumber,10),status:e.status}}},{key:"grpcValidatorSlashingEventToValidatorSlashingEvent",value:function(e){return{blockNumber:parseInt(e.blockNumber,10),blockTimestamp:e.blockTimestamp,address:e.address,power:parseInt(e.power,10),reason:e.reason,jailed:e.jailed,missedBlocks:parseInt(e.missedBlocks,10)}}},{key:"grpcIBCTransferTxToIBCTransferTx",value:function(e){return{sender:e.sender,receiver:e.receiver,sourcePort:e.sourcePort,sourceChannel:e.sourceChannel,destinationPort:e.destinationPort,destinationChannel:e.destinationChannel,amount:e.amount,denom:e.denom,timeoutHeight:e.timeoutHeight,timeoutTimestamp:parseInt(e.timeoutTimestamp,10),packetSequence:parseInt(e.packetSequence,10),dataHex:e.dataHex,state:e.state,txHashesList:e.txHashes,createdAt:e.createdAt,updatedAt:e.updatedAt}}},{key:"grpcPeggyDepositTx",value:function(e){return{sender:e.sender,receiver:e.receiver,eventNonce:parseInt(e.eventNonce,10),eventHeight:parseInt(e.eventHeight,10),amount:e.amount,denom:e.denom,orchestratorAddress:e.orchestratorAddress,state:e.state,claimType:e.claimType,txHashesList:e.txHashes,createdAt:e.createdAt,updatedAt:e.updatedAt}}},{key:"grpcPeggyWithdrawalTx",value:function(e){return{sender:e.sender,receiver:e.receiver,amount:e.amount,denom:e.denom,bridgeFee:e.bridgeFee,outgoingTxId:parseInt(e.outgoingTxId,10),batchTimeout:parseInt(e.batchTimeout,10),batchNonce:parseInt(e.batchNonce,10),eventNonce:parseInt(e.eventNonce,10),eventHeight:parseInt(e.eventHeight,10),orchestratorAddress:e.orchestratorAddress,state:e.state,claimType:e.claimType,txHashesList:e.txHashes,createdAt:e.createdAt,updatedAt:e.updatedAt}}}]),e}(),jB=(0,zr.Z)((function e(){(0,Gr.Z)(this,e)}));(0,_r.Z)(jB,"blocksStreamCallback",(function(e){return{block:LB.grpcBlockToBlock(e),operation:UB.Insert}})),(0,_r.Z)(jB,"blocksWithTxsStreamCallback",(function(e){return{block:LB.grpcBlockToBlockWithTxs(e),operation:UB.Insert}})),(0,_r.Z)(jB,"transactionsStreamCallback",(function(e){return{block:LB.streamTxResponseToTxs(e),operation:UB.Insert}}));var HB,GB,zB=function(){function e(){(0,Gr.Z)(this,e)}return(0,zr.Z)(e,null,[{key:"grpcTokenMetaToTokenMeta",value:function(e){if(e)return{name:e.name,address:e.address,symbol:e.symbol,logo:e.logo,decimals:e.decimals,updatedAt:e.updatedAt,coinGeckoId:""}}},{key:"marketResponseToMarket",value:function(t){var n=t.market;return e.grpcMarketToMarket(n)}},{key:"marketsResponseToMarkets",value:function(t){var n=t.markets;return e.grpcMarketsToMarkets(n)}},{key:"ordersResponseToOrders",value:function(t){var n=t.orders,a=t.paging;return{orders:e.grpcOrdersToOrders(n),pagination:yB(a)}}},{key:"orderHistoryResponseToOrderHistory",value:function(t){var n=t.orders,a=t.paging;return{orderHistory:e.grpcOrderHistoryListToOrderHistoryList(n),pagination:yB(a)}}},{key:"tradesResponseToTrades",value:function(t){var n=t.trades,a=t.paging;return{trades:e.grpcTradesToTrades(n),pagination:yB(a)}}},{key:"subaccountTradesListResponseToTradesList",value:function(t){var n=t.trades;return e.grpcTradesToTrades(n)}},{key:"orderbookV2ResponseToOrderbookV2",value:function(t){var n=t.orderbook;return e.grpcOrderbookV2ToOrderbookV2({sequence:parseInt(n.sequence,10),buys:null===n||void 0===n?void 0:n.buys,sells:null===n||void 0===n?void 0:n.sells})}},{key:"orderbooksV2ResponseToOrderbooksV2",value:function(t){return t.orderbooks.map((function(t){var n=t.orderbook;return{marketId:t.marketId,orderbook:e.grpcOrderbookV2ToOrderbookV2({sequence:parseInt(n.sequence,10),buys:n.buys,sells:n.sells})}}))}},{key:"grpcMarketToMarket",value:function(t){return{marketId:t.marketId,marketStatus:t.marketStatus,ticker:t.ticker,baseDenom:t.baseDenom,quoteDenom:t.quoteDenom,quoteToken:e.grpcTokenMetaToTokenMeta(t.quoteTokenMeta),baseToken:e.grpcTokenMetaToTokenMeta(t.baseTokenMeta),makerFeeRate:t.makerFeeRate,takerFeeRate:t.takerFeeRate,serviceProviderFee:t.serviceProviderFee,minPriceTickSize:new tC(t.minPriceTickSize).toNumber(),minQuantityTickSize:new tC(t.minQuantityTickSize).toNumber()}}},{key:"grpcMarketsToMarkets",value:function(t){return t.map((function(t){return e.grpcMarketToMarket(t)}))}},{key:"grpcPriceLevelToPriceLevel",value:function(e){return{price:e.price,quantity:e.quantity,timestamp:parseInt(e.timestamp,10)}}},{key:"grpcPriceLevelsToPriceLevels",value:function(t){return t.map((function(t){return e.grpcPriceLevelToPriceLevel(t)}))}},{key:"grpcOrderbookToOrderbook",value:function(t){var n=t.buys,a=t.sells;return{buys:e.grpcPriceLevelsToPriceLevels(n),sells:e.grpcPriceLevelsToPriceLevels(a)}}},{key:"grpcOrderbookV2ToOrderbookV2",value:function(t){var n=t.buys,a=t.sells;return{sequence:t.sequence,buys:e.grpcPriceLevelsToPriceLevels(n),sells:e.grpcPriceLevelsToPriceLevels(a)}}},{key:"grpcOrderToOrder",value:function(e){return{orderHash:e.orderHash,orderSide:e.orderSide,marketId:e.marketId,subaccountId:e.subaccountId,price:e.price,state:e.state,quantity:e.quantity,unfilledQuantity:e.unfilledQuantity,triggerPrice:e.triggerPrice,feeRecipient:e.feeRecipient,createdAt:parseInt(e.createdAt,10),updatedAt:parseInt(e.updatedAt,10)}}},{key:"grpcOrdersToOrders",value:function(t){return t.map((function(t){return e.grpcOrderToOrder(t)}))}},{key:"grpcOrderHistoryToOrderHistory",value:function(e){return{orderHash:e.orderHash,marketId:e.marketId,active:e.isActive,subaccountId:e.subaccountId,executionType:e.executionType,orderType:e.orderType,price:e.price,triggerPrice:e.triggerPrice,quantity:e.quantity,filledQuantity:e.filledQuantity,state:e.state,createdAt:parseInt(e.createdAt,10),updatedAt:parseInt(e.updatedAt,10),direction:e.direction}}},{key:"grpcOrderHistoryListToOrderHistoryList",value:function(t){return t.map((function(t){return e.grpcOrderHistoryToOrderHistory(t)}))}},{key:"grpcTradeToTrade",value:function(t){var n=t.price,a=n?e.grpcPriceLevelToPriceLevel(n):{price:"0",quantity:"0",timestamp:0};return(0,Br.Z)({orderHash:t.orderHash,subaccountId:t.subaccountId,marketId:t.marketId,tradeId:t.tradeId,executedAt:parseInt(t.executedAt,10),feeRecipient:t.feeRecipient,tradeExecutionType:t.tradeExecutionType,executionSide:t.executionSide,tradeDirection:t.tradeDirection,fee:t.fee},a)}},{key:"grpcTradesToTrades",value:function(t){return t.map((function(t){return e.grpcTradeToTrade(t)}))}}]),e}(),KB=(0,zr.Z)((function e(){(0,Gr.Z)(this,e)}));(0,_r.Z)(KB,"pricesStreamCallback",(function(e){return{price:e.price,operation:UB.Update,timestamp:parseInt(e.timestamp,10)}})),(0,_r.Z)(KB,"pricesByMarketsCallback",(function(e){return(0,Br.Z)({},e)})),function(e){e.CosmosHub="channel-1",e.Evmos="channel-83",e.Osmosis="channel-8",e.Terra="channel-4",e.Axelar="channel-84",e.Persistence="channel-82",e.Chihuahua="channel-76",e.SecretNetwork="channel-88",e.Juno="channel-78",e.Stride="channel-89",e.Crescent="channel-90",e.Sommelier="channel-93"}(GB||(GB={}));var WB,ZB,VB=["channel-1","channel-4","channel-5","channel-6","channel-8","channel-13","channel-74","channel-76","channel-78","channel-82","channel-83","channel-84","channel-88","channel-89","channel-90","channel-93","channel-99","channel-104","channel-105"];HB={},(0,_r.Z)(HB,GB.Osmosis,{inj:"ibc/64BA6E31FE887D66C6F8F31C7B1A80C7CA179239677B4088BB55F5EA07DBE273"}),(0,_r.Z)(HB,GB.Crescent,{inj:"ibc/5A76568E079A31FA12165E4559BA9F1E9D4C97F9C2060B538C84DCD503815E30"}),(0,_r.Z)(HB,GB.Persistence,{inj:"ibc/D64E84758BCA42602C27E9ED2DB8F4EFDAE6A1E311CF404B516D45FEDF319D73"}),(0,_r.Z)(HB,GB.Stride,{inj:"ibc/A7454562FF29FE068F42F9DE4805ABEF54F599D1720B345D6518D9B5C64EA6D2"});!function(e){e.Ibc="ibc",e.Cw20="cw20",e.Spl="spl",e.Erc20="erc20",e.Native="native",e.TokenFactory="tokenFactory",e.InsuranceFund="insuranceFund",e.Unknown="unknown"}(WB||(WB={})),function(e){e.Solana="solana",e.Cosmos="cosmos",e.Ethereum="ethereum",e.EthereumWh="ethereum-wormhole"}(ZB||(ZB={}));var qB,QB,JB,YB,XB,$B={vARI:{name:"Aries",logo:"aries.svg",symbol:"vARI",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}},vTAU:{name:"Taurus",logo:"taurus.svg",symbol:"vTAU",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}},vGEM:{name:"Gemini",logo:"gemini.svg",symbol:"vGEM",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}},vCAN:{name:"Cancer",logo:"cancer.svg",symbol:"vCAN",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}},vLEO:{name:"Leo",logo:"leo.svg",symbol:"vLEO",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}},vVIR:{name:"Virgo",logo:"virgo.svg",symbol:"vVIR",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}},vLIB:{name:"Libra",logo:"libra.svg",symbol:"vLIB",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}},vSCOR:{name:"Scorpio",logo:"scorpio.svg",symbol:"vSCOR",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}},vSAG:{name:"Sagittarius",logo:"sagittarius.svg",symbol:"vSAG",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}},vCAP:{name:"Capricorn",logo:"capricorn.svg",symbol:"vCAP",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}},vAQUA:{name:"Aquarius",logo:"aquarius.svg",symbol:"vAQUA",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}},vPIS:{name:"Pisces",logo:"pisces.svg",symbol:"vPIS",decimals:18,coinGeckoId:"",cw20:{decimals:18,address:"",tokenType:WB.Cw20}}},eD={BTC:{name:"Bitcoin",symbol:"BTC",decimals:8,logo:"bitcoin.svg",coinGeckoId:"bitcoin",erc20:{decimals:8,address:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",tokenType:WB.Erc20}},wBTC:{name:"Wrapped Bitcoin",symbol:"wBTC",decimals:8,logo:"wbtc.svg",coinGeckoId:"wrapped-bitcoin",erc20:{decimals:8,address:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",tokenType:WB.Erc20},cw20s:[{decimals:18,symbol:"wBTC",source:ZB.Cosmos,address:"inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku",tokenType:WB.Cw20}]},ETH:{name:"Ethereum",symbol:"ETH",decimals:18,logo:"ethereum.svg",coinGeckoId:"ethereum",erc20:{decimals:18,isNative:!0,address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",tokenType:WB.Erc20}},wETH:{name:"Wrapped Ethereum",symbol:"wETH",decimals:18,logo:"ethereum.svg",coinGeckoId:"ethereum",erc20:{decimals:18,address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",tokenType:WB.Erc20}},INJ:{name:"Injective",symbol:"INJ",decimals:18,logo:"injective-v3.svg",coinGeckoId:"injective-protocol",erc20:{decimals:18,address:"0xe28b3B32B6c345A34Ff64674606124Dd5Aceca30",tokenType:WB.Erc20}},USDT:{name:"Tether",symbol:"USDT",decimals:6,logo:"usdt.svg",coinGeckoId:"tether",erc20:{decimals:6,address:"0xdAC17F958D2ee523a2206206994597C13D831ec7",tokenType:WB.Erc20}},USDC:{symbol:"USDC",name:"USD Coin",decimals:6,logo:"usdc.svg",coinGeckoId:"usd-coin",erc20:{decimals:6,symbol:"USDC",address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",tokenType:WB.Erc20},cw20s:[{decimals:6,symbol:"USDCet",source:ZB.EthereumWh,address:"inj1q6zlut7gtkzknkk773jecujwsdkgq882akqksk",tokenType:WB.Cw20},{decimals:6,symbol:"USDCso",source:ZB.Solana,address:"inj12pwnhtv7yat2s30xuf4gdk9qm85v4j3e60dgvu",tokenType:WB.Cw20}]},GRT:{name:"Graph Token",symbol:"GRT",decimals:18,logo:"graphToken.svg",coinGeckoId:"the-graph",erc20:{decimals:18,address:"0xc944E90C64B2c07662A292be6244BDf05Cda44a7",tokenType:WB.Erc20}},SNX:{name:"Synthetix Network Token",symbol:"SNX",decimals:18,logo:"synthetix.svg",coinGeckoId:"havven",erc20:{decimals:18,address:"0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F",tokenType:WB.Erc20}},BNB:{name:"Binance Coin",symbol:"BNB",decimals:18,logo:"bnb.svg",coinGeckoId:"binancecoin",erc20:{decimals:18,address:"0xB8c77482e45F1F44dE1745F52C74426C631bDD52",tokenType:WB.Erc20}},AAVE:{name:"Aave",symbol:"AAVE",decimals:18,logo:"AAVE.svg",coinGeckoId:"aave",erc20:{decimals:18,address:"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",tokenType:WB.Erc20}},YFI:{name:"yearn.finance",symbol:"YFI",logo:"yfi.svg",decimals:18,coinGeckoId:"yearn-finance",erc20:{decimals:18,address:"0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e",tokenType:WB.Erc20}},COMP:{name:"Compound",symbol:"COMP",decimals:18,logo:"comp.svg",coinGeckoId:"compound-coin",erc20:{decimals:18,address:"0xc00e94Cb662C3520282E6f5717214004A7f26888",tokenType:WB.Erc20}},ZRX:{name:"0x",symbol:"ZRX",decimals:18,logo:"zrx.svg",coinGeckoId:"0x",erc20:{decimals:18,address:"0xE41d2489571d322189246DaFA5ebDe1F4699F498",tokenType:WB.Erc20}},MATIC:{name:"Polygon",logo:"matic.svg",symbol:"MATIC",decimals:18,coinGeckoId:"matic-network",erc20:{decimals:18,address:"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0",tokenType:WB.Erc20}},UNI:{name:"Uniswap",symbol:"UNI",logo:"uni.svg",decimals:18,coinGeckoId:"uniswap",erc20:{decimals:18,address:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",tokenType:WB.Erc20}},DAI:{name:"Dai",symbol:"DAI",decimals:18,logo:"dai.svg",coinGeckoId:"dai",erc20:{decimals:18,address:"0x6B175474E89094C44Da98b954EedeAC495271d0F",tokenType:WB.Erc20}},LINK:{name:"Chainlink",symbol:"LINK",decimals:18,logo:"chainlink.svg",coinGeckoId:"chainlink",erc20:{decimals:18,address:"0x514910771AF9Ca656af840dff83E8264EcF986CA",tokenType:WB.Erc20}},SUSHI:{name:"SushiSwap",symbol:"SUSHI",decimals:18,logo:"sushi.svg",coinGeckoId:"sushi",erc20:{decimals:18,address:"0x6B3595068778DD592e39A122f4f5a5cF09C90fE2",tokenType:WB.Erc20}},AXS:{name:"Axie Infinity",symbol:"AXS",decimals:18,logo:"axs.png",coinGeckoId:"axie-infinity",erc20:{decimals:18,address:"0xBB0E17EF65F82Ab018d8EDd776e8DD940327B28b",tokenType:WB.Erc20}},"1INCH":{name:"1inch",symbol:"1INCH",decimals:18,logo:"1inch.png",coinGeckoId:"1inch",erc20:{decimals:18,address:"0x111111111117dC0aa78b770fA6A738034120C302",tokenType:WB.Erc20}},BAT:{name:"Basic Attention Token",symbol:"BAT",decimals:18,logo:"bat.png",coinGeckoId:"basic-attention-token",erc20:{decimals:18,address:"0x0D8775F648430679A709E98d2b0Cb6250d2887EF",tokenType:WB.Erc20}},BUSD:{name:"Binance USD",symbol:"BUSD",decimals:18,logo:"busd.png",coinGeckoId:"binance-usd",erc20:{decimals:18,address:"0x4Fabb145d64652a948d72533023f6E7A623C7C53",tokenType:WB.Erc20}},CEL:{name:"Celsius",symbol:"CEL",decimals:4,logo:"cel.png",coinGeckoId:"celsius-degree-token",erc20:{decimals:4,address:"0xaaAEBE6Fe48E54f431b0C390CfaF0b017d09D42d",tokenType:WB.Erc20}},CELL:{name:"Cellframe",symbol:"CELL",decimals:18,logo:"cell.png",coinGeckoId:"cellframe",erc20:{decimals:18,address:"0x26c8AFBBFE1EBaca03C2bB082E69D0476Bffe099",tokenType:WB.Erc20}},DEFI5:{name:"DEFI Top 5 Tokens Index",symbol:"DEFI5",decimals:18,logo:"defi5.png",coinGeckoId:"defi-top-5-tokens-index",erc20:{decimals:18,address:"0xfa6de2697D59E88Ed7Fc4dFE5A33daC43565ea41",tokenType:WB.Erc20}},ENJ:{name:"Enjin Coin",symbol:"ENJ",decimals:18,logo:"enj.png",coinGeckoId:"enjincoin",erc20:{decimals:18,address:"0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c",tokenType:WB.Erc20}},EVAI:{name:"Evai.io",symbol:"EVAI",decimals:8,logo:"evai.png",coinGeckoId:"evai",erc20:{decimals:8,address:"0x50f09629d0afDF40398a3F317cc676cA9132055c",tokenType:WB.Erc20}},FTM:{name:"Fantom",symbol:"FTM",decimals:18,logo:"ftm.png",coinGeckoId:"fantom",erc20:{decimals:18,address:"0x4E15361FD6b4BB609Fa63C81A2be19d873717870",tokenType:WB.Erc20}},HT:{name:"Huobi Token",symbol:"HT",decimals:18,logo:"ht.png",coinGeckoId:"huobi-token",erc20:{decimals:18,address:"0x6f259637dcD74C767781E37Bc6133cd6A68aa161",tokenType:WB.Erc20}},NEXO:{name:"Nexo",symbol:"NEXO",decimals:18,logo:"nexo.png",coinGeckoId:"nexo",erc20:{decimals:18,address:"0xB62132e35a6c13ee1EE0f84dC5d40bad8d815206",tokenType:WB.Erc20}},NOIA:{name:"Syntropy",symbol:"NOIA",decimals:18,logo:"noia.png",coinGeckoId:"noia-network",erc20:{decimals:18,address:"0xa8c8CfB141A3bB59FEA1E2ea6B79b5ECBCD7b6ca",tokenType:WB.Erc20}},OCEAN:{name:"Ocean Protocol",symbol:"OCEAN",decimals:18,logo:"ocean.png",coinGeckoId:"ocean-protocol",erc20:{decimals:18,address:"0x967da4048cD07aB37855c090aAF366e4ce1b9F48",tokenType:WB.Erc20}},PAXG:{name:"PAX Gold",symbol:"PAXG",decimals:18,logo:"paxg.png",coinGeckoId:"pax-gold",erc20:{decimals:18,address:"0x45804880De22913dAFE09f4980848ECE6EcbAf78",tokenType:WB.Erc20}},POOL:{name:"PoolTogether",symbol:"POOL",decimals:18,logo:"pool.png",coinGeckoId:"pooltogether",erc20:{decimals:18,address:"0x0cEC1A9154Ff802e7934Fc916Ed7Ca50bDE6844e",tokenType:WB.Erc20}},RUNE:{name:"THORChain (ERC20)",symbol:"RUNE",decimals:18,logo:"rune.png",coinGeckoId:"thorchain-erc20",erc20:{decimals:18,address:"0x3155BA85D5F96b2d030a4966AF206230e46849cb",tokenType:WB.Erc20}},SHIB:{name:"SHIBA INU",symbol:"SHIB",decimals:18,logo:"shib.png",coinGeckoId:"shiba-inu",erc20:{decimals:18,address:"0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE",tokenType:WB.Erc20}},STARS:{name:"Mogul Productions",symbol:"STARS",decimals:18,logo:"stars.png",coinGeckoId:"mogul-productions",erc20:{decimals:18,address:"0xc55c2175E90A46602fD42e931f62B3Acc1A013Ca",tokenType:WB.Erc20}},STT:{name:"Scatter.cx",symbol:"STT",decimals:18,logo:"scatter.webp",coinGeckoId:"scatter-cx",erc20:{decimals:18,address:"0xaC9Bb427953aC7FDDC562ADcA86CF42D988047Fd",tokenType:WB.Erc20}},SWAP:{name:"TrustSwap",symbol:"SWAP",decimals:18,logo:"trustswap.png",coinGeckoId:"trustswap",erc20:{decimals:18,address:"0xaC9Bb427953aC7FDDC562ADcA86CF42D988047Fd",tokenType:WB.Erc20}},UMA:{name:"UMA",symbol:"UMA",decimals:18,coinGeckoId:"uma",logo:"uma.png",erc20:{decimals:18,address:"0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828",tokenType:WB.Erc20}},UTK:{name:"Utrust",symbol:"UTK",decimals:18,logo:"utk.png",coinGeckoId:"utrust",erc20:{decimals:18,address:"0xdc9Ac3C20D1ed0B540dF9b1feDC10039Df13F99c",tokenType:WB.Erc20}},ATOM:{name:"Cosmos",symbol:"ATOM",decimals:6,logo:"atom.svg",coinGeckoId:"cosmos",erc20:{decimals:6,address:"0x8D983cb9388EaC77af0474fA441C4815500Cb7BB",tokenType:WB.Erc20},ibc:{decimals:6,isNative:!0,baseDenom:"uatom",path:"transfer/channel-1",channelId:"channel-1",hash:"624BA9DD171915A2B9EA70F69638B2CEA179959850C1A586F6C485498F29EDD4",tokenType:WB.Ibc}},UPHOTON:{name:"Cosmos Testnet",symbol:"UPHOTON",decimals:6,logo:"atom.svg",coinGeckoId:"cosmos",erc20:{decimals:6,address:"0x8D983cb9388EaC77af0474fA441C4815500Cb7BB",tokenType:WB.Erc20},ibc:{decimals:6,isNative:!0,baseDenom:"uphoton",path:"transfer/channel-2",channelId:"channel-2",hash:"48BC9C6ACBDFC1EBA034F1859245D53EA4BF74147189D66F27C23BF966335DFB",tokenType:WB.Ibc}},LUNA:{name:"Terra",symbol:"LUNA",decimals:6,logo:"luna.png",coinGeckoId:"terra-luna",erc20:{decimals:6,address:"0xd2877702675e6cEb975b4A1dFf9fb7BAF4C91ea9",tokenType:WB.Erc20},ibc:{decimals:6,isNative:!0,baseDenom:"uluna",path:"transfer/channel-4",channelId:"channel-4",hash:"B8AF5D92165F35AB31F3FC7C7B444B9D240760FA5D406C49D24862BD0284E395",tokenType:WB.Ibc}},UST:{name:"TerraUSD",baseDenom:"UUSD",symbol:"UST",logo:"ust.png",decimals:18,coinGeckoId:"terrausd",erc20:{decimals:18,address:"0xa47c8bf37f92aBed4A126BDA807A7b7498661acD",tokenType:WB.Erc20},ibc:{decimals:18,isNative:!0,baseDenom:"uusd",path:"transfer/channel-4",channelId:"channel-4",hash:"B448C0CA358B958301D328CCDC5D5AD642FC30A6D3AE106FF721DB315F3DDE5C",tokenType:WB.Ibc}},GF:{name:"GuildFi",symbol:"GF",decimals:18,logo:"gf.png",coinGeckoId:"guildfi",erc20:{decimals:18,address:"0xaaef88cea01475125522e117bfe45cf32044e238",tokenType:WB.Erc20}},XBX:{name:"BurnX",symbol:"XBX",decimals:18,logo:"xbx.png",coinGeckoId:"",erc20:{decimals:18,address:"0x080B12E80C9b45e97C23b6ad10a16B3e2a123949",tokenType:WB.Erc20}},OSMO:{name:"Osmosis",symbol:"OSMO",decimals:6,coinGeckoId:"osmosis",logo:"osmo.png",ibc:{decimals:6,isNative:!0,baseDenom:"uosmo",path:"transfer/channel-8",channelId:"channel-8",hash:"92E0120F15D037353CFB73C14651FC8930ADC05B93100FD7754D3A689E53B333",tokenType:WB.Ibc}},TAB:{name:"Injective",logo:"injective-v3.svg",symbol:"TAB",decimals:18,coinGeckoId:"injective-protocol",erc20:{decimals:18,address:"0x36B3D7ACe7201E28040eFf30e815290D7b37ffaD",tokenType:WB.Erc20}},HUAHUA:{name:"Chihuahua",symbol:"HUAHUA",decimals:6,logo:"chihuahua.jpeg",coinGeckoId:"chihuahua-token",ibc:{decimals:6,isNative:!0,baseDenom:"uhuahua",path:"transfer/channel-76",channelId:"channel-76",hash:"E7807A46C0B7B44B350DA58F51F278881B863EC4DCA94635DAB39E52C30766CB",tokenType:WB.Ibc}},JUNO:{name:"Juno",symbol:"JUNO",decimals:6,logo:"juno.jpeg",coinGeckoId:"juno-network",ibc:{decimals:6,isNative:!0,baseDenom:"ujuno",path:"transfer/channel-78",channelId:"channel-78",hash:"D50E26996253EBAA8C684B9CD653FE2F7665D7BDDCA3D48D5E1378CF6334F211",tokenType:WB.Ibc}},AXL:{name:"Axelar",logo:"axelar.jpeg",symbol:"AXL",decimals:6,coinGeckoId:"axelar",erc20:{decimals:6,address:"0x3eacbDC6C382ea22b78aCc158581A55aaF4ef3Cc",tokenType:WB.Erc20},ibc:{decimals:6,isNative:!0,baseDenom:"uaxl",path:"transfer/channel-84",channelId:"channel-84",hash:"B68C1D2682A8B69E20BB921E34C6A3A2B6D1E13E3E8C0092E373826F546DEE65",tokenType:WB.Ibc}},BAYC:{name:"Bored Ape Yacht Club",symbol:"BAYC",logo:"bayc.svg",decimals:18,coinGeckoId:""},APE:{name:"Ape Coin",symbol:"APE",decimals:18,logo:"ape.png",coinGeckoId:"apecoin",erc20:{decimals:18,address:"0x4d224452801ACEd8B2F0aebE155379bb5D594381",tokenType:WB.Erc20}},SCRT:{name:"Secret Network",symbol:"SCRT",decimals:6,logo:"scrt.png",coinGeckoId:"secret",ibc:{decimals:6,isNative:!0,baseDenom:"uscrt",path:"transfer/channel-88",channelId:"channel-88",hash:"0954E1C28EB7AF5B72D24F3BC2B47BBB2FDF91BDDFD57B74B99E133AED40972A",tokenType:WB.Ibc}},XPRT:{name:"Persistence",symbol:"XPRT",decimals:6,logo:"xprt.svg",coinGeckoId:"persistence",ibc:{decimals:6,isNative:!0,baseDenom:"uxprt",path:"transfer/channel-82",channelId:"channel-82",hash:"B786E7CBBF026F6F15A8DA248E0F18C62A0F7A70CB2DABD9239398C8B5150ABB",tokenType:WB.Ibc}},EVMOS:{name:"Evmos",symbol:"EVMOS",decimals:18,logo:"evmos.svg",coinGeckoId:"evmos",ibc:{decimals:18,isNative:!0,baseDenom:"aevmos",path:"transfer/channel-83",channelId:"channel-83",hash:"16618B7F7AC551F48C057A13F4CA5503693FBFF507719A85BC6876B8BD75F821",tokenType:WB.Ibc}},STX:{name:"Stacks",symbol:"STX",decimals:6,logo:"stacks.png",coinGeckoId:"blockstack"},DOT:{name:"Polkadot",symbol:"DOT",decimals:10,logo:"dot.jpeg",coinGeckoId:"polkadot",erc20:{decimals:10,address:"0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",tokenType:WB.Erc20},ibc:{decimals:10,isNative:!1,baseDenom:"dot-planck",path:"transfer/channel-84",channelId:"channel-84",hash:"624BA9DD171915A2B9EA70F69638B2CEA179959850C1A586F6C485498F29EDD4",tokenType:WB.Ibc},cw20:{decimals:10,address:"inj1spzwwtr2luljr300ng2gu52zg7wn7j44m92mdf",tokenType:WB.Cw20}},"DOT-PLANCK":{name:"Polkadot",symbol:"DOT",decimals:10,logo:"dot.jpeg",coinGeckoId:"polkadot",erc20:{decimals:10,address:"0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",tokenType:WB.Erc20}},STRD:{name:"Stride",symbol:"STRD",decimals:6,logo:"stride.png",coinGeckoId:"stride",ibc:{decimals:6,isNative:!0,baseDenom:"ustrd",path:"transfer/channel-89",channelId:"channel-89",hash:"3FDD002A3A4019B05A33D324B2F29748E77AF501BEA5C96D1F28B2D6755F9F25",tokenType:WB.Ibc}},CRE:{name:"Crescent",symbol:"CRE",decimals:6,logo:"crescent.jpeg",coinGeckoId:"crescent-network",ibc:{decimals:6,isNative:!0,baseDenom:"ucre",path:"transfer/channel-90",channelId:"channel-90",hash:"3A6DD3358D9F7ADD18CDE79BA10B400511A5DE4AE2C037D7C9639B52ADAF35C6",tokenType:WB.Ibc}},PROJ:{name:"PROJ",logo:"projx.png",symbol:"Proj",decimals:6,coinGeckoId:""},ASTRO:{name:"ASTRO",symbol:"ASTRO",decimals:6,logo:"astroport.png",coinGeckoId:"astroport-fi",ibc:{decimals:6,isNative:!0,baseDenom:"cw20:terra1nsuqsk6kh58ulczatwev87ttq2z6r3pusulg9r24mfj2fvtzd4uq3exn26",path:"transfer/channel-104",channelId:"channel-104",hash:"EBD5A24C554198EBAF44979C5B4D2C2D312E6EBAB71962C92F735499C7575839",tokenType:WB.Ibc}},SOL:{name:"Solana",symbol:"SOL",decimals:8,logo:"solana.svg",coinGeckoId:"solana",spl:{decimals:9,address:"",isNative:!0,tokenType:WB.Spl},cw20:{decimals:8,address:"inj1sthrn5ep8ls5vzz8f9gp89khhmedahhdkqa8z3",tokenType:WB.Cw20}},SOMM:{name:"Sommelier",symbol:"SOMM",decimals:6,logo:"sommelier.png",coinGeckoId:"sommelier",ibc:{decimals:6,isNative:!0,baseDenom:"usomm",path:"transfer/channel-93",channelId:"channel-93",hash:"34346A60A95EB030D62D6F5BDD4B745BE18E8A693372A8A347D5D53DBBB1328B",tokenType:WB.Ibc}},ETHBTCTREND:{name:"ETHBTC Trend",symbol:"ETHBTCTrend",decimals:18,logo:"ethbtctrend.svg",coinGeckoId:"",erc20:{decimals:18,address:"0x6b7f87279982d919Bbf85182DDeAB179B366D8f2",tokenType:WB.Erc20}},STEADYETH:{name:"SteadyETH",symbol:"SteadyETH",decimals:18,logo:"steadyeth.svg",coinGeckoId:"",erc20:{decimals:18,address:"0x3F07A84eCdf494310D397d24c1C78B041D2fa622",tokenType:WB.Erc20}},STEADYBTC:{name:"SteadyBTC",symbol:"SteadyBTC",decimals:18,logo:"steadybtc.svg",coinGeckoId:"",erc20:{decimals:18,address:"0x4986fD36b6b16f49b43282Ee2e24C5cF90ed166d",tokenType:WB.Erc20}},XPLA:{name:"XPLA",symbol:"XPLA",decimals:8,logo:"xpla.svg",coinGeckoId:"xpla",cw20:{decimals:8,address:"inj1j08452mqwadp8xu25kn9rleyl2gufgfjqjvewe",tokenType:WB.Cw20}},AVAX:{name:"AVAX",symbol:"WAVAX",decimals:8,logo:"avax.webp",coinGeckoId:"avalanche-2",cw20:{decimals:8,address:"inj18a2u6az6dzw528rptepfg6n49ak6hdzkny4um6",tokenType:WB.Cw20}},BONK:{name:"BONK",symbol:"BONK",decimals:5,logo:"bonk.jpeg",coinGeckoId:"bonk"},CHZ:{name:"Chiliz",symbol:"CHZ",decimals:18,logo:"chz.png",coinGeckoId:"chiliz",erc20:{decimals:18,address:"0x3506424F91fD33084466F402d5D97f05F8e3b4AF",tokenType:WB.Erc20},cw20:{decimals:8,address:"inj1q6kpxy6ar5lkxqudjvryarrrttmakwsvzkvcyh",tokenType:WB.Cw20}},CANTO:{name:"Canto",symbol:"CANTO",decimals:18,logo:"canto.webp",coinGeckoId:"canto",ibc:{decimals:18,isNative:!0,baseDenom:"acanto",path:"transfer/channel-99",channelId:"channel-99",hash:"C733F37CB50114AFE8053C320DF45D0AAD8B94F556EB306AC2ABA0B9963CDF0D",tokenType:WB.Ibc}},QAT:{name:"Test QAT",symbol:"QAT",decimals:18,logo:"injective-v3.svg",coinGeckoId:"injective-protocol",erc20:{decimals:18,address:"0x1902e18fEB1234D00d880f1fACA5C8d74e8501E9",tokenType:WB.Erc20},cw20:{decimals:8,address:"inj1m4g54lg2mhhm7a4h3ms5xlyecafhe4macgsuen",tokenType:WB.Cw20}},PUGGO:{name:"Puggo",symbol:"PUG",decimals:18,logo:"puggo.jpg",coinGeckoId:"",erc20:{decimals:18,address:"0xf9a06dE3F6639E6ee4F079095D5093644Ad85E8b",tokenType:WB.Erc20}},LDO:{name:"Lido DAO Token",symbol:"LDO",decimals:18,logo:"lido-dao.webp",coinGeckoId:"lido-dao",erc20:{decimals:18,address:"0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32",tokenType:WB.Erc20},cw20:{decimals:8,address:"inj1me6t602jlndzxgv2d7ekcnkjuqdp7vfh4txpyy",tokenType:WB.Cw20}},USDCfr:{name:"USDC Frontrunner",symbol:"USDCfr",decimals:6,logo:"usdc.svg",coinGeckoId:"usd-coin",erc20:{decimals:6,address:"0xf9152067989BDc8783fF586624124C05A529A5D1",tokenType:WB.Erc20}},ARB:{name:"Arbitrum",symbol:"ARB",decimals:18,logo:"arb.png",coinGeckoId:"arbitrum",erc20:{decimals:18,address:"0x912ce59144191c1204e64559fe8253a0e49e6548",tokenType:WB.Erc20},cw20:{decimals:8,address:"inj1d5vz0uzwlpfvgwrwulxg6syy82axa58y4fuszd",tokenType:WB.Cw20}},EUR:{name:"Euro",symbol:"EUR",decimals:6,logo:"eur.svg",coinGeckoId:""},GBP:{name:"British Pound",symbol:"GBP",decimals:6,logo:"gpb.svg",coinGeckoId:""},JPY:{name:"Japanese Yen",symbol:"JPY",decimals:6,logo:"jpy.svg",coinGeckoId:""},BRZ:{name:"Brazilian Digital Token",symbol:"BRZ",decimals:4,logo:"brz.png",coinGeckoId:"brz",erc20:{decimals:4,address:"0x420412e765bfa6d85aaac94b4f7b708c89be2e2b",tokenType:WB.Erc20},cw20:{decimals:4,address:"inj14jesa4q248mfxztfc9zgpswkpa4wx249mya9kk",tokenType:WB.Cw20}},ASTR:{name:"Astar",symbol:"ASTR",decimals:18,logo:"astar.svg",coinGeckoId:"astar",cw20:{decimals:18,address:"inj1mhmln627samtkuwe459ylq763r4n7n69gxxc9x",tokenType:WB.Cw20}},XAU:{name:"Gold",symbol:"XAU",decimals:6,logo:"gold.svg",coinGeckoId:""},ALPHA:{name:"Alpha Coin",symbol:"ALPHA",decimals:6,logo:"alpha.png",coinGeckoId:"alphacoin",erc20:{decimals:6,address:"0x138c2f1123cf3f82e4596d097c118eac6684940b",tokenType:WB.Erc20},cw20:{decimals:6,address:"inj1zwnsemwrpve3wrrg0njj89w6mt5rmj9ydkc46u",tokenType:WB.Cw20}},WMATIC:{name:"Wrapped Matic",symbol:"WMATIC",decimals:18,logo:"matic.webp",coinGeckoId:"wmatic",erc20:{decimals:18,address:"0x7c9f4C87d911613Fe9ca58b579f737911AAD2D43",tokenType:WB.Erc20},cw20:{decimals:8,address:"inj1dxv423h8ygzgxmxnvrf33ws3k94aedfdevxd8h",tokenType:WB.Cw20}}},tD=(0,Br.Z)((0,Br.Z)({},eD),$B),nD=Object.keys(tD).filter((function(e){return tD[e].ibc})).map((function(e){return tD[e].ibc.baseDenom})),aD=tD,oD=function(e){var t,n=e.denom;return(null===(t=e.cw20s)||void 0===t?void 0:t.find((function(e){return n.includes(e.address)})))||e.cw20||void 0},rD=function(e){return e===oC?WB.Native:e.startsWith("inj")?WB.Cw20:e.startsWith("ibc")?WB.Ibc:e.startsWith("factory/")?WB.TokenFactory:e.startsWith("peggy")?WB.Erc20:e.startsWith("share")?WB.InsuranceFund:WB.Cw20},iD=function(e){if(e.denom.startsWith("factory/")){var t=oD(e);return(null===t||void 0===t?void 0:t.symbol)||e.symbol}var n,a;return e.denom.startsWith("peggy")?(null===(n=e.erc20)||void 0===n?void 0:n.symbol)||e.symbol:e.denom.startsWith("ibc")&&(null===(a=e.ibc)||void 0===a?void 0:a.symbol)||e.symbol},sD=function(e){if(e.denom===oC)return e.decimals;var t,n,a;if(e.denom.startsWith("inj"))return(null===(t=e.cw20)||void 0===t?void 0:t.decimals)||e.decimals;if(e.denom.startsWith("factory/")){var o=oD(e);return(null===o||void 0===o?void 0:o.decimals)||e.decimals}return e.denom.startsWith("ibc")?(null===(n=e.ibc)||void 0===n?void 0:n.decimals)||e.decimals:e.denom.startsWith("peggy")?(null===(a=e.erc20)||void 0===a?void 0:a.decimals)||e.decimals:(e.denom.startsWith("share"),e.decimals)},cD=function(e,t){var n,a=nD.includes(t||"")||(null===(n=e.ibc)||void 0===n?void 0:n.baseDenom)===t?WB.Ibc:rD(t||""),o=(0,Br.Z)((0,Br.Z)({},e),{},{tokenType:a,denom:t||""}),r=(0,Br.Z)((0,Br.Z)({},o),{},{tokenType:a,decimals:sD(o),symbol:iD(o)});return[WB.TokenFactory,WB.Cw20].includes(a)?r.cw20?(0,Br.Z)((0,Br.Z)({},r),{},{cw20s:[]}):r.cw20s?(0,Br.Z)((0,Br.Z)((0,Br.Z)({},r),function(e,t){var n=e.cw20,a=e.cw20s,o=e.denom||"";if(n||a){if(n)return(0,Br.Z)((0,Br.Z)({},e),{},{cw20:n,denom:n.address,tokenType:rD(n.address)});if(a){if(o){var r=o.startsWith("inj")?[o]:o.split("/").reverse(),i=(0,Nr.Z)(r,1)[0],s=a.find((function(e){return e.address===i}));return s?(0,Br.Z)((0,Br.Z)({},e),{},{cw20:s,denom:s.address,symbol:s.symbol,tokenType:rD(s.address)}):void 0}if(t){var c=a.find((function(e){return e.source===t}));return c?(0,Br.Z)((0,Br.Z)({},e),{},{cw20:c,denom:c.address,symbol:c.symbol,tokenType:rD(c.address)}):void 0}}}}((0,Br.Z)((0,Br.Z)({},r),{},{denom:t,tokenType:WB.Cw20}))),{},{tokenType:a,denom:r.denom}):r:r},uD=function(){function e(t,n){(0,Gr.Z)(this,e),(0,_r.Z)(this,"denom",void 0),(0,_r.Z)(this,"meta",void 0),this.denom=t,this.meta=n}return(0,zr.Z)(e,[{key:"toToken",value:function(){var e=this.meta,t=this.denom;return(0,Br.Z)((0,Br.Z)({},e),{},{denom:t,tokenType:rD(t)})}},{key:"symbol",get:function(){var e=this.meta,t=this.denom;if(t.startsWith("inj")||t.startsWith("factory/")){var n=t.startsWith("inj")?[t]:t.split("/").reverse(),a=(0,Nr.Z)(n,1)[0];if(!e.cw20)return e.symbol;if(!Array.isArray(e.cw20))return e.symbol;var o=e.cw20.find((function(e){return e.address===a}));return o?o.symbol:e.symbol}return e.symbol}},{key:"logo",get:function(){return this.meta.logo}},{key:"coinGeckoId",get:function(){return this.meta.coinGeckoId}},{key:"name",get:function(){return this.meta.symbol}},{key:"splDecimals",get:function(){var e=this.meta;return e.spl?e.spl.decimals:e.decimals}},{key:"cw20Decimals",get:function(){var e=this.denom,t=this.meta;if(!e.startsWith("inj")||e.startsWith("factory/"))return t.decimals;var n=e.startsWith("inj")?[e]:e.split("/").reverse(),a=(0,Nr.Z)(n,1)[0];if(!t.cw20)return t.decimals;if(!Array.isArray(t.cw20))return t.cw20.decimals;var o=t.cw20.find((function(e){return e.address===a}));return o?o.decimals:t.decimals}},{key:"erc20Decimals",get:function(){var e=this.meta;return e.erc20?e.erc20.decimals:e.decimals}},{key:"decimals",get:function(){var e=this.denom,t=this.meta;if(e.startsWith("inj")||e.startsWith("factory/")){var n=e.startsWith("inj")?[e]:e.split("/").reverse(),a=(0,Nr.Z)(n,1)[0];if(!t.cw20)return t.decimals;if(!Array.isArray(t.cw20))return t.cw20.decimals;var o=t.cw20.find((function(e){return e.address===a}));return o?o.decimals:t.decimals}return e.startsWith("peggy")?t.erc20?t.erc20.decimals:t.decimals:e.startsWith("ibc")&&t.ibc?t.ibc.decimals:t.decimals}},{key:"address",get:function(){var e=this.denom,t=this.meta;if(e.startsWith("inj")||e.startsWith("factory/")){var n=e.startsWith("inj")?[e]:e.split("/").reverse();return(0,Nr.Z)(n,1)[0]}return e.startsWith("peggy")?t.erc20?t.erc20.address:"":e.startsWith("ibc")&&t.erc20?t.erc20.address:""}},{key:"tokenType",get:function(){var e=this.denom;return rD(e)}},{key:"isCanonical",get:function(){return function(e){if(!e.denom.startsWith("ibc/")||!e.ibc)return!1;var t=e.ibc.path.replace("transfer/","").split("/");if(t.length>1)return!1;var n=(0,Nr.Z)(t,1)[0];return VB.includes(n)}(this.toToken())}}],[{key:"fromMeta",value:function(t,n){if(!t.denom&&!n)throw new _S(new Error("Please provide a ".concat(n)));return new e(t.denom||n,t)}},{key:"fromToken",value:function(t){return new e(t.denom,t)}}]),e}(),dD=function(){function e(t){(0,Gr.Z)(this,e),(0,_r.Z)(this,"tokens",void 0),(0,_r.Z)(this,"tokensByErc20Address",void 0),(0,_r.Z)(this,"tokensByCw20Address",void 0),(0,_r.Z)(this,"tokensByHash",void 0),(0,_r.Z)(this,"tokensByName",void 0),this.tokens=function(e){return Object.keys(e).reduce((function(t,n){var a,o,r,i=e[n];if(i.ibc&&i.ibc.baseDenom)return(0,Br.Z)((0,Br.Z)({},t),{},(a={},(0,_r.Z)(a,i.ibc.baseDenom.toUpperCase(),i),(0,_r.Z)(a,i.symbol.toUpperCase(),i),a));if(i.cw20&&i.cw20.address)return(0,Br.Z)((0,Br.Z)({},t),{},(o={},(0,_r.Z)(o,i.cw20.address.toUpperCase(),i),(0,_r.Z)(o,i.symbol.toUpperCase(),i),o));if(i.spl&&i.spl.address)return(0,Br.Z)((0,Br.Z)({},t),{},(r={},(0,_r.Z)(r,i.spl.address.toUpperCase(),i),(0,_r.Z)(r,i.symbol.toUpperCase(),i),r));if(i.cw20s){var s=i.cw20s.reduce((function(e,t){return(0,Br.Z)((0,Br.Z)({},e),{},(0,_r.Z)({},t.symbol.toUpperCase(),i))}),{});return(0,Br.Z)((0,Br.Z)((0,Br.Z)({},t),s),{},(0,_r.Z)({},i.symbol.toUpperCase(),i))}return(0,Br.Z)((0,Br.Z)({},t),{},(0,_r.Z)({},i.symbol.toUpperCase(),i))}),{})}(t),this.tokensByErc20Address=function(e){return Object.keys(e).filter((function(t){return!!e[t].erc20})).reduce((function(t,n){return e[n].erc20?(0,Br.Z)((0,Br.Z)({},t),{},(0,_r.Z)({},e[n].erc20.address,e[n])):t}),{})}(this.tokens),this.tokensByCw20Address=function(e){return Object.keys(e).filter((function(t){return e[t].cw20||e[t].cw20s})).reduce((function(t,n){if(!e[n].cw20&&!e[n].cw20s)return t;var a=e[n];if(a.cw20)return(0,Br.Z)((0,Br.Z)({},t),{},(0,_r.Z)({},a.cw20.address,e[n]));if(a.cw20s){var o=a.cw20s.reduce((function(t,a){return(0,Br.Z)((0,Br.Z)({},t),{},(0,_r.Z)({},a.address,e[n]))}),{});return(0,Br.Z)((0,Br.Z)({},t),o)}return t}),{})}(this.tokens),this.tokensByHash=function(e){return Object.keys(e).reduce((function(t,n){return e[n].ibc?(0,Br.Z)((0,Br.Z)({},t),{},(0,_r.Z)({},e[n].ibc.hash.toUpperCase(),e[n])):t}),{})}(this.tokens),this.tokensByName=function(e){return Object.keys(e).reduce((function(t,n){return(0,Br.Z)((0,Br.Z)({},t),{},(0,_r.Z)({},e[n].name.toLowerCase(),e[n]))}),{})}(this.tokens)}return(0,zr.Z)(e,[{key:"getMetaBySymbol",value:function(e){var t=this.tokens,n=e.toUpperCase();if(t[n]||t[e])return t[n]||t[e]}},{key:"getMetaByAddress",value:function(e){return e.startsWith("0x")?this.getMetaByErc20Address(e):this.getMetaByCw20Address(e)}},{key:"getMetaByCw20Address",value:function(e){var t=this.tokensByCw20Address,n=e.toLowerCase();if(t[n]||t[e]){var a=t[n]||t[e];return a?(0,Br.Z)((0,Br.Z)({},a),{},{tokenType:WB.Cw20}):void 0}}},{key:"getMetaByErc20Address",value:function(e){var t=this.tokensByErc20Address,n=e.toLowerCase();if(!t[n]&&!t[e]){var a=Object.keys(t).find((function(t){return t.toLowerCase()===e||t.toLowerCase()===n}));return a?(0,Br.Z)((0,Br.Z)({},t[a]),{},{tokenType:WB.Erc20}):void 0}var o=t[n]||t[e];return o?(0,Br.Z)((0,Br.Z)({},o),{},{tokenType:WB.Erc20}):void 0}},{key:"getMetaByHash",value:function(e){var t=this.tokensByHash,n=e.toUpperCase().replace("IBC/","");if(t[n]||t[e]){var a=t[n]||t[e];return a?(0,Br.Z)((0,Br.Z)({},a),{},{tokenType:WB.Ibc}):void 0}}},{key:"getMetaByName",value:function(e){var t=this.tokensByName,n=e.toLowerCase();if(t[n]||t[e])return t[n]||t[e]}},{key:"getCoinGeckoIdFromSymbol",value:function(e){var t=this.tokens,n=e.toUpperCase();return t[n]&&t[n].coinGeckoId||""}}]),e}(),lD={INJ:"0xBe8d71D26525440A03311cc7fa372262c5354A3c"},fD={INJ:"0xBe8d71D26525440A03311cc7fa372262c5354A3c"},pD={INJ:"0xBe8d71D26525440A03311cc7fa372262c5354A3c"},bD=function(e,t){var n=aD[e];return aD[e].erc20&&t?(0,Br.Z)((0,Br.Z)({},n),{},{erc20:(0,Br.Z)((0,Br.Z)({},aD[e].erc20),t?{address:t}:{})}):n},mD=function(){return Object.keys(aD).reduce((function(e,t){var n=t,a=lD[n];return(0,Br.Z)((0,Br.Z)({},e),{},(0,_r.Z)({},n.toUpperCase(),bD(t,a)))}),{})},hD=function(){return Object.keys(aD).reduce((function(e,t){var n=t,a=fD[n];return(0,Br.Z)((0,Br.Z)({},e),{},(0,_r.Z)({},n.toUpperCase(),bD(t,a)))}),{})},gD=function(){return Object.keys(aD).reduce((function(e,t){var n=t,a=pD[n];return(0,Br.Z)((0,Br.Z)({},e),{},(0,_r.Z)({},n.toUpperCase(),bD(t,a)))}),{})},yD={INJ:"0xAD1794307245443B3Cb55d88e79EEE4d8a548C03",USDT:"0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5",APE:"0x44C21afAaF20c270EBbF5914Cfc3b5022173FEB7",USDC:"0x07865c6E87B9F70255377e024ace6630C1Eaa37F",wETH:"0xdB309Bb079EB419C18fe7D568c61cD2FdB65D9aF"},vD={SOL:"inj12ngevx045zpvacus9s6anr258gkwpmthnz80e9",USDC:{USDCet:"inj12sqy9uzzl3h3vqxam7sz9f0yvmhampcgesh3qw"}},wD={ASTRO:{hash:"E8AC6B792CDE60AB208CA060CA010A3881F682A7307F624347AB71B6A0B0BF89",path:"transfer/channel-13",channelId:"channel-13",baseDenom:"ASTRO"}},kD=function(){return Object.keys(aD).reduce((function(e,t){var n=(0,Br.Z)({},aD[t]);if(!n.erc20&&!n.cw20&&!n.cw20s&&!n.ibc)return(0,Br.Z)((0,Br.Z)({},e),{},(0,_r.Z)({},t.toUpperCase(),n));var a=yD[t],o=vD[t],r=wD[t];if(!a&&!o&&!r)return(0,Br.Z)((0,Br.Z)({},e),{},(0,_r.Z)({},t.toUpperCase(),n));var i=(0,Br.Z)({},n);if(r&&i.ibc&&(i.ibc=(0,Br.Z)((0,Br.Z)({},i.ibc),{},{hash:r.hash,path:r.path,channelId:r.channelId})),a&&i.erc20&&(i.erc20.address=a),o&&(i.cw20&&"string"===typeof o&&(i.cw20.address=o),i.cw20s&&"string"!==typeof o)){var s=i.cw20s.map((function(e){var t=e.symbol;return o[t]?(0,Br.Z)((0,Br.Z)({},e),{},{address:o[t]}):e}));i.cw20s=s}return(0,Br.Z)((0,Br.Z)({},e),{},(0,_r.Z)({},t.toUpperCase(),i))}),{})},AD=function(){function e(t){(0,Gr.Z)(this,e),(0,_r.Z)(this,"tokenMetaUtils",void 0),this.tokenMetaUtils=t}return(0,zr.Z)(e,[{key:"toToken",value:function(e){var t=e.startsWith("ibc/")||e.startsWith("peggy")||e.startsWith("factory/");if(e===oC)return cD(this.tokenMetaUtils.getMetaBySymbol(e),e);try{if(!t){var n=this.tokenMetaUtils.getMetaBySymbol(e);if(n)return cD(n,e);var a=this.tokenMetaUtils.getMetaByAddress(e);if(a)return cD(a,e);var o=this.tokenMetaUtils.getMetaByName(e);return o?cD(o,e):void 0}if(e.startsWith("ibc/")){var r=this.getIbcDenomTokenMeta(e);return r?cD(r,e):void 0}if(e.startsWith("factory/")){var i=this.getFactoryDenomTokenMeta(e);return i?cD(i,e):void 0}if(e.startsWith("peggy")){var s=this.getPeggyDenomTokenMeta(e);return s?cD(s,e):void 0}var c=this.getCw20DenomTokenMeta(e);return c?cD(c,e):void 0}catch(sK){return}}},{key:"toTokenInfo",value:function(e){var t=this.toToken(e);return t?uD.fromToken(t):void 0}},{key:"getPeggyDenomTokenMeta",value:function(e){var t=e.startsWith("peggy")?e.replace("peggy",""):e;if(!t.startsWith("0x"))throw new _S(new Error("The address ".concat(t," is not a valid ERC20 address")));if(42!==t.length)throw new _S(new Error("The address ".concat(t," is not a valid ERC20 address")));return this.tokenMetaUtils.getMetaByAddress(t)}},{key:"getCw20DenomTokenMeta",value:function(e){if(!e.startsWith("inj"))throw new _S(new Error("The address ".concat(e," is not a valid CW20 address")));return this.tokenMetaUtils.getMetaByAddress(e)}},{key:"getIbcDenomTokenMeta",value:function(e){return this.tokenMetaUtils.getMetaByHash(e)}},{key:"getFactoryDenomTokenMeta",value:function(e){var t=e.split("/").reverse(),n=(0,Nr.Z)(t,1)[0];if(!n||!n.startsWith("inj"))throw new _S(new Error("The address ".concat(n," is not a valid CW20 address")));var a=this.tokenMetaUtils.getMetaByAddress(n);return a?(0,Br.Z)((0,Br.Z)({},a),{},{tokenType:WB.TokenFactory}):void 0}}],[{key:"make",value:function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:oB.Mainnet){case oB.Staging:case oB.Mainnet:case oB.MainnetK8s:case oB.MainnetLB:case oB.Local:return new e(new dD(aD));case oB.Devnet:return new e(new dD(mD()));case oB.Devnet1:return new e(new dD(hD()));case oB.Devnet2:return new e(new dD(gD()));case oB.Testnet:case oB.TestnetOld:case oB.TestnetK8s:return new e(new dD(kD()));default:return new e(new dD(aD))}}}]),e}(),xD=function(){function e(){(0,Gr.Z)(this,e)}return(0,zr.Z)(e,null,[{key:"make",value:function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:oB.Mainnet){case oB.Staging:case oB.Mainnet:case oB.MainnetK8s:case oB.MainnetLB:case oB.Local:return new dD(aD);case oB.Devnet:return new dD(mD());case oB.Devnet1:return new dD(hD());case oB.Devnet2:return new dD(gD());case oB.Testnet:case oB.TestnetOld:case oB.TestnetK8s:return new dD(kD());default:return new dD(aD)}}}]),e}(),ID=(xD.make(),AD.make(),new nC(0),(0,zr.Z)((function e(){(0,Gr.Z)(this,e)})));(0,_r.Z)(ID,"tradesStreamCallback",(function(e){var t=e.trade;return{trade:t?zB.grpcTradeToTrade(t):void 0,operation:e.operationType,timestamp:e.timestamp}})),(0,_r.Z)(ID,"ordersStreamCallback",(function(e){var t=e.order;return{order:t?zB.grpcOrderToOrder(t):void 0,operation:e.operationType,timestamp:e.timestamp}})),(0,_r.Z)(ID,"orderHistoryStreamCallback",(function(e){var t=e.order;return{order:t?zB.grpcOrderHistoryToOrderHistory(t):void 0,operation:e.operationType,timestamp:e.timestamp}})),(0,_r.Z)(ID,"orderbookV2StreamCallback",(function(e){var t=e.orderbook;return{orderbook:t?zB.grpcOrderbookV2ToOrderbookV2({sequence:parseInt(t.sequence,10),buys:t.buys,sells:t.sells}):void 0,operation:e.operationType,marketId:e.marketId,timestamp:e.timestamp}})),(0,_r.Z)(ID,"orderbookUpdateStreamCallback",(function(e){var t=e.orderbookLevelUpdates;return{orderbook:t?zB.grpcOrderbookV2ToOrderbookV2({sequence:parseInt(t.sequence,10),buys:t.buys,sells:t.sells}):void 0,operation:e.operationType,marketId:e.marketId,timestamp:e.timestamp}})),function(e){e.Internal="internal",e.External="external",e.Withdraw="withdraw",e.Deposit="deposit"}(qB||(qB={})),function(e){e[e.AccessTypeUnspecified=0]="AccessTypeUnspecified",e[e.AccessTypeNobody=1]="AccessTypeNobody",e[e.AccessTypeOnlyAddress=2]="AccessTypeOnlyAddress",e[e.AccessTypeEverybody=3]="AccessTypeEverybody"}(QB||(QB={})),function(e){e.AccessTypeUnspecified="Unspecified",e.AccessTypeNobody="Nobody",e.AccessTypeOnlyAddress="Only Address",e.AccessTypeEverybody="Everybody"}(JB||(JB={})),function(e){e.Proposed="proposed",e.Signed="signed",e.Missed="missed"}(YB||(YB={})),function(e){e.Pending="pending",e.Disbursed="disbursed"}(XB||(XB={}));(0,Br.Z)({},QT);var TD=null;try{TD=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(sK){}function SD(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function CD(e){return!0===(e&&e.__isLong__)}function ED(e){var t=Math.clz32(e&-e);return e?31-t:t}SD.prototype.__isLong__,Object.defineProperty(SD.prototype,"__isLong__",{value:!0}),SD.isLong=CD;var RD={},MD={};function PD(e,t){var n,a,o;return t?(o=0<=(e>>>=0)&&e<256)&&(a=MD[e])?a:(n=_D(e,0,!0),o&&(MD[e]=n),n):(o=-128<=(e|=0)&&e<128)&&(a=RD[e])?a:(n=_D(e,e<0?-1:0,!1),o&&(RD[e]=n),n)}function UD(e,t){if(isNaN(e))return t?GD:HD;if(t){if(e<0)return GD;if(e>=FD)return VD}else{if(e<=-LD)return qD;if(e+1>=LD)return ZD}return e<0?UD(-e,t).neg():_D(e%OD|0,e/OD|0,t)}function _D(e,t,n){return new SD(e,t,n)}SD.fromInt=PD,SD.fromNumber=UD,SD.fromBits=_D;var BD=Math.pow;function DD(e,t,n){if(0===e.length)throw Error("empty string");if("number"===typeof t?(n=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?GD:HD;if((n=n||10)<2||360)throw Error("interior hyphen");if(0===a)return DD(e.substring(1),t,n).neg();for(var o=UD(BD(n,8)),r=HD,i=0;i>>0:this.low},QD.toNumber=function(){return this.unsigned?(this.high>>>0)*OD+(this.low>>>0):this.high*OD+(this.low>>>0)},QD.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((r=s).isZero())return c+i;for(;c.length<6;)c="0"+c;i=""+c+i}},QD.getHighBits=function(){return this.high},QD.getHighBitsUnsigned=function(){return this.high>>>0},QD.getLowBits=function(){return this.low},QD.getLowBitsUnsigned=function(){return this.low>>>0},QD.getNumBitsAbs=function(){if(this.isNegative())return this.eq(qD)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},QD.isOdd=function(){return 1===(1&this.low)},QD.isEven=function(){return 0===(1&this.low)},QD.equals=function(e){return CD(e)||(e=ND(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&(this.high===e.high&&this.low===e.low)},QD.eq=QD.equals,QD.notEquals=function(e){return!this.eq(e)},QD.neq=QD.notEquals,QD.ne=QD.notEquals,QD.lessThan=function(e){return this.comp(e)<0},QD.lt=QD.lessThan,QD.lessThanOrEqual=function(e){return this.comp(e)<=0},QD.lte=QD.lessThanOrEqual,QD.le=QD.lessThanOrEqual,QD.greaterThan=function(e){return this.comp(e)>0},QD.gt=QD.greaterThan,QD.greaterThanOrEqual=function(e){return this.comp(e)>=0},QD.gte=QD.greaterThanOrEqual,QD.ge=QD.greaterThanOrEqual,QD.compare=function(e){if(CD(e)||(e=ND(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},QD.comp=QD.compare,QD.negate=function(){return!this.unsigned&&this.eq(qD)?qD:this.not().add(zD)},QD.neg=QD.negate,QD.add=function(e){CD(e)||(e=ND(e));var t=this.high>>>16,n=65535&this.high,a=this.low>>>16,o=65535&this.low,r=e.high>>>16,i=65535&e.high,s=e.low>>>16,c=0,u=0,d=0,l=0;return d+=(l+=o+(65535&e.low))>>>16,u+=(d+=a+s)>>>16,c+=(u+=n+i)>>>16,c+=t+r,_D((d&=65535)<<16|(l&=65535),(c&=65535)<<16|(u&=65535),this.unsigned)},QD.subtract=function(e){return CD(e)||(e=ND(e)),this.add(e.neg())},QD.sub=QD.subtract,QD.multiply=function(e){if(this.isZero())return this;if(CD(e)||(e=ND(e)),TD)return _D(TD.mul(this.low,this.high,e.low,e.high),TD.get_high(),this.unsigned);if(e.isZero())return this.unsigned?GD:HD;if(this.eq(qD))return e.isOdd()?qD:HD;if(e.eq(qD))return this.isOdd()?qD:HD;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(jD)&&e.lt(jD))return UD(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,a=this.low>>>16,o=65535&this.low,r=e.high>>>16,i=65535&e.high,s=e.low>>>16,c=65535&e.low,u=0,d=0,l=0,f=0;return l+=(f+=o*c)>>>16,d+=(l+=a*c)>>>16,l&=65535,d+=(l+=o*s)>>>16,u+=(d+=n*c)>>>16,d&=65535,u+=(d+=a*s)>>>16,d&=65535,u+=(d+=o*i)>>>16,u+=t*c+n*s+a*i+o*r,_D((l&=65535)<<16|(f&=65535),(u&=65535)<<16|(d&=65535),this.unsigned)},QD.mul=QD.multiply,QD.divide=function(e){if(CD(e)||(e=ND(e)),e.isZero())throw Error("division by zero");var t,n,a;if(TD)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?_D((this.unsigned?TD.div_u:TD.div_s)(this.low,this.high,e.low,e.high),TD.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?GD:HD;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return GD;if(e.gt(this.shru(1)))return KD;a=GD}else{if(this.eq(qD))return e.eq(zD)||e.eq(WD)?qD:e.eq(qD)?zD:(t=this.shr(1).div(e).shl(1)).eq(HD)?e.isNegative()?zD:WD:(n=this.sub(e.mul(t)),a=t.add(n.div(e)));if(e.eq(qD))return this.unsigned?GD:HD;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();a=HD}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(t)/Math.LN2),r=o<=48?1:BD(2,o-48),i=UD(t),s=i.mul(e);s.isNegative()||s.gt(n);)s=(i=UD(t-=r,this.unsigned)).mul(e);i.isZero()&&(i=zD),a=a.add(i),n=n.sub(s)}return a},QD.div=QD.divide,QD.modulo=function(e){return CD(e)||(e=ND(e)),TD?_D((this.unsigned?TD.rem_u:TD.rem_s)(this.low,this.high,e.low,e.high),TD.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},QD.mod=QD.modulo,QD.rem=QD.modulo,QD.not=function(){return _D(~this.low,~this.high,this.unsigned)},QD.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},QD.clz=QD.countLeadingZeros,QD.countTrailingZeros=function(){return this.low?ED(this.low):ED(this.high)+32},QD.ctz=QD.countTrailingZeros,QD.and=function(e){return CD(e)||(e=ND(e)),_D(this.low&e.low,this.high&e.high,this.unsigned)},QD.or=function(e){return CD(e)||(e=ND(e)),_D(this.low|e.low,this.high|e.high,this.unsigned)},QD.xor=function(e){return CD(e)||(e=ND(e)),_D(this.low^e.low,this.high^e.high,this.unsigned)},QD.shiftLeft=function(e){return CD(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?_D(this.low<>>32-e,this.unsigned):_D(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):_D(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},QD.shr=QD.shiftRight,QD.shiftRightUnsigned=function(e){return CD(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?_D(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):_D(32===e?this.high:this.high>>>e-32,0,this.unsigned)},QD.shru=QD.shiftRightUnsigned,QD.shr_u=QD.shiftRightUnsigned,QD.rotateLeft=function(e){var t;return CD(e)&&(e=e.toInt()),0===(e&=63)?this:32===e?_D(this.high,this.low,this.unsigned):e<32?(t=32-e,_D(this.low<>>t,this.high<>>t,this.unsigned)):(t=32-(e-=32),_D(this.high<>>t,this.low<>>t,this.unsigned))},QD.rotl=QD.rotateLeft,QD.rotateRight=function(e){var t;return CD(e)&&(e=e.toInt()),0===(e&=63)?this:32===e?_D(this.high,this.low,this.unsigned):e<32?(t=32-e,_D(this.high<>>e,this.low<>>e,this.unsigned)):(t=32-(e-=32),_D(this.low<>>e,this.high<>>e,this.unsigned))},QD.rotr=QD.rotateRight,QD.toSigned=function(){return this.unsigned?_D(this.low,this.high,!1):this},QD.toUnsigned=function(){return this.unsigned?this:_D(this.low,this.high,!0)},QD.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},QD.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},QD.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},SD.fromBytes=function(e,t,n){return n?SD.fromBytesLE(e,t):SD.fromBytesBE(e,t)},SD.fromBytesLE=function(e,t){return new SD(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},SD.fromBytesBE=function(e,t){return new SD(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var JD=SD,YD=n(54587);var XD=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();YD.util.Long!==JD&&(YD.util.Long=JD,YD.configure());XD.Error;var $D=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();YD.util.Long!==JD&&(YD.util.Long=JD,YD.configure());$D.Error;var eN=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();YD.util.Long!==JD&&(YD.util.Long=JD,YD.configure());eN.Error;var tN=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();YD.util.Long!==JD&&(YD.util.Long=JD,YD.configure());tN.Error;var nN=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();YD.util.Long!==JD&&(YD.util.Long=JD,YD.configure());nN.Error;var aN=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();YD.util.Long!==JD&&(YD.util.Long=JD,YD.configure());aN.Error;var oN=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();YD.util.Long!==JD&&(YD.util.Long=JD,YD.configure());oN.Error;var rN=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();YD.util.Long!==JD&&(YD.util.Long=JD,YD.configure());rN.Error;var iN=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();YD.util.Long!==JD&&(YD.util.Long=JD,YD.configure());iN.Error;var sN=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();YD.util.Long!==JD&&(YD.util.Long=JD,YD.configure());sN.Error;var cN=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();YD.util.Long!==JD&&(YD.util.Long=JD,YD.configure());cN.Error;YS()||WC.grpc.setDefaultTransport(AB());var uN=null;try{uN=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(sK){}function dN(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function lN(e){return!0===(e&&e.__isLong__)}function fN(e){var t=Math.clz32(e&-e);return e?31-t:t}dN.prototype.__isLong__,Object.defineProperty(dN.prototype,"__isLong__",{value:!0}),dN.isLong=lN;var pN={},bN={};function mN(e,t){var n,a,o;return t?(o=0<=(e>>>=0)&&e<256)&&(a=bN[e])?a:(n=gN(e,0,!0),o&&(bN[e]=n),n):(o=-128<=(e|=0)&&e<128)&&(a=pN[e])?a:(n=gN(e,e<0?-1:0,!1),o&&(pN[e]=n),n)}function hN(e,t){if(isNaN(e))return t?SN:TN;if(t){if(e<0)return SN;if(e>=AN)return PN}else{if(e<=-xN)return UN;if(e+1>=xN)return MN}return e<0?hN(-e,t).neg():gN(e%kN|0,e/kN|0,t)}function gN(e,t,n){return new dN(e,t,n)}dN.fromInt=mN,dN.fromNumber=hN,dN.fromBits=gN;var yN=Math.pow;function vN(e,t,n){if(0===e.length)throw Error("empty string");if("number"===typeof t?(n=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?SN:TN;if((n=n||10)<2||360)throw Error("interior hyphen");if(0===a)return vN(e.substring(1),t,n).neg();for(var o=hN(yN(n,8)),r=TN,i=0;i>>0:this.low},_N.toNumber=function(){return this.unsigned?(this.high>>>0)*kN+(this.low>>>0):this.high*kN+(this.low>>>0)},_N.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((r=s).isZero())return c+i;for(;c.length<6;)c="0"+c;i=""+c+i}},_N.getHighBits=function(){return this.high},_N.getHighBitsUnsigned=function(){return this.high>>>0},_N.getLowBits=function(){return this.low},_N.getLowBitsUnsigned=function(){return this.low>>>0},_N.getNumBitsAbs=function(){if(this.isNegative())return this.eq(UN)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},_N.isOdd=function(){return 1===(1&this.low)},_N.isEven=function(){return 0===(1&this.low)},_N.equals=function(e){return lN(e)||(e=wN(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&(this.high===e.high&&this.low===e.low)},_N.eq=_N.equals,_N.notEquals=function(e){return!this.eq(e)},_N.neq=_N.notEquals,_N.ne=_N.notEquals,_N.lessThan=function(e){return this.comp(e)<0},_N.lt=_N.lessThan,_N.lessThanOrEqual=function(e){return this.comp(e)<=0},_N.lte=_N.lessThanOrEqual,_N.le=_N.lessThanOrEqual,_N.greaterThan=function(e){return this.comp(e)>0},_N.gt=_N.greaterThan,_N.greaterThanOrEqual=function(e){return this.comp(e)>=0},_N.gte=_N.greaterThanOrEqual,_N.ge=_N.greaterThanOrEqual,_N.compare=function(e){if(lN(e)||(e=wN(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},_N.comp=_N.compare,_N.negate=function(){return!this.unsigned&&this.eq(UN)?UN:this.not().add(CN)},_N.neg=_N.negate,_N.add=function(e){lN(e)||(e=wN(e));var t=this.high>>>16,n=65535&this.high,a=this.low>>>16,o=65535&this.low,r=e.high>>>16,i=65535&e.high,s=e.low>>>16,c=0,u=0,d=0,l=0;return d+=(l+=o+(65535&e.low))>>>16,u+=(d+=a+s)>>>16,c+=(u+=n+i)>>>16,c+=t+r,gN((d&=65535)<<16|(l&=65535),(c&=65535)<<16|(u&=65535),this.unsigned)},_N.subtract=function(e){return lN(e)||(e=wN(e)),this.add(e.neg())},_N.sub=_N.subtract,_N.multiply=function(e){if(this.isZero())return this;if(lN(e)||(e=wN(e)),uN)return gN(uN.mul(this.low,this.high,e.low,e.high),uN.get_high(),this.unsigned);if(e.isZero())return this.unsigned?SN:TN;if(this.eq(UN))return e.isOdd()?UN:TN;if(e.eq(UN))return this.isOdd()?UN:TN;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(IN)&&e.lt(IN))return hN(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,a=this.low>>>16,o=65535&this.low,r=e.high>>>16,i=65535&e.high,s=e.low>>>16,c=65535&e.low,u=0,d=0,l=0,f=0;return l+=(f+=o*c)>>>16,d+=(l+=a*c)>>>16,l&=65535,d+=(l+=o*s)>>>16,u+=(d+=n*c)>>>16,d&=65535,u+=(d+=a*s)>>>16,d&=65535,u+=(d+=o*i)>>>16,u+=t*c+n*s+a*i+o*r,gN((l&=65535)<<16|(f&=65535),(u&=65535)<<16|(d&=65535),this.unsigned)},_N.mul=_N.multiply,_N.divide=function(e){if(lN(e)||(e=wN(e)),e.isZero())throw Error("division by zero");var t,n,a;if(uN)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?gN((this.unsigned?uN.div_u:uN.div_s)(this.low,this.high,e.low,e.high),uN.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?SN:TN;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return SN;if(e.gt(this.shru(1)))return EN;a=SN}else{if(this.eq(UN))return e.eq(CN)||e.eq(RN)?UN:e.eq(UN)?CN:(t=this.shr(1).div(e).shl(1)).eq(TN)?e.isNegative()?CN:RN:(n=this.sub(e.mul(t)),a=t.add(n.div(e)));if(e.eq(UN))return this.unsigned?SN:TN;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();a=TN}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(t)/Math.LN2),r=o<=48?1:yN(2,o-48),i=hN(t),s=i.mul(e);s.isNegative()||s.gt(n);)s=(i=hN(t-=r,this.unsigned)).mul(e);i.isZero()&&(i=CN),a=a.add(i),n=n.sub(s)}return a},_N.div=_N.divide,_N.modulo=function(e){return lN(e)||(e=wN(e)),uN?gN((this.unsigned?uN.rem_u:uN.rem_s)(this.low,this.high,e.low,e.high),uN.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},_N.mod=_N.modulo,_N.rem=_N.modulo,_N.not=function(){return gN(~this.low,~this.high,this.unsigned)},_N.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},_N.clz=_N.countLeadingZeros,_N.countTrailingZeros=function(){return this.low?fN(this.low):fN(this.high)+32},_N.ctz=_N.countTrailingZeros,_N.and=function(e){return lN(e)||(e=wN(e)),gN(this.low&e.low,this.high&e.high,this.unsigned)},_N.or=function(e){return lN(e)||(e=wN(e)),gN(this.low|e.low,this.high|e.high,this.unsigned)},_N.xor=function(e){return lN(e)||(e=wN(e)),gN(this.low^e.low,this.high^e.high,this.unsigned)},_N.shiftLeft=function(e){return lN(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?gN(this.low<>>32-e,this.unsigned):gN(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):gN(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},_N.shr=_N.shiftRight,_N.shiftRightUnsigned=function(e){return lN(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?gN(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):gN(32===e?this.high:this.high>>>e-32,0,this.unsigned)},_N.shru=_N.shiftRightUnsigned,_N.shr_u=_N.shiftRightUnsigned,_N.rotateLeft=function(e){var t;return lN(e)&&(e=e.toInt()),0===(e&=63)?this:32===e?gN(this.high,this.low,this.unsigned):e<32?(t=32-e,gN(this.low<>>t,this.high<>>t,this.unsigned)):(t=32-(e-=32),gN(this.high<>>t,this.low<>>t,this.unsigned))},_N.rotl=_N.rotateLeft,_N.rotateRight=function(e){var t;return lN(e)&&(e=e.toInt()),0===(e&=63)?this:32===e?gN(this.high,this.low,this.unsigned):e<32?(t=32-e,gN(this.high<>>e,this.low<>>e,this.unsigned)):(t=32-(e-=32),gN(this.low<>>e,this.high<>>e,this.unsigned))},_N.rotr=_N.rotateRight,_N.toSigned=function(){return this.unsigned?gN(this.low,this.high,!1):this},_N.toUnsigned=function(){return this.unsigned?this:gN(this.low,this.high,!0)},_N.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},_N.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},_N.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},dN.fromBytes=function(e,t,n){return n?dN.fromBytesLE(e,t):dN.fromBytesBE(e,t)},dN.fromBytesLE=function(e,t){return new dN(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},dN.fromBytesBE=function(e,t){return new dN(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var BN=dN,DN=n(6055);var NN=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw"Unable to locate global object"}();DN.util.Long!==BN&&(DN.util.Long=BN,DN.configure());NN.Error,n(54659).Buffer;var ON=n(30168);function FN(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}var LN=/\r\n|[\n\r]/g;function jN(e,t){var n,a=0,o=1,r=(0,jr.Z)(e.body.matchAll(LN));try{for(r.s();!(n=r.n()).done;){var i=n.value;if("number"===typeof i.index||FN(!1),i.index>=t)break;a=i.index+i[0].length,o+=1}}catch(s){r.e(s)}finally{r.f()}return{line:o,column:t+1-a}}function HN(e){return GN(e.source,jN(e.source,e.start))}function GN(e,t){var n=e.locationOffset.column-1,a="".padStart(n)+e.body,o=t.line-1,r=e.locationOffset.line-1,i=t.line+r,s=1===t.line?n:0,c=t.column+s,u="".concat(e.name,":").concat(i,":").concat(c,"\n"),d=a.split(/\r\n|[\n\r]/g),l=d[o];if(l.length>120){for(var f=Math.floor(c/80),p=c%80,b=[],m=0;m1?s-1:0),u=1;u0&&(e.extensions=this.extensions),e}}]),a}((0,Or.Z)(Error),Symbol.toStringTag);function WN(e){return void 0===e||0===e.length?void 0:e}function ZN(e,t,n){return new KN("Syntax Error: ".concat(n),{source:e,positions:[t]})}var VN,qN,QN,JN,YN=function(e){function t(e,n,a){(0,Gr.Z)(this,t),this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=a}return(0,zr.Z)(t,[{key:e,get:function(){return"Location"}},{key:"toJSON",value:function(){return{start:this.start,end:this.end}}}]),t}(Symbol.toStringTag),XN=function(e){function t(e,n,a,o,r,i){(0,Gr.Z)(this,t),this.kind=e,this.start=n,this.end=a,this.line=o,this.column=r,this.value=i,this.prev=null,this.next=null}return(0,zr.Z)(t,[{key:e,get:function(){return"Token"}},{key:"toJSON",value:function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}]),t}(Symbol.toStringTag);new Set(Object.keys({Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]}));function $N(e){return e>=48&&e<=57}function eO(e){return e>=97&&e<=122||e>=65&&e<=90}function tO(e){return eO(e)||95===e}function nO(e){return eO(e)||$N(e)||95===e}function aO(e){for(var t,n=Number.MAX_SAFE_INTEGER,a=null,o=-1,r=0;r",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(JN||(JN={}));var rO=function(e){function t(e){(0,Gr.Z)(this,t);var n=new XN(JN.SOF,0,0,0,0);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}return(0,zr.Z)(t,[{key:e,get:function(){return"Lexer"}},{key:"advance",value:function(){return this.lastToken=this.token,this.token=this.lookahead()}},{key:"lookahead",value:function(){var e=this.token;if(e.kind!==JN.EOF)do{if(e.next)e=e.next;else{var t=fO(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===JN.COMMENT);return e}}]),t}(Symbol.toStringTag);function iO(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function sO(e,t){return cO(e.charCodeAt(t))&&uO(e.charCodeAt(t+1))}function cO(e){return e>=55296&&e<=56319}function uO(e){return e>=56320&&e<=57343}function dO(e,t){var n=e.source.body.codePointAt(t);if(void 0===n)return JN.EOF;if(n>=32&&n<=126){var a=String.fromCodePoint(n);return'"'===a?"'\"'":'"'.concat(a,'"')}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function lO(e,t,n,a,o){var r=e.line,i=1+n-e.lineStart;return new XN(t,n,a,r,i,o)}function fO(e,t){for(var n=e.source.body,a=n.length,o=t;o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function kO(e,t){var n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw ZN(e.source,t,'Invalid character escape sequence: "'.concat(n.slice(t,t+2),'".'))}function AO(e,t){for(var n=e.source.body,a=n.length,o=e.lineStart,r=t+3,i=r,s="",c=[];rSO)return"[Array]";for(var n=Math.min(TO,e.length),a=e.length-n,o=[],r=0;r1&&o.push("... ".concat(a," more items"));return"["+o.join(", ")+"]"}(e,n);return function(e,t){var n=Object.entries(e);if(0===n.length)return"{}";if(t.length>SO)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"===typeof e.constructor){var n=e.constructor.name;if("string"===typeof n&&""!==n)return n}return t}(e)+"]";var a=n.map((function(e){var n=(0,Nr.Z)(e,2);return n[0]+": "+CO(n[1],t)}));return"{ "+a.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}var EO=function(e,t){return e instanceof t},RO=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};(0,Gr.Z)(this,t),"string"===typeof e||IO(!1,"Body must be a string. Received: ".concat(CO(e,[]),".")),this.body=e,this.name=n,this.locationOffset=a,this.locationOffset.line>0||IO(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||IO(!1,"column in locationOffset is 1-indexed and must be positive.")}return(0,zr.Z)(t,[{key:e,get:function(){return"Source"}}]),t}(Symbol.toStringTag);var MO=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,Gr.Z)(this,e);var a=function(e){return EO(e,RO)}(t)?t:new RO(t);this._lexer=new rO(a),this._options=n,this._tokenCounter=0}return(0,zr.Z)(e,[{key:"parseName",value:function(){var e=this.expectToken(JN.NAME);return this.node(e,{kind:QN.NAME,value:e.value})}},{key:"parseDocument",value:function(){return this.node(this._lexer.token,{kind:QN.DOCUMENT,definitions:this.many(JN.SOF,this.parseDefinition,JN.EOF)})}},{key:"parseDefinition",value:function(){if(this.peek(JN.BRACE_L))return this.parseOperationDefinition();var e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===JN.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw ZN(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}},{key:"parseOperationDefinition",value:function(){var e=this._lexer.token;if(this.peek(JN.BRACE_L))return this.node(e,{kind:QN.OPERATION_DEFINITION,operation:VN.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});var t,n=this.parseOperationType();return this.peek(JN.NAME)&&(t=this.parseName()),this.node(e,{kind:QN.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}},{key:"parseOperationType",value:function(){var e=this.expectToken(JN.NAME);switch(e.value){case"query":return VN.QUERY;case"mutation":return VN.MUTATION;case"subscription":return VN.SUBSCRIPTION}throw this.unexpected(e)}},{key:"parseVariableDefinitions",value:function(){return this.optionalMany(JN.PAREN_L,this.parseVariableDefinition,JN.PAREN_R)}},{key:"parseVariableDefinition",value:function(){return this.node(this._lexer.token,{kind:QN.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(JN.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(JN.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}},{key:"parseVariable",value:function(){var e=this._lexer.token;return this.expectToken(JN.DOLLAR),this.node(e,{kind:QN.VARIABLE,name:this.parseName()})}},{key:"parseSelectionSet",value:function(){return this.node(this._lexer.token,{kind:QN.SELECTION_SET,selections:this.many(JN.BRACE_L,this.parseSelection,JN.BRACE_R)})}},{key:"parseSelection",value:function(){return this.peek(JN.SPREAD)?this.parseFragment():this.parseField()}},{key:"parseField",value:function(){var e,t,n=this._lexer.token,a=this.parseName();return this.expectOptionalToken(JN.COLON)?(e=a,t=this.parseName()):t=a,this.node(n,{kind:QN.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(JN.BRACE_L)?this.parseSelectionSet():void 0})}},{key:"parseArguments",value:function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(JN.PAREN_L,t,JN.PAREN_R)}},{key:"parseArgument",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._lexer.token,n=this.parseName();return this.expectToken(JN.COLON),this.node(t,{kind:QN.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}},{key:"parseConstArgument",value:function(){return this.parseArgument(!0)}},{key:"parseFragment",value:function(){var e=this._lexer.token;this.expectToken(JN.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(JN.NAME)?this.node(e,{kind:QN.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:QN.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}},{key:"parseFragmentDefinition",value:function(){var e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:QN.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:QN.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}},{key:"parseFragmentName",value:function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}},{key:"parseValueLiteral",value:function(e){var t=this._lexer.token;switch(t.kind){case JN.BRACKET_L:return this.parseList(e);case JN.BRACE_L:return this.parseObject(e);case JN.INT:return this.advanceLexer(),this.node(t,{kind:QN.INT,value:t.value});case JN.FLOAT:return this.advanceLexer(),this.node(t,{kind:QN.FLOAT,value:t.value});case JN.STRING:case JN.BLOCK_STRING:return this.parseStringLiteral();case JN.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:QN.BOOLEAN,value:!0});case"false":return this.node(t,{kind:QN.BOOLEAN,value:!1});case"null":return this.node(t,{kind:QN.NULL});default:return this.node(t,{kind:QN.ENUM,value:t.value})}case JN.DOLLAR:if(e){if(this.expectToken(JN.DOLLAR),this._lexer.token.kind===JN.NAME){var n=this._lexer.token.value;throw ZN(this._lexer.source,t.start,'Unexpected variable "$'.concat(n,'" in constant value.'))}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}},{key:"parseConstValueLiteral",value:function(){return this.parseValueLiteral(!0)}},{key:"parseStringLiteral",value:function(){var e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:QN.STRING,value:e.value,block:e.kind===JN.BLOCK_STRING})}},{key:"parseList",value:function(e){var t=this;return this.node(this._lexer.token,{kind:QN.LIST,values:this.any(JN.BRACKET_L,(function(){return t.parseValueLiteral(e)}),JN.BRACKET_R)})}},{key:"parseObject",value:function(e){var t=this;return this.node(this._lexer.token,{kind:QN.OBJECT,fields:this.any(JN.BRACE_L,(function(){return t.parseObjectField(e)}),JN.BRACE_R)})}},{key:"parseObjectField",value:function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(JN.COLON),this.node(t,{kind:QN.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}},{key:"parseDirectives",value:function(e){for(var t=[];this.peek(JN.AT);)t.push(this.parseDirective(e));return t}},{key:"parseConstDirectives",value:function(){return this.parseDirectives(!0)}},{key:"parseDirective",value:function(e){var t=this._lexer.token;return this.expectToken(JN.AT),this.node(t,{kind:QN.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}},{key:"parseTypeReference",value:function(){var e,t=this._lexer.token;if(this.expectOptionalToken(JN.BRACKET_L)){var n=this.parseTypeReference();this.expectToken(JN.BRACKET_R),e=this.node(t,{kind:QN.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(JN.BANG)?this.node(t,{kind:QN.NON_NULL_TYPE,type:e}):e}},{key:"parseNamedType",value:function(){return this.node(this._lexer.token,{kind:QN.NAMED_TYPE,name:this.parseName()})}},{key:"peekDescription",value:function(){return this.peek(JN.STRING)||this.peek(JN.BLOCK_STRING)}},{key:"parseDescription",value:function(){if(this.peekDescription())return this.parseStringLiteral()}},{key:"parseSchemaDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseConstDirectives(),a=this.many(JN.BRACE_L,this.parseOperationTypeDefinition,JN.BRACE_R);return this.node(e,{kind:QN.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:a})}},{key:"parseOperationTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(JN.COLON);var n=this.parseNamedType();return this.node(e,{kind:QN.OPERATION_TYPE_DEFINITION,operation:t,type:n})}},{key:"parseScalarTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),a=this.parseConstDirectives();return this.node(e,{kind:QN.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:a})}},{key:"parseObjectTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),a=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),r=this.parseFieldsDefinition();return this.node(e,{kind:QN.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:a,directives:o,fields:r})}},{key:"parseImplementsInterfaces",value:function(){return this.expectOptionalKeyword("implements")?this.delimitedMany(JN.AMP,this.parseNamedType):[]}},{key:"parseFieldsDefinition",value:function(){return this.optionalMany(JN.BRACE_L,this.parseFieldDefinition,JN.BRACE_R)}},{key:"parseFieldDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),a=this.parseArgumentDefs();this.expectToken(JN.COLON);var o=this.parseTypeReference(),r=this.parseConstDirectives();return this.node(e,{kind:QN.FIELD_DEFINITION,description:t,name:n,arguments:a,type:o,directives:r})}},{key:"parseArgumentDefs",value:function(){return this.optionalMany(JN.PAREN_L,this.parseInputValueDef,JN.PAREN_R)}},{key:"parseInputValueDef",value:function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(JN.COLON);var a,o=this.parseTypeReference();this.expectOptionalToken(JN.EQUALS)&&(a=this.parseConstValueLiteral());var r=this.parseConstDirectives();return this.node(e,{kind:QN.INPUT_VALUE_DEFINITION,description:t,name:n,type:o,defaultValue:a,directives:r})}},{key:"parseInterfaceTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),a=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),r=this.parseFieldsDefinition();return this.node(e,{kind:QN.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:a,directives:o,fields:r})}},{key:"parseUnionTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),a=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(e,{kind:QN.UNION_TYPE_DEFINITION,description:t,name:n,directives:a,types:o})}},{key:"parseUnionMemberTypes",value:function(){return this.expectOptionalToken(JN.EQUALS)?this.delimitedMany(JN.PIPE,this.parseNamedType):[]}},{key:"parseEnumTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),a=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(e,{kind:QN.ENUM_TYPE_DEFINITION,description:t,name:n,directives:a,values:o})}},{key:"parseEnumValuesDefinition",value:function(){return this.optionalMany(JN.BRACE_L,this.parseEnumValueDefinition,JN.BRACE_R)}},{key:"parseEnumValueDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),a=this.parseConstDirectives();return this.node(e,{kind:QN.ENUM_VALUE_DEFINITION,description:t,name:n,directives:a})}},{key:"parseEnumValueName",value:function(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw ZN(this._lexer.source,this._lexer.token.start,"".concat(PO(this._lexer.token)," is reserved and cannot be used for an enum value."));return this.parseName()}},{key:"parseInputObjectTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),a=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(e,{kind:QN.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:a,fields:o})}},{key:"parseInputFieldsDefinition",value:function(){return this.optionalMany(JN.BRACE_L,this.parseInputValueDef,JN.BRACE_R)}},{key:"parseTypeSystemExtension",value:function(){var e=this._lexer.lookahead();if(e.kind===JN.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}},{key:"parseSchemaExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseConstDirectives(),n=this.optionalMany(JN.BRACE_L,this.parseOperationTypeDefinition,JN.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:QN.SCHEMA_EXTENSION,directives:t,operationTypes:n})}},{key:"parseScalarTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:QN.SCALAR_TYPE_EXTENSION,name:t,directives:n})}},{key:"parseObjectTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===n.length&&0===a.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:QN.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:a,fields:o})}},{key:"parseInterfaceTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===n.length&&0===a.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:QN.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:a,fields:o})}},{key:"parseUnionTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseConstDirectives(),a=this.parseUnionMemberTypes();if(0===n.length&&0===a.length)throw this.unexpected();return this.node(e,{kind:QN.UNION_TYPE_EXTENSION,name:t,directives:n,types:a})}},{key:"parseEnumTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();if(0===n.length&&0===a.length)throw this.unexpected();return this.node(e,{kind:QN.ENUM_TYPE_EXTENSION,name:t,directives:n,values:a})}},{key:"parseInputObjectTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();if(0===n.length&&0===a.length)throw this.unexpected();return this.node(e,{kind:QN.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:a})}},{key:"parseDirectiveDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(JN.AT);var n=this.parseName(),a=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var r=this.parseDirectiveLocations();return this.node(e,{kind:QN.DIRECTIVE_DEFINITION,description:t,name:n,arguments:a,repeatable:o,locations:r})}},{key:"parseDirectiveLocations",value:function(){return this.delimitedMany(JN.PIPE,this.parseDirectiveLocation)}},{key:"parseDirectiveLocation",value:function(){var e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(qN,t.value))return t;throw this.unexpected(e)}},{key:"node",value:function(e,t){return!0!==this._options.noLocation&&(t.loc=new YN(e,this._lexer.lastToken,this._lexer.source)),t}},{key:"peek",value:function(e){return this._lexer.token.kind===e}},{key:"expectToken",value:function(e){var t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw ZN(this._lexer.source,t.start,"Expected ".concat(UO(e),", found ").concat(PO(t),"."))}},{key:"expectOptionalToken",value:function(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}},{key:"expectKeyword",value:function(e){var t=this._lexer.token;if(t.kind!==JN.NAME||t.value!==e)throw ZN(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(PO(t),"."));this.advanceLexer()}},{key:"expectOptionalKeyword",value:function(e){var t=this._lexer.token;return t.kind===JN.NAME&&t.value===e&&(this.advanceLexer(),!0)}},{key:"unexpected",value:function(e){var t=null!==e&&void 0!==e?e:this._lexer.token;return ZN(this._lexer.source,t.start,"Unexpected ".concat(PO(t),"."))}},{key:"any",value:function(e,t,n){this.expectToken(e);for(var a=[];!this.expectOptionalToken(n);)a.push(t.call(this));return a}},{key:"optionalMany",value:function(e,t,n){if(this.expectOptionalToken(e)){var a=[];do{a.push(t.call(this))}while(!this.expectOptionalToken(n));return a}return[]}},{key:"many",value:function(e,t,n){this.expectToken(e);var a=[];do{a.push(t.call(this))}while(!this.expectOptionalToken(n));return a}},{key:"delimitedMany",value:function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}},{key:"advanceLexer",value:function(){var e=this._options.maxTokens,t=this._lexer.advance();if(void 0!==e&&t.kind!==JN.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw ZN(this._lexer.source,t.start,"Document contains more that ".concat(e," tokens. Parsing aborted."))}}]),e}();function PO(e){var t=e.value;return UO(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function UO(e){return function(e){return e===JN.BANG||e===JN.DOLLAR||e===JN.AMP||e===JN.PAREN_L||e===JN.PAREN_R||e===JN.SPREAD||e===JN.COLON||e===JN.EQUALS||e===JN.AT||e===JN.BRACKET_L||e===JN.BRACKET_R||e===JN.BRACE_L||e===JN.PIPE||e===JN.BRACE_R}(e)?'"'.concat(e,'"'):e}var _O=n(65218),BO=new Map,DO=new Map,NO=!0,OO=!1;function FO(e){return e.replace(/[\s,]+/g," ").trim()}function LO(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var a=e.name.value,o=FO((i=e.loc).source.body.substring(i.start,i.end)),r=DO.get(a);r&&!r.has(o)?NO&&_O.warn("Warning: fragment with name "+a+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):r||DO.set(a,r=new Set),r.add(o),t.has(o)||(t.add(o),n.push(e))}else n.push(e);var i})),(0,po.__assign)((0,po.__assign)({},e),{definitions:n})}function jO(e){var t=FO(e);if(!BO.has(t)){var n=function(e,t){return new MO(e,t).parseDocument()}(e,{experimentalFragmentVariables:OO,allowLegacyFragmentVariables:OO});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");BO.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var a=e[n];a&&"object"===typeof a&&t.add(a)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(LO(n)))}return BO.get(t)}function HO(e){for(var t=[],n=1;n1&&void 0!==arguments[1]&&arguments[1];if(e=XO(e),!0===t)return fF.from(e,"hex").toString("base64");for(var n="";e.length%4!=0;)e="0"+e;for(var a=0;a1&&void 0!==arguments[1]&&arguments[1]))return $O(fF.from(e,"base64").toString("hex"));for(var t="",n=0;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},kF=function(e,t){for(var n=0,a=t.length,o=e.length;n=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function xF(e,t,n,a,o,r,i){return yF(this,void 0,void 0,(function(){var s,c,u,d,l,f,p,b,m;return vF(this,(function(h){switch(h.label){case 0:return[4,TF(e,n,a,o,i)];case 1:return s=h.sent(),c=s.unsignedTransactions,u=s.signers,d=c.pop(),[4,np(e,$f.apply(void 0,kF([t],wF(u))),a.toString(),c,r)];case 2:return l=h.sent(),p=(f=l.push).apply,b=[l],m=[[]],[4,np(e,t,a.toString(),[d],r)];case 3:return p.apply(f,b.concat([kF.apply(void 0,m.concat([wF.apply(void 0,[h.sent()])]))])),[2,l]}}))}))}function IF(e,t,n,a,o,r,i){return void 0===i&&(i=!0),yF(this,void 0,void 0,(function(){var s,c,u,d,l,f,p,b,m,h,g,y,v,w,k,A,x,I=this;return vF(this,(function(T){switch(T.label){case 0:return[4,TF(e,n,a,o,null===r||void 0===r?void 0:r.commitment)];case 1:return s=T.sent(),c=s.unsignedTransactions,u=s.signers,d=c.pop(),l=function(n){return yF(I,void 0,void 0,(function(){return vF(this,(function(o){return[2,tp(e,a,$f.apply(void 0,kF([t],wF(u))),n,r)]}))}))},f=[],i?[4,Promise.all(c.map((function(e){return yF(I,void 0,void 0,(function(){return vF(this,(function(t){return[2,l(e)]}))}))})))]:[3,3];case 2:return p=T.sent(),f.push.apply(f,kF([],wF(p))),[3,10];case 3:T.trys.push([3,8,9,10]),b=AF(c),m=b.next(),T.label=4;case 4:return m.done?[3,7]:(h=m.value,y=(g=f).push,[4,l(h)]);case 5:y.apply(g,[T.sent()]),T.label=6;case 6:return m=b.next(),[3,4];case 7:return[3,10];case 8:return v=T.sent(),A={error:v},[3,10];case 9:try{m&&!m.done&&(x=b.return)&&x.call(b)}finally{if(A)throw A.error}return[7];case 10:return k=(w=f).push,[4,tp(e,a,t,d,r)];case 11:return k.apply(w,[T.sent()]),[2,f]}}))}))}function TF(e,t,n,a,o){return yF(this,void 0,void 0,(function(){var r,i,s,c,u,d;return vF(this,(function(l){switch(l.label){case 0:return r=(0,Ql.isBytes)(a)?wb(a):a,i=gf.Keypair.generate(),[4,Mm(e,t,n,r,i.publicKey,o)];case 1:for(s=l.sent(),c=[],u=0;u0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:SF.H_,i=(0,QF.s)([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!1}],n,o),s=YF.alloc(XF.span);return XF.encode({instruction:JF.c.Approve,amount:BigInt(a)},s),new gf.TransactionInstruction({keys:i,programId:r,data:s})}(new gf.PublicKey(t),OF(e),new gf.PublicKey(n),a)}var eL,tL=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},nL=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&a.write(t.toString("hex"),1,"hex"),a}function cL(e){var t=e.nonce,n=e.amount,a=e.fee,o=e.targetAddress,r=e.targetChain;if("bigint"!=typeof n&&(n=BigInt(n)),"bigint"!=typeof a&&(a=BigInt(a)),!rL.isBuffer(o))throw new Error("targetAddress must be Buffer");var i=rL.alloc(54);return i.writeUInt32LE(t,0),i.writeBigUInt64LE(n,4),i.writeBigUInt64LE(a,12),i.write(o.toString("hex"),20,"hex"),i.writeUInt16LE(r,52),i}function uL(e){var t=e.nonce,n=e.amount,a=e.targetAddress,o=e.targetChain,r=e.payload;if("bigint"!=typeof n&&(n=BigInt(n)),!rL.isBuffer(a))throw new Error("targetAddress must be Buffer");if(!rL.isBuffer(r))throw new Error("payload must be Buffer");var i=rL.alloc(50);return i.writeUInt32LE(t,0),i.writeBigUInt64LE(n,4),i.write(a.toString("hex"),12,"hex"),i.writeUInt16LE(o,44),i.writeUInt32LE(r.length,46),rL.concat([i,r,rL.alloc(1)])}!function(e){e[e.Initialize=0]="Initialize",e[e.AttestToken=1]="AttestToken",e[e.CompleteNative=2]="CompleteNative",e[e.CompleteWrapped=3]="CompleteWrapped",e[e.TransferWrapped=4]="TransferWrapped",e[e.TransferNative=5]="TransferNative",e[e.RegisterChain=6]="RegisterChain",e[e.CreateWrapped=7]="CreateWrapped",e[e.UpgradeContract=8]="UpgradeContract",e[e.CompleteNativeWithPayload=9]="CompleteNativeWithPayload",e[e.CompleteWrappedWithPayload=10]="CompleteWrappedWithPayload",e[e.TransferWrappedWithPayload=11]="TransferWrappedWithPayload",e[e.TransferNativeWithPayload=12]="TransferNativeWithPayload"}(eL||(eL={}));var dL=function(){function e(e){}return e.prototype.encode=function(e,t){throw new Error("Token Bridge program does not have state")},e.prototype.decode=function(e){throw new Error("Token Bridge program does not have state")},e}(),lL=function(){function e(e){}return e.prototype.encode=function(e,t){throw new Error("Token Bridge program does not have user-defined types")},e.prototype.decode=function(e,t){throw new Error("Token Bridge program does not have user-defined types")},e}(),fL=function(e){this.instruction=new iL(e),this.accounts=new aL(e),this.state=new dL(e),this.events=new oL(e),this.types=new lL(e)},pL=JSON.parse('{"version":"0.1.0","name":"wormhole","instructions":[{"name":"initialize","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"wormhole","type":"publicKey"}]},{"name":"attestToken","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"wrappedMeta","isMut":false,"isSigner":false},{"name":"splMetadata","isMut":false,"isSigner":false},{"name":"wormholeBridge","isMut":true,"isSigner":false},{"name":"wormholeMessage","isMut":true,"isSigner":true},{"name":"wormholeEmitter","isMut":false,"isSigner":false},{"name":"wormholeSequence","isMut":true,"isSigner":false},{"name":"wormholeFeeCollector","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u32"}]},{"name":"completeNative","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"vaa","isMut":false,"isSigner":false},{"name":"claim","isMut":true,"isSigner":false},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"to","isMut":true,"isSigner":false},{"name":"toFees","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"custodySigner","isMut":false,"isSigner":false},{"name":"rent","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"completeWrapped","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"vaa","isMut":false,"isSigner":false},{"name":"claim","isMut":true,"isSigner":false},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"to","isMut":true,"isSigner":false},{"name":"toFees","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"wrappedMeta","isMut":false,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"transferWrapped","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"from","isMut":true,"isSigner":false},{"name":"fromOwner","isMut":true,"isSigner":true},{"name":"mint","isMut":true,"isSigner":false},{"name":"wrappedMeta","isMut":false,"isSigner":false},{"name":"authoritySigner","isMut":false,"isSigner":false},{"name":"wormholeBridge","isMut":true,"isSigner":false},{"name":"wormholeMessage","isMut":true,"isSigner":true},{"name":"wormholeEmitter","isMut":false,"isSigner":false},{"name":"wormholeSequence","isMut":true,"isSigner":false},{"name":"wormholeFeeCollector","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u32"},{"name":"amount","type":"u64"},{"name":"fee","type":"u64"},{"name":"targetAddress","type":{"array":["u8",32]}},{"name":"targetChain","type":"u16"}]},{"name":"transferNative","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"from","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"authoritySigner","isMut":false,"isSigner":false},{"name":"custodySigner","isMut":false,"isSigner":false},{"name":"wormholeBridge","isMut":true,"isSigner":false},{"name":"wormholeMessage","isMut":true,"isSigner":true},{"name":"wormholeEmitter","isMut":false,"isSigner":false},{"name":"wormholeSequence","isMut":true,"isSigner":false},{"name":"wormholeFeeCollector","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u32"},{"name":"amount","type":"u64"},{"name":"fee","type":"u64"},{"name":"targetAddress","type":{"array":["u8",32]}},{"name":"targetChain","type":"u16"}]},{"name":"registerChain","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"vaa","isMut":false,"isSigner":false},{"name":"claim","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createWrapped","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"vaa","isMut":false,"isSigner":false},{"name":"claim","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"wrappedMeta","isMut":true,"isSigner":false},{"name":"splMetadata","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"splMetadataProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"upgradeContract","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"vaa","isMut":false,"isSigner":false},{"name":"claim","isMut":true,"isSigner":false},{"name":"upgradeAuthority","isMut":false,"isSigner":false},{"name":"spill","isMut":true,"isSigner":false},{"name":"implementation","isMut":true,"isSigner":false},{"name":"programData","isMut":true,"isSigner":false},{"name":"tokenBridgeProgram","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"bpfLoaderUpgradeable","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"transferWrappedWithPayload","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"from","isMut":true,"isSigner":false},{"name":"fromOwner","isMut":true,"isSigner":true},{"name":"mint","isMut":true,"isSigner":false},{"name":"wrappedMeta","isMut":false,"isSigner":false},{"name":"authoritySigner","isMut":false,"isSigner":false},{"name":"wormholeBridge","isMut":true,"isSigner":false},{"name":"wormholeMessage","isMut":true,"isSigner":true},{"name":"wormholeEmitter","isMut":false,"isSigner":false},{"name":"wormholeSequence","isMut":true,"isSigner":false},{"name":"wormholeFeeCollector","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"sender","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u32"},{"name":"amount","type":"u64"},{"name":"targetAddress","type":{"array":["u8",32]}},{"name":"targetChain","type":"u16"},{"name":"payload","type":"bytes"},{"name":"cpiProgramId","type":{"option":"publicKey"}}]},{"name":"transferNativeWithPayload","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"from","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"authoritySigner","isMut":false,"isSigner":false},{"name":"custodySigner","isMut":false,"isSigner":false},{"name":"wormholeBridge","isMut":true,"isSigner":false},{"name":"wormholeMessage","isMut":true,"isSigner":true},{"name":"wormholeEmitter","isMut":false,"isSigner":false},{"name":"wormholeSequence","isMut":true,"isSigner":false},{"name":"wormholeFeeCollector","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"sender","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u32"},{"name":"amount","type":"u64"},{"name":"targetAddress","type":{"array":["u8",32]}},{"name":"targetChain","type":"u16"},{"name":"payload","type":"bytes"},{"name":"cpiProgramId","type":{"option":"publicKey"}}]}],"accounts":[]}');function bL(e,t){return new Sb.Program(pL,new gf.PublicKey(e),void 0===t?{connection:null}:t,new fL(pL))}function mL(e,t){return bL(e,Sf(t))}var hL=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,o,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},gL=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},wL=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},IL=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},EL=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},UL=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},OL=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},GL=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},ZL=function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},lj=function(e,t){for(var n=0,a=t.length,o=e.length;nBigInt(0)&&(w=(0,yf.makePaymentTxnWithSuggestedParamsFromObject)({from:a,suggestedParams:g,to:(0,yf.getApplicationAddress)(t),amount:v}),c.push({tx:w,signer:null})),k=[d,f,(0,yf.getApplicationAddress)(n)],p&&k.push(p.address),A=(0,yf.makeApplicationCallTxnFromObject)({appArgs:[b,(0,yf.bigIntToBytes)(o,8)],accounts:k,appIndex:Ex(t),foreignApps:[Ex(n)],foreignAssets:[Ex(o)],from:a,onComplete:yf.OnApplicationComplete.NoOpOC,suggestedParams:g}),v>BigInt(0)?A.fee*=3:A.fee*=2,c.push({tx:A,signer:null}),[2,c]}}))}))}function yj(e,t,n,a){return cj(this,void 0,void 0,(function(){var o,r;return uj(this,(function(i){switch(i.label){case 0:return o=[],[4,jI(e,t,"message_fee")];case 1:return r=i.sent(),LH(n,a)?[3,3]:[4,OI(e,n,a)];case 2:i.sent().isRegistered||o.push({contractId:n,methodName:"register_account",args:{account:a},gas:new(vm())("100000000000000"),attachedDeposit:new(vm())("2000000000000000000000")}),i.label=3;case 3:return o.push({contractId:n,methodName:"attest_token",args:{token:a,message_fee:r},attachedDeposit:new(vm())("3000000000000000000000").add(new(vm())(r)),gas:new(vm())("100000000000000")}),[2,o]}}))}))}function vj(e,t,n){return cj(this,void 0,void 0,(function(){var a;return uj(this,(function(o){switch(o.label){case 0:return[4,jI(e,t,"message_fee")];case 1:return a=o.sent()+1,[2,{contractId:n,methodName:"attest_near",args:{message_fee:a},attachedDeposit:new(vm())(a),gas:new(vm())("100000000000000")}]}}))}))}function wj(e,t,n){return nj(e,t,n)}var kj=n(88849),Aj=n(62998),xj=n(37483),Ij=n(54659).Buffer,Tj=(0,VF.struct)([(0,VF.u8)("instruction")]);function Sj(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:SF.H_,o=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:gf.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}],r=Ij.alloc(Tj.span);return Tj.encode({instruction:JF.c.InitializeAccount},r),new gf.TransactionInstruction({keys:o,programId:a,data:r})}var Cj=n(1646),Ej=n(54659).Buffer,Rj=(0,VF.struct)([(0,VF.u8)("instruction")]);function Mj(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:SF.H_,r=(0,QF.s)([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0}],n,a),i=Ej.alloc(Rj.span);return Rj.encode({instruction:JF.c.CloseAccount},i),new gf.TransactionInstruction({keys:r,programId:o,data:i})}var Pj=n(54659).Buffer,Uj=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},_j=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]8?[2,Pj.from(s.slice(0,8)).readBigUInt64BE(0)]:[2,null];case 4:return[2]}}))}))}function jj(e,t,n,a){return Uj(this,void 0,void 0,(function(){var o;return _j(this,(function(r){switch(r.label){case 0:return[4,jI(e,t,"get_foreign_asset",{chain:le(n),address:a})];case 1:return[2,""!==(o=r.sent())?o:null]}}))}))}function Hj(e,t,n,a){return Uj(this,void 0,void 0,(function(){var o,r;return _j(this,(function(i){switch(i.label){case 0:if(o=le(n),!(r=of(t,o,a)))return[2,null];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,e.getAccountResource(df(r),"0x1::coin::CoinInfo<"+r+">")];case 2:return i.sent(),[2,r];case 3:return i.sent(),[2,null];case 4:return[2]}}))}))}var Gj=n(54659).Buffer,zj=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},Kj=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]",value_type:"u8",key:r})];case 3:return i.sent(),[2,!0];case 4:return i.sent(),[2,!1];case 5:return[2]}}))}))}var MH=n(54659).Buffer,PH=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},UH=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},rG=function(e,t){for(var n=0,a=t.length,o=e.length;n0&&(S=(0,yf.makePaymentTxnWithSuggestedParamsFromObject)({from:a,suggestedParams:k,to:(0,yf.getApplicationAddress)(t),amount:A}),p.push({tx:S,signer:null})),v?[3,8]:(x=eG.from("native","binary").toString("hex"),[4,eI(e,a,t,o,x)]);case 7:I=D.sent(),g=I.addr,p.push.apply(p,rG([],oG(I.txs))),D.label=8;case 8:return(T=o!==BigInt(0))?[4,iI(e,o,g)]:[3,10];case 9:T=!D.sent(),D.label=10;case 10:return T&&(S=(0,yf.makePaymentTxnWithSuggestedParamsFromObject)({from:a,to:g,amount:1e5,suggestedParams:k}),p.push({tx:S,signer:null}),C=iT("optin"),(E=(0,yf.makeApplicationCallTxnFromObject)({from:a,appIndex:Ex(t),onComplete:yf.OnApplicationComplete.NoOpOC,appArgs:[C,(0,yf.bigIntToBytes)(o,8)],foreignAssets:[Ex(o)],accounts:[g],suggestedParams:k})).fee*=2,p.push({tx:E,signer:null})),R=(0,yf.makeApplicationCallTxnFromObject)({from:a,appIndex:Ex(t),onComplete:yf.OnApplicationComplete.NoOpOC,appArgs:[iT("nop")],suggestedParams:k}),p.push({tx:R,signer:null}),M=[],o===BigInt(0)?(P=(0,yf.makePaymentTxnWithSuggestedParamsFromObject)({from:a,to:g,amount:r,suggestedParams:k}),p.push({tx:P,signer:null}),M=[m,g,g]):(U=(0,yf.makeAssetTransferTxnWithSuggestedParamsFromObject)({from:a,to:g,suggestedParams:k,amount:r,assetIndex:Ex(o)}),p.push({tx:U,signer:null}),M=[m,g,y.address]),_=[iT("sendTransfer"),(0,yf.bigIntToBytes)(o,8),(0,yf.bigIntToBytes)(r,8),VI(i),(0,yf.bigIntToBytes)(d,8),(0,yf.bigIntToBytes)(c,8)],null!==u&&_.push(u),(B=(0,yf.makeApplicationCallTxnFromObject)({from:a,appIndex:Ex(t),onComplete:yf.OnApplicationComplete.NoOpOC,appArgs:_,foreignApps:[Ex(n)],foreignAssets:[Ex(o)],accounts:M,suggestedParams:k})).fee*=2,p.push({tx:B,signer:null}),[2,p]}}))}))}function hG(e,t,n,a,o,r,i,s,c,u){return void 0===u&&(u=""),nG(this,void 0,void 0,(function(){var d,l,f,p;return aG(this,(function(b){switch(b.label){case 0:return d=LH(a,o),[4,jI(e,n,"message_fee",{})];case 1:return l=b.sent(),s=le(s),d?[2,[{contractId:a,methodName:"send_transfer_wormhole_token",args:{token:o,amount:r.toString(10),receiver:ZI(i),chain:s,fee:c.toString(10),payload:u,message_fee:l},attachedDeposit:new(vm())(l+1),gas:new(vm())("100000000000000")}]]:[3,2];case 2:return f=[],[4,jI(e,o,"storage_balance_of",{account_id:a})];case 3:return null===b.sent()&&f.push({contractId:o,methodName:"storage_deposit",args:{account_id:a,registration_only:!0},gas:new(vm())("100000000000000"),attachedDeposit:new(vm())("2000000000000000000000")}),l>0?[4,jI(e,a,"bank_balance",{acct:t})]:[3,5];case 4:(p=b.sent())[0]||f.push({contractId:a,methodName:"register_bank",args:{},gas:new(vm())("100000000000000"),attachedDeposit:new(vm())("2000000000000000000000")}),p[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&a.write(t.toString("hex"),1,"hex"),a}function WG(e){var t=e.nonce,n=e.targetAddress,a=e.targetChain;if(!GG.isBuffer(n))throw new Error("targetAddress must be Buffer");var o=GG.alloc(38);return o.writeUInt32LE(t,0),o.write(n.toString("hex"),4,"hex"),o.writeUInt16LE(a,36),o}!function(e){e[e.Initialize=0]="Initialize",e[e.CompleteNative=1]="CompleteNative",e[e.CompleteWrapped=2]="CompleteWrapped",e[e.CompleteWrappedMeta=3]="CompleteWrappedMeta",e[e.TransferWrapped=4]="TransferWrapped",e[e.TransferNative=5]="TransferNative",e[e.RegisterChain=6]="RegisterChain",e[e.UpgradeContract=7]="UpgradeContract"}(OG||(OG={}));var ZG=function(){function e(e){}return e.prototype.encode=function(e,t){throw new Error("NFT Bridge program does not have state")},e.prototype.decode=function(e){throw new Error("NFT Bridge program does not have state")},e}(),VG=function(){function e(e){}return e.prototype.encode=function(e,t){throw new Error("NFT Bridge program does not have user-defined types")},e.prototype.decode=function(e,t){throw new Error("NFT Bridge program does not have user-defined types")},e}(),qG=function(e){this.instruction=new zG(e),this.accounts=new jG(e),this.state=new ZG(e),this.events=new HG(e),this.types=new VG(e)},QG=JSON.parse('{"version":"0.1.0","name":"wormhole","instructions":[{"name":"initialize","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"wormhole","type":"publicKey"}]},{"name":"completeNative","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"vaa","isMut":false,"isSigner":false},{"name":"claim","isMut":true,"isSigner":false},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"to","isMut":true,"isSigner":false},{"name":"toAuthority","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"custodySigner","isMut":false,"isSigner":false},{"name":"rent","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"completeWrapped","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"vaa","isMut":false,"isSigner":false},{"name":"claim","isMut":true,"isSigner":false},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"to","isMut":true,"isSigner":false},{"name":"toAuthority","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"wrappedMeta","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"splMetadataProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"completeWrappedMeta","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"vaa","isMut":false,"isSigner":false},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"wrappedMeta","isMut":false,"isSigner":false},{"name":"splMetadata","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"splMetadataProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"transferWrapped","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"from","isMut":true,"isSigner":false},{"name":"fromOwner","isMut":true,"isSigner":true},{"name":"mint","isMut":true,"isSigner":false},{"name":"wrappedMeta","isMut":false,"isSigner":false},{"name":"splMetadata","isMut":false,"isSigner":false},{"name":"authoritySigner","isMut":false,"isSigner":false},{"name":"wormholeBridge","isMut":true,"isSigner":false},{"name":"wormholeMessage","isMut":true,"isSigner":true},{"name":"wormholeEmitter","isMut":false,"isSigner":false},{"name":"wormholeSequence","isMut":true,"isSigner":false},{"name":"wormholeFeeCollector","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"splMetadataProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u32"},{"name":"targetAddress","type":{"array":["u8",32]}},{"name":"targetChain","type":"u16"}]},{"name":"transferNative","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"from","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"splMetadata","isMut":false,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"authoritySigner","isMut":false,"isSigner":false},{"name":"custodySigner","isMut":false,"isSigner":false},{"name":"wormholeBridge","isMut":true,"isSigner":false},{"name":"wormholeMessage","isMut":true,"isSigner":true},{"name":"wormholeEmitter","isMut":false,"isSigner":false},{"name":"wormholeSequence","isMut":true,"isSigner":false},{"name":"wormholeFeeCollector","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"splMetadataProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u32"},{"name":"targetAddress","type":{"array":["u8",32]}},{"name":"targetChain","type":"u16"}]},{"name":"registerChain","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"vaa","isMut":false,"isSigner":false},{"name":"claim","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"wormholeProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"upgradeContract","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"vaa","isMut":false,"isSigner":false},{"name":"claim","isMut":true,"isSigner":false},{"name":"upgradeAuthority","isMut":false,"isSigner":false},{"name":"spill","isMut":true,"isSigner":false},{"name":"implementation","isMut":true,"isSigner":false},{"name":"programData","isMut":true,"isSigner":false},{"name":"nftBridgeProgram","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"bpfLoaderUpgradeable","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]}],"accounts":[]}'),JG=n(54659).Buffer;JG.alloc(32,1);function YG(e,t){return new Sb.Program(QG,new gf.PublicKey(e),void 0===t?{connection:null}:t,new qG(QG))}function XG(e,t){return YG(e,Sf(t))}var $G=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,o,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},ez=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},oz=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},cz=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},fz=function(e,t){for(var n=0,a=t.length,o=e.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},hz=function(e,t){for(var n=0,a=t.length,o=e.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]",value_type:"u8",key:r})];case 3:return i.sent(),[2,!0];case 4:return i.sent(),[2,!1];case 5:return[2]}}))}))}var Fz=n(54659).Buffer,Lz=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(sK){r(sK)}}function s(e){try{c(a.throw(e))}catch(sK){r(sK)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},jz=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]1&&void 0!==arguments[1]?arguments[1]:0,n=new l.default(this.blob.decode(e,t),10,"le");return this.signed?n.fromTwos(8*this.span).clone():n}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.signed&&(e=e.toTwos(8*this.span)),this.blob.encode(e.toArrayLike(a,"le",this.span),t,n)}}]),n}(u.Layout);function b(e){return new p(8,!1,e)}t.u64=b,t.i64=function(e){return new p(8,!0,e)},t.u128=function(e){return new p(16,!1,e)},t.i128=function(e){return new p(16,!0,e)},t.u256=function(e){return new p(32,!1,e)},t.i256=function(e){return new p(32,!0,e)};var m=function(e){i(n,e);var t=s(n);function n(e,a,r,i){var s;return o(this,n),(s=t.call(this,e.span,i)).layout=e,s.decoder=a,s.encoder=r,s}return r(n,[{key:"decode",value:function(e,t){return this.decoder(this.layout.decode(e,t))}},{key:"encode",value:function(e,t,n){return this.layout.encode(this.encoder(e),t,n)}},{key:"getSpan",value:function(e,t){return this.layout.getSpan(e,t)}}]),n}(u.Layout);t.publicKey=function(e){return new m((0,u.blob)(32),(function(e){return new d.PublicKey(e)}),(function(e){return e.toBuffer()}),e)};var h=function(e){i(n,e);var t=s(n);function n(e,a){var r;return o(this,n),(r=t.call(this,-1,a)).layout=e,r.discriminator=(0,u.u8)(),r}return r(n,[{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null===e||void 0===e?this.discriminator.encode(0,t,n):(this.discriminator.encode(1,t,n),this.layout.encode(e,t,n+1)+1)}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.discriminator.decode(e,t);if(0===n)return null;if(1===n)return this.layout.decode(e,t+1);throw new Error("Invalid option "+this.property)}},{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.discriminator.decode(e,t);if(0===n)return 1;if(1===n)return this.layout.getSpan(e,t+1)+1;throw new Error("Invalid option "+this.property)}}]),n}(u.Layout);function g(e){if(0===e)return!1;if(1===e)return!0;throw new Error("Invalid bool: "+e)}function y(e){return e?1:0}function v(e){var t=(0,u.u32)("length"),n=(0,u.struct)([t,(0,u.blob)((0,u.offset)(t,-t.span),"data")]);return new m(n,(function(e){return e.data}),(function(e){return{data:e}}),e)}t.option=function(e,t){return new h(e,t)},t.bool=function(e){return new m((0,u.u8)(),g,y,e)},t.vec=function(e,t){var n=(0,u.u32)("length"),a=(0,u.struct)([n,(0,u.seq)(e,(0,u.offset)(n,-n.span),"values")]);return new m(a,(function(e){return e.values}),(function(e){return{values:e}}),t)},t.tagged=function(e,t,n){var a=(0,u.struct)([b("tag"),t.replicate("data")]);return new m(a,(function(t){var n=t.tag,a=t.data;if(!n.eq(e))throw new Error("Invalid tag, expected: "+e.toString("hex")+", got: "+n.toString("hex"));return a}),(function(t){return{tag:e,data:t}}),n)},t.vecU8=v,t.str=function(e){return new m(v(),(function(e){return e.toString("utf-8")}),(function(e){return a.from(e,"utf-8")}),e)},t.rustEnum=function(e,t,n){var a=(0,u.union)(null!==n&&void 0!==n?n:(0,u.u8)(),t);return e.forEach((function(e,t){return a.addVariant(t,e,e.property)})),a},t.array=function(e,t,n){var a=(0,u.struct)([(0,u.seq)(e,t,"values")]);return new m(a,(function(e){return e.values}),(function(e){return{values:e}}),n)};var w=function(e){i(n,e);var t=s(n);function n(e,a,r){var i;return o(this,n),(i=t.call(this,e.span+a.span,r)).keyLayout=e,i.valueLayout=a,i}return r(n,[{key:"decode",value:function(e,t){return t=t||0,[this.keyLayout.decode(e,t),this.valueLayout.decode(e,t+this.keyLayout.getSpan(e,t))]}},{key:"encode",value:function(e,t,n){n=n||0;var a=this.keyLayout.encode(e[0],t,n);return a+this.valueLayout.encode(e[1],t,n+a)}},{key:"getSpan",value:function(e,t){return this.keyLayout.getSpan(e,t)+this.valueLayout.getSpan(e,t)}}]),n}(u.Layout);t.map=function(e,t,n){var a=(0,u.u32)("length"),o=(0,u.struct)([a,(0,u.seq)(new w(e,t),(0,u.offset)(a,-a.span),"values")]);return new m(o,(function(e){var t=e.values;return new Map(t)}),(function(e){return{values:Array.from(e.entries())}}),n)}},81615:function(e,t,n){"use strict";n.r(t),n.d(t,{ACCOUNT_DISCRIMINATOR_SIZE:function(){return st},AccountClient:function(){return qn},AnchorError:function(){return We},AnchorProvider:function(){return Pe},BN:function(){return x.a},BorshAccountsCoder:function(){return ct},BorshCoder:function(){return mt},BorshEventCoder:function(){return ut},BorshInstructionCoder:function(){return nt},BorshStateCoder:function(){return lt},EventManager:function(){return Xn},EventParser:function(){return $n},IdlError:function(){return ze},LangErrorCode:function(){return qe},LangErrorMessage:function(){return Qe},MethodsBuilderFactory:function(){return sa},Native:function(){return ka},Program:function(){return ua},ProgramError:function(){return Ze},ProgramErrorStack:function(){return Ke},Spl:function(){return ya},SplTokenCoder:function(){return rn},StateClient:function(){return Zn},SystemCoder:function(){return kn},eventDiscriminator:function(){return dt},getProvider:function(){return Oe},parseIdlErrors:function(){return Q},setProvider:function(){return Ne},splitArgsAndCtx:function(){return Gn},stateDiscriminator:function(){return ft},toInstruction:function(){return J},translateAddress:function(){return X},translateError:function(){return Ve},utils:function(){return jn},validateAccounts:function(){return Y},web3:function(){return k}});var a=n(88301),o=n(61120),r=n(82963),i=n(15861),s=n(84506),c=n(29439),u=n(74165),d=n(37762),l=n(1413),f=n(93433),p=n(45987),b=n(43144),m=n(15671),h=n(97326),g=n(60136),y=n(29388),v=n(98737),w=n(54659),k=n(8594),A=n(43811),x=n.n(A),I=n(70285),T=n.n(I),S=n(35429),C=n(38101),E=n.n(C),R=n(30477),M=n(12079),P=n(5397),U=n(57850),_=n.n(U),B=n(75979),D=n(65218),N=n(54659).Buffer,O=["message"],F=(0,u.Z)().mark(ae),L=(0,u.Z)().mark(oe),j=Object.freeze({__proto__:null,encode:function(e){return e.reduce((function(e,t){return e+t.toString(16).padStart(2,"0")}),"0x")},decode:function(e){0===e.indexOf("0x")&&(e=e.substr(2)),e.length%2==1&&(e="0"+e);var t=e.match(/.{2}/g);return null===t?w.Buffer.from([]):w.Buffer.from(t.map((function(e){return parseInt(e,16)})))}});function H(e){return new TextDecoder("utf-8").decode(e)}function G(e){return(new TextEncoder).encode(e)}var z=Object.freeze({__proto__:null,decode:H,encode:G});function K(e){return T().encode(e)}var W=Object.freeze({__proto__:null,encode:K,decode:function(e){return T().decode(e)}});function Z(e){return w.Buffer.from(S.toByteArray(e))}var V=Object.freeze({__proto__:null,encode:function(e){return S.fromByteArray(e)},decode:Z}),q=Object.freeze({__proto__:null,hex:j,utf8:z,bs58:W,base64:V});function Q(e){var t=new Map;return e.errors&&e.errors.forEach((function(e){var n,a=null!==(n=e.msg)&&void 0!==n?n:e.name;t.set(e.code,a)})),t}function J(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((function(e){if("accounts"in e)Y(e.accounts,t[e.name]);else if(void 0===t[e.name])throw new Error("Invalid arguments: ".concat(e.name," not provided."))}))}function X(e){return e instanceof k.PublicKey?e:new k.PublicKey(e)}var $=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a){var o,r;(0,m.Z)(this,n);var i=e.message,s=(0,p.Z)(e,O),c=e.path;return(o=t.call(this,0===c.length?i:"At path: "+c.join(".")+" -- "+i)).value=void 0,o.key=void 0,o.type=void 0,o.refinement=void 0,o.path=void 0,o.branch=void 0,o.failures=void 0,Object.assign((0,h.Z)(o),s),o.name=o.constructor.name,o.failures=function(){var t;return null!=(t=r)?t:r=[e].concat((0,f.Z)(a()))},o}return(0,b.Z)(n)}((0,v.Z)(TypeError));function ee(e){return"object"==typeof e&&null!=e}function te(e){return"string"==typeof e?JSON.stringify(e):""+e}function ne(e,t,n,a){if(!0!==e){!1===e?e={}:"string"==typeof e&&(e={message:e});var o=t.path,r=t.branch,i=n.type,s=e,c=s.refinement,u=s.message,d=void 0===u?"Expected a value of type `"+i+"`"+(c?" with refinement `"+c+"`":"")+", but received: `"+te(a)+"`":u;return(0,l.Z)((0,l.Z)({value:a,type:i,refinement:c,key:o[o.length-1],path:o,branch:r},e),{},{message:d})}}function ae(e,t,n,a){var o,r,i,s,c;return(0,u.Z)().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:ee(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]),r=(0,d.Z)(e),u.prev=2,r.s();case 4:if((i=r.n()).done){u.next=13;break}if(s=i.value,c=ne(s,t,n,a),u.t0=c,!u.t0){u.next=11;break}return u.next=11,c;case 11:u.next=4;break;case 13:u.next=18;break;case 15:u.prev=15,u.t1=u.catch(2),r.e(u.t1);case 18:return u.prev=18,r.f(),u.finish(18);case 21:case"end":return u.stop()}}),F,null,[[2,15,18,21]])}function oe(e,t,n){var a,o,r,i,s,l,p,b,m,h,g,y,v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B;return(0,u.Z)().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(void 0===n&&(n={}),o=(a=n).path,r=void 0===o?[]:o,i=a.branch,s=void 0===i?[e]:i,l=a.coerce,p=void 0!==l&&l,b=a.mask,m=void 0!==b&&b,h={path:r,branch:s},p&&(e=t.coercer(e,h),m&&"type"!==t.type&&ee(t.schema)&&ee(e)&&!Array.isArray(e)))for(g in e)void 0===t.schema[g]&&delete e[g];y=!0,v=(0,d.Z)(t.validator(e,h)),u.prev=5,v.s();case 7:if((w=v.n()).done){u.next=14;break}return k=w.value,y=!1,u.next=12,[k,void 0];case 12:u.next=7;break;case 14:u.next=19;break;case 16:u.prev=16,u.t0=u.catch(5),v.e(u.t0);case 19:return u.prev=19,v.f(),u.finish(19);case 22:A=(0,d.Z)(t.entries(e,h)),u.prev=23,A.s();case 25:if((x=A.n()).done){u.next=52;break}I=(0,c.Z)(x.value,3),T=I[0],S=I[1],C=I[2],E=oe(S,C,{path:void 0===T?r:[].concat((0,f.Z)(r),[T]),branch:void 0===T?s:[].concat((0,f.Z)(s),[S]),coerce:p,mask:m}),R=(0,d.Z)(E),u.prev=29,R.s();case 31:if((M=R.n()).done){u.next=42;break}if(!(P=M.value)[0]){u.next=39;break}return y=!1,u.next=37,[P[0],void 0];case 37:u.next=40;break;case 39:p&&(S=P[1],void 0===T?e=S:e instanceof Map?e.set(T,S):e instanceof Set?e.add(S):ee(e)&&(e[T]=S));case 40:u.next=31;break;case 42:u.next=47;break;case 44:u.prev=44,u.t1=u.catch(29),R.e(u.t1);case 47:return u.prev=47,R.f(),u.finish(47);case 50:u.next=25;break;case 52:u.next=57;break;case 54:u.prev=54,u.t2=u.catch(23),A.e(u.t2);case 57:return u.prev=57,A.f(),u.finish(57);case 60:if(!y){u.next=79;break}U=(0,d.Z)(t.refiner(e,h)),u.prev=62,U.s();case 64:if((_=U.n()).done){u.next=71;break}return B=_.value,y=!1,u.next=69,[B,void 0];case 69:u.next=64;break;case 71:u.next=76;break;case 73:u.prev=73,u.t3=u.catch(62),U.e(u.t3);case 76:return u.prev=76,U.f(),u.finish(76);case 79:if(u.t4=y,!u.t4){u.next=83;break}return u.next=83,[void 0,e];case 83:case"end":return u.stop()}}),L,null,[[5,16,19,22],[23,54,57,60],[29,44,47,50],[62,73,76,79]])}var re=function(){function e(t){var n=this;(0,m.Z)(this,e),this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;var a=t.type,o=t.schema,r=t.validator,i=t.refiner,s=t.coercer,c=void 0===s?function(e){return e}:s,d=t.entries,l=void 0===d?(0,u.Z)().mark((function e(){return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})):d;this.type=a,this.schema=o,this.entries=l,this.coercer=c,this.validator=r?function(e,t){return ae(r(e,t),t,n,e)}:function(){return[]},this.refiner=i?function(e,t){return ae(i(e,t),t,n,e)}:function(){return[]}}return(0,b.Z)(e,[{key:"assert",value:function(e){return function(e,t){var n=ce(e,t);if(n[0])throw n[0]}(e,this)}},{key:"create",value:function(e){return ie(e,this)}},{key:"is",value:function(e){return se(e,this)}},{key:"mask",value:function(e){return function(e,t){var n=ce(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}(e,this)}},{key:"validate",value:function(e,t){return void 0===t&&(t={}),ce(e,this,t)}}]),e}();function ie(e,t){var n=ce(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function se(e,t){return!ce(e,t)[0]}function ce(e,t,n){void 0===n&&(n={});var a=oe(e,t,n),o=function(e){var t=e.next(),n=t.done,a=t.value;return n?void 0:a}(a);return o[0]?[new $(o[0],(0,u.Z)().mark((function e(){var t,n,o;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=(0,d.Z)(a),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=11;break}if(o=n.value,e.t0=o[0],!e.t0){e.next=9;break}return e.next=9,o[0];case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t1=e.catch(1),t.e(e.t1);case 16:return e.prev=16,t.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[1,13,16,19]])}))),void 0]:[void 0,o[1]]}function ue(e,t){return new re({type:e,schema:null,validator:t})}function de(e){return new re({type:"array",schema:e,entries:(0,u.Z)().mark((function t(n){var a,o,r,i,s;return(0,u.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e||!Array.isArray(n)){t.next=18;break}a=(0,d.Z)(n.entries()),t.prev=2,a.s();case 4:if((o=a.n()).done){t.next=10;break}return r=(0,c.Z)(o.value,2),i=r[0],s=r[1],t.next=8,[i,s,e];case 8:t.next=4;break;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(2),a.e(t.t0);case 15:return t.prev=15,a.f(),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[2,12,15,18]])})),coercer:function(e){return Array.isArray(e)?e.slice():e},validator:function(e){return Array.isArray(e)||"Expected an array value, but received: "+te(e)}})}function le(e){var t=te(e),n=typeof e;return new re({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:function(n){return n===e||"Expected the literal `"+t+"`, but received: "+te(n)}})}function fe(e){return new re((0,l.Z)((0,l.Z)({},e),{},{validator:function(t,n){return null===t||e.validator(t,n)},refiner:function(t,n){return null===t||e.refiner(t,n)}}))}function pe(){return ue("number",(function(e){return"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+te(e)}))}function be(e){return new re((0,l.Z)((0,l.Z)({},e),{},{validator:function(t,n){return void 0===t||e.validator(t,n)},refiner:function(t,n){return void 0===t||e.refiner(t,n)}}))}function me(){return ue("string",(function(e){return"string"==typeof e||"Expected a string, but received: "+te(e)}))}function he(e){var t=Object.keys(e);return new re({type:"type",schema:e,entries:(0,u.Z)().mark((function n(a){var o,r,i;return(0,u.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!ee(a)){n.next=9;break}o=0,r=t;case 2:if(!(o0&&n.sign.apply(n,(0,f.Z)(a)),i=n._compile(),s=i.serialize(),c=n._serialize(s).toString("base64"),d={encoding:"base64",commitment:null!=o?o:t.commitment},r&&(l=(Array.isArray(r)?r:i.nonProgramIds()).map((function(e){return e.toBase58()})),d.accounts={encoding:"base64",addresses:l}),a&&(d.sigVerify=!0),p=[c,d],e.t0=ie,e.next=8,t._rpcRequest("simulateTransaction",p);case 8:if(e.t1=e.sent,e.t2=Re,!("error"in(b=(0,e.t0)(e.t1,e.t2)))){e.next=14;break}throw"data"in b.error&&((m=b.error.data.logs)&&Array.isArray(m))&&(g=(h="\n ")+m.join(h),D.error(b.error.message,g)),new k.SendTransactionError("failed to simulate transaction: "+b.error.message,m);case 14:return e.abrupt("return",b.result);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Te=Se(ye());function Se(e){return ge([he({jsonrpc:le("2.0"),id:me(),result:e}),he({jsonrpc:le("2.0"),id:me(),error:he({code:ye(),message:me(),data:be(ue("any",(function(){return!0})))})})])}var Ce,Ee,Re=(Ee=he({err:fe(ge([he({}),me()])),logs:fe(de(me())),accounts:be(fe(de(fe(he({executable:ue("boolean",(function(e){return"boolean"==typeof e})),owner:me(),lamports:pe(),data:de(me()),rentEpoch:be(pe())}))))),unitsConsumed:be(pe())}),function(e,t,n){return new re((0,l.Z)((0,l.Z)({},e),{},{coercer:function(a,o){return se(a,t)?e.coercer(n(a),o):e.coercer(a,o)}}))}(Se(Ce=he({context:he({slot:pe()}),value:Ee})),Te,(function(e){return"error"in e?e:(0,l.Z)((0,l.Z)({},e),{},{result:ie(e.result,Ce)})}))),Me=Object.freeze({__proto__:null,invoke:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n,a,o){var r;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=X(t),o||(o=Oe()),(r=new k.Transaction).add(new k.TransactionInstruction({programId:t,keys:null!=n?n:[],data:a})),void 0!==o.sendAndConfirm){e.next=4;break}throw new Error("This function requires 'Provider.sendAndConfirm' to be implemented.");case 4:return e.next=6,o.sendAndConfirm(r,[]);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})));return function(t,n,a,o){return e.apply(this,arguments)}}(),getMultipleAccounts:ve,simulateTransaction:xe}),Pe=function(){function e(t,n,a){(0,m.Z)(this,e),this.connection=t,this.wallet=n,this.opts=a,this.publicKey=n.publicKey}return(0,b.Z)(e,[{key:"sendAndConfirm",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n,a){var o,r,i,s;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===a&&(a=this.opts),t.feePayer=this.wallet.publicKey,e.next=4,this.connection.getRecentBlockhash(a.preflightCommitment);case 4:return t.recentBlockhash=e.sent.blockhash,e.next=7,this.wallet.signTransaction(t);case 7:return t=e.sent,(null!=n?n:[]).forEach((function(e){t.partialSign(e)})),r=t.serialize(),e.prev=10,e.next=13,_e(this.connection,r,a);case 13:return e.abrupt("return",e.sent);case 16:if(e.prev=16,e.t0=e.catch(10),!(e.t0 instanceof De)){e.next=26;break}return e.next=21,this.connection.getTransaction(K(t.signature),{commitment:"confirmed"});case 21:if(!(i=e.sent)){e.next=25;break}throw(s=null===(o=i.meta)||void 0===o?void 0:o.logMessages)?new k.SendTransactionError(e.t0.message,s):e.t0;case 25:case 26:throw e.t0;case 27:case"end":return e.stop()}}),e,this,[[10,16]])})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"sendAll",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n){var a,o,r,i,s,c,d=this;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n=this.opts),e.next=3,this.connection.getRecentBlockhash(n.preflightCommitment);case 3:return a=e.sent,o=t.map((function(e){var t,n=e.tx,o=null!==(t=e.signers)&&void 0!==t?t:[];return n.feePayer=d.wallet.publicKey,n.recentBlockhash=a.blockhash,o.forEach((function(e){n.partialSign(e)})),n})),e.next=7,this.wallet.signAllTransactions(o);case 7:r=e.sent,i=[],s=0;case 10:if(!(s1)return null;a=s[0].match(/([0-9]+)/g)[0]}try{o=parseInt(a)}catch(e){return null}var c=t.get(o);return void 0!==c?new n(o,c,e.logs):void 0!==(c=Qe.get(o))?new n(o,c,e.logs):null}}]),n}((0,v.Z)(Error));function Ve(e,t){He("debug-logs")&&D.log("Translating error:",e);var n=We.parse(e.logs);if(n)return n;var a=Ze.parse(e,t);if(a)return a;if(e.logs){var o={get:function(t,n){return"programErrorStack"===n?t.programErrorStack.stack:"program"===n?t.programErrorStack.stack[e.programErrorStack.stack.length-1]:Reflect.get.apply(Reflect,arguments)}};return e.programErrorStack=Ke.parse(e.logs),new Proxy(e,o)}return e}var qe={InstructionMissing:100,InstructionFallbackNotFound:101,InstructionDidNotDeserialize:102,InstructionDidNotSerialize:103,IdlInstructionStub:1e3,IdlInstructionInvalidProgram:1001,ConstraintMut:2e3,ConstraintHasOne:2001,ConstraintSigner:2002,ConstraintRaw:2003,ConstraintOwner:2004,ConstraintRentExempt:2005,ConstraintSeeds:2006,ConstraintExecutable:2007,ConstraintState:2008,ConstraintAssociated:2009,ConstraintAssociatedInit:2010,ConstraintClose:2011,ConstraintAddress:2012,ConstraintZero:2013,ConstraintTokenMint:2014,ConstraintTokenOwner:2015,ConstraintMintMintAuthority:2016,ConstraintMintFreezeAuthority:2017,ConstraintMintDecimals:2018,ConstraintSpace:2019,RequireViolated:2500,RequireEqViolated:2501,RequireKeysEqViolated:2502,RequireNeqViolated:2503,RequireKeysNeqViolated:2504,RequireGtViolated:2505,RequireGteViolated:2506,AccountDiscriminatorAlreadySet:3e3,AccountDiscriminatorNotFound:3001,AccountDiscriminatorMismatch:3002,AccountDidNotDeserialize:3003,AccountDidNotSerialize:3004,AccountNotEnoughKeys:3005,AccountNotMutable:3006,AccountOwnedByWrongProgram:3007,InvalidProgramId:3008,InvalidProgramExecutable:3009,AccountNotSigner:3010,AccountNotSystemOwned:3011,AccountNotInitialized:3012,AccountNotProgramData:3013,AccountNotAssociatedTokenAccount:3014,AccountSysvarMismatch:3015,AccountReallocExceedsLimit:3016,AccountDuplicateReallocs:3017,StateInvalidAddress:4e3,DeclaredProgramIdMismatch:4100,Deprecated:5e3},Qe=new Map([[qe.InstructionMissing,"8 byte instruction identifier not provided"],[qe.InstructionFallbackNotFound,"Fallback functions are not supported"],[qe.InstructionDidNotDeserialize,"The program could not deserialize the given instruction"],[qe.InstructionDidNotSerialize,"The program could not serialize the given instruction"],[qe.IdlInstructionStub,"The program was compiled without idl instructions"],[qe.IdlInstructionInvalidProgram,"The transaction was given an invalid program for the IDL instruction"],[qe.ConstraintMut,"A mut constraint was violated"],[qe.ConstraintHasOne,"A has_one constraint was violated"],[qe.ConstraintSigner,"A signer constraint was violated"],[qe.ConstraintRaw,"A raw constraint was violated"],[qe.ConstraintOwner,"An owner constraint was violated"],[qe.ConstraintRentExempt,"A rent exemption constraint was violated"],[qe.ConstraintSeeds,"A seeds constraint was violated"],[qe.ConstraintExecutable,"An executable constraint was violated"],[qe.ConstraintState,"A state constraint was violated"],[qe.ConstraintAssociated,"An associated constraint was violated"],[qe.ConstraintAssociatedInit,"An associated init constraint was violated"],[qe.ConstraintClose,"A close constraint was violated"],[qe.ConstraintAddress,"An address constraint was violated"],[qe.ConstraintZero,"Expected zero account discriminant"],[qe.ConstraintTokenMint,"A token mint constraint was violated"],[qe.ConstraintTokenOwner,"A token owner constraint was violated"],[qe.ConstraintMintMintAuthority,"A mint mint authority constraint was violated"],[qe.ConstraintMintFreezeAuthority,"A mint freeze authority constraint was violated"],[qe.ConstraintMintDecimals,"A mint decimals constraint was violated"],[qe.ConstraintSpace,"A space constraint was violated"],[qe.RequireViolated,"A require expression was violated"],[qe.RequireEqViolated,"A require_eq expression was violated"],[qe.RequireKeysEqViolated,"A require_keys_eq expression was violated"],[qe.RequireNeqViolated,"A require_neq expression was violated"],[qe.RequireKeysNeqViolated,"A require_keys_neq expression was violated"],[qe.RequireGtViolated,"A require_gt expression was violated"],[qe.RequireGteViolated,"A require_gte expression was violated"],[qe.AccountDiscriminatorAlreadySet,"The account discriminator was already set on this account"],[qe.AccountDiscriminatorNotFound,"No 8 byte discriminator was found on the account"],[qe.AccountDiscriminatorMismatch,"8 byte discriminator did not match what was expected"],[qe.AccountDidNotDeserialize,"Failed to deserialize the account"],[qe.AccountDidNotSerialize,"Failed to serialize the account"],[qe.AccountNotEnoughKeys,"Not enough account keys given to the instruction"],[qe.AccountNotMutable,"The given account is not mutable"],[qe.AccountOwnedByWrongProgram,"The given account is owned by a different program than expected"],[qe.InvalidProgramId,"Program ID was not as expected"],[qe.InvalidProgramExecutable,"Program account is not executable"],[qe.AccountNotSigner,"The given account did not sign"],[qe.AccountNotSystemOwned,"The given account is not owned by the system program"],[qe.AccountNotInitialized,"The program expected this account to be already initialized"],[qe.AccountNotProgramData,"The given account is not a program data account"],[qe.AccountNotAssociatedTokenAccount,"The given account is not the associated token account"],[qe.AccountSysvarMismatch,"The given public key does not match the required sysvar"],[qe.AccountReallocExceedsLimit,"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit"],[qe.AccountDuplicateReallocs,"The account was duplicated for more than one reallocation"],[qe.StateInvalidAddress,"The given state account does not have the correct address"],[qe.DeclaredProgramIdMismatch,"The declared program id does not match the actual program id"],[qe.Deprecated,"The API being used is deprecated and should no longer be used"]]),Je=function(){return Je=Object.assign||function(e){for(var t,n=1,a=arguments.length;n1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0;if("struct"===t.type.kind){var o=t.type.fields.map((function(t){return e.fieldLayout(t,n)}));return M.struct(o,a)}if("enum"===t.type.kind){var r=t.type.variants.map((function(t){var a=E()(t.name);if(void 0===t.fields)return M.struct([],a);var o=t.fields.map((function(t){if(!t.hasOwnProperty("name"))throw new Error("Tuple enum variants not yet implemented.");return e.fieldLayout(t,n)}));return M.struct(o,a)}));return void 0!==a?M.rustEnum(r).replicate(a):M.rustEnum(r,a)}throw new Error("Unknown type kint: ".concat(t))}}]),e}(),nt=function(){function e(t){var n=this;(0,m.Z)(this,e),this.idl=t,this.ixLayout=e.parseIxLayout(t);var a=new Map;t.instructions.forEach((function(e){var t=ot("global",e.name);a.set(T().encode(t),{layout:n.ixLayout.get(e.name),name:e.name})})),t.state&&t.state.methods.map((function(e){var t=ot("state",e.name);a.set(T().encode(t),{layout:n.ixLayout.get(e.name),name:e.name})})),this.sighashLayouts=a}return(0,b.Z)(e,[{key:"encode",value:function(e,t){return this._encode("global",e,t)}},{key:"encodeState",value:function(e,t){return this._encode("state",e,t)}},{key:"_encode",value:function(e,t,n){var a=w.Buffer.alloc(1e3),o=E()(t),r=this.ixLayout.get(o);if(!r)throw new Error("Unknown method: ".concat(o));var i=r.encode(n,a),s=a.slice(0,i);return w.Buffer.concat([ot(e,t),s])}},{key:"decode",value:function(e){"string"==typeof e&&(e="hex"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hex")?w.Buffer.from(e,"hex"):T().decode(e));var t=T().encode(e.slice(0,8)),n=e.slice(8),a=this.sighashLayouts.get(t);return a?{data:a.layout.decode(n),name:a.name}:null}},{key:"format",value:function(e,t){return at.format(e,t,this.idl)}}],[{key:"parseIxLayout",value:function(e){var t=(e.state?e.state.methods:[]).map((function(t){var n=t.args.map((function(t){var n,a;return tt.fieldLayout(t,Array.from([].concat((0,f.Z)(null!==(n=e.accounts)&&void 0!==n?n:[]),(0,f.Z)(null!==(a=e.types)&&void 0!==a?a:[]))))})),a=E()(t.name);return[a,M.struct(n,a)]})).concat(e.instructions.map((function(t){var n=t.args.map((function(t){var n,a;return tt.fieldLayout(t,Array.from([].concat((0,f.Z)(null!==(n=e.accounts)&&void 0!==n?n:[]),(0,f.Z)(null!==(a=e.types)&&void 0!==a?a:[]))))})),a=E()(t.name);return[a,M.struct(n,a)]})));return new Map(t)}}]),e}(),at=function(){function e(){(0,m.Z)(this,e)}return(0,b.Z)(e,null,[{key:"format",value:function(t,n,a){var o=a.instructions.filter((function(e){return t.name===e.name}))[0];if(void 0===o)return D.error("Invalid instruction given"),null;var r=o.args.map((function(n){return{name:n.name,type:e.formatIdlType(n.type),data:e.formatIdlData(n,t.data[n.name],a.types)}})),i=e.flattenIdlAccounts(o.accounts);return{args:r,accounts:n.map((function(e,t){return t");if("option"in e)return"Option<".concat(this.formatIdlType(e.option),">");if("defined"in e)return e.defined;if("array"in e)return"Array<".concat(e.array[0],"; ").concat(e.array[1],">");throw new Error("Unknown IDL type: ".concat(e))}},{key:"formatIdlData",value:function(t,n,a){var o=this;if("string"==typeof t.type)return n.toString();if(t.type.hasOwnProperty("vec"))return"["+n.map((function(e){return o.formatIdlData({name:"",type:t.type.vec},e)})).join(", ")+"]";if(t.type.hasOwnProperty("option"))return null===n?"null":this.formatIdlData({name:"",type:t.type.option},n,a);if(t.type.hasOwnProperty("defined")){if(void 0===a)throw new Error("User defined types not provided");var r=a.filter((function(e){return e.name===t.type.defined}));if(1!==r.length)throw new Error("Type not found: ".concat(t.type.defined));return e.formatIdlDataDefined(r[0],n,a)}return"unknown"}},{key:"formatIdlDataDefined",value:function(t,n,a){if("struct"===t.type.kind){var o=t.type;return"{ "+Object.keys(n).map((function(t){var r=o.fields.filter((function(e){return e.name===t}))[0];if(void 0===r)throw new Error("Unable to find type");return t+": "+e.formatIdlData(r,n[t],a)})).join(", ")+" }"}if(0===t.type.variants.length)return"{}";if(t.type.variants[0].name){var r=t.type.variants,i=Object.keys(n)[0],s=n[i],c=Object.keys(s).map((function(t){var n,o=s[t],c=null===(n=r[i])||void 0===n?void 0:n.filter((function(e){return e.name===t}))[0];if(void 0===c)throw new Error("Unable to find variant");return t+": "+e.formatIdlData(c,o,a)})).join(", "),u=E()(i,{pascalCase:!0});return 0===c.length?u:"".concat(u," { ").concat(c," }")}return"Tuple formatting not yet implemented"}},{key:"flattenIdlAccounts",value:function(t,n){return t.map((function(t){var a=function(e){var t=e.replace(/([A-Z])/g," $1");return t.charAt(0).toUpperCase()+t.slice(1)}(t.name);if(t.hasOwnProperty("accounts")){var o=n?"".concat(n," > ").concat(a):a;return e.flattenIdlAccounts(t.accounts,o)}return(0,l.Z)((0,l.Z)({},t),{},{name:n?"".concat(n," > ").concat(a):a})})).flat()}}]),e}();function ot(e,t){var n,a="".concat(e,":").concat((void 0===n&&(n={}),function(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,a=void 0===n?Xe:n,o=t.stripRegexp,r=void 0===o?$e:o,i=t.transform,s=void 0===i?Ye:i,c=t.delimiter,u=void 0===c?" ":c,d=et(et(e,a,"$1\0$2"),r,"\0"),l=0,f=d.length;"\0"===d.charAt(l);)l++;for(;"\0"===d.charAt(f-1);)f--;return d.slice(l,f).split("\0").map(s).join(u)}(e,Je({delimiter:"."},t))}(t,Je({delimiter:"_"},n))));return w.Buffer.from(R.sha256.digest(a)).slice(0,8)}function rt(e,t){if("enum"===t.type.kind){var n=t.type.variants.map((function(t){return void 0===t.fields?0:t.fields.map((function(t){if("object"!=typeof t||!("name"in t))throw new Error("Tuple enum variants not yet implemented.");return it(e,t.type)})).reduce((function(e,t){return e+t}))}));return Math.max.apply(Math,(0,f.Z)(n))+1}return void 0===t.type.fields?0:t.type.fields.map((function(t){return it(e,t.type)})).reduce((function(e,t){return e+t}),0)}function it(e,t){var n,a;switch(t){case"bool":case"u8":case"i8":case"bytes":case"string":return 1;case"i16":case"u16":return 2;case"u32":case"i32":case"f32":return 4;case"u64":case"i64":case"f64":return 8;case"u128":case"i128":return 16;case"publicKey":return 32;default:if("vec"in t)return 1;if("option"in t)return 1+it(e,t.option);if("coption"in t)return 4+it(e,t.coption);if("defined"in t){var o=null!==(a=null===(n=e.types)||void 0===n?void 0:n.filter((function(e){return e.name===t.defined})))&&void 0!==a?a:[];if(1!==o.length)throw new ze("Type not found: ".concat(JSON.stringify(t)));return rt(e,o[0])}if("array"in t){var r=t.array[0],i=t.array[1];return it(e,r)*i}throw new Error("Invalid type ".concat(JSON.stringify(t)))}}var st=8,ct=function(){function e(t){if((0,m.Z)(this,e),void 0!==t.accounts){var n=t.accounts.map((function(e){return[e.name,tt.typeDefLayout(e,t.types)]}));this.accountLayouts=new Map(n),this.idl=t}else this.accountLayouts=new Map}return(0,b.Z)(e,[{key:"encode",value:function(){var t=(0,i.Z)((0,u.Z)().mark((function t(n,a){var o,r,i,s,c;return(0,u.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=w.Buffer.alloc(1e3),r=this.accountLayouts.get(n)){t.next=3;break}throw new Error("Unknown account: ".concat(n));case 3:return i=r.encode(a,o),s=o.slice(0,i),c=e.accountDiscriminator(n),t.abrupt("return",w.Buffer.concat([c,s]));case 6:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"decode",value:function(t,n){if(e.accountDiscriminator(t).compare(n.slice(0,8)))throw new Error("Invalid account discriminator");return this.decodeUnchecked(t,n)}},{key:"decodeUnchecked",value:function(e,t){var n=t.slice(8),a=this.accountLayouts.get(e);if(!a)throw new Error("Unknown account: ".concat(e));return a.decode(n)}},{key:"memcmp",value:function(t,n){var a=e.accountDiscriminator(t);return{offset:0,bytes:T().encode(n?w.Buffer.concat([a,n]):a)}}},{key:"size",value:function(e){var t;return 8+(null!==(t=rt(this.idl,e))&&void 0!==t?t:0)}}],[{key:"accountDiscriminator",value:function(e){return w.Buffer.from(R.sha256.digest("account:".concat(E()(e,{pascalCase:!0})))).slice(0,8)}}]),e}(),ut=function(){function e(t){if((0,m.Z)(this,e),void 0!==t.events){var n=t.events.map((function(e){var n={name:e.name,type:{kind:"struct",fields:e.fields.map((function(e){return{name:e.name,type:e.type}}))}};return[e.name,tt.typeDefLayout(n,t.types)]}));this.layouts=new Map(n),this.discriminators=new Map(void 0===t.events?[]:t.events.map((function(e){return[S.fromByteArray(dt(e.name)),e.name]})))}else this.layouts=new Map}return(0,b.Z)(e,[{key:"decode",value:function(e){var t;try{t=w.Buffer.from(S.toByteArray(e))}catch(Ce){return null}var n=S.fromByteArray(t.slice(0,8)),a=this.discriminators.get(n);if(void 0===a)return null;var o=this.layouts.get(a);if(!o)throw new Error("Unknown event: ".concat(a));return{data:o.decode(t.slice(8)),name:a}}}]),e}();function dt(e){return w.Buffer.from(R.sha256.digest("event:".concat(e))).slice(0,8)}var lt=function(){function e(t){if((0,m.Z)(this,e),void 0===t.state)throw new Error("Idl state not defined.");this.layout=tt.typeDefLayout(t.state.struct,t.types)}return(0,b.Z)(e,[{key:"encode",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n){var a,o,r,i;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=w.Buffer.alloc(1e3),o=this.layout.encode(n,a),e.next=4,ft(t);case 4:return r=e.sent,i=a.slice(0,o),e.abrupt("return",w.Buffer.concat([r,i]));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"decode",value:function(e){var t=e.slice(8);return this.layout.decode(t)}}]),e}();function ft(e){return pt.apply(this,arguments)}function pt(){return(pt=(0,i.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=He("anchor-deprecated-state")?"account":"state",e.abrupt("return",w.Buffer.from(R.sha256.digest("".concat(n,":").concat(t))).slice(0,8));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var bt=function(){function e(t){if((0,m.Z)(this,e),void 0!==t.types){var n=t.types.map((function(e){return[e.name,tt.typeDefLayout(e,t.types)]}));this.typeLayouts=new Map(n),this.idl=t}else this.typeLayouts=new Map}return(0,b.Z)(e,[{key:"encode",value:function(e,t){var n=w.Buffer.alloc(1e3),a=this.typeLayouts.get(e);if(!a)throw new Error("Unknown type: ".concat(e));var o=a.encode(t,n);return n.slice(0,o)}},{key:"decode",value:function(e,t){var n=this.typeLayouts.get(e);if(!n)throw new Error("Unknown type: ".concat(e));return n.decode(t)}}]),e}(),mt=(0,b.Z)((function e(t){(0,m.Z)(this,e),this.instruction=new nt(t),this.accounts=new ct(t),this.events=new ut(t),t.state&&(this.state=new lt(t)),this.types=new bt(t)})),ht="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof n.g?n.g:"undefined"!=typeof self?self:{};var gt=function(){function e(t,n){if((0,m.Z)(this,e),!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=n}return(0,b.Z)(e,[{key:"makeDestinationObject",value:function(){return{}}},{key:"decode",value:function(e,t){throw new Error("Layout is abstract")}},{key:"encode",value:function(e,t,n){throw new Error("Layout is abstract")}},{key:"getSpan",value:function(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}},{key:"replicate",value:function(e){var t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}},{key:"fromArray",value:function(e){}}]),e}(),yt=gt,vt=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(){return(0,m.Z)(this,n),t.apply(this,arguments)}return(0,b.Z)(n,[{key:"isCount",value:function(){throw new Error("ExternalLayout is abstract")}}]),n}(gt),wt=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a,o){var r;if((0,m.Z)(this,n),!(e instanceof gt))throw new TypeError("layout must be a Layout");if(void 0===a)a=0;else if(!Number.isInteger(a))throw new TypeError("offset must be integer or undefined");return(r=t.call(this,e.span,o||e.property)).layout=e,r.offset=a,r}return(0,b.Z)(n,[{key:"isCount",value:function(){return this.layout instanceof kt||this.layout instanceof At}},{key:"decode",value:function(e,t){return void 0===t&&(t=0),this.layout.decode(e,t+this.offset)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),this.layout.encode(e,t,n+this.offset)}}]),n}(vt),kt=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a){var o;if((0,m.Z)(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return(0,r.Z)(o)}return(0,b.Z)(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readUIntLE(t,this.span)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeUIntLE(e,n,this.span),this.span}}]),n}(gt),At=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a){var o;if((0,m.Z)(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return(0,r.Z)(o)}return(0,b.Z)(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readUIntBE(t,this.span)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeUIntBE(e,n,this.span),this.span}}]),n}(gt),xt=Math.pow(2,32);function It(e){var t=Math.floor(e/xt);return{hi32:t,lo32:e-t*xt}}function Tt(e,t){return e*xt+t}var St=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e){return(0,m.Z)(this,n),t.call(this,8,e)}return(0,b.Z)(n,[{key:"decode",value:function(e,t){void 0===t&&(t=0);var n=e.readUInt32LE(t);return Tt(e.readUInt32LE(t+4),n)}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=It(e);return t.writeUInt32LE(a.lo32,n),t.writeUInt32LE(a.hi32,n+4),8}}]),n}(gt),Ct=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e){return(0,m.Z)(this,n),t.call(this,8,e)}return(0,b.Z)(n,[{key:"decode",value:function(e,t){void 0===t&&(t=0);var n=e.readUInt32LE(t);return Tt(e.readInt32LE(t+4),n)}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=It(e);return t.writeUInt32LE(a.lo32,n),t.writeInt32LE(a.hi32,n+4),8}}]),n}(gt),Et=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a,o){var r;if((0,m.Z)(this,n),!Array.isArray(e)||!e.reduce((function(e,t){return e&&t instanceof gt}),!0))throw new TypeError("fields must be array of Layout instances");"boolean"==typeof a&&void 0===o&&(o=a,a=void 0);var i,s=(0,d.Z)(e);try{for(s.s();!(i=s.n()).done;){var c=i.value;if(0>c.span&&void 0===c.property)throw new Error("fields cannot contain unnamed variable-length layout")}}catch(l){s.e(l)}finally{s.f()}var u=-1;try{u=e.reduce((function(e,t){return e+t.getSpan()}),0)}catch(e){}return(r=t.call(this,u,a)).fields=e,r.decodePrefixes=!!o,r}return(0,b.Z)(n,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var n=0;try{n=this.fields.reduce((function(n,a){var o=a.getSpan(e,t);return t+=o,n+o}),0)}catch(e){throw new RangeError("indeterminate span")}return n}},{key:"decode",value:function(e,t){void 0===t&&(t=0);var n,a=this.makeDestinationObject(),o=(0,d.Z)(this.fields);try{for(o.s();!(n=o.n()).done;){var r=n.value;if(void 0!==r.property&&(a[r.property]=r.decode(e,t)),t+=r.getSpan(e,t),this.decodePrefixes&&e.length===t)break}}catch(i){o.e(i)}finally{o.f()}return a}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a,o=n,r=0,i=0,s=(0,d.Z)(this.fields);try{for(s.s();!(a=s.n()).done;){var c=a.value,u=c.span;if(i=0u&&(u=c.getSpan(t,n)))}r=n,n+=u}}catch(f){s.e(f)}finally{s.f()}return r+i-o}},{key:"fromArray",value:function(e){var t,n=this.makeDestinationObject(),a=(0,d.Z)(this.fields);try{for(a.s();!(t=a.n()).done;){var o=t.value;void 0!==o.property&&0o.span?n=-1:0<=n&&(n+=o.span)}}catch(r){a.e(r)}finally{a.f()}}}]),n}(gt),Rt=function(){function e(t){(0,m.Z)(this,e),this.property=t}return(0,b.Z)(e,[{key:"decode",value:function(){throw new Error("UnionDiscriminator is abstract")}},{key:"encode",value:function(){throw new Error("UnionDiscriminator is abstract")}}]),e}(),Mt=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a){var o;if((0,m.Z)(this,n),!(e instanceof vt&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");return(o=t.call(this,a||e.property||"variant")).layout=e,o}return(0,b.Z)(n,[{key:"decode",value:function(e,t){return this.layout.decode(e,t)}},{key:"encode",value:function(e,t,n){return this.layout.encode(e,t,n)}}]),n}(Rt),Pt=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a,o){var r;(0,m.Z)(this,n);var i=e instanceof kt||e instanceof At;if(i)e=new Mt(new wt(e));else if(e instanceof vt&&e.isCount())e=new Mt(e);else if(!(e instanceof Rt))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===a&&(a=null),!(null===a||a instanceof gt))throw new TypeError("defaultLayout must be null or a Layout");if(null!==a){if(0>a.span)throw new Error("defaultLayout must have constant span");void 0===a.property&&(a=a.replicate("content"))}var s=-1;a&&(0<=(s=a.span)&&i&&(s+=e.layout.span)),(r=t.call(this,s,o)).discriminator=e,r.usesPrefixDiscriminator=i,r.defaultLayout=a,r.registry={};var c=r.defaultGetSourceVariant.bind((0,h.Z)(r));return r.getSourceVariant=function(e){return c(e)},r.configGetSourceVariant=function(e){c=e.bind(this)},r}return(0,b.Z)(n,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}},{key:"defaultGetSourceVariant",value:function(e){if(e.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&e.hasOwnProperty(this.defaultLayout.property))return;var t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||e.hasOwnProperty(t.property)))return t}else for(var n in this.registry){var a=this.registry[n];if(e.hasOwnProperty(a.property))return a}throw new Error("unable to infer src variant")}},{key:"decode",value:function(e,t){var n;void 0===t&&(t=0);var a=this.discriminator,o=a.decode(e,t),r=this.registry[o];if(void 0===r){var i=0;r=this.defaultLayout,this.usesPrefixDiscriminator&&(i=a.layout.span),(n=this.makeDestinationObject())[a.property]=o,n[r.property]=this.defaultLayout.decode(e,t+i)}else n=r.decode(e,t);return n}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=this.getSourceVariant(e);if(void 0===a){var o=this.discriminator,r=this.defaultLayout,i=0;return this.usesPrefixDiscriminator&&(i=o.layout.span),o.encode(e[o.property],t,n),i+r.encode(e[r.property],t,n+i)}return a.encode(e,t,n)}},{key:"addVariant",value:function(e,t,n){var a=new Ut(this,e,t,n);return this.registry[e]=a,a}},{key:"getVariant",value:function(e,t){var n=e;return N.isBuffer(e)&&(void 0===t&&(t=0),n=this.discriminator.decode(e,t)),this.registry[n]}}]),n}(gt),Ut=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a,o,r){var i;if((0,m.Z)(this,n),!(e instanceof Pt))throw new TypeError("union must be a Union");if(!Number.isInteger(a)||0>a)throw new TypeError("variant must be a (non-negative) integer");if("string"==typeof o&&void 0===r&&(r=o,o=null),o){if(!(o instanceof gt))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=o.span&&o.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!=typeof r)throw new TypeError("variant must have a String property")}var s=e.span;return 0>e.span&&(0<=(s=o?o.span:0)&&e.usesPrefixDiscriminator&&(s+=e.discriminator.layout.span)),(i=t.call(this,s,r)).union=e,i.variant=a,i.layout=o||null,i}return(0,b.Z)(n,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),n+this.layout.getSpan(e,t+n)}},{key:"decode",value:function(e,t){var n=this.makeDestinationObject();if(void 0===t&&(t=0),this!==this.union.getVariant(e,t))throw new Error("variant mismatch");var a=0;return this.union.usesPrefixDiscriminator&&(a=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+a):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=0;if(this.union.usesPrefixDiscriminator&&(a=this.union.discriminator.layout.span),this.layout&&!e.hasOwnProperty(this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);var o=a;if(this.layout&&(this.layout.encode(e[this.property],t,n+a),o+=this.layout.getSpan(t,n+a),0<=this.union.span&&o>this.union.span))throw new Error("encoded variant overruns containing union");return o}},{key:"fromArray",value:function(e){if(this.layout)return this.layout.fromArray(e)}}]),n}(gt),_t=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a){var o;if((0,m.Z)(this,n),!(e instanceof vt&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");var r=-1;return e instanceof vt||(r=e),(o=t.call(this,r,a)).length=e,o}return(0,b.Z)(n,[{key:"getSpan",value:function(e,t){var n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}},{key:"decode",value:function(e,t){void 0===t&&(t=0);var n=this.span;return 0>n&&(n=this.length.decode(e,t)),e.slice(t,t+n)}},{key:"encode",value:function(e,t,n){var a,o=this.length;if(this.length instanceof vt&&(o=e.length),!N.isBuffer(e)||o!==e.length)throw new TypeError((a="Blob.encode",(this.property?a+"["+this.property+"]":a)+" requires (length "+o+") Buffer as src"));if(n+o>t.length)throw new RangeError("encoding overruns Buffer");return t.write(e.toString("hex"),n,o,"hex"),this.length instanceof vt&&this.length.encode(o,t,n),o}}]),n}(gt),Bt=function(e,t,n){return new wt(e,t,n)},Dt=function(e){return new kt(1,e)},Nt=function(e){return new kt(4,e)},Ot=function(e){return new St(e)},Ft=function(e){return new Ct(e)},Lt=function(e,t,n){return new Et(e,t,n)},jt=function(e,t,n){return new Pt(e,t,n)},Ht=function(e,t){return new _t(e,t)},Gt=function(){function e(t){(0,m.Z)(this,e)}return(0,b.Z)(e,[{key:"encode",value:function(e,t){switch(E()(e)){case"initializeMint":return function(e){var t=e.decimals,n=e.mintAuthority,a=e.freezeAuthority;return Wt({initializeMint:{decimals:t,mintAuthority:n.toBuffer(),freezeAuthorityOption:!!a,freezeAuthority:(a||k.PublicKey.default).toBuffer()}})}(t);case"initializeAccount":return Wt({initializeAccount:{}});case"initializeMultisig":return Wt({initializeMultisig:{m:t.m}});case"transfer":return Wt({transfer:{amount:t.amount}});case"approve":return Wt({approve:{amount:t.amount}});case"revoke":return Wt({revoke:{}});case"setAuthority":return Wt({setAuthority:{authorityType:(s=t).authorityType,newAuthority:s.newAuthority}});case"mintTo":return Wt({mintTo:{amount:t.amount}});case"burn":return Wt({burn:{amount:t.amount}});case"closeAccount":return Wt({closeAccount:{}});case"freezeAccount":return Wt({freezeAccount:{}});case"thawAccount":return Wt({thawAccount:{}});case"transferChecked":return Wt({transferChecked:{amount:(i=t).amount,decimals:i.decimals}});case"approvedChecked":return Wt({approveChecked:{amount:(r=t).amount,decimals:r.decimals}});case"mintToChecked":return Wt({mintToChecked:{amount:(o=t).amount,decimals:o.decimals}});case"burnChecked":return Wt({burnChecked:{amount:(a=t).amount,decimals:a.decimals}});case"intializeAccount2":return Wt({initilaizeAccount2:{authority:t.authority}});case"syncNative":return Wt({syncNative:{}});case"initializeAccount3":return Wt({initializeAccount3:{authority:t.authority}});case"initializeMultisig2":return Wt({initializeMultisig2:{m:t.m}});case"initializeMint2":return Wt({encodeInitializeMint2:{decimals:(n=t).decimals,mintAuthority:n.mintAuthority,freezeAuthority:n.freezeAuthority}});default:throw new Error("Invalid instruction: ".concat(e))}var n,a,o,r,i,s}},{key:"encodeState",value:function(e,t){throw new Error("SPL token does not have state")}}]),e}(),zt=jt(Dt("instruction"));function Kt(e){return Ht(32,e)}function Wt(e){var t=N.alloc(Zt),n=zt.encode(e,t);return t.slice(0,n)}zt.addVariant(0,Lt([Dt("decimals"),Ht(32,"mintAuthority"),Dt("freezeAuthorityOption"),Kt("freezeAuthority")]),"initializeMint"),zt.addVariant(1,Lt([]),"initializeAccount"),zt.addVariant(2,Lt([Dt("m")]),"initializeMultisig"),zt.addVariant(3,Lt([Ot("amount")]),"transfer"),zt.addVariant(4,Lt([Ot("amount")]),"approve"),zt.addVariant(5,Lt([]),"revoke"),zt.addVariant(6,Lt([Dt("authorityType"),Dt("newAuthorityOption"),Kt("newAuthority")]),"setAuthority"),zt.addVariant(7,Lt([Ot("amount")]),"mintTo"),zt.addVariant(8,Lt([Ot("amount")]),"burn"),zt.addVariant(9,Lt([]),"closeAccount"),zt.addVariant(10,Lt([]),"freezeAccount"),zt.addVariant(11,Lt([]),"thawAccount"),zt.addVariant(12,Lt([Ot("amount"),Dt("decimals")]),"transferChecked"),zt.addVariant(13,Lt([Ot("amount"),Dt("decimals")]),"approvedChecked"),zt.addVariant(14,Lt([Ot("amount"),Dt("decimals")]),"mintToChecked"),zt.addVariant(15,Lt([Ot("amount"),Dt("decimals")]),"burnedChecked"),zt.addVariant(16,Lt([Kt("authority")]),"InitializeAccount2"),zt.addVariant(17,Lt([]),"syncNative"),zt.addVariant(18,Lt([Kt("authority")]),"initializeAccount3"),zt.addVariant(19,Lt([Dt("m")]),"initializeMultisig2"),zt.addVariant(20,Lt([Dt("decimals"),Kt("mintAuthority"),Dt("freezeAuthorityOption"),Kt("freezeAuthority")]),"initializeMint2");var Zt=Math.max.apply(Math,(0,f.Z)(Object.values(zt.registry).map((function(e){return e.span})))),Vt=function(){function e(t){(0,m.Z)(this,e)}return(0,b.Z)(e,[{key:"encode",value:function(e,t){throw new Error("SPL token does not have state")}},{key:"decode",value:function(e){throw new Error("SPL token does not have state")}}]),e}();function qt(e){return new Yt(Ht(8),(function(e){return $t.fromBuffer(e)}),(function(e){return e.toBuffer()}),e)}function Qt(e){return new Yt(Ht(32),(function(e){return new k.PublicKey(e)}),(function(e){return e.toBuffer()}),e)}function Jt(e,t){return new Xt(e,t)}var Yt=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a,o,r){var i;return(0,m.Z)(this,n),(i=t.call(this,e.span,r)).layout=e,i.decoder=a,i.encoder=o,i}return(0,b.Z)(n,[{key:"decode",value:function(e,t){return this.decoder(this.layout.decode(e,t))}},{key:"encode",value:function(e,t,n){return this.layout.encode(this.encoder(e),t,n)}},{key:"getSpan",value:function(e,t){return this.layout.getSpan(e,t)}}]),n}(yt),Xt=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a){var o;return(0,m.Z)(this,n),(o=t.call(this,-1,a)).layout=e,o.discriminator=Nt(),o}return(0,b.Z)(n,[{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null==e?this.layout.span+this.discriminator.encode(0,t,n):(this.discriminator.encode(1,t,n),this.layout.encode(e,t,n+4)+4)}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.discriminator.decode(e,t);if(0===n)return null;if(1===n)return this.layout.decode(e,t+4);throw new Error("Invalid coption "+this.layout.property)}},{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.layout.getSpan(e,t+4)+4}}]),n}(yt);var $t=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(){return(0,m.Z)(this,n),t.apply(this,arguments)}return(0,b.Z)(n,[{key:"toBuffer",value:function(){var e=(0,a.Z)((0,o.Z)(n.prototype),"toArray",this).call(this).reverse(),t=N.from(e);if(8===t.length)return t;if(t.length>=8)throw new Error("u64 too large");var r=N.alloc(8);return t.copy(r),r}}],[{key:"fromBuffer",value:function(e){if(8!==e.length)throw new Error("Invalid buffer length: ".concat(e.length));return new n((0,f.Z)(e).reverse().map((function(e){return"00".concat(e.toString(16)).slice(-2)})).join(""),16)}}]),n}(x()),en=function(){function e(t){(0,m.Z)(this,e),this.idl=t}return(0,b.Z)(e,[{key:"encode",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n){var a,o,r,i;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="token"===e.t0?3:"mint"===e.t0?5:7;break;case 3:return a=N.alloc(165),o=nn.encode(n,a),e.abrupt("return",a.slice(0,o));case 5:return r=N.alloc(82),i=tn.encode(n,r),e.abrupt("return",r.slice(0,i));case 7:throw new Error("Invalid account name: ".concat(t));case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"decode",value:function(e,t){return this.decodeUnchecked(e,t)}},{key:"decodeUnchecked",value:function(e,t){switch(e){case"token":return function(e){return nn.decode(e)}(t);case"mint":return function(e){return tn.decode(e)}(t);default:throw new Error("Invalid account name: ".concat(e))}}},{key:"memcmp",value:function(e,t){switch(e){case"token":return{dataSize:165};case"mint":return{dataSize:82};default:throw new Error("Invalid account name: ".concat(e))}}},{key:"size",value:function(e){var t;return null!==(t=rt(this.idl,e))&&void 0!==t?t:0}}]),e}(),tn=Lt([Jt(Qt(),"mintAuthority"),qt("supply"),Dt("decimals"),("isInitialized",new Yt(Dt(),(function(e){if(0===e)return!1;if(1===e)return!0;throw new Error("Invalid bool: "+e)}),(function(e){return e?1:0}),"isInitialized")),Jt(Qt(),"freezeAuthority")]),nn=Lt([Qt("mint"),Qt("authority"),qt("amount"),Jt(Qt(),"delegate"),Dt("state"),Jt(qt(),"isNative"),qt("delegatedAmount"),Jt(Qt(),"closeAuthority")]),an=function(){function e(t){(0,m.Z)(this,e)}return(0,b.Z)(e,[{key:"decode",value:function(e){throw new Error("SPL token program does not have events")}}]),e}(),on=function(){function e(t){(0,m.Z)(this,e)}return(0,b.Z)(e,[{key:"encode",value:function(e,t){throw new Error("SPL token does not have user-defined types")}},{key:"decode",value:function(e,t){throw new Error("SPL token does not have user-defined types")}}]),e}(),rn=(0,b.Z)((function e(t){(0,m.Z)(this,e),this.instruction=new Gt(t),this.accounts=new en(t),this.events=new an(t),this.state=new Vt(t),this.types=new on(t)})),sn=function(){function e(t){(0,m.Z)(this,e)}return(0,b.Z)(e,[{key:"encode",value:function(e,t){switch(E()(e)){case"createAccount":return fn({createAccount:{lamports:(n=t).lamports,space:n.space,owner:n.owner.toBuffer()}});case"assign":return fn({assign:{owner:t.owner.toBuffer()}});case"transfer":return fn({transfer:{lamports:t.lamports}});case"createAccountWithSeed":return function(e){var t=e.base,n=e.seed,a=e.lamports,o=e.space,r=e.owner;return fn({createAccountWithSeed:{base:t.toBuffer(),seed:n,lamports:a,space:o,owner:r.toBuffer()}},ln.getVariant(3).span+n.length)}(t);case"advanceNonceAccount":return fn({advanceNonceAccount:{authorized:t.authorized.toBuffer()}});case"withdrawNonceAccount":return fn({withdrawNonceAccount:{lamports:t.lamports}});case"initializeNonceAccount":return fn({initializeNonceAccount:{authorized:t.authorized.toBuffer()}});case"authorizeNonceAccount":return fn({authorizeNonceAccount:{authorized:t.authorized.toBuffer()}});case"allocate":return fn({allocate:{space:t.space}});case"allocateWithSeed":return function(e){var t=e.base,n=e.seed,a=e.space,o=e.owner;return fn({allocateWithSeed:{base:t.toBuffer(),seed:n,space:a,owner:o.toBuffer()}},ln.getVariant(9).span+n.length)}(t);case"assignWithSeed":return function(e){var t=e.base,n=e.seed,a=e.owner;return fn({assignWithSeed:{base:t.toBuffer(),seed:n,owner:a.toBuffer()}},ln.getVariant(10).span+n.length)}(t);case"transferWithSeed":return function(e){var t=e.lamports,n=e.seed;return fn({transferWithSeed:{lamports:t,seed:n,owner:e.owner.toBuffer()}},ln.getVariant(11).span+n.length)}(t);default:throw new Error("Invalid instruction: ".concat(e))}var n}},{key:"encodeState",value:function(e,t){throw new Error("System does not have state")}}]),e}(),cn=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e){var a;return(0,m.Z)(this,n),(a=t.call(this,-1,e)).property=e,a.layout=Lt([Nt("length"),Nt("lengthPadding"),Ht(Bt(Nt(),-8),"chars")],a.property),a}return(0,b.Z)(n,[{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null==e)return this.layout.span;var a={chars:N.from(e,"utf8")};return this.layout.encode(a,t,n)}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.layout.decode(e,t).chars.toString()}},{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Nt().span+Nt().span+new(x())(new Uint8Array(e).slice(t,t+4),10,"le").toNumber()}}]),n}(yt);function un(e){return new cn(e)}function dn(e){return Ht(32,e)}var ln=jt(Nt("instruction"));function fn(e,t){var n=N.alloc(null!=t?t:pn),a=ln.encode(e,n);return void 0===t?n.slice(0,a):n}ln.addVariant(0,Lt([Ft("lamports"),Ft("space"),dn("owner")]),"createAccount"),ln.addVariant(1,Lt([dn("owner")]),"assign"),ln.addVariant(2,Lt([Ft("lamports")]),"transfer"),ln.addVariant(3,Lt([dn("base"),un("seed"),Ft("lamports"),Ft("space"),dn("owner")]),"createAccountWithSeed"),ln.addVariant(4,Lt([dn("authorized")]),"advanceNonceAccount"),ln.addVariant(5,Lt([Ft("lamports")]),"withdrawNonceAccount"),ln.addVariant(6,Lt([dn("authorized")]),"initializeNonceAccount"),ln.addVariant(7,Lt([dn("authorized")]),"authorizeNonceAccount"),ln.addVariant(8,Lt([Ft("space")]),"allocate"),ln.addVariant(9,Lt([dn("base"),un("seed"),Ft("space"),dn("owner")]),"allocateWithSeed"),ln.addVariant(10,Lt([dn("base"),un("seed"),dn("owner")]),"assignWithSeed"),ln.addVariant(11,Lt([Ft("lamports"),un("seed"),dn("owner")]),"transferWithSeed");var pn=Math.max.apply(Math,(0,f.Z)(Object.values(ln.registry).map((function(e){return e.span})))),bn=function(){function e(t){(0,m.Z)(this,e)}return(0,b.Z)(e,[{key:"encode",value:function(e,t){throw new Error("System does not have state")}},{key:"decode",value:function(e){throw new Error("System does not have state")}}]),e}(),mn=function(){function e(t){(0,m.Z)(this,e),this.idl=t}return(0,b.Z)(e,[{key:"encode",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n){var a,o;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("nonce"!==t){e.next=3;break}return a=N.alloc(k.NONCE_ACCOUNT_LENGTH),o=yn.encode(n,a),e.abrupt("return",a.slice(0,o));case 3:throw new Error("Invalid account name: ".concat(t));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"decode",value:function(e,t){return this.decodeUnchecked(e,t)}},{key:"decodeUnchecked",value:function(e,t){if("nonce"===e)return function(e){return yn.decode(e)}(t);throw new Error("Invalid account name: ".concat(e))}},{key:"memcmp",value:function(e,t){if("nonce"===e)return{dataSize:k.NONCE_ACCOUNT_LENGTH};throw new Error("Invalid account name: ".concat(e))}},{key:"size",value:function(e){var t;return null!==(t=rt(this.idl,e))&&void 0!==t?t:0}}]),e}(),hn=function(e){(0,g.Z)(n,e);var t=(0,y.Z)(n);function n(e,a,o,r){var i;return(0,m.Z)(this,n),(i=t.call(this,e.span,r)).layout=e,i.decoder=a,i.encoder=o,i}return(0,b.Z)(n,[{key:"decode",value:function(e,t){return this.decoder(this.layout.decode(e,t))}},{key:"encode",value:function(e,t,n){return this.layout.encode(this.encoder(e),t,n)}},{key:"getSpan",value:function(e,t){return this.layout.getSpan(e,t)}}]),n}(yt);function gn(e){return new hn(Ht(32),(function(e){return new k.PublicKey(e)}),(function(e){return e.toBuffer()}),e)}var yn=Lt([Nt("version"),Nt("state"),gn("authorizedPubkey"),gn("nonce"),Lt([Ot("lamportsPerSignature")],"feeCalculator")]),vn=function(){function e(t){(0,m.Z)(this,e)}return(0,b.Z)(e,[{key:"decode",value:function(e){throw new Error("System program does not have events")}}]),e}(),wn=function(){function e(t){(0,m.Z)(this,e)}return(0,b.Z)(e,[{key:"encode",value:function(e,t){throw new Error("System does not have user-defined types")}},{key:"decode",value:function(e,t){throw new Error("System does not have user-defined types")}}]),e}(),kn=(0,b.Z)((function e(t){(0,m.Z)(this,e),this.instruction=new sn(t),this.accounts=new mn(t),this.events=new vn(t),this.state=new bn(t),this.types=new wn(t)})),An=Object.freeze({__proto__:null,hash:function(e){return(0,R.sha256)(e)}});function xn(e,t,n){var a=w.Buffer.concat([e.toBuffer(),w.Buffer.from(t),n.toBuffer()]),o=R.sha256.digest(a);return new k.PublicKey(w.Buffer.from(o))}function In(e,t){var n=w.Buffer.alloc(0);e.forEach((function(e){if(e.length>32)throw new TypeError("Max seed length exceeded");n=w.Buffer.concat([n,Sn(e)])})),n=w.Buffer.concat([n,t.toBuffer(),w.Buffer.from("ProgramDerivedAddress")]);var a=(0,R.sha256)(new Uint8Array(n)),o=new(x())(a,16).toArray(void 0,32);if(k.PublicKey.isOnCurve(new Uint8Array(o)))throw new Error("Invalid seeds, address must fall off the curve");return new k.PublicKey(o)}function Tn(e,t){for(var n,a=255;0!=a;){try{n=In(e.concat(w.Buffer.from([a])),t)}catch(Ce){if(Ce instanceof TypeError)throw Ce;a--;continue}return[n,a]}throw new Error("Unable to find a viable program address nonce")}var Sn=function(e){return e instanceof w.Buffer?e:e instanceof Uint8Array?w.Buffer.from(e.buffer,e.byteOffset,e.byteLength):w.Buffer.from(e)};function Cn(e){return En.apply(this,arguments)}function En(){return En=(0,i.Z)((0,u.Z)().mark((function e(t){var n,a,o,r,i,s,d,l=arguments;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=[w.Buffer.from([97,110,99,104,111,114])],a=l.length,o=new Array(a>1?a-1:0),r=1;r-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return a&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function b(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=b(t);return t.readAsArrayBuffer(e),n}function h(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():i&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=h(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=h(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=b(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),a=0;a-1?a:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),a=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(o))}})),t}function k(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},g.call(v.prototype),g.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},k.error=function(){var e=new k(null,{status:0,statusText:""});return e.type="error",e};var A=[301,302,303,307,308];k.redirect=function(e,t){if(-1===A.indexOf(t))throw new RangeError("Invalid status code");return new k(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function x(e,n){return new Promise((function(a,r){var i=new v(e,n);if(i.signal&&i.signal.aborted)return r(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),a=n.shift().trim();if(a){var o=n.join(":").trim();t.append(a,o)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;a(new k(o,n))},s.onerror=function(){r(new TypeError("Network request failed"))},s.ontimeout=function(){r(new TypeError("Network request failed"))},s.onabort=function(){r(new t.DOMException("Aborted","AbortError"))},s.open(i.method,i.url,!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&o&&(s.responseType="blob"),i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",c)}),s.send(void 0===i._bodyInit?null:i._bodyInit)}))}x.polyfill=!0,e.fetch||(e.fetch=x,e.Headers=f,e.Request=v,e.Response=k),t.Headers=f,t.Request=v,t.Response=k,t.fetch=x,Object.defineProperty(t,"__esModule",{value:!0})}({})}(a),a.fetch.ponyfill=!0,delete a.fetch.polyfill;var o=a;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(_n,_n.exports);var Bn=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(_n.exports);function Dn(e,t){return Nn.apply(this,arguments)}function Nn(){return Nn=(0,i.Z)((0,u.Z)().mark((function e(t,n){var a,o,r,i,s,c;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getAccountInfo(n);case 2:if(null!==(a=e.sent)){e.next=5;break}throw new Error("program account not found");case 5:return o=Fn(a.data),r=o.program,e.next=9,t.getAccountInfo(r.programdataAddress);case 9:if(null!==(i=e.sent)){e.next=12;break}throw new Error("program data account not found");case 12:return s=Fn(i.data),c=s.programData,e.abrupt("return",c);case 14:case"end":return e.stop()}}),e)}))),Nn.apply(this,arguments)}var On=M.rustEnum([M.struct([],"uninitialized"),M.struct([M.option(M.publicKey(),"authorityAddress")],"buffer"),M.struct([M.publicKey("programdataAddress")],"program"),M.struct([M.u64("slot"),M.option(M.publicKey(),"upgradeAuthorityAddress")],"programData")],void 0,M.u32());function Fn(e){return On.decode(e)}var Ln=Object.freeze({__proto__:null,verifiedBuild:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n){var a,o,r,i,s,d,l,f,p=arguments;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=p.length>2&&void 0!==p[2]?p[2]:5,o="https://api.apr.dev/api/v0/program/".concat(n.toString(),"/latest?limit=").concat(a),e.next=4,Promise.all([Dn(t,n),Bn(o)]);case 4:return r=e.sent,i=(0,c.Z)(r,2),s=i[0],d=i[1],e.next=10,d.json();case 10:if(l=e.sent.filter((function(e){return!e.aborted&&"Built"===e.state&&"Verified"===e.verified})),0!==l.length){e.next=13;break}return e.abrupt("return",null);case 13:return f=l[0],e.abrupt("return",s.slot.toNumber()!==f.verified_slot?null:f);case 15:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),fetchData:Dn,decodeUpgradeableLoaderState:Fn}),jn=Object.freeze({__proto__:null,sha256:An,rpc:Me,publicKey:Rn,bytes:q,token:Un,features:Ge,registry:Ln}),Hn=M.struct([M.publicKey("authority"),M.vecU8("data")]);function Gn(e,t){var n,a,o={},r=e.args?e.args.length:0;if(t.length>r){if(t.length!==r+1)throw new Error("provided too many arguments ".concat(t," to instruction ").concat(null==e?void 0:e.name," expecting: ").concat(null!==(a=null===(n=e.args)||void 0===n?void 0:n.map((function(e){return e.name})))&&void 0!==a?a:[]));o=t.pop()}return[t,o]}var zn=function(){function e(){(0,m.Z)(this,e)}return(0,b.Z)(e,null,[{key:"build",value:function(t,n,a){if("_inner"===t.name)throw new ze("the _inner name is reserved");var o=function e(){for(var o=arguments.length,r=new Array(o),i=0;i2&&void 0!==arguments[2]?arguments[2]:Oe(),o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new mt(t);(0,m.Z)(this,e),this.provider=a,this.coder=o,this._idl=t,this._programId=n,this._address=Vn(n),this._sub=null;var r=function(){var e,r={},i={},s={};return null===(e=t.state)||void 0===e||e.methods.forEach((function(e){var u=zn.build(e,(function(e,t){return o.instruction.encodeState(e,t)}),n);u.accounts=function(t){var o=function(e,t,n,a){if("new"===n.name){var o=Tn([],e),r=(0,c.Z)(o,1)[0];if(void 0===t.wallet)throw new Error("This function requires the Provider interface implementor to have a 'wallet' field.");return[{pubkey:t.wallet.publicKey,isWritable:!1,isSigner:!0},{pubkey:Vn(e),isWritable:!0,isSigner:!1},{pubkey:r,isWritable:!1,isSigner:!1},{pubkey:k.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e,isWritable:!1,isSigner:!1}]}return Y(n.accounts,a),[{pubkey:Vn(e),isWritable:!0,isSigner:!1}]}(n,a,e,t);return o.concat(zn.accountsArray(t,e.accounts,e.name))};var d=Wn.build(e,u),l=Kn.build(e,d,Q(t),a),f=E()(e.name);r[f]=u,i[f]=d,s[f]=l})),[r,i,s]}(),i=(0,c.Z)(r,3),s=i[0],u=i[1],d=i[2];this.instruction=s,this.transaction=u,this.rpc=d}return(0,b.Z)(e,[{key:"programId",get:function(){return this._programId}},{key:"fetch",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(){var t,n,a;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.address(),e.next=3,this.provider.connection.getAccountInfo(t);case 3:if(null!==(n=e.sent)){e.next=6;break}throw new Error("Account does not exist ".concat(t.toString()));case 6:if(a=this._idl.state){e.next=9;break}throw new Error("State is not specified in IDL.");case 9:return e.next=11,ft(a.struct.name);case 11:if(!e.sent.compare(n.data.slice(0,8))){e.next=13;break}throw new Error("Invalid account discriminator");case 13:return e.abrupt("return",this.coder.state.decode(n.data));case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"address",value:function(){return this._address}},{key:"subscribe",value:function(e){var t=this;if(null!==this._sub)return this._sub.ee;var n=new(_()),a=this.provider.connection.onAccountChange(this.address(),(function(e){var a=t.coder.state.decode(e.data);n.emit("change",a)}),e);return this._sub={ee:n,listener:a},n}},{key:"unsubscribe",value:function(){var e=this;null!==this._sub&&this.provider.connection.removeAccountChangeListener(this._sub.listener).then((0,i.Z)((0,u.Z)().mark((function t(){return(0,u.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e._sub=null;case 1:case"end":return t.stop()}}),t)})))).catch(D.error)}}]),e}();function Vn(e){var t=Tn([],e);return xn((0,c.Z)(t,1)[0],"unversioned",e)}var qn=function(){function e(t,n,a,o,r){(0,m.Z)(this,e),this._idlAccount=n,this._programId=a,this._provider=null!=o?o:Oe(),this._coder=null!=r?r:new mt(t),this._size=this._coder.accounts.size(n)}return(0,b.Z)(e,[{key:"size",get:function(){return this._size}},{key:"programId",get:function(){return this._programId}},{key:"provider",get:function(){return this._provider}},{key:"coder",get:function(){return this._coder}},{key:"fetchNullable",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n){var a;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccountInfo(t,n);case 2:return a=e.sent,e.abrupt("return",null===a?null:this._coder.accounts.decode(this._idlAccount.name,a.data));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetch",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n){var a;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetchNullable(t,n);case 2:if(null!==(a=e.sent)){e.next=5;break}throw new Error("Account does not exist ".concat(t.toString()));case 5:return e.abrupt("return",a);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetchMultiple",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n){var a=this;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ve(this._provider.connection,t.map((function(e){return X(e)})),n);case 2:return e.abrupt("return",e.sent.map((function(e){return null==e?null:a._coder.accounts.decode(a._idlAccount.name,null==e?void 0:e.account.data)})));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"all",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t){var n=this;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._provider.connection.getProgramAccounts(this._programId,{commitment:this._provider.connection.commitment,filters:[{memcmp:this.coder.accounts.memcmp(this._idlAccount.name,t instanceof N?t:void 0)}].concat((0,f.Z)(Array.isArray(t)?t:[]))});case 2:return e.abrupt("return",e.sent.map((function(e){var t=e.pubkey,a=e.account;return{publicKey:t,account:n._coder.accounts.decode(n._idlAccount.name,a.data)}})));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"subscribe",value:function(e,t){var n=this,a=Qn.get(e.toString());if(a)return a.ee;var o=new(_());e=X(e);var r=this._provider.connection.onAccountChange(e,(function(e){var t=n._coder.accounts.decode(n._idlAccount.name,e.data);o.emit("change",t)}),t);return Qn.set(e.toString(),{ee:o,listener:r}),o}},{key:"unsubscribe",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=Qn.get(t.toString()))){e.next=8;break}if(e.t0=Qn,!e.t0){e.next=6;break}return e.next=6,this._provider.connection.removeAccountChangeListener(n.listener).then((function(){Qn.delete(t.toString())})).catch(D.error);case 6:e.next=9;break;case 8:D.warn("Address is not subscribed");case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createInstruction",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n){var a;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=this.size,void 0!==this._provider.wallet){e.next=3;break}throw new Error("This function requires the Provider interface implementor to have a 'wallet' field.");case 3:return e.t0=k.SystemProgram,e.t1=this._provider.wallet.publicKey,e.t2=t.publicKey,e.t3=null!=n?n:a,e.next=9,this._provider.connection.getMinimumBalanceForRentExemption(null!=n?n:a);case 9:return e.t4=e.sent,e.t5=this._programId,e.t6={fromPubkey:e.t1,newAccountPubkey:e.t2,space:e.t3,lamports:e.t4,programId:e.t5},e.abrupt("return",e.t0.createAccount.call(e.t0,e.t6));case 13:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"associated",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(){var t,n=arguments;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.associatedAddress.apply(this,n);case 2:return t=e.sent,e.next=5,this.fetch(t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"associatedAddress",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(){var t,n,a,o=arguments;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=o.length,n=new Array(t),a=0;a0&&e.program()===this.programId.toString()?this.handleProgramLog(t):[null].concat((0,f.Z)(this.handleSystemLog(t)))}},{key:"handleProgramLog",value:function(e){if(e.startsWith("Program log: ")||e.startsWith("Program data: ")){var t=e.startsWith("Program log: ")?e.slice(Jn):e.slice(Yn);return[this.coder.events.decode(t),null,!1]}return[null].concat((0,f.Z)(this.handleSystemLog(e)))}},{key:"handleSystemLog",value:function(e){var t=e.split(":")[0];return null!==t.match(/^Program (.*) success/g)?[null,!0]:t.startsWith("Program ".concat(this.programId.toString()," invoke"))?[this.programId.toString(),!1]:t.includes("invoke")?["cpi",!1]:[null,!1]}}]),e}(),ea=function(){function e(){(0,m.Z)(this,e),this.stack=[]}return(0,b.Z)(e,[{key:"program",value:function(){return B.ok(this.stack.length>0),this.stack[this.stack.length-1]}},{key:"push",value:function(e){this.stack.push(e)}},{key:"pop",value:function(){B.ok(this.stack.length>0),this.stack.pop()}}]),e}(),ta=function(){function e(t){(0,m.Z)(this,e),this.logs=t}return(0,b.Z)(e,[{key:"next",value:function(){if(0===this.logs.length)return null;var e=this.logs[0];return this.logs=this.logs.slice(1),e}}]),e}(),na=new k.PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");function aa(){return new rn(oa)}var oa={version:"0.1.0",name:"spl_token",instructions:[{name:"initializeMint",accounts:[{name:"mint",isMut:!0,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1}],args:[{name:"decimals",type:"u8"},{name:"mintAuthority",type:"publicKey"},{name:"freezeAuthority",type:{coption:"publicKey"}}]},{name:"initializeAccount",accounts:[{name:"account",isMut:!0,isSigner:!1},{name:"mint",isMut:!1,isSigner:!1},{name:"authority",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1}],args:[]},{name:"initializeMultisig",accounts:[{name:"account",isMut:!0,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1}],args:[{name:"m",type:"u8"}]},{name:"transfer",accounts:[{name:"source",isMut:!0,isSigner:!1},{name:"destination",isMut:!0,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[{name:"amount",type:"u64"}]},{name:"approve",accounts:[{name:"source",isMut:!0,isSigner:!1},{name:"delegate",isMut:!1,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[{name:"amount",type:"u64"}]},{name:"revoke",accounts:[{name:"source",isMut:!0,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[]},{name:"setAuthority",accounts:[{name:"mint",isMut:!0,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[{name:"authorityType",type:"u8"},{name:"newAuthority",type:{coption:"publicKey"}}]},{name:"mintTo",accounts:[{name:"mint",isMut:!0,isSigner:!1},{name:"to",isMut:!0,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[{name:"amount",type:"u64"}]},{name:"burn",accounts:[{name:"source",isMut:!0,isSigner:!1},{name:"mint",isMut:!0,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[{name:"amount",type:"u64"}]},{name:"closeAccount",accounts:[{name:"account",isMut:!0,isSigner:!1},{name:"destination",isMut:!0,isSigner:!1},{name:"authority",isMut:!1,isSigner:!1}],args:[]},{name:"freezeAccount",accounts:[{name:"account",isMut:!0,isSigner:!1},{name:"mint",isMut:!1,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[]},{name:"thawAccount",accounts:[{name:"account",isMut:!0,isSigner:!1},{name:"mint",isMut:!1,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[]},{name:"transferChecked",accounts:[{name:"source",isMut:!0,isSigner:!1},{name:"mint",isMut:!1,isSigner:!1},{name:"destination",isMut:!0,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[{name:"amount",type:"u64"},{name:"decimals",type:"u8"}]},{name:"approveChecked",accounts:[{name:"source",isMut:!0,isSigner:!1},{name:"mint",isMut:!1,isSigner:!1},{name:"delegate",isMut:!1,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[{name:"amount",type:"u64"},{name:"decimals",type:"u8"}]},{name:"mintToChecked",accounts:[{name:"mint",isMut:!0,isSigner:!1},{name:"to",isMut:!0,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[{name:"amount",type:"u64"},{name:"decimals",type:"u8"}]},{name:"burnChecked",accounts:[{name:"source",isMut:!0,isSigner:!1},{name:"mint",isMut:!0,isSigner:!1},{name:"authority",isMut:!1,isSigner:!0}],args:[{name:"amount",type:"u64"},{name:"decimals",type:"u8"}]},{name:"initializeAccount2",accounts:[{name:"account",isMut:!0,isSigner:!1},{name:"mint",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1}],args:[{name:"authority",type:"publicKey"}]},{name:"syncNative",accounts:[{name:"account",isMut:!0,isSigner:!1}],args:[]},{name:"initializeAccount3",accounts:[{name:"account",isMut:!0,isSigner:!1},{name:"mint",isMut:!1,isSigner:!1}],args:[{name:"authority",type:"publicKey"}]},{name:"initializeMultisig2",accounts:[{name:"account",isMut:!0,isSigner:!1}],args:[{name:"m",type:"u8"}]},{name:"initializeMint2",accounts:[{name:"mint",isMut:!0,isSigner:!1}],args:[{name:"decimals",type:"u8"},{name:"mintAuthority",type:"publicKey"},{name:"freezeAuthority",type:{coption:"publicKey"}}]}],accounts:[{name:"mint",type:{kind:"struct",fields:[{name:"mintAuthority",type:{coption:"publicKey"}},{name:"supply",type:"u64"},{name:"decimals",type:"u8"},{name:"isInitialized",type:"bool"},{name:"freezeAuthority",type:{coption:"publicKey"}}]}},{name:"token",type:{kind:"struct",fields:[{name:"mint",type:"publicKey"},{name:"authority",type:"publicKey"},{name:"amount",type:"u64"},{name:"delegate",type:{coption:"publicKey"}},{name:"state",type:"u8"},{name:"isNative",type:{coption:"u64"}},{name:"delegatedAmount",type:"u64"},{name:"closeAuthority",type:{coption:"publicKey"}}]}}]},ra=function(){function e(t,n,a,o,r,i){(0,m.Z)(this,e),this._args=t,this._accounts=n,this._provider=a,this._programId=o,this._idlIx=r,this._accountStore=new ia(a,i)}return(0,b.Z)(e,[{key:"resolve",value:function(){var t=(0,i.Z)((0,u.Z)().mark((function t(){var n,a,o,r,i,s;return(0,u.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=0;case 1:if(!(n0&&!this._accounts[s],!t.t0){t.next=20;break}return t.next=20,this.autoPopulatePda(i);case 20:r+=1,t.next=14;break;case 23:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"autoPopulatePda",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t){var n,a,o,r,i,s=this;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.pda&&t.pda.seeds){e.next=2;break}throw new Error("Must have seeds");case 2:return e.next=4,Promise.all(t.pda.seeds.map((function(e){return s.toBuffer(e)})));case 4:return n=e.sent,e.next=7,this.parseProgramId(t);case 7:return a=e.sent,e.next=10,k.PublicKey.findProgramAddress(n,a);case 10:o=e.sent,r=(0,c.Z)(o,1),i=r[0],this._accounts[E()(t.name)]=i;case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"parseProgramId",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=t.pda)||void 0===n?void 0:n.programId){e.next=2;break}return e.abrupt("return",this._programId);case 2:e.t0=t.pda.programId.kind,e.next="const"===e.t0?5:"arg"===e.t0?6:"account"===e.t0?7:10;break;case 5:return e.abrupt("return",new k.PublicKey(this.toBufferConst(t.pda.programId.value)));case 6:return e.abrupt("return",this.argValue(t.pda.programId));case 7:return e.next=9,this.accountValue(t.pda.programId);case 9:return e.abrupt("return",e.sent);case 10:throw new Error("Unexpected program seed kind: ".concat(t.pda.programId.kind));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"toBuffer",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t){return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.kind,e.next="const"===e.t0?3:"arg"===e.t0?4:"account"===e.t0?7:10;break;case 3:return e.abrupt("return",this.toBufferConst(t));case 4:return e.next=6,this.toBufferArg(t);case 6:case 9:return e.abrupt("return",e.sent);case 7:return e.next=9,this.toBufferAccount(t);case 10:throw new Error("Unexpected seed kind: ".concat(t.kind));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"toBufferConst",value:function(e){return this.toBufferValue(e.type,e.value)}},{key:"toBufferArg",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.argValue(t),e.abrupt("return",this.toBufferValue(t.type,n));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"argValue",value:function(e){var t=E()(e.path.split(".")[0]),n=this._idlIx.args.findIndex((function(e){return e.name===t}));if(-1===n)throw new Error("Unable to find argument for seed: ".concat(t));return this._args[n]}},{key:"toBufferAccount",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.accountValue(t);case 2:return n=e.sent,e.abrupt("return",this.toBufferValue(t.type,n));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"accountValue",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t){var n,a,o,r;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.path.split("."),a=n[0],o=this._accounts[E()(a)],1!==n.length){e.next=3;break}return e.abrupt("return",o);case 3:return e.next=5,this._accountStore.fetchAccount(t.account,o);case 5:return r=e.sent,e.abrupt("return",this.parseAccountValue(r,n.slice(1)));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"parseAccountValue",value:function(e,t){for(var n;t.length>0;)n=e[E()(t[0])],t=t.slice(1);return n}},{key:"toBufferValue",value:function(e,t){switch(e){case"u8":return N.from([t]);case"u16":var n=N.alloc(2);return n.writeUInt16LE(t),n;case"u32":var a=N.alloc(4);return a.writeUInt32LE(t),a;case"u64":var o=N.alloc(8);return o.writeBigUInt64LE(BigInt(t)),o;case"string":return N.from(G(t));case"publicKey":return t.toBuffer();default:if(e.array)return N.from(t);throw new Error("Unexpected seed type: ".concat(e))}}}]),e}();ra.CONST_ACCOUNTS={associatedTokenProgram:Pn,rent:k.SYSVAR_RENT_PUBKEY,systemProgram:k.SystemProgram.programId,tokenProgram:Mn};var ia=function(){function e(t,n){(0,m.Z)(this,e),this._provider=t,this._accounts=n,this._cache=new Map}return(0,b.Z)(e,[{key:"fetchAccount",value:function(){var e=(0,i.Z)((0,u.Z)().mark((function e(t,n){var a,o,r,i;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.toString(),this._cache.has(a)){e.next=14;break}if("TokenAccount"!==t){e.next=12;break}return e.next=5,this._provider.connection.getAccountInfo(n);case 5:if(null!==(o=e.sent)){e.next=8;break}throw new Error("invalid account info for ".concat(a));case 8:r=aa().accounts.decode("token",o.data),this._cache.set(a,r),e.next=14;break;case 12:i=this._accounts[E()(t)].fetch(n),this._cache.set(a,i);case 14:return e.abrupt("return",this._cache.get(a));case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),sa=function(){function e(){(0,m.Z)(this,e)}return(0,b.Z)(e,null,[{key:"build",value:function(e,t,n,a,o,r,i,s,c){return function(){for(var u=arguments.length,d=new Array(u),l=0;l=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){u.headers[e]=o.merge(s)})),e.exports=u},68157:function(e){e.exports={version:"0.24.0"}},57151:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),a=0;a=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},55507:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},85691:function(e,t,n){"use strict";var a=n(65218),o=n(68157).version,r={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){r[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};r.transitional=function(e,t,n){function r(e,t){return"[Axios v"+o+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,s){if(!1===e)throw new Error(r(o," has been removed"+(t?" in "+t:"")));return t&&!i[o]&&(i[o]=!0,a.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new TypeError("options must be an object");for(var a=Object.keys(e),o=a.length;o-- >0;){var r=a[o],i=t[r];if(i){var s=e[r],c=void 0===s||i(s,r,e);if(!0!==c)throw new TypeError("option "+r+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+r)}},validators:r}},78541:function(e,t,n){"use strict";var a=n(57151),o=Object.prototype.toString;function r(e){return"[object Array]"===o.call(e)}function i(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function d(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),r(e))for(var n=0,a=e.length;n1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pubKey&&s.Any.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.accountNumber.isZero()||t.uint32(24).uint64(e.accountNumber),e.sequence.isZero()||t.uint32(32).uint64(e.sequence),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.address=n.string();break;case 2:o.pubKey=s.Any.decode(n,n.uint32());break;case 3:o.accountNumber=n.uint64();break;case 4:o.sequence=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.address&&null!==e.address?t.address=String(e.address):t.address="",void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=s.Any.fromJSON(e.pubKey):t.pubKey=void 0,void 0!==e.accountNumber&&null!==e.accountNumber?t.accountNumber=r.default.fromString(e.accountNumber):t.accountNumber=r.default.UZERO,void 0!==e.sequence&&null!==e.sequence?t.sequence=r.default.fromString(e.sequence):t.sequence=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pubKey&&(t.pubKey=e.pubKey?s.Any.toJSON(e.pubKey):void 0),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||r.default.UZERO).toString()),void 0!==e.sequence&&(t.sequence=(e.sequence||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.address&&null!==e.address?t.address=e.address:t.address="",void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=s.Any.fromPartial(e.pubKey):t.pubKey=void 0,void 0!==e.accountNumber&&null!==e.accountNumber?t.accountNumber=e.accountNumber:t.accountNumber=r.default.UZERO,void 0!==e.sequence&&null!==e.sequence?t.sequence=e.sequence:t.sequence=r.default.UZERO,t}};var u={name:"",permissions:""};t.ModuleAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.baseAccount&&t.BaseAccount.encode(e.baseAccount,n.uint32(10).fork()).ldelim(),""!==e.name&&n.uint32(18).string(e.name);var o,r=a(e.permissions);try{for(r.s();!(o=r.n()).done;){var s=o.value;n.uint32(26).string(s)}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},u);for(r.permissions=[];a.pos>>3){case 1:r.baseAccount=t.BaseAccount.decode(a,a.uint32());break;case 2:r.name=a.string();break;case 3:r.permissions.push(a.string());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},u);if(n.permissions=[],void 0!==e.baseAccount&&null!==e.baseAccount?n.baseAccount=t.BaseAccount.fromJSON(e.baseAccount):n.baseAccount=void 0,void 0!==e.name&&null!==e.name?n.name=String(e.name):n.name="",void 0!==e.permissions&&null!==e.permissions){var o,r=a(e.permissions);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.permissions.push(String(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.baseAccount&&(n.baseAccount=e.baseAccount?t.BaseAccount.toJSON(e.baseAccount):void 0),void 0!==e.name&&(n.name=e.name),e.permissions?n.permissions=e.permissions.map((function(e){return e})):n.permissions=[],n},fromPartial:function(e){var n=Object.assign({},u);if(n.permissions=[],void 0!==e.baseAccount&&null!==e.baseAccount?n.baseAccount=t.BaseAccount.fromPartial(e.baseAccount):n.baseAccount=void 0,void 0!==e.name&&null!==e.name?n.name=e.name:n.name="",void 0!==e.permissions&&null!==e.permissions){var o,r=a(e.permissions);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.permissions.push(i)}}catch(s){r.e(s)}finally{r.f()}}return n}};var d={maxMemoCharacters:r.default.UZERO,txSigLimit:r.default.UZERO,txSizeCostPerByte:r.default.UZERO,sigVerifyCostEd25519:r.default.UZERO,sigVerifyCostSecp256k1:r.default.UZERO};t.Params={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.maxMemoCharacters.isZero()||t.uint32(8).uint64(e.maxMemoCharacters),e.txSigLimit.isZero()||t.uint32(16).uint64(e.txSigLimit),e.txSizeCostPerByte.isZero()||t.uint32(24).uint64(e.txSizeCostPerByte),e.sigVerifyCostEd25519.isZero()||t.uint32(32).uint64(e.sigVerifyCostEd25519),e.sigVerifyCostSecp256k1.isZero()||t.uint32(40).uint64(e.sigVerifyCostSecp256k1),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.maxMemoCharacters=n.uint64();break;case 2:o.txSigLimit=n.uint64();break;case 3:o.txSizeCostPerByte=n.uint64();break;case 4:o.sigVerifyCostEd25519=n.uint64();break;case 5:o.sigVerifyCostSecp256k1=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters?t.maxMemoCharacters=r.default.fromString(e.maxMemoCharacters):t.maxMemoCharacters=r.default.UZERO,void 0!==e.txSigLimit&&null!==e.txSigLimit?t.txSigLimit=r.default.fromString(e.txSigLimit):t.txSigLimit=r.default.UZERO,void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte?t.txSizeCostPerByte=r.default.fromString(e.txSizeCostPerByte):t.txSizeCostPerByte=r.default.UZERO,void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519?t.sigVerifyCostEd25519=r.default.fromString(e.sigVerifyCostEd25519):t.sigVerifyCostEd25519=r.default.UZERO,void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1?t.sigVerifyCostSecp256k1=r.default.fromString(e.sigVerifyCostSecp256k1):t.sigVerifyCostSecp256k1=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.maxMemoCharacters&&(t.maxMemoCharacters=(e.maxMemoCharacters||r.default.UZERO).toString()),void 0!==e.txSigLimit&&(t.txSigLimit=(e.txSigLimit||r.default.UZERO).toString()),void 0!==e.txSizeCostPerByte&&(t.txSizeCostPerByte=(e.txSizeCostPerByte||r.default.UZERO).toString()),void 0!==e.sigVerifyCostEd25519&&(t.sigVerifyCostEd25519=(e.sigVerifyCostEd25519||r.default.UZERO).toString()),void 0!==e.sigVerifyCostSecp256k1&&(t.sigVerifyCostSecp256k1=(e.sigVerifyCostSecp256k1||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters?t.maxMemoCharacters=e.maxMemoCharacters:t.maxMemoCharacters=r.default.UZERO,void 0!==e.txSigLimit&&null!==e.txSigLimit?t.txSigLimit=e.txSigLimit:t.txSigLimit=r.default.UZERO,void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte?t.txSizeCostPerByte=e.txSizeCostPerByte:t.txSizeCostPerByte=r.default.UZERO,void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519?t.sigVerifyCostEd25519=e.sigVerifyCostEd25519:t.sigVerifyCostEd25519=r.default.UZERO,void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1?t.sigVerifyCostSecp256k1=e.sigVerifyCostSecp256k1:t.sigVerifyCostSecp256k1=r.default.UZERO,t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},91965:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecProto=t.IntProto=t.DecCoin=t.Coin=t.protobufPackage=void 0;var o=a(n(29600)),r=a(n(80121));t.protobufPackage="cosmos.base.v1beta1";var i={denom:"",amount:""};t.Coin={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=String(e.amount):t.amount="",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=e.amount:t.amount="",t}};var s={denom:"",amount:""};t.DecCoin={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},s);return void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=String(e.amount):t.amount="",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=e.amount:t.amount="",t}};var c={int:""};t.IntProto={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.int&&t.uint32(10).string(e.int),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3===1)o.int=n.string();else n.skipType(7&i)}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.int&&null!==e.int?t.int=String(e.int):t.int="",t},toJSON:function(e){var t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.int&&null!==e.int?t.int=e.int:t.int="",t}};var u={dec:""};t.DecProto={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.dec&&t.uint32(10).string(e.dec),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3===1)o.dec=n.string();else n.skipType(7&i)}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.dec&&null!==e.dec?t.dec=String(e.dec):t.dec="",t},toJSON:function(e){var t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.dec&&null!==e.dec?t.dec=e.dec:t.dec="",t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},82126:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PermanentLockedAccount=t.PeriodicVestingAccount=t.Period=t.DelayedVestingAccount=t.ContinuousVestingAccount=t.BaseVestingAccount=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121)),s=n(98465),c=n(91965);t.protobufPackage="cosmos.vesting.v1beta1";var u={endTime:r.default.ZERO};t.BaseVestingAccount={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.baseAccount&&s.BaseAccount.encode(e.baseAccount,t.uint32(10).fork()).ldelim();var n,o=a(e.originalVesting);try{for(o.s();!(n=o.n()).done;){var r=n.value;c.Coin.encode(r,t.uint32(18).fork()).ldelim()}}catch(m){o.e(m)}finally{o.f()}var u,d=a(e.delegatedFree);try{for(d.s();!(u=d.n()).done;){var l=u.value;c.Coin.encode(l,t.uint32(26).fork()).ldelim()}}catch(m){d.e(m)}finally{d.f()}var f,p=a(e.delegatedVesting);try{for(p.s();!(f=p.n()).done;){var b=f.value;c.Coin.encode(b,t.uint32(34).fork()).ldelim()}}catch(m){p.e(m)}finally{p.f()}return e.endTime.isZero()||t.uint32(40).int64(e.endTime),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);for(o.originalVesting=[],o.delegatedFree=[],o.delegatedVesting=[];n.pos>>3){case 1:o.baseAccount=s.BaseAccount.decode(n,n.uint32());break;case 2:o.originalVesting.push(c.Coin.decode(n,n.uint32()));break;case 3:o.delegatedFree.push(c.Coin.decode(n,n.uint32()));break;case 4:o.delegatedVesting.push(c.Coin.decode(n,n.uint32()));break;case 5:o.endTime=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);if(t.originalVesting=[],t.delegatedFree=[],t.delegatedVesting=[],void 0!==e.baseAccount&&null!==e.baseAccount?t.baseAccount=s.BaseAccount.fromJSON(e.baseAccount):t.baseAccount=void 0,void 0!==e.originalVesting&&null!==e.originalVesting){var n,o=a(e.originalVesting);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.originalVesting.push(c.Coin.fromJSON(i))}}catch(h){o.e(h)}finally{o.f()}}if(void 0!==e.delegatedFree&&null!==e.delegatedFree){var d,l=a(e.delegatedFree);try{for(l.s();!(d=l.n()).done;){var f=d.value;t.delegatedFree.push(c.Coin.fromJSON(f))}}catch(h){l.e(h)}finally{l.f()}}if(void 0!==e.delegatedVesting&&null!==e.delegatedVesting){var p,b=a(e.delegatedVesting);try{for(b.s();!(p=b.n()).done;){var m=p.value;t.delegatedVesting.push(c.Coin.fromJSON(m))}}catch(h){b.e(h)}finally{b.f()}}return void 0!==e.endTime&&null!==e.endTime?t.endTime=r.default.fromString(e.endTime):t.endTime=r.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.baseAccount&&(t.baseAccount=e.baseAccount?s.BaseAccount.toJSON(e.baseAccount):void 0),e.originalVesting?t.originalVesting=e.originalVesting.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.originalVesting=[],e.delegatedFree?t.delegatedFree=e.delegatedFree.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.delegatedFree=[],e.delegatedVesting?t.delegatedVesting=e.delegatedVesting.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.delegatedVesting=[],void 0!==e.endTime&&(t.endTime=(e.endTime||r.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},u);if(t.originalVesting=[],t.delegatedFree=[],t.delegatedVesting=[],void 0!==e.baseAccount&&null!==e.baseAccount?t.baseAccount=s.BaseAccount.fromPartial(e.baseAccount):t.baseAccount=void 0,void 0!==e.originalVesting&&null!==e.originalVesting){var n,o=a(e.originalVesting);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.originalVesting.push(c.Coin.fromPartial(i))}}catch(h){o.e(h)}finally{o.f()}}if(void 0!==e.delegatedFree&&null!==e.delegatedFree){var d,l=a(e.delegatedFree);try{for(l.s();!(d=l.n()).done;){var f=d.value;t.delegatedFree.push(c.Coin.fromPartial(f))}}catch(h){l.e(h)}finally{l.f()}}if(void 0!==e.delegatedVesting&&null!==e.delegatedVesting){var p,b=a(e.delegatedVesting);try{for(b.s();!(p=b.n()).done;){var m=p.value;t.delegatedVesting.push(c.Coin.fromPartial(m))}}catch(h){b.e(h)}finally{b.f()}}return void 0!==e.endTime&&null!==e.endTime?t.endTime=e.endTime:t.endTime=r.default.ZERO,t}};var d={startTime:r.default.ZERO};t.ContinuousVestingAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),e.startTime.isZero()||n.uint32(16).int64(e.startTime),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},d);a.pos>>3){case 1:r.baseVestingAccount=t.BaseVestingAccount.decode(a,a.uint32());break;case 2:r.startTime=a.int64();break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},d);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.startTime&&null!==e.startTime?n.startTime=r.default.fromString(e.startTime):n.startTime=r.default.ZERO,n},toJSON:function(e){var n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),void 0!==e.startTime&&(n.startTime=(e.startTime||r.default.ZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},d);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.startTime&&null!==e.startTime?n.startTime=e.startTime:n.startTime=r.default.ZERO,n}};var l={};t.DelayedVestingAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},l);a.pos>>3===1)r.baseVestingAccount=t.BaseVestingAccount.decode(a,a.uint32());else a.skipType(7&s)}return r},fromJSON:function(e){var n=Object.assign({},l);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount):n.baseVestingAccount=void 0,n},toJSON:function(e){var n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),n},fromPartial:function(e){var n=Object.assign({},l);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount):n.baseVestingAccount=void 0,n}};var f={length:r.default.ZERO};t.Period={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();e.length.isZero()||t.uint32(8).int64(e.length);var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var r=n.value;c.Coin.encode(r,t.uint32(18).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);for(o.amount=[];n.pos>>3){case 1:o.length=n.int64();break;case 2:o.amount.push(c.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);if(t.amount=[],void 0!==e.length&&null!==e.length?t.length=r.default.fromString(e.length):t.length=r.default.ZERO,void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.amount.push(c.Coin.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.length&&(t.length=(e.length||r.default.ZERO).toString()),e.amount?t.amount=e.amount.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.amount=[],t},fromPartial:function(e){var t=Object.assign({},f);if(t.amount=[],void 0!==e.length&&null!==e.length?t.length=e.length:t.length=r.default.ZERO,void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.amount.push(c.Coin.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return t}};var p={startTime:r.default.ZERO};t.PeriodicVestingAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),e.startTime.isZero()||n.uint32(16).int64(e.startTime);var o,r=a(e.vestingPeriods);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.Period.encode(s,n.uint32(26).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},p);for(r.vestingPeriods=[];a.pos>>3){case 1:r.baseVestingAccount=t.BaseVestingAccount.decode(a,a.uint32());break;case 2:r.startTime=a.int64();break;case 3:r.vestingPeriods.push(t.Period.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},p);if(n.vestingPeriods=[],void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.startTime&&null!==e.startTime?n.startTime=r.default.fromString(e.startTime):n.startTime=r.default.ZERO,void 0!==e.vestingPeriods&&null!==e.vestingPeriods){var o,i=a(e.vestingPeriods);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.vestingPeriods.push(t.Period.fromJSON(s))}}catch(c){i.e(c)}finally{i.f()}}return n},toJSON:function(e){var n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),void 0!==e.startTime&&(n.startTime=(e.startTime||r.default.ZERO).toString()),e.vestingPeriods?n.vestingPeriods=e.vestingPeriods.map((function(e){return e?t.Period.toJSON(e):void 0})):n.vestingPeriods=[],n},fromPartial:function(e){var n=Object.assign({},p);if(n.vestingPeriods=[],void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.startTime&&null!==e.startTime?n.startTime=e.startTime:n.startTime=r.default.ZERO,void 0!==e.vestingPeriods&&null!==e.vestingPeriods){var o,i=a(e.vestingPeriods);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.vestingPeriods.push(t.Period.fromPartial(s))}}catch(c){i.e(c)}finally{i.f()}}return n}};var b={};t.PermanentLockedAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},b);a.pos>>3===1)r.baseVestingAccount=t.BaseVestingAccount.decode(a,a.uint32());else a.skipType(7&s)}return r},fromJSON:function(e){var n=Object.assign({},b);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount):n.baseVestingAccount=void 0,n},toJSON:function(e){var n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),n},fromPartial:function(e){var n=Object.assign({},b);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount):n.baseVestingAccount=void 0,n}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},91161:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Any=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121));t.protobufPackage="google.protobuf";var s={typeUrl:""};t.Any={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.value=new Uint8Array;n.pos>>3){case 1:o.typeUrl=n.string();break;case 2:o.value=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},s);return t.value=new Uint8Array,void 0!==e.typeUrl&&null!==e.typeUrl?t.typeUrl=String(e.typeUrl):t.typeUrl="",void 0!==e.value&&null!==e.value&&(t.value=function(e){for(var t=u(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.trader&&t.uint32(10).string(e.trader),void 0!==e.offerCoin&&u.Coin.encode(e.offerCoin,t.uint32(18).fork()).ldelim(),""!==e.askDenom&&t.uint32(26).string(e.askDenom),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos>>3){case 1:o.trader=n.string();break;case 2:o.offerCoin=u.Coin.decode(n,n.uint32());break;case 3:o.askDenom=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},l);return void 0!==e.trader&&null!==e.trader?t.trader=String(e.trader):t.trader="",void 0!==e.offerCoin&&null!==e.offerCoin?t.offerCoin=u.Coin.fromJSON(e.offerCoin):t.offerCoin=void 0,void 0!==e.askDenom&&null!==e.askDenom?t.askDenom=String(e.askDenom):t.askDenom="",t},toJSON:function(e){var t={};return void 0!==e.trader&&(t.trader=e.trader),void 0!==e.offerCoin&&(t.offerCoin=e.offerCoin?u.Coin.toJSON(e.offerCoin):void 0),void 0!==e.askDenom&&(t.askDenom=e.askDenom),t},fromPartial:function(e){var t=Object.assign({},l);return void 0!==e.trader&&null!==e.trader?t.trader=e.trader:t.trader="",void 0!==e.offerCoin&&null!==e.offerCoin?t.offerCoin=u.Coin.fromPartial(e.offerCoin):t.offerCoin=void 0,void 0!==e.askDenom&&null!==e.askDenom?t.askDenom=e.askDenom:t.askDenom="",t}};var f={};t.MsgSwapResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.swapCoin&&u.Coin.encode(e.swapCoin,t.uint32(10).fork()).ldelim(),void 0!==e.swapFee&&u.Coin.encode(e.swapFee,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3){case 1:o.swapCoin=u.Coin.decode(n,n.uint32());break;case 2:o.swapFee=u.Coin.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.swapCoin&&null!==e.swapCoin?t.swapCoin=u.Coin.fromJSON(e.swapCoin):t.swapCoin=void 0,void 0!==e.swapFee&&null!==e.swapFee?t.swapFee=u.Coin.fromJSON(e.swapFee):t.swapFee=void 0,t},toJSON:function(e){var t={};return void 0!==e.swapCoin&&(t.swapCoin=e.swapCoin?u.Coin.toJSON(e.swapCoin):void 0),void 0!==e.swapFee&&(t.swapFee=e.swapFee?u.Coin.toJSON(e.swapFee):void 0),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.swapCoin&&null!==e.swapCoin?t.swapCoin=u.Coin.fromPartial(e.swapCoin):t.swapCoin=void 0,void 0!==e.swapFee&&null!==e.swapFee?t.swapFee=u.Coin.fromPartial(e.swapFee):t.swapFee=void 0,t}};var p={fromAddress:"",toAddress:"",askDenom:""};t.MsgSwapSend={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),void 0!==e.offerCoin&&u.Coin.encode(e.offerCoin,t.uint32(26).fork()).ldelim(),""!==e.askDenom&&t.uint32(34).string(e.askDenom),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos>>3){case 1:o.fromAddress=n.string();break;case 2:o.toAddress=n.string();break;case 3:o.offerCoin=u.Coin.decode(n,n.uint32());break;case 4:o.askDenom=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=String(e.fromAddress):t.fromAddress="",void 0!==e.toAddress&&null!==e.toAddress?t.toAddress=String(e.toAddress):t.toAddress="",void 0!==e.offerCoin&&null!==e.offerCoin?t.offerCoin=u.Coin.fromJSON(e.offerCoin):t.offerCoin=void 0,void 0!==e.askDenom&&null!==e.askDenom?t.askDenom=String(e.askDenom):t.askDenom="",t},toJSON:function(e){var t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),void 0!==e.offerCoin&&(t.offerCoin=e.offerCoin?u.Coin.toJSON(e.offerCoin):void 0),void 0!==e.askDenom&&(t.askDenom=e.askDenom),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=e.fromAddress:t.fromAddress="",void 0!==e.toAddress&&null!==e.toAddress?t.toAddress=e.toAddress:t.toAddress="",void 0!==e.offerCoin&&null!==e.offerCoin?t.offerCoin=u.Coin.fromPartial(e.offerCoin):t.offerCoin=void 0,void 0!==e.askDenom&&null!==e.askDenom?t.askDenom=e.askDenom:t.askDenom="",t}};var b={};t.MsgSwapSendResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.swapCoin&&u.Coin.encode(e.swapCoin,t.uint32(10).fork()).ldelim(),void 0!==e.swapFee&&u.Coin.encode(e.swapFee,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3){case 1:o.swapCoin=u.Coin.decode(n,n.uint32());break;case 2:o.swapFee=u.Coin.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.swapCoin&&null!==e.swapCoin?t.swapCoin=u.Coin.fromJSON(e.swapCoin):t.swapCoin=void 0,void 0!==e.swapFee&&null!==e.swapFee?t.swapFee=u.Coin.fromJSON(e.swapFee):t.swapFee=void 0,t},toJSON:function(e){var t={};return void 0!==e.swapCoin&&(t.swapCoin=e.swapCoin?u.Coin.toJSON(e.swapCoin):void 0),void 0!==e.swapFee&&(t.swapFee=e.swapFee?u.Coin.toJSON(e.swapFee):void 0),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.swapCoin&&null!==e.swapCoin?t.swapCoin=u.Coin.fromPartial(e.swapCoin):t.swapCoin=void 0,void 0!==e.swapFee&&null!==e.swapFee?t.swapFee=u.Coin.fromPartial(e.swapFee):t.swapFee=void 0,t}};var m=function(){function e(t){a(this,e),this.rpc=t,this.Swap=this.Swap.bind(this),this.SwapSend=this.SwapSend.bind(this)}return o(e,[{key:"Swap",value:function(e,n){return this.rpc.unary(t.MsgSwapDesc,t.MsgSwap.fromPartial(e),n)}},{key:"SwapSend",value:function(e,n){return this.rpc.unary(t.MsgSwapSendDesc,t.MsgSwapSend.fromPartial(e),n)}}]),e}();t.MsgClientImpl=m,t.MsgDesc={serviceName:"terra.market.v1beta1.Msg"},t.MsgSwapDesc={methodName:"Swap",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgSwap.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgSwapResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgSwapSendDesc={methodName:"SwapSend",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgSwapSend.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgSwapSendResponse.decode(e)),{toObject:function(){return this}})}}};var h=function(){function e(t,n){a(this,e),this.host=t,this.options=n}return o(e,[{key:"unary",value:function(e,t,n){var a,o=this,r=Object.assign(Object.assign({},t),e.requestType),i=n&&this.options.metadata?new d.BrowserHeaders(Object.assign(Object.assign({},null===(a=this.options)||void 0===a?void 0:a.metadata.headersMap),null===n||void 0===n?void 0:n.headersMap)):n||this.options.metadata;return new Promise((function(t,n){s.grpc.unary(e,{request:r,host:o.host,metadata:i,transport:o.options.transport,debug:o.options.debug,onEnd:function(e){if(e.status===s.grpc.Code.OK)t(e.message);else{var a=new Error(e.statusMessage);a.code=e.status,a.metadata=e.trailers,n(a)}}})}))}}]),e}();t.GrpcWebImpl=h,c.default.util.Long!==i.default&&(c.default.util.Long=i.default,c.default.configure())},2244:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExchangeRateTuple=t.AggregateExchangeRateVote=t.AggregateExchangeRatePrevote=t.Denom=t.Params=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121));t.protobufPackage="terra.oracle.v1beta1";var s={votePeriod:r.default.UZERO,voteThreshold:"",rewardBand:"",rewardDistributionWindow:r.default.UZERO,slashFraction:"",slashWindow:r.default.UZERO,minValidPerWindow:""};t.Params={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();e.votePeriod.isZero()||n.uint32(8).uint64(e.votePeriod),""!==e.voteThreshold&&n.uint32(18).string(e.voteThreshold),""!==e.rewardBand&&n.uint32(26).string(e.rewardBand),e.rewardDistributionWindow.isZero()||n.uint32(32).uint64(e.rewardDistributionWindow);var o,r=a(e.whitelist);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.Denom.encode(s,n.uint32(42).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return""!==e.slashFraction&&n.uint32(50).string(e.slashFraction),e.slashWindow.isZero()||n.uint32(56).uint64(e.slashWindow),""!==e.minValidPerWindow&&n.uint32(66).string(e.minValidPerWindow),n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},s);for(r.whitelist=[];a.pos>>3){case 1:r.votePeriod=a.uint64();break;case 2:r.voteThreshold=a.string();break;case 3:r.rewardBand=a.string();break;case 4:r.rewardDistributionWindow=a.uint64();break;case 5:r.whitelist.push(t.Denom.decode(a,a.uint32()));break;case 6:r.slashFraction=a.string();break;case 7:r.slashWindow=a.uint64();break;case 8:r.minValidPerWindow=a.string();break;default:a.skipType(7&c)}}return r},fromJSON:function(e){var n=Object.assign({},s);if(n.whitelist=[],void 0!==e.votePeriod&&null!==e.votePeriod?n.votePeriod=r.default.fromString(e.votePeriod):n.votePeriod=r.default.UZERO,void 0!==e.voteThreshold&&null!==e.voteThreshold?n.voteThreshold=String(e.voteThreshold):n.voteThreshold="",void 0!==e.rewardBand&&null!==e.rewardBand?n.rewardBand=String(e.rewardBand):n.rewardBand="",void 0!==e.rewardDistributionWindow&&null!==e.rewardDistributionWindow?n.rewardDistributionWindow=r.default.fromString(e.rewardDistributionWindow):n.rewardDistributionWindow=r.default.UZERO,void 0!==e.whitelist&&null!==e.whitelist){var o,i=a(e.whitelist);try{for(i.s();!(o=i.n()).done;){var c=o.value;n.whitelist.push(t.Denom.fromJSON(c))}}catch(u){i.e(u)}finally{i.f()}}return void 0!==e.slashFraction&&null!==e.slashFraction?n.slashFraction=String(e.slashFraction):n.slashFraction="",void 0!==e.slashWindow&&null!==e.slashWindow?n.slashWindow=r.default.fromString(e.slashWindow):n.slashWindow=r.default.UZERO,void 0!==e.minValidPerWindow&&null!==e.minValidPerWindow?n.minValidPerWindow=String(e.minValidPerWindow):n.minValidPerWindow="",n},toJSON:function(e){var n={};return void 0!==e.votePeriod&&(n.votePeriod=(e.votePeriod||r.default.UZERO).toString()),void 0!==e.voteThreshold&&(n.voteThreshold=e.voteThreshold),void 0!==e.rewardBand&&(n.rewardBand=e.rewardBand),void 0!==e.rewardDistributionWindow&&(n.rewardDistributionWindow=(e.rewardDistributionWindow||r.default.UZERO).toString()),e.whitelist?n.whitelist=e.whitelist.map((function(e){return e?t.Denom.toJSON(e):void 0})):n.whitelist=[],void 0!==e.slashFraction&&(n.slashFraction=e.slashFraction),void 0!==e.slashWindow&&(n.slashWindow=(e.slashWindow||r.default.UZERO).toString()),void 0!==e.minValidPerWindow&&(n.minValidPerWindow=e.minValidPerWindow),n},fromPartial:function(e){var n=Object.assign({},s);if(n.whitelist=[],void 0!==e.votePeriod&&null!==e.votePeriod?n.votePeriod=e.votePeriod:n.votePeriod=r.default.UZERO,void 0!==e.voteThreshold&&null!==e.voteThreshold?n.voteThreshold=e.voteThreshold:n.voteThreshold="",void 0!==e.rewardBand&&null!==e.rewardBand?n.rewardBand=e.rewardBand:n.rewardBand="",void 0!==e.rewardDistributionWindow&&null!==e.rewardDistributionWindow?n.rewardDistributionWindow=e.rewardDistributionWindow:n.rewardDistributionWindow=r.default.UZERO,void 0!==e.whitelist&&null!==e.whitelist){var o,i=a(e.whitelist);try{for(i.s();!(o=i.n()).done;){var c=o.value;n.whitelist.push(t.Denom.fromPartial(c))}}catch(u){i.e(u)}finally{i.f()}}return void 0!==e.slashFraction&&null!==e.slashFraction?n.slashFraction=e.slashFraction:n.slashFraction="",void 0!==e.slashWindow&&null!==e.slashWindow?n.slashWindow=e.slashWindow:n.slashWindow=r.default.UZERO,void 0!==e.minValidPerWindow&&null!==e.minValidPerWindow?n.minValidPerWindow=e.minValidPerWindow:n.minValidPerWindow="",n}};var c={name:"",tobinTax:""};t.Denom={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),""!==e.tobinTax&&t.uint32(18).string(e.tobinTax),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.name=n.string();break;case 2:o.tobinTax=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.name&&null!==e.name?t.name=String(e.name):t.name="",void 0!==e.tobinTax&&null!==e.tobinTax?t.tobinTax=String(e.tobinTax):t.tobinTax="",t},toJSON:function(e){var t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.tobinTax&&(t.tobinTax=e.tobinTax),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.name&&null!==e.name?t.name=e.name:t.name="",void 0!==e.tobinTax&&null!==e.tobinTax?t.tobinTax=e.tobinTax:t.tobinTax="",t}};var u={hash:"",voter:"",submitBlock:r.default.UZERO};t.AggregateExchangeRatePrevote={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.hash&&t.uint32(10).string(e.hash),""!==e.voter&&t.uint32(18).string(e.voter),e.submitBlock.isZero()||t.uint32(24).uint64(e.submitBlock),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.hash=n.string();break;case 2:o.voter=n.string();break;case 3:o.submitBlock=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.hash&&null!==e.hash?t.hash=String(e.hash):t.hash="",void 0!==e.voter&&null!==e.voter?t.voter=String(e.voter):t.voter="",void 0!==e.submitBlock&&null!==e.submitBlock?t.submitBlock=r.default.fromString(e.submitBlock):t.submitBlock=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=e.hash),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.submitBlock&&(t.submitBlock=(e.submitBlock||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash="",void 0!==e.voter&&null!==e.voter?t.voter=e.voter:t.voter="",void 0!==e.submitBlock&&null!==e.submitBlock?t.submitBlock=e.submitBlock:t.submitBlock=r.default.UZERO,t}};var d={voter:""};t.AggregateExchangeRateVote={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.exchangeRateTuples);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.ExchangeRateTuple.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return""!==e.voter&&o.uint32(18).string(e.voter),o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},d);for(r.exchangeRateTuples=[];a.pos>>3){case 1:r.exchangeRateTuples.push(t.ExchangeRateTuple.decode(a,a.uint32()));break;case 2:r.voter=a.string();break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},d);if(n.exchangeRateTuples=[],void 0!==e.exchangeRateTuples&&null!==e.exchangeRateTuples){var o,r=a(e.exchangeRateTuples);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.exchangeRateTuples.push(t.ExchangeRateTuple.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.voter&&null!==e.voter?n.voter=String(e.voter):n.voter="",n},toJSON:function(e){var n={};return e.exchangeRateTuples?n.exchangeRateTuples=e.exchangeRateTuples.map((function(e){return e?t.ExchangeRateTuple.toJSON(e):void 0})):n.exchangeRateTuples=[],void 0!==e.voter&&(n.voter=e.voter),n},fromPartial:function(e){var n=Object.assign({},d);if(n.exchangeRateTuples=[],void 0!==e.exchangeRateTuples&&null!==e.exchangeRateTuples){var o,r=a(e.exchangeRateTuples);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.exchangeRateTuples.push(t.ExchangeRateTuple.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.voter&&null!==e.voter?n.voter=e.voter:n.voter="",n}};var l={denom:"",exchangeRate:""};t.ExchangeRateTuple={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.exchangeRate&&t.uint32(18).string(e.exchangeRate),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos>>3){case 1:o.denom=n.string();break;case 2:o.exchangeRate=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},l);return void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.exchangeRate&&null!==e.exchangeRate?t.exchangeRate=String(e.exchangeRate):t.exchangeRate="",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.exchangeRate&&(t.exchangeRate=e.exchangeRate),t},fromPartial:function(e){var t=Object.assign({},l);return void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.exchangeRate&&null!==e.exchangeRate?t.exchangeRate=e.exchangeRate:t.exchangeRate="",t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},12306:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgDelegateFeedConsentDesc=t.MsgAggregateExchangeRateVoteDesc=t.MsgAggregateExchangeRatePrevoteDesc=t.MsgDesc=t.MsgClientImpl=t.MsgDelegateFeedConsentResponse=t.MsgDelegateFeedConsent=t.MsgAggregateExchangeRateVoteResponse=t.MsgAggregateExchangeRateVote=t.MsgAggregateExchangeRatePrevoteResponse=t.MsgAggregateExchangeRatePrevote=t.protobufPackage=void 0;var i=r(n(29600)),s=n(93704),c=r(n(80121)),u=n(82576);t.protobufPackage="terra.oracle.v1beta1";var d={hash:"",feeder:"",validator:""};t.MsgAggregateExchangeRatePrevote={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.hash&&t.uint32(10).string(e.hash),""!==e.feeder&&t.uint32(18).string(e.feeder),""!==e.validator&&t.uint32(26).string(e.validator),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.hash=n.string();break;case 2:o.feeder=n.string();break;case 3:o.validator=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.hash&&null!==e.hash?t.hash=String(e.hash):t.hash="",void 0!==e.feeder&&null!==e.feeder?t.feeder=String(e.feeder):t.feeder="",void 0!==e.validator&&null!==e.validator?t.validator=String(e.validator):t.validator="",t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=e.hash),void 0!==e.feeder&&(t.feeder=e.feeder),void 0!==e.validator&&(t.validator=e.validator),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash="",void 0!==e.feeder&&null!==e.feeder?t.feeder=e.feeder:t.feeder="",void 0!==e.validator&&null!==e.validator?t.validator=e.validator:t.validator="",t}};var l={};t.MsgAggregateExchangeRatePrevoteResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.salt&&t.uint32(10).string(e.salt),""!==e.exchangeRates&&t.uint32(18).string(e.exchangeRates),""!==e.feeder&&t.uint32(26).string(e.feeder),""!==e.validator&&t.uint32(34).string(e.validator),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3){case 1:o.salt=n.string();break;case 2:o.exchangeRates=n.string();break;case 3:o.feeder=n.string();break;case 4:o.validator=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.salt&&null!==e.salt?t.salt=String(e.salt):t.salt="",void 0!==e.exchangeRates&&null!==e.exchangeRates?t.exchangeRates=String(e.exchangeRates):t.exchangeRates="",void 0!==e.feeder&&null!==e.feeder?t.feeder=String(e.feeder):t.feeder="",void 0!==e.validator&&null!==e.validator?t.validator=String(e.validator):t.validator="",t},toJSON:function(e){var t={};return void 0!==e.salt&&(t.salt=e.salt),void 0!==e.exchangeRates&&(t.exchangeRates=e.exchangeRates),void 0!==e.feeder&&(t.feeder=e.feeder),void 0!==e.validator&&(t.validator=e.validator),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.salt&&null!==e.salt?t.salt=e.salt:t.salt="",void 0!==e.exchangeRates&&null!==e.exchangeRates?t.exchangeRates=e.exchangeRates:t.exchangeRates="",void 0!==e.feeder&&null!==e.feeder?t.feeder=e.feeder:t.feeder="",void 0!==e.validator&&null!==e.validator?t.validator=e.validator:t.validator="",t}};var p={};t.MsgAggregateExchangeRateVoteResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.operator&&t.uint32(10).string(e.operator),""!==e.delegate&&t.uint32(18).string(e.delegate),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3){case 1:o.operator=n.string();break;case 2:o.delegate=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.operator&&null!==e.operator?t.operator=String(e.operator):t.operator="",void 0!==e.delegate&&null!==e.delegate?t.delegate=String(e.delegate):t.delegate="",t},toJSON:function(e){var t={};return void 0!==e.operator&&(t.operator=e.operator),void 0!==e.delegate&&(t.delegate=e.delegate),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.operator&&null!==e.operator?t.operator=e.operator:t.operator="",void 0!==e.delegate&&null!==e.delegate?t.delegate=e.delegate:t.delegate="",t}};var m={};t.MsgDelegateFeedConsentResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description);var n,o=a(e.addresses);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(26).string(r)}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.addresses=[];n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.addresses.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},s);if(t.addresses=[],void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.addresses&&null!==e.addresses){var n,o=a(e.addresses);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.addresses.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),e.addresses?t.addresses=e.addresses.map((function(e){return e})):t.addresses=[],t},fromPartial:function(e){var t=Object.assign({},s);if(t.addresses=[],void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.addresses&&null!==e.addresses){var n,o=a(e.addresses);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.addresses.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var c={title:"",description:"",addresses:""};t.RemoveBurnTaxExemptionAddressProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description);var n,o=a(e.addresses);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(26).string(r)}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);for(o.addresses=[];n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.addresses.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);if(t.addresses=[],void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.addresses&&null!==e.addresses){var n,o=a(e.addresses);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.addresses.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),e.addresses?t.addresses=e.addresses.map((function(e){return e})):t.addresses=[],t},fromPartial:function(e){var t=Object.assign({},c);if(t.addresses=[],void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.addresses&&null!==e.addresses){var n,o=a(e.addresses);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.addresses.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},56091:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EpochInitialIssuance=t.EpochTaxProceeds=t.PolicyConstraints=t.Params=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121)),s=n(91965);t.protobufPackage="terra.treasury.v1beta1";var c={seigniorageBurdenTarget:"",miningIncrement:"",windowShort:r.default.UZERO,windowLong:r.default.UZERO,windowProbation:r.default.UZERO,burnTaxSplit:""};t.Params={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.taxPolicy&&t.PolicyConstraints.encode(e.taxPolicy,n.uint32(10).fork()).ldelim(),void 0!==e.rewardPolicy&&t.PolicyConstraints.encode(e.rewardPolicy,n.uint32(18).fork()).ldelim(),""!==e.seigniorageBurdenTarget&&n.uint32(26).string(e.seigniorageBurdenTarget),""!==e.miningIncrement&&n.uint32(34).string(e.miningIncrement),e.windowShort.isZero()||n.uint32(40).uint64(e.windowShort),e.windowLong.isZero()||n.uint32(48).uint64(e.windowLong),e.windowProbation.isZero()||n.uint32(56).uint64(e.windowProbation),""!==e.burnTaxSplit&&n.uint32(66).string(e.burnTaxSplit),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},c);a.pos>>3){case 1:r.taxPolicy=t.PolicyConstraints.decode(a,a.uint32());break;case 2:r.rewardPolicy=t.PolicyConstraints.decode(a,a.uint32());break;case 3:r.seigniorageBurdenTarget=a.string();break;case 4:r.miningIncrement=a.string();break;case 5:r.windowShort=a.uint64();break;case 6:r.windowLong=a.uint64();break;case 7:r.windowProbation=a.uint64();break;case 8:r.burnTaxSplit=a.string();break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},c);return void 0!==e.taxPolicy&&null!==e.taxPolicy?n.taxPolicy=t.PolicyConstraints.fromJSON(e.taxPolicy):n.taxPolicy=void 0,void 0!==e.rewardPolicy&&null!==e.rewardPolicy?n.rewardPolicy=t.PolicyConstraints.fromJSON(e.rewardPolicy):n.rewardPolicy=void 0,void 0!==e.seigniorageBurdenTarget&&null!==e.seigniorageBurdenTarget?n.seigniorageBurdenTarget=String(e.seigniorageBurdenTarget):n.seigniorageBurdenTarget="",void 0!==e.miningIncrement&&null!==e.miningIncrement?n.miningIncrement=String(e.miningIncrement):n.miningIncrement="",void 0!==e.windowShort&&null!==e.windowShort?n.windowShort=r.default.fromString(e.windowShort):n.windowShort=r.default.UZERO,void 0!==e.windowLong&&null!==e.windowLong?n.windowLong=r.default.fromString(e.windowLong):n.windowLong=r.default.UZERO,void 0!==e.windowProbation&&null!==e.windowProbation?n.windowProbation=r.default.fromString(e.windowProbation):n.windowProbation=r.default.UZERO,void 0!==e.burnTaxSplit&&null!==e.burnTaxSplit?n.burnTaxSplit=String(e.burnTaxSplit):n.burnTaxSplit="",n},toJSON:function(e){var n={};return void 0!==e.taxPolicy&&(n.taxPolicy=e.taxPolicy?t.PolicyConstraints.toJSON(e.taxPolicy):void 0),void 0!==e.rewardPolicy&&(n.rewardPolicy=e.rewardPolicy?t.PolicyConstraints.toJSON(e.rewardPolicy):void 0),void 0!==e.seigniorageBurdenTarget&&(n.seigniorageBurdenTarget=e.seigniorageBurdenTarget),void 0!==e.miningIncrement&&(n.miningIncrement=e.miningIncrement),void 0!==e.windowShort&&(n.windowShort=(e.windowShort||r.default.UZERO).toString()),void 0!==e.windowLong&&(n.windowLong=(e.windowLong||r.default.UZERO).toString()),void 0!==e.windowProbation&&(n.windowProbation=(e.windowProbation||r.default.UZERO).toString()),void 0!==e.burnTaxSplit&&(n.burnTaxSplit=e.burnTaxSplit),n},fromPartial:function(e){var n=Object.assign({},c);return void 0!==e.taxPolicy&&null!==e.taxPolicy?n.taxPolicy=t.PolicyConstraints.fromPartial(e.taxPolicy):n.taxPolicy=void 0,void 0!==e.rewardPolicy&&null!==e.rewardPolicy?n.rewardPolicy=t.PolicyConstraints.fromPartial(e.rewardPolicy):n.rewardPolicy=void 0,void 0!==e.seigniorageBurdenTarget&&null!==e.seigniorageBurdenTarget?n.seigniorageBurdenTarget=e.seigniorageBurdenTarget:n.seigniorageBurdenTarget="",void 0!==e.miningIncrement&&null!==e.miningIncrement?n.miningIncrement=e.miningIncrement:n.miningIncrement="",void 0!==e.windowShort&&null!==e.windowShort?n.windowShort=e.windowShort:n.windowShort=r.default.UZERO,void 0!==e.windowLong&&null!==e.windowLong?n.windowLong=e.windowLong:n.windowLong=r.default.UZERO,void 0!==e.windowProbation&&null!==e.windowProbation?n.windowProbation=e.windowProbation:n.windowProbation=r.default.UZERO,void 0!==e.burnTaxSplit&&null!==e.burnTaxSplit?n.burnTaxSplit=e.burnTaxSplit:n.burnTaxSplit="",n}};var u={rateMin:"",rateMax:"",changeRateMax:""};t.PolicyConstraints={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.rateMin&&t.uint32(10).string(e.rateMin),""!==e.rateMax&&t.uint32(18).string(e.rateMax),void 0!==e.cap&&s.Coin.encode(e.cap,t.uint32(26).fork()).ldelim(),""!==e.changeRateMax&&t.uint32(34).string(e.changeRateMax),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.rateMin=n.string();break;case 2:o.rateMax=n.string();break;case 3:o.cap=s.Coin.decode(n,n.uint32());break;case 4:o.changeRateMax=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.rateMin&&null!==e.rateMin?t.rateMin=String(e.rateMin):t.rateMin="",void 0!==e.rateMax&&null!==e.rateMax?t.rateMax=String(e.rateMax):t.rateMax="",void 0!==e.cap&&null!==e.cap?t.cap=s.Coin.fromJSON(e.cap):t.cap=void 0,void 0!==e.changeRateMax&&null!==e.changeRateMax?t.changeRateMax=String(e.changeRateMax):t.changeRateMax="",t},toJSON:function(e){var t={};return void 0!==e.rateMin&&(t.rateMin=e.rateMin),void 0!==e.rateMax&&(t.rateMax=e.rateMax),void 0!==e.cap&&(t.cap=e.cap?s.Coin.toJSON(e.cap):void 0),void 0!==e.changeRateMax&&(t.changeRateMax=e.changeRateMax),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.rateMin&&null!==e.rateMin?t.rateMin=e.rateMin:t.rateMin="",void 0!==e.rateMax&&null!==e.rateMax?t.rateMax=e.rateMax:t.rateMax="",void 0!==e.cap&&null!==e.cap?t.cap=s.Coin.fromPartial(e.cap):t.cap=void 0,void 0!==e.changeRateMax&&null!==e.changeRateMax?t.changeRateMax=e.changeRateMax:t.changeRateMax="",t}};var d={};t.EpochTaxProceeds={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.taxProceeds);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);for(o.taxProceeds=[];n.pos>>3===1)o.taxProceeds.push(s.Coin.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},d);if(t.taxProceeds=[],void 0!==e.taxProceeds&&null!==e.taxProceeds){var n,o=a(e.taxProceeds);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.taxProceeds.push(s.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.taxProceeds?t.taxProceeds=e.taxProceeds.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.taxProceeds=[],t},fromPartial:function(e){var t=Object.assign({},d);if(t.taxProceeds=[],void 0!==e.taxProceeds&&null!==e.taxProceeds){var n,o=a(e.taxProceeds);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.taxProceeds.push(s.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var l={};t.EpochInitialIssuance={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.issuance);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);for(o.issuance=[];n.pos>>3===1)o.issuance.push(s.Coin.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},l);if(t.issuance=[],void 0!==e.issuance&&null!==e.issuance){var n,o=a(e.issuance);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.issuance.push(s.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.issuance?t.issuance=e.issuance.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.issuance=[],t},fromPartial:function(e){var t=Object.assign({},l);if(t.issuance=[],void 0!==e.issuance&&null!==e.issuance){var n,o=a(e.issuance);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.issuance.push(s.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},74706:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.VestingSchedule=t.Schedule=t.LazyGradedVestingAccount=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121)),s=n(82126);t.protobufPackage="terra.vesting.v1beta1";var c={};t.LazyGradedVestingAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.baseVestingAccount&&s.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim();var o,r=a(e.vestingSchedules);try{for(r.s();!(o=r.n()).done;){var c=o.value;t.VestingSchedule.encode(c,n.uint32(18).fork()).ldelim()}}catch(u){r.e(u)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},c);for(r.vestingSchedules=[];a.pos>>3){case 1:r.baseVestingAccount=s.BaseVestingAccount.decode(a,a.uint32());break;case 2:r.vestingSchedules.push(t.VestingSchedule.decode(a,a.uint32()));break;default:a.skipType(7&u)}}return r},fromJSON:function(e){var n=Object.assign({},c);if(n.vestingSchedules=[],void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=s.BaseVestingAccount.fromJSON(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.vestingSchedules&&null!==e.vestingSchedules){var o,r=a(e.vestingSchedules);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.vestingSchedules.push(t.VestingSchedule.fromJSON(i))}}catch(u){r.e(u)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?s.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),e.vestingSchedules?n.vestingSchedules=e.vestingSchedules.map((function(e){return e?t.VestingSchedule.toJSON(e):void 0})):n.vestingSchedules=[],n},fromPartial:function(e){var n=Object.assign({},c);if(n.vestingSchedules=[],void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=s.BaseVestingAccount.fromPartial(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.vestingSchedules&&null!==e.vestingSchedules){var o,r=a(e.vestingSchedules);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.vestingSchedules.push(t.VestingSchedule.fromPartial(i))}}catch(u){r.e(u)}finally{r.f()}}return n}};var u={startTime:r.default.ZERO,endTime:r.default.ZERO,ratio:""};t.Schedule={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.startTime.isZero()||t.uint32(8).int64(e.startTime),e.endTime.isZero()||t.uint32(16).int64(e.endTime),""!==e.ratio&&t.uint32(26).string(e.ratio),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.startTime=n.int64();break;case 2:o.endTime=n.int64();break;case 3:o.ratio=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.startTime&&null!==e.startTime?t.startTime=r.default.fromString(e.startTime):t.startTime=r.default.ZERO,void 0!==e.endTime&&null!==e.endTime?t.endTime=r.default.fromString(e.endTime):t.endTime=r.default.ZERO,void 0!==e.ratio&&null!==e.ratio?t.ratio=String(e.ratio):t.ratio="",t},toJSON:function(e){var t={};return void 0!==e.startTime&&(t.startTime=(e.startTime||r.default.ZERO).toString()),void 0!==e.endTime&&(t.endTime=(e.endTime||r.default.ZERO).toString()),void 0!==e.ratio&&(t.ratio=e.ratio),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.startTime&&null!==e.startTime?t.startTime=e.startTime:t.startTime=r.default.ZERO,void 0!==e.endTime&&null!==e.endTime?t.endTime=e.endTime:t.endTime=r.default.ZERO,void 0!==e.ratio&&null!==e.ratio?t.ratio=e.ratio:t.ratio="",t}};var d={denom:""};t.VestingSchedule={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.denom&&n.uint32(10).string(e.denom);var o,r=a(e.schedules);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.Schedule.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},d);for(r.schedules=[];a.pos>>3){case 1:r.denom=a.string();break;case 2:r.schedules.push(t.Schedule.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},d);if(n.schedules=[],void 0!==e.denom&&null!==e.denom?n.denom=String(e.denom):n.denom="",void 0!==e.schedules&&null!==e.schedules){var o,r=a(e.schedules);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.schedules.push(t.Schedule.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.denom&&(n.denom=e.denom),e.schedules?n.schedules=e.schedules.map((function(e){return e?t.Schedule.toJSON(e):void 0})):n.schedules=[],n},fromPartial:function(e){var n=Object.assign({},d);if(n.schedules=[],void 0!==e.denom&&null!==e.denom?n.denom=e.denom:n.denom="",void 0!==e.schedules&&null!==e.schedules){var o,r=a(e.schedules);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.schedules.push(t.Schedule.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},98901:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgClearContractAdminDesc=t.MsgUpdateContractAdminDesc=t.MsgMigrateContractDesc=t.MsgExecuteContractDesc=t.MsgInstantiateContractDesc=t.MsgMigrateCodeDesc=t.MsgStoreCodeDesc=t.MsgDesc=t.MsgClientImpl=t.MsgClearContractAdminResponse=t.MsgClearContractAdmin=t.MsgUpdateContractAdminResponse=t.MsgUpdateContractAdmin=t.MsgMigrateContractResponse=t.MsgMigrateContract=t.MsgExecuteContractResponse=t.MsgExecuteContract=t.MsgInstantiateContractResponse=t.MsgInstantiateContract=t.MsgMigrateCodeResponse=t.MsgMigrateCode=t.MsgStoreCodeResponse=t.MsgStoreCode=t.protobufPackage=void 0;var s=i(n(29600)),c=n(93704),u=i(n(80121)),d=n(82576),l=n(91965);t.protobufPackage="terra.wasm.v1beta1";var f={sender:""};t.MsgStoreCode={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),0!==e.wasmByteCode.length&&t.uint32(18).bytes(e.wasmByteCode),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);for(o.wasmByteCode=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.wasmByteCode=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return t.wasmByteCode=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode&&(t.wasmByteCode=M(e.wasmByteCode)),t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.wasmByteCode&&(t.wasmByteCode=U(void 0!==e.wasmByteCode?e.wasmByteCode:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode?t.wasmByteCode=e.wasmByteCode:t.wasmByteCode=new Uint8Array,t}};var p={codeId:s.default.UZERO};t.MsgStoreCodeResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return e.codeId.isZero()||t.uint32(8).uint64(e.codeId),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos>>3===1)o.codeId=n.uint64();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},p);return void 0!==e.codeId&&null!==e.codeId?t.codeId=s.default.fromString(e.codeId):t.codeId=s.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||s.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=s.default.UZERO,t}};var b={codeId:s.default.UZERO,sender:""};t.MsgMigrateCode={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return e.codeId.isZero()||t.uint32(8).uint64(e.codeId),""!==e.sender&&t.uint32(18).string(e.sender),0!==e.wasmByteCode.length&&t.uint32(26).bytes(e.wasmByteCode),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);for(o.wasmByteCode=new Uint8Array;n.pos>>3){case 1:o.codeId=n.uint64();break;case 2:o.sender=n.string();break;case 3:o.wasmByteCode=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);return t.wasmByteCode=new Uint8Array,void 0!==e.codeId&&null!==e.codeId?t.codeId=s.default.fromString(e.codeId):t.codeId=s.default.UZERO,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode&&(t.wasmByteCode=M(e.wasmByteCode)),t},toJSON:function(e){var t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||s.default.UZERO).toString()),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.wasmByteCode&&(t.wasmByteCode=U(void 0!==e.wasmByteCode?e.wasmByteCode:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=s.default.UZERO,void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode?t.wasmByteCode=e.wasmByteCode:t.wasmByteCode=new Uint8Array,t}};var m={};t.MsgMigrateCodeResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();""!==e.sender&&t.uint32(10).string(e.sender),""!==e.admin&&t.uint32(18).string(e.admin),e.codeId.isZero()||t.uint32(24).uint64(e.codeId),0!==e.initMsg.length&&t.uint32(34).bytes(e.initMsg);var n,a=r(e.initCoins);try{for(a.s();!(n=a.n()).done;){var o=n.value;l.Coin.encode(o,t.uint32(42).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.initCoins=[],o.initMsg=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.admin=n.string();break;case 3:o.codeId=n.uint64();break;case 4:o.initMsg=n.bytes();break;case 5:o.initCoins.push(l.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);if(t.initCoins=[],t.initMsg=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.admin&&null!==e.admin?t.admin=String(e.admin):t.admin="",void 0!==e.codeId&&null!==e.codeId?t.codeId=s.default.fromString(e.codeId):t.codeId=s.default.UZERO,void 0!==e.initMsg&&null!==e.initMsg&&(t.initMsg=M(e.initMsg)),void 0!==e.initCoins&&null!==e.initCoins){var n,a=r(e.initCoins);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.initCoins.push(l.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.codeId&&(t.codeId=(e.codeId||s.default.UZERO).toString()),void 0!==e.initMsg&&(t.initMsg=U(void 0!==e.initMsg?e.initMsg:new Uint8Array)),e.initCoins?t.initCoins=e.initCoins.map((function(e){return e?l.Coin.toJSON(e):void 0})):t.initCoins=[],t},fromPartial:function(e){var t=Object.assign({},h);if(t.initCoins=[],void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.admin&&null!==e.admin?t.admin=e.admin:t.admin="",void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=s.default.UZERO,void 0!==e.initMsg&&null!==e.initMsg?t.initMsg=e.initMsg:t.initMsg=new Uint8Array,void 0!==e.initCoins&&null!==e.initCoins){var n,a=r(e.initCoins);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.initCoins.push(l.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return t}};var g={contractAddress:""};t.MsgInstantiateContractResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.contractAddress&&t.uint32(10).string(e.contractAddress),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);for(o.data=new Uint8Array;n.pos>>3){case 1:o.contractAddress=n.string();break;case 2:o.data=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},g);return t.data=new Uint8Array,void 0!==e.contractAddress&&null!==e.contractAddress?t.contractAddress=String(e.contractAddress):t.contractAddress="",void 0!==e.data&&null!==e.data&&(t.data=M(e.data)),t},toJSON:function(e){var t={};return void 0!==e.contractAddress&&(t.contractAddress=e.contractAddress),void 0!==e.data&&(t.data=U(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.contractAddress&&null!==e.contractAddress?t.contractAddress=e.contractAddress:t.contractAddress="",void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var y={sender:"",contract:""};t.MsgExecuteContract={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),0!==e.executeMsg.length&&t.uint32(26).bytes(e.executeMsg);var n,a=r(e.coins);try{for(a.s();!(n=a.n()).done;){var o=n.value;l.Coin.encode(o,t.uint32(42).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.coins=[],o.executeMsg=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.contract=n.string();break;case 3:o.executeMsg=n.bytes();break;case 5:o.coins.push(l.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);if(t.coins=[],t.executeMsg=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",void 0!==e.executeMsg&&null!==e.executeMsg&&(t.executeMsg=M(e.executeMsg)),void 0!==e.coins&&null!==e.coins){var n,a=r(e.coins);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.coins.push(l.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.executeMsg&&(t.executeMsg=U(void 0!==e.executeMsg?e.executeMsg:new Uint8Array)),e.coins?t.coins=e.coins.map((function(e){return e?l.Coin.toJSON(e):void 0})):t.coins=[],t},fromPartial:function(e){var t=Object.assign({},y);if(t.coins=[],void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",void 0!==e.executeMsg&&null!==e.executeMsg?t.executeMsg=e.executeMsg:t.executeMsg=new Uint8Array,void 0!==e.coins&&null!==e.coins){var n,a=r(e.coins);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.coins.push(l.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return t}};var v={};t.MsgExecuteContractResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);for(o.data=new Uint8Array;n.pos>>3===1)o.data=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},v);return t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=M(e.data)),t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=U(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},v);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var w={admin:"",contract:"",newCodeId:s.default.UZERO};t.MsgMigrateContract={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.contract&&t.uint32(18).string(e.contract),e.newCodeId.isZero()||t.uint32(24).uint64(e.newCodeId),0!==e.migrateMsg.length&&t.uint32(34).bytes(e.migrateMsg),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);for(o.migrateMsg=new Uint8Array;n.pos>>3){case 1:o.admin=n.string();break;case 2:o.contract=n.string();break;case 3:o.newCodeId=n.uint64();break;case 4:o.migrateMsg=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},w);return t.migrateMsg=new Uint8Array,void 0!==e.admin&&null!==e.admin?t.admin=String(e.admin):t.admin="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",void 0!==e.newCodeId&&null!==e.newCodeId?t.newCodeId=s.default.fromString(e.newCodeId):t.newCodeId=s.default.UZERO,void 0!==e.migrateMsg&&null!==e.migrateMsg&&(t.migrateMsg=M(e.migrateMsg)),t},toJSON:function(e){var t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.newCodeId&&(t.newCodeId=(e.newCodeId||s.default.UZERO).toString()),void 0!==e.migrateMsg&&(t.migrateMsg=U(void 0!==e.migrateMsg?e.migrateMsg:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},w);return void 0!==e.admin&&null!==e.admin?t.admin=e.admin:t.admin="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",void 0!==e.newCodeId&&null!==e.newCodeId?t.newCodeId=e.newCodeId:t.newCodeId=s.default.UZERO,void 0!==e.migrateMsg&&null!==e.migrateMsg?t.migrateMsg=e.migrateMsg:t.migrateMsg=new Uint8Array,t}};var k={};t.MsgMigrateContractResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);for(o.data=new Uint8Array;n.pos>>3===1)o.data=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},k);return t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=M(e.data)),t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=U(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},k);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var A={admin:"",newAdmin:"",contract:""};t.MsgUpdateContractAdmin={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.newAdmin&&t.uint32(18).string(e.newAdmin),""!==e.contract&&t.uint32(26).string(e.contract),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},A);n.pos>>3){case 1:o.admin=n.string();break;case 2:o.newAdmin=n.string();break;case 3:o.contract=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},A);return void 0!==e.admin&&null!==e.admin?t.admin=String(e.admin):t.admin="",void 0!==e.newAdmin&&null!==e.newAdmin?t.newAdmin=String(e.newAdmin):t.newAdmin="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",t},toJSON:function(e){var t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial:function(e){var t=Object.assign({},A);return void 0!==e.admin&&null!==e.admin?t.admin=e.admin:t.admin="",void 0!==e.newAdmin&&null!==e.newAdmin?t.newAdmin=e.newAdmin:t.newAdmin="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",t}};var x={};t.MsgUpdateContractAdminResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},x);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.contract&&t.uint32(18).string(e.contract),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},I);n.pos>>3){case 1:o.admin=n.string();break;case 2:o.contract=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},I);return void 0!==e.admin&&null!==e.admin?t.admin=String(e.admin):t.admin="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",t},toJSON:function(e){var t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial:function(e){var t=Object.assign({},I);return void 0!==e.admin&&null!==e.admin?t.admin=e.admin:t.admin="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",t}};var T={};t.MsgClearContractAdminResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},T);n.pos1&&void 0!==arguments[1]?arguments[1]:0,n=new l.default(this.blob.decode(e,t),10,"le");return this.signed?n.fromTwos(8*this.span).clone():n}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.signed&&(e=e.toTwos(8*this.span)),this.blob.encode(e.toArrayLike(a,"le",this.span),t,n)}}]),n}(u.Layout);function b(e){return new p(8,!1,e)}t.u64=b,t.i64=function(e){return new p(8,!0,e)},t.u128=function(e){return new p(16,!1,e)},t.i128=function(e){return new p(16,!0,e)},t.u256=function(e){return new p(32,!1,e)},t.i256=function(e){return new p(32,!0,e)};var m=function(e){i(n,e);var t=s(n);function n(e,a,r,i){var s;return o(this,n),(s=t.call(this,e.span,i)).layout=e,s.decoder=a,s.encoder=r,s}return r(n,[{key:"decode",value:function(e,t){return this.decoder(this.layout.decode(e,t))}},{key:"encode",value:function(e,t,n){return this.layout.encode(this.encoder(e),t,n)}},{key:"getSpan",value:function(e,t){return this.layout.getSpan(e,t)}}]),n}(u.Layout);t.publicKey=function(e){return new m((0,u.blob)(32),(function(e){return new d.PublicKey(e)}),(function(e){return e.toBuffer()}),e)};var h=function(e){i(n,e);var t=s(n);function n(e,a){var r;return o(this,n),(r=t.call(this,-1,a)).layout=e,r.discriminator=(0,u.u8)(),r}return r(n,[{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null===e||void 0===e?this.discriminator.encode(0,t,n):(this.discriminator.encode(1,t,n),this.layout.encode(e,t,n+1)+1)}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.discriminator.decode(e,t);if(0===n)return null;if(1===n)return this.layout.decode(e,t+1);throw new Error("Invalid option "+this.property)}},{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.discriminator.decode(e,t);if(0===n)return 1;if(1===n)return this.layout.getSpan(e,t+1)+1;throw new Error("Invalid option "+this.property)}}]),n}(u.Layout);function g(e){if(0===e)return!1;if(1===e)return!0;throw new Error("Invalid bool: "+e)}function y(e){return e?1:0}function v(e){var t=(0,u.u32)("length"),n=(0,u.struct)([t,(0,u.blob)((0,u.offset)(t,-t.span),"data")]);return new m(n,(function(e){return e.data}),(function(e){return{data:e}}),e)}t.option=function(e,t){return new h(e,t)},t.bool=function(e){return new m((0,u.u8)(),g,y,e)},t.vec=function(e,t){var n=(0,u.u32)("length"),a=(0,u.struct)([n,(0,u.seq)(e,(0,u.offset)(n,-n.span),"values")]);return new m(a,(function(e){return e.values}),(function(e){return{values:e}}),t)},t.tagged=function(e,t,n){var a=(0,u.struct)([b("tag"),t.replicate("data")]);return new m(a,(function(t){var n=t.tag,a=t.data;if(!n.eq(e))throw new Error("Invalid tag, expected: "+e.toString("hex")+", got: "+n.toString("hex"));return a}),(function(t){return{tag:e,data:t}}),n)},t.vecU8=v,t.str=function(e){return new m(v(),(function(e){return e.toString("utf-8")}),(function(e){return a.from(e,"utf-8")}),e)},t.rustEnum=function(e,t,n){var a=(0,u.union)(null!==n&&void 0!==n?n:(0,u.u8)(),t);return e.forEach((function(e,t){return a.addVariant(t,e,e.property)})),a},t.array=function(e,t,n){var a=(0,u.struct)([(0,u.seq)(e,t,"values")]);return new m(a,(function(e){return e.values}),(function(e){return{values:e}}),n)};var w=function(e){i(n,e);var t=s(n);function n(e,a,r){var i;return o(this,n),(i=t.call(this,e.span+a.span,r)).keyLayout=e,i.valueLayout=a,i}return r(n,[{key:"decode",value:function(e,t){return t=t||0,[this.keyLayout.decode(e,t),this.valueLayout.decode(e,t+this.keyLayout.getSpan(e,t))]}},{key:"encode",value:function(e,t,n){n=n||0;var a=this.keyLayout.encode(e[0],t,n);return a+this.valueLayout.encode(e[1],t,n+a)}},{key:"getSpan",value:function(e,t){return this.keyLayout.getSpan(e,t)+this.valueLayout.getSpan(e,t)}}]),n}(u.Layout);t.map=function(e,t,n){var a=(0,u.u32)("length"),o=(0,u.struct)([a,(0,u.seq)(new w(e,t),(0,u.offset)(a,-a.span),"values")]);return new m(o,(function(e){var t=e.values;return new Map(t)}),(function(e){return{values:Array.from(e.entries())}}),n)}},23557:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pubkeyToAddress=t.pubkeyToRawAddress=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=void 0;var a=n(81351),o=n(48555),r=n(87206),i=n(11230);function s(e){if(32!==e.length)throw new Error("Invalid Ed25519 pubkey length: ".concat(e.length));return(0,a.sha256)(e).slice(0,20)}function c(e){if(33!==e.length)throw new Error("Invalid Secp256k1 pubkey length (compressed): ".concat(e.length));return(0,a.ripemd160)((0,a.sha256)(e))}function u(e){if((0,i.isSecp256k1Pubkey)(e))return c((0,o.fromBase64)(e.value));if((0,i.isEd25519Pubkey)(e))return s((0,o.fromBase64)(e.value));if((0,i.isMultisigThresholdPubkey)(e)){var t=(0,r.encodeAminoPubkey)(e);return(0,a.sha256)(t).slice(0,20)}throw new Error("Unsupported public key type")}t.rawEd25519PubkeyToRawAddress=s,t.rawSecp256k1PubkeyToRawAddress=c,t.pubkeyToRawAddress=u,t.pubkeyToAddress=function(e,t){return(0,o.toBech32)(t,u(e))}},95520:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addCoins=t.parseCoins=t.coins=t.coin=void 0;var a=n(56548);function o(e,t){var n;if("number"===typeof e)try{n=new a.Uint53(e).toString()}catch(o){throw new Error("Given amount is not a safe integer. Consider using a string instead to overcome the limitations of JS numbers.")}else{if(!e.match(/^[0-9]+$/))throw new Error("Invalid unsigned integer string format");n=e.replace(/^0*/,"")||"0"}return{amount:n,denom:t}}t.coin=o,t.coins=function(e,t){return[o(e,t)]},t.parseCoins=function(e){return e.replace(/\s/g,"").split(",").filter(Boolean).map((function(e){var t=e.match(/^([0-9]+)([a-zA-Z]+)/);if(!t)throw new Error("Got an invalid coin string");return{amount:t[1].replace(/^0+/,"")||"0",denom:t[2]}}))},t.addCoins=function(e,t){if(e.denom!==t.denom)throw new Error("Trying to add two coins with different denoms");return{amount:a.Decimal.fromAtomics(e.amount,0).plus(a.Decimal.fromAtomics(t.amount,0)).atomics,denom:e.denom}}},87206:function(e,t,n){"use strict";var a=n(74704).default,o=n(861).default,r=n(27424).default;Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.encodeEd25519Pubkey=t.encodeSecp256k1Pubkey=void 0;var i=n(48555),s=n(56548),c=n(60099),u=n(11230);t.encodeSecp256k1Pubkey=function(e){if(33!==e.length||2!==e[0]&&3!==e[0])throw new Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return{type:u.pubkeyType.secp256k1,value:(0,i.toBase64)(e)}},t.encodeEd25519Pubkey=function(e){if(32!==e.length)throw new Error("Ed25519 public key must be 32 bytes long");return{type:u.pubkeyType.ed25519,value:(0,i.toBase64)(e)}};var d=(0,i.fromHex)("eb5ae98721"),l=(0,i.fromHex)("1624de6420"),f=(0,i.fromHex)("0dfb100520"),p=(0,i.fromHex)("22c1f7e2");function b(e){if((0,c.arrayContentStartsWith)(e,d)){var t=e.slice(d.length);if(33!==t.length)throw new Error("Invalid rest data length. Expected 33 bytes (compressed secp256k1 pubkey).");return{type:u.pubkeyType.secp256k1,value:(0,i.toBase64)(t)}}if((0,c.arrayContentStartsWith)(e,l)){var n=e.slice(l.length);if(32!==n.length)throw new Error("Invalid rest data length. Expected 32 bytes (Ed25519 pubkey).");return{type:u.pubkeyType.ed25519,value:(0,i.toBase64)(n)}}if((0,c.arrayContentStartsWith)(e,f)){var a=e.slice(f.length);if(32!==a.length)throw new Error("Invalid rest data length. Expected 32 bytes (Sr25519 pubkey).");return{type:u.pubkeyType.sr25519,value:(0,i.toBase64)(a)}}if((0,c.arrayContentStartsWith)(e,p))return function(e){var t=Array.from(e),n=t.splice(0,p.length);if(!(0,c.arrayContentStartsWith)(n,p))throw new Error("Invalid multisig prefix.");if(8!=t.shift())throw new Error("Invalid multisig data. Expecting 0x08 prefix before threshold.");var a=m(t),o=r(a,2),i=o[0],s=o[1];t.splice(0,s);var d=[];for(;t.length>0;){if(18!=t.shift())throw new Error("Invalid multisig data. Expecting 0x12 prefix before participant pubkey length.");var l=m(t),f=r(l,2),h=f[0],g=f[1];if(t.splice(0,g),t.length127)throw new Error("Decoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.Varint implementation from the Go standard library and write some tests.");return[e[0],1]}function h(e){var t=s.Uint53.fromString(e.toString()).toNumber();if(t>127)throw new Error("Encoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.PutUvarint implementation from the Go standard library and write some tests.");return[t]}function g(e){if((0,u.isMultisigThresholdPubkey)(e)){var t=Array.from(p);t.push(8),t.push.apply(t,o(h(e.value.threshold)));var n,r=a(e.value.pubkeys.map((function(e){return g(e)})));try{for(r.s();!(n=r.n()).done;){var s=n.value;t.push(18),t.push.apply(t,o(h(s.length))),t.push.apply(t,o(s))}}catch(c){r.e(c)}finally{r.f()}return new Uint8Array(t)}if((0,u.isEd25519Pubkey)(e))return new Uint8Array([].concat(o(l),o((0,i.fromBase64)(e.value))));if((0,u.isSecp256k1Pubkey)(e))return new Uint8Array([].concat(o(d),o((0,i.fromBase64)(e.value))));throw new Error("Unsupported pubkey type")}t.decodeAminoPubkey=b,t.decodeBech32Pubkey=function(e){return b((0,i.fromBech32)(e).data)},t.encodeAminoPubkey=g,t.encodeBech32Pubkey=function(e,t){return(0,i.toBech32)(t,g(e))}},15459:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeKdf=t.makeStdTx=t.isStdTx=t.serializeSignDoc=t.makeSignDoc=t.encodeSecp256k1Signature=t.decodeSignature=t.Secp256k1Wallet=t.Secp256k1HdWallet=t.extractKdfConfiguration=t.pubkeyType=t.isSinglePubkey=t.isSecp256k1Pubkey=t.isMultisigThresholdPubkey=t.isEd25519Pubkey=t.makeCosmoshubPath=t.createMultisigThresholdPubkey=t.encodeSecp256k1Pubkey=t.encodeEd25519Pubkey=t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.parseCoins=t.coins=t.coin=t.addCoins=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=t.pubkeyToRawAddress=t.pubkeyToAddress=void 0;var a=n(23557);Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return a.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return a.pubkeyToRawAddress}}),Object.defineProperty(t,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return a.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return a.rawSecp256k1PubkeyToRawAddress}});var o=n(95520);Object.defineProperty(t,"addCoins",{enumerable:!0,get:function(){return o.addCoins}}),Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return o.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return o.coins}}),Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return o.parseCoins}});var r=n(87206);Object.defineProperty(t,"decodeAminoPubkey",{enumerable:!0,get:function(){return r.decodeAminoPubkey}}),Object.defineProperty(t,"decodeBech32Pubkey",{enumerable:!0,get:function(){return r.decodeBech32Pubkey}}),Object.defineProperty(t,"encodeAminoPubkey",{enumerable:!0,get:function(){return r.encodeAminoPubkey}}),Object.defineProperty(t,"encodeBech32Pubkey",{enumerable:!0,get:function(){return r.encodeBech32Pubkey}}),Object.defineProperty(t,"encodeEd25519Pubkey",{enumerable:!0,get:function(){return r.encodeEd25519Pubkey}}),Object.defineProperty(t,"encodeSecp256k1Pubkey",{enumerable:!0,get:function(){return r.encodeSecp256k1Pubkey}});var i=n(11146);Object.defineProperty(t,"createMultisigThresholdPubkey",{enumerable:!0,get:function(){return i.createMultisigThresholdPubkey}});var s=n(11730);Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return s.makeCosmoshubPath}});var c=n(11230);Object.defineProperty(t,"isEd25519Pubkey",{enumerable:!0,get:function(){return c.isEd25519Pubkey}}),Object.defineProperty(t,"isMultisigThresholdPubkey",{enumerable:!0,get:function(){return c.isMultisigThresholdPubkey}}),Object.defineProperty(t,"isSecp256k1Pubkey",{enumerable:!0,get:function(){return c.isSecp256k1Pubkey}}),Object.defineProperty(t,"isSinglePubkey",{enumerable:!0,get:function(){return c.isSinglePubkey}}),Object.defineProperty(t,"pubkeyType",{enumerable:!0,get:function(){return c.pubkeyType}});var u=n(59367);Object.defineProperty(t,"extractKdfConfiguration",{enumerable:!0,get:function(){return u.extractKdfConfiguration}}),Object.defineProperty(t,"Secp256k1HdWallet",{enumerable:!0,get:function(){return u.Secp256k1HdWallet}});var d=n(35763);Object.defineProperty(t,"Secp256k1Wallet",{enumerable:!0,get:function(){return d.Secp256k1Wallet}});var l=n(2022);Object.defineProperty(t,"decodeSignature",{enumerable:!0,get:function(){return l.decodeSignature}}),Object.defineProperty(t,"encodeSecp256k1Signature",{enumerable:!0,get:function(){return l.encodeSecp256k1Signature}});var f=n(81985);Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return f.makeSignDoc}}),Object.defineProperty(t,"serializeSignDoc",{enumerable:!0,get:function(){return f.serializeSignDoc}});var p=n(77942);Object.defineProperty(t,"isStdTx",{enumerable:!0,get:function(){return p.isStdTx}}),Object.defineProperty(t,"makeStdTx",{enumerable:!0,get:function(){return p.makeStdTx}});var b=n(43874);Object.defineProperty(t,"executeKdf",{enumerable:!0,get:function(){return b.executeKdf}})},11146:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMultisigThresholdPubkey=t.compareArrays=void 0;var a=n(48555),o=n(56548),r=n(23557);function i(e,t){var n=(0,a.toHex)(e),o=(0,a.toHex)(t);return n===o?0:n2&&void 0!==arguments[2]&&arguments[2],a=new o.Uint53(t);if(a.toNumber()>e.length)throw new Error("Threshold k = ".concat(a.toNumber()," exceeds number of keys n = ").concat(e.length));var s=n?e:Array.from(e).sort((function(e,t){return i((0,r.pubkeyToRawAddress)(e),(0,r.pubkeyToRawAddress)(t))}));return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:a.toString(),pubkeys:s}}}},11730:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeCosmoshubPath=void 0;var a=n(81351);t.makeCosmoshubPath=function(e){return[a.Slip10RawIndex.hardened(44),a.Slip10RawIndex.hardened(118),a.Slip10RawIndex.hardened(0),a.Slip10RawIndex.normal(0),a.Slip10RawIndex.normal(e)]}},11230:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMultisigThresholdPubkey=t.isSinglePubkey=t.pubkeyType=t.isSecp256k1Pubkey=t.isEd25519Pubkey=void 0,t.isEd25519Pubkey=function(e){return"tendermint/PubKeyEd25519"===e.type},t.isSecp256k1Pubkey=function(e){return"tendermint/PubKeySecp256k1"===e.type},t.pubkeyType={secp256k1:"tendermint/PubKeySecp256k1",ed25519:"tendermint/PubKeyEd25519",sr25519:"tendermint/PubKeySr25519",multisigThreshold:"tendermint/PubKeyMultisigThreshold"},t.isSinglePubkey=function(e){return[t.pubkeyType.ed25519,t.pubkeyType.secp256k1,t.pubkeyType.sr25519].includes(e.type)},t.isMultisigThresholdPubkey=function(e){return"tendermint/PubKeyMultisigThreshold"===e.type}},59367:function(e,t,n){"use strict";var a=n(42122).default,o=n(861).default,r=n(17061).default,i=n(17156).default,s=n(56690).default,c=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Secp256k1HdWallet=t.extractKdfConfiguration=void 0;var u=n(81351),d=n(48555),l=n(60099),f=n(23557),p=n(11730),b=n(2022),m=n(81985),h=n(43874),g="secp256k1wallet-v1",y={algorithm:"argon2id",params:{outputLength:32,opsLimit:24,memLimitKib:12288}};t.extractKdfConfiguration=function(e){var t=JSON.parse(e);if(!(0,l.isNonNullObject)(t))throw new Error("Root document is not an object.");if(t.type===g)return t.kdf;throw new Error("Unsupported serialization type")};var v={bip39Password:"",hdPaths:[(0,p.makeCosmoshubPath)(0)],prefix:"cosmos"},w=function(){function e(t,n){var a,o;s(this,e);var r=null!==(a=n.hdPaths)&&void 0!==a?a:v.hdPaths,i=null!==(o=n.prefix)&&void 0!==o?o:v.prefix;this.secret=t,this.seed=n.seed,this.accounts=r.map((function(e){return{hdPath:e,prefix:i}}))}return c(e,[{key:"mnemonic",get:function(){return this.secret.toString()}},{key:"getAccounts",value:function(){var e=i(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccountsWithPrivkeys();case 2:return t=e.sent,e.abrupt("return",t.map((function(e){return{algo:e.algo,pubkey:e.pubkey,address:e.address}})));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"signAmino",value:function(){var e=i(r().mark((function e(t,n){var a,i,s,c,d,l,f;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccountsWithPrivkeys();case 2:if(a=e.sent,void 0!==(i=a.find((function(e){return e.address===t})))){e.next=6;break}throw new Error("Address ".concat(t," not found in wallet"));case 6:return s=i.privkey,c=i.pubkey,d=(0,u.sha256)((0,m.serializeSignDoc)(n)),e.next=10,u.Secp256k1.createSignature(d,s);case 10:return l=e.sent,f=new Uint8Array([].concat(o(l.r(32)),o(l.s(32)))),e.abrupt("return",{signed:n,signature:(0,b.encodeSecp256k1Signature)(c,f)});case 13:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"serialize",value:function(){var e=i(r().mark((function e(t){var n,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=y,e.next=3,(0,h.executeKdf)(t,n);case 3:return a=e.sent,e.abrupt("return",this.serializeWithEncryptionKey(a,n));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"serializeWithEncryptionKey",value:function(){var e=i(r().mark((function e(t,n){var a,o,i,s,c;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={mnemonic:this.mnemonic,accounts:this.accounts.map((function(e){var t=e.hdPath,n=e.prefix;return{hdPath:(0,u.pathToString)(t),prefix:n}}))},o=(0,d.toUtf8)(JSON.stringify(a)),i={algorithm:h.supportedAlgorithms.xchacha20poly1305Ietf},e.next=5,(0,h.encrypt)(o,t,i);case 5:return s=e.sent,c={type:g,kdf:n,encryption:i,data:(0,d.toBase64)(s)},e.abrupt("return",JSON.stringify(c));case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getKeyPair",value:function(){var e=i(r().mark((function e(t){var n,a,o,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.Slip10.derivePath(u.Slip10Curve.Secp256k1,this.seed,t),a=n.privkey,e.next=3,u.Secp256k1.makeKeypair(a);case 3:return o=e.sent,i=o.pubkey,e.abrupt("return",{privkey:a,pubkey:u.Secp256k1.compressPubkey(i)});case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getAccountsWithPrivkeys",value:function(){var e=i(r().mark((function e(){var t=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(this.accounts.map(function(){var e=i(r().mark((function e(n){var a,o,i,s,c,u;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.hdPath,o=n.prefix,e.next=3,t.getKeyPair(a);case 3:return i=e.sent,s=i.privkey,c=i.pubkey,u=(0,d.toBech32)(o,(0,f.rawSecp256k1PubkeyToRawAddress)(c)),e.abrupt("return",{algo:"secp256k1",privkey:s,pubkey:c,address:u});case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}],[{key:"fromMnemonic",value:function(){var t=i(r().mark((function t(n){var o,i,s,c=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=c.length>1&&void 0!==c[1]?c[1]:{},i=new u.EnglishMnemonic(n),t.next=4,u.Bip39.mnemonicToSeed(i,o.bip39Password);case 4:return s=t.sent,t.abrupt("return",new e(i,a(a({},o),{},{seed:s})));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"generate",value:function(){var t=i(r().mark((function t(){var n,a,o,i,s,c=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=c.length>0&&void 0!==c[0]?c[0]:12,a=c.length>1&&void 0!==c[1]?c[1]:{},o=4*Math.floor(11*n/33),i=u.Random.getBytes(o),s=u.Bip39.encode(i),t.abrupt("return",e.fromMnemonic(s.toString(),a));case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"deserialize",value:function(){var t=i(r().mark((function t(n,a){var o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=JSON.parse(n),(0,l.isNonNullObject)(o)){t.next=3;break}throw new Error("Root document is not an object.");case 3:t.t0=o.type,t.next=t.t0===g?6:7;break;case 6:return t.abrupt("return",e.deserializeTypeV1(n,a));case 7:throw new Error("Unsupported serialization type");case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"deserializeWithEncryptionKey",value:function(){var t=i(r().mark((function t(n,a){var o,i,s,c,f,p,b,m;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=JSON.parse(n),(0,l.isNonNullObject)(o)){t.next=3;break}throw new Error("Root document is not an object.");case 3:i=o,t.t0=i.type,t.next=t.t0===g?7:22;break;case 7:return t.next=9,(0,h.decrypt)((0,d.fromBase64)(i.data),a,i.encryption);case 9:if(s=t.sent,c=JSON.parse((0,d.fromUtf8)(s)),f=c.mnemonic,p=c.accounts,(0,l.assert)("string"===typeof f),Array.isArray(p)){t.next=15;break}throw new Error("Property 'accounts' is not an array");case 15:if(p.every((function(e){return t=e,!!(0,l.isNonNullObject)(t)&&"string"===typeof t.hdPath&&"string"===typeof t.prefix;var t}))){t.next=17;break}throw new Error("Account is not in the correct format.");case 17:if(b=p[0].prefix,p.every((function(e){return e.prefix===b}))){t.next=20;break}throw new Error("Accounts do not all have the same prefix");case 20:return m=p.map((function(e){var t=e.hdPath;return(0,u.stringToPath)(t)})),t.abrupt("return",e.fromMnemonic(f,{hdPaths:m,prefix:b}));case 22:throw new Error("Unsupported serialization type");case 23:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"deserializeTypeV1",value:function(){var t=i(r().mark((function t(n,a){var o,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=JSON.parse(n),(0,l.isNonNullObject)(o)){t.next=3;break}throw new Error("Root document is not an object.");case 3:return t.next=5,(0,h.executeKdf)(a,o.kdf);case 5:return i=t.sent,t.abrupt("return",e.deserializeWithEncryptionKey(n,i));case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}]),e}();t.Secp256k1HdWallet=w},35763:function(e,t,n){"use strict";var a=n(861).default,o=n(17061).default,r=n(17156).default,i=n(56690).default,s=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Secp256k1Wallet=void 0;var c=n(81351),u=n(48555),d=n(23557),l=n(2022),f=n(81985),p=function(){function e(t,n,a){i(this,e),this.privkey=t,this.pubkey=n,this.prefix=a}return s(e,[{key:"address",get:function(){return(0,u.toBech32)(this.prefix,(0,d.rawSecp256k1PubkeyToRawAddress)(this.pubkey))}},{key:"getAccounts",value:function(){var e=r(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",[{algo:"secp256k1",address:this.address,pubkey:this.pubkey}]);case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"signAmino",value:function(){var e=r(o().mark((function e(t,n){var r,i,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t===this.address){e.next=2;break}throw new Error("Address ".concat(t," not found in wallet"));case 2:return r=new c.Sha256((0,f.serializeSignDoc)(n)).digest(),e.next=5,c.Secp256k1.createSignature(r,this.privkey);case 5:return i=e.sent,s=new Uint8Array([].concat(a(i.r(32)),a(i.s(32)))),e.abrupt("return",{signed:n,signature:(0,l.encodeSecp256k1Signature)(this.pubkey,s)});case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}],[{key:"fromKey",value:function(){var t=r(o().mark((function t(n){var a,r,i=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=i.length>1&&void 0!==i[1]?i[1]:"cosmos",t.next=3,c.Secp256k1.makeKeypair(n);case 3:return r=t.sent.pubkey,t.abrupt("return",new e(n,c.Secp256k1.compressPubkey(r),a));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),e}();t.Secp256k1Wallet=p},2022:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSignature=t.encodeSecp256k1Signature=void 0;var a=n(48555),o=n(87206),r=n(11230);t.encodeSecp256k1Signature=function(e,t){if(64!==t.length)throw new Error("Signature must be 64 bytes long. Cosmos SDK uses a 2x32 byte fixed length encoding for the secp256k1 signature integers r and s.");return{pub_key:(0,o.encodeSecp256k1Pubkey)(e),signature:(0,a.toBase64)(t)}},t.decodeSignature=function(e){if(e.pub_key.type===r.pubkeyType.secp256k1)return{pubkey:(0,a.fromBase64)(e.pub_key.value),signature:(0,a.fromBase64)(e.signature)};throw new Error("Unsupported pubkey type")}},81985:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignDoc=t.escapeCharacters=t.makeSignDoc=t.sortedJsonStringify=void 0;var a=n(48555),o=n(56548);function r(e){if("object"!==typeof e||null===e)return e;if(Array.isArray(e))return e.map(r);var t=Object.keys(e).sort(),n={};return t.forEach((function(t){n[t]=r(e[t])})),n}function i(e){return JSON.stringify(r(e))}function s(e){return e.replace(/&/g,"\\u0026").replace(//g,"\\u003e")}t.sortedJsonStringify=i,t.makeSignDoc=function(e,t,n,a,r,i){return{chain_id:n,account_number:o.Uint53.fromString(r.toString()).toString(),sequence:o.Uint53.fromString(i.toString()).toString(),fee:t,msgs:e,memo:a||""}},t.escapeCharacters=s,t.serializeSignDoc=function(e){var t=s(i(e));return(0,a.toUtf8)(t)}},77942:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeStdTx=t.isStdTx=void 0,t.isStdTx=function(e){var t=e.memo,n=e.msg,a=e.fee,o=e.signatures;return"string"===typeof t&&Array.isArray(n)&&"object"===typeof a&&Array.isArray(o)},t.makeStdTx=function(e,t){return{msg:e.msgs,fee:e.fee,memo:e.memo,signatures:Array.isArray(t)?t:[t]}}},43874:function(e,t,n){"use strict";var a=n(861).default,o=n(17061).default,r=n(17156).default;Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=t.supportedAlgorithms=t.executeKdf=t.cosmjsSalt=void 0;var i=n(81351),s=n(48555);function c(){return(c=r(o().mark((function e(n,a){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=a.algorithm,e.next="argon2id"===e.t0?3:7;break;case 3:if(r=a.params,(0,i.isArgon2idOptions)(r)){e.next=6;break}throw new Error("Invalid format of argon2id params");case 6:return e.abrupt("return",i.Argon2id.execute(n,t.cosmjsSalt,r));case 7:throw new Error("Unsupported KDF algorithm");case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(){return(u=r(o().mark((function e(n,r,s){var c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=s.algorithm,e.next=e.t0===t.supportedAlgorithms.xchacha20poly1305Ietf?3:14;break;case 3:return c=i.Random.getBytes(i.xchacha20NonceLength),e.t1=Uint8Array,e.t2=[],e.t3=a(c),e.t4=a,e.next=10,i.Xchacha20poly1305Ietf.encrypt(n,r,c);case 10:return e.t5=e.sent,e.t6=(0,e.t4)(e.t5),e.t7=e.t2.concat.call(e.t2,e.t3,e.t6),e.abrupt("return",new e.t1(e.t7));case 14:throw new Error("Unsupported encryption algorithm: '".concat(s.algorithm,"'"));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(){return(d=r(o().mark((function e(n,a,r){var s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=r.algorithm,e.next=e.t0===t.supportedAlgorithms.xchacha20poly1305Ietf?3:5;break;case 3:return s=n.slice(0,i.xchacha20NonceLength),e.abrupt("return",i.Xchacha20poly1305Ietf.decrypt(n.slice(i.xchacha20NonceLength),a,s));case 5:throw new Error("Unsupported encryption algorithm: '".concat(r.algorithm,"'"));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.cosmjsSalt=(0,s.toAscii)("The CosmJS salt."),t.executeKdf=function(e,t){return c.apply(this,arguments)},t.supportedAlgorithms={xchacha20poly1305Ietf:"xchacha20poly1305-ietf"},t.encrypt=function(e,t,n){return u.apply(this,arguments)},t.decrypt=function(e,t,n){return d.apply(this,arguments)}},51825:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(74704).default,i=n(56690).default,s=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Bip39=t.EnglishMnemonic=t.mnemonicToEntropy=t.entropyToMnemonic=void 0;var c=n(48555),u=n(90792),d=n(68722),l=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];function f(e){return Array.from(e).map((function(e){return e.toString(2).padStart(8,"0")})).join("")}function p(e){var t=8*e.length/32;return f((0,d.sha256)(e)).slice(0,t)}function b(e){return parseInt(e,2)}var m=[16,20,24,28,32],h=[12,15,18,21,24];function g(e){if(-1===m.indexOf(e.length))throw new Error("invalid input length");return(f(e)+p(e)).match(/(.{11})/g).map((function(e){var t=b(e);return l[t]})).join(" ")}t.entropyToMnemonic=g;var y="Invalid number of words",v="Found word that is not in the wordlist",w="Invalid entropy",k="Invalid mnemonic checksum";function A(e){return e.normalize("NFKD")}function x(e){var t=A(e).split(" ");if(!h.includes(t.length))throw new Error(y);var n=t.map((function(e){var t=l.indexOf(e);if(-1===t)throw new Error(v);return t.toString(2).padStart(11,"0")})).join(""),a=32*Math.floor(n.length/33),o=n.slice(0,a),r=n.slice(a),i=o.match(/(.{1,8})/g).map(b);if(i.length<16||i.length>32||i.length%4!==0)throw new Error(w);var s=Uint8Array.from(i);if(p(s)!==r)throw new Error(k);return s}t.mnemonicToEntropy=x;var I=function(){function e(t){if(i(this,e),!e.mnemonicMatcher.test(t))throw new Error("Invalid mnemonic format");var n=t.split(" "),a=[12,15,18,21,24];if(-1===a.indexOf(n.length))throw new Error("Invalid word count in mnemonic (allowed: ".concat(a," got: ").concat(n.length,")"));var o,s=r(n);try{for(s.s();!(o=s.n()).done;){var c=o.value;if(-1===e.wordlist.indexOf(c))throw new Error("Mnemonic contains invalid word")}}catch(u){s.e(u)}finally{s.f()}x(t),this.data=t}return s(e,[{key:"toString",value:function(){return this.data}}]),e}();t.EnglishMnemonic=I,I.wordlist=l,I.mnemonicMatcher=/^[a-z]+( [a-z]+)*$/;var T=function(){function e(){i(this,e)}return s(e,null,[{key:"encode",value:function(e){return new I(g(e))}},{key:"decode",value:function(e){return x(e.toString())}},{key:"mnemonicToSeed",value:function(){var e=o(a().mark((function e(t,n){var o,r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=(0,c.toUtf8)(A(t.toString())),r="mnemonic"+(n?A(n):""),i=(0,c.toUtf8)(r),e.abrupt("return",(0,u.pbkdf2Sha512)(o,i,2048,64));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();t.Bip39=T},2302:function(e,t,n){"use strict";var a=n(861).default,o=n(56690).default,r=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Hmac=void 0;var i=function(){function e(t,n){o(this,e);var r=(new t).blockSize;this.hash=function(e){return(new t).update(e).digest()};var i=n;if(i.length>r&&(i=this.hash(i)),i.length32)){e.next=4;break}throw new Error("Message hash length must not exceed 32 bytes");case 4:if(o=f.keyFromPrivate(n),r=o.sign(t,{canonical:!0}),i=r.r,s=r.s,"number"===typeof(c=r.recoveryParam)){e.next=8;break}throw new Error("Recovery param missing");case 8:return e.abrupt("return",new l.ExtendedSecp256k1Signature(Uint8Array.from(i.toArray()),Uint8Array.from(s.toArray()),c));case 9:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"verifySignature",value:function(){var e=o(a().mark((function e(t,n,o){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==n.length){e.next=2;break}throw new Error("Message hash must not be empty");case 2:if(!(n.length>32)){e.next=4;break}throw new Error("Message hash length must not exceed 32 bytes");case 4:return r=f.keyFromPublic(o),e.prev=5,e.abrupt("return",r.verify(n,t.toDer()));case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e,null,[[5,9]])})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"recoverPubkey",value:function(e,t){var n={r:(0,c.toHex)(e.r()),s:(0,c.toHex)(e.s())},a=f.recoverPubKey(t,n,e.recovery),o=f.keyFromPublic(a);return(0,c.fromHex)(o.getPublic(!1,"hex"))}},{key:"compressPubkey",value:function(e){switch(e.length){case 33:return e;case 65:return Uint8Array.from(f.keyFromPublic(e).getPublic(!0,"array"));default:throw new Error("Invalid pubkey length")}}},{key:"uncompressPubkey",value:function(e){switch(e.length){case 33:return Uint8Array.from(f.keyFromPublic(e).getPublic(!1,"array"));case 65:return e;default:throw new Error("Invalid pubkey length")}}},{key:"trimRecoveryByte",value:function(e){switch(e.length){case 64:return e;case 65:return e.slice(0,64);default:throw new Error("Invalid signature length")}}}]),e}();t.Secp256k1=b},65314:function(e,t,n){"use strict";var a=n(61655).default,o=n(26389).default,r=n(861).default,i=n(56690).default,s=n(89728).default,c=n(74704).default;function u(e){var t,n=0,a=c(e);try{for(a.s();!(t=a.n()).done;){if(0!==t.value)break;n++}}catch(o){a.e(o)}finally{a.f()}return e.slice(n)}Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedSecp256k1Signature=t.Secp256k1Signature=void 0;var d=2,l=function(){function e(t,n){if(i(this,e),t.length>32||0===t.length||0===t[0])throw new Error("Unsigned integer r must be encoded as unpadded big endian.");if(n.length>32||0===n.length||0===n[0])throw new Error("Unsigned integer s must be encoded as unpadded big endian.");this.data={r:t,s:n}}return s(e,[{key:"r",value:function(e){if(void 0===e)return this.data.r;var t=e-this.data.r.length;if(t<0)throw new Error("Length too small to hold parameter r");var n=new Uint8Array(t);return new Uint8Array([].concat(r(n),r(this.data.r)))}},{key:"s",value:function(e){if(void 0===e)return this.data.s;var t=e-this.data.s.length;if(t<0)throw new Error("Length too small to hold parameter s");var n=new Uint8Array(t);return new Uint8Array([].concat(r(n),r(this.data.s)))}},{key:"toFixedLength",value:function(){return new Uint8Array([].concat(r(this.r(32)),r(this.s(32))))}},{key:"toDer",value:function(){var e=this.data.r[0]>=128?new Uint8Array([0].concat(r(this.data.r))):this.data.r,t=this.data.s[0]>=128?new Uint8Array([0].concat(r(this.data.s))):this.data.s,n=e.length,a=t.length,o=new Uint8Array([d,n].concat(r(e),[d,a],r(t)));return new Uint8Array([48,o.length].concat(r(o)))}}],[{key:"fromFixedLength",value:function(t){if(64!==t.length)throw new Error("Got invalid data length: ".concat(t.length,". Expected 2x 32 bytes for the pair (r, s)"));return new e(u(t.slice(0,32)),u(t.slice(32,64)))}},{key:"fromDer",value:function(t){var n=0;if(48!==t[n++])throw new Error("Prefix 0x30 expected");var a=t[n++];if(t.length-n!==a)throw new Error("Data length mismatch detected");if(t[n++]!==d)throw new Error("INTEGER tag expected");var o=t[n++];if(o>=128)throw new Error("Decoding length values above 127 not supported");var r=t.slice(n,n+o);if(n+=o,t[n++]!==d)throw new Error("INTEGER tag expected");var i=t[n++];if(i>=128)throw new Error("Decoding length values above 127 not supported");var s=t.slice(n,n+i);return n+=i,new e(u(r),u(s))}}]),e}();t.Secp256k1Signature=l;var f=function(e){a(n,e);var t=o(n);function n(e,a,o){var r;if(i(this,n),r=t.call(this,e,a),!Number.isInteger(o))throw new Error("The recovery parameter must be an integer.");if(o<0||o>4)throw new Error("The recovery parameter must be one of 0, 1, 2, 3.");return r.recovery=o,r}return s(n,[{key:"toFixedLength",value:function(){return new Uint8Array([].concat(r(this.r(32)),r(this.s(32)),[this.recovery]))}}],[{key:"fromFixedLength",value:function(e){if(65!==e.length)throw new Error("Got invalid data length ".concat(e.length,". Expected 32 + 32 + 1"));return new n(u(e.slice(0,32)),u(e.slice(32,64)),e[64])}}]),n}(l);t.ExtendedSecp256k1Signature=f},68722:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.Sha512=t.sha256=t.Sha256=void 0;var r=n(83977),i=n(36833),s=n(93468),c=function(){function e(t){a(this,e),this.blockSize=64,this.impl=r.sha256.create(),t&&this.update(t)}return o(e,[{key:"update",value:function(e){return this.impl.update((0,s.toRealUint8Array)(e)),this}},{key:"digest",value:function(){return this.impl.digest()}}]),e}();t.Sha256=c,t.sha256=function(e){return new c(e).digest()};var u=function(){function e(t){a(this,e),this.blockSize=128,this.impl=i.sha512.create(),t&&this.update(t)}return o(e,[{key:"update",value:function(e){return this.impl.update((0,s.toRealUint8Array)(e)),this}},{key:"digest",value:function(){return this.impl.digest()}}]),e}();t.Sha512=u,t.sha512=function(e){return new u(e).digest()}},24114:function(e,t,n){"use strict";var a=n(27424).default,o=n(861).default,r=n(74704).default,i=n(56690).default,s=n(89728).default,c=n(61655).default,u=n(26389).default,d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringToPath=t.pathToString=t.Slip10=t.Slip10RawIndex=t.slip10CurveFromString=t.Slip10Curve=void 0;var l,f=n(48555),p=n(56548),b=d(n(43811)),m=d(n(69205)),h=n(2302),g=n(68722);!function(e){e.Secp256k1="Bitcoin seed",e.Ed25519="ed25519 seed"}(l=t.Slip10Curve||(t.Slip10Curve={})),t.slip10CurveFromString=function(e){switch(e){case l.Ed25519:return l.Ed25519;case l.Secp256k1:return l.Secp256k1;default:throw new Error("Unknown curve string: '".concat(e,"'"))}};var y=function(e){c(n,e);var t=u(n);function n(){return i(this,n),t.apply(this,arguments)}return s(n,[{key:"isHardened",value:function(){return this.data>=Math.pow(2,31)}}],[{key:"hardened",value:function(e){return new n(e+Math.pow(2,31))}},{key:"normal",value:function(e){return new n(e)}}]),n}(p.Uint32);t.Slip10RawIndex=y;var v=new m.default.ec("secp256k1"),w=function(){function e(){i(this,e)}return s(e,null,[{key:"derivePath",value:function(e,t,n){var a,o=this.master(e,t),i=r(n);try{for(i.s();!(a=i.n()).done;){var s=a.value;o=this.child(e,o.privkey,o.chainCode,s)}}catch(c){i.e(c)}finally{i.f()}return o}},{key:"master",value:function(e,t){var n=new h.Hmac(g.Sha512,(0,f.toAscii)(e)).update(t).digest(),a=n.slice(0,32),o=n.slice(32,64);return e!==l.Ed25519&&(this.isZero(a)||this.isGteN(e,a))?this.master(e,n):{chainCode:o,privkey:a}}},{key:"child",value:function(t,n,a,r){var i;if(r.isHardened()){var s=new Uint8Array([0].concat(o(n),o(r.toBytesBigEndian())));i=new h.Hmac(g.Sha512,a).update(s).digest()}else{if(t===l.Ed25519)throw new Error("Normal keys are not allowed with ed25519");var c=new Uint8Array([].concat(o(e.serializedPoint(t,new b.default(n))),o(r.toBytesBigEndian())));i=new h.Hmac(g.Sha512,a).update(c).digest()}return this.childImpl(t,n,a,r,i)}},{key:"serializedPoint",value:function(e,t){if(e===l.Secp256k1)return(0,f.fromHex)(v.g.mul(t).encodeCompressed("hex"));throw new Error("curve not supported")}},{key:"childImpl",value:function(e,t,n,a,r){var i=r.slice(0,32),s=r.slice(32,64),c=s;if(e===l.Ed25519)return{chainCode:c,privkey:i};var u=this.n(e),d=new b.default(i).add(new b.default(t)).mod(u),f=Uint8Array.from(d.toArray("be",32));if(this.isGteN(e,i)||this.isZero(f)){var p=new h.Hmac(g.Sha512,n).update(new Uint8Array([1].concat(o(s),o(a.toBytesBigEndian())))).digest();return this.childImpl(e,t,n,a,p)}return{chainCode:c,privkey:f}}},{key:"isZero",value:function(e){return e.every((function(e){return 0===e}))}},{key:"isGteN",value:function(e,t){return new b.default(t).gte(this.n(e))}},{key:"n",value:function(e){if(e===l.Secp256k1)return new b.default("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",16);throw new Error("curve not supported")}}]),e}();t.Slip10=w,t.pathToString=function(e){return e.reduce((function(e,t){return e+"/"+(t.isHardened()?"".concat(t.toNumber()-Math.pow(2,31),"'"):t.toString())}),"m")},t.stringToPath=function(e){if(!e.startsWith("m"))throw new Error("Path string must start with 'm'");for(var t=e.slice(1),n=new Array;t;){var o=t.match(/^\/([0-9]+)('?)/);if(!o)throw new Error("Syntax error while reading path component");var r=a(o,3),i=r[0],s=r[1],c=r[2],u=p.Uint53.fromString(s).toNumber();if(u>=Math.pow(2,31))throw new Error("Component value too high. Must not exceed 2**31-1.");c?n.push(y.hardened(u)):n.push(y.normal(u)),t=t.slice(i.length)}return n}},93468:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toRealUint8Array=void 0,t.toRealUint8Array=function(e){return e instanceof Uint8Array?e:Uint8Array.from(e)}},73793:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromAscii=t.toAscii=void 0,t.toAscii=function(e){return Uint8Array.from(e.split("").map((function(e){var t=e.charCodeAt(0);if(t<32||t>126)throw new Error("Cannot encode character that is out of printable ASCII range: "+t);return t})))},t.fromAscii=function(e){var t;return(t=Array.from(e),t.map((function(e){if(e<32||e>126)throw new Error("Cannot decode character that is out of printable ASCII range: "+e);return String.fromCharCode(e)}))).join("")}},21932:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fromBase64=t.toBase64=void 0;var i=r(n(35429));t.toBase64=function(e){return i.fromByteArray(e)},t.fromBase64=function(e){if(!e.match(/^[a-zA-Z0-9+/]*={0,2}$/))throw new Error("Invalid base64 string format");return i.toByteArray(e)}},53344:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeBech32=t.fromBech32=t.toBech32=void 0;var i=r(n(36714));function s(e,t,n){return i.encode(e,i.toWords(t),n)}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=i.decode(e,t);return{prefix:n.prefix,data:new Uint8Array(i.fromWords(n.words))}}t.toBech32=s,t.fromBech32=c,t.normalizeBech32=function(e){var t=c(e);return s(t.prefix,t.data)}},76116:function(e,t,n){"use strict";var a=n(74704).default;Object.defineProperty(t,"__esModule",{value:!0}),t.fromHex=t.toHex=void 0,t.toHex=function(e){var t,n="",o=a(e);try{for(o.s();!(t=o.n()).done;){n+=("0"+t.value.toString(16)).slice(-2)}}catch(r){o.e(r)}finally{o.f()}return n},t.fromHex=function(e){if(e.length%2!==0)throw new Error("hex string length must be a multiple of 2");for(var t=new Uint8Array(e.length/2),n=0;n1&&void 0!==arguments[1]?arguments[1]:2;return e.toString().padStart(t,"0")}t.fromRfc3339=function(e){var t=n.exec(e);if(!t)throw new Error("Date string is not in RFC3339 format");var a,o,r,i=+t[1],s=+t[2],c=+t[3],u=+t[4],d=+t[5],l=+t[6],f=t[7]?Math.floor(1e3*+t[7]):0;"Z"===t[8]?(a=1,o=0,r=0):(a="-"===t[8].substring(0,1)?-1:1,o=+t[8].substring(1,3),r=+t[8].substring(4,6));var p=a*(60*o+r)*60,b=Date.UTC(i,s-1,c,u,d,l,f)-1e3*p;return new Date(b)},t.toRfc3339=function(e){var t=e.getUTCFullYear(),n=a(e.getUTCMonth()+1),o=a(e.getUTCDate()),r=a(e.getUTCHours()),i=a(e.getUTCMinutes()),s=a(e.getUTCSeconds()),c=a(e.getUTCMilliseconds(),3);return"".concat(t,"-").concat(n,"-").concat(o,"T").concat(r,":").concat(i,":").concat(s,".").concat(c,"Z")}},32022:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromUtf8=t.toUtf8=void 0,t.toUtf8=function(e){return(new TextEncoder).encode(e)},t.fromUtf8=function(e){return new TextDecoder("utf-8",{fatal:!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])}).decode(e)}},36714:function(e){"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n={},a=0;a>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function i(e){for(var t=1,n=0;n126)return"Invalid prefix ("+e+")";t=r(t)^a>>5}for(t=r(t),n=0;nt)return"Exceeds length limit";var a=e.toLowerCase(),o=e.toUpperCase();if(e!==a&&e!==o)return"Mixed-case string "+e;var s=(e=a).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var c=e.slice(0,s),u=e.slice(s+1);if(u.length<6)return"Data too short";var d=i(c);if("string"===typeof d)return d;for(var l=[],f=0;f=u.length||l.push(b)}return 1!==d?"Invalid checksum for "+e:{prefix:c,words:l}}function c(e,t,n,a){for(var o=0,r=0,i=(1<=n;)r-=n,s.push(o>>r&i);if(a)r>0&&s.push(o<=t)return"Excess padding";if(o<a)throw new TypeError("Exceeds length limit");var o=i(e=e.toLowerCase());if("string"===typeof o)throw new Error(o);for(var s=e+"1",c=0;c>5!==0)throw new Error("Non 5-bit word");o=r(o)^u,s+=t.charAt(u)}for(c=0;c<6;++c)o=r(o);for(o^=1,c=0;c<6;++c){var d=o>>5*(5-c)&31;s+=t.charAt(d)}return s},toWordsUnsafe:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},127:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Decimal=void 0;var i=r(n(43811)),s=function(){function e(t,n){if(a(this,e),!t.match(/^[0-9]+$/))throw new Error("Invalid string format. Only non-negative integers in decimal representation supported.");this.data={atomics:new i.default(t),fractionalDigits:n}}return o(e,[{key:"atomics",get:function(){return this.data.atomics.toString()}},{key:"fractionalDigits",get:function(){return this.data.fractionalDigits}},{key:"clone",value:function(){return new e(this.atomics,this.fractionalDigits)}},{key:"floor",value:function(){var t=new i.default(10).pow(new i.default(this.data.fractionalDigits)),n=this.data.atomics.div(t);return this.data.atomics.mod(t).isZero()?this.clone():e.fromAtomics(n.mul(t).toString(),this.fractionalDigits)}},{key:"ceil",value:function(){var t=new i.default(10).pow(new i.default(this.data.fractionalDigits)),n=this.data.atomics.div(t);return this.data.atomics.mod(t).isZero()?this.clone():e.fromAtomics(n.addn(1).mul(t).toString(),this.fractionalDigits)}},{key:"toString",value:function(){var e=new i.default(10).pow(new i.default(this.data.fractionalDigits)),t=this.data.atomics.div(e),n=this.data.atomics.mod(e);if(n.isZero())return t.toString();var a=n.toString().padStart(this.data.fractionalDigits,"0").replace(/0+$/,"");return"".concat(t.toString(),".").concat(a)}},{key:"toFloatApproximation",value:function(){var e=Number(this.toString());if(Number.isNaN(e))throw new Error("Conversion to number failed");return e}},{key:"plus",value:function(t){if(this.fractionalDigits!==t.fractionalDigits)throw new Error("Fractional digits do not match");return new e(this.data.atomics.add(new i.default(t.atomics)).toString(),this.fractionalDigits)}},{key:"minus",value:function(t){if(this.fractionalDigits!==t.fractionalDigits)throw new Error("Fractional digits do not match");var n=this.data.atomics.sub(new i.default(t.atomics));if(n.ltn(0))throw new Error("Difference must not be negative");return new e(n.toString(),this.fractionalDigits)}},{key:"multiply",value:function(t){return new e(this.data.atomics.mul(new i.default(t.toString())).toString(),this.fractionalDigits)}},{key:"equals",value:function(t){return 0===e.compare(this,t)}},{key:"isLessThan",value:function(t){return e.compare(this,t)<0}},{key:"isLessThanOrEqual",value:function(t){return e.compare(this,t)<=0}},{key:"isGreaterThan",value:function(t){return e.compare(this,t)>0}},{key:"isGreaterThanOrEqual",value:function(t){return e.compare(this,t)>=0}}],[{key:"fromUserInput",value:function(t,n){e.verifyFractionalDigits(n);var a,o,r=t.match(/[^0-9.]/);if(r)throw new Error("Invalid character at position ".concat(r.index+1));if(""===t)a="0",o="";else if(-1===t.search(/\./))a=t,o="";else{var i=t.split(".");switch(i.length){case 0:case 1:throw new Error("Fewer than two elements in split result. This must not happen here.");case 2:if(!i[1])throw new Error("Fractional part missing");a=i[0],o=i[1].replace(/0+$/,"");break;default:throw new Error("More than one separator found")}}if(o.length>n)throw new Error("Got more fractional digits than supported");return new e("".concat(a).concat(o.padEnd(n,"0")),n)}},{key:"fromAtomics",value:function(t,n){return e.verifyFractionalDigits(n),new e(t,n)}},{key:"zero",value:function(t){return e.verifyFractionalDigits(t),new e("0",t)}},{key:"one",value:function(t){return e.verifyFractionalDigits(t),new e("1"+"0".repeat(t),t)}},{key:"verifyFractionalDigits",value:function(e){if(!Number.isInteger(e))throw new Error("Fractional digits is not an integer");if(e<0)throw new Error("Fractional digits must not be negative");if(e>100)throw new Error("Fractional digits must not exceed ".concat(100))}},{key:"compare",value:function(e,t){if(e.fractionalDigits!==t.fractionalDigits)throw new Error("Fractional digits do not match");return e.data.atomics.cmp(new i.default(t.atomics))}}]),e}();t.Decimal=s},56548:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64=t.Uint53=t.Uint32=t.Int53=t.Decimal=void 0;var a=n(127);Object.defineProperty(t,"Decimal",{enumerable:!0,get:function(){return a.Decimal}});var o=n(61173);Object.defineProperty(t,"Int53",{enumerable:!0,get:function(){return o.Int53}}),Object.defineProperty(t,"Uint32",{enumerable:!0,get:function(){return o.Uint32}}),Object.defineProperty(t,"Uint53",{enumerable:!0,get:function(){return o.Uint53}}),Object.defineProperty(t,"Uint64",{enumerable:!0,get:function(){return o.Uint64}})},61173:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64=t.Uint53=t.Int53=t.Uint32=void 0;var i=r(n(43811)),s=new i.default("18446744073709551615",10,"be"),c=function(){function e(t){if(a(this,e),Number.isNaN(t))throw new Error("Input is not a number");if(!Number.isInteger(t))throw new Error("Input is not an integer");if(t<0||t>4294967295)throw new Error("Input not in uint32 range: "+t.toString());this.data=t}return o(e,[{key:"toBytesBigEndian",value:function(){return new Uint8Array([255&Math.floor(this.data/Math.pow(2,24)),255&Math.floor(this.data/Math.pow(2,16)),255&Math.floor(this.data/Math.pow(2,8)),255&Math.floor(this.data/Math.pow(2,0))])}},{key:"toBytesLittleEndian",value:function(){return new Uint8Array([255&Math.floor(this.data/Math.pow(2,0)),255&Math.floor(this.data/Math.pow(2,8)),255&Math.floor(this.data/Math.pow(2,16)),255&Math.floor(this.data/Math.pow(2,24))])}},{key:"toNumber",value:function(){return this.data}},{key:"toBigInt",value:function(){return BigInt(this.toNumber())}},{key:"toString",value:function(){return this.data.toString()}}],[{key:"fromBigEndianBytes",value:function(t){return e.fromBytes(t)}},{key:"fromBytes",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(4!==t.length)throw new Error("Invalid input length. Expected 4 bytes.");for(var a=0;a255||t[a]<0)throw new Error("Invalid value in byte. Found: "+t[a]);var o="be"===n?t:Array.from(t).reverse();return new e(o[0]*Math.pow(2,24)+o[1]*Math.pow(2,16)+o[2]*Math.pow(2,8)+o[3])}},{key:"fromString",value:function(t){if(!t.match(/^[0-9]+$/))throw new Error("Invalid string format");return new e(Number.parseInt(t,10))}}]),e}();t.Uint32=c;var u=function(){function e(t){if(a(this,e),Number.isNaN(t))throw new Error("Input is not a number");if(!Number.isInteger(t))throw new Error("Input is not an integer");if(tNumber.MAX_SAFE_INTEGER)throw new Error("Input not in int53 range: "+t.toString());this.data=t}return o(e,[{key:"toNumber",value:function(){return this.data}},{key:"toBigInt",value:function(){return BigInt(this.toNumber())}},{key:"toString",value:function(){return this.data.toString()}}],[{key:"fromString",value:function(t){if(!t.match(/^-?[0-9]+$/))throw new Error("Invalid string format");return new e(Number.parseInt(t,10))}}]),e}();t.Int53=u;var d=function(){function e(t){a(this,e);var n=new u(t);if(n.toNumber()<0)throw new Error("Input is negative");this.data=n}return o(e,[{key:"toNumber",value:function(){return this.data.toNumber()}},{key:"toBigInt",value:function(){return BigInt(this.toNumber())}},{key:"toString",value:function(){return this.data.toString()}}],[{key:"fromString",value:function(t){return new e(u.fromString(t).toNumber())}}]),e}();t.Uint53=d;var l=function(){function e(t){if(a(this,e),t.isNeg())throw new Error("Input is negative");if(t.gt(s))throw new Error("Input exceeds uint64 range");this.data=t}return o(e,[{key:"toBytesBigEndian",value:function(){return Uint8Array.from(this.data.toArray("be",8))}},{key:"toBytesLittleEndian",value:function(){return Uint8Array.from(this.data.toArray("le",8))}},{key:"toString",value:function(){return this.data.toString(10)}},{key:"toBigInt",value:function(){return BigInt(this.toString())}},{key:"toNumber",value:function(){return this.data.toNumber()}}],[{key:"fromBytesBigEndian",value:function(t){return e.fromBytes(t)}},{key:"fromBytes",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(8!==t.length)throw new Error("Invalid input length. Expected 8 bytes.");for(var a=0;a255||t[a]<0)throw new Error("Invalid value in byte. Found: "+t[a]);var o="be"===n?Array.from(t):Array.from(t).reverse();return new e(new i.default(o))}},{key:"fromString",value:function(t){if(!t.match(/^[0-9]+$/))throw new Error("Invalid string format");return new e(new i.default(t,10,"be"))}},{key:"fromNumber",value:function(t){if(Number.isNaN(t))throw new Error("Input is not a number");if(!Number.isInteger(t))throw new Error("Input is not an integer");var n;try{n=new i.default(t)}catch(a){throw new Error("Input is not a safe integer")}return new e(n)}}]),e}();t.Uint64=l},75147:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseCoins=void 0,t.parseCoins=function(e){return e.replace(/\s/g,"").split(",").filter(Boolean).map((function(e){var t=e.match(/^([0-9]+)([a-zA-Z][a-zA-Z0-9/]{2,127})$/);if(!t)throw new Error("Got an invalid coin string");return{amount:t[1].replace(/^0+/,"")||"0",denom:t[2]}}))}},15294:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeTxRaw=void 0;var a=n(26995);t.decodeTxRaw=function(e){var t=a.TxRaw.decode(e);return{authInfo:a.AuthInfo.decode(t.authInfoBytes),body:a.TxBody.decode(t.bodyBytes),signatures:t.signatures}}},71831:function(e,t,n){"use strict";var a=n(42122).default,o=n(861).default,r=n(17061).default,i=n(17156).default,s=n(56690).default,c=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.DirectSecp256k1HdWallet=t.extractKdfConfiguration=void 0;var u=n(15459),d=n(81351),l=n(48555),f=n(60099),p=n(31168),b=n(52516),m="directsecp256k1hdwallet-v1",h={algorithm:"argon2id",params:{outputLength:32,opsLimit:24,memLimitKib:12288}};t.extractKdfConfiguration=function(e){var t=JSON.parse(e);if(!(0,f.isNonNullObject)(t))throw new Error("Root document is not an object.");if(t.type===m)return t.kdf;throw new Error("Unsupported serialization type")};var g={bip39Password:"",hdPaths:[(0,u.makeCosmoshubPath)(0)],prefix:"cosmos"},y=function(){function e(t,n){var a,o;s(this,e);var r=null!==(a=n.prefix)&&void 0!==a?a:g.prefix,i=null!==(o=n.hdPaths)&&void 0!==o?o:g.hdPaths;this.secret=t,this.seed=n.seed,this.accounts=i.map((function(e){return{hdPath:e,prefix:r}}))}return c(e,[{key:"mnemonic",get:function(){return this.secret.toString()}},{key:"getAccounts",value:function(){var e=i(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccountsWithPrivkeys();case 2:return t=e.sent,e.abrupt("return",t.map((function(e){return{algo:e.algo,pubkey:e.pubkey,address:e.address}})));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"signDirect",value:function(){var e=i(r().mark((function e(t,n){var a,i,s,c,l,f,b,m,h;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccountsWithPrivkeys();case 2:if(a=e.sent,void 0!==(i=a.find((function(e){return e.address===t})))){e.next=6;break}throw new Error("Address ".concat(t," not found in wallet"));case 6:return s=i.privkey,c=i.pubkey,l=(0,p.makeSignBytes)(n),f=(0,d.sha256)(l),e.next=11,d.Secp256k1.createSignature(f,s);case 11:return b=e.sent,m=new Uint8Array([].concat(o(b.r(32)),o(b.s(32)))),h=(0,u.encodeSecp256k1Signature)(c,m),e.abrupt("return",{signed:n,signature:h});case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"serialize",value:function(){var e=i(r().mark((function e(t){var n,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=h,e.next=3,(0,b.executeKdf)(t,n);case 3:return a=e.sent,e.abrupt("return",this.serializeWithEncryptionKey(a,n));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"serializeWithEncryptionKey",value:function(){var e=i(r().mark((function e(t,n){var a,o,i,s,c;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={mnemonic:this.mnemonic,accounts:this.accounts.map((function(e){var t=e.hdPath,n=e.prefix;return{hdPath:(0,d.pathToString)(t),prefix:n}}))},o=(0,l.toUtf8)(JSON.stringify(a)),i={algorithm:b.supportedAlgorithms.xchacha20poly1305Ietf},e.next=5,(0,b.encrypt)(o,t,i);case 5:return s=e.sent,c={type:m,kdf:n,encryption:i,data:(0,l.toBase64)(s)},e.abrupt("return",JSON.stringify(c));case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getKeyPair",value:function(){var e=i(r().mark((function e(t){var n,a,o,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.Slip10.derivePath(d.Slip10Curve.Secp256k1,this.seed,t),a=n.privkey,e.next=3,d.Secp256k1.makeKeypair(a);case 3:return o=e.sent,i=o.pubkey,e.abrupt("return",{privkey:a,pubkey:d.Secp256k1.compressPubkey(i)});case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getAccountsWithPrivkeys",value:function(){var e=i(r().mark((function e(){var t=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(this.accounts.map(function(){var e=i(r().mark((function e(n){var a,o,i,s,c,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.hdPath,o=n.prefix,e.next=3,t.getKeyPair(a);case 3:return i=e.sent,s=i.privkey,c=i.pubkey,d=(0,l.toBech32)(o,(0,u.rawSecp256k1PubkeyToRawAddress)(c)),e.abrupt("return",{algo:"secp256k1",privkey:s,pubkey:c,address:d});case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}],[{key:"fromMnemonic",value:function(){var t=i(r().mark((function t(n){var o,i,s,c=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=c.length>1&&void 0!==c[1]?c[1]:{},i=new d.EnglishMnemonic(n),t.next=4,d.Bip39.mnemonicToSeed(i,o.bip39Password);case 4:return s=t.sent,t.abrupt("return",new e(i,a(a({},o),{},{seed:s})));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"generate",value:function(){var t=i(r().mark((function t(){var n,a,o,i,s,c=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=c.length>0&&void 0!==c[0]?c[0]:12,a=c.length>1&&void 0!==c[1]?c[1]:{},o=4*Math.floor(11*n/33),i=d.Random.getBytes(o),s=d.Bip39.encode(i),t.abrupt("return",e.fromMnemonic(s.toString(),a));case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"deserialize",value:function(){var t=i(r().mark((function t(n,a){var o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=JSON.parse(n),(0,f.isNonNullObject)(o)){t.next=3;break}throw new Error("Root document is not an object.");case 3:t.t0=o.type,t.next=t.t0===m?6:7;break;case 6:return t.abrupt("return",e.deserializeTypeV1(n,a));case 7:throw new Error("Unsupported serialization type");case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"deserializeWithEncryptionKey",value:function(){var t=i(r().mark((function t(n,a){var o,i,s,c,u,p,h,g;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=JSON.parse(n),(0,f.isNonNullObject)(o)){t.next=3;break}throw new Error("Root document is not an object.");case 3:i=o,t.t0=i.type,t.next=t.t0===m?7:22;break;case 7:return t.next=9,(0,b.decrypt)((0,l.fromBase64)(i.data),a,i.encryption);case 9:if(s=t.sent,c=JSON.parse((0,l.fromUtf8)(s)),u=c.mnemonic,p=c.accounts,(0,f.assert)("string"===typeof u),Array.isArray(p)){t.next=15;break}throw new Error("Property 'accounts' is not an array");case 15:if(p.every((function(e){return t=e,!!(0,f.isNonNullObject)(t)&&"string"===typeof t.hdPath&&"string"===typeof t.prefix;var t}))){t.next=17;break}throw new Error("Account is not in the correct format.");case 17:if(h=p[0].prefix,p.every((function(e){return e.prefix===h}))){t.next=20;break}throw new Error("Accounts do not all have the same prefix");case 20:return g=p.map((function(e){var t=e.hdPath;return(0,d.stringToPath)(t)})),t.abrupt("return",e.fromMnemonic(u,{hdPaths:g,prefix:h}));case 22:throw new Error("Unsupported serialization type");case 23:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"deserializeTypeV1",value:function(){var t=i(r().mark((function t(n,a){var o,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=JSON.parse(n),(0,f.isNonNullObject)(o)){t.next=3;break}throw new Error("Root document is not an object.");case 3:return t.next=5,(0,b.executeKdf)(a,o.kdf);case 5:return i=t.sent,t.abrupt("return",e.deserializeWithEncryptionKey(n,i));case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}]),e}();t.DirectSecp256k1HdWallet=y},50850:function(e,t,n){"use strict";var a=n(861).default,o=n(17061).default,r=n(17156).default,i=n(56690).default,s=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.DirectSecp256k1Wallet=void 0;var c=n(15459),u=n(81351),d=n(48555),l=n(31168),f=function(){function e(t,n,a){i(this,e),this.privkey=t,this.pubkey=n,this.prefix=a}return s(e,[{key:"address",get:function(){return(0,d.toBech32)(this.prefix,(0,c.rawSecp256k1PubkeyToRawAddress)(this.pubkey))}},{key:"getAccounts",value:function(){var e=r(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",[{algo:"secp256k1",address:this.address,pubkey:this.pubkey}]);case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"signDirect",value:function(){var e=r(o().mark((function e(t,n){var r,i,s,d,f;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,l.makeSignBytes)(n),t===this.address){e.next=3;break}throw new Error("Address ".concat(t," not found in wallet"));case 3:return i=(0,u.sha256)(r),e.next=6,u.Secp256k1.createSignature(i,this.privkey);case 6:return s=e.sent,d=new Uint8Array([].concat(a(s.r(32)),a(s.s(32)))),f=(0,c.encodeSecp256k1Signature)(this.pubkey,d),e.abrupt("return",{signed:n,signature:f});case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}],[{key:"fromKey",value:function(){var t=r(o().mark((function t(n){var a,r,i=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=i.length>1&&void 0!==i[1]?i[1]:"cosmos",t.next=3,u.Secp256k1.makeKeypair(n);case 3:return r=t.sent.pubkey,t.abrupt("return",new e(n,u.Secp256k1.compressPubkey(r),a));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),e}();t.DirectSecp256k1Wallet=f},15879:function(e,t,n){"use strict";var a=n(75147);var o=n(15294);var r=n(71831);var i=n(50850);var s=n(50306);var c=n(72371);var u=n(24273);var d=n(8809);var l=n(31168);var f=n(52516);var p=n(15459)},50306:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeCosmoshubPath=void 0;var a=n(81351);t.makeCosmoshubPath=function(e){return[a.Slip10RawIndex.hardened(44),a.Slip10RawIndex.hardened(118),a.Slip10RawIndex.hardened(0),a.Slip10RawIndex.normal(0),a.Slip10RawIndex.normal(e)]}},72371:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodePubkey=t.anyToSinglePubkey=t.encodePubkey=void 0;var a=n(15459),o=n(48555),r=n(56548),i=n(45753),s=n(56859),c=n(91323),u=n(90605);function d(e){switch(e.typeUrl){case"/cosmos.crypto.secp256k1.PubKey":var t=c.PubKey.decode(e.value).key;return(0,a.encodeSecp256k1Pubkey)(t);case"/cosmos.crypto.ed25519.PubKey":var n=i.PubKey.decode(e.value).key;return(0,a.encodeEd25519Pubkey)(n);default:throw new Error("Pubkey type_url ".concat(e.typeUrl," not recognized as single public key type"))}}t.encodePubkey=function e(t){if((0,a.isSecp256k1Pubkey)(t)){var n=c.PubKey.fromPartial({key:(0,o.fromBase64)(t.value)});return u.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:Uint8Array.from(c.PubKey.encode(n).finish())})}if((0,a.isEd25519Pubkey)(t)){var d=i.PubKey.fromPartial({key:(0,o.fromBase64)(t.value)});return u.Any.fromPartial({typeUrl:"/cosmos.crypto.ed25519.PubKey",value:Uint8Array.from(i.PubKey.encode(d).finish())})}if((0,a.isMultisigThresholdPubkey)(t)){var l=s.LegacyAminoPubKey.fromPartial({threshold:r.Uint53.fromString(t.value.threshold).toNumber(),publicKeys:t.value.pubkeys.map(e)});return u.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:Uint8Array.from(s.LegacyAminoPubKey.encode(l).finish())})}throw new Error("Pubkey type ".concat(t.type," not recognized"))},t.anyToSinglePubkey=d,t.decodePubkey=function(e){switch(e.typeUrl){case"/cosmos.crypto.secp256k1.PubKey":case"/cosmos.crypto.ed25519.PubKey":return d(e);case"/cosmos.crypto.multisig.LegacyAminoPubKey":var t=s.LegacyAminoPubKey.decode(e.value),n=t.threshold,a=t.publicKeys;return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:n.toString(),pubkeys:a.map(d)}};default:throw new Error("Pubkey type_url ".concat(e.typeUrl," not recognized"))}}},24273:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(27424).default,r=n(42122).default,i=n(861).default,s=n(56690).default,c=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Registry=t.isTxBodyEncodeObject=t.isPbjsGeneratedType=t.isTsProtoGeneratedType=void 0;var u=n(38516),d=n(88298),l=n(26995),f=n(90605);function p(e){return"function"===typeof e.fromPartial}t.isTsProtoGeneratedType=p,t.isPbjsGeneratedType=function(e){return!p(e)};var b="/cosmos.base.v1beta1.Coin",m="/cosmos.bank.v1beta1.MsgSend",h="/cosmos.tx.v1beta1.TxBody";function g(e){return"/cosmos.tx.v1beta1.TxBody"===e.typeUrl}t.isTxBodyEncodeObject=g;var y=function(){function e(t){s(this,e);var n=b,a=m;this.types=t?new Map(i(t)):new Map([[n,d.Coin],[a,u.MsgSend]])}return c(e,[{key:"register",value:function(e,t){this.types.set(e,t)}},{key:"lookupType",value:function(e){return this.types.get(e)}},{key:"lookupTypeWithError",value:function(e){var t=this.lookupType(e);if(!t)throw new Error("Unregistered type url: ".concat(e));return t}},{key:"encode",value:function(e){var t=e.value,n=e.typeUrl;if(g(e))return this.encodeTxBody(t);var a=this.lookupTypeWithError(n),o=p(a)?a.fromPartial(t):a.create(t);return a.encode(o).finish()}},{key:"encodeAsAny",value:function(e){var t=this.encode(e);return f.Any.fromPartial({typeUrl:e.typeUrl,value:t})}},{key:"encodeTxBody",value:function(e){var t=this,n=e.messages.map((function(e){return t.encodeAsAny(e)})),a=l.TxBody.fromPartial(r(r({},e),{},{messages:n}));return l.TxBody.encode(a).finish()}},{key:"decode",value:function(e){var t=e.typeUrl,n=e.value;if(t===h)return this.decodeTxBody(n);var r=this.lookupTypeWithError(t).decode(n);return Object.entries(r).forEach((function(e){var t=o(e,2),n=t[0],i=t[1];"undefined"!==typeof a&&"undefined"!==typeof a.isBuffer&&a.isBuffer(i)&&(r[n]=Uint8Array.from(i))})),r}},{key:"decodeTxBody",value:function(e){var t=this,n=l.TxBody.decode(e);return r(r({},n),{},{messages:n.messages.map((function(e){var n=e.typeUrl,a=e.value;if(!n)throw new Error("Missing type_url in Any");if(!a)throw new Error("Missing value in Any");return t.decode({typeUrl:n,value:a})}))})}}]),e}();t.Registry=y},8809:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isOfflineDirectSigner=void 0,t.isOfflineDirectSigner=function(e){return void 0!==e.signDirect}},31168:function(e,t,n){"use strict";var a=n(861).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.makeSignBytes=t.makeSignDoc=t.makeAuthInfoBytes=void 0;var r=n(60099),i=n(74015),s=n(26995),c=o(n(29600));function u(e,t){return e.map((function(e){var n=e.pubkey,a=e.sequence;return{publicKey:n,modeInfo:{single:{mode:t}},sequence:c.default.fromNumber(a)}}))}t.makeAuthInfoBytes=function(e,t,n,o,d){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:i.SignMode.SIGN_MODE_DIRECT;(0,r.assert)(void 0===o||"string"===typeof o,"feeGranter must be undefined or string"),(0,r.assert)(void 0===d||"string"===typeof d,"feePayer must be undefined or string");var f=s.AuthInfo.fromPartial({signerInfos:u(e,l),fee:{amount:a(t),gasLimit:c.default.fromNumber(n),granter:o,payer:d}});return s.AuthInfo.encode(f).finish()},t.makeSignDoc=function(e,t,n,a){return{bodyBytes:e,authInfoBytes:t,chainId:n,accountNumber:c.default.fromNumber(a)}},t.makeSignBytes=function(e){var t=e.accountNumber,n=e.authInfoBytes,a=e.bodyBytes,o=e.chainId,r=s.SignDoc.fromPartial({accountNumber:t,authInfoBytes:n,bodyBytes:a,chainId:o});return s.SignDoc.encode(r).finish()}},52516:function(e,t,n){"use strict";var a=n(861).default,o=n(17061).default,r=n(17156).default;Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=t.supportedAlgorithms=t.executeKdf=t.cosmjsSalt=void 0;var i=n(81351),s=n(48555);function c(){return(c=r(o().mark((function e(n,a){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=a.algorithm,e.next="argon2id"===e.t0?3:7;break;case 3:if(r=a.params,(0,i.isArgon2idOptions)(r)){e.next=6;break}throw new Error("Invalid format of argon2id params");case 6:return e.abrupt("return",i.Argon2id.execute(n,t.cosmjsSalt,r));case 7:throw new Error("Unsupported KDF algorithm");case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(){return(u=r(o().mark((function e(n,r,s){var c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=s.algorithm,e.next=e.t0===t.supportedAlgorithms.xchacha20poly1305Ietf?3:14;break;case 3:return c=i.Random.getBytes(i.xchacha20NonceLength),e.t1=Uint8Array,e.t2=[],e.t3=a(c),e.t4=a,e.next=10,i.Xchacha20poly1305Ietf.encrypt(n,r,c);case 10:return e.t5=e.sent,e.t6=(0,e.t4)(e.t5),e.t7=e.t2.concat.call(e.t2,e.t3,e.t6),e.abrupt("return",new e.t1(e.t7));case 14:throw new Error("Unsupported encryption algorithm: '".concat(s.algorithm,"'"));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(){return(d=r(o().mark((function e(n,a,r){var s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=r.algorithm,e.next=e.t0===t.supportedAlgorithms.xchacha20poly1305Ietf?3:5;break;case 3:return s=n.slice(0,i.xchacha20NonceLength),e.abrupt("return",i.Xchacha20poly1305Ietf.decrypt(n.slice(i.xchacha20NonceLength),a,s));case 5:throw new Error("Unsupported encryption algorithm: '".concat(r.algorithm,"'"));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.cosmjsSalt=(0,s.toAscii)("The CosmJS salt."),t.executeKdf=function(e,t){return c.apply(this,arguments)},t.supportedAlgorithms={xchacha20poly1305Ietf:"xchacha20poly1305-ietf"},t.encrypt=function(e,t,n){return u.apply(this,arguments)},t.decrypt=function(e,t,n){return d.apply(this,arguments)}},2602:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayContentStartsWith=t.arrayContentEquals=void 0,t.arrayContentEquals=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n53?null:e.toNumber()}},{key:"createdAt",get:function(){return this.programVersion.createdAt.toNumber()}},{key:"maxfundingDuration",get:function(){return this.programVersion.maxFundingDuration}},{key:"number",get:function(){return this.programVersion.dealNumber}},{key:"performanceFee",get:function(){return new x.Fraction(this.programVersion.performanceFeePercentage.numerator,this.programVersion.performanceFeePercentage.denominator)}},{key:"lateFeesRepaid",get:function(){return(0,w.toTokenAmount)(this.programVersion.lateFeesRepaid.toNumber(),6)}},{key:"fixedLateFeePercentage",get:function(){return new x.Fraction(this.programVersion.fixedLateFeePercentage.numerator,this.programVersion.fixedLateFeePercentage.denominator)}},{key:"variableLateFeePercentage",get:function(){return new x.Fraction(this.programVersion.variableLateFeePercentage.numerator,this.programVersion.variableLateFeePercentage.denominator)}},{key:"serviceFeePercentage",get:function(){return new x.Fraction(this.programVersion.serviceFeePercentage.numerator,this.programVersion.serviceFeePercentage.denominator)}},{key:"gracePeriod",get:function(){return this.programVersion.gracePeriod}},{key:"serviceFees",get:function(){return(0,w.toTokenAmount)(this.programVersion.serviceFees.toNumber(),6)}},{key:"yearLatestServiceFeesCharged",get:function(){return this.programVersion.yearLatestServiceFeesCharged}},{key:"fixedLateFees",get:function(){return(0,w.toTokenAmount)(this.programVersion.fixedLateFees.toNumber(),6)}},{key:"serviceFeesRepaid",get:function(){return(0,w.toTokenAmount)(this.programVersion.serviceFeesRepaid.toNumber(),6)}},{key:"migrated",get:function(){return this.programVersion.migrated}},{key:"openedAt",get:function(){var e=this.programVersion.openedAt;return e.bitLength()>53?null:e.toNumber()}},{key:"serviceFeesDueAt",value:function(e){var t=(this.yearLatestServiceFeesCharged-1)*e.daysInYear+30;return this.goLiveAt&&this.goLiveAt+t*y.SECONDS_IN_DAY}},{key:"updateBuilder",value:function(e,t){var n=I.MarketAdmins.generatePDA(this.market,this.program.programId),a=i(n,1)[0];return this.anchorProgram.methods.updateDeal(e.serviceFeePercentage.toIDLFraction(),new f.BN(e.serviceFees),new f.BN(e.serviceFeesRepaid),e.yearLatestServiceFeesCharged,e.performanceFeePercentage?e.performanceFeePercentage.toIDLFraction():null,e.openedAt?new f.BN(e.openedAt):null).accounts({owner:t||this.client.provider.wallet.publicKey,deal:this.address,globalMarketState:this.market.address,marketAdmins:a})}},{key:"update",value:function(e){return this.updateBuilder(e).rpc()}},{key:"updateIx",value:function(e,t){return this.updateBuilder(e,t).instruction()}},{key:"baseTokenAccount",value:function(){var e=(0,v.encodeSeedString)("deal-token-account"),t=[this.market.address.toBuffer(),this.address.toBuffer(),e];return b.PublicKey.findProgramAddress(t,this.market.programId)}},{key:"tokenAccountBalance",value:function(){return u(this,void 0,void 0,r().mark((function e(){var t,n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.baseTokenAccount();case 2:return t=e.sent,e.prev=3,e.next=6,this.program.provider.connection.getTokenAccountBalance(t[0]);case 6:return n=e.sent,e.abrupt("return",n.value);case 10:return e.prev=10,e.t0=e.catch(3),e.abrupt("return",(0,w.toTokenAmount)(0,6));case 13:case"end":return e.stop()}}),e,this,[[3,10]])})))}},{key:"setRepaymentSchedule",value:function(e){return u(this,void 0,void 0,r().mark((function t(){var n,a,o,s,c,u,d,l,p;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.periods,t.next=3,T.RepaymentSchedule.generatePDA(this);case 3:a=t.sent,o=i(a,1),s=o[0],c=function(e,t){return e>t?t:e},u=[],d=0;case 9:if(!(d0&&c.push({deal:f,tranches:b});case 55:l++,t.next=13;break;case 58:return t.next=60,this.getUserStake(e);case 60:return E=t.sent,t.abrupt("return",{dealsInvested:c,poolValue:E});case 62:case"end":return t.stop()}}),t,this,[[20,48,51,54]])})))}},{key:"averageTenorInDays",value:function(){return u(this,void 0,void 0,r().mark((function e(){var t,n,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetchDeals(M.DealStatus.IN_PROGRESS);case 2:if(0!==(t=e.sent).length){e.next=5;break}return e.abrupt("return",0);case 5:return e.next=7,this.client.repaymentScheduleLoader.fetchForDeals(t);case 7:return n=e.sent,a=n.filter((function(e){return!(0,w.isNil)(e)})).reduce((function(e,t){var n=t.duration;return e.add(n)}),(0,v.default)(0)),e.abrupt("return",a.div(t.length).toNumber());case 10:case"end":return e.stop()}}),e,this)})))}},{key:"initSecondaryMarketBuilder",value:function(e){var t=U.MarketAdmins.generatePDA(this,this.programId),n=i(t,1)[0],a=B.SecondaryMarket.generatePDA(this),o=i(a,1)[0];return this.anchorSecondaryMarketProgram.methods.initializeSecondaryMarket().accounts({owner:e||this.client.provider.wallet.publicKey,globalMarketState:this.address,marketAdmins:n,secondaryMarket:o})}},{key:"initSecondaryMarketIx",value:function(e){return this.initSecondaryMarketBuilder(e).instruction()}},{key:"initSecondaryMarket",value:function(){return this.initSecondaryMarketBuilder().rpc()}},{key:"fetchSecondaryMarket",value:function(){return u(this,void 0,void 0,r().mark((function e(){var t,n,a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=B.SecondaryMarket.generatePDA(this),n=i(t,1),a=n[0],e.next=3,this.secondaryMarketProgram.account.secondaryMarket.fetchNullable(a);case 3:if(o=e.sent){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",new B.SecondaryMarket(o,this,a,this.secondaryMarketProgram,this.client));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"addCrossChainInvestorBuilder",value:function(e,t,n){var a=R.CrossChainInvestor.generatePDA(e,this),o=i(a,1)[0],r=(0,T.findRedeemerAuthorityPDA)(this.programId),s=i(r,1)[0];return this.anchorProgram.methods.addCrossChainInvestor(e,t).accounts({owner:n||this.client.provider.wallet.publicKey,redeemerAuthority:s,globalMarketState:this.address,baseTokenMint:this.baseMintPK,baseTokenAccount:(0,g.getAssociatedTokenAddressSync)(this.baseMintPK,s,!0),lpTokenAccount:(0,g.getAssociatedTokenAddressSync)(this.lpMintPK,s,!0),lpTokenMint:this.lpMintPK,crossChainInvestor:o})}},{key:"addCrossChainInvestorIx",value:function(e,t,n){return this.addCrossChainInvestorBuilder(e,t,n).instruction()}},{key:"addCrossChainInvestor",value:function(e,t){return this.addCrossChainInvestorBuilder(e,t).rpc()}},{key:"addCrossChainInvestorEth",value:function(e){return u(this,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,l.tryNativeToUint8Array)(e,"ethereum"),a=new y.PublicKey(n),t.next=4,this.addCrossChainInvestor(a,2);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"fetchCrossChainInvestor",value:function(e){return u(this,void 0,void 0,r().mark((function t(){var n,a,o,s;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=R.CrossChainInvestor.generatePDA(e,this),a=i(n,1),o=a[0],t.next=3,this.program.account.crossChainInvestor.fetchNullable(o);case 3:if(s=t.sent){t.next=6;break}return t.abrupt("return",null);case 6:return t.abrupt("return",new R.CrossChainInvestor(s,o,this));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getCrossChainInvestorAddress",value:function(e){var t=e.ethereumInvestorAddress,n=(0,l.tryNativeToUint8Array)(t,"ethereum");return new y.PublicKey(n)}},{key:"depositFromRemote",value:function(e){var t=e.investorAddress,n=e.vaaBytes,s=e.wormholeSolanaContract,c=e.wallet;return u(this,void 0,void 0,r().mark((function e(){var d,b,m,h,v,w,k,A,x,I,S,C,E,M,P,U,_,B,D,N,O,F,L,j,H,G,z,K,W,Z=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d=a.from(n,"base64"),e.next=3,(0,l.postVaaSolana)(this.client.provider.connection,(function(e){return u(Z,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.partialSign(c.payer),t.abrupt("return",e);case 2:case"end":return t.stop()}}),t)})))}),s.core,c.publicKey,d);case 3:b=e.sent,m=o(b),e.prev=5,m.s();case 7:if((h=m.n()).done){e.next=13;break}return v=h.value,e.next=11,this.client.provider.connection.confirmTransaction(v.signature);case 11:e.next=7;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(5),m.e(e.t0);case 18:return e.prev=18,m.f(),e.finish(18);case 21:return w=(0,T.findRedeemerAuthorityPDA)(this.programId),k=i(w,1),A=k[0],x=(0,f.getCompleteTransferWrappedWithPayloadCpiAccounts)(s.token_bridge,s.core,c.publicKey.toString(),d,(0,g.getAssociatedTokenAddressSync)(this.baseMintPK,A,!0).toString()),I=(0,l.createNonce)().readUInt32LE(0),S=y.Keypair.generate(),C=(0,p.getTransferNativeAccounts)(s.token_bridge,s.core,c.publicKey,S.publicKey,(0,g.getAssociatedTokenAddressSync)(this.lpMintPK,A,!0).toString(),this.lpMintPK),e.t1=y.AddressLookupTableProgram,e.t2=c.publicKey,e.t3=c.publicKey,e.next=31,this.client.provider.connection.getSlot();case 31:return e.t4=e.sent,e.t5=e.t4-1,e.t6={authority:e.t2,payer:e.t3,recentSlot:e.t5},E=e.t1.createLookupTable.call(e.t1,e.t6),M=i(E,2),P=M[0],U=M[1],e.next=40,this.sendTransactionV0(this.client.provider.connection,[P],c.payer);case 40:return _=e.sent,e.next=43,this.waitForFinalizedTransaction(_);case 43:return B=y.AddressLookupTableProgram.extendLookupTable({addresses:[x.tokenBridgeConfig,x.vaa,x.tokenBridgeClaim,x.tokenBridgeForeignEndpoint,C.custody,C.authoritySigner,C.custodySigner,C.wormholeBridge,C.wormholeEmitter,C.wormholeSequence,C.wormholeFeeCollector],authority:c.publicKey,lookupTable:U,payer:c.publicKey}),e.next=46,this.sendTransactionV0(this.client.provider.connection,[B],c.payer);case 46:return D=e.sent,e.next=49,this.waitForFinalizedTransaction(D);case 49:return N=y.ComputeBudgetProgram.setComputeUnitLimit({units:14e5}),O=R.CrossChainInvestor.generatePDA(t,this),F=i(O,1),L=F[0],e.t7=this.anchorProgram.methods.depositFromRemote(I),e.t8=c.publicKey,e.t9=this.address,e.t10=this.lpMintPK,e.t11=this.baseMintPK,e.t12=A,e.t13=(0,g.getAssociatedTokenAddressSync)(this.baseMintPK,A,!0),e.t14=(0,g.getAssociatedTokenAddressSync)(this.lpMintPK,A,!0),e.t15=L,e.next=62,this.findLiquidityPoolTokenAccount();case 62:return e.t16=e.sent,e.t17=x.tokenBridgeMintAuthority,e.t18={payer:e.t8,globalMarketState:e.t9,lpTokenMint:e.t10,baseTokenMint:e.t11,redeemerAuthority:e.t12,baseTokenAccount:e.t13,lpTokenAccount:e.t14,crossChainInvestor:e.t15,liquidityPoolTokenAccount:e.t16,wormholeMintAuthorityWrapped:e.t17},e.next=67,e.t7.accounts.call(e.t7,e.t18).remainingAccounts([{pubkey:x.tokenBridgeConfig,isSigner:!1,isWritable:!1},{pubkey:C.wormholeBridge,isSigner:!1,isWritable:!0},{pubkey:x.vaa,isSigner:!1,isWritable:!1},{pubkey:x.tokenBridgeClaim,isSigner:!1,isWritable:!0},{pubkey:x.tokenBridgeForeignEndpoint,isSigner:!1,isWritable:!1},{pubkey:x.tokenBridgeWrappedMeta,isSigner:!1,isWritable:!1},{pubkey:C.custody,isSigner:!1,isWritable:!0},{pubkey:C.authoritySigner,isSigner:!1,isWritable:!1},{pubkey:C.custodySigner,isSigner:!1,isWritable:!1},{pubkey:C.wormholeMessage,isSigner:!0,isWritable:!0},{pubkey:C.wormholeEmitter,isSigner:!1,isWritable:!1},{pubkey:C.wormholeSequence,isSigner:!1,isWritable:!0},{pubkey:C.wormholeFeeCollector,isSigner:!1,isWritable:!0},{pubkey:new y.PublicKey(s.token_bridge),isSigner:!1,isWritable:!1},{pubkey:new y.PublicKey(s.core),isSigner:!1,isWritable:!1}]).instruction();case 67:return j=e.sent,e.next=70,this.client.provider.connection.getAddressLookupTable(U).then((function(e){return e.value}));case 70:if(H=e.sent){e.next=73;break}throw Error("Look up table not created");case 73:return e.t19=y.TransactionMessage,e.t20=c.publicKey,e.next=77,this.client.provider.connection.getLatestBlockhash();case 77:return e.t21=e.sent.blockhash,e.t22=[N,j],e.t23={payerKey:e.t20,recentBlockhash:e.t21,instructions:e.t22},G=new e.t19(e.t23).compileToV0Message([H]),(z=new y.VersionedTransaction(G)).sign([c.payer,S]),e.next=85,this.client.provider.connection.sendTransaction(z);case 85:return K=e.sent,e.next=88,this.waitForFinalizedTransaction(K);case 88:return e.next=90,this.client.provider.connection.getTransaction(K,{commitment:"confirmed",maxSupportedTransactionVersion:0});case 90:if(null===(W=e.sent)||void 0===W?void 0:W.meta){e.next=93;break}throw Error("Failed to get transaction info");case 93:return e.abrupt("return",W.meta);case 94:case"end":return e.stop()}}),e,this,[[5,15,18,21]])})))}},{key:"withdrawFromRemote",value:function(e){var t=e.investorAddress,n=e.vaaBytes,s=e.wormholeSolanaContract,c=e.wallet;return u(this,void 0,void 0,r().mark((function e(){var d,p,m,h,v,w,k,A,x,I,S,C,E,M,P,U,_,B,D,N,O,F,L,j,H,G,z,K,W,Z,V,q,Q=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d=a.from(n,"base64"),e.next=3,(0,l.postVaaSolana)(this.client.provider.connection,(function(e){return u(Q,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.partialSign(c.payer),t.abrupt("return",e);case 2:case"end":return t.stop()}}),t)})))}),s.core,c.publicKey,d);case 3:p=e.sent,m=o(p),e.prev=5,m.s();case 7:if((h=m.n()).done){e.next=13;break}return v=h.value,e.next=11,this.client.provider.connection.confirmTransaction(v.signature);case 11:e.next=7;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(5),m.e(e.t0);case 18:return e.prev=18,m.f(),e.finish(18);case 21:return w=(0,T.findRedeemerAuthorityPDA)(this.programId),k=i(w,1),A=k[0],x=(0,f.getCompleteTransferNativeWithPayloadCpiAccounts)(s.token_bridge,s.core,c.publicKey.toString(),d,(0,g.getAssociatedTokenAddressSync)(this.lpMintPK,A,!0).toString()),I=(0,l.createNonce)().readUInt32LE(0),S=y.Keypair.generate(),C=y.Keypair.generate(),E=(0,b.getTransferWrappedAccounts)(s.token_bridge,s.core,c.publicKey,C.publicKey,(0,g.getAssociatedTokenAddressSync)(this.baseMintPK,A,!0).toString(),A,2,this.baseMintPK.toBytes()),e.t1=y.AddressLookupTableProgram,e.t2=c.publicKey,e.t3=c.publicKey,e.next=32,this.client.provider.connection.getSlot();case 32:return e.t4=e.sent,e.t5=e.t4-1,e.t6={authority:e.t2,payer:e.t3,recentSlot:e.t5},M=e.t1.createLookupTable.call(e.t1,e.t6),P=i(M,2),U=P[0],_=P[1],e.next=41,this.sendTransactionV0(this.client.provider.connection,[U],c.payer);case 41:return B=e.sent,e.next=44,this.waitForFinalizedTransaction(B);case 44:return D=y.AddressLookupTableProgram.extendLookupTable({addresses:[x.tokenBridgeConfig,x.vaa,x.tokenBridgeClaim,x.tokenBridgeForeignEndpoint,x.tokenBridgeCustody,E.authoritySigner,x.tokenBridgeCustodySigner,E.wormholeBridge,E.wormholeEmitter,E.wormholeSequence,E.wormholeFeeCollector],authority:c.publicKey,lookupTable:_,payer:c.publicKey}),e.next=47,this.sendTransactionV0(this.client.provider.connection,[D],c.payer);case 47:return N=e.sent,e.next=50,this.waitForFinalizedTransaction(N);case 50:return e.next=52,this.client.fetchProgramState();case 52:return O=e.sent,e.next=55,this.findBaseTokenAccount(O.credixMultisigKey);case 55:return F=e.sent,L=R.CrossChainInvestor.generatePDA(t,this),j=i(L,1),H=j[0],e.t7=this.anchorProgram.methods.withdrawFromRemote(I),e.t8=c.publicKey,e.t9=this.address,e.t10=this.lpMintPK,e.t11=this.baseMintPK,e.t12=A,e.t13=(0,g.getAssociatedTokenAddressSync)(this.baseMintPK,A,!0),e.t14=(0,g.getAssociatedTokenAddressSync)(this.lpMintPK,A,!0),e.t15=O.credixMultisigKey,e.t16=O.address,e.t17=F,e.t18=H,e.t19=this.treasury,e.t20=C.publicKey,e.next=73,this.findLiquidityPoolTokenAccount();case 73:return e.t21=e.sent,e.t22={payer:e.t8,globalMarketState:e.t9,lpTokenMint:e.t10,baseTokenMint:e.t11,redeemerAuthority:e.t12,baseTokenAccount:e.t13,lpTokenAccount:e.t14,credixMultisigKey:e.t15,programState:e.t16,credixMultisigTokenAccount:e.t17,crossChainInvestor:e.t18,treasuryPoolTokenAccount:e.t19,wormholeMessageBase:e.t20,liquidityPoolTokenAccount:e.t21},e.next=77,e.t7.accounts.call(e.t7,e.t22).remainingAccounts([{pubkey:x.tokenBridgeConfig,isSigner:!1,isWritable:!1},{pubkey:E.wormholeBridge,isSigner:!1,isWritable:!0},{pubkey:x.vaa,isSigner:!1,isWritable:!1},{pubkey:x.tokenBridgeClaim,isSigner:!1,isWritable:!0},{pubkey:x.tokenBridgeForeignEndpoint,isSigner:!1,isWritable:!1},{pubkey:E.wrappedMeta,isSigner:!1,isWritable:!1},{pubkey:x.tokenBridgeCustody,isSigner:!1,isWritable:!0},{pubkey:E.authoritySigner,isSigner:!1,isWritable:!1},{pubkey:x.tokenBridgeCustodySigner,isSigner:!1,isWritable:!1},{pubkey:E.wormholeMessage,isSigner:!0,isWritable:!0},{pubkey:E.wormholeEmitter,isSigner:!1,isWritable:!1},{pubkey:E.wormholeSequence,isSigner:!1,isWritable:!0},{pubkey:E.wormholeFeeCollector,isSigner:!1,isWritable:!0},{pubkey:new y.PublicKey(s.token_bridge),isSigner:!1,isWritable:!1},{pubkey:new y.PublicKey(s.core),isSigner:!1,isWritable:!1}]).instruction();case 77:return G=e.sent,z=y.ComputeBudgetProgram.setComputeUnitLimit({units:14e5}),e.next=81,this.client.provider.connection.getAddressLookupTable(_).then((function(e){return e.value}));case 81:if(K=e.sent){e.next=84;break}throw Error("Look up table not created");case 84:return e.t23=y.TransactionMessage,e.t24=c.publicKey,e.next=88,this.client.provider.connection.getLatestBlockhash();case 88:return e.t25=e.sent.blockhash,e.t26=[z,G],e.t27={payerKey:e.t24,recentBlockhash:e.t25,instructions:e.t26},W=new e.t23(e.t27).compileToV0Message([K]),(Z=new y.VersionedTransaction(W)).sign([c.payer,C,S]),e.next=96,this.client.provider.connection.sendTransaction(Z);case 96:return V=e.sent,e.next=99,this.waitForFinalizedTransaction(V);case 99:return e.next=101,this.client.provider.connection.getTransaction(V,{commitment:"confirmed",maxSupportedTransactionVersion:0});case 101:if(null===(q=e.sent)||void 0===q?void 0:q.meta){e.next=104;break}throw Error("Failed to get transaction info");case 104:return e.abrupt("return",q.meta);case 105:case"end":return e.stop()}}),e,this,[[5,15,18,21]])})))}},{key:"sendTransactionV0",value:function(e,t,n){return u(this,void 0,void 0,r().mark((function a(){var o,i,s,c;return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,e.getLatestBlockhash().then((function(e){return e.blockhash}));case 2:return o=a.sent,i=new y.TransactionMessage({payerKey:n.publicKey,recentBlockhash:o,instructions:t}).compileToV0Message(),(s=new y.VersionedTransaction(i)).sign([n]),a.next=8,e.sendTransaction(s);case 8:return c=a.sent,a.abrupt("return",c);case 10:case"end":return a.stop()}}),a)})))}},{key:"waitForFinalizedTransaction",value:function(e){return u(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.provider.connection.getLatestBlockhash();case 2:return n=t.sent,t.next=5,this.program.provider.connection.confirmTransaction(Object.assign({signature:e},n),"finalized");case 5:case"end":return t.stop()}}),t,this)})))}}],[{key:"generatePDA",value:function(e,t){var n=(0,T.encodeSeedString)(e);return y.PublicKey.findProgramAddress([n],t)}},{key:"generateLPTokenMintPDA",value:function(t,n){return u(this,void 0,void 0,r().mark((function a(){var o,s,c,u;return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,e.generatePDA(t,n);case 2:return o=a.sent,s=i(o,1),c=s[0],u=[c.toBuffer(),(0,T.encodeSeedString)("lp-token-mint")],a.abrupt("return",y.PublicKey.findProgramAddress(u,n));case 7:case"end":return a.stop()}}),a)})))}}]),e}();t.Market=O},44592:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.MarketAdmins=void 0;var r=n(8594),i=n(32314),s=function(){function e(t,n){a(this,e),this.address=t,this.programVersion=n}return o(e,[{key:"multisig",get:function(){return this.programVersion.multisig}},{key:"managers",get:function(){return this.programVersion.managers}},{key:"passIssuers",get:function(){return this.programVersion.passIssuers}}],[{key:"generatePDA",value:function(e,t){var n=(0,i.encodeSeedString)("admins"),a=[e.address.toBuffer(),n];return r.PublicKey.findProgramAddressSync(a,t)}}]),e}();t.MarketAdmins=s},62494:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ProgramState=void 0;var r=n(8594),i=n(32314),s=n(44381),c=function(){function e(t,n,o,r){a(this,e),this.address=t,this.programVersion=n,this.program=o,this.anchorProgram=o,this.client=r}return o(e,[{key:"programId",get:function(){return this.program.programId}},{key:"credixMultisigKey",get:function(){return this.programVersion.credixMultisigKey}},{key:"credixManagers",get:function(){return this.programVersion.credixManagers}},{key:"credixServiceFee",get:function(){return new s.Fraction(this.programVersion.credixServiceFeePercentage.numerator,this.programVersion.credixServiceFeePercentage.denominator)}},{key:"credixPerformanceFee",get:function(){return new s.Fraction(this.programVersion.credixPerformanceFeePercentage.numerator,this.programVersion.credixPerformanceFeePercentage.denominator)}},{key:"updateBuilder",value:function(e,t){return this.anchorProgram.methods.updateProgramState(e.credixMultisigKey?e.credixMultisigKey:null,e.credixManagers?e.credixManagers:null,e.credixPerformanceFeePercentage?e.credixPerformanceFeePercentage.toIDLFraction():null,e.credixServiceFeePercentage?e.credixServiceFeePercentage.toIDLFraction():null).accounts({owner:t,programState:this.address})}},{key:"update",value:function(e){var t=this.client.provider.wallet.publicKey;return this.updateBuilder(e,t).rpc()}},{key:"updateIx",value:function(e,t){var n=t||this.client.provider.wallet.publicKey;return this.updateBuilder(e,n).instruction()}}],[{key:"generatePDA",value:function(e){var t=[(0,i.encodeSeedString)("program-state")];return r.PublicKey.findProgramAddressSync(t,e)}}]),e}();t.ProgramState=c},83303:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RepaymentPeriod=void 0;var i=r(n(21585)),s=n(50069),c=n(15918),u=function(){function e(t){a(this,e),this.programVersion=t}return o(e,[{key:"principal",get:function(){return(0,c.toTokenAmount)(this.programVersion.principal.toNumber(),6)}},{key:"principalRepaid",get:function(){return(0,c.toTokenAmount)(this.programVersion.principalRepaid.toNumber(),6)}},{key:"principalToRepay",get:function(){return(0,c.toTokenAmount)((0,i.default)(this.principal.amount).sub((0,i.default)(this.principalRepaid.amount)),6)}},{key:"interest",get:function(){return(0,c.toTokenAmount)(this.programVersion.interest.toNumber(),6)}},{key:"interestRepaid",get:function(){return(0,c.toTokenAmount)(this.programVersion.interestRepaid.toNumber(),6)}},{key:"interestToRepay",get:function(){return(0,c.toTokenAmount)((0,i.default)(this.interest.amount).sub((0,i.default)(this.interestRepaid.amount)),6)}},{key:"totalRepaid",get:function(){return(0,c.toTokenAmount)((0,i.default)(this.principalRepaid.amount).add((0,i.default)(this.interestRepaid.amount)),6)}},{key:"totalToRepay",get:function(){return(0,c.toTokenAmount)((0,i.default)(this.principalToRepay.amount).add((0,i.default)(this.interestToRepay.amount)),6)}},{key:"cumulativePrincipal",get:function(){return(0,c.toTokenAmount)((0,i.default)(this.programVersion.totalPrincipalExpected.toNumber()),6)}},{key:"cumulativeInterest",get:function(){return(0,c.toTokenAmount)(this.programVersion.totalInterestExpected.toNumber(),6)}},{key:"cumulative",get:function(){return(0,c.toTokenAmount)((0,i.default)(this.cumulativePrincipal.amount).add((0,i.default)(this.cumulativeInterest.amount)),6)}},{key:"dueAt",value:function(e,t){return new Date(1e3*e+(t+1)*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:30)*s.MILLISECONDS_IN_DAY)}},{key:"isRepaid",value:function(){return this.isPrincipalRepaid()&&this.isInterestRepaid()}},{key:"isPrincipalRepaid",value:function(){return"0"===this.principalToRepay.amount}},{key:"isInterestRepaid",value:function(){return"0"===this.interestToRepay.amount}}]),e}();t.RepaymentPeriod=u},38534:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RepaymentSchedule=void 0;var i=n(8594),s=r(n(21585)),c=n(10686),u=n(50069),d=n(32314),l=n(15918),f=n(83303),p=function(){function e(t,n){a(this,e),this.programVersion=t,this.address=n,this.address=n,this.periods=t.periods.map((function(e){return new f.RepaymentPeriod(e)}))}return o(e,[{key:"totalPeriods",get:function(){return this.programVersion.totalPeriods}},{key:"daysInYear",get:function(){return this.programVersion.daysInYear}},{key:"periodDuration",get:function(){return this.programVersion.periodDuration}},{key:"duration",get:function(){return this.periods.length*this.periodDuration}},{key:"totalPrincipal",get:function(){return this.periods[this.periods.length-1].cumulativePrincipal}},{key:"totalInterest",get:function(){return this.periods[this.periods.length-1].cumulativeInterest}},{key:"activePeriod",get:function(){return this.periods.find((function(e){return!e.isRepaid()}))}},{key:"toRepaymentScheduleConfig",value:function(){return{periods:this.periods.map((function(e){return{principal:Number(e.principal.amount),interest:Number(e.interest.amount)}})),periodDuration:this.periodDuration,daysInYear:this.daysInYear}}},{key:"currentPeriodIndex",value:function(e){if(null===e.goLiveAt)return null;var t=new Date(1e3*e.goLiveAt).getTime(),n=((new Date).getTime()-t)/u.MILLISECONDS_IN_DAY;return Math.floor(n/this.periodDuration)}},{key:"currentPeriod",value:function(e){var t=this.currentPeriodIndex(e);return null===t?null:this.periods[t]}},{key:"currentlyMissing",value:function(e){var t=this.currentPeriodIndex(e);if(null===t)return null;var n=this.periods.filter((function(e,n){return n<=t})).reduce((function(e,t){return e.add(t.totalToRepay.amount)}),(0,s.default)(0));return(0,l.toTokenAmount)(n,6)}},{key:"principalRepaid",value:function(){var e=this.periods.reduce((function(e,t){return e.add(t.principalRepaid.amount)}),(0,s.default)(0));return(0,l.toTokenAmount)(e,6)}},{key:"interestRepaid",value:function(){var e=this.periods.reduce((function(e,t){return e.add(t.interestRepaid.amount)}),(0,s.default)(0));return(0,l.toTokenAmount)(e,6)}},{key:"interestMissing",value:function(){var e=this.periods.reduce((function(e,t){return e.add(t.interestToRepay.amount)}),(0,s.default)(0));return(0,l.toTokenAmount)(e,6)}},{key:"principalMissing",value:function(){var e=this.periods.reduce((function(e,t){return e.add(t.principalToRepay.amount)}),(0,s.default)(0));return(0,l.toTokenAmount)(e,6)}},{key:"isRepaid",value:function(){return this.periods.every((function(e){return e.isRepaid()}))}},{key:"calculateFinancingFee",value:function(){var e=this.toRepaymentScheduleConfig();return(0,c.calculateFinancingFee)(e)}}],[{key:"generatePDA",value:function(e){var t=[e.market.address.toBuffer(),e.address.toBuffer(),(0,d.encodeSeedString)("repayment-schedule")];return i.PublicKey.findProgramAddress(t,e.market.programId)}}]),e}();t.RepaymentSchedule=p},83179:function(e,t,n){"use strict";var a=n(17061).default,o=n(27424).default,r=n(56690).default,i=n(89728).default,s=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SecondaryMarket=void 0;var c=n(74522),u=n(97180),d=n(8594),l=n(14364),f=n(7664),p=n(44592),b=n(62494),m=n(38534),h=n(17741),g=n(83659),y=n(14251),v=function(){function e(t,n,a,o,i){if(r(this,e),!n.address.equals(t.credixMarketPubkey))throw Error("Provided market and secondary market info does not match");this.programVersion=t,this.market=n,this.address=a,this.secondaryMarketProgram=o,this.anchorSecondaryMarketProgram=this.secondaryMarketProgram,this.client=i}return i(e,[{key:"frozen",get:function(){return this.programVersion.frozen}},{key:"programId",get:function(){return this.secondaryMarketProgram.programId}},{key:"generateSigningAuthorityPDA",value:function(){var e=[this.address.toBuffer()];return d.PublicKey.findProgramAddressSync(e,this.market.secondaryMarketProgramId)}},{key:"fetchSellerInfo",value:function(e){return s(this,void 0,void 0,a().mark((function t(){var n,r,i,s;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=h.SellerInfo.generatePDA(e,this),r=o(n,1),i=r[0],t.next=3,this.secondaryMarketProgram.account.sellerInfo.fetchNullable(i);case 3:if(s=t.sent){t.next=6;break}return t.abrupt("return",null);case 6:return t.abrupt("return",new h.SellerInfo(s,this,i,e));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"fetchSellOrder",value:function(e,t){return s(this,void 0,void 0,a().mark((function n(){var r,i,s,c;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=g.SellOrder.generatePDA(e,t,this),i=o(r,1),s=i[0],n.next=3,this.secondaryMarketProgram.account.sellOrder.fetchNullable(s);case 3:if(c=n.sent){n.next=6;break}return n.abrupt("return",null);case 6:return n.abrupt("return",new g.SellOrder(c,this,s,t,this.secondaryMarketProgram,this.client));case 7:case"end":return n.stop()}}),n,this)})))}},{key:"initializeSellOrderBuilder",value:function(e,t){return s(this,void 0,void 0,a().mark((function n(){var r,i,s,d,p,v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B,D,N,O,F,L,j,H,G,z,K,W,Z,V,q;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t||this.client.provider.wallet.publicKey,i=l.CredixPass.generatePDA(r,this.market),s=o(i,1),d=s[0],p=b.ProgramState.generatePDA(this.market.programId),v=o(p,1),w=v[0],k=this.market.generateSigningAuthorityPDA(),A=o(k,1),x=A[0],n.next=6,this.fetchSellerInfo(r);case 6:return I=n.sent,T=g.SellOrder.generatePDA(r,(null===I||void 0===I?void 0:I.numberOfSellOrders)||0,this),S=o(T,1),C=S[0],(E=null===I||void 0===I?void 0:I.address)||(R=h.SellerInfo.generatePDA(r,this),M=o(R,1),E=M[0]),n.next=12,(0,u.getAssociatedTokenAddress)(e.tokenAMint,r,!0);case 12:return P=n.sent,n.next=15,(0,u.getAssociatedTokenAddress)(e.tokenBMint,r,!0);case 15:if(U=n.sent,_=null,B=null,D=null,N=null,O=null,F=null,L=null,!(j=e.deal)){n.next=52;break}return B=j.address,n.next=28,m.RepaymentSchedule.generatePDA(j);case 28:return H=n.sent,G=o(H,1),_=G[0],n.next=33,j.fetchTranches();case 33:if(N=n.sent){n.next=36;break}throw Error("Deal tranches is null for the given deal");case 36:if(O=N.address,z=e.trancheIndex){n.next=40;break}throw Error("Tranche index not found");case 40:return K=N.tranches[z],n.next=43,y.TranchePass.generatePDA(r,K);case 43:return W=n.sent,Z=o(W,1),D=Z[0],n.next=48,f.InvestorTranche.generatePDA(r,K);case 48:V=n.sent,q=o(V,1),F=q[0],L=K.index;case 52:return n.abrupt("return",this.anchorSecondaryMarketProgram.methods.initializeSellOrder(new c.BN(e.tokenAAmount),L,new c.BN(e.tokenBAmount),e.buyer||null).accounts({seller:r,credixPass:d,secondaryMarket:this.address,globalMarketState:this.market.address,credixSigningAuthority:x,credixProgramState:w,sellOrder:C,sellerInfo:E,tokenAMint:e.tokenAMint,tokenBMint:e.tokenBMint,sellerTokenAAccount:P,sellerTokenBAccount:U,repaymentSchedule:_,deal:B,tranchePass:D,dealTranches:O,sellerTranche:F,credixProgram:this.market.programId}));case 53:case"end":return n.stop()}}),n,this)})))}},{key:"initializeSellOrderIx",value:function(e,t){return s(this,void 0,void 0,a().mark((function n(){var o;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.initializeSellOrderBuilder(e,t);case 2:return o=n.sent,n.abrupt("return",o.instruction());case 4:case"end":return n.stop()}}),n,this)})))}},{key:"initializeSellOrder",value:function(e){return s(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.initializeSellOrderBuilder(e);case 2:return n=t.sent,t.abrupt("return",n.rpc());case 4:case"end":return t.stop()}}),t,this)})))}},{key:"freezeThawSecondaryMarketBuilder",value:function(e,t){var n=b.ProgramState.generatePDA(this.market.programId),a=o(n,1)[0],r=p.MarketAdmins.generatePDA(this.market,this.market.programId),i=o(r,1)[0];return this.anchorSecondaryMarketProgram.methods.freezeOrThawSecondaryMarket(e).accounts({owner:t||this.client.provider.wallet.publicKey,credixProgramState:a,globalMarketState:this.market.address,marketAdmins:i,secondaryMarket:this.address})}},{key:"freezeSecondaryMarketIx",value:function(e){return this.freezeThawSecondaryMarketBuilder(!0,e).instruction()}},{key:"freezeSecondaryMarket",value:function(){return this.freezeThawSecondaryMarketBuilder(!0).rpc()}},{key:"thawSecondaryMarketIx",value:function(e){return this.freezeThawSecondaryMarketBuilder(!1,e).instruction()}},{key:"thawSecondaryMarket",value:function(){return this.freezeThawSecondaryMarketBuilder(!1).rpc()}}],[{key:"generatePDA",value:function(e){var t=[e.address.toBuffer()];return d.PublicKey.findProgramAddressSync(t,e.secondaryMarketProgramId)}}]),e}();t.SecondaryMarket=v},83659:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(17061).default,r=n(27424).default,i=n(56690).default,s=n(89728).default,c=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SellOrder=void 0;var u=n(74522),d=n(97180),l=n(8594),f=n(32314),p=n(15918),b=n(14364),m=n(62494),h=n(38534),g=n(14251),y=function(){function e(t,n,a,o,r,s){i(this,e),this.programVersion=t,this.secondaryMarket=n,this.address=a,this.sellOrderIndex=o,this.anchorSecondaryMarketProgram=r,this.client=s}return s(e,[{key:"buyer",get:function(){return this.programVersion.buyer}},{key:"createdAt",get:function(){return this.programVersion.createdAt.toNumber()}},{key:"filledAt",get:function(){var e=this.programVersion.filledAt;return e.bitLength()>53?null:e.toNumber()}},{key:"receiveAmount",get:function(){return(0,p.toTokenAmount)(this.programVersion.receiveAmount.toNumber(),6)}},{key:"sellAmount",get:function(){return(0,p.toTokenAmount)(this.programVersion.sellAmount.toNumber(),6)}},{key:"seller",get:function(){return this.programVersion.seller}},{key:"tokenAMint",get:function(){return this.programVersion.tokenAMint}},{key:"tokenBMint",get:function(){return this.programVersion.tokenBMint}},{key:"active",get:function(){return this.programVersion.active}},{key:"hasTrancheToken",get:function(){return this.programVersion.hasTrancheToken}},{key:"trancheIndex",get:function(){return this.programVersion.trancheIndex}},{key:"deal",get:function(){return this.programVersion.deal}},{key:"fillSellOrderBuilder",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,i,s,c,u,f,p,y,v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B,D,N,O,F,L,j,H;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e||this.client.provider.wallet.publicKey,a=b.CredixPass.generatePDA(this.seller,this.secondaryMarket.market),i=r(a,1),s=i[0],c=b.CredixPass.generatePDA(n,this.secondaryMarket.market),u=r(c,1),f=u[0],p=m.ProgramState.generatePDA(this.secondaryMarket.market.programId),y=r(p,1),v=y[0],w=this.secondaryMarket.market.generateSigningAuthorityPDA(),k=r(w,1),A=k[0],t.next=7,(0,d.getAssociatedTokenAddress)(this.tokenBMint,this.seller,!0);case 7:return x=t.sent,t.next=10,(0,d.getAssociatedTokenAddress)(this.tokenAMint,n,!0);case 10:return I=t.sent,t.next=13,(0,d.getAssociatedTokenAddress)(this.tokenBMint,n,!0);case 13:if(T=t.sent,S=null,C=null,E=null,R=null,M=null,P=null,!(U=this.deal)){t.next=55;break}return t.next=24,this.client.fetchDealByPublicKey(U);case 24:if(_=t.sent){t.next=27;break}throw Error("Deal not found");case 27:return t.next=29,h.RepaymentSchedule.generatePDA(_);case 29:return B=t.sent,D=r(B,1),S=D[0],t.next=34,_.fetchTranches();case 34:if(R=t.sent){t.next=37;break}throw Error("Deal tranches is null for the given deal");case 37:if(M=R.address,N=this.trancheIndex){t.next=41;break}throw Error("Tranche index not found");case 41:if(O=R.tranches.find((function(e){return e.index==N}))){t.next=44;break}throw Error("Tranche index not found");case 44:return t.next=46,g.TranchePass.generatePDA(this.seller,O);case 46:return F=t.sent,L=r(F,1),E=L[0],t.next=51,g.TranchePass.generatePDA(n,O);case 51:j=t.sent,H=r(j,1),C=H[0],P=O.index;case 55:return t.abrupt("return",this.anchorSecondaryMarketProgram.methods.fillSellOrder(P).accounts({seller:this.seller,buyer:n,sellerCredixPass:s,buyerCredixPass:f,secondaryMarket:this.secondaryMarket.address,globalMarketState:this.secondaryMarket.market.address,sellOrder:this.address,credixProgramState:v,buyerTokenAAccount:I,credixSigningAuthority:A,buyerTokenBAccount:T,sellerTokenBAccount:x,tokenBMint:this.tokenBMint,tokenAMint:this.tokenAMint,repaymentSchedule:S,deal:U,buyerTranchePass:C,sellerTranchePass:E,dealTranches:M,credixProgram:this.secondaryMarket.market.programId}).preInstructions([l.ComputeBudgetProgram.setComputeUnitLimit({units:14e5})]));case 56:case"end":return t.stop()}}),t,this)})))}},{key:"fillSellOrder",value:function(){return c(this,void 0,void 0,o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fillSellOrderBuilder();case 2:return t=e.sent,e.abrupt("return",t.rpc());case 4:case"end":return e.stop()}}),e,this)})))}},{key:"fillSellOrderIx",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fillSellOrderBuilder(e);case 2:return n=t.sent,t.abrupt("return",n.instruction());case 4:case"end":return t.stop()}}),t,this)})))}},{key:"cancelSellOrderBuilder",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,i,s,c,u,l,f,p,h,g;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e||this.client.provider.wallet.publicKey,a=b.CredixPass.generatePDA(n,this.secondaryMarket.market),i=r(a,1),s=i[0],c=m.ProgramState.generatePDA(this.secondaryMarket.market.programId),u=r(c,1),l=u[0],t.next=5,(0,d.getAssociatedTokenAddress)(this.tokenAMint,n,!0);case 5:return f=t.sent,p=this.secondaryMarket.market.generateSigningAuthorityPDA(),h=r(p,1),g=h[0],t.abrupt("return",this.anchorSecondaryMarketProgram.methods.cancelSellOrder(this.sellOrderIndex).accounts({seller:n,credixPass:s,credixSigningAuthority:g,sellOrder:this.address,secondaryMarket:this.secondaryMarket.address,globalMarketState:this.secondaryMarket.market.address,credixProgramState:l,sellerTokenAAccount:f,tokenAMint:this.tokenAMint,credixProgram:this.secondaryMarket.market.programId}));case 8:case"end":return t.stop()}}),t,this)})))}},{key:"cancelSellOrder",value:function(){return c(this,void 0,void 0,o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cancelSellOrderBuilder();case 2:return t=e.sent,e.abrupt("return",t.rpc());case 4:case"end":return e.stop()}}),e,this)})))}},{key:"cancelSellOrderIx",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.cancelSellOrderBuilder(e);case 2:return n=t.sent,t.abrupt("return",n.instruction());case 4:case"end":return t.stop()}}),t,this)})))}}],[{key:"generatePDA",value:function(e,t,n){var o=(0,f.encodeSeedString)("order"),r=new u.BN(t).toArrayLike(a,"le",2),i=[n.address.toBuffer(),e.toBuffer(),r,o];return l.PublicKey.findProgramAddressSync(i,n.programId)}},{key:"generateVaultPDA",value:function(t,n,a){var o=e.generatePDA(t,n,a),i=r(o,1)[0];return l.PublicKey.findProgramAddressSync([i.toBuffer()],a.programId)}}]),e}();t.SellOrder=y},17741:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SellerInfo=void 0;var r=n(8594),i=n(32314),s=function(){function e(t,n,o,r){a(this,e),this.programVersion=t,this.secondaryMarket=n,this.address=o,this.seller=r}return o(e,[{key:"numberOfSellOrders",get:function(){return this.programVersion.sellerNumberOfSellOrders}}],[{key:"generatePDA",value:function(e,t){var n=(0,i.encodeSeedString)("seller-info"),a=[t.address.toBuffer(),e.toBuffer(),n];return r.PublicKey.findProgramAddressSync(a,t.programId)}}]),e}();t.SellerInfo=s},76152:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(17061).default,r=n(27424).default,i=n(56690).default,s=n(89728).default,c=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Tranche=void 0;var d=n(97180),l=n(8594),f=u(n(21585)),p=u(n(43811)),b=n(10686),m=n(32314),h=n(15918),g=n(44381),y=n(7664),v=n(38534),w=n(17145),k=n(14251),A=function(){function e(t,n,a,o,r){i(this,e),this.programVersion=t,this.program=n,this.deal=a,this.tranches=o,this.client=r,this.anchorProgram=n}return s(e,[{key:"index",get:function(){return this.programVersion.index}},{key:"isPoolTranche",value:function(){return 1==this.programVersion.index}},{key:"size",get:function(){return(0,h.toTokenAmount)(this.programVersion.size.toNumber(),6)}},{key:"returnPercentage",get:function(){var e=this.programVersion.expectedReturn.numerator,t=this.programVersion.expectedReturn.denominator;return new g.Fraction(e,t)}},{key:"amountDeposited",get:function(){return(0,h.toTokenAmount)(this.programVersion.amountDeposited.toNumber(),6)}},{key:"totalRepaid",get:function(){return(0,h.toTokenAmount)((0,f.default)(this.principalRepaid.amount).add((0,f.default)(this.interestRepaid.amount)),6)}},{key:"principalRepaid",get:function(){return(0,h.toTokenAmount)(this.programVersion.principalRepaid.toNumber(),6)}},{key:"interestRepaid",get:function(){return(0,h.toTokenAmount)(this.programVersion.interestRepaid.toNumber(),6)}},{key:"mint",get:function(){return this.programVersion.tokenMint}},{key:"withdrawableInterest",get:function(){return new g.Fraction(this.programVersion.withdrawableInterest.numerator,this.programVersion.withdrawableInterest.denominator)}},{key:"withdrawablePrincipal",get:function(){return new g.Fraction(this.programVersion.withdrawablePrincipal.numerator,this.programVersion.withdrawablePrincipal.denominator)}},{key:"maxDepositPercentage",get:function(){var e=this.programVersion.maxDepositPercentage.numerator,t=this.programVersion.maxDepositPercentage.denominator;return new g.Fraction(e,t)}},{key:"earlyWithdrawalInterest",get:function(){return this.programVersion.earlyWithdrawalInterest}},{key:"earlyWithdrawalPrincipal",get:function(){return this.programVersion.earlyWithdrawalPrincipal}},{key:"upscaleSize",get:function(){return(0,h.toTokenAmount)(this.programVersion.upscaleSize.toNumber(),6)}},{key:"optionalAccount",get:function(){return this.programVersion.optionalAccount}},{key:"isFullyFunded",get:function(){return(0,f.default)(this.amountDeposited.amount).eq(this.size.amount)}},{key:"interestRepaidUntilLastUpscale",get:function(){return(0,h.toTokenAmount)(this.programVersion.interestRepaidUntilLastUpscale.toNumber(),6)}},{key:"toTrancheConfig",value:function(e){return{size:new g.Fraction(Number(this.size.amount),Number(e.amount)),returnPercentage:this.returnPercentage,maxDepositPercentage:this.maxDepositPercentage,earlyWithdrawalInterest:this.earlyWithdrawalInterest,earlyWithdrawalPrincipal:this.earlyWithdrawalPrincipal}}},{key:"issuePassBuilder",value:function(e,t){return c(this,void 0,void 0,o().mark((function n(){var a,i,s;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,k.TranchePass.generatePDA(e,this);case 2:return a=n.sent,i=r(a,1),s=i[0],n.abrupt("return",this.anchorProgram.methods.createTranchePass(this.index).accounts({owner:t||this.client.provider.wallet.publicKey,passHolder:e,tranchePass:s,deal:this.deal.address,dealTranches:this.tranches.address,globalMarketState:this.deal.market.address,rent:l.SYSVAR_RENT_PUBKEY,systemProgram:l.SystemProgram.programId}));case 6:case"end":return n.stop()}}),n,this)})))}},{key:"issuePassIx",value:function(e,t){return c(this,void 0,void 0,o().mark((function n(){var a;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.issuePassBuilder(e,t);case 2:return a=n.sent,n.abrupt("return",a.instruction());case 4:case"end":return n.stop()}}),n,this)})))}},{key:"issuePass",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.issuePassBuilder(e);case 2:return n=t.sent,t.abrupt("return",n.rpc());case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updatePassBuilder",value:function(e,t,n){return c(this,void 0,void 0,o().mark((function a(){var i,s,c;return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,k.TranchePass.generatePDA(e,this);case 2:return i=a.sent,s=r(i,1),c=s[0],a.abrupt("return",this.anchorProgram.methods.updateTranchePass(t.active).accounts({owner:n||this.client.provider.wallet.publicKey,tranchePass:c,deal:this.deal.address,globalMarketState:this.deal.market.address}));case 6:case"end":return a.stop()}}),a,this)})))}},{key:"updatePassIx",value:function(e,t,n){return c(this,void 0,void 0,o().mark((function a(){var r;return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.updatePassBuilder(e,t,n);case 2:return r=a.sent,a.abrupt("return",r.instruction());case 4:case"end":return a.stop()}}),a,this)})))}},{key:"updatePass",value:function(e,t){return c(this,void 0,void 0,o().mark((function n(){var a;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.updatePassBuilder(e,t);case 2:return a=n.sent,n.abrupt("return",a.rpc());case 4:case"end":return n.stop()}}),n,this)})))}},{key:"fetchPass",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,i,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,k.TranchePass.generatePDA(e,this);case 2:return n=t.sent,a=r(n,1),i=a[0],t.next=7,this.program.account.tranchePass.fetchNullable(i);case 7:if(s=t.sent){t.next=10;break}return t.abrupt("return",null);case 10:return t.abrupt("return",new k.TranchePass(s,i,this));case 11:case"end":return t.stop()}}),t,this)})))}},{key:"userTrancheBalance",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.findTrancheTokenAccount(e);case 2:return n=t.sent,t.next=5,this.program.provider.connection.getTokenAccountBalance(n);case 5:return a=t.sent,t.abrupt("return",a.value);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"findTrancheTokenAccount",value:function(e){return(0,d.getAssociatedTokenAddressSync)(this.mint,e,!0)}},{key:"deposit",value:function(e){return this.isPoolTranche()?this.depositPool(e):this.depositInvestor(e)}},{key:"depositPool",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,i,s,c,u,f,b,m,h,g,y;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.deal.market.generateSigningAuthorityPDA();case 2:return n=t.sent,a=r(n,1),i=a[0],t.next=7,this.deal.market.fetchMarketAdmins();case 7:return s=t.sent,t.next=10,v.RepaymentSchedule.generatePDA(this.deal);case 10:return c=t.sent,u=r(c,1),f=u[0],t.next=15,this.deal.baseTokenAccount();case 15:return b=t.sent,m=r(b,1),h=m[0],t.next=20,this.deal.market.findLiquidityPoolTokenAccount();case 20:return g=t.sent,y=new p.default(e),t.abrupt("return",this.anchorProgram.methods.poolDepositTranche(y).accounts({signer:this.client.provider.wallet.publicKey,globalMarketState:this.deal.market.address,signingAuthority:i,marketAdmins:s.address,deal:this.deal.address,repaymentSchedule:f,dealTranches:this.tranches.address,baseTokenMint:this.deal.market.baseMintPK,dealTokenAccount:h,liquidityPoolTokenAccount:g,tokenProgram:d.TOKEN_PROGRAM_ID,systemProgram:l.SystemProgram.programId,rent:l.SYSVAR_RENT_PUBKEY}).rpc());case 23:case"end":return t.stop()}}),t,this)})))}},{key:"depositInvestor",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,i,s,c,u,f,b,m,h,g,y,A,x,I,T;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.deal.baseTokenAccount();case 2:return n=t.sent,a=r(n,1),i=a[0],t.next=7,this.findTrancheTokenAccount(this.client.provider.wallet.publicKey);case 7:return s=t.sent,t.next=10,this.deal.market.findBaseTokenAccount(this.client.provider.wallet.publicKey);case 10:return c=t.sent,t.next=13,k.TranchePass.generatePDA(this.client.provider.wallet.publicKey,this);case 13:return u=t.sent,f=r(u,1),b=f[0],t.next=18,v.RepaymentSchedule.generatePDA(this.deal);case 18:return m=t.sent,h=r(m,1),g=h[0],t.next=23,this.deal.market.generateSigningAuthorityPDA();case 23:return y=t.sent,A=r(y,1),x=A[0],I=new p.default(e),T=this.optionalAccount?w.TrancheInfo.generatePDA(this,this.deal.market)[0]:null,t.abrupt("return",this.anchorProgram.methods.depositTranche(I,this.index).accounts({investor:this.client.provider.wallet.publicKey,tranchePass:b,deal:this.deal.address,dealTranches:this.tranches.address,trancheTokenMint:this.mint,repaymentSchedule:g,dealTokenAccount:i,investorBaseAccount:c,investorTrancheTokenAccount:s,baseTokenMint:this.deal.market.baseMintPK,trancheInfo:T,signingAuthority:x,globalMarketState:this.deal.market.address,associatedTokenProgram:d.ASSOCIATED_TOKEN_PROGRAM_ID,tokenProgram:d.TOKEN_PROGRAM_ID,systemProgram:l.SystemProgram.programId,rent:l.SYSVAR_RENT_PUBKEY}).signers([]).rpc());case 29:case"end":return t.stop()}}),t,this)})))}},{key:"burn",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,i,s,c,u,l,f,b,m,h,g,y,w;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,k.TranchePass.generatePDA(this.client.provider.wallet.publicKey,this);case 2:return n=t.sent,a=r(n,1),i=a[0],t.next=7,this.deal.baseTokenAccount();case 7:return s=t.sent,c=r(s,1),u=c[0],t.next=12,this.deal.market.findBaseTokenAccount(this.client.provider.wallet.publicKey);case 12:return l=t.sent,f=this.findTrancheTokenAccount(this.client.provider.wallet.publicKey),b=this.deal.market.generateSigningAuthorityPDA(),m=r(b,1),h=m[0],t.next=17,v.RepaymentSchedule.generatePDA(this.deal);case 17:return g=t.sent,y=r(g,1),w=y[0],t.abrupt("return",this.anchorProgram.methods.burnTranche(this.index,new p.default(e)).accounts({investor:this.client.provider.wallet.publicKey,tranchePass:i,dealTokenAccount:u,deal:this.deal.address,globalMarketState:this.deal.market.address,investorBaseAccount:l,baseTokenMint:this.deal.market.baseMintPK,repaymentSchedule:w,dealTranches:this.tranches.address,trancheTokenMint:this.mint,investorTrancheTokenAccount:f,tokenProgram:d.TOKEN_PROGRAM_ID,signingAuthority:h}).rpc());case 21:case"end":return t.stop()}}),t,this)})))}},{key:"withdraw",value:function(e){return this.isPoolTranche()?this.withdrawPool(e):this.withdrawInvestor(e)}},{key:"withdrawPool",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,i,s,c,u,f,b,m,h,g;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.deal.market.generateSigningAuthorityPDA();case 2:return n=t.sent,a=r(n,1),i=a[0],t.next=7,this.deal.market.fetchMarketAdmins();case 7:return s=t.sent,t.next=10,v.RepaymentSchedule.generatePDA(this.deal);case 10:return c=t.sent,u=r(c,1),f=u[0],t.next=15,this.deal.baseTokenAccount();case 15:return b=t.sent,m=r(b,1),h=m[0],t.next=20,this.deal.market.findLiquidityPoolTokenAccount();case 20:return g=t.sent,t.abrupt("return",this.anchorProgram.methods.poolWithdrawTranche(new p.default(e)).accounts({signer:this.client.provider.wallet.publicKey,globalMarketState:this.deal.market.address,signingAuthority:i,marketAdmins:s.address,deal:this.deal.address,repaymentSchedule:f,dealTranches:this.tranches.address,baseTokenMint:this.deal.market.baseMintPK,dealTokenAccount:h,liquidityPoolTokenAccount:g,tokenProgram:d.TOKEN_PROGRAM_ID,systemProgram:l.SystemProgram.programId,rent:l.SYSVAR_RENT_PUBKEY}).rpc());case 22:case"end":return t.stop()}}),t,this)})))}},{key:"withdrawInvestor",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,i,s,c,u,f,b,m,h,g,A,x,I,T,S,C,E;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,k.TranchePass.generatePDA(this.client.provider.wallet.publicKey,this);case 2:return n=t.sent,a=r(n,1),i=a[0],t.next=7,this.deal.baseTokenAccount();case 7:return s=t.sent,c=r(s,1),u=c[0],t.next=12,this.deal.market.findBaseTokenAccount(this.client.provider.wallet.publicKey);case 12:return f=t.sent,t.next=15,y.InvestorTranche.generatePDA(this.client.provider.wallet.publicKey,this);case 15:return b=t.sent,m=r(b,1),h=m[0],t.next=20,this.findTrancheTokenAccount(this.client.provider.wallet.publicKey);case 20:return g=t.sent,t.next=23,v.RepaymentSchedule.generatePDA(this.deal);case 23:return A=t.sent,x=r(A,1),I=x[0],T=this.deal.market.generateSigningAuthorityPDA(),S=r(T,1),C=S[0],E=this.optionalAccount?w.TrancheInfo.generatePDA(this,this.deal.market)[0]:null,t.abrupt("return",this.anchorProgram.methods.withdrawTranche(this.index,new p.default(e)).accounts({investor:this.client.provider.wallet.publicKey,tranchePass:i,dealTokenAccount:u,deal:this.deal.address,globalMarketState:this.deal.market.address,investorBaseAccount:f,baseTokenMint:this.deal.market.baseMintPK,dealTranches:this.tranches.address,investorTranche:h,repaymentSchedule:I,signingAuthority:C,trancheTokenMint:this.mint,trancheInfo:E,investorTrancheTokenAccount:g,tokenProgram:d.TOKEN_PROGRAM_ID,systemProgram:l.SystemProgram.programId,rent:l.SYSVAR_RENT_PUBKEY,associatedTokenProgram:d.ASSOCIATED_TOKEN_PROGRAM_ID}).rpc());case 29:case"end":return t.stop()}}),t,this)})))}},{key:"fetchInvestorTranche",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,i,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y.InvestorTranche.generatePDA(e,this);case 2:return n=t.sent,a=r(n,1),i=a[0],t.next=7,this.program.account.investorTranche.fetchNullable(i);case 7:if(s=t.sent){t.next=10;break}return t.abrupt("return",s);case 10:return t.abrupt("return",new y.InvestorTranche(s));case 11:case"end":return t.stop()}}),t,this)})))}},{key:"calculateAnnualIrr",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,r,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=e,t.t0){t.next=5;break}return t.next=4,this.deal.fetchRepaymentSchedule();case 4:t.t0=t.sent;case 5:if(n=t.t0){t.next=8;break}throw new Error("No valid repayment schedule found");case 8:return a=this.toTrancheConfig(n.totalPrincipal),r=n.toRepaymentScheduleConfig(),i=this.deal.performanceFee,t.abrupt("return",(0,b.calculateAnnualIrr)(a,r,i));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"calculateAPR",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,r,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=e,t.t0){t.next=5;break}return t.next=4,this.deal.fetchRepaymentSchedule();case 4:t.t0=t.sent;case 5:if(n=t.t0){t.next=8;break}throw new Error("No valid repayment schedule found");case 8:return a=this.toTrancheConfig(n.totalPrincipal),r=n.toRepaymentScheduleConfig(),i=this.deal.performanceFee,t.abrupt("return",(0,b.calculateAPR)(r,a,i));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"calculateInvestorWithdrawableAmount",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return c(this,void 0,void 0,o().mark((function a(){var r,i,s,c,u,d,l,p,b,m,g,y,v,w,k,A;return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return r=(0,h.toTokenAmount)(0,6),a.prev=1,a.next=4,this.userTrancheBalance(e);case 4:r=a.sent,a.next=12;break;case 7:if(a.prev=7,a.t0=a.catch(1),!a.t0.toString().includes("Invalid param: could not find account")){a.next=11;break}return a.abrupt("return",r);case 11:throw a.t0;case 12:return a.next=14,this.deal.fetchRepaymentSchedule();case 14:return i=a.sent,a.next=17,this.deal.isClosed(i);case 17:if(a.t1=a.sent,a.t1){a.next=22;break}return a.next=21,this.deal.isDefaulted(i);case 21:a.t1=a.sent;case 22:return s=a.t1,c=(this.earlyWithdrawalPrincipal||s)&&!t&&!n,u=this.earlyWithdrawalInterest||s,d=(0,f.default)(0),l=(0,f.default)(0),p=(0,f.default)(0),a.next=30,this.getSnapshots();case 30:return b=a.sent,a.next=33,this.investorRatios(e);case 33:if(m=a.sent){a.next=36;break}return a.abrupt("return",(0,h.toTokenAmount)(0,6));case 36:if(b.forEach((function(e,t){var n=(0,f.default)(e.interestRepaid.amount).sub(l),a=(0,f.default)(e.principalRepaid.amount).sub(p),o=(0,f.default)(m[t].toString()),r=(0,f.default)(0);c&&(r=r.add(a)),u&&(r=r.add(n));var i=o.mul(r);d=d.add(i),l=(0,f.default)(e.interestRepaid.amount),p=(0,f.default)(e.principalRepaid.amount)})),!n){a.next=48;break}return a.next=40,this.deal.fetchRepaymentSchedule();case 40:if(g=a.sent){a.next=43;break}throw Error("Repayment schedule not found");case 43:y=(0,f.default)(g.totalInterest.amount).minus(this.deal.performanceFee.apply((0,f.default)(g.totalInterest.amount).toNumber())),v=(v=this.returnPercentage.apply(y.toNumber())).sub(l.toNumber()),w=(0,f.default)(m[m.length-1].toString()).mul(v),d=d.add(w);case 48:return a.next=50,this.fetchInvestorTranche(e);case 50:if(null!==(k=a.sent)){a.next=53;break}return a.abrupt("return",(0,h.toTokenAmount)(d.toString(),6));case 53:return A=d.sub(k.amountWithdrawn.amount),a.abrupt("return",(0,h.toTokenAmount)(A.toString(),6));case 55:case"end":return a.stop()}}),a,this,[[1,7]])})))}},{key:"calculateInvestorGains",value:function(e){return this.calculateInvestorWithdrawableAmount(e,!0)}},{key:"calculateInvestorProjectedGains",value:function(e,t){return c(this,void 0,void 0,o().mark((function n(){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.t0=t,n.t0){n.next=5;break}return n.next=4,this.deal.fetchRepaymentSchedule();case 4:n.t0=n.sent;case 5:if(n.t0){n.next=8;break}return n.abrupt("return",(0,h.toTokenAmount)(0,6));case 8:return n.abrupt("return",this.calculateInvestorWithdrawableAmount(e,!0,!0));case 9:case"end":return n.stop()}}),n,this)})))}},{key:"investorRatios",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,r,i,s,c,u,l,p,b;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.findTrancheTokenAccount(e),t.next=3,(0,d.getAccount)(this.client.provider.connection,n);case 3:if(a=t.sent,this.optionalAccount){t.next=6;break}return t.abrupt("return",[(0,f.default)(a.amount.toString()).div(this.size.amount)]);case 6:return t.next=8,this.fetchPass(e);case 8:if(r=t.sent){t.next=11;break}return t.abrupt("return",null);case 11:return t.next=13,this.getSnapshots();case 13:return i=t.sent,s=r.investorDeposits(a),c=s.concat(Array(i.length-s.length).fill((0,f.default)(0))),u=(0,f.default)(0),l=(0,f.default)(1),p=(0,f.default)(0),b=[],c.forEach((function(e,t){var n=l.mul(u),a=e.add(n),o=i[t],r=(0,f.default)(o.size.amount).sub(p),s=u.add(r),c=a.div(s);b.push(c),p=p.add(r),u=p.sub(o.principalRepaid.amount),l=c})),t.abrupt("return",b);case 22:case"end":return t.stop()}}),t,this)})))}},{key:"fetchTrancheInfo",value:function(){return c(this,void 0,void 0,o().mark((function e(){var t,n,a,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.optionalAccount){e.next=2;break}return e.abrupt("return",null);case 2:return t=w.TrancheInfo.generatePDA(this,this.deal.market),n=r(t,1),a=n[0],e.next=5,this.program.account.trancheInfo.fetchNullable(a);case 5:if(i=e.sent){e.next=8;break}return e.abrupt("return",null);case 8:return e.abrupt("return",new w.TrancheInfo(i,a,this));case 9:case"end":return e.stop()}}),e,this)})))}},{key:"getSnapshots",value:function(){return c(this,void 0,void 0,o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={createdAt:new p.default(0),interestRepaid:this.interestRepaid,principalRepaid:this.principalRepaid,size:this.size},e.next=3,this.fetchTrancheInfo();case 3:if(null!=(n=e.sent)){e.next=6;break}return e.abrupt("return",[t]);case 6:return e.abrupt("return",n.snapShots.concat(t));case 7:case"end":return e.stop()}}),e,this)})))}}],[{key:"generateMintPDA",value:function(e,t,n){var o=[e.toBuffer(),new p.default(t).toArrayLike(a,"le",1),(0,m.encodeSeedString)("tranche-mint")];return l.PublicKey.findProgramAddress(o,n)}}]),e}();t.Tranche=A},42775:function(e,t,n){"use strict";var a=n(17061).default,o=n(56690).default,r=n(89728).default,i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TrancheClaim=void 0;var s=n(15918),c=function(){function e(t,n,a,r,i){o(this,e),this.index=t,this.programVersion=n,this.dealClaims=a,this.anchorProgram=r,this.client=i}return r(e,[{key:"trancheIndex",get:function(){return this.programVersion.trancheIndex}},{key:"claimableAmount",get:function(){return(0,s.toTokenAmount)(this.programVersion.claimableAmount.toNumber(),6)}},{key:"claimedAmount",get:function(){return(0,s.toTokenAmount)(this.programVersion.claimedAmount.toNumber(),6)}},{key:"isClaimed",get:function(){return this.claimableAmount.amount===this.claimedAmount.amount}},{key:"investor",get:function(){return this.programVersion.investor}},{key:"claimTrancheBuilder",value:function(e){return i(this,void 0,void 0,a().mark((function t(){var n,o,r,i,s=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.dealClaims.deal.fetchTranches();case 2:if(n=t.sent){t.next=5;break}throw Error("Failed to find tranches account");case 5:if(o=n.tranches.find((function(e){return e.index===s.trancheIndex}))){t.next=8;break}throw Error("Failed to find tranche");case 8:return r=e||this.client.provider.wallet.publicKey,t.next=11,o.findTrancheTokenAccount(r);case 11:return i=t.sent,t.abrupt("return",this.anchorProgram.methods.claimTrancheTokens(this.trancheIndex,this.index).accounts({investor:r,globalMarketState:this.dealClaims.deal.market.address,deal:this.dealClaims.deal.address,baseTokenMint:this.dealClaims.deal.market.baseMintPK,investorTrancheTokenAccount:i,dealClaims:this.dealClaims.address}));case 13:case"end":return t.stop()}}),t,this)})))}},{key:"claimTrancheIx",value:function(e){return i(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.claimTrancheBuilder(e);case 2:return n=t.sent,t.abrupt("return",n.instruction());case 4:case"end":return t.stop()}}),t,this)})))}},{key:"claimTranche",value:function(){return i(this,void 0,void 0,a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.claimTrancheBuilder();case 2:return t=e.sent,e.abrupt("return",t.rpc());case 4:case"end":return e.stop()}}),e,this)})))}}]),e}();t.TrancheClaim=c},17145:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(56690).default,r=n(89728).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TrancheInfo=void 0;var s=n(8594),c=i(n(43811)),u=n(32314),d=n(15918),l=function(){function e(t,n,a){o(this,e),this.programVersion=t,this.address=n,this.tranche=a}return r(e,[{key:"snapShots",get:function(){return this.programVersion.snapshots.map((function(e){return{createdAt:e.createdAt,size:(0,d.toTokenAmount)(e.size.toString(),6),interestRepaid:(0,d.toTokenAmount)(e.interestRepaid.toString(),6),principalRepaid:(0,d.toTokenAmount)(e.principalRepaid.toString(),6)}}))}}],[{key:"generatePDA",value:function(e,t){var n=(0,u.encodeSeedString)("tranche-info"),o=[t.address.toBuffer(),e.deal.address.toBuffer(),new c.default(e.index).toArrayLike(a,"le",1),n];return s.PublicKey.findProgramAddressSync(o,t.programId)}}]),e}();t.TrancheInfo=l},14251:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(56690).default,r=n(89728).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TranchePass=void 0;var s=n(74522),c=n(8594),u=i(n(21585)),d=n(32314),l=function(){function e(t,n,a){o(this,e),this.programVersion=t,this.address=n,this.tranche=a}return r(e,[{key:"active",get:function(){return this.programVersion.active}},{key:"holder",get:function(){return this.programVersion.investor}},{key:"investorDeposits",value:function(e){var t=Array.from(this.programVersion.deposits,(function(e){return(0,u.default)(e.amount.toString())})),n=t.reduce((function(e,t){return e.add(t)}),(0,u.default)(0));return[(0,u.default)(e.amount.toString()).sub(n)].concat(t)}},{key:"update",value:function(e){return this.tranche.updatePass(this.holder,e)}}],[{key:"generatePDA",value:function(e,t){var n=[t.deal.market.address.toBuffer(),e.toBuffer(),t.deal.address.toBuffer(),new s.BN(t.index).toArrayLike(a,"le",1),(0,d.encodeSeedString)("tranche-pass")];return c.PublicKey.findProgramAddress(n,t.deal.market.programId)}}]),e}();t.TranchePass=l},98642:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Tranches=void 0;var i=n(8594),s=r(n(43811)),c=n(32314),u=n(76152),d=function(){function e(t,n,o,r,i){var c=this;a(this,e),this.programVersion=t,this.address=n,this.tranches=t.tranches.filter((function(e,t){return 0===t||!e.size.eq(new s.default(0))})).map((function(e){return new u.Tranche(e,r,o,c,i)})),this.address=n}return o(e,[{key:"totalTranches",get:function(){return this.programVersion.totalTranches}}],[{key:"generatePDA",value:function(e){var t=[e.market.address.toBuffer(),e.address.toBuffer(),(0,c.encodeSeedString)("tranches")];return i.PublicKey.findProgramAddress(t,e.market.programId)}}]),e}();t.Tranches=d},39317:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(27424).default,r=n(17061).default,i=n(56690).default,s=n(89728).default,c=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WithdrawEpoch=t.WITHDRAW_EPOCH_PHASE=void 0;var d=n(8594),l=u(n(21585)),f=u(n(43811)),p=u(n(33331)),b=n(50069),m=n(32314),h=n(15918),g=n(44381),y=n(31410);t.WITHDRAW_EPOCH_PHASE={INITIAL:"INITIAL",REQUEST:"REQUEST",REDEEM:"REDEEM",AVAILABLE_LIQUIDITY:"AVAILABLE_LIQUIDITY",COOL_DOWN:"COOL_DOWN",CLOSED:"CLOSED"};var v=function(){function e(t,n,a,o,r,s){i(this,e),this.programVersion=t,this.address=n,this.idx=a,this.market=o,this.program=r,this.anchorProgram=r,this.client=s}return s(e,[{key:"goLive",get:function(){var e=this.programVersion.goLive;if(e.bitLength()>53)throw Error("Create at value too large");return e.toNumber()}},{key:"requestDays",get:function(){return this.requestSeconds/b.SECONDS_IN_DAY}},{key:"requestSeconds",get:function(){return this.programVersion.requestSeconds}},{key:"redeemDays",get:function(){return this.redeemSeconds/b.SECONDS_IN_DAY}},{key:"redeemSeconds",get:function(){return this.programVersion.redeemSeconds}},{key:"availableLiquidityDays",get:function(){return this.availableLiquiditySeconds/b.SECONDS_IN_DAY}},{key:"availableLiquiditySeconds",get:function(){return this.programVersion.availableLiquiditySeconds}},{key:"totalRequestedBaseAmount",get:function(){return(0,h.toTokenAmount)(this.programVersion.totalRequestedBaseAmount.toNumber(),6)}},{key:"phase",get:function(){var e=(0,p.default)(new Date),n=p.default.unix(this.goLive);if(e.isBefore(n))return t.WITHDRAW_EPOCH_PHASE.CLOSED;var a=n.add(this.requestSeconds,"s");if(e.isBefore(a))return t.WITHDRAW_EPOCH_PHASE.REQUEST;var o=a.add(this.redeemSeconds,"s");if(e.isBefore(o))return t.WITHDRAW_EPOCH_PHASE.REDEEM;var r=o.add(this.availableLiquiditySeconds,"s");return e.isBefore(r)?t.WITHDRAW_EPOCH_PHASE.AVAILABLE_LIQUIDITY:t.WITHDRAW_EPOCH_PHASE.COOL_DOWN}},{key:"participatingInvestorsTotalLpAmount",get:function(){return(0,h.toTokenAmount)(this.programVersion.participatingInvestorsTotalLpAmount.toNumber(),6)}},{key:"getInvestorLockedLiquidity",value:function(e){return c(this,void 0,void 0,r().mark((function n(){var a,o,i,s,c,u;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.phase!==t.WITHDRAW_EPOCH_PHASE.CLOSED){n.next=2;break}throw Error("There is no active withdraw epoch");case 2:if(this.phase!==t.WITHDRAW_EPOCH_PHASE.REQUEST){n.next=4;break}throw Error("The withdraw epoch is still in the request phase");case 4:return n.next=6,this.fetchWithdrawRequest(e);case 6:if(a=n.sent){n.next=9;break}return n.abrupt("return",(0,h.toTokenAmount)(0,6));case 9:if(o=new l.default(a.baseAmount.amount),i=o.sub(a.baseAmountWithdrawn.amount),s=new l.default(this.market.lockedLiquidity.amount),this.phase!==t.WITHDRAW_EPOCH_PHASE.AVAILABLE_LIQUIDITY&&!s.eq(this.totalRequestedBaseAmount.amount)){n.next=14;break}return n.abrupt("return",(0,h.toTokenAmount)(i,6));case 14:return c=new g.Fraction(+this.market.lockedLiquidity.amount,+this.participatingInvestorsTotalLpAmount.amount),u=c.apply(+a.investorTotalLpAmount.amount),n.abrupt("return",(0,h.toTokenAmount)(u,6));case 17:case"end":return n.stop()}}),n,this)})))}},{key:"getWithdrawableAmount",value:function(e){return c(this,void 0,void 0,r().mark((function t(){var n,a,o,i,s,c,u;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=l.default,t.next=3,this.getInvestorLockedLiquidity(e);case 3:return t.t1=t.sent.amount,n=new t.t0(t.t1),a=new l.default(this.market.lockedLiquidity.amount),o=a.minus(this.market.totalRedeemedBaseAmount.amount),i=(0,b.min)(n,o),t.next=10,this.market.userLPBalance(e);case 10:return s=t.sent,t.next=13,this.market.getBasePrice();case 13:return c=t.sent,u=new l.default(s.amount).mul(c),t.abrupt("return",(0,h.toTokenAmount)((0,b.min)(i,u),6));case 16:case"end":return t.stop()}}),t,this)})))}},{key:"fetchWithdrawRequest",value:function(e){return c(this,void 0,void 0,r().mark((function t(){var n,a,i,s;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=y.WithdrawRequest.generatePDA(this.market,e,this.idx),a=o(n,1),i=a[0],t.next=3,this.program.account.withdrawRequest.fetchNullable(i);case 3:if(s=t.sent){t.next=6;break}return t.abrupt("return",null);case 6:return t.abrupt("return",new y.WithdrawRequest(s,i,e));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"createWithdrawRequestBuilder",value:function(e,t){return c(this,void 0,void 0,r().mark((function n(){var a,o,i;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t||this.client.provider.wallet.publicKey,n.next=3,this.market.findLPTokenAccount(a);case 3:return o=n.sent,n.next=6,this.market.findLiquidityPoolTokenAccount();case 6:return i=n.sent,n.abrupt("return",this.anchorProgram.methods.createWithdrawRequest(new f.default(e)).accounts({investor:a,globalMarketState:this.market.address,investorLpTokenAccount:o,liquidityPoolTokenAccount:i,withdrawEpoch:this.address,lpTokenMint:this.market.lpMintPK}));case 8:case"end":return n.stop()}}),n,this)})))}},{key:"createWithdrawRequestIx",value:function(e,t){return c(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.createWithdrawRequestBuilder(e,t);case 2:return a=n.sent,n.abrupt("return",a.instruction());case 4:case"end":return n.stop()}}),n,this)})))}},{key:"createWithdrawRequest",value:function(e){return c(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.createWithdrawRequestBuilder(e);case 2:return n=t.sent,t.abrupt("return",n.rpc());case 4:case"end":return t.stop()}}),t,this)})))}},{key:"redeemRequestBuilder",value:function(e,t){return c(this,void 0,void 0,r().mark((function n(){var a,o,i,s,c,u;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t||this.client.provider.wallet.publicKey,n.next=3,this.market.findLPTokenAccount(a);case 3:return o=n.sent,n.next=6,this.market.findLiquidityPoolTokenAccount();case 6:return i=n.sent,n.next=9,this.client.fetchProgramState();case 9:return s=n.sent,n.next=12,this.market.findBaseTokenAccount(s.credixMultisigKey);case 12:return c=n.sent,n.next=15,this.market.findBaseTokenAccount(a);case 15:return u=n.sent,n.abrupt("return",this.anchorProgram.methods.redeemWithdrawRequest(new f.default(e)).accounts({investor:a,globalMarketState:this.market.address,investorLpTokenAccount:o,investorTokenAccount:u,baseTokenMint:this.market.baseMintPK,programState:s.address,credixMultisigKey:s.credixMultisigKey,credixMultisigTokenAccount:c,liquidityPoolTokenAccount:i,treasuryPoolTokenAccount:this.market.treasury,withdrawEpoch:this.address,lpTokenMint:this.market.lpMintPK}));case 17:case"end":return n.stop()}}),n,this)})))}},{key:"redeemRequestIx",value:function(e,t){return c(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.redeemRequestBuilder(e,t);case 2:return a=n.sent,n.abrupt("return",a.instruction());case 4:case"end":return n.stop()}}),n,this)})))}},{key:"redeemRequest",value:function(e){return c(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.redeemRequestBuilder(e);case 2:return n=t.sent,t.abrupt("return",n.rpc());case 4:case"end":return t.stop()}}),t,this)})))}}],[{key:"generatePDA",value:function(e,t){var n=(0,m.encodeSeedString)("withdraw-epoch"),o=[e.address.toBuffer(),new f.default(t).toArrayLike(a,"le",4),n];return d.PublicKey.findProgramAddressSync(o,e.programId)}}]),e}();t.WithdrawEpoch=v},31410:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(56690).default,r=n(89728).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WithdrawRequest=void 0;var s=n(8594),c=i(n(43811)),u=n(32314),d=n(15918),l=function(){function e(t,n,a){o(this,e),this.programVersion=t,this.address=n,this.holder=a}return r(e,[{key:"baseAmount",get:function(){return(0,d.toTokenAmount)(this.programVersion.baseAmount.toNumber(),6)}},{key:"baseAmountWithdrawn",get:function(){return(0,d.toTokenAmount)(this.programVersion.baseAmountWithdrawn.toNumber(),6)}},{key:"investorTotalLpAmount",get:function(){return(0,d.toTokenAmount)(this.programVersion.investorTotalLpAmount.toNumber(),6)}}],[{key:"generatePDA",value:function(e,t,n){var o=(0,u.encodeSeedString)("withdraw-request"),r=[e.address.toBuffer(),t.toBuffer(),new c.default(n).toArrayLike(a,"le",4),o];return s.PublicKey.findProgramAddressSync(r,e.programId)}}]),e}();t.WithdrawRequest=l},31444:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CredixClientProvider=void 0;var i=n(27770),s=r(n(67861)),c=n(8887),u=n(82104);t.CredixClientProvider=function(e){var t=s.useMemo((function(){return new c.CredixClient(e.connection,e.wallet,e.config)}),[e.connection,e.wallet,e.config]);return(0,i.jsx)(u.ClientContext.Provider,Object.assign({value:t},{children:e.children}))}},82104:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useCredixClient=t.ClientContext=void 0;var i=r(n(67861));t.ClientContext=i.createContext(void 0);t.useCredixClient=function(){var e=i.useContext(t.ClientContext);if(!e)throw new Error("No CredixClientProvider found");return e}},20310:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateBulletLoanPeriods=void 0;var o=a(n(21585));t.generateBulletLoanPeriods=function(e){var t=e.interest.apply(e.principal).div((0,o.default)(e.totalRepayments)).toNumber();return Array(e.totalRepayments-1).fill(0).map((function(){return{principal:0,interest:t}})).concat({principal:e.principal,interest:t})}},85065:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethBaseMintAddresses=t.mainnetWrappedUSDC=t.devnetWrappedUSDC=t.localnetWrappedUSDCKeypair=t.SENIOR_TRANCHE_INDEX=t.MAX_NUMBER_OF_ACCOUNT_INFOS=void 0;var a=n(8594);t.MAX_NUMBER_OF_ACCOUNT_INFOS=100,t.SENIOR_TRANCHE_INDEX=1,t.localnetWrappedUSDCKeypair=new a.Keypair,t.devnetWrappedUSDC=new a.PublicKey("2BAqec7Qof3Y7VJatwFsRHUNSQBSkzaEsT1V5bW6dbZY"),t.mainnetWrappedUSDC=new a.PublicKey("A9mUU4qviSctJVPJdBJWkb28deg915LYJKrzQ19ji3FM"),t.ethBaseMintAddresses=[t.mainnetWrappedUSDC,t.devnetWrappedUSDC,t.localnetWrappedUSDCKeypair.publicKey]},28202:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDL=void 0,t.IDL={version:"3.6.0-beta.2",name:"credix",instructions:[{name:"initializeMarket",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"arg",type:"string",path:"global_market_seed"}]}},{name:"marketAdmins",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"signingAuthority",isMut:!1,isSigner:!1,docs:["The alternative is to create an empty SigningAuthority struct that can be passed to Account<>"],pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"liquidityPoolTokenAccount",isMut:!0,isSigner:!1},{name:"treasury",isMut:!1,isSigner:!1},{name:"treasuryPoolTokenAccount",isMut:!0,isSigner:!1},{name:"lpTokenMint",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"lp-token-mint"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"globalMarketSeed",type:"string"},{name:"performanceFee",type:{defined:"Fraction"}},{name:"withdrawalFee",type:{defined:"Fraction"}},{name:"gracePeriod",type:"u8"},{name:"fixedLateFeePercentage",type:{defined:"Fraction"}},{name:"variableLateFeePercentage",type:{defined:"Fraction"}},{name:"serviceFeePercentage",type:{defined:"Fraction"}},{name:"credixPerformanceFeePercentage",type:{defined:"Fraction"}},{name:"credixServiceFeePercentage",type:{defined:"Fraction"}},{name:"multisig",type:{option:"publicKey"}},{name:"managers",type:{option:{vec:"publicKey"}}},{name:"passIssuers",type:{option:{vec:"publicKey"}}},{name:"withdrawEpochRequestSeconds",type:"u32"},{name:"withdrawEpochRedeemSeconds",type:"u32"},{name:"withdrawEpochAvailableLiquiditySeconds",type:"u32"}]},{name:"depositFunds",accounts:[{name:"investor",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"investorTokenAccount",isMut:!0,isSigner:!1},{name:"liquidityPoolTokenAccount",isMut:!0,isSigner:!1},{name:"lpTokenMint",isMut:!0,isSigner:!1},{name:"investorLpTokenAccount",isMut:!0,isSigner:!1},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"createDeal",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"borrower",isMut:!1,isSigner:!1},{name:"borrowerInfo",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"const",type:"string",value:"borrower-info"}]}},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"deal",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"account",type:"u16",account:"BorrowerInfo",path:"borrower_info.num_of_deals"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"maxFundingDuration",type:"u8"},{name:"dealName",type:"string"},{name:"trueWaterfall",type:"bool"},{name:"slashInterestToPrincipal",type:"bool"},{name:"slashPrincipalToInterest",type:"bool"},{name:"serviceFees",type:"u64"},{name:"fixedLateFeePercentage",type:{option:{defined:"Fraction"}}},{name:"performanceFeePercentage",type:{option:{defined:"Fraction"}}},{name:"gracePeriod",type:{option:"u8"}},{name:"variableLateFeePercentage",type:{option:{defined:"Fraction"}}},{name:"serviceFeePercentage",type:{option:{defined:"Fraction"}}},{name:"migrated",type:"bool"}]},{name:"setTranches",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"dealTranches",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"trancheConfigs",type:{vec:{defined:"TrancheConfig"}}}]},{name:"setRepaymentSchedule",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"repaymentSchedule",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"totalRepayments",type:"u16"},{name:"offset",type:"u32"},{name:"repaymentPeriodInputs",type:{vec:{defined:"RepaymentPeriodInput"}}},{name:"periodDuration",type:"u8"},{name:"daysInYear",type:"u16"}]},{name:"openDeal",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"deal",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"dealTranches",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}}],args:[]},{name:"activateDeal",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"deal",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"dealTranches",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"dealTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-token-account"}]}},{name:"liquidityPoolTokenAccount",isMut:!0,isSigner:!1},{name:"borrower",isMut:!1,isSigner:!1},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"repayDeal",accounts:[{name:"borrower",isMut:!0,isSigner:!0},{name:"deal",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"borrowerTokenAccount",isMut:!0,isSigner:!1},{name:"liquidityPoolTokenAccount",isMut:!0,isSigner:!1},{name:"treasuryPoolTokenAccount",isMut:!0,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"dealTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-token-account"}]}},{name:"repaymentSchedule",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"dealTranches",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"credixMultisigKey",isMut:!1,isSigner:!1},{name:"credixMultisigTokenAccount",isMut:!0,isSigner:!1},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"withdrawFunds",accounts:[{name:"investor",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"investorLpTokenAccount",isMut:!0,isSigner:!1},{name:"investorTokenAccount",isMut:!0,isSigner:!1},{name:"liquidityPoolTokenAccount",isMut:!0,isSigner:!1},{name:"credixMultisigKey",isMut:!1,isSigner:!1},{name:"credixMultisigTokenAccount",isMut:!0,isSigner:!1},{name:"treasuryPoolTokenAccount",isMut:!0,isSigner:!1},{name:"lpTokenMint",isMut:!0,isSigner:!1},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"baseWithdrawalAmount",type:"u64"}]},{name:"createCredixPass",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"passHolder",isMut:!1,isSigner:!1},{name:"credixPass",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"pass_holder"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"rent",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"isInvestor",type:"bool"},{name:"isBorrower",type:"bool"},{name:"releaseTimestamp",type:"i64"},{name:"disableWithdrawalFee",type:"bool"},{name:"bypassWithdrawEpochs",type:"bool"}]},{name:"updateCredixPass",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"passHolder",isMut:!1,isSigner:!1},{name:"credixPass",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"pass_holder"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1}],args:[{name:"isActive",type:"bool"},{name:"isInvestor",type:"bool"},{name:"isBorrower",type:"bool"},{name:"releaseTimestamp",type:"i64"},{name:"disableWithdrawalFee",type:"bool"},{name:"bypassWithdrawEpochs",type:"bool"}]},{name:"freezeGlobalMarketState",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}}],args:[]},{name:"thawGlobalMarketState",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}}],args:[]},{name:"updateTokenMetadata",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"metadataPda",isMut:!0,isSigner:!1},{name:"mint",isMut:!0,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"tokenMetadataProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"name",type:"string"},{name:"symbol",type:"string"},{name:"uri",type:"string"}]},{name:"createTranchePass",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"passHolder",isMut:!1,isSigner:!1},{name:"tranchePass",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"pass_holder"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche-pass"}]}},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"dealTranches",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"rent",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"trancheIndex",type:"u8"}]},{name:"updateTranchePass",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"tranchePass",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"TranchePass",path:"tranche_pass.investor"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"account",type:"u8",account:"TranchePass",path:"tranche_pass.tranche_index"},{kind:"const",type:"string",value:"tranche-pass"}]}},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1}],args:[{name:"active",type:"bool"}]},{name:"depositTranche",accounts:[{name:"investor",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"investorBaseAccount",isMut:!0,isSigner:!1},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"dealTranches",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"dealTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-token-account"}]}},{name:"trancheTokenMint",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",path:"deal_tranches"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche-mint"}]}},{name:"investorTrancheTokenAccount",isMut:!0,isSigner:!1},{name:"tranchePass",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche-pass"}]}},{name:"trancheInfo",isMut:!0,isSigner:!1,isOptional:!0,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche-info"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"},{name:"trancheIndex",type:"u8"}]},{name:"withdrawFromDeal",accounts:[{name:"borrower",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"deal",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"dealTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-token-account"}]}},{name:"borrowerTokenAccount",isMut:!0,isSigner:!1},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"burnTranche",accounts:[{name:"investor",isMut:!1,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"investorBaseAccount",isMut:!0,isSigner:!1},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"dealTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-token-account"}]}},{name:"trancheTokenMint",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",path:"deal_tranches"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche-mint"}]}},{name:"investorTrancheTokenAccount",isMut:!0,isSigner:!1},{name:"dealTranches",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"tranchePass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche-pass"}]}},{name:"tokenProgram",isMut:!1,isSigner:!1}],args:[{name:"trancheIndex",type:"u8"},{name:"amount",type:"u64"}]},{name:"withdrawTranche",accounts:[{name:"investor",isMut:!0,isSigner:!0},{name:"tranchePass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche-pass"}]}},{name:"dealTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-token-account"}]}},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"investorBaseAccount",isMut:!0,isSigner:!1},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"dealTranches",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"investorTranche",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche"}]}},{name:"trancheTokenMint",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",path:"deal_tranches"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche-mint"}]}},{name:"investorTrancheTokenAccount",isMut:!1,isSigner:!1},{name:"trancheInfo",isMut:!0,isSigner:!1,isOptional:!0,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche-info"}]}},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"trancheIndex",type:"u8"},{name:"amount",type:"u64"}]},{name:"initializeProgramState",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"programState",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"rent",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"credixMultisigKey",type:"publicKey"},{name:"credixManagers",type:{array:["publicKey",10]}},{name:"credixServiceFeePercentage",type:{defined:"Fraction"}},{name:"credixPerformanceFeePercentage",type:{defined:"Fraction"}}]},{name:"updateGlobalMarketCredixFees",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}}],args:[{name:"credixPerformanceFeePercentage",type:{option:{defined:"Fraction"}}},{name:"credixServiceFeePercentage",type:{option:{defined:"Fraction"}}}]},{name:"updateProgramState",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"programState",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}}],args:[{name:"credixMultisigKey",type:{option:"publicKey"}},{name:"credixManagers",type:{option:{array:["publicKey",10]}}},{name:"credixPerformanceFeePercentage",type:{option:{defined:"Fraction"}}},{name:"credixServiceFeePercentage",type:{option:{defined:"Fraction"}}}]},{name:"updateGlobalMarketState",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}}],args:[{name:"treasuryPoolTokenAccount",type:{option:"publicKey"}},{name:"performanceFee",type:{option:{defined:"Fraction"}}},{name:"withdrawalFee",type:{option:{defined:"Fraction"}}},{name:"serviceFeePercentage",type:{option:{defined:"Fraction"}}},{name:"gracePeriod",type:{option:"u8"}},{name:"fixedLateFeePercentage",type:{option:{defined:"Fraction"}}},{name:"variableLateFeePercentage",type:{option:{defined:"Fraction"}}},{name:"poolSizeLimitPercentage",type:{option:{defined:"Fraction"}}},{name:"withdrawEpochRequestSeconds",type:{option:"u32"}},{name:"withdrawEpochRedeemSeconds",type:{option:"u32"}},{name:"withdrawEpochAvailableLiquiditySeconds",type:{option:"u32"}},{name:"hasWithdrawEpochs",type:{option:"bool"}}]},{name:"updateDeal",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"deal",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}}],args:[{name:"serviceFeePercentage",type:{defined:"Fraction"}},{name:"serviceFees",type:"u64"},{name:"serviceFeesRepaid",type:"u64"},{name:"yearLatestServiceFeesCharged",type:"u8"},{name:"performanceFeePercentage",type:{option:{defined:"Fraction"}}},{name:"openedAt",type:{option:"i64"}}]},{name:"updateMarketAdmins",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"marketAdmins",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}}],args:[{name:"multisig",type:{option:"publicKey"}},{name:"managers",type:{option:{vec:"publicKey"}}},{name:"passIssuers",type:{option:{vec:"publicKey"}}}]},{name:"createWithdrawEpoch",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"withdrawEpoch",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"withdraw-epoch"}]}},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"createWithdrawRequest",accounts:[{name:"investor",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"withdrawEpoch",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"u32",account:"GlobalMarketState",path:"global_market_state.latest_withdraw_epoch_idx"},{kind:"const",type:"string",value:"withdraw-epoch"}]}},{name:"withdrawRequest",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"account",type:"u32",account:"GlobalMarketState",path:"global_market_state.latest_withdraw_epoch_idx"},{kind:"const",type:"string",value:"withdraw-request"}]}},{name:"investorLpTokenAccount",isMut:!1,isSigner:!1},{name:"liquidityPoolTokenAccount",isMut:!1,isSigner:!1},{name:"lpTokenMint",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"thawFreezeTokenAccount",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"tokenAccount",isMut:!0,isSigner:!1},{name:"mint",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1}],args:[{name:"freeze",type:"bool"}]},{name:"repayServiceFees",accounts:[{name:"borrower",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"deal",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"treasuryPoolTokenAccount",isMut:!0,isSigner:!1},{name:"borrowerTokenAccount",isMut:!0,isSigner:!1},{name:"credixMultisigKey",isMut:!1,isSigner:!1},{name:"credixMultisigTokenAccount",isMut:!0,isSigner:!1},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"setLockedLiquidity",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"withdrawEpoch",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"u32",account:"GlobalMarketState",path:"global_market_state.latest_withdraw_epoch_idx"},{kind:"const",type:"string",value:"withdraw-epoch"}]}},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"liquidityPoolTokenAccount",isMut:!1,isSigner:!1},{name:"baseTokenMint",isMut:!1,isSigner:!1}],args:[]},{name:"redeemWithdrawRequest",accounts:[{name:"investor",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"withdrawEpoch",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"u32",account:"GlobalMarketState",path:"global_market_state.latest_withdraw_epoch_idx"},{kind:"const",type:"string",value:"withdraw-epoch"}]}},{name:"withdrawRequest",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"account",type:"u32",account:"GlobalMarketState",path:"global_market_state.latest_withdraw_epoch_idx"},{kind:"const",type:"string",value:"withdraw-request"}]}},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"investorLpTokenAccount",isMut:!0,isSigner:!1},{name:"investorTokenAccount",isMut:!0,isSigner:!1},{name:"liquidityPoolTokenAccount",isMut:!0,isSigner:!1},{name:"credixMultisigKey",isMut:!1,isSigner:!1},{name:"credixMultisigTokenAccount",isMut:!0,isSigner:!1},{name:"treasuryPoolTokenAccount",isMut:!0,isSigner:!1},{name:"lpTokenMint",isMut:!0,isSigner:!1},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"activateMigratedDeal",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"deal",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"dealTranches",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"dealTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-token-account"}]}},{name:"dealClaims",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-claims"}]}},{name:"liquidityPoolTokenAccount",isMut:!1,isSigner:!1},{name:"dealLpClaimTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-lp-claim-token-account"}]}},{name:"borrower",isMut:!1,isSigner:!1},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"borrower"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"lpTokenMint",isMut:!0,isSigner:!1},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"lpClaims",type:{vec:{defined:"LpClaimConfig"}}},{name:"trancheClaims",type:{vec:{defined:"TrancheClaimConfig"}}}]},{name:"claimTrancheTokens",accounts:[{name:"investor",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"dealTranches",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"dealClaims",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-claims"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"trancheTokenMint",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",path:"deal_tranches"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche-mint"}]}},{name:"investorTrancheTokenAccount",isMut:!0,isSigner:!1},{name:"tranchePass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"arg",type:"u8",path:"tranche_index"},{kind:"const",type:"string",value:"tranche-pass"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"trancheIndex",type:"u8"},{name:"claimIndex",type:"u32"}]},{name:"claimLpTranche",accounts:[{name:"investor",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"dealTranches",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"dealClaims",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-claims"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"lpTokenMint",isMut:!0,isSigner:!1},{name:"investorLpTokenAccount",isMut:!0,isSigner:!1},{name:"dealLpClaimTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-lp-claim-token-account"}]}},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",path:"investor"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"claimIndex",type:"u32"}]},{name:"adjustRepaymentSchedule",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"repaymentSchedule",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"dealTranches",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"newLength",type:"u16"},{name:"changeIndexFrom",type:"u32"},{name:"repaymentPeriodInputs",type:{vec:{defined:"RepaymentPeriodInput"}}}]},{name:"addCrossChainInvestor",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"crossChainInvestor",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"arg",type:"publicKey",path:"investor_chain_address"},{kind:"const",type:"string",value:"cross-chain-investor"}]}},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"baseTokenAccount",isMut:!0,isSigner:!1},{name:"lpTokenAccount",isMut:!0,isSigner:!1},{name:"lpTokenMint",isMut:!1,isSigner:!1},{name:"redeemerAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"redeemer"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"investorChainAddress",type:"publicKey"},{name:"chainId",type:"u16"}]},{name:"adjustTranchesAndPrincipal",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"deal",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"repaymentSchedule",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"dealTranches",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}}],args:[{name:"trancheUpscaleConfigs",type:{vec:{defined:"TrancheUpscaleConfig"}}}]},{name:"poolDepositTranche",accounts:[{name:"signer",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"dealTranches",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"dealTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-token-account"}]}},{name:"liquidityPoolTokenAccount",isMut:!0,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"poolWithdrawTranche",accounts:[{name:"signer",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!0,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"deal",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"repaymentSchedule",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"repayment-schedule"}]}},{name:"dealTranches",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}},{name:"baseTokenMint",isMut:!1,isSigner:!1},{name:"dealTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"deal-token-account"}]}},{name:"liquidityPoolTokenAccount",isMut:!0,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"updateInterestRepaidUntilLastUpscale",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"marketAdmins",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"const",type:"string",value:"admins"}]}},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"deal",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal.borrower"},{kind:"account",type:"u16",account:"Deal",path:"deal.deal_number"},{kind:"const",type:"string",value:"deal-info"}]}},{name:"dealTranches",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"Deal",path:"deal"},{kind:"const",type:"string",value:"tranches"}]}}],args:[{name:"trancheInterestRepaid",type:{vec:"u64"}}]},{name:"depositFromRemote",docs:["Remaining accounts are required for this instruction check `WormholeAccounts` to know the address."],accounts:[{name:"payer",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"crossChainInvestor",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"CrossChainInvestor",path:"cross_chain_investor.investor_chain_address"},{kind:"const",type:"string",value:"cross-chain-investor"}]}},{name:"baseTokenAccount",isMut:!0,isSigner:!1},{name:"lpTokenAccount",isMut:!0,isSigner:!1},{name:"baseTokenMint",isMut:!0,isSigner:!1},{name:"lpTokenMint",isMut:!0,isSigner:!1},{name:"wormholeMintAuthorityWrapped",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"mint_signer"}]}},{name:"redeemerAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"redeemer"}]}},{name:"liquidityPoolTokenAccount",isMut:!0,isSigner:!1},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"CrossChainInvestor",path:"cross_chain_investor"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"clock",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1}],args:[{name:"nonce",type:"u32"}]},{name:"withdrawFromRemote",accounts:[{name:"payer",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"programState",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"program-state"}]}},{name:"credixMultisigKey",isMut:!1,isSigner:!1},{name:"credixMultisigTokenAccount",isMut:!0,isSigner:!1},{name:"treasuryPoolTokenAccount",isMut:!0,isSigner:!1},{name:"crossChainInvestor",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"CrossChainInvestor",path:"cross_chain_investor.investor_chain_address"},{kind:"const",type:"string",value:"cross-chain-investor"}]}},{name:"baseTokenAccount",isMut:!0,isSigner:!1},{name:"lpTokenAccount",isMut:!0,isSigner:!1},{name:"baseTokenMint",isMut:!0,isSigner:!1},{name:"lpTokenMint",isMut:!0,isSigner:!1},{name:"redeemerAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"const",type:"string",value:"redeemer"}]}},{name:"liquidityPoolTokenAccount",isMut:!0,isSigner:!1},{name:"credixPass",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"},{kind:"account",type:"publicKey",account:"CrossChainInvestor",path:"cross_chain_investor"},{kind:"const",type:"string",value:"credix-pass"}]}},{name:"wormholeMessageBase",isMut:!0,isSigner:!0},{name:"clock",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1}],args:[{name:"nonce",type:"u32"}]}],accounts:[{name:"borrowerInfo",type:{kind:"struct",fields:[{name:"numOfDeals",type:"u16"},{name:"bump",type:"u8"}]}},{name:"credixPass",type:{kind:"struct",fields:[{name:"bump",type:"u8"},{name:"isBorrower",type:"bool"},{name:"isInvestor",type:"bool"},{name:"active",type:"bool"},{name:"releaseTimestamp",type:"i64"},{name:"user",type:"publicKey"},{name:"disableWithdrawalFee",type:"bool"},{name:"bypassWithdrawEpochs",type:"bool"}]}},{name:"crossChainInvestor",type:{kind:"struct",fields:[{name:"bump",type:"u8"},{name:"chainId",type:"u16"},{name:"investorChainAddress",type:"publicKey"}]}},{name:"dealClaims",type:{kind:"struct",fields:[{name:"trancheClaims",type:{vec:{defined:"TrancheClaim"}}},{name:"lpClaims",type:{vec:{defined:"LpClaim"}}}]}},{name:"dealTranches",type:{kind:"struct",fields:[{name:"bump",type:"u8"},{name:"totalTranches",type:"u8"},{name:"tranches",type:{array:[{defined:"DealTranche"},10]}}]}},{name:"deal",type:{kind:"struct",fields:[{name:"name",type:"string"},{name:"borrower",type:"publicKey"},{name:"amountWithdrawn",docs:["The principal amount withdrawn from deal token account by borrower"],type:"u64"},{name:"fixedLateFeePercentage",type:{defined:"Fraction"}},{name:"earlyRedemptionFees",type:"u64"},{name:"earlyRedemptionFeesRepaid",type:"u64"},{name:"unusedField1",type:"u16"},{name:"goLiveAt",type:"i64"},{name:"createdAt",type:"i64"},{name:"maxFundingDuration",docs:["The number of days after tranche investors can call burn tranches if the deal does not goes live."],type:"u8"},{name:"slashInterestToPrincipal",type:"bool"},{name:"slashPrincipalToInterest",type:"bool"},{name:"unusedField2",type:{array:["u8",6]}},{name:"dealNumber",type:"u16"},{name:"bump",type:"u8"},{name:"fixedLateFees",type:"u64"},{name:"lateFeesRepaid",type:"u64"},{name:"defaulted",type:"bool"},{name:"trueWaterfall",type:"bool"},{name:"openedAt",type:"i64"},{name:"performanceFeePercentage",docs:["Percentage of the interest share taken as the fees [asset manager fees + credix fees]"],type:{defined:"Fraction"}},{name:"gracePeriod",docs:["The number of days after the due date that no late fees are applied"],type:"u8"},{name:"variableLateFees",type:"u64"},{name:"variableLateFeePercentage",type:{defined:"Fraction"}},{name:"serviceFeePercentage",docs:["The percentage of the outstanding principal that is charged as an annual fee, going to the asset manager\u2019s treasury (+ credix\u2019 treasury)"],type:{defined:"Fraction"}},{name:"serviceFees",type:"u64"},{name:"serviceFeesRepaid",type:"u64"},{name:"yearLatestServiceFeesCharged",docs:["Used to keep track of the year service fee is charged for."],type:"u8"},{name:"migrated",docs:["true when we bring off chain deal onchain."],type:"bool"},{name:"originalGoLiveAt",docs:["When upscaling we store the `go_live_at` timestamp here and reset `go_live_at`.","We do this so the deal is no longer regarded as in progress, requiring a new activation.","Across all upscales, the initial point of activation should always be regarded as the `go_live_at` so we need to be able to restore it."],type:"i64"}]}},{name:"globalMarketState",type:{kind:"struct",fields:[{name:"unusedPubkey",type:"publicKey"},{name:"baseTokenMint",type:"publicKey"},{name:"lpTokenMint",type:"publicKey"},{name:"poolOutstandingCredit",docs:["The amount from senior tranche lent"],type:"u64"},{name:"treasuryPoolTokenAccount",type:"publicKey"},{name:"signingAuthorityBump",type:"u8"},{name:"bump",type:"u8"},{name:"performanceFee",docs:["The percentage of interest share collected as fees[asset manager fees + credix share]"],type:{defined:"Fraction"}},{name:"withdrawalFee",docs:["The fee charged for withdrawals"],type:{defined:"Fraction"}},{name:"frozen",type:"bool"},{name:"seed",type:"string"},{name:"gracePeriod",docs:["The number of days after the due date that no late fees are applied"],type:"u8"},{name:"fixedLateFeePercentage",type:{defined:"Fraction"}},{name:"variableLateFeePercentage",type:{defined:"Fraction"}},{name:"serviceFeePercentage",type:{defined:"Fraction"}},{name:"credixPerformanceFeePercentage",docs:["The percentage of the credix_performance_fee_percentage going to the Credix treasury"],type:{defined:"Fraction"}},{name:"credixServiceFeePercentage",docs:["The percentage of the service_fee going to the Credix treasury"],type:{defined:"Fraction"}},{name:"poolSizeLimitPercentage",docs:["Maximum possible deposit limit in addition the pool outstanding credit","pool_size_limit = pool_outstanding_credit + pool_size_limit_percentage * pool_outstanding_credit"],type:{defined:"Fraction"}},{name:"withdrawEpochRequestSeconds",type:"u32"},{name:"withdrawEpochRedeemSeconds",type:"u32"},{name:"withdrawEpochAvailableLiquiditySeconds",type:"u32"},{name:"latestWithdrawEpochIdx",type:"u32"},{name:"latestWithdrawEpochEnd",type:"i64"},{name:"lockedLiquidity",type:"u64"},{name:"totalRedeemedBaseAmount",type:"u64"},{name:"hasWithdrawEpochs",type:"bool"},{name:"redeemAuthorityBump",docs:["This is only used for wormhole related token transfer occurs."],type:"u8"}]}},{name:"investorTranche",type:{kind:"struct",fields:[{name:"bump",type:"u8"},{name:"trancheIndex",type:"u8"},{name:"investor",type:"publicKey"},{name:"amountWithdrawn",type:"u64"}]}},{name:"marketAdmins",type:{kind:"struct",fields:[{name:"multisig",type:"publicKey"},{name:"managers",type:{vec:"publicKey"}},{name:"passIssuers",type:{vec:"publicKey"}}]}},{name:"programState",type:{kind:"struct",fields:[{name:"credixMultisigKey",type:"publicKey"},{name:"credixManagers",type:{array:["publicKey",10]}},{name:"credixPerformanceFeePercentage",docs:["Percentage of the interest share taken as the fees [asset manager fees + credix fees]"],type:{defined:"Fraction"}},{name:"credixServiceFeePercentage",docs:["Percentage of credix share in the performance fees"],type:{defined:"Fraction"}}]}},{name:"repaymentSchedule",type:{kind:"struct",fields:[{name:"periodDuration",type:"u8"},{name:"daysInYear",type:"u16"},{name:"totalPeriods",type:"u16"},{name:"periods",type:{vec:{defined:"RepaymentPeriod"}}}]}},{name:"trancheInfo",type:{kind:"struct",fields:[{name:"snapshots",type:{vec:{defined:"TrancheSnapshot"}}}]}},{name:"tranchePass",type:{kind:"struct",fields:[{name:"bump",type:"u8"},{name:"active",type:"bool"},{name:"investor",type:"publicKey"},{name:"deal",type:"publicKey"},{name:"trancheIndex",type:"u8"},{name:"deposits",docs:["The legacy deposits are not added to this vec."],type:{vec:{defined:"UpscaleDeposits"}}}]}},{name:"withdrawEpoch",type:{kind:"struct",fields:[{name:"goLive",type:"i64"},{name:"requestSeconds",type:"u32"},{name:"redeemSeconds",type:"u32"},{name:"availableLiquiditySeconds",type:"u32"},{name:"totalRequestedBaseAmount",type:"u64"},{name:"participatingInvestorsTotalLpAmount",type:"u64"}]}},{name:"withdrawRequest",type:{kind:"struct",fields:[{name:"baseAmount",type:"u64"},{name:"baseAmountWithdrawn",type:"u64"},{name:"investorTotalLpAmount",type:"u64"}]}}],types:[{name:"TrancheUpscaleConfig",type:{kind:"struct",fields:[{name:"upscaleSize",type:"u64"},{name:"returnPercentage",type:{defined:"Fraction"}},{name:"maxDepositPercentage",type:{defined:"Fraction"}},{name:"earlyWithdrawalInterest",type:"bool"},{name:"earlyWithdrawalPrincipal",type:"bool"}]}},{name:"TrancheConfig",type:{kind:"struct",fields:[{name:"size",type:{defined:"Fraction"}},{name:"returnPercentage",type:{defined:"Fraction"}},{name:"maxDepositPercentage",type:{defined:"Fraction"}},{name:"earlyWithdrawalInterest",type:"bool"},{name:"earlyWithdrawalPrincipal",type:"bool"}]}},{name:"TrancheClaim",type:{kind:"struct",fields:[{name:"trancheIndex",type:"u8"},{name:"claimableAmount",type:"u64"},{name:"claimedAmount",type:"u64"},{name:"investor",type:"publicKey"}]}},{name:"LpClaim",type:{kind:"struct",fields:[{name:"claimBaseAmount",docs:["base amount deposited"],type:"u64"},{name:"claimableLpAmount",type:"u64"},{name:"claimedLpAmount",type:"u64"},{name:"investor",type:"publicKey"}]}},{name:"TrancheClaimConfig",type:{kind:"struct",fields:[{name:"trancheIndex",type:"u8"},{name:"claimableAmount",type:"u64"},{name:"investor",type:"publicKey"}]}},{name:"LpClaimConfig",type:{kind:"struct",fields:[{name:"claimBaseAmount",type:"u64"},{name:"investor",type:"publicKey"}]}},{name:"DealTranche",type:{kind:"struct",fields:[{name:"index",type:"u8"},{name:"size",type:"u64"},{name:"expectedReturn",type:{defined:"Fraction"}},{name:"amountDeposited",type:"u64"},{name:"interestRepaid",type:"u64"},{name:"principalRepaid",type:"u64"},{name:"tokenMint",type:"publicKey"},{name:"maxDepositPercentage",type:{defined:"Fraction"}},{name:"earlyWithdrawalInterest",type:"bool"},{name:"earlyWithdrawalPrincipal",type:"bool"},{name:"withdrawableInterest",type:{defined:"Fraction"}},{name:"withdrawablePrincipal",type:{defined:"Fraction"}},{name:"optionalAccount",type:"bool"},{name:"upscaleSize",type:"u64"},{name:"interestRepaidUntilLastUpscale",type:"u64"},{name:"padding",docs:["Reserved size for extra fields"],type:{array:["u8",11]}}]}},{name:"Fraction",type:{kind:"struct",fields:[{name:"numerator",type:"u32"},{name:"denominator",type:"u32"}]}},{name:"RepaymentPeriod",type:{kind:"struct",fields:[{name:"principal",type:"u64"},{name:"interest",type:"u64"},{name:"totalInterestExpected",type:"u64"},{name:"totalPrincipalExpected",type:"u64"},{name:"principalRepaid",type:"u64"},{name:"interestRepaid",type:"u64"}]}},{name:"RepaymentPeriodInput",type:{kind:"struct",fields:[{name:"principal",type:"u64"},{name:"interest",type:"u64"}]}},{name:"TrancheSnapshot",type:{kind:"struct",fields:[{name:"createdAt",type:"i64"},{name:"interestRepaid",type:"u64"},{name:"principalRepaid",type:"u64"},{name:"size",type:"u64"}]}},{name:"UpscaleDeposits",type:{kind:"struct",fields:[{name:"upscaleIndex",type:"u32"},{name:"amount",type:"u64"}]}},{name:"TransferNativeData",type:{kind:"struct",fields:[{name:"nonce",type:"u32"},{name:"amount",type:"u64"},{name:"fee",type:"u64"},{name:"targetAddress",type:{array:["u8",32]}},{name:"targetChain",type:"u16"}]}},{name:"TransferWrappedData",type:{kind:"struct",fields:[{name:"nonce",type:"u32"},{name:"amount",type:"u64"},{name:"fee",type:"u64"},{name:"targetAddress",type:{array:["u8",32]}},{name:"targetChain",type:"u16"}]}},{name:"DealStatus",type:{kind:"enum",variants:[{name:"Pending"},{name:"Structuring"},{name:"OpenForFunding"},{name:"InProgress"},{name:"Closed"},{name:"Defaulted"}]}},{name:"WithdrawEpochStatus",type:{kind:"enum",variants:[{name:"RequestPhase"},{name:"RedeemPhase"},{name:"AvailableLiquidityPhase"},{name:"Closed"}]}},{name:"Instructions",type:{kind:"enum",variants:[{name:"Initialize"},{name:"AttestToken"},{name:"CompleteNative"},{name:"CompleteWrapped"},{name:"TransferWrapped"},{name:"TransferNative"},{name:"RegisterChain"},{name:"CreateWrapped"},{name:"UpgradeContract"},{name:"CompleteNativeWithPayload"},{name:"CompleteWrappedWithPayload"},{name:"TransferWrappedWithPayload"},{name:"TransferNativeWithPayload"}]}},{name:"PortalError",type:{kind:"enum",variants:[{name:"CustomZeroError"}]}}],events:[{name:"DealCreationEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1},{name:"borrower",type:"publicKey",index:!1},{name:"dealNumber",type:"u16",index:!1}]},{name:"DealActivationEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1},{name:"seniorTrancheSize",type:"u64",index:!1}]},{name:"BurnTrancheTokensEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1},{name:"trancheIndex",type:"u8",index:!1},{name:"amount",type:"u64",index:!1},{name:"investor",type:"publicKey",index:!1}]},{name:"CreateCredixPassEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"passHolder",type:"publicKey",index:!1},{name:"pass",type:"publicKey",index:!1},{name:"borrower",type:"bool",index:!1},{name:"investor",type:"bool",index:!1},{name:"releaseTimestamp",type:"i64",index:!1},{name:"disableWithdrawalFee",type:"bool",index:!1}]},{name:"CreateTranchePassEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1},{name:"passHolder",type:"publicKey",index:!1},{name:"tranchePass",type:"publicKey",index:!1},{name:"trancheIndex",type:"u8",index:!1}]},{name:"DealRepaymentEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1},{name:"amountRepaid",type:"u64",index:!1},{name:"treasury",type:"u64",index:!1},{name:"poolRepaid",type:"u64",index:!1}]},{name:"DepositEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"investor",type:"publicKey",index:!1},{name:"amount",type:"u64",index:!1},{name:"liquidityPoolAmount",type:"u64",index:!1},{name:"investorLpTokenAmount",type:"u64",index:!1},{name:"lpTokenSupply",type:"u64",index:!1},{name:"globalMarketState",type:"publicKey",index:!1},{name:"globalMarketStateSeed",type:"string",index:!1}]},{name:"DepositTrancheEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1},{name:"trancheIndex",type:"u8",index:!1},{name:"investor",type:"publicKey",index:!1},{name:"amount",type:"u64",index:!1}]},{name:"OpenDealEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1}]},{name:"SetTranchesEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1},{name:"dealTranches",type:"publicKey",index:!1}]},{name:"SetRepaymentScheduleEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1},{name:"repaymentSchedule",type:"publicKey",index:!1}]},{name:"UpdateCredixPassEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"passHolder",type:"publicKey",index:!1},{name:"active",type:"bool",index:!1},{name:"borrower",type:"bool",index:!1},{name:"investor",type:"bool",index:!1},{name:"releaseTimestamp",type:"i64",index:!1},{name:"pass",type:"publicKey",index:!1},{name:"disableWithdrawalFee",type:"bool",index:!1}]},{name:"FreezeGlobalMarketStateEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1}]},{name:"ThawGlobalMarketStateEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1}]},{name:"UpdateTranchePassEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1},{name:"passHolder",type:"publicKey",index:!1},{name:"trancheIndex",type:"u8",index:!1},{name:"active",type:"bool",index:!1},{name:"pass",type:"publicKey",index:!1}]},{name:"DealWithdrawEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1},{name:"amount",type:"u64",index:!1}]},{name:"WithdrawEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"investor",type:"publicKey",index:!1},{name:"amount",type:"u64",index:!1},{name:"liquidityPoolAmount",type:"u64",index:!1},{name:"investorLpTokenAmount",type:"u64",index:!1},{name:"lpTokenSupply",type:"u64",index:!1},{name:"treasuryAmount",type:"u64",index:!1},{name:"globalMarketState",type:"publicKey",index:!1},{name:"globalMarketStateSeed",type:"string",index:!1}]},{name:"WithdrawTrancheEvent",fields:[{name:"major",type:"u8",index:!0},{name:"minor",type:"u8",index:!1},{name:"patch",type:"u8",index:!1},{name:"timestamp",type:"i64",index:!1},{name:"market",type:"publicKey",index:!1},{name:"deal",type:"publicKey",index:!1},{name:"trancheIndex",type:"u8",index:!1},{name:"amount",type:"u64",index:!1}]}],errors:[{code:6e3,name:"UnauthorizedSigner",msg:"The Signer is not authorized to use this instruction."},{code:6001,name:"CredixPassInvalid",msg:"Credix pass is invalid for this request."},{code:6002,name:"CredixPassInactive",msg:"Credix pass is inactive at the moment."},{code:6003,name:"NotEnoughBaseTokens",msg:"Not enough Base tokens."},{code:6004,name:"MarketIsFrozen",msg:"This market is currently frozen. Please try again later."},{code:6005,name:"InvalidBorrowerTokenAccount",msg:"Invalid Borrower Token Account."},{code:6006,name:"InvalidBorrowerAccount",msg:"Invalid Borrower Account."},{code:6007,name:"InvalidInvestorTokenAccount",msg:"Invalid Investor Token Account."},{code:6008,name:"InvalidTokenAccountMint",msg:"Invalid mint for Token Account."},{code:6009,name:"InvalidMintAccount",msg:"Invalid mint Account."},{code:6010,name:"InvalidTreasuryAccount",msg:"Invalid treasury Account for this market."},{code:6011,name:"WithdrawalsLocked",msg:"Not yet possible to withdraw funds."},{code:6012,name:"TotalTrancheSizeNotOne",msg:"Total tranche size should be one."},{code:6013,name:"TotalTrancheReturnsNotOne",msg:"Total tranche returns should be one."},{code:6014,name:"InvalidTrancheSizeOrReturns",msg:"A tranche with a size should have a value for its returns and vice versa."},{code:6015,name:"InvalidTrancheIndex",msg:"There is no tranche in the deal with the provided index."},{code:6016,name:"DealNotOpen",msg:"This deal is not open for funding yet."},{code:6017,name:"TranchePassInactive",msg:"Tranche pass is inactive at the moment."},{code:6018,name:"InvalidInstructionDepositTranche",msg:"Deposit Tranche instruction doesn't exist for senior tranche(index=1)."},{code:6019,name:"NotEnoughTokens",msg:"Not enough tokens"},{code:6020,name:"DealNotOpenForActivation",msg:"A deal can only be activated once all tranches(except for the senior tranche at index 1) have been filled."},{code:6021,name:"DealNotInProgress",msg:"Deal not in progress"},{code:6022,name:"DealNotOpenForFunding",msg:"Deal not open for funding"},{code:6023,name:"InvalidDealTokenAccount",msg:"Invalid deal token account."},{code:6024,name:"DealNotOpenForBurningTranches",msg:"Deal not open for burning tranches"},{code:6025,name:"InvalidSeniorTrancheInstruction",msg:"This instruction is invalid for senior tranche."},{code:6026,name:"RepaymentPeriodsMissing",msg:"Repayment periods not fully set"},{code:6027,name:"DealTrancheWithdrawalClosed",msg:"Deal not open for tranche withdrawal"},{code:6028,name:"DealNotPending",msg:"Deal is not pending"},{code:6029,name:"RepaymentPeriodsAlreadySet",msg:"Repayment periods already set"},{code:6030,name:"TotalPeriodsExceeded",msg:"Total periods exceeded"},{code:6031,name:"InvalidRepaymentSchedule",msg:"Invalid repayment schedule"},{code:6032,name:"WrongAmountTrancheConfigs",msg:"Wrong number of tranche configs: expected 10"},{code:6033,name:"TrancheFunded",msg:"Tranche already funded"},{code:6034,name:"TransferSafeguard",msg:"Transfer safeguard"},{code:6035,name:"MaxManagersExceeded",msg:"Too many managers specified. Max: 10"},{code:6036,name:"MaxPassIssuersExceeded",msg:"Too many pass issuers specified. Max: 5"},{code:6037,name:"InvalidPassInstructionSigner",msg:"The signer does not have permission to issue passes."},{code:6038,name:"BaseDepositLimitExceeded",msg:"The max deposit amount limit reached. Please try again later."},{code:6039,name:"DaysInYearPeriodDurationRest",msg:"Days in year is not a multiple of period duration"},{code:6040,name:"CredixPassNotAuthorized",msg:"The signer is not authorized to call the Withdraw Funds instruction."},{code:6041,name:"WithdrawEpochAlreadyRunning",msg:"A withdraw epoch is already running."},{code:6042,name:"WithdrawEpochNotInRequestPhase",msg:"Withdraw epoch is in its redeem phase or Available liquidity phase and no new withdraw requests are accepted"},{code:6043,name:"WithdrawEpochInRequestPhase",msg:"Withdraw epoch is in request phase. Please try again later."},{code:6044,name:"WithdrawEpochAlreadyEnded",msg:"Withdraw epoch has already ended. Please create a new one using th create withdraw epoch instruction."},{code:6045,name:"MintNotOwnedByCredix",msg:"The passed mint account is not initialized by credix program or does not have a freeze authority."},{code:6046,name:"NoLiquidityOrLockedLiquidity",msg:"There is no less liquidity or it is locked for a withdraw epoch."},{code:6047,name:"InvalidMigrateDealInstruction",msg:"This instruction is not valid for a migrated deal."},{code:6048,name:"PeriodDurationIsZero",msg:"Period duration is zero"},{code:6049,name:"MigrateDealInstruction",msg:"This instruction is only for migrated deals."},{code:6050,name:"DuplicateTrancheClaimsInvestors",msg:"Tranche claim configs 2 or more claims with same investor and tranche index."},{code:6051,name:"DuplicateLpClaimsInvestor",msg:"Lp claim configs contains 2 or more claims with same investor."},{code:6052,name:"TrancheClaimForSeniorTranche",msg:"Tranche claim data invalid provide tranche claims for senior tranche, Use lp claims instead."},{code:6053,name:"TrancheClaimAmountInvalid",msg:"Tranche claims base amounts don't add up to the tranche size."},{code:6054,name:"DealNotOpenForClaims",msg:"This migrated deal hasn't been activated yet. It is not open for claims"},{code:6055,name:"TrancheClaimIndexOutOfBounds",msg:"The tranche claim index is greater then tranche claims length."},{code:6056,name:"TrancheClaimInvalidInvestor",msg:"The tranche claim index provided belongs to other investor."},{code:6057,name:"TrancheClaimInvalidIndex",msg:"The tranche claim index provided belongs to other tranche index."},{code:6058,name:"LpClaimIndexOutOfBounds",msg:"The tranche claim index is greater then tranche claims length."},{code:6059,name:"LpClaimInvestorInvalid",msg:"The lp claim index provided belongs to other investor."},{code:6060,name:"ModifyingRepaidPeriods",msg:"Can not modify partially repaid periods."},{code:6061,name:"DealPrincipalModified",msg:"Can not modify total principal expected in the repayment schedule."},{code:6062,name:"StructuringDealForbidden",msg:"Deal should pending or structuring to (re)set the repayment schedule"},{code:6063,name:"RepaymentScheduleMissing",msg:"Repayment schedule is required for sell order with tranche token"},{code:6064,name:"DealMissing",msg:"Deal is required for sell order with tranche token"},{code:6065,name:"TranchePassMissing",msg:"Tranche Pass is required for sell order with tranche token"},{code:6066,name:"DealTranchesMissing",msg:"Deal Tranches is required for sell order with tranche token"},{code:6067,name:"SellerTrancheMissing",msg:"Seller Tranche is required for sell order with tranche token"},{code:6068,name:"WrongAmountTrancheUpscaleConfigs",msg:"Wrong number upscale of tranche configs: expected 10"},{code:6069,name:"MissingTrancheInfoAccount",msg:"The instruction expected tranche info account: Found None"},{code:6070,name:"RepaymentPeriodNotFound",msg:"Repayment period index not found"},{code:6071,name:"TrancheRepaymentMissing",msg:"Tranche repayments missing, Can not adjusts tranches."},{code:6072,name:"PrincipalAlreadyPartiallyPaidBack",msg:"Principal already paid back, not possible to upscale."},{code:6073,name:"DealReceivedEarlyInterestPayments",msg:"Received early interest payments, not possible to upscale."},{code:6074,name:"MarketHasNoWithdrawEpochs",msg:"Withdraw epochs are not enabled for this market"},{code:6075,name:"InvalidTokenTransferPayload",msg:"Token transfer payload id is not 3."},{code:6076,name:"PayloadFromAddressDoesNotMatch",msg:"Wormhole from address of token does not match"},{code:6077,name:"WormholeCPICallResultInvalid",msg:"Wormhole smart contracts are acting as bad actors."},{code:6078,name:"InvalidTokenTransferPayloadId",msg:"Token transfer payload id is not 1."}]}},34265:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDL=void 0,t.IDL={version:"0.1.0",name:"credix_secondary_market",instructions:[{name:"initializeSecondaryMarket",accounts:[{name:"owner",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"marketAdmins",isMut:!1,isSigner:!1},{name:"secondaryMarket",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"signingAuthority",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"SecondaryMarket",path:"secondary_market"}]}},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"initializeSellOrder",accounts:[{name:"seller",isMut:!0,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"secondaryMarket",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"sellerInfo",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"SecondaryMarket",path:"secondary_market"},{kind:"account",type:"publicKey",path:"seller"},{kind:"const",type:"string",value:"seller-info"}]}},{name:"credixSigningAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"SecondaryMarket",path:"secondary_market"}]}},{name:"credixProgramState",isMut:!1,isSigner:!1},{name:"tokenAMint",isMut:!0,isSigner:!1},{name:"tokenBMint",isMut:!0,isSigner:!1},{name:"sellerTokenAAccount",isMut:!0,isSigner:!1},{name:"sellerTokenBAccount",isMut:!0,isSigner:!1},{name:"sellOrder",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"SecondaryMarket",path:"secondary_market"},{kind:"account",type:"publicKey",path:"seller"},{kind:"account",type:"u16",account:"SellerInfo",path:"seller_info.seller_number_of_sell_orders"},{kind:"const",type:"string",value:"order"}]}},{name:"vaultTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"SellOrder",path:"sell_order"}]}},{name:"credixPass",isMut:!1,isSigner:!1},{name:"repaymentSchedule",isMut:!1,isSigner:!1,isOptional:!0},{name:"deal",isMut:!1,isSigner:!1,isOptional:!0},{name:"tranchePass",isMut:!1,isSigner:!1,isOptional:!0},{name:"dealTranches",isMut:!1,isSigner:!1,isOptional:!0},{name:"sellerTranche",isMut:!1,isSigner:!1,isOptional:!0},{name:"credixProgram",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"rent",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amountA",type:"u64"},{name:"trancheIndex",type:{option:"u8"}},{name:"amountB",type:"u64"},{name:"buyer",type:{option:"publicKey"}}]},{name:"fillSellOrder",accounts:[{name:"buyer",isMut:!0,isSigner:!0},{name:"seller",isMut:!1,isSigner:!1},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"secondaryMarket",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"credixSigningAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"SecondaryMarket",path:"secondary_market"}]}},{name:"credixProgramState",isMut:!1,isSigner:!1},{name:"tokenAMint",isMut:!1,isSigner:!1},{name:"tokenBMint",isMut:!1,isSigner:!1},{name:"sellerTokenBAccount",isMut:!0,isSigner:!1},{name:"buyerTokenAAccount",isMut:!0,isSigner:!1},{name:"buyerTokenBAccount",isMut:!0,isSigner:!1},{name:"sellOrder",isMut:!0,isSigner:!1},{name:"vaultTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"SellOrder",path:"sell_order"}]}},{name:"buyerCredixPass",isMut:!1,isSigner:!1},{name:"sellerCredixPass",isMut:!1,isSigner:!1},{name:"repaymentSchedule",isMut:!1,isSigner:!1,isOptional:!0},{name:"deal",isMut:!1,isSigner:!1,isOptional:!0},{name:"buyerTranchePass",isMut:!1,isSigner:!1,isOptional:!0},{name:"sellerTranchePass",isMut:!1,isSigner:!1,isOptional:!0},{name:"dealTranches",isMut:!1,isSigner:!1,isOptional:!0},{name:"credixProgram",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"trancheIndex",type:{option:"u8"}}]},{name:"cancelSellOrder",accounts:[{name:"seller",isMut:!1,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"secondaryMarket",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"credixSigningAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}},{name:"signingAuthority",isMut:!1,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"SecondaryMarket",path:"secondary_market"}]}},{name:"credixProgramState",isMut:!1,isSigner:!1},{name:"tokenAMint",isMut:!1,isSigner:!1},{name:"sellerTokenAAccount",isMut:!0,isSigner:!1},{name:"sellOrder",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"SecondaryMarket",path:"secondary_market"},{kind:"account",type:"publicKey",path:"seller"},{kind:"arg",type:"u16",path:"sell_order_number"},{kind:"const",type:"string",value:"order"}]}},{name:"vaultTokenAccount",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"SellOrder",path:"sell_order"}]}},{name:"credixPass",isMut:!1,isSigner:!1},{name:"credixProgram",isMut:!1,isSigner:!1},{name:"associatedTokenProgram",isMut:!1,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1}],args:[{name:"sellOrderNumber",type:"u16"}]},{name:"freezeOrThawSecondaryMarket",accounts:[{name:"owner",isMut:!1,isSigner:!0},{name:"globalMarketState",isMut:!1,isSigner:!1},{name:"marketAdmins",isMut:!1,isSigner:!1},{name:"credixProgramState",isMut:!1,isSigner:!1},{name:"secondaryMarket",isMut:!0,isSigner:!1,pda:{seeds:[{kind:"account",type:"publicKey",account:"GlobalMarketState",path:"global_market_state"}]}}],args:[{name:"freeze",type:"bool"}]}],accounts:[{name:"secondaryMarket",type:{kind:"struct",fields:[{name:"credixMarketPubkey",type:"publicKey"},{name:"frozen",type:"bool"}]}},{name:"sellOrder",type:{kind:"struct",fields:[{name:"seller",type:"publicKey"},{name:"tokenAMint",type:"publicKey"},{name:"tokenBMint",type:"publicKey"},{name:"buyer",type:{option:"publicKey"}},{name:"sellAmount",type:"u64"},{name:"receiveAmount",type:"u64"},{name:"createdAt",type:"i64"},{name:"filledAt",type:"i64"},{name:"active",type:"bool"},{name:"hasTrancheToken",type:"bool"},{name:"deal",type:{option:"publicKey"}},{name:"trancheIndex",type:{option:"u8"}}]}},{name:"sellerInfo",type:{kind:"struct",fields:[{name:"sellerNumberOfSellOrders",type:"u16"}]}},{name:"signingAuthority",type:{kind:"struct",fields:[]}}],types:[{name:"Fraction",type:{kind:"struct",fields:[{name:"numerator",type:"u32"},{name:"denominator",type:"u32"}]}}],errors:[{code:6e3,name:"InactiveSellOrder",msg:"Sell Order is inactive"},{code:6001,name:"InvalidSeller",msg:"Seller is invalid"},{code:6002,name:"AccountNotFrozen",msg:"Account is not frozen"},{code:6003,name:"MarketIsFrozen",msg:"Secondary Market is frozen at the moment. Please try again later."},{code:6004,name:"InvalidBuyer",msg:"Buyer not same as specified in sell order"},{code:6005,name:"TokenNotSupportedYet",msg:"Selling and buying the tokens of the tranche that has been adjusted is not supported yet."}]}},61936:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountNames=void 0,function(e){e.Deal="Deal",e.CredixPass="credixPass",e.GlobalMarketState="globalMarketState",e.BorrowerInfo="borrowerInfo",e.Tranches="dealTranches",e.InvestorTranche="investorTranche",e.TranchePass="tranchePass",e.RepaymentSchedule="repaymentSchedule",e.ProgramState="programState",e.MarketAdmins="marketAdmins",e.DealClaims="dealClaims",e.WithdrawRequest="withdrawRequest",e.WithdrawEpoch="withdrawEpoch"}(t.AccountNames||(t.AccountNames={}))},87564:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.calculateFinancingFee=t.calculateAvgFinancingFee=t.calculateAnnualIrr=t.useCredixClient=void 0,o(n(72786),t),o(n(14364),t),o(n(55439),t),o(n(15780),t),o(n(44381),t),o(n(7664),t),o(n(50669),t),o(n(78497),t),o(n(44592),t),o(n(62494),t),o(n(83303),t),o(n(38534),t),o(n(83179),t),o(n(17741),t),o(n(83659),t),o(n(76152),t),o(n(42775),t),o(n(14251),t),o(n(98642),t),o(n(39317),t),o(n(31410),t),o(n(31444),t);var r=n(82104);Object.defineProperty(t,"useCredixClient",{enumerable:!0,get:function(){return r.useCredixClient}}),o(n(20310),t),o(n(8887),t);var i=n(10686);Object.defineProperty(t,"calculateAnnualIrr",{enumerable:!0,get:function(){return i.calculateAnnualIrr}}),Object.defineProperty(t,"calculateAvgFinancingFee",{enumerable:!0,get:function(){return i.calculateAvgFinancingFee}}),Object.defineProperty(t,"calculateFinancingFee",{enumerable:!0,get:function(){return i.calculateFinancingFee}})},3350:function(e,t,n){"use strict";var a=n(17061).default,o=n(56690).default,r=n(89728).default,i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RepaymentScheduleLoader=void 0;var s=n(14667),c=n(38534),u=n(85065),d=n(61936),l=function(){function e(t,n){o(this,e),this.program=t,this.connection=n}return r(e,[{key:"fetch",value:function(e){return i(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.program.account.repaymentSchedule.fetch(e);case 2:return n=t.sent,t.abrupt("return",new c.RepaymentSchedule(n,e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"fetchForDeals",value:function(e){return i(this,void 0,void 0,a().mark((function t(){var n,o,r,i,l,f,p,b=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.map((function(e){return c.RepaymentSchedule.generatePDA(e)})),t.next=3,Promise.all(n);case 3:return o=t.sent,r=o.map((function(e){return e[0]})),i=(0,s.chunk)(r,u.MAX_NUMBER_OF_ACCOUNT_INFOS-1),t.next=8,Promise.all(i.map((function(e){return b.connection.getMultipleAccountsInfo(e)})));case 8:return l=t.sent,f=l.flat(),p=f.map((function(e){return e&&b.program.coder.accounts.decode(d.AccountNames.RepaymentSchedule,e.data)})),t.abrupt("return",p.map((function(e,t){return e&&new c.RepaymentSchedule(e,r[t])})));case 12:case"end":return t.stop()}}),t)})))}}]),e}();t.RepaymentScheduleLoader=l},27048:function(e,t,n){"use strict";var a=n(17061).default,o=n(56690).default,r=n(89728).default,i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TranchesLoader=void 0;var s=n(14667),c=n(98642),u=n(85065),d=n(61936),l=function(){function e(t,n,a){o(this,e),this.program=t,this.connection=n,this.client=a}return r(e,[{key:"fetchForDeals",value:function(e){return i(this,void 0,void 0,a().mark((function t(){var n,o,r,i,l,f,p,b=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.map((function(e){return c.Tranches.generatePDA(e)})),t.next=3,Promise.all(n);case 3:return o=t.sent,r=o.map((function(e){return e[0]})),i=(0,s.chunk)(r,u.MAX_NUMBER_OF_ACCOUNT_INFOS-1),t.next=8,Promise.all(i.map((function(e){return b.connection.getMultipleAccountsInfo(e)})));case 8:return l=t.sent,f=l.flat(),p=f.map((function(e){return e&&b.program.coder.accounts.decode(d.AccountNames.Tranches,e.data)})),t.abrupt("return",p.map((function(t,n){return t&&new c.Tranches(t,r[n],e[n],b.program,b.client)})));case 12:case"end":return t.stop()}}),t)})))}}]),e}();t.TranchesLoader=l},8887:function(e,t,n){"use strict";var a=n(74704).default,o=n(17061).default,r=n(27424).default,i=n(56690).default,s=n(89728).default,c=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CredixClient=void 0;var u=n(74522),d=n(25877),l=n(97180),f=n(8594),p=n(14364),b=n(55439),m=n(78497),h=n(62494),g=n(28202),y=n(34265),v=n(3350),w=n(27048),k=n(97588),A=n(50069),x=n(32314),I=function(){function e(t,n,a){i(this,e);var o=new u.AnchorProvider(t,n,a.confirmOptions||u.AnchorProvider.defaultOptions()),r=(0,d.makeSaberProvider)(o);this.provider=o,this.program=(0,d.newProgram)(g.IDL,a.programId,r),this.secondaryMarketProgram=(0,d.newProgram)(y.IDL,a.secondaryMarketProgramId,r),this.repaymentScheduleLoader=new v.RepaymentScheduleLoader(this.program,t),this.tranchesLoader=new w.TranchesLoader(this.program,t,this),this.anchorProgram=new u.Program(g.IDL,a.programId,o)}return s(e,[{key:"initializeProgramState",value:function(e,t,n,a){return c(this,void 0,void 0,o().mark((function i(){var s,c,u;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,h.ProgramState.generatePDA(this.program.programId);case 2:return s=o.sent,c=r(s,1),u=c[0],o.abrupt("return",this.anchorProgram.methods.initializeProgramState(e,t,n.toIDLFraction(),a.toIDLFraction()).accounts({owner:this.provider.wallet.publicKey,programState:u,rent:f.SYSVAR_RENT_PUBKEY,systemProgram:f.SystemProgram.programId}).rpc());case 6:case"end":return o.stop()}}),i,this)})))}},{key:"initializeMarketBuilder",value:function(e,t){return c(this,void 0,void 0,o().mark((function n(){var a,i,s,c,u,d,p,b,h,g,y;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.Market.generatePDA(e.name,this.program.programId);case 2:return a=n.sent,i=r(a,1),s=i[0],n.next=7,(0,x.findSigningAuthorityPDA)(s,this.program.programId);case 7:return c=n.sent,u=r(c,1),d=u[0],n.next=12,(0,l.getAssociatedTokenAddress)(e.baseMint,d,!0);case 12:return p=n.sent,n.next=15,(0,l.getAssociatedTokenAddress)(e.baseMint,e.treasury,!0);case 15:return b=n.sent,n.next=18,m.Market.generateLPTokenMintPDA(e.name,this.program.programId);case 18:return h=n.sent,g=r(h,1),y=g[0],n.abrupt("return",this.anchorProgram.methods.initializeMarket(e.name,e.performanceFee.toIDLFraction(),e.withdrawalFee.toIDLFraction(),e.gracePeriod,e.fixedLateFeePercentage.toIDLFraction(),e.variableLateFeePercentage.toIDLFraction(),e.serviceFeePercentage.toIDLFraction(),e.credixPerformanceFeePercentage.toIDLFraction(),e.credixServiceFeePercentage.toIDLFraction(),e.multisig?e.multisig:null,e.managers?e.managers:null,e.passIssuers?e.passIssuers:null,e.withdrawEpochRequestSeconds?e.withdrawEpochRequestSeconds:8*A.SECONDS_IN_DAY,e.withdrawEpochRedeemSeconds?e.withdrawEpochRedeemSeconds:2*A.SECONDS_IN_DAY,e.withdrawEpochAvailableLiquidityPhase?e.withdrawEpochAvailableLiquidityPhase:A.SECONDS_IN_DAY).accounts({owner:t,globalMarketState:s,signingAuthority:d,liquidityPoolTokenAccount:p,treasury:e.treasury,treasuryPoolTokenAccount:b,lpTokenMint:y,baseTokenMint:e.baseMint,rent:f.SYSVAR_RENT_PUBKEY,tokenProgram:l.TOKEN_PROGRAM_ID,systemProgram:f.SystemProgram.programId,associatedTokenProgram:l.ASSOCIATED_TOKEN_PROGRAM_ID}));case 22:case"end":return n.stop()}}),n,this)})))}},{key:"initializeMarket",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.provider.wallet.publicKey,t.next=3,this.initializeMarketBuilder(e,n);case 3:return a=t.sent,t.abrupt("return",a.rpc());case 5:case"end":return t.stop()}}),t,this)})))}},{key:"initializeMarketIx",value:function(e,t){return c(this,void 0,void 0,o().mark((function n(){var a,r;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t||this.provider.wallet.publicKey,n.next=3,this.initializeMarketBuilder(e,a);case 3:return r=n.sent,n.abrupt("return",r.instruction());case 5:case"end":return n.stop()}}),n,this)})))}},{key:"fetchMarket",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,a,i,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.Market.generatePDA(e,this.program.programId);case 2:return n=t.sent,a=r(n,1),i=a[0],t.next=7,this.program.account.globalMarketState.fetchNullable(i);case 7:if(s=t.sent){t.next=10;break}return t.abrupt("return",null);case 10:return t.abrupt("return",new m.Market(s,this.program,i,this.secondaryMarketProgram,this));case 11:case"end":return t.stop()}}),t,this)})))}},{key:"fetchCredixPasses",value:function(){return c(this,void 0,void 0,o().mark((function e(){var t,n,i,s,u=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetchMarkets();case 2:return t=e.sent,e.next=5,this.program.account.credixPass.all();case 5:return n=e.sent,i=function(e,n){var o,i=a(t);try{for(i.s();!(o=i.n()).done;){var s=o.value,c=p.CredixPass.generatePDA(e.user,s);if(r(c,1)[0].equals(n))return s}}catch(u){i.e(u)}finally{i.f()}throw Error("Could not find market for credix pass for user ".concat(e.user.toString()," with address ").concat(n.toString()))},e.next=9,(0,k.asyncMap)(n,(function(e){return c(u,void 0,void 0,o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i(e.account,e.publicKey);case 2:return n=t.sent,t.abrupt("return",{programPass:e.account,address:e.publicKey,market:n});case 4:case"end":return t.stop()}}),t)})))}));case 9:return s=e.sent,e.abrupt("return",s.map((function(e){return new p.CredixPass(e.programPass,e.address,e.market,e.programPass.user)})));case 11:case"end":return e.stop()}}),e,this)})))}},{key:"fetchDealByPublicKey",value:function(e){return c(this,void 0,void 0,o().mark((function t(){var n,i,s,c,u,d,l;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.program.account.deal.fetchNullable(e);case 2:if(n=t.sent){t.next=5;break}return t.abrupt("return",null);case 5:return t.next=7,this.fetchMarkets();case 7:i=t.sent,s=a(i),t.prev=9,s.s();case 11:if((c=s.n()).done){t.next=22;break}return u=c.value,t.next=15,b.Deal.generatePDA(n.borrower,n.dealNumber,u);case 15:if(d=t.sent,l=r(d,1),!l[0].equals(e)){t.next=20;break}return t.abrupt("return",new b.Deal(n,u,e,this.program,this));case 20:t.next=11;break;case 22:t.next=27;break;case 24:t.prev=24,t.t0=t.catch(9),s.e(t.t0);case 27:return t.prev=27,s.f(),t.finish(27);case 30:throw Error("Failed to find the market deal belongs to.");case 31:case"end":return t.stop()}}),t,this,[[9,24,27,30]])})))}},{key:"fetchMarkets",value:function(){return c(this,void 0,void 0,o().mark((function e(){var t,n=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.program.account.globalMarketState.all();case 2:return t=e.sent,e.abrupt("return",t.map((function(e){return new m.Market(e.account,n.program,e.publicKey,n.secondaryMarketProgram,n)})));case 4:case"end":return e.stop()}}),e,this)})))}},{key:"fetchProgramState",value:function(){return c(this,void 0,void 0,o().mark((function e(){var t,n,a,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.ProgramState.generatePDA(this.program.programId),n=r(t,1),a=n[0],e.next=3,this.program.account.programState.fetch(a);case 3:return i=e.sent,e.abrupt("return",new h.ProgramState(a,i,this.program,this));case 5:case"end":return e.stop()}}),e,this)})))}}]),e}();t.CredixClient=I},97588:function(e,t,n){"use strict";var a=n(17061).default,o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.asyncMap=t.asyncFilter=void 0,t.asyncFilter=function(e,t){return o(this,void 0,void 0,a().mark((function n(){var o;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all(e.map(t));case 2:return o=n.sent,n.abrupt("return",e.filter((function(e,t){return o[t]})));case 4:case"end":return n.stop()}}),n)})))},t.asyncMap=function(e,t){return Promise.all(e.map(t))}},10686:function(e,t,n){"use strict";var a=n(861).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.calculateAvgFinancingFee=t.calculateFinancingFee=t.calculateAPR=t.calculateAnnualIrr=void 0;var r=o(n(21585)),i=n(14667),s=n(29052),c=n(44381),u=function(e){return e.map((function(e){return e.principal}))},d=function(e){return e.map((function(e){return e.interest}))};t.calculateAnnualIrr=function(e,t,n){var a=u(t.periods),o=e.size.toNumber(),r=e.returnPercentage.toNumber(),c=d(t.periods).map((function(e){return(1-n.toNumber())*e})),l=a.reduce((function(e,t){return e+t}),0),f=o*l,p=c.reduce((function(e,t){return e+t}),0),b=r*p,m=t.periods.length,h=Array(m+1).fill(0);a.unshift(0),c.unshift(0);var g=a.map((function(e){return e*o})),y=c.map((function(e){return r*e}));h[0]=-1*f,e.earlyWithdrawalPrincipal||e.earlyWithdrawalInterest?e.earlyWithdrawalPrincipal&&e.earlyWithdrawalInterest?(h=(0,i.zipWith)(h,g,i.add),h=(0,i.zipWith)(h,y,i.add)):e.earlyWithdrawalPrincipal?(h=(0,i.zipWith)(h,g,i.add))[h.length-1]=h[h.length-1]+b:(h=(0,i.zipWith)(h,y,i.add))[h.length-1]=h[h.length-1]+f:h[h.length-1]=f+b;var v=(0,s.irr)(h),w=t.daysInYear/t.periodDuration;return Math.pow(1+v,w)-1};t.calculateAPR=function(e,t,n){if(0===e.periods.length)throw new Error("Cannot calculate financing fee for a config with no periods");var a=u(e.periods).map((function(e){return t.size.apply(e).toNumber()})),o=l(a,e.periods.length),r=d(e.periods).map((function(e){return t.returnPercentage.apply(1-n.toNumber()).mul(e).toNumber()})),s=(0,i.zipWith)(r,o,i.divide),f=e.daysInYear/e.periodDuration,p=(0,i.sum)(s);return new c.Fraction(p*f,e.periods.length)};t.calculateFinancingFee=function(e){if(0===e.periods.length)throw new Error("Cannot calculate financing fee for a config with no periods");var t=u(e.periods),n=l(t,e.periods.length),a=d(e.periods),o=(0,i.zipWith)(a,n,i.divide),r=e.daysInYear/e.periodDuration,s=(0,i.sum)(o);return new c.Fraction(s*r,e.periods.length)};t.calculateAvgFinancingFee=function(e){if(0===e.length)return new c.Fraction(0,1);var t=e.reduce((function(e,t){return e.add(new r.default(t.totalPrincipal.amount))}),new r.default(0)),n=e.reduce((function(e,t){return e.add(new r.default(t.calculateFinancingFee().toNumber()).mul(new r.default(t.totalPrincipal.amount)))}),new r.default(0));return new c.Fraction(n.toNumber(),t.toNumber())};var l=function(e,t){var n=(0,i.sum)(e),o=[0].concat(a(e.slice(0,-1))),r=[];return o.forEach((function(e,t){var n=r[t-1]||0;r.push(n+e)})),(0,i.zipWith)(Array(t).fill(n),r,i.subtract)}},50069:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.min=t.MILLISECONDS_IN_DAY=t.SECONDS_IN_DAY=t.ZERO=void 0;var o=a(n(21585));t.ZERO=new o.default(0),t.SECONDS_IN_DAY=86400,t.MILLISECONDS_IN_DAY=1e3*t.SECONDS_IN_DAY;t.min=function(){for(var e=arguments.length,t=new Array(e),n=0;n=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.chains=t._getInitializedChains=void 0;var r=o(n(87295)),i=o(n(31227)),s=o(n(40439)),c=o(n(37098)),u=o(n(17687)),d=o(n(49422));function l(e){var t,n,o={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli",11155111:"sepolia"},l={mainnet:r.default,ropsten:i.default,rinkeby:s.default,kovan:c.default,goerli:u.default,sepolia:d.default};if(e)try{for(var f=a(e),p=f.next();!p.done;p=f.next()){var b=p.value,m=b.name;o[b.chainId.toString()]=m,l[m]=b}}catch(h){t={error:h}}finally{try{p&&!p.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}return l.names=o,l}t._getInitializedChains=l,t.chains=l()},96662:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIPs=void 0,t.EIPs={1153:n(96561),1559:n(77523),2315:n(83339),2537:n(26769),2565:n(17897),2718:n(62170),2929:n(88436),2930:n(96213),3198:n(25491),3529:n(20070),3540:n(52256),3541:n(21871),3554:n(47225),3607:n(3968),3651:n(29496),3670:n(74290),3675:n(98571),3855:n(64551),3860:n(94300),4345:n(74818),4399:n(68372),5133:n(4759)}},41476:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",n(60114)],["homestead",n(62800)],["dao",n(7197)],["tangerineWhistle",n(22302)],["spuriousDragon",n(90716)],["byzantium",n(26985)],["constantinople",n(35993)],["petersburg",n(4064)],["istanbul",n(83166)],["muirGlacier",n(42946)],["berlin",n(20015)],["london",n(61250)],["shanghai",n(5553)],["arrowGlacier",n(51971)],["grayGlacier",n(31088)],["mergeForkIdTransition",n(49347)],["merge",n(88648)]]},53517:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsensusAlgorithm=t.ConsensusType=t.Hardfork=t.Chain=t.CustomChain=void 0;var s,c,u=n(55465),d=n(3856),l=n(47772),f=n(29383),p=n(41476),b=n(96662);!function(e){e.PolygonMainnet="polygon-mainnet",e.PolygonMumbai="polygon-mumbai",e.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",e.xDaiChain="x-dai-chain",e.OptimisticKovan="optimistic-kovan",e.OptimisticEthereum="optimistic-ethereum"}(s=t.CustomChain||(t.CustomChain={})),function(e){e[e.Mainnet=1]="Mainnet",e[e.Ropsten=3]="Ropsten",e[e.Rinkeby=4]="Rinkeby",e[e.Kovan=42]="Kovan",e[e.Goerli=5]="Goerli",e[e.Sepolia=11155111]="Sepolia"}(t.Chain||(t.Chain={})),function(e){e.Chainstart="chainstart",e.Homestead="homestead",e.Dao="dao",e.TangerineWhistle="tangerineWhistle",e.SpuriousDragon="spuriousDragon",e.Byzantium="byzantium",e.Constantinople="constantinople",e.Petersburg="petersburg",e.Istanbul="istanbul",e.MuirGlacier="muirGlacier",e.Berlin="berlin",e.London="london",e.ArrowGlacier="arrowGlacier",e.GrayGlacier="grayGlacier",e.MergeForkIdTransition="mergeForkIdTransition",e.Merge="merge",e.Shanghai="shanghai"}(c=t.Hardfork||(t.Hardfork={})),function(e){e.ProofOfStake="pos",e.ProofOfWork="pow",e.ProofOfAuthority="poa"}(t.ConsensusType||(t.ConsensusType={})),function(e){e.Ethash="ethash",e.Clique="clique",e.Casper="casper"}(t.ConsensusAlgorithm||(t.ConsensusAlgorithm={}));var m=function(e){function t(t){var n,a,o,r,s=this;(s=e.call(this)||this)._supportedHardforks=[],s._eips=[],s._customChains=null!==(o=t.customChains)&&void 0!==o?o:[],s._chainParams=s.setChain(t.chain),s.DEFAULT_HARDFORK=null!==(r=s._chainParams.defaultHardfork)&&void 0!==r?r:c.Istanbul;try{for(var u=i(s._chainParams.hardforks),d=u.next();!d.done;d=u.next()){var l=d.value;l.forkHash||(l.forkHash=s._calcForkHash(l.name))}}catch(f){n={error:f}}finally{try{d&&!d.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}return s._hardfork=s.DEFAULT_HARDFORK,t.supportedHardforks&&(s._supportedHardforks=t.supportedHardforks),t.hardfork&&s.setHardfork(t.hardfork),t.eips&&s.setEIPs(t.eips),s}return o(t,e),t.custom=function(e,n){var a;void 0===n&&(n={});var o=null!==(a=n.baseChain)&&void 0!==a?a:"mainnet",i=r({},t._getChainParams(o));if(i.name="custom-chain","string"!==typeof e)return new t(r({chain:r(r({},i),e)},n));if(e===s.PolygonMainnet)return t.custom({name:s.PolygonMainnet,chainId:137,networkId:137},n);if(e===s.PolygonMumbai)return t.custom({name:s.PolygonMumbai,chainId:80001,networkId:80001},n);if(e===s.ArbitrumRinkebyTestnet)return t.custom({name:s.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},n);if(e===s.xDaiChain)return t.custom({name:s.xDaiChain,chainId:100,networkId:100},n);if(e===s.OptimisticKovan)return t.custom({name:s.OptimisticKovan,chainId:69,networkId:69},r({hardfork:c.Berlin},n));if(e===s.OptimisticEthereum)return t.custom({name:s.OptimisticEthereum,chainId:10,networkId:10},r({hardfork:c.Berlin},n));throw new Error("Custom chain ".concat(e," not supported"))},t.forCustomChain=function(e,n,a,o){var i=t._getChainParams(e);return new t({chain:r(r({},i),n),hardfork:a,supportedHardforks:o})},t.isSupportedChainId=function(e){var t=(0,f._getInitializedChains)();return Boolean(t.names[e.toString()])},t._getChainParams=function(e,t){var n=(0,f._getInitializedChains)(t);if("number"===typeof e||l.BN.isBN(e)){if(e=e.toString(),n.names[e])return n[n.names[e]];throw new Error("Chain with ID ".concat(e," not supported"))}if(n[e])return n[e];throw new Error("Chain with name ".concat(e," not supported"))},t.prototype.setChain=function(e){var n,a;if("number"===typeof e||"string"===typeof e||l.BN.isBN(e)){var o=void 0;o=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map((function(e){return e[0]})):this._customChains,this._chainParams=t._getChainParams(e,o)}else{if("object"!==typeof e)throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var r=i(["networkId","genesis","hardforks","bootstrapNodes"]),s=r.next();!s.done;s=r.next()){var c=s.value;if(void 0===e[c])throw new Error("Missing required chain parameter: ".concat(c))}}catch(u){n={error:u}}finally{try{s&&!s.done&&(a=r.return)&&a.call(r)}finally{if(n)throw n.error}}this._chainParams=e}return this._chainParams},t.prototype.setHardfork=function(e){var t,n;if(!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"));var a=!1;try{for(var o=i(p.hardforks),r=o.next();!r.done;r=o.next()){r.value[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),a=!0)}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}if(!a)throw new Error("Hardfork with name ".concat(e," not supported"))},t.prototype.getHardforkByBlockNumber=function(e,t){var n,a;e=(0,l.toType)(e,l.TypeOutput.BN),t=(0,l.toType)(t,l.TypeOutput.BN);var o,r,s,u=c.Chainstart;try{for(var d=i(this.hardforks()),f=d.next();!f.done;f=d.next()){var p=f.value;if(null!==p.block)e.gte(new l.BN(p.block))&&(u=p.name),t&&p.td&&(t.gte(new l.BN(p.td))?o=p.name:r=s),s=p.name;else if(void 0!==t&&null!==t&&void 0!==p.td&&null!==p.td&&t.gte(new l.BN(p.td)))return p.name}}catch(h){n={error:h}}finally{try{f&&!f.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}if(t){var b="block number: ".concat(e," (-> ").concat(u,"), ");if(o&&!this.hardforkGteHardfork(u,o)){var m="HF determined by block number is lower than the minimum total difficulty HF";throw b+="total difficulty: ".concat(t," (-> ").concat(o,")"),new Error("".concat(m,": ").concat(b))}if(r&&!this.hardforkGteHardfork(r,u)){m="Maximum HF determined by total difficulty is lower than the block number HF";throw b+="total difficulty: ".concat(t," (-> ").concat(r,")"),new Error("".concat(m,": ").concat(b))}}return u},t.prototype.setHardforkByBlockNumber=function(e,t){var n=this.getHardforkByBlockNumber(e,t);return this.setHardfork(n),n},t.prototype._chooseHardfork=function(e,t){if(void 0===t&&(t=!0),e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"))}else e=this._hardfork;return e},t.prototype._getHardfork=function(e){var t,n,a=this.hardforks();try{for(var o=i(a),r=o.next();!r.done;r=o.next()){var s=r.value;if(s.name===e)return s}}catch(c){t={error:c}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}throw new Error("Hardfork ".concat(e," not defined for chain ").concat(this.chainName()))},t.prototype._isSupportedHardfork=function(e){var t,n;if(!(this._supportedHardforks.length>0))return!0;try{for(var a=i(this._supportedHardforks),o=a.next();!o.done;o=a.next()){if(e===o.value)return!0}}catch(r){t={error:r}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return!1},t.prototype.setEIPs=function(e){var t,n,a=this;void 0===e&&(e=[]);var o=function(t){if(!(t in b.EIPs))throw new Error("".concat(t," not supported"));var n=r.gteHardfork(b.EIPs[t].minimumHardfork);if(!n)throw new Error("".concat(t," cannot be activated on hardfork ").concat(r.hardfork(),", minimumHardfork: ").concat(n));b.EIPs[t].requiredEIPs&&b.EIPs[t].requiredEIPs.forEach((function(n){if(!e.includes(n)&&!a.isActivatedEIP(n))throw new Error("".concat(t," requires EIP ").concat(n,", but is not included in the EIP list"))}))},r=this;try{for(var s=i(e),c=s.next();!c.done;c=s.next()){o(c.value)}}catch(u){t={error:u}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}this._eips=e},t.prototype.param=function(e,t){var n,a,o=null;try{for(var r=i(this._eips),s=r.next();!s.done;s=r.next()){var c=s.value;if(null!==(o=this.paramByEIP(e,t,c)))return o}}catch(u){n={error:u}}finally{try{s&&!s.done&&(a=r.return)&&a.call(r)}finally{if(n)throw n.error}}return this.paramByHardfork(e,t,this._hardfork)},t.prototype.paramByHardfork=function(e,t,n){var a,o,r,s;n=this._chooseHardfork(n);var c=null;try{for(var u=i(p.hardforks),d=u.next();!d.done;d=u.next()){var l=d.value;if("eips"in l[1]){var f=l[1].eips;try{for(var b=(r=void 0,i(f)),m=b.next();!m.done;m=b.next()){var h=m.value,g=this.paramByEIP(e,t,h);c=null!==g?g:c}}catch(y){r={error:y}}finally{try{m&&!m.done&&(s=b.return)&&s.call(b)}finally{if(r)throw r.error}}}else{if(!l[1][e])throw new Error("Topic ".concat(e," not defined"));void 0!==l[1][e][t]&&(c=l[1][e][t].v)}if(l[0]===n)break}}catch(v){a={error:v}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(a)throw a.error}}return c},t.prototype.paramByEIP=function(e,t,n){if(!(n in b.EIPs))throw new Error("".concat(n," not supported"));var a=b.EIPs[n];if(!(e in a))throw new Error("Topic ".concat(e," not defined"));return void 0===a[e][t]?null:a[e][t].v},t.prototype.paramByBlock=function(e,t,n){var a=this.activeHardforks(n),o=a[a.length-1].name;return this.paramByHardfork(e,t,o)},t.prototype.isActivatedEIP=function(e){var t,n;if(this.eips().includes(e))return!0;try{for(var a=i(p.hardforks),o=a.next();!o.done;o=a.next()){var r=o.value[1];if(this.gteHardfork(r.name)&&"eips"in r&&r.eips.includes(e))return!0}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return!1},t.prototype.hardforkIsActiveOnBlock=function(e,t,n){var a;void 0===n&&(n={}),t=(0,l.toType)(t,l.TypeOutput.BN);var o=null!==(a=n.onlySupported)&&void 0!==a&&a;e=this._chooseHardfork(e,o);var r=this.hardforkBlockBN(e);return!(!r||!t.gte(r))},t.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},t.prototype.hardforkGteHardfork=function(e,t,n){var a,o;void 0===n&&(n={});var r,s=void 0!==n.onlyActive&&n.onlyActive;e=this._chooseHardfork(e,n.onlySupported),r=s?this.activeHardforks(null,n):this.hardforks();var c=-1,u=-1,d=0;try{for(var l=i(r),f=l.next();!f.done;f=l.next()){var p=f.value;p.name===e&&(c=d),p.name===t&&(u=d),d+=1}}catch(b){a={error:b}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(a)throw a.error}}return c>=u&&-1!==u},t.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},t.prototype.hardforkIsActiveOnChain=function(e,t){var n,a,o;void 0===t&&(t={});var r=null!==(o=t.onlySupported)&&void 0!==o&&o;e=this._chooseHardfork(e,r);try{for(var s=i(this.hardforks()),c=s.next();!c.done;c=s.next()){var u=c.value;if(u.name===e&&null!==u.block)return!0}}catch(d){n={error:d}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(n)throw n.error}}return!1},t.prototype.activeHardforks=function(e,t){var n,a;void 0===t&&(t={});var o=[],r=this.hardforks();try{for(var s=i(r),c=s.next();!c.done;c=s.next()){var u=c.value;if(null!==u.block){if(void 0!==e&&null!==e&&e0)return n[n.length-1].name;throw new Error("No (supported) active hardfork found")},t.prototype.hardforkBlock=function(e){var t=this.hardforkBlockBN(e);return(0,l.toType)(t,l.TypeOutput.Number)},t.prototype.hardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).block;return void 0===t||null===t?null:new l.BN(t)},t.prototype.hardforkTD=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).td;return void 0===t||null===t?null:new l.BN(t)},t.prototype.isHardforkBlock=function(e,t){e=(0,l.toType)(e,l.TypeOutput.BN),t=this._chooseHardfork(t,!1);var n=this.hardforkBlockBN(t);return!!n&&n.eq(e)},t.prototype.nextHardforkBlock=function(e){var t=this.nextHardforkBlockBN(e);return(0,l.toType)(t,l.TypeOutput.Number)},t.prototype.nextHardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this.hardforkBlockBN(e);return null===t?null:this.hardforks().reduce((function(e,n){var a=new l.BN(n.block);return a.gt(t)&&null===e?a:e}),null)},t.prototype.isNextHardforkBlock=function(e,t){e=(0,l.toType)(e,l.TypeOutput.BN),t=this._chooseHardfork(t,!1);var n=this.nextHardforkBlockBN(t);return null!==n&&n.eq(e)},t.prototype._calcForkHash=function(e){var t,n,o=a.from(this.genesis().hash.substr(2),"hex"),r=a.alloc(0),s=0;try{for(var c=i(this.hardforks()),u=c.next();!u.done;u=c.next()){var f=u.value,p=f.block;if(0!==p&&null!==p&&p!==s){var b=a.from(p.toString(16).padStart(16,"0"),"hex");r=a.concat([r,b])}if(f.name===e)break;null!==p&&(s=p)}}catch(g){t={error:g}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}var m=a.concat([o,r]),h=(0,l.intToBuffer)((0,d.buf)(m)>>>0).toString("hex");return"0x".concat(h)},t.prototype.forkHash=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e);if(null===t.block&&void 0===t.td){throw new Error("No fork hash calculation possible for future hardfork")}return void 0!==t.forkHash?t.forkHash:this._calcForkHash(e)},t.prototype.hardforkForForkHash=function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null},t.prototype.genesis=function(){return this._chainParams.genesis},t.prototype.genesisState=function(){var e,t;switch(this.chainName()){case"mainnet":return n(31617);case"ropsten":return n(53712);case"rinkeby":return n(3023);case"kovan":return n(28777);case"goerli":return n(15382);case"sepolia":return n(81847)}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var a=i(this._customChains),o=a.next();!o.done;o=a.next()){var r=o.value;if(r[0].name===this.chainName())return r[1]}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return{}},t.prototype.hardforks=function(){return this._chainParams.hardforks},t.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},t.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},t.prototype.hardfork=function(){return this._hardfork},t.prototype.chainId=function(){return(0,l.toType)(this.chainIdBN(),l.TypeOutput.Number)},t.prototype.chainIdBN=function(){return new l.BN(this._chainParams.chainId)},t.prototype.chainName=function(){return this._chainParams.name},t.prototype.networkId=function(){return(0,l.toType)(this.networkIdBN(),l.TypeOutput.Number)},t.prototype.networkIdBN=function(){return new l.BN(this._chainParams.networkId)},t.prototype.eips=function(){return this._eips},t.prototype.consensusType=function(){var e,t,n,a=this.hardfork();try{for(var o=i(p.hardforks),r=o.next();!r.done;r=o.next()){var s=r.value;if("consensus"in s[1]&&(n=s[1].consensus.type),s[0]===a)break}}catch(c){e={error:c}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n||this._chainParams.consensus.type},t.prototype.consensusAlgorithm=function(){var e,t,n,a=this.hardfork();try{for(var o=i(p.hardforks),r=o.next();!r.done;r=o.next()){var s=r.value;if("consensus"in s[1]&&(n=s[1].consensus.algorithm),s[0]===a)break}}catch(c){e={error:c}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n||this._chainParams.consensus.algorithm},t.prototype.consensusConfig=function(){var e,t,n,a=this.hardfork();try{for(var o=i(p.hardforks),r=o.next();!r.done;r=o.next()){var s=r.value;if("consensus"in s[1]&&(n=s[1].consensus[s[1].consensus.algorithm]),s[0]===a)break}}catch(u){e={error:u}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}if(n)return n;var c=this.consensusAlgorithm();return this._chainParams.consensus[c]},t.prototype.copy=function(){var e=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return e.removeAllListeners(),e},t}(u.EventEmitter);t.default=m},69997:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],a=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,o,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTransaction=void 0;var c=r(n(53517)),u=n(47772),d=n(95632),l=function(){function e(e,t){this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=c.Chain.Mainnet,this.DEFAULT_HARDFORK=c.Hardfork.Istanbul;var n=e.nonce,a=e.gasLimit,o=e.to,r=e.value,i=e.data,s=e.v,d=e.r,l=e.s,f=e.type;this._type=new u.BN((0,u.toBuffer)(f)).toNumber(),this.txOptions=t;var p=(0,u.toBuffer)(""===o?"0x":o),b=(0,u.toBuffer)(""===s?"0x":s),m=(0,u.toBuffer)(""===d?"0x":d),h=(0,u.toBuffer)(""===l?"0x":l);this.nonce=new u.BN((0,u.toBuffer)(""===n?"0x":n)),this.gasLimit=new u.BN((0,u.toBuffer)(""===a?"0x":a)),this.to=p.length>0?new u.Address(p):void 0,this.value=new u.BN((0,u.toBuffer)(""===r?"0x":r)),this.data=(0,u.toBuffer)(""===i?"0x":i),this.v=b.length>0?new u.BN(b):void 0,this.r=m.length>0?new u.BN(m):void 0,this.s=h.length>0?new u.BN(h):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0)}return Object.defineProperty(e.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.supports=function(e){return this.activeCapabilities.includes(e)},e.prototype.validate=function(e){void 0===e&&(e=!1);var t=[];return this.getBaseFee().gt(this.gasLimit)&&t.push("gasLimit is too low. given ".concat(this.gasLimit,", need at least ").concat(this.getBaseFee())),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length},e.prototype.getBaseFee=function(){var e=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&e.iaddn(this.common.param("gasPrices","txCreation")),e},e.prototype.getDataFee=function(){for(var e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero"),n=0,a=0;a-1&&this.activeCapabilities.splice(l,1)}return c},e.prototype._getCommon=function(e,t){var n;if(t){var a=new u.BN((0,u.toBuffer)(t));if(e){if(!e.chainIdBN().eq(a)){var o=this._errorMsg("The chain ID does not match the chain ID of Common");throw new Error(o)}return e.copy()}return c.default.isSupportedChainId(a)?new c.default({chain:a,hardfork:this.DEFAULT_HARDFORK}):c.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:a,chainId:a},this.DEFAULT_HARDFORK)}return null!==(n=null===e||void 0===e?void 0:e.copy())&&void 0!==n?n:new c.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},e.prototype._validateCannotExceedMaxInteger=function(e,t,n){var a,o;void 0===t&&(t=256),void 0===n&&(n=!1);try{for(var r=i(Object.entries(e)),c=r.next();!c.done;c=r.next()){var d=s(c.value,2),l=d[0],f=d[1];switch(t){case 64:if(n){if(null===f||void 0===f?void 0:f.gte(u.MAX_UINT64)){var p=this._errorMsg("".concat(l," cannot equal or exceed MAX_UINT64 (2^64-1), given ").concat(f));throw new Error(p)}}else if(null===f||void 0===f?void 0:f.gt(u.MAX_UINT64)){p=this._errorMsg("".concat(l," cannot exceed MAX_UINT64 (2^64-1), given ").concat(f));throw new Error(p)}break;case 256:if(n){if(null===f||void 0===f?void 0:f.gte(u.MAX_INTEGER)){p=this._errorMsg("".concat(l," cannot equal or exceed MAX_INTEGER (2^256-1), given ").concat(f));throw new Error(p)}}else if(null===f||void 0===f?void 0:f.gt(u.MAX_INTEGER)){p=this._errorMsg("".concat(l," cannot exceed MAX_INTEGER (2^256-1), given ").concat(f));throw new Error(p)}break;default:p=this._errorMsg("unimplemented bits value");throw new Error(p)}}}catch(b){a={error:b}}finally{try{c&&!c.done&&(o=r.return)&&o.call(r)}finally{if(a)throw a.error}}},e.prototype._getSharedErrorPostfix=function(){var e="";try{e=this.isSigned()?(0,u.bufferToHex)(this.hash()):"not available (unsigned)"}catch(o){e="error"}var t="";try{t=this.isSigned().toString()}catch(o){e="error"}var n="";try{n=this.common.hardfork()}catch(o){n="error"}var a="tx type=".concat(this.type," hash=").concat(e," nonce=").concat(this.nonce," value=").concat(this.value," ");return a+="signed=".concat(t," hf=").concat(n)},e}();t.BaseTransaction=l},45181:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i};Object.defineProperty(t,"__esModule",{value:!0});var s=n(47772),c=n(69997),u=n(95632),d=n(49327),l=a.from(2..toString(16).padStart(2,"0"),"hex"),f=function(e){function t(t,n){void 0===n&&(n={});var a,o,i=this;(i=e.call(this,r(r({},t),{type:2}),n)||this).DEFAULT_HARDFORK="london";var c=t.chainId,l=t.accessList,f=t.maxFeePerGas,p=t.maxPriorityFeePerGas;if(i.common=i._getCommon(n.common,c),i.chainId=i.common.chainIdBN(),!i.common.isActivatedEIP(1559))throw new Error("EIP-1559 not enabled on Common");i.activeCapabilities=i.activeCapabilities.concat([1559,2718,2930]);var b=d.AccessLists.getAccessListData(null!==l&&void 0!==l?l:[]);if(i.accessList=b.accessList,i.AccessListJSON=b.AccessListJSON,d.AccessLists.verifyAccessList(i.accessList),i.maxFeePerGas=new s.BN((0,s.toBuffer)(""===f?"0x":f)),i.maxPriorityFeePerGas=new s.BN((0,s.toBuffer)(""===p?"0x":p)),i._validateCannotExceedMaxInteger({maxFeePerGas:i.maxFeePerGas,maxPriorityFeePerGas:i.maxPriorityFeePerGas}),i.gasLimit.mul(i.maxFeePerGas).gt(s.MAX_INTEGER)){var m=i._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)");throw new Error(m)}if(i.maxFeePerGas.lt(i.maxPriorityFeePerGas)){m=i._errorMsg("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");throw new Error(m)}if(i.v&&!i.v.eqn(0)&&!i.v.eqn(1)){m=i._errorMsg("The y-parity of the transaction should either be 0 or 1");throw new Error(m)}if(i.common.gteHardfork("homestead")&&(null===(a=i.s)||void 0===a?void 0:a.gt(u.N_DIV_2))){m=i._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(m)}return i.common.isActivatedEIP(3860)&&(0,d.checkMaxInitCodeSize)(i.common,i.data.length),(null===(o=null===n||void 0===n?void 0:n.freeze)||void 0===o||o)&&Object.freeze(i),i}return o(t,e),Object.defineProperty(t.prototype,"senderR",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"senderS",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yParity",{get:function(){return this.v},enumerable:!1,configurable:!0}),t.fromTxData=function(e,n){return void 0===n&&(n={}),new t(e,n)},t.fromSerializedTx=function(e,n){if(void 0===n&&(n={}),!e.slice(0,1).equals(l))throw new Error("Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: ".concat(2,", received: ").concat(e.slice(0,1).toString("hex")));var a=s.rlp.decode(e.slice(1));if(!Array.isArray(a))throw new Error("Invalid serialized tx input: must be array");return t.fromValuesArray(a,n)},t.fromRlpSerializedTx=function(e,n){return void 0===n&&(n={}),t.fromSerializedTx(e,n)},t.fromValuesArray=function(e,n){if(void 0===n&&(n={}),9!==e.length&&12!==e.length)throw new Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");var a=i(e,12),o=a[0],r=a[1],c=a[2],u=a[3],d=a[4],l=a[5],f=a[6],p=a[7],b=a[8],m=a[9],h=a[10],g=a[11];return(0,s.validateNoLeadingZeroes)({nonce:r,maxPriorityFeePerGas:c,maxFeePerGas:u,gasLimit:d,value:f,v:m,r:h,s:g}),new t({chainId:new s.BN(o),nonce:r,maxPriorityFeePerGas:c,maxFeePerGas:u,gasLimit:d,to:l,value:f,data:p,accessList:null!==b&&void 0!==b?b:[],v:void 0!==m?new s.BN(m):void 0,r:h,s:g},n)},t.prototype.getDataFee=function(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;var t=e.prototype.getDataFee.call(this);return t.iaddn(d.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t},t.prototype.getUpfrontCost=function(e){void 0===e&&(e=new s.BN(0));var t=s.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(e)).add(e);return this.gasLimit.mul(t).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,s.bnToUnpaddedBuffer)(this.maxFeePerGas),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:a.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):a.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):a.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):a.from([])]},t.prototype.serialize=function(){var e=this.raw();return a.concat([l,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,9),n=a.concat([l,s.rlp.encode(t)]);return e?(0,s.keccak256)(n):n},t.prototype.hash=function(){if(!this.isSigned()){var e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned()){var t=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(t)}var n=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2))){t=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(t)}var a=this,o=a.v,r=a.r,i=a.s;try{return(0,s.ecrecover)(n,o.addn(27),(0,s.bnToUnpaddedBuffer)(r),(0,s.bnToUnpaddedBuffer)(i))}catch(c){t=this._errorMsg("Invalid Signature");throw new Error(t)}},t.prototype._processSignature=function(e,n,a){var o=r(r({},this.txOptions),{common:this.common});return t.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(n),s:new s.BN(a)},o)},t.prototype.toJSON=function(){var e=d.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),maxPriorityFeePerGas:(0,s.bnToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,s.bnToHex)(this.maxFeePerGas),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype.errorStr=function(){var e=this._getSharedErrorPostfix();return e+=" maxFeePerGas=".concat(this.maxFeePerGas," maxPriorityFeePerGas=").concat(this.maxPriorityFeePerGas)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(c.BaseTransaction);t.default=f},30204:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i};Object.defineProperty(t,"__esModule",{value:!0});var s=n(47772),c=n(69997),u=n(95632),d=n(49327),l=a.from(1..toString(16).padStart(2,"0"),"hex"),f=function(e){function t(t,n){void 0===n&&(n={});var a,o,i=this;(i=e.call(this,r(r({},t),{type:1}),n)||this).DEFAULT_HARDFORK="berlin";var c=t.chainId,l=t.accessList,f=t.gasPrice;if(i.common=i._getCommon(n.common,c),i.chainId=i.common.chainIdBN(),!i.common.isActivatedEIP(2930))throw new Error("EIP-2930 not enabled on Common");i.activeCapabilities=i.activeCapabilities.concat([2718,2930]);var p=d.AccessLists.getAccessListData(null!==l&&void 0!==l?l:[]);if(i.accessList=p.accessList,i.AccessListJSON=p.AccessListJSON,d.AccessLists.verifyAccessList(i.accessList),i.gasPrice=new s.BN((0,s.toBuffer)(""===f?"0x":f)),i._validateCannotExceedMaxInteger({gasPrice:i.gasPrice}),i.gasPrice.mul(i.gasLimit).gt(s.MAX_INTEGER)){var b=i._errorMsg("gasLimit * gasPrice cannot exceed MAX_INTEGER");throw new Error(b)}if(i.v&&!i.v.eqn(0)&&!i.v.eqn(1)){b=i._errorMsg("The y-parity of the transaction should either be 0 or 1");throw new Error(b)}if(i.common.gteHardfork("homestead")&&(null===(a=i.s)||void 0===a?void 0:a.gt(u.N_DIV_2))){b=i._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(b)}return i.common.isActivatedEIP(3860)&&(0,d.checkMaxInitCodeSize)(i.common,i.data.length),(null===(o=null===n||void 0===n?void 0:n.freeze)||void 0===o||o)&&Object.freeze(i),i}return o(t,e),Object.defineProperty(t.prototype,"senderR",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"senderS",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yParity",{get:function(){return this.v},enumerable:!1,configurable:!0}),t.fromTxData=function(e,n){return void 0===n&&(n={}),new t(e,n)},t.fromSerializedTx=function(e,n){if(void 0===n&&(n={}),!e.slice(0,1).equals(l))throw new Error("Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: ".concat(1,", received: ").concat(e.slice(0,1).toString("hex")));var a=s.rlp.decode(e.slice(1));if(!Array.isArray(a))throw new Error("Invalid serialized tx input: must be array");return t.fromValuesArray(a,n)},t.fromRlpSerializedTx=function(e,n){return void 0===n&&(n={}),t.fromSerializedTx(e,n)},t.fromValuesArray=function(e,n){if(void 0===n&&(n={}),8!==e.length&&11!==e.length)throw new Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");var a=i(e,11),o=a[0],r=a[1],c=a[2],u=a[3],d=a[4],l=a[5],f=a[6],p=a[7],b=a[8],m=a[9],h=a[10];(0,s.validateNoLeadingZeroes)({nonce:r,gasPrice:c,gasLimit:u,value:l,v:b,r:m,s:h});return new t({chainId:new s.BN(o),nonce:r,gasPrice:c,gasLimit:u,to:d,value:l,data:f,accessList:null!==p&&void 0!==p?p:[],v:void 0!==b?new s.BN(b):void 0,r:m,s:h},n)},t.prototype.getDataFee=function(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;var t=e.prototype.getDataFee.call(this);return t.iaddn(d.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:a.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):a.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):a.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):a.from([])]},t.prototype.serialize=function(){var e=this.raw();return a.concat([l,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,8),n=a.concat([l,s.rlp.encode(t)]);return e?(0,s.keccak256)(n):n},t.prototype.hash=function(){if(!this.isSigned()){var e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned()){var t=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(t)}var n=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2))){t=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(t)}var a=this,o=a.yParity,r=a.r,i=a.s;try{return(0,s.ecrecover)(n,o.addn(27),(0,s.bnToUnpaddedBuffer)(r),(0,s.bnToUnpaddedBuffer)(i))}catch(c){t=this._errorMsg("Invalid Signature");throw new Error(t)}},t.prototype._processSignature=function(e,n,a){var o=r(r({},this.txOptions),{common:this.common});return t.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(n),s:new s.BN(a)},o)},t.prototype.toJSON=function(){var e=d.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype.errorStr=function(){var e,t,n=this._getSharedErrorPostfix();return n+=" gasPrice=".concat(this.gasPrice," accessListCount=").concat(null!==(t=null===(e=this.accessList)||void 0===e?void 0:e.length)&&void 0!==t?t:0)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(c.BaseTransaction);t.default=f},41278:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FeeMarketEIP1559Transaction=t.TransactionFactory=t.AccessListEIP2930Transaction=t.Transaction=void 0;var i=n(61778);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return r(i).default}});var s=n(30204);Object.defineProperty(t,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return r(s).default}});var c=n(34997);Object.defineProperty(t,"TransactionFactory",{enumerable:!0,get:function(){return r(c).default}});var u=n(45181);Object.defineProperty(t,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return r(u).default}}),o(n(95632),t)},61778:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i};Object.defineProperty(t,"__esModule",{value:!0});var s=n(47772),c=n(95632),u=n(69997),d=n(49327),l=function(e){function t(t,n){void 0===n&&(n={});var a,o=this;if((o=e.call(this,r(r({},t),{type:0}),n)||this).common=o._validateTxV(o.v,n.common),o.gasPrice=new s.BN((0,s.toBuffer)(""===t.gasPrice?"0x":t.gasPrice)),o.gasPrice.mul(o.gasLimit).gt(s.MAX_INTEGER)){var i=o._errorMsg("gas limit * gasPrice cannot exceed MAX_INTEGER (2^256-1)");throw new Error(i)}if(o._validateCannotExceedMaxInteger({gasPrice:o.gasPrice}),o.common.gteHardfork("spuriousDragon"))if(o.isSigned()){var u=o.v,l=o.common.chainIdBN().muln(2);(u.eq(l.addn(35))||u.eq(l.addn(36)))&&o.activeCapabilities.push(c.Capability.EIP155ReplayProtection)}else o.activeCapabilities.push(c.Capability.EIP155ReplayProtection);return o.common.isActivatedEIP(3860)&&(0,d.checkMaxInitCodeSize)(o.common,o.data.length),(null===(a=null===n||void 0===n?void 0:n.freeze)||void 0===a||a)&&Object.freeze(o),o}return o(t,e),t.fromTxData=function(e,n){return void 0===n&&(n={}),new t(e,n)},t.fromSerializedTx=function(e,t){void 0===t&&(t={});var n=s.rlp.decode(e);if(!Array.isArray(n))throw new Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(n,t)},t.fromRlpSerializedTx=function(e,n){return void 0===n&&(n={}),t.fromSerializedTx(e,n)},t.fromValuesArray=function(e,n){if(void 0===n&&(n={}),6!==e.length&&9!==e.length)throw new Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");var a=i(e,9),o=a[0],r=a[1],c=a[2],u=a[3],d=a[4],l=a[5],f=a[6],p=a[7],b=a[8];return(0,s.validateNoLeadingZeroes)({nonce:o,gasPrice:r,gasLimit:c,value:d,v:f,r:p,s:b}),new t({nonce:o,gasPrice:r,gasLimit:c,to:u,value:d,data:l,v:f,r:p,s:b},n)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:a.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):a.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):a.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):a.from([])]},t.prototype.serialize=function(){return s.rlp.encode(this.raw())},t.prototype._getMessageToSign=function(){var e=[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:a.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data];return this.supports(c.Capability.EIP155ReplayProtection)&&(e.push((0,s.toBuffer)(this.common.chainIdBN())),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0))),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0)))),e},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this._getMessageToSign();return e?(0,s.rlphash)(t):t},t.prototype.getDataFee=function(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:e.prototype.getDataFee.call(this),hardfork:this.common.hardfork()}),e.prototype.getDataFee.call(this))},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.hash=function(){return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.rlphash)(this.raw())),this.cache.hash):(0,s.rlphash)(this.raw())},t.prototype.getMessageToVerifySignature=function(){if(!this.isSigned()){var e=this._errorMsg("This transaction is not signed");throw new Error(e)}var t=this._getMessageToSign();return(0,s.rlphash)(t)},t.prototype.getSenderPublicKey=function(){var e,t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(c.N_DIV_2))){var n=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(n)}var a=this,o=a.v,r=a.r,i=a.s;try{return(0,s.ecrecover)(t,o,(0,s.bnToUnpaddedBuffer)(r),(0,s.bnToUnpaddedBuffer)(i),this.supports(c.Capability.EIP155ReplayProtection)?this.common.chainIdBN():void 0)}catch(u){n=this._errorMsg("Invalid Signature");throw new Error(n)}},t.prototype._processSignature=function(e,n,a){var o=new s.BN(e);this.supports(c.Capability.EIP155ReplayProtection)&&o.iadd(this.common.chainIdBN().muln(2).addn(8));var i=r(r({},this.txOptions),{common:this.common});return t.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:o,r:new s.BN(n),s:new s.BN(a)},i)},t.prototype.toJSON=function(){return{nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype._validateTxV=function(e,t){if(void 0!==e&&e.ltn(37)&&!e.eqn(27)&&!e.eqn(28))throw new Error("Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ".concat(e));var n;if(void 0!==e&&(!t||t.gteHardfork("spuriousDragon"))&&!e.eqn(27)&&!e.eqn(28))if(t){var a=t.chainIdBN().muln(2);if(!(e.eq(a.addn(35))||e.eq(a.addn(36))))throw new Error("Incompatible EIP155-based V ".concat(e," and chain id ").concat(t.chainIdBN(),". See the Common parameter of the Transaction constructor to set the chain id."))}else{var o=void 0;o=e.subn(35).isEven()?35:36,n=e.subn(o).divn(2)}return this._getCommon(t,n)},t.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},t.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned()){var e=this._errorMsg("This transaction is not signed");throw new Error(e)}var t=this.common.gteHardfork("spuriousDragon"),n=this.v,a=this.common.chainIdBN().muln(2);return(n.eq(a.addn(35))||n.eq(a.addn(36)))&&t},t.prototype.errorStr=function(){var e=this._getSharedErrorPostfix();return e+=" gasPrice=".concat(this.gasPrice)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(u.BaseTransaction);t.default=l},34997:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var o=n(47772),r=n(41278),i=function(){function e(){}return e.fromTxData=function(e,t){if(void 0===t&&(t={}),"type"in e&&void 0!==e.type){var n=new o.BN((0,o.toBuffer)(e.type)).toNumber();if(0===n)return r.Transaction.fromTxData(e,t);if(1===n)return r.AccessListEIP2930Transaction.fromTxData(e,t);if(2===n)return r.FeeMarketEIP1559Transaction.fromTxData(e,t);throw new Error("Tx instantiation with type ".concat(n," not supported"))}return r.Transaction.fromTxData(e,t)},e.fromSerializedData=function(e,t){if(void 0===t&&(t={}),e[0]<=127){var n=void 0;switch(e[0]){case 1:n=2930;break;case 2:n=1559;break;default:throw new Error("TypedTransaction with ID ".concat(e[0]," unknown"))}return 1559===n?r.FeeMarketEIP1559Transaction.fromSerializedTx(e,t):r.AccessListEIP2930Transaction.fromSerializedTx(e,t)}return r.Transaction.fromSerializedTx(e,t)},e.fromBlockBodyData=function(e,t){if(void 0===t&&(t={}),a.isBuffer(e))return this.fromSerializedData(e,t);if(Array.isArray(e))return r.Transaction.fromValuesArray(e,t);throw new Error("Cannot decode transaction: unknown type input")},e.getTransactionClass=function(e,t){if(void 0===e&&(e=0),0==e||e>=128&&e<=255)return r.Transaction;switch(e){case 1:return r.AccessListEIP2930Transaction;case 2:return r.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID ".concat(e," unknown"))}},e}();t.default=i},95632:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.N_DIV_2=t.isAccessList=t.isAccessListBuffer=t.Capability=void 0;var a=n(47772);function o(e){if(0===e.length)return!0;var t=e[0];return!!Array.isArray(t)}!function(e){e[e.EIP155ReplayProtection=155]="EIP155ReplayProtection",e[e.EIP1559FeeMarket=1559]="EIP1559FeeMarket",e[e.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",e[e.EIP2930AccessLists=2930]="EIP2930AccessLists"}(t.Capability||(t.Capability={})),t.isAccessListBuffer=o,t.isAccessList=function(e){return!o(e)},t.N_DIV_2=new a.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16)},49327:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessLists=t.checkMaxInitCodeSize=void 0;var a=n(47772),o=n(95632);t.checkMaxInitCodeSize=function(e,t){if(t>e.param("vm","maxInitCodeSize"))throw new Error("the initcode size of this transaction is too large: it is ".concat(t," while the max is ").concat(e.param("vm","maxInitCodeSize")))};var r=function(){function e(){}return e.getAccessListData=function(e){var t,n;if(e&&(0,o.isAccessList)(e)){t=e;for(var r=[],i=0;i=0?o:"")+"]",c=-1===o||e.dynamic;return(i=t.call(this,"array",s,r,c)).coder=e,i.length=o,i}return(0,o.Z)(n,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],n=0;ne._data.length&&m.throwError("insufficient data length",s.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var n=[],a=0;a256||a%8!==0)&&_.throwArgumentError("invalid "+n[1]+" bit length","param",e),new E(a/8,"int"===n[1],e.name)}if(n=e.type.match(B)){var o=parseInt(n[1]);return(0===o||o>32)&&_.throwArgumentError("invalid bytes length","param",e),new I(o,e.name)}return _.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new u.Ej(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new u.QV(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,n=e.map((function(e){return t._getCoder(U._R.from(e))}));return new P(n,"_").defaultValue()}},{key:"encode",value:function(e,t){var n=this;e.length!==t.length&&_.throwError("types/values length mismatch",s.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var a=e.map((function(e){return n._getCoder(U._R.from(e))})),o=new P(a,"_"),r=this._getWriter();return o.encode(r,t),r.data}},{key:"decode",value:function(e,t,n){var a=this,o=e.map((function(e){return a._getCoder(U._R.from(e))}));return new P(o,"_").decode(this._getReader((0,r.arrayify)(t),n))}}]),e}(),O=new N},25362:function(e,t,n){"use strict";n.d(t,{BR:function(){return l},Ej:function(){return b},QV:function(){return p},XI:function(){return f}});var a=n(15671),o=n(43144),r=n(7965),i=n(60492),s=n(62734),c=n(93830),u=n(93376),d=new c.Logger(u.i);function l(e){var t=[];return function e(n,a){if(Array.isArray(a))for(var o in a){var r=n.slice();r.push(o);try{e(r,a[o])}catch(i){t.push({path:r,error:i})}}}([],e),t}var f=function(){function e(t,n,o,r){(0,a.Z)(this,e),this.name=t,this.type=n,this.localName=o,this.dynamic=r}return(0,o.Z)(e,[{key:"_throwError",value:function(e,t){d.throwArgumentError(e,this.localName,t)}}]),e}(),p=function(){function e(t){(0,a.Z)(this,e),(0,s.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return(0,o.Z)(e,[{key:"data",get:function(){return(0,r.hexConcat)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData((0,r.concat)(e._data))}},{key:"writeBytes",value:function(e){var t=(0,r.arrayify)(e),n=t.length%this.wordSize;return n&&(t=(0,r.concat)([t,this._padding.slice(n)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=(0,r.arrayify)(i.O$.from(e));return t.length>this.wordSize&&d.throwError("value out-of-bounds",c.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,r.concat)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(n){e._data[t]=e._getValue(n)}}}]),e}(),b=function(){function e(t,n,o,i){(0,a.Z)(this,e),(0,s.defineReadOnly)(this,"_data",(0,r.arrayify)(t)),(0,s.defineReadOnly)(this,"wordSize",n||32),(0,s.defineReadOnly)(this,"_coerceFunc",o),(0,s.defineReadOnly)(this,"allowLoose",i),this._offset=0}return(0,o.Z)(e,[{key:"data",get:function(){return(0,r.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,n){return this._coerceFunc?this._coerceFunc(t,n):e.coerce(t,n)}},{key:"_peekBytes",value:function(e,t,n){var a=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+a>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?a=t:d.throwError("data out-of-bounds",c.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+a})),this._data.slice(this._offset,this._offset+a)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}},{key:"readValue",value:function(){return i.O$.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}}]),e}()},78262:function(e,t,n){"use strict";n.d(t,{HY:function(){return A},IC:function(){return M},QV:function(){return x},Xg:function(){return C},YW:function(){return E},_R:function(){return w},pc:function(){return y}});var a=n(60136),o=n(29388),r=n(15671),i=n(43144),s=n(60492),c=n(62734),u=n(93830),d=n(93376),l=n(65218),f=new u.Logger(d.i),p={},b={calldata:!0,memory:!0,storage:!0},m={calldata:!0,memory:!0};function h(e,t){if("bytes"===e||"string"===e){if(b[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&m[t])return!0;return(b[t]||"payable"===t)&&f.throwArgumentError("invalid modifier","name",t),!1}function g(e,t){for(var n in t)(0,c.defineReadOnly)(e,n,t[n])}var y=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),v=new RegExp(/^(.*)\[([0-9]*)\]$/),w=function(){function e(t,n){(0,r.Z)(this,e),t!==p&&f.throwError("use fromString",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),g(this,n);var a=this.type.match(v);g(this,a?{arrayLength:parseInt(a[2]||"-1"),arrayChildren:e.fromObject({type:a[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return(0,i.Z)(e,[{key:"format",value:function(e){if(e||(e=y.sighash),y[e]||f.throwArgumentError("invalid format type","format",e),e===y.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var n="";return"array"===this.baseType?(n+=this.arrayChildren.format(e),n+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==y.sighash&&(n+=this.type),n+="("+this.components.map((function(t){return t.format(e)})).join(e===y.full?", ":",")+")"):n+=this.type,e!==y.sighash&&(!0===this.indexed&&(n+=" indexed"),e===y.full&&this.name&&(n+=" "+this.name)),n}}],[{key:"from",value:function(t,n){return"string"===typeof t?e.fromString(t,n):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(p,{name:t.name||null,type:P(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,n){return a=function(e,t){var n=e;function a(t){f.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function o(e){var n={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(n.indexed=!1),n}e=e.replace(/\s/g," ");for(var r={type:"",name:"",state:{allowType:!0}},i=r,s=0;s2&&f.throwArgumentError("invalid human-readable ABI signature","value",e),n[1].match(/^[0-9]+$/)||f.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=s.O$.from(n[1]),n[0]):e}function T(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:l.log("unknown modifier: "+e)}}))}function S(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&f.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&f.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||f.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&f.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&f.throwArgumentError("unable to determine stateMutability","value",e),t}var C=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,i.Z)(n,[{key:"format",value:function(e){if(e||(e=y.sighash),y[e]||f.throwArgumentError("invalid format type","format",e),e===y.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===y.sighash&&f.throwError("cannot format a constructor for sighash",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===y.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?n.fromString(e):n.fromObject(e)}},{key:"fromObject",value:function(e){if(n.isConstructorFragment(e))return e;"constructor"!==e.type&&f.throwArgumentError("invalid constructor object","value",e);var t=S(e);t.constant&&f.throwArgumentError("constructor cannot be constant","value",e);var a={name:null,type:e.type,inputs:e.inputs?e.inputs.map(w.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?s.O$.from(e.gas):null};return new n(p,a)}},{key:"fromString",value:function(e){var t={type:"constructor"},a=(e=I(e,t)).match(B);return a&&"constructor"===a[1].trim()||f.throwArgumentError("invalid constructor string","value",e),t.inputs=k(a[2].trim(),!1),T(a[3].trim(),t),n.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),n}(A),E=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,i.Z)(n,[{key:"format",value:function(e){if(e||(e=y.sighash),y[e]||f.throwArgumentError("invalid format type","format",e),e===y.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==y.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===y.full?", ":",")+") ",e!==y.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?n.fromString(e):n.fromObject(e)}},{key:"fromObject",value:function(e){if(n.isFunctionFragment(e))return e;"function"!==e.type&&f.throwArgumentError("invalid function object","value",e);var t=S(e),a={type:e.type,name:_(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(w.fromObject):[],outputs:e.outputs?e.outputs.map(w.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?s.O$.from(e.gas):null};return new n(p,a)}},{key:"fromString",value:function(e){var t={type:"function"},a=(e=I(e,t)).split(" returns ");a.length>2&&f.throwArgumentError("invalid function string","value",e);var o=a[0].match(B);if(o||f.throwArgumentError("invalid function signature","value",e),t.name=o[1].trim(),t.name&&_(t.name),t.inputs=k(o[2],!1),T(o[3].trim(),t),a.length>1){var r=a[1].match(B);""==r[1].trim()&&""==r[3].trim()||f.throwArgumentError("unexpected tokens","value",e),t.outputs=k(r[2],!1)}else t.outputs=[];return n.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),n}(C);function R(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||f.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}var M=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,i.Z)(n,[{key:"format",value:function(e){if(e||(e=y.sighash),y[e]||f.throwArgumentError("invalid format type","format",e),e===y.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==y.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===y.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"===typeof e?n.fromString(e):n.fromObject(e)}},{key:"fromObject",value:function(e){if(n.isErrorFragment(e))return e;"error"!==e.type&&f.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:_(e.name),inputs:e.inputs?e.inputs.map(w.fromObject):[]};return R(new n(p,t))}},{key:"fromString",value:function(e){var t={type:"error"},a=e.match(B);return a||f.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&_(t.name),t.inputs=k(a[2],!1),R(n.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),n}(A);function P(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var U=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function _(e){return e&&e.match(U)||f.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var B=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},87214:function(e,t,n){"use strict";n.r(t),n.d(t,{AbiCoder:function(){return o.R},ConstructorFragment:function(){return a.Xg},ErrorFragment:function(){return a.IC},EventFragment:function(){return a.QV},FormatTypes:function(){return a.pc},Fragment:function(){return a.HY},FunctionFragment:function(){return a.YW},Indexed:function(){return r.Hk},Interface:function(){return r.vU},LogDescription:function(){return r.CC},ParamType:function(){return a._R},TransactionDescription:function(){return r.vk},checkResultErrors:function(){return i.BR},defaultAbiCoder:function(){return o.$}});var a=n(78262),o=n(60956),r=n(47096),i=n(25362)},47096:function(e,t,n){"use strict";n.d(t,{CC:function(){return y},Hk:function(){return k},vU:function(){return I},vk:function(){return v}});var a=n(43144),o=n(15671),r=n(60136),i=n(29388),s=n(56602),c=n(60492),u=n(7965),d=n(51051),l=n(99233),f=n(62734),p=n(60956),b=n(78262),m=n(93830),h=n(93376),g=new m.Logger(h.i),y=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,o.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n)}(f.Description),v=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,o.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n)}(f.Description),w=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,o.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n)}(f.Description),k=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,o.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),n}(f.Description),A={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function x(e,t){var n=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return n.error=t,n}var I=function(){function e(t){var n=this;(0,o.Z)(this,e);var a=[];a="string"===typeof t?JSON.parse(t):t,(0,f.defineReadOnly)(this,"fragments",a.map((function(e){return b.HY.from(e)})).filter((function(e){return null!=e}))),(0,f.defineReadOnly)(this,"_abiCoder",(0,f.getStatic)(this instanceof e?this.constructor:void 0,"getAbiCoder")()),(0,f.defineReadOnly)(this,"functions",{}),(0,f.defineReadOnly)(this,"errors",{}),(0,f.defineReadOnly)(this,"events",{}),(0,f.defineReadOnly)(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return n.deploy?void g.warn("duplicate definition - constructor"):void(0,f.defineReadOnly)(n,"deploy",e);case"function":t=n.functions;break;case"event":t=n.events;break;case"error":t=n.errors;break;default:return}var a=e.format();t[a]?g.warn("duplicate definition - "+a):t[a]=e})),this.deploy||(0,f.defineReadOnly)(this,"deploy",b.Xg.from({payable:!1,type:"constructor"})),(0,f.defineReadOnly)(this,"_isInterface",!0)}return(0,a.Z)(e,[{key:"format",value:function(e){e||(e=b.pc.full),e===b.pc.sighash&&g.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===b.pc.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if((0,u.isHexString)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];g.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),a=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===n}));return 0===a.length?g.throwArgumentError("no matching function","name",n):a.length>1&&g.throwArgumentError("multiple matching functions","name",n),this.functions[a[0]]}var o=this.functions[b.YW.fromString(e).format()];return o||g.throwArgumentError("no matching function","signature",e),o}},{key:"getEvent",value:function(e){if((0,u.isHexString)(e)){var t=e.toLowerCase();for(var n in this.events)if(t===this.getEventTopic(n))return this.events[n];g.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var a=e.trim(),o=Object.keys(this.events).filter((function(e){return e.split("(")[0]===a}));return 0===o.length?g.throwArgumentError("no matching event","name",a):o.length>1&&g.throwArgumentError("multiple matching events","name",a),this.events[o[0]]}var r=this.events[b.QV.fromString(e).format()];return r||g.throwArgumentError("no matching event","signature",e),r}},{key:"getError",value:function(e){if((0,u.isHexString)(e)){var t=(0,f.getStatic)(this.constructor,"getSighash");for(var n in this.errors){if(e===t(this.errors[n]))return this.errors[n]}g.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var a=e.trim(),o=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===a}));return 0===o.length?g.throwArgumentError("no matching error","name",a):o.length>1&&g.throwArgumentError("multiple matching errors","name",a),this.errors[o[0]]}var r=this.errors[b.YW.fromString(e).format()];return r||g.throwArgumentError("no matching error","signature",e),r}},{key:"getSighash",value:function(e){if("string"===typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(n){throw t}}return(0,f.getStatic)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"===typeof e&&(e=this.getEvent(e)),(0,f.getStatic)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"===typeof e&&(e=this.getError(e));var n=(0,u.arrayify)(t);return(0,u.hexlify)(n.slice(0,4))!==this.getSighash(e)&&g.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,u.hexlify)(n)),this._decodeParams(e.inputs,n.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"===typeof e&&(e=this.getError(e)),(0,u.hexlify)((0,u.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var n=(0,u.arrayify)(t);return(0,u.hexlify)(n.slice(0,4))!==this.getSighash(e)&&g.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,u.hexlify)(n)),this._decodeParams(e.inputs,n.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,u.hexlify)((0,u.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var n=(0,u.arrayify)(t),a=null,o="",r=null,i=null,s=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch(l){}break;case 4:var c=(0,u.hexlify)(n.slice(0,4)),d=A[c];if(d)r=this._abiCoder.decode(d.inputs,n.slice(4)),i=d.name,s=d.signature,d.reason&&(a=r[0]),"Error"===i?o="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(r[0])):"Panic"===i&&(o="; VM Exception while processing transaction: reverted with panic code ".concat(r[0]));else try{var l=this.getError(c);r=this._abiCoder.decode(l.inputs,n.slice(4)),i=l.name,s=l.format()}catch(l){}}return g.throwError("call revert exception"+o,m.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,u.hexlify)(t),errorArgs:r,errorName:i,errorSignature:s,reason:a})}},{key:"encodeFunctionResult",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,u.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var n=this;"string"===typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&g.throwError("too many arguments for "+e.format(),m.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var a=[];e.anonymous||a.push(this.getEventTopic(e));var o=function(e,t){return"string"===e.type?(0,d.id)(t):"bytes"===e.type?(0,l.keccak256)((0,u.hexlify)(t)):("bool"===e.type&&"boolean"===typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=c.O$.from(t).toHexString()),"address"===e.type&&n._abiCoder.encode(["address"],[t]),(0,u.hexZeroPad)((0,u.hexlify)(t),32))};for(t.forEach((function(t,n){var r=e.inputs[n];r.indexed?null==t?a.push(null):"array"===r.baseType||"tuple"===r.baseType?g.throwArgumentError("filtering with tuples or arrays not supported","contract."+r.name,t):Array.isArray(t)?a.push(t.map((function(e){return o(r,e)}))):a.push(o(r,t)):null!=t&&g.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+r.name,t)}));a.length&&null===a[a.length-1];)a.pop();return a}},{key:"encodeEventLog",value:function(e,t){var n=this;"string"===typeof e&&(e=this.getEvent(e));var a=[],o=[],r=[];return e.anonymous||a.push(this.getEventTopic(e)),t.length!==e.inputs.length&&g.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,i){var s=t[i];if(e.indexed)if("string"===e.type)a.push((0,d.id)(s));else if("bytes"===e.type)a.push((0,l.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");a.push(n._abiCoder.encode([e.type],[s]))}else o.push(e),r.push(s)})),{data:this._abiCoder.encode(o,r),topics:a}}},{key:"decodeEventLog",value:function(e,t,n){if("string"===typeof e&&(e=this.getEvent(e)),null!=n&&!e.anonymous){var a=this.getEventTopic(e);(0,u.isHexString)(n[0],32)&&n[0].toLowerCase()===a||g.throwError("fragment/topic mismatch",m.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:a,value:n[0]}),n=n.slice(1)}var o=[],r=[],i=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(o.push(b._R.fromObject({type:"bytes32",name:e.name})),i.push(!0)):(o.push(e),i.push(!1)):(r.push(e),i.push(!1))}));var s=null!=n?this._abiCoder.decode(o,(0,u.concat)(n)):null,c=this._abiCoder.decode(r,t,!0),d=[],l=0,f=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)d[t]=new k({_isIndexed:!0,hash:null});else if(i[t])d[t]=new k({_isIndexed:!0,hash:s[f++]});else try{d[t]=s[f++]}catch(a){d[t]=a}else try{d[t]=c[l++]}catch(a){d[t]=a}if(e.name&&null==d[e.name]){var n=d[t];n instanceof Error?Object.defineProperty(d,e.name,{enumerable:!0,get:function(){throw x("property ".concat(JSON.stringify(e.name)),n)}}):d[e.name]=n}}));for(var p=function(e){var t=d[e];t instanceof Error&&Object.defineProperty(d,e,{enumerable:!0,get:function(){throw x("index ".concat(e),t)}})},h=0;h=0)throw e;return f.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",d.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:n})}))),null==n.chainId?n.chainId=this.getChainId():n.chainId=Promise.all([Promise.resolve(n.chainId),this.getChainId()]).then((function(t){return 0!==t[1]&&t[0]!==t[1]&&f.throwArgumentError("chainId address mismatch","transaction",e),t[0]})),t.next=23,(0,u.resolveProperties)(n);case 23:return t.abrupt("return",t.sent);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"_checkProvider",value:function(e){this.provider||f.throwError("missing provider",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}}],[{key:"isSigner",value:function(e){return!(!e||!e._isSigner)}}]),e}(),h=function(e){(0,o.Z)(n,e);var t=(0,r.Z)(n);function n(e,o){var r;return(0,s.Z)(this,n),r=t.call(this),(0,u.defineReadOnly)((0,a.Z)(r),"address",e),(0,u.defineReadOnly)((0,a.Z)(r),"provider",o||null),r}return(0,c.Z)(n,[{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"_fail",value:function(e,t){return Promise.resolve().then((function(){f.throwError(e,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:t})}))}},{key:"signMessage",value:function(e){return this._fail("VoidSigner cannot sign messages","signMessage")}},{key:"signTransaction",value:function(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}},{key:"_signTypedData",value:function(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}},{key:"connect",value:function(e){return new n(this.address,e)}}]),n}(m)},56602:function(e,t,n){"use strict";n.r(t),n.d(t,{getAddress:function(){return m},getContractAddress:function(){return y},getCreate2Address:function(){return v},getIcapAddress:function(){return g},isAddress:function(){return h}});var a=n(7965),o=n(60492),r=n(99233),i=n(35491),s=new(n(93830).Logger)("address/5.7.0");function c(e){(0,a.isHexString)(e,20)||s.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40),o=0;o<40;o++)n[o]=t[o].charCodeAt(0);for(var i=(0,a.arrayify)((0,r.keccak256)(n)),c=0;c<40;c+=2)i[c>>1]>>4>=8&&(t[c]=t[c].toUpperCase()),(15&i[c>>1])>=8&&(t[c+1]=t[c+1].toUpperCase());return"0x"+t.join("")}for(var u={},d=0;d<10;d++)u[String(d)]=String(d);for(var l=0;l<26;l++)u[String.fromCharCode(65+l)]=String(10+l);var f,p=Math.floor((f=9007199254740991,Math.log10?Math.log10(f):Math.log(f)/Math.LN10));function b(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return u[e]})).join("");t.length>=p;){var n=t.substring(0,p);t=parseInt(n,10)%97+t.substring(n.length)}for(var a=String(98-parseInt(t,10)%97);a.length<2;)a="0"+a;return a}function m(e){var t=null;if("string"!==typeof e&&s.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=c(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&s.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==b(e)&&s.throwArgumentError("bad icap checksum","address",e),t=(0,o.g$)(e.substring(4));t.length<40;)t="0"+t;t=c("0x"+t)}else s.throwArgumentError("invalid address","address",e);return t}function h(e){try{return m(e),!0}catch(t){}return!1}function g(e){for(var t=(0,o.t2)(m(e).substring(2)).toUpperCase();t.length<30;)t="0"+t;return"XE"+b("XE00"+t)+t}function y(e){var t=null;try{t=m(e.from)}catch(c){s.throwArgumentError("missing from address","transaction",e)}var n=(0,a.stripZeros)((0,a.arrayify)(o.O$.from(e.nonce).toHexString()));return m((0,a.hexDataSlice)((0,r.keccak256)((0,i.encode)([t,n])),12))}function v(e,t,n){return 32!==(0,a.hexDataLength)(t)&&s.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,a.hexDataLength)(n)&&s.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",n),m((0,a.hexDataSlice)((0,r.keccak256)((0,a.concat)(["0xff",m(e),t,n])),12))}},58224:function(e,t,n){"use strict";n.d(t,{J:function(){return o},c:function(){return r}});var a=n(7965);function o(e){e=atob(e);for(var t=[],n=0;n0;)n.push(o%this.base),o=o/this.base|0}for(var s="",c=0;0===t[c]&&c=0;--u)s+=this.alphabet[n[u]];return s}},{key:"decode",value:function(e){if("string"!==typeof e)throw new TypeError("Expected String");var t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(var n=0;n>=8;for(;o>0;)t.push(255&o),o>>=8}for(var s=0;e[s]===this._leader&&s0&&(10===arguments[0]?m||(m=!0,l.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?l.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",c.Logger.errors.UNEXPECTED_ARGUMENT,{}):l.throwError("BigNumber.toString does not accept parameters",c.Logger.errors.UNEXPECTED_ARGUMENT,{})),v(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(f,g(t)):t.match(/^-?[0-9]+$/)?new e(f,g(new d(t))):l.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&w("underflow","BigNumber.from",t),(t>=p||t<=-p)&&w("overflow","BigNumber.from",t),e.from(String(t));var n=t;if("bigint"===typeof n)return e.from(n.toString());if((0,s.isBytes)(n))return e.from((0,s.hexlify)(n));if(n)if(n.toHexString){var a=n.toHexString();if("string"===typeof a)return e.from(a)}else{var o=n._hex;if(null==o&&"BigNumber"===n.type&&(o=n.hex),"string"===typeof o&&((0,s.isHexString)(o)||"-"===o[0]&&(0,s.isHexString)(o.substring(1))))return e.from(o)}return l.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function g(e){if("string"!==typeof e)return g(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&l.throwArgumentError("invalid hex","value",e),"0x00"===(e=g(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function y(e){return h.from(g(e))}function v(e){var t=h.from(e).toHexString();return"-"===t[0]?new d("-"+t.substring(3),16):new d(t.substring(2),16)}function w(e,t,n){var a={fault:e,operation:t};return null!=n&&(a.value=n),l.throwError(e,c.Logger.errors.NUMERIC_FAULT,a)}function k(e){return new d(e,36).toString(16)}function A(e){return new d(e,16).toString(36)}},88065:function(e,t,n){"use strict";n.d(t,{Ox:function(){return g},S5:function(){return h},xO:function(){return y},xs:function(){return v}});var a=n(15671),o=n(43144),r=n(7965),i=n(93830),s=n(72832),c=n(60492),u=new i.Logger(s.i),d={},l=c.O$.from(0),f=c.O$.from(-1);function p(e,t,n,a){var o={fault:t,operation:n};return void 0!==a&&(o.value=a),u.throwError(e,i.Logger.errors.NUMERIC_FAULT,o)}for(var b="0";b.length<256;)b+=b;function m(e){if("number"!==typeof e)try{e=c.O$.from(e).toNumber()}catch(t){}return"number"===typeof e&&e>=0&&e<=256&&!(e%1)?"1"+b.substring(0,e):u.throwArgumentError("invalid decimal size","decimals",e)}function h(e,t){null==t&&(t=0);var n=m(t),a=(e=c.O$.from(e)).lt(l);a&&(e=e.mul(f));for(var o=e.mod(n).toString();o.length2&&u.throwArgumentError("too many decimal points","value",e);var r=o[0],i=o[1];for(r||(r="0"),i||(i="0");"0"===i[i.length-1];)i=i.substring(0,i.length-1);for(i.length>n.length-1&&p("fractional component exceeds decimals","underflow","parseFixed"),""===i&&(i="0");i.length80&&u.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",o),new e(d,n,a,o)}}]),e}(),v=function(){function e(t,n,o,r){(0,a.Z)(this,e),t!==d&&u.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=n,this._value=o,this._isFixedNumber=!0,Object.freeze(this)}return(0,o.Z)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&u.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var n=g(this._value,this.format.decimals),a=g(t._value,t.format.decimals);return e.fromValue(n.add(a),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var n=g(this._value,this.format.decimals),a=g(t._value,t.format.decimals);return e.fromValue(n.sub(a),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var n=g(this._value,this.format.decimals),a=g(t._value,t.format.decimals);return e.fromValue(n.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var n=g(this._value,this.format.decimals),a=g(t._value,t.format.decimals);return e.fromValue(n.mul(this.format._multiplier).div(a),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var n=e.from(t[0],this.format),a=!t[1].match(/^(0*)$/);return this.isNegative()&&a&&(n=n.subUnsafe(w.toFormat(n.format))),n}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var n=e.from(t[0],this.format),a=!t[1].match(/^(0*)$/);return!this.isNegative()&&a&&(n=n.addUnsafe(w.toFormat(n.format))),n}},{key:"round",value:function(t){null==t&&(t=0);var n=this.toString().split(".");if(1===n.length&&n.push("0"),(t<0||t>80||t%1)&&u.throwArgumentError("invalid decimal count","decimals",t),n[1].length<=t)return this;var a=e.from("1"+b.substring(0,t),this.format),o=k.toFormat(this.format);return this.mulUnsafe(a).addUnsafe(o).floor().divUnsafe(a)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&u.throwArgumentError("invalid byte width","width",e);var t=c.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,r.hexZeroPad)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,n,a){return null!=a||null==n||(0,c.Zm)(n)||(a=n,n=null),null==n&&(n=0),null==a&&(a="fixed"),e.fromString(h(t,n),y.from(a))}},{key:"fromString",value:function(t,n){null==n&&(n="fixed");var a=y.from(n),o=g(t,a.decimals);!a.signed&&o.lt(l)&&p("unsigned value cannot be negative","overflow","value",t);var i=null;a.signed?i=o.toTwos(a.width).toHexString():(i=o.toHexString(),i=(0,r.hexZeroPad)(i,a.width/8));var s=h(o,a.decimals);return new e(d,i,s,a)}},{key:"fromBytes",value:function(t,n){null==n&&(n="fixed");var a=y.from(n);if((0,r.arrayify)(t).length>a.width/8)throw new Error("overflow");var o=c.O$.from(t);a.signed&&(o=o.fromTwos(a.width));var i=o.toTwos((a.signed?0:1)+a.width).toHexString(),s=h(o,a.decimals);return new e(d,i,s,a)}},{key:"from",value:function(t,n){if("string"===typeof t)return e.fromString(t,n);if((0,r.isBytes)(t))return e.fromBytes(t,n);try{return e.fromValue(t,0,n)}catch(a){if(a.code!==i.Logger.errors.INVALID_ARGUMENT)throw a}return u.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}(),w=v.from(1),k=v.from("0.5")},75139:function(e,t,n){"use strict";n.r(t),n.d(t,{BigNumber:function(){return a.O$},FixedFormat:function(){return o.xO},FixedNumber:function(){return o.xs},_base16To36:function(){return a.t2},_base36To16:function(){return a.g$},formatFixed:function(){return o.S5},parseFixed:function(){return o.Ox}});var a=n(60492),o=n(88065)},7965:function(e,t,n){"use strict";n.r(t),n.d(t,{arrayify:function(){return u},concat:function(){return d},hexConcat:function(){return y},hexDataLength:function(){return h},hexDataSlice:function(){return g},hexStripZeros:function(){return w},hexValue:function(){return v},hexZeroPad:function(){return k},hexlify:function(){return m},isBytes:function(){return c},isBytesLike:function(){return i},isHexString:function(){return p},joinSignature:function(){return x},splitSignature:function(){return A},stripZeros:function(){return l},zeroPad:function(){return f}});var a=new(n(93830).Logger)("bytes/5.7.0");function o(e){return!!e.toHexString}function r(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return r(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function i(e){return p(e)&&!(e.length%2)||c(e)}function s(e){return"number"===typeof e&&e==e&&e%1===0}function c(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(!s(e.length)||e.length<0)return!1;for(var t=0;t=256)return!1}return!0}function u(e,t){if(t||(t={}),"number"===typeof e){a.checkSafeUint53(e,"invalid arrayify value");for(var n=[];e;)n.unshift(255&e),e=parseInt(String(e/256));return 0===n.length&&n.push(0),r(new Uint8Array(n))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e)&&(e=e.toHexString()),p(e)){var i=e.substring(2);i.length%2&&("left"===t.hexPad?i="0"+i:"right"===t.hexPad?i+="0":a.throwArgumentError("hex data is odd-length","value",e));for(var s=[],u=0;ut&&a.throwArgumentError("value out of range","value",arguments[0]);var n=new Uint8Array(t);return n.set(e,t-e.length),r(n)}function p(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}var b="0123456789abcdef";function m(e,t){if(t||(t={}),"number"===typeof e){a.checkSafeUint53(e,"invalid hexlify value");for(var n="";e;)n=b[15&e]+n,e=Math.floor(e/16);return n.length?(n.length%2&&(n="0"+n),"0x"+n):"0x00"}if("bigint"===typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":a.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(c(e)){for(var r="0x",i=0;i>4]+b[15&s]}return r}return a.throwArgumentError("invalid hexlify value","value",e)}function h(e){if("string"!==typeof e)e=m(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2}function g(e,t,n){return"string"!==typeof e?e=m(e):(!p(e)||e.length%2)&&a.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=n?"0x"+e.substring(t,2+2*n):"0x"+e.substring(t)}function y(e){var t="0x";return e.forEach((function(e){t+=m(e).substring(2)})),t}function v(e){var t=w(m(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!==typeof e&&(e=m(e)),p(e)||a.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&a.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function A(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(i(e)){var n=u(e);64===n.length?(t.v=27+(n[32]>>7),n[32]&=127,t.r=m(n.slice(0,32)),t.s=m(n.slice(32,64))):65===n.length?(t.r=m(n.slice(0,32)),t.s=m(n.slice(32,64)),t.v=n[64]):a.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:a.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(n[32]|=128),t._vs=m(n.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var o=f(u(t._vs),32);t._vs=m(o);var r=o[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=r:t.recoveryParam!==r&&a.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),o[0]&=127;var s=m(o);null==t.s?t.s=s:t.s!==s&&a.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?a.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var c=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==c&&a.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=k(t.r,32):a.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=k(t.s,32):a.throwArgumentError("signature missing or invalid s","signature",e);var d=u(t.s);d[0]>=128&&a.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(d[0]|=128);var l=m(d);t._vs&&(p(t._vs)||a.throwArgumentError("signature invalid _vs","signature",e),t._vs=k(t._vs,32)),null==t._vs?t._vs=l:t._vs!==l&&a.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function x(e){return m(d([(e=A(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},96772:function(e,t,n){"use strict";n.d(t,{$B:function(){return d},Bz:function(){return u},Ce:function(){return c},PS:function(){return l},Py:function(){return s},_Y:function(){return r},fh:function(){return i},tL:function(){return o}});var a=n(60492),o=a.O$.from(-1),r=a.O$.from(0),i=a.O$.from(1),s=a.O$.from(2),c=a.O$.from("1000000000000000000"),u=a.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),d=a.O$.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),l=a.O$.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},73570:function(e,t,n){"use strict";n.d(t,{R:function(){return a}});var a="0x0000000000000000000000000000000000000000000000000000000000000000"},72696:function(e,t,n){"use strict";n.d(t,{VZ:function(){return N},CH:function(){return O},lV:function(){return F}});var a=n(93433),o=n(97326),r=n(88301),i=n(61120),s=n(60136),c=n(29388),u=n(15671),d=n(43144),l=n(74165),f=n(25362),p=n(47096),b=n(34407),m=n(21477),h=n(56602),g=n(60492),y=n(7965),v=n(62734),w=n(59632),k=n(93830),A=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},x=new k.Logger("contracts/5.7.0"),I={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function T(e,t){return A(this,void 0,void 0,(0,l.Z)().mark((function n(){var a,o;return(0,l.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t;case 2:return"string"!==typeof(a=n.sent)&&x.throwArgumentError("invalid address or ENS name","name",a),n.prev=4,n.abrupt("return",(0,h.getAddress)(a));case 8:n.prev=8,n.t0=n.catch(4);case 10:return e||x.throwError("a provider or signer is needed to resolve ENS names",k.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),n.next=13,e.resolveName(a);case 13:return null==(o=n.sent)&&x.throwArgumentError("resolver or addr is not configured for ENS name","name",a),n.abrupt("return",o);case 16:case"end":return n.stop()}}),n,null,[[4,8]])})))}function S(e,t,n){return A(this,void 0,void 0,(0,l.Z)().mark((function a(){return(0,l.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!Array.isArray(n)){a.next=4;break}return a.next=3,Promise.all(n.map((function(n,a){return S(e,Array.isArray(t)?t[a]:t[n.name],n)})));case 3:case 7:case 11:case 17:return a.abrupt("return",a.sent);case 4:if("address"!==n.type){a.next=8;break}return a.next=7,T(e,t);case 8:if("tuple"!==n.type){a.next=12;break}return a.next=11,S(e,t,n.components);case 12:if("array"!==n.baseType){a.next=18;break}if(Array.isArray(t)){a.next=15;break}return a.abrupt("return",Promise.reject(x.makeError("invalid value for array",k.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:t})));case 15:return a.next=17,Promise.all(t.map((function(t){return S(e,t,n.arrayChildren)})));case 18:return a.abrupt("return",t);case 19:case"end":return a.stop()}}),a)})))}function C(e,t,n){return A(this,void 0,void 0,(0,l.Z)().mark((function a(){var o,r,i,s,c,u,d,f,p,b,m=this;return(0,l.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return o={},n.length===t.inputs.length+1&&"object"===typeof n[n.length-1]&&(o=(0,v.shallowCopy)(n.pop())),x.checkArgumentCount(n.length,t.inputs.length,"passed to contract"),e.signer?o.from?o.from=(0,v.resolveProperties)({override:T(e.signer,o.from),signer:e.signer.getAddress()}).then((function(e){return A(m,void 0,void 0,(0,l.Z)().mark((function t(){return(0,l.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,h.getAddress)(e.signer)!==e.override&&x.throwError("Contract with a Signer cannot override from",k.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.abrupt("return",e.override);case 2:case"end":return t.stop()}}),t)})))})):o.from=e.signer.getAddress():o.from&&(o.from=T(e.provider,o.from)),a.next=6,(0,v.resolveProperties)({args:S(e.signer||e.provider,n,t.inputs),address:e.resolvedAddress,overrides:(0,v.resolveProperties)(o)||{}});case 6:if(r=a.sent,i=e.interface.encodeFunctionData(t,r.args),s={data:i,to:r.address},null!=(c=r.overrides).nonce&&(s.nonce=g.O$.from(c.nonce).toNumber()),null!=c.gasLimit&&(s.gasLimit=g.O$.from(c.gasLimit)),null!=c.gasPrice&&(s.gasPrice=g.O$.from(c.gasPrice)),null!=c.maxFeePerGas&&(s.maxFeePerGas=g.O$.from(c.maxFeePerGas)),null!=c.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=g.O$.from(c.maxPriorityFeePerGas)),null!=c.from&&(s.from=c.from),null!=c.type&&(s.type=c.type),null!=c.accessList&&(s.accessList=(0,w.accessListify)(c.accessList)),null==s.gasLimit&&null!=t.gas){for(u=21e3,d=(0,y.arrayify)(i),f=0;f1)){e=e.substring(1);var n=t[0];try{null==o[e]&&(0,v.defineReadOnly)(o,e,o[n])}catch(a){}null==o.functions[e]&&(0,v.defineReadOnly)(o.functions,e,o.functions[n]),null==o.callStatic[e]&&(0,v.defineReadOnly)(o.callStatic,e,o.callStatic[n]),null==o.populateTransaction[e]&&(0,v.defineReadOnly)(o.populateTransaction,e,o.populateTransaction[n]),null==o.estimateGas[e]&&(0,v.defineReadOnly)(o.estimateGas,e,o.estimateGas[n])}}))}return(0,d.Z)(e,[{key:"deployed",value:function(){return this._deployed()}},{key:"_deployed",value:function(e){var t=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return t})):this._deployedPromise=this.provider.getCode(this.address,e).then((function(e){return"0x"===e&&x.throwError("contract not deployed",k.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:t.address,operation:"getDeployed"}),t}))),this._deployedPromise}},{key:"fallback",value:function(e){var t=this;this.signer||x.throwError("sending a transactions require a signer",k.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var n=(0,v.shallowCopy)(e||{});return["from","to"].forEach((function(e){null!=n[e]&&x.throwError("cannot override "+e,k.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})})),n.to=this.resolvedAddress,this.deployed().then((function(){return t.signer.sendTransaction(n)}))}},{key:"connect",value:function(e){"string"===typeof e&&(e=new m.b(e,this.provider));var t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&(0,v.defineReadOnly)(t,"deployTransaction",this.deployTransaction),t}},{key:"attach",value:function(e){return new this.constructor(e,this.interface,this.signer||this.provider)}},{key:"_normalizeRunningEvent",value:function(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}},{key:"_getRunningEvent",value:function(e){if("string"===typeof e){if("error"===e)return this._normalizeRunningEvent(new _);if("event"===e)return this._normalizeRunningEvent(new U("event",null));if("*"===e)return this._normalizeRunningEvent(new D(this.address,this.interface));var t=this.interface.getEvent(e);return this._normalizeRunningEvent(new B(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{var n=e.topics[0];if("string"!==typeof n)throw new Error("invalid topic");var a=this.interface.getEvent(n);return this._normalizeRunningEvent(new B(this.address,this.interface,a,e.topics))}catch(r){}var o={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new U(P(o),o))}return this._normalizeRunningEvent(new D(this.address,this.interface))}},{key:"_checkRunningEvents",value:function(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];var t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}},{key:"_wrapEvent",value:function(e,t,n){var a=this,o=(0,v.deepCopy)(t);return o.removeListener=function(){n&&(e.removeListener(n),a._checkRunningEvents(e))},o.getBlock=function(){return a.provider.getBlock(t.blockHash)},o.getTransaction=function(){return a.provider.getTransaction(t.transactionHash)},o.getTransactionReceipt=function(){return a.provider.getTransactionReceipt(t.transactionHash)},e.prepareEvent(o),o}},{key:"_addEventListener",value:function(e,t,n){var o=this;if(this.provider||x.throwError("events require a provider or a signer with a provider",k.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){var r=function(n){var r=o._wrapEvent(e,n,t);if(null==r.decodeError)try{var i=e.getEmit(r);o.emit.apply(o,[e.filter].concat((0,a.Z)(i)))}catch(s){r.decodeError=s.error}null!=e.filter&&o.emit("event",r),null!=r.decodeError&&o.emit("error",r.decodeError,r)};this._wrappedEmits[e.tag]=r,null!=e.filter&&this.provider.on(e.filter,r)}}},{key:"queryFilter",value:function(e,t,n){var a=this,o=this._getRunningEvent(e),r=(0,v.shallowCopy)(o.filter);return"string"===typeof t&&(0,y.isHexString)(t,32)?(null!=n&&x.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),r.blockHash=t):(r.fromBlock=null!=t?t:0,r.toBlock=null!=n?n:"latest"),this.provider.getLogs(r).then((function(e){return e.map((function(e){return a._wrapEvent(o,e,null)}))}))}},{key:"on",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}},{key:"once",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}},{key:"emit",value:function(e){if(!this.provider)return!1;for(var t=this._getRunningEvent(e),n=arguments.length,a=new Array(n>1?n-1:0),o=1;o0;return this._checkRunningEvents(t),r}},{key:"listenerCount",value:function(e){var t=this;return this.provider?null==e?Object.keys(this._runningEvents).reduce((function(e,n){return e+t._runningEvents[n].listenerCount()}),0):this._getRunningEvent(e).listenerCount():0}},{key:"listeners",value:function(e){if(!this.provider)return[];if(null==e){var t=[];for(var n in this._runningEvents)this._runningEvents[n].listeners().forEach((function(e){t.push(e)}));return t}return this._getRunningEvent(e).listeners()}},{key:"removeAllListeners",value:function(e){if(!this.provider)return this;if(null==e){for(var t in this._runningEvents){var n=this._runningEvents[t];n.removeAllListeners(),this._checkRunningEvents(n)}return this}var a=this._getRunningEvent(e);return a.removeAllListeners(),this._checkRunningEvents(a),this}},{key:"off",value:function(e,t){if(!this.provider)return this;var n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"getContractAddress",value:function(e){return(0,h.getContractAddress)(e)}},{key:"getInterface",value:function(e){return p.vU.isInterface(e)?e:new p.vU(e)}},{key:"isIndexed",value:function(e){return p.Hk.isIndexed(e)}}]),e}(),O=function(e){(0,s.Z)(n,e);var t=(0,c.Z)(n);function n(){return(0,u.Z)(this,n),t.apply(this,arguments)}return(0,d.Z)(n)}(N),F=function(){function e(t,n,a){(0,u.Z)(this,e);var o=null;"0x"!==(o="string"===typeof n?n:(0,y.isBytes)(n)?(0,y.hexlify)(n):n&&"string"===typeof n.object?n.object:"!").substring(0,2)&&(o="0x"+o),(!(0,y.isHexString)(o)||o.length%2)&&x.throwArgumentError("invalid bytecode","bytecode",n),a&&!m.E.isSigner(a)&&x.throwArgumentError("invalid signer","signer",a),(0,v.defineReadOnly)(this,"bytecode",o),(0,v.defineReadOnly)(this,"interface",(0,v.getStatic)(this instanceof e?this.constructor:void 0,"getInterface")(t)),(0,v.defineReadOnly)(this,"signer",a||null)}return(0,d.Z)(e,[{key:"getDeployTransaction",value:function(){for(var e={},t=arguments.length,n=new Array(t),a=0;a0&&Array.isArray(t)?e(t,o-1):n.push(t)}))}(e,t),n}function l(e){return function(e){var t=0;return function(){return e[t++]}}(function(e){var t=0;function n(){return e[t++]<<8|e[t++]}for(var a=n(),o=1,r=[0,1],i=1;i>--u&1}for(var f=Math.pow(2,31),p=f>>>1,b=p>>1,m=f-1,h=0,g=0;g<31;g++)h=h<<1|l();for(var y=[],v=0,w=f;;){for(var k=Math.floor(((h-v+1)*o-1)/w),A=0,x=a;x-A>1;){var I=A+x>>>1;k>>1|l(),T=T<<1^p,S=(S^p)<<1|p|1;v=T,w=1+S-T}var C=a-4;return y.map((function(t){switch(t-C){case 3:return C+65792+(e[c++]<<16|e[c++]<<8|e[c++]);case 2:return C+256+(e[c++]<<8|e[c++]);case 1:return C+e[c++];default:return t-1}}))}(e))}function f(e){return 1&e?~e>>1:e>>1}function p(e,t){for(var n=Array(e),a=0,o=-1;a>=1),check:2==r}}()}(v),I=45,T=95;function S(e){return(0,o.XL)(e)}function C(e){return e.filter((function(e){return 65039!=e}))}function E(e){var t,n=(0,u.Z)(e.split("."));try{for(n.s();!(t=n.n()).done;){var a=t.value,o=S(a);try{for(var r=o.lastIndexOf(T)-1;r>=0;r--)if(o[r]!==T)throw new Error("underscore only allowed at start");if(o.length>=4&&o.every((function(e){return e<128}))&&o[2]===I&&o[3]===I)throw new Error("invalid label extension")}catch(i){throw new Error('Invalid label "'.concat(a,'": ').concat(i.message))}}}catch(i){n.e(i)}finally{n.f()}return e}function R(e){return E(function(e,t){var n=S(e).reverse(),a=[];for(;n.length;){var o=M(n);if(o)a.push.apply(a,(0,c.Z)(t(o)));else{var r=n.pop();if(w.has(r))a.push(r);else if(!k.has(r)){var i=A[r];if(!i)throw new Error("Disallowed codepoint: 0x".concat(r.toString(16).toUpperCase()));a.push.apply(a,(0,c.Z)(i))}}}return E((s=String.fromCodePoint.apply(String,a),s.normalize("NFC")));var s}(e,C))}function M(e,t){var n,a,o,r=x,i=[],s=e.length;t&&(t.length=0);for(var u=function(){var u=e[--s];if(!(r=null===(n=r.branches.find((function(e){return e.set.has(u)})))||void 0===n?void 0:n.node))return"break";if(r.save)o=u;else if(r.check&&u===o)return"break";i.push(u),r.fe0f&&(i.push(65039),s>0&&65039==e[s-1]&&s--),r.valid&&(a=i.slice(),2==r.valid&&a.splice(1,1),t&&t.push.apply(t,(0,c.Z)(e.slice(s).reverse())),e.length=s)};s;){if("break"===u())break}return a}var P=new i.Logger(s.i),U=new Uint8Array(32);function _(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function B(e){var t=(0,o.Y0)(R(e)),n=[];if(0===e.length)return n;for(var a=0,r=0;r=t.length)throw new Error("invalid ENS name; empty component");return n.push(_(t.slice(a))),n}function D(e){return B(e).map((function(e){return(0,o.ZN)(e)})).join(".")}function N(e){try{return 0!==B(e).length}catch(t){}return!1}function O(e){"string"!==typeof e&&P.throwArgumentError("invalid ENS name; not a string","name",e);for(var t=U,n=B(e);n.length;)t=(0,r.keccak256)((0,a.concat)([t,(0,r.keccak256)(n.pop())]));return(0,a.hexlify)(t)}function F(e){return(0,a.hexlify)((0,a.concat)(B(e).map((function(e){if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}U.fill(0)},19083:function(e,t,n){"use strict";n.d(t,{E:function(){return R}});var a=n(74165),o=n(15671),r=n(43144),i=n(56602),s=n(60492),c=n(7965),u=n(99233),d=n(62734),l=n(93830),f=n(43089),p=n(51051),b=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},m=new l.Logger(f.i),h=new Uint8Array(32);h.fill(0);var g=s.O$.from(-1),y=s.O$.from(0),v=s.O$.from(1),w=s.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var k=(0,c.hexZeroPad)(v.toHexString(),32),A=(0,c.hexZeroPad)(y.toHexString(),32),x={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},I=["name","version","chainId","verifyingContract","salt"];function T(e){return function(t){return"string"!==typeof t&&m.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var S={name:T("name"),version:T("version"),chainId:function(e){try{return s.O$.from(e).toString()}catch(t){}return m.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,i.getAddress)(e).toLowerCase()}catch(t){}return m.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=(0,c.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,c.hexlify)(t)}catch(n){}return m.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function C(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var n=""===t[1],a=parseInt(t[2]||"256");(a%8!==0||a>256||t[2]&&t[2]!==String(a))&&m.throwArgumentError("invalid numeric width","type",e);var o=w.mask(n?a-1:a),r=n?o.add(v).mul(g):y;return function(t){var n=s.O$.from(t);return(n.lt(r)||n.gt(o))&&m.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,c.hexZeroPad)(n.toTwos(256).toHexString(),32)}}var d=e.match(/^bytes(\d+)$/);if(d){var l=parseInt(d[1]);return(0===l||l>32||d[1]!==String(l))&&m.throwArgumentError("invalid bytes width","type",e),function(t){return(0,c.arrayify)(t).length!==l&&m.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=(0,c.arrayify)(e),n=t.length%32;return n?(0,c.hexConcat)([t,h.slice(n)]):(0,c.hexlify)(t)}(t)}}switch(e){case"address":return function(e){return(0,c.hexZeroPad)((0,i.getAddress)(e),32)};case"bool":return function(e){return e?k:A};case"bytes":return function(e){return(0,u.keccak256)(e)};case"string":return function(e){return(0,p.id)(e)}}return null}function E(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var R=function(){function e(t){(0,o.Z)(this,e),(0,d.defineReadOnly)(this,"types",Object.freeze((0,d.deepCopy)(t))),(0,d.defineReadOnly)(this,"_encoderCache",{}),(0,d.defineReadOnly)(this,"_types",{});var n={},a={},r={};Object.keys(t).forEach((function(e){n[e]={},a[e]=[],r[e]={}}));var i=function(e){var o={};t[e].forEach((function(r){o[r.name]&&m.throwArgumentError("duplicate variable name ".concat(JSON.stringify(r.name)," in ").concat(JSON.stringify(e)),"types",t),o[r.name]=!0;var i=r.type.match(/^([^\x5b]*)(\x5b|$)/)[1];i===e&&m.throwArgumentError("circular type reference to ".concat(JSON.stringify(i)),"types",t),C(i)||(a[i]||m.throwArgumentError("unknown type ".concat(JSON.stringify(i)),"types",t),a[i].push(e),n[e][i]=!0)}))};for(var s in t)i(s);var c=Object.keys(a).filter((function(e){return 0===a[e].length}));for(var u in 0===c.length?m.throwArgumentError("missing primary type","types",t):c.length>1&&m.throwArgumentError("ambiguous primary types or unused types: ".concat(c.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),(0,d.defineReadOnly)(this,"primaryType",c[0]),function e(o,i){i[o]&&m.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),i[o]=!0,Object.keys(n[o]).forEach((function(t){a[t]&&(e(t,i),Object.keys(i).forEach((function(e){r[e][t]=!0})))})),delete i[o]}(this.primaryType,{}),r){var l=Object.keys(r[u]);l.sort(),this._types[u]=E(u,t[u])+l.map((function(e){return E(e,t[e])})).join("")}}return(0,r.Z)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,n=C(e);if(n)return n;var a=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(a){var o=a[1],r=this.getEncoder(o),i=parseInt(a[3]);return function(e){i>=0&&e.length!==i&&m.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var n=e.map(r);return t._types[o]&&(n=n.map(u.keccak256)),(0,u.keccak256)((0,c.hexConcat)(n))}}var s=this.types[e];if(s){var d=(0,p.id)(this._types[e]);return function(e){var n=s.map((function(n){var a=n.name,o=n.type,r=t.getEncoder(o)(e[a]);return t._types[o]?(0,u.keccak256)(r):r}));return n.unshift(d),(0,c.hexConcat)(n)}}return m.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||m.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return(0,u.keccak256)(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,n){var a=this;if(C(e))return n(e,t);var o=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(o){var r=o[1],i=parseInt(o[3]);return i>=0&&t.length!==i&&m.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return a._visit(r,e,n)}))}var s=this.types[e];return s?s.reduce((function(e,o){var r=o.name,i=o.type;return e[r]=a._visit(i,t[r],n),e}),{}):m.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,n,a){return e.from(n).hashStruct(t,a)}},{key:"hashDomain",value:function(t){var n=[];for(var a in t){var o=x[a];o||m.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(a)),"domain",t),n.push({name:a,type:o})}return n.sort((function(e,t){return I.indexOf(e.name)-I.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:n},t)}},{key:"encode",value:function(t,n,a){return(0,c.hexConcat)(["0x1901",e.hashDomain(t),e.from(n).hash(a)])}},{key:"hash",value:function(t,n,a){return(0,u.keccak256)(e.encode(t,n,a))}},{key:"resolveNames",value:function(t,n,o,r){return b(this,void 0,void 0,(0,a.Z)().mark((function i(){var s,u,l;return(0,a.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=(0,d.shallowCopy)(t),s={},t.verifyingContract&&!(0,c.isHexString)(t.verifyingContract,20)&&(s[t.verifyingContract]="0x"),(u=e.from(n)).visit(o,(function(e,t){return"address"!==e||(0,c.isHexString)(t,20)||(s[t]="0x"),t})),i.t0=(0,a.Z)().keys(s);case 6:if((i.t1=i.t0()).done){i.next=13;break}return l=i.t1.value,i.next=10,r(l);case 10:s[l]=i.sent,i.next=6;break;case 13:return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),o=u.visit(o,(function(e,t){return"address"===e&&s[t]?s[t]:t})),i.abrupt("return",{domain:t,value:o});case 16:case"end":return i.stop()}}),i)})))}},{key:"getPayload",value:function(t,n,a){e.hashDomain(t);var o={},r=[];I.forEach((function(e){var n=t[e];null!=n&&(o[e]=S[e](n),r.push({name:e,type:x[e]}))}));var i=e.from(n),u=(0,d.shallowCopy)(n);return u.EIP712Domain?m.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",n):u.EIP712Domain=r,i.encode(a),{types:u,domain:o,primaryType:i.primaryType,message:i.visit(a,(function(e,t){if(e.match(/^bytes(\d*)/))return(0,c.hexlify)((0,c.arrayify)(t));if(e.match(/^u?int/))return s.O$.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&m.throwArgumentError("invalid string","value",t),t}return m.throwArgumentError("unsupported type","type",e)}))}}}]),e}()},53648:function(e,t,n){"use strict";n.r(t),n.d(t,{HDNode:function(){return S},defaultPath:function(){return T},entropyToMnemonic:function(){return R},getAccountPath:function(){return P},isValidMnemonic:function(){return M},mnemonicToEntropy:function(){return E},mnemonicToSeed:function(){return C}});var a=n(15671),o=n(43144),r=n(69851),i=n(7965),s=n(60492),c=n(41705),u=n(32420),d=n(62734),l=n(27242),f=n(11577),p=n(78997),b=n(59632),m=n(34748),h=new(n(93830).Logger)("hdnode/5.7.0"),g=s.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),y=(0,c.Y0)("Bitcoin seed"),v=2147483648;function w(e){return(1<=256)throw new Error("Depth too large!");return A((0,i.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,i.hexlify)(this.depth),this.parentFingerprint,(0,i.hexZeroPad)((0,i.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,i.concat)(["0x00",this.privateKey]):this.publicKey]))}},{key:"neuter",value:function(){return new e(I,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}},{key:"_derive",value:function(t){if(t>4294967295)throw new Error("invalid index - "+String(t));var n=this.path;n&&(n+="/"+(t&~v));var a=new Uint8Array(37);if(t&v){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set((0,i.arrayify)(this.privateKey),1),n&&(n+="'")}else a.set((0,i.arrayify)(this.publicKey));for(var o=24;o>=0;o-=8)a[33+(o>>3)]=t>>24-o&255;var r=(0,i.arrayify)((0,f.Gy)(p.p.sha512,this.chainCode,a)),c=r.slice(0,32),u=r.slice(32),d=null,b=null;this.privateKey?d=k(s.O$.from(c).add(this.privateKey).mod(g)):b=new l.SigningKey((0,i.hexlify)(c))._addPoint(this.publicKey);var m=n,h=this.mnemonic;return h&&(m=Object.freeze({phrase:h.phrase,path:n,locale:h.locale||"en"})),new e(I,d,b,this.fingerprint,k(u),t,this.depth+1,m)}},{key:"derivePath",value:function(e){var t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();for(var n=this,a=0;a=v)throw new Error("invalid path index - "+o);n=n._derive(v+r)}else{if(!o.match(/^[0-9]+$/))throw new Error("invalid path component - "+o);var i=parseInt(o);if(i>=v)throw new Error("invalid path index - "+o);n=n._derive(i)}}return n}}],[{key:"_fromSeed",value:function(t,n){var a=(0,i.arrayify)(t);if(a.length<16||a.length>64)throw new Error("invalid seed");var o=(0,i.arrayify)((0,f.Gy)(p.p.sha512,y,a));return new e(I,k(o.slice(0,32)),null,"0x00000000",k(o.slice(32)),0,0,n)}},{key:"fromMnemonic",value:function(t,n,a){return t=R(E(t,a=x(a)),a),e._fromSeed(C(t,n),{phrase:t,path:"m",locale:a.locale})}},{key:"fromSeed",value:function(t){return e._fromSeed(t,null)}},{key:"fromExtendedKey",value:function(t){var n=r.Base58.decode(t);82===n.length&&A(n.slice(0,78))===t||h.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var a=n[4],o=(0,i.hexlify)(n.slice(5,9)),s=parseInt((0,i.hexlify)(n.slice(9,13)).substring(2),16),c=(0,i.hexlify)(n.slice(13,45)),u=n.slice(45,78);switch((0,i.hexlify)(n.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new e(I,null,(0,i.hexlify)(u),o,c,s,a,null);case"0x0488ade4":case"0x04358394 ":if(0!==u[0])break;return new e(I,(0,i.hexlify)(u.slice(1)),null,o,c,s,a,null)}return h.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}]),e}();function C(e,t){t||(t="");var n=(0,c.Y0)("mnemonic"+t,c.Uj.NFKD);return(0,u.n)((0,c.Y0)(e,c.Uj.NFKD),n,2048,64,"sha512")}function E(e,t){t=x(t),h.checkNormalize();var n=t.split(e);if(n.length%3!==0)throw new Error("invalid mnemonic");for(var a=(0,i.arrayify)(new Uint8Array(Math.ceil(11*n.length/8))),o=0,r=0;r>3]|=1<<7-o%8),o++}var u=32*n.length/3,d=w(n.length/3);if(((0,i.arrayify)((0,f.JQ)(a.slice(0,u/8)))[0]&d)!==(a[a.length-1]&d))throw new Error("invalid checksum");return(0,i.hexlify)(a.slice(0,u/8))}function R(e,t){if(t=x(t),(e=(0,i.arrayify)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");for(var n=[0],a=11,o=0;o8?(n[n.length-1]<<=8,n[n.length-1]|=e[o],a-=8):(n[n.length-1]<<=a,n[n.length-1]|=e[o]>>8-a,n.push(e[o]&(1<<8-a)-1),a+=3);var r=e.length/4,s=(0,i.arrayify)((0,f.JQ)(e))[0]&w(r);return n[n.length-1]<<=r,n[n.length-1]|=s>>8-r,t.join(n.map((function(e){return t.getWord(e)})))}function M(e,t){try{return E(e,t),!0}catch(n){}return!1}function P(e){return("number"!==typeof e||e<0||e>=v||e%1)&&h.throwArgumentError("invalid account index","index",e),"m/44'/60'/".concat(e,"'/0/0")}},7340:function(e,t,n){"use strict";n.d(t,{i:function(){return a}});var a="json-wallets/5.7.0"},20201:function(e,t,n){"use strict";n.r(t),n.d(t,{decryptCrowdsale:function(){return w},decryptJsonWallet:function(){return x},decryptJsonWalletSync:function(){return I},decryptKeystore:function(){return A.pe},decryptKeystoreSync:function(){return A.hb},encryptKeystore:function(){return A.HI},getJsonWalletAddress:function(){return k.Rb},isCrowdsaleWallet:function(){return k.LW},isKeystoreWallet:function(){return k.aO}});var a=n(15671),o=n(43144),r=n(60136),i=n(29388),s=n(84663),c=n.n(s),u=n(56602),d=n(7965),l=n(99233),f=n(32420),p=n(41705),b=n(62734),m=n(93830),h=n(7340),g=n(73792),y=new m.Logger(h.i),v=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"isCrowdsaleAccount",value:function(e){return!(!e||!e._isCrowdsaleAccount)}}]),n}(b.Description);function w(e,t){var n=JSON.parse(e);t=(0,g.Ij)(t);var a=(0,u.getAddress)((0,g.gx)(n,"ethaddr")),o=(0,g.p3)((0,g.gx)(n,"encseed"));o&&o.length%16===0||y.throwArgumentError("invalid encseed","json",e);for(var r=(0,d.arrayify)((0,f.n)(t,t,2e3,32,"sha256")).slice(0,16),i=o.slice(0,16),s=o.slice(16),b=new(c().ModeOfOperation.cbc)(r,i),m=c().padding.pkcs7.strip((0,d.arrayify)(b.decrypt(s))),h="",w=0;wc[n]||r.log.apply(r,t)}},{key:"debug",value:function(){for(var t=arguments.length,n=new Array(t),a=0;a>4],n+=b[15&t[r]];o.push(e+"=Uint8Array(0x"+n+")")}else o.push(e+"="+JSON.stringify(t))}catch(u){o.push(e+"="+JSON.stringify(a[e].toString()))}})),o.push("code=".concat(n)),o.push("version=".concat(this.version));var r=t,i="";switch(n){case f.NUMERIC_FAULT:i="NUMERIC_FAULT";var c=t;switch(c){case"overflow":case"underflow":case"division-by-zero":i+="-"+c;break;case"negative-power":case"negative-width":i+="-unsupported";break;case"unbound-bitwise-result":i+="-unbound-result"}break;case f.CALL_EXCEPTION:case f.INSUFFICIENT_FUNDS:case f.MISSING_NEW:case f.NONCE_EXPIRED:case f.REPLACEMENT_UNDERPRICED:case f.TRANSACTION_REPLACED:case f.UNPREDICTABLE_GAS_LIMIT:i=n}i&&(t+=" [ See: https://links.ethers.org/v5-errors-"+i+" ]"),o.length&&(t+=" ("+o.join(", ")+")");var u=new Error(t);return u.reason=r,u.code=n,Object.keys(a).forEach((function(e){u[e]=a[e]})),u}},{key:"throwError",value:function(e,t,n){throw this.makeError(e,t,n)}},{key:"throwArgumentError",value:function(t,n,a){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:n,value:a})}},{key:"assert",value:function(e,t,n,a){e||this.throwError(t,n,a)}},{key:"assertArgument",value:function(e,t,n,a){e||this.throwArgumentError(t,n,a)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}},{key:"checkSafeUint53",value:function(t,n){"number"===typeof t&&(null==n&&(n="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,n,a){a=a?": "+a:"",tn&&this.throwError("too many arguments"+a,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:n})}},{key:"checkNew",value:function(t,n){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:n.name})}},{key:"checkAbstract",value:function(t,n){t===n?this.throwError("cannot instantiate abstract class "+JSON.stringify(n.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:n.name})}}],[{key:"globalLogger",value:function(){return d||(d=new e("logger/5.7.0")),d}},{key:"setCensorship",value:function(t,n){if(!t&&n&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),i){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}s=!!t,i=!!n}},{key:"setLogLevel",value:function(t){var n=c[t.toLowerCase()];null!=n?u=n:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();m.errors=f,m.levels=l},32420:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});var a=n(7965),o=n(11577);function r(e,t,n,r,i){var s;e=(0,a.arrayify)(e),t=(0,a.arrayify)(t);var c,u,d=1,l=new Uint8Array(r),f=new Uint8Array(t.length+4);f.set(t);for(var p=1;p<=d;p++){f[t.length]=p>>24&255,f[t.length+1]=p>>16&255,f[t.length+2]=p>>8&255,f[t.length+3]=255&p;var b=(0,a.arrayify)((0,o.Gy)(i,e,f));s||(s=b.length,u=new Uint8Array(s),c=r-((d=Math.ceil(r/s))-1)*s),u.set(b);for(var m=1;m>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function i(e){for(var t=1,n=0;n126)return"Invalid prefix ("+e+")";t=r(t)^a>>5}for(t=r(t),n=0;nt)return"Exceeds length limit";var a=e.toLowerCase(),o=e.toUpperCase();if(e!==a&&e!==o)return"Mixed-case string "+e;var s=(e=a).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var c=e.slice(0,s),u=e.slice(s+1);if(u.length<6)return"Data too short";var d=i(c);if("string"===typeof d)return d;for(var l=[],f=0;f=u.length||l.push(b)}return 1!==d?"Invalid checksum for "+e:{prefix:c,words:l}}function c(e,t,n,a){for(var o=0,r=0,i=(1<=n;)r-=n,s.push(o>>r&i);if(a)r>0&&s.push(o<=t)return"Excess padding";if(o<a)throw new TypeError("Exceeds length limit");var o=i(e=e.toLowerCase());if("string"===typeof o)throw new Error(o);for(var s=e+"1",c=0;c>5!==0)throw new Error("Non 5-bit word");o=r(o)^u,s+=t.charAt(u)}for(c=0;c<6;++c)o=r(o);for(o^=1,c=0;c<6;++c){var d=o>>5*(5-c)&31;s+=t.charAt(d)}return s},toWordsUnsafe:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},38052:function(e,t,n){"use strict";n.r(t),n.d(t,{randomBytes:function(){return a.O},shuffled:function(){return o.y}});var a=n(97122),o=n(41203)},97122:function(e,t,n){"use strict";n.d(t,{O:function(){return c}});var a=n(7965),o=n(93830),r=new o.Logger("random/5.7.0");var i=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw new Error("unable to locate global object")}(),s=i.crypto||i.msCrypto;function c(e){(e<=0||e>1024||e%1||e!=e)&&r.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return s.getRandomValues(t),(0,a.arrayify)(t)}s&&s.getRandomValues||(r.warn("WARNING: Missing strong random number source"),s={getRandomValues:function(e){return r.throwError("no secure random source avaialble",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},41203:function(e,t,n){"use strict";function a(e){for(var t=(e=e.slice()).length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),a=e[t];e[t]=e[n],e[n]=a}return e}n.d(t,{y:function(){return a}})},35491:function(e,t,n){"use strict";n.r(t),n.d(t,{decode:function(){return f},encode:function(){return u}});var a=n(7965),o=n(93830),r=new o.Logger("rlp/5.7.0");function i(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function s(e,t,n){for(var a=0,o=0;ot+1+a&&r.throwError("child data too short",o.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function l(e,t){if(0===e.length&&r.throwError("data too short",o.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var n=e[t]-247;t+1+n>e.length&&r.throwError("data short segment too short",o.Logger.errors.BUFFER_OVERRUN,{});var i=s(e,t+1,n);return t+1+n+i>e.length&&r.throwError("data long segment too short",o.Logger.errors.BUFFER_OVERRUN,{}),d(e,t,t+1+n,n+i)}if(e[t]>=192){var c=e[t]-192;return t+1+c>e.length&&r.throwError("data array too short",o.Logger.errors.BUFFER_OVERRUN,{}),d(e,t,t+1,c)}if(e[t]>=184){var u=e[t]-183;t+1+u>e.length&&r.throwError("data array too short",o.Logger.errors.BUFFER_OVERRUN,{});var l=s(e,t+1,u);return t+1+u+l>e.length&&r.throwError("data array too short",o.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+u+l,result:(0,a.hexlify)(e.slice(t+1+u,t+1+u+l))}}if(e[t]>=128){var f=e[t]-128;return t+1+f>e.length&&r.throwError("data too short",o.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+f,result:(0,a.hexlify)(e.slice(t+1,t+1+f))}}return{consumed:1,result:(0,a.hexlify)(e[t])}}function f(e){var t=(0,a.arrayify)(e),n=l(t,0);return n.consumed!==t.length&&r.throwArgumentError("invalid rlp data","data",e),n.result}},33737:function(e,t,n){"use strict";n.r(t),n.d(t,{SupportedAlgorithm:function(){return o.p},computeHmac:function(){return a.Gy},ripemd160:function(){return a.bP},sha256:function(){return a.JQ},sha512:function(){return a.o}});var a=n(11577),o=n(78997)},11577:function(e,t,n){"use strict";n.d(t,{Gy:function(){return f},bP:function(){return u},JQ:function(){return d},o:function(){return l}});var a=n(46419),o=n.n(a),r=n(7965),i=n(78997),s=n(93830),c=new s.Logger("sha2/5.7.0");function u(e){return"0x"+o().ripemd160().update((0,r.arrayify)(e)).digest("hex")}function d(e){return"0x"+o().sha256().update((0,r.arrayify)(e)).digest("hex")}function l(e){return"0x"+o().sha512().update((0,r.arrayify)(e)).digest("hex")}function f(e,t,n){return i.p[e]||c.throwError("unsupported algorithm "+e,s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+o().hmac(o()[e],(0,r.arrayify)(t)).update((0,r.arrayify)(n)).digest("hex")}},78997:function(e,t,n){"use strict";var a;n.d(t,{p:function(){return a}}),function(e){e.sha256="sha256",e.sha512="sha512"}(a||(a={}))},27242:function(e,t,n){"use strict";n.r(t),n.d(t,{SigningKey:function(){return J},computePublicKey:function(){return X},recoverPublicKey:function(){return Y}});var a=n(15671),o=n(43144),r=n(43811),i=n.n(r),s=n(46419),c=n.n(s);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self&&self;function u(e,t,n){return n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===t||null===t)&&n.path)}},e(n,n.exports),n.exports}var d=l;function l(e,t){if(!e)throw new Error(t||"Assertion failed")}l.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var f=u((function(e,t){var n=t;function a(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",n=0;n>8,i=255&o;r?n.push(r,i):n.push(i)}return n},n.zero2=a,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}})),p=u((function(e,t){var n=t;n.assert=d,n.toArray=f.toArray,n.zero2=f.zero2,n.toHex=f.toHex,n.encode=f.encode,n.getNAF=function(e,t,n){var a=new Array(Math.max(e.bitLength(),n)+1);a.fill(0);for(var o=1<(o>>1)-1?(o>>1)-c:c,r.isubn(s)):s=0,a[i]=s,r.iushrn(1)}return a},n.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var a,o=0,r=0;e.cmpn(-o)>0||t.cmpn(-r)>0;){var i,s,c=e.andln(3)+o&3,u=t.andln(3)+r&3;3===c&&(c=-1),3===u&&(u=-1),i=0===(1&c)?0:3!==(a=e.andln(7)+o&7)&&5!==a||2!==u?c:-c,n[0].push(i),s=0===(1&u)?0:3!==(a=t.andln(7)+r&7)&&5!==a||2!==c?u:-u,n[1].push(s),2*o===i+1&&(o=1-o),2*r===s+1&&(r=1-r),e.iushrn(1),t.iushrn(1)}return n},n.cachedProperty=function(e,t,n){var a="_"+t;e.prototype[t]=function(){return void 0!==this[a]?this[a]:this[a]=n.call(this)}},n.parseBytes=function(e){return"string"===typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new(i())(e,"hex","le")}})),b=p.getNAF,m=p.getJSF,h=p.assert;function g(e,t){this.type=e,this.p=new(i())(t.p,16),this.red=t.prime?i().red(t.prime):i().mont(this.p),this.zero=new(i())(0).toRed(this.red),this.one=new(i())(1).toRed(this.red),this.two=new(i())(2).toRed(this.red),this.n=t.n&&new(i())(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var y=g;function v(e,t){this.curve=e,this.type=t,this.precomputed=null}g.prototype.point=function(){throw new Error("Not implemented")},g.prototype.validate=function(){throw new Error("Not implemented")},g.prototype._fixedNafMul=function(e,t){h(e.precomputed);var n=e._getDoubles(),a=b(t,1,this._bitLength),o=(1<=r;c--)i=(i<<1)+a[c];s.push(i)}for(var u=this.jpoint(null,null,null),d=this.jpoint(null,null,null),l=o;l>0;l--){for(r=0;r=0;s--){for(var c=0;s>=0&&0===r[s];s--)c++;if(s>=0&&c++,i=i.dblp(c),s<0)break;var u=r[s];h(0!==u),i="affine"===e.type?u>0?i.mixedAdd(o[u-1>>1]):i.mixedAdd(o[-u-1>>1].neg()):u>0?i.add(o[u-1>>1]):i.add(o[-u-1>>1].neg())}return"affine"===e.type?i.toP():i},g.prototype._wnafMulAdd=function(e,t,n,a,o){var r,i,s,c=this._wnafT1,u=this._wnafT2,d=this._wnafT3,l=0;for(r=0;r=1;r-=2){var p=r-1,h=r;if(1===c[p]&&1===c[h]){var g=[t[p],null,null,t[h]];0===t[p].y.cmp(t[h].y)?(g[1]=t[p].add(t[h]),g[2]=t[p].toJ().mixedAdd(t[h].neg())):0===t[p].y.cmp(t[h].y.redNeg())?(g[1]=t[p].toJ().mixedAdd(t[h]),g[2]=t[p].add(t[h].neg())):(g[1]=t[p].toJ().mixedAdd(t[h]),g[2]=t[p].toJ().mixedAdd(t[h].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],v=m(n[p],n[h]);for(l=Math.max(v[0].length,l),d[p]=new Array(l),d[h]=new Array(l),i=0;i=0;r--){for(var I=0;r>=0;){var T=!0;for(i=0;i=0&&I++,A=A.dblp(I),r<0)break;for(i=0;i0?s=u[i][S-1>>1]:S<0&&(s=u[i][-S-1>>1].neg()),A="affine"===s.type?A.mixedAdd(s):A.add(s))}}for(r=0;r=Math.ceil((e.bitLength()+1)/t.step)},v.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],a=this,o=0;o=0&&(r=t,s=n),a.negative&&(a=a.neg(),o=o.neg()),r.negative&&(r=r.neg(),s=s.neg()),[{a:a,b:o},{a:r,b:s}]},A.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],a=t[1],o=a.b.mul(e).divRound(this.n),r=n.b.neg().mul(e).divRound(this.n),i=o.mul(n.a),s=r.mul(a.a),c=o.mul(n.b),u=r.mul(a.b);return{k1:e.sub(i).sub(s),k2:c.add(u).neg()}},A.prototype.pointFromX=function(e,t){(e=new(i())(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=n.redSqrt();if(0!==a.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var o=a.fromRed().isOdd();return(t&&!o||!t&&o)&&(a=a.redNeg()),this.point(e,a)},A.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,a=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(a).redIAdd(this.b);return 0===n.redSqr().redISub(o).cmpn(0)},A.prototype._endoWnafMulAdd=function(e,t,n){for(var a=this._endoWnafT1,o=this._endoWnafT2,r=0;r":""},I.prototype.isInfinity=function(){return this.inf},I.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),a=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,a)},I.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),a=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(a),r=o.redSqr().redISub(this.x.redAdd(this.x)),i=o.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},I.prototype.getX=function(){return this.x.fromRed()},I.prototype.getY=function(){return this.y.fromRed()},I.prototype.mul=function(e){return e=new(i())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},I.prototype.mulAdd=function(e,t,n){var a=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(a,o):this.curve._wnafMulAdd(1,a,o,2)},I.prototype.jmulAdd=function(e,t,n){var a=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(a,o,!0):this.curve._wnafMulAdd(1,a,o,2,!0)},I.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},I.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,a=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(a)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(a)}}}return t},I.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},w(T,y.BasePoint),A.prototype.jpoint=function(e,t,n){return new T(this,e,t,n)},T.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),a=this.y.redMul(t).redMul(e);return this.curve.point(n,a)},T.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},T.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),a=this.x.redMul(t),o=e.x.redMul(n),r=this.y.redMul(t.redMul(e.z)),i=e.y.redMul(n.redMul(this.z)),s=a.redSub(o),c=r.redSub(i);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),d=u.redMul(s),l=a.redMul(u),f=c.redSqr().redIAdd(d).redISub(l).redISub(l),p=c.redMul(l.redISub(f)).redISub(r.redMul(d)),b=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,p,b)},T.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,a=e.x.redMul(t),o=this.y,r=e.y.redMul(t).redMul(this.z),i=n.redSub(a),s=o.redSub(r);if(0===i.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=i.redSqr(),u=c.redMul(i),d=n.redMul(c),l=s.redSqr().redIAdd(u).redISub(d).redISub(d),f=s.redMul(d.redISub(l)).redISub(o.redMul(u)),p=this.z.redMul(i);return this.curve.jpoint(l,f,p)},T.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(o),0===this.x.cmp(n))return!0}},T.prototype.inspect=function(){return this.isInfinity()?"":""},T.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var S=u((function(e,t){var n=t;n.base=y,n.short=x,n.mont=null,n.edwards=null})),C=u((function(e,t){var n,a=t,o=p.assert;function r(e){"short"===e.type?this.curve=new S.short(e):"edwards"===e.type?this.curve=new S.edwards(e):this.curve=new S.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(e,t){Object.defineProperty(a,e,{configurable:!0,enumerable:!0,get:function(){var n=new r(t);return Object.defineProperty(a,e,{configurable:!0,enumerable:!0,value:n}),n}})}a.PresetCurve=r,i("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:c().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:c().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:c().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:c().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),i("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:c().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:c().sha256,gRed:!1,g:["9"]}),i("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:c().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=null.crash()}catch(s){n=void 0}i("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:c().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})}));function E(e){if(!(this instanceof E))return new E(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=f.toArray(e.entropy,e.entropyEnc||"hex"),n=f.toArray(e.nonce,e.nonceEnc||"hex"),a=f.toArray(e.pers,e.persEnc||"hex");d(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,a)}var R=E;E.prototype._init=function(e,t,n){var a=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},E.prototype.generate=function(e,t,n,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(a=n,n=t,t=null),n&&(n=f.toArray(n,a||"hex"),this._update(n));for(var o=[];o.length"};var _=p.assert;function B(e,t){if(e instanceof B)return e;this._importDER(e,t)||(_(e.r&&e.s,"Signature without r or s"),this.r=new(i())(e.r,16),this.s=new(i())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var D=B;function N(){this.place=0}function O(e,t){var n=e[t.place++];if(!(128&n))return n;var a=15&n;if(0===a||a>4)return!1;for(var o=0,r=0,i=t.place;r>>=0;return!(o<=127)&&(t.place=i,o)}function F(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}B.prototype._importDER=function(e,t){e=p.toArray(e,t);var n=new N;if(48!==e[n.place++])return!1;var a=O(e,n);if(!1===a)return!1;if(a+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var o=O(e,n);if(!1===o)return!1;var r=e.slice(n.place,o+n.place);if(n.place+=o,2!==e[n.place++])return!1;var s=O(e,n);if(!1===s)return!1;if(e.length!==s+n.place)return!1;var c=e.slice(n.place,s+n.place);if(0===r[0]){if(!(128&r[1]))return!1;r=r.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new(i())(r),this.s=new(i())(c),this.recoveryParam=null,!0},B.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=F(t),n=F(n);!n[0]&&!(128&n[1]);)n=n.slice(1);var a=[2];L(a,t.length),(a=a.concat(t)).push(2),L(a,n.length);var o=a.concat(n),r=[48];return L(r,o.length),r=r.concat(o),p.encode(r,e)};var j=function(){throw new Error("unsupported")},H=p.assert;function G(e){if(!(this instanceof G))return new G(e);"string"===typeof e&&(H(Object.prototype.hasOwnProperty.call(C,e),"Unknown curve "+e),e=C[e]),e instanceof C.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var z=G;G.prototype.keyPair=function(e){return new U(this,e)},G.prototype.keyFromPrivate=function(e,t){return U.fromPrivate(this,e,t)},G.prototype.keyFromPublic=function(e,t){return U.fromPublic(this,e,t)},G.prototype.genKeyPair=function(e){e||(e={});for(var t=new R({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||j(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),a=this.n.sub(new(i())(2));;){var o=new(i())(t.generate(n));if(!(o.cmp(a)>0))return o.iaddn(1),this.keyFromPrivate(o)}},G.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},G.prototype.sign=function(e,t,n,a){"object"===typeof n&&(a=n,n=null),a||(a={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new(i())(e,16));for(var o=this.n.byteLength(),r=t.getPrivate().toArray("be",o),s=e.toArray("be",o),c=new R({hash:this.hash,entropy:r,nonce:s,pers:a.pers,persEnc:a.persEnc||"utf8"}),u=this.n.sub(new(i())(1)),d=0;;d++){var l=a.k?a.k(d):new(i())(c.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(u)>=0)){var f=this.g.mul(l);if(!f.isInfinity()){var p=f.getX(),b=p.umod(this.n);if(0!==b.cmpn(0)){var m=l.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var h=(f.getY().isOdd()?1:0)|(0!==p.cmp(b)?2:0);return a.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),h^=1),new D({r:b,s:m,recoveryParam:h})}}}}}},G.prototype.verify=function(e,t,n,a){e=this._truncateToN(new(i())(e,16)),n=this.keyFromPublic(n,a);var o=(t=new D(t,"hex")).r,r=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;var s,c=r.invm(this.n),u=c.mul(e).umod(this.n),d=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,n.getPublic(),d)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,n.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},G.prototype.recoverPubKey=function(e,t,n,a){H((3&n)===n,"The recovery param is more than two bits"),t=new D(t,a);var o=this.n,r=new(i())(e),s=t.r,c=t.s,u=1&n,d=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),u):this.curve.pointFromX(s,u);var l=t.r.invm(o),f=o.sub(r).mul(l).umod(o),p=c.mul(l).umod(o);return this.g.mulAdd(f,s,p)},G.prototype.getKeyRecoveryParam=function(e,t,n,a){if(null!==(t=new D(t,a)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var r;try{r=this.recoverPubKey(e,t,o)}catch(e){continue}if(r.eq(n))return o}throw new Error("Unable to find valid recovery factor")};var K=u((function(e,t){var n=t;n.version="6.5.4",n.utils=p,n.rand=function(){throw new Error("unsupported")},n.curve=S,n.curves=C,n.ec=z,n.eddsa=null})).ec,W=n(7965),Z=n(62734),V=new(n(93830).Logger)("signing-key/5.7.0"),q=null;function Q(){return q||(q=new K("secp256k1")),q}var J=function(){function e(t){(0,a.Z)(this,e),(0,Z.defineReadOnly)(this,"curve","secp256k1"),(0,Z.defineReadOnly)(this,"privateKey",(0,W.hexlify)(t)),32!==(0,W.hexDataLength)(this.privateKey)&&V.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var n=Q().keyFromPrivate((0,W.arrayify)(this.privateKey));(0,Z.defineReadOnly)(this,"publicKey","0x"+n.getPublic(!1,"hex")),(0,Z.defineReadOnly)(this,"compressedPublicKey","0x"+n.getPublic(!0,"hex")),(0,Z.defineReadOnly)(this,"_isSigningKey",!0)}return(0,o.Z)(e,[{key:"_addPoint",value:function(e){var t=Q().keyFromPublic((0,W.arrayify)(this.publicKey)),n=Q().keyFromPublic((0,W.arrayify)(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=Q().keyFromPrivate((0,W.arrayify)(this.privateKey)),n=(0,W.arrayify)(e);32!==n.length&&V.throwArgumentError("bad digest length","digest",e);var a=t.sign(n,{canonical:!0});return(0,W.splitSignature)({recoveryParam:a.recoveryParam,r:(0,W.hexZeroPad)("0x"+a.r.toString(16),32),s:(0,W.hexZeroPad)("0x"+a.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=Q().keyFromPrivate((0,W.arrayify)(this.privateKey)),n=Q().keyFromPublic((0,W.arrayify)(X(e)));return(0,W.hexZeroPad)("0x"+t.derive(n.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function Y(e,t){var n=(0,W.splitSignature)(t),a={r:(0,W.arrayify)(n.r),s:(0,W.arrayify)(n.s)};return"0x"+Q().recoverPubKey((0,W.arrayify)(e),a,n.recoveryParam).encode("hex",!1)}function X(e,t){var n=(0,W.arrayify)(e);if(32===n.length){var a=new J(n);return t?"0x"+Q().keyFromPrivate(n).getPublic(!0,"hex"):a.publicKey}return 33===n.length?t?(0,W.hexlify)(n):"0x"+Q().keyFromPublic(n).getPublic(!1,"hex"):65===n.length?t?"0x"+Q().keyFromPublic(n).getPublic(!0,"hex"):(0,W.hexlify)(n):V.throwArgumentError("invalid public or private key","key","[REDACTED]")}},14365:function(e,t,n){"use strict";n.r(t),n.d(t,{keccak256:function(){return h},pack:function(){return m},sha256:function(){return g}});var a=n(60492),o=n(7965),r=n(99233),i=n(11577),s=n(41705),c=n(93830),u=new RegExp("^bytes([0-9]+)$"),d=new RegExp("^(u?int)([0-9]*)$"),l=new RegExp("^(.*)\\[([0-9]*)\\]$"),f="0000000000000000000000000000000000000000000000000000000000000000",p=new c.Logger("solidity/5.7.0");function b(e,t,n){switch(e){case"address":return n?(0,o.zeroPad)(t,32):(0,o.arrayify)(t);case"string":return(0,s.Y0)(t);case"bytes":return(0,o.arrayify)(t);case"bool":return t=t?"0x01":"0x00",n?(0,o.zeroPad)(t,32):(0,o.arrayify)(t)}var r=e.match(d);if(r){var i=parseInt(r[2]||"256");return(r[2]&&String(i)!==r[2]||i%8!==0||0===i||i>256)&&p.throwArgumentError("invalid number type","type",e),n&&(i=256),t=a.O$.from(t).toTwos(i),(0,o.zeroPad)(t,i/8)}if(r=e.match(u)){var c=parseInt(r[1]);return(String(c)!==r[1]||0===c||c>32)&&p.throwArgumentError("invalid bytes type","type",e),(0,o.arrayify)(t).byteLength!==c&&p.throwArgumentError("invalid value for ".concat(e),"value",t),n?(0,o.arrayify)((t+f).substring(0,66)):t}if((r=e.match(l))&&Array.isArray(t)){var m=r[1];parseInt(r[2]||String(t.length))!=t.length&&p.throwArgumentError("invalid array length for ".concat(e),"value",t);var h=[];return t.forEach((function(e){h.push(b(m,e,!0))})),(0,o.concat)(h)}return p.throwArgumentError("invalid type","type",e)}function m(e,t){e.length!=t.length&&p.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);var n=[];return e.forEach((function(e,a){n.push(b(e,t[a]))})),(0,o.hexlify)((0,o.concat)(n))}function h(e,t){return(0,r.keccak256)(m(e,t))}function g(e,t){return(0,i.JQ)(m(e,t))}},53290:function(e,t,n){"use strict";n.d(t,{F:function(){return s},s:function(){return i}});var a=n(73570),o=n(7965),r=n(41705);function i(e){var t=(0,r.Y0)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,o.hexlify)((0,o.concat)([t,a.R]).slice(0,32))}function s(e){var t=(0,o.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var n=31;0===t[n-1];)n--;return(0,r.ZN)(t.slice(0,n))}},59230:function(e,t,n){"use strict";n.d(t,{Ll:function(){return b}});var a=n(41705);function o(e,t){t||(t=function(e){return[parseInt(e,16)]});var n=0,a={};return e.split(",").forEach((function(e){var o=e.split(":");n+=parseInt(o[0],16),a[n]=t(o[1])})),a}function r(e){var t=0;return e.split(",").map((function(e){var n=e.split("-");return 1===n.length?n[1]="0":""===n[1]&&(n[1]="1"),{l:t+parseInt(n[0],16),h:t=parseInt(n[1],16)}}))}function i(e,t){for(var n=0,a=0;a=(n+=o.l)&&e<=n+o.h&&(e-n)%(o.d||1)===0){if(o.e&&-1!==o.e.indexOf(e-n))continue;return o}}return null}var s=r("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),c="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),u=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],d=o("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),l=o("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),f=o("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!==0)throw new Error("bad data");for(var t=[],n=0;n=0)return[];if(e>=65024&&e<=65039)return[];var t=function(e){var t=i(e,u);if(t)return[e+t.s];var n=d[e];if(n)return n;var a=l[e];return a?[e+a[0]]:f[e]||null}(e);return t||[e]})),n=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(n=(0,a.XL)((0,a.uu)(n),a.Uj.NFKC)).forEach((function(e){if(i(e,p))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),n.forEach((function(e){if(i(e,s))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var o=(0,a.uu)(n);if("-"===o.substring(0,1)||"--"===o.substring(2,4)||"-"===o.substring(o.length-1))throw new Error("invalid hyphen");return o}},385:function(e,t,n){"use strict";n.r(t),n.d(t,{UnicodeNormalizationForm:function(){return r.Uj},Utf8ErrorFuncs:function(){return r.te},Utf8ErrorReason:function(){return r.Uw},_toEscapedUtf8String:function(){return r.U$},formatBytes32String:function(){return a.s},nameprep:function(){return o.Ll},parseBytes32String:function(){return a.F},toUtf8Bytes:function(){return r.Y0},toUtf8CodePoints:function(){return r.XL},toUtf8String:function(){return r.ZN}});var a=n(53290),o=n(59230),r=n(41705)},41705:function(e,t,n){"use strict";n.d(t,{Uj:function(){return a},te:function(){return c},Uw:function(){return o},U$:function(){return f},uu:function(){return p},Y0:function(){return d},XL:function(){return m},ZN:function(){return b}});var a,o,r=n(7965),i=new(n(93830).Logger)("strings/5.7.0");function s(e,t,n,a,r){if(e===o.BAD_PREFIX||e===o.UNEXPECTED_CONTINUE){for(var i=0,s=t+1;s>6===2;s++)i++;return i}return e===o.OVERRUN?n.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(a||(a={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(o||(o={}));var c=Object.freeze({error:function(e,t,n,a,o){return i.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",n)},ignore:s,replace:function(e,t,n,a,r){return e===o.OVERLONG?(a.push(r),0):(a.push(65533),s(e,t,n))}});function u(e,t){null==t&&(t=c.error),e=(0,r.arrayify)(e);for(var n=[],a=0;a>7!==0){var s=null,u=null;if(192===(224&i))s=1,u=127;else if(224===(240&i))s=2,u=2047;else{if(240!==(248&i)){a+=t(128===(192&i)?o.UNEXPECTED_CONTINUE:o.BAD_PREFIX,a-1,e,n);continue}s=3,u=65535}if(a-1+s>=e.length)a+=t(o.OVERRUN,a-1,e,n);else{for(var d=i&(1<<8-s-1)-1,l=0;l1114111?a+=t(o.OUT_OF_RANGE,a-1-s,e,n,d):d>=55296&&d<=57343?a+=t(o.UTF16_SURROGATE,a-1-s,e,n,d):d<=u?a+=t(o.OVERLONG,a-1-s,e,n,d):n.push(d))}}else n.push(i)}return n}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.current;t!=a.current&&(i.checkNormalize(),e=e.normalize(t));for(var n=[],o=0;o>6|192),n.push(63&s|128);else if(55296==(64512&s)){o++;var c=e.charCodeAt(o);if(o>=e.length||56320!==(64512&c))throw new Error("invalid utf-8 string");var u=65536+((1023&s)<<10)+(1023&c);n.push(u>>18|240),n.push(u>>12&63|128),n.push(u>>6&63|128),n.push(63&u|128)}else n.push(s>>12|224),n.push(s>>6&63|128),n.push(63&s|128)}return(0,r.arrayify)(n)}function l(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function f(e,t){return'"'+u(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?l(e):l(55296+((e-=65536)>>10&1023))+l(56320+(1023&e))})).join("")+'"'}function p(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}function b(e,t){return p(u(e,t))}function m(e){return u(d(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.current))}},59632:function(e,t,n){"use strict";n.r(t),n.d(t,{TransactionTypes:function(){return a},accessListify:function(){return A},computeAddress:function(){return y},parse:function(){return E},recoverAddress:function(){return v},serialize:function(){return S}});var a,o=n(56602),r=n(60492),i=n(7965),s=n(96772),c=n(99233),u=n(62734),d=n(35491),l=n(27242),f=n(93830),p=new f.Logger("transactions/5.7.0");function b(e){return"0x"===e?null:(0,o.getAddress)(e)}function m(e){return"0x"===e?s._Y:r.O$.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(a||(a={}));var h=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],g={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function y(e){var t=(0,l.computePublicKey)(e);return(0,o.getAddress)((0,i.hexDataSlice)((0,c.keccak256)((0,i.hexDataSlice)(t,1)),12))}function v(e,t){return y((0,l.recoverPublicKey)((0,i.arrayify)(e),t))}function w(e,t){var n=(0,i.stripZeros)(r.O$.from(e).toHexString());return n.length>32&&p.throwArgumentError("invalid length for "+t,"transaction:"+t,e),n}function k(e,t){return{address:(0,o.getAddress)(e),storageKeys:(t||[]).map((function(t,n){return 32!==(0,i.hexDataLength)(t)&&p.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(n,"]"),t),t.toLowerCase()}))}}function A(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&p.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),k(e[0],e[1])):k(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var n=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return k(t,Object.keys(n).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function x(e){return A(e).map((function(e){return[e.address,e.storageKeys]}))}function I(e,t){if(null!=e.gasPrice){var n=r.O$.from(e.gasPrice),a=r.O$.from(e.maxFeePerGas||0);n.eq(a)||p.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:a})}var s=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,o.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",x(e.accessList||[])];if(t){var c=(0,i.splitSignature)(t);s.push(w(c.recoveryParam,"recoveryParam")),s.push((0,i.stripZeros)(c.r)),s.push((0,i.stripZeros)(c.s))}return(0,i.hexConcat)(["0x02",d.encode(s)])}function T(e,t){var n=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,o.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",x(e.accessList||[])];if(t){var a=(0,i.splitSignature)(t);n.push(w(a.recoveryParam,"recoveryParam")),n.push((0,i.stripZeros)(a.r)),n.push((0,i.stripZeros)(a.s))}return(0,i.hexConcat)(["0x01",d.encode(n)])}function S(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&p.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,u.checkProperties)(e,g);var n=[];h.forEach((function(t){var a=e[t.name]||[],o={};t.numeric&&(o.hexPad="left"),a=(0,i.arrayify)((0,i.hexlify)(a,o)),t.length&&a.length!==t.length&&a.length>0&&p.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,a),t.maxLength&&(a=(0,i.stripZeros)(a)).length>t.maxLength&&p.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,a),n.push((0,i.hexlify)(a))}));var a=0;if(null!=e.chainId?"number"!==typeof(a=e.chainId)&&p.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!(0,i.isBytesLike)(t)&&t.v>28&&(a=Math.floor((t.v-35)/2)),0!==a&&(n.push((0,i.hexlify)(a)),n.push("0x"),n.push("0x")),!t)return d.encode(n);var o=(0,i.splitSignature)(t),r=27+o.recoveryParam;return 0!==a?(n.pop(),n.pop(),n.pop(),r+=2*a+8,o.v>28&&o.v!==r&&p.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):o.v!==r&&p.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),n.push((0,i.hexlify)(r)),n.push((0,i.stripZeros)((0,i.arrayify)(o.r))),n.push((0,i.stripZeros)((0,i.arrayify)(o.s))),d.encode(n)}(e,t);switch(e.type){case 1:return T(e,t);case 2:return I(e,t)}return p.throwError("unsupported transaction type: ".concat(e.type),f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function C(e,t,n){try{var a=m(t[0]).toNumber();if(0!==a&&1!==a)throw new Error("bad recid");e.v=a}catch(r){p.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,i.hexZeroPad)(t[1],32),e.s=(0,i.hexZeroPad)(t[2],32);try{var o=(0,c.keccak256)(n(e));e.from=v(o,{r:e.r,s:e.s,recoveryParam:e.v})}catch(r){}}function E(e){var t=(0,i.arrayify)(e);if(t[0]>127)return function(e){var t=d.decode(e);9!==t.length&&6!==t.length&&p.throwArgumentError("invalid raw transaction","rawTransaction",e);var n={nonce:m(t[0]).toNumber(),gasPrice:m(t[1]),gasLimit:m(t[2]),to:b(t[3]),value:m(t[4]),data:t[5],chainId:0};if(6===t.length)return n;try{n.v=r.O$.from(t[6]).toNumber()}catch(u){return n}if(n.r=(0,i.hexZeroPad)(t[7],32),n.s=(0,i.hexZeroPad)(t[8],32),r.O$.from(n.r).isZero()&&r.O$.from(n.s).isZero())n.chainId=n.v,n.v=0;else{n.chainId=Math.floor((n.v-35)/2),n.chainId<0&&(n.chainId=0);var a=n.v-27,o=t.slice(0,6);0!==n.chainId&&(o.push((0,i.hexlify)(n.chainId)),o.push("0x"),o.push("0x"),a-=2*n.chainId+8);var s=(0,c.keccak256)(d.encode(o));try{n.from=v(s,{r:(0,i.hexlify)(n.r),s:(0,i.hexlify)(n.s),recoveryParam:a})}catch(u){}n.hash=(0,c.keccak256)(e)}return n.type=null,n}(t);switch(t[0]){case 1:return function(e){var t=d.decode(e.slice(1));8!==t.length&&11!==t.length&&p.throwArgumentError("invalid component count for transaction type: 1","payload",(0,i.hexlify)(e));var n={type:1,chainId:m(t[0]).toNumber(),nonce:m(t[1]).toNumber(),gasPrice:m(t[2]),gasLimit:m(t[3]),to:b(t[4]),value:m(t[5]),data:t[6],accessList:A(t[7])};return 8===t.length||(n.hash=(0,c.keccak256)(e),C(n,t.slice(8),T)),n}(t);case 2:return function(e){var t=d.decode(e.slice(1));9!==t.length&&12!==t.length&&p.throwArgumentError("invalid component count for transaction type: 2","payload",(0,i.hexlify)(e));var n=m(t[2]),a=m(t[3]),o={type:2,chainId:m(t[0]).toNumber(),nonce:m(t[1]).toNumber(),maxPriorityFeePerGas:n,maxFeePerGas:a,gasPrice:null,gasLimit:m(t[4]),to:b(t[5]),value:m(t[6]),data:t[7],accessList:A(t[8])};return 9===t.length||(o.hash=(0,c.keccak256)(e),C(o,t.slice(9),I)),o}(t)}return p.throwError("unsupported transaction type: ".concat(t[0]),f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},65956:function(e,t,n){"use strict";n.r(t),n.d(t,{commify:function(){return i},formatEther:function(){return u},formatUnits:function(){return s},parseEther:function(){return d},parseUnits:function(){return c}});var a=n(88065),o=new(n(93830).Logger)("units/5.7.0"),r=["wei","kwei","mwei","gwei","szabo","finney","ether"];function i(e){var t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&o.throwArgumentError("invalid value","value",e);var n=t[0],a="";for("-"===n.substring(0,1)&&(a="-",n=n.substring(1));"0"===n.substring(0,1);)n=n.substring(1);""===n&&(n="0");var r="";for(2===t.length&&(r="."+(t[1]||"0"));r.length>2&&"0"===r[r.length-1];)r=r.substring(0,r.length-1);for(var i=[];n.length;){if(n.length<=3){i.unshift(n);break}var s=n.length-3;i.unshift(n.substring(s)),n=n.substring(0,s)}return a+i.join(",")+r}function s(e,t){if("string"===typeof t){var n=r.indexOf(t);-1!==n&&(t=3*n)}return(0,a.S5)(e,null!=t?t:18)}function c(e,t){if("string"!==typeof e&&o.throwArgumentError("value must be a string","value",e),"string"===typeof t){var n=r.indexOf(t);-1!==n&&(t=3*n)}return(0,a.Ox)(e,null!=t?t:18)}function u(e){return s(e,18)}function d(e){return c(e,18)}},13084:function(e,t,n){"use strict";n.r(t),n.d(t,{Wallet:function(){return S},verifyMessage:function(){return C},verifyTypedData:function(){return E}});var a=n(74165),o=n(15671),r=n(43144),i=n(97326),s=n(60136),c=n(29388),u=n(56602),d=n(34407),l=n(21477),f=n(7965),p=n(75338),b=n(19083),m=n(53648),h=n(99233),g=n(62734),y=n(97122),v=n(27242),w=n(82377),k=n(20201),A=n(59632),x=n(93830),I=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},T=new x.Logger("wallet/5.7.0");var S=function(e){(0,s.Z)(n,e);var t=(0,c.Z)(n);function n(e,a){var r,s;if((0,o.Z)(this,n),r=t.call(this),null!=(s=e)&&(0,f.isHexString)(s.privateKey,32)&&null!=s.address){var c=new v.SigningKey(e.privateKey);if((0,g.defineReadOnly)((0,i.Z)(r),"_signingKey",(function(){return c})),(0,g.defineReadOnly)((0,i.Z)(r),"address",(0,A.computeAddress)(r.publicKey)),r.address!==(0,u.getAddress)(e.address)&&T.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){var t=e.mnemonic;return t&&t.phrase}(e)){var l=e.mnemonic;(0,g.defineReadOnly)((0,i.Z)(r),"_mnemonic",(function(){return{phrase:l.phrase,path:l.path||m.defaultPath,locale:l.locale||"en"}}));var p=r.mnemonic,b=m.HDNode.fromMnemonic(p.phrase,null,p.locale).derivePath(p.path);(0,A.computeAddress)(b.privateKey)!==r.address&&T.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,g.defineReadOnly)((0,i.Z)(r),"_mnemonic",(function(){return null}))}else{if(v.SigningKey.isSigningKey(e))"secp256k1"!==e.curve&&T.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,g.defineReadOnly)((0,i.Z)(r),"_signingKey",(function(){return e}));else{"string"===typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);var h=new v.SigningKey(e);(0,g.defineReadOnly)((0,i.Z)(r),"_signingKey",(function(){return h}))}(0,g.defineReadOnly)((0,i.Z)(r),"_mnemonic",(function(){return null})),(0,g.defineReadOnly)((0,i.Z)(r),"address",(0,A.computeAddress)(r.publicKey))}return a&&!d.zt.isProvider(a)&&T.throwArgumentError("invalid provider","provider",a),(0,g.defineReadOnly)((0,i.Z)(r),"provider",a||null),r}return(0,r.Z)(n,[{key:"mnemonic",get:function(){return this._mnemonic()}},{key:"privateKey",get:function(){return this._signingKey().privateKey}},{key:"publicKey",get:function(){return this._signingKey().publicKey}},{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"connect",value:function(e){return new n(this,e)}},{key:"signTransaction",value:function(e){var t=this;return(0,g.resolveProperties)(e).then((function(n){null!=n.from&&((0,u.getAddress)(n.from)!==t.address&&T.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete n.from);var a=t._signingKey().signDigest((0,h.keccak256)((0,A.serialize)(n)));return(0,A.serialize)(n,a)}))}},{key:"signMessage",value:function(e){return I(this,void 0,void 0,(0,a.Z)().mark((function t(){return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,f.joinSignature)(this._signingKey().signDigest((0,p.r)(e))));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"_signTypedData",value:function(e,t,n){return I(this,void 0,void 0,(0,a.Z)().mark((function o(){var r,i=this;return(0,a.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,b.E.resolveNames(e,t,n,(function(e){return null==i.provider&&T.throwError("cannot resolve ENS names without a provider",x.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),i.provider.resolveName(e)}));case 2:return r=a.sent,a.abrupt("return",(0,f.joinSignature)(this._signingKey().signDigest(b.E.hash(r.domain,t,r.value))));case 4:case"end":return a.stop()}}),o,this)})))}},{key:"encrypt",value:function(e,t,n){if("function"!==typeof t||n||(n=t,t={}),n&&"function"!==typeof n)throw new Error("invalid callback");return t||(t={}),(0,w.HI)(this,e,t,n)}}],[{key:"createRandom",value:function(e){var t=(0,y.O)(16);e||(e={}),e.extraEntropy&&(t=(0,f.arrayify)((0,f.hexDataSlice)((0,h.keccak256)((0,f.concat)([t,e.extraEntropy])),0,16)));var a=(0,m.entropyToMnemonic)(t,e.locale);return n.fromMnemonic(a,e.path,e.locale)}},{key:"fromEncryptedJson",value:function(e,t,a){return(0,k.decryptJsonWallet)(e,t,a).then((function(e){return new n(e)}))}},{key:"fromEncryptedJsonSync",value:function(e,t){return new n((0,k.decryptJsonWalletSync)(e,t))}},{key:"fromMnemonic",value:function(e,t,a){return t||(t=m.defaultPath),new n(m.HDNode.fromMnemonic(e,null,a).derivePath(t))}}]),n}(l.E);function C(e,t){return(0,A.recoverAddress)((0,p.r)(e),t)}function E(e,t,n,a){return(0,A.recoverAddress)(b.E.hash(e,t,n),a)}},75858:function(e,t,n){"use strict";n.r(t),n.d(t,{_fetchData:function(){return m},fetchJson:function(){return h},poll:function(){return g}});var a=n(74165),o=n(58224),r=n(7965),i=n(62734),s=n(41705),c=n(93830),u=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))};function d(e,t){return u(this,void 0,void 0,(0,a.Z)().mark((function n(){var o,i,s,c,u;return(0,a.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==t&&(t={}),o={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0},!0!==t.skipFetchSetup&&(o.mode="cors",o.cache="no-cache",o.credentials="same-origin",o.redirect="follow",o.referrer="client"),null!=t.fetchOptions&&((i=t.fetchOptions).mode&&(o.mode=i.mode),i.cache&&(o.cache=i.cache),i.credentials&&(o.credentials=i.credentials),i.redirect&&(o.redirect=i.redirect),i.referrer&&(o.referrer=i.referrer)),n.next=7,fetch(e,o);case 7:return s=n.sent,n.next=10,s.arrayBuffer();case 10:return c=n.sent,u={},s.headers.forEach?s.headers.forEach((function(e,t){u[t.toLowerCase()]=e})):s.headers.keys().forEach((function(e){u[e.toLowerCase()]=s.headers.get(e)})),n.abrupt("return",{headers:u,statusCode:s.status,statusMessage:s.statusText,body:(0,r.arrayify)(new Uint8Array(c))});case 14:case"end":return n.stop()}}),n)})))}var l=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},f=new c.Logger("web/5.7.1");function p(e){return new Promise((function(t){setTimeout(t,e)}))}function b(e,t){if(null==e)return null;if("string"===typeof e)return e;if((0,r.isBytesLike)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,s.ZN)(e)}catch(n){}return(0,r.hexlify)(e)}return e}function m(e,t,n){var r="object"===typeof e&&null!=e.throttleLimit?e.throttleLimit:12;f.assertArgument(r>0&&r%1===0,"invalid connection throttle limit","connection.throttleLimit",r);var u="object"===typeof e?e.throttleCallback:null,m="object"===typeof e&&"number"===typeof e.throttleSlotInterval?e.throttleSlotInterval:100;f.assertArgument(m>0&&m%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",m);var h="object"===typeof e&&!!e.errorPassThrough,g={},y=null,v={method:"GET"},w=!1,k=12e4;if("string"===typeof e)y=e;else if("object"===typeof e){if(null!=e&&null!=e.url||f.throwArgumentError("missing URL","connection.url",e),y=e.url,"number"===typeof e.timeout&&e.timeout>0&&(k=e.timeout),e.headers)for(var A in e.headers)g[A.toLowerCase()]={key:A,value:String(e.headers[A])},["if-none-match","if-modified-since"].indexOf(A.toLowerCase())>=0&&(w=!0);if(v.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==y.substring(0,6)&&!0!==e.allowInsecureAuthentication&&f.throwError("basic authentication requires a secure https url",c.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:y,user:e.user,password:"[REDACTED]"});var x=e.user+":"+e.password;g.authorization={key:"Authorization",value:"Basic "+(0,o.c)((0,s.Y0)(x))}}null!=e.skipFetchSetup&&(v.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(v.fetchOptions=(0,i.shallowCopy)(e.fetchOptions))}var I,T=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),S=y?y.match(T):null;if(S)try{var C={statusCode:200,statusMessage:"OK",headers:{"content-type":S[1]||"text/plain"},body:S[2]?(0,o.J)(S[3]):(I=S[3],(0,s.Y0)(I.replace(/%([0-9a-f][0-9a-f])/gi,(function(e,t){return String.fromCharCode(parseInt(t,16))}))))},E=C.body;return n&&(E=n(C.body,C)),Promise.resolve(E)}catch(U){f.throwError("processing response error",c.Logger.errors.SERVER_ERROR,{body:b(S[1],S[2]),error:U,requestBody:null,requestMethod:"GET",url:y})}t&&(v.method="POST",v.body=t,null==g["content-type"]&&(g["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==g["content-length"]&&(g["content-length"]={key:"Content-Length",value:String(t.length)}));var R={};Object.keys(g).forEach((function(e){var t=g[e];R[t.key]=t.value})),v.headers=R;var M=function(){var e=null;return{promise:new Promise((function(t,n){k&&(e=setTimeout((function(){null!=e&&(e=null,n(f.makeError("timeout",c.Logger.errors.TIMEOUT,{requestBody:b(v.body,R["content-type"]),requestMethod:v.method,timeout:k,url:y})))}),k))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),P=function(){return l(this,void 0,void 0,(0,a.Z)().mark((function e(){var t,o,i,s,l,g,k,A,x,I;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t=300)&&(M.cancel(),f.throwError("bad response",c.Logger.errors.SERVER_ERROR,{status:o.statusCode,headers:o.headers,body:b(k,o.headers?o.headers["content-type"]:null),requestBody:b(v.body,R["content-type"]),requestMethod:v.method,url:y})),!n){e.next=60;break}return e.prev=37,e.next=40,n(k,o);case 40:return A=e.sent,M.cancel(),e.abrupt("return",A);case 45:if(e.prev=45,e.t1=e.catch(37),!(e.t1.throttleRetry&&ts)return void(i()&&a(new Error("retry limit reached")));var u=t.interval*parseInt(String(Math.random()*Math.pow(2,c)));ut.ceiling&&(u=t.ceiling),setTimeout(o,u)}return null}),(function(e){i()&&a(e)}))}()}))}},75218:function(e,t,n){"use strict";n.d(t,{D:function(){return u}});var a=n(15671),o=n(43144),r=n(51051),i=n(62734),s=n(93830),c=new s.Logger("wordlists/5.7.0"),u=function(){function e(t){(0,a.Z)(this,e),c.checkAbstract(this instanceof e?this.constructor:void 0,e),(0,i.defineReadOnly)(this,"locale",t)}return(0,o.Z)(e,[{key:"split",value:function(e){return e.toLowerCase().split(/ +/g)}},{key:"join",value:function(e){return e.join(" ")}}],[{key:"check",value:function(e){for(var t=[],n=0;n<2048;n++){var a=e.getWord(n);if(n!==e.getWordIndex(a))return"0x";t.push(a)}return(0,r.id)(t.join("\n")+"\n")}},{key:"register",value:function(e,t){t||(t=e.locale)}}]),e}()},34748:function(e,t,n){"use strict";n.d(t,{E:function(){return f}});var a=n(15671),o=n(43144),r=n(60136),i=n(29388),s=n(75218),c="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",u=null;function d(e){if(null==u&&(u=c.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==s.D.check(e)))throw u=null,new Error("BIP39 Wordlist for en (English) FAILED")}var l=new(function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,"en")}return(0,o.Z)(n,[{key:"getWord",value:function(e){return d(this),u[e]}},{key:"getWordIndex",value:function(e){return d(this),u.indexOf(e)}}]),n}(s.D));s.D.register(l);var f={en:l}},93704:function(e,t,n){var a=n(65218);e.exports=function(){return e={418:function(e,t){!function(e,t){for(var n in t)e[n]=t[n]}(t,function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={splitValues:!1});var n,o=this;this.headersMap={},e&&("undefined"!=typeof Headers&&e instanceof Headers?a.getHeaderKeys(e).forEach((function(n){a.getHeaderValues(e,n).forEach((function(e){t.splitValues?o.append(n,a.splitHeaderValue(e)):o.append(n,e)}))})):"object"==typeof(n=e)&&"object"==typeof n.headersMap&&"function"==typeof n.forEach?e.forEach((function(e,t){o.append(e,t)})):"undefined"!=typeof Map&&e instanceof Map?e.forEach((function(e,t){o.append(t,e)})):"string"==typeof e?this.appendFromString(e):"object"==typeof e&&Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];Array.isArray(n)?n.forEach((function(e){o.append(t,e)})):o.append(t,n)})))}return e.prototype.appendFromString=function(e){for(var t=e.split("\r\n"),n=0;n0){var r=a.substring(0,o).trim(),i=a.substring(o+1).trim();this.append(r,i)}}},e.prototype.delete=function(e,t){var n=a.normalizeName(e);if(void 0===t)delete this.headersMap[n];else{var o=this.headersMap[n];if(o){var r=o.indexOf(t);r>=0&&o.splice(r,1),0===o.length&&delete this.headersMap[n]}}},e.prototype.append=function(e,t){var n=this,o=a.normalizeName(e);Array.isArray(this.headersMap[o])||(this.headersMap[o]=[]),Array.isArray(t)?t.forEach((function(e){n.headersMap[o].push(a.normalizeValue(e))})):this.headersMap[o].push(a.normalizeValue(t))},e.prototype.set=function(e,t){var n=a.normalizeName(e);if(Array.isArray(t)){var o=[];t.forEach((function(e){o.push(a.normalizeValue(e))})),this.headersMap[n]=o}else this.headersMap[n]=[a.normalizeValue(t)]},e.prototype.has=function(e,t){var n=this.headersMap[a.normalizeName(e)];if(!Array.isArray(n))return!1;if(void 0!==t){var o=a.normalizeValue(t);return n.indexOf(o)>=0}return!0},e.prototype.get=function(e){var t=this.headersMap[a.normalizeName(e)];return void 0!==t?t.concat():[]},e.prototype.forEach=function(e){var t=this;Object.getOwnPropertyNames(this.headersMap).forEach((function(n){e(n,t.headersMap[n])}),this)},e.prototype.toHeaders=function(){if("undefined"!=typeof Headers){var e=new Headers;return this.forEach((function(t,n){n.forEach((function(n){e.append(t,n)}))})),e}throw new Error("Headers class is not defined")},e}();t.BrowserHeaders=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0);t.BrowserHeaders=a.BrowserHeaders},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterateHeaders=function(e,t){for(var n=e[Symbol.iterator](),a=n.next();!a.done;)t(a.value[0]),a=n.next()},t.iterateHeadersKeys=function(e,t){for(var n=e.keys(),a=n.next();!a.done;)t(a.value),a=n.next()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(2);t.normalizeName=function(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()},t.normalizeValue=function(e){return"string"!=typeof e&&(e=String(e)),e},t.getHeaderValues=function(e,t){var n=e;if(n instanceof Headers&&n.getAll)return n.getAll(t);var a=n.get(t);return a&&"string"==typeof a?[a]:a},t.getHeaderKeys=function(e){var t=e,n={},o=[];return t.keys?a.iterateHeadersKeys(t,(function(e){n[e]||(n[e]=!0,o.push(e))})):t.forEach?t.forEach((function(e,t){n[t]||(n[t]=!0,o.push(t))})):a.iterateHeaders(t,(function(e){var t=e[0];n[t]||(n[t]=!0,o.push(t))})),o},t.splitHeaderValue=function(e){var t=[];return e.split(", ").forEach((function(e){e.split(",").forEach((function(e){t.push(e)}))})),t}}]))},617:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkParser=t.ChunkType=t.encodeASCII=t.decodeASCII=void 0;var a,o=n(65);function r(e){return 9===(t=e)||10===t||13===t||e>=32&&e<=126;var t}function i(e){for(var t=0;t!==e.length;++t)if(!r(e[t]))throw new Error("Metadata is not valid (printable) ASCII");return String.fromCharCode.apply(String,Array.prototype.slice.call(e))}function s(e){return 128==(128&e.getUint8(0))}function c(e){return e.getUint32(1,!1)}function u(e,t,n){return e.byteLength-t>=n}function d(e,t,n){if(e.slice)return e.slice(t,n);var a=e.length;void 0!==n&&(a=n);for(var o=new Uint8Array(a-t),r=0,i=t;i=0?n:r.httpStatusToCode(t);this.props.debug&&i.debug("onHeaders.code",a);var o=e.get("grpc-message")||[];if(this.props.debug&&i.debug("onHeaders.gRPCMessage",o),this.rawOnHeaders(e),a!==r.Code.OK){var s=this.decodeGRPCStatus(o[0]);this.rawOnError(a,s,e)}}},e.prototype.onTransportChunk=function(e){var t=this;if(this.closed)this.props.debug&&i.debug("grpc.onChunk received after request was closed - ignoring");else{var n=[];try{n=this.parser.parse(e)}catch(e){return this.props.debug&&i.debug("onChunk.parsing error",e,e.message),void this.rawOnError(r.Code.Internal,"parsing error: "+e.message)}n.forEach((function(e){if(e.chunkType===o.ChunkType.MESSAGE){var n=t.methodDefinition.responseType.deserializeBinary(e.data);t.rawOnMessage(n)}else e.chunkType===o.ChunkType.TRAILERS&&(t.responseHeaders?(t.responseTrailers=new a.Metadata(e.trailers),t.props.debug&&i.debug("onChunk.trailers",t.responseTrailers)):(t.responseHeaders=new a.Metadata(e.trailers),t.rawOnHeaders(t.responseHeaders)))}))}},e.prototype.onTransportEnd=function(){if(this.props.debug&&i.debug("grpc.onEnd"),this.closed)this.props.debug&&i.debug("grpc.onEnd received after request was closed - ignoring");else if(void 0!==this.responseTrailers){var e=d(this.responseTrailers);if(null!==e){var t=this.responseTrailers.get("grpc-message"),n=this.decodeGRPCStatus(t[0]);this.rawOnEnd(e,n,this.responseTrailers)}else this.rawOnError(r.Code.Internal,"Response closed without grpc-status (Trailers provided)")}else{if(void 0===this.responseHeaders)return void this.rawOnError(r.Code.Unknown,"Response closed without headers");var a=d(this.responseHeaders),o=this.responseHeaders.get("grpc-message");if(this.props.debug&&i.debug("grpc.headers only response ",a,o),null===a)return void this.rawOnEnd(r.Code.Unknown,"Response closed without grpc-status (Headers only)",this.responseHeaders);var s=this.decodeGRPCStatus(o[0]);this.rawOnEnd(a,s,this.responseHeaders)}},e.prototype.decodeGRPCStatus=function(e){if(!e)return"";try{return decodeURIComponent(e)}catch(t){return e}},e.prototype.rawOnEnd=function(e,t,n){var a=this;this.props.debug&&i.debug("rawOnEnd",e,t,n),this.completed||(this.completed=!0,this.onEndCallbacks.forEach((function(o){if(!a.closed)try{o(e,t,n)}catch(e){setTimeout((function(){throw e}),0)}})))},e.prototype.rawOnHeaders=function(e){this.props.debug&&i.debug("rawOnHeaders",e),this.completed||this.onHeadersCallbacks.forEach((function(t){try{t(e)}catch(e){setTimeout((function(){throw e}),0)}}))},e.prototype.rawOnError=function(e,t,n){var o=this;void 0===n&&(n=new a.Metadata),this.props.debug&&i.debug("rawOnError",e,t),this.completed||(this.completed=!0,this.onEndCallbacks.forEach((function(a){if(!o.closed)try{a(e,t,n)}catch(e){setTimeout((function(){throw e}),0)}})))},e.prototype.rawOnMessage=function(e){var t=this;this.props.debug&&i.debug("rawOnMessage",e.toObject()),this.completed||this.closed||this.onMessageCallbacks.forEach((function(n){if(!t.closed)try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))},e.prototype.onHeaders=function(e){this.onHeadersCallbacks.push(e)},e.prototype.onMessage=function(e){this.onMessageCallbacks.push(e)},e.prototype.onEnd=function(e){this.onEndCallbacks.push(e)},e.prototype.start=function(e){if(this.started)throw new Error("Client already started - cannot .start()");this.started=!0;var t=new a.Metadata(e||{});t.set("content-type","application/grpc-web+proto"),t.set("x-grpc-web","1"),this.transport.start(t)},e.prototype.send=function(e){if(!this.started)throw new Error("Client not started - .start() must be called before .send()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .send()");if(!this.methodDefinition.requestStream&&this.sentFirstMessage)throw new Error("Message already sent for non-client-streaming method - cannot .send()");this.sentFirstMessage=!0;var t=c.frameRequest(e);this.transport.sendMessage(t)},e.prototype.finishSend=function(){if(!this.started)throw new Error("Client not started - .finishSend() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .finishSend()");this.finishedSending=!0,this.transport.finishSend()},e.prototype.close=function(){if(!this.started)throw new Error("Client not started - .start() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .close()");this.closed=!0,this.props.debug&&i.debug("request.abort aborting request"),this.transport.cancel()},e}();function d(e){var t=e.get("grpc-status")||[];if(t.length>0)try{var n=t[0];return parseInt(n,10)}catch(e){return null}return null}},346:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0,t.debug=function(){for(var e=[],t=0;t=55296&&n<=56319){var a=e.charCodeAt(t+1);a>=56320&&a<=57343&&(n=65536+(n-55296<<10)+(a-56320))}return n}function l(e){for(var t=new Uint8Array(e.length),n=0,a=0;a "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},d=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new a(e):u(e)})(e)}:u};function l(){var e=new r(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw s(this,8);return new r(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=d(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},c.prototype.skip=function(e){if("number"===typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){a=e,c.create=d(),a._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return l.call(this)[t](!1)},uint64:function(){return l.call(this)[t](!0)},sint64:function(){return l.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},85737:function(e,t,n){"use strict";e.exports=r;var a=n(73537);(r.prototype=Object.create(a.prototype)).constructor=r;var o=n(98181);function r(e){a.call(this,e)}r._configure=function(){o.Buffer&&(r.prototype._slice=o.Buffer.prototype.slice)},r.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},r._configure()},88689:function(e){"use strict";e.exports={}},83335:function(e,t,n){"use strict";t.Service=n(19983)},19983:function(e,t,n){"use strict";e.exports=o;var a=n(98181);function o(e,t,n){if("function"!==typeof e)throw TypeError("rpcImpl must be a function");a.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(a.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,r,i){if(!r)throw TypeError("request must be specified");var s=this;if(!i)return a.asPromise(e,s,t,n,o,r);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](r).finish(),(function(e,n){if(e)return s.emit("error",e,t),i(e);if(null!==n){if(!(n instanceof o))try{n=o[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),i(e)}return s.emit("data",n,t),i(null,n)}s.end(!0)}))}catch(c){return s.emit("error",c,t),void setTimeout((function(){i(c)}),0)}else setTimeout((function(){i(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},87755:function(e,t,n){"use strict";e.exports=o;var a=n(98181);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var r=o.zero=new o(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var i=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return r;var t=e<0;t&&(e=-e);var n=e>>>0,a=(e-n)/4294967296>>>0;return t&&(a=~a>>>0,n=~n>>>0,++n>4294967295&&(n=0,++a>4294967295&&(a=0))),new o(n,a)},o.from=function(e){if("number"===typeof e)return o.fromNumber(e);if(a.isString(e)){if(!a.Long)return o.fromNumber(parseInt(e,10));e=a.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):r},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return a.Long?new a.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===i?r:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},98181:function(e,t,n){"use strict";var a=t;function o(e,t,n){for(var a=Object.keys(t),o=0;o0)},a.Buffer=function(){try{var e=a.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),a._Buffer_from=null,a._Buffer_allocUnsafe=null,a.newBuffer=function(e){return"number"===typeof e?a.Buffer?a._Buffer_allocUnsafe(e):new a.Array(e):a.Buffer?a._Buffer_from(e):"undefined"===typeof Uint8Array?e:new Uint8Array(e)},a.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,a.Long=a.global.dcodeIO&&a.global.dcodeIO.Long||a.global.Long||a.inquire("long"),a.key2Re=/^true|false|0|1$/,a.key32Re=/^-?(?:0|[1-9][0-9]*)$/,a.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,a.longToHash=function(e){return e?a.LongBits.from(e).toHash():a.LongBits.zeroHash},a.longFromHash=function(e,t){var n=a.LongBits.fromHash(e);return a.Long?a.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},a.merge=o,a.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},a.newError=r,a.ProtocolError=r("ProtocolError"),a.oneOfGetter=function(e){for(var t={},n=0;n-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},a.oneOfSetter=function(e){return function(t){for(var n=0;n>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function h(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=f(),l.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(l.alloc=o.pool(l.alloc,o.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},b.prototype=Object.create(c.prototype),b.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new b((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(m,10,r.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=r.from(e);return this._push(m,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=r.from(e).zzEncode();return this._push(m,t.length(),t)},l.prototype.bool=function(e){return this._push(p,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(h,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=r.from(e);return this._push(h,4,t.lo)._push(h,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var a=0;a>>0;if(!t)return this._push(p,1,0);if(o.isString(e)){var n=l.alloc(t=i.length(e));i.decode(e,n,0),e=n}return this.uint32(t)._push(g,t,e)},l.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(p,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){a=e,l.create=f(),a._configure()}},39780:function(e,t,n){"use strict";e.exports=r;var a=n(82152);(r.prototype=Object.create(a.prototype)).constructor=r;var o=n(98181);function r(){a.call(this)}function i(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}r._configure=function(){r.alloc=o._Buffer_allocUnsafe,r.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var a=0;a>>0;return this.uint32(t),t&&this._push(r.writeBytesBuffer,t,e),this},r.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(i,t,e),this},r._configure()},36130:function(e,t,n){"use strict";var a=n(65218),o=n(54659).Buffer,r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;nt;n--)i.unshift(e[n]);throw a}}}function c(){for(var e=[],t=0;t=55296&&n<=56319){var a=e.charCodeAt(t+1);a>=56320&&a<=57343&&(n=65536+(n-55296<<10)+(a-56320))}return n}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.configureXhr=function(){this.options.debug&&c("ArrayBufferXHR.configureXhr: setting responseType to 'arraybuffer'"),this.xhr.responseType="arraybuffer"},t.prototype.onProgressEvent=function(){},t.prototype.onLoadEvent=function(){var e=this,t=this.xhr.response;this.options.debug&&c("ArrayBufferXHR.onLoadEvent: ",new Uint8Array(t)),u((function(){e.options.onChunk(new Uint8Array(t),!0)})),u((function(){e.options.onEnd()}))},t}(function(){function e(e,t){this.options=e,this.init=t}return e.prototype.onProgressEvent=function(){var e=this;this.options.debug&&c("XHR.onProgressEvent.length: ",this.xhr.response.length);var t=this.xhr.response.substr(this.index);this.index=this.xhr.response.length;var n=function(e){for(var t=new Uint8Array(e.length),n=0,a=0;a0){var r=a.substring(0,o).trim(),i=a.substring(o+1).trim();this.append(r,i)}}},e.prototype.delete=function(e,t){var n=a.normalizeName(e);if(void 0===t)delete this.headersMap[n];else{var o=this.headersMap[n];if(o){var r=o.indexOf(t);r>=0&&o.splice(r,1),0===o.length&&delete this.headersMap[n]}}},e.prototype.append=function(e,t){var n=this,o=a.normalizeName(e);Array.isArray(this.headersMap[o])||(this.headersMap[o]=[]),Array.isArray(t)?t.forEach((function(e){n.headersMap[o].push(a.normalizeValue(e))})):this.headersMap[o].push(a.normalizeValue(t))},e.prototype.set=function(e,t){var n=a.normalizeName(e);if(Array.isArray(t)){var o=[];t.forEach((function(e){o.push(a.normalizeValue(e))})),this.headersMap[n]=o}else this.headersMap[n]=[a.normalizeValue(t)]},e.prototype.has=function(e,t){var n=this.headersMap[a.normalizeName(e)];if(!Array.isArray(n))return!1;if(void 0!==t){var o=a.normalizeValue(t);return n.indexOf(o)>=0}return!0},e.prototype.get=function(e){var t=this.headersMap[a.normalizeName(e)];return void 0!==t?t.concat():[]},e.prototype.forEach=function(e){var t=this;Object.getOwnPropertyNames(this.headersMap).forEach((function(n){e(n,t.headersMap[n])}),this)},e.prototype.toHeaders=function(){if("undefined"!=typeof Headers){var e=new Headers;return this.forEach((function(t,n){n.forEach((function(n){e.append(t,n)}))})),e}throw new Error("Headers class is not defined")},e}();t.BrowserHeaders=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0);t.BrowserHeaders=a.BrowserHeaders},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterateHeaders=function(e,t){for(var n=e[Symbol.iterator](),a=n.next();!a.done;)t(a.value[0]),a=n.next()},t.iterateHeadersKeys=function(e,t){for(var n=e.keys(),a=n.next();!a.done;)t(a.value),a=n.next()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(2);t.normalizeName=function(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()},t.normalizeValue=function(e){return"string"!=typeof e&&(e=String(e)),e},t.getHeaderValues=function(e,t){var n=e;if(n instanceof Headers&&n.getAll)return n.getAll(t);var a=n.get(t);return a&&"string"==typeof a?[a]:a},t.getHeaderKeys=function(e){var t=e,n={},o=[];return t.keys?a.iterateHeadersKeys(t,(function(e){n[e]||(n[e]=!0,o.push(e))})):t.forEach?t.forEach((function(e,t){n[t]||(n[t]=!0,o.push(t))})):a.iterateHeaders(t,(function(e){var t=e[0];n[t]||(n[t]=!0,o.push(t))})),o},t.splitHeaderValue=function(e){var t=[];return e.split(", ").forEach((function(e){e.split(",").forEach((function(e){t.push(e)}))})),t}}]))},617:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkParser=t.ChunkType=t.encodeASCII=t.decodeASCII=void 0;var a,o=n(65);function r(e){return 9===(t=e)||10===t||13===t||e>=32&&e<=126;var t}function i(e){for(var t=0;t!==e.length;++t)if(!r(e[t]))throw new Error("Metadata is not valid (printable) ASCII");return String.fromCharCode.apply(String,Array.prototype.slice.call(e))}function s(e){return 128==(128&e.getUint8(0))}function c(e){return e.getUint32(1,!1)}function u(e,t,n){return e.byteLength-t>=n}function d(e,t,n){if(e.slice)return e.slice(t,n);var a=e.length;void 0!==n&&(a=n);for(var o=new Uint8Array(a-t),r=0,i=t;i=0?n:r.httpStatusToCode(t);this.props.debug&&i.debug("onHeaders.code",a);var o=e.get("grpc-message")||[];if(this.props.debug&&i.debug("onHeaders.gRPCMessage",o),this.rawOnHeaders(e),a!==r.Code.OK){var s=this.decodeGRPCStatus(o[0]);this.rawOnError(a,s,e)}}},e.prototype.onTransportChunk=function(e){var t=this;if(this.closed)this.props.debug&&i.debug("grpc.onChunk received after request was closed - ignoring");else{var n=[];try{n=this.parser.parse(e)}catch(e){return this.props.debug&&i.debug("onChunk.parsing error",e,e.message),void this.rawOnError(r.Code.Internal,"parsing error: "+e.message)}n.forEach((function(e){if(e.chunkType===o.ChunkType.MESSAGE){var n=t.methodDefinition.responseType.deserializeBinary(e.data);t.rawOnMessage(n)}else e.chunkType===o.ChunkType.TRAILERS&&(t.responseHeaders?(t.responseTrailers=new a.Metadata(e.trailers),t.props.debug&&i.debug("onChunk.trailers",t.responseTrailers)):(t.responseHeaders=new a.Metadata(e.trailers),t.rawOnHeaders(t.responseHeaders)))}))}},e.prototype.onTransportEnd=function(){if(this.props.debug&&i.debug("grpc.onEnd"),this.closed)this.props.debug&&i.debug("grpc.onEnd received after request was closed - ignoring");else if(void 0!==this.responseTrailers){var e=d(this.responseTrailers);if(null!==e){var t=this.responseTrailers.get("grpc-message"),n=this.decodeGRPCStatus(t[0]);this.rawOnEnd(e,n,this.responseTrailers)}else this.rawOnError(r.Code.Internal,"Response closed without grpc-status (Trailers provided)")}else{if(void 0===this.responseHeaders)return void this.rawOnError(r.Code.Unknown,"Response closed without headers");var a=d(this.responseHeaders),o=this.responseHeaders.get("grpc-message");if(this.props.debug&&i.debug("grpc.headers only response ",a,o),null===a)return void this.rawOnEnd(r.Code.Unknown,"Response closed without grpc-status (Headers only)",this.responseHeaders);var s=this.decodeGRPCStatus(o[0]);this.rawOnEnd(a,s,this.responseHeaders)}},e.prototype.decodeGRPCStatus=function(e){if(!e)return"";try{return decodeURIComponent(e)}catch(t){return e}},e.prototype.rawOnEnd=function(e,t,n){var a=this;this.props.debug&&i.debug("rawOnEnd",e,t,n),this.completed||(this.completed=!0,this.onEndCallbacks.forEach((function(o){if(!a.closed)try{o(e,t,n)}catch(e){setTimeout((function(){throw e}),0)}})))},e.prototype.rawOnHeaders=function(e){this.props.debug&&i.debug("rawOnHeaders",e),this.completed||this.onHeadersCallbacks.forEach((function(t){try{t(e)}catch(e){setTimeout((function(){throw e}),0)}}))},e.prototype.rawOnError=function(e,t,n){var o=this;void 0===n&&(n=new a.Metadata),this.props.debug&&i.debug("rawOnError",e,t),this.completed||(this.completed=!0,this.onEndCallbacks.forEach((function(a){if(!o.closed)try{a(e,t,n)}catch(e){setTimeout((function(){throw e}),0)}})))},e.prototype.rawOnMessage=function(e){var t=this;this.props.debug&&i.debug("rawOnMessage",e.toObject()),this.completed||this.closed||this.onMessageCallbacks.forEach((function(n){if(!t.closed)try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))},e.prototype.onHeaders=function(e){this.onHeadersCallbacks.push(e)},e.prototype.onMessage=function(e){this.onMessageCallbacks.push(e)},e.prototype.onEnd=function(e){this.onEndCallbacks.push(e)},e.prototype.start=function(e){if(this.started)throw new Error("Client already started - cannot .start()");this.started=!0;var t=new a.Metadata(e||{});t.set("content-type","application/grpc-web+proto"),t.set("x-grpc-web","1"),this.transport.start(t)},e.prototype.send=function(e){if(!this.started)throw new Error("Client not started - .start() must be called before .send()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .send()");if(!this.methodDefinition.requestStream&&this.sentFirstMessage)throw new Error("Message already sent for non-client-streaming method - cannot .send()");this.sentFirstMessage=!0;var t=c.frameRequest(e);this.transport.sendMessage(t)},e.prototype.finishSend=function(){if(!this.started)throw new Error("Client not started - .finishSend() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .finishSend()");this.finishedSending=!0,this.transport.finishSend()},e.prototype.close=function(){if(!this.started)throw new Error("Client not started - .start() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .close()");this.closed=!0,this.props.debug&&i.debug("request.abort aborting request"),this.transport.cancel()},e}();function d(e){var t=e.get("grpc-status")||[];if(t.length>0)try{var n=t[0];return parseInt(n,10)}catch(e){return null}return null}},346:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0,t.debug=function(){for(var e=[],t=0;t=55296&&n<=56319){var a=e.charCodeAt(t+1);a>=56320&&a<=57343&&(n=65536+(n-55296<<10)+(a-56320))}return n}function l(e){for(var t=new Uint8Array(e.length),n=0,a=0;a "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},d=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new a(e):u(e)})(e)}:u};function l(){var e=new r(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw s(this,8);return new r(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=d(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},c.prototype.skip=function(e){if("number"===typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){a=e,c.create=d(),a._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return l.call(this)[t](!1)},uint64:function(){return l.call(this)[t](!0)},sint64:function(){return l.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},6095:function(e,t,n){"use strict";e.exports=r;var a=n(64399);(r.prototype=Object.create(a.prototype)).constructor=r;var o=n(67868);function r(e){a.call(this,e)}r._configure=function(){o.Buffer&&(r.prototype._slice=o.Buffer.prototype.slice)},r.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},r._configure()},37388:function(e){"use strict";e.exports={}},74483:function(e,t,n){"use strict";t.Service=n(4751)},4751:function(e,t,n){"use strict";e.exports=o;var a=n(67868);function o(e,t,n){if("function"!==typeof e)throw TypeError("rpcImpl must be a function");a.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(a.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,r,i){if(!r)throw TypeError("request must be specified");var s=this;if(!i)return a.asPromise(e,s,t,n,o,r);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](r).finish(),(function(e,n){if(e)return s.emit("error",e,t),i(e);if(null!==n){if(!(n instanceof o))try{n=o[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),i(e)}return s.emit("data",n,t),i(null,n)}s.end(!0)}))}catch(c){return s.emit("error",c,t),void setTimeout((function(){i(c)}),0)}else setTimeout((function(){i(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},99260:function(e,t,n){"use strict";e.exports=o;var a=n(67868);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var r=o.zero=new o(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var i=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return r;var t=e<0;t&&(e=-e);var n=e>>>0,a=(e-n)/4294967296>>>0;return t&&(a=~a>>>0,n=~n>>>0,++n>4294967295&&(n=0,++a>4294967295&&(a=0))),new o(n,a)},o.from=function(e){if("number"===typeof e)return o.fromNumber(e);if(a.isString(e)){if(!a.Long)return o.fromNumber(parseInt(e,10));e=a.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):r},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return a.Long?new a.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===i?r:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},67868:function(e,t,n){"use strict";var a=t;function o(e,t,n){for(var a=Object.keys(t),o=0;o0)},a.Buffer=function(){try{var e=a.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),a._Buffer_from=null,a._Buffer_allocUnsafe=null,a.newBuffer=function(e){return"number"===typeof e?a.Buffer?a._Buffer_allocUnsafe(e):new a.Array(e):a.Buffer?a._Buffer_from(e):"undefined"===typeof Uint8Array?e:new Uint8Array(e)},a.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,a.Long=a.global.dcodeIO&&a.global.dcodeIO.Long||a.global.Long||a.inquire("long"),a.key2Re=/^true|false|0|1$/,a.key32Re=/^-?(?:0|[1-9][0-9]*)$/,a.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,a.longToHash=function(e){return e?a.LongBits.from(e).toHash():a.LongBits.zeroHash},a.longFromHash=function(e,t){var n=a.LongBits.fromHash(e);return a.Long?a.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},a.merge=o,a.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},a.newError=r,a.ProtocolError=r("ProtocolError"),a.oneOfGetter=function(e){for(var t={},n=0;n-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},a.oneOfSetter=function(e){return function(t){for(var n=0;n>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function h(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=f(),l.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(l.alloc=o.pool(l.alloc,o.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},b.prototype=Object.create(c.prototype),b.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new b((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(m,10,r.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=r.from(e);return this._push(m,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=r.from(e).zzEncode();return this._push(m,t.length(),t)},l.prototype.bool=function(e){return this._push(p,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(h,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=r.from(e);return this._push(h,4,t.lo)._push(h,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var a=0;a>>0;if(!t)return this._push(p,1,0);if(o.isString(e)){var n=l.alloc(t=i.length(e));i.decode(e,n,0),e=n}return this.uint32(t)._push(g,t,e)},l.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(p,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){a=e,l.create=f(),a._configure()}},50067:function(e,t,n){"use strict";e.exports=r;var a=n(40108);(r.prototype=Object.create(a.prototype)).constructor=r;var o=n(67868);function r(){a.call(this)}function i(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}r._configure=function(){r.alloc=o._Buffer_allocUnsafe,r.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var a=0;a>>0;return this.uint32(t),t&&this._push(r.writeBytesBuffer,t,e),this},r.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(i,t,e),this},r._configure()},6055:function(e,t,n){"use strict";e.exports=n(92981)},92981:function(e,t,n){"use strict";var a=t;function o(){a.util._configure(),a.Writer._configure(a.BufferWriter),a.Reader._configure(a.BufferReader)}a.build="minimal",a.Writer=n(61300),a.BufferWriter=n(71977),a.Reader=n(40606),a.BufferReader=n(44514),a.util=n(4807),a.rpc=n(57518),a.roots=n(15979),a.configure=o,o()},40606:function(e,t,n){"use strict";e.exports=c;var a,o=n(4807),r=o.LongBits,i=o.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},d=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new a(e):u(e)})(e)}:u};function l(){var e=new r(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw s(this,8);return new r(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=d(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},c.prototype.skip=function(e){if("number"===typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){a=e,c.create=d(),a._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return l.call(this)[t](!1)},uint64:function(){return l.call(this)[t](!0)},sint64:function(){return l.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},44514:function(e,t,n){"use strict";e.exports=r;var a=n(40606);(r.prototype=Object.create(a.prototype)).constructor=r;var o=n(4807);function r(e){a.call(this,e)}r._configure=function(){o.Buffer&&(r.prototype._slice=o.Buffer.prototype.slice)},r.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},r._configure()},15979:function(e){"use strict";e.exports={}},57518:function(e,t,n){"use strict";t.Service=n(34888)},34888:function(e,t,n){"use strict";e.exports=o;var a=n(4807);function o(e,t,n){if("function"!==typeof e)throw TypeError("rpcImpl must be a function");a.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(a.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,r,i){if(!r)throw TypeError("request must be specified");var s=this;if(!i)return a.asPromise(e,s,t,n,o,r);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](r).finish(),(function(e,n){if(e)return s.emit("error",e,t),i(e);if(null!==n){if(!(n instanceof o))try{n=o[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),i(e)}return s.emit("data",n,t),i(null,n)}s.end(!0)}))}catch(c){return s.emit("error",c,t),void setTimeout((function(){i(c)}),0)}else setTimeout((function(){i(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},87498:function(e,t,n){"use strict";e.exports=o;var a=n(4807);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var r=o.zero=new o(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var i=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return r;var t=e<0;t&&(e=-e);var n=e>>>0,a=(e-n)/4294967296>>>0;return t&&(a=~a>>>0,n=~n>>>0,++n>4294967295&&(n=0,++a>4294967295&&(a=0))),new o(n,a)},o.from=function(e){if("number"===typeof e)return o.fromNumber(e);if(a.isString(e)){if(!a.Long)return o.fromNumber(parseInt(e,10));e=a.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):r},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return a.Long?new a.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===i?r:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},4807:function(e,t,n){"use strict";var a=t;function o(e,t,n){for(var a=Object.keys(t),o=0;o0)},a.Buffer=function(){try{var e=a.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),a._Buffer_from=null,a._Buffer_allocUnsafe=null,a.newBuffer=function(e){return"number"===typeof e?a.Buffer?a._Buffer_allocUnsafe(e):new a.Array(e):a.Buffer?a._Buffer_from(e):"undefined"===typeof Uint8Array?e:new Uint8Array(e)},a.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,a.Long=a.global.dcodeIO&&a.global.dcodeIO.Long||a.global.Long||a.inquire("long"),a.key2Re=/^true|false|0|1$/,a.key32Re=/^-?(?:0|[1-9][0-9]*)$/,a.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,a.longToHash=function(e){return e?a.LongBits.from(e).toHash():a.LongBits.zeroHash},a.longFromHash=function(e,t){var n=a.LongBits.fromHash(e);return a.Long?a.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},a.merge=o,a.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},a.newError=r,a.ProtocolError=r("ProtocolError"),a.oneOfGetter=function(e){for(var t={},n=0;n-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},a.oneOfSetter=function(e){return function(t){for(var n=0;n>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function h(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=f(),l.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(l.alloc=o.pool(l.alloc,o.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},b.prototype=Object.create(c.prototype),b.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new b((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(m,10,r.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=r.from(e);return this._push(m,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=r.from(e).zzEncode();return this._push(m,t.length(),t)},l.prototype.bool=function(e){return this._push(p,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(h,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=r.from(e);return this._push(h,4,t.lo)._push(h,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var a=0;a>>0;if(!t)return this._push(p,1,0);if(o.isString(e)){var n=l.alloc(t=i.length(e));i.decode(e,n,0),e=n}return this.uint32(t)._push(g,t,e)},l.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(p,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){a=e,l.create=f(),a._configure()}},71977:function(e,t,n){"use strict";e.exports=r;var a=n(61300);(r.prototype=Object.create(a.prototype)).constructor=r;var o=n(4807);function r(){a.call(this)}function i(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}r._configure=function(){r.alloc=o._Buffer_allocUnsafe,r.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var a=0;a>>0;return this.uint32(t),t&&this._push(r.writeBytesBuffer,t,e),this},r.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(i,t,e),this},r._configure()},47264:function(e,t,n){n(65030)},8114:function(e,t,n){"use strict";var a=n(3551),o=n(16863),r=n(17499),i=n(14672),s=n(76990),c=n(41830),u=n(2534),d=n(12728),l=n(96089),f=n(96948),p=n(45069);e.exports=function(e){return new Promise((function(t,n){var b,m=e.data,h=e.headers,g=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b)}a.isFormData(m)&&a.isStandardBrowserEnv()&&delete h["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",k=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(w+":"+k)}var A=s(e.baseURL,e.url);function x(){if(v){var a="getAllResponseHeaders"in v?c(v.getAllResponseHeaders()):null,r={data:g&&"text"!==g&&"json"!==g?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:a,config:e,request:v};o((function(e){t(e),y()}),(function(e){n(e),y()}),r),v=null}}if(v.open(e.method.toUpperCase(),i(A,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=x:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(x)},v.onabort=function(){v&&(n(new l("Request aborted",l.ECONNABORTED,e,v)),v=null)},v.onerror=function(){n(new l("Network Error",l.ERR_NETWORK,e,v,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",a=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new l(t,a.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,e,v)),v=null},a.isStandardBrowserEnv()){var I=(e.withCredentials||u(A))&&e.xsrfCookieName?r.read(e.xsrfCookieName):void 0;I&&(h[e.xsrfHeaderName]=I)}"setRequestHeader"in v&&a.forEach(h,(function(e,t){"undefined"===typeof m&&"content-type"===t.toLowerCase()?delete h[t]:v.setRequestHeader(t,e)})),a.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),g&&"json"!==g&&(v.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(b=function(e){v&&(n(!e||e&&e.type?new f:e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b))),m||(m=null);var T=p(A);T&&-1===["http","https","file"].indexOf(T)?n(new l("Unsupported protocol "+T+":",l.ERR_BAD_REQUEST,e)):v.send(m)}))}},65030:function(e,t,n){"use strict";var a=n(3551),o=n(6034),r=n(76885),i=n(48233);var s=function e(t){var n=new r(t),s=o(r.prototype.request,n);return a.extend(s,r.prototype,n),a.extend(s,n),s.create=function(n){return e(i(t,n))},s}(n(13992));s.Axios=r,s.CanceledError=n(96948),s.CancelToken=n(63413),s.isCancel=n(90798),s.VERSION=n(4450).version,s.toFormData=n(35717),s.AxiosError=n(96089),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(4896),s.isAxiosError=n(43025),e.exports=s,e.exports.default=s},63413:function(e,t,n){"use strict";var a=n(96948);function o(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,a=n._listeners.length;for(t=0;t=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){l.headers[e]=o.merge(u)})),e.exports=l},12728:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},4450:function(e){e.exports={version:"0.27.2"}},6034:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),a=0;a=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},45069:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},4896:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},35717:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(3551);e.exports=function(e,t){t=t||new FormData;var n=[];function r(e){return null===e?"":o.isDate(e)?e.toISOString():o.isArrayBuffer(e)||o.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):a.from(e):e}return function e(a,i){if(o.isPlainObject(a)||o.isArray(a)){if(-1!==n.indexOf(a))throw Error("Circular reference detected in "+i);n.push(a),o.forEach(a,(function(n,a){if(!o.isUndefined(n)){var s,c=i?i+"."+a:a;if(n&&!i&&"object"===typeof n)if(o.endsWith(a,"{}"))n=JSON.stringify(n);else if(o.endsWith(a,"[]")&&(s=o.toArray(n)))return void s.forEach((function(e){!o.isUndefined(e)&&t.append(c,r(e))}));e(n,c)}})),n.pop()}else t.append(i,r(a))}(e),t}},21209:function(e,t,n){"use strict";var a=n(65218),o=n(4450).version,r=n(96089),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+o+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,c){if(!1===e)throw new r(i(o," has been removed"+(t?" in "+t:"")),r.ERR_DEPRECATED);return t&&!s[o]&&(s[o]=!0,a.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,c)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new r("options must be an object",r.ERR_BAD_OPTION_VALUE);for(var a=Object.keys(e),o=a.length;o-- >0;){var i=a[o],s=t[i];if(s){var c=e[i],u=void 0===c||s(c,i,e);if(!0!==u)throw new r("option "+i+" must be "+u,r.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new r("Unknown option "+i,r.ERR_BAD_OPTION)}},validators:i}},3551:function(e,t,n){"use strict";var a,o=n(6034),r=Object.prototype.toString,i=(a=Object.create(null),function(e){var t=r.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return i(t)===e}}function c(e){return Array.isArray(e)}function u(e){return"undefined"===typeof e}var d=s("ArrayBuffer");function l(e){return null!==e&&"object"===typeof e}function f(e){if("object"!==i(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var p=s("Date"),b=s("File"),m=s("Blob"),h=s("FileList");function g(e){return"[object Function]"===r.call(e)}var y=s("URLSearchParams");function v(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),c(e))for(var n=0,a=e.length;n0;)i[r=a[o]]||(t[r]=e[r],i[r]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var a=e.indexOf(t,n);return-1!==a&&a===n},toArray:function(e){if(!e)return null;var t=e.length;if(u(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:k,isFileList:h}},98028:function(e,t,n){"use strict";n.d(t,{$n:function(){return l},Fq:function(){return u},_j:function(){return d},mi:function(){return s}});var a=n(78630);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function r(e){if(e.type)return e;if("#"===e.charAt(0))return r(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error((0,a.Z)(3,e));var o=e.substring(t+1,e.length-1).split(",");return{type:n,values:o=o.map((function(e){return parseFloat(e)}))}}function i(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function s(e,t){var n=c(e),a=c(t);return(Math.max(n,a)+.05)/(Math.min(n,a)+.05)}function c(e){var t="hsl"===(e=r(e)).type?r(function(e){var t=(e=r(e)).values,n=t[0],a=t[1]/100,o=t[2]/100,s=a*Math.min(o,1-o),c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-s*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",d=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return"hsla"===e.type&&(u+="a",d.push(t[3])),i({type:u,values:d})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function u(e,t){return e=r(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,i(e)}function d(e,t){if(e=r(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return i(e)}function l(e,t){if(e=r(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return i(e)}},2272:function(e,t,n){"use strict";n.d(t,{Z:function(){return J}});var a=n(45987),o=n(84902),r=n(87462),i=["xs","sm","md","lg","xl"];var s=n(4942),c=n(65218);function u(e,t,n){var a;return(0,r.Z)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return c.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),(0,r.Z)({paddingLeft:t(2),paddingRight:t(2)},n,(0,s.Z)({},e.up("sm"),(0,r.Z)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(a={minHeight:56},(0,s.Z)(a,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,s.Z)(a,e.up("sm"),{minHeight:64}),a)},n)}var d=n(78630),l={black:"#000",white:"#fff"},f={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},p={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},b={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},m={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},h={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},g={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},y={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},v=n(98028),w={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:l.white,default:f[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},k={text:{primary:l.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:f[800],default:"#303030"},action:{active:l.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function A(e,t,n,a){var o=a.light||a,r=a.dark||1.5*a;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,v.$n)(e.main,o):"dark"===t&&(e.dark=(0,v._j)(e.main,r)))}function x(e){return Math.round(1e5*e)/1e5}function I(e){return x(e)}var T={textTransform:"uppercase"},S='"Roboto", "Helvetica", "Arial", sans-serif';function C(e,t){var n="function"===typeof t?t(e):t,i=n.fontFamily,s=void 0===i?S:i,c=n.fontSize,u=void 0===c?14:c,d=n.fontWeightLight,l=void 0===d?300:d,f=n.fontWeightRegular,p=void 0===f?400:f,b=n.fontWeightMedium,m=void 0===b?500:b,h=n.fontWeightBold,g=void 0===h?700:h,y=n.htmlFontSize,v=void 0===y?16:y,w=n.allVariants,k=n.pxToRem,A=(0,a.Z)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var C=u/14,E=k||function(e){return"".concat(e/v*C,"rem")},R=function(e,t,n,a,o){return(0,r.Z)({fontFamily:s,fontWeight:e,fontSize:E(t),lineHeight:n},s===S?{letterSpacing:"".concat(x(a/t),"em")}:{},o,w)},M={h1:R(l,96,1.167,-1.5),h2:R(l,60,1.2,-.5),h3:R(p,48,1.167,0),h4:R(p,34,1.235,.25),h5:R(p,24,1.334,0),h6:R(m,20,1.6,.15),subtitle1:R(p,16,1.75,.15),subtitle2:R(m,14,1.57,.1),body1:R(p,16,1.5,.15),body2:R(p,14,1.43,.15),button:R(m,14,1.75,.4,T),caption:R(p,12,1.66,.4),overline:R(p,12,2.66,1,T)};return(0,o.Z)((0,r.Z)({htmlFontSize:v,pxToRem:E,round:I,fontFamily:s,fontSize:u,fontWeightLight:l,fontWeightRegular:p,fontWeightMedium:m,fontWeightBold:g},M),A,{clone:!1})}var E=.2,R=.14,M=.12;function P(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(E,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(R,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(M,")")].join(",")}var U=["none",P(0,2,1,-1,0,1,1,0,0,1,3,0),P(0,3,1,-2,0,2,2,0,0,1,5,0),P(0,3,3,-2,0,3,4,0,0,1,8,0),P(0,2,4,-1,0,4,5,0,0,1,10,0),P(0,3,5,-1,0,5,8,0,0,1,14,0),P(0,3,5,-1,0,6,10,0,0,1,18,0),P(0,4,5,-2,0,7,10,1,0,2,16,1),P(0,5,5,-3,0,8,10,1,0,3,14,2),P(0,5,6,-3,0,9,12,1,0,3,16,2),P(0,6,6,-3,0,10,14,1,0,4,18,3),P(0,6,7,-4,0,11,15,1,0,4,20,3),P(0,7,8,-4,0,12,17,2,0,5,22,4),P(0,7,8,-4,0,13,19,2,0,5,24,4),P(0,7,9,-4,0,14,21,2,0,5,26,4),P(0,8,9,-5,0,15,22,2,0,6,28,5),P(0,8,10,-5,0,16,24,2,0,6,30,5),P(0,8,11,-5,0,17,26,2,0,6,32,5),P(0,9,11,-5,0,18,28,2,0,7,34,6),P(0,9,12,-6,0,19,29,2,0,7,36,6),P(0,10,13,-6,0,20,31,3,0,8,38,7),P(0,10,13,-6,0,21,33,3,0,8,40,7),P(0,10,14,-6,0,22,35,3,0,8,42,7),P(0,11,14,-7,0,23,36,3,0,9,44,8),P(0,11,15,-7,0,24,38,3,0,9,46,8)],_={borderRadius:4},B=n(29439),D=n(71002),N={xs:0,sm:600,md:960,lg:1280,xl:1920},O={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(N[e],"px)")}};var F=function(e,t){return t?(0,o.Z)(e,t,{clone:!1}):e};var L={m:"margin",p:"padding"},j={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},H={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},G=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!H[e])return[e];e=H[e]}var t=e.split(""),n=(0,B.Z)(t,2),a=n[0],o=n[1],r=L[a],i=j[o]||"";return Array.isArray(i)?i.map((function(e){return r+e})):[r+i]})),z=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function K(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function W(e,t){return function(n){return e.reduce((function(e,a){return e[a]=function(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function Z(e){var t=K(e.theme);return Object.keys(e).map((function(n){if(-1===z.indexOf(n))return null;var a=W(G(n),t),o=e[n];return function(e,t,n){if(Array.isArray(t)){var a=e.theme.breakpoints||O;return t.reduce((function(e,o,r){return e[a.up(a.keys[r])]=n(t[r]),e}),{})}if("object"===(0,D.Z)(t)){var o=e.theme.breakpoints||O;return Object.keys(t).reduce((function(e,a){return e[o.up(a)]=n(t[a]),e}),{})}return n(t)}(e,o,a)})).reduce(F,{})}Z.propTypes={},Z.filterProps=z;var V=n(56276),q=n(13248);function Q(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,s=e.mixins,c=void 0===s?{}:s,x=e.palette,I=void 0===x?{}:x,T=e.spacing,S=e.typography,E=void 0===S?{}:S,R=(0,a.Z)(e,["breakpoints","mixins","palette","spacing","typography"]),M=function(e){var t=e.primary,n=void 0===t?{light:p[300],main:p[500],dark:p[700]}:t,i=e.secondary,s=void 0===i?{light:b.A200,main:b.A400,dark:b.A700}:i,c=e.error,u=void 0===c?{light:m[300],main:m[500],dark:m[700]}:c,x=e.warning,I=void 0===x?{light:h[300],main:h[500],dark:h[700]}:x,T=e.info,S=void 0===T?{light:g[300],main:g[500],dark:g[700]}:T,C=e.success,E=void 0===C?{light:y[300],main:y[500],dark:y[700]}:C,R=e.type,M=void 0===R?"light":R,P=e.contrastThreshold,U=void 0===P?3:P,_=e.tonalOffset,B=void 0===_?.2:_,D=(0,a.Z)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function N(e){return(0,v.mi)(e,k.text.primary)>=U?k.text.primary:w.text.primary}var O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,r.Z)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error((0,d.Z)(4,t));if("string"!==typeof e.main)throw new Error((0,d.Z)(5,JSON.stringify(e.main)));return A(e,"light",n,B),A(e,"dark",a,B),e.contrastText||(e.contrastText=N(e.main)),e},F={dark:k,light:w};return(0,o.Z)((0,r.Z)({common:l,type:M,primary:O(n),secondary:O(s,"A400","A200","A700"),error:O(u),warning:O(I),info:O(S),success:O(E),grey:f,contrastThreshold:U,getContrastText:N,augmentColor:O,tonalOffset:B},F[M]),D)}(I),P=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,o=e.unit,s=void 0===o?"px":o,c=e.step,u=void 0===c?5:c,d=(0,a.Z)(e,["values","unit","step"]);function l(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function f(e,t){var a=i.indexOf(t);return a===i.length-1?l(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==a&&"number"===typeof n[i[a+1]]?n[i[a+1]]:t)-u/100).concat(s,")")}return(0,r.Z)({keys:i,values:n,up:l,down:function(e){var t=i.indexOf(e)+1,a=n[i[t]];return t===i.length?l("xs"):"@media (max-width:".concat(("number"===typeof a&&t>0?a:e)-u/100).concat(s,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},d)}(n),B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=K({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),a=0;a1?N-1:0),F=1;F0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,s=void 0===n?r.standard:n,c=t.easing,u=void 0===c?o.easeInOut:c,d=t.delay,l=void 0===d?0:d;(0,a.Z)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof s?s:i(s)," ").concat(u," ").concat("string"===typeof l?l:i(l))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},49042:function(e,t,n){"use strict";n.d(t,{Z:function(){return mn}});var a=n(87462),o=n(45987),r=n(67861),i=n(37658),s=n.n(i),c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u="object"===("undefined"===typeof window?"undefined":c(window))&&"object"===("undefined"===typeof document?"undefined":c(document))&&9===document.nodeType,d=n(43144),l=n(94578),f=n(97326),p=n(63366),b={}.constructor;function m(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(m);if(e.constructor!==b)return e;var t={};for(var n in e)t[n]=m(e[n]);return t}function h(e,t,n){void 0===e&&(e="unnamed");var a=n.jss,o=m(t),r=a.plugins.onCreateRule(e,o,n);return r||(e[0],null)}var g=function(e,t){for(var n="",a=0;a<+~=|^:(),"'`\s])/g,x="undefined"!==typeof CSS&&CSS.escape,I=function(e){return x?x(e):e.replace(A,"\\$1")},T=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var a=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,a?this.renderer=a.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var a=!!n&&n.force;if(!a&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var r=null==o||!1===o,i=e in this.style;if(r&&!i&&!a)return this;var s=r&&i;if(s?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var c=this.options.sheet;return c&&c.attached,this},e}(),S=function(e){function t(t,n,a){var o;o=e.call(this,t,n,a)||this;var r=a.selector,i=a.scoped,s=a.sheet,c=a.generateId;return r?o.selectorText=r:!1!==i&&(o.id=c((0,f.Z)((0,f.Z)(o)),s),o.selectorText="."+I(o.id)),o}(0,l.Z)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var a in n)t.setProperty(e,a,n[a])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=y(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,a.Z)({},e,{allowEmpty:!0}):e;return k(this.selectorText,this.style,n)},(0,d.Z)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(T),C={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new S(e,t,n)}},E={indent:1,children:!0},R=/@([\w-]+)/,M=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var o=e.match(R);for(var r in this.at=o?o[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new ee((0,a.Z)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var a=this.rules.add(e,t,n);return a?(this.options.jss.plugins.onProcessRule(a),a):null},t.replaceRule=function(e,t,n){var a=this.rules.replace(e,t,n);return a&&this.options.jss.plugins.onProcessRule(a),a},t.toString=function(e){void 0===e&&(e=E);var t=v(e).linebreak;if(null==e.indent&&(e.indent=E.indent),null==e.children&&(e.children=E.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),P=/@container|@media|@supports\s+/,U={onCreateRule:function(e,t,n){return P.test(e)?new M(e,t,n):null}},_={indent:1,children:!0},B=/@keyframes\s+([\w-]+)/,D=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=e.match(B);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var r=n.scoped,i=n.sheet,s=n.generateId;for(var c in this.id=!1===r?this.name:I(s(this,i)),this.rules=new ee((0,a.Z)({},n,{parent:this})),t)this.rules.add(c,t[c],(0,a.Z)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=_);var t=v(e).linebreak;if(null==e.indent&&(e.indent=_.indent),null==e.children&&(e.children=_.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),N=/@keyframes\s+/,O=/\$([\w-]+)/g,F=function(e,t){return"string"===typeof e?e.replace(O,(function(e,n){return n in t?t[n]:e})):e},L=function(e,t,n){var a=e[t],o=F(a,n);o!==a&&(e[t]=o)},j={onCreateRule:function(e,t,n){return"string"===typeof e&&N.test(e)?new D(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&L(e,"animation-name",n.keyframes),"animation"in e&&L(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var a=n.options.sheet;if(!a)return e;switch(t){case"animation":case"animation-name":return F(e,a.keyframes);default:return e}}},H=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,a.Z)({},e,{allowEmpty:!0}):e;return k(this.key,this.style,n)},t}(T),G={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new H(e,t,n):null}},z=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=v(e).linebreak;if(Array.isArray(this.style)){for(var n="",a=0;a=this.index)t.push(e);else for(var a=0;an)return void t.splice(a,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,a=(0,p.Z)(t,["attached"]),o=v(a).linebreak,r="",i=0;i-1?a.substr(0,o-1):a;e.style.setProperty(t,r,o>-1?"important":"")}}catch(i){return!1}return!0},fe=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(n){}},pe=function(e,t){return e.selectorText=t,e.selectorText===t},be=ue((function(){return document.querySelector("head")}));function me(e){var t=oe.registry;if(t.length>0){var n=function(e,t){for(var n=0;nt.index&&a.options.insertionPoint===t.insertionPoint)return a}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var a=e[n];if(a.attached&&a.options.insertionPoint===t.insertionPoint)return a}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var a=e.insertionPoint;if(a&&"string"===typeof a){var o=function(e){for(var t=be(),n=0;nn?n:t},ve=function(){function e(e){this.getPropertyValue=de,this.setProperty=le,this.removeProperty=fe,this.setSelector=pe,this.hasInsertedRules=!1,this.cssRules=[],e&&oe.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,a=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),a&&this.element.setAttribute("data-meta",a);var r=he();r&&this.element.setAttribute("nonce",r)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,a=me(t);if(!1!==a&&a.parent)a.parent.insertBefore(e,a.node);else if(n&&"number"===typeof n.nodeType){var o=n,r=o.parentNode;r&&r.insertBefore(e,o.nextSibling)}else be().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n-1){var o=Ot[e];if(!Array.isArray(o))return mt.js+kt(o)in t&&mt.css+o;if(!a)return!1;for(var r=0;rt?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var a={},o=Object.keys(t).sort(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,a=e.productionPrefix,o=void 0===a?"jss":a,r=e.seed,i=void 0===r?"":r,s=""===i?"":"".concat(i,"-"),c=0,u=function(){return c+=1};return function(e,t){var a=t.options.name;if(a&&0===a.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Me.indexOf(e.key))return"Mui-".concat(e.key);var r="".concat(s).concat(a,"-").concat(e.key);return t.options.theme[Re.Z]&&""===i?"".concat(r,"-").concat(u()):r}return"".concat(s).concat(o).concat(u())}}(),on={disableGeneration:!1,generateClassName:an,jss:nn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},rn=r.createContext(on);var sn=-1e9;var cn=n(84902);var un={};function dn(e,t){var n=e.state,o=e.theme,r=e.stylesOptions,i=e.stylesCreator,s=e.name;if(!r.disableGeneration){var c=Ce.get(r.sheetsManager,i,o);c||(c={refs:0,staticSheet:null,dynamicStyles:null},Ce.set(r.sheetsManager,i,o,c));var u=(0,a.Z)({},i.options,r,{theme:o,flip:"boolean"===typeof r.flip?r.flip:"rtl"===o.direction});u.generateId=u.serverGenerateClassName||u.generateClassName;var d=r.sheetsRegistry;if(0===c.refs){var l;r.sheetsCache&&(l=Ce.get(r.sheetsCache,i,o));var f=i.create(o,s);l||((l=r.jss.createStyleSheet(f,(0,a.Z)({link:!1},u))).attach(),r.sheetsCache&&Ce.set(r.sheetsCache,i,o,l)),d&&d.add(l),c.staticSheet=l,c.dynamicStyles=Ie(f)}if(c.dynamicStyles){var p=r.jss.createStyleSheet(c.dynamicStyles,(0,a.Z)({link:!0},u));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=(0,Te.Z)({baseClasses:c.staticSheet.classes,newClasses:p.classes}),d&&d.add(p)}else n.classes=c.staticSheet.classes;c.refs+=1}}function ln(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,i=t.classNamePrefix,s=t.Component,c=t.defaultTheme,u=void 0===c?un:c,d=(0,o.Z)(t,["name","classNamePrefix","Component","defaultTheme"]),l=function(e){var t="function"===typeof e;return{create:function(n,o){var r;try{r=t?e(n):e}catch(c){throw c}if(!o||!n.overrides||!n.overrides[o])return r;var i=n.overrides[o],s=(0,a.Z)({},r);return Object.keys(i).forEach((function(e){s[e]=(0,cn.Z)(s[e],i[e])})),s},options:{}}}(e),f=n||i||"makeStyles";l.options={index:sn+=1,name:n,meta:f,classNamePrefix:f};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,Ee.Z)()||u,o=(0,a.Z)({},r.useContext(rn),d),i=r.useRef(),c=r.useRef();!function(e,t){var n,a=r.useRef([]),o=r.useMemo((function(){return{}}),t);a.current!==o&&(a.current=o,n=e()),r.useEffect((function(){return function(){n&&n()}}),[o])}((function(){var a={name:n,state:{},stylesCreator:l,stylesOptions:o,theme:t};return dn(a,e),c.current=!1,i.current=a,function(){!function(e){var t=e.state,n=e.theme,a=e.stylesOptions,o=e.stylesCreator;if(!a.disableGeneration){var r=Ce.get(a.sheetsManager,o,n);r.refs-=1;var i=a.sheetsRegistry;0===r.refs&&(Ce.delete(a.sheetsManager,o,n),a.jss.removeStyleSheet(r.staticSheet),i&&i.remove(r.staticSheet)),t.dynamicSheet&&(a.jss.removeStyleSheet(t.dynamicSheet),i&&i.remove(t.dynamicSheet))}}(a)}}),[t,l]),r.useEffect((function(){c.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(i.current,e),c.current=!0}));var f=function(e,t,n){var a=e.state;if(e.stylesOptions.disableGeneration)return t||{};a.cacheClasses||(a.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return a.classes!==a.cacheClasses.lastJSS&&(a.cacheClasses.lastJSS=a.classes,o=!0),t!==a.cacheClasses.lastProp&&(a.cacheClasses.lastProp=t,o=!0),o&&(a.cacheClasses.value=(0,Te.Z)({baseClasses:a.cacheClasses.lastJSS,newClasses:t,Component:n})),a.cacheClasses.value}(i.current,e.classes,s);return f}}var fn=n(73593),pn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var i=t.defaultTheme,c=t.withTheme,u=void 0!==c&&c,d=t.name,l=(0,o.Z)(t,["defaultTheme","withTheme","name"]);var f=d,p=ln(e,(0,a.Z)({defaultTheme:i,Component:n,name:d||n.displayName,classNamePrefix:f},l)),b=r.forwardRef((function(e,t){e.classes;var s,c=e.innerRef,l=(0,o.Z)(e,["classes","innerRef"]),f=p((0,a.Z)({},n.defaultProps,e)),b=l;return("string"===typeof d||u)&&(s=(0,Ee.Z)()||i,d&&(b=(0,fn.Z)({theme:s,name:d,props:l})),u&&!b.theme&&(b.theme=s)),r.createElement(n,(0,a.Z)({ref:c||t,classes:f},b))}));return s()(b,n),b}},bn=n(29199);var mn=function(e,t){return pn(e,(0,a.Z)({defaultTheme:bn.Z},t))}},13248:function(e,t){"use strict";t.Z={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},50290:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var a=n(78630);function o(e){if("string"!==typeof e)throw new Error((0,a.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},27027:function(e,t,n){"use strict";function a(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function a(){for(var a=arguments.length,o=new Array(a),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var o=(0,a.Z)({},t);return Object.keys(n).forEach((function(e){n[e]&&(o[e]="".concat(t[e]," ").concat(n[e]))})),o}},35829:function(e,t,n){"use strict";var a=n(67861).createContext(null);t.Z=a},74632:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var a=n(67861),o=n(35829);function r(){return a.useContext(o.Z)}},84902:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var a=n(87462),o=n(71002);function r(e){return e&&"object"===(0,o.Z)(e)&&e.constructor===Object}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},o=n.clone?(0,a.Z)({},e):e;return r(e)&&r(t)&&Object.keys(t).forEach((function(a){"__proto__"!==a&&(r(t[a])&&a in e?o[a]=i(e[a],t[a],n):o[a]=t[a])})),o}},78630:function(e,t,n){"use strict";function a(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n0&&(c=r-s-16),i.padding="0".repeat(c),d({publicKey:t,data:JSON.stringify(i),version:o})},t.decrypt=l,t.decryptSafely=function(e){var t=e.encryptedData,n=e.privateKey;if(u.isNullish(t))throw new Error("Missing encryptedData parameter");if(u.isNullish(n))throw new Error("Missing privateKey parameter");return JSON.parse(l({encryptedData:t,privateKey:n})).data},t.getEncryptionPublicKey=function(e){var t=f(e),n=s.box.keyPair.fromSecretKey(t).publicKey;return c.encodeBase64(n)}},79698:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.concatSig=void 0,o(n(14814),t),o(n(97705),t),o(n(61474),t);var r=n(46187);Object.defineProperty(t,"concatSig",{enumerable:!0,get:function(){return r.concatSig}}),Object.defineProperty(t,"normalize",{enumerable:!0,get:function(){return r.normalize}})},14814:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPublicKey=t.recoverPersonalSignature=t.personalSign=void 0;var a=n(1382),o=n(46187);function r(e,t){var n=a.hashPersonalMessage(o.legacyToBuffer(e));return o.recoverPublicKey(n,t)}t.personalSign=function(e){var t=e.privateKey,n=e.data;if(o.isNullish(n))throw new Error("Missing data parameter");if(o.isNullish(t))throw new Error("Missing privateKey parameter");var r=o.legacyToBuffer(n),i=a.hashPersonalMessage(r),s=a.ecsign(i,t);return o.concatSig(a.toBuffer(s.v),s.r,s.s)},t.recoverPersonalSignature=function(e){var t=e.data,n=e.signature;if(o.isNullish(t))throw new Error("Missing data parameter");if(o.isNullish(n))throw new Error("Missing signature parameter");var i=r(t,n),s=a.publicToAddress(i);return a.bufferToHex(s)},t.extractPublicKey=function(e){var t=e.data,n=e.signature;if(o.isNullish(t))throw new Error("Missing data parameter");if(o.isNullish(n))throw new Error("Missing signature parameter");var a=r(t,n);return"0x".concat(a.toString("hex"))}},97705:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(861).default,r=n(74704).default,i=n(27424).default;Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedSignature=t.signTypedData=t.typedSignatureHash=t.TypedDataUtils=t.TYPED_MESSAGE_SCHEMA=t.SignTypedDataVersion=void 0;var s,c=n(1382),u=n(58739),d=n(46187);function l(e,t){if(!Object.keys(s).includes(e))throw new Error("Invalid version: '".concat(e,"'"));if(t&&!t.includes(e))throw new Error("SignTypedDataVersion not allowed: '".concat(e,"'. Allowed versions are: ").concat(t.join(", ")))}function f(e,t,n,o,r){if(l(r,[s.V3,s.V4]),void 0!==e[n])return["bytes32",r===s.V4&&null==o?"0x0000000000000000000000000000000000000000000000000000000000000000":c.keccak(p(n,o,e,r))];if(void 0===o)throw new Error("missing value for field ".concat(t," of type ").concat(n));if("bytes"===n)return["bytes32",c.keccak(o)];if("string"===n)return"string"===typeof o&&(o=a.from(o,"utf8")),["bytes32",c.keccak(o)];if(n.lastIndexOf("]")===n.length-1){if(r===s.V3)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");var d=n.slice(0,n.lastIndexOf("[")),b=o.map((function(n){return f(e,t,d,n,r)}));return["bytes32",c.keccak(u.rawEncode(b.map((function(e){return i(e,1)[0]})),b.map((function(e){return i(e,2)[1]}))))]}return[n,o]}function p(e,t,n,a){l(a,[s.V3,s.V4]);var o,c=["bytes32"],d=[g(e,n)],p=r(n[e]);try{for(p.s();!(o=p.n()).done;){var b=o.value;if(a!==s.V3||void 0!==t[b.name]){var m=f(n,b.name,b.type,t[b.name],a),h=i(m,2),y=h[0],v=h[1];c.push(y),d.push(v)}}}catch(w){p.e(w)}finally{p.f()}return u.rawEncode(c,d)}function b(e,t){var n="",a=m(e,t);a.delete(e);var i,s=[e].concat(o(Array.from(a).sort())),c=r(s);try{for(c.s();!(i=c.n()).done;){var u=i.value;if(!t[u])throw new Error("No type definition specified: ".concat(u));n+="".concat(u,"(").concat(t[u].map((function(e){var t=e.name,n=e.type;return"".concat(n," ").concat(t)})).join(","),")")}}catch(d){c.e(d)}finally{c.f()}return n}function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,a=e.match(/^[0-9A-Z_a-z]*/);if(e=i(a,1)[0],n.has(e)||void 0===t[e])return n;n.add(e);var o,s=r(t[e]);try{for(s.s();!(o=s.n()).done;){m(o.value.type,t,n)}}catch(c){s.e(c)}finally{s.f()}return n}function h(e,t,n,a){return l(a,[s.V3,s.V4]),c.keccak(p(e,t,n,a))}function g(e,t){return c.keccak(b(e,t))}function y(e){var n={};for(var a in t.TYPED_MESSAGE_SCHEMA.properties)e[a]&&(n[a]=e[a]);return"types"in n&&(n.types=Object.assign({EIP712Domain:[]},n.types)),n}function v(e){var t=new Error("Expect argument to be non-empty array");if("object"!==typeof e||!("length"in e)||!e.length)throw t;var n=e.map((function(e){return"bytes"!==e.type?e.value:d.legacyToBuffer(e.value)})),a=e.map((function(e){return e.type})),o=e.map((function(e){if(!e.name)throw t;return"".concat(e.type," ").concat(e.name)}));return u.soliditySHA3(["bytes32","bytes32"],[u.soliditySHA3(new Array(e.length).fill("string"),o),u.soliditySHA3(a,n)])}!function(e){e.V1="V1",e.V3="V3",e.V4="V4"}(s=t.SignTypedDataVersion||(t.SignTypedDataVersion={})),t.TYPED_MESSAGE_SCHEMA={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},t.TypedDataUtils={encodeData:p,encodeType:b,findTypeDependencies:m,hashStruct:h,hashType:g,sanitizeData:y,eip712Hash:function(e,t){l(t,[s.V3,s.V4]);var n=y(e),o=[a.from("1901","hex")];return o.push(h("EIP712Domain",n.domain,n.types,t)),"EIP712Domain"!==n.primaryType&&o.push(h(n.primaryType,n.message,n.types,t)),c.keccak(a.concat(o))}},t.typedSignatureHash=function(e){var t=v(e);return c.bufferToHex(t)},t.signTypedData=function(e){var n=e.privateKey,a=e.data,o=e.version;if(l(o),d.isNullish(a))throw new Error("Missing data parameter");if(d.isNullish(n))throw new Error("Missing private key parameter");var r=o===s.V1?v(a):t.TypedDataUtils.eip712Hash(a,o),i=c.ecsign(r,n);return d.concatSig(c.toBuffer(i.v),i.r,i.s)},t.recoverTypedSignature=function(e){var n=e.data,a=e.signature,o=e.version;if(l(o),d.isNullish(n))throw new Error("Missing data parameter");if(d.isNullish(a))throw new Error("Missing signature parameter");var r=o===s.V1?v(n):t.TypedDataUtils.eip712Hash(n,o),i=d.recoverPublicKey(r,a),u=c.publicToAddress(i);return c.bufferToHex(u)}},46187:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.recoverPublicKey=t.concatSig=t.legacyToBuffer=t.isNullish=t.padWithZeroes=void 0;var o=n(1382),r=n(90455);function i(e,t){if(""!==e&&!/^[0-9a-f]+$/i.test(e))throw new Error("Expected an unprefixed hex string. Received: ".concat(e));if(t<0)throw new Error("Expected a non-negative integer target length. Received: ".concat(t));return String.prototype.padStart.call(e,t,"0")}t.padWithZeroes=i,t.isNullish=function(e){return null===e||void 0===e},t.legacyToBuffer=function(e){return"string"!==typeof e||r.isHexString(e)?o.toBuffer(e):a.from(e)},t.concatSig=function(e,t,n){var a=o.fromSigned(t),s=o.fromSigned(n),c=o.bufferToInt(e),u=i(o.toUnsigned(a).toString("hex"),64),d=i(o.toUnsigned(s).toString("hex"),64),l=r.stripHexPrefix(r.intToHex(c));return o.addHexPrefix(u.concat(d,l))},t.recoverPublicKey=function(e,t){var n=o.fromRpcSig(t);return o.ecrecover(e,n.v,n.r,n.s)},t.normalize=function(e){if(e){if("number"===typeof e){var t=o.toBuffer(e);e=o.bufferToHex(t)}if("string"!==typeof e){var n="eth-sig-util.normalize() requires hex string or integer input.";throw n+=" received ".concat(typeof e,": ").concat(e),new Error(n)}return o.addHexPrefix(e.toLowerCase())}}},82726:function(e,t,n){!function(e,t){"use strict";function a(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function r(e,t,n){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var i;"object"===typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{i="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(993).Buffer}catch(T){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(e,t,n){var a=s(e,n);return n-1>=t&&(a|=s(e,n-1)<<4),a}function u(e,t,n,a){for(var o=0,r=Math.min(e.length,n),i=t;i=49?s-49+10:s>=17?s-17+10:s}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"===typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=i<>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a=t;a-=2)o=c(e,t,a)<=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;else for(a=(e.length-t)%2===0?t+1:t;a=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,o=1;o<=67108863;o*=t)a++;a--,o=o/t|0;for(var r=e.length-n,i=r%a,s=Math.min(r,r-i)+n,c=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var a=e.length+t.length|0;n.length=a,a=a-1|0;var o=0|e.words[0],r=0|t.words[0],i=o*r,s=67108863&i,c=i/67108864|0;n.words[0]=s;for(var u=1;u>>26,l=67108863&c,f=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=f;p++){var b=u-p|0;d+=(i=(o=0|e.words[b])*(r=0|t.words[p])+l)/67108864|0,l=67108863&i}n.words[u]=0|l,c=0|d}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,i=0;i>>24-o&16777215)||i!==this.length-1?d[6-c.length]+c+n:c+n,(o+=2)>=26&&(o-=26,i--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=l[e],p=f[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var m=b.modn(p).toString(e);n=(b=b.idivn(p)).isZero()?m+n:d[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return a("undefined"!==typeof i),this.toArrayLike(i,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);a(o<=r,"byte array longer than desired length"),a(r>0,"Requested array length <= 0"),this.strip();var i,s,c="le"===t,u=new e(r),d=this.clone();if(c){for(s=0;!d.isZero();s++)i=d.andln(255),d.iushrn(8),u[s]=i;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;ae.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){a("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){a("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,a=e):(n=e,a=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,a,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,a=e):(n=e,a=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,p=0|i[1],b=8191&p,m=p>>>13,h=0|i[2],g=8191&h,y=h>>>13,v=0|i[3],w=8191&v,k=v>>>13,A=0|i[4],x=8191&A,I=A>>>13,T=0|i[5],S=8191&T,C=T>>>13,E=0|i[6],R=8191&E,M=E>>>13,P=0|i[7],U=8191&P,_=P>>>13,B=0|i[8],D=8191&B,N=B>>>13,O=0|i[9],F=8191&O,L=O>>>13,j=0|s[0],H=8191&j,G=j>>>13,z=0|s[1],K=8191&z,W=z>>>13,Z=0|s[2],V=8191&Z,q=Z>>>13,Q=0|s[3],J=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,ae=te>>>13,oe=0|s[6],re=8191&oe,ie=oe>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,de=0|s[8],le=8191&de,fe=de>>>13,pe=0|s[9],be=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var he=(u+(a=Math.imul(l,H))|0)+((8191&(o=(o=Math.imul(l,G))+Math.imul(f,H)|0))<<13)|0;u=((r=Math.imul(f,G))+(o>>>13)|0)+(he>>>26)|0,he&=67108863,a=Math.imul(b,H),o=(o=Math.imul(b,G))+Math.imul(m,H)|0,r=Math.imul(m,G);var ge=(u+(a=a+Math.imul(l,K)|0)|0)+((8191&(o=(o=o+Math.imul(l,W)|0)+Math.imul(f,K)|0))<<13)|0;u=((r=r+Math.imul(f,W)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,a=Math.imul(g,H),o=(o=Math.imul(g,G))+Math.imul(y,H)|0,r=Math.imul(y,G),a=a+Math.imul(b,K)|0,o=(o=o+Math.imul(b,W)|0)+Math.imul(m,K)|0,r=r+Math.imul(m,W)|0;var ye=(u+(a=a+Math.imul(l,V)|0)|0)+((8191&(o=(o=o+Math.imul(l,q)|0)+Math.imul(f,V)|0))<<13)|0;u=((r=r+Math.imul(f,q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,a=Math.imul(w,H),o=(o=Math.imul(w,G))+Math.imul(k,H)|0,r=Math.imul(k,G),a=a+Math.imul(g,K)|0,o=(o=o+Math.imul(g,W)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,W)|0,a=a+Math.imul(b,V)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(m,V)|0,r=r+Math.imul(m,q)|0;var ve=(u+(a=a+Math.imul(l,J)|0)|0)+((8191&(o=(o=o+Math.imul(l,Y)|0)+Math.imul(f,J)|0))<<13)|0;u=((r=r+Math.imul(f,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,a=Math.imul(x,H),o=(o=Math.imul(x,G))+Math.imul(I,H)|0,r=Math.imul(I,G),a=a+Math.imul(w,K)|0,o=(o=o+Math.imul(w,W)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,W)|0,a=a+Math.imul(g,V)|0,o=(o=o+Math.imul(g,q)|0)+Math.imul(y,V)|0,r=r+Math.imul(y,q)|0,a=a+Math.imul(b,J)|0,o=(o=o+Math.imul(b,Y)|0)+Math.imul(m,J)|0,r=r+Math.imul(m,Y)|0;var we=(u+(a=a+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((r=r+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,a=Math.imul(S,H),o=(o=Math.imul(S,G))+Math.imul(C,H)|0,r=Math.imul(C,G),a=a+Math.imul(x,K)|0,o=(o=o+Math.imul(x,W)|0)+Math.imul(I,K)|0,r=r+Math.imul(I,W)|0,a=a+Math.imul(w,V)|0,o=(o=o+Math.imul(w,q)|0)+Math.imul(k,V)|0,r=r+Math.imul(k,q)|0,a=a+Math.imul(g,J)|0,o=(o=o+Math.imul(g,Y)|0)+Math.imul(y,J)|0,r=r+Math.imul(y,Y)|0,a=a+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(m,$)|0,r=r+Math.imul(m,ee)|0;var ke=(u+(a=a+Math.imul(l,ne)|0)|0)+((8191&(o=(o=o+Math.imul(l,ae)|0)+Math.imul(f,ne)|0))<<13)|0;u=((r=r+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,a=Math.imul(R,H),o=(o=Math.imul(R,G))+Math.imul(M,H)|0,r=Math.imul(M,G),a=a+Math.imul(S,K)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(C,K)|0,r=r+Math.imul(C,W)|0,a=a+Math.imul(x,V)|0,o=(o=o+Math.imul(x,q)|0)+Math.imul(I,V)|0,r=r+Math.imul(I,q)|0,a=a+Math.imul(w,J)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(k,J)|0,r=r+Math.imul(k,Y)|0,a=a+Math.imul(g,$)|0,o=(o=o+Math.imul(g,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,a=a+Math.imul(b,ne)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(m,ne)|0,r=r+Math.imul(m,ae)|0;var Ae=(u+(a=a+Math.imul(l,re)|0)|0)+((8191&(o=(o=o+Math.imul(l,ie)|0)+Math.imul(f,re)|0))<<13)|0;u=((r=r+Math.imul(f,ie)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,a=Math.imul(U,H),o=(o=Math.imul(U,G))+Math.imul(_,H)|0,r=Math.imul(_,G),a=a+Math.imul(R,K)|0,o=(o=o+Math.imul(R,W)|0)+Math.imul(M,K)|0,r=r+Math.imul(M,W)|0,a=a+Math.imul(S,V)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(C,V)|0,r=r+Math.imul(C,q)|0,a=a+Math.imul(x,J)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(I,J)|0,r=r+Math.imul(I,Y)|0,a=a+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,a=a+Math.imul(g,ne)|0,o=(o=o+Math.imul(g,ae)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ae)|0,a=a+Math.imul(b,re)|0,o=(o=o+Math.imul(b,ie)|0)+Math.imul(m,re)|0,r=r+Math.imul(m,ie)|0;var xe=(u+(a=a+Math.imul(l,ce)|0)|0)+((8191&(o=(o=o+Math.imul(l,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((r=r+Math.imul(f,ue)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,a=Math.imul(D,H),o=(o=Math.imul(D,G))+Math.imul(N,H)|0,r=Math.imul(N,G),a=a+Math.imul(U,K)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(_,K)|0,r=r+Math.imul(_,W)|0,a=a+Math.imul(R,V)|0,o=(o=o+Math.imul(R,q)|0)+Math.imul(M,V)|0,r=r+Math.imul(M,q)|0,a=a+Math.imul(S,J)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(C,J)|0,r=r+Math.imul(C,Y)|0,a=a+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(I,$)|0,r=r+Math.imul(I,ee)|0,a=a+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ae)|0,a=a+Math.imul(g,re)|0,o=(o=o+Math.imul(g,ie)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,ie)|0,a=a+Math.imul(b,ce)|0,o=(o=o+Math.imul(b,ue)|0)+Math.imul(m,ce)|0,r=r+Math.imul(m,ue)|0;var Ie=(u+(a=a+Math.imul(l,le)|0)|0)+((8191&(o=(o=o+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;u=((r=r+Math.imul(f,fe)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,a=Math.imul(F,H),o=(o=Math.imul(F,G))+Math.imul(L,H)|0,r=Math.imul(L,G),a=a+Math.imul(D,K)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,W)|0,a=a+Math.imul(U,V)|0,o=(o=o+Math.imul(U,q)|0)+Math.imul(_,V)|0,r=r+Math.imul(_,q)|0,a=a+Math.imul(R,J)|0,o=(o=o+Math.imul(R,Y)|0)+Math.imul(M,J)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(C,$)|0,r=r+Math.imul(C,ee)|0,a=a+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(I,ne)|0,r=r+Math.imul(I,ae)|0,a=a+Math.imul(w,re)|0,o=(o=o+Math.imul(w,ie)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,ie)|0,a=a+Math.imul(g,ce)|0,o=(o=o+Math.imul(g,ue)|0)+Math.imul(y,ce)|0,r=r+Math.imul(y,ue)|0,a=a+Math.imul(b,le)|0,o=(o=o+Math.imul(b,fe)|0)+Math.imul(m,le)|0,r=r+Math.imul(m,fe)|0;var Te=(u+(a=a+Math.imul(l,be)|0)|0)+((8191&(o=(o=o+Math.imul(l,me)|0)+Math.imul(f,be)|0))<<13)|0;u=((r=r+Math.imul(f,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,a=Math.imul(F,K),o=(o=Math.imul(F,W))+Math.imul(L,K)|0,r=Math.imul(L,W),a=a+Math.imul(D,V)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(N,V)|0,r=r+Math.imul(N,q)|0,a=a+Math.imul(U,J)|0,o=(o=o+Math.imul(U,Y)|0)+Math.imul(_,J)|0,r=r+Math.imul(_,Y)|0,a=a+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(M,$)|0,r=r+Math.imul(M,ee)|0,a=a+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(C,ne)|0,r=r+Math.imul(C,ae)|0,a=a+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ie)|0)+Math.imul(I,re)|0,r=r+Math.imul(I,ie)|0,a=a+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(k,ce)|0,r=r+Math.imul(k,ue)|0,a=a+Math.imul(g,le)|0,o=(o=o+Math.imul(g,fe)|0)+Math.imul(y,le)|0,r=r+Math.imul(y,fe)|0;var Se=(u+(a=a+Math.imul(b,be)|0)|0)+((8191&(o=(o=o+Math.imul(b,me)|0)+Math.imul(m,be)|0))<<13)|0;u=((r=r+Math.imul(m,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,a=Math.imul(F,V),o=(o=Math.imul(F,q))+Math.imul(L,V)|0,r=Math.imul(L,q),a=a+Math.imul(D,J)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(N,J)|0,r=r+Math.imul(N,Y)|0,a=a+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(_,$)|0,r=r+Math.imul(_,ee)|0,a=a+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(M,ne)|0,r=r+Math.imul(M,ae)|0,a=a+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ie)|0)+Math.imul(C,re)|0,r=r+Math.imul(C,ie)|0,a=a+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,ue)|0)+Math.imul(I,ce)|0,r=r+Math.imul(I,ue)|0,a=a+Math.imul(w,le)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(k,le)|0,r=r+Math.imul(k,fe)|0;var Ce=(u+(a=a+Math.imul(g,be)|0)|0)+((8191&(o=(o=o+Math.imul(g,me)|0)+Math.imul(y,be)|0))<<13)|0;u=((r=r+Math.imul(y,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,a=Math.imul(F,J),o=(o=Math.imul(F,Y))+Math.imul(L,J)|0,r=Math.imul(L,Y),a=a+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,a=a+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(_,ne)|0,r=r+Math.imul(_,ae)|0,a=a+Math.imul(R,re)|0,o=(o=o+Math.imul(R,ie)|0)+Math.imul(M,re)|0,r=r+Math.imul(M,ie)|0,a=a+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(C,ce)|0,r=r+Math.imul(C,ue)|0,a=a+Math.imul(x,le)|0,o=(o=o+Math.imul(x,fe)|0)+Math.imul(I,le)|0,r=r+Math.imul(I,fe)|0;var Ee=(u+(a=a+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(k,be)|0))<<13)|0;u=((r=r+Math.imul(k,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,a=Math.imul(F,$),o=(o=Math.imul(F,ee))+Math.imul(L,$)|0,r=Math.imul(L,ee),a=a+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ae)|0,a=a+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ie)|0)+Math.imul(_,re)|0,r=r+Math.imul(_,ie)|0,a=a+Math.imul(R,ce)|0,o=(o=o+Math.imul(R,ue)|0)+Math.imul(M,ce)|0,r=r+Math.imul(M,ue)|0,a=a+Math.imul(S,le)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(C,le)|0,r=r+Math.imul(C,fe)|0;var Re=(u+(a=a+Math.imul(x,be)|0)|0)+((8191&(o=(o=o+Math.imul(x,me)|0)+Math.imul(I,be)|0))<<13)|0;u=((r=r+Math.imul(I,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,a=Math.imul(F,ne),o=(o=Math.imul(F,ae))+Math.imul(L,ne)|0,r=Math.imul(L,ae),a=a+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,ie)|0,a=a+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,ue)|0)+Math.imul(_,ce)|0,r=r+Math.imul(_,ue)|0,a=a+Math.imul(R,le)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(M,le)|0,r=r+Math.imul(M,fe)|0;var Me=(u+(a=a+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,me)|0)+Math.imul(C,be)|0))<<13)|0;u=((r=r+Math.imul(C,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,a=Math.imul(F,re),o=(o=Math.imul(F,ie))+Math.imul(L,re)|0,r=Math.imul(L,ie),a=a+Math.imul(D,ce)|0,o=(o=o+Math.imul(D,ue)|0)+Math.imul(N,ce)|0,r=r+Math.imul(N,ue)|0,a=a+Math.imul(U,le)|0,o=(o=o+Math.imul(U,fe)|0)+Math.imul(_,le)|0,r=r+Math.imul(_,fe)|0;var Pe=(u+(a=a+Math.imul(R,be)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(M,be)|0))<<13)|0;u=((r=r+Math.imul(M,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,a=Math.imul(F,ce),o=(o=Math.imul(F,ue))+Math.imul(L,ce)|0,r=Math.imul(L,ue),a=a+Math.imul(D,le)|0,o=(o=o+Math.imul(D,fe)|0)+Math.imul(N,le)|0,r=r+Math.imul(N,fe)|0;var Ue=(u+(a=a+Math.imul(U,be)|0)|0)+((8191&(o=(o=o+Math.imul(U,me)|0)+Math.imul(_,be)|0))<<13)|0;u=((r=r+Math.imul(_,me)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,a=Math.imul(F,le),o=(o=Math.imul(F,fe))+Math.imul(L,le)|0,r=Math.imul(L,fe);var _e=(u+(a=a+Math.imul(D,be)|0)|0)+((8191&(o=(o=o+Math.imul(D,me)|0)+Math.imul(N,be)|0))<<13)|0;u=((r=r+Math.imul(N,me)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863;var Be=(u+(a=Math.imul(F,be))|0)+((8191&(o=(o=Math.imul(F,me))+Math.imul(L,be)|0))<<13)|0;return u=((r=Math.imul(L,me))+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=he,c[1]=ge,c[2]=ye,c[3]=ve,c[4]=we,c[5]=ke,c[6]=Ae,c[7]=xe,c[8]=Ie,c[9]=Te,c[10]=Se,c[11]=Ce,c[12]=Ee,c[13]=Re,c[14]=Me,c[15]=Pe,c[16]=Ue,c[17]=_e,c[18]=Be,0!==u&&(c[19]=u,n.length++),n};function m(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(b=p),r.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return n=10===this.length&&10===e.length?b(this,e,t):a<63?p(this,e,t):a<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var a=0,o=0,r=0;r>>26)|0)>>>26,i&=67108863}n.words[r]=s,a=i,i=o}return 0!==a?n.words[r]=a:n.length--,n.strip()}(this,e,t):m(this,e,t),n},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,a=0;a>=1;return a},h.prototype.permute=function(e,t,n,a,o,r){for(var i=0;i>>=1)o++;return 1<>>=13,n[2*i+1]=8191&r,r>>>=13;for(i=2*t;i>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,a=0;a=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var i=0;for(t=0;t>>26-n}i&&(this.words[t]=i,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,i=Math.min((e-r)/26,this.length),s=67108863^67108863>>>r<i)for(this.length-=i,u=0;u=0&&(0!==d||u>=o);u--){var l=0|this.words[u];this.words[u]=d<<26-r|l>>>r,d=l&s}return c&&0!==d&&(c.words[c.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return a(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){a("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(a("number"===typeof e),a(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===s)return this.strip();for(a(-1===s),s=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),o=e,i=0|o.words[o.length-1];0!==(n=26-this._countBits(i))&&(o=o.ushln(n),a.iushln(n),i=0|o.words[o.length-1]);var s,c=a.length-o.length;if("mod"!==t){(s=new r(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var f=67108864*(0|a.words[o.length+l])+(0|a.words[o.length+l-1]);for(f=Math.min(f/i|0,67108863),a._ishlnsubmul(o,f,l);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(o,1,l),a.isZero()||(a.negative^=1);s&&(s.words[l]=f)}return s&&s.strip(),a.strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:s||null,mod:a}},r.prototype.divmod=function(e,t,n){return a(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:o,mod:i}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:s.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,i,s},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,a=e.ushrn(1),o=e.andln(1),r=n.cmp(a);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){a(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){a(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),i=new r(0),s=new r(0),c=new r(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var d=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;0===(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(d),i.isub(l)),o.iushrn(1),i.iushrn(1);for(var b=0,m=1;0===(n.words[0]&m)&&b<26;++b,m<<=1);if(b>0)for(n.iushrn(b);b-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(d),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),i.isub(c)):(n.isub(t),s.isub(o),c.isub(i))}return{a:s,b:c,gcd:n.iushln(u)}},r.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,i=new r(1),s=new r(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,d=1;0===(t.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(c),i.iushrn(1);for(var l=0,f=1;0===(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s)):(n.isub(t),s.isub(i))}return(o=0===t.cmpn(1)?i:s).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(a)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){a("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,s&=67108863,this.words[i]=s}return 0!==r&&(this.words[i]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),a(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var a=0|this.words[n],o=0|e.words[n];if(a!==o){ao&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new x(e)},r.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var a=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(v,y),v.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),o=0;o>>22,r=i}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=a}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},x.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){a(0===(e.negative|t.negative),"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2===1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),i=0;!o.isZero()&&0===o.andln(1);)i++,o.iushrn(1);a(!o.isZero());var s=new r(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new r(2*d*d).toRed(this);0!==this.pow(d,u).cmp(c);)d.redIAdd(c);for(var l=this.pow(d,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),b=i;0!==p.cmp(s);){for(var m=p,h=0;0!==m.cmp(s);h++)m=m.redSqr();a(h=0;a--){for(var u=t.words[a],d=c-1;d>=0;d--){var l=u>>d&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==i?(i<<=1,i|=l,(4===++s||0===a&&0===d)&&(o=this.mul(o,n[i]),s=0,i=0)):s=0}c=26}return o},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new I(e)},o(I,x),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},53989:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.importPublic=t.privateToPublic=t.privateToAddress=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.isPrecompiled=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isZeroAddress=t.isValidAddress=t.zeroAddress=void 0;var o=n(75979),r=n(90455),i=n(57869),s=n(82726),c=n(77451),u=n(26358);t.zeroAddress=function(){var e=c.zeros(20);return c.bufferToHex(e)},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===c.addHexPrefix(e)},t.toChecksumAddress=function(e,t){e=r.stripHexPrefix(e).toLowerCase();for(var n=void 0!==t?t.toString()+"0x":"",a=u.keccak(n+e).toString("hex"),o="0x",i=0;i=8?o+=e[i].toUpperCase():o+=e[i];return o},t.isValidChecksumAddress=function(e,n){return t.isValidAddress(e)&&t.toChecksumAddress(e,n)===e},t.generateAddress=function(e,t){e=c.toBuffer(e);var n=new s(t);return n.isZero()?u.rlphash([e,null]).slice(-20):u.rlphash([e,a.from(n.toArray())]).slice(-20)},t.generateAddress2=function(e,t,n){var r=c.toBuffer(e),i=c.toBuffer(t),s=c.toBuffer(n);return o(20===r.length),o(32===i.length),u.keccak256(a.concat([a.from("ff","hex"),r,i,u.keccak256(s)])).slice(-20)},t.isPrecompiled=function(e){var t=c.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},t.isValidPrivate=function(e){return i.privateKeyVerify(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),64===e.length?i.publicKeyVerify(a.concat([a.from([4]),e])):!!t&&i.publicKeyVerify(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),e=c.toBuffer(e),t&&64!==e.length&&(e=i.publicKeyConvert(e,!1).slice(1)),o(64===e.length),u.keccak(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToAddress=function(e){return t.publicToAddress(t.privateToPublic(e))},t.privateToPublic=function(e){return e=c.toBuffer(e),i.publicKeyCreate(e,!1).slice(1)},t.importPublic=function(e){return 64!==(e=c.toBuffer(e)).length&&(e=i.publicKeyConvert(e,!1).slice(1)),e}},77451:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.baToJSON=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.stripZeros=t.unpad=t.setLengthRight=t.setLength=t.setLengthLeft=t.zeros=void 0;var o=n(90455),r=n(82726);t.zeros=function(e){return a.allocUnsafe(e).fill(0)},t.setLengthLeft=function(e,n,a){void 0===a&&(a=!1);var o=t.zeros(n);return e=t.toBuffer(e),a?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},t.stripZeros=t.unpad,t.toBuffer=function(e){if(!a.isBuffer(e))if(Array.isArray(e))e=a.from(e);else if("string"===typeof e){if(!o.isHexString(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+e);e=a.from(o.padToEven(o.stripHexPrefix(e)),"hex")}else if("number"===typeof e)e=o.intToBuffer(e);else if(null===e||void 0===e)e=a.allocUnsafe(0);else if(r.isBN(e))e=e.toArrayLike(a);else{if(!e.toArray)throw new Error("invalid type");e=a.from(e.toArray())}return e},t.bufferToInt=function(e){return new r(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new r(e).fromTwos(256)},t.toUnsigned=function(e){return a.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!==typeof e||o.isHexPrefixed(e)?e:"0x"+e},t.baToJSON=function(e){if(a.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var n=[],o=0;o=r.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===r.length||!t.length||o(t.length===r.length,"The field "+t.name+" must have byte length of "+t.length),e.raw[n]=r}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:r,set:i}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:i,get:r})})),n)if("string"===typeof n&&(n=a.from(r.stripHexPrefix(n),"hex")),a.isBuffer(n)&&(n=i.decode(n)),Array.isArray(n)){if(n.length>e._fields.length)throw new Error("wrong number of fields in data");n.forEach((function(t,n){e[e._fields[n]]=s.toBuffer(t)}))}else{if("object"!==typeof n)throw new Error("invalid data");var c=Object.keys(n);t.forEach((function(t){-1!==c.indexOf(t.name)&&(e[t.name]=n[t.name]),-1!==c.indexOf(t.alias)&&(e[t.alias]=n[t.alias])}))}}},57869:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.ecdhUnsafe=t.ecdh=t.recover=t.verify=t.sign=t.signatureImportLax=t.signatureImport=t.signatureExport=t.signatureNormalize=t.publicKeyCombine=t.publicKeyTweakMul=t.publicKeyTweakAdd=t.publicKeyVerify=t.publicKeyConvert=t.publicKeyCreate=t.privateKeyTweakMul=t.privateKeyTweakAdd=t.privateKeyModInverse=t.privateKeyNegate=t.privateKeyImport=t.privateKeyExport=t.privateKeyVerify=void 0;var o=n(65074),r=n(28411),i=n(3950);t.privateKeyVerify=function(e){return 32===e.length&&o.privateKeyVerify(Uint8Array.from(e))},t.privateKeyExport=function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var n=r.privateKeyExport(e,t);return i.privateKeyExport(e,n,t)},t.privateKeyImport=function(e){if(null!==(e=i.privateKeyImport(e))&&32===e.length&&t.privateKeyVerify(e))return e;throw new Error("couldn't import from DER format")},t.privateKeyNegate=function(e){return a.from(o.privateKeyNegate(Uint8Array.from(e)))},t.privateKeyModInverse=function(e){if(32!==e.length)throw new Error("private key length is invalid");return a.from(r.privateKeyModInverse(Uint8Array.from(e)))},t.privateKeyTweakAdd=function(e,t){return a.from(o.privateKeyTweakAdd(Uint8Array.from(e),t))},t.privateKeyTweakMul=function(e,t){return a.from(o.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},t.publicKeyCreate=function(e,t){return a.from(o.publicKeyCreate(Uint8Array.from(e),t))},t.publicKeyConvert=function(e,t){return a.from(o.publicKeyConvert(Uint8Array.from(e),t))},t.publicKeyVerify=function(e){return(33===e.length||65===e.length)&&o.publicKeyVerify(Uint8Array.from(e))},t.publicKeyTweakAdd=function(e,t,n){return a.from(o.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),n))},t.publicKeyTweakMul=function(e,t,n){return a.from(o.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),n))},t.publicKeyCombine=function(e,t){var n=[];return e.forEach((function(e){n.push(Uint8Array.from(e))})),a.from(o.publicKeyCombine(n,t))},t.signatureNormalize=function(e){return a.from(o.signatureNormalize(Uint8Array.from(e)))},t.signatureExport=function(e){return a.from(o.signatureExport(Uint8Array.from(e)))},t.signatureImport=function(e){return a.from(o.signatureImport(Uint8Array.from(e)))},t.signatureImportLax=function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=i.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return r.signatureImport(t)},t.sign=function(e,t,n){if(null===n)throw new TypeError("options should be an Object");var r=void 0;if(n){if(r={},null===n.data)throw new TypeError("options.data should be a Buffer");if(n.data){if(32!=n.data.length)throw new RangeError("options.data length is invalid");r.data=new Uint8Array(n.data)}if(null===n.noncefn)throw new TypeError("options.noncefn should be a Function");n.noncefn&&(r.noncefn=function(e,t,o,r,i){var s=null!=o?a.from(o):null,c=null!=r?a.from(r):null,u=a.from("");return n.noncefn&&(u=n.noncefn(a.from(e),a.from(t),s,c,i)),new Uint8Array(u)})}var i=o.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),r);return{signature:a.from(i.signature),recovery:i.recid}},t.verify=function(e,t,n){return o.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),n)},t.recover=function(e,t,n,r){return a.from(o.ecdsaRecover(Uint8Array.from(t),n,Uint8Array.from(e),r))},t.ecdh=function(e,t){return a.from(o.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},t.ecdhUnsafe=function(e,t,n){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return a.from(r.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),n))}},3950:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var o=a.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),r=a.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(e,t,n){void 0===n&&(n=!0);var i=a.from(n?o:r);return e.copy(i,n?8:9),t.copy(i,n?181:214),i},t.privateKeyImport=function(e){var t=e.length,n=0;if(t2)return null;if(t<(n+=1)+a)return null;var o=e[n+a-1]|(a>1?e[n+a-2]<<8:0);return t<(n+=a)+o||t32||to)return null;if(2!==e[r++])return null;var s=e[r++];if(128&s){if(r+(i=s-128)>o)return null;for(;i>0&&0===e[r];r+=1,i-=1);for(s=0;i>0;r+=1,i-=1)s=(s<<8)+e[r]}if(s>o-r)return null;var c=r;if(r+=s,2!==e[r++])return null;var u=e[r++];if(128&u){if(r+(i=u-128)>o)return null;for(;i>0&&0===e[r];r+=1,i-=1);for(u=0;i>0;r+=1,i-=1)u=(u<<8)+e[r]}if(u>o-r)return null;var d=r;for(r+=u;s>0&&0===e[c];s-=1,c+=1);if(s>32)return null;var l=e.slice(c,c+s);for(l.copy(t,32-l.length);u>0&&0===e[d];u-=1,d+=1);if(u>32)return null;var f=e.slice(d,d+u);return f.copy(n,32-f.length),{r:t,s:n}}},28411:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var o=n(82726),r=new(0,n(69205).ec)("secp256k1"),i=r.curve;t.privateKeyExport=function(e,t){void 0===t&&(t=!0);var n=new o(e);if(n.ucmp(i.n)>=0)throw new Error("couldn't export to DER format");var a=r.g.mul(n);return s(a.getX(),a.getY(),t)},t.privateKeyModInverse=function(e){var t=new o(e);if(t.ucmp(i.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(i.n).toArrayLike(a,"be",32)},t.signatureImport=function(e){var t=new o(e.r);t.ucmp(i.n)>=0&&(t=new o(0));var n=new o(e.s);return n.ucmp(i.n)>=0&&(n=new o(0)),a.concat([t.toArrayLike(a,"be",32),n.toArrayLike(a,"be",32)])},t.ecdhUnsafe=function(e,t,n){void 0===n&&(n=!0);var a=r.keyFromPublic(e),c=new o(t);if(c.ucmp(i.n)>=0||c.isZero())throw new Error("scalar was invalid (zero or overflow)");var u=a.pub.mul(c);return s(u.getX(),u.getY(),n)};var s=function(e,t,n){var o;return n?((o=a.alloc(33))[0]=t.isOdd()?3:2,e.toArrayLike(a,"be",32).copy(o,1)):((o=a.alloc(65))[0]=4,e.toArrayLike(a,"be",32).copy(o,1),t.toArrayLike(a,"be",32).copy(o,33)),o}},24527:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var o=n(57869),r=n(82726),i=n(77451),s=n(26358);function c(e,t){return t?e-(2*t+35):e-27}function u(e){return 0===e||1===e}t.ecsign=function(e,t,n){var a=o.sign(e,t),r=a.recovery;return{r:a.signature.slice(0,32),s:a.signature.slice(32,64),v:n?r+(2*n+35):r+27}},t.ecrecover=function(e,t,n,r,s){var d=a.concat([i.setLength(n,32),i.setLength(r,32)],64),l=c(t,s);if(!u(l))throw new Error("Invalid signature v value");var f=o.recover(e,d,l);return o.publicKeyConvert(f,!1).slice(1)},t.toRpcSig=function(e,t,n,o){if(!u(c(e,o)))throw new Error("Invalid signature v value");return i.bufferToHex(a.concat([i.setLengthLeft(t,32),i.setLengthLeft(n,32),i.toBuffer(e)]))},t.fromRpcSig=function(e){var t=i.toBuffer(e);if(65!==t.length)throw new Error("Invalid signature length");var n=t[64];return n<27&&(n+=27),{v:n,r:t.slice(0,32),s:t.slice(32,64)}},t.isValidSignature=function(e,t,n,a,o){void 0===a&&(a=!0);var i=new r("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new r("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==n.length)return!1;if(!u(c(e,o)))return!1;var d=new r(t),l=new r(n);return!(d.isZero()||d.gt(s)||l.isZero()||l.gt(s))&&(!a||1!==l.cmp(i))},t.hashPersonalMessage=function(e){var t=a.from("\x19Ethereum Signed Message:\n"+e.length.toString(),"utf-8");return s.keccak(a.concat([t,e]))}},48514:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.supportedTypeMap=void 0;var r=n(46268);o(n(46268),t),o(n(79002),t),t.supportedTypeMap=r.keysTypeMap},79002:function(e,t,n){"use strict";var a=n(27424).default,o=n(74704).default,r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.GpaBuilder=void 0;var s=n(13168),c=n(75979),u=n(6246),d=n(9582),l=function(){function e(t,n,a){r(this,e),this.programId=t,this.beets=n,this.accountSize=a,this.config={}}return i(e,[{key:"_addFilter",value:function(e){return null==this.config.filters&&(this.config.filters=[]),this.config.filters.push(e),this}},{key:"_addInnerFilter",value:function(e,t,n){(0,u.logTrace)("gpa.addInnerFilter: ".concat(e,".").concat(t));var r=this.beets.get(e);(0,c.strict)(null!=r,"Outer filter key needs to be an existing field name");var i,l,f=r.beet,p=r.offset,b=(0,s.isFixedSizeBeet)(f)?f:f.toFixedFromValue(n),m=o(b.fields);try{for(m.s();!(l=m.n()).done;){var h=a(l.value,2),g=h[0],y=h[1];if(g===t){i=y;break}p+=y.byteSize}}catch(w){m.e(w)}finally{m.f()}(0,c.strict)(null!=i,"".concat(t," is not a field of the ").concat(e," struct"));var v=(0,d.encodeFixedBeet)(i,n);return this._addFilter({memcmp:{offset:p,bytes:v}}),this}},{key:"addInnerFilter",value:function(e,t){var n=e.split(".");c.strict.equal(n.length,2,"inner filters can go only one level deep, i.e. 'outer.inner' is ok, but 'outer.inner.deep' is not");var o=a(n,2),r=o[0],i=o[1];return this._addInnerFilter(r,i,t)}},{key:"addFilter",value:function(e,t){var n=this.beets.get(e);(0,c.strict)(null!=n,"Filter key needs to be an existing field name");var a=(0,s.isFixedSizeBeet)(n.beet)?n.beet:n.beet.toFixedFromValue(t),o=(0,d.encodeFixedBeet)(a,t);return this._addFilter({memcmp:{offset:n.offset,bytes:o}}),this}},{key:"dataSize",value:function(e){return e=null!==e&&void 0!==e?e:this.accountSize,(0,c.strict)(null!=e,"for accounts of dynamic size the dataSize arg needs to be provided"),this._addFilter({dataSize:e})}},{key:"run",value:function(e){return e.getProgramAccounts(this.programId,this.config)}}],[{key:"fromBeetFields",value:function(t,n){var r,i=new Map,c=0,u=!1,d=o(n);try{for(d.s();!(r=d.n()).done;){var l=a(r.value,2),f=l[0],p=l[1];if(i.set(f,{beet:p,offset:c}),!(0,s.isFixedSizeBeet)(p)){u=!0;break}c+=p.byteSize}}catch(b){d.e(b)}finally{d.f()}return new e(t,i,u?void 0:c)}},{key:"fromStruct",value:function(t,n){return e.fromBeetFields(t,n.fields)}}]),e}();t.GpaBuilder=l},9582:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFixedBeet=void 0;var r=o(n(58135));t.encodeFixedBeet=function(e,t){var n=a.alloc(e.byteSize);return e.write(n,0,t),r.default.encode(n)}},46268:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keysTypeMap=t.publicKey=void 0;var a=n(8594),o=(0,n(13168).fixedSizeUint8Array)(32);t.publicKey={write:function(e,t,n){var a=n.toBytes();o.write(e,t,a)},read:function(e,t){var n=o.read(e,t);return new a.PublicKey(n)},byteSize:o.byteSize,description:"PublicKey"},t.keysTypeMap={publicKey:{beet:"publicKey",isFixable:!1,sourcePack:"@metaplex-foundation/beet-solana",ts:"PublicKey",pack:"@solana/web3.js"}}},6246:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.logTrace=t.logDebug=t.logInfo=t.logError=void 0;var o=a(n(93420));t.logError=(0,o.default)("beet:error"),t.logInfo=(0,o.default)("beet:info"),t.logDebug=(0,o.default)("beet:debug"),t.logTrace=(0,o.default)("beet:trace")},34584:function(e){"use strict";e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,u=new Uint8Array(r);e[n];){var d=t[e.charCodeAt(n)];if(255===d)return;for(var l=0,f=r-1;(0!==d||l>>0,u[f]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");o=l,n++}for(var p=r-o;p!==r&&0===u[p];)p++;for(var b=new Uint8Array(a+(r-p)),m=a;p!==r;)b[m++]=u[p++];return b}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,a=0,o=0,r=t.length;o!==r&&0===t[o];)o++,n++;for(var c=(r-o)*u+1>>>0,d=new Uint8Array(c);o!==r;){for(var l=t[o],f=0,p=c-1;(0!==l||f>>0,d[p]=l%i>>>0,l=l/i>>>0;if(0!==l)throw new Error("Non-zero carry");a=f,o++}for(var b=c-a;b!==c&&0===d[b];)b++;for(var m=s.repeat(n);b":e[0].description;return{write:function(t,a,o){r.strict.equal(o.length,n,"array length ".concat(o.length," should match len ").concat(n)),i.u32.write(t,a,n);for(var s=a+4,c=0;c(").concat(n,")[ 4 + ").concat(t," ]")}}function l(e){return{write:function(t,n,a){a.copy(t,n,0,e)},read:function(t,n){return t.slice(n,n+e)},byteSize:e,description:"Buffer(".concat(e,")")}}function f(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=l(e);return{write:function(o,s,c){r.strict.equal(c.byteLength,e,"Uint8Array length ".concat(c.byteLength," should match len ").concat(e)),t&&(i.u32.write(o,s,e),s+=4);var u=a.from(c);n.write(o,s,u)},read:function(a,o){if(t){var s=i.u32.read(a,o);r.strict.equal(s,e,"invalid byte size"),o+=4}var c=n.read(a,o);return Uint8Array.from(c)},byteSize:t?e+4:e,description:"Uint8Array(".concat(e,")")}}t.uniformFixedSizeArray=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=e.byteSize*t;return{write:function(a,o,s){r.strict.equal(s.length,t,"array length ".concat(s.length," should match len ").concat(t)),n&&(i.u32.write(a,o,t),o+=4);for(var c=0;c(").concat(t,")")}},t.fixedSizeArray=d,t.array=function(e){return{toFixedFromData:function(t,n){var a=i.u32.read(t,n);(0,c.logTrace)("".concat(this.description,"[").concat(a,"]"));for(var o=n+4,r=o,s=new Array(a),l=0;l")}}function p(e){var t=1+e.byteSize,n={write:function(t,n,r){(0,o.assertFixedSizeBeet)(e,"coption inner type ".concat(e.description," needs to be fixed before calling write")),(0,a.strict)(null!=r,"coptionSome cannot handle `null` values"),t[n]=u,e.write(t,n+1,r)},read:function(t,n){return(0,o.assertFixedSizeBeet)(e,"coption inner type ".concat(e.description," needs to be fixed before calling read")),(0,a.strict)(d(t,n),"coptionSome can only handle `SOME` data"),e.read(t,n+1)},description:"COption<".concat(e.description,">[1 + ").concat(e.byteSize,"]"),byteSize:t,inner:e};return(0,i.logTrace)(n.description),n}t.isSomeBuffer=d,t.isNoneBuffer=l,t.coptionNone=f,t.coptionSome=p,t.coption=function(e){return{toFixedFromData:function(t,n){return d(t,n)?p((0,s.fixBeetFromData)(e,t,n+1)):((0,a.strict)(l(t,n),"Expected ".concat(t," to hold a COption")),f(e.description))},toFixedFromValue:function(t){return null==t?f(e.description):p((0,s.fixBeetFromValue)(e,t))},description:"COption<".concat(e.description,">")}},t.compositesTypeMap={option:{beet:"coption",isFixable:!0,sourcePack:r.BEET_PACKAGE,ts:"COption",arg:o.BEET_TYPE_ARG_INNER,pack:r.BEET_PACKAGE}}},48458:function(e,t,n){"use strict";var a=n(70215).default,o=n(27424).default,r=n(74704).default,i=n(42122).default,s=["__kind"];Object.defineProperty(t,"__esModule",{value:!0}),t.enumsTypeMap=t.dataEnum=t.uniformDataEnum=t.fixedScalarEnum=void 0;var c=n(10365),u=n(91756),d=n(75979),l=n(86963),f=n(14509),p=n(1969);function b(e,t){return t?"".concat(e):e}function m(e,t,n){return{write:function(n,a,o){u.u8.write(n,a,t),e.write(n,a+u.u8.byteSize,o)},read:function(t,a){var o=e.read(t,a+u.u8.byteSize);return i({__kind:n},o)},byteSize:e.byteSize+u.u8.byteSize,description:"EnumData<".concat(e.description,">")}}t.fixedScalarEnum=function(e){var t=Object.keys(e);return{write:function(n,a,o){var r="number"===typeof o,i=b(o,r);if(t.includes(i)||d.strict.fail("".concat(o," should be a variant of the provided enum type, i.e. [ ").concat(Object.values(e).join(", ")," ], but isn't")),r)u.u8.write(n,a,o);else{var s=e[i];u.u8.write(n,a,s)}},read:function(n,a){var o=u.u8.read(n,a),r="number"===typeof o,i=b(o,r);return t.includes(i)||d.strict.fail("".concat(o," should be a of a variant of the provided enum type, i.e. [ ").concat(Object.values(e).join(", ")," ], but isn't")),r?o:e[i]},byteSize:u.u8.byteSize,description:"Enum"}},t.uniformDataEnum=function(e){return{write:function(t,n,a){u.u8.write(t,n,a.kind),e.write(t,n+1,a.data)},read:function(t,n){return{kind:u.u8.read(t,n),data:e.read(t,n+1)}},byteSize:1+e.byteSize,description:"UniformDataEnum<".concat(e.description,">")}},t.dataEnum=function(e){var t,n=r(e);try{for(n.s();!(t=n.n()).done;){var i=o(t.value,2),b=(i[0],i[1]);(0,d.strict)((0,l.isBeetStruct)(b)||(0,f.isFixableBeetStruct)(b)||b===p.unit,"dataEnum: variants must be a data beet struct or a scalar unit")}}catch(h){n.e(h)}finally{n.f()}return{toFixedFromData:function(t,n){var a=u.u8.read(t,n),r=e[a];(0,d.strict)(null!=r,"Discriminant ".concat(a," out of range for ").concat(e.length," variants"));var i=o(r,2),s=i[0],l=i[1];return m((0,c.isFixedSizeBeet)(l)?l:l.toFixedFromData(t,n+1),a,s)},toFixedFromValue:function(t){if(null==t.__kind){var n=Object.keys(t).join(", "),r=e.map((function(e){return o(e,1)[0]})).join(", ");d.strict.fail("Value with fields [ ".concat(n," ] is missing __kind, ")+"which needs to be set to one of [ ".concat(r," ]"))}var i=e.findIndex((function(e){return o(e,1)[0]===t.__kind}));if(i<0){var u=e.map((function(e){return o(e,1)[0]})).join(", ");d.strict.fail("".concat(t.__kind," is not a valid kind, needs to be one of [ ").concat(u," ]"))}var l=e[i],f=(t.__kind,a(t,s)),p=o(l,2),b=p[0],h=p[1];return m((0,c.isFixedSizeBeet)(h)?h:h.toFixedFromValue(f),i,b)},description:"DataEnum<".concat(e.length," variants>")}},t.enumsTypeMap={fixedScalarEnum:{beet:"fixedScalarEnum",isFixable:!1,sourcePack:c.BEET_PACKAGE,ts:"",arg:c.BEET_TYPE_ARG_INNER,pack:c.BEET_PACKAGE},dataEnum:{beet:"dataEnum",isFixable:!1,sourcePack:c.BEET_PACKAGE,ts:"DataEnum",arg:c.BEET_TYPE_ARG_INNER,pack:c.BEET_PACKAGE}}},82193:function(e,t,n){"use strict";var a=n(27424).default,o=n(74704).default;Object.defineProperty(t,"__esModule",{value:!0}),t.mapsTypeMap=t.map=void 0;var r=n(10365),i=n(91756),s=n(91554),c=n(75979);function u(e,t,n,u){var d=(0,r.isFixedSizeBeet)(e),l=(0,r.isFixedSizeBeet)(t);var f=function(){if(d&&l){var r=e.byteSize+t.byteSize;return{elementByteSize:r,byteSize:4+u*r}}if(d){var i,s=0,c=o(n.values());try{for(c.s();!(i=c.n()).done;){var f=a(i.value,2);f[0];s+=f[1].byteSize}}catch(T){c.e(T)}finally{c.f()}return{elementByteSize:e.byteSize+Math.ceil(s/u),byteSize:4+e.byteSize*u+s}}if(l){var p,b=0,m=o(n.values());try{for(m.s();!(p=m.n()).done;){var h=a(p.value,2),g=h[0];h[1];b+=g.byteSize}}catch(T){m.e(T)}finally{m.f()}return{elementByteSize:Math.ceil(b/u)+t.byteSize,byteSize:4+b+t.byteSize*u}}var y,v=0,w=0,k=o(n.values());try{for(k.s();!(y=k.n()).done;){var A=a(y.value,2),x=A[0],I=A[1];v+=x.byteSize,w+=I.byteSize}}catch(T){k.e(T)}finally{k.f()}return{elementByteSize:Math.ceil(v/u+w/u),byteSize:4+v+w}}();return{write:function(r,f,p){var b,m=f+4,h=0,g=o(p.entries());try{for(g.s();!(b=g.n()).done;){var y=a(b.value,2),v=y[0],w=y[1],k=d?e:null,A=l?t:null;if(null==k||null==A){var x=n.get(v);(0,c.strict)(null!=x,"Should be able to find beet els for ".concat((0,s.stringify)(v),", but could not")),null!==k&&void 0!==k||(k=x[0]),null!==A&&void 0!==A||(A=x[1])}k.write(r,m,v),m+=k.byteSize,A.write(r,m,w),m+=A.byteSize,h++}}catch(I){g.e(I)}finally{g.f()}i.u32.write(r,f,h),c.strict.equal(h,u,"Expected map to have size ".concat(u,", but has ").concat(h,"."))},read:function(n,a){var o=i.u32.read(n,a);c.strict.equal(o,u,"Expected map to have size ".concat(u,", but has ").concat(o,"."));for(var r=a+4,s=new Map,f=0;f")}}t.map=function(e,t){var n=(0,r.isFixedSizeBeet)(e),s=(0,r.isFixedSizeBeet)(t);return{toFixedFromData:function(a,o){var r=i.u32.read(a,o),c=o+4;if(n&&s)return u(e,t,new Map,r);for(var d=new Map,l=0;l")}},t.mapsTypeMap={Map:{beet:"map",isFixable:!0,sourcePack:r.BEET_PACKAGE,ts:"Map"}}},91756:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.numbersTypeMap=t.bool=t.i512=t.i256=t.i128=t.i64=t.i32=t.i16=t.i8=t.u512=t.u256=t.u128=t.u64=t.u32=t.u16=t.u8=void 0;var r=o(n(43811)),i=n(10365);function s(e,t){return{write:function(e,t,n){var o=(r.default.isBN(n)?n:new r.default(n)).toArray("le",this.byteSize);a.from(o).copy(e,t,0,this.byteSize)},read:function(e,t){var n=e.slice(t,t+this.byteSize);return new r.default(n,"le")},byteSize:e,description:t}}function c(e,t){var n=8*e;return{write:function(e,t,o){var i=(r.default.isBN(o)?o:new r.default(o)).toTwos(n).toArray("le",this.byteSize);a.from(i).copy(e,t,0,this.byteSize)},read:function(e,t){var a=e.slice(t,t+this.byteSize);return new r.default(a,"le").fromTwos(n)},byteSize:e,description:t}}t.u8={write:function(e,t,n){e.writeUInt8(n,t)},read:function(e,t){return e.readUInt8(t)},byteSize:1,description:"u8"},t.u16={write:function(e,t,n){e.writeUInt16LE(n,t)},read:function(e,t){return e.readUInt16LE(t)},byteSize:2,description:"u16"},t.u32={write:function(e,t,n){e.writeUInt32LE(n,t)},read:function(e,t){return e.readUInt32LE(t)},byteSize:4,description:"u32"},t.u64=s(8,"u64"),t.u128=s(16,"u128"),t.u256=s(32,"u256"),t.u512=s(64,"u512"),t.i8={write:function(e,t,n){e.writeInt8(n,t)},read:function(e,t){return e.readInt8(t)},byteSize:1,description:"i8"},t.i16={write:function(e,t,n){e.writeInt16LE(n,t)},read:function(e,t){return e.readInt16LE(t)},byteSize:2,description:"i16"},t.i32={write:function(e,t,n){e.writeInt32LE(n,t)},read:function(e,t){return e.readInt32LE(t)},byteSize:4,description:"i32"},t.i64=c(8,"i64"),t.i128=c(16,"i128"),t.i256=c(32,"i256"),t.i512=c(64,"i512"),t.bool={write:function(e,n,a){var o=a?1:0;t.u8.write(e,n,o)},read:function(e,n){return 1===t.u8.read(e,n)},byteSize:1,description:"bool"},t.numbersTypeMap={u8:{beet:"u8",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"number"},u16:{beet:"u16",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"number"},u32:{beet:"u32",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"number"},i8:{beet:"i8",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"number"},i16:{beet:"i16",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"number"},i32:{beet:"i32",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"number"},bool:{beet:"bool",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"boolean"},u64:{beet:"u64",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"bignum",pack:i.BEET_PACKAGE},u128:{beet:"u128",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"bignum",pack:i.BEET_PACKAGE},u256:{beet:"u256",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"bignum",pack:i.BEET_PACKAGE},u512:{beet:"u512",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"bignum",pack:i.BEET_PACKAGE},i64:{beet:"i64",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"bignum",pack:i.BEET_PACKAGE},i128:{beet:"i128",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"bignum",pack:i.BEET_PACKAGE},i256:{beet:"i256",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"bignum",pack:i.BEET_PACKAGE},i512:{beet:"i512",isFixable:!1,sourcePack:i.BEET_PACKAGE,ts:"bignum",pack:i.BEET_PACKAGE}}},58850:function(e,t,n){"use strict";var a=n(74704).default;Object.defineProperty(t,"__esModule",{value:!0}),t.setsTypeMap=t.set=void 0;var o=n(10365),r=n(91756),i=n(91554),s=n(75979);function c(e,t,n){var c=(0,o.isFixedSizeBeet)(e);var u=function(){if(c){var o=e.byteSize;return{elementByteSize:o,byteSize:4+n*o}}var r,i=0,s=a(t.values());try{for(s.s();!(r=s.n()).done;){i+=r.value.byteSize}}catch(u){s.e(u)}finally{s.f()}return{elementByteSize:Math.ceil(i/n),byteSize:4+i}}();return{write:function(o,u,d){var l,f=u+4,p=0,b=a(d.keys());try{for(b.s();!(l=b.n()).done;){var m=l.value,h=c?e:null;if(null==h){var g=t.get(m);(0,s.strict)(null!=g,"Should be able to find beet el for ".concat((0,i.stringify)(m),", but could not")),null!==h&&void 0!==h||(h=g)}h.write(o,f,m),f+=h.byteSize,p++}}catch(y){b.e(y)}finally{b.f()}r.u32.write(o,u,p),s.strict.equal(p,n,"Expected set to have size ".concat(n,", but has ").concat(p,"."))},read:function(t,a){var o=r.u32.read(t,a);s.strict.equal(o,n,"Expected set to have size ".concat(n,", but has ").concat(o,"."));for(var i=a+4,u=new Set,d=0;d")}}t.set=function(e){var t=(0,o.isFixedSizeBeet)(e);return{toFixedFromData:function(n,a){var o=r.u32.read(n,a),i=a+4;if(t)return c(e,new Map,o);for(var s=new Map,u=0;u")}},t.setsTypeMap={Set:{beet:"set",isFixable:!0,sourcePack:o.BEET_PACKAGE,ts:"Set"}}},38869:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.stringTypeMap=t.utf8String=t.fixedSizeUtf8String=void 0;var o=n(10365),r=n(75979),i=n(91756),s=n(91554);t.fixedSizeUtf8String=function(e){return{write:function(t,n,o){var s=a.from(o,"utf8");r.strict.equal(s.byteLength,e,"".concat(o," has invalid byte size")),i.u32.write(t,n,e),s.copy(t,n+4,0,e)},read:function(t,n){var a=i.u32.read(t,n);return r.strict.equal(a,e,"invalid byte size"),t.slice(n+4,n+4+e).toString("utf8")},elementByteSize:1,length:e,lenPrefixByteSize:4,byteSize:4+e,description:"Utf8String(4 + ".concat(e,")")}},t.utf8String={toFixedFromData:function(e,n){var a=i.u32.read(e,n);return(0,s.logTrace)("".concat(this.description,"[").concat(a,"]")),(0,t.fixedSizeUtf8String)(a)},toFixedFromValue:function(e){var n=a.from(e).byteLength;return(0,t.fixedSizeUtf8String)(n)},description:"Utf8String"},t.stringTypeMap={fixedSizeString:{beet:"fixedSizeUtf8String",isFixable:!1,sourcePack:o.BEET_PACKAGE,ts:"string",arg:o.BEET_TYPE_ARG_LEN},string:{beet:"utf8String",isFixable:!0,sourcePack:o.BEET_PACKAGE,ts:"string"}}},98518:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tuplesTypeMap=t.tuple=t.fixedSizeTuple=void 0;var a=n(10365),o=n(75979),r=n(50037);function i(e){var t=e.length,n=e.map((function(e){return e.description})),a=e.map((function(e){return e.byteSize}));return{write:function(n,a,r){o.strict.equal(r.length,t,"tuple value element size ".concat(r.length," should match len ").concat(t));for(var i=a,s=0;s[ ").concat(a.join(", ")," ]")}}t.fixedSizeTuple=i,t.tuple=function(e){var t=e.length,n=e.map((function(e){return e.description}));return{toFixedFromData:function(n,a){for(var o=a,s=new Array(t),c=0;c")}},t.tuplesTypeMap={Tuple:{beet:"tuple",isFixable:!0,sourcePack:a.BEET_PACKAGE,ts:"[__tuple_elements__]"},FixedSizeTuple:{beet:"fixedSizeTuple",isFixable:!1,sourcePack:a.BEET_PACKAGE,ts:"[__tuple_elements__]"}}},1969:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unitTypeMap=t.unit=void 0;var a=n(10365);t.unit={write:function(e,t,n){},read:function(e,t){},byteSize:0,description:"unit"},t.unitTypeMap={unit:{beet:"unit",isFixable:!1,sourcePack:a.BEET_PACKAGE,ts:"void"}}},24781:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(27424).default,r=n(74704).default,i=n(56690).default,s=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.BeetReader=t.BeetWriter=void 0;var c=n(75979),u=function(){function e(t){i(this,e),this.buf=a.alloc(t),this._offset=0}return s(e,[{key:"buffer",get:function(){return this.buf}},{key:"offset",get:function(){return this._offset}},{key:"maybeResize",value:function(e){this._offset+e>this.buf.length&&c.strict.fail("We shouldn't ever need to resize, but ".concat(this._offset+e," > ").concat(this.buf.length))}},{key:"write",value:function(e,t){this.maybeResize(e.byteSize),e.write(this.buf,this._offset,t),this._offset+=e.byteSize}},{key:"writeStruct",value:function(e,t){var n,a=r(t);try{for(a.s();!(n=a.n()).done;){var i=o(n.value,2),s=i[0],c=i[1],u=e[s];this.write(c,u)}}catch(d){a.e(d)}finally{a.f()}}}]),e}();t.BeetWriter=u;var d=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(this,e),this.buffer=t,this._offset=n}return s(e,[{key:"offset",get:function(){return this._offset}},{key:"read",value:function(e){var t=e.read(this.buffer,this._offset);return this._offset+=e.byteSize,t}},{key:"readStruct",value:function(e){var t,n={},a=r(e);try{for(a.s();!(t=a.n()).done;){var i=o(t.value,2),s=i[0],c=i[1];n[s]=this.read(c)}}catch(u){a.e(u)}finally{a.f()}return n}}]),e}();t.BeetReader=d},14509:function(e,t,n){"use strict";var a=n(61655).default,o=n(26389).default,r=n(27424).default,i=n(56690).default,s=n(89728).default,c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FixableBeetArgsStruct=t.isFixableBeetStruct=t.FixableBeetStruct=void 0;var u=n(50037),d=n(86963),l=n(10365),f=n(75979),p=n(91554),b=c(n(35872)).default.brightBlack,m=function(){function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.description;i(this,e),this.fields=t,this.construct=n,this.description=a;var o=0;if(p.logDebug.enabled){var s=t.map((function(e){var t=r(e,2),n=t[0],a=t[1];return(0,l.isFixedSizeBeet)(a)&&(o+=a.byteSize),"".concat(n,": ").concat(a.description," ").concat((0,p.beetBytes)(a))})).join("\n "),c="> ".concat(o," B");(0,p.logDebug)("struct ".concat(a," {\n ").concat(s,"\n} ").concat(b(c)))}}return s(e,[{key:"deserialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.toFixedFromData(e,t).deserialize(e,t)}},{key:"serialize",value:function(e,t){return this.toFixedFromValue(e).serialize(e,t)}},{key:"toFixedFromData",value:function(t,n){for(var a=n,o=new Array(this.fields.length),i=0;i1&&void 0!==arguments[1]?arguments[1]:n.description;return i(this,n),t.call(this,e,(function(e){return e}),a)}return s(n)}(m);t.FixableBeetArgsStruct=h,h.description="FixableBeetArgsStruct"},86963:function(e,t,n){"use strict";var a=n(61655).default,o=n(26389).default,r=n(27424).default,i=n(56690).default,s=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.BeetArgsStruct=t.isBeetStruct=t.BeetStruct=void 0;var c=n(24781),u=n(91554),d=function(){function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.description;if(i(this,e),this.fields=t,this.construct=n,this.description=a,this.byteSize=this.getByteSize(),u.logDebug.enabled){var o=t.map((function(e){var t=r(e,2),n=t[0],a=t[1];return"".concat(String(n),": ").concat(a.description," ").concat((0,u.beetBytes)(a))})).join("\n ");(0,u.logDebug)("struct ".concat(a," {\n ").concat(o,"\n} ").concat((0,u.beetBytes)(this)))}}return s(e,[{key:"read",value:function(e,t){var n=this.deserialize(e,t);return r(n,1)[0]}},{key:"write",value:function(e,t,n){var a=this.serialize(n),o=r(a,2),i=o[0],s=o[1];i.copy(e,t,0,s)}},{key:"deserialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;u.logTrace.enabled&&((0,u.logTrace)("deserializing [%s] from %d bytes buffer",this.description,e.byteLength),(0,u.logTrace)(e),(0,u.logTrace)(e.toJSON().data));var n=new c.BeetReader(e,t),a=n.readStruct(this.fields);return[this.construct(a),n.offset]}},{key:"serialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteSize;(0,u.logTrace)("serializing [%s] %o to %d bytes buffer",this.description,e,t);var n=new c.BeetWriter(t);return n.writeStruct(e,this.fields),[n.buffer,n.offset]}},{key:"getByteSize",value:function(){return this.fields.reduce((function(e,t){var n=r(t,2);n[0];return e+n[1].byteSize}),0)}},{key:"type",get:function(){return e.TYPE}}]),e}();t.BeetStruct=d,d.description="BeetStruct",d.TYPE="BeetStruct",t.isBeetStruct=function(e){return e.type===d.TYPE};var l=function(e){a(n,e);var t=o(n);function n(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.description;return i(this,n),t.call(this,e,(function(e){return e}),a)}return s(n)}(d);t.BeetArgsStruct=l,l.description="BeetArgsStruct"},10365:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isElementCollectionFixedSizeBeet=t.isFixableBeet=t.assertFixedSizeBeet=t.isFixedSizeBeet=t.BEET_TYPE_ARG_INNER=t.BEET_TYPE_ARG_LEN=t.BEET_PACKAGE=void 0;var a=n(75979);function o(e){return Object.keys(e).includes("byteSize")}t.BEET_PACKAGE="@metaplex-foundation/beet",t.BEET_TYPE_ARG_LEN="len",t.BEET_TYPE_ARG_INNER="Beet<{innner}>",t.isFixedSizeBeet=o,t.assertFixedSizeBeet=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"".concat(e," should have been a fixed beet");(0,a.strict)(o(e),t)},t.isFixableBeet=function(e){return"function"===typeof e.toFixedFromData&&"function"===typeof e.toFixedFromValue},t.isElementCollectionFixedSizeBeet=function(e){var t=Object.keys(e);return t.includes("length")&&t.includes("elementByteSize")&&t.includes("lenPrefixByteSize")}},91554:function(e,t,n){"use strict";var a=n(89728).default,o=n(56690).default,r=n(61655).default,i=n(26389).default,s=n(33496).default,c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UnreachableCaseError=t.stringify=t.bytes=t.beetBytes=t.logTrace=t.logDebug=t.logInfo=t.logError=void 0;var u=c(n(93420)),d=c(n(35872)),l=n(10365),f=d.default.brightBlack;t.logError=(0,u.default)("beet:error"),t.logInfo=(0,u.default)("beet:info"),t.logDebug=(0,u.default)("beet:debug"),t.logTrace=(0,u.default)("beet:trace"),t.beetBytes=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,l.isFixableBeet)(e))t="? B";else if((0,l.isElementCollectionFixedSizeBeet)(e)){var a=n?"length":e.length,o=e.lenPrefixByteSize;t=o>0?"".concat(o," + (").concat(e.elementByteSize," * ").concat(a,") B (").concat(e.byteSize," B)"):"(".concat(e.elementByteSize," * ").concat(a,") B (").concat(e.byteSize," B)")}else t="".concat(e.byteSize," B");return f(t)},t.bytes=function(e){return f("".concat(e," B"))},t.stringify=function(e){return"function"===e.toString?e.toString():e};var p=function(e){r(n,e);var t=i(n);function n(e){return o(this,n),t.call(this,"Unreachable case: ".concat(e))}return a(n)}(s(Error));t.UnreachableCaseError=p},31176:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(59594),t),o(n(78975),t)},34138:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LangErrorMessage=t.LangErrorCode=void 0,t.LangErrorCode={InstructionMissing:100,InstructionFallbackNotFound:101,InstructionDidNotDeserialize:102,InstructionDidNotSerialize:103,IdlInstructionStub:1e3,IdlInstructionInvalidProgram:1001,ConstraintMut:2e3,ConstraintHasOne:2001,ConstraintSigner:2002,ConstraintRaw:2003,ConstraintOwner:2004,ConstraintRentExempt:2005,ConstraintSeeds:2006,ConstraintExecutable:2007,ConstraintState:2008,ConstraintAssociated:2009,ConstraintAssociatedInit:2010,ConstraintClose:2011,ConstraintAddress:2012,ConstraintZero:2013,ConstraintTokenMint:2014,ConstraintTokenOwner:2015,ConstraintMintMintAuthority:2016,ConstraintMintFreezeAuthority:2017,ConstraintMintDecimals:2018,ConstraintSpace:2019,AccountDiscriminatorAlreadySet:3e3,AccountDiscriminatorNotFound:3001,AccountDiscriminatorMismatch:3002,AccountDidNotDeserialize:3003,AccountDidNotSerialize:3004,AccountNotEnoughKeys:3005,AccountNotMutable:3006,AccountOwnedByWrongProgram:3007,InvalidProgramId:3008,InvalidProgramExecutable:3009,AccountNotSigner:3010,AccountNotSystemOwned:3011,AccountNotInitialized:3012,AccountNotProgramData:3013,StateInvalidAddress:4e3,Deprecated:5e3},t.LangErrorMessage=new Map([[t.LangErrorCode.InstructionMissing,"8 byte instruction identifier not provided"],[t.LangErrorCode.InstructionFallbackNotFound,"Fallback functions are not supported"],[t.LangErrorCode.InstructionDidNotDeserialize,"The program could not deserialize the given instruction"],[t.LangErrorCode.InstructionDidNotSerialize,"The program could not serialize the given instruction"],[t.LangErrorCode.IdlInstructionStub,"The program was compiled without idl instructions"],[t.LangErrorCode.IdlInstructionInvalidProgram,"The transaction was given an invalid program for the IDL instruction"],[t.LangErrorCode.ConstraintMut,"A mut constraint was violated"],[t.LangErrorCode.ConstraintHasOne,"A has_one constraint was violated"],[t.LangErrorCode.ConstraintSigner,"A signer constraint was violated"],[t.LangErrorCode.ConstraintRaw,"A raw constraint was violated"],[t.LangErrorCode.ConstraintOwner,"An owner constraint was violated"],[t.LangErrorCode.ConstraintRentExempt,"A rent exempt constraint was violated"],[t.LangErrorCode.ConstraintSeeds,"A seeds constraint was violated"],[t.LangErrorCode.ConstraintExecutable,"An executable constraint was violated"],[t.LangErrorCode.ConstraintState,"A state constraint was violated"],[t.LangErrorCode.ConstraintAssociated,"An associated constraint was violated"],[t.LangErrorCode.ConstraintAssociatedInit,"An associated init constraint was violated"],[t.LangErrorCode.ConstraintClose,"A close constraint was violated"],[t.LangErrorCode.ConstraintAddress,"An address constraint was violated"],[t.LangErrorCode.ConstraintZero,"Expected zero account discriminant"],[t.LangErrorCode.ConstraintTokenMint,"A token mint constraint was violated"],[t.LangErrorCode.ConstraintTokenOwner,"A token owner constraint was violated"],[t.LangErrorCode.ConstraintMintMintAuthority,"A mint mint authority constraint was violated"],[t.LangErrorCode.ConstraintMintFreezeAuthority,"A mint freeze authority constraint was violated"],[t.LangErrorCode.ConstraintMintDecimals,"A mint decimals constraint was violated"],[t.LangErrorCode.ConstraintSpace,"A space constraint was violated"],[t.LangErrorCode.AccountDiscriminatorAlreadySet,"The account discriminator was already set on this account"],[t.LangErrorCode.AccountDiscriminatorNotFound,"No 8 byte discriminator was found on the account"],[t.LangErrorCode.AccountDiscriminatorMismatch,"8 byte discriminator did not match what was expected"],[t.LangErrorCode.AccountDidNotDeserialize,"Failed to deserialize the account"],[t.LangErrorCode.AccountDidNotSerialize,"Failed to serialize the account"],[t.LangErrorCode.AccountNotEnoughKeys,"Not enough account keys given to the instruction"],[t.LangErrorCode.AccountNotMutable,"The given account is not mutable"],[t.LangErrorCode.AccountOwnedByWrongProgram,"The given account is owned by a different program than expected"],[t.LangErrorCode.InvalidProgramId,"Program ID was not as expected"],[t.LangErrorCode.InvalidProgramExecutable,"Program account is not executable"],[t.LangErrorCode.AccountNotSigner,"The given account did not sign"],[t.LangErrorCode.AccountNotSystemOwned,"The given account is not owned by the system program"],[t.LangErrorCode.AccountNotInitialized,"The program expected this account to be already initialized"],[t.LangErrorCode.AccountNotProgramData,"The given account is not a program data account"],[t.LangErrorCode.StateInvalidAddress,"The given state account does not have the correct address"],[t.LangErrorCode.Deprecated,"The API being used is deprecated and should no longer be used"]])},94900:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tokenLendingErrors=void 0,t.tokenLendingErrors=new Map([[0,{code:0,message:'Failed to unpack instruction data"',name:"InstructionUnpackError"}],[1,{code:1,message:'Account is already initialized"',name:"AlreadyInitialized"}],[2,{code:2,message:'Lamport balance below rent-exempt threshold"',name:"NotRentExempt"}],[3,{code:3,message:'Market authority is invalid"',name:"InvalidMarketAuthority"}],[4,{code:4,message:'Market owner is invalid"',name:"InvalidMarketOwner"}],[5,{code:5,message:'Input account owner is not the program address"',name:"InvalidAccountOwner"}],[6,{code:6,message:'Input token account is not owned by the correct token program id"',name:"InvalidTokenOwner"}],[7,{code:7,message:'Input token account is not valid"',name:"InvalidTokenAccount"}],[8,{code:8,message:'Input token mint account is not valid"',name:"InvalidTokenMint"}],[9,{code:9,message:'Input token program account is not valid"',name:"InvalidTokenProgram"}],[10,{code:10,message:'Input amount is invalid"',name:"InvalidAmount"}],[11,{code:11,message:'Input config value is invalid"',name:"InvalidConfig"}],[12,{code:12,message:'Input account must be a signer"',name:"InvalidSigner"}],[13,{code:13,message:'Invalid account input"',name:"InvalidAccountInput"}],[14,{code:14,message:'Math operation overflow"',name:"MathOverflow"}],[15,{code:15,message:'Token initialize mint failed"',name:"TokenInitializeMintFailed"}],[16,{code:16,message:'Token initialize account failed"',name:"TokenInitializeAccountFailed"}],[17,{code:17,message:'Token transfer failed"',name:"TokenTransferFailed"}],[18,{code:18,message:'Token mint to failed"',name:"TokenMintToFailed"}],[19,{code:19,message:'Token burn failed"',name:"TokenBurnFailed"}],[20,{code:20,message:'Insufficient liquidity available"',name:"InsufficientLiquidity"}],[21,{code:21,message:'Input reserve has collateral disabled"',name:"ReserveCollateralDisabled"}],[22,{code:22,message:'Reserve state needs to be refreshed"',name:"ReserveStale"}],[23,{code:23,message:'Withdraw amount too small"',name:"WithdrawTooSmall"}],[24,{code:24,message:'Withdraw amount too large"',name:"WithdrawTooLarge"}],[25,{code:25,message:'Borrow amount too small to receive liquidity after fees"',name:"BorrowTooSmall"}],[26,{code:26,message:'Borrow amount too large for deposited collateral"',name:"BorrowTooLarge"}],[27,{code:27,message:'Repay amount too small to transfer liquidity"',name:"RepayTooSmall"}],[28,{code:28,message:'Liquidation amount too small to receive collateral"',name:"LiquidationTooSmall"}],[29,{code:29,message:'Cannot liquidate healthy obligations"',name:"ObligationHealthy"}],[30,{code:30,message:'Obligation state needs to be refreshed"',name:"ObligationStale"}],[31,{code:31,message:'Obligation reserve limit exceeded"',name:"ObligationReserveLimit"}],[32,{code:32,message:'Obligation owner is invalid"',name:"InvalidObligationOwner"}],[33,{code:33,message:'Obligation deposits are empty"',name:"ObligationDepositsEmpty"}],[34,{code:34,message:'Obligation borrows are empty"',name:"ObligationBorrowsEmpty"}],[35,{code:35,message:'Obligation deposits have zero value"',name:"ObligationDepositsZero"}],[36,{code:36,message:'Obligation borrows have zero value"',name:"ObligationBorrowsZero"}],[37,{code:37,message:'Invalid obligation collateral"',name:"InvalidObligationCollateral"}],[38,{code:38,message:'Invalid obligation liquidity"',name:"InvalidObligationLiquidity"}],[39,{code:39,message:'Obligation collateral is empty"',name:"ObligationCollateralEmpty"}],[40,{code:40,message:'Obligation liquidity is empty"',name:"ObligationLiquidityEmpty"}],[41,{code:41,message:'Interest rate is negative"',name:"NegativeInterestRate"}],[42,{code:42,message:'Input oracle config is invalid"',name:"InvalidOracleConfig"}],[43,{code:43,message:'Input flash loan receiver program account is not valid"',name:"InvalidFlashLoanReceiverProgram"}],[44,{code:44,message:'Not enough liquidity after flash loan"',name:"NotEnoughLiquidityAfterFlashLoan"}]])},80790:function(e,t,n){"use strict";var a=n(74704).default;Object.defineProperty(t,"__esModule",{value:!0}),t.errorCodeFromLogs=void 0;var o=/Custom program error: (0x[a-f0-9]+)/i;t.errorCodeFromLogs=function(e){var t,n=a(e);try{for(n.s();!(t=n.n()).done;){var r=t.value.match(o);if(null!=r){var i=r[1];try{return parseInt(i)}catch(s){}}}}catch(c){n.e(c)}finally{n.f()}return null}},59594:function(e,t,n){"use strict";var a=n(27424).default,o=n(61655).default,r=n(26389).default,i=n(33496).default,s=n(56690).default,c=n(89728).default,u=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),d=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&u(t,e,n);return d(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TokenLendingError=t.AnchorError=t.CustomProgramError=t.CusperUnknownError=t.initCusper=t.ErrorResolver=void 0;var f=n(80790),p=l(n(34138)),b=n(94900),m=function(){function e(t){s(this,e),this.resolveErrorFromCode=t}return c(e,[{key:"errorFromCode",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=null!=this.resolveErrorFromCode?this.resolveErrorFromCode(e):null;return null!=a||null!=(a=y.fromCode(e))||null!=(a=v.fromCode(e))?this.passPreparedError(a,null!==t&&void 0!==t?t:this.errorFromCode):n?(a=new h(e,"CusperUnknownError","cusper does not know this error"),this.passPreparedError(a,null!==t&&void 0!==t?t:this.errorFromCode)):void 0}},{key:"errorFromProgramLogs",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,f.errorCodeFromLogs)(e);return null==n?null:this.errorFromCode(n,this.errorFromProgramLogs,t)}},{key:"throwError",value:function(e){var t=null!=e.logs&&this.errorFromProgramLogs(e.logs,!0)||new h(-1,"Error created without logs and thus without error code");throw this.passPreparedError(t,this.throwError)}},{key:"passPreparedError",value:function(e,t){return null==e?null:("function"===typeof Error.captureStackTrace&&Error.captureStackTrace(e,t),e)}}]),e}();t.ErrorResolver=m,t.initCusper=function(e){return new m(e)};var h=function(e){o(n,e);var t=r(n);function n(e){var a;s(this,n);for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i2?r-2:0),c=2;c2?r-2:0),c=2;c2?r-2:0),c=2;c1&&void 0!==arguments[1]?arguments[1]:0,n=b.keyBeet.read(e,t);t+=b.keyBeet.byteSize;var o=c.publicKey.read(e,t);t+=c.publicKey.byteSize;var r=c.publicKey.read(e,t);t+=c.publicKey.byteSize;var i=p.dataBeet.deserialize(e,t),v=a(i,2),w=v[0];t=v[1];var k=s.bool.read(e,t);t+=s.bool.byteSize;var A=s.bool.read(e,t);t+=s.bool.byteSize;var x=s.coption(s.u8).toFixedFromData(e,t),I=x.read(e,t);t+=x.byteSize;var T=y(s.coption(m.tokenStandardBeet),e,t),S=a(T,3),C=S[0],E=S[1],R=S[2];t+=E;var M=R?[null,g,!0]:y(s.coption(d.collectionBeet),e,t),P=a(M,3),U=P[0],_=P[1],B=P[2];t+=_;var D=R||B?[null,g,!0]:y(s.coption(h.usesBeet),e,t),N=a(D,3),O=N[0],F=N[1],L=N[2];t+=F;var j=R||B||L?[null,g,!0]:y(s.coption(l.collectionDetailsBeet),e,t),H=a(j,3),G=H[0],z=H[1],K=H[2];t+=z;var W=R||B||L?[null,g,!0]:y(s.coption(f.programmableConfigBeet),e,t),Z=a(W,3),V=Z[0],q=Z[1],Q=Z[2];t+=q;var J=R||B||L||K||Q,Y={key:n,updateAuthority:o,mint:r,data:w,primarySaleHappened:k,isMutable:A,editionNonce:I,tokenStandard:J?null:C,collection:J?null:U,uses:J?null:O,collectionDetails:J?null:G,programmableConfig:J?null:V};return[u.Metadata.fromArgs(Y),t]}},21246:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.deserialize=void 0;var s=i(n(13168)),c=i(n(48514)),u=n(65590),d=n(19920),l=n(36050),f=n(36348);t.deserialize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=u.keyBeet.read(e,t);t+=u.keyBeet.byteSize;var o=s.u8.read(e,t);t+=s.u8.byteSize;var r=l.tokenStateBeet.read(e,t);t+=l.tokenStateBeet.byteSize;var i=(0,f.tryReadOption)(s.coption(s.u64),e,t),p=a(i,2),b=p[0];t+=p[1];var m=(0,f.tryReadOption)(s.coption(c.publicKey),e,t),h=a(m,2),g=h[0];t+=h[1];var y=(0,f.tryReadOption)(s.coption(l.tokenDelegateRoleBeet),e,t),v=a(y,2),w=v[0];t+=v[1];var k=(0,f.tryReadOption)(s.coption(c.publicKey),e,t),A=a(k,3),x=A[0];t+=A[1];var I={key:n,bump:o,state:r,ruleSetRevision:b,delegate:g,delegateRole:w,lockedTransfer:A[2]?null:x};return[d.TokenRecord.fromArgs(I),t]}},49468:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cusper=void 0;var a=n(31176),o=n(36050);t.cusper=(0,a.initCusper)(o.errorFromCode)},90014:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.collectionAuthorityRecordBeet=t.CollectionAuthorityRecord=void 0;var d=u(n(8594)),l=u(n(13168)),f=u(n(48514)),p=n(65590),b=function(){function e(t,n,a){r(this,e),this.key=t,this.bump=n,this.updateAuthority=a}return i(e,[{key:"serialize",value:function(){return t.collectionAuthorityRecordBeet.serialize(this)}},{key:"pretty",value:function(){return{key:"Key."+p.Key[this.key],bump:this.bump,updateAuthority:this.updateAuthority}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.bump,t.updateAuthority)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find CollectionAuthorityRecord account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return f.GpaBuilder.fromStruct(e,t.collectionAuthorityRecordBeet)}},{key:"deserialize",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.collectionAuthorityRecordBeet.deserialize(e,n)}},{key:"byteSize",value:function(n){var a=e.fromArgs(n);return t.collectionAuthorityRecordBeet.toFixedFromValue(a).byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o,r){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getMinimumBalanceForRentExemption(e.byteSize(n),r));case 1:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()}]),e}();t.CollectionAuthorityRecord=b,t.collectionAuthorityRecordBeet=new l.FixableBeetStruct([["key",p.keyBeet],["bump",l.u8],["updateAuthority",l.coption(f.publicKey)]],b.fromArgs,"CollectionAuthorityRecord")},126:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.editionBeet=t.Edition=void 0;var d=u(n(8594)),l=u(n(13168)),f=u(n(48514)),p=n(65590),b=function(){function e(t,n,a){r(this,e),this.key=t,this.parent=n,this.edition=a}return i(e,[{key:"serialize",value:function(){return t.editionBeet.serialize(this)}},{key:"pretty",value:function(){var e=this;return{key:"Key."+p.Key[this.key],parent:this.parent.toBase58(),edition:function(){var t=e.edition;if("function"===typeof t.toNumber)try{return t.toNumber()}catch(n){return t}return t}()}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.parent,t.edition)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find Edition account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return f.GpaBuilder.fromStruct(e,t.editionBeet)}},{key:"deserialize",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.editionBeet.deserialize(e,n)}},{key:"byteSize",get:function(){return t.editionBeet.byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.getMinimumBalanceForRentExemption(e.byteSize,o));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"hasCorrectByteSize",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.byteLength-n===e.byteSize}}]),e}();t.Edition=b,t.editionBeet=new l.BeetStruct([["key",p.keyBeet],["parent",f.publicKey],["edition",l.u64]],b.fromArgs,"Edition")},1464:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.editionMarkerBeet=t.EditionMarker=void 0;var d=u(n(13168)),l=u(n(8594)),f=u(n(48514)),p=n(65590),b=function(){function e(t,n){r(this,e),this.key=t,this.ledger=n}return i(e,[{key:"serialize",value:function(){return t.editionMarkerBeet.serialize(this)}},{key:"pretty",value:function(){return{key:"Key."+p.Key[this.key],ledger:this.ledger}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.ledger)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find EditionMarker account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new l.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return f.GpaBuilder.fromStruct(e,t.editionMarkerBeet)}},{key:"deserialize",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.editionMarkerBeet.deserialize(e,n)}},{key:"byteSize",get:function(){return t.editionMarkerBeet.byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.getMinimumBalanceForRentExemption(e.byteSize,o));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"hasCorrectByteSize",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.byteLength-n===e.byteSize}}]),e}();t.EditionMarker=b,t.editionMarkerBeet=new d.BeetStruct([["key",p.keyBeet],["ledger",d.uniformFixedSizeArray(d.u8,31)]],b.fromArgs,"EditionMarker")},93816:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.masterEditionV1Beet=t.MasterEditionV1=void 0;var d=u(n(13168)),l=u(n(8594)),f=u(n(48514)),p=n(65590),b=function(){function e(t,n,a,o,i){r(this,e),this.key=t,this.supply=n,this.maxSupply=a,this.printingMint=o,this.oneTimePrintingAuthorizationMint=i}return i(e,[{key:"serialize",value:function(){return t.masterEditionV1Beet.serialize(this)}},{key:"pretty",value:function(){var e=this;return{key:"Key."+p.Key[this.key],supply:function(){var t=e.supply;if("function"===typeof t.toNumber)try{return t.toNumber()}catch(n){return t}return t}(),maxSupply:this.maxSupply,printingMint:this.printingMint.toBase58(),oneTimePrintingAuthorizationMint:this.oneTimePrintingAuthorizationMint.toBase58()}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.supply,t.maxSupply,t.printingMint,t.oneTimePrintingAuthorizationMint)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find MasterEditionV1 account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new l.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return f.GpaBuilder.fromStruct(e,t.masterEditionV1Beet)}},{key:"deserialize",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.masterEditionV1Beet.deserialize(e,n)}},{key:"byteSize",value:function(n){var a=e.fromArgs(n);return t.masterEditionV1Beet.toFixedFromValue(a).byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o,r){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getMinimumBalanceForRentExemption(e.byteSize(n),r));case 1:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()}]),e}();t.MasterEditionV1=b,t.masterEditionV1Beet=new d.FixableBeetStruct([["key",p.keyBeet],["supply",d.u64],["maxSupply",d.coption(d.u64)],["printingMint",f.publicKey],["oneTimePrintingAuthorizationMint",f.publicKey]],b.fromArgs,"MasterEditionV1")},59982:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.masterEditionV2Beet=t.MasterEditionV2=void 0;var d=u(n(13168)),l=u(n(8594)),f=u(n(48514)),p=n(65590),b=function(){function e(t,n,a){r(this,e),this.key=t,this.supply=n,this.maxSupply=a}return i(e,[{key:"serialize",value:function(){return t.masterEditionV2Beet.serialize(this)}},{key:"pretty",value:function(){var e=this;return{key:"Key."+p.Key[this.key],supply:function(){var t=e.supply;if("function"===typeof t.toNumber)try{return t.toNumber()}catch(n){return t}return t}(),maxSupply:this.maxSupply}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.supply,t.maxSupply)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find MasterEditionV2 account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new l.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return f.GpaBuilder.fromStruct(e,t.masterEditionV2Beet)}},{key:"deserialize",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.masterEditionV2Beet.deserialize(e,n)}},{key:"byteSize",value:function(n){var a=e.fromArgs(n);return t.masterEditionV2Beet.toFixedFromValue(a).byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o,r){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getMinimumBalanceForRentExemption(e.byteSize(n),r));case 1:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()}]),e}();t.MasterEditionV2=b,t.masterEditionV2Beet=new d.FixableBeetStruct([["key",p.keyBeet],["supply",d.u64],["maxSupply",d.coption(d.u64)]],b.fromArgs,"MasterEditionV2")},94727:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.metadataBeet=t.Metadata=void 0;var d=u(n(8594)),l=u(n(13168)),f=u(n(48514)),p=n(65590),b=n(82927),m=n(6772),h=n(62354),g=n(89178),y=n(68474),v=n(22525),w=u(n(53105)),k=function(){function e(t,n,a,o,i,s,c,u,d,l,f,p){r(this,e),this.key=t,this.updateAuthority=n,this.mint=a,this.data=o,this.primarySaleHappened=i,this.isMutable=s,this.editionNonce=c,this.tokenStandard=u,this.collection=d,this.uses=l,this.collectionDetails=f,this.programmableConfig=p}return i(e,[{key:"serialize",value:function(){return x(this)}},{key:"pretty",value:function(){return{key:"Key."+p.Key[this.key],updateAuthority:this.updateAuthority.toBase58(),mint:this.mint.toBase58(),data:this.data,primarySaleHappened:this.primarySaleHappened,isMutable:this.isMutable,editionNonce:this.editionNonce,tokenStandard:this.tokenStandard,collection:this.collection,uses:this.uses,collectionDetails:this.collectionDetails,programmableConfig:this.programmableConfig}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.updateAuthority,t.mint,t.data,t.primarySaleHappened,t.isMutable,t.editionNonce,t.tokenStandard,t.collection,t.uses,t.collectionDetails,t.programmableConfig)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find Metadata account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return f.GpaBuilder.fromStruct(e,t.metadataBeet)}},{key:"deserialize",value:function(e){return I(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"byteSize",value:function(n){var a=e.fromArgs(n);return t.metadataBeet.toFixedFromValue(a).byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o,r){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getMinimumBalanceForRentExemption(e.byteSize(n),r));case 1:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()}]),e}();t.Metadata=k,t.metadataBeet=new l.FixableBeetStruct([["key",p.keyBeet],["updateAuthority",f.publicKey],["mint",f.publicKey],["data",b.dataBeet],["primarySaleHappened",l.bool],["isMutable",l.bool],["editionNonce",l.coption(l.u8)],["tokenStandard",l.coption(m.tokenStandardBeet)],["collection",l.coption(h.collectionBeet)],["uses",l.coption(g.usesBeet)],["collectionDetails",l.coption(y.collectionDetailsBeet)],["programmableConfig",l.coption(v.programmableConfigBeet)]],k.fromArgs,"Metadata");var A=w,x="function"===typeof A.serialize?A.serialize.bind(A):t.metadataBeet.serialize.bind(t.metadataBeet),I="function"===typeof A.deserialize?A.deserialize.bind(A):t.metadataBeet.deserialize.bind(t.metadataBeet)},34244:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.metadataDelegateRecordBeet=t.MetadataDelegateRecord=void 0;var d=u(n(8594)),l=u(n(13168)),f=u(n(48514)),p=n(65590),b=function(){function e(t,n,a,o,i){r(this,e),this.key=t,this.bump=n,this.mint=a,this.delegate=o,this.updateAuthority=i}return i(e,[{key:"serialize",value:function(){return t.metadataDelegateRecordBeet.serialize(this)}},{key:"pretty",value:function(){return{key:"Key."+p.Key[this.key],bump:this.bump,mint:this.mint.toBase58(),delegate:this.delegate.toBase58(),updateAuthority:this.updateAuthority.toBase58()}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.bump,t.mint,t.delegate,t.updateAuthority)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find MetadataDelegateRecord account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return f.GpaBuilder.fromStruct(e,t.metadataDelegateRecordBeet)}},{key:"deserialize",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.metadataDelegateRecordBeet.deserialize(e,n)}},{key:"byteSize",get:function(){return t.metadataDelegateRecordBeet.byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.getMinimumBalanceForRentExemption(e.byteSize,o));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"hasCorrectByteSize",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.byteLength-n===e.byteSize}}]),e}();t.MetadataDelegateRecord=b,t.metadataDelegateRecordBeet=new l.BeetStruct([["key",p.keyBeet],["bump",l.u8],["mint",f.publicKey],["delegate",f.publicKey],["updateAuthority",f.publicKey]],b.fromArgs,"MetadataDelegateRecord")},35158:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.reservationListV1Beet=t.ReservationListV1=void 0;var d=u(n(8594)),l=u(n(13168)),f=u(n(48514)),p=n(65590),b=n(452),m=function(){function e(t,n,a,o){r(this,e),this.key=t,this.masterEdition=n,this.supplySnapshot=a,this.reservations=o}return i(e,[{key:"serialize",value:function(){return t.reservationListV1Beet.serialize(this)}},{key:"pretty",value:function(){return{key:"Key."+p.Key[this.key],masterEdition:this.masterEdition.toBase58(),supplySnapshot:this.supplySnapshot,reservations:this.reservations}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.masterEdition,t.supplySnapshot,t.reservations)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find ReservationListV1 account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return f.GpaBuilder.fromStruct(e,t.reservationListV1Beet)}},{key:"deserialize",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.reservationListV1Beet.deserialize(e,n)}},{key:"byteSize",value:function(n){var a=e.fromArgs(n);return t.reservationListV1Beet.toFixedFromValue(a).byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o,r){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getMinimumBalanceForRentExemption(e.byteSize(n),r));case 1:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()}]),e}();t.ReservationListV1=m,t.reservationListV1Beet=new l.FixableBeetStruct([["key",p.keyBeet],["masterEdition",f.publicKey],["supplySnapshot",l.coption(l.u64)],["reservations",l.array(b.reservationV1Beet)]],m.fromArgs,"ReservationListV1")},26239:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.reservationListV2Beet=t.ReservationListV2=void 0;var d=u(n(8594)),l=u(n(13168)),f=u(n(48514)),p=n(65590),b=n(82725),m=function(){function e(t,n,a,o,i,s){r(this,e),this.key=t,this.masterEdition=n,this.supplySnapshot=a,this.reservations=o,this.totalReservationSpots=i,this.currentReservationSpots=s}return i(e,[{key:"serialize",value:function(){return t.reservationListV2Beet.serialize(this)}},{key:"pretty",value:function(){var e=this;return{key:"Key."+p.Key[this.key],masterEdition:this.masterEdition.toBase58(),supplySnapshot:this.supplySnapshot,reservations:this.reservations,totalReservationSpots:function(){var t=e.totalReservationSpots;if("function"===typeof t.toNumber)try{return t.toNumber()}catch(n){return t}return t}(),currentReservationSpots:function(){var t=e.currentReservationSpots;if("function"===typeof t.toNumber)try{return t.toNumber()}catch(n){return t}return t}()}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.masterEdition,t.supplySnapshot,t.reservations,t.totalReservationSpots,t.currentReservationSpots)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find ReservationListV2 account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return f.GpaBuilder.fromStruct(e,t.reservationListV2Beet)}},{key:"deserialize",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.reservationListV2Beet.deserialize(e,n)}},{key:"byteSize",value:function(n){var a=e.fromArgs(n);return t.reservationListV2Beet.toFixedFromValue(a).byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o,r){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getMinimumBalanceForRentExemption(e.byteSize(n),r));case 1:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()}]),e}();t.ReservationListV2=m,t.reservationListV2Beet=new l.FixableBeetStruct([["key",p.keyBeet],["masterEdition",f.publicKey],["supplySnapshot",l.coption(l.u64)],["reservations",l.array(b.reservationBeet)],["totalReservationSpots",l.u64],["currentReservationSpots",l.u64]],m.fromArgs,"ReservationListV2")},70749:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.tokenOwnedEscrowBeet=t.TokenOwnedEscrow=void 0;var d=u(n(8594)),l=u(n(48514)),f=u(n(13168)),p=n(65590),b=n(83568),m=function(){function e(t,n,a,o){r(this,e),this.key=t,this.baseToken=n,this.authority=a,this.bump=o}return i(e,[{key:"serialize",value:function(){return t.tokenOwnedEscrowBeet.serialize(this)}},{key:"pretty",value:function(){return{key:"Key."+p.Key[this.key],baseToken:this.baseToken.toBase58(),authority:this.authority.__kind,bump:this.bump}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.baseToken,t.authority,t.bump)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find TokenOwnedEscrow account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return l.GpaBuilder.fromStruct(e,t.tokenOwnedEscrowBeet)}},{key:"deserialize",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.tokenOwnedEscrowBeet.deserialize(e,n)}},{key:"byteSize",value:function(n){var a=e.fromArgs(n);return t.tokenOwnedEscrowBeet.toFixedFromValue(a).byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o,r){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getMinimumBalanceForRentExemption(e.byteSize(n),r));case 1:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()}]),e}();t.TokenOwnedEscrow=m,t.tokenOwnedEscrowBeet=new f.FixableBeetStruct([["key",p.keyBeet],["baseToken",l.publicKey],["authority",b.escrowAuthorityBeet],["bump",f.u8]],m.fromArgs,"TokenOwnedEscrow")},19920:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.tokenRecordBeet=t.TokenRecord=void 0;var d=u(n(13168)),l=u(n(8594)),f=u(n(48514)),p=n(65590),b=n(10785),m=n(22104),h=u(n(21246)),g=function(){function e(t,n,a,o,i,s,c){r(this,e),this.key=t,this.bump=n,this.state=a,this.ruleSetRevision=o,this.delegate=i,this.delegateRole=s,this.lockedTransfer=c}return i(e,[{key:"serialize",value:function(){return v(this)}},{key:"pretty",value:function(){return{key:"Key."+p.Key[this.key],bump:this.bump,state:"TokenState."+b.TokenState[this.state],ruleSetRevision:this.ruleSetRevision,delegate:this.delegate,delegateRole:this.delegateRole,lockedTransfer:this.lockedTransfer}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.bump,t.state,t.ruleSetRevision,t.delegate,t.delegateRole,t.lockedTransfer)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find TokenRecord account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new l.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return f.GpaBuilder.fromStruct(e,t.tokenRecordBeet)}},{key:"deserialize",value:function(e){return w(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"byteSize",value:function(n){var a=e.fromArgs(n);return t.tokenRecordBeet.toFixedFromValue(a).byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o,r){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getMinimumBalanceForRentExemption(e.byteSize(n),r));case 1:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()}]),e}();t.TokenRecord=g,t.tokenRecordBeet=new d.FixableBeetStruct([["key",p.keyBeet],["bump",d.u8],["state",b.tokenStateBeet],["ruleSetRevision",d.coption(d.u64)],["delegate",d.coption(f.publicKey)],["delegateRole",d.coption(m.tokenDelegateRoleBeet)],["lockedTransfer",d.coption(f.publicKey)]],g.fromArgs,"TokenRecord");var y=h,v="function"===typeof y.serialize?y.serialize.bind(y):t.tokenRecordBeet.serialize.bind(t.tokenRecordBeet),w="function"===typeof y.deserialize?y.deserialize.bind(y):t.tokenRecordBeet.deserialize.bind(t.tokenRecordBeet)},30805:function(e,t,n){"use strict";var a=n(17061).default,o=n(17156).default,r=n(56690).default,i=n(89728).default,s=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return c(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useAuthorityRecordBeet=t.UseAuthorityRecord=void 0;var d=u(n(13168)),l=u(n(8594)),f=u(n(48514)),p=n(65590),b=function(){function e(t,n,a){r(this,e),this.key=t,this.allowedUses=n,this.bump=a}return i(e,[{key:"serialize",value:function(){return t.useAuthorityRecordBeet.serialize(this)}},{key:"pretty",value:function(){var e=this;return{key:"Key."+p.Key[this.key],allowedUses:function(){var t=e.allowedUses;if("function"===typeof t.toNumber)try{return t.toNumber()}catch(n){return t}return t}(),bump:this.bump}}}],[{key:"fromArgs",value:function(t){return new e(t.key,t.allowedUses,t.bump)}},{key:"fromAccountInfo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.deserialize(t.data,n)}},{key:"fromAccountAddress",value:function(){var t=o(a().mark((function t(n,o,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(o,r);case 2:if(null!=(i=t.sent)){t.next=5;break}throw new Error("Unable to find UseAuthorityRecord account at ".concat(o));case 5:return t.abrupt("return",e.fromAccountInfo(i,0)[0]);case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"gpaBuilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new l.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");return f.GpaBuilder.fromStruct(e,t.useAuthorityRecordBeet)}},{key:"deserialize",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.useAuthorityRecordBeet.deserialize(e,n)}},{key:"byteSize",get:function(){return t.useAuthorityRecordBeet.byteSize}},{key:"getMinimumBalanceForRentExemption",value:function(){var t=o(a().mark((function t(n,o){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.getMinimumBalanceForRentExemption(e.byteSize,o));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"hasCorrectByteSize",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.byteLength-n===e.byteSize}}]),e}();t.UseAuthorityRecord=b,t.useAuthorityRecordBeet=new d.BeetStruct([["key",p.keyBeet],["allowedUses",d.u64],["bump",d.u8]],b.fromArgs,"UseAuthorityRecord")},55967:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.accountProviders=void 0,o(n(90014),t),o(n(126),t),o(n(1464),t),o(n(93816),t),o(n(59982),t),o(n(94727),t),o(n(34244),t),o(n(35158),t),o(n(26239),t),o(n(70749),t),o(n(19920),t),o(n(30805),t);var r=n(90014),i=n(34244),s=n(126),c=n(1464),u=n(70749),d=n(59982),l=n(93816),f=n(94727),p=n(19920),b=n(26239),m=n(35158),h=n(30805);t.accountProviders={CollectionAuthorityRecord:r.CollectionAuthorityRecord,MetadataDelegateRecord:i.MetadataDelegateRecord,Edition:s.Edition,EditionMarker:c.EditionMarker,TokenOwnedEscrow:u.TokenOwnedEscrow,MasterEditionV2:d.MasterEditionV2,MasterEditionV1:l.MasterEditionV1,Metadata:f.Metadata,TokenRecord:p.TokenRecord,ReservationListV2:b.ReservationListV2,ReservationListV1:m.ReservationListV1,UseAuthorityRecord:h.UseAuthorityRecord}},11710:function(e,t,n){"use strict";var a=n(89728).default,o=n(56690).default,r=n(66115).default,i=n(61655).default,s=n(26389).default,c=n(33496).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ReservationAlreadyMadeError=t.ReservationNotSetError=t.ReservationDoesNotExistError=t.ReservationExistsError=t.ShareTotalMustBe100Error=t.NoBalanceInAccountForAuthorizationError=t.OwnerMismatchError=t.PrimarySaleCanOnlyBeFlippedToTrueError=t.InvalidBasisPointsError=t.CreatorNotFoundError=t.NoCreatorsPresentOnMetadataError=t.MustBeOneOfCreatorsError=t.CreatorsMustBeAtleastOneError=t.CreatorsTooLongError=t.DisabledError=t.AuthorizationTokenAccountOwnerMismatchError=t.PrintingMintAuthorizationAccountMismatchError=t.NotEnoughTokensError=t.TokenAccountMintMismatchV2Error=t.TokenAccountMintMismatchError=t.OneTimePrintingAuthMintMismatchError=t.PrintingMintMismatchError=t.DerivedKeyInvalidError=t.TokenAccountOneTimeAuthMintMismatchError=t.TokenBurnFailedError=t.EditionMintDecimalsShouldBeZeroError=t.OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError=t.PrintingMintDecimalsShouldBeZeroError=t.EditionAlreadyMintedError=t.DestinationMintMismatchError=t.MasterRecordMismatchError=t.TokenMintToFailedError=t.MaxEditionsMintedAlreadyError=t.EditionsMustHaveExactlyOneTokenError=t.MintMismatchError=t.UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError=t.UriTooLongError=t.SymbolTooLongError=t.NameTooLongError=t.InvalidMintAuthorityError=t.NotMintAuthorityError=t.UpdateAuthorityIsNotSignerError=t.UpdateAuthorityIncorrectError=t.InvalidEditionKeyError=t.InvalidMetadataKeyError=t.UninitializedError=t.AlreadyInitializedError=t.NotRentExemptError=t.InstructionPackErrorError=t.InstructionUnpackErrorError=void 0,t.RevokeCollectionAuthoritySignerIncorrectError=t.InvalidUserError=t.EditionOverrideCannotBeZeroError=t.NotAllowedToChangeSellerFeeBasisPointsError=t.CannotWipeVerifiedCreatorsError=t.CannotRemoveVerifiedCreatorError=t.CannotAdjustVerifiedCreatorError=t.InvalidDelegateError=t.InvalidFreezeAuthorityError=t.InvalidCollectionAuthorityRecordError=t.InvalidUseAuthorityRecordError=t.CollectionAuthorityDoesNotExistError=t.CollectionAuthorityRecordAlreadyExistsError=t.NotEnoughUsesError=t.UnusableError=t.UseAuthorityRecordAlreadyRevokedError=t.UseAuthorityRecordAlreadyExistsError=t.CollectionMustBeAUniqueMasterEditionError=t.InvalidCollectionUpdateAuthorityError=t.CollectionNotFoundError=t.CannotChangeUsesAfterFirstUseError=t.CannotChangeUseMethodAfterFirstUseError=t.InvalidUseMethodError=t.MustBeBurnedError=t.RemovedError=t.CollectionCannotBeVerifiedInThisInstructionError=t.IsMutableCanOnlyBeFlippedToFalseError=t.ReservationArrayShouldBeSizeOneError=t.InvalidEditionIndexError=t.OneTimeAuthMintSupplyMustBeZeroForConversionError=t.PrintingMintSupplyMustBeZeroForConversionError=t.InvalidOwnerError=t.InvalidOperationError=t.TriedToReplaceAnExistingReservationError=t.ReservationNotCompleteError=t.BeyondAlottedAddressSizeError=t.DataTypeMismatchError=t.InvalidTokenProgramError=t.ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError=t.DuplicateCreatorAddressError=t.DataIsImmutableError=t.PrintingWouldBreachMaximumSupplyError=t.IncorrectOwnerError=t.SpotMismatchError=t.CannotUnverifyAnotherCreatorError=t.CannotVerifyAnotherCreatorError=t.AddressNotInReservationError=t.ReservationBreachesMaximumSupplyError=t.NumericalOverflowErrorError=t.BeyondMaxAddressSizeError=void 0,t.MissingSplTokenProgramError=t.MissingTokenAccountError=t.OnlySaleDelegateCanTransferError=t.InvalidSystemWalletError=t.FeatureNotSupportedError=t.MissingArgumentInBuilderError=t.MissingAccountInBuilderError=t.DelegateNotFoundError=t.DelegateAlreadyExistsError=t.InvalidProgrammableConfigError=t.MissingProgrammableConfigError=t.MissingAuthorizationRulesError=t.InvalidAuthorizationRulesError=t.InvalidMintForTokenStandardError=t.InvalidTokenStandardError=t.MintIsNotSignerError=t.EscrowParentHasDelegateError=t.InvalidBubblegumSignerError=t.InvalidCollectionSizeChangeError=t.NoFreezeAuthoritySetError=t.BorshSerializationErrorError=t.InsufficientTokensError=t.MustBeNonFungibleError=t.InvalidSystemProgramError=t.MustBeEscrowAuthorityError=t.InvalidEscrowBumpSeedError=t.MustUnverifyError=t.EditionNumberGreaterThanMaxSupplyError=t.PrintEditionDoesNotMatchMasterEditionError=t.ReservationListDeprecatedError=t.InvalidEditionMarkerError=t.InvalidPrintEditionError=t.InvalidMasterEditionError=t.NotAPrintEditionError=t.AlreadyUnverifiedError=t.AlreadyVerifiedError=t.CollectionMasterEditionAccountInvalidError=t.CannotUpdateVerifiedCollectionError=t.BorshDeserializationErrorError=t.MasterEditionHasPrintsError=t.NotAMasterEditionError=t.MissingEditionAccountError=t.CouldNotDetermineTokenStandardError=t.NotACollectionParentError=t.NotVerifiedMemberOfCollectionError=t.NotAMemberOfCollectionError=t.MissingCollectionMetadataError=t.SizedCollectionError=t.UnsizedCollectionError=t.TokenCloseFailedError=void 0,t.errorFromName=t.errorFromCode=t.InvalidTokenRecordError=t.MissingCollectionMasterEditionError=t.MissingCollectionMintError=t.InsufficientTokenBalanceError=t.InvalidUpdateArgsError=t.InvalidParentAccountsError=t.InvalidInstructionsSysvarError=t.InvalidAssociatedTokenAccountProgramError=t.MissingEditionError=t.CannotBurnWithDelegateError=t.MissingEditionMarkerAccountError=t.MissingMasterEditionTokenAccountError=t.MissingMasterEditionMintAccountError=t.InvalidAmountError=t.CannotUpdateAssetWithDelegateError=t.DataIncrementLimitExceededError=t.InvalidLockedTransferAddressError=t.MissingLockedTransferAddressError=t.InvalidDelegateArgsError=t.AmountMustBeGreaterThanZeroError=t.MissingMasterEditionAccountError=t.MissingPrintSupplyError=t.InvalidDelegateRoleError=t.IncorrectTokenStateError=t.InvalidMasterEditionAccountLengthError=t.MissingTokenOwnerAccountError=t.DataIsEmptyOrZeroedError=t.MintSupplyMustBeZeroError=t.MissingTokenRecordError=t.InvalidAuthorityTypeError=t.MissingDelegateRoleError=t.UnlockedTokenError=t.LockedTokenError=t.KeyMismatchError=t.InstructionNotSupportedError=t.InvalidTransferAuthorityError=t.InvalidDelegateRoleForTransferError=t.MissingAuthorizationRulesProgramError=void 0;var u=new Map,d=new Map,l=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Failed to unpack instruction data")).code=0,e.name="InstructionUnpackError","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InstructionUnpackErrorError=l,u.set(0,(function(){return new l})),d.set("InstructionUnpackError",(function(){return new l}));var f=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Failed to pack instruction data")).code=1,e.name="InstructionPackError","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InstructionPackErrorError=f,u.set(1,(function(){return new f})),d.set("InstructionPackError",(function(){return new f}));var p=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Lamport balance below rent-exempt threshold")).code=2,e.name="NotRentExempt","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NotRentExemptError=p,u.set(2,(function(){return new p})),d.set("NotRentExempt",(function(){return new p}));var b=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Already initialized")).code=3,e.name="AlreadyInitialized","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.AlreadyInitializedError=b,u.set(3,(function(){return new b})),d.set("AlreadyInitialized",(function(){return new b}));var m=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Uninitialized")).code=4,e.name="Uninitialized","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.UninitializedError=m,u.set(4,(function(){return new m})),d.set("Uninitialized",(function(){return new m}));var h=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this," Metadata's key must match seed of ['metadata', program id, mint] provided")).code=5,e.name="InvalidMetadataKey","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidMetadataKeyError=h,u.set(5,(function(){return new h})),d.set("InvalidMetadataKey",(function(){return new h}));var g=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Edition's key must match seed of ['metadata', program id, name, 'edition'] provided")).code=6,e.name="InvalidEditionKey","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidEditionKeyError=g,u.set(6,(function(){return new g})),d.set("InvalidEditionKey",(function(){return new g}));var y=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Update Authority given does not match")).code=7,e.name="UpdateAuthorityIncorrect","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.UpdateAuthorityIncorrectError=y,u.set(7,(function(){return new y})),d.set("UpdateAuthorityIncorrect",(function(){return new y}));var v=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Update Authority needs to be signer to update metadata")).code=8,e.name="UpdateAuthorityIsNotSigner","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.UpdateAuthorityIsNotSignerError=v,u.set(8,(function(){return new v})),d.set("UpdateAuthorityIsNotSigner",(function(){return new v}));var w=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"You must be the mint authority and signer on this transaction")).code=9,e.name="NotMintAuthority","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NotMintAuthorityError=w,u.set(9,(function(){return new w})),d.set("NotMintAuthority",(function(){return new w}));var k=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Mint authority provided does not match the authority on the mint")).code=10,e.name="InvalidMintAuthority","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidMintAuthorityError=k,u.set(10,(function(){return new k})),d.set("InvalidMintAuthority",(function(){return new k}));var A=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Name too long")).code=11,e.name="NameTooLong","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NameTooLongError=A,u.set(11,(function(){return new A})),d.set("NameTooLong",(function(){return new A}));var x=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Symbol too long")).code=12,e.name="SymbolTooLong","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.SymbolTooLongError=x,u.set(12,(function(){return new x})),d.set("SymbolTooLong",(function(){return new x}));var I=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"URI too long")).code=13,e.name="UriTooLong","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.UriTooLongError=I,u.set(13,(function(){return new I})),d.set("UriTooLong",(function(){return new I}));var T=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Update authority must be equivalent to the metadata's authority and also signer of this transaction")).code=14,e.name="UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.UpdateAuthorityMustBeEqualToMetadataAuthorityAndSignerError=T,u.set(14,(function(){return new T})),d.set("UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner",(function(){return new T}));var S=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Mint given does not match mint on Metadata")).code=15,e.name="MintMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MintMismatchError=S,u.set(15,(function(){return new S})),d.set("MintMismatch",(function(){return new S}));var C=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Editions must have exactly one token")).code=16,e.name="EditionsMustHaveExactlyOneToken","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.EditionsMustHaveExactlyOneTokenError=C,u.set(16,(function(){return new C})),d.set("EditionsMustHaveExactlyOneToken",(function(){return new C}));var E=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Maximum editions printed already")).code=17,e.name="MaxEditionsMintedAlready","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MaxEditionsMintedAlreadyError=E,u.set(17,(function(){return new E})),d.set("MaxEditionsMintedAlready",(function(){return new E}));var R=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Token mint to failed")).code=18,e.name="TokenMintToFailed","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.TokenMintToFailedError=R,u.set(18,(function(){return new R})),d.set("TokenMintToFailed",(function(){return new R}));var M=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The master edition record passed must match the master record on the edition given")).code=19,e.name="MasterRecordMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MasterRecordMismatchError=M,u.set(19,(function(){return new M})),d.set("MasterRecordMismatch",(function(){return new M}));var P=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The destination account does not have the right mint")).code=20,e.name="DestinationMintMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.DestinationMintMismatchError=P,u.set(20,(function(){return new P})),d.set("DestinationMintMismatch",(function(){return new P}));var U=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"An edition can only mint one of its kind!")).code=21,e.name="EditionAlreadyMinted","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.EditionAlreadyMintedError=U,u.set(21,(function(){return new U})),d.set("EditionAlreadyMinted",(function(){return new U}));var _=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Printing mint decimals should be zero")).code=22,e.name="PrintingMintDecimalsShouldBeZero","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.PrintingMintDecimalsShouldBeZeroError=_,u.set(22,(function(){return new _})),d.set("PrintingMintDecimalsShouldBeZero",(function(){return new _}));var B=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"OneTimePrintingAuthorization mint decimals should be zero")).code=23,e.name="OneTimePrintingAuthorizationMintDecimalsShouldBeZero","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.OneTimePrintingAuthorizationMintDecimalsShouldBeZeroError=B,u.set(23,(function(){return new B})),d.set("OneTimePrintingAuthorizationMintDecimalsShouldBeZero",(function(){return new B}));var D=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"EditionMintDecimalsShouldBeZero")).code=24,e.name="EditionMintDecimalsShouldBeZero","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.EditionMintDecimalsShouldBeZeroError=D,u.set(24,(function(){return new D})),d.set("EditionMintDecimalsShouldBeZero",(function(){return new D}));var N=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Token burn failed")).code=25,e.name="TokenBurnFailed","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.TokenBurnFailedError=N,u.set(25,(function(){return new N})),d.set("TokenBurnFailed",(function(){return new N}));var O=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The One Time authorization mint does not match that on the token account!")).code=26,e.name="TokenAccountOneTimeAuthMintMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.TokenAccountOneTimeAuthMintMismatchError=O,u.set(26,(function(){return new O})),d.set("TokenAccountOneTimeAuthMintMismatch",(function(){return new O}));var F=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Derived key invalid")).code=27,e.name="DerivedKeyInvalid","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.DerivedKeyInvalidError=F,u.set(27,(function(){return new F})),d.set("DerivedKeyInvalid",(function(){return new F}));var L=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The Printing mint does not match that on the master edition!")).code=28,e.name="PrintingMintMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.PrintingMintMismatchError=L,u.set(28,(function(){return new L})),d.set("PrintingMintMismatch",(function(){return new L}));var j=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The One Time Printing Auth mint does not match that on the master edition!")).code=29,e.name="OneTimePrintingAuthMintMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.OneTimePrintingAuthMintMismatchError=j,u.set(29,(function(){return new j})),d.set("OneTimePrintingAuthMintMismatch",(function(){return new j}));var H=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The mint of the token account does not match the Printing mint!")).code=30,e.name="TokenAccountMintMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.TokenAccountMintMismatchError=H,u.set(30,(function(){return new H})),d.set("TokenAccountMintMismatch",(function(){return new H}));var G=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The mint of the token account does not match the master metadata mint!")).code=31,e.name="TokenAccountMintMismatchV2","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.TokenAccountMintMismatchV2Error=G,u.set(31,(function(){return new G})),d.set("TokenAccountMintMismatchV2",(function(){return new G}));var z=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Not enough tokens to mint a limited edition")).code=32,e.name="NotEnoughTokens","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NotEnoughTokensError=z,u.set(32,(function(){return new z})),d.set("NotEnoughTokens",(function(){return new z}));var K=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The mint on your authorization token holding account does not match your Printing mint!")).code=33,e.name="PrintingMintAuthorizationAccountMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.PrintingMintAuthorizationAccountMismatchError=K,u.set(33,(function(){return new K})),d.set("PrintingMintAuthorizationAccountMismatch",(function(){return new K}));var W=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The authorization token account has a different owner than the update authority for the master edition!")).code=34,e.name="AuthorizationTokenAccountOwnerMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.AuthorizationTokenAccountOwnerMismatchError=W,u.set(34,(function(){return new W})),d.set("AuthorizationTokenAccountOwnerMismatch",(function(){return new W}));var Z=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This feature is currently disabled.")).code=35,e.name="Disabled","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.DisabledError=Z,u.set(35,(function(){return new Z})),d.set("Disabled",(function(){return new Z}));var V=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Creators list too long")).code=36,e.name="CreatorsTooLong","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CreatorsTooLongError=V,u.set(36,(function(){return new V})),d.set("CreatorsTooLong",(function(){return new V}));var q=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Creators must be at least one if set")).code=37,e.name="CreatorsMustBeAtleastOne","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CreatorsMustBeAtleastOneError=q,u.set(37,(function(){return new q})),d.set("CreatorsMustBeAtleastOne",(function(){return new q}));var Q=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"If using a creators array, you must be one of the creators listed")).code=38,e.name="MustBeOneOfCreators","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MustBeOneOfCreatorsError=Q,u.set(38,(function(){return new Q})),d.set("MustBeOneOfCreators",(function(){return new Q}));var J=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This metadata does not have creators")).code=39,e.name="NoCreatorsPresentOnMetadata","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NoCreatorsPresentOnMetadataError=J,u.set(39,(function(){return new J})),d.set("NoCreatorsPresentOnMetadata",(function(){return new J}));var Y=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This creator address was not found")).code=40,e.name="CreatorNotFound","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CreatorNotFoundError=Y,u.set(40,(function(){return new Y})),d.set("CreatorNotFound",(function(){return new Y}));var X=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Basis points cannot be more than 10000")).code=41,e.name="InvalidBasisPoints","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidBasisPointsError=X,u.set(41,(function(){return new X})),d.set("InvalidBasisPoints",(function(){return new X}));var $=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Primary sale can only be flipped to true and is immutable")).code=42,e.name="PrimarySaleCanOnlyBeFlippedToTrue","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.PrimarySaleCanOnlyBeFlippedToTrueError=$,u.set(42,(function(){return new $})),d.set("PrimarySaleCanOnlyBeFlippedToTrue",(function(){return new $}));var ee=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Owner does not match that on the account given")).code=43,e.name="OwnerMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.OwnerMismatchError=ee,u.set(43,(function(){return new ee})),d.set("OwnerMismatch",(function(){return new ee}));var te=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This account has no tokens to be used for authorization")).code=44,e.name="NoBalanceInAccountForAuthorization","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NoBalanceInAccountForAuthorizationError=te,u.set(44,(function(){return new te})),d.set("NoBalanceInAccountForAuthorization",(function(){return new te}));var ne=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Share total must equal 100 for creator array")).code=45,e.name="ShareTotalMustBe100","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.ShareTotalMustBe100Error=ne,u.set(45,(function(){return new ne})),d.set("ShareTotalMustBe100",(function(){return new ne}));var ae=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This reservation list already exists!")).code=46,e.name="ReservationExists","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.ReservationExistsError=ae,u.set(46,(function(){return new ae})),d.set("ReservationExists",(function(){return new ae}));var oe=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This reservation list does not exist!")).code=47,e.name="ReservationDoesNotExist","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.ReservationDoesNotExistError=oe,u.set(47,(function(){return new oe})),d.set("ReservationDoesNotExist",(function(){return new oe}));var re=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This reservation list exists but was never set with reservations")).code=48,e.name="ReservationNotSet","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.ReservationNotSetError=re,u.set(48,(function(){return new re})),d.set("ReservationNotSet",(function(){return new re}));var ie=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This reservation list has already been set!")).code=49,e.name="ReservationAlreadyMade","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.ReservationAlreadyMadeError=ie,u.set(49,(function(){return new ie})),d.set("ReservationAlreadyMade",(function(){return new ie}));var se=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Provided more addresses than max allowed in single reservation")).code=50,e.name="BeyondMaxAddressSize","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.BeyondMaxAddressSizeError=se,u.set(50,(function(){return new se})),d.set("BeyondMaxAddressSize",(function(){return new se}));var ce=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"NumericalOverflowError")).code=51,e.name="NumericalOverflowError","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NumericalOverflowErrorError=ce,u.set(51,(function(){return new ce})),d.set("NumericalOverflowError",(function(){return new ce}));var ue=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This reservation would go beyond the maximum supply of the master edition!")).code=52,e.name="ReservationBreachesMaximumSupply","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.ReservationBreachesMaximumSupplyError=ue,u.set(52,(function(){return new ue})),d.set("ReservationBreachesMaximumSupply",(function(){return new ue}));var de=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Address not in reservation!")).code=53,e.name="AddressNotInReservation","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.AddressNotInReservationError=de,u.set(53,(function(){return new de})),d.set("AddressNotInReservation",(function(){return new de}));var le=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"You cannot unilaterally verify another creator, they must sign")).code=54,e.name="CannotVerifyAnotherCreator","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CannotVerifyAnotherCreatorError=le,u.set(54,(function(){return new le})),d.set("CannotVerifyAnotherCreator",(function(){return new le}));var fe=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"You cannot unilaterally unverify another creator")).code=55,e.name="CannotUnverifyAnotherCreator","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CannotUnverifyAnotherCreatorError=fe,u.set(55,(function(){return new fe})),d.set("CannotUnverifyAnotherCreator",(function(){return new fe}));var pe=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"In initial reservation setting, spots remaining should equal total spots")).code=56,e.name="SpotMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.SpotMismatchError=pe,u.set(56,(function(){return new pe})),d.set("SpotMismatch",(function(){return new pe}));var be=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Incorrect account owner")).code=57,e.name="IncorrectOwner","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.IncorrectOwnerError=be,u.set(57,(function(){return new be})),d.set("IncorrectOwner",(function(){return new be}));var me=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"printing these tokens would breach the maximum supply limit of the master edition")).code=58,e.name="PrintingWouldBreachMaximumSupply","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.PrintingWouldBreachMaximumSupplyError=me,u.set(58,(function(){return new me})),d.set("PrintingWouldBreachMaximumSupply",(function(){return new me}));var he=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Data is immutable")).code=59,e.name="DataIsImmutable","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.DataIsImmutableError=he,u.set(59,(function(){return new he})),d.set("DataIsImmutable",(function(){return new he}));var ge=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"No duplicate creator addresses")).code=60,e.name="DuplicateCreatorAddress","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.DuplicateCreatorAddressError=ge,u.set(60,(function(){return new ge})),d.set("DuplicateCreatorAddress",(function(){return new ge}));var ye=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Reservation spots remaining should match total spots when first being created")).code=61,e.name="ReservationSpotsRemainingShouldMatchTotalSpotsAtStart","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.ReservationSpotsRemainingShouldMatchTotalSpotsAtStartError=ye,u.set(61,(function(){return new ye})),d.set("ReservationSpotsRemainingShouldMatchTotalSpotsAtStart",(function(){return new ye}));var ve=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid token program")).code=62,e.name="InvalidTokenProgram","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidTokenProgramError=ve,u.set(62,(function(){return new ve})),d.set("InvalidTokenProgram",(function(){return new ve}));var we=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Data type mismatch")).code=63,e.name="DataTypeMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.DataTypeMismatchError=we,u.set(63,(function(){return new we})),d.set("DataTypeMismatch",(function(){return new we}));var ke=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Beyond alotted address size in reservation!")).code=64,e.name="BeyondAlottedAddressSize","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.BeyondAlottedAddressSizeError=ke,u.set(64,(function(){return new ke})),d.set("BeyondAlottedAddressSize",(function(){return new ke}));var Ae=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The reservation has only been partially alotted")).code=65,e.name="ReservationNotComplete","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.ReservationNotCompleteError=Ae,u.set(65,(function(){return new Ae})),d.set("ReservationNotComplete",(function(){return new Ae}));var xe=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"You cannot splice over an existing reservation!")).code=66,e.name="TriedToReplaceAnExistingReservation","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.TriedToReplaceAnExistingReservationError=xe,u.set(66,(function(){return new xe})),d.set("TriedToReplaceAnExistingReservation",(function(){return new xe}));var Ie=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid operation")).code=67,e.name="InvalidOperation","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidOperationError=Ie,u.set(67,(function(){return new Ie})),d.set("InvalidOperation",(function(){return new Ie}));var Te=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid Owner")).code=68,e.name="InvalidOwner","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidOwnerError=Te,u.set(68,(function(){return new Te})),d.set("InvalidOwner",(function(){return new Te}));var Se=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Printing mint supply must be zero for conversion")).code=69,e.name="PrintingMintSupplyMustBeZeroForConversion","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.PrintingMintSupplyMustBeZeroForConversionError=Se,u.set(69,(function(){return new Se})),d.set("PrintingMintSupplyMustBeZeroForConversion",(function(){return new Se}));var Ce=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"One Time Auth mint supply must be zero for conversion")).code=70,e.name="OneTimeAuthMintSupplyMustBeZeroForConversion","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.OneTimeAuthMintSupplyMustBeZeroForConversionError=Ce,u.set(70,(function(){return new Ce})),d.set("OneTimeAuthMintSupplyMustBeZeroForConversion",(function(){return new Ce}));var Ee=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"You tried to insert one edition too many into an edition mark pda")).code=71,e.name="InvalidEditionIndex","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidEditionIndexError=Ee,u.set(71,(function(){return new Ee})),d.set("InvalidEditionIndex",(function(){return new Ee}));var Re=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"In the legacy system the reservation needs to be of size one for cpu limit reasons")).code=72,e.name="ReservationArrayShouldBeSizeOne","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.ReservationArrayShouldBeSizeOneError=Re,u.set(72,(function(){return new Re})),d.set("ReservationArrayShouldBeSizeOne",(function(){return new Re}));var Me=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Is Mutable can only be flipped to false")).code=73,e.name="IsMutableCanOnlyBeFlippedToFalse","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.IsMutableCanOnlyBeFlippedToFalseError=Me,u.set(73,(function(){return new Me})),d.set("IsMutableCanOnlyBeFlippedToFalse",(function(){return new Me}));var Pe=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Collection cannot be verified in this instruction")).code=74,e.name="CollectionCannotBeVerifiedInThisInstruction","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CollectionCannotBeVerifiedInThisInstructionError=Pe,u.set(74,(function(){return new Pe})),d.set("CollectionCannotBeVerifiedInThisInstruction",(function(){return new Pe}));var Ue=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This instruction was deprecated in a previous release and is now removed")).code=75,e.name="Removed","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.RemovedError=Ue,u.set(75,(function(){return new Ue})),d.set("Removed",(function(){return new Ue}));var _e=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This token use method is burn and there are no remaining uses, it must be burned")).code=76,e.name="MustBeBurned","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MustBeBurnedError=_e,u.set(76,(function(){return new _e})),d.set("MustBeBurned",(function(){return new _e}));var Be=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This use method is invalid")).code=77,e.name="InvalidUseMethod","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidUseMethodError=Be,u.set(77,(function(){return new Be})),d.set("InvalidUseMethod",(function(){return new Be}));var De=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Cannot Change Use Method after the first use")).code=78,e.name="CannotChangeUseMethodAfterFirstUse","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CannotChangeUseMethodAfterFirstUseError=De,u.set(78,(function(){return new De})),d.set("CannotChangeUseMethodAfterFirstUse",(function(){return new De}));var Ne=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Cannot Change Remaining or Available uses after the first use")).code=79,e.name="CannotChangeUsesAfterFirstUse","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CannotChangeUsesAfterFirstUseError=Ne,u.set(79,(function(){return new Ne})),d.set("CannotChangeUsesAfterFirstUse",(function(){return new Ne}));var Oe=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Collection Not Found on Metadata")).code=80,e.name="CollectionNotFound","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CollectionNotFoundError=Oe,u.set(80,(function(){return new Oe})),d.set("CollectionNotFound",(function(){return new Oe}));var Fe=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Collection Update Authority is invalid")).code=81,e.name="InvalidCollectionUpdateAuthority","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidCollectionUpdateAuthorityError=Fe,u.set(81,(function(){return new Fe})),d.set("InvalidCollectionUpdateAuthority",(function(){return new Fe}));var Le=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Collection Must Be a Unique Master Edition v2")).code=82,e.name="CollectionMustBeAUniqueMasterEdition","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CollectionMustBeAUniqueMasterEditionError=Le,u.set(82,(function(){return new Le})),d.set("CollectionMustBeAUniqueMasterEdition",(function(){return new Le}));var je=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The Use Authority Record Already Exists, to modify it Revoke, then Approve")).code=83,e.name="UseAuthorityRecordAlreadyExists","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.UseAuthorityRecordAlreadyExistsError=je,u.set(83,(function(){return new je})),d.set("UseAuthorityRecordAlreadyExists",(function(){return new je}));var He=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"The Use Authority Record is empty or already revoked")).code=84,e.name="UseAuthorityRecordAlreadyRevoked","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.UseAuthorityRecordAlreadyRevokedError=He,u.set(84,(function(){return new He})),d.set("UseAuthorityRecordAlreadyRevoked",(function(){return new He}));var Ge=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This token has no uses")).code=85,e.name="Unusable","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.UnusableError=Ge,u.set(85,(function(){return new Ge})),d.set("Unusable",(function(){return new Ge}));var ze=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"There are not enough Uses left on this token.")).code=86,e.name="NotEnoughUses","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NotEnoughUsesError=ze,u.set(86,(function(){return new ze})),d.set("NotEnoughUses",(function(){return new ze}));var Ke=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This Collection Authority Record Already Exists.")).code=87,e.name="CollectionAuthorityRecordAlreadyExists","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CollectionAuthorityRecordAlreadyExistsError=Ke,u.set(87,(function(){return new Ke})),d.set("CollectionAuthorityRecordAlreadyExists",(function(){return new Ke}));var We=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This Collection Authority Record Does Not Exist.")).code=88,e.name="CollectionAuthorityDoesNotExist","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CollectionAuthorityDoesNotExistError=We,u.set(88,(function(){return new We})),d.set("CollectionAuthorityDoesNotExist",(function(){return new We}));var Ze=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This Use Authority Record is invalid.")).code=89,e.name="InvalidUseAuthorityRecord","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidUseAuthorityRecordError=Ze,u.set(89,(function(){return new Ze})),d.set("InvalidUseAuthorityRecord",(function(){return new Ze}));var Ve=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This Collection Authority Record is invalid.")).code=90,e.name="InvalidCollectionAuthorityRecord","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidCollectionAuthorityRecordError=Ve,u.set(90,(function(){return new Ve})),d.set("InvalidCollectionAuthorityRecord",(function(){return new Ve}));var qe=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Metadata does not match the freeze authority on the mint")).code=91,e.name="InvalidFreezeAuthority","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidFreezeAuthorityError=qe,u.set(91,(function(){return new qe})),d.set("InvalidFreezeAuthority",(function(){return new qe}));var Qe=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"All tokens in this account have not been delegated to this user.")).code=92,e.name="InvalidDelegate","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidDelegateError=Qe,u.set(92,(function(){return new Qe})),d.set("InvalidDelegate",(function(){return new Qe}));var Je=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Creator can not be adjusted once they are verified.")).code=93,e.name="CannotAdjustVerifiedCreator","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CannotAdjustVerifiedCreatorError=Je,u.set(93,(function(){return new Je})),d.set("CannotAdjustVerifiedCreator",(function(){return new Je}));var Ye=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Verified creators cannot be removed.")).code=94,e.name="CannotRemoveVerifiedCreator","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CannotRemoveVerifiedCreatorError=Ye,u.set(94,(function(){return new Ye})),d.set("CannotRemoveVerifiedCreator",(function(){return new Ye}));var Xe=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Can not wipe verified creators.")).code=95,e.name="CannotWipeVerifiedCreators","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CannotWipeVerifiedCreatorsError=Xe,u.set(95,(function(){return new Xe})),d.set("CannotWipeVerifiedCreators",(function(){return new Xe}));var $e=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Not allowed to change seller fee basis points.")).code=96,e.name="NotAllowedToChangeSellerFeeBasisPoints","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NotAllowedToChangeSellerFeeBasisPointsError=$e,u.set(96,(function(){return new $e})),d.set("NotAllowedToChangeSellerFeeBasisPoints",(function(){return new $e}));var et=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Edition override cannot be zero")).code=97,e.name="EditionOverrideCannotBeZero","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.EditionOverrideCannotBeZeroError=et,u.set(97,(function(){return new et})),d.set("EditionOverrideCannotBeZero",(function(){return new et}));var tt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid User")).code=98,e.name="InvalidUser","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidUserError=tt,u.set(98,(function(){return new tt})),d.set("InvalidUser",(function(){return new tt}));var nt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Revoke Collection Authority signer is incorrect")).code=99,e.name="RevokeCollectionAuthoritySignerIncorrect","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.RevokeCollectionAuthoritySignerIncorrectError=nt,u.set(99,(function(){return new nt})),d.set("RevokeCollectionAuthoritySignerIncorrect",(function(){return new nt}));var at=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Token close failed")).code=100,e.name="TokenCloseFailed","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.TokenCloseFailedError=at,u.set(100,(function(){return new at})),d.set("TokenCloseFailed",(function(){return new at}));var ot=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Can't use this function on unsized collection")).code=101,e.name="UnsizedCollection","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.UnsizedCollectionError=ot,u.set(101,(function(){return new ot})),d.set("UnsizedCollection",(function(){return new ot}));var rt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Can't use this function on a sized collection")).code=102,e.name="SizedCollection","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.SizedCollectionError=rt,u.set(102,(function(){return new rt})),d.set("SizedCollection",(function(){return new rt}));var it=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing collection metadata account")).code=103,e.name="MissingCollectionMetadata","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingCollectionMetadataError=it,u.set(103,(function(){return new it})),d.set("MissingCollectionMetadata",(function(){return new it}));var st=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This NFT is not a member of the specified collection.")).code=104,e.name="NotAMemberOfCollection","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NotAMemberOfCollectionError=st,u.set(104,(function(){return new st})),d.set("NotAMemberOfCollection",(function(){return new st}));var ct=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This NFT is not a verified member of the specified collection.")).code=105,e.name="NotVerifiedMemberOfCollection","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NotVerifiedMemberOfCollectionError=ct,u.set(105,(function(){return new ct})),d.set("NotVerifiedMemberOfCollection",(function(){return new ct}));var ut=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This NFT is not a collection parent NFT.")).code=106,e.name="NotACollectionParent","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NotACollectionParentError=ut,u.set(106,(function(){return new ut})),d.set("NotACollectionParent",(function(){return new ut}));var dt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Could not determine a TokenStandard type.")).code=107,e.name="CouldNotDetermineTokenStandard","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CouldNotDetermineTokenStandardError=dt,u.set(107,(function(){return new dt})),d.set("CouldNotDetermineTokenStandard",(function(){return new dt}));var lt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This mint account has an edition but none was provided.")).code=108,e.name="MissingEditionAccount","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingEditionAccountError=lt,u.set(108,(function(){return new lt})),d.set("MissingEditionAccount",(function(){return new lt}));var ft=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This edition is not a Master Edition")).code=109,e.name="NotAMasterEdition","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NotAMasterEditionError=ft,u.set(109,(function(){return new ft})),d.set("NotAMasterEdition",(function(){return new ft}));var pt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This Master Edition has existing prints")).code=110,e.name="MasterEditionHasPrints","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MasterEditionHasPrintsError=pt,u.set(110,(function(){return new pt})),d.set("MasterEditionHasPrints",(function(){return new pt}));var bt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Borsh Deserialization Error")).code=111,e.name="BorshDeserializationError","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.BorshDeserializationErrorError=bt,u.set(111,(function(){return new bt})),d.set("BorshDeserializationError",(function(){return new bt}));var mt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Cannot update a verified collection in this command")).code=112,e.name="CannotUpdateVerifiedCollection","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CannotUpdateVerifiedCollectionError=mt,u.set(112,(function(){return new mt})),d.set("CannotUpdateVerifiedCollection",(function(){return new mt}));var ht=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Edition account doesnt match collection ")).code=113,e.name="CollectionMasterEditionAccountInvalid","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CollectionMasterEditionAccountInvalidError=ht,u.set(113,(function(){return new ht})),d.set("CollectionMasterEditionAccountInvalid",(function(){return new ht}));var gt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Item is already verified.")).code=114,e.name="AlreadyVerified","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.AlreadyVerifiedError=gt,u.set(114,(function(){return new gt})),d.set("AlreadyVerified",(function(){return new gt}));var yt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Item is already unverified.")).code=115,e.name="AlreadyUnverified","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.AlreadyUnverifiedError=yt,u.set(115,(function(){return new yt})),d.set("AlreadyUnverified",(function(){return new yt}));var vt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"This edition is not a Print Edition")).code=116,e.name="NotAPrintEdition","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NotAPrintEditionError=vt,u.set(116,(function(){return new vt})),d.set("NotAPrintEdition",(function(){return new vt}));var wt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid Master Edition")).code=117,e.name="InvalidMasterEdition","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidMasterEditionError=wt,u.set(117,(function(){return new wt})),d.set("InvalidMasterEdition",(function(){return new wt}));var kt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid Print Edition")).code=118,e.name="InvalidPrintEdition","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidPrintEditionError=kt,u.set(118,(function(){return new kt})),d.set("InvalidPrintEdition",(function(){return new kt}));var At=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid Edition Marker")).code=119,e.name="InvalidEditionMarker","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidEditionMarkerError=At,u.set(119,(function(){return new At})),d.set("InvalidEditionMarker",(function(){return new At}));var xt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Reservation List is Deprecated")).code=120,e.name="ReservationListDeprecated","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.ReservationListDeprecatedError=xt,u.set(120,(function(){return new xt})),d.set("ReservationListDeprecated",(function(){return new xt}));var It=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Print Edition does not match Master Edition")).code=121,e.name="PrintEditionDoesNotMatchMasterEdition","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.PrintEditionDoesNotMatchMasterEditionError=It,u.set(121,(function(){return new It})),d.set("PrintEditionDoesNotMatchMasterEdition",(function(){return new It}));var Tt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Edition Number greater than max supply")).code=122,e.name="EditionNumberGreaterThanMaxSupply","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.EditionNumberGreaterThanMaxSupplyError=Tt,u.set(122,(function(){return new Tt})),d.set("EditionNumberGreaterThanMaxSupply",(function(){return new Tt}));var St=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Must unverify before migrating collections.")).code=123,e.name="MustUnverify","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MustUnverifyError=St,u.set(123,(function(){return new St})),d.set("MustUnverify",(function(){return new St}));var Ct=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid Escrow Account Bump Seed")).code=124,e.name="InvalidEscrowBumpSeed","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidEscrowBumpSeedError=Ct,u.set(124,(function(){return new Ct})),d.set("InvalidEscrowBumpSeed",(function(){return new Ct}));var Et=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Must Escrow Authority")).code=125,e.name="MustBeEscrowAuthority","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MustBeEscrowAuthorityError=Et,u.set(125,(function(){return new Et})),d.set("MustBeEscrowAuthority",(function(){return new Et}));var Rt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid System Program")).code=126,e.name="InvalidSystemProgram","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidSystemProgramError=Rt,u.set(126,(function(){return new Rt})),d.set("InvalidSystemProgram",(function(){return new Rt}));var Mt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Must be a Non Fungible Token")).code=127,e.name="MustBeNonFungible","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MustBeNonFungibleError=Mt,u.set(127,(function(){return new Mt})),d.set("MustBeNonFungible",(function(){return new Mt}));var Pt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Insufficient tokens for transfer")).code=128,e.name="InsufficientTokens","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InsufficientTokensError=Pt,u.set(128,(function(){return new Pt})),d.set("InsufficientTokens",(function(){return new Pt}));var Ut=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Borsh Serialization Error")).code=129,e.name="BorshSerializationError","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.BorshSerializationErrorError=Ut,u.set(129,(function(){return new Ut})),d.set("BorshSerializationError",(function(){return new Ut}));var _t=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Cannot create NFT with no Freeze Authority.")).code=130,e.name="NoFreezeAuthoritySet","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.NoFreezeAuthoritySetError=_t,u.set(130,(function(){return new _t})),d.set("NoFreezeAuthoritySet",(function(){return new _t}));var Bt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid collection size change")).code=131,e.name="InvalidCollectionSizeChange","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidCollectionSizeChangeError=Bt,u.set(131,(function(){return new Bt})),d.set("InvalidCollectionSizeChange",(function(){return new Bt}));var Dt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid bubblegum signer")).code=132,e.name="InvalidBubblegumSigner","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidBubblegumSignerError=Dt,u.set(132,(function(){return new Dt})),d.set("InvalidBubblegumSigner",(function(){return new Dt}));var Nt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Escrow parent cannot have a delegate")).code=133,e.name="EscrowParentHasDelegate","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.EscrowParentHasDelegateError=Nt,u.set(133,(function(){return new Nt})),d.set("EscrowParentHasDelegate",(function(){return new Nt}));var Ot=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Mint needs to be signer to initialize the account")).code=134,e.name="MintIsNotSigner","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MintIsNotSignerError=Ot,u.set(134,(function(){return new Ot})),d.set("MintIsNotSigner",(function(){return new Ot}));var Ft=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid token standard")).code=135,e.name="InvalidTokenStandard","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidTokenStandardError=Ft,u.set(135,(function(){return new Ft})),d.set("InvalidTokenStandard",(function(){return new Ft}));var Lt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid mint account for specified token standard")).code=136,e.name="InvalidMintForTokenStandard","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidMintForTokenStandardError=Lt,u.set(136,(function(){return new Lt})),d.set("InvalidMintForTokenStandard",(function(){return new Lt}));var jt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid authorization rules account")).code=137,e.name="InvalidAuthorizationRules","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidAuthorizationRulesError=jt,u.set(137,(function(){return new jt})),d.set("InvalidAuthorizationRules",(function(){return new jt}));var Ht=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing authorization rules account")).code=138,e.name="MissingAuthorizationRules","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingAuthorizationRulesError=Ht,u.set(138,(function(){return new Ht})),d.set("MissingAuthorizationRules",(function(){return new Ht}));var Gt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing programmable configuration")).code=139,e.name="MissingProgrammableConfig","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingProgrammableConfigError=Gt,u.set(139,(function(){return new Gt})),d.set("MissingProgrammableConfig",(function(){return new Gt}));var zt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid programmable configuration")).code=140,e.name="InvalidProgrammableConfig","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidProgrammableConfigError=zt,u.set(140,(function(){return new zt})),d.set("InvalidProgrammableConfig",(function(){return new zt}));var Kt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Delegate already exists")).code=141,e.name="DelegateAlreadyExists","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.DelegateAlreadyExistsError=Kt,u.set(141,(function(){return new Kt})),d.set("DelegateAlreadyExists",(function(){return new Kt}));var Wt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Delegate not found")).code=142,e.name="DelegateNotFound","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.DelegateNotFoundError=Wt,u.set(142,(function(){return new Wt})),d.set("DelegateNotFound",(function(){return new Wt}));var Zt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Required account not set in instruction builder")).code=143,e.name="MissingAccountInBuilder","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingAccountInBuilderError=Zt,u.set(143,(function(){return new Zt})),d.set("MissingAccountInBuilder",(function(){return new Zt}));var Vt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Required argument not set in instruction builder")).code=144,e.name="MissingArgumentInBuilder","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingArgumentInBuilderError=Vt,u.set(144,(function(){return new Vt})),d.set("MissingArgumentInBuilder",(function(){return new Vt}));var qt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Feature not supported currently")).code=145,e.name="FeatureNotSupported","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.FeatureNotSupportedError=qt,u.set(145,(function(){return new qt})),d.set("FeatureNotSupported",(function(){return new qt}));var Qt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid system wallet")).code=146,e.name="InvalidSystemWallet","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidSystemWalletError=Qt,u.set(146,(function(){return new Qt})),d.set("InvalidSystemWallet",(function(){return new Qt}));var Jt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Only the sale delegate can transfer while its set")).code=147,e.name="OnlySaleDelegateCanTransfer","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.OnlySaleDelegateCanTransferError=Jt,u.set(147,(function(){return new Jt})),d.set("OnlySaleDelegateCanTransfer",(function(){return new Jt}));var Yt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing token account")).code=148,e.name="MissingTokenAccount","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingTokenAccountError=Yt,u.set(148,(function(){return new Yt})),d.set("MissingTokenAccount",(function(){return new Yt}));var Xt=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing SPL token program")).code=149,e.name="MissingSplTokenProgram","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingSplTokenProgramError=Xt,u.set(149,(function(){return new Xt})),d.set("MissingSplTokenProgram",(function(){return new Xt}));var $t=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing authorization rules program")).code=150,e.name="MissingAuthorizationRulesProgram","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingAuthorizationRulesProgramError=$t,u.set(150,(function(){return new $t})),d.set("MissingAuthorizationRulesProgram",(function(){return new $t}));var en=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid delegate role for transfer")).code=151,e.name="InvalidDelegateRoleForTransfer","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidDelegateRoleForTransferError=en,u.set(151,(function(){return new en})),d.set("InvalidDelegateRoleForTransfer",(function(){return new en}));var tn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid transfer authority")).code=152,e.name="InvalidTransferAuthority","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidTransferAuthorityError=tn,u.set(152,(function(){return new tn})),d.set("InvalidTransferAuthority",(function(){return new tn}));var nn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Instruction not supported for ProgrammableNonFungible assets")).code=153,e.name="InstructionNotSupported","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InstructionNotSupportedError=nn,u.set(153,(function(){return new nn})),d.set("InstructionNotSupported",(function(){return new nn}));var an=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Public key does not match expected value")).code=154,e.name="KeyMismatch","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.KeyMismatchError=an,u.set(154,(function(){return new an})),d.set("KeyMismatch",(function(){return new an}));var on=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Token is locked")).code=155,e.name="LockedToken","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.LockedTokenError=on,u.set(155,(function(){return new on})),d.set("LockedToken",(function(){return new on}));var rn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Token is unlocked")).code=156,e.name="UnlockedToken","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.UnlockedTokenError=rn,u.set(156,(function(){return new rn})),d.set("UnlockedToken",(function(){return new rn}));var sn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing delegate role")).code=157,e.name="MissingDelegateRole","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingDelegateRoleError=sn,u.set(157,(function(){return new sn})),d.set("MissingDelegateRole",(function(){return new sn}));var cn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid authority type")).code=158,e.name="InvalidAuthorityType","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidAuthorityTypeError=cn,u.set(158,(function(){return new cn})),d.set("InvalidAuthorityType",(function(){return new cn}));var un=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing token record account")).code=159,e.name="MissingTokenRecord","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingTokenRecordError=un,u.set(159,(function(){return new un})),d.set("MissingTokenRecord",(function(){return new un}));var dn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Mint supply must be zero for programmable assets")).code=160,e.name="MintSupplyMustBeZero","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MintSupplyMustBeZeroError=dn,u.set(160,(function(){return new dn})),d.set("MintSupplyMustBeZero",(function(){return new dn}));var ln=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Data is empty or zeroed")).code=161,e.name="DataIsEmptyOrZeroed","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.DataIsEmptyOrZeroedError=ln,u.set(161,(function(){return new ln})),d.set("DataIsEmptyOrZeroed",(function(){return new ln}));var fn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing token owner")).code=162,e.name="MissingTokenOwnerAccount","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingTokenOwnerAccountError=fn,u.set(162,(function(){return new fn})),d.set("MissingTokenOwnerAccount",(function(){return new fn}));var pn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Master edition account has an invalid length")).code=163,e.name="InvalidMasterEditionAccountLength","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidMasterEditionAccountLengthError=pn,u.set(163,(function(){return new pn})),d.set("InvalidMasterEditionAccountLength",(function(){return new pn}));var bn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Incorrect token state")).code=164,e.name="IncorrectTokenState","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.IncorrectTokenStateError=bn,u.set(164,(function(){return new bn})),d.set("IncorrectTokenState",(function(){return new bn}));var mn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid delegate role")).code=165,e.name="InvalidDelegateRole","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidDelegateRoleError=mn,u.set(165,(function(){return new mn})),d.set("InvalidDelegateRole",(function(){return new mn}));var hn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Print supply is required for non-fungibles")).code=166,e.name="MissingPrintSupply","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingPrintSupplyError=hn,u.set(166,(function(){return new hn})),d.set("MissingPrintSupply",(function(){return new hn}));var gn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing master edition account")).code=167,e.name="MissingMasterEditionAccount","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingMasterEditionAccountError=gn,u.set(167,(function(){return new gn})),d.set("MissingMasterEditionAccount",(function(){return new gn}));var yn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Amount must be greater than zero")).code=168,e.name="AmountMustBeGreaterThanZero","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.AmountMustBeGreaterThanZeroError=yn,u.set(168,(function(){return new yn})),d.set("AmountMustBeGreaterThanZero",(function(){return new yn}));var vn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid delegate args")).code=169,e.name="InvalidDelegateArgs","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidDelegateArgsError=vn,u.set(169,(function(){return new vn})),d.set("InvalidDelegateArgs",(function(){return new vn}));var wn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing address for locked transfer")).code=170,e.name="MissingLockedTransferAddress","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingLockedTransferAddressError=wn,u.set(170,(function(){return new wn})),d.set("MissingLockedTransferAddress",(function(){return new wn}));var kn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid destination address for locked transfer")).code=171,e.name="InvalidLockedTransferAddress","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidLockedTransferAddressError=kn,u.set(171,(function(){return new kn})),d.set("InvalidLockedTransferAddress",(function(){return new kn}));var An=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Exceeded account realloc increase limit")).code=172,e.name="DataIncrementLimitExceeded","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.DataIncrementLimitExceededError=An,u.set(172,(function(){return new An})),d.set("DataIncrementLimitExceeded",(function(){return new An}));var xn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Cannot update the rule set of a programmable asset that has a delegate")).code=173,e.name="CannotUpdateAssetWithDelegate","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CannotUpdateAssetWithDelegateError=xn,u.set(173,(function(){return new xn})),d.set("CannotUpdateAssetWithDelegate",(function(){return new xn}));var In=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid token amount for this operation or token standard")).code=174,e.name="InvalidAmount","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidAmountError=In,u.set(174,(function(){return new In})),d.set("InvalidAmount",(function(){return new In}));var Tn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing master edition mint account")).code=175,e.name="MissingMasterEditionMintAccount","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingMasterEditionMintAccountError=Tn,u.set(175,(function(){return new Tn})),d.set("MissingMasterEditionMintAccount",(function(){return new Tn}));var Sn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing master edition token account")).code=176,e.name="MissingMasterEditionTokenAccount","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingMasterEditionTokenAccountError=Sn,u.set(176,(function(){return new Sn})),d.set("MissingMasterEditionTokenAccount",(function(){return new Sn}));var Cn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing edition marker account")).code=177,e.name="MissingEditionMarkerAccount","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingEditionMarkerAccountError=Cn,u.set(177,(function(){return new Cn})),d.set("MissingEditionMarkerAccount",(function(){return new Cn}));var En=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Cannot burn while persistent delegate is set")).code=178,e.name="CannotBurnWithDelegate","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.CannotBurnWithDelegateError=En,u.set(178,(function(){return new En})),d.set("CannotBurnWithDelegate",(function(){return new En}));var Rn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing edition account")).code=179,e.name="MissingEdition","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingEditionError=Rn,u.set(179,(function(){return new Rn})),d.set("MissingEdition",(function(){return new Rn}));var Mn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid Associated Token Account Program")).code=180,e.name="InvalidAssociatedTokenAccountProgram","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidAssociatedTokenAccountProgramError=Mn,u.set(180,(function(){return new Mn})),d.set("InvalidAssociatedTokenAccountProgram",(function(){return new Mn}));var Pn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid InstructionsSysvar")).code=181,e.name="InvalidInstructionsSysvar","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidInstructionsSysvarError=Pn,u.set(181,(function(){return new Pn})),d.set("InvalidInstructionsSysvar",(function(){return new Pn}));var Un=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid or Unneeded parent accounts")).code=182,e.name="InvalidParentAccounts","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidParentAccountsError=Un,u.set(182,(function(){return new Un})),d.set("InvalidParentAccounts",(function(){return new Un}));var _n=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Authority cannot apply all update args")).code=183,e.name="InvalidUpdateArgs","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidUpdateArgsError=_n,u.set(183,(function(){return new _n})),d.set("InvalidUpdateArgs",(function(){return new _n}));var Bn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Token account does not have enough tokens")).code=184,e.name="InsufficientTokenBalance","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InsufficientTokenBalanceError=Bn,u.set(184,(function(){return new Bn})),d.set("InsufficientTokenBalance",(function(){return new Bn}));var Dn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing collection mint account")).code=185,e.name="MissingCollectionMint","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingCollectionMintError=Dn,u.set(185,(function(){return new Dn})),d.set("MissingCollectionMint",(function(){return new Dn}));var Nn=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Missing collection master edition account")).code=186,e.name="MissingCollectionMasterEdition","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.MissingCollectionMasterEditionError=Nn,u.set(186,(function(){return new Nn})),d.set("MissingCollectionMasterEdition",(function(){return new Nn}));var On=function(e){i(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.call(this,"Invalid token record account")).code=187,e.name="InvalidTokenRecord","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(r(e),n),e}return a(n)}(c(Error));t.InvalidTokenRecordError=On,u.set(187,(function(){return new On})),d.set("InvalidTokenRecord",(function(){return new On})),t.errorFromCode=function(e){var t=u.get(e);return null!=t?t():null},t.errorFromName=function(e){var t=d.get(e);return null!=t?t():null}},36050:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.PROGRAM_ID=t.PROGRAM_ADDRESS=void 0;var r=n(8594);o(n(55967),t),o(n(11710),t),o(n(8845),t),o(n(24946),t),t.PROGRAM_ADDRESS="metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",t.PROGRAM_ID=new r.PublicKey(t.PROGRAM_ADDRESS)},82909:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createApproveCollectionAuthorityInstruction=t.approveCollectionAuthorityInstructionDiscriminator=t.ApproveCollectionAuthorityStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.ApproveCollectionAuthorityStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"ApproveCollectionAuthorityInstructionArgs"),t.approveCollectionAuthorityInstructionDiscriminator=23,t.createApproveCollectionAuthorityInstruction=function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),r=t.ApproveCollectionAuthorityStruct.serialize({instructionDiscriminator:t.approveCollectionAuthorityInstructionDiscriminator}),i=a(r,1)[0],s=[{pubkey:e.collectionAuthorityRecord,isWritable:!0,isSigner:!1},{pubkey:e.newCollectionAuthority,isWritable:!1,isSigner:!1},{pubkey:e.updateAuthority,isWritable:!0,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:null!==(n=e.systemProgram)&&void 0!==n?n:c.SystemProgram.programId,isWritable:!1,isSigner:!1}];return null!=e.rent&&s.push({pubkey:e.rent,isWritable:!1,isSigner:!1}),new c.TransactionInstruction({programId:o,keys:s,data:i})}},39066:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createApproveUseAuthorityInstruction=t.approveUseAuthorityInstructionDiscriminator=t.ApproveUseAuthorityStruct=void 0;var c=s(n(97180)),u=s(n(13168)),d=s(n(8594)),l=n(50141);t.ApproveUseAuthorityStruct=new u.BeetArgsStruct([["instructionDiscriminator",u.u8],["approveUseAuthorityArgs",l.approveUseAuthorityArgsBeet]],"ApproveUseAuthorityInstructionArgs"),t.approveUseAuthorityInstructionDiscriminator=20,t.createApproveUseAuthorityInstruction=function(e,n){var r,i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),u=t.ApproveUseAuthorityStruct.serialize(a({instructionDiscriminator:t.approveUseAuthorityInstructionDiscriminator},n)),l=o(u,1)[0],f=[{pubkey:e.useAuthorityRecord,isWritable:!0,isSigner:!1},{pubkey:e.owner,isWritable:!0,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.user,isWritable:!1,isSigner:!1},{pubkey:e.ownerTokenAccount,isWritable:!0,isSigner:!1},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.burner,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.tokenProgram)&&void 0!==r?r:c.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.systemProgram)&&void 0!==i?i:d.SystemProgram.programId,isWritable:!1,isSigner:!1}];return null!=e.rent&&f.push({pubkey:e.rent,isWritable:!1,isSigner:!1}),new d.TransactionInstruction({programId:s,keys:f,data:l})}},53985:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createBubblegumSetCollectionSizeInstruction=t.bubblegumSetCollectionSizeInstructionDiscriminator=t.BubblegumSetCollectionSizeStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(92263);t.BubblegumSetCollectionSizeStruct=new c.BeetArgsStruct([["instructionDiscriminator",c.u8],["setCollectionSizeArgs",d.setCollectionSizeArgsBeet]],"BubblegumSetCollectionSizeInstructionArgs"),t.bubblegumSetCollectionSizeInstructionDiscriminator=36,t.createBubblegumSetCollectionSizeInstruction=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),i=t.BubblegumSetCollectionSizeStruct.serialize(a({instructionDiscriminator:t.bubblegumSetCollectionSizeInstructionDiscriminator},n)),s=o(i,1)[0],c=[{pubkey:e.collectionMetadata,isWritable:!0,isSigner:!1},{pubkey:e.collectionAuthority,isWritable:!0,isSigner:!0},{pubkey:e.collectionMint,isWritable:!1,isSigner:!1},{pubkey:e.bubblegumSigner,isWritable:!1,isSigner:!0}];return null!=e.collectionAuthorityRecord&&c.push({pubkey:e.collectionAuthorityRecord,isWritable:!1,isSigner:!1}),new u.TransactionInstruction({programId:r,keys:c,data:s})}},37571:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createBurnInstruction=t.burnInstructionDiscriminator=t.BurnStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(13534);t.BurnStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["burnArgs",d.burnArgsBeet]],"BurnInstructionArgs"),t.burnInstructionDiscriminator=41,t.createBurnInstruction=function(e,n){var r,i,s,c,d,l,f,p,b=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),m=t.BurnStruct.serialize(a({instructionDiscriminator:t.burnInstructionDiscriminator},n)),h=o(m,1)[0],g=[{pubkey:e.authority,isWritable:!0,isSigner:!0},{pubkey:null!==(r=e.collectionMetadata)&&void 0!==r?r:b,isWritable:null!=e.collectionMetadata,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(i=e.edition)&&void 0!==i?i:b,isWritable:null!=e.edition,isSigner:!1},{pubkey:e.mint,isWritable:!0,isSigner:!1},{pubkey:e.token,isWritable:!0,isSigner:!1},{pubkey:null!==(s=e.masterEdition)&&void 0!==s?s:b,isWritable:null!=e.masterEdition,isSigner:!1},{pubkey:null!==(c=e.masterEditionMint)&&void 0!==c?c:b,isWritable:!1,isSigner:!1},{pubkey:null!==(d=e.masterEditionToken)&&void 0!==d?d:b,isWritable:!1,isSigner:!1},{pubkey:null!==(l=e.editionMarker)&&void 0!==l?l:b,isWritable:null!=e.editionMarker,isSigner:!1},{pubkey:null!==(f=e.tokenRecord)&&void 0!==f?f:b,isWritable:null!=e.tokenRecord,isSigner:!1},{pubkey:null!==(p=e.systemProgram)&&void 0!==p?p:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1},{pubkey:e.splTokenProgram,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:b,keys:g,data:h})}},34866:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createBurnEditionNftInstruction=t.burnEditionNftInstructionDiscriminator=t.BurnEditionNftStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.BurnEditionNftStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"BurnEditionNftInstructionArgs"),t.burnEditionNftInstructionDiscriminator=37,t.createBurnEditionNftInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.BurnEditionNftStruct.serialize({instructionDiscriminator:t.burnEditionNftInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.owner,isWritable:!0,isSigner:!0},{pubkey:e.printEditionMint,isWritable:!0,isSigner:!1},{pubkey:e.masterEditionMint,isWritable:!1,isSigner:!1},{pubkey:e.printEditionTokenAccount,isWritable:!0,isSigner:!1},{pubkey:e.masterEditionTokenAccount,isWritable:!1,isSigner:!1},{pubkey:e.masterEditionAccount,isWritable:!0,isSigner:!1},{pubkey:e.printEditionAccount,isWritable:!0,isSigner:!1},{pubkey:e.editionMarkerAccount,isWritable:!0,isSigner:!1},{pubkey:e.splTokenProgram,isWritable:!1,isSigner:!1}];return new c.TransactionInstruction({programId:n,keys:i,data:r})}},37016:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createBurnNftInstruction=t.burnNftInstructionDiscriminator=t.BurnNftStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.BurnNftStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"BurnNftInstructionArgs"),t.burnNftInstructionDiscriminator=29,t.createBurnNftInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.BurnNftStruct.serialize({instructionDiscriminator:t.burnNftInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.owner,isWritable:!0,isSigner:!0},{pubkey:e.mint,isWritable:!0,isSigner:!1},{pubkey:e.tokenAccount,isWritable:!0,isSigner:!1},{pubkey:e.masterEditionAccount,isWritable:!0,isSigner:!1},{pubkey:e.splTokenProgram,isWritable:!1,isSigner:!1}];return null!=e.collectionMetadata&&i.push({pubkey:e.collectionMetadata,isWritable:!0,isSigner:!1}),new c.TransactionInstruction({programId:n,keys:i,data:r})}},30678:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createCloseEscrowAccountInstruction=t.closeEscrowAccountInstructionDiscriminator=t.CloseEscrowAccountStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.CloseEscrowAccountStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"CloseEscrowAccountInstructionArgs"),t.closeEscrowAccountInstructionDiscriminator=39,t.createCloseEscrowAccountInstruction=function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),r=t.CloseEscrowAccountStruct.serialize({instructionDiscriminator:t.closeEscrowAccountInstructionDiscriminator}),i=a(r,1)[0],s=[{pubkey:e.escrow,isWritable:!0,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.tokenAccount,isWritable:!1,isSigner:!1},{pubkey:e.edition,isWritable:!1,isSigner:!1},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:null!==(n=e.systemProgram)&&void 0!==n?n:c.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1}];return new c.TransactionInstruction({programId:o,keys:s,data:i})}},59063:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createConvertMasterEditionV1ToV2Instruction=t.convertMasterEditionV1ToV2InstructionDiscriminator=t.ConvertMasterEditionV1ToV2Struct=void 0;var s=i(n(13168)),c=i(n(8594));t.ConvertMasterEditionV1ToV2Struct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"ConvertMasterEditionV1ToV2InstructionArgs"),t.convertMasterEditionV1ToV2InstructionDiscriminator=12,t.createConvertMasterEditionV1ToV2Instruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.ConvertMasterEditionV1ToV2Struct.serialize({instructionDiscriminator:t.convertMasterEditionV1ToV2InstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.masterEdition,isWritable:!0,isSigner:!1},{pubkey:e.oneTimeAuth,isWritable:!0,isSigner:!1},{pubkey:e.printingMint,isWritable:!0,isSigner:!1}];return new c.TransactionInstruction({programId:n,keys:i,data:r})}},76157:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createCreateInstruction=t.createInstructionDiscriminator=t.CreateStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(83041);t.CreateStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["createArgs",d.createArgsBeet]],"CreateInstructionArgs"),t.createInstructionDiscriminator=42,t.createCreateInstruction=function(e,n){var r,i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),c=t.CreateStruct.serialize(a({instructionDiscriminator:t.createInstructionDiscriminator},n)),d=o(c,1)[0],l=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(r=e.masterEdition)&&void 0!==r?r:s,isWritable:null!=e.masterEdition,isSigner:!1},{pubkey:e.mint,isWritable:!0,isSigner:!1},{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.systemProgram)&&void 0!==i?i:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1},{pubkey:e.splTokenProgram,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:s,keys:l,data:d})}},35412:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createCreateEscrowAccountInstruction=t.createEscrowAccountInstructionDiscriminator=t.CreateEscrowAccountStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.CreateEscrowAccountStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"CreateEscrowAccountInstructionArgs"),t.createEscrowAccountInstructionDiscriminator=38,t.createCreateEscrowAccountInstruction=function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),r=t.CreateEscrowAccountStruct.serialize({instructionDiscriminator:t.createEscrowAccountInstructionDiscriminator}),i=a(r,1)[0],s=[{pubkey:e.escrow,isWritable:!0,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.tokenAccount,isWritable:!1,isSigner:!1},{pubkey:e.edition,isWritable:!1,isSigner:!1},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:null!==(n=e.systemProgram)&&void 0!==n?n:c.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1}];return null!=e.authority&&s.push({pubkey:e.authority,isWritable:!1,isSigner:!0}),new c.TransactionInstruction({programId:o,keys:s,data:i})}},70899:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createCreateMasterEditionInstruction=t.createMasterEditionInstructionDiscriminator=t.CreateMasterEditionStruct=void 0;var c=s(n(97180)),u=s(n(13168)),d=s(n(8594)),l=n(40788);t.CreateMasterEditionStruct=new u.FixableBeetArgsStruct([["instructionDiscriminator",u.u8],["createMasterEditionArgs",l.createMasterEditionArgsBeet]],"CreateMasterEditionInstructionArgs"),t.createMasterEditionInstructionDiscriminator=10,t.createCreateMasterEditionInstruction=function(e,n){var r,i,s,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),l=t.CreateMasterEditionStruct.serialize(a({instructionDiscriminator:t.createMasterEditionInstructionDiscriminator},n)),f=o(l,1)[0],p=[{pubkey:e.edition,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!0,isSigner:!1},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!0},{pubkey:e.mintAuthority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.tokenProgram)&&void 0!==r?r:c.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.systemProgram)&&void 0!==i?i:d.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:null!==(s=e.rent)&&void 0!==s?s:d.SYSVAR_RENT_PUBKEY,isWritable:!1,isSigner:!1}];return new d.TransactionInstruction({programId:u,keys:p,data:f})}},28384:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createCreateMasterEditionV3Instruction=t.createMasterEditionV3InstructionDiscriminator=t.CreateMasterEditionV3Struct=void 0;var c=s(n(97180)),u=s(n(13168)),d=s(n(8594)),l=n(40788);t.CreateMasterEditionV3Struct=new u.FixableBeetArgsStruct([["instructionDiscriminator",u.u8],["createMasterEditionArgs",l.createMasterEditionArgsBeet]],"CreateMasterEditionV3InstructionArgs"),t.createMasterEditionV3InstructionDiscriminator=17,t.createCreateMasterEditionV3Instruction=function(e,n){var r,i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),u=t.CreateMasterEditionV3Struct.serialize(a({instructionDiscriminator:t.createMasterEditionV3InstructionDiscriminator},n)),l=o(u,1)[0],f=[{pubkey:e.edition,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!0,isSigner:!1},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!0},{pubkey:e.mintAuthority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(r=e.tokenProgram)&&void 0!==r?r:c.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.systemProgram)&&void 0!==i?i:d.SystemProgram.programId,isWritable:!1,isSigner:!1}];return null!=e.rent&&f.push({pubkey:e.rent,isWritable:!1,isSigner:!1}),new d.TransactionInstruction({programId:s,keys:f,data:l})}},72438:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createCreateMetadataAccountInstruction=t.createMetadataAccountInstructionDiscriminator=t.CreateMetadataAccountStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(17618);t.CreateMetadataAccountStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["createMetadataAccountArgs",d.createMetadataAccountArgsBeet]],"CreateMetadataAccountInstructionArgs"),t.createMetadataAccountInstructionDiscriminator=0,t.createCreateMetadataAccountInstruction=function(e,n){var r,i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),c=t.CreateMetadataAccountStruct.serialize(a({instructionDiscriminator:t.createMetadataAccountInstructionDiscriminator},n)),d=o(c,1)[0],l=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.mintAuthority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.systemProgram)&&void 0!==r?r:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.rent)&&void 0!==i?i:u.SYSVAR_RENT_PUBKEY,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:s,keys:l,data:d})}},48213:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createCreateMetadataAccountV2Instruction=t.createMetadataAccountV2InstructionDiscriminator=t.CreateMetadataAccountV2Struct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(54924);t.CreateMetadataAccountV2Struct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["createMetadataAccountArgsV2",d.createMetadataAccountArgsV2Beet]],"CreateMetadataAccountV2InstructionArgs"),t.createMetadataAccountV2InstructionDiscriminator=16,t.createCreateMetadataAccountV2Instruction=function(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),s=t.CreateMetadataAccountV2Struct.serialize(a({instructionDiscriminator:t.createMetadataAccountV2InstructionDiscriminator},n)),c=o(s,1)[0],d=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.mintAuthority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.systemProgram)&&void 0!==r?r:u.SystemProgram.programId,isWritable:!1,isSigner:!1}];return null!=e.rent&&d.push({pubkey:e.rent,isWritable:!1,isSigner:!1}),new u.TransactionInstruction({programId:i,keys:d,data:c})}},96359:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createCreateMetadataAccountV3Instruction=t.createMetadataAccountV3InstructionDiscriminator=t.CreateMetadataAccountV3Struct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(66822);t.CreateMetadataAccountV3Struct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["createMetadataAccountArgsV3",d.createMetadataAccountArgsV3Beet]],"CreateMetadataAccountV3InstructionArgs"),t.createMetadataAccountV3InstructionDiscriminator=33,t.createCreateMetadataAccountV3Instruction=function(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),s=t.CreateMetadataAccountV3Struct.serialize(a({instructionDiscriminator:t.createMetadataAccountV3InstructionDiscriminator},n)),c=o(s,1)[0],d=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.mintAuthority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.systemProgram)&&void 0!==r?r:u.SystemProgram.programId,isWritable:!1,isSigner:!1}];return null!=e.rent&&d.push({pubkey:e.rent,isWritable:!1,isSigner:!1}),new u.TransactionInstruction({programId:i,keys:d,data:c})}},81021:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createDelegateInstruction=t.delegateInstructionDiscriminator=t.DelegateStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(7788);t.DelegateStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["delegateArgs",d.delegateArgsBeet]],"DelegateInstructionArgs"),t.delegateInstructionDiscriminator=44,t.createDelegateInstruction=function(e,n){var r,i,s,c,d,l,f,p,b=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),m=t.DelegateStruct.serialize(a({instructionDiscriminator:t.delegateInstructionDiscriminator},n)),h=o(m,1)[0],g=[{pubkey:null!==(r=e.delegateRecord)&&void 0!==r?r:b,isWritable:null!=e.delegateRecord,isSigner:!1},{pubkey:e.delegate,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(i=e.masterEdition)&&void 0!==i?i:b,isWritable:!1,isSigner:!1},{pubkey:null!==(s=e.tokenRecord)&&void 0!==s?s:b,isWritable:null!=e.tokenRecord,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:null!==(c=e.token)&&void 0!==c?c:b,isWritable:null!=e.token,isSigner:!1},{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:null!==(d=e.systemProgram)&&void 0!==d?d:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1},{pubkey:null!==(l=e.splTokenProgram)&&void 0!==l?l:b,isWritable:!1,isSigner:!1},{pubkey:null!==(f=e.authorizationRulesProgram)&&void 0!==f?f:b,isWritable:!1,isSigner:!1},{pubkey:null!==(p=e.authorizationRules)&&void 0!==p?p:b,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:b,keys:g,data:h})}},6183:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createDeprecatedCreateMasterEditionInstruction=t.deprecatedCreateMasterEditionInstructionDiscriminator=t.DeprecatedCreateMasterEditionStruct=void 0;var c=s(n(97180)),u=s(n(13168)),d=s(n(8594)),l=n(40788);t.DeprecatedCreateMasterEditionStruct=new u.FixableBeetArgsStruct([["instructionDiscriminator",u.u8],["createMasterEditionArgs",l.createMasterEditionArgsBeet]],"DeprecatedCreateMasterEditionInstructionArgs"),t.deprecatedCreateMasterEditionInstructionDiscriminator=2,t.createDeprecatedCreateMasterEditionInstruction=function(e,n){var r,i,s,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),l=t.DeprecatedCreateMasterEditionStruct.serialize(a({instructionDiscriminator:t.deprecatedCreateMasterEditionInstructionDiscriminator},n)),f=o(l,1)[0],p=[{pubkey:e.edition,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!0,isSigner:!1},{pubkey:e.printingMint,isWritable:!0,isSigner:!1},{pubkey:e.oneTimePrintingAuthorizationMint,isWritable:!0,isSigner:!1},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!0},{pubkey:e.printingMintAuthority,isWritable:!1,isSigner:!0},{pubkey:e.mintAuthority,isWritable:!1,isSigner:!0},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:e.payer,isWritable:!1,isSigner:!0},{pubkey:null!==(r=e.tokenProgram)&&void 0!==r?r:c.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.systemProgram)&&void 0!==i?i:d.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:null!==(s=e.rent)&&void 0!==s?s:d.SYSVAR_RENT_PUBKEY,isWritable:!1,isSigner:!1},{pubkey:e.oneTimePrintingAuthorizationMintAuthority,isWritable:!1,isSigner:!0}];return new d.TransactionInstruction({programId:u,keys:p,data:f})}},44065:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createDeprecatedCreateReservationListInstruction=t.deprecatedCreateReservationListInstructionDiscriminator=t.DeprecatedCreateReservationListStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.DeprecatedCreateReservationListStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"DeprecatedCreateReservationListInstructionArgs"),t.deprecatedCreateReservationListInstructionDiscriminator=6,t.createDeprecatedCreateReservationListInstruction=function(e){var n,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),i=t.DeprecatedCreateReservationListStruct.serialize({instructionDiscriminator:t.deprecatedCreateReservationListInstructionDiscriminator}),s=a(i,1)[0],u=[{pubkey:e.reservationList,isWritable:!0,isSigner:!1},{pubkey:e.payer,isWritable:!1,isSigner:!0},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!0},{pubkey:e.masterEdition,isWritable:!1,isSigner:!1},{pubkey:e.resource,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:null!==(n=e.systemProgram)&&void 0!==n?n:c.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:null!==(o=e.rent)&&void 0!==o?o:c.SYSVAR_RENT_PUBKEY,isWritable:!1,isSigner:!1}];return new c.TransactionInstruction({programId:r,keys:u,data:s})}},52376:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createDeprecatedMintNewEditionFromMasterEditionViaPrintingTokenInstruction=t.deprecatedMintNewEditionFromMasterEditionViaPrintingTokenInstructionDiscriminator=t.DeprecatedMintNewEditionFromMasterEditionViaPrintingTokenStruct=void 0;var s=i(n(97180)),c=i(n(13168)),u=i(n(8594));t.DeprecatedMintNewEditionFromMasterEditionViaPrintingTokenStruct=new c.BeetArgsStruct([["instructionDiscriminator",c.u8]],"DeprecatedMintNewEditionFromMasterEditionViaPrintingTokenInstructionArgs"),t.deprecatedMintNewEditionFromMasterEditionViaPrintingTokenInstructionDiscriminator=3,t.createDeprecatedMintNewEditionFromMasterEditionViaPrintingTokenInstruction=function(e){var n,o,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),c=t.DeprecatedMintNewEditionFromMasterEditionViaPrintingTokenStruct.serialize({instructionDiscriminator:t.deprecatedMintNewEditionFromMasterEditionViaPrintingTokenInstructionDiscriminator}),d=a(c,1)[0],l=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.edition,isWritable:!0,isSigner:!1},{pubkey:e.masterEdition,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!0,isSigner:!1},{pubkey:e.mintAuthority,isWritable:!1,isSigner:!0},{pubkey:e.printingMint,isWritable:!0,isSigner:!1},{pubkey:e.masterTokenAccount,isWritable:!0,isSigner:!1},{pubkey:e.editionMarker,isWritable:!0,isSigner:!1},{pubkey:e.burnAuthority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!1,isSigner:!0},{pubkey:e.masterUpdateAuthority,isWritable:!1,isSigner:!1},{pubkey:e.masterMetadata,isWritable:!1,isSigner:!1},{pubkey:null!==(n=e.tokenProgram)&&void 0!==n?n:s.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(o=e.systemProgram)&&void 0!==o?o:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.rent)&&void 0!==r?r:u.SYSVAR_RENT_PUBKEY,isWritable:!1,isSigner:!1}];return null!=e.reservationList&&l.push({pubkey:e.reservationList,isWritable:!0,isSigner:!1}),new u.TransactionInstruction({programId:i,keys:l,data:d})}},25967:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createDeprecatedMintPrintingTokensInstruction=t.deprecatedMintPrintingTokensInstructionDiscriminator=t.DeprecatedMintPrintingTokensStruct=void 0;var c=s(n(97180)),u=s(n(13168)),d=s(n(8594)),l=n(61462);t.DeprecatedMintPrintingTokensStruct=new u.BeetArgsStruct([["instructionDiscriminator",u.u8],["mintPrintingTokensViaTokenArgs",l.mintPrintingTokensViaTokenArgsBeet]],"DeprecatedMintPrintingTokensInstructionArgs"),t.deprecatedMintPrintingTokensInstructionDiscriminator=9,t.createDeprecatedMintPrintingTokensInstruction=function(e,n){var r,i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),u=t.DeprecatedMintPrintingTokensStruct.serialize(a({instructionDiscriminator:t.deprecatedMintPrintingTokensInstructionDiscriminator},n)),l=o(u,1)[0],f=[{pubkey:e.destination,isWritable:!0,isSigner:!1},{pubkey:e.printingMint,isWritable:!0,isSigner:!1},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!0},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:e.masterEdition,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.tokenProgram)&&void 0!==r?r:c.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.rent)&&void 0!==i?i:d.SYSVAR_RENT_PUBKEY,isWritable:!1,isSigner:!1}];return new d.TransactionInstruction({programId:s,keys:f,data:l})}},57136:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createDeprecatedMintPrintingTokensViaTokenInstruction=t.deprecatedMintPrintingTokensViaTokenInstructionDiscriminator=t.DeprecatedMintPrintingTokensViaTokenStruct=void 0;var c=s(n(97180)),u=s(n(13168)),d=s(n(8594)),l=n(61462);t.DeprecatedMintPrintingTokensViaTokenStruct=new u.BeetArgsStruct([["instructionDiscriminator",u.u8],["mintPrintingTokensViaTokenArgs",l.mintPrintingTokensViaTokenArgsBeet]],"DeprecatedMintPrintingTokensViaTokenInstructionArgs"),t.deprecatedMintPrintingTokensViaTokenInstructionDiscriminator=8,t.createDeprecatedMintPrintingTokensViaTokenInstruction=function(e,n){var r,i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),u=t.DeprecatedMintPrintingTokensViaTokenStruct.serialize(a({instructionDiscriminator:t.deprecatedMintPrintingTokensViaTokenInstructionDiscriminator},n)),l=o(u,1)[0],f=[{pubkey:e.destination,isWritable:!0,isSigner:!1},{pubkey:e.token,isWritable:!0,isSigner:!1},{pubkey:e.oneTimePrintingAuthorizationMint,isWritable:!0,isSigner:!1},{pubkey:e.printingMint,isWritable:!0,isSigner:!1},{pubkey:e.burnAuthority,isWritable:!1,isSigner:!0},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:e.masterEdition,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.tokenProgram)&&void 0!==r?r:c.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.rent)&&void 0!==i?i:d.SYSVAR_RENT_PUBKEY,isWritable:!1,isSigner:!1}];return new d.TransactionInstruction({programId:s,keys:f,data:l})}},70931:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createDeprecatedSetReservationListInstruction=t.deprecatedSetReservationListInstructionDiscriminator=t.DeprecatedSetReservationListStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(8930);t.DeprecatedSetReservationListStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["setReservationListArgs",d.setReservationListArgsBeet]],"DeprecatedSetReservationListInstructionArgs"),t.deprecatedSetReservationListInstructionDiscriminator=5,t.createDeprecatedSetReservationListInstruction=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),i=t.DeprecatedSetReservationListStruct.serialize(a({instructionDiscriminator:t.deprecatedSetReservationListInstructionDiscriminator},n)),s=o(i,1)[0],c=[{pubkey:e.masterEdition,isWritable:!0,isSigner:!1},{pubkey:e.reservationList,isWritable:!0,isSigner:!1},{pubkey:e.resource,isWritable:!1,isSigner:!0}];return new u.TransactionInstruction({programId:r,keys:c,data:s})}},58377:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createFreezeDelegatedAccountInstruction=t.freezeDelegatedAccountInstructionDiscriminator=t.FreezeDelegatedAccountStruct=void 0;var s=i(n(97180)),c=i(n(13168)),u=i(n(8594));t.FreezeDelegatedAccountStruct=new c.BeetArgsStruct([["instructionDiscriminator",c.u8]],"FreezeDelegatedAccountInstructionArgs"),t.freezeDelegatedAccountInstructionDiscriminator=26,t.createFreezeDelegatedAccountInstruction=function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),r=t.FreezeDelegatedAccountStruct.serialize({instructionDiscriminator:t.freezeDelegatedAccountInstructionDiscriminator}),i=a(r,1)[0],c=[{pubkey:e.delegate,isWritable:!0,isSigner:!0},{pubkey:e.tokenAccount,isWritable:!0,isSigner:!1},{pubkey:e.edition,isWritable:!1,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:null!==(n=e.tokenProgram)&&void 0!==n?n:s.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:o,keys:c,data:i})}},33279:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createLockInstruction=t.lockInstructionDiscriminator=t.LockStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(30317);t.LockStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["lockArgs",d.lockArgsBeet]],"LockInstructionArgs"),t.lockInstructionDiscriminator=46,t.createLockInstruction=function(e,n){var r,i,s,c,d,l,f,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),b=t.LockStruct.serialize(a({instructionDiscriminator:t.lockInstructionDiscriminator},n)),m=o(b,1)[0],h=[{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:null!==(r=e.tokenOwner)&&void 0!==r?r:p,isWritable:!1,isSigner:!1},{pubkey:e.token,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(i=e.edition)&&void 0!==i?i:p,isWritable:!1,isSigner:!1},{pubkey:null!==(s=e.tokenRecord)&&void 0!==s?s:p,isWritable:null!=e.tokenRecord,isSigner:!1},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:null!==(c=e.systemProgram)&&void 0!==c?c:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1},{pubkey:null!==(d=e.splTokenProgram)&&void 0!==d?d:p,isWritable:!1,isSigner:!1},{pubkey:null!==(l=e.authorizationRulesProgram)&&void 0!==l?l:p,isWritable:!1,isSigner:!1},{pubkey:null!==(f=e.authorizationRules)&&void 0!==f?f:p,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:p,keys:h,data:m})}},36645:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createMigrateInstruction=t.migrateInstructionDiscriminator=t.MigrateStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(20382);t.MigrateStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["migrateArgs",d.migrateArgsBeet]],"MigrateInstructionArgs"),t.migrateInstructionDiscriminator=48,t.createMigrateInstruction=function(e,n){var r,i,s,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),d=t.MigrateStruct.serialize(a({instructionDiscriminator:t.migrateInstructionDiscriminator},n)),l=o(d,1)[0],f=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.edition,isWritable:!0,isSigner:!1},{pubkey:e.token,isWritable:!0,isSigner:!1},{pubkey:e.tokenOwner,isWritable:!1,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:e.collectionMetadata,isWritable:!1,isSigner:!1},{pubkey:e.delegateRecord,isWritable:!1,isSigner:!1},{pubkey:e.tokenRecord,isWritable:!0,isSigner:!1},{pubkey:null!==(r=e.systemProgram)&&void 0!==r?r:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1},{pubkey:e.splTokenProgram,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.authorizationRulesProgram)&&void 0!==i?i:c,isWritable:!1,isSigner:!1},{pubkey:null!==(s=e.authorizationRules)&&void 0!==s?s:c,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:c,keys:f,data:l})}},61685:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createMintInstruction=t.mintInstructionDiscriminator=t.MintStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(2430);t.MintStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["mintArgs",d.mintArgsBeet]],"MintInstructionArgs"),t.mintInstructionDiscriminator=43,t.createMintInstruction=function(e,n){var r,i,s,c,d,l,f,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),b=t.MintStruct.serialize(a({instructionDiscriminator:t.mintInstructionDiscriminator},n)),m=o(b,1)[0],h=[{pubkey:e.token,isWritable:!0,isSigner:!1},{pubkey:null!==(r=e.tokenOwner)&&void 0!==r?r:p,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.masterEdition)&&void 0!==i?i:p,isWritable:null!=e.masterEdition,isSigner:!1},{pubkey:null!==(s=e.tokenRecord)&&void 0!==s?s:p,isWritable:null!=e.tokenRecord,isSigner:!1},{pubkey:e.mint,isWritable:!0,isSigner:!1},{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:null!==(c=e.delegateRecord)&&void 0!==c?c:p,isWritable:!1,isSigner:!1},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:null!==(d=e.systemProgram)&&void 0!==d?d:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1},{pubkey:e.splTokenProgram,isWritable:!1,isSigner:!1},{pubkey:e.splAtaProgram,isWritable:!1,isSigner:!1},{pubkey:null!==(l=e.authorizationRulesProgram)&&void 0!==l?l:p,isWritable:!1,isSigner:!1},{pubkey:null!==(f=e.authorizationRules)&&void 0!==f?f:p,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:p,keys:h,data:m})}},34009:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createMintNewEditionFromMasterEditionViaTokenInstruction=t.mintNewEditionFromMasterEditionViaTokenInstructionDiscriminator=t.MintNewEditionFromMasterEditionViaTokenStruct=void 0;var c=s(n(97180)),u=s(n(13168)),d=s(n(8594)),l=n(1225);t.MintNewEditionFromMasterEditionViaTokenStruct=new u.BeetArgsStruct([["instructionDiscriminator",u.u8],["mintNewEditionFromMasterEditionViaTokenArgs",l.mintNewEditionFromMasterEditionViaTokenArgsBeet]],"MintNewEditionFromMasterEditionViaTokenInstructionArgs"),t.mintNewEditionFromMasterEditionViaTokenInstructionDiscriminator=11,t.createMintNewEditionFromMasterEditionViaTokenInstruction=function(e,n){var r,i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),u=t.MintNewEditionFromMasterEditionViaTokenStruct.serialize(a({instructionDiscriminator:t.mintNewEditionFromMasterEditionViaTokenInstructionDiscriminator},n)),l=o(u,1)[0],f=[{pubkey:e.newMetadata,isWritable:!0,isSigner:!1},{pubkey:e.newEdition,isWritable:!0,isSigner:!1},{pubkey:e.masterEdition,isWritable:!0,isSigner:!1},{pubkey:e.newMint,isWritable:!0,isSigner:!1},{pubkey:e.editionMarkPda,isWritable:!0,isSigner:!1},{pubkey:e.newMintAuthority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.tokenAccountOwner,isWritable:!1,isSigner:!0},{pubkey:e.tokenAccount,isWritable:!1,isSigner:!1},{pubkey:e.newMetadataUpdateAuthority,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.tokenProgram)&&void 0!==r?r:c.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.systemProgram)&&void 0!==i?i:d.SystemProgram.programId,isWritable:!1,isSigner:!1}];return null!=e.rent&&f.push({pubkey:e.rent,isWritable:!1,isSigner:!1}),new d.TransactionInstruction({programId:s,keys:f,data:l})}},50163:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createMintNewEditionFromMasterEditionViaVaultProxyInstruction=t.mintNewEditionFromMasterEditionViaVaultProxyInstructionDiscriminator=t.MintNewEditionFromMasterEditionViaVaultProxyStruct=void 0;var c=s(n(97180)),u=s(n(13168)),d=s(n(8594)),l=n(1225);t.MintNewEditionFromMasterEditionViaVaultProxyStruct=new u.BeetArgsStruct([["instructionDiscriminator",u.u8],["mintNewEditionFromMasterEditionViaTokenArgs",l.mintNewEditionFromMasterEditionViaTokenArgsBeet]],"MintNewEditionFromMasterEditionViaVaultProxyInstructionArgs"),t.mintNewEditionFromMasterEditionViaVaultProxyInstructionDiscriminator=13,t.createMintNewEditionFromMasterEditionViaVaultProxyInstruction=function(e,n){var r,i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),u=t.MintNewEditionFromMasterEditionViaVaultProxyStruct.serialize(a({instructionDiscriminator:t.mintNewEditionFromMasterEditionViaVaultProxyInstructionDiscriminator},n)),l=o(u,1)[0],f=[{pubkey:e.newMetadata,isWritable:!0,isSigner:!1},{pubkey:e.newEdition,isWritable:!0,isSigner:!1},{pubkey:e.masterEdition,isWritable:!0,isSigner:!1},{pubkey:e.newMint,isWritable:!0,isSigner:!1},{pubkey:e.editionMarkPda,isWritable:!0,isSigner:!1},{pubkey:e.newMintAuthority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.vaultAuthority,isWritable:!1,isSigner:!0},{pubkey:e.safetyDepositStore,isWritable:!1,isSigner:!1},{pubkey:e.safetyDepositBox,isWritable:!1,isSigner:!1},{pubkey:e.vault,isWritable:!1,isSigner:!1},{pubkey:e.newMetadataUpdateAuthority,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.tokenProgram)&&void 0!==r?r:c.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:e.tokenVaultProgram,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.systemProgram)&&void 0!==i?i:d.SystemProgram.programId,isWritable:!1,isSigner:!1}];return null!=e.rent&&f.push({pubkey:e.rent,isWritable:!1,isSigner:!1}),new d.TransactionInstruction({programId:s,keys:f,data:l})}},92606:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createPuffMetadataInstruction=t.puffMetadataInstructionDiscriminator=t.PuffMetadataStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.PuffMetadataStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"PuffMetadataInstructionArgs"),t.puffMetadataInstructionDiscriminator=14,t.createPuffMetadataInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.PuffMetadataStruct.serialize({instructionDiscriminator:t.puffMetadataInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1}];return new c.TransactionInstruction({programId:n,keys:i,data:r})}},69915:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createRemoveCreatorVerificationInstruction=t.removeCreatorVerificationInstructionDiscriminator=t.RemoveCreatorVerificationStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.RemoveCreatorVerificationStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"RemoveCreatorVerificationInstructionArgs"),t.removeCreatorVerificationInstructionDiscriminator=28,t.createRemoveCreatorVerificationInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.RemoveCreatorVerificationStruct.serialize({instructionDiscriminator:t.removeCreatorVerificationInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.creator,isWritable:!1,isSigner:!0}];return new c.TransactionInstruction({programId:n,keys:i,data:r})}},13335:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createRevokeInstruction=t.revokeInstructionDiscriminator=t.RevokeStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(63246);t.RevokeStruct=new c.BeetArgsStruct([["instructionDiscriminator",c.u8],["revokeArgs",d.revokeArgsBeet]],"RevokeInstructionArgs"),t.revokeInstructionDiscriminator=45,t.createRevokeInstruction=function(e,n){var r,i,s,c,d,l,f,p,b=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),m=t.RevokeStruct.serialize(a({instructionDiscriminator:t.revokeInstructionDiscriminator},n)),h=o(m,1)[0],g=[{pubkey:null!==(r=e.delegateRecord)&&void 0!==r?r:b,isWritable:null!=e.delegateRecord,isSigner:!1},{pubkey:e.delegate,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(i=e.masterEdition)&&void 0!==i?i:b,isWritable:!1,isSigner:!1},{pubkey:null!==(s=e.tokenRecord)&&void 0!==s?s:b,isWritable:null!=e.tokenRecord,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:null!==(c=e.token)&&void 0!==c?c:b,isWritable:null!=e.token,isSigner:!1},{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:null!==(d=e.systemProgram)&&void 0!==d?d:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1},{pubkey:null!==(l=e.splTokenProgram)&&void 0!==l?l:b,isWritable:!1,isSigner:!1},{pubkey:null!==(f=e.authorizationRulesProgram)&&void 0!==f?f:b,isWritable:!1,isSigner:!1},{pubkey:null!==(p=e.authorizationRules)&&void 0!==p?p:b,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:b,keys:g,data:h})}},5970:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createRevokeCollectionAuthorityInstruction=t.revokeCollectionAuthorityInstructionDiscriminator=t.RevokeCollectionAuthorityStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.RevokeCollectionAuthorityStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"RevokeCollectionAuthorityInstructionArgs"),t.revokeCollectionAuthorityInstructionDiscriminator=24,t.createRevokeCollectionAuthorityInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.RevokeCollectionAuthorityStruct.serialize({instructionDiscriminator:t.revokeCollectionAuthorityInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.collectionAuthorityRecord,isWritable:!0,isSigner:!1},{pubkey:e.delegateAuthority,isWritable:!0,isSigner:!1},{pubkey:e.revokeAuthority,isWritable:!0,isSigner:!0},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1}];return new c.TransactionInstruction({programId:n,keys:i,data:r})}},68172:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createRevokeUseAuthorityInstruction=t.revokeUseAuthorityInstructionDiscriminator=t.RevokeUseAuthorityStruct=void 0;var s=i(n(97180)),c=i(n(13168)),u=i(n(8594));t.RevokeUseAuthorityStruct=new c.BeetArgsStruct([["instructionDiscriminator",c.u8]],"RevokeUseAuthorityInstructionArgs"),t.revokeUseAuthorityInstructionDiscriminator=21,t.createRevokeUseAuthorityInstruction=function(e){var n,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),i=t.RevokeUseAuthorityStruct.serialize({instructionDiscriminator:t.revokeUseAuthorityInstructionDiscriminator}),c=a(i,1)[0],d=[{pubkey:e.useAuthorityRecord,isWritable:!0,isSigner:!1},{pubkey:e.owner,isWritable:!0,isSigner:!0},{pubkey:e.user,isWritable:!1,isSigner:!1},{pubkey:e.ownerTokenAccount,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!1,isSigner:!1},{pubkey:null!==(n=e.tokenProgram)&&void 0!==n?n:s.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(o=e.systemProgram)&&void 0!==o?o:u.SystemProgram.programId,isWritable:!1,isSigner:!1}];return null!=e.rent&&d.push({pubkey:e.rent,isWritable:!1,isSigner:!1}),new u.TransactionInstruction({programId:r,keys:d,data:c})}},54026:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createSetAndVerifyCollectionInstruction=t.setAndVerifyCollectionInstructionDiscriminator=t.SetAndVerifyCollectionStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.SetAndVerifyCollectionStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"SetAndVerifyCollectionInstructionArgs"),t.setAndVerifyCollectionInstructionDiscriminator=25,t.createSetAndVerifyCollectionInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.SetAndVerifyCollectionStruct.serialize({instructionDiscriminator:t.setAndVerifyCollectionInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.collectionAuthority,isWritable:!0,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!1},{pubkey:e.collectionMint,isWritable:!1,isSigner:!1},{pubkey:e.collection,isWritable:!1,isSigner:!1},{pubkey:e.collectionMasterEditionAccount,isWritable:!1,isSigner:!1}];return null!=e.collectionAuthorityRecord&&i.push({pubkey:e.collectionAuthorityRecord,isWritable:!1,isSigner:!1}),new c.TransactionInstruction({programId:n,keys:i,data:r})}},20546:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createSetAndVerifySizedCollectionItemInstruction=t.setAndVerifySizedCollectionItemInstructionDiscriminator=t.SetAndVerifySizedCollectionItemStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.SetAndVerifySizedCollectionItemStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"SetAndVerifySizedCollectionItemInstructionArgs"),t.setAndVerifySizedCollectionItemInstructionDiscriminator=32,t.createSetAndVerifySizedCollectionItemInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.SetAndVerifySizedCollectionItemStruct.serialize({instructionDiscriminator:t.setAndVerifySizedCollectionItemInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.collectionAuthority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!1},{pubkey:e.collectionMint,isWritable:!1,isSigner:!1},{pubkey:e.collection,isWritable:!0,isSigner:!1},{pubkey:e.collectionMasterEditionAccount,isWritable:!0,isSigner:!1}];return null!=e.collectionAuthorityRecord&&i.push({pubkey:e.collectionAuthorityRecord,isWritable:!1,isSigner:!1}),new c.TransactionInstruction({programId:n,keys:i,data:r})}},75966:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createSetCollectionSizeInstruction=t.setCollectionSizeInstructionDiscriminator=t.SetCollectionSizeStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(92263);t.SetCollectionSizeStruct=new c.BeetArgsStruct([["instructionDiscriminator",c.u8],["setCollectionSizeArgs",d.setCollectionSizeArgsBeet]],"SetCollectionSizeInstructionArgs"),t.setCollectionSizeInstructionDiscriminator=34,t.createSetCollectionSizeInstruction=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),i=t.SetCollectionSizeStruct.serialize(a({instructionDiscriminator:t.setCollectionSizeInstructionDiscriminator},n)),s=o(i,1)[0],c=[{pubkey:e.collectionMetadata,isWritable:!0,isSigner:!1},{pubkey:e.collectionAuthority,isWritable:!0,isSigner:!0},{pubkey:e.collectionMint,isWritable:!1,isSigner:!1}];return null!=e.collectionAuthorityRecord&&c.push({pubkey:e.collectionAuthorityRecord,isWritable:!1,isSigner:!1}),new u.TransactionInstruction({programId:r,keys:c,data:s})}},64196:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createSetTokenStandardInstruction=t.setTokenStandardInstructionDiscriminator=t.SetTokenStandardStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.SetTokenStandardStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"SetTokenStandardInstructionArgs"),t.setTokenStandardInstructionDiscriminator=35,t.createSetTokenStandardInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.SetTokenStandardStruct.serialize({instructionDiscriminator:t.setTokenStandardInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.updateAuthority,isWritable:!0,isSigner:!0},{pubkey:e.mint,isWritable:!1,isSigner:!1}];return null!=e.edition&&i.push({pubkey:e.edition,isWritable:!1,isSigner:!1}),new c.TransactionInstruction({programId:n,keys:i,data:r})}},99510:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createSignMetadataInstruction=t.signMetadataInstructionDiscriminator=t.SignMetadataStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.SignMetadataStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"SignMetadataInstructionArgs"),t.signMetadataInstructionDiscriminator=7,t.createSignMetadataInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.SignMetadataStruct.serialize({instructionDiscriminator:t.signMetadataInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.creator,isWritable:!1,isSigner:!0}];return new c.TransactionInstruction({programId:n,keys:i,data:r})}},6625:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createThawDelegatedAccountInstruction=t.thawDelegatedAccountInstructionDiscriminator=t.ThawDelegatedAccountStruct=void 0;var s=i(n(97180)),c=i(n(13168)),u=i(n(8594));t.ThawDelegatedAccountStruct=new c.BeetArgsStruct([["instructionDiscriminator",c.u8]],"ThawDelegatedAccountInstructionArgs"),t.thawDelegatedAccountInstructionDiscriminator=27,t.createThawDelegatedAccountInstruction=function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),r=t.ThawDelegatedAccountStruct.serialize({instructionDiscriminator:t.thawDelegatedAccountInstructionDiscriminator}),i=a(r,1)[0],c=[{pubkey:e.delegate,isWritable:!0,isSigner:!0},{pubkey:e.tokenAccount,isWritable:!0,isSigner:!1},{pubkey:e.edition,isWritable:!1,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:null!==(n=e.tokenProgram)&&void 0!==n?n:s.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:o,keys:c,data:i})}},13688:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createTransferInstruction=t.transferInstructionDiscriminator=t.TransferStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(72542);t.TransferStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["transferArgs",d.transferArgsBeet]],"TransferInstructionArgs"),t.transferInstructionDiscriminator=49,t.createTransferInstruction=function(e,n){var r,i,s,c,d,l,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),p=t.TransferStruct.serialize(a({instructionDiscriminator:t.transferInstructionDiscriminator},n)),b=o(p,1)[0],m=[{pubkey:e.token,isWritable:!0,isSigner:!1},{pubkey:e.tokenOwner,isWritable:!1,isSigner:!1},{pubkey:e.destination,isWritable:!0,isSigner:!1},{pubkey:e.destinationOwner,isWritable:!1,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(r=e.edition)&&void 0!==r?r:f,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.ownerTokenRecord)&&void 0!==i?i:f,isWritable:null!=e.ownerTokenRecord,isSigner:!1},{pubkey:null!==(s=e.destinationTokenRecord)&&void 0!==s?s:f,isWritable:null!=e.destinationTokenRecord,isSigner:!1},{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:null!==(c=e.systemProgram)&&void 0!==c?c:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1},{pubkey:e.splTokenProgram,isWritable:!1,isSigner:!1},{pubkey:e.splAtaProgram,isWritable:!1,isSigner:!1},{pubkey:null!==(d=e.authorizationRulesProgram)&&void 0!==d?d:f,isWritable:!1,isSigner:!1},{pubkey:null!==(l=e.authorizationRules)&&void 0!==l?l:f,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:f,keys:m,data:b})}},63188:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createTransferOutOfEscrowInstruction=t.transferOutOfEscrowInstructionDiscriminator=t.TransferOutOfEscrowStruct=void 0;var c=s(n(97180)),u=s(n(13168)),d=s(n(8594)),l=n(42585);t.TransferOutOfEscrowStruct=new u.BeetArgsStruct([["instructionDiscriminator",u.u8],["transferOutOfEscrowArgs",l.transferOutOfEscrowArgsBeet]],"TransferOutOfEscrowInstructionArgs"),t.transferOutOfEscrowInstructionDiscriminator=40,t.createTransferOutOfEscrowInstruction=function(e,n){var r,i,s,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),l=t.TransferOutOfEscrowStruct.serialize(a({instructionDiscriminator:t.transferOutOfEscrowInstructionDiscriminator},n)),f=o(l,1)[0],p=[{pubkey:e.escrow,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.attributeMint,isWritable:!1,isSigner:!1},{pubkey:e.attributeSrc,isWritable:!0,isSigner:!1},{pubkey:e.attributeDst,isWritable:!0,isSigner:!1},{pubkey:e.escrowMint,isWritable:!1,isSigner:!1},{pubkey:e.escrowAccount,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.systemProgram)&&void 0!==r?r:d.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.ataProgram)&&void 0!==i?i:c.ASSOCIATED_TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(s=e.tokenProgram)&&void 0!==s?s:c.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1}];return null!=e.authority&&p.push({pubkey:e.authority,isWritable:!1,isSigner:!0}),new d.TransactionInstruction({programId:u,keys:p,data:f})}},22912:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createUnlockInstruction=t.unlockInstructionDiscriminator=t.UnlockStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(38195);t.UnlockStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["unlockArgs",d.unlockArgsBeet]],"UnlockInstructionArgs"),t.unlockInstructionDiscriminator=47,t.createUnlockInstruction=function(e,n){var r,i,s,c,d,l,f,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),b=t.UnlockStruct.serialize(a({instructionDiscriminator:t.unlockInstructionDiscriminator},n)),m=o(b,1)[0],h=[{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:null!==(r=e.tokenOwner)&&void 0!==r?r:p,isWritable:!1,isSigner:!1},{pubkey:e.token,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(i=e.edition)&&void 0!==i?i:p,isWritable:!1,isSigner:!1},{pubkey:null!==(s=e.tokenRecord)&&void 0!==s?s:p,isWritable:null!=e.tokenRecord,isSigner:!1},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:null!==(c=e.systemProgram)&&void 0!==c?c:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1},{pubkey:null!==(d=e.splTokenProgram)&&void 0!==d?d:p,isWritable:!1,isSigner:!1},{pubkey:null!==(l=e.authorizationRulesProgram)&&void 0!==l?l:p,isWritable:!1,isSigner:!1},{pubkey:null!==(f=e.authorizationRules)&&void 0!==f?f:p,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:p,keys:h,data:m})}},73992:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createUnverifyInstruction=t.unverifyInstructionDiscriminator=t.UnverifyStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(42619);t.UnverifyStruct=new c.BeetArgsStruct([["instructionDiscriminator",c.u8],["verificationArgs",d.verificationArgsBeet]],"UnverifyInstructionArgs"),t.unverifyInstructionDiscriminator=53,t.createUnverifyInstruction=function(e,n){var r,i,s,c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),l=t.UnverifyStruct.serialize(a({instructionDiscriminator:t.unverifyInstructionDiscriminator},n)),f=o(l,1)[0],p=[{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:null!==(r=e.delegateRecord)&&void 0!==r?r:d,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(i=e.collectionMint)&&void 0!==i?i:d,isWritable:!1,isSigner:!1},{pubkey:null!==(s=e.collectionMetadata)&&void 0!==s?s:d,isWritable:null!=e.collectionMetadata,isSigner:!1},{pubkey:null!==(c=e.systemProgram)&&void 0!==c?c:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:d,keys:p,data:f})}},82627:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createUnverifyCollectionInstruction=t.unverifyCollectionInstructionDiscriminator=t.UnverifyCollectionStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.UnverifyCollectionStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"UnverifyCollectionInstructionArgs"),t.unverifyCollectionInstructionDiscriminator=22,t.createUnverifyCollectionInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.UnverifyCollectionStruct.serialize({instructionDiscriminator:t.unverifyCollectionInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.collectionAuthority,isWritable:!0,isSigner:!0},{pubkey:e.collectionMint,isWritable:!1,isSigner:!1},{pubkey:e.collection,isWritable:!1,isSigner:!1},{pubkey:e.collectionMasterEditionAccount,isWritable:!1,isSigner:!1}];return null!=e.collectionAuthorityRecord&&i.push({pubkey:e.collectionAuthorityRecord,isWritable:!1,isSigner:!1}),new c.TransactionInstruction({programId:n,keys:i,data:r})}},6730:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createUnverifySizedCollectionItemInstruction=t.unverifySizedCollectionItemInstructionDiscriminator=t.UnverifySizedCollectionItemStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.UnverifySizedCollectionItemStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"UnverifySizedCollectionItemInstructionArgs"),t.unverifySizedCollectionItemInstructionDiscriminator=31,t.createUnverifySizedCollectionItemInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.UnverifySizedCollectionItemStruct.serialize({instructionDiscriminator:t.unverifySizedCollectionItemInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.collectionAuthority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.collectionMint,isWritable:!1,isSigner:!1},{pubkey:e.collection,isWritable:!0,isSigner:!1},{pubkey:e.collectionMasterEditionAccount,isWritable:!1,isSigner:!1}];return null!=e.collectionAuthorityRecord&&i.push({pubkey:e.collectionAuthorityRecord,isWritable:!1,isSigner:!1}),new c.TransactionInstruction({programId:n,keys:i,data:r})}},49081:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createUpdateInstruction=t.updateInstructionDiscriminator=t.UpdateStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(93118);t.UpdateStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["updateArgs",d.updateArgsBeet]],"UpdateInstructionArgs"),t.updateInstructionDiscriminator=50,t.createUpdateInstruction=function(e,n){var r,i,s,c,d,l,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),p=t.UpdateStruct.serialize(a({instructionDiscriminator:t.updateInstructionDiscriminator},n)),b=o(p,1)[0],m=[{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:null!==(r=e.delegateRecord)&&void 0!==r?r:f,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.token)&&void 0!==i?i:f,isWritable:!1,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(s=e.edition)&&void 0!==s?s:f,isWritable:null!=e.edition,isSigner:!1},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:null!==(c=e.systemProgram)&&void 0!==c?c:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1},{pubkey:null!==(d=e.authorizationRulesProgram)&&void 0!==d?d:f,isWritable:!1,isSigner:!1},{pubkey:null!==(l=e.authorizationRules)&&void 0!==l?l:f,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:f,keys:m,data:b})}},29473:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createUpdateMetadataAccountInstruction=t.updateMetadataAccountInstructionDiscriminator=t.UpdateMetadataAccountStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(25747);t.UpdateMetadataAccountStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["updateMetadataAccountArgs",d.updateMetadataAccountArgsBeet]],"UpdateMetadataAccountInstructionArgs"),t.updateMetadataAccountInstructionDiscriminator=1,t.createUpdateMetadataAccountInstruction=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),i=t.UpdateMetadataAccountStruct.serialize(a({instructionDiscriminator:t.updateMetadataAccountInstructionDiscriminator},n)),s=o(i,1)[0],c=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!0}];return new u.TransactionInstruction({programId:r,keys:c,data:s})}},49678:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createUpdateMetadataAccountV2Instruction=t.updateMetadataAccountV2InstructionDiscriminator=t.UpdateMetadataAccountV2Struct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(26110);t.UpdateMetadataAccountV2Struct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["updateMetadataAccountArgsV2",d.updateMetadataAccountArgsV2Beet]],"UpdateMetadataAccountV2InstructionArgs"),t.updateMetadataAccountV2InstructionDiscriminator=15,t.createUpdateMetadataAccountV2Instruction=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),i=t.UpdateMetadataAccountV2Struct.serialize(a({instructionDiscriminator:t.updateMetadataAccountV2InstructionDiscriminator},n)),s=o(i,1)[0],c=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.updateAuthority,isWritable:!1,isSigner:!0}];return new u.TransactionInstruction({programId:r,keys:c,data:s})}},12391:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createUpdatePrimarySaleHappenedViaTokenInstruction=t.updatePrimarySaleHappenedViaTokenInstructionDiscriminator=t.UpdatePrimarySaleHappenedViaTokenStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.UpdatePrimarySaleHappenedViaTokenStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"UpdatePrimarySaleHappenedViaTokenInstructionArgs"),t.updatePrimarySaleHappenedViaTokenInstructionDiscriminator=4,t.createUpdatePrimarySaleHappenedViaTokenInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.UpdatePrimarySaleHappenedViaTokenStruct.serialize({instructionDiscriminator:t.updatePrimarySaleHappenedViaTokenInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.owner,isWritable:!1,isSigner:!0},{pubkey:e.token,isWritable:!1,isSigner:!1}];return new c.TransactionInstruction({programId:n,keys:i,data:r})}},71216:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createUseInstruction=t.useInstructionDiscriminator=t.UseStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(12895);t.UseStruct=new c.FixableBeetArgsStruct([["instructionDiscriminator",c.u8],["useArgs",d.useArgsBeet]],"UseInstructionArgs"),t.useInstructionDiscriminator=51,t.createUseInstruction=function(e,n){var r,i,s,c,d,l,f,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),b=t.UseStruct.serialize(a({instructionDiscriminator:t.useInstructionDiscriminator},n)),m=o(b,1)[0],h=[{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:null!==(r=e.delegateRecord)&&void 0!==r?r:p,isWritable:null!=e.delegateRecord,isSigner:!1},{pubkey:null!==(i=e.token)&&void 0!==i?i:p,isWritable:null!=e.token,isSigner:!1},{pubkey:e.mint,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(s=e.edition)&&void 0!==s?s:p,isWritable:null!=e.edition,isSigner:!1},{pubkey:e.payer,isWritable:!1,isSigner:!0},{pubkey:null!==(c=e.systemProgram)&&void 0!==c?c:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1},{pubkey:null!==(d=e.splTokenProgram)&&void 0!==d?d:p,isWritable:!1,isSigner:!1},{pubkey:null!==(l=e.authorizationRulesProgram)&&void 0!==l?l:p,isWritable:!1,isSigner:!1},{pubkey:null!==(f=e.authorizationRules)&&void 0!==f?f:p,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:p,keys:h,data:m})}},43915:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createUtilizeInstruction=t.utilizeInstructionDiscriminator=t.UtilizeStruct=void 0;var c=s(n(97180)),u=s(n(13168)),d=s(n(8594)),l=n(49430);t.UtilizeStruct=new u.BeetArgsStruct([["instructionDiscriminator",u.u8],["utilizeArgs",l.utilizeArgsBeet]],"UtilizeInstructionArgs"),t.utilizeInstructionDiscriminator=19,t.createUtilizeInstruction=function(e,n){var r,i,s,u,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),f=t.UtilizeStruct.serialize(a({instructionDiscriminator:t.utilizeInstructionDiscriminator},n)),p=o(f,1)[0],b=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.tokenAccount,isWritable:!0,isSigner:!1},{pubkey:e.mint,isWritable:!0,isSigner:!1},{pubkey:e.useAuthority,isWritable:!0,isSigner:!0},{pubkey:e.owner,isWritable:!1,isSigner:!1},{pubkey:null!==(r=e.tokenProgram)&&void 0!==r?r:c.TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(i=e.ataProgram)&&void 0!==i?i:c.ASSOCIATED_TOKEN_PROGRAM_ID,isWritable:!1,isSigner:!1},{pubkey:null!==(s=e.systemProgram)&&void 0!==s?s:d.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:null!==(u=e.rent)&&void 0!==u?u:d.SYSVAR_RENT_PUBKEY,isWritable:!1,isSigner:!1}];if(null!=e.useAuthorityRecord&&b.push({pubkey:e.useAuthorityRecord,isWritable:!0,isSigner:!1}),null!=e.burner){if(null==e.useAuthorityRecord)throw new Error("When providing 'burner' then 'accounts.useAuthorityRecord' need(s) to be provided as well.");b.push({pubkey:e.burner,isWritable:!1,isSigner:!1})}return new d.TransactionInstruction({programId:l,keys:b,data:p})}},23460:function(e,t,n){"use strict";var a=n(42122).default,o=n(27424).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createVerifyInstruction=t.verifyInstructionDiscriminator=t.VerifyStruct=void 0;var c=s(n(13168)),u=s(n(8594)),d=n(42619);t.VerifyStruct=new c.BeetArgsStruct([["instructionDiscriminator",c.u8],["verificationArgs",d.verificationArgsBeet]],"VerifyInstructionArgs"),t.verifyInstructionDiscriminator=52,t.createVerifyInstruction=function(e,n){var r,i,s,c,d,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new u.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),f=t.VerifyStruct.serialize(a({instructionDiscriminator:t.verifyInstructionDiscriminator},n)),p=o(f,1)[0],b=[{pubkey:e.authority,isWritable:!1,isSigner:!0},{pubkey:null!==(r=e.delegateRecord)&&void 0!==r?r:l,isWritable:!1,isSigner:!1},{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:null!==(i=e.collectionMint)&&void 0!==i?i:l,isWritable:!1,isSigner:!1},{pubkey:null!==(s=e.collectionMetadata)&&void 0!==s?s:l,isWritable:null!=e.collectionMetadata,isSigner:!1},{pubkey:null!==(c=e.collectionMasterEdition)&&void 0!==c?c:l,isWritable:!1,isSigner:!1},{pubkey:null!==(d=e.systemProgram)&&void 0!==d?d:u.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e.sysvarInstructions,isWritable:!1,isSigner:!1}];return new u.TransactionInstruction({programId:l,keys:b,data:p})}},96575:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createVerifyCollectionInstruction=t.verifyCollectionInstructionDiscriminator=t.VerifyCollectionStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.VerifyCollectionStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"VerifyCollectionInstructionArgs"),t.verifyCollectionInstructionDiscriminator=18,t.createVerifyCollectionInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.VerifyCollectionStruct.serialize({instructionDiscriminator:t.verifyCollectionInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.collectionAuthority,isWritable:!0,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.collectionMint,isWritable:!1,isSigner:!1},{pubkey:e.collection,isWritable:!1,isSigner:!1},{pubkey:e.collectionMasterEditionAccount,isWritable:!1,isSigner:!1}];return new c.TransactionInstruction({programId:n,keys:i,data:r})}},69006:function(e,t,n){"use strict";var a=n(27424).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createVerifySizedCollectionItemInstruction=t.verifySizedCollectionItemInstructionDiscriminator=t.VerifySizedCollectionItemStruct=void 0;var s=i(n(13168)),c=i(n(8594));t.VerifySizedCollectionItemStruct=new s.BeetArgsStruct([["instructionDiscriminator",s.u8]],"VerifySizedCollectionItemInstructionArgs"),t.verifySizedCollectionItemInstructionDiscriminator=30,t.createVerifySizedCollectionItemInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),o=t.VerifySizedCollectionItemStruct.serialize({instructionDiscriminator:t.verifySizedCollectionItemInstructionDiscriminator}),r=a(o,1)[0],i=[{pubkey:e.metadata,isWritable:!0,isSigner:!1},{pubkey:e.collectionAuthority,isWritable:!1,isSigner:!0},{pubkey:e.payer,isWritable:!0,isSigner:!0},{pubkey:e.collectionMint,isWritable:!1,isSigner:!1},{pubkey:e.collection,isWritable:!0,isSigner:!1},{pubkey:e.collectionMasterEditionAccount,isWritable:!1,isSigner:!1}];return null!=e.collectionAuthorityRecord&&i.push({pubkey:e.collectionAuthorityRecord,isWritable:!1,isSigner:!1}),new c.TransactionInstruction({programId:n,keys:i,data:r})}},8845:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(82909),t),o(n(39066),t),o(n(53985),t),o(n(37571),t),o(n(34866),t),o(n(37016),t),o(n(30678),t),o(n(59063),t),o(n(76157),t),o(n(35412),t),o(n(70899),t),o(n(28384),t),o(n(72438),t),o(n(48213),t),o(n(96359),t),o(n(81021),t),o(n(6183),t),o(n(44065),t),o(n(52376),t),o(n(25967),t),o(n(57136),t),o(n(70931),t),o(n(58377),t),o(n(33279),t),o(n(36645),t),o(n(61685),t),o(n(34009),t),o(n(50163),t),o(n(92606),t),o(n(69915),t),o(n(13335),t),o(n(5970),t),o(n(68172),t),o(n(54026),t),o(n(20546),t),o(n(75966),t),o(n(64196),t),o(n(99510),t),o(n(6625),t),o(n(13688),t),o(n(63188),t),o(n(22912),t),o(n(73992),t),o(n(82627),t),o(n(6730),t),o(n(49081),t),o(n(29473),t),o(n(49678),t),o(n(12391),t),o(n(71216),t),o(n(43915),t),o(n(23460),t),o(n(96575),t),o(n(69006),t)},50141:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.approveUseAuthorityArgsBeet=void 0;var i=r(n(13168));t.approveUseAuthorityArgsBeet=new i.BeetArgsStruct([["numberOfUses",i.u64]],"ApproveUseAuthorityArgs")},16967:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.assetDataBeet=void 0;var i=r(n(13168)),s=r(n(48514)),c=n(89215),u=n(6772),d=n(62354),l=n(89178),f=n(68474);t.assetDataBeet=new i.FixableBeetArgsStruct([["name",i.utf8String],["symbol",i.utf8String],["uri",i.utf8String],["sellerFeeBasisPoints",i.u16],["creators",i.coption(i.array(c.creatorBeet))],["primarySaleHappened",i.bool],["isMutable",i.bool],["tokenStandard",u.tokenStandardBeet],["collection",i.coption(d.collectionBeet)],["uses",i.coption(l.usesBeet)],["collectionDetails",i.coption(f.collectionDetailsBeet)],["ruleSet",i.coption(s.publicKey)]],"AssetData")},99834:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.authorityTypeBeet=t.AuthorityType=void 0;var i,s=r(n(13168));!function(e){e[e.None=0]="None",e[e.Metadata=1]="Metadata",e[e.Holder=2]="Holder",e[e.MetadataDelegate=3]="MetadataDelegate",e[e.TokenDelegate=4]="TokenDelegate"}(i=t.AuthorityType||(t.AuthorityType={})),t.authorityTypeBeet=s.fixedScalarEnum(i)},71714:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.authorizationDataBeet=void 0;var i=r(n(13168)),s=n(30787);t.authorizationDataBeet=new i.FixableBeetArgsStruct([["payload",s.payloadBeet]],"AuthorizationData")},13534:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.burnArgsBeet=t.isBurnArgsV1=void 0;var i=r(n(13168));t.isBurnArgsV1=function(e){return"V1"===e.__kind},t.burnArgsBeet=i.dataEnum([["V1",new i.BeetArgsStruct([["amount",i.u64]],'BurnArgsRecord["V1"]')]])},62354:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.collectionBeet=void 0;var i=r(n(13168)),s=r(n(48514));t.collectionBeet=new i.BeetArgsStruct([["verified",i.bool],["key",s.publicKey]],"Collection")},68474:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.collectionDetailsBeet=t.isCollectionDetailsV1=void 0;var i=r(n(13168));t.isCollectionDetailsV1=function(e){return"V1"===e.__kind},t.collectionDetailsBeet=i.dataEnum([["V1",new i.BeetArgsStruct([["size",i.u64]],'CollectionDetailsRecord["V1"]')]])},47717:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.collectionDetailsToggleBeet=t.isCollectionDetailsToggleSet=t.isCollectionDetailsToggleClear=t.isCollectionDetailsToggleNone=void 0;var i=r(n(13168)),s=n(68474);t.isCollectionDetailsToggleNone=function(e){return"None"===e.__kind};t.isCollectionDetailsToggleClear=function(e){return"Clear"===e.__kind};t.isCollectionDetailsToggleSet=function(e){return"Set"===e.__kind},t.collectionDetailsToggleBeet=i.dataEnum([["None",i.unit],["Clear",i.unit],["Set",new i.FixableBeetArgsStruct([["fields",i.tuple([s.collectionDetailsBeet])]],'CollectionDetailsToggleRecord["Set"]')]])},77112:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.collectionToggleBeet=t.isCollectionToggleSet=t.isCollectionToggleClear=t.isCollectionToggleNone=void 0;var i=r(n(13168)),s=n(62354);t.isCollectionToggleNone=function(e){return"None"===e.__kind};t.isCollectionToggleClear=function(e){return"Clear"===e.__kind};t.isCollectionToggleSet=function(e){return"Set"===e.__kind},t.collectionToggleBeet=i.dataEnum([["None",i.unit],["Clear",i.unit],["Set",new i.BeetArgsStruct([["fields",i.fixedSizeTuple([s.collectionBeet])]],'CollectionToggleRecord["Set"]')]])},83041:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createArgsBeet=t.isCreateArgsV1=void 0;var i=r(n(13168)),s=n(16967),c=n(34320);t.isCreateArgsV1=function(e){return"V1"===e.__kind},t.createArgsBeet=i.dataEnum([["V1",new i.FixableBeetArgsStruct([["assetData",s.assetDataBeet],["decimals",i.coption(i.u8)],["printSupply",i.coption(c.printSupplyBeet)]],'CreateArgsRecord["V1"]')]])},40788:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createMasterEditionArgsBeet=void 0;var i=r(n(13168));t.createMasterEditionArgsBeet=new i.FixableBeetArgsStruct([["maxSupply",i.coption(i.u64)]],"CreateMasterEditionArgs")},17618:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createMetadataAccountArgsBeet=void 0;var i=r(n(13168)),s=n(82927);t.createMetadataAccountArgsBeet=new i.FixableBeetArgsStruct([["data",s.dataBeet],["isMutable",i.bool]],"CreateMetadataAccountArgs")},54924:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createMetadataAccountArgsV2Beet=void 0;var i=r(n(13168)),s=n(26412);t.createMetadataAccountArgsV2Beet=new i.FixableBeetArgsStruct([["data",s.dataV2Beet],["isMutable",i.bool]],"CreateMetadataAccountArgsV2")},66822:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createMetadataAccountArgsV3Beet=void 0;var i=r(n(13168)),s=n(26412),c=n(68474);t.createMetadataAccountArgsV3Beet=new i.FixableBeetArgsStruct([["data",s.dataV2Beet],["isMutable",i.bool],["collectionDetails",i.coption(c.collectionDetailsBeet)]],"CreateMetadataAccountArgsV3")},89215:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.creatorBeet=void 0;var i=r(n(48514)),s=r(n(13168));t.creatorBeet=new s.BeetArgsStruct([["address",i.publicKey],["verified",s.bool],["share",s.u8]],"Creator")},82927:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.dataBeet=void 0;var i=r(n(13168)),s=n(89215);t.dataBeet=new i.FixableBeetArgsStruct([["name",i.utf8String],["symbol",i.utf8String],["uri",i.utf8String],["sellerFeeBasisPoints",i.u16],["creators",i.coption(i.array(s.creatorBeet))]],"Data")},26412:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.dataV2Beet=void 0;var i=r(n(13168)),s=n(89215),c=n(62354),u=n(89178);t.dataV2Beet=new i.FixableBeetArgsStruct([["name",i.utf8String],["symbol",i.utf8String],["uri",i.utf8String],["sellerFeeBasisPoints",i.u16],["creators",i.coption(i.array(s.creatorBeet))],["collection",i.coption(c.collectionBeet)],["uses",i.coption(u.usesBeet)]],"DataV2")},7788:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.delegateArgsBeet=t.isDelegateArgsProgrammableConfigV1=t.isDelegateArgsLockedTransferV1=t.isDelegateArgsStandardV1=t.isDelegateArgsStakingV1=t.isDelegateArgsUtilityV1=t.isDelegateArgsUpdateV1=t.isDelegateArgsTransferV1=t.isDelegateArgsSaleV1=t.isDelegateArgsCollectionV1=void 0;var i=r(n(13168)),s=r(n(48514)),c=n(71714);t.isDelegateArgsCollectionV1=function(e){return"CollectionV1"===e.__kind};t.isDelegateArgsSaleV1=function(e){return"SaleV1"===e.__kind};t.isDelegateArgsTransferV1=function(e){return"TransferV1"===e.__kind};t.isDelegateArgsUpdateV1=function(e){return"UpdateV1"===e.__kind};t.isDelegateArgsUtilityV1=function(e){return"UtilityV1"===e.__kind};t.isDelegateArgsStakingV1=function(e){return"StakingV1"===e.__kind};t.isDelegateArgsStandardV1=function(e){return"StandardV1"===e.__kind};t.isDelegateArgsLockedTransferV1=function(e){return"LockedTransferV1"===e.__kind};t.isDelegateArgsProgrammableConfigV1=function(e){return"ProgrammableConfigV1"===e.__kind},t.delegateArgsBeet=i.dataEnum([["CollectionV1",new i.FixableBeetArgsStruct([["authorizationData",i.coption(c.authorizationDataBeet)]],'DelegateArgsRecord["CollectionV1"]')],["SaleV1",new i.FixableBeetArgsStruct([["amount",i.u64],["authorizationData",i.coption(c.authorizationDataBeet)]],'DelegateArgsRecord["SaleV1"]')],["TransferV1",new i.FixableBeetArgsStruct([["amount",i.u64],["authorizationData",i.coption(c.authorizationDataBeet)]],'DelegateArgsRecord["TransferV1"]')],["UpdateV1",new i.FixableBeetArgsStruct([["authorizationData",i.coption(c.authorizationDataBeet)]],'DelegateArgsRecord["UpdateV1"]')],["UtilityV1",new i.FixableBeetArgsStruct([["amount",i.u64],["authorizationData",i.coption(c.authorizationDataBeet)]],'DelegateArgsRecord["UtilityV1"]')],["StakingV1",new i.FixableBeetArgsStruct([["amount",i.u64],["authorizationData",i.coption(c.authorizationDataBeet)]],'DelegateArgsRecord["StakingV1"]')],["StandardV1",new i.BeetArgsStruct([["amount",i.u64]],'DelegateArgsRecord["StandardV1"]')],["LockedTransferV1",new i.FixableBeetArgsStruct([["amount",i.u64],["lockedAddress",s.publicKey],["authorizationData",i.coption(c.authorizationDataBeet)]],'DelegateArgsRecord["LockedTransferV1"]')],["ProgrammableConfigV1",new i.FixableBeetArgsStruct([["authorizationData",i.coption(c.authorizationDataBeet)]],'DelegateArgsRecord["ProgrammableConfigV1"]')]])},83568:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.escrowAuthorityBeet=t.isEscrowAuthorityCreator=t.isEscrowAuthorityTokenOwner=void 0;var i=r(n(13168)),s=r(n(48514));t.isEscrowAuthorityTokenOwner=function(e){return"TokenOwner"===e.__kind};t.isEscrowAuthorityCreator=function(e){return"Creator"===e.__kind},t.escrowAuthorityBeet=i.dataEnum([["TokenOwner",i.unit],["Creator",new i.BeetArgsStruct([["fields",i.fixedSizeTuple([s.publicKey])]],'EscrowAuthorityRecord["Creator"]')]])},65590:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.keyBeet=t.Key=void 0;var i,s=r(n(13168));!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.EditionV1=1]="EditionV1",e[e.MasterEditionV1=2]="MasterEditionV1",e[e.ReservationListV1=3]="ReservationListV1",e[e.MetadataV1=4]="MetadataV1",e[e.ReservationListV2=5]="ReservationListV2",e[e.MasterEditionV2=6]="MasterEditionV2",e[e.EditionMarker=7]="EditionMarker",e[e.UseAuthorityRecord=8]="UseAuthorityRecord",e[e.CollectionAuthorityRecord=9]="CollectionAuthorityRecord",e[e.TokenOwnedEscrow=10]="TokenOwnedEscrow",e[e.TokenRecord=11]="TokenRecord",e[e.MetadataDelegate=12]="MetadataDelegate"}(i=t.Key||(t.Key={})),t.keyBeet=s.fixedScalarEnum(i)},40529:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.leafInfoBeet=void 0;var i=r(n(13168));t.leafInfoBeet=new i.FixableBeetArgsStruct([["leaf",i.uniformFixedSizeArray(i.u8,32)],["proof",i.array(i.uniformFixedSizeArray(i.u8,32))]],"LeafInfo")},30317:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.lockArgsBeet=t.isLockArgsV1=void 0;var i=r(n(13168)),s=n(71714);t.isLockArgsV1=function(e){return"V1"===e.__kind},t.lockArgsBeet=i.dataEnum([["V1",new i.FixableBeetArgsStruct([["authorizationData",i.coption(s.authorizationDataBeet)]],'LockArgsRecord["V1"]')]])},70054:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.metadataDelegateRoleBeet=t.MetadataDelegateRole=void 0;var i,s=r(n(13168));!function(e){e[e.Authority=0]="Authority",e[e.Collection=1]="Collection",e[e.Use=2]="Use",e[e.Update=3]="Update",e[e.ProgrammableConfig=4]="ProgrammableConfig"}(i=t.MetadataDelegateRole||(t.MetadataDelegateRole={})),t.metadataDelegateRoleBeet=s.fixedScalarEnum(i)},20382:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.migrateArgsBeet=t.isMigrateArgsV1=void 0;var i=r(n(13168)),s=r(n(48514)),c=n(74701);t.isMigrateArgsV1=function(e){return"V1"===e.__kind},t.migrateArgsBeet=i.dataEnum([["V1",new i.FixableBeetArgsStruct([["migrationType",c.migrationTypeBeet],["ruleSet",i.coption(s.publicKey)]],'MigrateArgsRecord["V1"]')]])},74701:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.migrationTypeBeet=t.MigrationType=void 0;var i,s=r(n(13168));!function(e){e[e.CollectionV1=0]="CollectionV1",e[e.ProgrammableV1=1]="ProgrammableV1"}(i=t.MigrationType||(t.MigrationType={})),t.migrationTypeBeet=s.fixedScalarEnum(i)},2430:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.mintArgsBeet=t.isMintArgsV1=void 0;var i=r(n(13168)),s=n(71714);t.isMintArgsV1=function(e){return"V1"===e.__kind},t.mintArgsBeet=i.dataEnum([["V1",new i.FixableBeetArgsStruct([["amount",i.u64],["authorizationData",i.coption(s.authorizationDataBeet)]],'MintArgsRecord["V1"]')]])},1225:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.mintNewEditionFromMasterEditionViaTokenArgsBeet=void 0;var i=r(n(13168));t.mintNewEditionFromMasterEditionViaTokenArgsBeet=new i.BeetArgsStruct([["edition",i.u64]],"MintNewEditionFromMasterEditionViaTokenArgs")},61462:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.mintPrintingTokensViaTokenArgsBeet=void 0;var i=r(n(13168));t.mintPrintingTokensViaTokenArgsBeet=new i.BeetArgsStruct([["supply",i.u64]],"MintPrintingTokensViaTokenArgs")},30787:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.payloadBeet=void 0;var i=r(n(13168)),s=n(71236);t.payloadBeet=new i.FixableBeetArgsStruct([["map",i.map(i.utf8String,s.payloadTypeBeet)]],"Payload")},34034:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.payloadKeyBeet=t.PayloadKey=void 0;var i,s=r(n(13168));!function(e){e[e.Amount=0]="Amount",e[e.Authority=1]="Authority",e[e.AuthoritySeeds=2]="AuthoritySeeds",e[e.Delegate=3]="Delegate",e[e.DelegateSeeds=4]="DelegateSeeds",e[e.Destination=5]="Destination",e[e.DestinationSeeds=6]="DestinationSeeds",e[e.Holder=7]="Holder",e[e.Source=8]="Source",e[e.SourceSeeds=9]="SourceSeeds"}(i=t.PayloadKey||(t.PayloadKey={})),t.payloadKeyBeet=s.fixedScalarEnum(i)},71236:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.payloadTypeBeet=t.isPayloadTypeNumber=t.isPayloadTypeMerkleProof=t.isPayloadTypeSeeds=t.isPayloadTypePubkey=void 0;var i=r(n(13168)),s=r(n(48514)),c=n(93607),u=n(40529);t.isPayloadTypePubkey=function(e){return"Pubkey"===e.__kind};t.isPayloadTypeSeeds=function(e){return"Seeds"===e.__kind};t.isPayloadTypeMerkleProof=function(e){return"MerkleProof"===e.__kind};t.isPayloadTypeNumber=function(e){return"Number"===e.__kind},t.payloadTypeBeet=i.dataEnum([["Pubkey",new i.BeetArgsStruct([["fields",i.fixedSizeTuple([s.publicKey])]],'PayloadTypeRecord["Pubkey"]')],["Seeds",new i.FixableBeetArgsStruct([["fields",i.tuple([c.seedsVecBeet])]],'PayloadTypeRecord["Seeds"]')],["MerkleProof",new i.FixableBeetArgsStruct([["fields",i.tuple([u.leafInfoBeet])]],'PayloadTypeRecord["MerkleProof"]')],["Number",new i.BeetArgsStruct([["fields",i.fixedSizeTuple([i.u64])]],'PayloadTypeRecord["Number"]')]])},34320:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.printSupplyBeet=t.isPrintSupplyUnlimited=t.isPrintSupplyLimited=t.isPrintSupplyZero=void 0;var i=r(n(13168));t.isPrintSupplyZero=function(e){return"Zero"===e.__kind};t.isPrintSupplyLimited=function(e){return"Limited"===e.__kind};t.isPrintSupplyUnlimited=function(e){return"Unlimited"===e.__kind},t.printSupplyBeet=i.dataEnum([["Zero",i.unit],["Limited",new i.BeetArgsStruct([["fields",i.fixedSizeTuple([i.u64])]],'PrintSupplyRecord["Limited"]')],["Unlimited",i.unit]])},22525:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.programmableConfigBeet=t.isProgrammableConfigV1=void 0;var i=r(n(13168)),s=r(n(48514));t.isProgrammableConfigV1=function(e){return"V1"===e.__kind},t.programmableConfigBeet=i.dataEnum([["V1",new i.FixableBeetArgsStruct([["ruleSet",i.coption(s.publicKey)]],'ProgrammableConfigRecord["V1"]')]])},82725:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.reservationBeet=void 0;var i=r(n(13168)),s=r(n(48514));t.reservationBeet=new i.BeetArgsStruct([["address",s.publicKey],["spotsRemaining",i.u64],["totalSpots",i.u64]],"Reservation")},452:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.reservationV1Beet=void 0;var i=r(n(48514)),s=r(n(13168));t.reservationV1Beet=new s.BeetArgsStruct([["address",i.publicKey],["spotsRemaining",s.u8],["totalSpots",s.u8]],"ReservationV1")},63246:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.revokeArgsBeet=t.RevokeArgs=void 0;var i,s=r(n(13168));!function(e){e[e.CollectionV1=0]="CollectionV1",e[e.SaleV1=1]="SaleV1",e[e.TransferV1=2]="TransferV1",e[e.UpdateV1=3]="UpdateV1",e[e.UtilityV1=4]="UtilityV1",e[e.StakingV1=5]="StakingV1",e[e.StandardV1=6]="StandardV1",e[e.LockedTransferV1=7]="LockedTransferV1",e[e.ProgrammableConfigV1=8]="ProgrammableConfigV1",e[e.MigrationV1=9]="MigrationV1"}(i=t.RevokeArgs||(t.RevokeArgs={})),t.revokeArgsBeet=s.fixedScalarEnum(i)},64906:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ruleSetToggleBeet=t.isRuleSetToggleSet=t.isRuleSetToggleClear=t.isRuleSetToggleNone=void 0;var i=r(n(13168)),s=r(n(48514));t.isRuleSetToggleNone=function(e){return"None"===e.__kind};t.isRuleSetToggleClear=function(e){return"Clear"===e.__kind};t.isRuleSetToggleSet=function(e){return"Set"===e.__kind},t.ruleSetToggleBeet=i.dataEnum([["None",i.unit],["Clear",i.unit],["Set",new i.BeetArgsStruct([["fields",i.fixedSizeTuple([s.publicKey])]],'RuleSetToggleRecord["Set"]')]])},93607:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.seedsVecBeet=void 0;var i=r(n(13168));t.seedsVecBeet=new i.FixableBeetArgsStruct([["seeds",i.array(i.bytes)]],"SeedsVec")},92263:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.setCollectionSizeArgsBeet=void 0;var i=r(n(13168));t.setCollectionSizeArgsBeet=new i.BeetArgsStruct([["size",i.u64]],"SetCollectionSizeArgs")},8930:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.setReservationListArgsBeet=void 0;var i=r(n(13168)),s=n(82725);t.setReservationListArgsBeet=new i.FixableBeetArgsStruct([["reservations",i.array(s.reservationBeet)],["totalReservationSpots",i.coption(i.u64)],["offset",i.u64],["totalSpotOffset",i.u64]],"SetReservationListArgs")},22104:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.tokenDelegateRoleBeet=t.TokenDelegateRole=void 0;var i,s=r(n(13168));!function(e){e[e.Sale=0]="Sale",e[e.Transfer=1]="Transfer",e[e.Utility=2]="Utility",e[e.Staking=3]="Staking",e[e.Standard=4]="Standard",e[e.LockedTransfer=5]="LockedTransfer",e[e.Migration=6]="Migration"}(i=t.TokenDelegateRole||(t.TokenDelegateRole={})),t.tokenDelegateRoleBeet=s.fixedScalarEnum(i)},6772:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.tokenStandardBeet=t.TokenStandard=void 0;var i,s=r(n(13168));!function(e){e[e.NonFungible=0]="NonFungible",e[e.FungibleAsset=1]="FungibleAsset",e[e.Fungible=2]="Fungible",e[e.NonFungibleEdition=3]="NonFungibleEdition",e[e.ProgrammableNonFungible=4]="ProgrammableNonFungible"}(i=t.TokenStandard||(t.TokenStandard={})),t.tokenStandardBeet=s.fixedScalarEnum(i)},10785:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.tokenStateBeet=t.TokenState=void 0;var i,s=r(n(13168));!function(e){e[e.Unlocked=0]="Unlocked",e[e.Locked=1]="Locked",e[e.Listed=2]="Listed"}(i=t.TokenState||(t.TokenState={})),t.tokenStateBeet=s.fixedScalarEnum(i)},72542:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.transferArgsBeet=t.isTransferArgsV1=void 0;var i=r(n(13168)),s=n(71714);t.isTransferArgsV1=function(e){return"V1"===e.__kind},t.transferArgsBeet=i.dataEnum([["V1",new i.FixableBeetArgsStruct([["amount",i.u64],["authorizationData",i.coption(s.authorizationDataBeet)]],'TransferArgsRecord["V1"]')]])},42585:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.transferOutOfEscrowArgsBeet=void 0;var i=r(n(13168));t.transferOutOfEscrowArgsBeet=new i.BeetArgsStruct([["amount",i.u64]],"TransferOutOfEscrowArgs")},38195:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.unlockArgsBeet=t.isUnlockArgsV1=void 0;var i=r(n(13168)),s=n(71714);t.isUnlockArgsV1=function(e){return"V1"===e.__kind},t.unlockArgsBeet=i.dataEnum([["V1",new i.FixableBeetArgsStruct([["authorizationData",i.coption(s.authorizationDataBeet)]],'UnlockArgsRecord["V1"]')]])},93118:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.updateArgsBeet=t.isUpdateArgsV1=void 0;var i=r(n(13168)),s=r(n(48514)),c=n(82927),u=n(77112),d=n(47717),l=n(2184),f=n(64906),p=n(71714);t.isUpdateArgsV1=function(e){return"V1"===e.__kind},t.updateArgsBeet=i.dataEnum([["V1",new i.FixableBeetArgsStruct([["newUpdateAuthority",i.coption(s.publicKey)],["data",i.coption(c.dataBeet)],["primarySaleHappened",i.coption(i.bool)],["isMutable",i.coption(i.bool)],["collection",u.collectionToggleBeet],["collectionDetails",d.collectionDetailsToggleBeet],["uses",l.usesToggleBeet],["ruleSet",f.ruleSetToggleBeet],["authorizationData",i.coption(p.authorizationDataBeet)]],'UpdateArgsRecord["V1"]')]])},25747:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.updateMetadataAccountArgsBeet=void 0;var i=r(n(13168)),s=r(n(48514)),c=n(82927);t.updateMetadataAccountArgsBeet=new i.FixableBeetArgsStruct([["data",i.coption(c.dataBeet)],["updateAuthority",i.coption(s.publicKey)],["primarySaleHappened",i.coption(i.bool)]],"UpdateMetadataAccountArgs")},26110:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.updateMetadataAccountArgsV2Beet=void 0;var i=r(n(13168)),s=r(n(48514)),c=n(26412);t.updateMetadataAccountArgsV2Beet=new i.FixableBeetArgsStruct([["data",i.coption(c.dataV2Beet)],["updateAuthority",i.coption(s.publicKey)],["primarySaleHappened",i.coption(i.bool)],["isMutable",i.coption(i.bool)]],"UpdateMetadataAccountArgsV2")},12895:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useArgsBeet=t.isUseArgsV1=void 0;var i=r(n(13168)),s=n(71714);t.isUseArgsV1=function(e){return"V1"===e.__kind},t.useArgsBeet=i.dataEnum([["V1",new i.FixableBeetArgsStruct([["authorizationData",i.coption(s.authorizationDataBeet)]],'UseArgsRecord["V1"]')]])},20236:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useMethodBeet=t.UseMethod=void 0;var i,s=r(n(13168));!function(e){e[e.Burn=0]="Burn",e[e.Multiple=1]="Multiple",e[e.Single=2]="Single"}(i=t.UseMethod||(t.UseMethod={})),t.useMethodBeet=s.fixedScalarEnum(i)},89178:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.usesBeet=void 0;var i=r(n(13168)),s=n(20236);t.usesBeet=new i.BeetArgsStruct([["useMethod",s.useMethodBeet],["remaining",i.u64],["total",i.u64]],"Uses")},2184:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.usesToggleBeet=t.isUsesToggleSet=t.isUsesToggleClear=t.isUsesToggleNone=void 0;var i=r(n(13168)),s=n(89178);t.isUsesToggleNone=function(e){return"None"===e.__kind};t.isUsesToggleClear=function(e){return"Clear"===e.__kind};t.isUsesToggleSet=function(e){return"Set"===e.__kind},t.usesToggleBeet=i.dataEnum([["None",i.unit],["Clear",i.unit],["Set",new i.BeetArgsStruct([["fields",i.fixedSizeTuple([s.usesBeet])]],'UsesToggleRecord["Set"]')]])},49430:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.utilizeArgsBeet=void 0;var i=r(n(13168));t.utilizeArgsBeet=new i.BeetArgsStruct([["numberOfUses",i.u64]],"UtilizeArgs")},42619:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.verificationArgsBeet=t.VerificationArgs=void 0;var i,s=r(n(13168));!function(e){e[e.CreatorV1=0]="CreatorV1",e[e.CollectionV1=1]="CollectionV1"}(i=t.VerificationArgs||(t.VerificationArgs={})),t.verificationArgsBeet=s.fixedScalarEnum(i)},24946:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(50141),t),o(n(16967),t),o(n(99834),t),o(n(71714),t),o(n(13534),t),o(n(62354),t),o(n(68474),t),o(n(47717),t),o(n(77112),t),o(n(83041),t),o(n(40788),t),o(n(17618),t),o(n(54924),t),o(n(66822),t),o(n(89215),t),o(n(82927),t),o(n(26412),t),o(n(7788),t),o(n(83568),t),o(n(65590),t),o(n(40529),t),o(n(30317),t),o(n(70054),t),o(n(20382),t),o(n(74701),t),o(n(2430),t),o(n(1225),t),o(n(61462),t),o(n(30787),t),o(n(34034),t),o(n(71236),t),o(n(34320),t),o(n(22525),t),o(n(82725),t),o(n(452),t),o(n(63246),t),o(n(64906),t),o(n(93607),t),o(n(92263),t),o(n(8930),t),o(n(22104),t),o(n(6772),t),o(n(10785),t),o(n(72542),t),o(n(42585),t),o(n(38195),t),o(n(93118),t),o(n(25747),t),o(n(26110),t),o(n(12895),t),o(n(20236),t),o(n(89178),t),o(n(2184),t),o(n(49430),t),o(n(42619),t)},10411:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(49468),t),o(n(36050),t)},7450:function(e,t){"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Wrong positive integer: ".concat(e))}function a(e){if("boolean"!==typeof e)throw new Error("Expected boolean, not ".concat(e))}function o(e){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a0&&!n.includes(e.length))throw new TypeError("Expected Uint8Array of length ".concat(n,", not of length=").concat(e.length))}function r(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function i(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function s(e,t){o(e);var n=t.outputLen;if(e.lengtha-r&&(this.process(n,0),r=0);for(var i=r;i>o&r),s=Number(n&r),c=a?4:0,u=a?0:4;e.setUint32(t+c,i,a),e.setUint32(t+u,s,a)}(n,a-8,BigInt(8*this.length),o),this.process(n,0);var s=(0,u.createView)(e),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen should be aligned to 32bit");var l=d/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(var p=0;p1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&n),l:Number(e>>a&n)}:{h:0|Number(e>>a&n),l:0|Number(e&n)}}function r(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Uint32Array(e.length),a=new Uint32Array(e.length),r=0;r>>0)<>>0)};function i(e,t,n,a){var o=(t>>>0)+(a>>>0);return{h:e+n+(o/Math.pow(2,32)|0)|0,l:0|o}}t.add=i;var s={fromBig:o,split:r,toBig:t.toBig,shrSH:function(e,t,n){return e>>>n},shrSL:function(e,t,n){return e<<32-n|t>>>n},rotrSH:function(e,t,n){return e>>>n|t<<32-n},rotrSL:function(e,t,n){return e<<32-n|t>>>n},rotrBH:function(e,t,n){return e<<64-n|t>>>n-32},rotrBL:function(e,t,n){return e>>>n-32|t<<64-n},rotr32H:function(e,t){return t},rotr32L:function(e,t){return e},rotlSH:function(e,t,n){return e<>>32-n},rotlSL:function(e,t,n){return t<>>32-n},rotlBH:function(e,t,n){return t<>>64-n},rotlBL:function(e,t,n){return e<>>64-n},add:i,add3L:function(e,t,n){return(e>>>0)+(t>>>0)+(n>>>0)},add3H:function(e,t,n,a){return t+n+a+(e/Math.pow(2,32)|0)|0},add4L:function(e,t,n,a){return(e>>>0)+(t>>>0)+(n>>>0)+(a>>>0)},add4H:function(e,t,n,a,o){return t+n+a+o+(e/Math.pow(2,32)|0)|0},add5H:function(e,t,n,a,o,r){return t+n+a+o+r+(e/Math.pow(2,32)|0)|0},add5L:function(e,t,n,a,o){return(e>>>0)+(t>>>0)+(n>>>0)+(a>>>0)+(o>>>0)}};t.default=s},76794:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},62308:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(61655).default,i=n(26389).default;Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;var s=n(7450),c=n(69108),u=function(e){r(n,e);var t=i(n);function n(e,o){var r;a(this,n),(r=t.call(this)).finished=!1,r.destroyed=!1,s.default.hash(e);var i=(0,c.toBytes)(o);if(r.iHash=e.create(),"function"!==typeof r.iHash.update)throw new TypeError("Expected instance of class which extends utils.Hash");r.blockLen=r.iHash.blockLen,r.outputLen=r.iHash.outputLen;var u=r.blockLen,d=new Uint8Array(u);d.set(i.length>u?e.create().update(i).digest():i);for(var l=0;l= 1");var l=(0,s.toBytes)(t),f=(0,s.toBytes)(n),p=new Uint8Array(u),b=i.hmac.create(e,l),m=b._cloneInto().update(f);return{c:c,dkLen:u,asyncTick:d,DK:p,PRF:b,PRFSalt:m}}function u(e,t,n,a,o){return e.destroy(),t.destroy(),a&&a.destroy(),o.fill(0),n}function d(){return(d=o(a().mark((function e(t,n,o,r){var i,d,l,f,p,b,m,h,g,y,v,w,k,A;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=c(t,n,o,r),d=i.c,l=i.dkLen,f=i.asyncTick,p=i.DK,b=i.PRF,m=i.PRFSalt,g=new Uint8Array(4),y=(0,s.createView)(g),v=new Uint8Array(b.outputLen),w=a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.subarray(A,A+b.outputLen),y.setInt32(0,k,!1),(h=m._cloneInto(h)).update(g).digestInto(v),t.set(v.subarray(0,t.length)),e.next=6,(0,s.asyncLoop)(d-1,f,(function(e){b._cloneInto(h).update(v).digestInto(v);for(var n=0;n>>32-t};function I(e,t,n,a){return 0===e?t^n^a:1===e?t&n|~t&a:2===e?(t|~n)^a:3===e?t&a|n&~a:t^(n|~a)}var T=new Uint32Array(16),S=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this,64,20,8,!0)).h0=1732584193,e.h1=-271733879,e.h2=-1732584194,e.h3=271733878,e.h4=-1009589776,e}return o(n,[{key:"get",value:function(){return[this.h0,this.h1,this.h2,this.h3,this.h4]}},{key:"set",value:function(e,t,n,a,o){this.h0=0|e,this.h1=0|t,this.h2=0|n,this.h3=0|a,this.h4=0|o}},{key:"process",value:function(e,t){for(var n=0;n<16;n++,t+=4)T[n]=e.getUint32(t,!0);for(var a=0|this.h0,o=a,r=0|this.h1,i=r,s=0|this.h2,c=s,u=0|this.h3,d=u,l=0|this.h4,b=l,m=0;m<5;m++){for(var h=4-m,g=k[m],y=A[m],S=f[m],C=p[m],E=v[m],R=w[m],M=0;M<16;M++){var P=x(a+I(m,r,s,u)+T[S[M]]+g,E[M])+l|0;a=l,l=u,u=0|x(s,10),s=r,r=P}for(var U=0;U<16;U++){var _=x(o+I(h,i,c,d)+T[C[U]]+y,R[U])+b|0;o=b,b=d,d=0|x(c,10),c=i,i=_}}this.set(this.h1+s+d|0,this.h2+u+b|0,this.h3+l+o|0,this.h4+a+i|0,this.h0+r+c|0)}},{key:"roundClean",value:function(){T.fill(0)}},{key:"destroy",value:function(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}]),n}(s.SHA2);t.RIPEMD160=S,t.ripemd160=(0,c.wrapConstructor)((function(){return new S}))},83977:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(61655).default,i=n(26389).default;Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;var s=n(10050),c=n(69108),u=function(e,t,n){return e&t^e&n^t&n},d=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),l=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),f=new Uint32Array(64),p=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this,64,32,8,!1)).A=0|l[0],e.B=0|l[1],e.C=0|l[2],e.D=0|l[3],e.E=0|l[4],e.F=0|l[5],e.G=0|l[6],e.H=0|l[7],e}return o(n,[{key:"get",value:function(){return[this.A,this.B,this.C,this.D,this.E,this.F,this.G,this.H]}},{key:"set",value:function(e,t,n,a,o,r,i,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|a,this.E=0|o,this.F=0|r,this.G=0|i,this.H=0|s}},{key:"process",value:function(e,t){for(var n=0;n<16;n++,t+=4)f[n]=e.getUint32(t,!1);for(var a=16;a<64;a++){var o=f[a-15],r=f[a-2],i=(0,c.rotr)(o,7)^(0,c.rotr)(o,18)^o>>>3,s=(0,c.rotr)(r,17)^(0,c.rotr)(r,19)^r>>>10;f[a]=s+f[a-7]+i+f[a-16]|0}for(var l,p=this.A,b=this.B,m=this.C,h=this.D,g=this.E,y=this.F,v=this.G,w=this.H,k=0;k<64;k++){var A=w+((0,c.rotr)(g,6)^(0,c.rotr)(g,11)^(0,c.rotr)(g,25))+((l=g)&y^~l&v)+d[k]+f[k]|0,x=((0,c.rotr)(p,2)^(0,c.rotr)(p,13)^(0,c.rotr)(p,22))+u(p,b,m)|0;w=v,v=y,y=g,g=h+A|0,h=m,m=b,b=p,p=A+x|0}p=p+this.A|0,b=b+this.B|0,m=m+this.C|0,h=h+this.D|0,g=g+this.E|0,y=y+this.F|0,v=v+this.G|0,w=w+this.H|0,this.set(p,b,m,h,g,y,v,w)}},{key:"roundClean",value:function(){f.fill(0)}},{key:"destroy",value:function(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}]),n}(s.SHA2),b=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this)).A=-1056596264,e.B=914150663,e.C=812702999,e.D=-150054599,e.E=-4191439,e.F=1750603025,e.G=1694076839,e.H=-1090891868,e.outputLen=28,e}return o(n)}(p);t.sha256=(0,c.wrapConstructor)((function(){return new p})),t.sha224=(0,c.wrapConstructor)((function(){return new b}))},86571:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(61655).default,i=n(26389).default,s=n(27424).default;Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;for(var c=n(7450),u=n(39444),d=n(69108),l=[],f=[],p=[],b=BigInt(0),m=BigInt(1),h=BigInt(2),g=BigInt(7),y=BigInt(256),v=BigInt(113),w=0,k=m,A=1,x=0;w<24;w++){var I=[x,(2*A+3*x)%5];A=I[0],x=I[1],l.push(2*(5*x+A)),f.push((w+1)*(w+2)/2%64);for(var T=b,S=0;S<7;S++)(k=(k<>g)*v)%y)&h&&(T^=m<<(m<32?u.default.rotlBH(e,t,n):u.default.rotlSH(e,t,n)},P=function(e,t,n){return n>32?u.default.rotlBL(e,t,n):u.default.rotlSL(e,t,n)};function U(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=new Uint32Array(10),a=24-t;a<24;a++){for(var o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(var r=0;r<10;r+=2)for(var i=(r+8)%10,s=(r+2)%10,c=n[s],u=n[s+1],d=M(c,u,1)^n[i],p=P(c,u,1)^n[i+1],b=0;b<50;b+=10)e[r+b]^=d,e[r+b+1]^=p;for(var m=e[2],h=e[3],g=0;g<24;g++){var y=f[g],v=M(m,h,y),w=P(m,h,y),k=l[g];m=e[k],h=e[k+1],e[k]=v,e[k+1]=w}for(var A=0;A<50;A+=10){for(var x=0;x<10;x++)n[x]=e[A+x];for(var I=0;I<10;I++)e[A+I]^=~n[(I+2)%10]&n[(I+4)%10]}e[0]^=E[a],e[1]^=R[a]}n.fill(0)}t.keccakP=U;var _=function(e){r(n,e);var t=i(n);function n(e,o,r){var i,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if(a(this,n),(i=t.call(this)).blockLen=e,i.suffix=o,i.outputLen=r,i.enableXOF=s,i.rounds=u,i.pos=0,i.posOut=0,i.finished=!1,i.destroyed=!1,c.default.number(r),0>=i.blockLen||i.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");return i.state=new Uint8Array(200),i.state32=(0,d.u32)(i.state),i}return o(n,[{key:"keccak",value:function(){U(this.state32,this.rounds),this.posOut=0,this.pos=0}},{key:"update",value:function(e){c.default.exists(this);for(var t=this.blockLen,n=this.state,a=(e=(0,d.toBytes)(e)).length,o=0;o=n&&this.keccak();var r=Math.min(n-this.posOut,o-a);e.set(t.subarray(this.posOut,this.posOut+r),a),this.posOut+=r,a+=r}return e}},{key:"xofInto",value:function(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}},{key:"xof",value:function(e){return c.default.number(e),this.xofInto(new Uint8Array(e))}},{key:"digestInto",value:function(e){if(c.default.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}},{key:"digest",value:function(){return this.digestInto(new Uint8Array(this.outputLen))}},{key:"destroy",value:function(){this.destroyed=!0,this.state.fill(0)}},{key:"_cloneInto",value:function(e){var t=this.blockLen,a=this.suffix,o=this.outputLen,r=this.rounds,i=this.enableXOF;return e||(e=new n(t,a,o,i,r)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=r,e.suffix=a,e.outputLen=o,e.enableXOF=i,e.destroyed=this.destroyed,e}}]),n}(d.Hash);t.Keccak=_;var B=function(e,t,n){return(0,d.wrapConstructor)((function(){return new _(t,e,n)}))};t.sha3_224=B(6,144,28),t.sha3_256=B(6,136,32),t.sha3_384=B(6,104,48),t.sha3_512=B(6,72,64),t.keccak_224=B(1,144,28),t.keccak_256=B(1,136,32),t.keccak_384=B(1,104,48),t.keccak_512=B(1,72,64);var D=function(e,t,n){return(0,d.wrapConstructorWithOpts)((function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new _(t,e,void 0===a.dkLen?n:a.dkLen,!0)}))};t.shake128=D(31,168,16),t.shake256=D(31,136,32)},36833:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(61655).default,i=n(26389).default,s=n(27424).default;Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA512=void 0;var c=n(10050),u=n(39444),d=n(69108),l=s(u.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((function(e){return BigInt(e)}))),2),f=l[0],p=l[1],b=new Uint32Array(80),m=new Uint32Array(80),h=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this,128,64,16,!1)).Ah=1779033703,e.Al=-205731576,e.Bh=-1150833019,e.Bl=-2067093701,e.Ch=1013904242,e.Cl=-23791573,e.Dh=-1521486534,e.Dl=1595750129,e.Eh=1359893119,e.El=-1377402159,e.Fh=-1694144372,e.Fl=725511199,e.Gh=528734635,e.Gl=-79577749,e.Hh=1541459225,e.Hl=327033209,e}return o(n,[{key:"get",value:function(){return[this.Ah,this.Al,this.Bh,this.Bl,this.Ch,this.Cl,this.Dh,this.Dl,this.Eh,this.El,this.Fh,this.Fl,this.Gh,this.Gl,this.Hh,this.Hl]}},{key:"set",value:function(e,t,n,a,o,r,i,s,c,u,d,l,f,p,b,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|a,this.Ch=0|o,this.Cl=0|r,this.Dh=0|i,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|d,this.Fl=0|l,this.Gh=0|f,this.Gl=0|p,this.Hh=0|b,this.Hl=0|m}},{key:"process",value:function(e,t){for(var n=0;n<16;n++,t+=4)b[n]=e.getUint32(t),m[n]=e.getUint32(t+=4);for(var a=16;a<80;a++){var o=0|b[a-15],r=0|m[a-15],i=u.default.rotrSH(o,r,1)^u.default.rotrSH(o,r,8)^u.default.shrSH(o,r,7),s=u.default.rotrSL(o,r,1)^u.default.rotrSL(o,r,8)^u.default.shrSL(o,r,7),c=0|b[a-2],d=0|m[a-2],l=u.default.rotrSH(c,d,19)^u.default.rotrBH(c,d,61)^u.default.shrSH(c,d,6),h=u.default.rotrSL(c,d,19)^u.default.rotrBL(c,d,61)^u.default.shrSL(c,d,6),g=u.default.add4L(s,h,m[a-7],m[a-16]),y=u.default.add4H(g,i,l,b[a-7],b[a-16]);b[a]=0|y,m[a]=0|g}for(var v=this.Ah,w=this.Al,k=this.Bh,A=this.Bl,x=this.Ch,I=this.Cl,T=this.Dh,S=this.Dl,C=this.Eh,E=this.El,R=this.Fh,M=this.Fl,P=this.Gh,U=this.Gl,_=this.Hh,B=this.Hl,D=0;D<80;D++){var N=u.default.rotrSH(C,E,14)^u.default.rotrSH(C,E,18)^u.default.rotrBH(C,E,41),O=u.default.rotrSL(C,E,14)^u.default.rotrSL(C,E,18)^u.default.rotrBL(C,E,41),F=C&R^~C&P,L=E&M^~E&U,j=u.default.add5L(B,O,L,p[D],m[D]),H=u.default.add5H(j,_,N,F,f[D],b[D]),G=0|j,z=u.default.rotrSH(v,w,28)^u.default.rotrBH(v,w,34)^u.default.rotrBH(v,w,39),K=u.default.rotrSL(v,w,28)^u.default.rotrBL(v,w,34)^u.default.rotrBL(v,w,39),W=v&k^v&x^k&x,Z=w&A^w&I^A&I;_=0|P,B=0|U,P=0|R,U=0|M,R=0|C,M=0|E;var V=u.default.add(0|T,0|S,0|H,0|G);C=V.h,E=V.l,T=0|x,S=0|I,x=0|k,I=0|A,k=0|v,A=0|w;var q=u.default.add3L(G,K,Z);v=u.default.add3H(q,H,z,W),w=0|q}var Q=u.default.add(0|this.Ah,0|this.Al,0|v,0|w);v=Q.h,w=Q.l;var J=u.default.add(0|this.Bh,0|this.Bl,0|k,0|A);k=J.h,A=J.l;var Y=u.default.add(0|this.Ch,0|this.Cl,0|x,0|I);x=Y.h,I=Y.l;var X=u.default.add(0|this.Dh,0|this.Dl,0|T,0|S);T=X.h,S=X.l;var $=u.default.add(0|this.Eh,0|this.El,0|C,0|E);C=$.h,E=$.l;var ee=u.default.add(0|this.Fh,0|this.Fl,0|R,0|M);R=ee.h,M=ee.l;var te=u.default.add(0|this.Gh,0|this.Gl,0|P,0|U);P=te.h,U=te.l;var ne=u.default.add(0|this.Hh,0|this.Hl,0|_,0|B);_=ne.h,B=ne.l,this.set(v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B)}},{key:"roundClean",value:function(){b.fill(0),m.fill(0)}},{key:"destroy",value:function(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}]),n}(c.SHA2);t.SHA512=h;var g=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this)).Ah=-1942145080,e.Al=424955298,e.Bh=1944164710,e.Bl=-1982016298,e.Ch=502970286,e.Cl=855612546,e.Dh=1738396948,e.Dl=1479516111,e.Eh=258812777,e.El=2077511080,e.Fh=2011393907,e.Fl=79989058,e.Gh=1067287976,e.Gl=1780299464,e.Hh=286451373,e.Hl=-1848208735,e.outputLen=28,e}return o(n)}(h),y=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this)).Ah=573645204,e.Al=-64227540,e.Bh=-1621794909,e.Bl=-934517566,e.Ch=596883563,e.Cl=1867755857,e.Dh=-1774684391,e.Dl=1497426621,e.Eh=-1775747358,e.El=-1467023389,e.Fh=-1101128155,e.Fl=1401305490,e.Gh=721525244,e.Gl=746961066,e.Hh=246885852,e.Hl=-2117784414,e.outputLen=32,e}return o(n)}(h),v=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this)).Ah=-876896931,e.Al=-1056596264,e.Bh=1654270250,e.Bl=914150663,e.Ch=-1856437926,e.Cl=812702999,e.Dh=355462360,e.Dl=-150054599,e.Eh=1731405415,e.El=-4191439,e.Fh=-1900787065,e.Fl=1750603025,e.Gh=-619958771,e.Gl=1694076839,e.Hh=1203062813,e.Hl=-1090891868,e.outputLen=48,e}return o(n)}(h);t.sha512=(0,d.wrapConstructor)((function(){return new h})),t.sha512_224=(0,d.wrapConstructor)((function(){return new g})),t.sha512_256=(0,d.wrapConstructor)((function(){return new y})),t.sha384=(0,d.wrapConstructor)((function(){return new v}))},69108:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(17061).default,i=n(17156).default;Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;var s=n(76794);t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)};t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))};t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)};if(t.rotr=function(e,t){return e<<32-t|e>>>t},t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");var c=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");for(var t="",n=0;n=0&&c0&&void 0!==arguments[0]?arguments[0]:32;if(s.crypto&&"function"===typeof s.crypto.getRandomValues)return s.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},74522:function(e,t,n){"use strict";n.r(t),n.d(t,{ACCOUNT_DISCRIMINATOR_SIZE:function(){return bt},AccountClient:function(){return Wn},AnchorError:function(){return qe},AnchorProvider:function(){return Be},BN:function(){return A.a},BorshAccountsCoder:function(){return mt},BorshCoder:function(){return At},BorshEventCoder:function(){return ht},BorshInstructionCoder:function(){return ut},BorshStateCoder:function(){return yt},EventManager:function(){return Yn},EventParser:function(){return Xn},IdlError:function(){return Ze},LangErrorCode:function(){return Ye},LangErrorMessage:function(){return Xe},MethodsBuilderFactory:function(){return la},Native:function(){return ka},Program:function(){return ga},ProgramError:function(){return Qe},ProgramErrorStack:function(){return Ve},StateClient:function(){return Gn},SystemCoder:function(){return dn},eventDiscriminator:function(){return gt},getProvider:function(){return je},parseIdlErrors:function(){return Q},setProvider:function(){return Le},splitArgsAndCtx:function(){return Nn},stateDiscriminator:function(){return vt},toInstruction:function(){return J},translateAddress:function(){return X},translateError:function(){return Je},utils:function(){return Pn},validateAccounts:function(){return Y},web3:function(){return w}});var a=n(88301),o=n(61120),r=n(15861),i=n(84506),s=n(29439),c=n(74165),u=n(37762),d=n(1413),l=n(93433),f=n(45987),p=n(43144),b=n(15671),m=n(97326),h=n(60136),g=n(29388),y=n(98737),v=n(54659),w=n(8594),k=n(43811),A=n.n(k),x=n(70285),I=n.n(x),T=n(35429),S=n(95444),C=n.n(S),E=n(30477),R=n(12930),M=n(5397),P=n(57850),U=n.n(P),_=n(75979),B=n(65218),D=n(54659).Buffer,N=["message"],O=(0,c.Z)().mark(ae),F=(0,c.Z)().mark(oe);function L(e,t){return Array.apply(0,new Array(Math.ceil(e.length/t))).map((function(n,a){return e.slice(a*t,(a+1)*t)}))}var j=Object.freeze({__proto__:null,encode:function(e){return e.reduce((function(e,t){return e+t.toString(16).padStart(2,"0")}),"0x")},decode:function(e){0===e.indexOf("0x")&&(e=e.substr(2)),e.length%2===1&&(e="0"+e);var t=e.match(/.{2}/g);return null===t?v.Buffer.from([]):v.Buffer.from(t.map((function(e){return parseInt(e,16)})))}});function H(e){return new TextDecoder("utf-8").decode(e)}function G(e){return(new TextEncoder).encode(e)}var z=Object.freeze({__proto__:null,decode:H,encode:G});function K(e){return I().encode(e)}var W=Object.freeze({__proto__:null,encode:K,decode:function(e){return I().decode(e)}});function Z(e){return v.Buffer.from(T.toByteArray(e))}var V=Object.freeze({__proto__:null,encode:function(e){return T.fromByteArray(e)},decode:Z}),q=Object.freeze({__proto__:null,hex:j,utf8:z,bs58:W,base64:V});function Q(e){var t=new Map;return e.errors&&e.errors.forEach((function(e){var n,a=null!==(n=e.msg)&&void 0!==n?n:e.name;t.set(e.code,a)})),t}function J(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((function(e){if("accounts"in e)Y(e.accounts,t[e.name]);else if(void 0===t[e.name])throw new Error("Invalid arguments: ".concat(e.name," not provided."))}))}function X(e){return e instanceof w.PublicKey?e:new w.PublicKey(e)}var $=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e,a){var o,r;(0,b.Z)(this,n);var i=e.message,s=(0,f.Z)(e,N),c=e.path,u=0===c.length?i:"At path: "+c.join(".")+" -- "+i;return(o=t.call(this,u)).value=void 0,o.key=void 0,o.type=void 0,o.refinement=void 0,o.path=void 0,o.branch=void 0,o.failures=void 0,Object.assign((0,m.Z)(o),s),o.name=o.constructor.name,o.failures=function(){var t;return null!=(t=r)?t:r=[e].concat((0,l.Z)(a()))},o}return(0,p.Z)(n)}((0,y.Z)(TypeError));function ee(e){return"object"===typeof e&&null!=e}function te(e){return"string"===typeof e?JSON.stringify(e):""+e}function ne(e,t,n,a){if(!0!==e){!1===e?e={}:"string"===typeof e&&(e={message:e});var o=t.path,r=t.branch,i=n.type,s=e,c=s.refinement,u=s.message,l=void 0===u?"Expected a value of type `"+i+"`"+(c?" with refinement `"+c+"`":"")+", but received: `"+te(a)+"`":u;return(0,d.Z)((0,d.Z)({value:a,type:i,refinement:c,key:o[o.length-1],path:o,branch:r},e),{},{message:l})}}function ae(e,t,n,a){var o,r,i,s;return(0,c.Z)().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:ee(d=e)&&"function"===typeof d[Symbol.iterator]||(e=[e]),o=(0,u.Z)(e),c.prev=2,o.s();case 4:if((r=o.n()).done){c.next=12;break}if(i=r.value,!(s=ne(i,t,n,a))){c.next=10;break}return c.next=10,s;case 10:c.next=4;break;case 12:c.next=17;break;case 14:c.prev=14,c.t0=c.catch(2),o.e(c.t0);case 17:return c.prev=17,o.f(),c.finish(17);case 20:case"end":return c.stop()}var d}),O,null,[[2,14,17,20]])}function oe(e,t,n){var a,o,r,i,d,f,p,b,m,h,g,y,v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B;return(0,c.Z)().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(void 0===n&&(n={}),o=(a=n).path,r=void 0===o?[]:o,i=a.branch,d=void 0===i?[e]:i,f=a.coerce,p=void 0!==f&&f,b=a.mask,m=void 0!==b&&b,h={path:r,branch:d},p&&(e=t.coercer(e,h),m&&"type"!==t.type&&ee(t.schema)&&ee(e)&&!Array.isArray(e)))for(g in e)void 0===t.schema[g]&&delete e[g];y=!0,v=(0,u.Z)(t.validator(e,h)),c.prev=6,v.s();case 8:if((w=v.n()).done){c.next=15;break}return k=w.value,y=!1,c.next=13,[k,void 0];case 13:c.next=8;break;case 15:c.next=20;break;case 17:c.prev=17,c.t0=c.catch(6),v.e(c.t0);case 20:return c.prev=20,v.f(),c.finish(20);case 23:A=(0,u.Z)(t.entries(e,h)),c.prev=24,A.s();case 26:if((x=A.n()).done){c.next=53;break}I=(0,s.Z)(x.value,3),T=I[0],S=I[1],C=I[2],E=oe(S,C,{path:void 0===T?r:[].concat((0,l.Z)(r),[T]),branch:void 0===T?d:[].concat((0,l.Z)(d),[S]),coerce:p,mask:m}),R=(0,u.Z)(E),c.prev=30,R.s();case 32:if((M=R.n()).done){c.next=43;break}if(!(P=M.value)[0]){c.next=40;break}return y=!1,c.next=38,[P[0],void 0];case 38:c.next=41;break;case 40:p&&(S=P[1],void 0===T?e=S:e instanceof Map?e.set(T,S):e instanceof Set?e.add(S):ee(e)&&(e[T]=S));case 41:c.next=32;break;case 43:c.next=48;break;case 45:c.prev=45,c.t1=c.catch(30),R.e(c.t1);case 48:return c.prev=48,R.f(),c.finish(48);case 51:c.next=26;break;case 53:c.next=58;break;case 55:c.prev=55,c.t2=c.catch(24),A.e(c.t2);case 58:return c.prev=58,A.f(),c.finish(58);case 61:if(!y){c.next=80;break}U=(0,u.Z)(t.refiner(e,h)),c.prev=63,U.s();case 65:if((_=U.n()).done){c.next=72;break}return B=_.value,y=!1,c.next=70,[B,void 0];case 70:c.next=65;break;case 72:c.next=77;break;case 74:c.prev=74,c.t3=c.catch(63),U.e(c.t3);case 77:return c.prev=77,U.f(),c.finish(77);case 80:if(!y){c.next=83;break}return c.next=83,[void 0,e];case 83:case"end":return c.stop()}}),F,null,[[6,17,20,23],[24,55,58,61],[30,45,48,51],[63,74,77,80]])}var re=function(){function e(t){var n=this;(0,b.Z)(this,e),this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;var a=t.type,o=t.schema,r=t.validator,i=t.refiner,s=t.coercer,u=void 0===s?function(e){return e}:s,d=t.entries,l=void 0===d?(0,c.Z)().mark((function e(){return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})):d;this.type=a,this.schema=o,this.entries=l,this.coercer=u,this.validator=r?function(e,t){return ae(r(e,t),t,n,e)}:function(){return[]},this.refiner=i?function(e,t){return ae(i(e,t),t,n,e)}:function(){return[]}}return(0,p.Z)(e,[{key:"assert",value:function(e){return function(e,t){var n=ce(e,t);if(n[0])throw n[0]}(e,this)}},{key:"create",value:function(e){return ie(e,this)}},{key:"is",value:function(e){return se(e,this)}},{key:"mask",value:function(e){return function(e,t){var n=ce(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}(e,this)}},{key:"validate",value:function(e,t){return void 0===t&&(t={}),ce(e,this,t)}}]),e}();function ie(e,t){var n=ce(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function se(e,t){return!ce(e,t)[0]}function ce(e,t,n){void 0===n&&(n={});var a=oe(e,t,n),o=function(e){var t=e.next(),n=t.done,a=t.value;return n?void 0:a}(a);return o[0]?[new $(o[0],(0,c.Z)().mark((function e(){var t,n,o;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=(0,u.Z)(a),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(!(o=n.value)[0]){e.next=8;break}return e.next=8,o[0];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])}))),void 0]:[void 0,o[1]]}function ue(e,t){return new re({type:e,schema:null,validator:t})}function de(e){return new re({type:"array",schema:e,entries:(0,c.Z)().mark((function t(n){var a,o,r,i,d;return(0,c.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e||!Array.isArray(n)){t.next=18;break}a=(0,u.Z)(n.entries()),t.prev=2,a.s();case 4:if((o=a.n()).done){t.next=10;break}return r=(0,s.Z)(o.value,2),i=r[0],d=r[1],t.next=8,[i,d,e];case 8:t.next=4;break;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(2),a.e(t.t0);case 15:return t.prev=15,a.f(),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[2,12,15,18]])})),coercer:function(e){return Array.isArray(e)?e.slice():e},validator:function(e){return Array.isArray(e)||"Expected an array value, but received: "+te(e)}})}function le(e){var t=te(e),n=typeof e;return new re({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:function(n){return n===e||"Expected the literal `"+t+"`, but received: "+te(n)}})}function fe(e){return new re((0,d.Z)((0,d.Z)({},e),{},{validator:function(t,n){return null===t||e.validator(t,n)},refiner:function(t,n){return null===t||e.refiner(t,n)}}))}function pe(){return ue("number",(function(e){return"number"===typeof e&&!isNaN(e)||"Expected a number, but received: "+te(e)}))}function be(e){return new re((0,d.Z)((0,d.Z)({},e),{},{validator:function(t,n){return void 0===t||e.validator(t,n)},refiner:function(t,n){return void 0===t||e.refiner(t,n)}}))}function me(){return ue("string",(function(e){return"string"===typeof e||"Expected a string, but received: "+te(e)}))}function he(e){var t=Object.keys(e);return new re({type:"type",schema:e,entries:(0,c.Z)().mark((function n(a){var o,r,i;return(0,c.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!ee(a)){n.next=9;break}o=0,r=t;case 2:if(!(o0&&n.sign.apply(n,(0,l.Z)(a)),i=n._compile(),s=i.serialize(),u=n._serialize(s),d=u.toString("base64"),f={encoding:"base64",commitment:null!==o&&void 0!==o?o:t.commitment},r&&(p=(Array.isArray(r)?r:i.nonProgramIds()).map((function(e){return e.toBase58()})),f.accounts={encoding:"base64",addresses:p}),a&&(f.sigVerify=!0),b=[d,f],e.next=11,t._rpcRequest("simulateTransaction",b);case 11:if(m=e.sent,!("error"in(h=ie(m,Ue)))){e.next=16;break}throw"data"in h.error&&(g=h.error.data.logs)&&Array.isArray(g)&&(v=(y="\n ")+g.join(y),B.error(h.error.message,v)),new w.SendTransactionError("failed to simulate transaction: "+h.error.message,g);case 16:return e.abrupt("return",h.result);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ee(e){return function(e,t,n){return new re((0,d.Z)((0,d.Z)({},e),{},{coercer:function(a,o){return se(a,t)?e.coercer(n(a,o),o):e.coercer(a,o)}}))}(Me(e),Re,(function(t){return"error"in t?t:(0,d.Z)((0,d.Z)({},t),{},{result:ie(t.result,e)})}))}var Re=Me(ye());function Me(e){return ge([he({jsonrpc:le("2.0"),id:me(),result:e}),he({jsonrpc:le("2.0"),id:me(),error:he({code:ye(),message:me(),data:be(ue("any",(function(){return!0})))})})])}var Pe,Ue=(Pe=he({err:fe(ge([he({}),me()])),logs:fe(de(me())),accounts:be(fe(de(fe(he({executable:ue("boolean",(function(e){return"boolean"===typeof e})),owner:me(),lamports:pe(),data:de(me()),rentEpoch:be(pe())}))))),unitsConsumed:be(pe())}),Ee(he({context:he({slot:pe()}),value:Pe}))),_e=Object.freeze({__proto__:null,invoke:function(e,t,n,a){return ve.apply(this,arguments)},getMultipleAccounts:function(e,t,n){return ke.apply(this,arguments)},getMultipleAccountsAndContext:Ae,simulateTransaction:Se}),Be=function(){function e(t,n,a){(0,b.Z)(this,e),this.connection=t,this.wallet=n,this.opts=a,this.publicKey=null===n||void 0===n?void 0:n.publicKey}return(0,p.Z)(e,[{key:"sendAndConfirm",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t,n,a){var o,r,i,s;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===a&&(a=this.opts),t.feePayer=t.feePayer||this.wallet.publicKey,e.next=4,this.connection.getLatestBlockhash(a.preflightCommitment);case 4:return t.recentBlockhash=e.sent.blockhash,e.next=7,this.wallet.signTransaction(t);case 7:return t=e.sent,(null!==n&&void 0!==n?n:[]).forEach((function(e){t.partialSign(e)})),r=t.serialize(),e.prev=10,e.next=13,Ne(this.connection,r,a);case 13:return e.abrupt("return",e.sent);case 16:if(e.prev=16,e.t0=e.catch(10),!(e.t0 instanceof Fe)){e.next=30;break}return e.next=21,this.connection.getTransaction(K(t.signature),{commitment:"confirmed"});case 21:if(i=e.sent){e.next=26;break}throw e.t0;case 26:throw(s=null===(o=i.meta)||void 0===o?void 0:o.logMessages)?new w.SendTransactionError(e.t0.message,s):e.t0;case 28:e.next=31;break;case 30:throw e.t0;case 31:case"end":return e.stop()}}),e,this,[[10,16]])})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"sendAll",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a,o,r,i,s,u,d,l,f,p,b=this;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n=this.opts),e.next=3,this.connection.getLatestBlockhash(n.preflightCommitment);case 3:return o=e.sent,r=t.map((function(e){var t,n=e.tx,a=null!==(t=e.signers)&&void 0!==t?t:[];return n.feePayer=n.feePayer||b.wallet.publicKey,n.recentBlockhash=o.blockhash,a.forEach((function(e){n.partialSign(e)})),n})),e.next=7,this.wallet.signAllTransactions(r);case 7:i=e.sent,s=[],u=0;case 10:if(!(u1)return null;a=s[0].match(/([0-9]+)/g)[0]}try{o=parseInt(a)}catch(u){return null}var c=t.get(o);return void 0!==c||void 0!==(c=Xe.get(o))?new n(o,c,e.logs):null}}]),n}((0,y.Z)(Error));function Je(e,t){Ke("debug-logs")&&B.log("Translating error:",e);var n=qe.parse(e.logs);if(n)return n;var a=Qe.parse(e,t);if(a)return a;if(e.logs){var o={get:function(t,n){return"programErrorStack"===n?t.programErrorStack.stack:"program"===n?t.programErrorStack.stack[e.programErrorStack.stack.length-1]:Reflect.get.apply(Reflect,arguments)}};return e.programErrorStack=Ve.parse(e.logs),new Proxy(e,o)}return e}var Ye={InstructionMissing:100,InstructionFallbackNotFound:101,InstructionDidNotDeserialize:102,InstructionDidNotSerialize:103,IdlInstructionStub:1e3,IdlInstructionInvalidProgram:1001,ConstraintMut:2e3,ConstraintHasOne:2001,ConstraintSigner:2002,ConstraintRaw:2003,ConstraintOwner:2004,ConstraintRentExempt:2005,ConstraintSeeds:2006,ConstraintExecutable:2007,ConstraintState:2008,ConstraintAssociated:2009,ConstraintAssociatedInit:2010,ConstraintClose:2011,ConstraintAddress:2012,ConstraintZero:2013,ConstraintTokenMint:2014,ConstraintTokenOwner:2015,ConstraintMintMintAuthority:2016,ConstraintMintFreezeAuthority:2017,ConstraintMintDecimals:2018,ConstraintSpace:2019,ConstraintAccountIsNone:2020,RequireViolated:2500,RequireEqViolated:2501,RequireKeysEqViolated:2502,RequireNeqViolated:2503,RequireKeysNeqViolated:2504,RequireGtViolated:2505,RequireGteViolated:2506,AccountDiscriminatorAlreadySet:3e3,AccountDiscriminatorNotFound:3001,AccountDiscriminatorMismatch:3002,AccountDidNotDeserialize:3003,AccountDidNotSerialize:3004,AccountNotEnoughKeys:3005,AccountNotMutable:3006,AccountOwnedByWrongProgram:3007,InvalidProgramId:3008,InvalidProgramExecutable:3009,AccountNotSigner:3010,AccountNotSystemOwned:3011,AccountNotInitialized:3012,AccountNotProgramData:3013,AccountNotAssociatedTokenAccount:3014,AccountSysvarMismatch:3015,AccountReallocExceedsLimit:3016,AccountDuplicateReallocs:3017,StateInvalidAddress:4e3,DeclaredProgramIdMismatch:4100,Deprecated:5e3},Xe=new Map([[Ye.InstructionMissing,"8 byte instruction identifier not provided"],[Ye.InstructionFallbackNotFound,"Fallback functions are not supported"],[Ye.InstructionDidNotDeserialize,"The program could not deserialize the given instruction"],[Ye.InstructionDidNotSerialize,"The program could not serialize the given instruction"],[Ye.IdlInstructionStub,"The program was compiled without idl instructions"],[Ye.IdlInstructionInvalidProgram,"The transaction was given an invalid program for the IDL instruction"],[Ye.ConstraintMut,"A mut constraint was violated"],[Ye.ConstraintHasOne,"A has one constraint was violated"],[Ye.ConstraintSigner,"A signer constraint was violated"],[Ye.ConstraintRaw,"A raw constraint was violated"],[Ye.ConstraintOwner,"An owner constraint was violated"],[Ye.ConstraintRentExempt,"A rent exemption constraint was violated"],[Ye.ConstraintSeeds,"A seeds constraint was violated"],[Ye.ConstraintExecutable,"An executable constraint was violated"],[Ye.ConstraintState,"A state constraint was violated"],[Ye.ConstraintAssociated,"An associated constraint was violated"],[Ye.ConstraintAssociatedInit,"An associated init constraint was violated"],[Ye.ConstraintClose,"A close constraint was violated"],[Ye.ConstraintAddress,"An address constraint was violated"],[Ye.ConstraintZero,"Expected zero account discriminant"],[Ye.ConstraintTokenMint,"A token mint constraint was violated"],[Ye.ConstraintTokenOwner,"A token owner constraint was violated"],[Ye.ConstraintMintMintAuthority,"A mint mint authority constraint was violated"],[Ye.ConstraintMintFreezeAuthority,"A mint freeze authority constraint was violated"],[Ye.ConstraintMintDecimals,"A mint decimals constraint was violated"],[Ye.ConstraintSpace,"A space constraint was violated"],[Ye.ConstraintAccountIsNone,"A required account for the constraint is None"],[Ye.RequireViolated,"A require expression was violated"],[Ye.RequireEqViolated,"A require_eq expression was violated"],[Ye.RequireKeysEqViolated,"A require_keys_eq expression was violated"],[Ye.RequireNeqViolated,"A require_neq expression was violated"],[Ye.RequireKeysNeqViolated,"A require_keys_neq expression was violated"],[Ye.RequireGtViolated,"A require_gt expression was violated"],[Ye.RequireGteViolated,"A require_gte expression was violated"],[Ye.AccountDiscriminatorAlreadySet,"The account discriminator was already set on this account"],[Ye.AccountDiscriminatorNotFound,"No 8 byte discriminator was found on the account"],[Ye.AccountDiscriminatorMismatch,"8 byte discriminator did not match what was expected"],[Ye.AccountDidNotDeserialize,"Failed to deserialize the account"],[Ye.AccountDidNotSerialize,"Failed to serialize the account"],[Ye.AccountNotEnoughKeys,"Not enough account keys given to the instruction"],[Ye.AccountNotMutable,"The given account is not mutable"],[Ye.AccountOwnedByWrongProgram,"The given account is owned by a different program than expected"],[Ye.InvalidProgramId,"Program ID was not as expected"],[Ye.InvalidProgramExecutable,"Program account is not executable"],[Ye.AccountNotSigner,"The given account did not sign"],[Ye.AccountNotSystemOwned,"The given account is not owned by the system program"],[Ye.AccountNotInitialized,"The program expected this account to be already initialized"],[Ye.AccountNotProgramData,"The given account is not a program data account"],[Ye.AccountNotAssociatedTokenAccount,"The given account is not the associated token account"],[Ye.AccountSysvarMismatch,"The given public key does not match the required sysvar"],[Ye.AccountReallocExceedsLimit,"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit"],[Ye.AccountDuplicateReallocs,"The account was duplicated for more than one reallocation"],[Ye.StateInvalidAddress,"The given state account does not have the correct address"],[Ye.DeclaredProgramIdMismatch,"The declared program id does not match the actual program id"],[Ye.Deprecated,"The API being used is deprecated and should no longer be used"]]),$e=function(){return $e=Object.assign||function(e){for(var t,n=1,a=arguments.length;n1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0;if("struct"===t.type.kind){var o=t.type.fields.map((function(t){return e.fieldLayout(t,n)}));return R.struct(o,a)}if("enum"===t.type.kind){var r=t.type.variants.map((function(t){var a=C()(t.name);if(void 0===t.fields)return R.struct([],a);var o=t.fields.map((function(t,a){return t.hasOwnProperty("name")?e.fieldLayout(t,n):e.fieldLayout({type:t,name:a.toString()},n)}));return R.struct(o,a)}));return void 0!==a?R.rustEnum(r).replicate(a):R.rustEnum(r,a)}throw new Error("Unknown type kint: ".concat(t))}}]),e}(),st="state",ct="global",ut=function(){function e(t){var n=this;(0,b.Z)(this,e),this.idl=t,this.ixLayout=e.parseIxLayout(t);var a=new Map;t.instructions.forEach((function(e){var t=lt(ct,e.name);a.set(I().encode(t),{layout:n.ixLayout.get(e.name),name:e.name})})),t.state&&t.state.methods.map((function(e){var t=lt(st,e.name);a.set(I().encode(t),{layout:n.ixLayout.get(e.name),name:e.name})})),this.sighashLayouts=a}return(0,p.Z)(e,[{key:"encode",value:function(e,t){return this._encode(ct,e,t)}},{key:"encodeState",value:function(e,t){return this._encode(st,e,t)}},{key:"_encode",value:function(e,t,n){var a=v.Buffer.alloc(1e3),o=C()(t),r=this.ixLayout.get(o);if(!r)throw new Error("Unknown method: ".concat(o));var i=r.encode(n,a),s=a.slice(0,i);return v.Buffer.concat([lt(e,t),s])}},{key:"decode",value:function(e){"string"===typeof e&&(e="hex"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hex")?v.Buffer.from(e,"hex"):I().decode(e));var t=I().encode(e.slice(0,8)),n=e.slice(8),a=this.sighashLayouts.get(t);return a?{data:a.layout.decode(n),name:a.name}:null}},{key:"format",value:function(e,t){return dt.format(e,t,this.idl)}}],[{key:"parseIxLayout",value:function(e){var t=(e.state?e.state.methods:[]).map((function(t){var n=t.args.map((function(t){var n,a;return it.fieldLayout(t,Array.from([].concat((0,l.Z)(null!==(n=e.accounts)&&void 0!==n?n:[]),(0,l.Z)(null!==(a=e.types)&&void 0!==a?a:[]))))})),a=C()(t.name);return[a,R.struct(n,a)]})).concat(e.instructions.map((function(t){var n=t.args.map((function(t){var n,a;return it.fieldLayout(t,Array.from([].concat((0,l.Z)(null!==(n=e.accounts)&&void 0!==n?n:[]),(0,l.Z)(null!==(a=e.types)&&void 0!==a?a:[]))))})),a=C()(t.name);return[a,R.struct(n,a)]})));return new Map(t)}}]),e}(),dt=function(){function e(){(0,b.Z)(this,e)}return(0,p.Z)(e,null,[{key:"format",value:function(t,n,a){var o=a.instructions.filter((function(e){return t.name===e.name}))[0];if(void 0===o)return B.error("Invalid instruction given"),null;var r=o.args.map((function(n){return{name:n.name,type:e.formatIdlType(n.type),data:e.formatIdlData(n,t.data[n.name],a.types)}})),i=e.flattenIdlAccounts(o.accounts);return{args:r,accounts:n.map((function(e,t){return t");if("option"in e)return"Option<".concat(this.formatIdlType(e.option),">");if("defined"in e)return e.defined;if("array"in e)return"Array<".concat(e.array[0],"; ").concat(e.array[1],">");throw new Error("Unknown IDL type: ".concat(e))}},{key:"formatIdlData",value:function(t,n,a){var o=this;if("string"===typeof t.type)return n.toString();if(t.type.hasOwnProperty("vec"))return"["+n.map((function(e){return o.formatIdlData({name:"",type:t.type.vec},e)})).join(", ")+"]";if(t.type.hasOwnProperty("option"))return null===n?"null":this.formatIdlData({name:"",type:t.type.option},n,a);if(t.type.hasOwnProperty("defined")){if(void 0===a)throw new Error("User defined types not provided");var r=a.filter((function(e){return e.name===t.type.defined}));if(1!==r.length)throw new Error("Type not found: ".concat(t.type.defined));return e.formatIdlDataDefined(r[0],n,a)}return"unknown"}},{key:"formatIdlDataDefined",value:function(t,n,a){if("struct"===t.type.kind){var o=t.type;return"{ "+Object.keys(n).map((function(t){var r=o.fields.filter((function(e){return e.name===t}))[0];if(void 0===r)throw new Error("Unable to find type");return t+": "+e.formatIdlData(r,n[t],a)})).join(", ")+" }"}if(0===t.type.variants.length)return"{}";if(t.type.variants[0].name){var r=t.type.variants,i=Object.keys(n)[0],s=n[i],c=Object.keys(s).map((function(t){var n,o=s[t],c=null===(n=r[i])||void 0===n?void 0:n.filter((function(e){return e.name===t}))[0];if(void 0===c)throw new Error("Unable to find variant");return t+": "+e.formatIdlData(c,o,a)})).join(", "),u=C()(i,{pascalCase:!0});return 0===c.length?u:"".concat(u," { ").concat(c," }")}return"Tuple formatting not yet implemented"}},{key:"flattenIdlAccounts",value:function(t,n){return t.map((function(t){var a=function(e){var t=e.replace(/([A-Z])/g," $1");return t.charAt(0).toUpperCase()+t.slice(1)}(t.name);if(t.hasOwnProperty("accounts")){var o=n?"".concat(n," > ").concat(a):a;return e.flattenIdlAccounts(t.accounts,o)}return(0,d.Z)((0,d.Z)({},t),{},{name:n?"".concat(n," > ").concat(a):a})})).flat()}}]),e}();function lt(e,t){var n,a=(void 0===n&&(n={}),rt(t,$e({delimiter:"_"},n))),o="".concat(e,":").concat(a);return v.Buffer.from(E.sha256.digest(o)).slice(0,8)}function ft(e,t){if("enum"===t.type.kind){var n=t.type.variants.map((function(t){return void 0===t.fields?0:t.fields.map((function(t){if("object"!==typeof t||!("name"in t))throw new Error("Tuple enum variants not yet implemented.");return pt(e,t.type)})).reduce((function(e,t){return e+t}))}));return Math.max.apply(Math,(0,l.Z)(n))+1}return void 0===t.type.fields?0:t.type.fields.map((function(t){return pt(e,t.type)})).reduce((function(e,t){return e+t}),0)}function pt(e,t){var n,a;switch(t){case"bool":case"u8":case"i8":case"bytes":case"string":return 1;case"i16":case"u16":return 2;case"u32":case"i32":case"f32":return 4;case"u64":case"i64":case"f64":return 8;case"u128":case"i128":return 16;case"u256":case"i256":case"publicKey":return 32;default:if("vec"in t)return 1;if("option"in t)return 1+pt(e,t.option);if("coption"in t)return 4+pt(e,t.coption);if("defined"in t){var o=null!==(a=null===(n=e.types)||void 0===n?void 0:n.filter((function(e){return e.name===t.defined})))&&void 0!==a?a:[];if(1!==o.length)throw new Ze("Type not found: ".concat(JSON.stringify(t)));return ft(e,o[0])}if("array"in t){var r=t.array[0],i=t.array[1];return pt(e,r)*i}throw new Error("Invalid type ".concat(JSON.stringify(t)))}}var bt=8,mt=function(){function e(t){if((0,b.Z)(this,e),void 0!==t.accounts){var n=t.accounts.map((function(e){return[e.name,it.typeDefLayout(e,t.types)]}));this.accountLayouts=new Map(n),this.idl=t}else this.accountLayouts=new Map}return(0,p.Z)(e,[{key:"encode",value:function(){var t=(0,r.Z)((0,c.Z)().mark((function t(n,a){var o,r,i,s,u;return(0,c.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=v.Buffer.alloc(1e3),r=this.accountLayouts.get(n)){t.next=4;break}throw new Error("Unknown account: ".concat(n));case 4:return i=r.encode(a,o),s=o.slice(0,i),u=e.accountDiscriminator(n),t.abrupt("return",v.Buffer.concat([u,s]));case 8:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"decode",value:function(t,n){if(e.accountDiscriminator(t).compare(n.slice(0,8)))throw new Error("Invalid account discriminator");return this.decodeUnchecked(t,n)}},{key:"decodeAny",value:function(t){var n=t.slice(0,8),a=Array.from(this.accountLayouts.keys()).find((function(t){return e.accountDiscriminator(t).equals(n)}));if(!a)throw new Error("Account descriminator not found");return this.decodeUnchecked(a,t)}},{key:"decodeUnchecked",value:function(e,t){var n=t.slice(bt),a=this.accountLayouts.get(e);if(!a)throw new Error("Unknown account: ".concat(e));return a.decode(n)}},{key:"memcmp",value:function(t,n){var a=e.accountDiscriminator(t);return{offset:0,bytes:I().encode(n?v.Buffer.concat([a,n]):a)}}},{key:"size",value:function(e){var t;return bt+(null!==(t=ft(this.idl,e))&&void 0!==t?t:0)}}],[{key:"accountDiscriminator",value:function(e){return v.Buffer.from(E.sha256.digest("account:".concat(C()(e,{pascalCase:!0,preserveConsecutiveUppercase:!0})))).slice(0,bt)}}]),e}(),ht=function(){function e(t){if((0,b.Z)(this,e),void 0!==t.events){var n=t.events.map((function(e){var n={name:e.name,type:{kind:"struct",fields:e.fields.map((function(e){return{name:e.name,type:e.type}}))}};return[e.name,it.typeDefLayout(n,t.types)]}));this.layouts=new Map(n),this.discriminators=new Map(void 0===t.events?[]:t.events.map((function(e){return[T.fromByteArray(gt(e.name)),e.name]})))}else this.layouts=new Map}return(0,p.Z)(e,[{key:"decode",value:function(e){var t;try{t=v.Buffer.from(T.toByteArray(e))}catch(r){return null}var n=T.fromByteArray(t.slice(0,8)),a=this.discriminators.get(n);if(void 0===a)return null;var o=this.layouts.get(a);if(!o)throw new Error("Unknown event: ".concat(a));return{data:o.decode(t.slice(8)),name:a}}}]),e}();function gt(e){return v.Buffer.from(E.sha256.digest("event:".concat(e))).slice(0,8)}var yt=function(){function e(t){if((0,b.Z)(this,e),void 0===t.state)throw new Error("Idl state not defined.");this.layout=it.typeDefLayout(t.state.struct,t.types)}return(0,p.Z)(e,[{key:"encode",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a,o,r,i;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=v.Buffer.alloc(1e3),o=this.layout.encode(n,a),e.next=4,vt(t);case 4:return r=e.sent,i=a.slice(0,o),e.abrupt("return",v.Buffer.concat([r,i]));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"decode",value:function(e){var t=e.slice(8);return this.layout.decode(t)}}]),e}();function vt(e){return wt.apply(this,arguments)}function wt(){return(wt=(0,r.Z)((0,c.Z)().mark((function e(t){var n;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Ke("anchor-deprecated-state")?"account":"state",e.abrupt("return",v.Buffer.from(E.sha256.digest("".concat(n,":").concat(t))).slice(0,8));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var kt=function(){function e(t){if((0,b.Z)(this,e),void 0!==t.types){var n=t.types.map((function(e){return[e.name,it.typeDefLayout(e,t.types)]}));this.typeLayouts=new Map(n),this.idl=t}else this.typeLayouts=new Map}return(0,p.Z)(e,[{key:"encode",value:function(e,t){var n=v.Buffer.alloc(1e3),a=this.typeLayouts.get(e);if(!a)throw new Error("Unknown type: ".concat(e));var o=a.encode(t,n);return n.slice(0,o)}},{key:"decode",value:function(e,t){var n=this.typeLayouts.get(e);if(!n)throw new Error("Unknown type: ".concat(e));return n.decode(t)}}]),e}(),At=(0,p.Z)((function e(t){(0,b.Z)(this,e),this.instruction=new ut(t),this.accounts=new mt(t),this.events=new ht(t),t.state&&(this.state=new yt(t)),this.types=new kt(t)})),xt="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{};function It(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tt=function(){function e(t,n){if((0,b.Z)(this,e),!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=n}return(0,p.Z)(e,[{key:"makeDestinationObject",value:function(){return{}}},{key:"decode",value:function(e,t){throw new Error("Layout is abstract")}},{key:"encode",value:function(e,t,n){throw new Error("Layout is abstract")}},{key:"getSpan",value:function(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}},{key:"replicate",value:function(e){var t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}},{key:"fromArray",value:function(e){}}]),e}(),St=Tt;var Ct=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(){return(0,b.Z)(this,n),t.apply(this,arguments)}return(0,p.Z)(n,[{key:"isCount",value:function(){throw new Error("ExternalLayout is abstract")}}]),n}(Tt),Et=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e,a,o){var r;if((0,b.Z)(this,n),!(e instanceof Tt))throw new TypeError("layout must be a Layout");if(void 0===a)a=0;else if(!Number.isInteger(a))throw new TypeError("offset must be integer or undefined");return(r=t.call(this,e.span,o||e.property)).layout=e,r.offset=a,r}return(0,p.Z)(n,[{key:"isCount",value:function(){return this.layout instanceof Rt||this.layout instanceof Mt}},{key:"decode",value:function(e,t){return void 0===t&&(t=0),this.layout.decode(e,t+this.offset)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),this.layout.encode(e,t,n+this.offset)}}]),n}(Ct),Rt=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e,a){var o;if((0,b.Z)(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return o}return(0,p.Z)(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readUIntLE(t,this.span)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeUIntLE(e,n,this.span),this.span}}]),n}(Tt),Mt=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e,a){var o;if((0,b.Z)(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return o}return(0,p.Z)(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readUIntBE(t,this.span)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeUIntBE(e,n,this.span),this.span}}]),n}(Tt),Pt=Math.pow(2,32);function Ut(e){var t=Math.floor(e/Pt);return{hi32:t,lo32:e-t*Pt}}function _t(e,t){return e*Pt+t}var Bt=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e){return(0,b.Z)(this,n),t.call(this,8,e)}return(0,p.Z)(n,[{key:"decode",value:function(e,t){void 0===t&&(t=0);var n=e.readUInt32LE(t);return _t(e.readUInt32LE(t+4),n)}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=Ut(e);return t.writeUInt32LE(a.lo32,n),t.writeUInt32LE(a.hi32,n+4),8}}]),n}(Tt),Dt=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e){return(0,b.Z)(this,n),t.call(this,8,e)}return(0,p.Z)(n,[{key:"decode",value:function(e,t){void 0===t&&(t=0);var n=e.readUInt32LE(t);return _t(e.readInt32LE(t+4),n)}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=Ut(e);return t.writeUInt32LE(a.lo32,n),t.writeInt32LE(a.hi32,n+4),8}}]),n}(Tt),Nt=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e,a,o){var r;if((0,b.Z)(this,n),!Array.isArray(e)||!e.reduce((function(e,t){return e&&t instanceof Tt}),!0))throw new TypeError("fields must be array of Layout instances");"boolean"===typeof a&&void 0===o&&(o=a,a=void 0);var i,s=(0,u.Z)(e);try{for(s.s();!(i=s.n()).done;){var c=i.value;if(0>c.span&&void 0===c.property)throw new Error("fields cannot contain unnamed variable-length layout")}}catch(l){s.e(l)}finally{s.f()}var d=-1;try{d=e.reduce((function(e,t){return e+t.getSpan()}),0)}catch(f){}return(r=t.call(this,d,a)).fields=e,r.decodePrefixes=!!o,r}return(0,p.Z)(n,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var n=0;try{n=this.fields.reduce((function(n,a){var o=a.getSpan(e,t);return t+=o,n+o}),0)}catch(a){throw new RangeError("indeterminate span")}return n}},{key:"decode",value:function(e,t){void 0===t&&(t=0);var n,a=this.makeDestinationObject(),o=(0,u.Z)(this.fields);try{for(o.s();!(n=o.n()).done;){var r=n.value;if(void 0!==r.property&&(a[r.property]=r.decode(e,t)),t+=r.getSpan(e,t),this.decodePrefixes&&e.length===t)break}}catch(i){o.e(i)}finally{o.f()}return a}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a,o=n,r=0,i=0,s=(0,u.Z)(this.fields);try{for(s.s();!(a=s.n()).done;){var c=a.value,d=c.span;if(i=0d&&(d=c.getSpan(t,n)))}r=n,n+=d}}catch(f){s.e(f)}finally{s.f()}return r+i-o}},{key:"fromArray",value:function(e){var t,n=this.makeDestinationObject(),a=(0,u.Z)(this.fields);try{for(a.s();!(t=a.n()).done;){var o=t.value;void 0!==o.property&&0o.span?n=-1:0<=n&&(n+=o.span)}}catch(r){a.e(r)}finally{a.f()}}}]),n}(Tt),Ot=function(){function e(t){(0,b.Z)(this,e),this.property=t}return(0,p.Z)(e,[{key:"decode",value:function(){throw new Error("UnionDiscriminator is abstract")}},{key:"encode",value:function(){throw new Error("UnionDiscriminator is abstract")}}]),e}(),Ft=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e,a){var o;if((0,b.Z)(this,n),!(e instanceof Ct&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");return(o=t.call(this,a||e.property||"variant")).layout=e,o}return(0,p.Z)(n,[{key:"decode",value:function(e,t){return this.layout.decode(e,t)}},{key:"encode",value:function(e,t,n){return this.layout.encode(e,t,n)}}]),n}(Ot),Lt=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e,a,o){var r;(0,b.Z)(this,n);var i=e instanceof Rt||e instanceof Mt;if(i)e=new Ft(new Et(e));else if(e instanceof Ct&&e.isCount())e=new Ft(e);else if(!(e instanceof Ot))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===a&&(a=null),!(null===a||a instanceof Tt))throw new TypeError("defaultLayout must be null or a Layout");if(null!==a){if(0>a.span)throw new Error("defaultLayout must have constant span");void 0===a.property&&(a=a.replicate("content"))}var s=-1;a&&0<=(s=a.span)&&i&&(s+=e.layout.span),(r=t.call(this,s,o)).discriminator=e,r.usesPrefixDiscriminator=i,r.defaultLayout=a,r.registry={};var c=r.defaultGetSourceVariant.bind((0,m.Z)(r));return r.getSourceVariant=function(e){return c(e)},r.configGetSourceVariant=function(e){c=e.bind(this)},r}return(0,p.Z)(n,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}},{key:"defaultGetSourceVariant",value:function(e){if(e.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&e.hasOwnProperty(this.defaultLayout.property))return;var t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||e.hasOwnProperty(t.property)))return t}else for(var n in this.registry){var a=this.registry[n];if(e.hasOwnProperty(a.property))return a}throw new Error("unable to infer src variant")}},{key:"decode",value:function(e,t){var n;void 0===t&&(t=0);var a=this.discriminator,o=a.decode(e,t),r=this.registry[o];if(void 0===r){var i=0;r=this.defaultLayout,this.usesPrefixDiscriminator&&(i=a.layout.span),(n=this.makeDestinationObject())[a.property]=o,n[r.property]=this.defaultLayout.decode(e,t+i)}else n=r.decode(e,t);return n}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=this.getSourceVariant(e);if(void 0===a){var o=this.discriminator,r=this.defaultLayout,i=0;return this.usesPrefixDiscriminator&&(i=o.layout.span),o.encode(e[o.property],t,n),i+r.encode(e[r.property],t,n+i)}return a.encode(e,t,n)}},{key:"addVariant",value:function(e,t,n){var a=new jt(this,e,t,n);return this.registry[e]=a,a}},{key:"getVariant",value:function(e,t){var n=e;return D.isBuffer(e)&&(void 0===t&&(t=0),n=this.discriminator.decode(e,t)),this.registry[n]}}]),n}(Tt),jt=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e,a,o,r){var i;if((0,b.Z)(this,n),!(e instanceof Lt))throw new TypeError("union must be a Union");if(!Number.isInteger(a)||0>a)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof o&&void 0===r&&(r=o,o=null),o){if(!(o instanceof Tt))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=o.span&&o.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof r)throw new TypeError("variant must have a String property")}var s=e.span;return 0>e.span&&0<=(s=o?o.span:0)&&e.usesPrefixDiscriminator&&(s+=e.discriminator.layout.span),(i=t.call(this,s,r)).union=e,i.variant=a,i.layout=o||null,i}return(0,p.Z)(n,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),n+this.layout.getSpan(e,t+n)}},{key:"decode",value:function(e,t){var n=this.makeDestinationObject();if(void 0===t&&(t=0),this!==this.union.getVariant(e,t))throw new Error("variant mismatch");var a=0;return this.union.usesPrefixDiscriminator&&(a=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+a):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=0;if(this.union.usesPrefixDiscriminator&&(a=this.union.discriminator.layout.span),this.layout&&!e.hasOwnProperty(this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);var o=a;if(this.layout&&(this.layout.encode(e[this.property],t,n+a),o+=this.layout.getSpan(t,n+a),0<=this.union.span&&o>this.union.span))throw new Error("encoded variant overruns containing union");return o}},{key:"fromArray",value:function(e){if(this.layout)return this.layout.fromArray(e)}}]),n}(Tt),Ht=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e,a){var o;if((0,b.Z)(this,n),!(e instanceof Ct&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");var r=-1;return e instanceof Ct||(r=e),(o=t.call(this,r,a)).length=e,o}return(0,p.Z)(n,[{key:"getSpan",value:function(e,t){var n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}},{key:"decode",value:function(e,t){void 0===t&&(t=0);var n=this.span;return 0>n&&(n=this.length.decode(e,t)),e.slice(t,t+n)}},{key:"encode",value:function(e,t,n){var a,o,r=this.length;if(this.length instanceof Ct&&(r=e.length),!D.isBuffer(e)||r!==e.length)throw new TypeError((a="Blob.encode",((o=this).property?a+"["+o.property+"]":a)+" requires (length "+r+") Buffer as src"));if(n+r>t.length)throw new RangeError("encoding overruns Buffer");return t.write(e.toString("hex"),n,r,"hex"),this.length instanceof Ct&&this.length.encode(r,t,n),r}}]),n}(Tt),Gt=function(e,t,n){return new Et(e,t,n)},zt=function(e){return new Rt(4,e)},Kt=function(e){return new Dt(e)},Wt=function(e,t,n){return new Nt(e,t,n)},Zt=function(e,t,n){return new Lt(e,t,n)},Vt=function(e,t){return new Ht(e,t)},qt=function(){function e(t){(0,b.Z)(this,e)}return(0,p.Z)(e,[{key:"encode",value:function(e,t){switch(C()(e)){case"createAccount":return function(e){var t=e.lamports,n=e.space,a=e.owner;return $t({createAccount:{lamports:t,space:n,owner:a.toBuffer()}})}(t);case"assign":return $t({assign:{owner:t.owner.toBuffer()}});case"transfer":return $t({transfer:{lamports:t.lamports}});case"createAccountWithSeed":return function(e){var t=e.base,n=e.seed,a=e.lamports,o=e.space,r=e.owner;return $t({createAccountWithSeed:{base:t.toBuffer(),seed:n,lamports:a,space:o,owner:r.toBuffer()}},Xt.getVariant(3).span+n.length)}(t);case"advanceNonceAccount":return $t({advanceNonceAccount:{authorized:t.authorized.toBuffer()}});case"withdrawNonceAccount":return $t({withdrawNonceAccount:{lamports:t.lamports}});case"initializeNonceAccount":return $t({initializeNonceAccount:{authorized:t.authorized.toBuffer()}});case"authorizeNonceAccount":return $t({authorizeNonceAccount:{authorized:t.authorized.toBuffer()}});case"allocate":return $t({allocate:{space:t.space}});case"allocateWithSeed":return function(e){var t=e.base,n=e.seed,a=e.space,o=e.owner;return $t({allocateWithSeed:{base:t.toBuffer(),seed:n,space:a,owner:o.toBuffer()}},Xt.getVariant(9).span+n.length)}(t);case"assignWithSeed":return function(e){var t=e.base,n=e.seed,a=e.owner;return $t({assignWithSeed:{base:t.toBuffer(),seed:n,owner:a.toBuffer()}},Xt.getVariant(10).span+n.length)}(t);case"transferWithSeed":return function(e){var t=e.lamports,n=e.seed,a=e.owner;return $t({transferWithSeed:{lamports:t,seed:n,owner:a.toBuffer()}},Xt.getVariant(11).span+n.length)}(t);default:throw new Error("Invalid instruction: ".concat(e))}}},{key:"encodeState",value:function(e,t){throw new Error("System does not have state")}}]),e}(),Qt=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e){var a;return(0,b.Z)(this,n),(a=t.call(this,-1,e)).property=e,a.layout=Wt([zt("length"),zt("lengthPadding"),Vt(Gt(zt(),-8),"chars")],a.property),a}return(0,p.Z)(n,[{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null===e||void 0===e)return this.layout.span;var a={chars:D.from(e,"utf8")};return this.layout.encode(a,t,n)}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.layout.decode(e,t).chars.toString()}},{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return zt().span+zt().span+new(A())(new Uint8Array(e).slice(t,t+4),10,"le").toNumber()}}]),n}(St);function Jt(e){return new Qt(e)}function Yt(e){return Vt(32,e)}var Xt=Zt(zt("instruction"));function $t(e,t){var n=D.alloc(null!==t&&void 0!==t?t:en),a=Xt.encode(e,n);return void 0===t?n.slice(0,a):n}Xt.addVariant(0,Wt([Kt("lamports"),Kt("space"),Yt("owner")]),"createAccount"),Xt.addVariant(1,Wt([Yt("owner")]),"assign"),Xt.addVariant(2,Wt([Kt("lamports")]),"transfer"),Xt.addVariant(3,Wt([Yt("base"),Jt("seed"),Kt("lamports"),Kt("space"),Yt("owner")]),"createAccountWithSeed"),Xt.addVariant(4,Wt([Yt("authorized")]),"advanceNonceAccount"),Xt.addVariant(5,Wt([Kt("lamports")]),"withdrawNonceAccount"),Xt.addVariant(6,Wt([Yt("authorized")]),"initializeNonceAccount"),Xt.addVariant(7,Wt([Yt("authorized")]),"authorizeNonceAccount"),Xt.addVariant(8,Wt([Kt("space")]),"allocate"),Xt.addVariant(9,Wt([Yt("base"),Jt("seed"),Kt("space"),Yt("owner")]),"allocateWithSeed"),Xt.addVariant(10,Wt([Yt("base"),Jt("seed"),Yt("owner")]),"assignWithSeed"),Xt.addVariant(11,Wt([Kt("lamports"),Jt("seed"),Yt("owner")]),"transferWithSeed");var en=Math.max.apply(Math,(0,l.Z)(Object.values(Xt.registry).map((function(e){return e.span})))),tn=function(){function e(t){(0,b.Z)(this,e)}return(0,p.Z)(e,[{key:"encode",value:function(e,t){throw new Error("System does not have state")}},{key:"decode",value:function(e){throw new Error("System does not have state")}}]),e}(),nn=function(){function e(t){(0,b.Z)(this,e),this.idl=t}return(0,p.Z)(e,[{key:"encode",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a,o;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="nonce"===e.t0?3:6;break;case 3:return a=D.alloc(w.NONCE_ACCOUNT_LENGTH),o=sn.encode(n,a),e.abrupt("return",a.slice(0,o));case 6:throw new Error("Invalid account name: ".concat(t));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"decode",value:function(e,t){return this.decodeUnchecked(e,t)}},{key:"decodeUnchecked",value:function(e,t){if("nonce"===e)return function(e){return sn.decode(e)}(t);throw new Error("Invalid account name: ".concat(e))}},{key:"memcmp",value:function(e,t){if("nonce"===e)return{dataSize:w.NONCE_ACCOUNT_LENGTH};throw new Error("Invalid account name: ".concat(e))}},{key:"size",value:function(e){var t;return null!==(t=ft(this.idl,e))&&void 0!==t?t:0}}]),e}();var an=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(e,a,o,r){var i;return(0,b.Z)(this,n),(i=t.call(this,e.span,r)).layout=e,i.decoder=a,i.encoder=o,i}return(0,p.Z)(n,[{key:"decode",value:function(e,t){return this.decoder(this.layout.decode(e,t))}},{key:"encode",value:function(e,t,n){return this.layout.encode(this.encoder(e),t,n)}},{key:"getSpan",value:function(e,t){return this.layout.getSpan(e,t)}}]),n}(St);function on(e){return new an(Vt(32),(function(e){return new w.PublicKey(e)}),(function(e){return e.toBuffer()}),e)}var rn,sn=Wt([zt("version"),zt("state"),on("authorizedPubkey"),on("nonce"),Wt([(rn="lamportsPerSignature",new Bt(rn))],"feeCalculator")]),cn=function(){function e(t){(0,b.Z)(this,e)}return(0,p.Z)(e,[{key:"decode",value:function(e){throw new Error("System program does not have events")}}]),e}(),un=function(){function e(t){(0,b.Z)(this,e)}return(0,p.Z)(e,[{key:"encode",value:function(e,t){throw new Error("System does not have user-defined types")}},{key:"decode",value:function(e,t){throw new Error("System does not have user-defined types")}}]),e}(),dn=(0,p.Z)((function e(t){(0,b.Z)(this,e),this.instruction=new qt(t),this.accounts=new nn(t),this.events=new cn(t),this.state=new tn(t),this.types=new un(t)}));var ln=Object.freeze({__proto__:null,hash:function(e){return(0,E.sha256)(e)}});function fn(e,t,n){var a=v.Buffer.concat([e.toBuffer(),v.Buffer.from(t),n.toBuffer()]),o=E.sha256.digest(a);return new w.PublicKey(v.Buffer.from(o))}function pn(e,t){var n=v.Buffer.alloc(0);e.forEach((function(e){if(e.length>32)throw new TypeError("Max seed length exceeded");n=v.Buffer.concat([n,mn(e)])})),n=v.Buffer.concat([n,t.toBuffer(),v.Buffer.from("ProgramDerivedAddress")]);var a=(0,E.sha256)(new Uint8Array(n)),o=new(A())(a,16).toArray(void 0,32);if(w.PublicKey.isOnCurve(new Uint8Array(o)))throw new Error("Invalid seeds, address must fall off the curve");return new w.PublicKey(o)}function bn(e,t){for(var n,a=255;0!=a;){try{n=pn(e.concat(v.Buffer.from([a])),t)}catch(o){if(o instanceof TypeError)throw o;a--;continue}return[n,a]}throw new Error("Unable to find a viable program address nonce")}var mn=function(e){return e instanceof v.Buffer?e:e instanceof Uint8Array?v.Buffer.from(e.buffer,e.byteOffset,e.byteLength):v.Buffer.from(e)};function hn(e){return gn.apply(this,arguments)}function gn(){return gn=(0,r.Z)((0,c.Z)().mark((function e(t){var n,a,o,r,i,u,d,l=arguments;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=[v.Buffer.from([97,110,99,104,111,114])],a=l.length,o=new Array(a>1?a-1:0),r=1;r-1};function r(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function i(e){return"string"!==typeof e&&(e=String(e)),e}function s(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function d(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function l(e){var t=new FileReader,n=d(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:n.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:n.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():n.arrayBuffer&&n.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(l)}),this.text=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=d(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),a=0;a-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),a=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(o))}})),t}function g(e){var t=new c;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),a=n.shift().trim();if(a){var o=n.join(":").trim();t.append(a,o)}})),t}function y(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},p.call(m.prototype),p.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];y.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(k){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function w(e,a){return new Promise((function(o,r){var i=new m(e,a);if(i.signal&&i.signal.aborted)return r(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:g(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;o(new y(t,e))},s.onerror=function(){r(new TypeError("Network request failed"))},s.ontimeout=function(){r(new TypeError("Network request failed"))},s.onabort=function(){r(new t.DOMException("Aborted","AbortError"))},s.open(i.method,i.url,!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&n.blob&&(s.responseType="blob"),i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",c)}),s.send("undefined"===typeof i._bodyInit?null:i._bodyInit)}))}w.polyfill=!0,e.fetch||(e.fetch=w,e.Headers=c,e.Request=m,e.Response=y),t.Headers=c,t.Request=m,t.Response=y,t.fetch=w,Object.defineProperty(t,"__esModule",{value:!0})}({})}(a),a.fetch.ponyfill=!0,delete a.fetch.polyfill;var o=a;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(xn,xn.exports);var In=It(xn.exports);function Tn(){return Tn=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a,o,r,i,u,d,l,f,p=arguments;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=p.length>2&&void 0!==p[2]?p[2]:5,o="https://api.apr.dev/api/v0/program/".concat(n.toString(),"/latest?limit=").concat(a),e.next=4,Promise.all([Sn(t,n),In(o)]);case 4:return r=e.sent,i=(0,s.Z)(r,2),u=i[0],d=i[1],e.next=10,d.json();case 10:if(0!==(l=e.sent.filter((function(e){return!e.aborted&&"Built"===e.state&&"Verified"===e.verified}))).length){e.next=13;break}return e.abrupt("return",null);case 13:if(f=l[0],u.slot.toNumber()===f.verified_slot){e.next=16;break}return e.abrupt("return",null);case 16:return e.abrupt("return",f);case 17:case"end":return e.stop()}}),e)}))),Tn.apply(this,arguments)}function Sn(e,t){return Cn.apply(this,arguments)}function Cn(){return Cn=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a,o,r,i,s,u;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getAccountInfo(n);case 2:if(null!==(a=e.sent)){e.next=5;break}throw new Error("program account not found");case 5:return o=Rn(a.data),r=o.program,e.next=8,t.getAccountInfo(r.programdataAddress);case 8:if(null!==(i=e.sent)){e.next=11;break}throw new Error("program data account not found");case 11:return s=Rn(i.data),u=s.programData,e.abrupt("return",u);case 13:case"end":return e.stop()}}),e)}))),Cn.apply(this,arguments)}var En=R.rustEnum([R.struct([],"uninitialized"),R.struct([R.option(R.publicKey(),"authorityAddress")],"buffer"),R.struct([R.publicKey("programdataAddress")],"program"),R.struct([R.u64("slot"),R.option(R.publicKey(),"upgradeAuthorityAddress")],"programData")],void 0,R.u32());function Rn(e){return En.decode(e)}var Mn=Object.freeze({__proto__:null,verifiedBuild:function(e,t){return Tn.apply(this,arguments)},fetchData:Sn,decodeUpgradeableLoaderState:Rn}),Pn=Object.freeze({__proto__:null,sha256:ln,rpc:_e,publicKey:yn,bytes:q,token:An,features:We,registry:Mn});function Un(e){return"accounts"in e}function _n(e){return Bn.apply(this,arguments)}function Bn(){return(Bn=(0,r.Z)((0,c.Z)().mark((function e(t){var n;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.PublicKey.findProgramAddress([],t);case 2:return n=e.sent[0],e.next=5,w.PublicKey.createWithSeed(n,"anchor:idl",t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Dn=R.struct([R.publicKey("authority"),R.vecU8("data")]);function Nn(e,t){var n,a,o={},r=e.args?e.args.length:0;if(t.length>r){if(t.length!==r+1)throw new Error("provided too many arguments ".concat(t," to instruction ").concat(null===e||void 0===e?void 0:e.name," expecting: ").concat(null!==(a=null===(n=e.args)||void 0===n?void 0:n.map((function(e){return e.name})))&&void 0!==a?a:[]));o=t.pop()}return[t,o]}var On=function(){function e(){(0,b.Z)(this,e)}return(0,p.Z)(e,null,[{key:"build",value:function(t,n,a){if("_inner"===t.name)throw new Ze("the _inner name is reserved");var o=function e(){for(var o=arguments.length,r=new Array(o),i=0;i2&&void 0!==arguments[2]?arguments[2]:je(),o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new At(t);(0,b.Z)(this,e),this.provider=a,this.coder=o,this._idl=t,this._programId=n,this._address=zn(n),this._sub=null;var r=function(){var e,r={},i={},c={};return null===(e=t.state)||void 0===e||e.methods.forEach((function(e){var u=On.build(e,(function(e,t){return o.instruction.encodeState(e,t)}),n);u.accounts=function(t){var o=function(e,t,n,a){if("new"===n.name){var o=bn([],e),r=(0,s.Z)(o,1)[0];if(void 0===t.wallet)throw new Error("This function requires the Provider interface implementor to have a 'wallet' field.");return[{pubkey:t.wallet.publicKey,isWritable:!1,isSigner:!0},{pubkey:zn(e),isWritable:!0,isSigner:!1},{pubkey:r,isWritable:!1,isSigner:!1},{pubkey:w.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:e,isWritable:!1,isSigner:!1}]}return Y(n.accounts,a),[{pubkey:zn(e),isWritable:!0,isSigner:!1}]}(n,a,e,t);return o.concat(On.accountsArray(t,e.accounts,n,e.name))};var d=jn.build(e,u),l=Ln.build(e,d,Q(t),a),f=C()(e.name);r[f]=u,i[f]=d,c[f]=l})),[r,i,c]}(),i=(0,s.Z)(r,3),c=i[0],u=i[1],d=i[2];this.instruction=c,this.transaction=u,this.rpc=d}return(0,p.Z)(e,[{key:"programId",get:function(){return this._programId}},{key:"fetch",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(){var t,n,a;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.address(),e.next=3,this.provider.connection.getAccountInfo(t);case 3:if(null!==(n=e.sent)){e.next=6;break}throw new Error("Account does not exist ".concat(t.toString()));case 6:if(a=this._idl.state){e.next=9;break}throw new Error("State is not specified in IDL.");case 9:return e.next=11,vt(a.struct.name);case 11:if(!e.sent.compare(n.data.slice(0,8))){e.next=14;break}throw new Error("Invalid account discriminator");case 14:return e.abrupt("return",this.coder.state.decode(n.data));case 15:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"address",value:function(){return this._address}},{key:"subscribe",value:function(e){var t=this;if(null!==this._sub)return this._sub.ee;var n=new(U()),a=this.provider.connection.onAccountChange(this.address(),(function(e){var a=t.coder.state.decode(e.data);n.emit("change",a)}),e);return this._sub={ee:n,listener:a},n}},{key:"unsubscribe",value:function(){var e=this;null!==this._sub&&this.provider.connection.removeAccountChangeListener(this._sub.listener).then((0,r.Z)((0,c.Z)().mark((function t(){return(0,c.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e._sub=null;case 1:case"end":return t.stop()}}),t)})))).catch(B.error)}}]),e}();function zn(e){var t=bn([],e);return fn((0,s.Z)(t,1)[0],"unversioned",e)}var Kn=function(){function e(){(0,b.Z)(this,e)}return(0,p.Z)(e,null,[{key:"build",value:function(e,t,n,a){var o,r={};return null===(o=e.accounts)||void 0===o||o.forEach((function(o){var i=C()(o.name);r[i]=new Wn(e,o,n,a,t)})),r}}]),e}(),Wn=function(){function e(t,n,a,o,r){(0,b.Z)(this,e),this._idlAccount=n,this._programId=a,this._provider=null!==o&&void 0!==o?o:je(),this._coder=null!==r&&void 0!==r?r:new At(t),this._size=this._coder.accounts.size(n)}return(0,p.Z)(e,[{key:"size",get:function(){return this._size}},{key:"programId",get:function(){return this._programId}},{key:"provider",get:function(){return this._provider}},{key:"coder",get:function(){return this._coder}},{key:"fetchNullable",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a,o;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetchNullableAndContext(t,n);case 2:return a=e.sent,o=a.data,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetchNullableAndContext",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a,o,r;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccountInfoAndContext(t,n);case 2:return a=e.sent,o=a.value,r=a.context,e.abrupt("return",{data:o&&0!==o.data.length?this._coder.accounts.decode(this._idlAccount.name,o.data):null,context:r});case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetch",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a,o;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetchNullableAndContext(t,n);case 2:if(a=e.sent,null!==(o=a.data)){e.next=6;break}throw new Error("Account does not exist or has no data ".concat(t.toString()));case 6:return e.abrupt("return",o);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetchAndContext",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a,o,r;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetchNullableAndContext(t,n);case 2:if(a=e.sent,o=a.data,r=a.context,null!==o){e.next=7;break}throw new Error("Account does not exist ".concat(t.toString()));case 7:return e.abrupt("return",{data:o,context:r});case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetchMultiple",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetchMultipleAndContext(t,n);case 2:return a=e.sent,e.abrupt("return",a.map((function(e){return e?e.data:null})));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetchMultipleAndContext",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a,o=this;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ae(this._provider.connection,t.map((function(e){return X(e)})),n);case 2:return a=e.sent,e.abrupt("return",a.map((function(e){if(null==e)return null;var t=e.account,n=e.context;return{data:o._coder.accounts.decode(o._idlAccount.name,t.data),context:n}})));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"all",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t){var n,a,o,r=this;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.coder.accounts.memcmp(this._idlAccount.name,t instanceof D?t:void 0),a=[],void 0!=(null===n||void 0===n?void 0:n.offset)&&void 0!=(null===n||void 0===n?void 0:n.bytes)&&a.push({memcmp:{offset:n.offset,bytes:n.bytes}}),void 0!=(null===n||void 0===n?void 0:n.dataSize)&&a.push({dataSize:n.dataSize}),e.next=6,this._provider.connection.getProgramAccounts(this._programId,{commitment:this._provider.connection.commitment,filters:[].concat(a,(0,l.Z)(Array.isArray(t)?t:[]))});case 6:return o=e.sent,e.abrupt("return",o.map((function(e){var t=e.pubkey,n=e.account;return{publicKey:t,account:r._coder.accounts.decode(r._idlAccount.name,n.data)}})));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"subscribe",value:function(e,t){var n=this,a=Zn.get(e.toString());if(a)return a.ee;var o=new(U());e=X(e);var r=this._provider.connection.onAccountChange(e,(function(e){var t=n._coder.accounts.decode(n._idlAccount.name,e.data);o.emit("change",t)}),t);return Zn.set(e.toString(),{ee:o,listener:r}),o}},{key:"unsubscribe",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t){var n;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Zn.get(t.toString())){e.next=4;break}return B.warn("Address is not subscribed"),e.abrupt("return");case 4:if(!Zn){e.next=7;break}return e.next=7,this._provider.connection.removeAccountChangeListener(n.listener).then((function(){Zn.delete(t.toString())})).catch(B.error);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createInstruction",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t,n){var a;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=this.size,void 0!==this._provider.publicKey){e.next=3;break}throw new Error("This function requires the Provider interface implementor to have a 'publicKey' field.");case 3:return e.t0=w.SystemProgram,e.t1=this._provider.publicKey,e.t2=t.publicKey,e.t3=null!==n&&void 0!==n?n:a,e.next=9,this._provider.connection.getMinimumBalanceForRentExemption(null!==n&&void 0!==n?n:a);case 9:return e.t4=e.sent,e.t5=this._programId,e.t6={fromPubkey:e.t1,newAccountPubkey:e.t2,space:e.t3,lamports:e.t4,programId:e.t5},e.abrupt("return",e.t0.createAccount.call(e.t0,e.t6));case 13:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"associated",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(){var t,n=arguments;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.associatedAddress.apply(this,n);case 2:return t=e.sent,e.next=5,this.fetch(t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"associatedAddress",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(){var t,n,a,o=arguments;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=o.length,n=new Array(t),a=0;a1&&void 0!==arguments[1]&&arguments[1];return(0,c.Z)().mark((function a(){var o,r,i,u,d,l,f,p;return(0,c.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:o=new ea(e),r=new $n,i=o.next();case 3:if(null===i){a.next=13;break}if(u=t.handleLog(r,i,n),d=(0,s.Z)(u,3),l=d[0],f=d[1],p=d[2],!l){a.next=8;break}return a.next=8,l;case 8:f&&r.push(f),p&&r.pop(),i=o.next(),a.next=3;break;case 13:case"end":return a.stop()}}),a)}))()}},{key:"handleLog",value:function(e,t,n){return e.stack.length>0&&e.program()===this.programId.toString()?this.handleProgramLog(t,n):[null].concat((0,l.Z)(this.handleSystemLog(t)))}},{key:"handleProgramLog",value:function(e,t){if(e.startsWith(Vn)||e.startsWith(qn)){var n=e.startsWith(Vn)?e.slice(Qn):e.slice(Jn),a=this.coder.events.decode(n);if(t&&null===a)throw new Error("Unable to decode event ".concat(n));return[a,null,!1]}return[null].concat((0,l.Z)(this.handleSystemLog(e)))}},{key:"handleSystemLog",value:function(e){var t=e.split(":")[0];return null!==t.match(/^Program (.*) success/g)?[null,!0]:t.startsWith("Program ".concat(this.programId.toString()," invoke"))?[this.programId.toString(),!1]:t.includes("invoke")?["cpi",!1]:[null,!1]}}]),e}(),$n=function(){function e(){(0,b.Z)(this,e),this.stack=[]}return(0,p.Z)(e,[{key:"program",value:function(){return _.ok(this.stack.length>0),this.stack[this.stack.length-1]}},{key:"push",value:function(e){this.stack.push(e)}},{key:"pop",value:function(){_.ok(this.stack.length>0),this.stack.pop()}}]),e}(),ea=function(){function e(t){(0,b.Z)(this,e),this.logs=t}return(0,p.Z)(e,[{key:"next",value:function(){if(0===this.logs.length)return null;var e=this.logs[0];return this.logs=this.logs.slice(1),e}}]),e}(),ta=function(){function e(){(0,b.Z)(this,e)}return(0,p.Z)(e,null,[{key:"build",value:function(e,t,n,a,o,i,d){var l=function(){var l=(0,r.Z)((0,c.Z)().mark((function r(){var l,f,p,b,m,h,g,y,v,w,k,A,x,I,T,S=arguments;return(0,c.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:for(f=S.length,p=new Array(f),b=0;b2&&void 0!==arguments[2]?arguments[2]:0;return null===e||void 0===e?this.layout.span+this.discriminator.encode(0,t,n):(this.discriminator.encode(1,t,n),this.layout.encode(e,t,n+4)+4)}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.discriminator.decode(e,t);if(0===n)return null;if(1===n)return this.layout.decode(e,t+4);throw new Error("Invalid coption "+this.layout.property)}},{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.layout.getSpan(e,t+4)+4}}]),n}(St),sa=function(e){(0,h.Z)(n,e);var t=(0,g.Z)(n);function n(){return(0,b.Z)(this,n),t.apply(this,arguments)}return(0,p.Z)(n,[{key:"toBuffer",value:function(){var e=(0,a.Z)((0,o.Z)(n.prototype),"toArray",this).call(this).reverse(),t=D.from(e);if(8===t.length)return t;if(t.length>=8)throw new Error("u64 too large");var r=D.alloc(8);return t.copy(r),r}}],[{key:"fromBuffer",value:function(e){if(8!==e.length)throw new Error("Invalid buffer length: ".concat(e.length));return new n((0,l.Z)(e).reverse().map((function(e){return"00".concat(e.toString(16)).slice(-2)})).join(""),16)}}]),n}(A()),ca=Wt([aa("mint"),aa("owner"),na("amount"),oa(aa(),"delegate"),function(e){var t=Zt(function(e){return new Rt(1,e)}("discriminator"),null,"state");return t.addVariant(0,Wt([]),"uninitialized"),t.addVariant(1,Wt([]),"initialized"),t.addVariant(2,Wt([]),"frozen"),t}(),oa(na(),"isNative"),na("delegatedAmount"),oa(aa(),"closeAuthority")]);var ua=function(){function e(t,n,a,o,r,i,s,c){(0,b.Z)(this,e),this._accounts=n,this._provider=a,this._programId=o,this._idlIx=r,this._idlTypes=s,this._customResolver=c,this._args=t,this._accountStore=new da(a,i,this._programId)}return(0,p.Z)(e,[{key:"args",value:function(e){this._args=e}},{key:"resolve",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(){return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.resolveConst(this._idlIx.accounts);case 2:return e.next=4,this.resolvePdas(this._idlIx.accounts);case 4:return e.t0=e.sent,e.next=7,this.resolveRelations(this._idlIx.accounts);case 7:return e.t1=e.sent,e.t2=e.t0+e.t1,e.next=11,this.resolveCustom();case 11:if(e.t3=e.sent,e.t4=e.t2+e.t3,!(e.t4>0)){e.next=16;break}e.next=2;break;case 16:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"resolveCustom",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(){var t,n,a;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._customResolver){e.next=8;break}return e.next=3,this._customResolver({args:this._args,accounts:this._accounts,provider:this._provider,programId:this._programId,idlIx:this._idlIx});case 3:return t=e.sent,n=t.accounts,a=t.resolved,this._accounts=n,e.abrupt("return",a);case 8:return e.abrupt("return",0);case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"resolveOptionalsHelper",value:function(e,t){var n,a={},o=(0,u.Z)(t);try{for(o.s();!(n=o.n()).done;){var r=n.value,i=r.name,s=e[i];void 0!==s&&(fa(s)?Un(r)?a[i]=this.resolveOptionalsHelper(s,r.accounts):a[i]=pa(s,!0):null!==s?a[i]=X(s):r.isOptional&&(a[i]=this._programId))}}catch(c){o.e(c)}finally{o.f()}return a}},{key:"resolveOptionals",value:function(e){Object.assign(this._accounts,this.resolveOptionalsHelper(e,this._idlIx.accounts))}},{key:"get",value:function(e){var t=e.reduce((function(e,t){return e&&e[t]}),this._accounts);if(t&&t.toBase58)return t}},{key:"set",value:function(e,t){var n=this._accounts;e.forEach((function(a,o){o==e.length-1&&(n[a]=t),n[a]=n[a]||{},n=n[a]}))}},{key:"resolveConst",value:function(){var t=(0,r.Z)((0,c.Z)().mark((function t(n){var a,o,r,i,s,u,d=arguments;return(0,c.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=d.length>1&&void 0!==d[1]?d[1]:[],o=0;case 2:if(!(o1&&void 0!==d[1]?d[1]:[],a=0,o=0;case 3:if(!(o0)||this.get([].concat((0,l.Z)(n),[u]))){e.next=20;break}return e.t1=Boolean,e.next=17,this.autoPopulatePda(s,n);case 17:if(e.t2=e.sent,!(0,e.t1)(e.t2)){e.next=20;break}a+=1;case 20:o+=1,e.next=3;break;case 23:return e.abrupt("return",a);case 24:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"resolveRelations",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t){var n,a,o,i,s=this,u=arguments;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=u.length>1&&void 0!==u[1]?u[1]:[],a=0,o=(0,c.Z)().mark((function e(){var o,u,d,f,p,b,m,h;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t[i],!(u=o.accounts)){e.next=7;break}return e.t0=a,e.next=6,s.resolveRelations(u,[].concat((0,l.Z)(n),[C()(o.name)]));case 6:a=e.t0+=e.sent;case 7:if(d=o.relations||[],f=C()(o.name),p=[].concat((0,l.Z)(n),[f]),!(b=s.get(p))){e.next=20;break}if(m=d.filter((function(e){return!s.get([].concat((0,l.Z)(n),[C()(e)]))})),a+=m.length,!(m.length>0)){e.next=20;break}return e.next=17,s._accountStore.fetchAccount({publicKey:b});case 17:return h=e.sent,e.next=20,Promise.all(m.map(function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t){var a;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=C()(t),s.set([].concat((0,l.Z)(n),[a]),h[a]),e.abrupt("return",h[a]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 20:case"end":return e.stop()}}),e)})),i=0;case 4:if(!(i1&&void 0!==f[1]?f[1]:[],t.pda&&t.pda.seeds){e.next=3;break}throw new Error("Must have seeds");case 3:return e.next=5,Promise.all(t.pda.seeds.map((function(e){return d.toBuffer(e,n)})));case 5:if(!(a=e.sent).some((function(e){return"undefined"==typeof e}))){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,this.parseProgramId(t,n);case 10:if(o=e.sent){e.next=13;break}return e.abrupt("return");case 13:return e.next=15,w.PublicKey.findProgramAddress(a,o);case 15:r=e.sent,i=(0,s.Z)(r,1),u=i[0],this.set([].concat((0,l.Z)(n),[C()(t.name)]),u);case 19:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"parseProgramId",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t){var n,a,o=arguments;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>1&&void 0!==o[1]?o[1]:[],null===(a=t.pda)||void 0===a?void 0:a.programId){e.next=3;break}return e.abrupt("return",this._programId);case 3:e.t0=t.pda.programId.kind,e.next="const"===e.t0?6:"arg"===e.t0?7:"account"===e.t0?8:11;break;case 6:return e.abrupt("return",new w.PublicKey(this.toBufferConst(t.pda.programId.value)));case 7:return e.abrupt("return",this.argValue(t.pda.programId));case 8:return e.next=10,this.accountValue(t.pda.programId,n);case 10:return e.abrupt("return",e.sent);case 11:throw new Error("Unexpected program seed kind: ".concat(t.pda.programId.kind));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"toBuffer",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t){var n,a=arguments;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a.length>1&&void 0!==a[1]?a[1]:[],e.t0=t.kind,e.next="const"===e.t0?4:"arg"===e.t0?5:"account"===e.t0?8:11;break;case 4:return e.abrupt("return",this.toBufferConst(t));case 5:return e.next=7,this.toBufferArg(t);case 7:case 10:return e.abrupt("return",e.sent);case 8:return e.next=10,this.toBufferAccount(t,n);case 11:throw new Error("Unexpected seed kind: ".concat(t.kind));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(t.length>0&&e.defined){var n=this._idlTypes.find((function(t){return t.name===e.defined}));if(!n)throw new Error("Cannot find type ".concat(e.defined));var a=n.type.fields.find((function(e){return e.name===t[0]}));return this.getType(a.type,t.slice(1))}return e}},{key:"toBufferConst",value:function(e){return this.toBufferValue(this.getType(e.type,(e.path||"").split(".").slice(1)),e.value)}},{key:"toBufferArg",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t){var n;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!==typeof(n=this.argValue(t))){e.next=3;break}return e.abrupt("return");case 3:return e.abrupt("return",this.toBufferValue(this.getType(t.type,(t.path||"").split(".").slice(1)),n));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"argValue",value:function(e){var t=e.path.split("."),n=C()(t[0]),a=this._idlIx.args.findIndex((function(e){return e.name===n}));if(-1===a)throw new Error("Unable to find argument for seed: ".concat(n));return t.slice(1).reduce((function(e,t){return(e||{})[t]}),this._args[a])}},{key:"toBufferAccount",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t){var n,a,o=arguments;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:[],e.next=3,this.accountValue(t,n);case 3:if(a=e.sent){e.next=6;break}return e.abrupt("return");case 6:return e.abrupt("return",this.toBufferValue(t.type,a));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"accountValue",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t){var n,a,o,r,i,s,u=arguments;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>1&&void 0!==u[1]?u[1]:[],a=t.path.split("."),o=a[0],null!==(r=this.get([].concat((0,l.Z)(n),[C()(o)])))){e.next=6;break}throw new Error("fieldPubkey is null");case 6:if(1!==a.length){e.next=8;break}return e.abrupt("return",r);case 8:return e.next=10,this._accountStore.fetchAccount({publicKey:r,name:t.account});case 10:return i=e.sent,s=this.parseAccountValue(i,a.slice(1)),e.abrupt("return",s);case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"parseAccountValue",value:function(e,t){for(var n;t.length>0;)n=e[C()(t[0])],t=t.slice(1);return n}},{key:"toBufferValue",value:function(e,t){switch(e){case"u8":return D.from([t]);case"u16":var n=D.alloc(2);return n.writeUInt16LE(t),n;case"u32":var a=D.alloc(4);return a.writeUInt32LE(t),a;case"u64":var o=D.alloc(8);return o.writeBigUInt64LE(BigInt(t)),o;case"string":return D.from(G(t));case"publicKey":return t.toBuffer();default:if(e.array)return D.from(t);throw new Error("Unexpected seed type: ".concat(e))}}}]),e}();ua.CONST_ACCOUNTS={associatedTokenProgram:wn,rent:w.SYSVAR_RENT_PUBKEY,systemProgram:w.SystemProgram.programId,tokenProgram:vn,clock:w.SYSVAR_CLOCK_PUBKEY};var da=function(){function e(t,n,a){(0,b.Z)(this,e),this._provider=t,this._programId=a,this._cache=new Map,this._idls={},this._idls[a.toBase58()]=n}return(0,p.Z)(e,[{key:"ensureIdl",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t){var n,a;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._idls[t.toBase58()]){e.next=5;break}return e.next=3,ga.fetchIdl(t,this._provider);case 3:(n=e.sent)&&(a=new ga(n,t,this._provider),this._idls[t.toBase58()]=a.account);case 5:return e.abrupt("return",this._idls[t.toBase58()]);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"fetchAccount",value:function(){var e=(0,r.Z)((0,c.Z)().mark((function e(t){var n,a,o,r,i,s,u,d,l,f,p,b,m,h,g;return(0,c.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.publicKey,a=t.name,o=t.programId,r=void 0===o?this._programId:o,i=n.toString(),this._cache.has(i)){e.next=41;break}if("TokenAccount"!==a){e.next=13;break}return e.next=6,this._provider.connection.getAccountInfo(n);case 6:if(null!==(s=e.sent)){e.next=9;break}throw new Error("invalid account info for ".concat(i));case 9:c=s.data,u=ca.decode(c),this._cache.set(i,u),e.next=41;break;case 13:if(!a){e.next=26;break}return e.next=16,this.ensureIdl(r);case 16:if(!(d=e.sent)){e.next=24;break}if(!(l=d[C()(a)])){e.next=24;break}return e.next=22,l.fetch(n);case 22:f=e.sent,this._cache.set(i,f);case 24:e.next=41;break;case 26:return e.next=28,this._provider.connection.getAccountInfo(n);case 28:if(null!==(p=e.sent)){e.next=31;break}throw new Error("invalid account info for ".concat(i));case 31:return b=p.data,e.next=34,this.ensureIdl(p.owner);case 34:if(!(m=e.sent)){e.next=41;break}if(h=Object.values(m)[0]){e.next=39;break}throw new Error("No accounts for this program");case 39:g=h.coder.accounts.decodeAny(b),this._cache.set(i,g);case 41:return e.abrupt("return",this._cache.get(i));case 42:case"end":return e.stop()}var c}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),la=function(){function e(){(0,b.Z)(this,e)}return(0,p.Z)(e,null,[{key:"build",value:function(e,t,n,a,o,r,i,s,c,u,d){return function(){for(var l=arguments.length,f=new Array(l),p=0;p1)return null;o=c[0].match(/([0-9]+)/g)[0]}try{r=parseInt(o)}catch(d){return null}var u=n.get(r);return void 0!==u||void 0!==(u=t.LangErrorMessage.get(r))?new a(r,u,e.logs):null}}]),a}(d(Error));t.ProgramError=v,t.translateError=function(e,t){m.isSet("debug-logs")&&a.log("Translating error:",e);var n=y.parse(e.logs);if(n)return n;var o=v.parse(e,t);if(o)return o;if(e.logs){var r={get:function(t,n){return"programErrorStack"===n?t.programErrorStack.stack:"program"===n?t.programErrorStack.stack[e.programErrorStack.stack.length-1]:Reflect.get.apply(Reflect,arguments)}};return e.programErrorStack=g.parse(e.logs),new Proxy(e,r)}return e},t.LangErrorCode={InstructionMissing:100,InstructionFallbackNotFound:101,InstructionDidNotDeserialize:102,InstructionDidNotSerialize:103,IdlInstructionStub:1e3,IdlInstructionInvalidProgram:1001,ConstraintMut:2e3,ConstraintHasOne:2001,ConstraintSigner:2002,ConstraintRaw:2003,ConstraintOwner:2004,ConstraintRentExempt:2005,ConstraintSeeds:2006,ConstraintExecutable:2007,ConstraintState:2008,ConstraintAssociated:2009,ConstraintAssociatedInit:2010,ConstraintClose:2011,ConstraintAddress:2012,ConstraintZero:2013,ConstraintTokenMint:2014,ConstraintTokenOwner:2015,ConstraintMintMintAuthority:2016,ConstraintMintFreezeAuthority:2017,ConstraintMintDecimals:2018,ConstraintSpace:2019,ConstraintAccountIsNone:2020,RequireViolated:2500,RequireEqViolated:2501,RequireKeysEqViolated:2502,RequireNeqViolated:2503,RequireKeysNeqViolated:2504,RequireGtViolated:2505,RequireGteViolated:2506,AccountDiscriminatorAlreadySet:3e3,AccountDiscriminatorNotFound:3001,AccountDiscriminatorMismatch:3002,AccountDidNotDeserialize:3003,AccountDidNotSerialize:3004,AccountNotEnoughKeys:3005,AccountNotMutable:3006,AccountOwnedByWrongProgram:3007,InvalidProgramId:3008,InvalidProgramExecutable:3009,AccountNotSigner:3010,AccountNotSystemOwned:3011,AccountNotInitialized:3012,AccountNotProgramData:3013,AccountNotAssociatedTokenAccount:3014,AccountSysvarMismatch:3015,AccountReallocExceedsLimit:3016,AccountDuplicateReallocs:3017,StateInvalidAddress:4e3,DeclaredProgramIdMismatch:4100,Deprecated:5e3},t.LangErrorMessage=new Map([[t.LangErrorCode.InstructionMissing,"8 byte instruction identifier not provided"],[t.LangErrorCode.InstructionFallbackNotFound,"Fallback functions are not supported"],[t.LangErrorCode.InstructionDidNotDeserialize,"The program could not deserialize the given instruction"],[t.LangErrorCode.InstructionDidNotSerialize,"The program could not serialize the given instruction"],[t.LangErrorCode.IdlInstructionStub,"The program was compiled without idl instructions"],[t.LangErrorCode.IdlInstructionInvalidProgram,"The transaction was given an invalid program for the IDL instruction"],[t.LangErrorCode.ConstraintMut,"A mut constraint was violated"],[t.LangErrorCode.ConstraintHasOne,"A has one constraint was violated"],[t.LangErrorCode.ConstraintSigner,"A signer constraint was violated"],[t.LangErrorCode.ConstraintRaw,"A raw constraint was violated"],[t.LangErrorCode.ConstraintOwner,"An owner constraint was violated"],[t.LangErrorCode.ConstraintRentExempt,"A rent exemption constraint was violated"],[t.LangErrorCode.ConstraintSeeds,"A seeds constraint was violated"],[t.LangErrorCode.ConstraintExecutable,"An executable constraint was violated"],[t.LangErrorCode.ConstraintState,"A state constraint was violated"],[t.LangErrorCode.ConstraintAssociated,"An associated constraint was violated"],[t.LangErrorCode.ConstraintAssociatedInit,"An associated init constraint was violated"],[t.LangErrorCode.ConstraintClose,"A close constraint was violated"],[t.LangErrorCode.ConstraintAddress,"An address constraint was violated"],[t.LangErrorCode.ConstraintZero,"Expected zero account discriminant"],[t.LangErrorCode.ConstraintTokenMint,"A token mint constraint was violated"],[t.LangErrorCode.ConstraintTokenOwner,"A token owner constraint was violated"],[t.LangErrorCode.ConstraintMintMintAuthority,"A mint mint authority constraint was violated"],[t.LangErrorCode.ConstraintMintFreezeAuthority,"A mint freeze authority constraint was violated"],[t.LangErrorCode.ConstraintMintDecimals,"A mint decimals constraint was violated"],[t.LangErrorCode.ConstraintSpace,"A space constraint was violated"],[t.LangErrorCode.ConstraintAccountIsNone,"A required account for the constraint is None"],[t.LangErrorCode.RequireViolated,"A require expression was violated"],[t.LangErrorCode.RequireEqViolated,"A require_eq expression was violated"],[t.LangErrorCode.RequireKeysEqViolated,"A require_keys_eq expression was violated"],[t.LangErrorCode.RequireNeqViolated,"A require_neq expression was violated"],[t.LangErrorCode.RequireKeysNeqViolated,"A require_keys_neq expression was violated"],[t.LangErrorCode.RequireGtViolated,"A require_gt expression was violated"],[t.LangErrorCode.RequireGteViolated,"A require_gte expression was violated"],[t.LangErrorCode.AccountDiscriminatorAlreadySet,"The account discriminator was already set on this account"],[t.LangErrorCode.AccountDiscriminatorNotFound,"No 8 byte discriminator was found on the account"],[t.LangErrorCode.AccountDiscriminatorMismatch,"8 byte discriminator did not match what was expected"],[t.LangErrorCode.AccountDidNotDeserialize,"Failed to deserialize the account"],[t.LangErrorCode.AccountDidNotSerialize,"Failed to serialize the account"],[t.LangErrorCode.AccountNotEnoughKeys,"Not enough account keys given to the instruction"],[t.LangErrorCode.AccountNotMutable,"The given account is not mutable"],[t.LangErrorCode.AccountOwnedByWrongProgram,"The given account is owned by a different program than expected"],[t.LangErrorCode.InvalidProgramId,"Program ID was not as expected"],[t.LangErrorCode.InvalidProgramExecutable,"Program account is not executable"],[t.LangErrorCode.AccountNotSigner,"The given account did not sign"],[t.LangErrorCode.AccountNotSystemOwned,"The given account is not owned by the system program"],[t.LangErrorCode.AccountNotInitialized,"The program expected this account to be already initialized"],[t.LangErrorCode.AccountNotProgramData,"The given account is not a program data account"],[t.LangErrorCode.AccountNotAssociatedTokenAccount,"The given account is not the associated token account"],[t.LangErrorCode.AccountSysvarMismatch,"The given public key does not match the required sysvar"],[t.LangErrorCode.AccountReallocExceedsLimit,"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit"],[t.LangErrorCode.AccountDuplicateReallocs,"The account was duplicated for more than one reallocation"],[t.LangErrorCode.StateInvalidAddress,"The given state account does not have the correct address"],[t.LangErrorCode.DeclaredProgramIdMismatch,"The declared program id does not match the actual program id"],[t.LangErrorCode.Deprecated,"The API being used is deprecated and should no longer be used"]])},18128:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.translateAddress=t.validateAccounts=t.toInstruction=t.parseIdlErrors=void 0;var a=n(8594);t.parseIdlErrors=function(e){var t=new Map;return e.errors&&e.errors.forEach((function(e){var n,a=null!==(n=e.msg)&&void 0!==n?n:e.name;t.set(e.code,a)})),t},t.toInstruction=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:{};t.forEach((function(t){if("accounts"in t)e(t.accounts,n[t.name]);else if(void 0===n[t.name])throw new Error("Invalid arguments: ".concat(t.name," not provided."))}))},t.translateAddress=function(e){return e instanceof a.PublicKey?e:new a.PublicKey(e)}},93970:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitArgsAndCtx=void 0,t.splitArgsAndCtx=function(e,t){var n,a,o={},r=e.args?e.args.length:0;if(t.length>r){if(t.length!==r+1)throw new Error("provided too many arguments ".concat(t," to instruction ").concat(null===e||void 0===e?void 0:e.name," expecting: ").concat(null!==(a=null===(n=e.args)||void 0===n?void 0:n.map((function(e){return e.name})))&&void 0!==a?a:[]));o=t.pop()}return[t,o]}},98890:function(e,t,n){"use strict";var a=n(65218),o=n(861).default,r=n(27424).default,i=n(56690).default,s=n(89728).default,c=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),u=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&c(t,e,n);return u(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var l=n(8594),f=n(69580),p=n(18128),b=n(93970),m=d(n(27021)),h=function(){function e(){i(this,e)}return s(e,null,[{key:"build",value:function(t,n,i){if("_inner"===t.name)throw new f.IdlError("the _inner name is reserved");var s=function e(){for(var s=arguments.length,c=new Array(s),u=0;u1&&void 0!==arguments[1]?arguments[1]:0,n=new l.default(this.blob.decode(e,t),10,"le");return this.signed?n.fromTwos(8*this.span).clone():n}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.signed&&(e=e.toTwos(8*this.span)),this.blob.encode(e.toArrayLike(a,"le",this.span),t,n)}}]),n}(u.Layout);function b(e){return new p(8,!1,e)}t.u64=b,t.i64=function(e){return new p(8,!0,e)},t.u128=function(e){return new p(16,!1,e)},t.i128=function(e){return new p(16,!0,e)};var m=function(e){i(n,e);var t=s(n);function n(e,a,r,i){var s;return o(this,n),(s=t.call(this,e.span,i)).layout=e,s.decoder=a,s.encoder=r,s}return r(n,[{key:"decode",value:function(e,t){return this.decoder(this.layout.decode(e,t))}},{key:"encode",value:function(e,t,n){return this.layout.encode(this.encoder(e),t,n)}},{key:"getSpan",value:function(e,t){return this.layout.getSpan(e,t)}}]),n}(u.Layout);t.publicKey=function(e){return new m(u.blob(32),(function(e){return new d.PublicKey(e)}),(function(e){return e.toBuffer()}),e)};var h=function(e){i(n,e);var t=s(n);function n(e,a){var r;return o(this,n),(r=t.call(this,-1,a)).layout=e,r.discriminator=u.u8(),r}return r(n,[{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null===e||void 0===e?this.discriminator.encode(0,t,n):(this.discriminator.encode(1,t,n),this.layout.encode(e,t,n+1)+1)}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.discriminator.decode(e,t);if(0===n)return null;if(1===n)return this.layout.decode(e,t+1);throw new Error("Invalid option "+this.property)}},{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.discriminator.decode(e,t);if(0===n)return 1;if(1===n)return this.layout.getSpan(e,t+1)+1;throw new Error("Invalid option "+this.property)}}]),n}(u.Layout);function g(e){if(0===e)return!1;if(1===e)return!0;throw new Error("Invalid bool: "+e)}function y(e){return e?1:0}function v(e){var t=u.u32("length"),n=u.struct([t,u.blob(u.offset(t,-t.span),"data")]);return new m(n,(function(e){return e.data}),(function(e){return{data:e}}),e)}t.option=function(e,t){return new h(e,t)},t.bool=function(e){return new m(u.u8(),g,y,e)},t.vec=function(e,t){var n=u.u32("length"),a=u.struct([n,u.seq(e,u.offset(n,-n.span),"values")]);return new m(a,(function(e){return e.values}),(function(e){return{values:e}}),t)},t.tagged=function(e,t,n){var a=u.struct([b("tag"),t.replicate("data")]);return new m(a,(function(t){var n=t.tag,a=t.data;if(!n.eq(e))throw new Error("Invalid tag, expected: "+e.toString("hex")+", got: "+n.toString("hex"));return a}),(function(t){return{tag:e,data:t}}),n)},t.vecU8=v,t.str=function(e){return new m(v(),(function(e){return e.toString("utf-8")}),(function(e){return a.from(e,"utf-8")}),e)},t.rustEnum=function(e,t,n){var a=u.union(null!==n&&void 0!==n?n:u.u8(),t);return e.forEach((function(e,t){return a.addVariant(t,e,e.property)})),a},t.array=function(e,t,n){var a=u.struct([u.seq(e,t,"values")]);return new m(a,(function(e){return e.values}),(function(e){return{values:e}}),n)};var w=function(e){i(n,e);var t=s(n);function n(e,a,r){var i;return o(this,n),(i=t.call(this,e.span+a.span,r)).keyLayout=e,i.valueLayout=a,i}return r(n,[{key:"decode",value:function(e,t){return t=t||0,[this.keyLayout.decode(e,t),this.valueLayout.decode(e,t+this.keyLayout.getSpan(e,t))]}},{key:"encode",value:function(e,t,n){n=n||0;var a=this.keyLayout.encode(e[0],t,n);return a+this.valueLayout.encode(e[1],t,n+a)}},{key:"getSpan",value:function(e,t){return this.keyLayout.getSpan(e,t)+this.valueLayout.getSpan(e,t)}}]),n}(u.Layout);t.map=function(e,t,n){var a=u.u32("length"),o=u.struct([a,u.seq(new w(e,t),u.offset(a,-a.span),"values")]);return new m(o,(function(e){var t=e.values;return new Map(t)}),(function(e){return{values:Array.from(e.entries())}}),n)}},65016:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(17061).default,r=n(74704).default,i=n(17156).default,s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetMultipleAccountsAndContextRpcResult=t.getMultipleSolanaAccounts=void 0;var c=n(8594),u=n(5683),d=s(n(75979));function l(){return(l=i(o().mark((function e(n,i){var s,u,l,f,p,b,m,h,g,y,v,w;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=[i.map((function(e){return e.toBase58()})),{commitment:"recent"}],e.next=3,n._rpcRequest("getMultipleAccounts",s);case 3:if(u=e.sent,!(l=t.GetMultipleAccountsAndContextRpcResult(u)).error){e.next=7;break}throw new Error("failed to get info about accounts "+i.map((function(e){return e.toBase58()})).join(", ")+": "+l.error.message);case 7:d.default("undefined"!==typeof l.result),f=[],p=r(l.result.value),e.prev=10,p.s();case 12:if((b=p.n()).done){e.next=21;break}if(m=b.value,h=null,l.result.value&&(g=m.executable,y=m.owner,v=m.lamports,w=m.data,d.default("base64"===w[1]),h={executable:g,owner:new c.PublicKey(y),lamports:v,data:a.from(w[0],"base64")}),null!==h){e.next=18;break}throw new Error("Invalid response");case 18:f.push(h);case 19:e.next=12;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(10),p.e(e.t0);case 26:return e.prev=26,p.f(),e.finish(26);case 29:return e.abrupt("return",f.map((function(e,t){return{publicKey:i[t],account:e}})));case 30:case"end":return e.stop()}}),e,null,[[10,23,26,29]])})))).apply(this,arguments)}t.getMultipleSolanaAccounts=function(e,t){return l.apply(this,arguments)};var f,p=u.struct({executable:"boolean",owner:"string",lamports:"number",data:"any",rentEpoch:"number?"});t.GetMultipleAccountsAndContextRpcResult=(f=u.struct.array([u.struct.union(["null",p])]),function(e){var t=u.struct.literal("2.0");return u.struct.union([u.struct({jsonrpc:t,id:"string",error:"any"}),u.struct({jsonrpc:t,id:"string",error:"null?",result:e})])}({context:u.struct({slot:"number"}),value:f}))},14978:function(e,t,n){"use strict";var a=n(17061).default,o=n(861).default,r=n(17156).default,i=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)},u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=t.parseTokenAccount=t.getTokenAccount=t.parseMintAccount=t.getMintInfo=t.createAccountRentExempt=t.createTokenAccountInstrs=t.createTokenAccount=t.createMintAndVault=t.createMintInstructions=t.createMint=t.SPL_SHARED_MEMORY_ID=t.connection=t.simulateTransaction=t.token=void 0;var d=n(8594),l=n(97180),f=n(8360);c(n(41642),t),t.token=u(n(12464));var p=n(40318);function b(){return(b=r(a().mark((function e(t,n,r){var i,s,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n=t.wallet.publicKey),i=new d.Account,e.next=4,m(t,n,i.publicKey,r);case 4:return s=e.sent,(c=new d.Transaction).add.apply(c,o(s)),e.next=9,t.send(c,[i]);case 9:return e.abrupt("return",i.publicKey);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t,n,a){return h.apply(this,arguments)}function h(){return(h=r(a().mark((function e(t,n,o,r){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=d.SystemProgram,e.t1=t.wallet.publicKey,e.t2=o,e.next=5,t.connection.getMinimumBalanceForRentExemption(82);case 5:return e.t3=e.sent,e.t4=f.TokenInstructions.TOKEN_PROGRAM_ID,e.t5={fromPubkey:e.t1,newAccountPubkey:e.t2,space:82,lamports:e.t3,programId:e.t4},e.t6=e.t0.createAccount.call(e.t0,e.t5),e.t7=f.TokenInstructions.initializeMint({mint:o,decimals:null!==r&&void 0!==r?r:0,mintAuthority:n}),i=[e.t6,e.t7],e.abrupt("return",i);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=r(a().mark((function e(t,n,o,r){var i,s,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===o&&(o=t.wallet.publicKey),i=new d.Account,s=new d.Account,c=new d.Transaction,e.t0=c,e.t1=d.SystemProgram,e.t2=t.wallet.publicKey,e.t3=i.publicKey,e.next=10,t.connection.getMinimumBalanceForRentExemption(82);case 10:return e.t4=e.sent,e.t5=f.TokenInstructions.TOKEN_PROGRAM_ID,e.t6={fromPubkey:e.t2,newAccountPubkey:e.t3,space:82,lamports:e.t4,programId:e.t5},e.t7=e.t1.createAccount.call(e.t1,e.t6),e.t8=f.TokenInstructions.initializeMint({mint:i.publicKey,decimals:null!==r&&void 0!==r?r:0,mintAuthority:t.wallet.publicKey}),e.t9=d.SystemProgram,e.t10=t.wallet.publicKey,e.t11=s.publicKey,e.next=20,t.connection.getMinimumBalanceForRentExemption(165);case 20:return e.t12=e.sent,e.t13=f.TokenInstructions.TOKEN_PROGRAM_ID,e.t14={fromPubkey:e.t10,newAccountPubkey:e.t11,space:165,lamports:e.t12,programId:e.t13},e.t15=e.t9.createAccount.call(e.t9,e.t14),e.t16=f.TokenInstructions.initializeAccount({account:s.publicKey,mint:i.publicKey,owner:o}),e.t17=f.TokenInstructions.mintTo({mint:i.publicKey,destination:s.publicKey,amount:n,mintAuthority:t.wallet.publicKey}),e.t0.add.call(e.t0,e.t7,e.t8,e.t15,e.t16,e.t17),e.next=29,t.send(c,[i,s]);case 29:return e.abrupt("return",[i.publicKey,s.publicKey]);case 30:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(){return(y=r(a().mark((function e(t,n,r){var i,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new d.Account,s=new d.Transaction,e.t0=s.add,e.t1=s,e.t2=o,e.next=7,v(t,i.publicKey,n,r);case 7:return e.t3=e.sent,e.t4=(0,e.t2)(e.t3),e.t0.apply.call(e.t0,e.t1,e.t4),e.next=12,t.send(s,[i]);case 12:return e.abrupt("return",i.publicKey);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e,t,n,a,o){return w.apply(this,arguments)}function w(){return(w=r(a().mark((function e(t,n,o,r,i){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==i){e.next=4;break}return e.next=3,t.connection.getMinimumBalanceForRentExemption(165);case 3:i=e.sent;case 4:return e.abrupt("return",[d.SystemProgram.createAccount({fromPubkey:t.wallet.publicKey,newAccountPubkey:n,space:165,lamports:i,programId:f.TokenInstructions.TOKEN_PROGRAM_ID}),f.TokenInstructions.initializeAccount({account:n,mint:o,owner:r})]);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(){return(k=r(a().mark((function e(t,n,o){var r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new d.Account,i=new d.Transaction,e.t0=i,e.t1=d.SystemProgram,e.t2=t.wallet.publicKey,e.t3=r.publicKey,e.t4=o,e.next=9,t.connection.getMinimumBalanceForRentExemption(o);case 9:return e.t5=e.sent,e.t6=n,e.t7={fromPubkey:e.t2,newAccountPubkey:e.t3,space:e.t4,lamports:e.t5,programId:e.t6},e.t8=e.t1.createAccount.call(e.t1,e.t7),e.t0.add.call(e.t0,e.t8),e.next=16,t.send(i,[r]);case 16:return e.abrupt("return",r);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(){return(A=r(a().mark((function e(t,n){var o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.connection.getAccountInfo(n);case 2:if(null!==(o=e.sent)){e.next=5;break}throw new Error("Failed to find token account");case 5:return e.abrupt("return",x(o.data));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e){var t=l.MintLayout.decode(e);return t.mintAuthority=new d.PublicKey(t.mintAuthority),t.supply=l.u64.fromBuffer(t.supply),t.isInitialized=0!==t.state,t}function I(){return(I=r(a().mark((function e(t,n){var o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.connection.getAccountInfo(n);case 2:if(null!==(o=e.sent)){e.next=5;break}throw new Error("Failed to find token account");case 5:return e.abrupt("return",T(o.data));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){var t=l.AccountLayout.decode(e);return t.mint=new d.PublicKey(t.mint),t.owner=new d.PublicKey(t.owner),t.amount=l.u64.fromBuffer(t.amount),0===t.delegateOption?(t.delegate=null,t.delegatedAmount=new l.u64(0)):(t.delegate=new d.PublicKey(t.delegate),t.delegatedAmount=l.u64.fromBuffer(t.delegatedAmount)),t.isInitialized=0!==t.state,t.isFrozen=2===t.state,1===t.isNativeOption?(t.rentExemptReserve=l.u64.fromBuffer(t.isNative),t.isNative=!0):(t.rentExemptReserve=null,t.isNative=!1),0===t.closeAuthorityOption?t.closeAuthority=null:t.closeAuthority=new d.PublicKey(t.closeAuthority),t}Object.defineProperty(t,"simulateTransaction",{enumerable:!0,get:function(){return p.simulateTransaction}}),t.connection=u(n(65016)),t.SPL_SHARED_MEMORY_ID=new d.PublicKey("shmem4EWT2sPdVGvTZCzXXRAURL9G5vpPxNwSeKhHUL"),t.createMint=function(e,t,n){return b.apply(this,arguments)},t.createMintInstructions=m,t.createMintAndVault=function(e,t,n,a){return g.apply(this,arguments)},t.createTokenAccount=function(e,t,n){return y.apply(this,arguments)},t.createTokenAccountInstrs=v,t.createAccountRentExempt=function(e,t,n){return k.apply(this,arguments)},t.getMintInfo=function(e,t){return A.apply(this,arguments)},t.parseMintAccount=x,t.getTokenAccount=function(e,t){return I.apply(this,arguments)},t.parseTokenAccount=T,t.sleep=function(e){return new Promise((function(t){return setTimeout(t,e)}))}},41642:function(e,t,n){"use strict";var a=n(65218),o=n(54659).Buffer,r=n(17061).default,i=n(861).default,s=n(17156).default,c=n(56690).default,u=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.NodeWallet=t.Provider=void 0;var d=n(8594),l=n(40318),f=function(){function e(t,n,a){c(this,e),this.connection=t,this.wallet=n,this.opts=a}return u(e,[{key:"send",value:function(){var e=s(r().mark((function e(t,n,o){var s,c,u,f,p,b;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n=[]),void 0===o&&(o=this.opts),c=n.filter((function(e){return void 0!==e})),u=[this.wallet.publicKey].concat(c.map((function(e){return e.publicKey}))),t.setSigners.apply(t,i(u)),e.next=7,this.connection.getRecentBlockhash(o.preflightCommitment);case 7:return t.recentBlockhash=e.sent.blockhash,e.next=10,this.wallet.signTransaction(t);case 10:return c.forEach((function(e){t.partialSign(e)})),f=t.serialize(),e.prev=12,e.next=15,d.sendAndConfirmRawTransaction(this.connection,f,o);case 15:return p=e.sent,e.abrupt("return",p);case 19:return e.prev=19,e.t0=e.catch(12),a.error("Transaction failed. Simulating for logs..."),e.next=24,l.simulateTransaction(this.connection,t,null!==(s=o.commitment)&&void 0!==s?s:"recent");case 24:throw b=e.sent,a.error(b),e.t0;case 27:case"end":return e.stop()}}),e,this,[[12,19]])})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"sendAll",value:function(){var e=s(r().mark((function e(t,n){var o,s,c,u,f,p,b,m,h,g=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n=this.opts),e.next=3,this.connection.getRecentBlockhash(n.preflightCommitment);case 3:return s=e.sent,c=t.map((function(e){var t=e.tx,n=e.signers;void 0===n&&(n=[]);var a=n.filter((function(e){return void 0!==e})),o=[g.wallet.publicKey].concat(a.map((function(e){return e.publicKey})));return t.setSigners.apply(t,i(o)),t.recentBlockhash=s.blockhash,a.forEach((function(e){t.partialSign(e)})),t})),e.next=7,this.wallet.signAllTransactions(c);case 7:u=e.sent,f=[],p=0;case 10:if(!(p1},t.getFeeRates=function(e){return 1===e?{taker:.002,maker:-3e-4}:2===e?{taker:.0018,maker:-3e-4}:3===e?{taker:.0016,maker:-3e-4}:4===e?{taker:.0014,maker:-3e-4}:5===e?{taker:.0012,maker:-3e-4}:6===e?{taker:.001,maker:-5e-4}:{taker:.0022,maker:-3e-4}},t.getFeeTier=function(e,t){return e>=1?6:t>=1e6?5:t>=1e5?4:t>=1e4?3:t>=1e3?2:t>=100?1:0}},8360:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.PermissionedCrank=t.ReferralFees=t.OpenOrdersPda=t.MarketProxyBuilder=t.MarketProxy=t.TokenInstructions=t.EVENT_QUEUE_LAYOUT=t.REQUEST_QUEUE_LAYOUT=t.decodeRequestQueue=t.decodeEventQueue=t.getLayoutVersion=t.MARKETS=t.TOKEN_MINTS=t.supportsSrmFeeDiscounts=t.getFeeRates=t.getFeeTier=t.NEW_ORDER_V3_OWNER_INDEX=t.NEW_ORDER_V3_OPEN_ORDERS_INDEX=t.NEW_ORDER_OWNER_INDEX=t.NEW_ORDER_OPEN_ORDERS_INDEX=t.SETTLE_FUNDS_QUOTE_WALLET_INDEX=t.SETTLE_FUNDS_BASE_WALLET_INDEX=t.decodeInstructionV2=t.decodeInstruction=t.DexInstructions=t.MARKET_STATE_LAYOUT_V2=t.MARKET_STATE_LAYOUT_V3=t.OpenOrders=t.Orderbook=t.Market=void 0;var s=n(46004);Object.defineProperty(t,"Market",{enumerable:!0,get:function(){return s.Market}}),Object.defineProperty(t,"Orderbook",{enumerable:!0,get:function(){return s.Orderbook}}),Object.defineProperty(t,"OpenOrders",{enumerable:!0,get:function(){return s.OpenOrders}}),Object.defineProperty(t,"MARKET_STATE_LAYOUT_V3",{enumerable:!0,get:function(){return s.MARKET_STATE_LAYOUT_V3}}),Object.defineProperty(t,"MARKET_STATE_LAYOUT_V2",{enumerable:!0,get:function(){return s.MARKET_STATE_LAYOUT_V2}});var c=n(51071);Object.defineProperty(t,"DexInstructions",{enumerable:!0,get:function(){return c.DexInstructions}}),Object.defineProperty(t,"decodeInstruction",{enumerable:!0,get:function(){return c.decodeInstruction}}),Object.defineProperty(t,"decodeInstructionV2",{enumerable:!0,get:function(){return c.decodeInstructionV2}}),Object.defineProperty(t,"SETTLE_FUNDS_BASE_WALLET_INDEX",{enumerable:!0,get:function(){return c.SETTLE_FUNDS_BASE_WALLET_INDEX}}),Object.defineProperty(t,"SETTLE_FUNDS_QUOTE_WALLET_INDEX",{enumerable:!0,get:function(){return c.SETTLE_FUNDS_QUOTE_WALLET_INDEX}}),Object.defineProperty(t,"NEW_ORDER_OPEN_ORDERS_INDEX",{enumerable:!0,get:function(){return c.NEW_ORDER_OPEN_ORDERS_INDEX}}),Object.defineProperty(t,"NEW_ORDER_OWNER_INDEX",{enumerable:!0,get:function(){return c.NEW_ORDER_OWNER_INDEX}}),Object.defineProperty(t,"NEW_ORDER_V3_OPEN_ORDERS_INDEX",{enumerable:!0,get:function(){return c.NEW_ORDER_V3_OPEN_ORDERS_INDEX}}),Object.defineProperty(t,"NEW_ORDER_V3_OWNER_INDEX",{enumerable:!0,get:function(){return c.NEW_ORDER_V3_OWNER_INDEX}});var u=n(12608);Object.defineProperty(t,"getFeeTier",{enumerable:!0,get:function(){return u.getFeeTier}}),Object.defineProperty(t,"getFeeRates",{enumerable:!0,get:function(){return u.getFeeRates}}),Object.defineProperty(t,"supportsSrmFeeDiscounts",{enumerable:!0,get:function(){return u.supportsSrmFeeDiscounts}});var d=n(71567);Object.defineProperty(t,"TOKEN_MINTS",{enumerable:!0,get:function(){return d.TOKEN_MINTS}}),Object.defineProperty(t,"MARKETS",{enumerable:!0,get:function(){return d.MARKETS}}),Object.defineProperty(t,"getLayoutVersion",{enumerable:!0,get:function(){return d.getLayoutVersion}});var l=n(5904);Object.defineProperty(t,"decodeEventQueue",{enumerable:!0,get:function(){return l.decodeEventQueue}}),Object.defineProperty(t,"decodeRequestQueue",{enumerable:!0,get:function(){return l.decodeRequestQueue}}),Object.defineProperty(t,"REQUEST_QUEUE_LAYOUT",{enumerable:!0,get:function(){return l.REQUEST_QUEUE_LAYOUT}}),Object.defineProperty(t,"EVENT_QUEUE_LAYOUT",{enumerable:!0,get:function(){return l.EVENT_QUEUE_LAYOUT}}),t.TokenInstructions=r(n(11479)),i(n(77167),t);var f=n(65420);Object.defineProperty(t,"MarketProxy",{enumerable:!0,get:function(){return f.MarketProxy}}),Object.defineProperty(t,"MarketProxyBuilder",{enumerable:!0,get:function(){return f.MarketProxyBuilder}});var p=n(8722);Object.defineProperty(t,"OpenOrdersPda",{enumerable:!0,get:function(){return p.OpenOrdersPda}}),Object.defineProperty(t,"ReferralFees",{enumerable:!0,get:function(){return p.ReferralFees}}),Object.defineProperty(t,"PermissionedCrank",{enumerable:!0,get:function(){return p.PermissionedCrank}}),Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return p.Logger}})},51071:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(861).default,r=n(42122).default,i=n(38416).default,s=n(56690).default,c=n(89728).default,u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DexInstructions=t.decodeInstructionV2=t.decodeInstruction=t.encodeInstructionV2=t.encodeInstruction=t.INSTRUCTION_LAYOUT_V2=t.INSTRUCTION_LAYOUT=t.NEW_ORDER_V3_OWNER_INDEX=t.NEW_ORDER_V3_OPEN_ORDERS_INDEX=t.NEW_ORDER_OWNER_INDEX=t.NEW_ORDER_OPEN_ORDERS_INDEX=t.SETTLE_FUNDS_QUOTE_WALLET_INDEX=t.SETTLE_FUNDS_BASE_WALLET_INDEX=void 0;var d=n(73073),l=n(16135),f=n(8594),p=n(11479),b=u(n(43811));t.SETTLE_FUNDS_BASE_WALLET_INDEX=5,t.SETTLE_FUNDS_QUOTE_WALLET_INDEX=6,t.NEW_ORDER_OPEN_ORDERS_INDEX=1,t.NEW_ORDER_OWNER_INDEX=4,t.NEW_ORDER_V3_OPEN_ORDERS_INDEX=1,t.NEW_ORDER_V3_OWNER_INDEX=7,t.INSTRUCTION_LAYOUT=new l.VersionedLayout(0,d.union(d.u32("instruction"))),t.INSTRUCTION_LAYOUT.inner.addVariant(0,d.struct([l.u64("baseLotSize"),l.u64("quoteLotSize"),d.u16("feeRateBps"),l.u64("vaultSignerNonce"),l.u64("quoteDustThreshold")]),"initializeMarket"),t.INSTRUCTION_LAYOUT.inner.addVariant(1,d.struct([l.sideLayout("side"),l.u64("limitPrice"),l.u64("maxQuantity"),l.orderTypeLayout("orderType"),l.u64("clientId")]),"newOrder"),t.INSTRUCTION_LAYOUT.inner.addVariant(2,d.struct([d.u16("limit")]),"matchOrders"),t.INSTRUCTION_LAYOUT.inner.addVariant(3,d.struct([d.u16("limit")]),"consumeEvents"),t.INSTRUCTION_LAYOUT.inner.addVariant(4,d.struct([l.sideLayout("side"),l.u128("orderId"),l.publicKeyLayout("openOrders"),d.u8("openOrdersSlot")]),"cancelOrder"),t.INSTRUCTION_LAYOUT.inner.addVariant(5,d.struct([]),"settleFunds"),t.INSTRUCTION_LAYOUT.inner.addVariant(6,d.struct([l.u64("clientId")]),"cancelOrderByClientId"),t.INSTRUCTION_LAYOUT.inner.addVariant(10,d.struct([l.sideLayout("side"),l.u64("limitPrice"),l.u64("maxBaseQuantity"),l.u64("maxQuoteQuantity"),l.selfTradeBehaviorLayout("selfTradeBehavior"),l.orderTypeLayout("orderType"),l.u64("clientId"),d.u16("limit")]),"newOrderV3"),t.INSTRUCTION_LAYOUT.inner.addVariant(11,d.struct([l.sideLayout("side"),l.u128("orderId")]),"cancelOrderV2"),t.INSTRUCTION_LAYOUT.inner.addVariant(12,d.struct([l.u64("clientId")]),"cancelOrderByClientIdV2"),t.INSTRUCTION_LAYOUT.inner.addVariant(14,d.struct([]),"closeOpenOrders"),t.INSTRUCTION_LAYOUT.inner.addVariant(15,d.struct([]),"initOpenOrders"),t.INSTRUCTION_LAYOUT.inner.addVariant(16,d.struct([d.u16("limit")]),"prune"),t.INSTRUCTION_LAYOUT.inner.addVariant(17,d.struct([d.u16("limit")]),"consumeEventsPermissioned"),t.INSTRUCTION_LAYOUT.inner.addVariant(18,d.struct([d.seq(l.u64(),8,"clientIds")]),"cancelOrdersByClientIds");var m=function(){return d.struct([l.sideLayout("side"),l.u64("limitPrice"),l.u64("maxBaseQuantity"),l.u64("maxQuoteQuantity"),l.selfTradeBehaviorLayout("selfTradeBehavior"),l.orderTypeLayout("orderType"),l.u64("clientId"),d.u16("limit"),l.i64("maxTs")])};function h(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,o=a.alloc(n);return o.slice(0,t.INSTRUCTION_LAYOUT.encode(e,o))}function g(e){var n=a.alloc(100);return n.slice(0,t.INSTRUCTION_LAYOUT_V2.encode(e,n))}t.INSTRUCTION_LAYOUT.inner.addVariant(19,m(),"replaceOrderByClientId"),t.INSTRUCTION_LAYOUT.inner.addVariant(20,d.struct([l.u64("orderAmount"),d.seq(m(),8,"orders")]),"replaceOrdersByClientIds"),t.INSTRUCTION_LAYOUT_V2=new l.VersionedLayout(0,d.union(d.u32("instruction"))),t.INSTRUCTION_LAYOUT_V2.inner.addVariant(10,m(),"newOrderV3"),t.encodeInstruction=h,t.encodeInstructionV2=g,t.decodeInstruction=function(e){return t.INSTRUCTION_LAYOUT.decode(e)},t.decodeInstructionV2=function(e){return t.INSTRUCTION_LAYOUT_V2.decode(e)};var y=function(){function e(){s(this,e)}return c(e,null,[{key:"initializeMarket",value:function(e){var t=e.market,n=e.requestQueue,a=e.eventQueue,o=e.bids,r=e.asks,i=e.baseVault,s=e.quoteVault,c=e.baseMint,u=e.quoteMint,d=e.baseLotSize,l=e.quoteLotSize,p=e.feeRateBps,b=e.vaultSignerNonce,m=e.quoteDustThreshold,g=e.programId,y=e.authority,v=void 0===y?void 0:y,w=e.pruneAuthority,k=void 0===w?void 0:w,A=e.crankAuthority,x=void 0===A?void 0:A;new f.PublicKey("SysvarRent111111111111111111111111111111111");return new f.TransactionInstruction({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:c,isSigner:!1,isWritable:!1},{pubkey:u,isSigner:!1,isWritable:!1},{pubkey:v?u:f.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}].concat(v?{pubkey:v,isSigner:!1,isWritable:!1}:[]).concat(v&&k?{pubkey:k,isSigner:!1,isWritable:!1}:[]).concat(v&&k&&x?{pubkey:x,isSigner:!1,isWritable:!1}:[]),programId:g,data:h({initializeMarket:{baseLotSize:d,quoteLotSize:l,feeRateBps:p,vaultSignerNonce:b,quoteDustThreshold:m}})})}},{key:"newOrder",value:function(e){var t=e.market,n=e.openOrders,a=e.payer,o=e.owner,r=e.requestQueue,i=e.baseVault,s=e.quoteVault,c=e.side,u=e.limitPrice,d=e.maxQuantity,l=e.orderType,b=e.clientId,m=e.programId,g=e.feeDiscountPubkey,y=void 0===g?null:g,v=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!0,isWritable:!1},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:p.TOKEN_PROGRAM_ID,isSigner:!1,isWritable:!1},{pubkey:f.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];return y&&v.push({pubkey:y,isSigner:!1,isWritable:!1}),new f.TransactionInstruction({keys:v,programId:m,data:h({newOrder:b?{side:c,limitPrice:u,maxQuantity:d,orderType:l,clientId:b}:{side:c,limitPrice:u,maxQuantity:d,orderType:l}})})}},{key:"newOrderV3",value:function(e){var t,n,a=e.market,o=e.openOrders,r=e.payer,s=e.owner,c=e.requestQueue,u=e.eventQueue,d=e.bids,l=e.asks,m=e.baseVault,y=e.quoteVault,v=e.side,w=e.limitPrice,k=e.maxBaseQuantity,A=e.maxQuoteQuantity,x=e.orderType,I=e.clientId,T=e.programId,S=e.selfTradeBehavior,C=e.feeDiscountPubkey,E=void 0===C?null:C,R=e.maxTs,M=void 0===R?null:R,P=e.replaceIfExists,U=void 0!==P&&P,_=[{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:c,isSigner:!1,isWritable:!0},{pubkey:u,isSigner:!1,isWritable:!0},{pubkey:d,isSigner:!1,isWritable:!0},{pubkey:l,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!0,isWritable:!1},{pubkey:m,isSigner:!1,isWritable:!0},{pubkey:y,isSigner:!1,isWritable:!0},{pubkey:p.TOKEN_PROGRAM_ID,isSigner:!1,isWritable:!1},{pubkey:f.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];return E&&_.push({pubkey:E,isSigner:!1,isWritable:!1}),U?(t="replaceOrderByClientId",n=h):(t="newOrderV3",n=M?g:h),new f.TransactionInstruction({keys:_,programId:T,data:n(i({},t,{side:v,limitPrice:w,maxBaseQuantity:k,maxQuoteQuantity:A,selfTradeBehavior:S,orderType:x,clientId:I,limit:65535,maxTs:new b.default(null!==M&&void 0!==M?M:"9223372036854775807")}))})}},{key:"replaceOrdersByClientIds",value:function(e){var t=e.market,n=e.openOrders,a=e.payer,o=e.owner,i=e.requestQueue,s=e.eventQueue,c=e.bids,u=e.asks,d=e.baseVault,l=e.quoteVault,m=e.feeDiscountPubkey,g=void 0===m?null:m,y=e.programId,v=e.orders,w=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:c,isSigner:!1,isWritable:!0},{pubkey:u,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!0,isWritable:!1},{pubkey:d,isSigner:!1,isWritable:!0},{pubkey:l,isSigner:!1,isWritable:!0},{pubkey:p.TOKEN_PROGRAM_ID,isSigner:!1,isWritable:!1},{pubkey:f.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];return g&&w.push({pubkey:g,isSigner:!1,isWritable:!1}),new f.TransactionInstruction({keys:w,programId:y,data:h({replaceOrdersByClientIds:{orderAmount:new b.default(v.length),orders:v.map((function(e){var t;return r(r({},e),{},{maxTs:new b.default(null!==(t=e.maxTs)&&void 0!==t?t:"9223372036854775807"),limit:65535})}))}},15+60*v.length).slice(0,13+54*v.length)})}},{key:"matchOrders",value:function(e){var t=e.market,n=e.requestQueue,a=e.eventQueue,o=e.bids,r=e.asks,i=e.baseVault,s=e.quoteVault,c=e.limit,u=e.programId;return new f.TransactionInstruction({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0}],programId:u,data:h({matchOrders:{limit:c}})})}},{key:"consumeEvents",value:function(e){var t=e.market,n=e.eventQueue,a=e.coinFee,r=e.pcFee,i=e.openOrdersAccounts,s=e.limit,c=e.programId;return new f.TransactionInstruction({keys:[].concat(o(i.map((function(e){return{pubkey:e,isSigner:!1,isWritable:!0}}))),[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWriteable:!0},{pubkey:r,isSigner:!1,isWritable:!0}]),programId:c,data:h({consumeEvents:{limit:s}})})}},{key:"consumeEventsPermissioned",value:function(e){var t=e.market,n=e.eventQueue,a=e.crankAuthority,r=e.openOrdersAccounts,i=e.limit,s=e.programId;return new f.TransactionInstruction({keys:[].concat(o(r.map((function(e){return{pubkey:e,isSigner:!1,isWritable:!0}}))),[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!0,isWritable:!1}]),programId:s,data:h({consumeEventsPermissioned:{limit:i}})})}},{key:"cancelOrder",value:function(e){var t=e.market,n=e.openOrders,a=e.owner,o=e.requestQueue,r=e.side,i=e.orderId,s=e.openOrdersSlot,c=e.programId;return new f.TransactionInstruction({keys:[{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!0,isWritable:!1}],programId:c,data:h({cancelOrder:{side:r,orderId:i,openOrders:n,openOrdersSlot:s}})})}},{key:"cancelOrderV2",value:function(e){var t=e.market,n=e.bids,a=e.asks,o=e.eventQueue,r=e.openOrders,i=e.owner,s=e.side,c=e.orderId,u=e.programId;return new f.TransactionInstruction({keys:[{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!0,isWritable:!1},{pubkey:o,isSigner:!1,isWritable:!0}],programId:u,data:h({cancelOrderV2:{side:s,orderId:c}})})}},{key:"cancelOrderByClientId",value:function(e){var t=e.market,n=e.openOrders,a=e.owner,o=e.requestQueue,r=e.clientId,i=e.programId;return new f.TransactionInstruction({keys:[{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!0,isWritable:!1}],programId:i,data:h({cancelOrderByClientId:{clientId:r}})})}},{key:"cancelOrderByClientIdV2",value:function(e){var t=e.market,n=e.openOrders,a=e.owner,o=e.bids,r=e.asks,i=e.eventQueue,s=e.clientId,c=e.programId;return new f.TransactionInstruction({keys:[{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!0,isWritable:!1},{pubkey:i,isSigner:!1,isWritable:!0}],programId:c,data:h({cancelOrderByClientIdV2:{clientId:s}})})}},{key:"cancelOrdersByClientIds",value:function(e){var t=e.market,n=e.openOrders,a=e.owner,o=e.bids,r=e.asks,i=e.eventQueue,s=e.clientIds,c=e.programId;if(s.length>8)throw new Error("Number of client ids cannot exceed 8!");for(;s.length<8;)s.push(new b.default(0));return new f.TransactionInstruction({keys:[{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!0,isWritable:!1},{pubkey:i,isSigner:!1,isWritable:!0}],programId:c,data:h({cancelOrdersByClientIds:{clientIds:s}})})}},{key:"settleFunds",value:function(e){var t=e.market,n=e.openOrders,a=e.owner,o=e.baseVault,r=e.quoteVault,i=e.baseWallet,s=e.quoteWallet,c=e.vaultSigner,u=e.programId,d=e.referrerQuoteWallet,l=void 0===d?null:d,b=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!0,isWritable:!1},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:c,isSigner:!1,isWritable:!1},{pubkey:p.TOKEN_PROGRAM_ID,isSigner:!1,isWritable:!1}];return l&&b.push({pubkey:l,isSigner:!1,isWritable:!0}),new f.TransactionInstruction({keys:b,programId:u,data:h({settleFunds:{}})})}},{key:"closeOpenOrders",value:function(e){var t=e.market,n=e.openOrders,a=e.owner,o=e.solWallet,r=e.programId,i=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!0,isWritable:!1},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!1}];return new f.TransactionInstruction({keys:i,programId:r,data:h({closeOpenOrders:{}})})}},{key:"initOpenOrders",value:function(e){var t=e.market,n=e.openOrders,a=e.owner,o=e.programId,r=e.marketAuthority,i=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!0,isWritable:!1},{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:f.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}].concat(r?{pubkey:r,isSigner:!1,isWritable:!1}:[]);return new f.TransactionInstruction({keys:i,programId:o,data:h({initOpenOrders:{}})})}},{key:"prune",value:function(e){var t=e.market,n=e.bids,a=e.asks,o=e.eventQueue,r=e.pruneAuthority,i=e.openOrders,s=e.openOrdersOwner,c=e.programId,u=e.limit,d=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!1},{pubkey:o,isSigner:!1,isWritable:!0}];return new f.TransactionInstruction({keys:d,programId:c,data:h({prune:{limit:u}})})}}]),e}();t.DexInstructions=y},16135:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(27424).default,r=n(42122).default,i=n(56690).default,s=n(89728).default,c=n(41588).default,u=n(73808).default,d=n(61655).default,l=n(26389).default,f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setLayoutEncoder=t.setLayoutDecoder=t.accountFlagsLayout=t.selfTradeBehaviorLayout=t.orderTypeLayout=t.sideLayout=t.VersionedLayout=t.WideBits=t.u128=t.i64=t.u64=t.publicKeyLayout=t.zeros=void 0;var p=n(73073),b=n(8594),m=f(n(43811)),h=function(e){d(n,e);var t=l(n);function n(){return i(this,n),t.apply(this,arguments)}return s(n,[{key:"decode",value:function(e,t){var a=c(u(n.prototype),"decode",this).call(this,e,t);if(!a.every((function(e){return 0===e})))throw new Error("nonzero padding bytes");return a}}]),n}(p.Blob);t.zeros=function(e){return new h(e)};var g=function(e){d(n,e);var t=l(n);function n(e){return i(this,n),t.call(this,32,e)}return s(n,[{key:"decode",value:function(e,t){return new b.PublicKey(c(u(n.prototype),"decode",this).call(this,e,t))}},{key:"encode",value:function(e,t,a){return c(u(n.prototype),"encode",this).call(this,e.toBuffer(),t,a)}}]),n}(p.Blob);t.publicKeyLayout=function(e){return new g(e)};var y=function(e){d(n,e);var t=l(n);function n(){return i(this,n),t.apply(this,arguments)}return s(n,[{key:"decode",value:function(e,t){return new m.default(c(u(n.prototype),"decode",this).call(this,e,t),10,"le")}},{key:"encode",value:function(e,t,o){return c(u(n.prototype),"encode",this).call(this,e.toArrayLike(a,"le",this.span),t,o)}}]),n}(p.Blob);t.u64=function(e){return new y(8,e)},t.i64=function(e){return new y(8,e)},t.u128=function(e){return new y(16,e)};var v=function(e){d(n,e);var t=l(n);function n(e){var a;return i(this,n),(a=t.call(this,8,e))._lower=p.bits(p.u32(),!1),a._upper=p.bits(p.u32(),!1),a}return s(n,[{key:"addBoolean",value:function(e){this._lower.fields.length<32?this._lower.addBoolean(e):this._upper.addBoolean(e)}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._lower.decode(e,t),a=this._upper.decode(e,t+this._lower.span);return r(r({},n),a)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this._lower.encode(e,t,n)+this._upper.encode(e,t,n+this._lower.span)}}]),n}(p.Layout);t.WideBits=v;var w=function(e){d(n,e);var t=l(n);function n(e,a,o){var r;return i(this,n),(r=t.call(this,a.span>0?a.span+1:a.span,o)).version=e,r.inner=a,r}return s(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.inner.decode(e,t+1)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t.writeUInt8(this.version,n),1+this.inner.encode(e,t,n+1)}},{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return 1+this.inner.getSpan(e,t+1)}}]),n}(p.Layout);t.VersionedLayout=w;var k=function(e){d(n,e);var t=l(n);function n(e,a,o){var r;return i(this,n),(r=t.call(this,a,o)).values=e,r}return s(n,[{key:"encode",value:function(e,t,a){if(void 0!==this.values[e])return c(u(n.prototype),"encode",this).call(this,this.values[e],t,a);throw new Error("Invalid "+this.property)}},{key:"decode",value:function(e,t){var a=c(u(n.prototype),"decode",this).call(this,e,t),r=Object.entries(this.values).find((function(e){return o(e,2)[1]===a}));if(r)return r[0];throw new Error("Invalid "+this.property)}}]),n}(p.UInt);t.sideLayout=function(e){return new k({buy:0,sell:1},4,e)},t.orderTypeLayout=function(e){return new k({limit:0,ioc:1,postOnly:2},4,e)},t.selfTradeBehaviorLayout=function(e){return new k({decrementTake:0,cancelProvide:1,abortTransaction:2},4,e)};var A=new v;A.addBoolean("initialized"),A.addBoolean("market"),A.addBoolean("openOrders"),A.addBoolean("requestQueue"),A.addBoolean("eventQueue"),A.addBoolean("bids"),A.addBoolean("asks"),t.accountFlagsLayout=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"accountFlags";return A.replicate(e)},t.setLayoutDecoder=function(e,t){var n=e.decode;e.decode=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t(n.call(this,e,a))}},t.setLayoutEncoder=function(e,t){var n=e.encode;return e.encode=function(e,a,o){return n.call(this,t(e),a,o)},e}},65420:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(17061).default,r=n(17156).default,i=n(861).default,s=n(42122).default,c=n(56690).default,u=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.MarketProxyBuilder=t.MarketProxyInstruction=t.MarketProxy=void 0;var d=n(80785),l=n(46004),f=n(51071),p=function(){function e(t,n){c(this,e),this._market=t,this._instruction=n}return u(e,[{key:"market",get:function(){return this._market}},{key:"instruction",get:function(){return this._instruction}},{key:"dexProgramId",get:function(){return this._market.programId}},{key:"proxyProgramId",get:function(){return this._instruction.proxyProgramId}}]),e}();t.MarketProxy=p;var b=function(){function e(t,n,a,o){c(this,e),this._proxyProgramId=t,this._dexProgramId=n,this._market=a,this._middlewares=o}return u(e,[{key:"proxyProgramId",get:function(){return this._proxyProgramId}},{key:"newOrderV3",value:function(e){var t=this._market.makeNewOrderV3Instruction(s(s({},e),{},{programId:this._proxyProgramId}));return this._middlewares.forEach((function(e){return e.newOrderV3(t)})),this.proxy(t)}},{key:"initOpenOrders",value:function(e,t,n,a){var o=f.DexInstructions.initOpenOrders({market:t,openOrders:n,owner:e,programId:this._proxyProgramId,marketAuthority:a});return this._middlewares.forEach((function(e){return e.initOpenOrders(o)})),this.proxy(o)}},{key:"cancelOrder",value:function(e,t){var n=f.DexInstructions.cancelOrderV2({market:this._market.address,owner:e,openOrders:t.openOrdersAddress,bids:this._market.decoded.bids,asks:this._market.decoded.asks,eventQueue:this._market.decoded.eventQueue,side:t.side,orderId:t.orderId,openOrdersSlot:t.openOrdersSlot,programId:this._proxyProgramId});return this._middlewares.forEach((function(e){return e.cancelOrderV2(n)})),this.proxy(n)}},{key:"cancelOrderByClientId",value:function(e,t,n){var a=f.DexInstructions.cancelOrderByClientIdV2({market:this._market.address,openOrders:t,owner:e,bids:this._market.decoded.bids,asks:this._market.decoded.asks,eventQueue:this._market.decoded.eventQueue,clientId:n,programId:this._proxyProgramId});return this._middlewares.forEach((function(e){return e.cancelOrderByClientIdV2(a)})),this.proxy(a)}},{key:"settleFunds",value:function(e,t,n,o,r){var i=f.DexInstructions.settleFunds({market:this._market.address,openOrders:e,owner:t,baseVault:this._market.decoded.baseVault,quoteVault:this._market.decoded.quoteVault,baseWallet:n,quoteWallet:o,vaultSigner:d.utils.publicKey.createProgramAddressSync([this._market.address.toBuffer(),this._market.decoded.vaultSignerNonce.toArrayLike(a,"le",8)],this._dexProgramId),programId:this._proxyProgramId,referrerQuoteWallet:r});return this._middlewares.forEach((function(e){return e.settleFunds(i)})),this.proxy(i)}},{key:"closeOpenOrders",value:function(e,t,n){var a=f.DexInstructions.closeOpenOrders({market:this._market.address,openOrders:e,owner:t,solWallet:n,programId:this._proxyProgramId});return this._middlewares.forEach((function(e){return e.closeOpenOrders(a)})),this.proxy(a)}},{key:"prune",value:function(e,t,n){n||(n=65535);var a=f.DexInstructions.prune({market:this._market.address,bids:this._market.decoded.bids,asks:this._market.decoded.asks,eventQueue:this._market.decoded.eventQueue,pruneAuthority:this._market.decoded.pruneAuthority,openOrders:e,openOrdersOwner:t,programId:this._proxyProgramId,limit:n});return this._middlewares.forEach((function(e){return e.prune(a)})),this.proxy(a)}},{key:"consumeEvents",value:function(e,t){var n=f.DexInstructions.consumeEvents({market:this._market.address,eventQueue:this._market.decoded.eventQueue,coinFee:this._market.decoded.eventQueue,pcFee:this._market.decoded.eventQueue,openOrdersAccounts:e,limit:t,programId:this._proxyProgramId});return this._middlewares.forEach((function(e){return e.consumeEvents(n)})),this.proxy(n)}},{key:"consumeEventsPermissioned",value:function(e,t){var n=f.DexInstructions.consumeEventsPermissioned({market:this._market.address,eventQueue:this._market.decoded.eventQueue,crankAuthority:this._market.decoded.consumeEventsAuthority,openOrdersAccounts:e,limit:t,programId:this._proxyProgramId});return this._middlewares.forEach((function(e){return e.consumeEventsPermissioned(n)})),this.proxy(n)}},{key:"proxy",value:function(e){return e.keys=[{pubkey:this._dexProgramId,isWritable:!1,isSigner:!1}].concat(i(e.keys)),e}}]),e}();t.MarketProxyInstruction=b;var m=function(){function e(){c(this,e),this._middlewares=[]}return u(e,[{key:"middleware",value:function(e){return this._middlewares.push(e),this}},{key:"load",value:function(){var e=r(o().mark((function e(t){var n,a,r,i,s,c,u,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.connection,a=t.market,r=t.options,i=void 0===r?{}:r,s=t.dexProgramId,c=t.proxyProgramId,e.next=3,l.Market.load(n,a,i,s,l.MARKET_STATE_LAYOUT_V3);case 3:return u=e.sent,d=new b(c,s,u,this._middlewares),e.abrupt("return",new p(u,d));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.MarketProxyBuilder=m},8722:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(65218),r=n(42122).default,i=n(17061).default,s=n(17156).default,c=n(861).default,u=n(27424).default,d=n(56690).default,l=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.PermissionedCrank=t.ReferralFees=t.OpenOrdersPda=void 0;var f=n(80785),p=n(8594),b=function(){function e(t){var n=t.proxyProgramId,a=t.dexProgramId;d(this,e),this._proxyProgramId=n,this._dexProgramId=a}return l(e,[{key:"initOpenOrders",value:function(e){var t=e.keys[2].pubkey,n=e.keys[1].pubkey,o=a.from([111,112,101,110,45,111,114,100,101,114,115]),r=a.from([111,112,101,110,45,111,114,100,101,114,115,45,105,110,105,116]),i=f.utils.publicKey.findProgramAddressSync([o,this._dexProgramId.toBuffer(),t.toBuffer(),n.toBuffer()],this._proxyProgramId),s=u(i,2),d=s[0],l=s[1],b=f.utils.publicKey.findProgramAddressSync([r,this._dexProgramId.toBuffer(),t.toBuffer()],this._proxyProgramId),m=u(b,2),h=m[0],g=m[1];e.keys[0].pubkey=d,e.keys[4].pubkey=h,e.keys[1].isWritable=!0,e.keys=[{pubkey:this._dexProgramId,isSigner:!1,isWritable:!1},{pubkey:p.SystemProgram.programId,isSigner:!1,isWritable:!1}].concat(c(e.keys)),e.data=a.concat([a.from([0,l,g]),e.data])}},{key:"newOrderV3",value:function(e){e.data=a.concat([a.from([1]),e.data])}},{key:"cancelOrderV2",value:function(e){e.data=a.concat([a.from([2]),e.data])}},{key:"cancelOrderByClientIdV2",value:function(e){e.data=a.concat([a.from([3]),e.data])}},{key:"settleFunds",value:function(e){e.data=a.concat([a.from([4]),e.data])}},{key:"closeOpenOrders",value:function(e){e.data=a.concat([a.from([5]),e.data])}},{key:"prune",value:function(e){e.data=a.concat([a.from([6]),e.data])}},{key:"consumeEvents",value:function(e){e.data=a.concat([a.from([7]),e.data])}},{key:"consumeEventsPermissioned",value:function(e){e.data=a.concat([a.from([8]),e.data])}}],[{key:"marketAuthority",value:function(){var e=s(i().mark((function e(t,n,o){var r,s,c,d;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.from([111,112,101,110,45,111,114,100,101,114,115,45,105,110,105,116]),e.next=3,p.PublicKey.findProgramAddress([r,n.toBuffer(),t.toBuffer()],o);case 3:return s=e.sent,c=u(s,1),d=c[0],e.abrupt("return",d);case 7:case"end":return e.stop()}}),e)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"openOrdersAddress",value:function(){var e=s(i().mark((function e(t,n,o,r){var s,c,d,l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=a.from([111,112,101,110,45,111,114,100,101,114,115]),e.next=3,p.PublicKey.findProgramAddress([s,o.toBuffer(),t.toBuffer(),n.toBuffer()],r);case 3:return c=e.sent,d=u(c,1),l=d[0],e.abrupt("return",l);case 7:case"end":return e.stop()}}),e)})));return function(t,n,a,o){return e.apply(this,arguments)}}()}]),e}();t.OpenOrdersPda=b;var m=function(){function e(){d(this,e)}return l(e,[{key:"initOpenOrders",value:function(e){}},{key:"newOrderV3",value:function(e){}},{key:"cancelOrderV2",value:function(e){}},{key:"cancelOrderByClientIdV2",value:function(e){}},{key:"settleFunds",value:function(e){}},{key:"closeOpenOrders",value:function(e){}},{key:"prune",value:function(e){}},{key:"consumeEvents",value:function(e){}},{key:"consumeEventsPermissioned",value:function(e){}}]),e}();t.ReferralFees=m;var h=function(){function e(){d(this,e)}return l(e,[{key:"initOpenOrders",value:function(e){}},{key:"newOrderV3",value:function(e){}},{key:"cancelOrderV2",value:function(e){}},{key:"cancelOrderByClientIdV2",value:function(e){}},{key:"settleFunds",value:function(e){}},{key:"closeOpenOrders",value:function(e){}},{key:"prune",value:function(e){}},{key:"consumeEvents",value:function(e){}},{key:"consumeEventsPermissioned",value:function(e){e.keys[e.keys.length-1].isSigner=!1}}]),e}();t.PermissionedCrank=h;var g=function(){function e(){d(this,e)}return l(e,[{key:"initOpenOrders",value:function(e){o.log("Proxying initOpenOrders",this.ixToDisplay(e))}},{key:"newOrderV3",value:function(e){o.log("Proxying newOrderV3",this.ixToDisplay(e))}},{key:"cancelOrderV2",value:function(e){o.log("Proxying cancelOrderV2",this.ixToDisplay(e))}},{key:"cancelOrderByClientIdV2",value:function(e){o.log("Proxying cancelOrderByClientIdV2",this.ixToDisplay(e))}},{key:"settleFunds",value:function(e){o.log("Proxying settleFunds",this.ixToDisplay(e))}},{key:"closeOpenOrders",value:function(e){o.log("Proxying closeOpenOrders",this.ixToDisplay(e))}},{key:"prune",value:function(e){o.log("Proxying prune",this.ixToDisplay(e))}},{key:"consumeEvents",value:function(e){o.log("Proxying consumeEvents",this.ixToDisplay(e))}},{key:"consumeEventsPermissioned",value:function(e){o.log("Proxying consumeEventsPermissioned",this.ixToDisplay(e))}},{key:"ixToDisplay",value:function(e){return{keys:e.keys.map((function(e){return r(r({},e),{},{pubkey:e.pubkey.toString()})})),programId:e.programId.toString(),data:new Uint8Array(e.data)}}}]),e}();t.Logger=g},46004:function(e,t,n){"use strict";var a=n(74704).default,o=n(42122).default,r=n(861).default,i=n(27424).default,s=n(17061).default,c=n(17156).default,u=n(56690).default,d=n(89728).default,l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getMintDecimals=t.Orderbook=t.ORDERBOOK_LAYOUT=t.OpenOrders=t._OPEN_ORDERS_LAYOUT_V2=t._OPEN_ORDERS_LAYOUT_V1=t.Market=t.MARKET_STATE_LAYOUT_V3=t.MARKET_STATE_LAYOUT_V2=t._MARKET_STAT_LAYOUT_V1=void 0;var f=n(73073),p=n(16135),b=n(1507),m=n(51071),h=l(n(43811)),g=n(8594),y=n(5904),v=n(54659),w=n(12608),k=n(11479),A=n(71567);t._MARKET_STAT_LAYOUT_V1=f.struct([f.blob(5),p.accountFlagsLayout("accountFlags"),p.publicKeyLayout("ownAddress"),p.u64("vaultSignerNonce"),p.publicKeyLayout("baseMint"),p.publicKeyLayout("quoteMint"),p.publicKeyLayout("baseVault"),p.u64("baseDepositsTotal"),p.u64("baseFeesAccrued"),p.publicKeyLayout("quoteVault"),p.u64("quoteDepositsTotal"),p.u64("quoteFeesAccrued"),p.u64("quoteDustThreshold"),p.publicKeyLayout("requestQueue"),p.publicKeyLayout("eventQueue"),p.publicKeyLayout("bids"),p.publicKeyLayout("asks"),p.u64("baseLotSize"),p.u64("quoteLotSize"),p.u64("feeRateBps"),f.blob(7)]),t.MARKET_STATE_LAYOUT_V2=f.struct([f.blob(5),p.accountFlagsLayout("accountFlags"),p.publicKeyLayout("ownAddress"),p.u64("vaultSignerNonce"),p.publicKeyLayout("baseMint"),p.publicKeyLayout("quoteMint"),p.publicKeyLayout("baseVault"),p.u64("baseDepositsTotal"),p.u64("baseFeesAccrued"),p.publicKeyLayout("quoteVault"),p.u64("quoteDepositsTotal"),p.u64("quoteFeesAccrued"),p.u64("quoteDustThreshold"),p.publicKeyLayout("requestQueue"),p.publicKeyLayout("eventQueue"),p.publicKeyLayout("bids"),p.publicKeyLayout("asks"),p.u64("baseLotSize"),p.u64("quoteLotSize"),p.u64("feeRateBps"),p.u64("referrerRebatesAccrued"),f.blob(7)]),t.MARKET_STATE_LAYOUT_V3=f.struct([f.blob(5),p.accountFlagsLayout("accountFlags"),p.publicKeyLayout("ownAddress"),p.u64("vaultSignerNonce"),p.publicKeyLayout("baseMint"),p.publicKeyLayout("quoteMint"),p.publicKeyLayout("baseVault"),p.u64("baseDepositsTotal"),p.u64("baseFeesAccrued"),p.publicKeyLayout("quoteVault"),p.u64("quoteDepositsTotal"),p.u64("quoteFeesAccrued"),p.u64("quoteDustThreshold"),p.publicKeyLayout("requestQueue"),p.publicKeyLayout("eventQueue"),p.publicKeyLayout("bids"),p.publicKeyLayout("asks"),p.u64("baseLotSize"),p.u64("quoteLotSize"),p.u64("feeRateBps"),p.u64("referrerRebatesAccrued"),p.publicKeyLayout("authority"),p.publicKeyLayout("pruneAuthority"),p.publicKeyLayout("consumeEventsAuthority"),f.blob(992),f.blob(7)]);var x=function(){function e(t,n,a){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;u(this,e);var s=o.skipPreflight,c=void 0!==s&&s,d=o.commitment,l=void 0===d?"recent":d;if(!t.accountFlags.initialized||!t.accountFlags.market)throw new Error("Invalid market state");this._decoded=t,this._baseSplTokenDecimals=n,this._quoteSplTokenDecimals=a,this._skipPreflight=c,this._commitment=l,this._programId=r,this._openOrdersAccountsCache={},this._feeDiscountKeysCache={},this._layoutOverride=i}return d(e,[{key:"programId",get:function(){return this._programId}},{key:"address",get:function(){return this._decoded.ownAddress}},{key:"publicKey",get:function(){return this.address}},{key:"baseMintAddress",get:function(){return this._decoded.baseMint}},{key:"quoteMintAddress",get:function(){return this._decoded.quoteMint}},{key:"bidsAddress",get:function(){return this._decoded.bids}},{key:"asksAddress",get:function(){return this._decoded.asks}},{key:"decoded",get:function(){return this._decoded}},{key:"loadBids",value:function(){var e=c(s().mark((function e(t){var n,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=_,e.next=3,t.getAccountInfo(this._decoded.bids);case 3:return e.t1=e.sent,n=(0,e.t0)(e.t1),a=n.data,e.abrupt("return",T.decode(this,a));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"loadAsks",value:function(){var e=c(s().mark((function e(t){var n,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=_,e.next=3,t.getAccountInfo(this._decoded.asks);case 3:return e.t1=e.sent,n=(0,e.t0)(e.t1),a=n.data,e.abrupt("return",T.decode(this,a));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"loadOrdersForOwner",value:function(){var e=c(s().mark((function e(t,n){var a,o,r,c,u,d,l=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=l.length>2&&void 0!==l[2]?l[2]:0,e.next=3,Promise.all([this.loadBids(t),this.loadAsks(t),this.findOpenOrdersAccountsForOwner(t,n,a)]);case 3:return o=e.sent,r=i(o,3),c=r[0],u=r[1],d=r[2],e.abrupt("return",this.filterForOpenOrders(c,u,d));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"filterForOpenOrders",value:function(e,t,n){return[].concat(r(e),r(t)).filter((function(e){return n.some((function(t){return e.openOrdersAddress.equals(t.address)}))}))}},{key:"findBaseTokenAccountsForOwner",value:function(){var e=c(s().mark((function e(t,n){var a,o,c,u,d,l=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=l.length>2&&void 0!==l[2]&&l[2],!this.baseMintAddress.equals(k.WRAPPED_SOL_MINT)||!a){e.next=11;break}return e.next=4,Promise.all([this.findBaseTokenAccountsForOwner(t,n,!1),t.getAccountInfo(n)]);case 4:if(o=e.sent,c=i(o,2),u=c[0],null===(d=c[1])){e.next=10;break}return e.abrupt("return",[{pubkey:n,account:d}].concat(r(u)));case 10:return e.abrupt("return",u);case 11:return e.next=13,this.getTokenAccountsByOwnerForMint(t,n,this.baseMintAddress);case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getTokenAccountsByOwnerForMint",value:function(){var e=c(s().mark((function e(t,n,a){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getTokenAccountsByOwner(n,{mint:a});case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"findQuoteTokenAccountsForOwner",value:function(){var e=c(s().mark((function e(t,n){var a,o,c,u,d,l=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=l.length>2&&void 0!==l[2]&&l[2],!this.quoteMintAddress.equals(k.WRAPPED_SOL_MINT)||!a){e.next=11;break}return e.next=4,Promise.all([this.findQuoteTokenAccountsForOwner(t,n,!1),t.getAccountInfo(n)]);case 4:if(o=e.sent,c=i(o,2),u=c[0],null===(d=c[1])){e.next=10;break}return e.abrupt("return",[{pubkey:n,account:d}].concat(r(u)));case 10:return e.abrupt("return",u);case 11:return e.next=13,this.getTokenAccountsByOwnerForMint(t,n,this.quoteMintAddress);case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"findOpenOrdersAccountsForOwner",value:function(){var e=c(s().mark((function e(t,n){var a,o,r,i,c=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=c.length>2&&void 0!==c[2]?c[2]:0,o=n.toBase58(),r=(new Date).getTime(),!(o in this._openOrdersAccountsCache&&r-this._openOrdersAccountsCache[o].ts3&&void 0!==d[3]?d[3]:0,n.openOrdersAccount||n.openOrdersAddressKey){e.next=7;break}return i=null!==(r=n.owner.publicKey)&&void 0!==r?r:n.owner,e.next=5,this.findOpenOrdersAccountsForOwner(t,i,o);case 5:c=e.sent,n.openOrdersAddressKey=c[0].address;case 7:return(u=new g.Transaction).add(this.makeReplaceOrdersByClientIdsInstruction(n,a)),e.next=11,this._sendTransaction(t,u,[n.owner]);case 11:return e.abrupt("return",e.sent);case 12:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"placeOrder",value:function(){var e=c(s().mark((function e(t,n){var a,o,i,c,u,d,l,f,p,b,m,h,g,y,v,w,k;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.owner,o=n.payer,i=n.side,c=n.price,u=n.size,d=n.orderType,l=void 0===d?"limit":d,f=n.clientId,p=n.openOrdersAddressKey,b=n.openOrdersAccount,m=n.feeDiscountPubkey,h=n.maxTs,g=n.replaceIfExists,y=void 0!==g&&g,e.next=3,this.makePlaceOrderTransaction(t,{owner:a,payer:o,side:i,price:c,size:u,orderType:l,clientId:f,openOrdersAddressKey:p,openOrdersAccount:b,feeDiscountPubkey:m,maxTs:h,replaceIfExists:y});case 3:return v=e.sent,w=v.transaction,k=v.signers,e.next=8,this._sendTransaction(t,w,[a].concat(r(k)));case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getSplTokenBalanceFromAccountInfo",value:function(e,t){return C(new h.default(e.data.slice(64,72),10,"le"),new h.default(10).pow(new h.default(t)))}},{key:"supportsSrmFeeDiscounts",get:function(){return w.supportsSrmFeeDiscounts(this._programId)}},{key:"supportsReferralFees",get:function(){return A.getLayoutVersion(this._programId)>1}},{key:"usesRequestQueue",get:function(){return A.getLayoutVersion(this._programId)<=2}},{key:"findFeeDiscountKeys",value:function(){var e=c(s().mark((function e(t,n){var a,o,r,i,c,u,d=this,l=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=l.length>2&&void 0!==l[2]?l[2]:0,o=[],r=(new Date).getTime(),!((i=n.toBase58())in this._feeDiscountKeysCache&&r-this._feeDiscountKeysCache[i].tst.feeTier?-1:e.feeTiert.balance?-1:e.balance2&&void 0!==r[2]?r[2]:3e4,e.next=3,this.findFeeDiscountKeys(t,n,a);case 3:if(!((o=e.sent).length>0)){e.next=6;break}return e.abrupt("return",{pubkey:o[0].pubkey,feeTier:o[0].feeTier});case 6:return e.abrupt("return",{pubkey:null,feeTier:0});case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"makePlaceOrderTransaction",value:function(){var e=c(s().mark((function e(t,n){var a,o,r,i,c,u,d,l,f,p,b,m,h,y,v,w,A,x,T,S,C,E,R,M,P,U,_,B,D,N,O,F=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.owner,o=n.payer,r=n.side,i=n.price,c=n.size,u=n.orderType,d=void 0===u?"limit":u,l=n.clientId,f=n.openOrdersAddressKey,p=n.openOrdersAccount,b=n.feeDiscountPubkey,m=void 0===b?void 0:b,h=n.selfTradeBehavior,y=void 0===h?"decrementTake":h,v=n.maxTs,w=n.replaceIfExists,A=void 0!==w&&w,x=F.length>2&&void 0!==F[2]?F[2]:0,T=F.length>3&&void 0!==F[3]?F[3]:0,E=null!==(S=a.publicKey)&&void 0!==S?S:a,e.next=6,this.findOpenOrdersAccountsForOwner(t,E,x);case 6:if(R=e.sent,M=new g.Transaction,P=[],!m){e.next=13;break}U=m,e.next=20;break;case 13:if(void 0!==m||!this.supportsSrmFeeDiscounts){e.next=19;break}return e.next=16,this.findBestFeeDiscountKey(t,E,T);case 16:U=e.sent.pubkey,e.next=20;break;case 19:U=null;case 20:if(0!==R.length){e.next=32;break}return B=p||new g.Account,e.t0=M,e.next=25,I.makeCreateAccountTransaction(t,this.address,E,B.publicKey,this._programId);case 25:e.t1=e.sent,e.t0.add.call(e.t0,e.t1),_=B.publicKey,P.push(B),this._openOrdersAccountsCache[E.toBase58()].ts=0,e.next=33;break;case 32:_=p?p.publicKey:f||R[0].address;case 33:if(D=null,!o.equals(E)){e.next=45;break}if(!("buy"===r&&this.quoteMintAddress.equals(k.WRAPPED_SOL_MINT)||"sell"===r&&this.baseMintAddress.equals(k.WRAPPED_SOL_MINT))){e.next=44;break}D=new g.Account,"buy"===r?(N=Math.round(i*c*1.01*g.LAMPORTS_PER_SOL),R.length>0&&(N-=R[0].quoteTokenFree.toNumber())):(N=Math.round(c*g.LAMPORTS_PER_SOL),R.length>0&&(N-=R[0].baseTokenFree.toNumber())),N=Math.max(N,0)+1e7,M.add(g.SystemProgram.createAccount({fromPubkey:E,newAccountPubkey:D.publicKey,lamports:N,space:165,programId:k.TOKEN_PROGRAM_ID})),M.add(k.initializeAccount({account:D.publicKey,mint:k.WRAPPED_SOL_MINT,owner:E})),P.push(D),e.next=45;break;case 44:throw new Error("Invalid payer account");case 45:return O=this.makePlaceOrderInstruction(t,{owner:a,payer:null!==(C=null===D||void 0===D?void 0:D.publicKey)&&void 0!==C?C:o,side:r,price:i,size:c,orderType:d,clientId:l,openOrdersAddressKey:_,feeDiscountPubkey:U,selfTradeBehavior:y,maxTs:v,replaceIfExists:A}),M.add(O),D&&M.add(k.closeAccount({source:D.publicKey,destination:E,owner:E})),e.abrupt("return",{transaction:M,signers:P,payer:a});case 49:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"makePlaceOrderInstruction",value:function(e,t){var n,a=t.owner,o=t.payer,r=t.side,i=t.price,s=t.size,c=t.orderType,u=void 0===c?"limit":c,d=t.clientId,l=t.openOrdersAddressKey,f=t.openOrdersAccount,p=t.feeDiscountPubkey,b=void 0===p?null:p,g=null!==(n=a.publicKey)&&void 0!==n?n:a;if(this.baseSizeNumberToLots(s).lte(new h.default(0)))throw new Error("size too small");if(this.priceNumberToLots(i).lte(new h.default(0)))throw new Error("invalid price");return this.usesRequestQueue?m.DexInstructions.newOrder({market:this.address,requestQueue:this._decoded.requestQueue,baseVault:this._decoded.baseVault,quoteVault:this._decoded.quoteVault,openOrders:f?f.publicKey:l,owner:g,payer:o,side:r,limitPrice:this.priceNumberToLots(i),maxQuantity:this.baseSizeNumberToLots(s),orderType:u,clientId:d,programId:this._programId,feeDiscountPubkey:this.supportsSrmFeeDiscounts?b:null}):this.makeNewOrderV3Instruction(t)}},{key:"makeNewOrderV3Instruction",value:function(e){var t,n=e.owner,a=e.payer,o=e.side,r=e.price,i=e.size,s=e.orderType,c=void 0===s?"limit":s,u=e.clientId,d=e.openOrdersAddressKey,l=e.openOrdersAccount,f=e.feeDiscountPubkey,p=void 0===f?null:f,b=e.selfTradeBehavior,g=void 0===b?"decrementTake":b,y=e.programId,v=e.maxTs,w=e.replaceIfExists,k=null!==(t=n.publicKey)&&void 0!==t?t:n;return m.DexInstructions.newOrderV3({market:this.address,bids:this._decoded.bids,asks:this._decoded.asks,requestQueue:this._decoded.requestQueue,eventQueue:this._decoded.eventQueue,baseVault:this._decoded.baseVault,quoteVault:this._decoded.quoteVault,openOrders:l?l.publicKey:d,owner:k,payer:a,side:o,limitPrice:this.priceNumberToLots(r),maxBaseQuantity:this.baseSizeNumberToLots(i),maxQuoteQuantity:new h.default(this._decoded.quoteLotSize.toNumber()).mul(this.baseSizeNumberToLots(i).mul(this.priceNumberToLots(r))),orderType:c,clientId:u,programId:null!==y&&void 0!==y?y:this._programId,selfTradeBehavior:g,feeDiscountPubkey:this.supportsSrmFeeDiscounts?p:null,maxTs:v,replaceIfExists:w})}},{key:"makeReplaceOrdersByClientIdsInstruction",value:function(e,t){var n,a,o=this,r=null!==(n=e.owner.publicKey)&&void 0!==n?n:e.owner;return m.DexInstructions.replaceOrdersByClientIds({market:this.address,bids:this._decoded.bids,asks:this._decoded.asks,requestQueue:this._decoded.requestQueue,eventQueue:this._decoded.eventQueue,baseVault:this._decoded.baseVault,quoteVault:this._decoded.quoteVault,openOrders:e.openOrdersAccount?e.openOrdersAccount.publicKey:e.openOrdersAddressKey,owner:r,payer:e.payer,programId:null!==(a=e.programId)&&void 0!==a?a:this._programId,feeDiscountPubkey:this.supportsSrmFeeDiscounts?e.feeDiscountPubkey:null,orders:t.map((function(t){var n;return{side:t.side,limitPrice:o.priceNumberToLots(t.price),maxBaseQuantity:o.baseSizeNumberToLots(t.size),maxQuoteQuantity:new h.default(o._decoded.quoteLotSize.toNumber()).mul(o.baseSizeNumberToLots(t.size).mul(o.priceNumberToLots(t.price))),orderType:t.orderType,clientId:t.clientId,programId:null!==(n=e.programId)&&void 0!==n?n:o._programId,selfTradeBehavior:t.selfTradeBehavior,maxTs:t.maxTs}}))})}},{key:"_sendTransaction",value:function(){var e=c(s().mark((function e(t,n,a){var o,r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.sendTransaction(n,a,{skipPreflight:this._skipPreflight});case 2:return o=e.sent,e.next=5,t.confirmTransaction(o,this._commitment);case 5:if(r=e.sent,!(null===(i=r.value)||void 0===i?void 0:i.err)){e.next=9;break}throw new Error(JSON.stringify(i.err));case 9:return e.abrupt("return",o);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"cancelOrderByClientId",value:function(){var e=c(s().mark((function e(t,n,a,o){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.makeCancelOrderByClientIdTransaction(t,n.publicKey,a,o);case 2:return r=e.sent,e.next=5,this._sendTransaction(t,r,[n]);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"cancelOrdersByClientIds",value:function(){var e=c(s().mark((function e(t,n,a,o){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.makeCancelOrdersByClientIdsTransaction(t,n.publicKey,a,o);case 2:return r=e.sent,e.next=5,this._sendTransaction(t,r,[n]);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"makeCancelOrderByClientIdTransaction",value:function(){var e=c(s().mark((function e(t,n,a,o){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new g.Transaction,this.usesRequestQueue?r.add(m.DexInstructions.cancelOrderByClientId({market:this.address,owner:n,openOrders:a,requestQueue:this._decoded.requestQueue,clientId:o,programId:this._programId})):r.add(m.DexInstructions.cancelOrderByClientIdV2({market:this.address,openOrders:a,owner:n,bids:this._decoded.bids,asks:this._decoded.asks,eventQueue:this._decoded.eventQueue,clientId:o,programId:this._programId})),e.abrupt("return",r);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"makeCancelOrdersByClientIdsTransaction",value:function(){var e=c(s().mark((function e(t,n,a,o){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new g.Transaction).add(m.DexInstructions.cancelOrdersByClientIds({market:this.address,openOrders:a,owner:n,bids:this._decoded.bids,asks:this._decoded.asks,eventQueue:this._decoded.eventQueue,clientIds:o,programId:this._programId})),e.abrupt("return",r);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"cancelOrder",value:function(){var e=c(s().mark((function e(t,n,a){var o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.makeCancelOrderTransaction(t,n.publicKey,a);case 2:return o=e.sent,e.next=5,this._sendTransaction(t,o,[n]);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"makeCancelOrderTransaction",value:function(){var e=c(s().mark((function e(t,n,a){var o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(o=new g.Transaction).add(this.makeCancelOrderInstruction(t,n,a)),e.abrupt("return",o);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"makeCancelOrderInstruction",value:function(e,t,n){return this.usesRequestQueue?m.DexInstructions.cancelOrder({market:this.address,owner:t,openOrders:n.openOrdersAddress,requestQueue:this._decoded.requestQueue,side:n.side,orderId:n.orderId,openOrdersSlot:n.openOrdersSlot,programId:this._programId}):m.DexInstructions.cancelOrderV2({market:this.address,owner:t,openOrders:n.openOrdersAddress,bids:this._decoded.bids,asks:this._decoded.asks,eventQueue:this._decoded.eventQueue,side:n.side,orderId:n.orderId,openOrdersSlot:n.openOrdersSlot,programId:this._programId})}},{key:"makeConsumeEventsInstruction",value:function(e,t){return m.DexInstructions.consumeEvents({market:this.address,eventQueue:this._decoded.eventQueue,coinFee:this._decoded.eventQueue,pcFee:this._decoded.eventQueue,openOrdersAccounts:e,limit:t,programId:this._programId})}},{key:"makeConsumeEventsPermissionedInstruction",value:function(e,t){return m.DexInstructions.consumeEventsPermissioned({market:this.address,eventQueue:this._decoded.eventQueue,crankAuthority:this._decoded.consumeEventsAuthority,openOrdersAccounts:e,limit:t,programId:this._programId})}},{key:"settleFunds",value:function(){var e=c(s().mark((function e(t,n,a,o,i){var c,u,d,l,f=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=f.length>5&&void 0!==f[5]?f[5]:null,a.owner.equals(n.publicKey)){e.next=3;break}throw new Error("Invalid open orders account");case 3:if(!c||this.supportsReferralFees){e.next=5;break}throw new Error("This program ID does not support referrerQuoteWallet");case 5:return e.next=7,this.makeSettleFundsTransaction(t,a,o,i,c);case 7:return u=e.sent,d=u.transaction,l=u.signers,e.next=12,this._sendTransaction(t,d,[n].concat(r(l)));case 12:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r){return e.apply(this,arguments)}}()},{key:"makeSettleFundsTransaction",value:function(){var e=c(s().mark((function e(t,n,a,o){var r,i,c,u,d,l=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=l.length>4&&void 0!==l[4]?l[4]:null,e.next=3,g.PublicKey.createProgramAddress([this.address.toBuffer(),this._decoded.vaultSignerNonce.toArrayLike(v.Buffer,"le",8)],this._programId);case 3:if(i=e.sent,c=new g.Transaction,u=[],d=null,!(this.baseMintAddress.equals(k.WRAPPED_SOL_MINT)&&a.equals(n.owner)||this.quoteMintAddress.equals(k.WRAPPED_SOL_MINT)&&o.equals(n.owner))){e.next=22;break}return d=new g.Account,e.t0=c,e.t1=g.SystemProgram,e.t2=n.owner,e.t3=d.publicKey,e.next=15,t.getMinimumBalanceForRentExemption(165);case 15:e.t4=e.sent,e.t5=k.TOKEN_PROGRAM_ID,e.t6={fromPubkey:e.t2,newAccountPubkey:e.t3,lamports:e.t4,space:165,programId:e.t5},e.t7=e.t1.createAccount.call(e.t1,e.t6),e.t0.add.call(e.t0,e.t7),c.add(k.initializeAccount({account:d.publicKey,mint:k.WRAPPED_SOL_MINT,owner:n.owner})),u.push(d);case 22:return c.add(m.DexInstructions.settleFunds({market:this.address,openOrders:n.address,owner:n.owner,baseVault:this._decoded.baseVault,quoteVault:this._decoded.quoteVault,baseWallet:a.equals(n.owner)&&d?d.publicKey:a,quoteWallet:o.equals(n.owner)&&d?d.publicKey:o,vaultSigner:i,programId:this._programId,referrerQuoteWallet:r})),d&&c.add(k.closeAccount({source:d.publicKey,destination:n.owner,owner:n.owner})),e.abrupt("return",{transaction:c,signers:u,payer:n.owner});case 25:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"matchOrders",value:function(){var e=c(s().mark((function e(t,n,a){var o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.makeMatchOrdersTransaction(a),e.next=3,this._sendTransaction(t,o,[n]);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"makeMatchOrdersTransaction",value:function(e){var t=new g.Transaction;return t.add(m.DexInstructions.matchOrders({market:this.address,requestQueue:this._decoded.requestQueue,eventQueue:this._decoded.eventQueue,bids:this._decoded.bids,asks:this._decoded.asks,baseVault:this._decoded.baseVault,quoteVault:this._decoded.quoteVault,limit:e,programId:this._programId})),t}},{key:"loadRequestQueue",value:function(){var e=c(s().mark((function e(t){var n,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=_,e.next=3,t.getAccountInfo(this._decoded.requestQueue);case 3:return e.t1=e.sent,n=(0,e.t0)(e.t1),a=n.data,e.abrupt("return",y.decodeRequestQueue(a));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"loadEventQueue",value:function(){var e=c(s().mark((function e(t){var n,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=_,e.next=3,t.getAccountInfo(this._decoded.eventQueue);case 3:return e.t1=e.sent,n=(0,e.t0)(e.t1),a=n.data,e.abrupt("return",y.decodeEventQueue(a));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"loadFills",value:function(){var e=c(s().mark((function e(t){var n,a,o,r,i=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:100,e.t0=_,e.next=4,t.getAccountInfo(this._decoded.eventQueue);case 4:return e.t1=e.sent,a=(0,e.t0)(e.t1),o=a.data,r=y.decodeEventQueue(o,n),e.abrupt("return",r.filter((function(e){return e.eventFlags.fill&&e.nativeQuantityPaid.gtn(0)})).map(this.parseFillEvent.bind(this)));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"parseFillEvent",value:function(e){var t,n,a;return e.eventFlags.bid?(a="buy",n=C((e.eventFlags.maker?e.nativeQuantityPaid.add(e.nativeFeeOrRebate):e.nativeQuantityPaid.sub(e.nativeFeeOrRebate)).mul(this._baseSplTokenMultiplier),this._quoteSplTokenMultiplier.mul(e.nativeQuantityReleased)),t=C(e.nativeQuantityReleased,this._baseSplTokenMultiplier)):(a="sell",n=C((e.eventFlags.maker?e.nativeQuantityReleased.sub(e.nativeFeeOrRebate):e.nativeQuantityReleased.add(e.nativeFeeOrRebate)).mul(this._baseSplTokenMultiplier),this._quoteSplTokenMultiplier.mul(e.nativeQuantityPaid)),t=C(e.nativeQuantityPaid,this._baseSplTokenMultiplier)),o(o({},e),{},{side:a,price:n,feeCost:this.quoteSplSizeToNumber(e.nativeFeeOrRebate)*(e.eventFlags.maker?-1:1),size:t})}},{key:"_baseSplTokenMultiplier",get:function(){return new h.default(10).pow(new h.default(this._baseSplTokenDecimals))}},{key:"_quoteSplTokenMultiplier",get:function(){return new h.default(10).pow(new h.default(this._quoteSplTokenDecimals))}},{key:"priceLotsToNumber",value:function(e){return C(e.mul(this._decoded.quoteLotSize).mul(this._baseSplTokenMultiplier),this._decoded.baseLotSize.mul(this._quoteSplTokenMultiplier))}},{key:"priceNumberToLots",value:function(e){return new h.default(Math.round(e*Math.pow(10,this._quoteSplTokenDecimals)*this._decoded.baseLotSize.toNumber()/(Math.pow(10,this._baseSplTokenDecimals)*this._decoded.quoteLotSize.toNumber())))}},{key:"baseSplSizeToNumber",value:function(e){return C(e,this._baseSplTokenMultiplier)}},{key:"quoteSplSizeToNumber",value:function(e){return C(e,this._quoteSplTokenMultiplier)}},{key:"baseSizeLotsToNumber",value:function(e){return C(e.mul(this._decoded.baseLotSize),this._baseSplTokenMultiplier)}},{key:"baseSizeNumberToLots",value:function(e){return new h.default(Math.round(e*Math.pow(10,this._baseSplTokenDecimals))).div(this._decoded.baseLotSize)}},{key:"quoteSizeLotsToNumber",value:function(e){return C(e.mul(this._decoded.quoteLotSize),this._quoteSplTokenMultiplier)}},{key:"quoteSizeNumberToLots",value:function(e){return new h.default(Math.round(e*Math.pow(10,this._quoteSplTokenDecimals))).div(this._decoded.quoteLotSize)}},{key:"minOrderSize",get:function(){return this.baseSizeLotsToNumber(new h.default(1))}},{key:"tickSize",get:function(){return this.priceLotsToNumber(new h.default(1))}}],[{key:"getLayout",value:function(e){return 1===A.getLayoutVersion(e)?t._MARKET_STAT_LAYOUT_V1:t.MARKET_STATE_LAYOUT_V2}},{key:"findAccountsByMints",value:function(){var t=c(s().mark((function t(n,a,o,r){var i;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=[{memcmp:{offset:this.getLayout(r).offsetOf("baseMint"),bytes:a.toBase58()}},{memcmp:{offset:e.getLayout(r).offsetOf("quoteMint"),bytes:o.toBase58()}}],t.abrupt("return",P(n,r,i));case 2:case"end":return t.stop()}}),t,this)})));return function(e,n,a,o){return t.apply(this,arguments)}}()},{key:"load",value:function(){var t=c(s().mark((function t(n,a){var o,r,c,u,d,l,f,p,b,m,h,g=arguments;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=g.length>2&&void 0!==g[2]?g[2]:{},r=g.length>3?g[3]:void 0,c=g.length>4?g[4]:void 0,t.t0=_,t.next=6,n.getAccountInfo(a);case 6:if(t.t1=t.sent,u=(0,t.t0)(t.t1,"Market not found"),d=u.owner,l=u.data,d.equals(r)){t.next=12;break}throw new Error("Address not owned by program: "+d.toBase58());case 12:if((f=(null!==c&&void 0!==c?c:this.getLayout(r)).decode(l)).accountFlags.initialized&&f.accountFlags.market&&f.ownAddress.equals(a)){t.next=15;break}throw new Error("Invalid market");case 15:return t.next=17,Promise.all([R(n,f.baseMint),R(n,f.quoteMint)]);case 17:return p=t.sent,b=i(p,2),m=b[0],h=b[1],t.abrupt("return",new e(f,m,h,o,r,c));case 22:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()}]),e}();t.Market=x,t._OPEN_ORDERS_LAYOUT_V1=f.struct([f.blob(5),p.accountFlagsLayout("accountFlags"),p.publicKeyLayout("market"),p.publicKeyLayout("owner"),p.u64("baseTokenFree"),p.u64("baseTokenTotal"),p.u64("quoteTokenFree"),p.u64("quoteTokenTotal"),p.u128("freeSlotBits"),p.u128("isBidBits"),f.seq(p.u128(),128,"orders"),f.seq(p.u64(),128,"clientIds"),f.blob(7)]),t._OPEN_ORDERS_LAYOUT_V2=f.struct([f.blob(5),p.accountFlagsLayout("accountFlags"),p.publicKeyLayout("market"),p.publicKeyLayout("owner"),p.u64("baseTokenFree"),p.u64("baseTokenTotal"),p.u64("quoteTokenFree"),p.u64("quoteTokenTotal"),p.u128("freeSlotBits"),p.u128("isBidBits"),f.seq(p.u128(),128,"orders"),f.seq(p.u64(),128,"clientIds"),p.u64("referrerRebatesAccrued"),f.blob(7)]);var I=function(){function e(t,n,a){u(this,e),this.address=t,this._programId=a,Object.assign(this,n)}return d(e,[{key:"publicKey",get:function(){return this.address}}],[{key:"getLayout",value:function(e){return 1===A.getLayoutVersion(e)?t._OPEN_ORDERS_LAYOUT_V1:t._OPEN_ORDERS_LAYOUT_V2}},{key:"findForOwner",value:function(){var t=c(s().mark((function t(n,a,o){var r,i;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=[{memcmp:{offset:this.getLayout(o).offsetOf("owner"),bytes:a.toBase58()}},{dataSize:this.getLayout(o).span}],t.next=3,P(n,o,r);case 3:return i=t.sent,t.abrupt("return",i.map((function(t){var n=t.publicKey,a=t.accountInfo;return e.fromAccountInfo(n,a,o)})));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"findForMarketAndOwner",value:function(){var t=c(s().mark((function t(n,a,o,r){var i,c;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=[{memcmp:{offset:this.getLayout(r).offsetOf("market"),bytes:a.toBase58()}},{memcmp:{offset:this.getLayout(r).offsetOf("owner"),bytes:o.toBase58()}},{dataSize:this.getLayout(r).span}],t.next=3,P(n,r,i);case 3:return c=t.sent,t.abrupt("return",c.map((function(t){var n=t.publicKey,a=t.accountInfo;return e.fromAccountInfo(n,a,r)})));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,a,o){return t.apply(this,arguments)}}()},{key:"load",value:function(){var t=c(s().mark((function t(n,a,o){var r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getAccountInfo(a);case 2:if(null!==(r=t.sent)){t.next=5;break}throw new Error("Open orders account not found");case 5:return t.abrupt("return",e.fromAccountInfo(a,r,o));case 6:case"end":return t.stop()}}),t)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"fromAccountInfo",value:function(t,n,a){var o=n.owner,r=n.data;if(!o.equals(a))throw new Error("Address not owned by program");var i=this.getLayout(a).decode(r);if(!i.accountFlags.initialized||!i.accountFlags.openOrders)throw new Error("Invalid open orders account");return new e(t,i,a)}},{key:"makeCreateAccountTransaction",value:function(){var e=c(s().mark((function e(t,n,a,o,r){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=g.SystemProgram,e.t1=a,e.t2=o,e.next=5,t.getMinimumBalanceForRentExemption(this.getLayout(r).span);case 5:return e.t3=e.sent,e.t4=this.getLayout(r).span,e.t5=r,e.t6={fromPubkey:e.t1,newAccountPubkey:e.t2,lamports:e.t3,space:e.t4,programId:e.t5},e.abrupt("return",e.t0.createAccount.call(e.t0,e.t6));case 10:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r){return e.apply(this,arguments)}}()}]),e}();t.OpenOrders=I,t.ORDERBOOK_LAYOUT=f.struct([f.blob(5),p.accountFlagsLayout("accountFlags"),b.SLAB_LAYOUT.replicate("slab"),f.blob(7)]);var T=function(e){function n(e,t,a){if(u(this,n),!t.initialized||!(t.bids^t.asks))throw new Error("Invalid orderbook");this.market=e,this.isBids=t.bids,this.slab=a}return d(n,[{key:"getL2",value:function(e){var t,n=this,o=this.isBids,r=[],s=a(this.slab.items(o));try{for(s.s();!(t=s.n()).done;){var c=t.value,u=c.key,d=c.quantity,l=S(u);if(r.length>0&&r[r.length-1][0].eq(l))r[r.length-1][1]=r[r.length-1][1].add(d);else{if(r.length===e)break;r.push([l,d])}}}catch(f){s.e(f)}finally{s.f()}return r.map((function(e){var t=i(e,2),a=t[0],o=t[1];return[n.market.priceLotsToNumber(a),n.market.baseSizeLotsToNumber(o),a,o]}))}},{key:e,value:function(){return this.items(!1)}},{key:"items",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return s().mark((function n(){var o,r,i,c,u,d,l,f,p,b;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o=a(e.slab.items(t)),n.prev=1,o.s();case 3:if((r=o.n()).done){n.next=10;break}return i=r.value,c=i.key,u=i.ownerSlot,d=i.owner,l=i.quantity,f=i.feeTier,p=i.clientOrderId,b=S(c),n.next=8,{orderId:c,clientId:p,openOrdersAddress:d,openOrdersSlot:u,feeTier:f,price:e.market.priceLotsToNumber(b),priceLots:b,size:e.market.baseSizeLotsToNumber(l),sizeLots:l,side:e.isBids?"buy":"sell"};case 8:n.next=3;break;case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),o.e(n.t0);case 15:return n.prev=15,o.f(),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[1,12,15,18]])}))()}}],[{key:"LAYOUT",get:function(){return t.ORDERBOOK_LAYOUT}},{key:"decode",value:function(e,a){var o=t.ORDERBOOK_LAYOUT.decode(a);return new n(e,o.accountFlags,o.slab)}}]),n}(Symbol.iterator);function S(e){return e.ushrn(64)}function C(e,t){var n=e.div(t).toNumber(),a=e.umod(t),o=a.gcd(t);return n+a.div(o).toNumber()/t.div(o).toNumber()}t.Orderbook=T;var E=f.struct([f.blob(44),f.u8("decimals"),f.blob(37)]);function R(e,t){return M.apply(this,arguments)}function M(){return(M=c(s().mark((function e(t,n){var a,o,r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.equals(k.WRAPPED_SOL_MINT)){e.next=2;break}return e.abrupt("return",9);case 2:return e.t0=_,e.next=5,t.getAccountInfo(n);case 5:return e.t1=e.sent,a=(0,e.t0)(e.t1,"mint not found"),o=a.data,r=E.decode(o),i=r.decimals,e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e,t,n){return U.apply(this,arguments)}function U(){return(U=c(s().mark((function e(t,n,a){var o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._rpcRequest("getProgramAccounts",[n.toBase58(),{commitment:t.commitment,filters:a,encoding:"base64"}]);case 2:if(!(o=e.sent).error){e.next=5;break}throw new Error(o.error.message);case 5:return e.abrupt("return",o.result.map((function(e){var t=e.pubkey,n=e.account,a=n.data,o=n.executable,r=n.owner,i=n.lamports;return{publicKey:new g.PublicKey(t),accountInfo:{data:v.Buffer.from(a[0],"base64"),executable:o,owner:new g.PublicKey(r),lamports:i}}})));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){if(null===e)throw new Error(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"account not found");return e}t.getMintDecimals=R},5904:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_QUEUE_LAYOUT=t.REQUEST_QUEUE_LAYOUT=t.decodeEventQueue=t.decodeRequestQueue=t.decodeEventsSince=void 0;var a=n(73073),o=n(16135),r=a.struct([a.blob(5),o.accountFlagsLayout("accountFlags"),a.u32("head"),o.zeros(4),a.u32("count"),o.zeros(4),a.u32("nextSeqNum"),o.zeros(4)]),i=a.bits(a.u8(),!1,"requestFlags");i.addBoolean("newOrder"),i.addBoolean("cancelOrder"),i.addBoolean("bid"),i.addBoolean("postOnly"),i.addBoolean("ioc");var s=a.struct([i,a.u8("openOrdersSlot"),a.u8("feeTier"),a.blob(5),o.u64("maxBaseSizeOrCancelId"),o.u64("nativeQuoteQuantityLocked"),o.u128("orderId"),o.publicKeyLayout("openOrders"),o.u64("clientOrderId")]),c=a.struct([a.blob(5),o.accountFlagsLayout("accountFlags"),a.u32("head"),o.zeros(4),a.u32("count"),o.zeros(4),a.u32("seqNum"),o.zeros(4)]),u=a.bits(a.u8(),!1,"eventFlags");u.addBoolean("fill"),u.addBoolean("out"),u.addBoolean("bid"),u.addBoolean("maker");var d=a.struct([u,a.u8("openOrdersSlot"),a.u8("feeTier"),a.blob(5),o.u64("nativeQuantityReleased"),o.u64("nativeQuantityPaid"),o.u64("nativeFeeOrRebate"),o.u128("orderId"),o.publicKeyLayout("openOrders"),o.u64("clientOrderId")]);function l(e,t,n,a){return t.decode(n,e.span+a*t.span)}function f(e,t,n,a){var o=e.decode(n),r=Math.floor((n.length-e.span)/t.span),i=[];if(a)for(var s=0;sa&&(r=a-1);for(var i=(n.seqNum-r+o)%o,s=((n.head+n.count)%a-r+a)%a,u=[],f=0;f0&&void 0!==arguments[0]&&arguments[0];return a().mark((function n(){var o,r,i,s,c;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(0!==e.header.leafCount){n.next=2;break}return n.abrupt("return");case 2:o=[e.header.root];case 3:if(!(o.length>0)){n.next=14;break}if(r=o.pop(),i=e.nodes[r],s=i.leafNode,c=i.innerNode,!s){n.next=11;break}return n.next=9,s;case 9:n.next=12;break;case 11:c&&(t?o.push(c.children[0],c.children[1]):o.push(c.children[1],c.children[0]));case 12:n.next=3;break;case 14:case"end":return n.stop()}}),n)}))()}}],[{key:"decode",value:function(e){return t.SLAB_LAYOUT.decode(e)}}]),n}(Symbol.iterator);t.Slab=f,u.setLayoutDecoder(t.SLAB_LAYOUT,(function(e){var t=e.header,n=e.nodes;return new f(t,n)}))},11479:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(861).default,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.closeAccount=t.mintTo=t.setAuthority=t.revoke=t.approve=t.transfer=t.initializeAccount=t.initializeMint=t.decodeTokenInstructionData=t.SRM_DECIMALS=t.SRM_MINT=t.MSRM_DECIMALS=t.MSRM_MINT=t.WRAPPED_SOL_MINT=t.TOKEN_PROGRAM_ID=t.CLOSE_ACCOUNT_OWNER_INDEX=t.CLOSE_ACCOUNT_DESTINATION_INDEX=t.CLOSE_ACCOUNT_SOURCE_INDEX=t.TRANSFER_OWNER_INDEX=t.TRANSFER_DESTINATION_INDEX=t.TRANSFER_SOURCE_INDEX=t.INITIALIZE_ACCOUNT_OWNER_INDEX=t.INITIALIZE_ACCOUNT_MINT_INDEX=t.INITIALIZE_ACCOUNT_ACCOUNT_INDEX=void 0;var c=s(n(73073)),u=n(8594),d=n(16135);t.INITIALIZE_ACCOUNT_ACCOUNT_INDEX=0,t.INITIALIZE_ACCOUNT_MINT_INDEX=1,t.INITIALIZE_ACCOUNT_OWNER_INDEX=2,t.TRANSFER_SOURCE_INDEX=0,t.TRANSFER_DESTINATION_INDEX=1,t.TRANSFER_OWNER_INDEX=2,t.CLOSE_ACCOUNT_SOURCE_INDEX=0,t.CLOSE_ACCOUNT_DESTINATION_INDEX=1,t.CLOSE_ACCOUNT_OWNER_INDEX=2,t.TOKEN_PROGRAM_ID=new u.PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.WRAPPED_SOL_MINT=new u.PublicKey("So11111111111111111111111111111111111111112"),t.MSRM_MINT=new u.PublicKey("MSRMcoVyrFxnSgo5uXwone5SKcGhT1KEJMFEkMEWf9L"),t.MSRM_DECIMALS=0,t.SRM_MINT=new u.PublicKey("SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt"),t.SRM_DECIMALS=6;var l=c.union(c.u8("instruction"));l.addVariant(0,c.struct([c.u8("decimals"),d.publicKeyLayout("mintAuthority"),c.u8("freezeAuthorityOption"),d.publicKeyLayout("freezeAuthority")]),"initializeMint"),l.addVariant(1,c.struct([]),"initializeAccount"),l.addVariant(3,c.struct([c.nu64("amount")]),"transfer"),l.addVariant(4,c.struct([c.nu64("amount")]),"approve"),l.addVariant(5,c.struct([]),"revoke"),l.addVariant(6,c.struct([c.u8("authorityType"),c.u8("newAuthorityOption"),d.publicKeyLayout("newAuthority")]),"setAuthority"),l.addVariant(7,c.struct([c.nu64("amount")]),"mintTo"),l.addVariant(8,c.struct([c.nu64("amount")]),"burn"),l.addVariant(9,c.struct([]),"closeAccount");var f=Math.max.apply(Math,o(Object.values(l.registry).map((function(e){return e.span}))));function p(e){var t=a.alloc(f),n=l.encode(e,t);return t.slice(0,n)}t.decodeTokenInstructionData=function(e){return l.decode(e)},t.initializeMint=function(e){var n=e.mint,a=e.decimals,o=e.mintAuthority,r=e.freezeAuthority,i=void 0===r?null:r,s=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:u.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];return new u.TransactionInstruction({keys:s,data:p({initializeMint:{decimals:a,mintAuthority:o,freezeAuthorityOption:!!i,freezeAuthority:i||new u.PublicKey(0)}}),programId:t.TOKEN_PROGRAM_ID})},t.initializeAccount=function(e){var n=[{pubkey:e.account,isSigner:!1,isWritable:!0},{pubkey:e.mint,isSigner:!1,isWritable:!1},{pubkey:e.owner,isSigner:!1,isWritable:!1},{pubkey:u.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];return new u.TransactionInstruction({keys:n,data:p({initializeAccount:{}}),programId:t.TOKEN_PROGRAM_ID})},t.transfer=function(e){var n=e.source,a=e.destination,o=e.amount,r=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:e.owner,isSigner:!0,isWritable:!1}];return new u.TransactionInstruction({keys:r,data:p({transfer:{amount:o}}),programId:t.TOKEN_PROGRAM_ID})},t.approve=function(e){var n=e.source,a=e.delegate,o=e.amount,r=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!1},{pubkey:e.owner,isSigner:!0,isWritable:!1}];return new u.TransactionInstruction({keys:r,data:p({approve:{amount:o}}),programId:t.TOKEN_PROGRAM_ID})},t.revoke=function(e){var n=[{pubkey:e.source,isSigner:!1,isWritable:!0},{pubkey:e.owner,isSigner:!0,isWritable:!1}];return new u.TransactionInstruction({keys:n,data:p({revoke:{}}),programId:t.TOKEN_PROGRAM_ID})},t.setAuthority=function(e){var n=e.target,a=e.currentAuthority,o=e.newAuthority,r=e.authorityType,i=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!0,isWritable:!1}];return new u.TransactionInstruction({keys:i,data:p({setAuthority:{authorityType:r,newAuthorityOption:!!o,newAuthority:o}}),programId:t.TOKEN_PROGRAM_ID})},t.mintTo=function(e){var n=e.mint,a=e.destination,o=e.amount,r=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:e.mintAuthority,isSigner:!0,isWritable:!1}];return new u.TransactionInstruction({keys:r,data:p({mintTo:{amount:o}}),programId:t.TOKEN_PROGRAM_ID})},t.closeAccount=function(e){var n=[{pubkey:e.source,isSigner:!1,isWritable:!0},{pubkey:e.destination,isSigner:!1,isWritable:!0},{pubkey:e.owner,isSigner:!0,isWritable:!1}];return new u.TransactionInstruction({keys:n,data:p({closeAccount:{}}),programId:t.TOKEN_PROGRAM_ID})}},71567:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MARKETS=t.TOKEN_MINTS=t.getLayoutVersion=t.PROGRAM_LAYOUT_VERSIONS=void 0;var o=n(8594),r=a(n(80104)),i=a(n(7458));t.PROGRAM_LAYOUT_VERSIONS={"4ckmDgGdxQoPDLUkDT3vHgSAkzA3QRdNq5ywwY4sUSJn":1,BJ3jrUzddfuSrZHXSCxMUUQsjKEyLmuuyZebkcaFp2fg:1,EUqojwWA2rd19FZrzeBncJsm38Jm1hEhE3zsmX3bRc2o:2,"9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin":3},t.getLayoutVersion=function(e){return t.PROGRAM_LAYOUT_VERSIONS[e.toString()]||3},t.TOKEN_MINTS=i.default.map((function(e){return{address:new o.PublicKey(e.address),name:e.name}})),t.MARKETS=r.default.map((function(e){return{address:new o.PublicKey(e.address),name:e.name,programId:new o.PublicKey(e.programId),deprecated:e.deprecated}}))},80785:function(e,t,n){"use strict";n.r(t),n.d(t,{AccountClient:function(){return $e},AccountsCoder:function(){return ae},BN:function(){return h()},Coder:function(){return ve},EventCoder:function(){return de},InstructionCoder:function(){return ee},Program:function(){return kt},Provider:function(){return I},StateClient:function(){return qe},StateCoder:function(){return he},TypesCoder:function(){return se},Wallet:function(){return T},getProvider:function(){return R},setProvider:function(){return E},utils:function(){return p},web3:function(){return g},workspace:function(){return It}});var a={};n.r(a),n.d(a,{isSet:function(){return be},set:function(){return pe}});var o={};n.r(o),n.d(o,{associated:function(){return Oe},createProgramAddressSync:function(){return Be},createWithSeedSync:function(){return _e},findProgramAddressSync:function(){return De}});var r={};n.r(r),n.d(r,{decode:function(){return ft},encode:function(){return lt}});var i={};n.r(i),n.d(i,{decode:function(){return pt},encode:function(){return bt}});var s={};n.r(s),n.d(s,{decode:function(){return ht},encode:function(){return mt}});var c={};n.r(c),n.d(c,{decode:function(){return vt},encode:function(){return yt}});var u={};n.r(u),n.d(u,{base64:function(){return c},bs58:function(){return s},hex:function(){return r},utf8:function(){return i}});var d={};n.r(d),n.d(d,{hash:function(){return Tt}});var l={};n.r(l),n.d(l,{getMultipleAccounts:function(){return Mt},invoke:function(){return Et}});var f={};n.r(f),n.d(f,{associatedAddress:function(){return Bt}});var p={};n.r(p),n.d(p,{bytes:function(){return u},features:function(){return a},publicKey:function(){return o},rpc:function(){return l},sha256:function(){return d},token:function(){return f}});var b,m=n(43811),h=n.n(m),g=n(8594),y=n(74165),v=n(15861),w=n(15671),k=n(43144),A="undefined"!==typeof window&&!(null===(b=window.process)||void 0===b?void 0:b.hasOwnProperty("type")),x=n(54659).Buffer,I=function(){function e(t,n,a){(0,w.Z)(this,e),this.connection=t,this.wallet=n,this.opts=a}return(0,k.Z)(e,[{key:"send",value:function(){var e=(0,v.Z)((0,y.Z)().mark((function e(t,n,a){var o,r;return(0,y.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n=[]),void 0===a&&(a=this.opts),t.feePayer=this.wallet.publicKey,e.next=5,this.connection.getRecentBlockhash(a.preflightCommitment);case 5:return t.recentBlockhash=e.sent.blockhash,e.next=8,this.wallet.signTransaction(t);case 8:return n.filter((function(e){return void 0!==e})).forEach((function(e){t.partialSign(e)})),o=t.serialize(),e.next=12,(0,g.sendAndConfirmRawTransaction)(this.connection,o,a);case 12:return r=e.sent,e.abrupt("return",r);case 14:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"sendAll",value:function(){var e=(0,v.Z)((0,y.Z)().mark((function e(t,n){var a,o,r,i,s,c,u,d=this;return(0,y.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n=this.opts),e.next=3,this.connection.getRecentBlockhash(n.preflightCommitment);case 3:return a=e.sent,o=t.map((function(e){var t=e.tx,n=e.signers;return void 0===n&&(n=[]),t.feePayer=d.wallet.publicKey,t.recentBlockhash=a.blockhash,n.filter((function(e){return void 0!==e})).forEach((function(e){t.partialSign(e)})),t})),e.next=7,this.wallet.signAllTransactions(o);case 7:r=e.sent,i=[],s=0;case 10:if(!(s2?r-2:0),s=2;s"):e.option?"Option<".concat(this.formatIdlType(e.option),">"):e.defined?e.defined:void 0}},{key:"formatIdlData",value:function(t,n,a){var o=this;if("string"===typeof t.type)return n.toString();if(t.type.vec)return"["+n.map((function(e){return o.formatIdlData({name:"",type:t.type.vec},e)})).join(", ")+"]";if(t.type.option)return null===n?"null":this.formatIdlData({name:"",type:t.type.option},n);if(t.type.defined){if(void 0===a)throw new Error("User defined types not provided");var r=a.filter((function(e){return e.name===t.type.defined}));if(1!==r.length)throw new Error("Type not found: ".concat(t.type.defined));return e.formatIdlDataDefined(r[0],n,a)}return"unknown"}},{key:"formatIdlDataDefined",value:function(t,n,a){if("struct"===t.type.kind)return"{ "+Object.keys(n).map((function(o){var r=t.type.fields.filter((function(e){return e.name===o}))[0];if(void 0===r)throw new Error("Unable to find type");return o+": "+e.formatIdlData(r,n[o],a)})).join(", ")+" }";if(0===t.type.variants.length)return"{}";if(t.type.variants[0].name){var o=Object.keys(n)[0],r=n[o],i=Object.keys(r).map((function(n){var i,s=r[n],c=null===(i=t.type.variants[o])||void 0===i?void 0:i.filter((function(e){return e.name===n}))[0];if(void 0===c)throw new Error("Unable to find variant");return n+": "+e.formatIdlData(c,s,a)})).join(", "),s=_()(o,{pascalCase:!0});return 0===i.length?s:"".concat(s," { ").concat(i," }")}return"Tuple formatting not yet implemented"}},{key:"flattenIdlAccounts",value:function(t,n){return t.map((function(t){var a=function(e){var t=e.replace(/([A-Z])/g," $1");return t.charAt(0).toUpperCase()+t.slice(1)}(t.name);if(t.accounts){var o=n?"".concat(n," > ").concat(a):a;return e.flattenIdlAccounts(t.accounts,o)}return(0,P.Z)((0,P.Z)({},t),{},{name:n?"".concat(n," > ").concat(a):a})})).flat()}}]),e}();var ne=n(54659).Buffer,ae=function(){function e(t){if((0,w.Z)(this,e),void 0!==t.accounts){var n=t.accounts.map((function(e){return[e.name,G.typeDefLayout(e,t.types)]}));this.accountLayouts=new Map(n)}else this.accountLayouts=new Map}return(0,k.Z)(e,[{key:"encode",value:function(){var e=(0,v.Z)((0,y.Z)().mark((function e(t,n){var a,o,r,i,s;return(0,y.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=ne.alloc(1e3),o=this.accountLayouts.get(t),r=o.encode(n,a),i=a.slice(0,r),e.next=6,oe(t);case 6:return s=e.sent,e.abrupt("return",ne.concat([s,i]));case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"decode",value:function(e,t){var n=t.slice(8);return this.accountLayouts.get(e).decode(n)}}]),e}();function oe(e){return re.apply(this,arguments)}function re(){return(re=(0,v.Z)((0,y.Z)().mark((function e(t){return(0,y.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ne.from(W.sha256.digest("account:".concat(t))).slice(0,8));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ie=n(54659).Buffer,se=function(){function e(t){if((0,w.Z)(this,e),void 0!==t.types){var n=t.types.map((function(e){return[e.name,G.typeDefLayout(e,t.types)]}));this.layouts=new Map(n)}else this.layouts=new Map}return(0,k.Z)(e,[{key:"encode",value:function(e,t){var n=ie.alloc(1e3),a=this.layouts.get(e).encode(t,n);return n.slice(0,a)}},{key:"decode",value:function(e,t){return this.layouts.get(e).decode(t)}}]),e}(),ce=n(35429),ue=n(54659).Buffer,de=function(){function e(t){if((0,w.Z)(this,e),void 0!==t.events){var n=t.events.map((function(e){var n={name:e.name,type:{kind:"struct",fields:e.fields.map((function(e){return{name:e.name,type:e.type}}))}};return[e.name,G.typeDefLayout(n,t.types)]}));this.layouts=new Map(n),this.discriminators=new Map(void 0===t.events?[]:t.events.map((function(e){return[ce.fromByteArray((t=e.name,ue.from(W.sha256.digest("event:".concat(t))).slice(0,8))),e.name];var t})))}else this.layouts=new Map}return(0,k.Z)(e,[{key:"decode",value:function(e){var t;try{t=ue.from(ce.toByteArray(e))}catch(o){return null}var n=ce.fromByteArray(t.slice(0,8)),a=this.discriminators.get(n);return void 0===a?null:{data:this.layouts.get(a).decode(t.slice(8)),name:a}}}]),e}();var le=new Set(["anchor-deprecated-state"]),fe=new Map;function pe(e){if(!le.has(e))throw new Error("Invalid feature");fe.set(e,!0)}function be(e){return void 0!==fe.get(e)}var me=n(54659).Buffer,he=function(){function e(t){if((0,w.Z)(this,e),void 0===t.state)throw new Error("Idl state not defined.");this.layout=G.typeDefLayout(t.state.struct,t.types)}return(0,k.Z)(e,[{key:"encode",value:function(){var e=(0,v.Z)((0,y.Z)().mark((function e(t,n){var a,o,r,i;return(0,y.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=me.alloc(1e3),o=this.layout.encode(n,a),e.next=4,ge(t);case 4:return r=e.sent,i=a.slice(0,o),e.abrupt("return",me.concat([r,i]));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"decode",value:function(e){var t=e.slice(8);return this.layout.decode(t)}}]),e}();function ge(e){return ye.apply(this,arguments)}function ye(){return(ye=(0,v.Z)((0,y.Z)().mark((function e(t){var n;return(0,y.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=be("anchor-deprecated-state")?"account":"state",e.abrupt("return",me.from(W.sha256.digest("".concat(n,":").concat(t))).slice(0,8));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ve=function(){function e(t){(0,w.Z)(this,e),this.instruction=new ee(t),this.accounts=new ae(t),this.types=new se(t),this.events=new de(t),t.state&&(this.state=new he(t))}return(0,k.Z)(e,[{key:"sighash",value:function(e,t){return Q(e,t)}}]),e}(),we=n(64366),ke=n(29439),Ae=n(5397);n(54659).Buffer;function xe(e){return Ie.apply(this,arguments)}function Ie(){return(Ie=(0,v.Z)((0,y.Z)().mark((function e(t){var n;return(0,y.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g.PublicKey.findProgramAddress([],t);case 2:return n=e.sent[0],e.next=5,g.PublicKey.createWithSeed(n,"anchor:idl",t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Te=B.struct([B.publicKey("authority"),B.vecU8("data")]);var Se=n(57850),Ce=n.n(Se);function Ee(e){var t=new Map;return e.errors&&e.errors.forEach((function(e){var n,a=null!==(n=e.msg)&&void 0!==n?n:e.name;t.set(e.code,a)})),t}function Re(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a32)throw new TypeError("Max seed length exceeded");n=Ue.concat([n,Ne(e)])})),n=Ue.concat([n,t.toBuffer(),Ue.from("ProgramDerivedAddress")]);var a=(0,W.sha256)(new Uint8Array(n)),o=new(h())(a,16).toArray(void 0,32);if(g.PublicKey.isOnCurve(new Uint8Array(o)))throw new Error("Invalid seeds, address must fall off the curve");return new g.PublicKey(o)}function De(e,t){for(var n,a=255;0!=a;){try{n=Be(e.concat(Ue.from([a])),t)}catch(o){if(o instanceof TypeError)throw o;a--;continue}return[n,a]}throw new Error("Unable to find a viable program address nonce")}var Ne=function(e){return e instanceof Ue?e:e instanceof Uint8Array?Ue.from(e.buffer,e.byteOffset,e.byteLength):Ue.from(e)};function Oe(e){return Fe.apply(this,arguments)}function Fe(){return Fe=(0,v.Z)((0,y.Z)().mark((function e(t){var n,a,o,r,i,s,c,u=arguments;return(0,y.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=[Ue.from([97,110,99,104,111,114])],a=u.length,o=new Array(a>1?a-1:0),r=1;ra){if(t.length!==a+1)throw new Error("provided too many arguments ${args}");n=t.pop()}return[t,n]}var je=n(65218),He=function(){function e(){(0,w.Z)(this,e)}return(0,k.Z)(e,null,[{key:"build",value:function(t,n,a){if("_inner"===t.name)throw new L("the _inner name is reserved");var o=function e(){for(var o=arguments.length,r=new Array(o),i=0;i0),this.stack[this.stack.length-1]}},{key:"push",value:function(e){this.stack.push(e)}},{key:"pop",value:function(){tt.ok(this.stack.length>0),this.stack.pop()}}]),e}(),it=function(){function e(t){(0,w.Z)(this,e),this.logs=t}return(0,k.Z)(e,[{key:"next",value:function(){if(0===this.logs.length)return null;var e=this.logs[0];return this.logs=this.logs.slice(1),e}}]),e}(),st=n(65218),ct=function(){function e(){(0,w.Z)(this,e)}return(0,k.Z)(e,null,[{key:"build",value:function(e,t,n,a,o,r,i){var s=function(){var s=(0,v.Z)((0,y.Z)().mark((function s(){var c,u,d,l,f,p,b,m,h,g,v,w=arguments;return(0,y.Z)().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:for(c=w.length,u=new Array(c),d=0;d1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var a=new Array(64),o=new Array(123),r=0;r<64;)o[a[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;n.encode=function(e,t,n){for(var o,r=null,i=[],s=0,c=0;t>2],o=(3&u)<<4,c=1;break;case 1:i[s++]=a[o|u>>4],o=(15&u)<<2,c=2;break;case 2:i[s++]=a[o|u>>6],i[s++]=a[63&u],c=0}s>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,i)),s=0)}return c&&(i[s++]=a[o],i[s++]=61,1===c&&(i[s++]=61)),r?(s&&r.push(String.fromCharCode.apply(String,i.slice(0,s))),r.join("")):String.fromCharCode.apply(String,i.slice(0,s))};var i="invalid encoding";n.decode=function(e,t,n){for(var a,r=n,s=0,c=0;c1)break;if(void 0===(u=o[u]))throw Error(i);switch(s){case 0:a=u,s=1;break;case 1:t[n++]=a<<2|(48&u)>>4,a=u,s=2;break;case 2:t[n++]=(15&a)<<4|(60&u)>>2,a=u,s=3;break;case 3:t[n++]=(3&a)<<6|u,s=0}}if(1===s)throw Error(i);return n-r},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},67362:function(e){"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],a=0;a0?0:2147483648,n,a);else if(isNaN(t))e(2143289344,n,a);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,n,a);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,n,a);else{var r=Math.floor(Math.log(t)/Math.LN2);e((o<<31|r+127<<23|8388607&Math.round(t*Math.pow(2,-r)*8388608))>>>0,n,a)}}function i(e,t,n){var a=e(t,n),o=2*(a>>31)+1,r=a>>>23&255,i=8388607&a;return 255===r?i?NaN:o*(1/0):0===r?1401298464324817e-60*o*i:o*Math.pow(2,r-150)*(i+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,a),e.readFloatLE=i.bind(null,o),e.readFloatBE=i.bind(null,r)}(),"undefined"!==typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),a=128===n[7];function o(e,a,o){t[0]=e,a[o]=n[0],a[o+1]=n[1],a[o+2]=n[2],a[o+3]=n[3],a[o+4]=n[4],a[o+5]=n[5],a[o+6]=n[6],a[o+7]=n[7]}function r(e,a,o){t[0]=e,a[o]=n[7],a[o+1]=n[6],a[o+2]=n[5],a[o+3]=n[4],a[o+4]=n[3],a[o+5]=n[2],a[o+6]=n[1],a[o+7]=n[0]}function i(e,a){return n[0]=e[a],n[1]=e[a+1],n[2]=e[a+2],n[3]=e[a+3],n[4]=e[a+4],n[5]=e[a+5],n[6]=e[a+6],n[7]=e[a+7],t[0]}function s(e,a){return n[7]=e[a],n[6]=e[a+1],n[5]=e[a+2],n[4]=e[a+3],n[3]=e[a+4],n[2]=e[a+5],n[1]=e[a+6],n[0]=e[a+7],t[0]}e.writeDoubleLE=a?o:r,e.writeDoubleBE=a?r:o,e.readDoubleLE=a?i:s,e.readDoubleBE=a?s:i}():function(){function t(e,t,n,a,o,r){var i=a<0?1:0;if(i&&(a=-a),0===a)e(0,o,r+t),e(1/a>0?0:2147483648,o,r+n);else if(isNaN(a))e(0,o,r+t),e(2146959360,o,r+n);else if(a>17976931348623157e292)e(0,o,r+t),e((i<<31|2146435072)>>>0,o,r+n);else{var s;if(a<22250738585072014e-324)e((s=a/5e-324)>>>0,o,r+t),e((i<<31|s/4294967296)>>>0,o,r+n);else{var c=Math.floor(Math.log(a)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(s=a*Math.pow(2,-c))>>>0,o,r+t),e((i<<31|c+1023<<20|1048576*s&1048575)>>>0,o,r+n)}}}function i(e,t,n,a,o){var r=e(a,o+t),i=e(a,o+n),s=2*(i>>31)+1,c=i>>>20&2047,u=4294967296*(1048575&i)+r;return 2047===c?u?NaN:s*(1/0):0===c?5e-324*s*u:s*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,a,4,0),e.readDoubleLE=i.bind(null,o,0,4),e.readDoubleBE=i.bind(null,r,4,0)}(),e}function n(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function a(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function r(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},77137:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},31593:function(e){"use strict";e.exports=function(e,t,n){var a=n||8192,o=a>>>1,r=null,i=a;return function(n){if(n<1||n>o)return e(n);i+n>a&&(r=e(a),i=0);var s=t.call(r,i,i+=n);return 7&i&&(i=1+(7|i)),s}}},34133:function(e,t){"use strict";var n=t;n.length=function(e){for(var t=0,n=0,a=0;a191&&a<224?r[i++]=(31&a)<<6|63&e[t++]:a>239&&a<365?(a=((7&a)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,r[i++]=55296+(a>>10),r[i++]=56320+(1023&a)):r[i++]=(15&a)<<12|(63&e[t++])<<6|63&e[t++],i>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,r)),i=0);return o?(i&&o.push(String.fromCharCode.apply(String,r.slice(0,i))),o.join("")):String.fromCharCode.apply(String,r.slice(0,i))},n.write=function(e,t,n){for(var a,o,r=n,i=0;i>6|192,t[n++]=63&a|128):55296===(64512&a)&&56320===(64512&(o=e.charCodeAt(i+1)))?(a=65536+((1023&a)<<10)+(1023&o),++i,t[n++]=a>>18|240,t[n++]=a>>12&63|128,t[n++]=a>>6&63|128,t[n++]=63&a|128):(t[n++]=a>>12|224,t[n++]=a>>6&63|128,t[n++]=63&a|128);return n-r}},10259:function(e,t,n){"use strict";var a=n(38416).default,o=n(42122).default;Object.defineProperty(t,"__esModule",{value:!0}),t.matchErrorCode=t.matchError=t.generateErrorMap=void 0;t.generateErrorMap=function(e){var t,n;return null!==(n=null===(t=e.errors)||void 0===t?void 0:t.reduce((function(e,t){return o(o({},e),{},a({},t.name,t))}),{}))&&void 0!==n?n:{}};t.matchError=function(e){return(0,t.matchErrorCode)(e.code)};t.matchErrorCode=function(e){return new RegExp("custom program error: 0x".concat(e.toString(16)))}},3286:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateAccountParsersFromCoder=t.generateAccountParsers=void 0;var a=n(41100),o=n(74522),r=a.__importDefault(n(7697));t.generateAccountParsers=function(e){var n,a=new o.BorshAccountsCoder(e);return(0,t.generateAccountParsersFromCoder)(null===(n=e.accounts)||void 0===n?void 0:n.map((function(e){return e.name})),a)};t.generateAccountParsersFromCoder=function(e,t){return(null!==e&&void 0!==e?e:[]).reduce((function(e,n){return e[(0,r.default)(n)]=function(e){return t.decode(n,e)},e}),{})}},25877:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(41100);a.__exportStar(n(10259),t),a.__exportStar(n(3286),t),a.__exportStar(n(29110),t),a.__exportStar(n(47692),t)},29110:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2673:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateAnchorAccounts=void 0;var a=n(41100),o=n(74522),r=a.__importDefault(n(7697));t.generateAnchorAccounts=function(e,t,n){var a={};return t.forEach((function(t){a[(0,r.default)(t.name)]={programID:e,name:t.name,encode:function(e){return n.encode(t.name,e)},parse:function(e){return n.decode(t.name,e)},idl:t,size:n.size(t),discriminator:o.BorshAccountsCoder.accountDiscriminator(t.name)}})),a}},77617:function(e,t,n){"use strict";var a=n(38416).default,o=n(42122).default,r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.buildCoderMap=t.SuperCoder=void 0;var s=n(41100),c=n(74522),u=s.__importDefault(n(98890)),d=n(8594),l=s.__importDefault(n(30177)),f=n(10259),p=n(3286),b=n(2673),m=n(1363),h=function(){function e(t,n){var i,s;r(this,e),this.address=t,this.idl=n,this.coder=new c.BorshCoder(n),this.eventParser=new c.EventParser(t,this.coder),this.accounts=(0,b.generateAnchorAccounts)(t,null!==(i=n.accounts)&&void 0!==i?i:[],this.coder.accounts),this.errorMap=(0,f.generateErrorMap)(n);var u=Object.values(this.accounts),d={};u.forEach((function(e){d[e.name]=e.idl})),this.accountParsers=(0,p.generateAccountParsersFromCoder)(null===(s=n.accounts)||void 0===s?void 0:s.map((function(e){return e.name})),this.coder.accounts),this.accountTypeDefs=d,this.discriminators=u.reduce((function(e,t){return o(o({},e),{},a({},t.discriminator.toString("hex"),t.name))}),{}),this.discriminatorsByAccount=u.reduce((function(e,t){return o(o({},e),{},a({},t.name,t.discriminator))}),{})}return i(e,[{key:"makeGPAFilter",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a");if("option"in e)return"Option<".concat((0,t.formatIdlType)(e.option),">");if("defined"in e)return e.defined;if("array"in e)return"Array<".concat((0,t.formatIdlType)(e.array[0]),"; ").concat(e.array[1],">");throw new Error("Unknown IDL type: ".concat(JSON.stringify(e)))}},47692:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(41100);a.__exportStar(n(77617),t),a.__exportStar(n(17473),t),a.__exportStar(n(1363),t),a.__exportStar(n(16615),t)},1363:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.newProgramMap=t.newProgram=void 0;var a=n(41100),o=n(74522),r=a.__importDefault(n(30177)),i=n(16615);t.newProgram=function(e,t,n){return new o.Program(e,t.toString(),(0,i.makeAnchorProvider)(n))};t.newProgramMap=function(e,n,a){return(0,r.default)(n,(function(n,o){return(0,t.newProgram)(n,a[o],e)}))}},16615:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeAnchorProvider=t.makeSaberProvider=t.makeReadonlySaberProvider=t.buildAnchorProvider=t.AnchorProviderClass=void 0;var a=n(41100).__importStar(n(74522)),o=n(77639),r=a;t.AnchorProviderClass="AnchorProvider"in r?r.AnchorProvider:r.Provider;t.buildAnchorProvider=function(e,n,a){return new t.AnchorProviderClass(e,n,a)};t.makeReadonlySaberProvider=function(e){return new o.SolanaReadonlyProvider(e.connection)};t.makeSaberProvider=function(e){return o.SolanaProvider.init({connection:e.connection,wallet:e.wallet,opts:e.opts})};t.makeAnchorProvider=function(e){return(0,t.buildAnchorProvider)(e.connection,e.wallet,e.opts)}},6174:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exists=t.isNotUndefined=t.isNotNull=t.mapSome=t.mapN=void 0;t.mapN=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:f.DEFAULT_PROVIDER_OPTIONS;i(this,e),this.sendConnection=t,this.opts=n}return s(e,[{key:"getLatestBlockhash",value:function(){var e=r(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t=null!==(n=this.opts.commitment)&&void 0!==n?n:"confirmed"),e.next=3,this.sendConnection.getLatestBlockhash(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRecentBlockhash",value:function(){var e=r(o().mark((function e(t){var n,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t=null!==(n=this.opts.commitment)&&void 0!==n?n:"confirmed"),e.next=3,this.sendConnection.getLatestBlockhash(t);case 3:return a=e.sent,e.abrupt("return",a.blockhash);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"broadcast",value:function(){var e=r(o().mark((function e(t){var n,i,s,u,d,l=this,f=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=f.length>1&&void 0!==f[1]?f[1]:this.opts,i=n.printLogs,s=void 0===i||i,u=a(n,c),0!==t.signatures.length){e.next=3;break}throw new Error("Transaction must be signed before broadcasting.");case 3:if(d=t.serialize(),!s){e.next=11;break}return e.t0=p.PendingTransaction,e.t1=this.sendConnection,e.next=9,(0,h.sendAndSpamRawTx)(this.sendConnection,d,u,u);case 9:return e.t2=e.sent,e.abrupt("return",new e.t0(e.t1,e.t2));case 11:return e.next=13,(0,b.suppressConsoleErrorAsync)(r(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=p.PendingTransaction,e.t1=l.sendConnection,e.next=4,(0,h.sendAndSpamRawTx)(l.sendConnection,d,u,u);case 4:return e.t2=e.sent,e.abrupt("return",new e.t0(e.t1,e.t2));case 6:case"end":return e.stop()}}),e)}))));case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"simulate",value:function(){var e=r(o().mark((function e(t,n){var a,r,i,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=void 0===n?{commitment:null!==(r=this.opts.preflightCommitment)&&void 0!==r?r:"confirmed",verifySigners:!0}:n,s=i.commitment,c=void 0===s?null!==(a=this.opts.preflightCommitment)&&void 0!==a?a:"confirmed":s,u=i.verifySigners,!(void 0===u||u)||0!==t.signatures.length){e.next=3;break}throw new Error("Transaction must be signed before simulating.");case 3:return e.next=5,(0,m.simulateTransactionWithCommitment)(this.sendConnection,t,c);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();t.SingleConnectionBroadcaster=g;var y=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.DEFAULT_PROVIDER_OPTIONS;i(this,e),this.connections=t,this.opts=n}return s(e,[{key:"getLatestBlockhash",value:function(){var e=r(o().mark((function e(t){var n,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t=null!==(n=this.opts.preflightCommitment)&&void 0!==n?n:"confirmed"),e.prev=1,e.next=4,Promise.any(this.connections.map((function(e){return e.getLatestBlockhash(t)})));case 4:return a=e.sent,e.abrupt("return",a);case 8:if(e.prev=8,e.t0=e.catch(1),!(e.t0 instanceof AggregateError)){e.next=14;break}throw(0,l.firstAggregateError)(e.t0);case 14:throw e.t0;case 15:case"end":return e.stop()}}),e,this,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getRecentBlockhash",value:function(){var e=r(o().mark((function e(t){var n,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t=null!==(n=this.opts.preflightCommitment)&&void 0!==n?n:"confirmed"),e.prev=1,e.next=4,Promise.any(this.connections.map((function(e){return e.getLatestBlockhash(t)})));case 4:return a=e.sent,e.abrupt("return",a.blockhash);case 8:if(e.prev=8,e.t0=e.catch(1),!(e.t0 instanceof AggregateError)){e.next=14;break}throw(0,l.firstAggregateError)(e.t0);case 14:throw e.t0;case 15:case"end":return e.stop()}}),e,this,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_sendRawTransaction",value:function(){var e=r(o().mark((function e(t,n){var a=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.any(this.connections.map(function(){var e=r(o().mark((function e(r){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=p.PendingTransaction,e.t1=r,e.next=4,(0,h.sendAndSpamRawTx)(r,t,null!==n&&void 0!==n?n:a.opts);case 4:return e.t2=e.sent,e.abrupt("return",new e.t0(e.t1,e.t2));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),!(e.t0 instanceof AggregateError)){e.next=12;break}throw(0,l.firstAggregateError)(e.t0);case 12:throw e.t0;case 13:case"end":return e.stop()}}),e,this,[[0,6]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"broadcast",value:function(){var e=r(o().mark((function e(t){var n,i,s,c,d,l=this,f=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=f.length>1&&void 0!==f[1]?f[1]:this.opts,i=n.printLogs,s=void 0===i||i,c=a(n,u),0!==t.signatures.length){e.next=3;break}throw new Error("Transaction must be signed before broadcasting.");case 3:if(d=t.serialize(),!s){e.next=8;break}return e.next=7,this._sendRawTransaction(d,c);case 7:case 10:return e.abrupt("return",e.sent);case 8:return e.next=10,(0,b.suppressConsoleErrorAsync)(r(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l._sendRawTransaction(d,c);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"simulate",value:function(){var e=r(o().mark((function e(t,n){var a,i,s,c,u,d,f,p;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=void 0===n?{commitment:null!==(c=null!==(s=this.opts.preflightCommitment)&&void 0!==s?s:this.opts.commitment)&&void 0!==c?c:"confirmed",verifySigners:!0}:n,d=u.commitment,f=void 0===d?null!==(i=null!==(a=this.opts.preflightCommitment)&&void 0!==a?a:this.opts.commitment)&&void 0!==i?i:"confirmed":d,p=u.verifySigners,!(void 0===p||p)||0!==t.signatures.length){e.next=3;break}throw new Error("Transaction must be signed before simulating.");case 3:return e.prev=3,e.next=6,Promise.any(this.connections.map(function(){var e=r(o().mark((function e(n){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.simulateTransactionWithCommitment)(n,t,f);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),!(e.t0 instanceof AggregateError)){e.next=15;break}throw(0,l.firstAggregateError)(e.t0);case 15:throw e.t0;case 16:case"end":return e.stop()}}),e,this,[[3,9]])})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();t.MultipleConnectionBroadcaster=y},95044:function(e,t,n){"use strict";var a=n(65218),o=n(17061).default,r=n(42122).default,i=n(17156).default;Object.defineProperty(t,"__esModule",{value:!0}),t.sendAndSpamRawTx=void 0;var s=n(96591),c=n(86005),u=function(){var e=i(o().mark((function e(t,n,u){var d,l,f,p,b,m,h=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d=h.length>3&&void 0!==h[3]?h[3]:c.DEFAULT_RETRY_OPTIONS,l=d.retryTimes,f=void 0===l?c.DEFAULT_RETRY_OPTIONS.retryTimes:l,p=d.retryInterval,b=void 0===p?c.DEFAULT_RETRY_OPTIONS.retryInterval:p,e.next=3,t.sendRawTransaction(n,u);case 3:return m=e.sent,i(o().mark((function e(){var i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=0;case 1:if(!(i2&&void 0!==arguments[2]?arguments[2]:d.DEFAULT_PROVIDER_OPTIONS;s(this,e),this.primaryConnection=t,this.fallbackConnections=n,this.opts=a,this.premiumBroadcaster=new p.SingleConnectionBroadcaster(t,a)}return c(e,[{key:"getLatestBlockhash",value:function(){var e=i(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t=null!==(n=this.opts.preflightCommitment)&&void 0!==n?n:"confirmed"),e.next=3,this.premiumBroadcaster.getLatestBlockhash(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRecentBlockhash",value:function(){var e=i(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t=null!==(n=this.opts.preflightCommitment)&&void 0!==n?n:"confirmed"),e.next=3,this.premiumBroadcaster.getRecentBlockhash(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_sendRawTransaction",value:function(){var e=i(r().mark((function e(t,n){var o,s=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=l.PendingTransaction,e.t1=this.primaryConnection,e.next=4,(0,b.sendAndSpamRawTx)(this.primaryConnection,t,null!==n&&void 0!==n?n:this.opts,null!==n&&void 0!==n?n:p.DEFAULT_RETRY_OPTIONS);case 4:return e.t2=e.sent,o=new e.t0(e.t1,e.t2),i(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(s.fallbackConnections.map(function(){var e=i(r().mark((function e(o){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,b.sendAndSpamRawTx)(o,t,null!==n&&void 0!==n?n:s.opts,null!==(i=null===n||void 0===n?void 0:n.fallbackRetryOptions)&&void 0!==i?i:p.DEFAULT_FALLBACK_RETRY_OPTIONS);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),a.warn("[Broadcaster] _sendRawTransaction error",e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)})))(),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"broadcast",value:function(){var e=i(r().mark((function e(t){var n,a,s,c,d,l=this,p=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=p.length>1&&void 0!==p[1]?p[1]:this.opts,a=n.printLogs,s=void 0===a||a,c=o(n,u),0!==t.signatures.length){e.next=3;break}throw new Error("Transaction must be signed before broadcasting.");case 3:if(d=t.serialize(),!s){e.next=8;break}return e.next=7,this._sendRawTransaction(d,c);case 7:case 10:return e.abrupt("return",e.sent);case 8:return e.next=10,(0,f.suppressConsoleErrorAsync)(i(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l._sendRawTransaction(d,c);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"simulate",value:function(){var e=i(r().mark((function e(t,n){var a,o,i,s,c,u,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=void 0===n?{commitment:null!==(o=this.opts.preflightCommitment)&&void 0!==o?o:"confirmed",verifySigners:!0}:n,s=i.commitment,c=void 0===s?null!==(a=this.opts.preflightCommitment)&&void 0!==a?a:"confirmed":s,u=i.verifySigners,!(d=void 0===u||u)||0!==t.signatures.length){e.next=3;break}throw new Error("Transaction must be signed before simulating.");case 3:return e.abrupt("return",this.premiumBroadcaster.simulate(t,{commitment:c,verifySigners:d}));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();t.TieredBroadcaster=m},65221:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMPUTE_BUDGET_PROGRAM=void 0;var a=n(41100),o=n(8594);t.COMPUTE_BUDGET_PROGRAM=new o.PublicKey("ComputeBudget111111111111111111111111111111"),a.__exportStar(n(14631),t)},14631:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.requestHeapFrameInstruction=t.requestComputeUnitsInstruction=void 0;var o=n(8594),r=n(65221),i=n(19507);t.requestComputeUnitsInstruction=function(e,t){var n=a.alloc(i.RequestUnitsLayout.span);return i.RequestUnitsLayout.encode({instruction:0,units:e,additionalFee:t},n),new o.TransactionInstruction({data:n,keys:[],programId:r.COMPUTE_BUDGET_PROGRAM})};t.requestHeapFrameInstruction=function(e){var t=a.alloc(i.RequestHeapFrameLayout.span);return i.RequestHeapFrameLayout.encode({instruction:1,bytes:e},t),new o.TransactionInstruction({data:t,keys:[],programId:r.COMPUTE_BUDGET_PROGRAM})}},19507:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestHeapFrameLayout=t.RequestUnitsLayout=void 0;var a=n(41100).__importStar(n(21864));t.RequestUnitsLayout=a.struct([a.u8("instruction"),a.u32("units"),a.u32("additionalFee")]),t.RequestHeapFrameLayout=a.struct([a.u8("instruction"),a.u32("bytes")])},69033:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_NETWORK_CONFIG_MAP=t.formatNetwork=void 0;t.formatNetwork=function(e){return"mainnet-beta"===e?"mainnet":e},t.DEFAULT_NETWORK_CONFIG_MAP={"mainnet-beta":{name:"Mainnet Beta",endpoint:"https://api.mainnet-beta.solana.com/"},devnet:{name:"Devnet",endpoint:"https://api.devnet.solana.com/"},testnet:{name:"Testnet",endpoint:"https://api.testnet.solana.com/"},localnet:{name:"Localnet",endpoint:"http://127.0.0.1:8899"}}},10238:function(e,t,n){"use strict";var a=n(65218),o=n(861).default;Object.defineProperty(t,"__esModule",{value:!0}),t.firstAggregateError=void 0;t.firstAggregateError=function(e){var t=e.errors,n=[t.pop()].concat(o(t)),r=n[0],i=n.slice(1);return i.length>0&&a.error(i),r}},77639:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(41100);a.__exportStar(n(86005),t),a.__exportStar(n(69033),t),a.__exportStar(n(6977),t),a.__exportStar(n(25531),t),a.__exportStar(n(54164),t),a.__exportStar(n(96591),t),a.__exportStar(n(9922),t)},6977:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},25531:function(e,t,n){"use strict";var a=n(61655).default,o=n(26389).default,r=n(861).default,i=n(17061).default,s=n(17156).default,c=n(42122).default,u=n(56690).default,d=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaAugmentedProvider=t.SolanaProvider=t.SolanaTransactionSigner=t.doSignAndBroadcastTransaction=t.SolanaReadonlyProvider=t.DEFAULT_READONLY_PUBLIC_KEY=t.DEFAULT_PROVIDER_OPTIONS=void 0;var l=n(41100),f=n(8594),p=l.__importDefault(n(46916)),b=n(86005),m=n(77639),h=n(67832);t.DEFAULT_PROVIDER_OPTIONS={preflightCommitment:"confirmed",commitment:"confirmed"},t.DEFAULT_READONLY_PUBLIC_KEY=f.SystemProgram.programId;var g=function(){function e(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.DEFAULT_PROVIDER_OPTIONS,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.DEFAULT_READONLY_PUBLIC_KEY;u(this,e),this.connection=n,this.opts=a,this.publicKey=o,this.wallet={signTransaction:Promise.resolve.bind(Promise),signAllTransactions:Promise.resolve.bind(Promise),publicKey:t.DEFAULT_READONLY_PUBLIC_KEY},this.wallet=c(c({},this.wallet),{},{publicKey:o})}return d(e,[{key:"getAccountInfo",value:function(){var e=s(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.connection.getAccountInfo(t,this.opts.commitment);case 2:if(n=e.sent){e.next=5;break}return e.abrupt("return",null);case 5:return e.abrupt("return",{accountId:t,accountInfo:n});case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.SolanaReadonlyProvider=g;var y=function(){var e=s(i().mark((function e(t,n,a,o){var s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.signTransaction(n);case 2:return s=e.sent,(null===o||void 0===o?void 0:o.signers)&&o.signers.length>0&&s.sign.apply(s,r(o.signers)),e.next=6,a.broadcast(s,o);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})));return function(t,n,a,o){return e.apply(this,arguments)}}();t.doSignAndBroadcastTransaction=y;var v=function(){function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"confirmed";u(this,e),this.wallet=t,this.broadcaster=n,this.preflightCommitment=a}return d(e,[{key:"publicKey",get:function(){return this.wallet.publicKey}},{key:"signAndBroadcastTransaction",value:function(){var e=s(i().mark((function e(n,a){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,t.doSignAndBroadcastTransaction)(this.wallet,n,this.broadcaster,a);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"sign",value:function(){var e=s(i().mark((function e(t){var n,a,o,r,s,c=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:[],a=c.length>2&&void 0!==c[2]?c[2]:{preflightCommitment:this.preflightCommitment},e.next=4,this.broadcaster.getLatestBlockhash(a.preflightCommitment);case 4:return o=e.sent,r=o.blockhash,s=o.lastValidBlockHeight,t.feePayer=this.wallet.publicKey,t.lastValidBlockHeight=s,t.recentBlockhash=r,e.next=12,this.wallet.signTransaction(t);case 12:return n.filter((function(e){return void 0!==e})).forEach((function(e){t.partialSign(e)})),e.abrupt("return",t);case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signAll",value:function(){var e=s(i().mark((function e(t){var n,a,o,r,s,c,u=this,d=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.length>1&&void 0!==d[1]?d[1]:{preflightCommitment:this.preflightCommitment},e.next=3,this.broadcaster.getLatestBlockhash(n.preflightCommitment);case 3:return a=e.sent,o=a.blockhash,r=a.lastValidBlockHeight,s=t.map((function(e){var t=e.tx,n=e.signers,a=void 0===n?[]:n;return t.feePayer=u.wallet.publicKey,t.lastValidBlockHeight=r,t.recentBlockhash=o,a.filter((function(e){return void 0!==e})).forEach((function(e){t.partialSign(e)})),t})),e.next=9,this.wallet.signAllTransactions(s);case 9:return c=e.sent,e.abrupt("return",c);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.SolanaTransactionSigner=v;var w=function(e){a(r,e);var n=o(r);function r(e,a,o){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.DEFAULT_PROVIDER_OPTIONS,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new v(o,a,s.preflightCommitment);return u(this,r),(i=n.call(this,e,s)).connection=e,i.broadcaster=a,i.wallet=o,i.opts=s,i.signer=c,i}return d(r,[{key:"signAndBroadcastTransaction",value:function(){var e=s(i().mark((function e(t,n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.signer.signAndBroadcastTransaction(t,n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"send",value:function(){var e=s(i().mark((function e(t){var n,a,o,r,s=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:[],a=s.length>2&&void 0!==s[2]?s[2]:this.opts,e.next=4,this.signer.sign(t,n,a);case 4:return o=e.sent,e.next=7,this.broadcaster.broadcast(o,a);case 7:return r=e.sent,e.next=10,r.wait();case 10:return e.abrupt("return",r);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"sendAll",value:function(){var e=s(i().mark((function e(t){var n,a,o=this,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:this.opts,e.next=3,this.signer.signAll(t,n);case 3:return a=e.sent,e.next=6,Promise.all(a.map(function(){var e=s(i().mark((function e(t){var a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.broadcaster.broadcast(t,n);case 2:return a=e.sent,e.next=5,a.wait();case 5:return e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"simulate",value:function(){var e=s(i().mark((function e(t,n){var a,o,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r.length>2&&void 0!==r[2]?r[2]:this.opts,o=t,void 0===n){e.next=6;break}return e.next=5,this.signer.sign(t,n,a);case 5:o=e.sent;case 6:return e.next=8,this.broadcaster.simulate(o,{verifySigners:void 0!==n,commitment:a.commitment});case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}],[{key:"load",value:function(e){var t=e.connection,n=e.sendConnection,a=void 0===n?t:n,o=e.wallet,i=e.opts;return new r(t,new b.SingleConnectionBroadcaster(a,i),o,i)}},{key:"init",value:function(e){var n=e.connection,a=e.broadcastConnections,o=void 0===a?[n]:a,i=e.wallet,s=e.opts,c=void 0===s?t.DEFAULT_PROVIDER_OPTIONS:s,u=o[0];return(0,p.default)(u,"must have at least one broadcast connection"),new r(n,o.length>1?new m.TieredBroadcaster(n,o,c):new b.SingleConnectionBroadcaster(u,c),i,c)}}]),r}(g);t.SolanaProvider=w;var k=function(){function e(t){u(this,e),this.provider=t}return d(e,[{key:"walletKey",get:function(){return this.provider.wallet.publicKey}},{key:"connection",get:function(){return this.provider.connection}},{key:"signer",get:function(){return this.provider.signer}},{key:"broadcaster",get:function(){return this.provider.broadcaster}},{key:"opts",get:function(){return this.provider.opts}},{key:"wallet",get:function(){return this.provider.wallet}},{key:"signAndBroadcastTransaction",value:function(e,t){return this.provider.signAndBroadcastTransaction(e,t)}},{key:"send",value:function(e,t,n){return this.provider.send(e,t,n)}},{key:"sendAll",value:function(e,t){return this.provider.sendAll(e,t)}},{key:"simulate",value:function(e,t,n){return this.provider.simulate(e,t,n)}},{key:"getAccountInfo",value:function(e){return this.provider.getAccountInfo(e)}},{key:"newTX",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return h.TransactionEnvelope.create(this,e,t)}},{key:"requestAirdrop",value:function(){var e=s(i().mark((function e(t){var n,a=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:this.wallet.publicKey,e.t0=m.PendingTransaction,e.t1=this.connection,e.next=5,this.connection.requestAirdrop(n,t);case 5:return e.t2=e.sent,e.abrupt("return",new e.t0(e.t1,e.t2));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"withSigner",value:function(t){return new e(new w(this.connection,this.broadcaster,new m.SignerWallet(t),this.opts))}}]),e}();t.SolanaAugmentedProvider=k},41033:function(e,t,n){"use strict";var a=n(17061).default,o=n(42122).default,r=n(70215).default,i=n(17156).default,s=n(56690).default,c=n(89728).default,u=["commitment","maxSupportedTransactionVersion","useWebsocket"],d=["commitment","maxSupportedTransactionVersion"];Object.defineProperty(t,"__esModule",{value:!0}),t.PendingTransaction=void 0;var l=n(41100).__importDefault(n(75171)),f=n(95286),p=n(88840),b=function(){function e(t,n){s(this,e),this.connection=t,this.signature=n,this._receipt=null}return c(e,[{key:"receipt",get:function(){return this._receipt}},{key:"wait",value:function(){var e=i(a().mark((function e(){var t,n,i,s,c,d,l,f,p=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(t=p.length>0&&void 0!==p[0]?p[0]:{}).commitment,i=void 0===n?"confirmed":n,s=t.maxSupportedTransactionVersion,c=void 0===s?0:s,d=t.useWebsocket,l=void 0===d||d,f=r(t,u),!this._receipt){e.next=3;break}return e.abrupt("return",this._receipt);case 3:if(!l){e.next=9;break}return e.next=6,this.confirm(o({commitment:i},f));case 6:return e.next=8,this.pollForReceipt({commitment:i,maxSupportedTransactionVersion:c});case 8:case 11:return e.abrupt("return",e.sent);case 9:return e.next=11,this.pollForReceipt(o({commitment:i,maxSupportedTransactionVersion:c},f));case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"pollForReceipt",value:function(){var e=i(a().mark((function e(){var t,n,s,c,u,f,b,m=this,h=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t=h.length>0&&void 0!==h[0]?h[0]:{}).commitment,s=void 0===n?"confirmed":n,c=t.maxSupportedTransactionVersion,u=void 0===c?0:c,f=r(t,d),e.next=3,(0,l.default)(function(){var e=i(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.connection.getTransaction(m.signature,{commitment:s,maxSupportedTransactionVersion:u});case 2:if(n=e.sent){e.next=6;break}return t(new Error("Error fetching transaction")),e.abrupt("return");case 6:return e.abrupt("return",new p.TransactionReceipt(m.signature,n));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o({retries:5,minTimeout:500},f));case 3:if(b=e.sent){e.next=6;break}throw new Error("transaction could not be confirmed");case 6:return this._receipt=b,e.abrupt("return",b);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"awaitSignatureConfirmation",value:function(){var e=i(a().mark((function e(){var t,n,o,r=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:"confirmed",e.next=3,this.connection.confirmTransaction(this.signature,t);case 3:if(n=e.sent,!(o=n.value).err){e.next=7;break}throw o.err;case 7:return e.abrupt("return",this.signature);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"confirm",value:function(){var e=i(a().mark((function e(t){var n,o,r,i,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.commitment,o=void 0===n?"confirmed":n,r=t.blockhash,i=t.lastValidBlockHeight,!r||!i){e.next=7;break}return e.next=4,this.connection.confirmTransaction({signature:this.signature,blockhash:r,lastValidBlockHeight:i},o);case 4:s=e.sent.value,e.next=10;break;case 7:return e.next=9,this.connection.confirmTransaction(this.signature,o);case 9:s=e.sent.value;case 10:if(!s.err){e.next=12;break}throw new Error("Transaction ".concat(this.signature," failed (").concat(JSON.stringify(s),")"));case 12:return e.abrupt("return",this.signature);case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"generateSolanaExplorerLink",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mainnet-beta";return(0,f.generateTXLink)(this.signature,e)}}]),e}();t.PendingTransaction=b},67832:function(e,t,n){"use strict";var a=n(74704).default,o=n(17061).default,r=n(17156).default,i=n(42122).default,s=n(861).default,c=n(56690).default,u=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionEnvelope=t.PACKET_DATA_SIZE=void 0;var d=n(41100),l=n(8594),f=d.__importDefault(n(46916)),p=n(65221),b=n(96591),m=n(85068),h=n(99792);t.PACKET_DATA_SIZE=1232;var g=new l.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),y=function(e,t){var n=e.flatMap((function(e){return e.keys.filter((function(e){return e.isSigner})).map((function(e){return e.pubkey}))}));return t.filter((function(e){return n.find((function(t){return t.equals(e.publicKey)}))}))},v=function(){function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];c(this,e),this.provider=t,this.instructions=n,this.signers=a}return u(e,[{key:"prepend",value:function(){for(var e,t=arguments.length,n=new Array(t),a=0;a0&&void 0!==arguments[0]?arguments[0]:this.provider.wallet.publicKey,n=(e=new l.Transaction).add.apply(e,s(this.instructions));return n.feePayer=t,n}},{key:"estimateSizeUnsafe",value:function(){var e=this.build();return e.recentBlockhash="MaryHadALittLeLambZNdhAUTrsLE1ydg6rmtvFEpKT",(0,m.calculateTxSizeUnsafe)(e)}},{key:"estimateSize",value:function(){var e=this;return(0,b.suppressConsoleError)((function(){try{var n=e.build();n.recentBlockhash="MaryHadALittLeLambZNdhAUTrsLE1ydg6rmtvFEpKT";var a=(0,m.calculateTxSizeUnsafe)(n);return a>t.PACKET_DATA_SIZE?{error:new b.EstimatedTXTooBigError(n,a)}:{size:a}}catch(o){return{error:new b.TXSizeEstimationError(o)}}}))}},{key:"buildPartition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.provider.wallet.publicKey;return this.partition().map((function(t){return t.build(e)}))}},{key:"partition",value:function(){var n=this;if("size"in this.estimateSize())return[this];if(0===this.instructions.length)return[];var a=new e(this.provider,this.instructions.slice(0,1),this._filterRequiredSigners(this.instructions.slice(0,1))),o=a.estimateSizeUnsafe(),r=[];return this.instructions.slice(1).forEach((function(i,c){if(o>t.PACKET_DATA_SIZE)throw new Error("cannot construct a valid partition: instruction ".concat(c," is too large (").concat(o," > ").concat(t.PACKET_DATA_SIZE,")"));var u=[].concat(s(a.instructions),[i]),d=n._filterRequiredSigners(u),l=new e(n.provider,u,d),f=l.estimateSizeUnsafe();if(f>t.PACKET_DATA_SIZE){r.push(a);var p=[i];a=new e(n.provider,p,n._filterRequiredSigners(p)),o=a.estimateSizeUnsafe()}else a=l,o=f})),r.push(a),r}},{key:"_filterRequiredSigners",value:function(e){return y(e,this.signers)}},{key:"generateInspectLink",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mainnet-beta",t=this.build();t.recentBlockhash=h.RECENT_BLOCKHASH_STUB;var n=t.serializeMessage().toString("base64");return(0,h.generateInspectLinkFromBase64)(e,n)}},{key:"simulate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{verifySigners:!0};return this.provider.simulate(this.build(),e.verifySigners?this.signers:void 0,e)}},{key:"simulateUnchecked",value:function(e){return this.simulate(i(i({},e),{},{verifySigners:!1}))}},{key:"simulateTable",value:function(e){var t=this;return this.simulate(e).then((function(e){var n;return(null===(n=null===e||void 0===e?void 0:e.value)||void 0===n?void 0:n.logs)&&(0,b.printTXTable)(t,e.value.logs,""),e}))}},{key:"send",value:function(){var e=r(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.signer.sign(this.build(),this.signers,t);case 2:return n=e.sent,e.abrupt("return",this.provider.broadcaster.broadcast(n,t));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"confirm",value:function(){var e=r(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.send(t);case 2:return e.abrupt("return",e.sent.wait());case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"combine",value:function(t){return new e(this.provider,[].concat(s(this.instructions),s(t.instructions)),[].concat(s(this.signers),s(t.signers)))}},{key:"writableKeys",get:function(){return s(new Set(s(this.instructions.map((function(e){return e.keys.filter((function(e){return e.isWritable})).map((function(e){return e.pubkey}))})).reduce((function(e,t){return e.concat(t)})))).values())}},{key:"instructionsJSON",get:function(){return this.instructions.map((function(e){return{programId:e.programId.toString(),keys:e.keys.map((function(e){return{isSigner:e.isSigner,isWritable:e.isWritable,publicKey:e.pubkey.toString()}})),data:e.data.toString("base64")}}))}},{key:"debugStr",get:function(){return["=> Instructions",this.instructions.map((function(e,t){return["Instruction ".concat(t,": ").concat(e.programId.toString())].concat(s(e.keys.map((function(e,t){return" [".concat(t,"] ").concat(e.pubkey.toString()," ").concat(e.isWritable?"(mut)":""," ").concat(e.isSigner?"(signer)":"")}))),[" Data (base64): ".concat(e.data.toString("base64"))]).join("\n")})).join("\n"),"=> Signers",this.signers.map((function(e){return e.publicKey.toString()})).join("\n")].join("\n")}},{key:"dedupeATAIXs",value:function(){if(0===this.instructions.length)return this;var t=new Set,n=this.instructions.map((function(e){var n;if(e.programId.equals(g)){var a=null===(n=e.keys[1])||void 0===n?void 0:n.pubkey.toString();if(!a)throw new Error("ATA key does not exist on ATA instruction");if(t.has(a))return null;t.add(a)}return e})).filter((function(e){return!!e}));return new e(this.provider,n,this.signers)}},{key:"splitATAIXs",value:function(){var t,n=new e(this.provider,[],this.signers),o=new e(this.provider,[],this.signers),r=a(this.instructions);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.programId.equals(g)?n.instructions.push(i):o.instructions.push(i)}}catch(s){r.e(s)}finally{r.f()}return{ataIXs:n.dedupeATAIXs(),tx:o}}},{key:"getInstruction",value:function(e){var t=this.instructions[e];if(!t)throw new Error("No instruction found at index ".concat(e));return t}},{key:"addMemo",value:function(e){return this.instructions.push((0,b.createMemoInstruction)(e)),this}},{key:"addAdditionalComputeBudget",value:function(e,t){return this.instructions.unshift((0,p.requestComputeUnitsInstruction)(e,t)),this}},{key:"addAdditionalHeapFrame",value:function(e){return this.instructions.unshift((0,p.requestHeapFrameInstruction)(e)),this}}],[{key:"create",value:function(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new e(t,n.filter((function(e){return!!e})),a)}},{key:"addMemos",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;at.PACKET_DATA_SIZE)throw new Error("cannot construct a valid partition: instruction ".concat(a," is too large (").concat(d," > ").concat(t.PACKET_DATA_SIZE,")"));var o=[].concat(s(u.instructions),s(n.instructions)),r=y(o,[].concat(s(u.signers),s(n.signers))),i=new e(c,o,r),f=i.estimateSizeUnsafe();f>t.PACKET_DATA_SIZE?(l.push(u),d=(u=n).estimateSizeUnsafe()):(u=i,d=f)})),l.push(u),l}},{key:"combineAllAsync",value:function(){var e=r(o().mark((function e(t){var n,a,r,i,s,c,u,d=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:for(n=e.sent,a=d.length,r=new Array(a>1?a-1:0),i=1;i0?e(n):[]}},{key:"printLogs",value:function(){var e,t;a.log(null===(t=null===(e=this.response.meta)||void 0===e?void 0:e.logMessages)||void 0===t?void 0:t.join("\n"))}},{key:"computeUnits",get:function(){var e,t=null===(e=this.response.meta)||void 0===e?void 0:e.logMessages;(0,c.default)(t,"no logs");var n=t[t.length-2];(0,c.default)(n,"no consume log");var a=n.split(" ")[3];return(0,c.default)(a,"no amount"),parseInt(a)}},{key:"generateSolanaExplorerLink",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mainnet-beta";return(0,d.generateTXLink)(this.signature,e)}}]),e}();t.TransactionReceipt=p},54164:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(41100);a.__exportStar(n(14436),t),a.__exportStar(n(41033),t),a.__exportStar(n(55535),t),a.__exportStar(n(67832),t),a.__exportStar(n(88840),t),a.__exportStar(n(99792),t)},14436:function(e,t,n){"use strict";var a=n(861).default;Object.defineProperty(t,"__esModule",{value:!0}),t.formatInstructionLogs=t.formatLogEntry=t.parseTransactionLogs=void 0;var o=n(41100).__importDefault(n(46916)),r=n(55535);t.parseTransactionLogs=function(e,t){var n,i=0,s=[];if(!e){if(t)throw new Error(JSON.stringify(t));throw new Error("No logs detected")}if(t&&(n=(0,r.getTransactionInstructionError)(t)),e.forEach((function(e){var t,n,r,c,u;if(e.startsWith("Program log:"))null===(t=s[s.length-1])||void 0===t||t.logs.push({type:"text",depth:i,text:e});else{var d=a(e.matchAll(/Program (\w*) invoke \[(\d)\]/g));if(d.length>0){var l=null===(n=d[0])||void 0===n?void 0:n[1];(0,o.default)(l,"program address"),0===i?s.push({programAddress:l,logs:[],failed:!1}):null===(r=s[s.length-1])||void 0===r||r.logs.push({type:"cpi",depth:i,programAddress:null!==l&&void 0!==l?l:null}),i++}else if(e.includes("success"))null===(c=s[s.length-1])||void 0===c||c.logs.push({type:"success",depth:i}),i--;else if(e.includes("failed")){var f=s[s.length-1];f&&!f.failed&&(f.failed=!0,f.logs.push({type:"programError",depth:i,text:e.slice(e.indexOf(": ")+2)})),i--}else 0===i&&(s.push({logs:[],failed:!1}),i++),null===(u=s[s.length-1])||void 0===u||u.logs.push({type:"system",depth:i,text:e})}})),n&&0===s.length&&s.push({logs:[],failed:!0}),n&&n.index===s.length-1){var c=s[n.index];c&&(c.failed=!0,c.logs.push({type:"runtimeError",depth:1,text:n.message}))}return s};t.formatLogEntry=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(t=e.depth,new Array(t-1).fill("\xa0\xa0").join("")+"> "):"";return"".concat(n).concat(function(e){switch(e.type){case"success":return"Program returned success";case"programError":return"Program returned error: ".concat(e.text);case"runtimeError":return"Runtime error: ".concat(e.text);case"system":case"text":return e.text;case"cpi":return"Invoking Unknown ".concat(e.programAddress?"(".concat(e.programAddress,") "):"","Program")}}(e))};t.formatInstructionLogs=function(e){return e.map((function(e,n){return["=> Instruction #".concat(n,": ").concat(e.programAddress?"Program ".concat(e.programAddress):"System")].concat(a(e.logs.map((function(e){return(0,t.formatLogEntry)(e,!0)})))).join("\n")})).join("\n")}},55535:function(e,t){"use strict";function n(e){var n,a=null;if("string"===typeof e){var o=t.BUILTIN_SOLANA_ERROR_MESSAGES.get(e);if(o)return o}else"Custom"in e?(n=t.BUILTIN_SOLANA_ERROR_MESSAGES.get("Custom"),a=e.Custom):"BorshIoError"in e&&(n=t.BUILTIN_SOLANA_ERROR_MESSAGES.get("BorshIoError"),a=e.BorshIoError);return n&&a?n.replace("{0}",a):"Unknown instruction error"}Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionInstructionError=t.BUILTIN_SOLANA_ERROR_MESSAGES=void 0,t.BUILTIN_SOLANA_ERROR_MESSAGES=new Map([["GenericError","generic instruction error"],["InvalidArgument","invalid program argument"],["InvalidInstructionData","invalid instruction data"],["InvalidAccountData","invalid account data for instruction"],["AccountDataTooSmall","account data too small for instruction"],["InsufficientFunds","insufficient funds for instruction"],["IncorrectProgramId","incorrect program id for instruction"],["MissingRequiredSignature","missing required signature for instruction"],["AccountAlreadyInitialized","instruction requires an uninitialized account"],["UninitializedAccount","instruction requires an initialized account"],["UnbalancedInstruction","sum of account balances before and after instruction do not match"],["ModifiedProgramId","instruction modified the program id of an account"],["ExternalAccountLamportSpend","instruction spent from the balance of an account it does not own"],["ExternalAccountDataModified","instruction modified data of an account it does not own"],["ReadonlyLamportChange","instruction changed the balance of a read-only account"],["ReadonlyDataModified","instruction modified data of a read-only account"],["DuplicateAccountIndex","instruction contains duplicate accounts"],["ExecutableModified","instruction changed executable bit of an account"],["RentEpochModified","instruction modified rent epoch of an account"],["NotEnoughAccountKeys","insufficient account keys for instruction"],["AccountDataSizeChanged","non-system instruction changed account size"],["AccountNotExecutable","instruction expected an executable account"],["AccountBorrowFailed","instruction tries to borrow reference for an account which is already borrowed"],["AccountBorrowOutstanding","instruction left account with an outstanding borrowed reference"],["DuplicateAccountOutOfSync","instruction modifications of multiply-passed account differ"],["Custom","custom program error: {0}"],["InvalidError","program returned invalid error code"],["ExecutableDataModified","instruction changed executable accounts data"],["ExecutableLamportChange","instruction changed the balance of a executable account"],["ExecutableAccountNotRentExempt","executable accounts must be rent exempt"],["UnsupportedProgramId","Unsupported program id"],["CallDepth","Cross-program invocation call depth too deep"],["MissingAccount","An account required by the instruction is missing"],["ReentrancyNotAllowed","Cross-program invocation reentrancy not allowed for this instruction"],["MaxSeedLengthExceeded","Length of the seed is too long for address generation"],["InvalidSeeds","Provided seeds do not result in a valid address"],["InvalidRealloc","Failed to reallocate account data"],["ComputationalBudgetExceeded","Computational budget exceeded"],["PrivilegeEscalation","Cross-program invocation with unauthorized signer or writable account"],["ProgramEnvironmentSetupFailure","Failed to create program execution environment"],["ProgramFailedToComplete","Program failed to complete"],["ProgramFailedToCompile","Program failed to compile"],["Immutable","Account is immutable"],["IncorrectAuthority","Incorrect authority provided"],["BorshIoError","Failed to serialize or deserialize account data: {0}"],["AccountNotRentExempt","An account does not have enough lamports to be rent-exempt"],["InvalidAccountOwner","Invalid account owner"],["ArithmeticOverflow","Program arithmetic overflowed"],["UnsupportedSysvar","Unsupported sysvar"],["IllegalOwner","Provided owner is not allowed"]]),t.getTransactionInstructionError=function(e){if(e&&"object"===typeof e&&"InstructionError"in e){var t=e.InstructionError;return{index:t[0],message:n(t[1])}}}},85068:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateTxSizeUnsafe=void 0;t.calculateTxSizeUnsafe=function(e){var t=e.feePayer,n=t&&e.signatures.find((function(e){return e.publicKey.equals(t)})),a=e.serializeMessage(),o=e.signatures.length+(n?1:0),r=[];return function(e,t){for(var n=t;;){var a=127&n;if(0===(n>>=7)){e.push(a);break}a|=128,e.push(a)}}(r,o),r.length+64*o+a.length}},99792:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUncheckedInspectLink=t.generateInspectLinkFromBase64=t.serializeToBase64Unchecked=t.buildStubbedTransaction=t.RECENT_BLOCKHASH_STUB=void 0;var a=n(8594);t.RECENT_BLOCKHASH_STUB="GfVcyD4kkTrj4bKc7WA9sZCin9JDbdT4Zkd3EittNR1W";t.buildStubbedTransaction=function(e,n){var o=new a.Transaction;return o.recentBlockhash=t.RECENT_BLOCKHASH_STUB,o.feePayer="devnet"===e?new a.PublicKey("A2jaCHPzD6346348JoEym2KFGX9A7uRBw6AhCdX7gTWP"):new a.PublicKey("9u9iZBWqGsp5hXBxkVZtBTuLSGNAG9gEQLgpuVw39ASg"),o.instructions=n,o};t.serializeToBase64Unchecked=function(e){return e.serialize({requireAllSignatures:!1,verifySignatures:!1}).toString("base64")};t.generateInspectLinkFromBase64=function(e,t){return"https://".concat("mainnet-beta"===e?"":"".concat(e,"."),"anchor.so/tx/inspector?message=").concat(encodeURIComponent(t))};t.generateUncheckedInspectLink=function(e,n){return(0,t.generateInspectLinkFromBase64)(e,(0,t.serializeToBase64Unchecked)(n))}},96591:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(41100);a.__exportStar(n(36509),t),a.__exportStar(n(54103),t),a.__exportStar(n(17984),t),a.__exportStar(n(14158),t),a.__exportStar(n(20126),t),a.__exportStar(n(82442),t),a.__exportStar(n(961),t),a.__exportStar(n(20688),t),a.__exportStar(n(95286),t)},36509:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createMemoInstruction=t.MEMO_PROGRAM_ID=void 0;var o=n(8594);t.MEMO_PROGRAM_ID=new o.PublicKey("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr");t.createMemoInstruction=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return new o.TransactionInstruction({programId:t.MEMO_PROGRAM_ID,keys:n.map((function(e){return{pubkey:e,isSigner:!0,isWritable:!1}})),data:a.from(e,"utf8")})}},54103:function(e,t,n){"use strict";var a=n(65218),o=n(17061).default,r=n(17156).default;Object.defineProperty(t,"__esModule",{value:!0}),t.formatPubkeyShort=t.valueAsPromise=t.sleep=t.suppressConsoleError=t.suppressConsoleErrorAsync=void 0,n(41100).__exportStar(n(6174),t);var i=function(){},s=function(){var e=r(o().mark((function e(t){var n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.error,a.error=i,e.prev=2,e.next=5,t();case 5:return r=e.sent,a.error=n,e.abrupt("return",r);case 10:throw e.prev=10,e.t0=e.catch(2),a.error=n,e.t0;case 14:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}();t.suppressConsoleErrorAsync=s;t.suppressConsoleError=function(e){var t=a.error;a.error=i;try{var n=e();return a.error=t,n}catch(o){throw a.error=t,o}},t.sleep=function(e){return new Promise((function(t){return setTimeout(t,e)}))};var c=function(){var e=r(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("then"in t)){e.next=4;break}return e.next=3,t;case 3:return e.abrupt("return",e.sent);case 4:return e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.valueAsPromise=c;t.formatPubkeyShort=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:7,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=e.toString();return a.length>20?"".concat(a.substring(0,t),".....").concat(a.substring(a.length-n,a.length)):a}},17984:function(e,t,n){"use strict";var a=n(456),o=n(65218),r=n(17061).default,i=n(27424).default,s=n(17156).default;Object.defineProperty(t,"__esModule",{value:!0}),t.printAccountOwners=void 0;var c=n(8594);function u(e,t){return d.apply(this,arguments)}function d(){return(d=s(r().mark((function e(t,n){var i,s,c,d,l,f,b,m,h;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"object"===typeof n){e.next=5;break}throw new Error("printAccountOwners only works on objects");case 5:if((d=null===(i=(new Error).stack)||void 0===i?void 0:i.split("\n"))&&(l=d.findIndex((function(e){return e.includes("at ".concat(u.name))})),(f=d.findIndex((function(e){return e.includes("at debugAccountOwners")})))>l&&(l=f),l>0&&"undefined"!==typeof a&&void 0!==a.versions&&void 0!==a.versions.node&&(a,(b=d[l+1])&&(m=(null===(s=a.cwd)||void 0===s?void 0:s.call(a))||"/",(h=b.substring(b.indexOf(m)+m.length)).length>0&&(c=h.substring(1).replace(/\)$/,""))))),t){e.next=9;break}return e.abrupt("return");case 9:if(!c){e.next=18;break}return e.t0=o,e.t1=c,e.next=14,p(n,t);case 14:e.t2=e.sent,e.t0.log.call(e.t0,e.t1,e.t2),e.next=23;break;case 18:return e.t3=o,e.next=21,p(n,t);case 21:e.t4=e.sent,e.t3.log.call(e.t3,e.t4);case 23:e.next=28;break;case 25:e.prev=25,e.t5=e.catch(0),o.error("Error in printAccountOwners:",e.t5);case 28:case"end":return e.stop()}}),e,null,[[0,25]])})))).apply(this,arguments)}function l(e,t){return f.apply(this,arguments)}function f(){return(f=s(r().mark((function e(t,n){var a,i,s,c;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"function"===typeof(i=t._rpcRequest)){e.next=6;break}return o.error("_rpcRequest is not a function. Maybe web3 changed?"),e.abrupt("return",[]);case 6:return e.next=8,i("getMultipleAccounts",[n.map((function(e){return e.toBase58()})),{encoding:"base64",commitment:"confirmed"}]);case 8:if(s=e.sent,!(c=null===(a=null===s||void 0===s?void 0:s.result)||void 0===a?void 0:a.value)){e.next=12;break}return e.abrupt("return",c);case 12:return e.abrupt("return",[]);case 15:return e.prev=15,e.t0=e.catch(0),o.error("Error in gracefulGetMultipleAccountsInfo:",e.t0),e.abrupt("return",[]);case 19:case"end":return e.stop()}}),e,null,[[0,15]])})))).apply(this,arguments)}t.printAccountOwners=u;var p=function(){var e=s(r().mark((function e(t,n){var a,o,s,u,d,f,b,m,h,g,y,v,w,k,A,x,I,T;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a={},t&&"object"===typeof t){e.next=3;break}return e.abrupt("return",t);case 3:for(o={},s=[],u=[],d=[],f=0,b=Object.entries(t);f0)){e.next=19;break}return e.next=11,l(n,s);case 11:w=e.sent,k=r().mark((function e(){var t,n,o,c,u,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=i(x[A],2),n=t[0],o=t[1],(c=s.findIndex((function(e){return e.toBase58()===n})))>=0?(u=w[c],d=null===u||void 0===u?void 0:u.owner,a[o]=d?"".concat(n," (").concat(d,")"):"".concat(n)):a[o]="".concat(n);case 3:case"end":return e.stop()}}),e)})),A=0,x=Object.entries(o);case 14:if(!(A2&&void 0!==b[2]?b[2]:"confirmed",s=t,n.recentBlockhash){e.next=8;break}return e.next=5,t.getLatestBlockhash(o);case 5:c=e.sent,u=c.blockhash,n.recentBlockhash=u;case 8:return d=n.serialize({requireAllSignatures:!1}),l=d.toString("base64"),f={encoding:"base64",commitment:o},e.next=13,s._rpcRequest("simulateTransaction",[l,f]);case 13:if(!(p=e.sent).error){e.next=16;break}throw new r.SendTransactionError("failed to simulate transaction: "+p.error.message,null!==(i=p.result.value.logs)&&void 0!==i?i:void 0);case 16:return e.abrupt("return",p.result);case 17:case"end":return e.stop()}}),e)}))),i.apply(this,arguments)}t.simulateTransactionWithCommitment=function(e,t){return i.apply(this,arguments)}},20688:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tsToDate=t.dateToTs=void 0;var a=n(41100).__importDefault(n(43811));t.dateToTs=function(e){return new a.default(Math.floor(e.getTime()/1e3))};t.tsToDate=function(e){return new Date(1e3*e.toNumber())}},95286:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.generateTXLink=t.ExplorerType=void 0,function(e){e.SOLANA_EXPLORER="solana-explorer",e.SOLSCAN="solscan"}(n=t.ExplorerType||(t.ExplorerType={})),t.generateTXLink=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mainnet-beta",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.SOLANA_EXPLORER;switch(a){case n.SOLANA_EXPLORER:return"https://explorer.solana.com/tx/".concat(e,"?cluster=").concat(t);case n.SOLSCAN:return"https://solscan.io/tx/".concat(e,"?cluster=").concat(t);default:throw new Error("Explorer type ".concat(a," is not supported."))}}},9922:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SignerWallet=void 0;var r=n(25531),i=function(){function e(t){a(this,e),this.signer=t}return o(e,[{key:"publicKey",get:function(){return this.signer.publicKey}},{key:"signAllTransactions",value:function(e){var t=this;return Promise.resolve(e.map((function(e){return e.partialSign(t.signer),e})))}},{key:"signTransaction",value:function(e){return e.partialSign(this.signer),Promise.resolve(e)}},{key:"createProvider",value:function(e,t,n){return r.SolanaProvider.load({connection:e,sendConnection:t,wallet:this,opts:n})}}]),e}();t.SignerWallet=i},34639:function(e,t,n){"use strict";var a=n(74704).default;function o(e){if(!Number.isSafeInteger(e))throw new Error("Wrong integer: ".concat(e))}function r(){for(var e=function(e,t){return function(n){return e(t(n))}},t=arguments.length,n=new Array(t),a=0;a=e.length)throw new Error("Digit index outside alphabet: ".concat(t," (alphabet: ").concat(e.length,")"));return e[t]}))},decode:function(t){if(!Array.isArray(t)||t.length&&"string"!==typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((function(t){if("string"!==typeof t)throw new Error("alphabet.decode: not string element=".concat(t));var n=e.indexOf(t);if(-1===n)throw new Error('Unknown letter: "'.concat(t,'". Allowed: ').concat(e));return n}))}}}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("string"!==typeof e)throw new Error("join separator should be string");return{encode:function(t){if(!Array.isArray(t)||t.length&&"string"!==typeof t[0])throw new Error("join.encode input should be array of strings");var n,o=a(t);try{for(o.s();!(n=o.n()).done;){var r=n.value;if("string"!==typeof r)throw new Error("join.encode: non-string input=".concat(r))}}catch(i){o.e(i)}finally{o.f()}return t.join(e)},decode:function(t){if("string"!==typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"=";if(o(e),"string"!==typeof t)throw new Error("padding chr should be string");return{encode:function(n){if(!Array.isArray(n)||n.length&&"string"!==typeof n[0])throw new Error("padding.encode input should be array of strings");var o,r=a(n);try{for(r.s();!(o=r.n()).done;){var i=o.value;if("string"!==typeof i)throw new Error("padding.encode: non-string input=".concat(i))}}catch(s){r.e(s)}finally{r.f()}for(;n.length*e%8;)n.push(t);return n},decode:function(n){if(!Array.isArray(n)||n.length&&"string"!==typeof n[0])throw new Error("padding.encode input should be array of strings");var o,r=a(n);try{for(r.s();!(o=r.n()).done;){var i=o.value;if("string"!==typeof i)throw new Error("padding.decode: non-string input=".concat(i))}}catch(c){r.e(c)}finally{r.f()}var s=n.length;if(s*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;s>0&&n[s-1]===t;s--)if(!((s-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,s)}}}function u(e){if("function"!==typeof e)throw new Error("normalize fn should be function");return{encode:function(e){return e},decode:function(t){return e(t)}}}function d(e,t,n){if(t<2)throw new Error("convertRadix: wrong from=".concat(t,", base cannot be less than 2"));if(n<2)throw new Error("convertRadix: wrong to=".concat(n,", base cannot be less than 2"));if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];var a=0,r=[],i=Array.from(e);for(i.forEach((function(e){if(o(e),e<0||e>=t)throw new Error("Wrong integer: ".concat(e))}));;){for(var s=0,c=!0,u=a;u32)throw new Error("convertRadix2: wrong from=".concat(t));if(n<=0||n>32)throw new Error("convertRadix2: wrong to=".concat(n));if(f(t,n)>32)throw new Error("convertRadix2: carry overflow from=".concat(t," to=").concat(n," carryBits=").concat(f(t,n)));var i,s=0,c=0,u=Math.pow(2,n)-1,d=[],l=a(e);try{for(l.s();!(i=l.n()).done;){var p=i.value;if(o(p),p>=Math.pow(2,t))throw new Error("convertRadix2: invalid data word=".concat(p," from=").concat(t));if(s=s<32)throw new Error("convertRadix2: carry overflow pos=".concat(c," from=").concat(t));for(c+=t;c>=n;c-=n)d.push((s>>c-n&u)>>>0);s&=Math.pow(2,c)-1}}catch(b){l.e(b)}finally{l.f()}if(s=s<=t)throw new Error("Excess padding");if(!r&&s)throw new Error("Non-zero padding: ".concat(s));return r&&c>0&&d.push(s>>>0),d}function b(e){return o(e),{encode:function(t){if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return d(Array.from(t),Math.pow(2,8),e)},decode:function(t){if(!Array.isArray(t)||t.length&&"number"!==typeof t[0])throw new Error("radix.decode input should be array of strings");return Uint8Array.from(d(t,e,Math.pow(2,8)))}}}function m(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(f(8,e)>32||f(e,8)>32)throw new Error("radix2: carry overflow");return{encode:function(n){if(!(n instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return p(Array.from(n),8,e,!t)},decode:function(n){if(!Array.isArray(n)||n.length&&"number"!==typeof n[0])throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(p(n,e,8,t))}}}function h(e){if("function"!==typeof e)throw new Error("unsafeWrapper fn should be function");return function(){try{for(var t=arguments.length,n=new Array(t),a=0;a>25,n=(33554431&e)<<5,a=0;a>a&1)&&(n^=k[a]);return n}function x(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=e.length,r=1,i=0;i126)throw new Error("Invalid prefix (".concat(e,")"));r=A(r)^s>>5}r=A(r);for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:90;if("string"!==typeof e)throw new Error("bech32.decode input should be string, not ".concat(typeof e));if(e.length<8||!1!==n&&e.length>n)throw new TypeError("Wrong string length: ".concat(e.length," (").concat(e,"). Expected (8..").concat(n,")"));var a=e.toLowerCase();if(e!==a&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");var o=(e=a).lastIndexOf("1");if(0===o||-1===o)throw new Error('Letter "1" must be present between prefix and data only');var r=e.slice(0,o),i=e.slice(o+1);if(i.length<6)throw new Error("Data must be at least 6 characters long");var s=w.decode(i).slice(0,-6),c=x(r,s,t);if(!i.endsWith(c))throw new Error("Invalid checksum in ".concat(e,': expected "').concat(c,'"'));return{prefix:r,words:s}}return{encode:function(e,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:90;if("string"!==typeof e)throw new Error("bech32.encode prefix should be string, not ".concat(typeof e));if(!Array.isArray(n)||n.length&&"number"!==typeof n[0])throw new Error("bech32.encode words should be array of numbers, not ".concat(typeof n));var o=e.length+7+n.length;if(!1!==a&&o>a)throw new TypeError("Length ".concat(o," exceeds limit ").concat(a));return e=e.toLowerCase(),"".concat(e,"1").concat(w.encode(n)).concat(x(e,n,t))},decode:i,decodeToBytes:function(e){var t=i(e,!1),n=t.prefix,o=t.words;return{prefix:n,words:o,bytes:a(o)}},decodeUnsafe:h(i),fromWords:a,fromWordsUnsafe:r,toWords:o}}t.bech32=I("bech32"),t.bech32m=I("bech32m"),t.utf8={encode:function(e){return(new TextDecoder).decode(e)},decode:function(e){return(new TextEncoder).encode(e)}},t.hex=r(m(4),i("0123456789abcdef"),s(""),u((function(e){if("string"!==typeof e||e.length%2)throw new TypeError("hex.decode: expected string, got ".concat(typeof e," with length ").concat(e.length));return e.toLowerCase()})));var T={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},S="Invalid encoding type. Available types: ".concat(Object.keys(T).join(", "));t.bytesToString=function(e,t){if("string"!==typeof e||!T.hasOwnProperty(e))throw new TypeError(S);if(!(t instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return T[e].encode(t)},t.str=t.bytesToString;t.stringToBytes=function(e,t){if(!T.hasOwnProperty(e))throw new TypeError(S);if("string"!==typeof t)throw new TypeError("stringToBytes() expects string");return T[e].decode(t)},t.bytes=t.stringToBytes},41757:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mnemonicToSeedSync=t.mnemonicToSeed=t.validateMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.generateMnemonic=void 0;var a=n(3477),o=n(6841),r=n(6684),i=n(89034),s=n(71706),c=n(34639),u=function(e){return"\u3042\u3044\u3053\u304f\u3057\u3093"===e[0]};function d(e){if("string"!==typeof e)throw new TypeError("Invalid mnemonic type: ".concat(typeof e));return e.normalize("NFKD")}function l(e){var t=d(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}function f(e){a.default.bytes(e,16,20,24,28,32)}t.generateMnemonic=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:128;if(a.default.number(t),t%32!==0||t>256)throw new TypeError("Invalid entropy");return h((0,s.randomBytes)(t/8),e)};var p=function(e){var t=8-e.length/4;return new Uint8Array([(0,r.sha256)(e)[0]>>t<1&&void 0!==arguments[1]?arguments[1]:"";return(0,o.pbkdf2Async)(i.sha512,l(e).nfkd,g(t),{c:2048,dkLen:64})},t.mnemonicToSeedSync=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,o.pbkdf2)(i.sha512,l(e).nfkd,g(t),{c:2048,dkLen:64})}},3477:function(e,t){"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Wrong positive integer: ".concat(e))}function a(e){if("boolean"!==typeof e)throw new Error("Expected boolean, not ".concat(e))}function o(e){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a0&&!n.includes(e.length))throw new TypeError("Expected Uint8Array of length ".concat(n,", not of length=").concat(e.length))}function r(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function i(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function s(e,t){o(e);var n=t.outputLen;if(e.lengtha-r&&(this.process(n,0),r=0);for(var i=r;i>o&r),s=Number(n&r),c=a?4:0,u=a?0:4;e.setUint32(t+c,i,a),e.setUint32(t+u,s,a)}(n,a-8,BigInt(8*this.length),o),this.process(n,0);var s=(0,u.createView)(e),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen should be aligned to 32bit");var l=d/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(var p=0;p1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&n),l:Number(e>>a&n)}:{h:0|Number(e>>a&n),l:0|Number(e&n)}}function r(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Uint32Array(e.length),a=new Uint32Array(e.length),r=0;r>>0)<>>0)};function i(e,t,n,a){var o=(t>>>0)+(a>>>0);return{h:e+n+(o/Math.pow(2,32)|0)|0,l:0|o}}t.add=i;var s={fromBig:o,split:r,toBig:t.toBig,shrSH:function(e,t,n){return e>>>n},shrSL:function(e,t,n){return e<<32-n|t>>>n},rotrSH:function(e,t,n){return e>>>n|t<<32-n},rotrSL:function(e,t,n){return e<<32-n|t>>>n},rotrBH:function(e,t,n){return e<<64-n|t>>>n-32},rotrBL:function(e,t,n){return e>>>n-32|t<<64-n},rotr32H:function(e,t){return t},rotr32L:function(e,t){return e},rotlSH:function(e,t,n){return e<>>32-n},rotlSL:function(e,t,n){return t<>>32-n},rotlBH:function(e,t,n){return t<>>64-n},rotlBL:function(e,t,n){return e<>>64-n},add:i,add3L:function(e,t,n){return(e>>>0)+(t>>>0)+(n>>>0)},add3H:function(e,t,n,a){return t+n+a+(e/Math.pow(2,32)|0)|0},add4L:function(e,t,n,a){return(e>>>0)+(t>>>0)+(n>>>0)+(a>>>0)},add4H:function(e,t,n,a,o){return t+n+a+o+(e/Math.pow(2,32)|0)|0},add5H:function(e,t,n,a,o,r){return t+n+a+o+r+(e/Math.pow(2,32)|0)|0},add5L:function(e,t,n,a,o){return(e>>>0)+(t>>>0)+(n>>>0)+(a>>>0)+(o>>>0)}};t.default=s},33612:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto={node:void 0,web:"object"===typeof self&&"crypto"in self?self.crypto:void 0}},52839:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(61655).default,i=n(26389).default;Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;var s=n(3477),c=n(71706),u=function(e){r(n,e);var t=i(n);function n(e,o){var r;a(this,n),(r=t.call(this)).finished=!1,r.destroyed=!1,s.default.hash(e);var i=(0,c.toBytes)(o);if(r.iHash=e.create(),"function"!==typeof r.iHash.update)throw new TypeError("Expected instance of class which extends utils.Hash");r.blockLen=r.iHash.blockLen,r.outputLen=r.iHash.outputLen;var u=r.blockLen,d=new Uint8Array(u);d.set(i.length>u?e.create().update(i).digest():i);for(var l=0;l= 1");var l=(0,s.toBytes)(t),f=(0,s.toBytes)(n),p=new Uint8Array(u),b=i.hmac.create(e,l),m=b._cloneInto().update(f);return{c:c,dkLen:u,asyncTick:d,DK:p,PRF:b,PRFSalt:m}}function u(e,t,n,a,o){return e.destroy(),t.destroy(),a&&a.destroy(),o.fill(0),n}function d(){return(d=o(a().mark((function e(t,n,o,r){var i,d,l,f,p,b,m,h,g,y,v,w,k,A;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=c(t,n,o,r),d=i.c,l=i.dkLen,f=i.asyncTick,p=i.DK,b=i.PRF,m=i.PRFSalt,g=new Uint8Array(4),y=(0,s.createView)(g),v=new Uint8Array(b.outputLen),w=a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.subarray(A,A+b.outputLen),y.setInt32(0,k,!1),(h=m._cloneInto(h)).update(g).digestInto(v),t.set(v.subarray(0,t.length)),e.next=6,(0,s.asyncLoop)(d-1,f,(function(e){b._cloneInto(h).update(v).digestInto(v);for(var n=0;n>>3,s=(0,c.rotr)(r,17)^(0,c.rotr)(r,19)^r>>>10;f[a]=s+f[a-7]+i+f[a-16]|0}for(var l,p=this.A,b=this.B,m=this.C,h=this.D,g=this.E,y=this.F,v=this.G,w=this.H,k=0;k<64;k++){var A=w+((0,c.rotr)(g,6)^(0,c.rotr)(g,11)^(0,c.rotr)(g,25))+((l=g)&y^~l&v)+d[k]+f[k]|0,x=((0,c.rotr)(p,2)^(0,c.rotr)(p,13)^(0,c.rotr)(p,22))+u(p,b,m)|0;w=v,v=y,y=g,g=h+A|0,h=m,m=b,b=p,p=A+x|0}p=p+this.A|0,b=b+this.B|0,m=m+this.C|0,h=h+this.D|0,g=g+this.E|0,y=y+this.F|0,v=v+this.G|0,w=w+this.H|0,this.set(p,b,m,h,g,y,v,w)}},{key:"roundClean",value:function(){f.fill(0)}},{key:"destroy",value:function(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}]),n}(s.SHA2),b=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this)).A=-1056596264,e.B=914150663,e.C=812702999,e.D=-150054599,e.E=-4191439,e.F=1750603025,e.G=1694076839,e.H=-1090891868,e.outputLen=28,e}return o(n)}(p);t.sha256=(0,c.wrapConstructor)((function(){return new p})),t.sha224=(0,c.wrapConstructor)((function(){return new b}))},89034:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(61655).default,i=n(26389).default,s=n(27424).default;Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA512=void 0;var c=n(20259),u=n(15929),d=n(71706),l=s(u.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((function(e){return BigInt(e)}))),2),f=l[0],p=l[1],b=new Uint32Array(80),m=new Uint32Array(80),h=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this,128,64,16,!1)).Ah=1779033703,e.Al=-205731576,e.Bh=-1150833019,e.Bl=-2067093701,e.Ch=1013904242,e.Cl=-23791573,e.Dh=-1521486534,e.Dl=1595750129,e.Eh=1359893119,e.El=-1377402159,e.Fh=-1694144372,e.Fl=725511199,e.Gh=528734635,e.Gl=-79577749,e.Hh=1541459225,e.Hl=327033209,e}return o(n,[{key:"get",value:function(){return[this.Ah,this.Al,this.Bh,this.Bl,this.Ch,this.Cl,this.Dh,this.Dl,this.Eh,this.El,this.Fh,this.Fl,this.Gh,this.Gl,this.Hh,this.Hl]}},{key:"set",value:function(e,t,n,a,o,r,i,s,c,u,d,l,f,p,b,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|a,this.Ch=0|o,this.Cl=0|r,this.Dh=0|i,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|d,this.Fl=0|l,this.Gh=0|f,this.Gl=0|p,this.Hh=0|b,this.Hl=0|m}},{key:"process",value:function(e,t){for(var n=0;n<16;n++,t+=4)b[n]=e.getUint32(t),m[n]=e.getUint32(t+=4);for(var a=16;a<80;a++){var o=0|b[a-15],r=0|m[a-15],i=u.default.rotrSH(o,r,1)^u.default.rotrSH(o,r,8)^u.default.shrSH(o,r,7),s=u.default.rotrSL(o,r,1)^u.default.rotrSL(o,r,8)^u.default.shrSL(o,r,7),c=0|b[a-2],d=0|m[a-2],l=u.default.rotrSH(c,d,19)^u.default.rotrBH(c,d,61)^u.default.shrSH(c,d,6),h=u.default.rotrSL(c,d,19)^u.default.rotrBL(c,d,61)^u.default.shrSL(c,d,6),g=u.default.add4L(s,h,m[a-7],m[a-16]),y=u.default.add4H(g,i,l,b[a-7],b[a-16]);b[a]=0|y,m[a]=0|g}for(var v=this.Ah,w=this.Al,k=this.Bh,A=this.Bl,x=this.Ch,I=this.Cl,T=this.Dh,S=this.Dl,C=this.Eh,E=this.El,R=this.Fh,M=this.Fl,P=this.Gh,U=this.Gl,_=this.Hh,B=this.Hl,D=0;D<80;D++){var N=u.default.rotrSH(C,E,14)^u.default.rotrSH(C,E,18)^u.default.rotrBH(C,E,41),O=u.default.rotrSL(C,E,14)^u.default.rotrSL(C,E,18)^u.default.rotrBL(C,E,41),F=C&R^~C&P,L=E&M^~E&U,j=u.default.add5L(B,O,L,p[D],m[D]),H=u.default.add5H(j,_,N,F,f[D],b[D]),G=0|j,z=u.default.rotrSH(v,w,28)^u.default.rotrBH(v,w,34)^u.default.rotrBH(v,w,39),K=u.default.rotrSL(v,w,28)^u.default.rotrBL(v,w,34)^u.default.rotrBL(v,w,39),W=v&k^v&x^k&x,Z=w&A^w&I^A&I;_=0|P,B=0|U,P=0|R,U=0|M,R=0|C,M=0|E;var V=u.default.add(0|T,0|S,0|H,0|G);C=V.h,E=V.l,T=0|x,S=0|I,x=0|k,I=0|A,k=0|v,A=0|w;var q=u.default.add3L(G,K,Z);v=u.default.add3H(q,H,z,W),w=0|q}var Q=u.default.add(0|this.Ah,0|this.Al,0|v,0|w);v=Q.h,w=Q.l;var J=u.default.add(0|this.Bh,0|this.Bl,0|k,0|A);k=J.h,A=J.l;var Y=u.default.add(0|this.Ch,0|this.Cl,0|x,0|I);x=Y.h,I=Y.l;var X=u.default.add(0|this.Dh,0|this.Dl,0|T,0|S);T=X.h,S=X.l;var $=u.default.add(0|this.Eh,0|this.El,0|C,0|E);C=$.h,E=$.l;var ee=u.default.add(0|this.Fh,0|this.Fl,0|R,0|M);R=ee.h,M=ee.l;var te=u.default.add(0|this.Gh,0|this.Gl,0|P,0|U);P=te.h,U=te.l;var ne=u.default.add(0|this.Hh,0|this.Hl,0|_,0|B);_=ne.h,B=ne.l,this.set(v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B)}},{key:"roundClean",value:function(){b.fill(0),m.fill(0)}},{key:"destroy",value:function(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}]),n}(c.SHA2);t.SHA512=h;var g=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this)).Ah=-1942145080,e.Al=424955298,e.Bh=1944164710,e.Bl=-1982016298,e.Ch=502970286,e.Cl=855612546,e.Dh=1738396948,e.Dl=1479516111,e.Eh=258812777,e.El=2077511080,e.Fh=2011393907,e.Fl=79989058,e.Gh=1067287976,e.Gl=1780299464,e.Hh=286451373,e.Hl=-1848208735,e.outputLen=28,e}return o(n)}(h),y=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this)).Ah=573645204,e.Al=-64227540,e.Bh=-1621794909,e.Bl=-934517566,e.Ch=596883563,e.Cl=1867755857,e.Dh=-1774684391,e.Dl=1497426621,e.Eh=-1775747358,e.El=-1467023389,e.Fh=-1101128155,e.Fl=1401305490,e.Gh=721525244,e.Gl=746961066,e.Hh=246885852,e.Hl=-2117784414,e.outputLen=32,e}return o(n)}(h),v=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this)).Ah=-876896931,e.Al=-1056596264,e.Bh=1654270250,e.Bl=914150663,e.Ch=-1856437926,e.Cl=812702999,e.Dh=355462360,e.Dl=-150054599,e.Eh=1731405415,e.El=-4191439,e.Fh=-1900787065,e.Fl=1750603025,e.Gh=-619958771,e.Gl=1694076839,e.Hh=1203062813,e.Hl=-1090891868,e.outputLen=48,e}return o(n)}(h);t.sha512=(0,d.wrapConstructor)((function(){return new h})),t.sha512_224=(0,d.wrapConstructor)((function(){return new g})),t.sha512_256=(0,d.wrapConstructor)((function(){return new y})),t.sha384=(0,d.wrapConstructor)((function(){return new v}))},71706:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(17061).default,i=n(17156).default;Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;var s=n(33612);t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)};t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))};t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)};if(t.rotr=function(e,t){return e<<32-t|e>>>t},t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");var c=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");for(var t="",n=0;n=0&&c0&&void 0!==arguments[0]?arguments[0]:32;if(s.crypto.web)return s.crypto.web.getRandomValues(new Uint8Array(e));if(s.crypto.node)return new Uint8Array(s.crypto.node.randomBytes(e).buffer);throw new Error("The environment doesn't have randomBytes function")}},56687:function(e){"use strict";e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,u=new Uint8Array(r);e[n];){var d=t[e.charCodeAt(n)];if(255===d)return;for(var l=0,f=r-1;(0!==d||l>>0,u[f]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");o=l,n++}for(var p=r-o;p!==r&&0===u[p];)p++;for(var b=new Uint8Array(a+(r-p)),m=a;p!==r;)b[m++]=u[p++];return b}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,a=0,o=0,r=t.length;o!==r&&0===t[o];)o++,n++;for(var c=(r-o)*u+1>>>0,d=new Uint8Array(c);o!==r;){for(var l=t[o],f=0,p=c-1;(0!==l||f>>0,d[p]=l%i>>>0,l=l/i>>>0;if(0!==l)throw new Error("Non-zero carry");a=f,o++}for(var b=c-a;b!==c&&0===d[b];)b++;for(var m=s.repeat(n);bthis.span)throw new RangeError("indeterminate span");return this.span}},{key:"replicate",value:function(e){var t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}},{key:"fromArray",value:function(e){}}]),e}();function m(e,t){return t.property?e+"["+t.property+"]":e}t.Layout=b,t.nameWithProperty=m,t.bindConstructorLayout=function(e,t){if("function"!==typeof e)throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof b))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=function(){return new e},Object.defineProperty(e.prototype,"encode",{value:function(e,n){return t.encode(this,e,n)},writable:!0}),Object.defineProperty(e,"decode",{value:function(e,n){return t.decode(e,n)},writable:!0})};var h=function(e){s(n,e);var t=c(n);function n(){return u(this,n),t.apply(this,arguments)}return d(n,[{key:"isCount",value:function(){throw new Error("ExternalLayout is abstract")}}]),n}(b);t.ExternalLayout=h;var g=function(e){s(n,e);var t=c(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,o=arguments.length>1?arguments[1]:void 0;if(u(this,n),!Number.isInteger(a)||0>=a)throw new TypeError("elementSpan must be a (positive) integer");return(e=t.call(this,-1,o)).elementSpan=a,e}return d(n,[{key:"isCount",value:function(){return!0}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;f(e);var n=e.length-t;return Math.floor(n/this.elementSpan)}},{key:"encode",value:function(e,t,n){return 0}}]),n}(h);t.GreedyCount=g;var y=function(e){s(n,e);var t=c(n);function n(e){var a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;if(u(this,n),!(e instanceof b))throw new TypeError("layout must be a Layout");if(!Number.isInteger(o))throw new TypeError("offset must be integer or undefined");return(a=t.call(this,e.span,r||e.property)).layout=e,a.offset=o,a}return d(n,[{key:"isCount",value:function(){return this.layout instanceof v||this.layout instanceof w}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.layout.decode(e,t+this.offset)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.layout.encode(e,t,n+this.offset)}}]),n}(h);t.OffsetLayout=y;var v=function(e){s(n,e);var t=c(n);function n(e,a){var o;if(u(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return o}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return p(e).readUIntLE(t,this.span)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t).writeUIntLE(e,n,this.span),this.span}}]),n}(b);t.UInt=v;var w=function(e){s(n,e);var t=c(n);function n(e,a){var o;if(u(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return o}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return p(e).readUIntBE(t,this.span)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t).writeUIntBE(e,n,this.span),this.span}}]),n}(b);t.UIntBE=w;var k=function(e){s(n,e);var t=c(n);function n(e,a){var o;if(u(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return o}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return p(e).readIntLE(t,this.span)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t).writeIntLE(e,n,this.span),this.span}}]),n}(b);t.Int=k;var A=function(e){s(n,e);var t=c(n);function n(e,a){var o;if(u(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return o}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return p(e).readIntBE(t,this.span)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t).writeIntBE(e,n,this.span),this.span}}]),n}(b);t.IntBE=A;var x=Math.pow(2,32);function I(e){var t=Math.floor(e/x);return{hi32:t,lo32:e-t*x}}function T(e,t){return e*x+t}var S=function(e){s(n,e);var t=c(n);function n(e){return u(this,n),t.call(this,8,e)}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=p(e),a=n.readUInt32LE(t);return T(n.readUInt32LE(t+4),a)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=I(e),o=p(t);return o.writeUInt32LE(a.lo32,n),o.writeUInt32LE(a.hi32,n+4),8}}]),n}(b);t.NearUInt64=S;var C=function(e){s(n,e);var t=c(n);function n(e){return u(this,n),t.call(this,8,e)}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=p(e);return T(n.readUInt32BE(t),n.readUInt32BE(t+4))}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=I(e),o=p(t);return o.writeUInt32BE(a.hi32,n),o.writeUInt32BE(a.lo32,n+4),8}}]),n}(b);t.NearUInt64BE=C;var E=function(e){s(n,e);var t=c(n);function n(e){return u(this,n),t.call(this,8,e)}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=p(e),a=n.readUInt32LE(t);return T(n.readInt32LE(t+4),a)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=I(e),o=p(t);return o.writeUInt32LE(a.lo32,n),o.writeInt32LE(a.hi32,n+4),8}}]),n}(b);t.NearInt64=E;var R=function(e){s(n,e);var t=c(n);function n(e){return u(this,n),t.call(this,8,e)}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=p(e);return T(n.readInt32BE(t),n.readUInt32BE(t+4))}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=I(e),o=p(t);return o.writeInt32BE(a.hi32,n),o.writeUInt32BE(a.lo32,n+4),8}}]),n}(b);t.NearInt64BE=R;var M=function(e){s(n,e);var t=c(n);function n(e){return u(this,n),t.call(this,4,e)}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return p(e).readFloatLE(t)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t).writeFloatLE(e,n),4}}]),n}(b);t.Float=M;var P=function(e){s(n,e);var t=c(n);function n(e){return u(this,n),t.call(this,4,e)}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return p(e).readFloatBE(t)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t).writeFloatBE(e,n),4}}]),n}(b);t.FloatBE=P;var U=function(e){s(n,e);var t=c(n);function n(e){return u(this,n),t.call(this,8,e)}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return p(e).readDoubleLE(t)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t).writeDoubleLE(e,n),8}}]),n}(b);t.Double=U;var _=function(e){s(n,e);var t=c(n);function n(e){return u(this,n),t.call(this,8,e)}return d(n,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return p(e).readDoubleBE(t)}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t).writeDoubleBE(e,n),8}}]),n}(b);t.DoubleBE=_;var B=function(e){s(n,e);var t=c(n);function n(e,a,o){var r;if(u(this,n),!(e instanceof b))throw new TypeError("elementLayout must be a Layout");if(!(a instanceof h&&a.isCount()||Number.isInteger(a)&&0<=a))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");var i=-1;return!(a instanceof h)&&01&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;var n=0,a=this.count;if(a instanceof h&&(a=a.decode(e,t)),01&&void 0!==arguments[1]?arguments[1]:0,n=[],a=0,o=this.count;for(o instanceof h&&(o=o.decode(e,t));a2&&void 0!==arguments[2]?arguments[2]:0,a=this.elementLayout,o=e.reduce((function(e,o){return e+a.encode(o,t,n+e)}),0);return this.count instanceof h&&this.count.encode(e.length,t,n),o}}]),n}(b);t.Sequence=B;var D=function(e){s(n,e);var t=c(n);function n(e,a,o){var r;if(u(this,n),!Array.isArray(e)||!e.reduce((function(e,t){return e&&t instanceof b}),!0))throw new TypeError("fields must be array of Layout instances");"boolean"===typeof a&&void 0===o&&(o=a,a=void 0);var s,c=i(e);try{for(c.s();!(s=c.n()).done;){var d=s.value;if(0>d.span&&void 0===d.property)throw new Error("fields cannot contain unnamed variable-length layout")}}catch(f){c.e(f)}finally{c.f()}var l=-1;try{l=e.reduce((function(e,t){return e+t.getSpan()}),0)}catch(p){}return(r=t.call(this,l,a)).fields=e,r.decodePrefixes=!!o,r}return d(n,[{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;var n=0;try{n=this.fields.reduce((function(n,a){var o=a.getSpan(e,t);return t+=o,n+o}),0)}catch(a){throw new RangeError("indeterminate span")}return n}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;f(e);var n,a=this.makeDestinationObject(),o=i(this.fields);try{for(o.s();!(n=o.n()).done;){var r=n.value;if(void 0!==r.property&&(a[r.property]=r.decode(e,t)),t+=r.getSpan(e,t),this.decodePrefixes&&e.length===t)break}}catch(s){o.e(s)}finally{o.f()}return a}},{key:"encode",value:function(e,t){var n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=a,r=0,s=0,c=i(this.fields);try{for(c.s();!(n=c.n()).done;){var u=n.value,d=u.span;if(s=0d&&(d=u.getSpan(t,a)))}r=a,a+=d}}catch(f){c.e(f)}finally{c.f()}return r+s-o}},{key:"fromArray",value:function(e){var t,n=this.makeDestinationObject(),a=i(this.fields);try{for(a.s();!(t=a.n()).done;){var o=t.value;void 0!==o.property&&0o.span?n=-1:0<=n&&(n+=o.span)}}catch(r){a.e(r)}finally{a.f()}}}]),n}(b);t.Structure=D;var N=function(){function e(t){u(this,e),this.property=t}return d(e,[{key:"decode",value:function(e,t){throw new Error("UnionDiscriminator is abstract")}},{key:"encode",value:function(e,t,n){throw new Error("UnionDiscriminator is abstract")}}]),e}();t.UnionDiscriminator=N;var O=function(e){s(n,e);var t=c(n);function n(e,a){var o;if(u(this,n),!(e instanceof h&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");return(o=t.call(this,a||e.property||"variant")).layout=e,o}return d(n,[{key:"decode",value:function(e,t){return this.layout.decode(e,t)}},{key:"encode",value:function(e,t,n){return this.layout.encode(e,t,n)}}]),n}(N);t.UnionLayoutDiscriminator=O;var F=function(e){s(n,e);var t=c(n);function n(e,a,o){var i,s;if(u(this,n),e instanceof v||e instanceof w)s=new O(new y(e));else if(e instanceof h&&e.isCount())s=new O(e);else{if(!(e instanceof N))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");s=e}if(void 0===a&&(a=null),!(null===a||a instanceof b))throw new TypeError("defaultLayout must be null or a Layout");if(null!==a){if(0>a.span)throw new Error("defaultLayout must have constant span");void 0===a.property&&(a=a.replicate("content"))}var c=-1;a&&0<=(c=a.span)&&(e instanceof v||e instanceof w)&&(c+=s.layout.span),(i=t.call(this,c,o)).discriminator=s,i.usesPrefixDiscriminator=e instanceof v||e instanceof w,i.defaultLayout=a,i.registry={};var d=i.defaultGetSourceVariant.bind(r(i));return i.getSourceVariant=function(e){return d(e)},i.configGetSourceVariant=function(e){d=e.bind(this)},i}return d(n,[{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;var n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}},{key:"defaultGetSourceVariant",value:function(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;var t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(var n in this.registry){var a=this.registry[n];if(a.property&&Object.prototype.hasOwnProperty.call(e,a.property))return a}throw new Error("unable to infer src variant")}},{key:"decode",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=this.discriminator,o=a.decode(e,n),r=this.registry[o];if(void 0===r){var i=this.defaultLayout,s=0;this.usesPrefixDiscriminator&&(s=a.layout.span),(t=this.makeDestinationObject())[a.property]=o,t[i.property]=i.decode(e,n+s)}else t=r.decode(e,n);return t}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=this.getSourceVariant(e);if(void 0===a){var o=this.discriminator,r=this.defaultLayout,i=0;return this.usesPrefixDiscriminator&&(i=o.layout.span),o.encode(e[o.property],t,n),i+r.encode(e[r.property],t,n+i)}return a.encode(e,t,n)}},{key:"addVariant",value:function(e,t,n){var a=new L(this,e,t,n);return this.registry[e]=a,a}},{key:"getVariant",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=e instanceof Uint8Array?this.discriminator.decode(e,n):e,this.registry[t]}}]),n}(b);t.Union=F;var L=function(e){s(n,e);var t=c(n);function n(e,a,o,r){var i;if(u(this,n),!(e instanceof F))throw new TypeError("union must be a Union");if(!Number.isInteger(a)||0>a)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof o&&void 0===r&&(r=o,o=null),o){if(!(o instanceof b))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=o.span&&o.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof r)throw new TypeError("variant must have a String property")}var s=e.span;return 0>e.span&&0<=(s=o?o.span:0)&&e.usesPrefixDiscriminator&&(s+=e.discriminator.layout.span),(i=t.call(this,s,r)).union=e,i.variant=a,i.layout=o||null,i}return d(n,[{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;var n=0;this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span);var a=0;return this.layout&&(a=this.layout.getSpan(e,t+n)),n+a}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");var a=0;return this.union.usesPrefixDiscriminator&&(a=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+a):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=0;if(this.union.usesPrefixDiscriminator&&(a=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);var o=a;if(this.layout&&(this.layout.encode(e[this.property],t,n+a),o+=this.layout.getSpan(t,n+a),0<=this.union.span&&o>this.union.span))throw new Error("encoded variant overruns containing union");return o}},{key:"fromArray",value:function(e){if(this.layout)return this.layout.fromArray(e)}}]),n}(b);function j(e){return 0>e&&(e+=4294967296),e}t.VariantLayout=L;var H=function(e){s(n,e);var t=c(n);function n(e,a,o){var r;if(u(this,n),!(e instanceof v||e instanceof w))throw new TypeError("word must be a UInt or UIntBE layout");if("string"===typeof a&&void 0===o&&(o=a,a=!1),41&&void 0!==arguments[1]?arguments[1]:0,n=this.makeDestinationObject(),a=this.word.decode(e,t);this._packedSetValue(a);var o,r=i(this.fields);try{for(r.s();!(o=r.n()).done;){var s=o.value;void 0!==s.property&&(n[s.property]=s.decode(e))}}catch(c){r.e(c)}finally{r.f()}return n}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=this.word.decode(t,n);this._packedSetValue(a);var o,r=i(this.fields);try{for(r.s();!(o=r.n()).done;){var s=o.value;if(void 0!==s.property){var c=e[s.property];void 0!==c&&s.encode(c)}}}catch(u){r.e(u)}finally{r.f()}return this.word.encode(this._packedGetValue(),t,n)}},{key:"addField",value:function(e,t){var n=new G(this,e,t);return this.fields.push(n),n}},{key:"addBoolean",value:function(e){var t=new z(this,e);return this.fields.push(t),t}},{key:"fieldFor",value:function(e){if("string"!==typeof e)throw new TypeError("property must be string");var t,n=i(this.fields);try{for(n.s();!(t=n.n()).done;){var a=t.value;if(a.property===e)return a}}catch(o){n.e(o)}finally{n.f()}}}]),n}(b);t.BitStructure=H;var G=function(){function e(t,n,a){if(u(this,e),!(t instanceof H))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(n)||0>=n)throw new TypeError("bits must be positive integer");var o=8*t.span,r=t.fields.reduce((function(e,t){return e+t.bits}),0);if(n+r>o)throw new Error("bits too long for span remainder ("+(o-r)+" of "+o+" remain)");this.container=t,this.bits=n,this.valueMask=(1<>>this.start}},{key:"encode",value:function(e){if("number"!==typeof e||!Number.isInteger(e)||e!==j(e&this.valueMask))throw new TypeError(m("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);var t=this.container._packedGetValue(),n=j(e<n&&(n=this.length.decode(e,t)),n}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.span;return 0>n&&(n=this.length.decode(e,t)),p(e).slice(t,t+n)}},{key:"encode",value:function(e,t,n){var a=this.length;if(this.length instanceof h&&(a=e.length),!(e instanceof Uint8Array&&a===e.length))throw new TypeError(m("Blob.encode",this)+" requires (length "+a+") Uint8Array as src");if(n+a>t.length)throw new RangeError("encoding overruns Uint8Array");var o=p(e);return p(t).write(o.toString("hex"),n,a,"hex"),this.length instanceof h&&this.length.encode(a,t,n),a}}]),n}(b);t.Blob=K;var W=function(e){s(n,e);var t=c(n);function n(e){return u(this,n),t.call(this,-1,e)}return d(n,[{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;f(e);for(var n=t;n1&&void 0!==arguments[1]?arguments[1]:0,n=this.getSpan(e,t);return p(e).slice(t,t+n-1).toString("utf-8")}},{key:"encode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;"string"!==typeof e&&(e=String(e));var a=l.Buffer.from(e,"utf8"),o=a.length;if(n+o>t.length)throw new RangeError("encoding overruns Buffer");var r=p(t);return a.copy(r,n),r[n+o]=0,o+1}}]),n}(b);t.CString=W;var Z=function(e){s(n,e);var t=c(n);function n(e,a){var o;if(u(this,n),"string"===typeof e&&void 0===a&&(a=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");return(o=t.call(this,-1,a)).maxSpan=e,o}return d(n,[{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return f(e),e.length-t}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan2&&void 0!==arguments[2]?arguments[2]:0;"string"!==typeof e&&(e=String(e));var a=l.Buffer.from(e,"utf8"),o=a.length;if(0<=this.maxSpan&&this.maxSpant.length)throw new RangeError("encoding overruns Buffer");return a.copy(p(t),n),o}}]),n}(b);t.UTF8=Z;var V=function(e){s(n,e);var t=c(n);function n(e,a){var o;return u(this,n),(o=t.call(this,0,a)).value=e,o}return d(n,[{key:"decode",value:function(e,t){return this.value}},{key:"encode",value:function(e,t,n){return 0}}]),n}(b);t.Constant=V,t.greedy=function(e,t){return new g(e,t)},t.offset=function(e,t,n){return new y(e,t,n)},t.u8=function(e){return new v(1,e)},t.u16=function(e){return new v(2,e)},t.u24=function(e){return new v(3,e)},t.u32=function(e){return new v(4,e)},t.u40=function(e){return new v(5,e)},t.u48=function(e){return new v(6,e)},t.nu64=function(e){return new S(e)},t.u16be=function(e){return new w(2,e)},t.u24be=function(e){return new w(3,e)},t.u32be=function(e){return new w(4,e)},t.u40be=function(e){return new w(5,e)},t.u48be=function(e){return new w(6,e)},t.nu64be=function(e){return new C(e)},t.s8=function(e){return new k(1,e)},t.s16=function(e){return new k(2,e)},t.s24=function(e){return new k(3,e)},t.s32=function(e){return new k(4,e)},t.s40=function(e){return new k(5,e)},t.s48=function(e){return new k(6,e)},t.ns64=function(e){return new E(e)},t.s16be=function(e){return new A(2,e)},t.s24be=function(e){return new A(3,e)},t.s32be=function(e){return new A(4,e)},t.s40be=function(e){return new A(5,e)},t.s48be=function(e){return new A(6,e)},t.ns64be=function(e){return new R(e)},t.f32=function(e){return new M(e)},t.f32be=function(e){return new P(e)},t.f64=function(e){return new U(e)},t.f64be=function(e){return new _(e)},t.struct=function(e,t,n){return new D(e,t,n)},t.bits=function(e,t,n){return new H(e,t,n)},t.seq=function(e,t,n){return new B(e,t,n)},t.union=function(e,t,n){return new F(e,t,n)},t.unionLayoutDiscriminator=function(e,t){return new O(e,t)},t.blob=function(e,t){return new K(e,t)},t.cstr=function(e){return new W(e)},t.utf8=function(e,t){return new Z(e,t)},t.constant=function(e,t){return new V(e,t)}},10739:function(e,t){var n=function(e){function t(){this.fetch=!1,this.DOMException=e.DOMException}return t.prototype=e,new t}("undefined"!==typeof self?self:this);!function(e){!function(t){var n={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(n.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function r(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function i(e){return"string"!==typeof e&&(e=String(e)),e}function s(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function d(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function l(e){var t=new FileReader,n=d(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:n.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:n.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():n.arrayBuffer&&n.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(l)}),this.text=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=d(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),a=0;a-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),a=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(o))}})),t}function g(e){var t=new c;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),a=n.shift().trim();if(a){var o=n.join(":").trim();t.append(a,o)}})),t}function y(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},p.call(m.prototype),p.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];y.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(k){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function w(e,a){return new Promise((function(o,r){var i=new m(e,a);if(i.signal&&i.signal.aborted)return r(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:g(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;o(new y(t,e))},s.onerror=function(){r(new TypeError("Network request failed"))},s.ontimeout=function(){r(new TypeError("Network request failed"))},s.onabort=function(){r(new t.DOMException("Aborted","AbortError"))},s.open(i.method,i.url,!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&n.blob&&(s.responseType="blob"),i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",c)}),s.send("undefined"===typeof i._bodyInit?null:i._bodyInit)}))}w.polyfill=!0,e.fetch||(e.fetch=w,e.Headers=c,e.Request=m,e.Response=y),t.Headers=c,t.Request=m,t.Response=y,t.fetch=w}({})}(n),delete n.fetch.polyfill,(t=n.fetch).default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t},8594:function(e,t,n){"use strict";n.r(t),n.d(t,{Account:function(){return Ha},AddressLookupTableAccount:function(){return Xo},AddressLookupTableInstruction:function(){return zi},AddressLookupTableProgram:function(){return Ki},Authorized:function(){return ts},BLOCKHASH_CACHE_TIMEOUT_MS:function(){return or},BPF_LOADER_DEPRECATED_PROGRAM_ID:function(){return Ga},BPF_LOADER_PROGRAM_ID:function(){return Lo},BpfLoader:function(){return jo},COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:function(){return Zi},ComputeBudgetInstruction:function(){return Wi},ComputeBudgetProgram:function(){return Vi},Connection:function(){return ji},Ed25519Program:function(){return Qi},Enum:function(){return Da},EpochSchedule:function(){return Zo},FeeCalculatorLayout:function(){return Ro},Keypair:function(){return Hi},LAMPORTS_PER_SOL:function(){return Ts},LOOKUP_TABLE_INSTRUCTION_LAYOUTS:function(){return Gi},Loader:function(){return Fo},Lockup:function(){return ns},MAX_SEED_LENGTH:function(){return Oa},Message:function(){return ro},MessageAccountKeys:function(){return Qa},MessageV0:function(){return io},NONCE_ACCOUNT_LENGTH:function(){return Po},NonceAccount:function(){return Uo},PACKET_DATA_SIZE:function(){return za},PUBLIC_KEY_LENGTH:function(){return Fa},PublicKey:function(){return ja},SIGNATURE_LENGTH_IN_BYTES:function(){return Wa},SOLANA_SCHEMA:function(){return Na},STAKE_CONFIG_ID:function(){return es},STAKE_INSTRUCTION_LAYOUTS:function(){return os},SYSTEM_INSTRUCTION_LAYOUTS:function(){return Do},SYSVAR_CLOCK_PUBKEY:function(){return bo},SYSVAR_EPOCH_SCHEDULE_PUBKEY:function(){return mo},SYSVAR_INSTRUCTIONS_PUBKEY:function(){return ho},SYSVAR_RECENT_BLOCKHASHES_PUBKEY:function(){return go},SYSVAR_RENT_PUBKEY:function(){return yo},SYSVAR_REWARDS_PUBKEY:function(){return vo},SYSVAR_SLOT_HASHES_PUBKEY:function(){return wo},SYSVAR_SLOT_HISTORY_PUBKEY:function(){return ko},SYSVAR_STAKE_HISTORY_PUBKEY:function(){return Ao},Secp256k1Program:function(){return $i},SendTransactionError:function(){return Vo},SolanaJSONRPCError:function(){return Qo},SolanaJSONRPCErrorCode:function(){return qo},StakeAuthorizationLayout:function(){return rs},StakeInstruction:function(){return as},StakeProgram:function(){return is},Struct:function(){return Ba},SystemInstruction:function(){return Bo},SystemProgram:function(){return No},Transaction:function(){return lo},TransactionExpiredBlockheightExceededError:function(){return Za},TransactionExpiredNonceInvalidError:function(){return qa},TransactionExpiredTimeoutError:function(){return Va},TransactionInstruction:function(){return uo},TransactionMessage:function(){return fo},TransactionStatus:function(){return ao},VALIDATOR_INFO_KEY:function(){return fs},VERSION_PREFIX_MASK:function(){return Ka},VOTE_PROGRAM_ID:function(){return ms},ValidatorInfo:function(){return bs},VersionedMessage:function(){return so},VersionedTransaction:function(){return po},VoteAccount:function(){return gs},VoteAuthorizationLayout:function(){return ds},VoteInit:function(){return ss},VoteInstruction:function(){return cs},VoteProgram:function(){return ls},clusterApiUrl:function(){return As},sendAndConfirmRawTransaction:function(){return xs},sendAndConfirmTransaction:function(){return xo}});var a=n(45987),o=n(88301),r=n(61120),i=n(1413),s=n(29439),c=n(93433),u=n(37762),d=n(98737),l=n(74165),f=n(15861),p=n(60136),b=n(29388),m=n(15671),h=n(43144),g=n(72245);function y(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Wrong positive integer: ".concat(e))}function v(e){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a0&&!n.includes(e.length))throw new TypeError("Expected Uint8Array of length ".concat(n,", not of length=").concat(e.length))}var w={number:y,bool:function(e){if("boolean"!==typeof e)throw new Error("Expected boolean, not ".concat(e))},bytes:v,hash:function(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");y(e.outputLen),y(e.blockLen)},exists:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},output:function(e,t){v(e);var n=t.outputLen;if(e.length>>t};if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));function I(e){if("string"===typeof e&&(e=function(e){if("string"!==typeof e)throw new TypeError("utf8ToBytes expected string, got ".concat(typeof e));return(new TextEncoder).encode(e)}(e)),!(e instanceof Uint8Array))throw new TypeError("Expected input type is Uint8Array (got ".concat(typeof e,")"));return e}var T=function(){function e(){(0,m.Z)(this,e)}return(0,h.Z)(e,[{key:"clone",value:function(){return this._cloneInto()}}]),e}();function S(e){var t=function(t){return e().update(I(t)).digest()},n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=function(){return e()},t}var C=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(e,a,o,r){var i;return(0,m.Z)(this,n),(i=t.call(this)).blockLen=e,i.outputLen=a,i.padOffset=o,i.isLE=r,i.finished=!1,i.length=0,i.pos=0,i.destroyed=!1,i.buffer=new Uint8Array(e),i.view=A(i.buffer),i}return(0,h.Z)(n,[{key:"update",value:function(e){k.exists(this);for(var t=this.view,n=this.buffer,a=this.blockLen,o=(e=I(e)).length,r=0;ra-r&&(this.process(n,0),r=0);for(var i=r;i>o&r),s=Number(n&r),c=a?4:0,u=a?0:4;e.setUint32(t+c,i,a),e.setUint32(t+u,s,a)}(n,a-8,BigInt(8*this.length),o),this.process(n,0);var s=A(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");var u=c/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(var l=0;l1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&E),l:Number(e>>R&E)}:{h:0|Number(e>>R&E),l:0|Number(e&E)}}var P={fromBig:M,split:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Uint32Array(e.length),a=new Uint32Array(e.length),o=0;o>>0)<>>0)},shrSH:function(e,t,n){return e>>>n},shrSL:function(e,t,n){return e<<32-n|t>>>n},rotrSH:function(e,t,n){return e>>>n|t<<32-n},rotrSL:function(e,t,n){return e<<32-n|t>>>n},rotrBH:function(e,t,n){return e<<64-n|t>>>n-32},rotrBL:function(e,t,n){return e>>>n-32|t<<64-n},rotr32H:function(e,t){return t},rotr32L:function(e,t){return e},rotlSH:function(e,t,n){return e<>>32-n},rotlSL:function(e,t,n){return t<>>32-n},rotlBH:function(e,t,n){return t<>>64-n},rotlBL:function(e,t,n){return e<>>64-n},add:function(e,t,n,a){var o=(t>>>0)+(a>>>0);return{h:e+n+(o/Math.pow(2,32)|0)|0,l:0|o}},add3L:function(e,t,n){return(e>>>0)+(t>>>0)+(n>>>0)},add3H:function(e,t,n,a){return t+n+a+(e/Math.pow(2,32)|0)|0},add4L:function(e,t,n,a){return(e>>>0)+(t>>>0)+(n>>>0)+(a>>>0)},add4H:function(e,t,n,a,o){return t+n+a+o+(e/Math.pow(2,32)|0)|0},add5H:function(e,t,n,a,o,r){return t+n+a+o+r+(e/Math.pow(2,32)|0)|0},add5L:function(e,t,n,a,o){return(e>>>0)+(t>>>0)+(n>>>0)+(a>>>0)+(o>>>0)}},U=P,_=U.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((function(e){return BigInt(e)}))),B=(0,s.Z)(_,2),D=B[0],N=B[1],O=new Uint32Array(80),F=new Uint32Array(80),L=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(){var e;return(0,m.Z)(this,n),(e=t.call(this,128,64,16,!1)).Ah=1779033703,e.Al=-205731576,e.Bh=-1150833019,e.Bl=-2067093701,e.Ch=1013904242,e.Cl=-23791573,e.Dh=-1521486534,e.Dl=1595750129,e.Eh=1359893119,e.El=-1377402159,e.Fh=-1694144372,e.Fl=725511199,e.Gh=528734635,e.Gl=-79577749,e.Hh=1541459225,e.Hl=327033209,e}return(0,h.Z)(n,[{key:"get",value:function(){return[this.Ah,this.Al,this.Bh,this.Bl,this.Ch,this.Cl,this.Dh,this.Dl,this.Eh,this.El,this.Fh,this.Fl,this.Gh,this.Gl,this.Hh,this.Hl]}},{key:"set",value:function(e,t,n,a,o,r,i,s,c,u,d,l,f,p,b,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|a,this.Ch=0|o,this.Cl=0|r,this.Dh=0|i,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|d,this.Fl=0|l,this.Gh=0|f,this.Gl=0|p,this.Hh=0|b,this.Hl=0|m}},{key:"process",value:function(e,t){for(var n=0;n<16;n++,t+=4)O[n]=e.getUint32(t),F[n]=e.getUint32(t+=4);for(var a=16;a<80;a++){var o=0|O[a-15],r=0|F[a-15],i=U.rotrSH(o,r,1)^U.rotrSH(o,r,8)^U.shrSH(o,r,7),s=U.rotrSL(o,r,1)^U.rotrSL(o,r,8)^U.shrSL(o,r,7),c=0|O[a-2],u=0|F[a-2],d=U.rotrSH(c,u,19)^U.rotrBH(c,u,61)^U.shrSH(c,u,6),l=U.rotrSL(c,u,19)^U.rotrBL(c,u,61)^U.shrSL(c,u,6),f=U.add4L(s,l,F[a-7],F[a-16]),p=U.add4H(f,i,d,O[a-7],O[a-16]);O[a]=0|p,F[a]=0|f}for(var b=this.Ah,m=this.Al,h=this.Bh,g=this.Bl,y=this.Ch,v=this.Cl,w=this.Dh,k=this.Dl,A=this.Eh,x=this.El,I=this.Fh,T=this.Fl,S=this.Gh,C=this.Gl,E=this.Hh,R=this.Hl,M=0;M<80;M++){var P=U.rotrSH(A,x,14)^U.rotrSH(A,x,18)^U.rotrBH(A,x,41),_=U.rotrSL(A,x,14)^U.rotrSL(A,x,18)^U.rotrBL(A,x,41),B=A&I^~A&S,L=x&T^~x&C,j=U.add5L(R,_,L,N[M],F[M]),H=U.add5H(j,E,P,B,D[M],O[M]),G=0|j,z=U.rotrSH(b,m,28)^U.rotrBH(b,m,34)^U.rotrBH(b,m,39),K=U.rotrSL(b,m,28)^U.rotrBL(b,m,34)^U.rotrBL(b,m,39),W=b&h^b&y^h&y,Z=m&g^m&v^g&v;E=0|S,R=0|C,S=0|I,C=0|T,I=0|A,T=0|x;var V=U.add(0|w,0|k,0|H,0|G);A=V.h,x=V.l,w=0|y,k=0|v,y=0|h,v=0|g,h=0|b,g=0|m;var q=U.add3L(G,K,Z);b=U.add3H(q,H,z,W),m=0|q}var Q=U.add(0|this.Ah,0|this.Al,0|b,0|m);b=Q.h,m=Q.l;var J=U.add(0|this.Bh,0|this.Bl,0|h,0|g);h=J.h,g=J.l;var Y=U.add(0|this.Ch,0|this.Cl,0|y,0|v);y=Y.h,v=Y.l;var X=U.add(0|this.Dh,0|this.Dl,0|w,0|k);w=X.h,k=X.l;var $=U.add(0|this.Eh,0|this.El,0|A,0|x);A=$.h,x=$.l;var ee=U.add(0|this.Fh,0|this.Fl,0|I,0|T);I=ee.h,T=ee.l;var te=U.add(0|this.Gh,0|this.Gl,0|S,0|C);S=te.h,C=te.l;var ne=U.add(0|this.Hh,0|this.Hl,0|E,0|R);E=ne.h,R=ne.l,this.set(b,m,h,g,y,v,w,k,A,x,I,T,S,C,E,R)}},{key:"roundClean",value:function(){O.fill(0),F.fill(0)}},{key:"destroy",value:function(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}]),n}(C),j=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(){var e;return(0,m.Z)(this,n),(e=t.call(this)).Ah=-1942145080,e.Al=424955298,e.Bh=1944164710,e.Bl=-1982016298,e.Ch=502970286,e.Cl=855612546,e.Dh=1738396948,e.Dl=1479516111,e.Eh=258812777,e.El=2077511080,e.Fh=2011393907,e.Fl=79989058,e.Gh=1067287976,e.Gl=1780299464,e.Hh=286451373,e.Hl=-1848208735,e.outputLen=28,e}return(0,h.Z)(n)}(L),H=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(){var e;return(0,m.Z)(this,n),(e=t.call(this)).Ah=573645204,e.Al=-64227540,e.Bh=-1621794909,e.Bl=-934517566,e.Ch=596883563,e.Cl=1867755857,e.Dh=-1774684391,e.Dl=1497426621,e.Eh=-1775747358,e.El=-1467023389,e.Fh=-1101128155,e.Fl=1401305490,e.Gh=721525244,e.Gl=746961066,e.Hh=246885852,e.Hl=-2117784414,e.outputLen=32,e}return(0,h.Z)(n)}(L),G=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(){var e;return(0,m.Z)(this,n),(e=t.call(this)).Ah=-876896931,e.Al=-1056596264,e.Bh=1654270250,e.Bl=914150663,e.Ch=-1856437926,e.Cl=812702999,e.Dh=355462360,e.Dl=-150054599,e.Eh=1731405415,e.El=-4191439,e.Fh=-1900787065,e.Fl=1750603025,e.Gh=-619958771,e.Gl=1694076839,e.Hh=1203062813,e.Hl=-1090891868,e.outputLen=48,e}return(0,h.Z)(n)}(L),z=S((function(){return new L})),K=(S((function(){return new j})),S((function(){return new H})),S((function(){return new G})),n(7420)),W=n.t(K,2),Z=BigInt(0),V=BigInt(1),q=BigInt(2),Q=BigInt(8),J=BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),Y=Object.freeze({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),l:J,n:J,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")}),X=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),$=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),ee=(BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742"),BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235")),te=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),ne=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),ae=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),oe=function(){function e(t,n,a,o){(0,m.Z)(this,e),this.x=t,this.y=n,this.z=a,this.t=o}return(0,h.Z)(e,[{key:"equals",value:function(e){ie(e);var t=this.x,n=this.y,a=this.z,o=e.x,r=e.y,i=e.z,s=Ie(t*i),c=Ie(o*a),u=Ie(n*i),d=Ie(r*a);return s===c&&u===d}},{key:"negate",value:function(){return new e(Ie(-this.x),this.y,this.z,Ie(-this.t))}},{key:"double",value:function(){var t=this.x,n=this.y,a=this.z,o=Y.a,r=Ie(t*t),i=Ie(n*n),s=Ie(q*Ie(a*a)),c=Ie(o*r),u=t+n,d=Ie(Ie(u*u)-r-i),l=c+i,f=l-s,p=c-i,b=Ie(d*f),m=Ie(l*p),h=Ie(d*p);return new e(b,m,Ie(f*l),h)}},{key:"add",value:function(t){ie(t);var n=this.x,a=this.y,o=this.z,r=this.t,i=t.x,s=t.y,c=t.z,u=t.t,d=Ie((a-n)*(s+i)),l=Ie((a+n)*(s-i)),f=Ie(l-d);if(f===Z)return this.double();var p=Ie(o*q*u),b=Ie(r*q*c),m=b+p,h=l+d,g=b-p,y=Ie(m*f),v=Ie(h*g),w=Ie(m*g);return new e(y,v,Ie(f*h),w)}},{key:"subtract",value:function(e){return this.add(e.negate())}},{key:"precomputeWindow",value:function(e){for(var t=1+256/e,n=[],a=this,o=a,r=0;r>=l,b>c&&(b-=d,t+=V);var m=p,h=p+Math.abs(b)-1,g=f%2!==0,y=b<0;0===b?i=i.add(re(g,o[m])):r=r.add(re(y,o[h]))}return e.normalizeZ([r,i])[0]}},{key:"multiply",value:function(e,t){return this.wNAF(Ue(e,Y.l),t)}},{key:"multiplyUnsafe",value:function(t){var n=Ue(t,Y.l,!1),a=e.BASE,o=e.ZERO;if(n===Z)return o;if(this.equals(o)||n===V)return this;if(this.equals(a))return this.wNAF(n);for(var r=o,i=this;n>Z;)n&V&&(r=r.add(i)),i=i.double(),n>>=V;return r}},{key:"isSmallOrder",value:function(){return this.multiplyUnsafe(Y.h).equals(e.ZERO)}},{key:"isTorsionFree",value:function(){var t=this.multiplyUnsafe(Y.l/q).double();return Y.l%q&&(t=t.add(this)),t.equals(e.ZERO)}},{key:"toAffine",value:function(t){var n=this.x,a=this.y,o=this.z,r=this.equals(e.ZERO);null==t&&(t=r?Q:Te(o));var i=Ie(n*t),s=Ie(a*t),c=Ie(o*t);if(r)return le.ZERO;if(c!==V)throw new Error("invZ was invalid");return new le(i,s)}},{key:"fromRistrettoBytes",value:function(){ce()}},{key:"toRistrettoBytes",value:function(){ce()}},{key:"fromRistrettoHash",value:function(){ce()}}],[{key:"fromAffine",value:function(t){if(!(t instanceof le))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return t.equals(le.ZERO)?e.ZERO:new e(t.x,t.y,V,Ie(t.x*t.y))}},{key:"toAffineBatch",value:function(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Y.P,n=new Array(e.length),a=Te(e.reduce((function(e,a,o){return a===Z?e:(n[o]=e,Ie(e*a,t))}),V),t);return e.reduceRight((function(e,a,o){return a===Z?e:(n[o]=Ie(e*n[o],t),Ie(e*a,t))}),a),n}(e.map((function(e){return e.z})));return e.map((function(e,n){return e.toAffine(t[n])}))}},{key:"normalizeZ",value:function(e){return this.toAffineBatch(e).map(this.fromAffine)}}]),e}();function re(e,t){var n=t.negate();return e?n:t}function ie(e){if(!(e instanceof oe))throw new TypeError("ExtendedPoint expected")}function se(e){if(!(e instanceof ue))throw new TypeError("RistrettoPoint expected")}function ce(){throw new Error("Legacy method: switch to RistrettoPoint")}oe.BASE=new oe(Y.Gx,Y.Gy,V,Ie(Y.Gx*Y.Gy)),oe.ZERO=new oe(Z,V,V,Z);var ue=function(){function e(t){(0,m.Z)(this,e),this.ep=t}return(0,h.Z)(e,[{key:"toRawBytes",value:function(){var e,t=this.ep,n=t.x,a=t.y,o=t.z,r=t.t,i=Ie(Ie(o+a)*Ie(o-a)),s=Ie(n*a),c=Ie(s*s),u=Re(Ie(i*c)).value,d=Ie(u*i),l=Ie(u*s),f=Ie(d*l*r);if(ve(r*f)){var p=Ie(a*$),b=Ie(n*$);n=p,a=b,e=Ie(d*te)}else e=l;ve(n*f)&&(a=Ie(-a));var m=Ie((o-a)*e);return ve(m)&&(m=Ie(-m)),ye(m)}},{key:"toHex",value:function(){return me(this.toRawBytes())}},{key:"toString",value:function(){return this.toHex()}},{key:"equals",value:function(e){se(e);var t=this.ep,n=e.ep,a=Ie(t.x*n.y)===Ie(t.y*n.x),o=Ie(t.y*n.y)===Ie(t.x*n.x);return a||o}},{key:"add",value:function(t){return se(t),new e(this.ep.add(t.ep))}},{key:"subtract",value:function(t){return se(t),new e(this.ep.subtract(t.ep))}},{key:"multiply",value:function(t){return new e(this.ep.multiply(t))}},{key:"multiplyUnsafe",value:function(t){return new e(this.ep.multiplyUnsafe(t))}}],[{key:"calcElligatorRistrettoMap",value:function(e){var t=Y.d,n=Ie($*e*e),a=Ie((n+V)*ne),o=BigInt(-1),r=Ie((o-t*n)*Ie(n+t)),i=Ee(a,r),s=i.isValid,c=i.value,u=Ie(c*e);ve(u)||(u=Ie(-u)),s||(c=u),s||(o=n);var d=Ie(o*(n-V)*ae-r),l=c*c,f=Ie((c+c)*r),p=Ie(d*ee),b=Ie(V-l),m=Ie(V+l);return new oe(Ie(f*m),Ie(b*p),Ie(p*m),Ie(f*b))}},{key:"hashToCurve",value:function(t){var n=xe((t=Pe(t,64)).slice(0,32)),a=this.calcElligatorRistrettoMap(n),o=xe(t.slice(32,64)),r=this.calcElligatorRistrettoMap(o);return new e(a.add(r))}},{key:"fromHex",value:function(t){t=Pe(t,32);var n=Y.a,a=Y.d,o="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",r=xe(t);if(!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n1&&void 0!==arguments[1])||arguments[1],a=Y.d,o=Y.P,r=(t=Pe(t,32)).slice();r[31]=-129&t[31];var i=we(r);if(n&&i>=o)throw new Error("Expected 0 < hex < P");if(!n&&i>=X)throw new Error("Expected 0 < hex < 2**256");var s=Ie(i*i),c=Ee(Ie(s-V),Ie(a*s+V)),u=c.isValid,d=c.value;if(!u)throw new Error("Point.fromHex: invalid y coordinate");var l=(d&V)===V;return 0!==(128&t[31])!==l&&(d=Ie(-d)),new e(d,i)}},{key:"fromPrivateKey",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Oe(t);case 2:return e.abrupt("return",e.sent.point);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),e}();le.BASE=new le(Y.Gx,Y.Gy),le.ZERO=new le(Z,V);var fe=function(){function e(t,n){(0,m.Z)(this,e),this.r=t,this.s=n,this.assertValidity()}return(0,h.Z)(e,[{key:"assertValidity",value:function(){var e=this.r,t=this.s;if(!(e instanceof le))throw new Error("Expected Point instance");return Ue(t,Y.l,!1),this}},{key:"toRawBytes",value:function(){var e=new Uint8Array(64);return e.set(this.r.toRawBytes()),e.set(ye(this.s),32),e}},{key:"toHex",value:function(){return me(this.toRawBytes())}}],[{key:"fromHex",value:function(t){var n=Pe(t,64);return new e(le.fromHex(n.slice(0,32),!1),we(n.slice(32,64)))}}]),e}();function pe(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:Y.P,n=e%t;return n>=Z?n:t+n}function Te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Y.P;if(e===Z||t<=Z)throw new Error("invert: expected positive integers, got n=".concat(e," mod=").concat(t));for(var n=Ie(e,t),a=t,o=Z,r=V,i=V,s=Z;n!==Z;){var c=a/n,u=a%n,d=o-i*c,l=r-s*c;a=n,n=u,o=i,r=s,i=d,s=l}if(a!==V)throw new Error("invert: does not exist");return Ie(o,t)}function Se(e,t){for(var n=Y.P,a=e;t-- >Z;)a*=a,a%=n;return a}function Ce(e){var t=Y.P,n=BigInt(5),a=BigInt(10),o=BigInt(20),r=BigInt(40),i=BigInt(80),s=e*e%t*e%t,c=Se(s,q)*s%t,u=Se(c,V)*e%t,d=Se(u,n)*u%t,l=Se(d,a)*d%t,f=Se(l,o)*l%t,p=Se(f,r)*f%t,b=Se(p,i)*p%t,m=Se(b,i)*p%t,h=Se(m,a)*d%t;return{pow_p_5_8:Se(h,q)*e%t,b2:s}}function Ee(e,t){var n=Ie(t*t*t),a=Ie(n*n*t),o=Ie(e*n*Ce(e*a).pow_p_5_8),r=Ie(t*o*o),i=o,s=Ie(o*$),c=r===e,u=r===Ie(-e),d=r===Ie(-e*$);return c&&(o=i),(u||d)&&(o=s),ve(o)&&(o=Ie(-o)),{isValid:c||u,value:o}}function Re(e){return Ee(V,e)}function Me(e){return Ie(we(e),Y.l)}function Pe(e,t){var n=e instanceof Uint8Array?Uint8Array.from(e):he(e);if("number"===typeof t&&n.length!==t)throw new Error("Expected ".concat(t," bytes"));return n}function Ue(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t)throw new TypeError("Specify max value");if("number"===typeof e&&Number.isSafeInteger(e)&&(e=BigInt(e)),"bigint"===typeof e&&e1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return Ie(we(e),Y.l-V)+V},randomBytes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(ze.web)return ze.web.getRandomValues(new Uint8Array(e));if(ze.node){var t=ze.node.randomBytes;return new Uint8Array(t(e).buffer)}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:function(){return Ke.randomBytes(32)},sha512:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(){var t,n,a=arguments;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=pe.apply(void 0,a),!ze.web){e.next=8;break}return e.next=4,ze.web.subtle.digest("SHA-512",t.buffer);case 4:return n=e.sent,e.abrupt("return",new Uint8Array(n));case 8:if(!ze.node){e.next=12;break}return e.abrupt("return",Uint8Array.from(ze.node.createHash("sha512").update(t).digest()));case 12:throw new Error("The environment doesn't have sha512 function");case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),precompute:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:le.BASE,n=t.equals(le.BASE)?t:new le(t.x,t.y);return n._setWindowSize(e),n.multiply(q),n},sha512Sync:void 0};Object.defineProperties(Ke,{sha512Sync:{configurable:!1,get:function(){return ke},set:function(e){ke||(ke=e)}}});var We=n(43811),Ze=n.n(We),Ve=n(70285),qe=n.n(Ve),Qe=function(e,t,n){return e&t^e&n^t&n},Je=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ye=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Xe=new Uint32Array(64),$e=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(){var e;return(0,m.Z)(this,n),(e=t.call(this,64,32,8,!1)).A=0|Ye[0],e.B=0|Ye[1],e.C=0|Ye[2],e.D=0|Ye[3],e.E=0|Ye[4],e.F=0|Ye[5],e.G=0|Ye[6],e.H=0|Ye[7],e}return(0,h.Z)(n,[{key:"get",value:function(){return[this.A,this.B,this.C,this.D,this.E,this.F,this.G,this.H]}},{key:"set",value:function(e,t,n,a,o,r,i,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|a,this.E=0|o,this.F=0|r,this.G=0|i,this.H=0|s}},{key:"process",value:function(e,t){for(var n=0;n<16;n++,t+=4)Xe[n]=e.getUint32(t,!1);for(var a=16;a<64;a++){var o=Xe[a-15],r=Xe[a-2],i=x(o,7)^x(o,18)^o>>>3,s=x(r,17)^x(r,19)^r>>>10;Xe[a]=s+Xe[a-7]+i+Xe[a-16]|0}for(var c,u=this.A,d=this.B,l=this.C,f=this.D,p=this.E,b=this.F,m=this.G,h=this.H,g=0;g<64;g++){var y=h+(x(p,6)^x(p,11)^x(p,25))+((c=p)&b^~c&m)+Je[g]+Xe[g]|0,v=(x(u,2)^x(u,13)^x(u,22))+Qe(u,d,l)|0;h=m,m=b,b=p,p=f+y|0,f=l,l=d,d=u,u=y+v|0}u=u+this.A|0,d=d+this.B|0,l=l+this.C|0,f=f+this.D|0,p=p+this.E|0,b=b+this.F|0,m=m+this.G|0,h=h+this.H|0,this.set(u,d,l,f,p,b,m,h)}},{key:"roundClean",value:function(){Xe.fill(0)}},{key:"destroy",value:function(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}]),n}(C),et=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(){var e;return(0,m.Z)(this,n),(e=t.call(this)).A=-1056596264,e.B=914150663,e.C=812702999,e.D=-150054599,e.E=-4191439,e.F=1750603025,e.G=1694076839,e.H=-1090891868,e.outputLen=28,e}return(0,h.Z)(n)}($e),tt=S((function(){return new $e})),nt=(S((function(){return new et})),n(6323)),at=n(21864),ot=n(24537),rt=n(84506),it=n(97326),st=(n(65218),["message"]),ct=(0,l.Z)().mark(bt),ut=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(e,o){var r,i;(0,m.Z)(this,n);var s=e.message,u=(0,a.Z)(e,st),d=e.path,l=0===d.length?s:"At path: "+d.join(".")+" -- "+s;return r=t.call(this,l),Object.assign((0,it.Z)(r),u),r.name=r.constructor.name,r.failures=function(){var t;return null!=(t=i)?t:i=[e].concat((0,c.Z)(o()))},r}return(0,h.Z)(n)}((0,d.Z)(TypeError));function dt(e){return lt(e)&&"function"===typeof e[Symbol.iterator]}function lt(e){return"object"===typeof e&&null!=e}function ft(e){return"string"===typeof e?JSON.stringify(e):""+e}function pt(e,t,n,a){if(!0!==e){!1===e?e={}:"string"===typeof e&&(e={message:e});var o=t.path,r=t.branch,s=n.type,c=e,u=c.refinement,d=c.message,l=void 0===d?"Expected a value of type `"+s+"`"+(u?" with refinement `"+u+"`":"")+", but received: `"+ft(a)+"`":d;return(0,i.Z)((0,i.Z)({value:a,type:s,refinement:u,key:o[o.length-1],path:o,branch:r},e),{},{message:l})}}function bt(e,t,n,a){var o,r,i,s;return(0,l.Z)().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:dt(e)||(e=[e]),o=(0,u.Z)(e),c.prev=2,o.s();case 4:if((r=o.n()).done){c.next=12;break}if(i=r.value,!(s=pt(i,t,n,a))){c.next=10;break}return c.next=10,s;case 10:c.next=4;break;case 12:c.next=17;break;case 14:c.prev=14,c.t0=c.catch(2),o.e(c.t0);case 17:return c.prev=17,o.f(),c.finish(17);case 20:case"end":return c.stop()}}),ct,null,[[2,14,17,20]])}function mt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,l.Z)().mark((function a(){var o,r,i,d,f,p,b,m,h,g,y,v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B;return(0,l.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(o=n.path,r=void 0===o?[]:o,i=n.branch,d=void 0===i?[e]:i,f=n.coerce,p=void 0!==f&&f,b=n.mask,m=void 0!==b&&b,h={path:r,branch:d},p&&(e=t.coercer(e,h),m&&"type"!==t.type&<(t.schema)&<(e)&&!Array.isArray(e)))for(g in e)void 0===t.schema[g]&&delete e[g];y=!0,v=(0,u.Z)(t.validator(e,h)),a.prev=5,v.s();case 7:if((w=v.n()).done){a.next=14;break}return k=w.value,y=!1,a.next=12,[k,void 0];case 12:a.next=7;break;case 14:a.next=19;break;case 16:a.prev=16,a.t0=a.catch(5),v.e(a.t0);case 19:return a.prev=19,v.f(),a.finish(19);case 22:A=(0,u.Z)(t.entries(e,h)),a.prev=23,A.s();case 25:if((x=A.n()).done){a.next=52;break}I=(0,s.Z)(x.value,3),T=I[0],S=I[1],C=I[2],E=mt(S,C,{path:void 0===T?r:[].concat((0,c.Z)(r),[T]),branch:void 0===T?d:[].concat((0,c.Z)(d),[S]),coerce:p,mask:m}),R=(0,u.Z)(E),a.prev=29,R.s();case 31:if((M=R.n()).done){a.next=42;break}if(!(P=M.value)[0]){a.next=39;break}return y=!1,a.next=37,[P[0],void 0];case 37:a.next=40;break;case 39:p&&(S=P[1],void 0===T?e=S:e instanceof Map?e.set(T,S):e instanceof Set?e.add(S):lt(e)&&(e[T]=S));case 40:a.next=31;break;case 42:a.next=47;break;case 44:a.prev=44,a.t1=a.catch(29),R.e(a.t1);case 47:return a.prev=47,R.f(),a.finish(47);case 50:a.next=25;break;case 52:a.next=57;break;case 54:a.prev=54,a.t2=a.catch(23),A.e(a.t2);case 57:return a.prev=57,A.f(),a.finish(57);case 60:if(!y){a.next=79;break}U=(0,u.Z)(t.refiner(e,h)),a.prev=62,U.s();case 64:if((_=U.n()).done){a.next=71;break}return B=_.value,y=!1,a.next=69,[B,void 0];case 69:a.next=64;break;case 71:a.next=76;break;case 73:a.prev=73,a.t3=a.catch(62),U.e(a.t3);case 76:return a.prev=76,U.f(),a.finish(76);case 79:if(!y){a.next=82;break}return a.next=82,[void 0,e];case 82:case"end":return a.stop()}}),a,null,[[5,16,19,22],[23,54,57,60],[29,44,47,50],[62,73,76,79]])}))()}var ht=function(){function e(t){var n=this;(0,m.Z)(this,e);var a=t.type,o=t.schema,r=t.validator,i=t.refiner,s=t.coercer,c=void 0===s?function(e){return e}:s,u=t.entries,d=void 0===u?(0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})):u;this.type=a,this.schema=o,this.entries=d,this.coercer=c,this.validator=r?function(e,t){return bt(r(e,t),t,n,e)}:function(){return[]},this.refiner=i?function(e,t){return bt(i(e,t),t,n,e)}:function(){return[]}}return(0,h.Z)(e,[{key:"assert",value:function(e){return gt(e,this)}},{key:"create",value:function(e){return yt(e,this)}},{key:"is",value:function(e){return vt(e,this)}},{key:"mask",value:function(e){return function(e,t){var n=wt(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}(e,this)}},{key:"validate",value:function(e){return wt(e,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}]),e}();function gt(e,t){var n=wt(e,t);if(n[0])throw n[0]}function yt(e,t){var n=wt(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function vt(e,t){return!wt(e,t)[0]}function wt(e,t){var n=mt(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),a=function(e){var t=e.next(),n=t.done,a=t.value;return n?void 0:a}(n);if(a[0]){var o=new ut(a[0],(0,l.Z)().mark((function e(){var t,a,o;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=(0,u.Z)(n),e.prev=1,t.s();case 3:if((a=t.n()).done){e.next=10;break}if(!(o=a.value)[0]){e.next=8;break}return e.next=8,o[0];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])})));return[o,void 0]}return[void 0,a[1]]}function kt(e,t){return new ht({type:e,schema:null,validator:t})}function At(e){return new ht({type:"array",schema:e,entries:(0,l.Z)().mark((function t(n){var a,o,r,i,c;return(0,l.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e||!Array.isArray(n)){t.next=18;break}a=(0,u.Z)(n.entries()),t.prev=2,a.s();case 4:if((o=a.n()).done){t.next=10;break}return r=(0,s.Z)(o.value,2),i=r[0],c=r[1],t.next=8,[i,c,e];case 8:t.next=4;break;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(2),a.e(t.t0);case 15:return t.prev=15,a.f(),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[2,12,15,18]])})),coercer:function(e){return Array.isArray(e)?e.slice():e},validator:function(e){return Array.isArray(e)||"Expected an array value, but received: "+ft(e)}})}function xt(){return kt("boolean",(function(e){return"boolean"===typeof e}))}function It(e){return kt("instance",(function(t){return t instanceof e||"Expected a `"+e.name+"` instance, but received: "+ft(t)}))}function Tt(e){var t=ft(e),n=typeof e;return new ht({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:function(n){return n===e||"Expected the literal `"+t+"`, but received: "+ft(n)}})}function St(){return kt("never",(function(){return!1}))}function Ct(e){return new ht((0,i.Z)((0,i.Z)({},e),{},{validator:function(t,n){return null===t||e.validator(t,n)},refiner:function(t,n){return null===t||e.refiner(t,n)}}))}function Et(){return kt("number",(function(e){return"number"===typeof e&&!isNaN(e)||"Expected a number, but received: "+ft(e)}))}function Rt(e){return new ht((0,i.Z)((0,i.Z)({},e),{},{validator:function(t,n){return void 0===t||e.validator(t,n)},refiner:function(t,n){return void 0===t||e.refiner(t,n)}}))}function Mt(e,t){return new ht({type:"record",schema:null,entries:(0,l.Z)().mark((function n(a){var o,r;return(0,l.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!lt(a)){n.next=11;break}n.t0=(0,l.Z)().keys(a);case 2:if((n.t1=n.t0()).done){n.next=11;break}return o=n.t1.value,r=a[o],n.next=7,[o,o,e];case 7:return n.next=9,[o,r,t];case 9:n.next=2;break;case 11:case"end":return n.stop()}}),n)})),validator:function(e){return lt(e)||"Expected an object, but received: "+ft(e)}})}function Pt(){return kt("string",(function(e){return"string"===typeof e||"Expected a string, but received: "+ft(e)}))}function Ut(e){var t=St();return new ht({type:"tuple",schema:null,entries:(0,l.Z)().mark((function n(a){var o,r;return(0,l.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!Array.isArray(a)){n.next=9;break}o=Math.max(e.length,a.length),r=0;case 3:if(!(r>Vt)*Qt)%qt)&Zt&&(tn^=Wt<<(Wt<32?U.rotlBH(e,t,n):U.rotlSH(e,t,n)},un=function(e,t,n){return n>32?U.rotlBL(e,t,n):U.rotlSL(e,t,n)};var dn=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(e,a,o){var r,i,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if((0,m.Z)(this,n),(r=t.call(this)).blockLen=e,r.suffix=a,r.outputLen=o,r.enableXOF=s,r.rounds=c,r.pos=0,r.posOut=0,r.finished=!1,r.destroyed=!1,k.number(o),0>=r.blockLen||r.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");return r.state=new Uint8Array(200),r.state32=(i=r.state,new Uint32Array(i.buffer,i.byteOffset,Math.floor(i.byteLength/4))),r}return(0,h.Z)(n,[{key:"keccak",value:function(){!function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=new Uint32Array(10),a=24-t;a<24;a++){for(var o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(var r=0;r<10;r+=2)for(var i=(r+8)%10,s=(r+2)%10,c=n[s],u=n[s+1],d=cn(c,u,1)^n[i],l=un(c,u,1)^n[i+1],f=0;f<50;f+=10)e[r+f]^=d,e[r+f+1]^=l;for(var p=e[2],b=e[3],m=0;m<24;m++){var h=Gt[m],g=cn(p,b,h),y=un(p,b,h),v=Ht[m];p=e[v],b=e[v+1],e[v]=g,e[v+1]=y}for(var w=0;w<50;w+=10){for(var k=0;k<10;k++)n[k]=e[w+k];for(var A=0;A<10;A++)e[w+A]^=~n[(A+2)%10]&n[(A+4)%10]}e[0]^=rn[a],e[1]^=sn[a]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}},{key:"update",value:function(e){k.exists(this);for(var t=this.blockLen,n=this.state,a=(e=I(e)).length,o=0;o=n&&this.keccak();var r=Math.min(n-this.posOut,o-a);e.set(t.subarray(this.posOut,this.posOut+r),a),this.posOut+=r,a+=r}return e}},{key:"xofInto",value:function(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}},{key:"xof",value:function(e){return k.number(e),this.xofInto(new Uint8Array(e))}},{key:"digestInto",value:function(e){if(k.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}},{key:"digest",value:function(){return this.digestInto(new Uint8Array(this.outputLen))}},{key:"destroy",value:function(){this.destroyed=!0,this.state.fill(0)}},{key:"_cloneInto",value:function(e){var t=this.blockLen,a=this.suffix,o=this.outputLen,r=this.rounds,i=this.enableXOF;return e||(e=new n(t,a,o,i,r)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=r,e.suffix=a,e.outputLen=o,e.enableXOF=i,e.destroyed=this.destroyed,e}}]),n}(T),ln=function(e,t,n){return S((function(){return new dn(t,e,n)}))},fn=(ln(6,144,28),ln(6,136,32),ln(6,104,48),ln(6,72,64),ln(1,144,28),ln(1,136,32)),pn=(ln(1,104,48),ln(1,72,64),function(e,t,n){return function(e){var t=function(t,n){return e(n).update(I(t)).digest()},n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=function(t){return e(t)},t}((function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new dn(t,e,void 0===a.dkLen?n:a.dkLen,!0)}))}),bn=(pn(31,168,16),pn(31,136,32),function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(e,a){var o;(0,m.Z)(this,n),(o=t.call(this)).finished=!1,o.destroyed=!1,k.hash(e);var r=I(a);if(o.iHash=e.create(),"function"!==typeof o.iHash.update)throw new TypeError("Expected instance of class which extends utils.Hash");o.blockLen=o.iHash.blockLen,o.outputLen=o.iHash.outputLen;var i=o.blockLen,s=new Uint8Array(i);s.set(r.length>i?e.create().update(r).digest():r);for(var c=0;ci,f=d>i;if(l&&(u=t-u),f&&(d=t-d),u>i||d>i)throw new Error("splitScalarEndo: Endomorphism failed, k="+e);return{k1neg:l,k1:u,k2neg:f,k2:d}},Cn=32,En=32,Rn=32,Mn=Cn+1,Pn=2*Cn+1;function Un(e){var t=xn.a,n=xn.b,a=aa(e*e),o=aa(a*e);return aa(o+t*e+n)}var _n=xn.a===yn,Bn=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(e){return(0,m.Z)(this,n),t.call(this,e)}return(0,h.Z)(n)}((0,d.Z)(Error));function Dn(e){if(!(e instanceof Nn))throw new TypeError("JacobianPoint expected")}var Nn=function(){function e(t,n,a){(0,m.Z)(this,e),this.x=t,this.y=n,this.z=a}return(0,h.Z)(e,[{key:"equals",value:function(e){Dn(e);var t=this.x,n=this.y,a=this.z,o=e.x,r=e.y,i=e.z,s=aa(a*a),c=aa(i*i),u=aa(t*c),d=aa(o*s),l=aa(aa(n*i)*c),f=aa(aa(r*a)*s);return u===d&&l===f}},{key:"negate",value:function(){return new e(this.x,aa(-this.y),this.z)}},{key:"double",value:function(){var t=this.x,n=this.y,a=this.z,o=aa(t*t),r=aa(n*n),i=aa(r*r),s=t+r,c=aa(wn*(aa(s*s)-o-i)),u=aa(kn*o),d=aa(u*u),l=aa(d-wn*c);return new e(l,aa(u*(c-l)-An*i),aa(wn*n*a))}},{key:"add",value:function(t){Dn(t);var n=this.x,a=this.y,o=this.z,r=t.x,i=t.y,s=t.z;if(r===yn||i===yn)return this;if(n===yn||a===yn)return t;var c=aa(o*o),u=aa(s*s),d=aa(n*u),l=aa(r*c),f=aa(aa(a*s)*u),p=aa(aa(i*o)*c),b=aa(l-d),m=aa(p-f);if(b===yn)return m===yn?this.double():e.ZERO;var h=aa(b*b),g=aa(b*h),y=aa(d*h),v=aa(m*m-g-wn*y);return new e(v,aa(m*(y-v)-f*g),aa(o*s*b))}},{key:"subtract",value:function(e){return this.add(e.negate())}},{key:"multiplyUnsafe",value:function(t){var n=e.ZERO;if("bigint"===typeof t&&t===yn)return n;var a=na(t);if(a===vn)return this;if(!_n){for(var o=n,r=this;a>yn;)a&vn&&(o=o.add(r)),r=r.double(),a>>=vn;return o}for(var i=Sn(a),s=i.k1neg,c=i.k1,u=i.k2neg,d=i.k2,l=n,f=n,p=this;c>yn||d>yn;)c&vn&&(l=l.add(p)),d&vn&&(f=f.add(p)),p=p.double(),c>>=vn,d>>=vn;return s&&(l=l.negate()),u&&(f=f.negate()),f=new e(aa(f.x*Tn),f.y,f.z),l.add(f)}},{key:"precomputeWindow",value:function(e){for(var t=_n?128/e+1:256/e+1,n=[],a=this,o=a,r=0;r>=l,b>c&&(b-=d,t+=vn);var m=p,h=p+Math.abs(b)-1,g=f%2!==0,y=b<0;0===b?i=i.add(On(g,o[m])):r=r.add(On(y,o[h]))}return{p:r,f:i}}},{key:"multiply",value:function(t,n){var a,o,r=na(t);if(_n){var i=Sn(r),s=i.k1neg,c=i.k1,u=i.k2neg,d=i.k2,l=this.wNAF(c,n),f=l.p,p=l.f,b=this.wNAF(d,n),m=b.p,h=b.f;f=On(s,f),m=new e(aa((m=On(u,m)).x*Tn),m.y,m.z),a=f.add(m),o=p.add(h)}else{var g=this.wNAF(r,n);a=g.p,o=g.f}return e.normalizeZ([a,o])[0]}},{key:"toAffine",value:function(t){var n=this.x,a=this.y,o=this.z,r=this.equals(e.ZERO);null==t&&(t=r?An:ra(o));var i=t,s=aa(i*i),c=aa(s*i),u=aa(n*s),d=aa(a*c),l=aa(o*i);if(r)return Ln.ZERO;if(l!==vn)throw new Error("invZ was invalid");return new Ln(u,d)}}],[{key:"fromAffine",value:function(t){if(!(t instanceof Ln))throw new TypeError("JacobianPoint#fromAffine: expected Point");return t.equals(Ln.ZERO)?e.ZERO:new e(t.x,t.y,vn)}},{key:"toAffineBatch",value:function(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xn.P,n=new Array(e.length),a=ra(e.reduce((function(e,a,o){return a===yn?e:(n[o]=e,aa(e*a,t))}),vn),t);return e.reduceRight((function(e,a,o){return a===yn?e:(n[o]=aa(e*n[o],t),aa(e*a,t))}),a),n}(e.map((function(e){return e.z})));return e.map((function(e,n){return e.toAffine(t[n])}))}},{key:"normalizeZ",value:function(t){return e.toAffineBatch(t).map(e.fromAffine)}}]),e}();function On(e,t){var n=t.negate();return e?n:t}Nn.BASE=new Nn(xn.Gx,xn.Gy,vn),Nn.ZERO=new Nn(yn,vn,yn);var Fn=new WeakMap,Ln=function(){function e(t,n){(0,m.Z)(this,e),this.x=t,this.y=n}return(0,h.Z)(e,[{key:"_setWindowSize",value:function(e){this._WINDOW_SIZE=e,Fn.delete(this)}},{key:"hasEvenY",value:function(){return this.y%wn===yn}},{key:"toRawBytes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return $n(this.toHex(e))}},{key:"toHex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Qn(this.x);if(e){var n=this.hasEvenY()?"02":"03";return"".concat(n).concat(t)}return"04".concat(t).concat(Qn(this.y))}},{key:"toHexX",value:function(){return this.toHex(!0).slice(2)}},{key:"toRawX",value:function(){return this.toRawBytes(!0).slice(1)}},{key:"assertValidity",value:function(){var e="Point is not on elliptic curve",t=this.x,n=this.y;if(!ua(t)||!ua(n))throw new Error(e);var a=aa(n*n);if(aa(a-Un(t))!==yn)throw new Error(e)}},{key:"equals",value:function(e){return this.x===e.x&&this.y===e.y}},{key:"negate",value:function(){return new e(this.x,aa(-this.y))}},{key:"double",value:function(){return Nn.fromAffine(this).double().toAffine()}},{key:"add",value:function(e){return Nn.fromAffine(this).add(Nn.fromAffine(e)).toAffine()}},{key:"subtract",value:function(e){return this.add(e.negate())}},{key:"multiply",value:function(e){return Nn.fromAffine(this).multiply(e,this).toAffine()}},{key:"multiplyAndAddUnsafe",value:function(t,n,a){var o=Nn.fromAffine(this),r=n===yn||n===vn||this!==e.BASE?o.multiplyUnsafe(n):o.multiply(n),i=Nn.fromAffine(t).multiplyUnsafe(a),s=r.add(i);return s.equals(Nn.ZERO)?void 0:s.toAffine()}}],[{key:"fromCompressedHex",value:function(t){var n=32===t.length,a=ea(n?t:t.subarray(1));if(!ua(a))throw new Error("Point is not on curve");var o=function(e){var t=xn.P,n=BigInt(6),a=BigInt(11),o=BigInt(22),r=BigInt(23),i=BigInt(44),s=BigInt(88),c=e*e*e%t,u=c*c*e%t,d=oa(u,kn)*u%t,l=oa(d,kn)*u%t,f=oa(l,wn)*c%t,p=oa(f,a)*f%t,b=oa(p,o)*p%t,m=oa(b,i)*b%t,h=oa(m,s)*m%t,g=oa(h,i)*b%t,y=oa(g,kn)*u%t,v=oa(y,r)*p%t,w=oa(v,n)*c%t,k=oa(w,wn);if(k*k%t!==e)throw new Error("Cannot find square root");return k}(Un(a)),r=(o&vn)===vn;n?r&&(o=aa(-o)):1===(1&t[0])!==r&&(o=aa(-o));var i=new e(a,o);return i.assertValidity(),i}},{key:"fromUncompressedHex",value:function(t){var n=new e(ea(t.subarray(1,Cn+1)),ea(t.subarray(Cn+1,2*Cn+1)));return n.assertValidity(),n}},{key:"fromHex",value:function(e){var t=ta(e),n=t.length,a=t[0];if(n===Cn)return this.fromCompressedHex(t);if(n===Mn&&(2===a||3===a))return this.fromCompressedHex(t);if(n===Pn&&4===a)return this.fromUncompressedHex(t);throw new Error("Point.fromHex: received invalid point. Expected 32-".concat(Mn," compressed bytes or ").concat(Pn," uncompressed bytes, not ").concat(n))}},{key:"fromPrivateKey",value:function(t){return e.BASE.multiply(la(t))}},{key:"fromSignature",value:function(t,n,a){var o=fa(n),r=o.r,i=o.s;if(![0,1,2,3].includes(a))throw new Error("Cannot recover: invalid recovery bit");var s=ia(ta(t)),c=xn.n,u=2===a||3===a?r+c:r,d=ra(u,c),l=aa(-s*d,c),f=aa(i*d,c),p=1&a?"03":"02",b=e.fromHex(p+Qn(u)),m=e.BASE.multiplyAndAddUnsafe(b,l,f);if(!m)throw new Error("Cannot recover signature: point at infinify");return m.assertValidity(),m}}]),e}();function jn(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}function Hn(e){if(e.length<2||2!==e[0])throw new Error("Invalid signature integer tag: ".concat(Wn(e)));var t=e[1],n=e.subarray(2,t+2);if(!t||n.length!==t)throw new Error("Invalid signature integer: wrong length");if(0===n[0]&&n[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:ea(n),left:e.subarray(t+2)}}Ln.BASE=new Ln(xn.Gx,xn.Gy),Ln.ZERO=new Ln(yn,yn);var Gn=function(){function e(t,n){(0,m.Z)(this,e),this.r=t,this.s=n,this.assertValidity()}return(0,h.Z)(e,[{key:"assertValidity",value:function(){var e=this.r,t=this.s;if(!ca(e))throw new Error("Invalid Signature: r must be 0 < r < n");if(!ca(t))throw new Error("Invalid Signature: s must be 0 < s < n")}},{key:"hasHighS",value:function(){var e=xn.n>>vn;return this.s>e}},{key:"normalizeS",value:function(){return this.hasHighS()?new e(this.r,aa(-this.s,xn.n)):this}},{key:"toDERRawBytes",value:function(){return $n(this.toDERHex())}},{key:"toDERHex",value:function(){var e=jn(Yn(this.s)),t=jn(Yn(this.r)),n=e.length/2,a=t.length/2,o=Yn(n),r=Yn(a),i=Yn(a+n+4);return"30".concat(i,"02").concat(r).concat(t,"02").concat(o).concat(e)}},{key:"toRawBytes",value:function(){return this.toDERRawBytes()}},{key:"toHex",value:function(){return this.toDERHex()}},{key:"toCompactRawBytes",value:function(){return $n(this.toCompactHex())}},{key:"toCompactHex",value:function(){return Qn(this.r)+Qn(this.s)}}],[{key:"fromCompact",value:function(t){var n=t instanceof Uint8Array,a="Signature.fromCompact";if("string"!==typeof t&&!n)throw new TypeError("".concat(a,": Expected string or Uint8Array"));var o=n?Wn(t):t;if(128!==o.length)throw new Error("".concat(a,": Expected 64-byte hex"));return new e(Xn(o.slice(0,64)),Xn(o.slice(64,128)))}},{key:"fromDER",value:function(t){var n=t instanceof Uint8Array;if("string"!==typeof t&&!n)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");var a=function(e){if(e.length<2||48!=e[0])throw new Error("Invalid signature tag: ".concat(Wn(e)));if(e[1]!==e.length-2)throw new Error("Invalid signature: incorrect length");var t=Hn(e.subarray(2)),n=t.data,a=Hn(t.left),o=a.data,r=a.left;if(r.length)throw new Error("Invalid signature: left bytes after parsing: ".concat(Wn(r)));return{r:n,s:o}}(n?t:$n(t));return new e(a.r,a.s)}},{key:"fromHex",value:function(e){return this.fromDER(e)}}]),e}();function zn(){for(var e=arguments.length,t=new Array(e),n=0;n0)return BigInt(e);if("bigint"===typeof e&&ca(e))return e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function aa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xn.P,n=e%t;return n>=yn?n:t+n}function oa(e,t){for(var n=xn.P,a=e;t-- >yn;)a*=a,a%=n;return a}function ra(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xn.P;if(e===yn||t<=yn)throw new Error("invert: expected positive integers, got n=".concat(e," mod=").concat(t));for(var n=aa(e,t),a=t,o=yn,r=vn,i=vn,s=yn;n!==yn;){var c=a/n,u=a%n,d=o-i*c,l=r-s*c;a=n,n=u,o=i,r=s,i=d,s=l}if(a!==vn)throw new Error("invert: does not exist");return aa(o,t)}function ia(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(e){var t=8*e.length-8*En,n=ea(e);return t>0?n>>BigInt(t):n}(e);if(t)return n;var a=xn.n;return n>=a?n-a:n}var sa=function(){function e(t,n){if((0,m.Z)(this,e),this.hashLen=t,this.qByteLen=n,"number"!==typeof t||t<2)throw new Error("hashLen must be a number");if("number"!==typeof n||n<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(t).fill(1),this.k=new Uint8Array(t).fill(0),this.counter=0}return(0,h.Z)(e,[{key:"hmac",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}},{key:"reseed",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(){var t,n=arguments;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:new Uint8Array,e.next=3,this.hmac(this.v,Uint8Array.from([0]),t);case 3:return this.k=e.sent,e.next=6,this.hmac(this.v);case 6:if(this.v=e.sent,0!==t.length){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,this.hmac(this.v,Uint8Array.from([1]),t);case 11:return this.k=e.sent,e.next=14,this.hmac(this.v);case 14:this.v=e.sent;case 15:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"reseedSync",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array;this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),e),this.v=this.hmacSync(this.v),0!==e.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),e),this.v=this.hmacSync(this.v))}},{key:"generate",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(){var t,n,a;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.incr(),t=0,n=[];case 3:if(!(t3&&void 0!==arguments[3])||arguments[3],o=xn.n,r=ia(e,!0);if(ca(r)){var i=ra(r,o),s=Ln.BASE.multiply(r),c=aa(s.x,o);if(c!==yn){var u=aa(i*aa(t+n*c,o),o);if(u!==yn){var d=new Gn(c,u),l=(s.x===d.r?0:2)|Number(s.y&vn);return a&&d.hasHighS()&&(d=d.normalizeS(),l^=1),{sig:d,recovery:l}}}}}function la(e){var t;if("bigint"===typeof e)t=e;else if("number"===typeof e&&Number.isSafeInteger(e)&&e>0)t=BigInt(e);else if("string"===typeof e){if(e.length!==2*En)throw new Error("Expected 32 bytes of private key");t=Xn(e)}else{if(!(e instanceof Uint8Array))throw new TypeError("Expected valid private key");if(e.length!==En)throw new Error("Expected 32 bytes of private key");t=ea(e)}if(!ca(t))throw new Error("Expected private key: 0 < key < n");return t}function fa(e){if(e instanceof Gn)return e.assertValidity(),e;try{return Gn.fromDER(e)}catch(t){return Gn.fromCompact(e)}}function pa(e){return ea(e.length>Cn?e.slice(0,Cn):e)}function ba(e){var t=pa(e),n=aa(t,xn.n);return ma(n1024)throw new Error("Expected valid bytes of private key as per FIPS 186");return Jn(aa(ea(e),xn.n-vn)+vn)},randomBytes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(ya.web)return ya.web.getRandomValues(new Uint8Array(e));if(ya.node){var t=ya.node.randomBytes;return Uint8Array.from(t(e))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:function(){return wa.hashToPrivateKey(wa.randomBytes(En+8))},precompute:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ln.BASE,n=t===Ln.BASE?t:new Ln(t.x,t.y);return n._setWindowSize(e),n.multiply(kn),n},sha256:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(){var t,n,a,o,r,i,s=arguments;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=s.length,n=new Array(t),a=0;a1?n-1:0),o=1;o1?o-1:0),i=1;i1?a-1:0),r=1;rFa)throw new Error("Invalid public key input")}return t}return(0,h.Z)(a,[{key:"equals",value:function(e){return this._bn.eq(e._bn)}},{key:"toBase58",value:function(){return qe().encode(this.toBytes())}},{key:"toJSON",value:function(){return this.toBase58()}},{key:"toBytes",value:function(){var e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}},{key:"toBuffer",value:function(){var e=this._bn.toArrayLike(g.lW);if(e.length===Fa)return e;var t=g.lW.alloc(32);return e.copy(t,32-e.length),t}},{key:t,get:function(){return"PublicKey(".concat(this.toString(),")")}},{key:"toString",value:function(){return this.toBase58()}}],[{key:"unique",value:function(){var e=new a(La);return La+=1,new a(e.toBuffer())}},{key:"createWithSeed",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n,o){var r,i;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=g.lW.concat([t.toBuffer(),g.lW.from(n),o.toBuffer()]),i=tt(r),e.abrupt("return",new a(i));case 3:case"end":return e.stop()}}),e)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"createProgramAddressSync",value:function(e,t){var n=g.lW.alloc(0);e.forEach((function(e){if(e.length>Oa)throw new TypeError("Max seed length exceeded");n=g.lW.concat([n,_a(e)])})),n=g.lW.concat([n,t.toBuffer(),g.lW.from("ProgramDerivedAddress")]);var o=tt(n);if(Ra(o))throw new Error("Invalid seeds, address must fall off the curve");return new a(o)}},{key:"createProgramAddress",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.createProgramAddressSync(t,n));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"findProgramAddressSync",value:function(e,t){for(var n,a=255;0!=a;){try{var o=e.concat(g.lW.from([a]));n=this.createProgramAddressSync(o,t)}catch(r){if(r instanceof TypeError)throw r;a--;continue}return[n,a]}throw new Error("Unable to find a viable program address nonce")}},{key:"findProgramAddress",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.findProgramAddressSync(t,n));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isOnCurve",value:function(e){return Ra(new a(e).toBytes())}}]),a}(Ba,Ma);ja.default=new ja("11111111111111111111111111111111"),Na.set(ja,{kind:"struct",fields:[["_bn","u256"]]});var Ha=function(){function e(t){if((0,m.Z)(this,e),this._publicKey=void 0,this._secretKey=void 0,t){var n=_a(t);if(64!==t.length)throw new Error("bad secret key size");this._publicKey=n.slice(32,64),this._secretKey=n.slice(0,32)}else this._secretKey=_a(Sa()),this._publicKey=_a(Ea(this._secretKey))}return(0,h.Z)(e,[{key:"publicKey",get:function(){return new ja(this._publicKey)}},{key:"secretKey",get:function(){return g.lW.concat([this._secretKey,this._publicKey],64)}}]),e}(),Ga=new ja("BPFLoader1111111111111111111111111111111111"),za=1232,Ka=127,Wa=64,Za=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(e){var a;return(0,m.Z)(this,n),(a=t.call(this,"Signature ".concat(e," has expired: block height exceeded."))).signature=void 0,a.signature=e,a}return(0,h.Z)(n)}((0,d.Z)(Error));Object.defineProperty(Za.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});var Va=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(e,a){var o;return(0,m.Z)(this,n),(o=t.call(this,"Transaction was not confirmed in ".concat(a.toFixed(2)," seconds. It is ")+"unknown if it succeeded or failed. Check signature "+"".concat(e," using the Solana Explorer or CLI tools."))).signature=void 0,o.signature=e,o}return(0,h.Z)(n)}((0,d.Z)(Error));Object.defineProperty(Va.prototype,"name",{value:"TransactionExpiredTimeoutError"});var qa=function(e){(0,p.Z)(n,e);var t=(0,b.Z)(n);function n(e){var a;return(0,m.Z)(this,n),(a=t.call(this,"Signature ".concat(e," has expired: the nonce is no longer valid."))).signature=void 0,a.signature=e,a}return(0,h.Z)(n)}((0,d.Z)(Error));Object.defineProperty(qa.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});var Qa=function(){function e(t,n){(0,m.Z)(this,e),this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=t,this.accountKeysFromLookups=n}return(0,h.Z)(e,[{key:"keySegments",value:function(){var e=[this.staticAccountKeys];return this.accountKeysFromLookups&&(e.push(this.accountKeysFromLookups.writable),e.push(this.accountKeysFromLookups.readonly)),e}},{key:"get",value:function(e){var t,n=(0,u.Z)(this.keySegments());try{for(n.s();!(t=n.n()).done;){var a=t.value;if(e256)throw new Error("Account index overflow encountered during compilation");var t=new Map;this.keySegments().flat().forEach((function(e,n){t.set(e.toBase58(),n)}));var n=function(e){var n=t.get(e.toBase58());if(void 0===n)throw new Error("Encountered an unknown instruction account key during compilation");return n};return e.map((function(e){return{programIdIndex:n(e.programId),accountKeyIndexes:e.keys.map((function(e){return n(e.pubkey)})),data:e.data}}))}}]),e}(),Ja=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"publicKey";return at.blob(32,e)},Ya=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature";return at.blob(64,e)},Xa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"string",t=at.struct([at.u32("length"),at.u32("lengthPadding"),at.blob(at.offset(at.u32(),-8),"chars")],e),n=t.decode.bind(t),a=t.encode.bind(t),o=t;return o.decode=function(e,t){return n(e,t).chars.toString()},o.encode=function(e,t,n){var o={chars:g.lW.from(e,"utf8")};return a(o,t,n)},o.alloc=function(e){return at.u32().span+at.u32().span+g.lW.from(e,"utf8").length},o};function $a(e,t){var n=function e(n){if(n.span>=0)return n.span;if("function"===typeof n.alloc)return n.alloc(t[n.property]);if("count"in n&&"elementLayout"in n){var a=t[n.property];if(Array.isArray(a))return a.length*e(n.elementLayout)}else if("fields"in n)return $a({layout:n},t[n.property]);return 0},a=0;return e.layout.fields.forEach((function(e){a+=n(e)})),a}function eo(e){for(var t=0,n=0;;){var a=e.shift();if(t|=(127&a)<<7*n,n+=1,0===(128&a))break}return t}function to(e,t){for(var n=t;;){var a=127&n;if(0==(n>>=7)){e.push(a);break}a|=128,e.push(a)}}function no(e,t){if(!e)throw new Error(t||"Assertion failed")}var ao,oo=function(){function e(t,n){(0,m.Z)(this,e),this.payer=void 0,this.keyMetaMap=void 0,this.payer=t,this.keyMetaMap=n}return(0,h.Z)(e,[{key:"getMessageComponents",value:function(){var e=(0,c.Z)(this.keyMetaMap.entries());no(e.length<=256,"Max static account keys length exceeded");var t=e.filter((function(e){var t=(0,s.Z)(e,2)[1];return t.isSigner&&t.isWritable})),n=e.filter((function(e){var t=(0,s.Z)(e,2)[1];return t.isSigner&&!t.isWritable})),a=e.filter((function(e){var t=(0,s.Z)(e,2)[1];return!t.isSigner&&t.isWritable})),o=e.filter((function(e){var t=(0,s.Z)(e,2)[1];return!t.isSigner&&!t.isWritable})),r={numRequiredSignatures:t.length+n.length,numReadonlySignedAccounts:n.length,numReadonlyUnsignedAccounts:o.length};return no(t.length>0,"Expected at least one writable signer key"),no((0,s.Z)(t[0],1)[0]===this.payer.toBase58(),"Expected first writable signer key to be the fee payer"),[r,[].concat((0,c.Z)(t.map((function(e){var t=(0,s.Z)(e,1)[0];return new ja(t)}))),(0,c.Z)(n.map((function(e){var t=(0,s.Z)(e,1)[0];return new ja(t)}))),(0,c.Z)(a.map((function(e){var t=(0,s.Z)(e,1)[0];return new ja(t)}))),(0,c.Z)(o.map((function(e){var t=(0,s.Z)(e,1)[0];return new ja(t)}))))]}},{key:"extractTableLookup",value:function(e){var t=this.drainKeysFoundInLookupTable(e.state.addresses,(function(e){return!e.isSigner&&!e.isInvoked&&e.isWritable})),n=(0,s.Z)(t,2),a=n[0],o=n[1],r=this.drainKeysFoundInLookupTable(e.state.addresses,(function(e){return!e.isSigner&&!e.isInvoked&&!e.isWritable})),i=(0,s.Z)(r,2),c=i[0],u=i[1];if(0!==a.length||0!==c.length)return[{accountKey:e.key,writableIndexes:a,readonlyIndexes:c},{writable:o,readonly:u}]}},{key:"drainKeysFoundInLookupTable",value:function(e,t){var n,a=this,o=new Array,r=new Array,i=(0,u.Z)(this.keyMetaMap.entries());try{var c=function(){var i=(0,s.Z)(n.value,2),c=i[0],u=i[1];if(t(u)){var d=new ja(c),l=e.findIndex((function(e){return e.equals(d)}));l>=0&&(no(l<256,"Max lookup table index exceeded"),o.push(l),r.push(d),a.keyMetaMap.delete(c))}};for(i.s();!(n=i.n()).done;)c()}catch(d){i.e(d)}finally{i.f()}return[o,r]}}],[{key:"compile",value:function(t,n){var a=new Map,o=function(e){var t=e.toBase58(),n=a.get(t);return void 0===n&&(n={isSigner:!1,isWritable:!1,isInvoked:!1},a.set(t,n)),n},r=o(n);r.isSigner=!0,r.isWritable=!0;var i,s=(0,u.Z)(t);try{for(s.s();!(i=s.n()).done;){var c=i.value;o(c.programId).isInvoked=!0;var d,l=(0,u.Z)(c.keys);try{for(l.s();!(d=l.n()).done;){var f=d.value,p=o(f.pubkey);p.isSigner||(p.isSigner=f.isSigner),p.isWritable||(p.isWritable=f.isWritable)}}catch(b){l.e(b)}finally{l.f()}}}catch(b){s.e(b)}finally{s.f()}return new e(n,a)}}]),e}(),ro=function(){function e(t){var n=this;(0,m.Z)(this,e),this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map((function(e){return new ja(e)})),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach((function(e){return n.indexToProgramIds.set(e.programIdIndex,n.accountKeys[e.programIdIndex])}))}return(0,h.Z)(e,[{key:"version",get:function(){return"legacy"}},{key:"staticAccountKeys",get:function(){return this.accountKeys}},{key:"compiledInstructions",get:function(){return this.instructions.map((function(e){return{programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:qe().decode(e.data)}}))}},{key:"addressTableLookups",get:function(){return[]}},{key:"getAccountKeys",value:function(){return new Qa(this.staticAccountKeys)}},{key:"isAccountSigner",value:function(e){return e=this.header.numRequiredSignatures?e-t0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Qa(this.staticAccountKeys,t)}},{key:"isAccountSigner",value:function(e){return e=n?e-n=this.header.numRequiredSignatures?e-t0?this.signatures[0].signature:null}},{key:"toJSON",value:function(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map((function(e){return e.toJSON()})),signers:this.signatures.map((function(e){return e.publicKey.toJSON()}))}}},{key:"add",value:function(){for(var e=this,t=arguments.length,n=new Array(t),a=0;a0&&this.signatures[0].publicKey))throw new Error("Transaction fee payer required");n=this.signatures[0].publicKey}for(var a=0;a-1?(d[n].isWritable=d[n].isWritable||e.isWritable,d[n].isSigner=d[n].isSigner||e.isSigner):d.push(e)})),d.sort((function(e,t){return e.isSigner!==t.isSigner?e.isSigner?-1:1:e.isWritable!==t.isWritable?e.isWritable?-1:1:e.pubkey.toBase58().localeCompare(t.pubkey.toBase58())}));var l=d.findIndex((function(e){return e.pubkey.equals(n)}));if(l>-1){var f=d.splice(l,1),p=(0,s.Z)(f,1)[0];p.isSigner=!0,p.isWritable=!0,d.unshift(p)}else d.unshift({pubkey:n,isSigner:!0,isWritable:!0});var b,m=(0,u.Z)(this.signatures);try{var h=function(){var e=b.value,t=d.findIndex((function(t){return t.pubkey.equals(e.publicKey)}));if(!(t>-1))throw new Error("unknown signer: ".concat(e.publicKey.toString()));d[t].isSigner||(d[t].isSigner=!0,ka.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."))};for(m.s();!(b=m.n()).done;)h()}catch(I){m.e(I)}finally{m.f()}var g=0,y=0,v=0,w=[],k=[];d.forEach((function(e){var t=e.pubkey,n=e.isSigner,a=e.isWritable;n?(w.push(t.toString()),g+=1,a||(y+=1)):(k.push(t.toString()),a||(v+=1))}));var A=w.concat(k),x=t.map((function(e){var t=e.data,n=e.programId;return{programIdIndex:A.indexOf(n.toString()),accounts:e.keys.map((function(e){return A.indexOf(e.pubkey.toString())})),data:qe().encode(t)}}));return x.forEach((function(e){no(e.programIdIndex>=0),e.accounts.forEach((function(e){return no(e>=0)}))})),new ro({header:{numRequiredSignatures:g,numReadonlySignedAccounts:y,numReadonlyUnsignedAccounts:v},accountKeys:A,recentBlockhash:e,instructions:x})}},{key:"_compile",value:function(){var e=this.compileMessage(),t=e.accountKeys.slice(0,e.header.numRequiredSignatures);if(this.signatures.length===t.length&&this.signatures.every((function(e,n){return t[n].equals(e.publicKey)})))return e;return this.signatures=t.map((function(e){return{signature:null,publicKey:e}})),e}},{key:"serializeMessage",value:function(){return this._compile().serialize()}},{key:"getEstimatedFee",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getFeeForMessage(this.compileMessage());case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setSigners",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1?a-1:0),r=1;r ").concat(za)),o}},{key:"keys",get:function(){return no(1===this.instructions.length),this.instructions[0].keys.map((function(e){return e.pubkey}))}},{key:"programId",get:function(){return no(1===this.instructions.length),this.instructions[0].programId}},{key:"data",get:function(){return no(1===this.instructions.length),this.instructions[0].data}}],[{key:"from",value:function(t){for(var n=(0,c.Z)(t),a=eo(n),o=[],r=0;r1&&void 0!==arguments[1]?arguments[1]:[],a=new e;return a.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(a.feePayer=t.accountKeys[0]),n.forEach((function(e,n){var o={signature:e==qe().encode(co)?null:qe().decode(e),publicKey:t.accountKeys[n]};a.signatures.push(o)})),t.instructions.forEach((function(e){var n=e.accounts.map((function(e){var n=t.accountKeys[e];return{pubkey:n,isSigner:a.signatures.some((function(e){return e.publicKey.toString()===n.toString()}))||t.isAccountSigner(e),isWritable:t.isAccountWritable(e)}}));a.instructions.push(new uo({keys:n,programId:t.accountKeys[e.programIdIndex],data:qe().decode(e.data)}))})),a._message=t,a._json=a.toJSON(),a}}]),e}(),fo=function(){function e(t){(0,m.Z)(this,e),this.payerKey=void 0,this.instructions=void 0,this.recentBlockhash=void 0,this.payerKey=t.payerKey,this.instructions=t.instructions,this.recentBlockhash=t.recentBlockhash}return(0,h.Z)(e,[{key:"compileToLegacyMessage",value:function(){return ro.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions})}},{key:"compileToV0Message",value:function(e){return io.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions,addressLookupTableAccounts:e})}}],[{key:"decompile",value:function(t,n){var a=t.header,o=t.compiledInstructions,r=t.recentBlockhash,i=a.numRequiredSignatures,s=a.numReadonlySignedAccounts,c=a.numReadonlyUnsignedAccounts,d=i-s;no(d>0,"Message header is invalid");var l=t.staticAccountKeys.length-i-c;no(l>=0,"Message header is invalid");var f=t.getAccountKeys(n),p=f.get(0);if(void 0===p)throw new Error("Failed to decompile message because no account keys were found");var b,m=[],h=(0,u.Z)(o);try{for(h.s();!(b=h.n()).done;){var g,y=b.value,v=[],w=(0,u.Z)(y.accountKeyIndexes);try{for(w.s();!(g=w.n()).done;){var k=g.value,A=f.get(k);if(void 0===A)throw new Error("Failed to find key for account key index ".concat(k));var x=void 0;x=k=0,"Cannot sign with non signer key ".concat(e.publicKey.toBase58())),n.signatures[r]=Pa(a,e.secretKey)};for(r.s();!(t=r.n()).done;)i()}catch(s){r.e(s)}finally{r.f()}}},{key:"addSignature",value:function(e,t){no(64===t.byteLength,"Signature must be 64 bytes long");var n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex((function(t){return t.equals(e)}));no(n>=0,"Can not add signature; `".concat(e.toBase58(),"` is not required to sign this transaction")),this.signatures[n]=t}}],[{key:"deserialize",value:function(t){for(var n=(0,c.Z)(t),a=[],o=eo(n),r=0;r=0?e.layout.span:$a(e,t),a=g.lW.alloc(n),o=Object.assign({instruction:e.index},t);return e.layout.encode(o,a),a}function Co(e,t){var n;try{n=e.layout.decode(t)}catch(a){throw new Error("invalid instruction; "+a)}if(n.instruction!==e.index)throw new Error("invalid instruction; instruction index mismatch ".concat(n.instruction," != ").concat(e.index));return n}var Eo,Ro=at.nu64("lamportsPerSignature"),Mo=at.struct([at.u32("version"),at.u32("state"),Ja("authorizedPubkey"),Ja("nonce"),at.struct([Ro],"feeCalculator")]),Po=Mo.span,Uo=function(){function e(t){(0,m.Z)(this,e),this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=t.authorizedPubkey,this.nonce=t.nonce,this.feeCalculator=t.feeCalculator}return(0,h.Z)(e,null,[{key:"fromAccountData",value:function(t){var n=Mo.decode(_a(t),0);return new e({authorizedPubkey:new ja(n.authorizedPubkey),nonce:new ja(n.nonce).toString(),feeCalculator:n.feeCalculator})}}]),e}(),_o=(Eo=8,function(e){var t=(0,at.blob)(Eo,e),n=function(e){return{decode:e.decode.bind(e),encode:e.encode.bind(e)}}(t),a=n.encode,o=n.decode,r=t;return r.decode=function(e,t){var n=o(e,t);return(0,ot.toBigIntLE)(g.lW.from(n))},r.encode=function(e,t,n){var o=(0,ot.toBufferLE)(e,Eo);return a(o,t,n)},r}),Bo=function(){function e(){(0,m.Z)(this,e)}return(0,h.Z)(e,null,[{key:"decodeInstructionType",value:function(e){this.checkProgramId(e.programId);for(var t,n=at.u32("instruction").decode(e.data),a=0,o=Object.entries(Do);a0?s:1,space:i.length,programId:r}));case 17:if(null===u){t.next=20;break}return t.next=20,xo(n,u,[a,o],{commitment:"confirmed"});case 20:d=at.struct([at.u32("instruction"),at.u32("offset"),at.u32("bytesLength"),at.u32("bytesLengthPadding"),at.seq(at.u8("byte"),at.offset(at.u32(),-8),"bytes")]),f=e.chunkSize,p=0,b=i,m=[];case 25:if(!(b.length>0)){t.next=39;break}if(h=b.slice(0,f),y=g.lW.alloc(f+16),d.encode({instruction:0,offset:p,bytes:h,bytesLength:0,bytesLengthPadding:0},y),v=(new lo).add({keys:[{pubkey:o.publicKey,isSigner:!0,isWritable:!0}],programId:r,data:y}),m.push(xo(n,v,[a,o],{commitment:"confirmed"})),!n._rpcEndpoint.includes("solana.com")){t.next=35;break}return 4,t.next=35,To(250);case 35:p+=f,b=b.slice(f),t.next=25;break;case 39:return t.next=41,Promise.all(m);case 41:return w=at.struct([at.u32("instruction")]),k=g.lW.alloc(w.span),w.encode({instruction:1},k),A=(new lo).add({keys:[{pubkey:o.publicKey,isSigner:!0,isWritable:!0},{pubkey:yo,isSigner:!1,isWritable:!1}],programId:r,data:k}),t.next=47,xo(n,A,[a,o],{commitment:"confirmed"});case 47:return t.abrupt("return",!0);case 48:case"end":return t.stop()}}),t)})));return function(e,n,a,o,r){return t.apply(this,arguments)}}()}]),e}();Fo.chunkSize=Oo;var Lo=new ja("BPFLoader2111111111111111111111111111111111"),jo=function(){function e(){(0,m.Z)(this,e)}return(0,h.Z)(e,null,[{key:"getMinNumSignatures",value:function(e){return Fo.getMinNumSignatures(e)}},{key:"load",value:function(e,t,n,a,o){return Fo.load(e,t,n,o,a)}}]),e}(),Ho=Object.prototype.toString,Go=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function zo(e,t){var n,a,o,r,i,s,c;if(!0===e)return"true";if(!1===e)return"false";switch(typeof e){case"object":if(null===e)return null;if(e.toJSON&&"function"===typeof e.toJSON)return zo(e.toJSON(),t);if("[object Array]"===(c=Ho.call(e))){for(o="[",a=e.length-1,n=0;n-1&&(o+=zo(e[n],!0)),o+"]"}if("[object Object]"===c){for(a=(r=Go(e).sort()).length,o="",n=0;n1;)e/=2,t++;return t}var Zo=function(){function e(t,n,a,o,r){(0,m.Z)(this,e),this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=t,this.leaderScheduleSlotOffset=n,this.warmup=a,this.firstNormalEpoch=o,this.firstNormalSlot=r}return(0,h.Z)(e,[{key:"getEpoch",value:function(e){return this.getEpochAndSlotIndex(e)[0]}},{key:"getEpochAndSlotIndex",value:function(e){if(e>1,n|=n>>2,n|=n>>4,n|=n>>8,n|=n>>16,1+(n|=n>>32)))-Wo(32)-1;return[t,e-(this.getSlotsInEpoch(t)-32)]}var n,a=e-this.firstNormalSlot,o=Math.floor(a/this.slotsPerEpoch);return[this.firstNormalEpoch+o,a%this.slotsPerEpoch]}},{key:"getFirstSlotInEpoch",value:function(e){return e<=this.firstNormalEpoch?32*(Math.pow(2,e)-1):(e-this.firstNormalEpoch)*this.slotsPerEpoch+this.firstNormalSlot}},{key:"getLastSlotInEpoch",value:function(e){return this.getFirstSlotInEpoch(e)+this.getSlotsInEpoch(e)-1}},{key:"getSlotsInEpoch",value:function(e){return e0&&(o.until=i.signatures[i.signatures.length-1].toString()),e.next=22;break;case 15:if(e.prev=15,e.t0=e.catch(8),!(e.t0 instanceof Error&&e.t0.message.includes("skipped"))){e.next=21;break}return e.abrupt("continue",4);case 21:throw e.t0;case 22:e.next=4;break;case 24:return e.next=26,this.getSlot("finalized");case 26:s=e.sent;case 27:if("before"in o){e.next=47;break}if(!(++a>s)){e.next=31;break}return e.abrupt("break",47);case 31:return e.prev=31,e.next=34,this.getConfirmedBlockSignatures(a);case 34:(c=e.sent).signatures.length>0&&(o.before=c.signatures[c.signatures.length-1].toString()),e.next=45;break;case 38:if(e.prev=38,e.t1=e.catch(31),!(e.t1 instanceof Error&&e.t1.message.includes("skipped"))){e.next=44;break}return e.abrupt("continue",27);case 44:throw e.t1;case 45:e.next=27;break;case 47:return e.next=49,this.getConfirmedSignaturesForAddress2(t,o);case 49:return u=e.sent,e.abrupt("return",u.map((function(e){return e.signature})));case 51:case"end":return e.stop()}}),e,this,[[8,15],[31,38]])})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getConfirmedSignaturesForAddress2",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n,a){var o,r,i;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this._buildArgsAtLeastConfirmed([t.toBase58()],a,void 0,n),e.next=3,this._rpcRequest("getConfirmedSignaturesForAddress2",o);case 3:if(r=e.sent,!("error"in(i=yt(r,zr)))){e.next=7;break}throw new Qo(i.error,"failed to get confirmed signatures for address");case 7:return e.abrupt("return",i.result);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getSignaturesForAddress",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n,a){var o,r,i;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this._buildArgsAtLeastConfirmed([t.toBase58()],a,void 0,n),e.next=3,this._rpcRequest("getSignaturesForAddress",o);case 3:if(r=e.sent,!("error"in(i=yt(r,Kr)))){e.next=7;break}throw new Qo(i.error,"failed to get signatures for address");case 7:return e.abrupt("return",i.result);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getAddressLookupTable",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n){var a,o,r,i;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccountInfoAndContext(t,n);case 2:return a=e.sent,o=a.context,r=a.value,i=null,null!==r&&(i=new Xo({key:t,state:Xo.deserialize(r.data)})),e.abrupt("return",{context:o,value:i});case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getNonceAndContext",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n){var a,o,r,i;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccountInfoAndContext(t,n);case 2:return a=e.sent,o=a.context,r=a.value,i=null,null!==r&&(i=Uo.fromAccountData(r.data)),e.abrupt("return",{context:o,value:i});case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getNonce",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNonceAndContext(t,n).then((function(e){return e.value})).catch((function(e){throw new Error("failed to get nonce for account "+t.toBase58()+": "+e)}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"requestAirdrop",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n){var a,o;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._rpcRequest("requestAirdrop",[t.toBase58(),n]);case 2:if(a=e.sent,!("error"in(o=yt(a,Di)))){e.next=6;break}throw new Qo(o.error,"airdrop to ".concat(t.toBase58()," failed"));case 6:return e.abrupt("return",o.result);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_blockhashWithExpiryBlockHeight",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){var n,a;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=10;break}case 1:if(!this._pollingBlockhash){e.next=6;break}return e.next=4,To(100);case 4:e.next=1;break;case 6:if(n=Date.now()-this._blockhashInfo.lastFetch,a=n>=or,null===this._blockhashInfo.latestBlockhash||a){e.next=10;break}return e.abrupt("return",this._blockhashInfo.latestBlockhash);case 10:return e.next=12,this._pollNewBlockhash();case 12:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_pollNewBlockhash",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(){var t,n,a,o,r;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._pollingBlockhash=!0,e.prev=1,t=Date.now(),n=this._blockhashInfo.latestBlockhash,a=n?n.blockhash:null,o=0;case 6:if(!(o<50)){e.next=18;break}return e.next=9,this.getLatestBlockhash("finalized");case 9:if(r=e.sent,a===r.blockhash){e.next=13;break}return this._blockhashInfo={latestBlockhash:r,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]},e.abrupt("return",r);case 13:return e.next=15,To(200);case 15:o++,e.next=6;break;case 18:throw new Error("Unable to obtain a new blockhash after ".concat(Date.now()-t,"ms"));case 19:return e.prev=19,this._pollingBlockhash=!1,e.finish(19);case 22:case"end":return e.stop()}}),e,this,[[1,,19,22]])})));return function(){return e.apply(this,arguments)}}()},{key:"getStakeMinimumDelegation",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){var n,a,o,r,i,s;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=rr(t),a=n.commitment,o=n.config,r=this._buildArgs([],a,"base64",o),e.next=4,this._rpcRequest("getStakeMinimumDelegation",r);case 4:if(i=e.sent,!("error"in(s=yt(i,ur(Et()))))){e.next=8;break}throw new Qo(s.error,"failed to get stake minimum delegation");case 8:return e.abrupt("return",s.result);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"simulateTransaction",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n,a){var o,r,i,s,u,d,f,p,b,m,h,y,v,w,k,A,x,I,T,S,C,E,R,M,P,U;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("message"in t)){e.next=17;break}if(o=t.serialize(),r=g.lW.from(o).toString("base64"),!Array.isArray(n)&&void 0===a){e.next=6;break}throw new Error("Invalid arguments");case 6:return(i=n||{}).encoding="base64","commitment"in i||(i.commitment=this.commitment),s=[r,i],e.next=12,this._rpcRequest("simulateTransaction",s);case 12:if(u=e.sent,!("error"in(d=yt(u,Ar)))){e.next=16;break}throw new Error("failed to simulate transaction: "+d.error.message);case 16:return e.abrupt("return",d.result);case 17:if(t instanceof lo?(p=t,(f=new lo).feePayer=p.feePayer,f.instructions=t.instructions,f.nonceInfo=p.nonceInfo,f.signatures=p.signatures):(f=lo.populate(t))._message=f._json=void 0,void 0===n||Array.isArray(n)){e.next=20;break}throw new Error("Invalid arguments");case 20:if(b=n,!f.nonceInfo||!b){e.next=25;break}(m=f).sign.apply(m,(0,c.Z)(b)),e.next=45;break;case 25:h=this._disableBlockhashCaching;case 26:return e.next=28,this._blockhashWithExpiryBlockHeight(h);case 28:if(v=e.sent,f.lastValidBlockHeight=v.lastValidBlockHeight,f.recentBlockhash=v.blockhash,b){e.next=33;break}return e.abrupt("break",45);case 33:if((y=f).sign.apply(y,(0,c.Z)(b)),f.signature){e.next=36;break}throw new Error("!signature");case 36:if(w=f.signature.toString("base64"),this._blockhashInfo.simulatedSignatures.includes(w)||this._blockhashInfo.transactionSignatures.includes(w)){e.next=42;break}return this._blockhashInfo.simulatedSignatures.push(w),e.abrupt("break",45);case 42:h=!0;case 43:e.next=26;break;case 45:return k=f._compile(),A=k.serialize(),x=f._serialize(A),I=x.toString("base64"),T={encoding:"base64",commitment:this.commitment},a&&(S=(Array.isArray(a)?a:k.nonProgramIds()).map((function(e){return e.toBase58()})),T.accounts={encoding:"base64",addresses:S}),b&&(T.sigVerify=!0),C=[I,T],e.next=55,this._rpcRequest("simulateTransaction",C);case 55:if(E=e.sent,!("error"in(R=yt(E,Ar)))){e.next=60;break}throw"data"in R.error&&(M=R.error.data.logs)&&Array.isArray(M)&&(U=(P="\n ")+M.join(P),ka.error(R.error.message,U)),new Vo("failed to simulate transaction: "+R.error.message,M);case 60:return e.abrupt("return",R.result);case 61:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"sendTransaction",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n,a){var o,r,i,s,u,d;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("version"in t)){e.next=7;break}if(!n||!Array.isArray(n)){e.next=3;break}throw new Error("Invalid arguments");case 3:return o=t.serialize(),e.next=6,this.sendRawTransaction(o,n);case 6:return e.abrupt("return",e.sent);case 7:if(void 0!==n&&Array.isArray(n)){e.next=9;break}throw new Error("Invalid arguments");case 9:if(r=n,!t.nonceInfo){e.next=14;break}t.sign.apply(t,(0,c.Z)(r)),e.next=32;break;case 14:i=this._disableBlockhashCaching;case 15:return e.next=17,this._blockhashWithExpiryBlockHeight(i);case 17:if(s=e.sent,t.lastValidBlockHeight=s.lastValidBlockHeight,t.recentBlockhash=s.blockhash,t.sign.apply(t,(0,c.Z)(r)),t.signature){e.next=23;break}throw new Error("!signature");case 23:if(u=t.signature.toString("base64"),this._blockhashInfo.transactionSignatures.includes(u)){e.next=29;break}return this._blockhashInfo.transactionSignatures.push(u),e.abrupt("break",32);case 29:i=!0;case 30:e.next=15;break;case 32:return d=t.serialize(),e.next=35,this.sendRawTransaction(d,a);case 35:return e.abrupt("return",e.sent);case 36:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"sendRawTransaction",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n){var a,o;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=_a(t).toString("base64"),e.next=3,this.sendEncodedTransaction(a,n);case 3:return o=e.sent,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"sendEncodedTransaction",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n){var a,o,r,i,s,c,u;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={encoding:"base64"},o=n&&n.skipPreflight,r=n&&n.preflightCommitment||this.commitment,n&&null!=n.maxRetries&&(a.maxRetries=n.maxRetries),n&&null!=n.minContextSlot&&(a.minContextSlot=n.minContextSlot),o&&(a.skipPreflight=o),r&&(a.preflightCommitment=r),i=[t,a],e.next=10,this._rpcRequest("sendTransaction",i);case 10:if(s=e.sent,!("error"in(c=yt(s,Ni)))){e.next=15;break}throw"data"in c.error&&(u=c.error.data.logs),new Vo("failed to send transaction: "+c.error.message,u);case 15:return e.abrupt("return",c.result);case 16:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_wsOnOpen",value:function(){var e=this;this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval((function(){(0,f.Z)((0,l.Z)().mark((function t(){return(0,l.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._rpcWebSocket.notify("ping");case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),t,null,[[0,5]])})))()}),5e3),this._updateSubscriptions()}},{key:"_wsOnError",value:function(e){this._rpcWebSocketConnected=!1,ka.error("ws error:",e.message)}},{key:"_wsOnClose",value:function(e){var t=this;this._rpcWebSocketConnected=!1,this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER,this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null),this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),1e3!==e?(this._subscriptionCallbacksByServerSubscriptionId={},Object.entries(this._subscriptionsByHash).forEach((function(e){var n=(0,s.Z)(e,2),a=n[0],o=n[1];t._setSubscription(a,(0,i.Z)((0,i.Z)({},o),{},{state:"pending"}))}))):this._updateSubscriptions()}},{key:"_setSubscription",value:function(e,t){var n,a=null===(n=this._subscriptionsByHash[e])||void 0===n?void 0:n.state;if(this._subscriptionsByHash[e]=t,a!==t.state){var o=this._subscriptionStateChangeCallbacksByHash[e];o&&o.forEach((function(e){try{e(t.state)}catch(n){}}))}}},{key:"_onSubscriptionStateChange",value:function(e,t){var n,a=this,o=this._subscriptionHashByClientSubscriptionId[e];if(null==o)return function(){};var r=(n=this._subscriptionStateChangeCallbacksByHash)[o]||(n[o]=new Set);return r.add(t),function(){r.delete(t),0===r.size&&delete a._subscriptionStateChangeCallbacksByHash[o]}}},{key:"_updateSubscriptions",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(){var t,n,a=this;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==Object.keys(this._subscriptionsByHash).length){e.next=3;break}return this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout((function(){a._rpcWebSocketIdleTimeout=null;try{a._rpcWebSocket.close()}catch(e){e instanceof Error&&ka.log("Error when closing socket connection: ".concat(e.message))}}),500)),e.abrupt("return");case 3:if(null!==this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),this._rpcWebSocketConnected){e.next=7;break}return this._rpcWebSocket.connect(),e.abrupt("return");case 7:return t=this._rpcWebSocketGeneration,n=function(){return t===a._rpcWebSocketGeneration},e.next=11,Promise.all(Object.keys(this._subscriptionsByHash).map(function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){var o;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==(o=a._subscriptionsByHash[t])){e.next=3;break}return e.abrupt("return");case 3:e.t0=o.state,e.next="pending"===e.t0||"unsubscribed"===e.t0?6:"subscribed"===e.t0?15:19;break;case 6:if(0!==o.callbacks.size){e.next=12;break}return delete a._subscriptionsByHash[t],"unsubscribed"===o.state&&delete a._subscriptionCallbacksByServerSubscriptionId[o.serverSubscriptionId],e.next=11,a._updateSubscriptions();case 11:return e.abrupt("return");case 12:return e.next=14,(0,f.Z)((0,l.Z)().mark((function e(){var r,s,c;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.args,s=o.method,e.prev=1,a._setSubscription(t,(0,i.Z)((0,i.Z)({},o),{},{state:"subscribing"})),e.next=5,a._rpcWebSocket.call(s,r);case 5:return c=e.sent,a._setSubscription(t,(0,i.Z)((0,i.Z)({},o),{},{serverSubscriptionId:c,state:"subscribed"})),a._subscriptionCallbacksByServerSubscriptionId[c]=o.callbacks,e.next=10,a._updateSubscriptions();case 10:e.next=20;break;case 12:if(e.prev=12,e.t0=e.catch(1),e.t0 instanceof Error&&ka.error("".concat(s," error for argument"),r,e.t0.message),n()){e.next=17;break}return e.abrupt("return");case 17:return a._setSubscription(t,(0,i.Z)((0,i.Z)({},o),{},{state:"pending"})),e.next=20,a._updateSubscriptions();case 20:case"end":return e.stop()}}),e,null,[[1,12]])})))();case 14:case 18:return e.abrupt("break",19);case 15:if(0!==o.callbacks.size){e.next=18;break}return e.next=18,(0,f.Z)((0,l.Z)().mark((function e(){var r,s;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=o.serverSubscriptionId,s=o.unsubscribeMethod,!a._subscriptionsAutoDisposedByRpc.has(r)){e.next=5;break}a._subscriptionsAutoDisposedByRpc.delete(r),e.next=21;break;case 5:return a._setSubscription(t,(0,i.Z)((0,i.Z)({},o),{},{state:"unsubscribing"})),a._setSubscription(t,(0,i.Z)((0,i.Z)({},o),{},{state:"unsubscribing"})),e.prev=7,e.next=10,a._rpcWebSocket.call(s,[r]);case 10:e.next=21;break;case 12:if(e.prev=12,e.t0=e.catch(7),e.t0 instanceof Error&&ka.error("".concat(s," error:"),e.t0.message),n()){e.next=17;break}return e.abrupt("return");case 17:return a._setSubscription(t,(0,i.Z)((0,i.Z)({},o),{},{state:"subscribed"})),e.next=20,a._updateSubscriptions();case 20:return e.abrupt("return");case 21:return a._setSubscription(t,(0,i.Z)((0,i.Z)({},o),{},{state:"unsubscribed"})),e.next=24,a._updateSubscriptions();case 24:case"end":return e.stop()}}),e,null,[[7,12]])})))();case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_handleServerNotification",value:function(e,t){var n=this._subscriptionCallbacksByServerSubscriptionId[e];void 0!==n&&n.forEach((function(e){try{e.apply(void 0,(0,c.Z)(t))}catch(n){ka.error(n)}}))}},{key:"_wsOnAccountNotification",value:function(e){var t=yt(e,Wr),n=t.result,a=t.subscription;this._handleServerNotification(a,[n.value,n.context])}},{key:"_makeSubscription",value:function(e,t){var n=this,a=this._nextClientSubscriptionId++,o=Ko([e.method,t]),r=this._subscriptionsByHash[o];return void 0===r?this._subscriptionsByHash[o]=(0,i.Z)((0,i.Z)({},e),{},{args:t,callbacks:new Set([e.callback]),state:"pending"}):r.callbacks.add(e.callback),this._subscriptionHashByClientSubscriptionId[a]=o,this._subscriptionDisposeFunctionsByClientSubscriptionId[a]=(0,f.Z)((0,l.Z)().mark((function t(){var r;return(0,l.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return delete n._subscriptionDisposeFunctionsByClientSubscriptionId[a],delete n._subscriptionHashByClientSubscriptionId[a],no(void 0!==(r=n._subscriptionsByHash[o]),"Could not find a `Subscription` when tearing down client subscription #".concat(a)),r.callbacks.delete(e.callback),t.next=7,n._updateSubscriptions();case 7:case"end":return t.stop()}}),t)}))),this._updateSubscriptions(),a}},{key:"onAccountChange",value:function(e,t,n){var a=this._buildArgs([e.toBase58()],n||this._commitment||"finalized","base64");return this._makeSubscription({callback:t,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},a)}},{key:"removeAccountChangeListener",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._unsubscribeClientSubscription(t,"account change");case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_wsOnProgramAccountNotification",value:function(e){var t=yt(e,Vr),n=t.result,a=t.subscription;this._handleServerNotification(a,[{accountId:n.value.pubkey,accountInfo:n.value.account},n.context])}},{key:"onProgramAccountChange",value:function(e,t,n,a){var o=this._buildArgs([e.toBase58()],n||this._commitment||"finalized","base64",a?{filters:a}:void 0);return this._makeSubscription({callback:t,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},o)}},{key:"removeProgramAccountChangeListener",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._unsubscribeClientSubscription(t,"program account change");case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onLogs",value:function(e,t,n){var a=this._buildArgs(["object"===typeof e?{mentions:[e.toString()]}:e],n||this._commitment||"finalized");return this._makeSubscription({callback:t,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},a)}},{key:"removeOnLogsListener",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._unsubscribeClientSubscription(t,"logs");case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_wsOnLogsNotification",value:function(e){var t=yt(e,Fi),n=t.result,a=t.subscription;this._handleServerNotification(a,[n.value,n.context])}},{key:"_wsOnSlotNotification",value:function(e){var t=yt(e,Qr),n=t.result,a=t.subscription;this._handleServerNotification(a,[n])}},{key:"onSlotChange",value:function(e){return this._makeSubscription({callback:e,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}},{key:"removeSlotChangeListener",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._unsubscribeClientSubscription(t,"slot change");case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_wsOnSlotUpdatesNotification",value:function(e){var t=yt(e,Yr),n=t.result,a=t.subscription;this._handleServerNotification(a,[n])}},{key:"onSlotUpdate",value:function(e){return this._makeSubscription({callback:e,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}},{key:"removeSlotUpdateListener",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._unsubscribeClientSubscription(t,"slot update");case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_unsubscribeClientSubscription",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t,n){var a;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a=this._subscriptionDisposeFunctionsByClientSubscriptionId[t])){e.next=6;break}return e.next=4,a();case 4:e.next=7;break;case 6:ka.warn("Ignored unsubscribe request because an active subscription with id "+"`".concat(t,"` for '").concat(n,"' events ")+"could not be found.");case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_buildArgs",value:function(e,t,n,a){var o=t||this._commitment;if(o||n||a){var r={};n&&(r.encoding=n),o&&(r.commitment=o),a&&(r=Object.assign(r,a)),e.push(r)}return e}},{key:"_buildArgsAtLeastConfirmed",value:function(e,t,n,a){var o=t||this._commitment;if(o&&!["confirmed","finalized"].includes(o))throw new Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`");return this._buildArgs(e,t,n,a)}},{key:"_wsOnSignatureNotification",value:function(e){var t=yt(e,Xr),n=t.result,a=t.subscription;"receivedSignature"!==n.value&&this._subscriptionsAutoDisposedByRpc.add(a),this._handleServerNotification(a,"receivedSignature"===n.value?[{type:"received"},n.context]:[{type:"status",result:n.value},n.context])}},{key:"onSignature",value:function(e,t,n){var a=this,o=this._buildArgs([e],n||this._commitment||"finalized"),r=this._makeSubscription({callback:function(e,n){if("status"===e.type){t(e.result,n);try{a.removeSignatureListener(r)}catch(o){}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},o);return r}},{key:"onSignatureWithOptions",value:function(e,t,n){var o=this,r=(0,i.Z)((0,i.Z)({},n),{},{commitment:n&&n.commitment||this._commitment||"finalized"}),s=r.commitment,c=(0,a.Z)(r,Ta),u=this._buildArgs([e],s,void 0,c),d=this._makeSubscription({callback:function(e,n){t(e,n);try{o.removeSignatureListener(d)}catch(a){}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},u);return d}},{key:"removeSignatureListener",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._unsubscribeClientSubscription(t,"signature result");case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_wsOnRootNotification",value:function(e){var t=yt(e,$r),n=t.result,a=t.subscription;this._handleServerNotification(a,[n])}},{key:"onRootChange",value:function(e){return this._makeSubscription({callback:e,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}},{key:"removeRootChangeListener",value:function(){var e=(0,f.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._unsubscribeClientSubscription(t,"root change");case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Hi=function(){function e(t){(0,m.Z)(this,e),this._keypair=void 0,this._keypair=null!==t&&void 0!==t?t:Ca()}return(0,h.Z)(e,[{key:"publicKey",get:function(){return new ja(this._keypair.publicKey)}},{key:"secretKey",get:function(){return new Uint8Array(this._keypair.secretKey)}}],[{key:"generate",value:function(){return new e(Ca())}},{key:"fromSecretKey",value:function(t,n){if(64!==t.byteLength)throw new Error("bad secret key size");var a=t.slice(32,64);if(!n||!n.skipValidation)for(var o=t.slice(0,32),r=Ea(o),i=0;i<32;i++)if(a[i]!==r[i])throw new Error("provided secretKey is invalid");return new e({publicKey:a,secretKey:t})}},{key:"fromSeed",value:function(t){var n=Ea(t),a=new Uint8Array(64);return a.set(t),a.set(n,32),new e({publicKey:n,secretKey:a})}}]),e}(),Gi=Object.freeze({CreateLookupTable:{index:0,layout:at.struct([at.u32("instruction"),_o("recentSlot"),at.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:at.struct([at.u32("instruction")])},ExtendLookupTable:{index:2,layout:at.struct([at.u32("instruction"),_o(),at.seq(Ja(),at.offset(at.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:at.struct([at.u32("instruction")])},CloseLookupTable:{index:4,layout:at.struct([at.u32("instruction")])}}),zi=function(){function e(){(0,m.Z)(this,e)}return(0,h.Z)(e,null,[{key:"decodeInstructionType",value:function(e){this.checkProgramId(e.programId);for(var t,n=at.u32("instruction").decode(e.data),a=0,o=Object.entries(Gi);a2?e.keys[2].pubkey:void 0,addresses:t.map((function(e){return new ja(e)}))}}},{key:"decodeCloseLookupTable",value:function(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,3),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey,recipient:e.keys[2].pubkey}}},{key:"decodeFreezeLookupTable",value:function(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}},{key:"decodeDeactivateLookupTable",value:function(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}},{key:"checkProgramId",value:function(e){if(!e.equals(Ki.programId))throw new Error("invalid instruction; programId is not AddressLookupTable Program")}},{key:"checkKeysLength",value:function(e,t){if(e.length1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:{},o=ha(e,t,a.extraEntropy),r=o.seed,i=o.m,s=o.d,c=new sa(Rn,En);for(c.reseedSync(r);!(n=da(c.generateSync(),i,s,a.canonical));)c.reseedSync();return ga(n,a)}(e,t,{der:!1,recovered:!0})};wa.isValidPrivateKey;var Yi=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Ln.fromPrivateKey(e).toRawBytes(t)},Xi=at.struct([at.u8("numSignatures"),at.u16("signatureOffset"),at.u8("signatureInstructionIndex"),at.u16("ethAddressOffset"),at.u8("ethAddressInstructionIndex"),at.u16("messageDataOffset"),at.u16("messageDataSize"),at.u8("messageInstructionIndex"),at.blob(20,"ethAddress"),at.blob(64,"signature"),at.u8("recoveryId")]),$i=function(){function e(){(0,m.Z)(this,e)}return(0,h.Z)(e,null,[{key:"publicKeyToEthAddress",value:function(e){no(64===e.length,"Public key must be ".concat(64," bytes but received ").concat(e.length," bytes"));try{return g.lW.from(fn(_a(e))).slice(-20)}catch(t){throw new Error("Error constructing Ethereum address: ".concat(t))}}},{key:"createInstructionWithPublicKey",value:function(t){var n=t.publicKey,a=t.message,o=t.signature,r=t.recoveryId,i=t.instructionIndex;return e.createInstructionWithEthAddress({ethAddress:e.publicKeyToEthAddress(n),message:a,signature:o,recoveryId:r,instructionIndex:i})}},{key:"createInstructionWithEthAddress",value:function(t){var n,a=t.ethAddress,o=t.message,r=t.signature,i=t.recoveryId,s=t.instructionIndex,c=void 0===s?0:s;no(20===(n="string"===typeof a?a.startsWith("0x")?g.lW.from(a.substr(2),"hex"):g.lW.from(a,"hex"):a).length,"Address must be ".concat(20," bytes but received ").concat(n.length," bytes"));var u=12+n.length,d=u+r.length+1,l=g.lW.alloc(Xi.span+o.length);return Xi.encode({numSignatures:1,signatureOffset:u,signatureInstructionIndex:c,ethAddressOffset:12,ethAddressInstructionIndex:c,messageDataOffset:d,messageDataSize:o.length,messageInstructionIndex:c,signature:_a(r),ethAddress:_a(n),recoveryId:i},l),l.fill(_a(o),Xi.span),new uo({keys:[],programId:e.programId,data:l})}},{key:"createInstructionWithPrivateKey",value:function(e){var t=e.privateKey,n=e.message,a=e.instructionIndex;no(32===t.length,"Private key must be ".concat(32," bytes but received ").concat(t.length," bytes"));try{var o=_a(t),r=Yi(o,!1).slice(1),i=g.lW.from(fn(_a(n))),c=Ji(i,o),u=(0,s.Z)(c,2),d=u[0],l=u[1];return this.createInstructionWithPublicKey({publicKey:r,message:n,signature:d,recoveryId:l,instructionIndex:a})}catch(f){throw new Error("Error creating instruction; ".concat(f))}}}]),e}();$i.programId=new ja("KeccakSecp256k11111111111111111111111111111");var es=new ja("StakeConfig11111111111111111111111111111111"),ts=(0,h.Z)((function e(t,n){(0,m.Z)(this,e),this.staker=void 0,this.withdrawer=void 0,this.staker=t,this.withdrawer=n})),ns=(0,h.Z)((function e(t,n,a){(0,m.Z)(this,e),this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=n,this.custodian=a}));ns.default=new ns(0,0,ja.default);var as=function(){function e(){(0,m.Z)(this,e)}return(0,h.Z)(e,null,[{key:"decodeInstructionType",value:function(e){this.checkProgramId(e.programId);for(var t,n=at.u32("instruction").decode(e.data),a=0,o=Object.entries(os);a3&&(o.custodianPubkey=e.keys[3].pubkey),o}},{key:"decodeAuthorizeWithSeed",value:function(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);var t=Co(os.AuthorizeWithSeed,e.data),n=t.newAuthorized,a=t.stakeAuthorizationType,o=t.authoritySeed,r=t.authorityOwner,i={stakePubkey:e.keys[0].pubkey,authorityBase:e.keys[1].pubkey,authoritySeed:o,authorityOwner:new ja(r),newAuthorizedPubkey:new ja(n),stakeAuthorizationType:{index:a}};return e.keys.length>3&&(i.custodianPubkey=e.keys[3].pubkey),i}},{key:"decodeSplit",value:function(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);var t=Co(os.Split,e.data).lamports;return{stakePubkey:e.keys[0].pubkey,splitStakePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[2].pubkey,lamports:t}}},{key:"decodeMerge",value:function(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Co(os.Merge,e.data),{stakePubkey:e.keys[0].pubkey,sourceStakePubKey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey}}},{key:"decodeWithdraw",value:function(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);var t=Co(os.Withdraw,e.data).lamports,n={stakePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t};return e.keys.length>5&&(n.custodianPubkey=e.keys[5].pubkey),n}},{key:"decodeDeactivate",value:function(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Co(os.Deactivate,e.data),{stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}},{key:"checkProgramId",value:function(e){if(!e.equals(is.programId))throw new Error("invalid instruction; programId is not StakeProgram")}},{key:"checkKeyLength",value:function(e,t){if(e.length0&&void 0!==arguments[0]?arguments[0]:"authorized";return at.struct([Ja("staker"),Ja("withdrawer")],e)}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lockup";return at.struct([at.ns64("unixTimestamp"),at.ns64("epoch"),Ja("custodian")],e)}()])},Authorize:{index:1,layout:at.struct([at.u32("instruction"),Ja("newAuthorized"),at.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:at.struct([at.u32("instruction")])},Split:{index:3,layout:at.struct([at.u32("instruction"),at.ns64("lamports")])},Withdraw:{index:4,layout:at.struct([at.u32("instruction"),at.ns64("lamports")])},Deactivate:{index:5,layout:at.struct([at.u32("instruction")])},Merge:{index:7,layout:at.struct([at.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:at.struct([at.u32("instruction"),Ja("newAuthorized"),at.u32("stakeAuthorizationType"),Xa("authoritySeed"),Ja("authorityOwner")])}}),rs=Object.freeze({Staker:{index:0},Withdrawer:{index:1}}),is=function(){function e(){(0,m.Z)(this,e)}return(0,h.Z)(e,null,[{key:"initialize",value:function(e){var t=e.stakePubkey,n=e.authorized,a=e.lockup||ns.default,o=So(os.Initialize,{authorized:{staker:_a(n.staker.toBuffer()),withdrawer:_a(n.withdrawer.toBuffer())},lockup:{unixTimestamp:a.unixTimestamp,epoch:a.epoch,custodian:_a(a.custodian.toBuffer())}}),r={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:yo,isSigner:!1,isWritable:!1}],programId:this.programId,data:o};return new uo(r)}},{key:"createAccountWithSeed",value:function(e){var t=new lo;t.add(No.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:this.space,programId:this.programId}));var n=e.stakePubkey,a=e.authorized,o=e.lockup;return t.add(this.initialize({stakePubkey:n,authorized:a,lockup:o}))}},{key:"createAccount",value:function(e){var t=new lo;t.add(No.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,lamports:e.lamports,space:this.space,programId:this.programId}));var n=e.stakePubkey,a=e.authorized,o=e.lockup;return t.add(this.initialize({stakePubkey:n,authorized:a,lockup:o}))}},{key:"delegate",value:function(e){var t=e.stakePubkey,n=e.authorizedPubkey,a=e.votePubkey,o=So(os.Delegate);return(new lo).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!1},{pubkey:bo,isSigner:!1,isWritable:!1},{pubkey:Ao,isSigner:!1,isWritable:!1},{pubkey:es,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}},{key:"authorize",value:function(e){var t=e.stakePubkey,n=e.authorizedPubkey,a=e.newAuthorizedPubkey,o=e.stakeAuthorizationType,r=e.custodianPubkey,i=So(os.Authorize,{newAuthorized:_a(a.toBuffer()),stakeAuthorizationType:o.index}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:bo,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}];return r&&s.push({pubkey:r,isSigner:!1,isWritable:!1}),(new lo).add({keys:s,programId:this.programId,data:i})}},{key:"authorizeWithSeed",value:function(e){var t=e.stakePubkey,n=e.authorityBase,a=e.authoritySeed,o=e.authorityOwner,r=e.newAuthorizedPubkey,i=e.stakeAuthorizationType,s=e.custodianPubkey,c=So(os.AuthorizeWithSeed,{newAuthorized:_a(r.toBuffer()),stakeAuthorizationType:i.index,authoritySeed:a,authorityOwner:_a(o.toBuffer())}),u=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1},{pubkey:bo,isSigner:!1,isWritable:!1}];return s&&u.push({pubkey:s,isSigner:!1,isWritable:!1}),(new lo).add({keys:u,programId:this.programId,data:c})}},{key:"splitInstruction",value:function(e){var t=e.stakePubkey,n=e.authorizedPubkey,a=e.splitStakePubkey,o=e.lamports,r=So(os.Split,{lamports:o});return new uo({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}},{key:"split",value:function(e){var t=new lo;return t.add(No.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:0,space:this.space,programId:this.programId})),t.add(this.splitInstruction(e))}},{key:"splitWithSeed",value:function(e){var t=e.stakePubkey,n=e.authorizedPubkey,a=e.splitStakePubkey,o=e.basePubkey,r=e.seed,i=e.lamports,s=new lo;return s.add(No.allocate({accountPubkey:a,basePubkey:o,seed:r,space:this.space,programId:this.programId})),s.add(this.splitInstruction({stakePubkey:t,authorizedPubkey:n,splitStakePubkey:a,lamports:i}))}},{key:"merge",value:function(e){var t=e.stakePubkey,n=e.sourceStakePubKey,a=e.authorizedPubkey,o=So(os.Merge);return(new lo).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:bo,isSigner:!1,isWritable:!1},{pubkey:Ao,isSigner:!1,isWritable:!1},{pubkey:a,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}},{key:"withdraw",value:function(e){var t=e.stakePubkey,n=e.authorizedPubkey,a=e.toPubkey,o=e.lamports,r=e.custodianPubkey,i=So(os.Withdraw,{lamports:o}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:bo,isSigner:!1,isWritable:!1},{pubkey:Ao,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return r&&s.push({pubkey:r,isSigner:!1,isWritable:!1}),(new lo).add({keys:s,programId:this.programId,data:i})}},{key:"deactivate",value:function(e){var t=e.stakePubkey,n=e.authorizedPubkey,a=So(os.Deactivate);return(new lo).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:bo,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}}]),e}();is.programId=new ja("Stake11111111111111111111111111111111111111"),is.space=200;var ss=(0,h.Z)((function e(t,n,a,o){(0,m.Z)(this,e),this.nodePubkey=void 0,this.authorizedVoter=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.nodePubkey=t,this.authorizedVoter=n,this.authorizedWithdrawer=a,this.commission=o})),cs=function(){function e(){(0,m.Z)(this,e)}return(0,h.Z)(e,null,[{key:"decodeInstructionType",value:function(e){this.checkProgramId(e.programId);for(var t,n=at.u32("instruction").decode(e.data),a=0,o=Object.entries(us);a0&&void 0!==arguments[0]?arguments[0]:"voteInit";return at.struct([Ja("nodePubkey"),Ja("authorizedVoter"),Ja("authorizedWithdrawer"),at.u8("commission")],e)}()])},Authorize:{index:1,layout:at.struct([at.u32("instruction"),Ja("newAuthorized"),at.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:at.struct([at.u32("instruction"),at.ns64("lamports")])},AuthorizeWithSeed:{index:10,layout:at.struct([at.u32("instruction"),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"voteAuthorizeWithSeedArgs";return at.struct([at.u32("voteAuthorizationType"),Ja("currentAuthorityDerivedKeyOwnerPubkey"),Xa("currentAuthorityDerivedKeySeed"),Ja("newAuthorized")],e)}()])}}),ds=Object.freeze({Voter:{index:0},Withdrawer:{index:1}}),ls=function(){function e(){(0,m.Z)(this,e)}return(0,h.Z)(e,null,[{key:"initializeAccount",value:function(e){var t=e.votePubkey,n=e.nodePubkey,a=e.voteInit,o=So(us.InitializeAccount,{voteInit:{nodePubkey:_a(a.nodePubkey.toBuffer()),authorizedVoter:_a(a.authorizedVoter.toBuffer()),authorizedWithdrawer:_a(a.authorizedWithdrawer.toBuffer()),commission:a.commission}}),r={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:yo,isSigner:!1,isWritable:!1},{pubkey:bo,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:o};return new uo(r)}},{key:"createAccount",value:function(e){var t=new lo;return t.add(No.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),t.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}},{key:"authorize",value:function(e){var t=e.votePubkey,n=e.authorizedPubkey,a=e.newAuthorizedPubkey,o=e.voteAuthorizationType,r=So(us.Authorize,{newAuthorized:_a(a.toBuffer()),voteAuthorizationType:o.index}),i=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:bo,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return(new lo).add({keys:i,programId:this.programId,data:r})}},{key:"authorizeWithSeed",value:function(e){var t=e.currentAuthorityDerivedKeyBasePubkey,n=e.currentAuthorityDerivedKeyOwnerPubkey,a=e.currentAuthorityDerivedKeySeed,o=e.newAuthorizedPubkey,r=e.voteAuthorizationType,i=e.votePubkey,s=So(us.AuthorizeWithSeed,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:_a(n.toBuffer()),currentAuthorityDerivedKeySeed:a,newAuthorized:_a(o.toBuffer()),voteAuthorizationType:r.index}}),c=[{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:bo,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!0,isWritable:!1}];return(new lo).add({keys:c,programId:this.programId,data:s})}},{key:"withdraw",value:function(e){var t=e.votePubkey,n=e.authorizedWithdrawerPubkey,a=e.lamports,o=e.toPubkey,r=So(us.Withdraw,{lamports:a}),i=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}];return(new lo).add({keys:i,programId:this.programId,data:r})}},{key:"safeWithdraw",value:function(t,n,a){if(t.lamports>n-a)throw new Error("Withdraw will leave vote account with insuffcient funds.");return e.withdraw(t)}}]),e}();ls.programId=new ja("Vote111111111111111111111111111111111111111"),ls.space=3731;var fs=new ja("Va1idator1nfo111111111111111111111111111111"),ps=_t({name:Pt(),website:Rt(Pt()),details:Rt(Pt()),keybaseUsername:Rt(Pt())}),bs=function(){function e(t,n){(0,m.Z)(this,e),this.key=void 0,this.info=void 0,this.key=t,this.info=n}return(0,h.Z)(e,null,[{key:"fromConfigData",value:function(t){var n=(0,c.Z)(t);if(2!==eo(n))return null;for(var a=[],o=0;o<2;o++){var r=new ja(n.slice(0,Fa)),i=1===(n=n.slice(Fa)).slice(0,1)[0];n=n.slice(1),a.push({publicKey:r,isSigner:i})}if(a[0].publicKey.equals(fs)&&a[1].isSigner){var s=Xa().decode(g.lW.from(n)),u=JSON.parse(s);return gt(u,ps),new e(a[1].publicKey,u)}return null}}]),e}(),ms=new ja("Vote111111111111111111111111111111111111111"),hs=at.struct([Ja("nodePubkey"),Ja("authorizedWithdrawer"),at.u8("commission"),at.nu64(),at.seq(at.struct([at.nu64("slot"),at.u32("confirmationCount")]),at.offset(at.u32(),-8),"votes"),at.u8("rootSlotValid"),at.nu64("rootSlot"),at.nu64(),at.seq(at.struct([at.nu64("epoch"),Ja("authorizedVoter")]),at.offset(at.u32(),-8),"authorizedVoters"),at.struct([at.seq(at.struct([Ja("authorizedPubkey"),at.nu64("epochOfLastAuthorizedSwitch"),at.nu64("targetEpoch")]),32,"buf"),at.nu64("idx"),at.u8("isEmpty")],"priorVoters"),at.nu64(),at.seq(at.struct([at.nu64("epoch"),at.nu64("credits"),at.nu64("prevCredits")]),at.offset(at.u32(),-8),"epochCredits"),at.struct([at.nu64("slot"),at.nu64("timestamp")],"lastTimestamp")]),gs=function(){function e(t){(0,m.Z)(this,e),this.nodePubkey=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.rootSlot=void 0,this.votes=void 0,this.authorizedVoters=void 0,this.priorVoters=void 0,this.epochCredits=void 0,this.lastTimestamp=void 0,this.nodePubkey=t.nodePubkey,this.authorizedWithdrawer=t.authorizedWithdrawer,this.commission=t.commission,this.rootSlot=t.rootSlot,this.votes=t.votes,this.authorizedVoters=t.authorizedVoters,this.priorVoters=t.priorVoters,this.epochCredits=t.epochCredits,this.lastTimestamp=t.lastTimestamp}return(0,h.Z)(e,null,[{key:"fromAccountData",value:function(t){var n=hs.decode(_a(t),4),a=n.rootSlot;return n.rootSlotValid||(a=null),new e({nodePubkey:new ja(n.nodePubkey),authorizedWithdrawer:new ja(n.authorizedWithdrawer),commission:n.commission,votes:n.votes,rootSlot:a,authorizedVoters:n.authorizedVoters.map(ys),priorVoters:ws(n.priorVoters),epochCredits:n.epochCredits,lastTimestamp:n.lastTimestamp})}}]),e}();function ys(e){var t=e.authorizedVoter;return{epoch:e.epoch,authorizedVoter:new ja(t)}}function vs(e){var t=e.authorizedPubkey,n=e.epochOfLastAuthorizedSwitch,a=e.targetEpoch;return{authorizedPubkey:new ja(t),epochOfLastAuthorizedSwitch:n,targetEpoch:a}}function ws(e){var t=e.buf,n=e.idx;return e.isEmpty?[]:[].concat((0,c.Z)(t.slice(n+1).map(vs)),(0,c.Z)(t.slice(0,n).map(vs)))}var ks={http:{devnet:"http://api.devnet.solana.com",testnet:"http://api.testnet.solana.com","mainnet-beta":"http://api.mainnet-beta.solana.com/"},https:{devnet:"https://api.devnet.solana.com",testnet:"https://api.testnet.solana.com","mainnet-beta":"https://api.mainnet-beta.solana.com/"}};function As(e,t){var n=!1===t?"http":"https";if(!e)return ks[n].devnet;var a=ks[n][e];if(!a)throw new Error("Unknown ".concat(n," cluster: ").concat(e));return a}function xs(e,t,n,a){return Is.apply(this,arguments)}function Is(){return Is=(0,f.Z)((0,l.Z)().mark((function e(t,n,a,o){var r,i,s,c,u,d,f;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a&&Object.prototype.hasOwnProperty.call(a,"lastValidBlockHeight")||a&&Object.prototype.hasOwnProperty.call(a,"nonceValue")?(r=a,i=o):i=a,s=i&&{skipPreflight:i.skipPreflight,preflightCommitment:i.preflightCommitment||i.commitment,minContextSlot:i.minContextSlot},e.next=4,t.sendRawTransaction(n,s);case 4:return c=e.sent,u=i&&i.commitment,d=r?t.confirmTransaction(r,u):t.confirmTransaction(c,u),e.next=9,d;case 9:if(!(f=e.sent.value).err){e.next=12;break}throw new Error("Raw transaction ".concat(c," failed (").concat(JSON.stringify(f),")"));case 12:return e.abrupt("return",c);case 13:case"end":return e.stop()}}),e)}))),Is.apply(this,arguments)}var Ts=1e9},72245:function(e,t,n){"use strict";var a=n(65218),o=n(56690).default,r=n(89728).default,i=n(66115).default,s=n(61655).default,c=n(26389).default,u=n(35429),d=n(57489),l="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=b,t.h2=50;var f=2147483647;function p(e){if(e>f)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,b.prototype),t}function b(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return g(e)}return m(e,t,n)}function m(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!b.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|k(e,t),a=p(n),o=a.write(e,t);o!==n&&(a=a.slice(0,o));return a}(e,t);if(ArrayBuffer.isView(e))return function(e){if(te(e,Uint8Array)){var t=new Uint8Array(e);return v(t.buffer,t.byteOffset,t.byteLength)}return y(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(te(e,ArrayBuffer)||e&&te(e.buffer,ArrayBuffer))return v(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(te(e,SharedArrayBuffer)||e&&te(e.buffer,SharedArrayBuffer)))return v(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var a=e.valueOf&&e.valueOf();if(null!=a&&a!==e)return b.from(a,t,n);var o=function(e){if(b.isBuffer(e)){var t=0|w(e.length),n=p(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||ne(e.length)?p(0):y(e);if("Buffer"===e.type&&Array.isArray(e.data))return y(e.data)}(e);if(o)return o;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return b.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function g(e){return h(e),p(e<0?0:0|w(e))}function y(e){for(var t=e.length<0?0:0|w(e.length),n=p(t),a=0;a=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|e}function k(e,t){if(b.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||te(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(o)return a?-1:X(e).length;t=(""+t).toLowerCase(),o=!0}}function A(e,t,n){var a=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return U(this,t,n);case"ascii":return B(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return P(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function x(e,t,n){var a=e[t];e[t]=e[n],e[n]=a}function I(e,t,n,a,o){if(0===e.length)return-1;if("string"===typeof n?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),ne(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=b.from(t,a)),b.isBuffer(t))return 0===t.length?-1:T(e,t,n,a,o);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):T(e,[t],n,a,o);throw new TypeError("val must be string, number or Buffer")}function T(e,t,n,a,o){var r,i=1,s=e.length,c=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;i=2,s/=2,c/=2,n/=2}function u(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var d=-1;for(r=n;rs&&(n=s-c),r=n;r>=0;r--){for(var l=!0,f=0;fo&&(a=o):a=o;var r,i=t.length;for(a>i/2&&(a=i/2),r=0;r>8,o=n%256,r.push(o),r.push(a);return r}(t,e.length-n),e,n,a)}function P(e,t,n){return 0===t&&n===e.length?u.fromByteArray(e):u.fromByteArray(e.slice(t,n))}function U(e,t,n){n=Math.min(e.length,n);for(var a=[],o=t;o239?4:r>223?3:r>191?2:1;if(o+s<=n){var c=void 0,u=void 0,d=void 0,l=void 0;switch(s){case 1:r<128&&(i=r);break;case 2:128===(192&(c=e[o+1]))&&(l=(31&r)<<6|63&c)>127&&(i=l);break;case 3:c=e[o+1],u=e[o+2],128===(192&c)&&128===(192&u)&&(l=(15&r)<<12|(63&c)<<6|63&u)>2047&&(l<55296||l>57343)&&(i=l);break;case 4:c=e[o+1],u=e[o+2],d=e[o+3],128===(192&c)&&128===(192&u)&&128===(192&d)&&(l=(15&r)<<18|(63&c)<<12|(63&u)<<6|63&d)>65535&&l<1114112&&(i=l)}}null===i?(i=65533,s=1):i>65535&&(i-=65536,a.push(i>>>10&1023|55296),i=56320|1023&i),a.push(i),o+=s}return function(e){var t=e.length;if(t<=_)return String.fromCharCode.apply(String,e);var n="",a=0;for(;aa.length?(b.isBuffer(r)||(r=b.from(r)),r.copy(a,o)):Uint8Array.prototype.set.call(a,r,o);else{if(!b.isBuffer(r))throw new TypeError('"list" argument must be an Array of Buffers');r.copy(a,o)}o+=r.length}return a},b.byteLength=k,b.prototype._isBuffer=!0,b.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},l&&(b.prototype[l]=b.prototype.inspect),b.prototype.compare=function(e,t,n,a,o){if(te(e,Uint8Array)&&(e=b.from(e,e.offset,e.byteLength)),!b.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===o&&(o=this.length),t<0||n>e.length||a<0||o>this.length)throw new RangeError("out of range index");if(a>=o&&t>=n)return 0;if(a>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var r=(o>>>=0)-(a>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(r,i),c=this.slice(a,o),u=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===a&&(a="utf8")):(a=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var r=!1;;)switch(a){case"hex":return S(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return R(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,t,n);default:if(r)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),r=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function B(e,t,n){var a="";n=Math.min(e.length,n);for(var o=t;oa)&&(n=a);for(var o="",r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,a,o,r){if(!b.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function j(e,t,n,a,o){q(t,a,o,e,n,7);var r=Number(t&BigInt(4294967295));e[n++]=r,r>>=8,e[n++]=r,r>>=8,e[n++]=r,r>>=8,e[n++]=r;var i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,n}function H(e,t,n,a,o){q(t,a,o,e,n,7);var r=Number(t&BigInt(4294967295));e[n+7]=r,r>>=8,e[n+6]=r,r>>=8,e[n+5]=r,r>>=8,e[n+4]=r;var i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=i,i>>=8,e[n+2]=i,i>>=8,e[n+1]=i,i>>=8,e[n]=i,n+8}function G(e,t,n,a,o,r){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,a,o){return t=+t,n>>>=0,o||G(e,0,n,4),d.write(e,t,n,a,23,4),n+4}function K(e,t,n,a,o){return t=+t,n>>>=0,o||G(e,0,n,8),d.write(e,t,n,a,52,8),n+8}b.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||F(e,t,this.length);for(var a=this[e],o=1,r=0;++r>>=0,t>>>=0,n||F(e,t,this.length);for(var a=this[e+--t],o=1;t>0&&(o*=256);)a+=this[e+--t]*o;return a},b.prototype.readUint8=b.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},b.prototype.readUint16LE=b.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},b.prototype.readUint16BE=b.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},b.prototype.readUint32LE=b.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},b.prototype.readUint32BE=b.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},b.prototype.readBigUInt64LE=oe((function(e){Q(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var a=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),o=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(a)+(BigInt(o)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var a=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],o=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n;return(BigInt(a)<>>=0,t>>>=0,n||F(e,t,this.length);for(var a=this[e],o=1,r=0;++r=(o*=128)&&(a-=Math.pow(2,8*t)),a},b.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);for(var a=t,o=1,r=this[e+--a];a>0&&(o*=256);)r+=this[e+--a]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},b.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},b.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},b.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},b.prototype.readBigInt64LE=oe((function(e){Q(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var a=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(n<<24);return(BigInt(a)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var a=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(a)<>>=0,t||F(e,4,this.length),d.read(this,e,!0,23,4)},b.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),d.read(this,e,!1,23,4)},b.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),d.read(this,e,!0,52,8)},b.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),d.read(this,e,!1,52,8)},b.prototype.writeUintLE=b.prototype.writeUIntLE=function(e,t,n,a){(e=+e,t>>>=0,n>>>=0,a)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,r=0;for(this[t]=255&e;++r>>=0,n>>>=0,a)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,r=1;for(this[t+o]=255&e;--o>=0&&(r*=256);)this[t+o]=e/r&255;return t+n},b.prototype.writeUint8=b.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,255,0),this[t]=255&e,t+1},b.prototype.writeUint16LE=b.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},b.prototype.writeUint16BE=b.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},b.prototype.writeUint32LE=b.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},b.prototype.writeUint32BE=b.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},b.prototype.writeBigUInt64LE=oe((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),b.prototype.writeBigUInt64BE=oe((function(e){return H(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),b.prototype.writeIntLE=function(e,t,n,a){if(e=+e,t>>>=0,!a){var o=Math.pow(2,8*n-1);L(this,e,t,n,o-1,-o)}var r=0,i=1,s=0;for(this[t]=255&e;++r>0)-s&255;return t+n},b.prototype.writeIntBE=function(e,t,n,a){if(e=+e,t>>>=0,!a){var o=Math.pow(2,8*n-1);L(this,e,t,n,o-1,-o)}var r=n-1,i=1,s=0;for(this[t+r]=255&e;--r>=0&&(i*=256);)e<0&&0===s&&0!==this[t+r+1]&&(s=1),this[t+r]=(e/i>>0)-s&255;return t+n},b.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},b.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},b.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},b.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},b.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},b.prototype.writeBigInt64LE=oe((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),b.prototype.writeBigInt64BE=oe((function(e){return H(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),b.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},b.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},b.prototype.writeDoubleLE=function(e,t,n){return K(this,e,t,!0,n)},b.prototype.writeDoubleBE=function(e,t,n){return K(this,e,t,!1,n)},b.prototype.copy=function(e,t,n,a){if(!b.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),a||0===a||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(r=t;r=a+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function q(e,t,n,a,o,r){if(e>n||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(r+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(r+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(r+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(n).concat(s),new W.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||J(t,e.length-(n+1))}(a,o,r)}function Q(e,t){if("number"!==typeof e)throw new W.ERR_INVALID_ARG_TYPE(t,"number",e)}function J(e,t,n){if(Math.floor(e)!==e)throw Q(e,n),new W.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}Z("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),Z("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),Z("ERR_OUT_OF_RANGE",(function(e,t,n){var a='The value of "'.concat(e,'" is out of range.'),o=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?o=V(String(n)):"bigint"===typeof n&&(o=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(o=V(o)),o+="n"),a+=" It must be ".concat(t,". Received ").concat(o)}),RangeError);var Y=/[^+/0-9A-Za-z-_]/g;function X(e,t){var n;t=t||1/0;for(var a=e.length,o=null,r=[],i=0;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(i+1===a){(t-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;r.push(n)}else if(n<2048){if((t-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function $(e){return u.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function ee(e,t,n,a){var o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function te(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function ne(e){return e!==e}var ae=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var a=16*n,o=0;o<16;++o)t[a+o]=e[n]+e[o];return t}();function oe(e){return"undefined"===typeof BigInt?re:e}function re(){throw new Error("BigInt not supported")}},93803:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.ModuleAccount=t.BaseAccount=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121)),s=n(50922);t.protobufPackage="cosmos.auth.v1beta1";var c={address:"",accountNumber:r.default.UZERO,sequence:r.default.UZERO};t.BaseAccount={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pubKey&&s.Any.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.accountNumber.isZero()||t.uint32(24).uint64(e.accountNumber),e.sequence.isZero()||t.uint32(32).uint64(e.sequence),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.address=n.string();break;case 2:o.pubKey=s.Any.decode(n,n.uint32());break;case 3:o.accountNumber=n.uint64();break;case 4:o.sequence=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.address&&null!==e.address?t.address=String(e.address):t.address="",void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=s.Any.fromJSON(e.pubKey):t.pubKey=void 0,void 0!==e.accountNumber&&null!==e.accountNumber?t.accountNumber=r.default.fromString(e.accountNumber):t.accountNumber=r.default.UZERO,void 0!==e.sequence&&null!==e.sequence?t.sequence=r.default.fromString(e.sequence):t.sequence=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pubKey&&(t.pubKey=e.pubKey?s.Any.toJSON(e.pubKey):void 0),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||r.default.UZERO).toString()),void 0!==e.sequence&&(t.sequence=(e.sequence||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.address&&null!==e.address?t.address=e.address:t.address="",void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=s.Any.fromPartial(e.pubKey):t.pubKey=void 0,void 0!==e.accountNumber&&null!==e.accountNumber?t.accountNumber=e.accountNumber:t.accountNumber=r.default.UZERO,void 0!==e.sequence&&null!==e.sequence?t.sequence=e.sequence:t.sequence=r.default.UZERO,t}};var u={name:"",permissions:""};t.ModuleAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.baseAccount&&t.BaseAccount.encode(e.baseAccount,n.uint32(10).fork()).ldelim(),""!==e.name&&n.uint32(18).string(e.name);var o,r=a(e.permissions);try{for(r.s();!(o=r.n()).done;){var s=o.value;n.uint32(26).string(s)}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},u);for(r.permissions=[];a.pos>>3){case 1:r.baseAccount=t.BaseAccount.decode(a,a.uint32());break;case 2:r.name=a.string();break;case 3:r.permissions.push(a.string());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},u);if(n.permissions=[],void 0!==e.baseAccount&&null!==e.baseAccount?n.baseAccount=t.BaseAccount.fromJSON(e.baseAccount):n.baseAccount=void 0,void 0!==e.name&&null!==e.name?n.name=String(e.name):n.name="",void 0!==e.permissions&&null!==e.permissions){var o,r=a(e.permissions);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.permissions.push(String(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.baseAccount&&(n.baseAccount=e.baseAccount?t.BaseAccount.toJSON(e.baseAccount):void 0),void 0!==e.name&&(n.name=e.name),e.permissions?n.permissions=e.permissions.map((function(e){return e})):n.permissions=[],n},fromPartial:function(e){var n=Object.assign({},u);if(n.permissions=[],void 0!==e.baseAccount&&null!==e.baseAccount?n.baseAccount=t.BaseAccount.fromPartial(e.baseAccount):n.baseAccount=void 0,void 0!==e.name&&null!==e.name?n.name=e.name:n.name="",void 0!==e.permissions&&null!==e.permissions){var o,r=a(e.permissions);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.permissions.push(i)}}catch(s){r.e(s)}finally{r.f()}}return n}};var d={maxMemoCharacters:r.default.UZERO,txSigLimit:r.default.UZERO,txSizeCostPerByte:r.default.UZERO,sigVerifyCostEd25519:r.default.UZERO,sigVerifyCostSecp256k1:r.default.UZERO};t.Params={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.maxMemoCharacters.isZero()||t.uint32(8).uint64(e.maxMemoCharacters),e.txSigLimit.isZero()||t.uint32(16).uint64(e.txSigLimit),e.txSizeCostPerByte.isZero()||t.uint32(24).uint64(e.txSizeCostPerByte),e.sigVerifyCostEd25519.isZero()||t.uint32(32).uint64(e.sigVerifyCostEd25519),e.sigVerifyCostSecp256k1.isZero()||t.uint32(40).uint64(e.sigVerifyCostSecp256k1),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.maxMemoCharacters=n.uint64();break;case 2:o.txSigLimit=n.uint64();break;case 3:o.txSizeCostPerByte=n.uint64();break;case 4:o.sigVerifyCostEd25519=n.uint64();break;case 5:o.sigVerifyCostSecp256k1=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters?t.maxMemoCharacters=r.default.fromString(e.maxMemoCharacters):t.maxMemoCharacters=r.default.UZERO,void 0!==e.txSigLimit&&null!==e.txSigLimit?t.txSigLimit=r.default.fromString(e.txSigLimit):t.txSigLimit=r.default.UZERO,void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte?t.txSizeCostPerByte=r.default.fromString(e.txSizeCostPerByte):t.txSizeCostPerByte=r.default.UZERO,void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519?t.sigVerifyCostEd25519=r.default.fromString(e.sigVerifyCostEd25519):t.sigVerifyCostEd25519=r.default.UZERO,void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1?t.sigVerifyCostSecp256k1=r.default.fromString(e.sigVerifyCostSecp256k1):t.sigVerifyCostSecp256k1=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.maxMemoCharacters&&(t.maxMemoCharacters=(e.maxMemoCharacters||r.default.UZERO).toString()),void 0!==e.txSigLimit&&(t.txSigLimit=(e.txSigLimit||r.default.UZERO).toString()),void 0!==e.txSizeCostPerByte&&(t.txSizeCostPerByte=(e.txSizeCostPerByte||r.default.UZERO).toString()),void 0!==e.sigVerifyCostEd25519&&(t.sigVerifyCostEd25519=(e.sigVerifyCostEd25519||r.default.UZERO).toString()),void 0!==e.sigVerifyCostSecp256k1&&(t.sigVerifyCostSecp256k1=(e.sigVerifyCostSecp256k1||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters?t.maxMemoCharacters=e.maxMemoCharacters:t.maxMemoCharacters=r.default.UZERO,void 0!==e.txSigLimit&&null!==e.txSigLimit?t.txSigLimit=e.txSigLimit:t.txSigLimit=r.default.UZERO,void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte?t.txSizeCostPerByte=e.txSizeCostPerByte:t.txSizeCostPerByte=r.default.UZERO,void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519?t.sigVerifyCostEd25519=e.sigVerifyCostEd25519:t.sigVerifyCostEd25519=r.default.UZERO,void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1?t.sigVerifyCostSecp256k1=e.sigVerifyCostSecp256k1:t.sigVerifyCostSecp256k1=r.default.UZERO,t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},67757:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SearchTxsResult=t.TxMsgData=t.MsgData=t.SimulationResponse=t.Result=t.GasInfo=t.Attribute=t.StringEvent=t.ABCIMessageLog=t.TxResponse=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121)),s=n(50922),c=n(42203);t.protobufPackage="cosmos.base.abci.v1beta1";var u={height:r.default.ZERO,txhash:"",codespace:"",code:0,data:"",rawLog:"",info:"",gasWanted:r.default.ZERO,gasUsed:r.default.ZERO,timestamp:""};t.TxResponse={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();e.height.isZero()||n.uint32(8).int64(e.height),""!==e.txhash&&n.uint32(18).string(e.txhash),""!==e.codespace&&n.uint32(26).string(e.codespace),0!==e.code&&n.uint32(32).uint32(e.code),""!==e.data&&n.uint32(42).string(e.data),""!==e.rawLog&&n.uint32(50).string(e.rawLog);var o,r=a(e.logs);try{for(r.s();!(o=r.n()).done;){var c=o.value;t.ABCIMessageLog.encode(c,n.uint32(58).fork()).ldelim()}}catch(u){r.e(u)}finally{r.f()}return""!==e.info&&n.uint32(66).string(e.info),e.gasWanted.isZero()||n.uint32(72).int64(e.gasWanted),e.gasUsed.isZero()||n.uint32(80).int64(e.gasUsed),void 0!==e.tx&&s.Any.encode(e.tx,n.uint32(90).fork()).ldelim(),""!==e.timestamp&&n.uint32(98).string(e.timestamp),n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},u);for(r.logs=[];a.pos>>3){case 1:r.height=a.int64();break;case 2:r.txhash=a.string();break;case 3:r.codespace=a.string();break;case 4:r.code=a.uint32();break;case 5:r.data=a.string();break;case 6:r.rawLog=a.string();break;case 7:r.logs.push(t.ABCIMessageLog.decode(a,a.uint32()));break;case 8:r.info=a.string();break;case 9:r.gasWanted=a.int64();break;case 10:r.gasUsed=a.int64();break;case 11:r.tx=s.Any.decode(a,a.uint32());break;case 12:r.timestamp=a.string();break;default:a.skipType(7&c)}}return r},fromJSON:function(e){var n=Object.assign({},u);if(n.logs=[],void 0!==e.height&&null!==e.height?n.height=r.default.fromString(e.height):n.height=r.default.ZERO,void 0!==e.txhash&&null!==e.txhash?n.txhash=String(e.txhash):n.txhash="",void 0!==e.codespace&&null!==e.codespace?n.codespace=String(e.codespace):n.codespace="",void 0!==e.code&&null!==e.code?n.code=Number(e.code):n.code=0,void 0!==e.data&&null!==e.data?n.data=String(e.data):n.data="",void 0!==e.rawLog&&null!==e.rawLog?n.rawLog=String(e.rawLog):n.rawLog="",void 0!==e.logs&&null!==e.logs){var o,i=a(e.logs);try{for(i.s();!(o=i.n()).done;){var c=o.value;n.logs.push(t.ABCIMessageLog.fromJSON(c))}}catch(d){i.e(d)}finally{i.f()}}return void 0!==e.info&&null!==e.info?n.info=String(e.info):n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=r.default.fromString(e.gasWanted):n.gasWanted=r.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=r.default.fromString(e.gasUsed):n.gasUsed=r.default.ZERO,void 0!==e.tx&&null!==e.tx?n.tx=s.Any.fromJSON(e.tx):n.tx=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=String(e.timestamp):n.timestamp="",n},toJSON:function(e){var n={};return void 0!==e.height&&(n.height=(e.height||r.default.ZERO).toString()),void 0!==e.txhash&&(n.txhash=e.txhash),void 0!==e.codespace&&(n.codespace=e.codespace),void 0!==e.code&&(n.code=e.code),void 0!==e.data&&(n.data=e.data),void 0!==e.rawLog&&(n.rawLog=e.rawLog),e.logs?n.logs=e.logs.map((function(e){return e?t.ABCIMessageLog.toJSON(e):void 0})):n.logs=[],void 0!==e.info&&(n.info=e.info),void 0!==e.gasWanted&&(n.gasWanted=(e.gasWanted||r.default.ZERO).toString()),void 0!==e.gasUsed&&(n.gasUsed=(e.gasUsed||r.default.ZERO).toString()),void 0!==e.tx&&(n.tx=e.tx?s.Any.toJSON(e.tx):void 0),void 0!==e.timestamp&&(n.timestamp=e.timestamp),n},fromPartial:function(e){var n=Object.assign({},u);if(n.logs=[],void 0!==e.height&&null!==e.height?n.height=e.height:n.height=r.default.ZERO,void 0!==e.txhash&&null!==e.txhash?n.txhash=e.txhash:n.txhash="",void 0!==e.codespace&&null!==e.codespace?n.codespace=e.codespace:n.codespace="",void 0!==e.code&&null!==e.code?n.code=e.code:n.code=0,void 0!==e.data&&null!==e.data?n.data=e.data:n.data="",void 0!==e.rawLog&&null!==e.rawLog?n.rawLog=e.rawLog:n.rawLog="",void 0!==e.logs&&null!==e.logs){var o,i=a(e.logs);try{for(i.s();!(o=i.n()).done;){var c=o.value;n.logs.push(t.ABCIMessageLog.fromPartial(c))}}catch(d){i.e(d)}finally{i.f()}}return void 0!==e.info&&null!==e.info?n.info=e.info:n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=e.gasWanted:n.gasWanted=r.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=e.gasUsed:n.gasUsed=r.default.ZERO,void 0!==e.tx&&null!==e.tx?n.tx=s.Any.fromPartial(e.tx):n.tx=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=e.timestamp:n.timestamp="",n}};var d={msgIndex:0,log:""};t.ABCIMessageLog={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();0!==e.msgIndex&&n.uint32(8).uint32(e.msgIndex),""!==e.log&&n.uint32(18).string(e.log);var o,r=a(e.events);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.StringEvent.encode(s,n.uint32(26).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},d);for(r.events=[];a.pos>>3){case 1:r.msgIndex=a.uint32();break;case 2:r.log=a.string();break;case 3:r.events.push(t.StringEvent.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},d);if(n.events=[],void 0!==e.msgIndex&&null!==e.msgIndex?n.msgIndex=Number(e.msgIndex):n.msgIndex=0,void 0!==e.log&&null!==e.log?n.log=String(e.log):n.log="",void 0!==e.events&&null!==e.events){var o,r=a(e.events);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.events.push(t.StringEvent.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.msgIndex&&(n.msgIndex=e.msgIndex),void 0!==e.log&&(n.log=e.log),e.events?n.events=e.events.map((function(e){return e?t.StringEvent.toJSON(e):void 0})):n.events=[],n},fromPartial:function(e){var n=Object.assign({},d);if(n.events=[],void 0!==e.msgIndex&&null!==e.msgIndex?n.msgIndex=e.msgIndex:n.msgIndex=0,void 0!==e.log&&null!==e.log?n.log=e.log:n.log="",void 0!==e.events&&null!==e.events){var o,r=a(e.events);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.events.push(t.StringEvent.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var l={type:""};t.StringEvent={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.type&&n.uint32(10).string(e.type);var o,r=a(e.attributes);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.Attribute.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},l);for(r.attributes=[];a.pos>>3){case 1:r.type=a.string();break;case 2:r.attributes.push(t.Attribute.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},l);if(n.attributes=[],void 0!==e.type&&null!==e.type?n.type=String(e.type):n.type="",void 0!==e.attributes&&null!==e.attributes){var o,r=a(e.attributes);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.attributes.push(t.Attribute.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=e.type),e.attributes?n.attributes=e.attributes.map((function(e){return e?t.Attribute.toJSON(e):void 0})):n.attributes=[],n},fromPartial:function(e){var n=Object.assign({},l);if(n.attributes=[],void 0!==e.type&&null!==e.type?n.type=e.type:n.type="",void 0!==e.attributes&&null!==e.attributes){var o,r=a(e.attributes);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.attributes.push(t.Attribute.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var f={key:"",value:""};t.Attribute={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.value&&t.uint32(18).string(e.value),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3){case 1:o.key=n.string();break;case 2:o.value=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.key&&null!==e.key?t.key=String(e.key):t.key="",void 0!==e.value&&null!==e.value?t.value=String(e.value):t.value="",t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=e.value),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key="",void 0!==e.value&&null!==e.value?t.value=e.value:t.value="",t}};var p={gasWanted:r.default.UZERO,gasUsed:r.default.UZERO};t.GasInfo={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.gasWanted.isZero()||t.uint32(8).uint64(e.gasWanted),e.gasUsed.isZero()||t.uint32(16).uint64(e.gasUsed),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos>>3){case 1:o.gasWanted=n.uint64();break;case 2:o.gasUsed=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return void 0!==e.gasWanted&&null!==e.gasWanted?t.gasWanted=r.default.fromString(e.gasWanted):t.gasWanted=r.default.UZERO,void 0!==e.gasUsed&&null!==e.gasUsed?t.gasUsed=r.default.fromString(e.gasUsed):t.gasUsed=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.gasWanted&&(t.gasWanted=(e.gasWanted||r.default.UZERO).toString()),void 0!==e.gasUsed&&(t.gasUsed=(e.gasUsed||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.gasWanted&&null!==e.gasWanted?t.gasWanted=e.gasWanted:t.gasWanted=r.default.UZERO,void 0!==e.gasUsed&&null!==e.gasUsed?t.gasUsed=e.gasUsed:t.gasUsed=r.default.UZERO,t}};var b={log:""};t.Result={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();0!==e.data.length&&t.uint32(10).bytes(e.data),""!==e.log&&t.uint32(18).string(e.log);var n,o=a(e.events);try{for(o.s();!(n=o.n()).done;){var r=n.value;c.Event.encode(r,t.uint32(26).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);for(o.events=[],o.data=new Uint8Array;n.pos>>3){case 1:o.data=n.bytes();break;case 2:o.log=n.string();break;case 3:o.events.push(c.Event.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);if(t.events=[],t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=k(e.data)),void 0!==e.log&&null!==e.log?t.log=String(e.log):t.log="",void 0!==e.events&&null!==e.events){var n,o=a(e.events);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.events.push(c.Event.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=x(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.log&&(t.log=e.log),e.events?t.events=e.events.map((function(e){return e?c.Event.toJSON(e):void 0})):t.events=[],t},fromPartial:function(e){var t=Object.assign({},b);if(t.events=[],void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,void 0!==e.log&&null!==e.log?t.log=e.log:t.log="",void 0!==e.events&&null!==e.events){var n,o=a(e.events);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.events.push(c.Event.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var m={};t.SimulationResponse={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.gasInfo&&t.GasInfo.encode(e.gasInfo,n.uint32(10).fork()).ldelim(),void 0!==e.result&&t.Result.encode(e.result,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},m);a.pos>>3){case 1:r.gasInfo=t.GasInfo.decode(a,a.uint32());break;case 2:r.result=t.Result.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},m);return void 0!==e.gasInfo&&null!==e.gasInfo?n.gasInfo=t.GasInfo.fromJSON(e.gasInfo):n.gasInfo=void 0,void 0!==e.result&&null!==e.result?n.result=t.Result.fromJSON(e.result):n.result=void 0,n},toJSON:function(e){var n={};return void 0!==e.gasInfo&&(n.gasInfo=e.gasInfo?t.GasInfo.toJSON(e.gasInfo):void 0),void 0!==e.result&&(n.result=e.result?t.Result.toJSON(e.result):void 0),n},fromPartial:function(e){var n=Object.assign({},m);return void 0!==e.gasInfo&&null!==e.gasInfo?n.gasInfo=t.GasInfo.fromPartial(e.gasInfo):n.gasInfo=void 0,void 0!==e.result&&null!==e.result?n.result=t.Result.fromPartial(e.result):n.result=void 0,n}};var h={msgType:""};t.MsgData={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.msgType&&t.uint32(10).string(e.msgType),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.data=new Uint8Array;n.pos>>3){case 1:o.msgType=n.string();break;case 2:o.data=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);return t.data=new Uint8Array,void 0!==e.msgType&&null!==e.msgType?t.msgType=String(e.msgType):t.msgType="",void 0!==e.data&&null!==e.data&&(t.data=k(e.data)),t},toJSON:function(e){var t={};return void 0!==e.msgType&&(t.msgType=e.msgType),void 0!==e.data&&(t.data=x(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},h);return void 0!==e.msgType&&null!==e.msgType?t.msgType=e.msgType:t.msgType="",void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var g={};t.TxMsgData={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.data);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.MsgData.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},g);for(r.data=[];a.pos>>3===1)r.data.push(t.MsgData.decode(a,a.uint32()));else a.skipType(7&s)}return r},fromJSON:function(e){var n=Object.assign({},g);if(n.data=[],void 0!==e.data&&null!==e.data){var o,r=a(e.data);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.data.push(t.MsgData.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return e.data?n.data=e.data.map((function(e){return e?t.MsgData.toJSON(e):void 0})):n.data=[],n},fromPartial:function(e){var n=Object.assign({},g);if(n.data=[],void 0!==e.data&&null!==e.data){var o,r=a(e.data);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.data.push(t.MsgData.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var y={totalCount:r.default.UZERO,count:r.default.UZERO,pageNumber:r.default.UZERO,pageTotal:r.default.UZERO,limit:r.default.UZERO};t.SearchTxsResult={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();e.totalCount.isZero()||n.uint32(8).uint64(e.totalCount),e.count.isZero()||n.uint32(16).uint64(e.count),e.pageNumber.isZero()||n.uint32(24).uint64(e.pageNumber),e.pageTotal.isZero()||n.uint32(32).uint64(e.pageTotal),e.limit.isZero()||n.uint32(40).uint64(e.limit);var o,r=a(e.txs);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.TxResponse.encode(s,n.uint32(50).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},y);for(r.txs=[];a.pos>>3){case 1:r.totalCount=a.uint64();break;case 2:r.count=a.uint64();break;case 3:r.pageNumber=a.uint64();break;case 4:r.pageTotal=a.uint64();break;case 5:r.limit=a.uint64();break;case 6:r.txs.push(t.TxResponse.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},y);if(n.txs=[],void 0!==e.totalCount&&null!==e.totalCount?n.totalCount=r.default.fromString(e.totalCount):n.totalCount=r.default.UZERO,void 0!==e.count&&null!==e.count?n.count=r.default.fromString(e.count):n.count=r.default.UZERO,void 0!==e.pageNumber&&null!==e.pageNumber?n.pageNumber=r.default.fromString(e.pageNumber):n.pageNumber=r.default.UZERO,void 0!==e.pageTotal&&null!==e.pageTotal?n.pageTotal=r.default.fromString(e.pageTotal):n.pageTotal=r.default.UZERO,void 0!==e.limit&&null!==e.limit?n.limit=r.default.fromString(e.limit):n.limit=r.default.UZERO,void 0!==e.txs&&null!==e.txs){var o,i=a(e.txs);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.txs.push(t.TxResponse.fromJSON(s))}}catch(c){i.e(c)}finally{i.f()}}return n},toJSON:function(e){var n={};return void 0!==e.totalCount&&(n.totalCount=(e.totalCount||r.default.UZERO).toString()),void 0!==e.count&&(n.count=(e.count||r.default.UZERO).toString()),void 0!==e.pageNumber&&(n.pageNumber=(e.pageNumber||r.default.UZERO).toString()),void 0!==e.pageTotal&&(n.pageTotal=(e.pageTotal||r.default.UZERO).toString()),void 0!==e.limit&&(n.limit=(e.limit||r.default.UZERO).toString()),e.txs?n.txs=e.txs.map((function(e){return e?t.TxResponse.toJSON(e):void 0})):n.txs=[],n},fromPartial:function(e){var n=Object.assign({},y);if(n.txs=[],void 0!==e.totalCount&&null!==e.totalCount?n.totalCount=e.totalCount:n.totalCount=r.default.UZERO,void 0!==e.count&&null!==e.count?n.count=e.count:n.count=r.default.UZERO,void 0!==e.pageNumber&&null!==e.pageNumber?n.pageNumber=e.pageNumber:n.pageNumber=r.default.UZERO,void 0!==e.pageTotal&&null!==e.pageTotal?n.pageTotal=e.pageTotal:n.pageTotal=r.default.UZERO,void 0!==e.limit&&null!==e.limit?n.limit=e.limit:n.limit=r.default.UZERO,void 0!==e.txs&&null!==e.txs){var o,i=a(e.txs);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.txs.push(t.TxResponse.fromPartial(s))}}catch(c){i.e(c)}finally{i.f()}}return n}};var v=function(){if("undefined"!==typeof v)return v;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),w=v.atob||function(e){return v.Buffer.from(e,"base64").toString("binary")};function k(e){for(var t=w(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),e.offset.isZero()||t.uint32(16).uint64(e.offset),e.limit.isZero()||t.uint32(24).uint64(e.limit),!0===e.countTotal&&t.uint32(32).bool(e.countTotal),!0===e.reverse&&t.uint32(40).bool(e.reverse),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.key=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.offset=n.uint64();break;case 3:o.limit=n.uint64();break;case 4:o.countTotal=n.bool();break;case 5:o.reverse=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},s);return t.key=new Uint8Array,void 0!==e.key&&null!==e.key&&(t.key=l(e.key)),void 0!==e.offset&&null!==e.offset?t.offset=r.default.fromString(e.offset):t.offset=r.default.UZERO,void 0!==e.limit&&null!==e.limit?t.limit=r.default.fromString(e.limit):t.limit=r.default.UZERO,void 0!==e.countTotal&&null!==e.countTotal?t.countTotal=Boolean(e.countTotal):t.countTotal=!1,void 0!==e.reverse&&null!==e.reverse?t.reverse=Boolean(e.reverse):t.reverse=!1,t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=p(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.offset&&(t.offset=(e.offset||r.default.UZERO).toString()),void 0!==e.limit&&(t.limit=(e.limit||r.default.UZERO).toString()),void 0!==e.countTotal&&(t.countTotal=e.countTotal),void 0!==e.reverse&&(t.reverse=e.reverse),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,void 0!==e.offset&&null!==e.offset?t.offset=e.offset:t.offset=r.default.UZERO,void 0!==e.limit&&null!==e.limit?t.limit=e.limit:t.limit=r.default.UZERO,void 0!==e.countTotal&&null!==e.countTotal?t.countTotal=e.countTotal:t.countTotal=!1,void 0!==e.reverse&&null!==e.reverse?t.reverse=e.reverse:t.reverse=!1,t}};var c={total:r.default.UZERO};t.PageResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.nextKey.length&&t.uint32(10).bytes(e.nextKey),e.total.isZero()||t.uint32(16).uint64(e.total),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);for(o.nextKey=new Uint8Array;n.pos>>3){case 1:o.nextKey=n.bytes();break;case 2:o.total=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return t.nextKey=new Uint8Array,void 0!==e.nextKey&&null!==e.nextKey&&(t.nextKey=l(e.nextKey)),void 0!==e.total&&null!==e.total?t.total=r.default.fromString(e.total):t.total=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.nextKey&&(t.nextKey=p(void 0!==e.nextKey?e.nextKey:new Uint8Array)),void 0!==e.total&&(t.total=(e.total||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.nextKey&&null!==e.nextKey?t.nextKey=e.nextKey:t.nextKey=new Uint8Array,void 0!==e.total&&null!==e.total?t.total=e.total:t.total=r.default.UZERO,t}};var u=function(){if("undefined"!==typeof u)return u;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),d=u.atob||function(e){return u.Buffer.from(e,"base64").toString("binary")};function l(e){for(var t=d(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=String(e.amount):t.amount="",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=e.amount:t.amount="",t}};var s={denom:"",amount:""};t.DecCoin={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},s);return void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=String(e.amount):t.amount="",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=e.amount:t.amount="",t}};var c={int:""};t.IntProto={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.int&&t.uint32(10).string(e.int),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3===1)o.int=n.string();else n.skipType(7&i)}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.int&&null!==e.int?t.int=String(e.int):t.int="",t},toJSON:function(e){var t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.int&&null!==e.int?t.int=e.int:t.int="",t}};var u={dec:""};t.DecProto={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.dec&&t.uint32(10).string(e.dec),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3===1)o.dec=n.string();else n.skipType(7&i)}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.dec&&null!==e.dec?t.dec=String(e.dec):t.dec="",t},toJSON:function(e){var t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.dec&&null!==e.dec?t.dec=e.dec:t.dec="",t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},15431:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompactBitArray=t.MultiSignature=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121));t.protobufPackage="cosmos.crypto.multisig.v1beta1";var s={};t.MultiSignature={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.signatures);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).bytes(r)}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.signatures=[];n.pos>>3===1)o.signatures.push(n.bytes());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},s);if(t.signatures=[],void 0!==e.signatures&&null!==e.signatures){var n,o=a(e.signatures);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.signatures.push(l(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.signatures?t.signatures=e.signatures.map((function(e){return p(void 0!==e?e:new Uint8Array)})):t.signatures=[],t},fromPartial:function(e){var t=Object.assign({},s);if(t.signatures=[],void 0!==e.signatures&&null!==e.signatures){var n,o=a(e.signatures);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.signatures.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var c={extraBitsStored:0};t.CompactBitArray={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);for(o.elems=new Uint8Array;n.pos>>3){case 1:o.extraBitsStored=n.uint32();break;case 2:o.elems=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return t.elems=new Uint8Array,void 0!==e.extraBitsStored&&null!==e.extraBitsStored?t.extraBitsStored=Number(e.extraBitsStored):t.extraBitsStored=0,void 0!==e.elems&&null!==e.elems&&(t.elems=l(e.elems)),t},toJSON:function(e){var t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=e.extraBitsStored),void 0!==e.elems&&(t.elems=p(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.extraBitsStored&&null!==e.extraBitsStored?t.extraBitsStored=e.extraBitsStored:t.extraBitsStored=0,void 0!==e.elems&&null!==e.elems?t.elems=e.elems:t.elems=new Uint8Array,t}};var u=function(){if("undefined"!==typeof u)return u;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),d=u.atob||function(e){return u.Buffer.from(e,"base64").toString("binary")};function l(e){for(var t=d(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.withdrawAddress&&t.uint32(18).string(e.withdrawAddress),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.withdrawAddress=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=String(e.delegatorAddress):t.delegatorAddress="",void 0!==e.withdrawAddress&&null!==e.withdrawAddress?t.withdrawAddress=String(e.withdrawAddress):t.withdrawAddress="",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=e.delegatorAddress:t.delegatorAddress="",void 0!==e.withdrawAddress&&null!==e.withdrawAddress?t.withdrawAddress=e.withdrawAddress:t.withdrawAddress="",t}};var l={};t.MsgSetWithdrawAddressResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=String(e.delegatorAddress):t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=String(e.validatorAddress):t.validatorAddress="",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=e.delegatorAddress:t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress="",t}};var p={};t.MsgWithdrawDelegatorRewardResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3===1)o.validatorAddress=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=String(e.validatorAddress):t.validatorAddress="",t},toJSON:function(e){var t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress="",t}};var m={};t.MsgWithdrawValidatorCommissionResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create(),a=r(e.amount);try{for(a.s();!(t=a.n()).done;){var o=t.value;u.Coin.encode(o,n.uint32(10).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return""!==e.depositor&&n.uint32(18).string(e.depositor),n},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.amount=[];n.pos>>3){case 1:o.amount.push(u.Coin.decode(n,n.uint32()));break;case 2:o.depositor=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);if(t.amount=[],void 0!==e.amount&&null!==e.amount){var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.amount.push(u.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.depositor&&null!==e.depositor?t.depositor=String(e.depositor):t.depositor="",t},toJSON:function(e){var t={};return e.amount?t.amount=e.amount.map((function(e){return e?u.Coin.toJSON(e):void 0})):t.amount=[],void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial:function(e){var t=Object.assign({},h);if(t.amount=[],void 0!==e.amount&&null!==e.amount){var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.amount.push(u.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.depositor&&null!==e.depositor?t.depositor=e.depositor:t.depositor="",t}};var g={};t.MsgFundCommunityPoolResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.option&&t.uint32(8).int32(e.option),""!==e.weight&&t.uint32(18).string(e.weight),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos>>3){case 1:o.option=n.int32();break;case 2:o.weight=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},g);return void 0!==e.option&&null!==e.option?t.option=p(e.option):t.option=0,void 0!==e.weight&&null!==e.weight?t.weight=String(e.weight):t.weight="",t},toJSON:function(e){var t={};return void 0!==e.option&&(t.option=b(e.option)),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.option&&null!==e.option?t.option=e.option:t.option=0,void 0!==e.weight&&null!==e.weight?t.weight=e.weight:t.weight="",t}};var y={title:"",description:""};t.TextProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",t}};var v={proposalId:s.default.UZERO,depositor:""};t.Deposit={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor);var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var r=n.value;f.Coin.encode(r,t.uint32(26).fork()).ldelim()}}catch(i){o.e(i)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);for(o.amount=[];n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.depositor=n.string();break;case 3:o.amount.push(f.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},v);if(t.amount=[],void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=s.default.fromString(e.proposalId):t.proposalId=s.default.UZERO,void 0!==e.depositor&&null!==e.depositor?t.depositor=String(e.depositor):t.depositor="",void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.amount.push(f.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map((function(e){return e?f.Coin.toJSON(e):void 0})):t.amount=[],t},fromPartial:function(e){var t=Object.assign({},v);if(t.amount=[],void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=e.proposalId:t.proposalId=s.default.UZERO,void 0!==e.depositor&&null!==e.depositor?t.depositor=e.depositor:t.depositor="",void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.amount.push(f.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var w={proposalId:s.default.UZERO,status:0};t.Proposal={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();e.proposalId.isZero()||n.uint32(8).uint64(e.proposalId),void 0!==e.content&&u.Any.encode(e.content,n.uint32(18).fork()).ldelim(),0!==e.status&&n.uint32(24).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,n.uint32(34).fork()).ldelim(),void 0!==e.submitTime&&l.Timestamp.encode(P(e.submitTime),n.uint32(42).fork()).ldelim(),void 0!==e.depositEndTime&&l.Timestamp.encode(P(e.depositEndTime),n.uint32(50).fork()).ldelim();var o,r=a(e.totalDeposit);try{for(r.s();!(o=r.n()).done;){var i=o.value;f.Coin.encode(i,n.uint32(58).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return void 0!==e.votingStartTime&&l.Timestamp.encode(P(e.votingStartTime),n.uint32(66).fork()).ldelim(),void 0!==e.votingEndTime&&l.Timestamp.encode(P(e.votingEndTime),n.uint32(74).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},w);for(r.totalDeposit=[];a.pos>>3){case 1:r.proposalId=a.uint64();break;case 2:r.content=u.Any.decode(a,a.uint32());break;case 3:r.status=a.int32();break;case 4:r.finalTallyResult=t.TallyResult.decode(a,a.uint32());break;case 5:r.submitTime=U(l.Timestamp.decode(a,a.uint32()));break;case 6:r.depositEndTime=U(l.Timestamp.decode(a,a.uint32()));break;case 7:r.totalDeposit.push(f.Coin.decode(a,a.uint32()));break;case 8:r.votingStartTime=U(l.Timestamp.decode(a,a.uint32()));break;case 9:r.votingEndTime=U(l.Timestamp.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},w);if(n.totalDeposit=[],void 0!==e.proposalId&&null!==e.proposalId?n.proposalId=s.default.fromString(e.proposalId):n.proposalId=s.default.UZERO,void 0!==e.content&&null!==e.content?n.content=u.Any.fromJSON(e.content):n.content=void 0,void 0!==e.status&&null!==e.status?n.status=m(e.status):n.status=0,void 0!==e.finalTallyResult&&null!==e.finalTallyResult?n.finalTallyResult=t.TallyResult.fromJSON(e.finalTallyResult):n.finalTallyResult=void 0,void 0!==e.submitTime&&null!==e.submitTime?n.submitTime=_(e.submitTime):n.submitTime=void 0,void 0!==e.depositEndTime&&null!==e.depositEndTime?n.depositEndTime=_(e.depositEndTime):n.depositEndTime=void 0,void 0!==e.totalDeposit&&null!==e.totalDeposit){var o,r=a(e.totalDeposit);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.totalDeposit.push(f.Coin.fromJSON(i))}}catch(c){r.e(c)}finally{r.f()}}return void 0!==e.votingStartTime&&null!==e.votingStartTime?n.votingStartTime=_(e.votingStartTime):n.votingStartTime=void 0,void 0!==e.votingEndTime&&null!==e.votingEndTime?n.votingEndTime=_(e.votingEndTime):n.votingEndTime=void 0,n},toJSON:function(e){var n={};return void 0!==e.proposalId&&(n.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.content&&(n.content=e.content?u.Any.toJSON(e.content):void 0),void 0!==e.status&&(n.status=h(e.status)),void 0!==e.finalTallyResult&&(n.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(n.submitTime=e.submitTime.toISOString()),void 0!==e.depositEndTime&&(n.depositEndTime=e.depositEndTime.toISOString()),e.totalDeposit?n.totalDeposit=e.totalDeposit.map((function(e){return e?f.Coin.toJSON(e):void 0})):n.totalDeposit=[],void 0!==e.votingStartTime&&(n.votingStartTime=e.votingStartTime.toISOString()),void 0!==e.votingEndTime&&(n.votingEndTime=e.votingEndTime.toISOString()),n},fromPartial:function(e){var n=Object.assign({},w);if(n.totalDeposit=[],void 0!==e.proposalId&&null!==e.proposalId?n.proposalId=e.proposalId:n.proposalId=s.default.UZERO,void 0!==e.content&&null!==e.content?n.content=u.Any.fromPartial(e.content):n.content=void 0,void 0!==e.status&&null!==e.status?n.status=e.status:n.status=0,void 0!==e.finalTallyResult&&null!==e.finalTallyResult?n.finalTallyResult=t.TallyResult.fromPartial(e.finalTallyResult):n.finalTallyResult=void 0,void 0!==e.submitTime&&null!==e.submitTime?n.submitTime=e.submitTime:n.submitTime=void 0,void 0!==e.depositEndTime&&null!==e.depositEndTime?n.depositEndTime=e.depositEndTime:n.depositEndTime=void 0,void 0!==e.totalDeposit&&null!==e.totalDeposit){var o,r=a(e.totalDeposit);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.totalDeposit.push(f.Coin.fromPartial(i))}}catch(c){r.e(c)}finally{r.f()}}return void 0!==e.votingStartTime&&null!==e.votingStartTime?n.votingStartTime=e.votingStartTime:n.votingStartTime=void 0,void 0!==e.votingEndTime&&null!==e.votingEndTime?n.votingEndTime=e.votingEndTime:n.votingEndTime=void 0,n}};var k={yes:"",abstain:"",no:"",noWithVeto:""};t.TallyResult={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.yes&&t.uint32(10).string(e.yes),""!==e.abstain&&t.uint32(18).string(e.abstain),""!==e.no&&t.uint32(26).string(e.no),""!==e.noWithVeto&&t.uint32(34).string(e.noWithVeto),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);n.pos>>3){case 1:o.yes=n.string();break;case 2:o.abstain=n.string();break;case 3:o.no=n.string();break;case 4:o.noWithVeto=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},k);return void 0!==e.yes&&null!==e.yes?t.yes=String(e.yes):t.yes="",void 0!==e.abstain&&null!==e.abstain?t.abstain=String(e.abstain):t.abstain="",void 0!==e.no&&null!==e.no?t.no=String(e.no):t.no="",void 0!==e.noWithVeto&&null!==e.noWithVeto?t.noWithVeto=String(e.noWithVeto):t.noWithVeto="",t},toJSON:function(e){var t={};return void 0!==e.yes&&(t.yes=e.yes),void 0!==e.abstain&&(t.abstain=e.abstain),void 0!==e.no&&(t.no=e.no),void 0!==e.noWithVeto&&(t.noWithVeto=e.noWithVeto),t},fromPartial:function(e){var t=Object.assign({},k);return void 0!==e.yes&&null!==e.yes?t.yes=e.yes:t.yes="",void 0!==e.abstain&&null!==e.abstain?t.abstain=e.abstain:t.abstain="",void 0!==e.no&&null!==e.no?t.no=e.no:t.no="",void 0!==e.noWithVeto&&null!==e.noWithVeto?t.noWithVeto=e.noWithVeto:t.noWithVeto="",t}};var A={proposalId:s.default.UZERO,voter:"",option:0};t.Vote={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();e.proposalId.isZero()||n.uint32(8).uint64(e.proposalId),""!==e.voter&&n.uint32(18).string(e.voter),0!==e.option&&n.uint32(24).int32(e.option);var o,r=a(e.options);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.WeightedVoteOption.encode(i,n.uint32(34).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},A);for(r.options=[];a.pos>>3){case 1:r.proposalId=a.uint64();break;case 2:r.voter=a.string();break;case 3:r.option=a.int32();break;case 4:r.options.push(t.WeightedVoteOption.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},A);if(n.options=[],void 0!==e.proposalId&&null!==e.proposalId?n.proposalId=s.default.fromString(e.proposalId):n.proposalId=s.default.UZERO,void 0!==e.voter&&null!==e.voter?n.voter=String(e.voter):n.voter="",void 0!==e.option&&null!==e.option?n.option=p(e.option):n.option=0,void 0!==e.options&&null!==e.options){var o,r=a(e.options);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.options.push(t.WeightedVoteOption.fromJSON(i))}}catch(c){r.e(c)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.proposalId&&(n.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.voter&&(n.voter=e.voter),void 0!==e.option&&(n.option=b(e.option)),e.options?n.options=e.options.map((function(e){return e?t.WeightedVoteOption.toJSON(e):void 0})):n.options=[],n},fromPartial:function(e){var n=Object.assign({},A);if(n.options=[],void 0!==e.proposalId&&null!==e.proposalId?n.proposalId=e.proposalId:n.proposalId=s.default.UZERO,void 0!==e.voter&&null!==e.voter?n.voter=e.voter:n.voter="",void 0!==e.option&&null!==e.option?n.option=e.option:n.option=0,void 0!==e.options&&null!==e.options){var o,r=a(e.options);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.options.push(t.WeightedVoteOption.fromPartial(i))}}catch(c){r.e(c)}finally{r.f()}}return n}};var x={};t.DepositParams={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create(),o=a(e.minDeposit);try{for(o.s();!(t=o.n()).done;){var r=t.value;f.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(i){o.e(i)}finally{o.f()}return void 0!==e.maxDepositPeriod&&d.Duration.encode(e.maxDepositPeriod,n.uint32(18).fork()).ldelim(),n},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},x);for(o.minDeposit=[];n.pos>>3){case 1:o.minDeposit.push(f.Coin.decode(n,n.uint32()));break;case 2:o.maxDepositPeriod=d.Duration.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},x);if(t.minDeposit=[],void 0!==e.minDeposit&&null!==e.minDeposit){var n,o=a(e.minDeposit);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.minDeposit.push(f.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod?t.maxDepositPeriod=d.Duration.fromJSON(e.maxDepositPeriod):t.maxDepositPeriod=void 0,t},toJSON:function(e){var t={};return e.minDeposit?t.minDeposit=e.minDeposit.map((function(e){return e?f.Coin.toJSON(e):void 0})):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?d.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial:function(e){var t=Object.assign({},x);if(t.minDeposit=[],void 0!==e.minDeposit&&null!==e.minDeposit){var n,o=a(e.minDeposit);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.minDeposit.push(f.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod?t.maxDepositPeriod=d.Duration.fromPartial(e.maxDepositPeriod):t.maxDepositPeriod=void 0,t}};var I={};t.VotingParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.votingPeriod&&d.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},I);n.pos>>3===1)o.votingPeriod=d.Duration.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},I);return void 0!==e.votingPeriod&&null!==e.votingPeriod?t.votingPeriod=d.Duration.fromJSON(e.votingPeriod):t.votingPeriod=void 0,t},toJSON:function(e){var t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?d.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial:function(e){var t=Object.assign({},I);return void 0!==e.votingPeriod&&null!==e.votingPeriod?t.votingPeriod=d.Duration.fromPartial(e.votingPeriod):t.votingPeriod=void 0,t}};var T={};t.TallyParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.quorum.length&&t.uint32(10).bytes(e.quorum),0!==e.threshold.length&&t.uint32(18).bytes(e.threshold),0!==e.vetoThreshold.length&&t.uint32(26).bytes(e.vetoThreshold),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},T);for(o.quorum=new Uint8Array,o.threshold=new Uint8Array,o.vetoThreshold=new Uint8Array;n.pos>>3){case 1:o.quorum=n.bytes();break;case 2:o.threshold=n.bytes();break;case 3:o.vetoThreshold=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},T);return t.quorum=new Uint8Array,t.threshold=new Uint8Array,t.vetoThreshold=new Uint8Array,void 0!==e.quorum&&null!==e.quorum&&(t.quorum=E(e.quorum)),void 0!==e.threshold&&null!==e.threshold&&(t.threshold=E(e.threshold)),void 0!==e.vetoThreshold&&null!==e.vetoThreshold&&(t.vetoThreshold=E(e.vetoThreshold)),t},toJSON:function(e){var t={};return void 0!==e.quorum&&(t.quorum=M(void 0!==e.quorum?e.quorum:new Uint8Array)),void 0!==e.threshold&&(t.threshold=M(void 0!==e.threshold?e.threshold:new Uint8Array)),void 0!==e.vetoThreshold&&(t.vetoThreshold=M(void 0!==e.vetoThreshold?e.vetoThreshold:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},T);return void 0!==e.quorum&&null!==e.quorum?t.quorum=e.quorum:t.quorum=new Uint8Array,void 0!==e.threshold&&null!==e.threshold?t.threshold=e.threshold:t.threshold=new Uint8Array,void 0!==e.vetoThreshold&&null!==e.vetoThreshold?t.vetoThreshold=e.vetoThreshold:t.vetoThreshold=new Uint8Array,t}};var S=function(){if("undefined"!==typeof S)return S;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),C=S.atob||function(e){return S.Buffer.from(e,"base64").toString("binary")};function E(e){for(var t=C(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.title&&n.uint32(10).string(e.title),""!==e.description&&n.uint32(18).string(e.description);var o,r=a(e.changes);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.ParamChange.encode(s,n.uint32(26).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},s);for(r.changes=[];a.pos>>3){case 1:r.title=a.string();break;case 2:r.description=a.string();break;case 3:r.changes.push(t.ParamChange.decode(a,a.uint32()));break;default:a.skipType(7&c)}}return r},fromJSON:function(e){var n=Object.assign({},s);if(n.changes=[],void 0!==e.title&&null!==e.title?n.title=String(e.title):n.title="",void 0!==e.description&&null!==e.description?n.description=String(e.description):n.description="",void 0!==e.changes&&null!==e.changes){var o,r=a(e.changes);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.changes.push(t.ParamChange.fromJSON(i))}}catch(c){r.e(c)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.title&&(n.title=e.title),void 0!==e.description&&(n.description=e.description),e.changes?n.changes=e.changes.map((function(e){return e?t.ParamChange.toJSON(e):void 0})):n.changes=[],n},fromPartial:function(e){var n=Object.assign({},s);if(n.changes=[],void 0!==e.title&&null!==e.title?n.title=e.title:n.title="",void 0!==e.description&&null!==e.description?n.description=e.description:n.description="",void 0!==e.changes&&null!==e.changes){var o,r=a(e.changes);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.changes.push(t.ParamChange.fromPartial(i))}}catch(c){r.e(c)}finally{r.f()}}return n}};var c={subspace:"",key:"",value:""};t.ParamChange={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.subspace&&t.uint32(10).string(e.subspace),""!==e.key&&t.uint32(18).string(e.key),""!==e.value&&t.uint32(26).string(e.value),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.subspace=n.string();break;case 2:o.key=n.string();break;case 3:o.value=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.subspace&&null!==e.subspace?t.subspace=String(e.subspace):t.subspace="",void 0!==e.key&&null!==e.key?t.key=String(e.key):t.key="",void 0!==e.value&&null!==e.value?t.value=String(e.value):t.value="",t},toJSON:function(e){var t={};return void 0!==e.subspace&&(t.subspace=e.subspace),void 0!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=e.value),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.subspace&&null!==e.subspace?t.subspace=e.subspace:t.subspace="",void 0!==e.key&&null!==e.key?t.key=e.key:t.key="",void 0!==e.value&&null!==e.value?t.value=e.value:t.value="",t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},76820:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureDescriptor_Data_Multi=t.SignatureDescriptor_Data_Single=t.SignatureDescriptor_Data=t.SignatureDescriptor=t.SignatureDescriptors=t.signModeToJSON=t.signModeFromJSON=t.SignMode=t.protobufPackage=void 0;var r,i=o(n(29600)),s=o(n(80121)),c=n(50922),u=n(15431);function d(e){switch(e){case 0:case"SIGN_MODE_UNSPECIFIED":return r.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return r.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return r.SIGN_MODE_TEXTUAL;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return r.SIGN_MODE_LEGACY_AMINO_JSON;default:return r.UNRECOGNIZED}}function l(e){switch(e){case r.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case r.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case r.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case r.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";default:return"UNKNOWN"}}t.protobufPackage="cosmos.tx.signing.v1beta1",function(e){e[e.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",e[e.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",e[e.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(r=t.SignMode||(t.SignMode={})),t.signModeFromJSON=d,t.signModeToJSON=l;var f={};t.SignatureDescriptors={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),r=a(e.signatures);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.SignatureDescriptor.encode(i,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return o},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},f);for(r.signatures=[];a.pos>>3===1)r.signatures.push(t.SignatureDescriptor.decode(a,a.uint32()));else a.skipType(7&i)}return r},fromJSON:function(e){var n=Object.assign({},f);if(n.signatures=[],void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.SignatureDescriptor.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return e.signatures?n.signatures=e.signatures.map((function(e){return e?t.SignatureDescriptor.toJSON(e):void 0})):n.signatures=[],n},fromPartial:function(e){var n=Object.assign({},f);if(n.signatures=[],void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.SignatureDescriptor.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var p={sequence:i.default.UZERO};t.SignatureDescriptor={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.publicKey&&c.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.data&&t.SignatureDescriptor_Data.encode(e.data,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n},decode:function(e,n){for(var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},p);a.pos>>3){case 1:r.publicKey=c.Any.decode(a,a.uint32());break;case 2:r.data=t.SignatureDescriptor_Data.decode(a,a.uint32());break;case 3:r.sequence=a.uint64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},p);return void 0!==e.publicKey&&null!==e.publicKey?n.publicKey=c.Any.fromJSON(e.publicKey):n.publicKey=void 0,void 0!==e.data&&null!==e.data?n.data=t.SignatureDescriptor_Data.fromJSON(e.data):n.data=void 0,void 0!==e.sequence&&null!==e.sequence?n.sequence=i.default.fromString(e.sequence):n.sequence=i.default.UZERO,n},toJSON:function(e){var n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?c.Any.toJSON(e.publicKey):void 0),void 0!==e.data&&(n.data=e.data?t.SignatureDescriptor_Data.toJSON(e.data):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||i.default.UZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},p);return void 0!==e.publicKey&&null!==e.publicKey?n.publicKey=c.Any.fromPartial(e.publicKey):n.publicKey=void 0,void 0!==e.data&&null!==e.data?n.data=t.SignatureDescriptor_Data.fromPartial(e.data):n.data=void 0,void 0!==e.sequence&&null!==e.sequence?n.sequence=e.sequence:n.sequence=i.default.UZERO,n}};var b={};t.SignatureDescriptor_Data={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.single&&t.SignatureDescriptor_Data_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.SignatureDescriptor_Data_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},b);a.pos>>3){case 1:r.single=t.SignatureDescriptor_Data_Single.decode(a,a.uint32());break;case 2:r.multi=t.SignatureDescriptor_Data_Multi.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},b);return void 0!==e.single&&null!==e.single?n.single=t.SignatureDescriptor_Data_Single.fromJSON(e.single):n.single=void 0,void 0!==e.multi&&null!==e.multi?n.multi=t.SignatureDescriptor_Data_Multi.fromJSON(e.multi):n.multi=void 0,n},toJSON:function(e){var n={};return void 0!==e.single&&(n.single=e.single?t.SignatureDescriptor_Data_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.SignatureDescriptor_Data_Multi.toJSON(e.multi):void 0),n},fromPartial:function(e){var n=Object.assign({},b);return void 0!==e.single&&null!==e.single?n.single=t.SignatureDescriptor_Data_Single.fromPartial(e.single):n.single=void 0,void 0!==e.multi&&null!==e.multi?n.multi=t.SignatureDescriptor_Data_Multi.fromPartial(e.multi):n.multi=void 0,n}};var m={mode:0};t.SignatureDescriptor_Data_Single={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),0!==e.signature.length&&t.uint32(18).bytes(e.signature),t},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);for(o.signature=new Uint8Array;n.pos>>3){case 1:o.mode=n.int32();break;case 2:o.signature=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},m);return t.signature=new Uint8Array,void 0!==e.mode&&null!==e.mode?t.mode=d(e.mode):t.mode=0,void 0!==e.signature&&null!==e.signature&&(t.signature=function(e){for(var t=y(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();void 0!==e.bitarray&&u.CompactBitArray.encode(e.bitarray,n.uint32(10).fork()).ldelim();var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.SignatureDescriptor_Data.encode(i,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},h);for(r.signatures=[];a.pos>>3){case 1:r.bitarray=u.CompactBitArray.decode(a,a.uint32());break;case 2:r.signatures.push(t.SignatureDescriptor_Data.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},h);if(n.signatures=[],void 0!==e.bitarray&&null!==e.bitarray?n.bitarray=u.CompactBitArray.fromJSON(e.bitarray):n.bitarray=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.SignatureDescriptor_Data.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?u.CompactBitArray.toJSON(e.bitarray):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return e?t.SignatureDescriptor_Data.toJSON(e):void 0})):n.signatures=[],n},fromPartial:function(e){var n=Object.assign({},h);if(n.signatures=[],void 0!==e.bitarray&&null!==e.bitarray?n.bitarray=u.CompactBitArray.fromPartial(e.bitarray):n.bitarray=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.SignatureDescriptor_Data.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var g=function(){if("undefined"!==typeof g)return g;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),y=g.atob||function(e){return g.Buffer.from(e,"base64").toString("binary")};var v=g.btoa||function(e){return g.Buffer.from(e,"binary").toString("base64")};s.default.util.Long!==i.default&&(s.default.util.Long=i.default,s.default.configure())},45031:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceClientImpl=t.GetTxResponse=t.GetTxRequest=t.SimulateResponse=t.SimulateRequest=t.BroadcastTxResponse=t.BroadcastTxRequest=t.GetTxsEventResponse=t.GetTxsEventRequest=t.broadcastModeToJSON=t.broadcastModeFromJSON=t.BroadcastMode=t.orderByToJSON=t.orderByFromJSON=t.OrderBy=t.protobufPackage=void 0;var s,c,u=i(n(29600)),d=i(n(80121)),l=n(13222),f=n(67757),p=n(66244);function b(e){switch(e){case 0:case"ORDER_BY_UNSPECIFIED":return s.ORDER_BY_UNSPECIFIED;case 1:case"ORDER_BY_ASC":return s.ORDER_BY_ASC;case 2:case"ORDER_BY_DESC":return s.ORDER_BY_DESC;default:return s.UNRECOGNIZED}}function m(e){switch(e){case s.ORDER_BY_UNSPECIFIED:return"ORDER_BY_UNSPECIFIED";case s.ORDER_BY_ASC:return"ORDER_BY_ASC";case s.ORDER_BY_DESC:return"ORDER_BY_DESC";default:return"UNKNOWN"}}function h(e){switch(e){case 0:case"BROADCAST_MODE_UNSPECIFIED":return c.BROADCAST_MODE_UNSPECIFIED;case 1:case"BROADCAST_MODE_BLOCK":return c.BROADCAST_MODE_BLOCK;case 2:case"BROADCAST_MODE_SYNC":return c.BROADCAST_MODE_SYNC;case 3:case"BROADCAST_MODE_ASYNC":return c.BROADCAST_MODE_ASYNC;default:return c.UNRECOGNIZED}}function g(e){switch(e){case c.BROADCAST_MODE_UNSPECIFIED:return"BROADCAST_MODE_UNSPECIFIED";case c.BROADCAST_MODE_BLOCK:return"BROADCAST_MODE_BLOCK";case c.BROADCAST_MODE_SYNC:return"BROADCAST_MODE_SYNC";case c.BROADCAST_MODE_ASYNC:return"BROADCAST_MODE_ASYNC";default:return"UNKNOWN"}}t.protobufPackage="cosmos.tx.v1beta1",function(e){e[e.ORDER_BY_UNSPECIFIED=0]="ORDER_BY_UNSPECIFIED",e[e.ORDER_BY_ASC=1]="ORDER_BY_ASC",e[e.ORDER_BY_DESC=2]="ORDER_BY_DESC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(s=t.OrderBy||(t.OrderBy={})),t.orderByFromJSON=b,t.orderByToJSON=m,function(e){e[e.BROADCAST_MODE_UNSPECIFIED=0]="BROADCAST_MODE_UNSPECIFIED",e[e.BROADCAST_MODE_BLOCK=1]="BROADCAST_MODE_BLOCK",e[e.BROADCAST_MODE_SYNC=2]="BROADCAST_MODE_SYNC",e[e.BROADCAST_MODE_ASYNC=3]="BROADCAST_MODE_ASYNC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(c=t.BroadcastMode||(t.BroadcastMode={})),t.broadcastModeFromJSON=h,t.broadcastModeToJSON=g;var y={events:"",orderBy:0};t.GetTxsEventRequest={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create(),a=r(e.events);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(i){a.e(i)}finally{a.f()}return void 0!==e.pagination&&l.PageRequest.encode(e.pagination,n.uint32(18).fork()).ldelim(),0!==e.orderBy&&n.uint32(24).int32(e.orderBy),n},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.events=[];n.pos>>3){case 1:o.events.push(n.string());break;case 2:o.pagination=l.PageRequest.decode(n,n.uint32());break;case 3:o.orderBy=n.int32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);if(t.events=[],void 0!==e.events&&null!==e.events){var n,a=r(e.events);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.events.push(String(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.pagination&&null!==e.pagination?t.pagination=l.PageRequest.fromJSON(e.pagination):t.pagination=void 0,void 0!==e.orderBy&&null!==e.orderBy?t.orderBy=b(e.orderBy):t.orderBy=0,t},toJSON:function(e){var t={};return e.events?t.events=e.events.map((function(e){return e})):t.events=[],void 0!==e.pagination&&(t.pagination=e.pagination?l.PageRequest.toJSON(e.pagination):void 0),void 0!==e.orderBy&&(t.orderBy=m(e.orderBy)),t},fromPartial:function(e){var t=Object.assign({},y);if(t.events=[],void 0!==e.events&&null!==e.events){var n,a=r(e.events);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.events.push(o)}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.pagination&&null!==e.pagination?t.pagination=l.PageRequest.fromPartial(e.pagination):t.pagination=void 0,void 0!==e.orderBy&&null!==e.orderBy?t.orderBy=e.orderBy:t.orderBy=0,t}};var v={};t.GetTxsEventResponse={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create(),a=r(e.txs);try{for(a.s();!(t=a.n()).done;){var o=t.value;p.Tx.encode(o,n.uint32(10).fork()).ldelim()}}catch(u){a.e(u)}finally{a.f()}var i,s=r(e.txResponses);try{for(s.s();!(i=s.n()).done;){var c=i.value;f.TxResponse.encode(c,n.uint32(18).fork()).ldelim()}}catch(u){s.e(u)}finally{s.f()}return void 0!==e.pagination&&l.PageResponse.encode(e.pagination,n.uint32(26).fork()).ldelim(),n},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);for(o.txs=[],o.txResponses=[];n.pos>>3){case 1:o.txs.push(p.Tx.decode(n,n.uint32()));break;case 2:o.txResponses.push(f.TxResponse.decode(n,n.uint32()));break;case 3:o.pagination=l.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},v);if(t.txs=[],t.txResponses=[],void 0!==e.txs&&null!==e.txs){var n,a=r(e.txs);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.txs.push(p.Tx.fromJSON(o))}}catch(u){a.e(u)}finally{a.f()}}if(void 0!==e.txResponses&&null!==e.txResponses){var i,s=r(e.txResponses);try{for(s.s();!(i=s.n()).done;){var c=i.value;t.txResponses.push(f.TxResponse.fromJSON(c))}}catch(u){s.e(u)}finally{s.f()}}return void 0!==e.pagination&&null!==e.pagination?t.pagination=l.PageResponse.fromJSON(e.pagination):t.pagination=void 0,t},toJSON:function(e){var t={};return e.txs?t.txs=e.txs.map((function(e){return e?p.Tx.toJSON(e):void 0})):t.txs=[],e.txResponses?t.txResponses=e.txResponses.map((function(e){return e?f.TxResponse.toJSON(e):void 0})):t.txResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?l.PageResponse.toJSON(e.pagination):void 0),t},fromPartial:function(e){var t=Object.assign({},v);if(t.txs=[],t.txResponses=[],void 0!==e.txs&&null!==e.txs){var n,a=r(e.txs);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.txs.push(p.Tx.fromPartial(o))}}catch(u){a.e(u)}finally{a.f()}}if(void 0!==e.txResponses&&null!==e.txResponses){var i,s=r(e.txResponses);try{for(s.s();!(i=s.n()).done;){var c=i.value;t.txResponses.push(f.TxResponse.fromPartial(c))}}catch(u){s.e(u)}finally{s.f()}}return void 0!==e.pagination&&null!==e.pagination?t.pagination=l.PageResponse.fromPartial(e.pagination):t.pagination=void 0,t}};var w={mode:0};t.BroadcastTxRequest={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return 0!==e.txBytes.length&&t.uint32(10).bytes(e.txBytes),0!==e.mode&&t.uint32(16).int32(e.mode),t},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);for(o.txBytes=new Uint8Array;n.pos>>3){case 1:o.txBytes=n.bytes();break;case 2:o.mode=n.int32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},w);return t.txBytes=new Uint8Array,void 0!==e.txBytes&&null!==e.txBytes&&(t.txBytes=R(e.txBytes)),void 0!==e.mode&&null!==e.mode?t.mode=h(e.mode):t.mode=0,t},toJSON:function(e){var t={};return void 0!==e.txBytes&&(t.txBytes=P(void 0!==e.txBytes?e.txBytes:new Uint8Array)),void 0!==e.mode&&(t.mode=g(e.mode)),t},fromPartial:function(e){var t=Object.assign({},w);return void 0!==e.txBytes&&null!==e.txBytes?t.txBytes=e.txBytes:t.txBytes=new Uint8Array,void 0!==e.mode&&null!==e.mode?t.mode=e.mode:t.mode=0,t}};var k={};t.BroadcastTxResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return void 0!==e.txResponse&&f.TxResponse.encode(e.txResponse,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);n.pos>>3===1)o.txResponse=f.TxResponse.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},k);return void 0!==e.txResponse&&null!==e.txResponse?t.txResponse=f.TxResponse.fromJSON(e.txResponse):t.txResponse=void 0,t},toJSON:function(e){var t={};return void 0!==e.txResponse&&(t.txResponse=e.txResponse?f.TxResponse.toJSON(e.txResponse):void 0),t},fromPartial:function(e){var t=Object.assign({},k);return void 0!==e.txResponse&&null!==e.txResponse?t.txResponse=f.TxResponse.fromPartial(e.txResponse):t.txResponse=void 0,t}};var A={};t.SimulateRequest={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return void 0!==e.tx&&p.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),0!==e.txBytes.length&&t.uint32(18).bytes(e.txBytes),t},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},A);for(o.txBytes=new Uint8Array;n.pos>>3){case 1:o.tx=p.Tx.decode(n,n.uint32());break;case 2:o.txBytes=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},A);return t.txBytes=new Uint8Array,void 0!==e.tx&&null!==e.tx?t.tx=p.Tx.fromJSON(e.tx):t.tx=void 0,void 0!==e.txBytes&&null!==e.txBytes&&(t.txBytes=R(e.txBytes)),t},toJSON:function(e){var t={};return void 0!==e.tx&&(t.tx=e.tx?p.Tx.toJSON(e.tx):void 0),void 0!==e.txBytes&&(t.txBytes=P(void 0!==e.txBytes?e.txBytes:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},A);return void 0!==e.tx&&null!==e.tx?t.tx=p.Tx.fromPartial(e.tx):t.tx=void 0,void 0!==e.txBytes&&null!==e.txBytes?t.txBytes=e.txBytes:t.txBytes=new Uint8Array,t}};var x={};t.SimulateResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return void 0!==e.gasInfo&&f.GasInfo.encode(e.gasInfo,t.uint32(10).fork()).ldelim(),void 0!==e.result&&f.Result.encode(e.result,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},x);n.pos>>3){case 1:o.gasInfo=f.GasInfo.decode(n,n.uint32());break;case 2:o.result=f.Result.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},x);return void 0!==e.gasInfo&&null!==e.gasInfo?t.gasInfo=f.GasInfo.fromJSON(e.gasInfo):t.gasInfo=void 0,void 0!==e.result&&null!==e.result?t.result=f.Result.fromJSON(e.result):t.result=void 0,t},toJSON:function(e){var t={};return void 0!==e.gasInfo&&(t.gasInfo=e.gasInfo?f.GasInfo.toJSON(e.gasInfo):void 0),void 0!==e.result&&(t.result=e.result?f.Result.toJSON(e.result):void 0),t},fromPartial:function(e){var t=Object.assign({},x);return void 0!==e.gasInfo&&null!==e.gasInfo?t.gasInfo=f.GasInfo.fromPartial(e.gasInfo):t.gasInfo=void 0,void 0!==e.result&&null!==e.result?t.result=f.Result.fromPartial(e.result):t.result=void 0,t}};var I={hash:""};t.GetTxRequest={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return""!==e.hash&&t.uint32(10).string(e.hash),t},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},I);n.pos>>3===1)o.hash=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},I);return void 0!==e.hash&&null!==e.hash?t.hash=String(e.hash):t.hash="",t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=e.hash),t},fromPartial:function(e){var t=Object.assign({},I);return void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash="",t}};var T={};t.GetTxResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return void 0!==e.tx&&p.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),void 0!==e.txResponse&&f.TxResponse.encode(e.txResponse,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},T);n.pos>>3){case 1:o.tx=p.Tx.decode(n,n.uint32());break;case 2:o.txResponse=f.TxResponse.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},T);return void 0!==e.tx&&null!==e.tx?t.tx=p.Tx.fromJSON(e.tx):t.tx=void 0,void 0!==e.txResponse&&null!==e.txResponse?t.txResponse=f.TxResponse.fromJSON(e.txResponse):t.txResponse=void 0,t},toJSON:function(e){var t={};return void 0!==e.tx&&(t.tx=e.tx?p.Tx.toJSON(e.tx):void 0),void 0!==e.txResponse&&(t.txResponse=e.txResponse?f.TxResponse.toJSON(e.txResponse):void 0),t},fromPartial:function(e){var t=Object.assign({},T);return void 0!==e.tx&&null!==e.tx?t.tx=p.Tx.fromPartial(e.tx):t.tx=void 0,void 0!==e.txResponse&&null!==e.txResponse?t.txResponse=f.TxResponse.fromPartial(e.txResponse):t.txResponse=void 0,t}};var S=function(){function e(t){a(this,e),this.rpc=t,this.Simulate=this.Simulate.bind(this),this.GetTx=this.GetTx.bind(this),this.BroadcastTx=this.BroadcastTx.bind(this),this.GetTxsEvent=this.GetTxsEvent.bind(this)}return o(e,[{key:"Simulate",value:function(e){var n=t.SimulateRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","Simulate",n).then((function(e){return t.SimulateResponse.decode(new d.default.Reader(e))}))}},{key:"GetTx",value:function(e){var n=t.GetTxRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetTx",n).then((function(e){return t.GetTxResponse.decode(new d.default.Reader(e))}))}},{key:"BroadcastTx",value:function(e){var n=t.BroadcastTxRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","BroadcastTx",n).then((function(e){return t.BroadcastTxResponse.decode(new d.default.Reader(e))}))}},{key:"GetTxsEvent",value:function(e){var n=t.GetTxsEventRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetTxsEvent",n).then((function(e){return t.GetTxsEventResponse.decode(new d.default.Reader(e))}))}}]),e}();t.ServiceClientImpl=S;var C=function(){if("undefined"!==typeof C)return C;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),E=C.atob||function(e){return C.Buffer.from(e,"base64").toString("binary")};function R(e){for(var t=E(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.body&&t.TxBody.encode(e.body,n.uint32(10).fork()).ldelim(),void 0!==e.authInfo&&t.AuthInfo.encode(e.authInfo,n.uint32(18).fork()).ldelim();var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var s=o.value;n.uint32(26).bytes(s)}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},l);for(r.signatures=[];a.pos>>3){case 1:r.body=t.TxBody.decode(a,a.uint32());break;case 2:r.authInfo=t.AuthInfo.decode(a,a.uint32());break;case 3:r.signatures.push(a.bytes());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},l);if(n.signatures=[],void 0!==e.body&&null!==e.body?n.body=t.TxBody.fromJSON(e.body):n.body=void 0,void 0!==e.authInfo&&null!==e.authInfo?n.authInfo=t.AuthInfo.fromJSON(e.authInfo):n.authInfo=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(x(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.body&&(n.body=e.body?t.TxBody.toJSON(e.body):void 0),void 0!==e.authInfo&&(n.authInfo=e.authInfo?t.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return T(void 0!==e?e:new Uint8Array)})):n.signatures=[],n},fromPartial:function(e){var n=Object.assign({},l);if(n.signatures=[],void 0!==e.body&&null!==e.body?n.body=t.TxBody.fromPartial(e.body):n.body=void 0,void 0!==e.authInfo&&null!==e.authInfo?n.authInfo=t.AuthInfo.fromPartial(e.authInfo):n.authInfo=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(i)}}catch(s){r.e(s)}finally{r.f()}}return n}};var f={};t.TxRaw={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes);var n,o=a(e.signatures);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(26).bytes(r)}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);for(o.signatures=[],o.bodyBytes=new Uint8Array,o.authInfoBytes=new Uint8Array;n.pos>>3){case 1:o.bodyBytes=n.bytes();break;case 2:o.authInfoBytes=n.bytes();break;case 3:o.signatures.push(n.bytes());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);if(t.signatures=[],t.bodyBytes=new Uint8Array,t.authInfoBytes=new Uint8Array,void 0!==e.bodyBytes&&null!==e.bodyBytes&&(t.bodyBytes=x(e.bodyBytes)),void 0!==e.authInfoBytes&&null!==e.authInfoBytes&&(t.authInfoBytes=x(e.authInfoBytes)),void 0!==e.signatures&&null!==e.signatures){var n,o=a(e.signatures);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.signatures.push(x(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.bodyBytes&&(t.bodyBytes=T(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=T(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map((function(e){return T(void 0!==e?e:new Uint8Array)})):t.signatures=[],t},fromPartial:function(e){var t=Object.assign({},f);if(t.signatures=[],void 0!==e.bodyBytes&&null!==e.bodyBytes?t.bodyBytes=e.bodyBytes:t.bodyBytes=new Uint8Array,void 0!==e.authInfoBytes&&null!==e.authInfoBytes?t.authInfoBytes=e.authInfoBytes:t.authInfoBytes=new Uint8Array,void 0!==e.signatures&&null!==e.signatures){var n,o=a(e.signatures);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.signatures.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var p={chainId:"",accountNumber:r.default.UZERO};t.SignDoc={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),""!==e.chainId&&t.uint32(26).string(e.chainId),e.accountNumber.isZero()||t.uint32(32).uint64(e.accountNumber),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);for(o.bodyBytes=new Uint8Array,o.authInfoBytes=new Uint8Array;n.pos>>3){case 1:o.bodyBytes=n.bytes();break;case 2:o.authInfoBytes=n.bytes();break;case 3:o.chainId=n.string();break;case 4:o.accountNumber=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return t.bodyBytes=new Uint8Array,t.authInfoBytes=new Uint8Array,void 0!==e.bodyBytes&&null!==e.bodyBytes&&(t.bodyBytes=x(e.bodyBytes)),void 0!==e.authInfoBytes&&null!==e.authInfoBytes&&(t.authInfoBytes=x(e.authInfoBytes)),void 0!==e.chainId&&null!==e.chainId?t.chainId=String(e.chainId):t.chainId="",void 0!==e.accountNumber&&null!==e.accountNumber?t.accountNumber=r.default.fromString(e.accountNumber):t.accountNumber=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.bodyBytes&&(t.bodyBytes=T(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=T(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.bodyBytes&&null!==e.bodyBytes?t.bodyBytes=e.bodyBytes:t.bodyBytes=new Uint8Array,void 0!==e.authInfoBytes&&null!==e.authInfoBytes?t.authInfoBytes=e.authInfoBytes:t.authInfoBytes=new Uint8Array,void 0!==e.chainId&&null!==e.chainId?t.chainId=e.chainId:t.chainId="",void 0!==e.accountNumber&&null!==e.accountNumber?t.accountNumber=e.accountNumber:t.accountNumber=r.default.UZERO,t}};var b={memo:"",timeoutHeight:r.default.UZERO};t.TxBody={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.messages);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.Any.encode(r,n.uint32(10).fork()).ldelim()}}catch(b){o.e(b)}finally{o.f()}""!==e.memo&&n.uint32(18).string(e.memo),e.timeoutHeight.isZero()||n.uint32(24).uint64(e.timeoutHeight);var c,u=a(e.extensionOptions);try{for(u.s();!(c=u.n()).done;){var d=c.value;s.Any.encode(d,n.uint32(8186).fork()).ldelim()}}catch(b){u.e(b)}finally{u.f()}var l,f=a(e.nonCriticalExtensionOptions);try{for(f.s();!(l=f.n()).done;){var p=l.value;s.Any.encode(p,n.uint32(16378).fork()).ldelim()}}catch(b){f.e(b)}finally{f.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);for(o.messages=[],o.extensionOptions=[],o.nonCriticalExtensionOptions=[];n.pos>>3){case 1:o.messages.push(s.Any.decode(n,n.uint32()));break;case 2:o.memo=n.string();break;case 3:o.timeoutHeight=n.uint64();break;case 1023:o.extensionOptions.push(s.Any.decode(n,n.uint32()));break;case 2047:o.nonCriticalExtensionOptions.push(s.Any.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);if(t.messages=[],t.extensionOptions=[],t.nonCriticalExtensionOptions=[],void 0!==e.messages&&null!==e.messages){var n,o=a(e.messages);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.messages.push(s.Any.fromJSON(i))}}catch(m){o.e(m)}finally{o.f()}}if(void 0!==e.memo&&null!==e.memo?t.memo=String(e.memo):t.memo="",void 0!==e.timeoutHeight&&null!==e.timeoutHeight?t.timeoutHeight=r.default.fromString(e.timeoutHeight):t.timeoutHeight=r.default.UZERO,void 0!==e.extensionOptions&&null!==e.extensionOptions){var c,u=a(e.extensionOptions);try{for(u.s();!(c=u.n()).done;){var d=c.value;t.extensionOptions.push(s.Any.fromJSON(d))}}catch(m){u.e(m)}finally{u.f()}}if(void 0!==e.nonCriticalExtensionOptions&&null!==e.nonCriticalExtensionOptions){var l,f=a(e.nonCriticalExtensionOptions);try{for(f.s();!(l=f.n()).done;){var p=l.value;t.nonCriticalExtensionOptions.push(s.Any.fromJSON(p))}}catch(m){f.e(m)}finally{f.f()}}return t},toJSON:function(e){var t={};return e.messages?t.messages=e.messages.map((function(e){return e?s.Any.toJSON(e):void 0})):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=(e.timeoutHeight||r.default.UZERO).toString()),e.extensionOptions?t.extensionOptions=e.extensionOptions.map((function(e){return e?s.Any.toJSON(e):void 0})):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map((function(e){return e?s.Any.toJSON(e):void 0})):t.nonCriticalExtensionOptions=[],t},fromPartial:function(e){var t=Object.assign({},b);if(t.messages=[],t.extensionOptions=[],t.nonCriticalExtensionOptions=[],void 0!==e.messages&&null!==e.messages){var n,o=a(e.messages);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.messages.push(s.Any.fromPartial(i))}}catch(m){o.e(m)}finally{o.f()}}if(void 0!==e.memo&&null!==e.memo?t.memo=e.memo:t.memo="",void 0!==e.timeoutHeight&&null!==e.timeoutHeight?t.timeoutHeight=e.timeoutHeight:t.timeoutHeight=r.default.UZERO,void 0!==e.extensionOptions&&null!==e.extensionOptions){var c,u=a(e.extensionOptions);try{for(u.s();!(c=u.n()).done;){var d=c.value;t.extensionOptions.push(s.Any.fromPartial(d))}}catch(m){u.e(m)}finally{u.f()}}if(void 0!==e.nonCriticalExtensionOptions&&null!==e.nonCriticalExtensionOptions){var l,f=a(e.nonCriticalExtensionOptions);try{for(f.s();!(l=f.n()).done;){var p=l.value;t.nonCriticalExtensionOptions.push(s.Any.fromPartial(p))}}catch(m){f.e(m)}finally{f.f()}}return t}};var m={};t.AuthInfo={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.signerInfos);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.SignerInfo.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return void 0!==e.fee&&t.Fee.encode(e.fee,o.uint32(18).fork()).ldelim(),o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},m);for(r.signerInfos=[];a.pos>>3){case 1:r.signerInfos.push(t.SignerInfo.decode(a,a.uint32()));break;case 2:r.fee=t.Fee.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},m);if(n.signerInfos=[],void 0!==e.signerInfos&&null!==e.signerInfos){var o,r=a(e.signerInfos);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signerInfos.push(t.SignerInfo.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.fee&&null!==e.fee?n.fee=t.Fee.fromJSON(e.fee):n.fee=void 0,n},toJSON:function(e){var n={};return e.signerInfos?n.signerInfos=e.signerInfos.map((function(e){return e?t.SignerInfo.toJSON(e):void 0})):n.signerInfos=[],void 0!==e.fee&&(n.fee=e.fee?t.Fee.toJSON(e.fee):void 0),n},fromPartial:function(e){var n=Object.assign({},m);if(n.signerInfos=[],void 0!==e.signerInfos&&null!==e.signerInfos){var o,r=a(e.signerInfos);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signerInfos.push(t.SignerInfo.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.fee&&null!==e.fee?n.fee=t.Fee.fromPartial(e.fee):n.fee=void 0,n}};var h={sequence:r.default.UZERO};t.SignerInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.publicKey&&s.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&t.ModeInfo.encode(e.modeInfo,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},h);a.pos>>3){case 1:r.publicKey=s.Any.decode(a,a.uint32());break;case 2:r.modeInfo=t.ModeInfo.decode(a,a.uint32());break;case 3:r.sequence=a.uint64();break;default:a.skipType(7&c)}}return r},fromJSON:function(e){var n=Object.assign({},h);return void 0!==e.publicKey&&null!==e.publicKey?n.publicKey=s.Any.fromJSON(e.publicKey):n.publicKey=void 0,void 0!==e.modeInfo&&null!==e.modeInfo?n.modeInfo=t.ModeInfo.fromJSON(e.modeInfo):n.modeInfo=void 0,void 0!==e.sequence&&null!==e.sequence?n.sequence=r.default.fromString(e.sequence):n.sequence=r.default.UZERO,n},toJSON:function(e){var n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?s.Any.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(n.modeInfo=e.modeInfo?t.ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||r.default.UZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},h);return void 0!==e.publicKey&&null!==e.publicKey?n.publicKey=s.Any.fromPartial(e.publicKey):n.publicKey=void 0,void 0!==e.modeInfo&&null!==e.modeInfo?n.modeInfo=t.ModeInfo.fromPartial(e.modeInfo):n.modeInfo=void 0,void 0!==e.sequence&&null!==e.sequence?n.sequence=e.sequence:n.sequence=r.default.UZERO,n}};var g={};t.ModeInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.single&&t.ModeInfo_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.ModeInfo_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},g);a.pos>>3){case 1:r.single=t.ModeInfo_Single.decode(a,a.uint32());break;case 2:r.multi=t.ModeInfo_Multi.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},g);return void 0!==e.single&&null!==e.single?n.single=t.ModeInfo_Single.fromJSON(e.single):n.single=void 0,void 0!==e.multi&&null!==e.multi?n.multi=t.ModeInfo_Multi.fromJSON(e.multi):n.multi=void 0,n},toJSON:function(e){var n={};return void 0!==e.single&&(n.single=e.single?t.ModeInfo_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.ModeInfo_Multi.toJSON(e.multi):void 0),n},fromPartial:function(e){var n=Object.assign({},g);return void 0!==e.single&&null!==e.single?n.single=t.ModeInfo_Single.fromPartial(e.single):n.single=void 0,void 0!==e.multi&&null!==e.multi?n.multi=t.ModeInfo_Multi.fromPartial(e.multi):n.multi=void 0,n}};var y={mode:0};t.ModeInfo_Single={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);n.pos>>3===1)o.mode=n.int32();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},y);return void 0!==e.mode&&null!==e.mode?t.mode=c.signModeFromJSON(e.mode):t.mode=0,t},toJSON:function(e){var t={};return void 0!==e.mode&&(t.mode=c.signModeToJSON(e.mode)),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.mode&&null!==e.mode?t.mode=e.mode:t.mode=0,t}};var v={};t.ModeInfo_Multi={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.bitarray&&u.CompactBitArray.encode(e.bitarray,n.uint32(10).fork()).ldelim();var o,r=a(e.modeInfos);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.ModeInfo.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},v);for(r.modeInfos=[];a.pos>>3){case 1:r.bitarray=u.CompactBitArray.decode(a,a.uint32());break;case 2:r.modeInfos.push(t.ModeInfo.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},v);if(n.modeInfos=[],void 0!==e.bitarray&&null!==e.bitarray?n.bitarray=u.CompactBitArray.fromJSON(e.bitarray):n.bitarray=void 0,void 0!==e.modeInfos&&null!==e.modeInfos){var o,r=a(e.modeInfos);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.modeInfos.push(t.ModeInfo.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?u.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?n.modeInfos=e.modeInfos.map((function(e){return e?t.ModeInfo.toJSON(e):void 0})):n.modeInfos=[],n},fromPartial:function(e){var n=Object.assign({},v);if(n.modeInfos=[],void 0!==e.bitarray&&null!==e.bitarray?n.bitarray=u.CompactBitArray.fromPartial(e.bitarray):n.bitarray=void 0,void 0!==e.modeInfos&&null!==e.modeInfos){var o,r=a(e.modeInfos);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.modeInfos.push(t.ModeInfo.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var w={gasLimit:r.default.UZERO,payer:"",granter:""};t.Fee={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.amount);try{for(o.s();!(t=o.n()).done;){var r=t.value;d.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return e.gasLimit.isZero()||n.uint32(16).uint64(e.gasLimit),""!==e.payer&&n.uint32(26).string(e.payer),""!==e.granter&&n.uint32(34).string(e.granter),n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);for(o.amount=[];n.pos>>3){case 1:o.amount.push(d.Coin.decode(n,n.uint32()));break;case 2:o.gasLimit=n.uint64();break;case 3:o.payer=n.string();break;case 4:o.granter=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},w);if(t.amount=[],void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.amount.push(d.Coin.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.gasLimit&&null!==e.gasLimit?t.gasLimit=r.default.fromString(e.gasLimit):t.gasLimit=r.default.UZERO,void 0!==e.payer&&null!==e.payer?t.payer=String(e.payer):t.payer="",void 0!==e.granter&&null!==e.granter?t.granter=String(e.granter):t.granter="",t},toJSON:function(e){var t={};return e.amount?t.amount=e.amount.map((function(e){return e?d.Coin.toJSON(e):void 0})):t.amount=[],void 0!==e.gasLimit&&(t.gasLimit=(e.gasLimit||r.default.UZERO).toString()),void 0!==e.payer&&(t.payer=e.payer),void 0!==e.granter&&(t.granter=e.granter),t},fromPartial:function(e){var t=Object.assign({},w);if(t.amount=[],void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.amount.push(d.Coin.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.gasLimit&&null!==e.gasLimit?t.gasLimit=e.gasLimit:t.gasLimit=r.default.UZERO,void 0!==e.payer&&null!==e.payer?t.payer=e.payer:t.payer="",void 0!==e.granter&&null!==e.granter?t.granter=e.granter:t.granter="",t}};var k=function(){if("undefined"!==typeof k)return k;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),A=k.atob||function(e){return k.Buffer.from(e,"base64").toString("binary")};function x(e){for(var t=A(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),void 0!==e.time&&s.Timestamp.encode(function(e){var t=(a=e.getTime()/1e3,o.default.fromNumber(a)),n=e.getTime()%1e3*1e6;var a;return{seconds:t,nanos:n}}(e.time),t.uint32(18).fork()).ldelim(),e.height.isZero()||t.uint32(24).int64(e.height),""!==e.info&&t.uint32(34).string(e.info),void 0!==e.upgradedClientState&&i.Any.encode(e.upgradedClientState,t.uint32(42).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.name=n.string();break;case 2:o.time=f(s.Timestamp.decode(n,n.uint32()));break;case 3:o.height=n.int64();break;case 4:o.info=n.string();break;case 5:o.upgradedClientState=i.Any.decode(n,n.uint32());break;default:n.skipType(7&u)}}return o},fromJSON:function(e){var t,n=Object.assign({},c);return void 0!==e.name&&null!==e.name?n.name=String(e.name):n.name="",void 0!==e.time&&null!==e.time?n.time=(t=e.time)instanceof Date?t:"string"===typeof t?new Date(t):f(s.Timestamp.fromJSON(t)):n.time=void 0,void 0!==e.height&&null!==e.height?n.height=o.default.fromString(e.height):n.height=o.default.ZERO,void 0!==e.info&&null!==e.info?n.info=String(e.info):n.info="",void 0!==e.upgradedClientState&&null!==e.upgradedClientState?n.upgradedClientState=i.Any.fromJSON(e.upgradedClientState):n.upgradedClientState=void 0,n},toJSON:function(e){var t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.time&&(t.time=e.time.toISOString()),void 0!==e.height&&(t.height=(e.height||o.default.ZERO).toString()),void 0!==e.info&&(t.info=e.info),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?i.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.name&&null!==e.name?t.name=e.name:t.name="",void 0!==e.time&&null!==e.time?t.time=e.time:t.time=void 0,void 0!==e.height&&null!==e.height?t.height=e.height:t.height=o.default.ZERO,void 0!==e.info&&null!==e.info?t.info=e.info:t.info="",void 0!==e.upgradedClientState&&null!==e.upgradedClientState?t.upgradedClientState=i.Any.fromPartial(e.upgradedClientState):t.upgradedClientState=void 0,t}};var u={title:"",description:""};t.SoftwareUpgradeProposal={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.title&&n.uint32(10).string(e.title),""!==e.description&&n.uint32(18).string(e.description),void 0!==e.plan&&t.Plan.encode(e.plan,n.uint32(26).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof r.default.Reader?e:new r.default.Reader(e),o=void 0===n?a.len:a.pos+n,i=Object.assign({},u);a.pos>>3){case 1:i.title=a.string();break;case 2:i.description=a.string();break;case 3:i.plan=t.Plan.decode(a,a.uint32());break;default:a.skipType(7&s)}}return i},fromJSON:function(e){var n=Object.assign({},u);return void 0!==e.title&&null!==e.title?n.title=String(e.title):n.title="",void 0!==e.description&&null!==e.description?n.description=String(e.description):n.description="",void 0!==e.plan&&null!==e.plan?n.plan=t.Plan.fromJSON(e.plan):n.plan=void 0,n},toJSON:function(e){var n={};return void 0!==e.title&&(n.title=e.title),void 0!==e.description&&(n.description=e.description),void 0!==e.plan&&(n.plan=e.plan?t.Plan.toJSON(e.plan):void 0),n},fromPartial:function(e){var n=Object.assign({},u);return void 0!==e.title&&null!==e.title?n.title=e.title:n.title="",void 0!==e.description&&null!==e.description?n.description=e.description:n.description="",void 0!==e.plan&&null!==e.plan?n.plan=t.Plan.fromPartial(e.plan):n.plan=void 0,n}};var d={title:"",description:""};t.CancelSoftwareUpgradeProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",t}};var l={name:"",version:o.default.UZERO};function f(e){var t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}t.ModuleVersion={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),e.version.isZero()||t.uint32(16).uint64(e.version),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos>>3){case 1:o.name=n.string();break;case 2:o.version=n.uint64();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},l);return void 0!==e.name&&null!==e.name?t.name=String(e.name):t.name="",void 0!==e.version&&null!==e.version?t.version=o.default.fromString(e.version):t.version=o.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.version&&(t.version=(e.version||o.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},l);return void 0!==e.name&&null!==e.name?t.name=e.name:t.name="",void 0!==e.version&&null!==e.version?t.version=e.version:t.version=o.default.UZERO,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},63004:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseVestingAccount=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121)),s=n(93803),c=n(5449);t.protobufPackage="cosmos.vesting.v1beta1";var u={endTime:r.default.ZERO};t.BaseVestingAccount={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.baseAccount&&s.BaseAccount.encode(e.baseAccount,t.uint32(10).fork()).ldelim();var n,o=a(e.originalVesting);try{for(o.s();!(n=o.n()).done;){var r=n.value;c.Coin.encode(r,t.uint32(18).fork()).ldelim()}}catch(m){o.e(m)}finally{o.f()}var u,d=a(e.delegatedFree);try{for(d.s();!(u=d.n()).done;){var l=u.value;c.Coin.encode(l,t.uint32(26).fork()).ldelim()}}catch(m){d.e(m)}finally{d.f()}var f,p=a(e.delegatedVesting);try{for(p.s();!(f=p.n()).done;){var b=f.value;c.Coin.encode(b,t.uint32(34).fork()).ldelim()}}catch(m){p.e(m)}finally{p.f()}return e.endTime.isZero()||t.uint32(40).int64(e.endTime),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);for(o.originalVesting=[],o.delegatedFree=[],o.delegatedVesting=[];n.pos>>3){case 1:o.baseAccount=s.BaseAccount.decode(n,n.uint32());break;case 2:o.originalVesting.push(c.Coin.decode(n,n.uint32()));break;case 3:o.delegatedFree.push(c.Coin.decode(n,n.uint32()));break;case 4:o.delegatedVesting.push(c.Coin.decode(n,n.uint32()));break;case 5:o.endTime=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);if(t.originalVesting=[],t.delegatedFree=[],t.delegatedVesting=[],void 0!==e.baseAccount&&null!==e.baseAccount?t.baseAccount=s.BaseAccount.fromJSON(e.baseAccount):t.baseAccount=void 0,void 0!==e.originalVesting&&null!==e.originalVesting){var n,o=a(e.originalVesting);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.originalVesting.push(c.Coin.fromJSON(i))}}catch(h){o.e(h)}finally{o.f()}}if(void 0!==e.delegatedFree&&null!==e.delegatedFree){var d,l=a(e.delegatedFree);try{for(l.s();!(d=l.n()).done;){var f=d.value;t.delegatedFree.push(c.Coin.fromJSON(f))}}catch(h){l.e(h)}finally{l.f()}}if(void 0!==e.delegatedVesting&&null!==e.delegatedVesting){var p,b=a(e.delegatedVesting);try{for(b.s();!(p=b.n()).done;){var m=p.value;t.delegatedVesting.push(c.Coin.fromJSON(m))}}catch(h){b.e(h)}finally{b.f()}}return void 0!==e.endTime&&null!==e.endTime?t.endTime=r.default.fromString(e.endTime):t.endTime=r.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.baseAccount&&(t.baseAccount=e.baseAccount?s.BaseAccount.toJSON(e.baseAccount):void 0),e.originalVesting?t.originalVesting=e.originalVesting.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.originalVesting=[],e.delegatedFree?t.delegatedFree=e.delegatedFree.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.delegatedFree=[],e.delegatedVesting?t.delegatedVesting=e.delegatedVesting.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.delegatedVesting=[],void 0!==e.endTime&&(t.endTime=(e.endTime||r.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},u);if(t.originalVesting=[],t.delegatedFree=[],t.delegatedVesting=[],void 0!==e.baseAccount&&null!==e.baseAccount?t.baseAccount=s.BaseAccount.fromPartial(e.baseAccount):t.baseAccount=void 0,void 0!==e.originalVesting&&null!==e.originalVesting){var n,o=a(e.originalVesting);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.originalVesting.push(c.Coin.fromPartial(i))}}catch(h){o.e(h)}finally{o.f()}}if(void 0!==e.delegatedFree&&null!==e.delegatedFree){var d,l=a(e.delegatedFree);try{for(l.s();!(d=l.n()).done;){var f=d.value;t.delegatedFree.push(c.Coin.fromPartial(f))}}catch(h){l.e(h)}finally{l.f()}}if(void 0!==e.delegatedVesting&&null!==e.delegatedVesting){var p,b=a(e.delegatedVesting);try{for(b.s();!(p=b.n()).done;){var m=p.value;t.delegatedVesting.push(c.Coin.fromPartial(m))}}catch(h){b.e(h)}finally{b.f()}}return void 0!==e.endTime&&null!==e.endTime?t.endTime=e.endTime:t.endTime=r.default.ZERO,t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},50922:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Any=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121));t.protobufPackage="google.protobuf";var s={typeUrl:""};t.Any={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.value=new Uint8Array;n.pos>>3){case 1:o.typeUrl=n.string();break;case 2:o.value=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},s);return t.value=new Uint8Array,void 0!==e.typeUrl&&null!==e.typeUrl?t.typeUrl=String(e.typeUrl):t.typeUrl="",void 0!==e.value&&null!==e.value&&(t.value=function(e){for(var t=u(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.seconds=n.int64();break;case 2:o.nanos=n.int32();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.seconds&&null!==e.seconds?t.seconds=o.default.fromString(e.seconds):t.seconds=o.default.ZERO,void 0!==e.nanos&&null!==e.nanos?t.nanos=Number(e.nanos):t.nanos=0,t},toJSON:function(e){var t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||o.default.ZERO).toString()),void 0!==e.nanos&&(t.nanos=e.nanos),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.seconds&&null!==e.seconds?t.seconds=e.seconds:t.seconds=o.default.ZERO,void 0!==e.nanos&&null!==e.nanos?t.nanos=e.nanos:t.nanos=0,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},22079:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=t.protobufPackage=void 0;var o=a(n(29600)),r=a(n(80121));t.protobufPackage="google.protobuf";var i={seconds:o.default.ZERO,nanos:0};t.Timestamp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.seconds=n.int64();break;case 2:o.nanos=n.int32();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.seconds&&null!==e.seconds?t.seconds=o.default.fromString(e.seconds):t.seconds=o.default.ZERO,void 0!==e.nanos&&null!==e.nanos?t.nanos=Number(e.nanos):t.nanos=0,t},toJSON:function(e){var t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||o.default.ZERO).toString()),void 0!==e.nanos&&(t.nanos=e.nanos),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.seconds&&null!==e.seconds?t.seconds=e.seconds:t.seconds=o.default.ZERO,void 0!==e.nanos&&null!==e.nanos?t.nanos=e.nanos:t.nanos=0,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},94527:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.DenomTrace=t.FungibleTokenPacketData=t.protobufPackage=void 0;var o=a(n(29600)),r=a(n(80121));t.protobufPackage="ibc.applications.transfer.v1";var i={denom:"",amount:o.default.UZERO,sender:"",receiver:""};t.FungibleTokenPacketData={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),e.amount.isZero()||t.uint32(16).uint64(e.amount),""!==e.sender&&t.uint32(26).string(e.sender),""!==e.receiver&&t.uint32(34).string(e.receiver),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.uint64();break;case 3:o.sender=n.string();break;case 4:o.receiver=n.string();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=o.default.fromString(e.amount):t.amount=o.default.UZERO,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.receiver&&null!==e.receiver?t.receiver=String(e.receiver):t.receiver="",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=(e.amount||o.default.UZERO).toString()),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.receiver&&(t.receiver=e.receiver),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=e.amount:t.amount=o.default.UZERO,void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.receiver&&null!==e.receiver?t.receiver=e.receiver:t.receiver="",t}};var s={path:"",baseDenom:""};t.DenomTrace={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.path&&t.uint32(10).string(e.path),""!==e.baseDenom&&t.uint32(18).string(e.baseDenom),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);n.pos>>3){case 1:o.path=n.string();break;case 2:o.baseDenom=n.string();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},s);return void 0!==e.path&&null!==e.path?t.path=String(e.path):t.path="",void 0!==e.baseDenom&&null!==e.baseDenom?t.baseDenom=String(e.baseDenom):t.baseDenom="",t},toJSON:function(e){var t={};return void 0!==e.path&&(t.path=e.path),void 0!==e.baseDenom&&(t.baseDenom=e.baseDenom),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.path&&null!==e.path?t.path=e.path:t.path="",void 0!==e.baseDenom&&null!==e.baseDenom?t.baseDenom=e.baseDenom:t.baseDenom="",t}};var c={sendEnabled:!1,receiveEnabled:!1};t.Params={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return!0===e.sendEnabled&&t.uint32(8).bool(e.sendEnabled),!0===e.receiveEnabled&&t.uint32(16).bool(e.receiveEnabled),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.sendEnabled=n.bool();break;case 2:o.receiveEnabled=n.bool();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.sendEnabled&&null!==e.sendEnabled?t.sendEnabled=Boolean(e.sendEnabled):t.sendEnabled=!1,void 0!==e.receiveEnabled&&null!==e.receiveEnabled?t.receiveEnabled=Boolean(e.receiveEnabled):t.receiveEnabled=!1,t},toJSON:function(e){var t={};return void 0!==e.sendEnabled&&(t.sendEnabled=e.sendEnabled),void 0!==e.receiveEnabled&&(t.receiveEnabled=e.receiveEnabled),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.sendEnabled&&null!==e.sendEnabled?t.sendEnabled=e.sendEnabled:t.sendEnabled=!1,void 0!==e.receiveEnabled&&null!==e.receiveEnabled?t.receiveEnabled=e.receiveEnabled:t.receiveEnabled=!1,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},42203:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ABCIApplicationClientImpl=t.Snapshot=t.Evidence=t.VoteInfo=t.ValidatorUpdate=t.Validator=t.TxResult=t.EventAttribute=t.Event=t.LastCommitInfo=t.BlockParams=t.ConsensusParams=t.ResponseApplySnapshotChunk=t.ResponseLoadSnapshotChunk=t.ResponseOfferSnapshot=t.ResponseListSnapshots=t.ResponseCommit=t.ResponseEndBlock=t.ResponseDeliverTx=t.ResponseCheckTx=t.ResponseBeginBlock=t.ResponseQuery=t.ResponseInitChain=t.ResponseSetOption=t.ResponseInfo=t.ResponseFlush=t.ResponseEcho=t.ResponseException=t.Response=t.RequestApplySnapshotChunk=t.RequestLoadSnapshotChunk=t.RequestOfferSnapshot=t.RequestListSnapshots=t.RequestCommit=t.RequestEndBlock=t.RequestDeliverTx=t.RequestCheckTx=t.RequestBeginBlock=t.RequestQuery=t.RequestInitChain=t.RequestSetOption=t.RequestInfo=t.RequestFlush=t.RequestEcho=t.Request=t.responseApplySnapshotChunk_ResultToJSON=t.responseApplySnapshotChunk_ResultFromJSON=t.ResponseApplySnapshotChunk_Result=t.responseOfferSnapshot_ResultToJSON=t.responseOfferSnapshot_ResultFromJSON=t.ResponseOfferSnapshot_Result=t.evidenceTypeToJSON=t.evidenceTypeFromJSON=t.EvidenceType=t.checkTxTypeToJSON=t.checkTxTypeFromJSON=t.CheckTxType=t.protobufPackage=void 0;var s,c,u,d,l=i(n(29600)),f=i(n(80121)),p=n(96322),b=n(51340),m=n(1663),h=n(97572),g=n(22079);function y(e){switch(e){case 0:case"NEW":return s.NEW;case 1:case"RECHECK":return s.RECHECK;default:return s.UNRECOGNIZED}}function v(e){switch(e){case s.NEW:return"NEW";case s.RECHECK:return"RECHECK";default:return"UNKNOWN"}}function w(e){switch(e){case 0:case"UNKNOWN":return c.UNKNOWN;case 1:case"DUPLICATE_VOTE":return c.DUPLICATE_VOTE;case 2:case"LIGHT_CLIENT_ATTACK":return c.LIGHT_CLIENT_ATTACK;default:return c.UNRECOGNIZED}}function k(e){switch(e){case c.UNKNOWN:return"UNKNOWN";case c.DUPLICATE_VOTE:return"DUPLICATE_VOTE";case c.LIGHT_CLIENT_ATTACK:return"LIGHT_CLIENT_ATTACK";default:return"UNKNOWN"}}function A(e){switch(e){case 0:case"UNKNOWN":return u.UNKNOWN;case 1:case"ACCEPT":return u.ACCEPT;case 2:case"ABORT":return u.ABORT;case 3:case"REJECT":return u.REJECT;case 4:case"REJECT_FORMAT":return u.REJECT_FORMAT;case 5:case"REJECT_SENDER":return u.REJECT_SENDER;default:return u.UNRECOGNIZED}}function x(e){switch(e){case u.UNKNOWN:return"UNKNOWN";case u.ACCEPT:return"ACCEPT";case u.ABORT:return"ABORT";case u.REJECT:return"REJECT";case u.REJECT_FORMAT:return"REJECT_FORMAT";case u.REJECT_SENDER:return"REJECT_SENDER";default:return"UNKNOWN"}}function I(e){switch(e){case 0:case"UNKNOWN":return d.UNKNOWN;case 1:case"ACCEPT":return d.ACCEPT;case 2:case"ABORT":return d.ABORT;case 3:case"RETRY":return d.RETRY;case 4:case"RETRY_SNAPSHOT":return d.RETRY_SNAPSHOT;case 5:case"REJECT_SNAPSHOT":return d.REJECT_SNAPSHOT;default:return d.UNRECOGNIZED}}function T(e){switch(e){case d.UNKNOWN:return"UNKNOWN";case d.ACCEPT:return"ACCEPT";case d.ABORT:return"ABORT";case d.RETRY:return"RETRY";case d.RETRY_SNAPSHOT:return"RETRY_SNAPSHOT";case d.REJECT_SNAPSHOT:return"REJECT_SNAPSHOT";default:return"UNKNOWN"}}t.protobufPackage="tendermint.abci",function(e){e[e.NEW=0]="NEW",e[e.RECHECK=1]="RECHECK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(s=t.CheckTxType||(t.CheckTxType={})),t.checkTxTypeFromJSON=y,t.checkTxTypeToJSON=v,function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.DUPLICATE_VOTE=1]="DUPLICATE_VOTE",e[e.LIGHT_CLIENT_ATTACK=2]="LIGHT_CLIENT_ATTACK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(c=t.EvidenceType||(t.EvidenceType={})),t.evidenceTypeFromJSON=w,t.evidenceTypeToJSON=k,function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ACCEPT=1]="ACCEPT",e[e.ABORT=2]="ABORT",e[e.REJECT=3]="REJECT",e[e.REJECT_FORMAT=4]="REJECT_FORMAT",e[e.REJECT_SENDER=5]="REJECT_SENDER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(u=t.ResponseOfferSnapshot_Result||(t.ResponseOfferSnapshot_Result={})),t.responseOfferSnapshot_ResultFromJSON=A,t.responseOfferSnapshot_ResultToJSON=x,function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ACCEPT=1]="ACCEPT",e[e.ABORT=2]="ABORT",e[e.RETRY=3]="RETRY",e[e.RETRY_SNAPSHOT=4]="RETRY_SNAPSHOT",e[e.REJECT_SNAPSHOT=5]="REJECT_SNAPSHOT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(d=t.ResponseApplySnapshotChunk_Result||(t.ResponseApplySnapshotChunk_Result={})),t.responseApplySnapshotChunk_ResultFromJSON=I,t.responseApplySnapshotChunk_ResultToJSON=T;var S={};t.Request={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return void 0!==e.echo&&t.RequestEcho.encode(e.echo,n.uint32(10).fork()).ldelim(),void 0!==e.flush&&t.RequestFlush.encode(e.flush,n.uint32(18).fork()).ldelim(),void 0!==e.info&&t.RequestInfo.encode(e.info,n.uint32(26).fork()).ldelim(),void 0!==e.setOption&&t.RequestSetOption.encode(e.setOption,n.uint32(34).fork()).ldelim(),void 0!==e.initChain&&t.RequestInitChain.encode(e.initChain,n.uint32(42).fork()).ldelim(),void 0!==e.query&&t.RequestQuery.encode(e.query,n.uint32(50).fork()).ldelim(),void 0!==e.beginBlock&&t.RequestBeginBlock.encode(e.beginBlock,n.uint32(58).fork()).ldelim(),void 0!==e.checkTx&&t.RequestCheckTx.encode(e.checkTx,n.uint32(66).fork()).ldelim(),void 0!==e.deliverTx&&t.RequestDeliverTx.encode(e.deliverTx,n.uint32(74).fork()).ldelim(),void 0!==e.endBlock&&t.RequestEndBlock.encode(e.endBlock,n.uint32(82).fork()).ldelim(),void 0!==e.commit&&t.RequestCommit.encode(e.commit,n.uint32(90).fork()).ldelim(),void 0!==e.listSnapshots&&t.RequestListSnapshots.encode(e.listSnapshots,n.uint32(98).fork()).ldelim(),void 0!==e.offerSnapshot&&t.RequestOfferSnapshot.encode(e.offerSnapshot,n.uint32(106).fork()).ldelim(),void 0!==e.loadSnapshotChunk&&t.RequestLoadSnapshotChunk.encode(e.loadSnapshotChunk,n.uint32(114).fork()).ldelim(),void 0!==e.applySnapshotChunk&&t.RequestApplySnapshotChunk.encode(e.applySnapshotChunk,n.uint32(122).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},S);a.pos>>3){case 1:r.echo=t.RequestEcho.decode(a,a.uint32());break;case 2:r.flush=t.RequestFlush.decode(a,a.uint32());break;case 3:r.info=t.RequestInfo.decode(a,a.uint32());break;case 4:r.setOption=t.RequestSetOption.decode(a,a.uint32());break;case 5:r.initChain=t.RequestInitChain.decode(a,a.uint32());break;case 6:r.query=t.RequestQuery.decode(a,a.uint32());break;case 7:r.beginBlock=t.RequestBeginBlock.decode(a,a.uint32());break;case 8:r.checkTx=t.RequestCheckTx.decode(a,a.uint32());break;case 9:r.deliverTx=t.RequestDeliverTx.decode(a,a.uint32());break;case 10:r.endBlock=t.RequestEndBlock.decode(a,a.uint32());break;case 11:r.commit=t.RequestCommit.decode(a,a.uint32());break;case 12:r.listSnapshots=t.RequestListSnapshots.decode(a,a.uint32());break;case 13:r.offerSnapshot=t.RequestOfferSnapshot.decode(a,a.uint32());break;case 14:r.loadSnapshotChunk=t.RequestLoadSnapshotChunk.decode(a,a.uint32());break;case 15:r.applySnapshotChunk=t.RequestApplySnapshotChunk.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},S);return void 0!==e.echo&&null!==e.echo?n.echo=t.RequestEcho.fromJSON(e.echo):n.echo=void 0,void 0!==e.flush&&null!==e.flush?n.flush=t.RequestFlush.fromJSON(e.flush):n.flush=void 0,void 0!==e.info&&null!==e.info?n.info=t.RequestInfo.fromJSON(e.info):n.info=void 0,void 0!==e.setOption&&null!==e.setOption?n.setOption=t.RequestSetOption.fromJSON(e.setOption):n.setOption=void 0,void 0!==e.initChain&&null!==e.initChain?n.initChain=t.RequestInitChain.fromJSON(e.initChain):n.initChain=void 0,void 0!==e.query&&null!==e.query?n.query=t.RequestQuery.fromJSON(e.query):n.query=void 0,void 0!==e.beginBlock&&null!==e.beginBlock?n.beginBlock=t.RequestBeginBlock.fromJSON(e.beginBlock):n.beginBlock=void 0,void 0!==e.checkTx&&null!==e.checkTx?n.checkTx=t.RequestCheckTx.fromJSON(e.checkTx):n.checkTx=void 0,void 0!==e.deliverTx&&null!==e.deliverTx?n.deliverTx=t.RequestDeliverTx.fromJSON(e.deliverTx):n.deliverTx=void 0,void 0!==e.endBlock&&null!==e.endBlock?n.endBlock=t.RequestEndBlock.fromJSON(e.endBlock):n.endBlock=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.RequestCommit.fromJSON(e.commit):n.commit=void 0,void 0!==e.listSnapshots&&null!==e.listSnapshots?n.listSnapshots=t.RequestListSnapshots.fromJSON(e.listSnapshots):n.listSnapshots=void 0,void 0!==e.offerSnapshot&&null!==e.offerSnapshot?n.offerSnapshot=t.RequestOfferSnapshot.fromJSON(e.offerSnapshot):n.offerSnapshot=void 0,void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?n.loadSnapshotChunk=t.RequestLoadSnapshotChunk.fromJSON(e.loadSnapshotChunk):n.loadSnapshotChunk=void 0,void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?n.applySnapshotChunk=t.RequestApplySnapshotChunk.fromJSON(e.applySnapshotChunk):n.applySnapshotChunk=void 0,n},toJSON:function(e){var n={};return void 0!==e.echo&&(n.echo=e.echo?t.RequestEcho.toJSON(e.echo):void 0),void 0!==e.flush&&(n.flush=e.flush?t.RequestFlush.toJSON(e.flush):void 0),void 0!==e.info&&(n.info=e.info?t.RequestInfo.toJSON(e.info):void 0),void 0!==e.setOption&&(n.setOption=e.setOption?t.RequestSetOption.toJSON(e.setOption):void 0),void 0!==e.initChain&&(n.initChain=e.initChain?t.RequestInitChain.toJSON(e.initChain):void 0),void 0!==e.query&&(n.query=e.query?t.RequestQuery.toJSON(e.query):void 0),void 0!==e.beginBlock&&(n.beginBlock=e.beginBlock?t.RequestBeginBlock.toJSON(e.beginBlock):void 0),void 0!==e.checkTx&&(n.checkTx=e.checkTx?t.RequestCheckTx.toJSON(e.checkTx):void 0),void 0!==e.deliverTx&&(n.deliverTx=e.deliverTx?t.RequestDeliverTx.toJSON(e.deliverTx):void 0),void 0!==e.endBlock&&(n.endBlock=e.endBlock?t.RequestEndBlock.toJSON(e.endBlock):void 0),void 0!==e.commit&&(n.commit=e.commit?t.RequestCommit.toJSON(e.commit):void 0),void 0!==e.listSnapshots&&(n.listSnapshots=e.listSnapshots?t.RequestListSnapshots.toJSON(e.listSnapshots):void 0),void 0!==e.offerSnapshot&&(n.offerSnapshot=e.offerSnapshot?t.RequestOfferSnapshot.toJSON(e.offerSnapshot):void 0),void 0!==e.loadSnapshotChunk&&(n.loadSnapshotChunk=e.loadSnapshotChunk?t.RequestLoadSnapshotChunk.toJSON(e.loadSnapshotChunk):void 0),void 0!==e.applySnapshotChunk&&(n.applySnapshotChunk=e.applySnapshotChunk?t.RequestApplySnapshotChunk.toJSON(e.applySnapshotChunk):void 0),n},fromPartial:function(e){var n=Object.assign({},S);return void 0!==e.echo&&null!==e.echo?n.echo=t.RequestEcho.fromPartial(e.echo):n.echo=void 0,void 0!==e.flush&&null!==e.flush?n.flush=t.RequestFlush.fromPartial(e.flush):n.flush=void 0,void 0!==e.info&&null!==e.info?n.info=t.RequestInfo.fromPartial(e.info):n.info=void 0,void 0!==e.setOption&&null!==e.setOption?n.setOption=t.RequestSetOption.fromPartial(e.setOption):n.setOption=void 0,void 0!==e.initChain&&null!==e.initChain?n.initChain=t.RequestInitChain.fromPartial(e.initChain):n.initChain=void 0,void 0!==e.query&&null!==e.query?n.query=t.RequestQuery.fromPartial(e.query):n.query=void 0,void 0!==e.beginBlock&&null!==e.beginBlock?n.beginBlock=t.RequestBeginBlock.fromPartial(e.beginBlock):n.beginBlock=void 0,void 0!==e.checkTx&&null!==e.checkTx?n.checkTx=t.RequestCheckTx.fromPartial(e.checkTx):n.checkTx=void 0,void 0!==e.deliverTx&&null!==e.deliverTx?n.deliverTx=t.RequestDeliverTx.fromPartial(e.deliverTx):n.deliverTx=void 0,void 0!==e.endBlock&&null!==e.endBlock?n.endBlock=t.RequestEndBlock.fromPartial(e.endBlock):n.endBlock=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.RequestCommit.fromPartial(e.commit):n.commit=void 0,void 0!==e.listSnapshots&&null!==e.listSnapshots?n.listSnapshots=t.RequestListSnapshots.fromPartial(e.listSnapshots):n.listSnapshots=void 0,void 0!==e.offerSnapshot&&null!==e.offerSnapshot?n.offerSnapshot=t.RequestOfferSnapshot.fromPartial(e.offerSnapshot):n.offerSnapshot=void 0,void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?n.loadSnapshotChunk=t.RequestLoadSnapshotChunk.fromPartial(e.loadSnapshotChunk):n.loadSnapshotChunk=void 0,void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?n.applySnapshotChunk=t.RequestApplySnapshotChunk.fromPartial(e.applySnapshotChunk):n.applySnapshotChunk=void 0,n}};var C={message:""};t.RequestEcho={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return""!==e.message&&t.uint32(10).string(e.message),t},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},C);n.pos>>3===1)o.message=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},C);return void 0!==e.message&&null!==e.message?t.message=String(e.message):t.message="",t},toJSON:function(e){var t={};return void 0!==e.message&&(t.message=e.message),t},fromPartial:function(e){var t=Object.assign({},C);return void 0!==e.message&&null!==e.message?t.message=e.message:t.message="",t}};var E={};t.RequestFlush={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create()},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},E);n.pos1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return""!==e.version&&t.uint32(10).string(e.version),e.blockVersion.isZero()||t.uint32(16).uint64(e.blockVersion),e.p2pVersion.isZero()||t.uint32(24).uint64(e.p2pVersion),t},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},R);n.pos>>3){case 1:o.version=n.string();break;case 2:o.blockVersion=n.uint64();break;case 3:o.p2pVersion=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},R);return void 0!==e.version&&null!==e.version?t.version=String(e.version):t.version="",void 0!==e.blockVersion&&null!==e.blockVersion?t.blockVersion=l.default.fromString(e.blockVersion):t.blockVersion=l.default.UZERO,void 0!==e.p2pVersion&&null!==e.p2pVersion?t.p2pVersion=l.default.fromString(e.p2pVersion):t.p2pVersion=l.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.version&&(t.version=e.version),void 0!==e.blockVersion&&(t.blockVersion=(e.blockVersion||l.default.UZERO).toString()),void 0!==e.p2pVersion&&(t.p2pVersion=(e.p2pVersion||l.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},R);return void 0!==e.version&&null!==e.version?t.version=e.version:t.version="",void 0!==e.blockVersion&&null!==e.blockVersion?t.blockVersion=e.blockVersion:t.blockVersion=l.default.UZERO,void 0!==e.p2pVersion&&null!==e.p2pVersion?t.p2pVersion=e.p2pVersion:t.p2pVersion=l.default.UZERO,t}};var M={key:"",value:""};t.RequestSetOption={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.value&&t.uint32(18).string(e.value),t},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},M);n.pos>>3){case 1:o.key=n.string();break;case 2:o.value=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},M);return void 0!==e.key&&null!==e.key?t.key=String(e.key):t.key="",void 0!==e.value&&null!==e.value?t.value=String(e.value):t.value="",t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=e.value),t},fromPartial:function(e){var t=Object.assign({},M);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key="",void 0!==e.value&&null!==e.value?t.value=e.value:t.value="",t}};var P={chainId:"",initialHeight:l.default.ZERO};t.RequestInitChain={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();void 0!==e.time&&g.Timestamp.encode(Ae(e.time),n.uint32(10).fork()).ldelim(),""!==e.chainId&&n.uint32(18).string(e.chainId),void 0!==e.consensusParams&&t.ConsensusParams.encode(e.consensusParams,n.uint32(26).fork()).ldelim();var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.ValidatorUpdate.encode(i,n.uint32(34).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return 0!==e.appStateBytes.length&&n.uint32(42).bytes(e.appStateBytes),e.initialHeight.isZero()||n.uint32(48).int64(e.initialHeight),n},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},P);for(r.validators=[],r.appStateBytes=new Uint8Array;a.pos>>3){case 1:r.time=xe(g.Timestamp.decode(a,a.uint32()));break;case 2:r.chainId=a.string();break;case 3:r.consensusParams=t.ConsensusParams.decode(a,a.uint32());break;case 4:r.validators.push(t.ValidatorUpdate.decode(a,a.uint32()));break;case 5:r.appStateBytes=a.bytes();break;case 6:r.initialHeight=a.int64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},P);if(n.validators=[],n.appStateBytes=new Uint8Array,void 0!==e.time&&null!==e.time?n.time=Ie(e.time):n.time=void 0,void 0!==e.chainId&&null!==e.chainId?n.chainId=String(e.chainId):n.chainId="",void 0!==e.consensusParams&&null!==e.consensusParams?n.consensusParams=t.ConsensusParams.fromJSON(e.consensusParams):n.consensusParams=void 0,void 0!==e.validators&&null!==e.validators){var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validators.push(t.ValidatorUpdate.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.appStateBytes&&null!==e.appStateBytes&&(n.appStateBytes=ve(e.appStateBytes)),void 0!==e.initialHeight&&null!==e.initialHeight?n.initialHeight=l.default.fromString(e.initialHeight):n.initialHeight=l.default.ZERO,n},toJSON:function(e){var n={};return void 0!==e.time&&(n.time=e.time.toISOString()),void 0!==e.chainId&&(n.chainId=e.chainId),void 0!==e.consensusParams&&(n.consensusParams=e.consensusParams?t.ConsensusParams.toJSON(e.consensusParams):void 0),e.validators?n.validators=e.validators.map((function(e){return e?t.ValidatorUpdate.toJSON(e):void 0})):n.validators=[],void 0!==e.appStateBytes&&(n.appStateBytes=ke(void 0!==e.appStateBytes?e.appStateBytes:new Uint8Array)),void 0!==e.initialHeight&&(n.initialHeight=(e.initialHeight||l.default.ZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},P);if(n.validators=[],void 0!==e.time&&null!==e.time?n.time=e.time:n.time=void 0,void 0!==e.chainId&&null!==e.chainId?n.chainId=e.chainId:n.chainId="",void 0!==e.consensusParams&&null!==e.consensusParams?n.consensusParams=t.ConsensusParams.fromPartial(e.consensusParams):n.consensusParams=void 0,void 0!==e.validators&&null!==e.validators){var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validators.push(t.ValidatorUpdate.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.appStateBytes&&null!==e.appStateBytes?n.appStateBytes=e.appStateBytes:n.appStateBytes=new Uint8Array,void 0!==e.initialHeight&&null!==e.initialHeight?n.initialHeight=e.initialHeight:n.initialHeight=l.default.ZERO,n}};var U={path:"",height:l.default.ZERO,prove:!1};t.RequestQuery={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),""!==e.path&&t.uint32(18).string(e.path),e.height.isZero()||t.uint32(24).int64(e.height),!0===e.prove&&t.uint32(32).bool(e.prove),t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},U);for(o.data=new Uint8Array;n.pos>>3){case 1:o.data=n.bytes();break;case 2:o.path=n.string();break;case 3:o.height=n.int64();break;case 4:o.prove=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},U);return t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=ve(e.data)),void 0!==e.path&&null!==e.path?t.path=String(e.path):t.path="",void 0!==e.height&&null!==e.height?t.height=l.default.fromString(e.height):t.height=l.default.ZERO,void 0!==e.prove&&null!==e.prove?t.prove=Boolean(e.prove):t.prove=!1,t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=ke(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.path&&(t.path=e.path),void 0!==e.height&&(t.height=(e.height||l.default.ZERO).toString()),void 0!==e.prove&&(t.prove=e.prove),t},fromPartial:function(e){var t=Object.assign({},U);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,void 0!==e.path&&null!==e.path?t.path=e.path:t.path="",void 0!==e.height&&null!==e.height?t.height=e.height:t.height=l.default.ZERO,void 0!==e.prove&&null!==e.prove?t.prove=e.prove:t.prove=!1,t}};var _={};t.RequestBeginBlock={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();0!==e.hash.length&&n.uint32(10).bytes(e.hash),void 0!==e.header&&p.Header.encode(e.header,n.uint32(18).fork()).ldelim(),void 0!==e.lastCommitInfo&&t.LastCommitInfo.encode(e.lastCommitInfo,n.uint32(26).fork()).ldelim();var a,o=r(e.byzantineValidators);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.Evidence.encode(i,n.uint32(34).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},_);for(r.byzantineValidators=[],r.hash=new Uint8Array;a.pos>>3){case 1:r.hash=a.bytes();break;case 2:r.header=p.Header.decode(a,a.uint32());break;case 3:r.lastCommitInfo=t.LastCommitInfo.decode(a,a.uint32());break;case 4:r.byzantineValidators.push(t.Evidence.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},_);if(n.byzantineValidators=[],n.hash=new Uint8Array,void 0!==e.hash&&null!==e.hash&&(n.hash=ve(e.hash)),void 0!==e.header&&null!==e.header?n.header=p.Header.fromJSON(e.header):n.header=void 0,void 0!==e.lastCommitInfo&&null!==e.lastCommitInfo?n.lastCommitInfo=t.LastCommitInfo.fromJSON(e.lastCommitInfo):n.lastCommitInfo=void 0,void 0!==e.byzantineValidators&&null!==e.byzantineValidators){var a,o=r(e.byzantineValidators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.byzantineValidators.push(t.Evidence.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return void 0!==e.hash&&(n.hash=ke(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.header&&(n.header=e.header?p.Header.toJSON(e.header):void 0),void 0!==e.lastCommitInfo&&(n.lastCommitInfo=e.lastCommitInfo?t.LastCommitInfo.toJSON(e.lastCommitInfo):void 0),e.byzantineValidators?n.byzantineValidators=e.byzantineValidators.map((function(e){return e?t.Evidence.toJSON(e):void 0})):n.byzantineValidators=[],n},fromPartial:function(e){var n=Object.assign({},_);if(n.byzantineValidators=[],void 0!==e.hash&&null!==e.hash?n.hash=e.hash:n.hash=new Uint8Array,void 0!==e.header&&null!==e.header?n.header=p.Header.fromPartial(e.header):n.header=void 0,void 0!==e.lastCommitInfo&&null!==e.lastCommitInfo?n.lastCommitInfo=t.LastCommitInfo.fromPartial(e.lastCommitInfo):n.lastCommitInfo=void 0,void 0!==e.byzantineValidators&&null!==e.byzantineValidators){var a,o=r(e.byzantineValidators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.byzantineValidators.push(t.Evidence.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return n}};var B={type:0};t.RequestCheckTx={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.tx.length&&t.uint32(10).bytes(e.tx),0!==e.type&&t.uint32(16).int32(e.type),t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},B);for(o.tx=new Uint8Array;n.pos>>3){case 1:o.tx=n.bytes();break;case 2:o.type=n.int32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},B);return t.tx=new Uint8Array,void 0!==e.tx&&null!==e.tx&&(t.tx=ve(e.tx)),void 0!==e.type&&null!==e.type?t.type=y(e.type):t.type=0,t},toJSON:function(e){var t={};return void 0!==e.tx&&(t.tx=ke(void 0!==e.tx?e.tx:new Uint8Array)),void 0!==e.type&&(t.type=v(e.type)),t},fromPartial:function(e){var t=Object.assign({},B);return void 0!==e.tx&&null!==e.tx?t.tx=e.tx:t.tx=new Uint8Array,void 0!==e.type&&null!==e.type?t.type=e.type:t.type=0,t}};var D={};t.RequestDeliverTx={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.tx.length&&t.uint32(10).bytes(e.tx),t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},D);for(o.tx=new Uint8Array;n.pos>>3===1)o.tx=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},D);return t.tx=new Uint8Array,void 0!==e.tx&&null!==e.tx&&(t.tx=ve(e.tx)),t},toJSON:function(e){var t={};return void 0!==e.tx&&(t.tx=ke(void 0!==e.tx?e.tx:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},D);return void 0!==e.tx&&null!==e.tx?t.tx=e.tx:t.tx=new Uint8Array,t}};var N={height:l.default.ZERO};t.RequestEndBlock={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return e.height.isZero()||t.uint32(8).int64(e.height),t},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},N);n.pos>>3===1)o.height=n.int64();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},N);return void 0!==e.height&&null!==e.height?t.height=l.default.fromString(e.height):t.height=l.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.height&&(t.height=(e.height||l.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},N);return void 0!==e.height&&null!==e.height?t.height=e.height:t.height=l.default.ZERO,t}};var O={};t.RequestCommit={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create()},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},O);n.pos1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create()},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},F);n.pos1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return void 0!==e.snapshot&&t.Snapshot.encode(e.snapshot,n.uint32(10).fork()).ldelim(),0!==e.appHash.length&&n.uint32(18).bytes(e.appHash),n},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},L);for(r.appHash=new Uint8Array;a.pos>>3){case 1:r.snapshot=t.Snapshot.decode(a,a.uint32());break;case 2:r.appHash=a.bytes();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},L);return n.appHash=new Uint8Array,void 0!==e.snapshot&&null!==e.snapshot?n.snapshot=t.Snapshot.fromJSON(e.snapshot):n.snapshot=void 0,void 0!==e.appHash&&null!==e.appHash&&(n.appHash=ve(e.appHash)),n},toJSON:function(e){var n={};return void 0!==e.snapshot&&(n.snapshot=e.snapshot?t.Snapshot.toJSON(e.snapshot):void 0),void 0!==e.appHash&&(n.appHash=ke(void 0!==e.appHash?e.appHash:new Uint8Array)),n},fromPartial:function(e){var n=Object.assign({},L);return void 0!==e.snapshot&&null!==e.snapshot?n.snapshot=t.Snapshot.fromPartial(e.snapshot):n.snapshot=void 0,void 0!==e.appHash&&null!==e.appHash?n.appHash=e.appHash:n.appHash=new Uint8Array,n}};var j={height:l.default.UZERO,format:0,chunk:0};t.RequestLoadSnapshotChunk={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return e.height.isZero()||t.uint32(8).uint64(e.height),0!==e.format&&t.uint32(16).uint32(e.format),0!==e.chunk&&t.uint32(24).uint32(e.chunk),t},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},j);n.pos>>3){case 1:o.height=n.uint64();break;case 2:o.format=n.uint32();break;case 3:o.chunk=n.uint32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},j);return void 0!==e.height&&null!==e.height?t.height=l.default.fromString(e.height):t.height=l.default.UZERO,void 0!==e.format&&null!==e.format?t.format=Number(e.format):t.format=0,void 0!==e.chunk&&null!==e.chunk?t.chunk=Number(e.chunk):t.chunk=0,t},toJSON:function(e){var t={};return void 0!==e.height&&(t.height=(e.height||l.default.UZERO).toString()),void 0!==e.format&&(t.format=e.format),void 0!==e.chunk&&(t.chunk=e.chunk),t},fromPartial:function(e){var t=Object.assign({},j);return void 0!==e.height&&null!==e.height?t.height=e.height:t.height=l.default.UZERO,void 0!==e.format&&null!==e.format?t.format=e.format:t.format=0,void 0!==e.chunk&&null!==e.chunk?t.chunk=e.chunk:t.chunk=0,t}};var H={index:0,sender:""};t.RequestApplySnapshotChunk={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.index&&t.uint32(8).uint32(e.index),0!==e.chunk.length&&t.uint32(18).bytes(e.chunk),""!==e.sender&&t.uint32(26).string(e.sender),t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},H);for(o.chunk=new Uint8Array;n.pos>>3){case 1:o.index=n.uint32();break;case 2:o.chunk=n.bytes();break;case 3:o.sender=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},H);return t.chunk=new Uint8Array,void 0!==e.index&&null!==e.index?t.index=Number(e.index):t.index=0,void 0!==e.chunk&&null!==e.chunk&&(t.chunk=ve(e.chunk)),void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",t},toJSON:function(e){var t={};return void 0!==e.index&&(t.index=e.index),void 0!==e.chunk&&(t.chunk=ke(void 0!==e.chunk?e.chunk:new Uint8Array)),void 0!==e.sender&&(t.sender=e.sender),t},fromPartial:function(e){var t=Object.assign({},H);return void 0!==e.index&&null!==e.index?t.index=e.index:t.index=0,void 0!==e.chunk&&null!==e.chunk?t.chunk=e.chunk:t.chunk=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",t}};var G={};t.Response={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return void 0!==e.exception&&t.ResponseException.encode(e.exception,n.uint32(10).fork()).ldelim(),void 0!==e.echo&&t.ResponseEcho.encode(e.echo,n.uint32(18).fork()).ldelim(),void 0!==e.flush&&t.ResponseFlush.encode(e.flush,n.uint32(26).fork()).ldelim(),void 0!==e.info&&t.ResponseInfo.encode(e.info,n.uint32(34).fork()).ldelim(),void 0!==e.setOption&&t.ResponseSetOption.encode(e.setOption,n.uint32(42).fork()).ldelim(),void 0!==e.initChain&&t.ResponseInitChain.encode(e.initChain,n.uint32(50).fork()).ldelim(),void 0!==e.query&&t.ResponseQuery.encode(e.query,n.uint32(58).fork()).ldelim(),void 0!==e.beginBlock&&t.ResponseBeginBlock.encode(e.beginBlock,n.uint32(66).fork()).ldelim(),void 0!==e.checkTx&&t.ResponseCheckTx.encode(e.checkTx,n.uint32(74).fork()).ldelim(),void 0!==e.deliverTx&&t.ResponseDeliverTx.encode(e.deliverTx,n.uint32(82).fork()).ldelim(),void 0!==e.endBlock&&t.ResponseEndBlock.encode(e.endBlock,n.uint32(90).fork()).ldelim(),void 0!==e.commit&&t.ResponseCommit.encode(e.commit,n.uint32(98).fork()).ldelim(),void 0!==e.listSnapshots&&t.ResponseListSnapshots.encode(e.listSnapshots,n.uint32(106).fork()).ldelim(),void 0!==e.offerSnapshot&&t.ResponseOfferSnapshot.encode(e.offerSnapshot,n.uint32(114).fork()).ldelim(),void 0!==e.loadSnapshotChunk&&t.ResponseLoadSnapshotChunk.encode(e.loadSnapshotChunk,n.uint32(122).fork()).ldelim(),void 0!==e.applySnapshotChunk&&t.ResponseApplySnapshotChunk.encode(e.applySnapshotChunk,n.uint32(130).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},G);a.pos>>3){case 1:r.exception=t.ResponseException.decode(a,a.uint32());break;case 2:r.echo=t.ResponseEcho.decode(a,a.uint32());break;case 3:r.flush=t.ResponseFlush.decode(a,a.uint32());break;case 4:r.info=t.ResponseInfo.decode(a,a.uint32());break;case 5:r.setOption=t.ResponseSetOption.decode(a,a.uint32());break;case 6:r.initChain=t.ResponseInitChain.decode(a,a.uint32());break;case 7:r.query=t.ResponseQuery.decode(a,a.uint32());break;case 8:r.beginBlock=t.ResponseBeginBlock.decode(a,a.uint32());break;case 9:r.checkTx=t.ResponseCheckTx.decode(a,a.uint32());break;case 10:r.deliverTx=t.ResponseDeliverTx.decode(a,a.uint32());break;case 11:r.endBlock=t.ResponseEndBlock.decode(a,a.uint32());break;case 12:r.commit=t.ResponseCommit.decode(a,a.uint32());break;case 13:r.listSnapshots=t.ResponseListSnapshots.decode(a,a.uint32());break;case 14:r.offerSnapshot=t.ResponseOfferSnapshot.decode(a,a.uint32());break;case 15:r.loadSnapshotChunk=t.ResponseLoadSnapshotChunk.decode(a,a.uint32());break;case 16:r.applySnapshotChunk=t.ResponseApplySnapshotChunk.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},G);return void 0!==e.exception&&null!==e.exception?n.exception=t.ResponseException.fromJSON(e.exception):n.exception=void 0,void 0!==e.echo&&null!==e.echo?n.echo=t.ResponseEcho.fromJSON(e.echo):n.echo=void 0,void 0!==e.flush&&null!==e.flush?n.flush=t.ResponseFlush.fromJSON(e.flush):n.flush=void 0,void 0!==e.info&&null!==e.info?n.info=t.ResponseInfo.fromJSON(e.info):n.info=void 0,void 0!==e.setOption&&null!==e.setOption?n.setOption=t.ResponseSetOption.fromJSON(e.setOption):n.setOption=void 0,void 0!==e.initChain&&null!==e.initChain?n.initChain=t.ResponseInitChain.fromJSON(e.initChain):n.initChain=void 0,void 0!==e.query&&null!==e.query?n.query=t.ResponseQuery.fromJSON(e.query):n.query=void 0,void 0!==e.beginBlock&&null!==e.beginBlock?n.beginBlock=t.ResponseBeginBlock.fromJSON(e.beginBlock):n.beginBlock=void 0,void 0!==e.checkTx&&null!==e.checkTx?n.checkTx=t.ResponseCheckTx.fromJSON(e.checkTx):n.checkTx=void 0,void 0!==e.deliverTx&&null!==e.deliverTx?n.deliverTx=t.ResponseDeliverTx.fromJSON(e.deliverTx):n.deliverTx=void 0,void 0!==e.endBlock&&null!==e.endBlock?n.endBlock=t.ResponseEndBlock.fromJSON(e.endBlock):n.endBlock=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.ResponseCommit.fromJSON(e.commit):n.commit=void 0,void 0!==e.listSnapshots&&null!==e.listSnapshots?n.listSnapshots=t.ResponseListSnapshots.fromJSON(e.listSnapshots):n.listSnapshots=void 0,void 0!==e.offerSnapshot&&null!==e.offerSnapshot?n.offerSnapshot=t.ResponseOfferSnapshot.fromJSON(e.offerSnapshot):n.offerSnapshot=void 0,void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?n.loadSnapshotChunk=t.ResponseLoadSnapshotChunk.fromJSON(e.loadSnapshotChunk):n.loadSnapshotChunk=void 0,void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?n.applySnapshotChunk=t.ResponseApplySnapshotChunk.fromJSON(e.applySnapshotChunk):n.applySnapshotChunk=void 0,n},toJSON:function(e){var n={};return void 0!==e.exception&&(n.exception=e.exception?t.ResponseException.toJSON(e.exception):void 0),void 0!==e.echo&&(n.echo=e.echo?t.ResponseEcho.toJSON(e.echo):void 0),void 0!==e.flush&&(n.flush=e.flush?t.ResponseFlush.toJSON(e.flush):void 0),void 0!==e.info&&(n.info=e.info?t.ResponseInfo.toJSON(e.info):void 0),void 0!==e.setOption&&(n.setOption=e.setOption?t.ResponseSetOption.toJSON(e.setOption):void 0),void 0!==e.initChain&&(n.initChain=e.initChain?t.ResponseInitChain.toJSON(e.initChain):void 0),void 0!==e.query&&(n.query=e.query?t.ResponseQuery.toJSON(e.query):void 0),void 0!==e.beginBlock&&(n.beginBlock=e.beginBlock?t.ResponseBeginBlock.toJSON(e.beginBlock):void 0),void 0!==e.checkTx&&(n.checkTx=e.checkTx?t.ResponseCheckTx.toJSON(e.checkTx):void 0),void 0!==e.deliverTx&&(n.deliverTx=e.deliverTx?t.ResponseDeliverTx.toJSON(e.deliverTx):void 0),void 0!==e.endBlock&&(n.endBlock=e.endBlock?t.ResponseEndBlock.toJSON(e.endBlock):void 0),void 0!==e.commit&&(n.commit=e.commit?t.ResponseCommit.toJSON(e.commit):void 0),void 0!==e.listSnapshots&&(n.listSnapshots=e.listSnapshots?t.ResponseListSnapshots.toJSON(e.listSnapshots):void 0),void 0!==e.offerSnapshot&&(n.offerSnapshot=e.offerSnapshot?t.ResponseOfferSnapshot.toJSON(e.offerSnapshot):void 0),void 0!==e.loadSnapshotChunk&&(n.loadSnapshotChunk=e.loadSnapshotChunk?t.ResponseLoadSnapshotChunk.toJSON(e.loadSnapshotChunk):void 0),void 0!==e.applySnapshotChunk&&(n.applySnapshotChunk=e.applySnapshotChunk?t.ResponseApplySnapshotChunk.toJSON(e.applySnapshotChunk):void 0),n},fromPartial:function(e){var n=Object.assign({},G);return void 0!==e.exception&&null!==e.exception?n.exception=t.ResponseException.fromPartial(e.exception):n.exception=void 0,void 0!==e.echo&&null!==e.echo?n.echo=t.ResponseEcho.fromPartial(e.echo):n.echo=void 0,void 0!==e.flush&&null!==e.flush?n.flush=t.ResponseFlush.fromPartial(e.flush):n.flush=void 0,void 0!==e.info&&null!==e.info?n.info=t.ResponseInfo.fromPartial(e.info):n.info=void 0,void 0!==e.setOption&&null!==e.setOption?n.setOption=t.ResponseSetOption.fromPartial(e.setOption):n.setOption=void 0,void 0!==e.initChain&&null!==e.initChain?n.initChain=t.ResponseInitChain.fromPartial(e.initChain):n.initChain=void 0,void 0!==e.query&&null!==e.query?n.query=t.ResponseQuery.fromPartial(e.query):n.query=void 0,void 0!==e.beginBlock&&null!==e.beginBlock?n.beginBlock=t.ResponseBeginBlock.fromPartial(e.beginBlock):n.beginBlock=void 0,void 0!==e.checkTx&&null!==e.checkTx?n.checkTx=t.ResponseCheckTx.fromPartial(e.checkTx):n.checkTx=void 0,void 0!==e.deliverTx&&null!==e.deliverTx?n.deliverTx=t.ResponseDeliverTx.fromPartial(e.deliverTx):n.deliverTx=void 0,void 0!==e.endBlock&&null!==e.endBlock?n.endBlock=t.ResponseEndBlock.fromPartial(e.endBlock):n.endBlock=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.ResponseCommit.fromPartial(e.commit):n.commit=void 0,void 0!==e.listSnapshots&&null!==e.listSnapshots?n.listSnapshots=t.ResponseListSnapshots.fromPartial(e.listSnapshots):n.listSnapshots=void 0,void 0!==e.offerSnapshot&&null!==e.offerSnapshot?n.offerSnapshot=t.ResponseOfferSnapshot.fromPartial(e.offerSnapshot):n.offerSnapshot=void 0,void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?n.loadSnapshotChunk=t.ResponseLoadSnapshotChunk.fromPartial(e.loadSnapshotChunk):n.loadSnapshotChunk=void 0,void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?n.applySnapshotChunk=t.ResponseApplySnapshotChunk.fromPartial(e.applySnapshotChunk):n.applySnapshotChunk=void 0,n}};var z={error:""};t.ResponseException={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return""!==e.error&&t.uint32(10).string(e.error),t},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},z);n.pos>>3===1)o.error=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},z);return void 0!==e.error&&null!==e.error?t.error=String(e.error):t.error="",t},toJSON:function(e){var t={};return void 0!==e.error&&(t.error=e.error),t},fromPartial:function(e){var t=Object.assign({},z);return void 0!==e.error&&null!==e.error?t.error=e.error:t.error="",t}};var K={message:""};t.ResponseEcho={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return""!==e.message&&t.uint32(10).string(e.message),t},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},K);n.pos>>3===1)o.message=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},K);return void 0!==e.message&&null!==e.message?t.message=String(e.message):t.message="",t},toJSON:function(e){var t={};return void 0!==e.message&&(t.message=e.message),t},fromPartial:function(e){var t=Object.assign({},K);return void 0!==e.message&&null!==e.message?t.message=e.message:t.message="",t}};var W={};t.ResponseFlush={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create()},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},W);n.pos1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return""!==e.data&&t.uint32(10).string(e.data),""!==e.version&&t.uint32(18).string(e.version),e.appVersion.isZero()||t.uint32(24).uint64(e.appVersion),e.lastBlockHeight.isZero()||t.uint32(32).int64(e.lastBlockHeight),0!==e.lastBlockAppHash.length&&t.uint32(42).bytes(e.lastBlockAppHash),t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},Z);for(o.lastBlockAppHash=new Uint8Array;n.pos>>3){case 1:o.data=n.string();break;case 2:o.version=n.string();break;case 3:o.appVersion=n.uint64();break;case 4:o.lastBlockHeight=n.int64();break;case 5:o.lastBlockAppHash=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},Z);return t.lastBlockAppHash=new Uint8Array,void 0!==e.data&&null!==e.data?t.data=String(e.data):t.data="",void 0!==e.version&&null!==e.version?t.version=String(e.version):t.version="",void 0!==e.appVersion&&null!==e.appVersion?t.appVersion=l.default.fromString(e.appVersion):t.appVersion=l.default.UZERO,void 0!==e.lastBlockHeight&&null!==e.lastBlockHeight?t.lastBlockHeight=l.default.fromString(e.lastBlockHeight):t.lastBlockHeight=l.default.ZERO,void 0!==e.lastBlockAppHash&&null!==e.lastBlockAppHash&&(t.lastBlockAppHash=ve(e.lastBlockAppHash)),t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=e.data),void 0!==e.version&&(t.version=e.version),void 0!==e.appVersion&&(t.appVersion=(e.appVersion||l.default.UZERO).toString()),void 0!==e.lastBlockHeight&&(t.lastBlockHeight=(e.lastBlockHeight||l.default.ZERO).toString()),void 0!==e.lastBlockAppHash&&(t.lastBlockAppHash=ke(void 0!==e.lastBlockAppHash?e.lastBlockAppHash:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},Z);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data="",void 0!==e.version&&null!==e.version?t.version=e.version:t.version="",void 0!==e.appVersion&&null!==e.appVersion?t.appVersion=e.appVersion:t.appVersion=l.default.UZERO,void 0!==e.lastBlockHeight&&null!==e.lastBlockHeight?t.lastBlockHeight=e.lastBlockHeight:t.lastBlockHeight=l.default.ZERO,void 0!==e.lastBlockAppHash&&null!==e.lastBlockAppHash?t.lastBlockAppHash=e.lastBlockAppHash:t.lastBlockAppHash=new Uint8Array,t}};var V={code:0,log:"",info:""};t.ResponseSetOption={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.code&&t.uint32(8).uint32(e.code),""!==e.log&&t.uint32(26).string(e.log),""!==e.info&&t.uint32(34).string(e.info),t},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},V);n.pos>>3){case 1:o.code=n.uint32();break;case 3:o.log=n.string();break;case 4:o.info=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},V);return void 0!==e.code&&null!==e.code?t.code=Number(e.code):t.code=0,void 0!==e.log&&null!==e.log?t.log=String(e.log):t.log="",void 0!==e.info&&null!==e.info?t.info=String(e.info):t.info="",t},toJSON:function(e){var t={};return void 0!==e.code&&(t.code=e.code),void 0!==e.log&&(t.log=e.log),void 0!==e.info&&(t.info=e.info),t},fromPartial:function(e){var t=Object.assign({},V);return void 0!==e.code&&null!==e.code?t.code=e.code:t.code=0,void 0!==e.log&&null!==e.log?t.log=e.log:t.log="",void 0!==e.info&&null!==e.info?t.info=e.info:t.info="",t}};var q={};t.ResponseInitChain={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();void 0!==e.consensusParams&&t.ConsensusParams.encode(e.consensusParams,n.uint32(10).fork()).ldelim();var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.ValidatorUpdate.encode(i,n.uint32(18).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return 0!==e.appHash.length&&n.uint32(26).bytes(e.appHash),n},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},q);for(r.validators=[],r.appHash=new Uint8Array;a.pos>>3){case 1:r.consensusParams=t.ConsensusParams.decode(a,a.uint32());break;case 2:r.validators.push(t.ValidatorUpdate.decode(a,a.uint32()));break;case 3:r.appHash=a.bytes();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},q);if(n.validators=[],n.appHash=new Uint8Array,void 0!==e.consensusParams&&null!==e.consensusParams?n.consensusParams=t.ConsensusParams.fromJSON(e.consensusParams):n.consensusParams=void 0,void 0!==e.validators&&null!==e.validators){var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validators.push(t.ValidatorUpdate.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.appHash&&null!==e.appHash&&(n.appHash=ve(e.appHash)),n},toJSON:function(e){var n={};return void 0!==e.consensusParams&&(n.consensusParams=e.consensusParams?t.ConsensusParams.toJSON(e.consensusParams):void 0),e.validators?n.validators=e.validators.map((function(e){return e?t.ValidatorUpdate.toJSON(e):void 0})):n.validators=[],void 0!==e.appHash&&(n.appHash=ke(void 0!==e.appHash?e.appHash:new Uint8Array)),n},fromPartial:function(e){var n=Object.assign({},q);if(n.validators=[],void 0!==e.consensusParams&&null!==e.consensusParams?n.consensusParams=t.ConsensusParams.fromPartial(e.consensusParams):n.consensusParams=void 0,void 0!==e.validators&&null!==e.validators){var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validators.push(t.ValidatorUpdate.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.appHash&&null!==e.appHash?n.appHash=e.appHash:n.appHash=new Uint8Array,n}};var Q={code:0,log:"",info:"",index:l.default.ZERO,height:l.default.ZERO,codespace:""};t.ResponseQuery={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.code&&t.uint32(8).uint32(e.code),""!==e.log&&t.uint32(26).string(e.log),""!==e.info&&t.uint32(34).string(e.info),e.index.isZero()||t.uint32(40).int64(e.index),0!==e.key.length&&t.uint32(50).bytes(e.key),0!==e.value.length&&t.uint32(58).bytes(e.value),void 0!==e.proofOps&&b.ProofOps.encode(e.proofOps,t.uint32(66).fork()).ldelim(),e.height.isZero()||t.uint32(72).int64(e.height),""!==e.codespace&&t.uint32(82).string(e.codespace),t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},Q);for(o.key=new Uint8Array,o.value=new Uint8Array;n.pos>>3){case 1:o.code=n.uint32();break;case 3:o.log=n.string();break;case 4:o.info=n.string();break;case 5:o.index=n.int64();break;case 6:o.key=n.bytes();break;case 7:o.value=n.bytes();break;case 8:o.proofOps=b.ProofOps.decode(n,n.uint32());break;case 9:o.height=n.int64();break;case 10:o.codespace=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},Q);return t.key=new Uint8Array,t.value=new Uint8Array,void 0!==e.code&&null!==e.code?t.code=Number(e.code):t.code=0,void 0!==e.log&&null!==e.log?t.log=String(e.log):t.log="",void 0!==e.info&&null!==e.info?t.info=String(e.info):t.info="",void 0!==e.index&&null!==e.index?t.index=l.default.fromString(e.index):t.index=l.default.ZERO,void 0!==e.key&&null!==e.key&&(t.key=ve(e.key)),void 0!==e.value&&null!==e.value&&(t.value=ve(e.value)),void 0!==e.proofOps&&null!==e.proofOps?t.proofOps=b.ProofOps.fromJSON(e.proofOps):t.proofOps=void 0,void 0!==e.height&&null!==e.height?t.height=l.default.fromString(e.height):t.height=l.default.ZERO,void 0!==e.codespace&&null!==e.codespace?t.codespace=String(e.codespace):t.codespace="",t},toJSON:function(e){var t={};return void 0!==e.code&&(t.code=e.code),void 0!==e.log&&(t.log=e.log),void 0!==e.info&&(t.info=e.info),void 0!==e.index&&(t.index=(e.index||l.default.ZERO).toString()),void 0!==e.key&&(t.key=ke(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=ke(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.proofOps&&(t.proofOps=e.proofOps?b.ProofOps.toJSON(e.proofOps):void 0),void 0!==e.height&&(t.height=(e.height||l.default.ZERO).toString()),void 0!==e.codespace&&(t.codespace=e.codespace),t},fromPartial:function(e){var t=Object.assign({},Q);return void 0!==e.code&&null!==e.code?t.code=e.code:t.code=0,void 0!==e.log&&null!==e.log?t.log=e.log:t.log="",void 0!==e.info&&null!==e.info?t.info=e.info:t.info="",void 0!==e.index&&null!==e.index?t.index=e.index:t.index=l.default.ZERO,void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,void 0!==e.value&&null!==e.value?t.value=e.value:t.value=new Uint8Array,void 0!==e.proofOps&&null!==e.proofOps?t.proofOps=b.ProofOps.fromPartial(e.proofOps):t.proofOps=void 0,void 0!==e.height&&null!==e.height?t.height=e.height:t.height=l.default.ZERO,void 0!==e.codespace&&null!==e.codespace?t.codespace=e.codespace:t.codespace="",t}};var J={};t.ResponseBeginBlock={encode:function(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create(),o=r(e.events);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.Event.encode(i,a.uint32(10).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return a},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},J);for(r.events=[];a.pos>>3===1)r.events.push(t.Event.decode(a,a.uint32()));else a.skipType(7&i)}return r},fromJSON:function(e){var n=Object.assign({},J);if(n.events=[],void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return e.events?n.events=e.events.map((function(e){return e?t.Event.toJSON(e):void 0})):n.events=[],n},fromPartial:function(e){var n=Object.assign({},J);if(n.events=[],void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return n}};var Y={code:0,log:"",info:"",gasWanted:l.default.ZERO,gasUsed:l.default.ZERO,codespace:""};t.ResponseCheckTx={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();0!==e.code&&n.uint32(8).uint32(e.code),0!==e.data.length&&n.uint32(18).bytes(e.data),""!==e.log&&n.uint32(26).string(e.log),""!==e.info&&n.uint32(34).string(e.info),e.gasWanted.isZero()||n.uint32(40).int64(e.gasWanted),e.gasUsed.isZero()||n.uint32(48).int64(e.gasUsed);var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.Event.encode(i,n.uint32(58).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return""!==e.codespace&&n.uint32(66).string(e.codespace),n},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},Y);for(r.events=[],r.data=new Uint8Array;a.pos>>3){case 1:r.code=a.uint32();break;case 2:r.data=a.bytes();break;case 3:r.log=a.string();break;case 4:r.info=a.string();break;case 5:r.gasWanted=a.int64();break;case 6:r.gasUsed=a.int64();break;case 7:r.events.push(t.Event.decode(a,a.uint32()));break;case 8:r.codespace=a.string();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},Y);if(n.events=[],n.data=new Uint8Array,void 0!==e.code&&null!==e.code?n.code=Number(e.code):n.code=0,void 0!==e.data&&null!==e.data&&(n.data=ve(e.data)),void 0!==e.log&&null!==e.log?n.log=String(e.log):n.log="",void 0!==e.info&&null!==e.info?n.info=String(e.info):n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=l.default.fromString(e.gasWanted):n.gasWanted=l.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=l.default.fromString(e.gasUsed):n.gasUsed=l.default.ZERO,void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.codespace&&null!==e.codespace?n.codespace=String(e.codespace):n.codespace="",n},toJSON:function(e){var n={};return void 0!==e.code&&(n.code=e.code),void 0!==e.data&&(n.data=ke(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.log&&(n.log=e.log),void 0!==e.info&&(n.info=e.info),void 0!==e.gasWanted&&(n.gasWanted=(e.gasWanted||l.default.ZERO).toString()),void 0!==e.gasUsed&&(n.gasUsed=(e.gasUsed||l.default.ZERO).toString()),e.events?n.events=e.events.map((function(e){return e?t.Event.toJSON(e):void 0})):n.events=[],void 0!==e.codespace&&(n.codespace=e.codespace),n},fromPartial:function(e){var n=Object.assign({},Y);if(n.events=[],void 0!==e.code&&null!==e.code?n.code=e.code:n.code=0,void 0!==e.data&&null!==e.data?n.data=e.data:n.data=new Uint8Array,void 0!==e.log&&null!==e.log?n.log=e.log:n.log="",void 0!==e.info&&null!==e.info?n.info=e.info:n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=e.gasWanted:n.gasWanted=l.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=e.gasUsed:n.gasUsed=l.default.ZERO,void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.codespace&&null!==e.codespace?n.codespace=e.codespace:n.codespace="",n}};var X={code:0,log:"",info:"",gasWanted:l.default.ZERO,gasUsed:l.default.ZERO,codespace:""};t.ResponseDeliverTx={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();0!==e.code&&n.uint32(8).uint32(e.code),0!==e.data.length&&n.uint32(18).bytes(e.data),""!==e.log&&n.uint32(26).string(e.log),""!==e.info&&n.uint32(34).string(e.info),e.gasWanted.isZero()||n.uint32(40).int64(e.gasWanted),e.gasUsed.isZero()||n.uint32(48).int64(e.gasUsed);var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.Event.encode(i,n.uint32(58).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return""!==e.codespace&&n.uint32(66).string(e.codespace),n},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},X);for(r.events=[],r.data=new Uint8Array;a.pos>>3){case 1:r.code=a.uint32();break;case 2:r.data=a.bytes();break;case 3:r.log=a.string();break;case 4:r.info=a.string();break;case 5:r.gasWanted=a.int64();break;case 6:r.gasUsed=a.int64();break;case 7:r.events.push(t.Event.decode(a,a.uint32()));break;case 8:r.codespace=a.string();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},X);if(n.events=[],n.data=new Uint8Array,void 0!==e.code&&null!==e.code?n.code=Number(e.code):n.code=0,void 0!==e.data&&null!==e.data&&(n.data=ve(e.data)),void 0!==e.log&&null!==e.log?n.log=String(e.log):n.log="",void 0!==e.info&&null!==e.info?n.info=String(e.info):n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=l.default.fromString(e.gasWanted):n.gasWanted=l.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=l.default.fromString(e.gasUsed):n.gasUsed=l.default.ZERO,void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.codespace&&null!==e.codespace?n.codespace=String(e.codespace):n.codespace="",n},toJSON:function(e){var n={};return void 0!==e.code&&(n.code=e.code),void 0!==e.data&&(n.data=ke(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.log&&(n.log=e.log),void 0!==e.info&&(n.info=e.info),void 0!==e.gasWanted&&(n.gasWanted=(e.gasWanted||l.default.ZERO).toString()),void 0!==e.gasUsed&&(n.gasUsed=(e.gasUsed||l.default.ZERO).toString()),e.events?n.events=e.events.map((function(e){return e?t.Event.toJSON(e):void 0})):n.events=[],void 0!==e.codespace&&(n.codespace=e.codespace),n},fromPartial:function(e){var n=Object.assign({},X);if(n.events=[],void 0!==e.code&&null!==e.code?n.code=e.code:n.code=0,void 0!==e.data&&null!==e.data?n.data=e.data:n.data=new Uint8Array,void 0!==e.log&&null!==e.log?n.log=e.log:n.log="",void 0!==e.info&&null!==e.info?n.info=e.info:n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=e.gasWanted:n.gasWanted=l.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=e.gasUsed:n.gasUsed=l.default.ZERO,void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.codespace&&null!==e.codespace?n.codespace=e.codespace:n.codespace="",n}};var $={};t.ResponseEndBlock={encode:function(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create(),o=r(e.validatorUpdates);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.ValidatorUpdate.encode(i,a.uint32(10).fork()).ldelim()}}catch(d){o.e(d)}finally{o.f()}void 0!==e.consensusParamUpdates&&t.ConsensusParams.encode(e.consensusParamUpdates,a.uint32(18).fork()).ldelim();var s,c=r(e.events);try{for(c.s();!(s=c.n()).done;){var u=s.value;t.Event.encode(u,a.uint32(26).fork()).ldelim()}}catch(d){c.e(d)}finally{c.f()}return a},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},$);for(r.validatorUpdates=[],r.events=[];a.pos>>3){case 1:r.validatorUpdates.push(t.ValidatorUpdate.decode(a,a.uint32()));break;case 2:r.consensusParamUpdates=t.ConsensusParams.decode(a,a.uint32());break;case 3:r.events.push(t.Event.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},$);if(n.validatorUpdates=[],n.events=[],void 0!==e.validatorUpdates&&null!==e.validatorUpdates){var a,o=r(e.validatorUpdates);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validatorUpdates.push(t.ValidatorUpdate.fromJSON(i))}}catch(d){o.e(d)}finally{o.f()}}if(void 0!==e.consensusParamUpdates&&null!==e.consensusParamUpdates?n.consensusParamUpdates=t.ConsensusParams.fromJSON(e.consensusParamUpdates):n.consensusParamUpdates=void 0,void 0!==e.events&&null!==e.events){var s,c=r(e.events);try{for(c.s();!(s=c.n()).done;){var u=s.value;n.events.push(t.Event.fromJSON(u))}}catch(d){c.e(d)}finally{c.f()}}return n},toJSON:function(e){var n={};return e.validatorUpdates?n.validatorUpdates=e.validatorUpdates.map((function(e){return e?t.ValidatorUpdate.toJSON(e):void 0})):n.validatorUpdates=[],void 0!==e.consensusParamUpdates&&(n.consensusParamUpdates=e.consensusParamUpdates?t.ConsensusParams.toJSON(e.consensusParamUpdates):void 0),e.events?n.events=e.events.map((function(e){return e?t.Event.toJSON(e):void 0})):n.events=[],n},fromPartial:function(e){var n=Object.assign({},$);if(n.validatorUpdates=[],n.events=[],void 0!==e.validatorUpdates&&null!==e.validatorUpdates){var a,o=r(e.validatorUpdates);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validatorUpdates.push(t.ValidatorUpdate.fromPartial(i))}}catch(d){o.e(d)}finally{o.f()}}if(void 0!==e.consensusParamUpdates&&null!==e.consensusParamUpdates?n.consensusParamUpdates=t.ConsensusParams.fromPartial(e.consensusParamUpdates):n.consensusParamUpdates=void 0,void 0!==e.events&&null!==e.events){var s,c=r(e.events);try{for(c.s();!(s=c.n()).done;){var u=s.value;n.events.push(t.Event.fromPartial(u))}}catch(d){c.e(d)}finally{c.f()}}return n}};var ee={retainHeight:l.default.ZERO};t.ResponseCommit={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.data.length&&t.uint32(18).bytes(e.data),e.retainHeight.isZero()||t.uint32(24).int64(e.retainHeight),t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},ee);for(o.data=new Uint8Array;n.pos>>3){case 2:o.data=n.bytes();break;case 3:o.retainHeight=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},ee);return t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=ve(e.data)),void 0!==e.retainHeight&&null!==e.retainHeight?t.retainHeight=l.default.fromString(e.retainHeight):t.retainHeight=l.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=ke(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.retainHeight&&(t.retainHeight=(e.retainHeight||l.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},ee);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,void 0!==e.retainHeight&&null!==e.retainHeight?t.retainHeight=e.retainHeight:t.retainHeight=l.default.ZERO,t}};var te={};t.ResponseListSnapshots={encode:function(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create(),o=r(e.snapshots);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.Snapshot.encode(i,a.uint32(10).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return a},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},te);for(r.snapshots=[];a.pos>>3===1)r.snapshots.push(t.Snapshot.decode(a,a.uint32()));else a.skipType(7&i)}return r},fromJSON:function(e){var n=Object.assign({},te);if(n.snapshots=[],void 0!==e.snapshots&&null!==e.snapshots){var a,o=r(e.snapshots);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.snapshots.push(t.Snapshot.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return e.snapshots?n.snapshots=e.snapshots.map((function(e){return e?t.Snapshot.toJSON(e):void 0})):n.snapshots=[],n},fromPartial:function(e){var n=Object.assign({},te);if(n.snapshots=[],void 0!==e.snapshots&&null!==e.snapshots){var a,o=r(e.snapshots);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.snapshots.push(t.Snapshot.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return n}};var ne={result:0};t.ResponseOfferSnapshot={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},ne);n.pos>>3===1)o.result=n.int32();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},ne);return void 0!==e.result&&null!==e.result?t.result=A(e.result):t.result=0,t},toJSON:function(e){var t={};return void 0!==e.result&&(t.result=x(e.result)),t},fromPartial:function(e){var t=Object.assign({},ne);return void 0!==e.result&&null!==e.result?t.result=e.result:t.result=0,t}};var ae={};t.ResponseLoadSnapshotChunk={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.chunk.length&&t.uint32(10).bytes(e.chunk),t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},ae);for(o.chunk=new Uint8Array;n.pos>>3===1)o.chunk=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},ae);return t.chunk=new Uint8Array,void 0!==e.chunk&&null!==e.chunk&&(t.chunk=ve(e.chunk)),t},toJSON:function(e){var t={};return void 0!==e.chunk&&(t.chunk=ke(void 0!==e.chunk?e.chunk:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},ae);return void 0!==e.chunk&&null!==e.chunk?t.chunk=e.chunk:t.chunk=new Uint8Array,t}};var oe={result:0,refetchChunks:0,rejectSenders:""};t.ResponseApplySnapshotChunk={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();0!==e.result&&t.uint32(8).int32(e.result),t.uint32(18).fork();var n,a=r(e.refetchChunks);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.uint32(o)}}catch(u){a.e(u)}finally{a.f()}t.ldelim();var i,s=r(e.rejectSenders);try{for(s.s();!(i=s.n()).done;){var c=i.value;t.uint32(26).string(c)}}catch(u){s.e(u)}finally{s.f()}return t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},oe);for(o.refetchChunks=[],o.rejectSenders=[];n.pos>>3){case 1:o.result=n.int32();break;case 2:if(2===(7&r))for(var i=n.uint32()+n.pos;n.pos1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return void 0!==e.block&&t.BlockParams.encode(e.block,n.uint32(10).fork()).ldelim(),void 0!==e.evidence&&m.EvidenceParams.encode(e.evidence,n.uint32(18).fork()).ldelim(),void 0!==e.validator&&m.ValidatorParams.encode(e.validator,n.uint32(26).fork()).ldelim(),void 0!==e.version&&m.VersionParams.encode(e.version,n.uint32(34).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},re);a.pos>>3){case 1:r.block=t.BlockParams.decode(a,a.uint32());break;case 2:r.evidence=m.EvidenceParams.decode(a,a.uint32());break;case 3:r.validator=m.ValidatorParams.decode(a,a.uint32());break;case 4:r.version=m.VersionParams.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},re);return void 0!==e.block&&null!==e.block?n.block=t.BlockParams.fromJSON(e.block):n.block=void 0,void 0!==e.evidence&&null!==e.evidence?n.evidence=m.EvidenceParams.fromJSON(e.evidence):n.evidence=void 0,void 0!==e.validator&&null!==e.validator?n.validator=m.ValidatorParams.fromJSON(e.validator):n.validator=void 0,void 0!==e.version&&null!==e.version?n.version=m.VersionParams.fromJSON(e.version):n.version=void 0,n},toJSON:function(e){var n={};return void 0!==e.block&&(n.block=e.block?t.BlockParams.toJSON(e.block):void 0),void 0!==e.evidence&&(n.evidence=e.evidence?m.EvidenceParams.toJSON(e.evidence):void 0),void 0!==e.validator&&(n.validator=e.validator?m.ValidatorParams.toJSON(e.validator):void 0),void 0!==e.version&&(n.version=e.version?m.VersionParams.toJSON(e.version):void 0),n},fromPartial:function(e){var n=Object.assign({},re);return void 0!==e.block&&null!==e.block?n.block=t.BlockParams.fromPartial(e.block):n.block=void 0,void 0!==e.evidence&&null!==e.evidence?n.evidence=m.EvidenceParams.fromPartial(e.evidence):n.evidence=void 0,void 0!==e.validator&&null!==e.validator?n.validator=m.ValidatorParams.fromPartial(e.validator):n.validator=void 0,void 0!==e.version&&null!==e.version?n.version=m.VersionParams.fromPartial(e.version):n.version=void 0,n}};var ie={maxBytes:l.default.ZERO,maxGas:l.default.ZERO};t.BlockParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return e.maxBytes.isZero()||t.uint32(8).int64(e.maxBytes),e.maxGas.isZero()||t.uint32(16).int64(e.maxGas),t},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},ie);n.pos>>3){case 1:o.maxBytes=n.int64();break;case 2:o.maxGas=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},ie);return void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=l.default.fromString(e.maxBytes):t.maxBytes=l.default.ZERO,void 0!==e.maxGas&&null!==e.maxGas?t.maxGas=l.default.fromString(e.maxGas):t.maxGas=l.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||l.default.ZERO).toString()),void 0!==e.maxGas&&(t.maxGas=(e.maxGas||l.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},ie);return void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=e.maxBytes:t.maxBytes=l.default.ZERO,void 0!==e.maxGas&&null!==e.maxGas?t.maxGas=e.maxGas:t.maxGas=l.default.ZERO,t}};var se={round:0};t.LastCommitInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();0!==e.round&&n.uint32(8).int32(e.round);var a,o=r(e.votes);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.VoteInfo.encode(i,n.uint32(18).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},se);for(r.votes=[];a.pos>>3){case 1:r.round=a.int32();break;case 2:r.votes.push(t.VoteInfo.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},se);if(n.votes=[],void 0!==e.round&&null!==e.round?n.round=Number(e.round):n.round=0,void 0!==e.votes&&null!==e.votes){var a,o=r(e.votes);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.votes.push(t.VoteInfo.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return void 0!==e.round&&(n.round=e.round),e.votes?n.votes=e.votes.map((function(e){return e?t.VoteInfo.toJSON(e):void 0})):n.votes=[],n},fromPartial:function(e){var n=Object.assign({},se);if(n.votes=[],void 0!==e.round&&null!==e.round?n.round=e.round:n.round=0,void 0!==e.votes&&null!==e.votes){var a,o=r(e.votes);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.votes.push(t.VoteInfo.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return n}};var ce={type:""};t.Event={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();""!==e.type&&n.uint32(10).string(e.type);var a,o=r(e.attributes);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.EventAttribute.encode(i,n.uint32(18).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},ce);for(r.attributes=[];a.pos>>3){case 1:r.type=a.string();break;case 2:r.attributes.push(t.EventAttribute.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},ce);if(n.attributes=[],void 0!==e.type&&null!==e.type?n.type=String(e.type):n.type="",void 0!==e.attributes&&null!==e.attributes){var a,o=r(e.attributes);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.attributes.push(t.EventAttribute.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=e.type),e.attributes?n.attributes=e.attributes.map((function(e){return e?t.EventAttribute.toJSON(e):void 0})):n.attributes=[],n},fromPartial:function(e){var n=Object.assign({},ce);if(n.attributes=[],void 0!==e.type&&null!==e.type?n.type=e.type:n.type="",void 0!==e.attributes&&null!==e.attributes){var a,o=r(e.attributes);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.attributes.push(t.EventAttribute.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return n}};var ue={index:!1};t.EventAttribute={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),0!==e.value.length&&t.uint32(18).bytes(e.value),!0===e.index&&t.uint32(24).bool(e.index),t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},ue);for(o.key=new Uint8Array,o.value=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.value=n.bytes();break;case 3:o.index=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},ue);return t.key=new Uint8Array,t.value=new Uint8Array,void 0!==e.key&&null!==e.key&&(t.key=ve(e.key)),void 0!==e.value&&null!==e.value&&(t.value=ve(e.value)),void 0!==e.index&&null!==e.index?t.index=Boolean(e.index):t.index=!1,t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=ke(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=ke(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.index&&(t.index=e.index),t},fromPartial:function(e){var t=Object.assign({},ue);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,void 0!==e.value&&null!==e.value?t.value=e.value:t.value=new Uint8Array,void 0!==e.index&&null!==e.index?t.index=e.index:t.index=!1,t}};var de={height:l.default.ZERO,index:0};t.TxResult={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return e.height.isZero()||n.uint32(8).int64(e.height),0!==e.index&&n.uint32(16).uint32(e.index),0!==e.tx.length&&n.uint32(26).bytes(e.tx),void 0!==e.result&&t.ResponseDeliverTx.encode(e.result,n.uint32(34).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},de);for(r.tx=new Uint8Array;a.pos>>3){case 1:r.height=a.int64();break;case 2:r.index=a.uint32();break;case 3:r.tx=a.bytes();break;case 4:r.result=t.ResponseDeliverTx.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},de);return n.tx=new Uint8Array,void 0!==e.height&&null!==e.height?n.height=l.default.fromString(e.height):n.height=l.default.ZERO,void 0!==e.index&&null!==e.index?n.index=Number(e.index):n.index=0,void 0!==e.tx&&null!==e.tx&&(n.tx=ve(e.tx)),void 0!==e.result&&null!==e.result?n.result=t.ResponseDeliverTx.fromJSON(e.result):n.result=void 0,n},toJSON:function(e){var n={};return void 0!==e.height&&(n.height=(e.height||l.default.ZERO).toString()),void 0!==e.index&&(n.index=e.index),void 0!==e.tx&&(n.tx=ke(void 0!==e.tx?e.tx:new Uint8Array)),void 0!==e.result&&(n.result=e.result?t.ResponseDeliverTx.toJSON(e.result):void 0),n},fromPartial:function(e){var n=Object.assign({},de);return void 0!==e.height&&null!==e.height?n.height=e.height:n.height=l.default.ZERO,void 0!==e.index&&null!==e.index?n.index=e.index:n.index=0,void 0!==e.tx&&null!==e.tx?n.tx=e.tx:n.tx=new Uint8Array,void 0!==e.result&&null!==e.result?n.result=t.ResponseDeliverTx.fromPartial(e.result):n.result=void 0,n}};var le={power:l.default.ZERO};t.Validator={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.address.length&&t.uint32(10).bytes(e.address),e.power.isZero()||t.uint32(24).int64(e.power),t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},le);for(o.address=new Uint8Array;n.pos>>3){case 1:o.address=n.bytes();break;case 3:o.power=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},le);return t.address=new Uint8Array,void 0!==e.address&&null!==e.address&&(t.address=ve(e.address)),void 0!==e.power&&null!==e.power?t.power=l.default.fromString(e.power):t.power=l.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=ke(void 0!==e.address?e.address:new Uint8Array)),void 0!==e.power&&(t.power=(e.power||l.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},le);return void 0!==e.address&&null!==e.address?t.address=e.address:t.address=new Uint8Array,void 0!==e.power&&null!==e.power?t.power=e.power:t.power=l.default.ZERO,t}};var fe={power:l.default.ZERO};t.ValidatorUpdate={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return void 0!==e.pubKey&&h.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.power.isZero()||t.uint32(16).int64(e.power),t},decode:function(e,t){for(var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},fe);n.pos>>3){case 1:o.pubKey=h.PublicKey.decode(n,n.uint32());break;case 2:o.power=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},fe);return void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=h.PublicKey.fromJSON(e.pubKey):t.pubKey=void 0,void 0!==e.power&&null!==e.power?t.power=l.default.fromString(e.power):t.power=l.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?h.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.power&&(t.power=(e.power||l.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},fe);return void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=h.PublicKey.fromPartial(e.pubKey):t.pubKey=void 0,void 0!==e.power&&null!==e.power?t.power=e.power:t.power=l.default.ZERO,t}};var pe={signedLastBlock:!1};t.VoteInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return void 0!==e.validator&&t.Validator.encode(e.validator,n.uint32(10).fork()).ldelim(),!0===e.signedLastBlock&&n.uint32(16).bool(e.signedLastBlock),n},decode:function(e,n){for(var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},pe);a.pos>>3){case 1:r.validator=t.Validator.decode(a,a.uint32());break;case 2:r.signedLastBlock=a.bool();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},pe);return void 0!==e.validator&&null!==e.validator?n.validator=t.Validator.fromJSON(e.validator):n.validator=void 0,void 0!==e.signedLastBlock&&null!==e.signedLastBlock?n.signedLastBlock=Boolean(e.signedLastBlock):n.signedLastBlock=!1,n},toJSON:function(e){var n={};return void 0!==e.validator&&(n.validator=e.validator?t.Validator.toJSON(e.validator):void 0),void 0!==e.signedLastBlock&&(n.signedLastBlock=e.signedLastBlock),n},fromPartial:function(e){var n=Object.assign({},pe);return void 0!==e.validator&&null!==e.validator?n.validator=t.Validator.fromPartial(e.validator):n.validator=void 0,void 0!==e.signedLastBlock&&null!==e.signedLastBlock?n.signedLastBlock=e.signedLastBlock:n.signedLastBlock=!1,n}};var be={type:0,height:l.default.ZERO,totalVotingPower:l.default.ZERO};t.Evidence={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return 0!==e.type&&n.uint32(8).int32(e.type),void 0!==e.validator&&t.Validator.encode(e.validator,n.uint32(18).fork()).ldelim(),e.height.isZero()||n.uint32(24).int64(e.height),void 0!==e.time&&g.Timestamp.encode(Ae(e.time),n.uint32(34).fork()).ldelim(),e.totalVotingPower.isZero()||n.uint32(40).int64(e.totalVotingPower),n},decode:function(e,n){for(var a=e instanceof f.default.Reader?e:new f.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},be);a.pos>>3){case 1:r.type=a.int32();break;case 2:r.validator=t.Validator.decode(a,a.uint32());break;case 3:r.height=a.int64();break;case 4:r.time=xe(g.Timestamp.decode(a,a.uint32()));break;case 5:r.totalVotingPower=a.int64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},be);return void 0!==e.type&&null!==e.type?n.type=w(e.type):n.type=0,void 0!==e.validator&&null!==e.validator?n.validator=t.Validator.fromJSON(e.validator):n.validator=void 0,void 0!==e.height&&null!==e.height?n.height=l.default.fromString(e.height):n.height=l.default.ZERO,void 0!==e.time&&null!==e.time?n.time=Ie(e.time):n.time=void 0,void 0!==e.totalVotingPower&&null!==e.totalVotingPower?n.totalVotingPower=l.default.fromString(e.totalVotingPower):n.totalVotingPower=l.default.ZERO,n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=k(e.type)),void 0!==e.validator&&(n.validator=e.validator?t.Validator.toJSON(e.validator):void 0),void 0!==e.height&&(n.height=(e.height||l.default.ZERO).toString()),void 0!==e.time&&(n.time=e.time.toISOString()),void 0!==e.totalVotingPower&&(n.totalVotingPower=(e.totalVotingPower||l.default.ZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},be);return void 0!==e.type&&null!==e.type?n.type=e.type:n.type=0,void 0!==e.validator&&null!==e.validator?n.validator=t.Validator.fromPartial(e.validator):n.validator=void 0,void 0!==e.height&&null!==e.height?n.height=e.height:n.height=l.default.ZERO,void 0!==e.time&&null!==e.time?n.time=e.time:n.time=void 0,void 0!==e.totalVotingPower&&null!==e.totalVotingPower?n.totalVotingPower=e.totalVotingPower:n.totalVotingPower=l.default.ZERO,n}};var me={height:l.default.UZERO,format:0,chunks:0};t.Snapshot={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default.Writer.create();return e.height.isZero()||t.uint32(8).uint64(e.height),0!==e.format&&t.uint32(16).uint32(e.format),0!==e.chunks&&t.uint32(24).uint32(e.chunks),0!==e.hash.length&&t.uint32(34).bytes(e.hash),0!==e.metadata.length&&t.uint32(42).bytes(e.metadata),t},decode:function(e,t){var n=e instanceof f.default.Reader?e:new f.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},me);for(o.hash=new Uint8Array,o.metadata=new Uint8Array;n.pos>>3){case 1:o.height=n.uint64();break;case 2:o.format=n.uint32();break;case 3:o.chunks=n.uint32();break;case 4:o.hash=n.bytes();break;case 5:o.metadata=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},me);return t.hash=new Uint8Array,t.metadata=new Uint8Array,void 0!==e.height&&null!==e.height?t.height=l.default.fromString(e.height):t.height=l.default.UZERO,void 0!==e.format&&null!==e.format?t.format=Number(e.format):t.format=0,void 0!==e.chunks&&null!==e.chunks?t.chunks=Number(e.chunks):t.chunks=0,void 0!==e.hash&&null!==e.hash&&(t.hash=ve(e.hash)),void 0!==e.metadata&&null!==e.metadata&&(t.metadata=ve(e.metadata)),t},toJSON:function(e){var t={};return void 0!==e.height&&(t.height=(e.height||l.default.UZERO).toString()),void 0!==e.format&&(t.format=e.format),void 0!==e.chunks&&(t.chunks=e.chunks),void 0!==e.hash&&(t.hash=ke(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.metadata&&(t.metadata=ke(void 0!==e.metadata?e.metadata:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},me);return void 0!==e.height&&null!==e.height?t.height=e.height:t.height=l.default.UZERO,void 0!==e.format&&null!==e.format?t.format=e.format:t.format=0,void 0!==e.chunks&&null!==e.chunks?t.chunks=e.chunks:t.chunks=0,void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash=new Uint8Array,void 0!==e.metadata&&null!==e.metadata?t.metadata=e.metadata:t.metadata=new Uint8Array,t}};var he=function(){function e(t){a(this,e),this.rpc=t,this.Echo=this.Echo.bind(this),this.Flush=this.Flush.bind(this),this.Info=this.Info.bind(this),this.SetOption=this.SetOption.bind(this),this.DeliverTx=this.DeliverTx.bind(this),this.CheckTx=this.CheckTx.bind(this),this.Query=this.Query.bind(this),this.Commit=this.Commit.bind(this),this.InitChain=this.InitChain.bind(this),this.BeginBlock=this.BeginBlock.bind(this),this.EndBlock=this.EndBlock.bind(this),this.ListSnapshots=this.ListSnapshots.bind(this),this.OfferSnapshot=this.OfferSnapshot.bind(this),this.LoadSnapshotChunk=this.LoadSnapshotChunk.bind(this),this.ApplySnapshotChunk=this.ApplySnapshotChunk.bind(this)}return o(e,[{key:"Echo",value:function(e){var n=t.RequestEcho.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Echo",n).then((function(e){return t.ResponseEcho.decode(new f.default.Reader(e))}))}},{key:"Flush",value:function(e){var n=t.RequestFlush.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Flush",n).then((function(e){return t.ResponseFlush.decode(new f.default.Reader(e))}))}},{key:"Info",value:function(e){var n=t.RequestInfo.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Info",n).then((function(e){return t.ResponseInfo.decode(new f.default.Reader(e))}))}},{key:"SetOption",value:function(e){var n=t.RequestSetOption.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","SetOption",n).then((function(e){return t.ResponseSetOption.decode(new f.default.Reader(e))}))}},{key:"DeliverTx",value:function(e){var n=t.RequestDeliverTx.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","DeliverTx",n).then((function(e){return t.ResponseDeliverTx.decode(new f.default.Reader(e))}))}},{key:"CheckTx",value:function(e){var n=t.RequestCheckTx.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","CheckTx",n).then((function(e){return t.ResponseCheckTx.decode(new f.default.Reader(e))}))}},{key:"Query",value:function(e){var n=t.RequestQuery.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Query",n).then((function(e){return t.ResponseQuery.decode(new f.default.Reader(e))}))}},{key:"Commit",value:function(e){var n=t.RequestCommit.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Commit",n).then((function(e){return t.ResponseCommit.decode(new f.default.Reader(e))}))}},{key:"InitChain",value:function(e){var n=t.RequestInitChain.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","InitChain",n).then((function(e){return t.ResponseInitChain.decode(new f.default.Reader(e))}))}},{key:"BeginBlock",value:function(e){var n=t.RequestBeginBlock.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","BeginBlock",n).then((function(e){return t.ResponseBeginBlock.decode(new f.default.Reader(e))}))}},{key:"EndBlock",value:function(e){var n=t.RequestEndBlock.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","EndBlock",n).then((function(e){return t.ResponseEndBlock.decode(new f.default.Reader(e))}))}},{key:"ListSnapshots",value:function(e){var n=t.RequestListSnapshots.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","ListSnapshots",n).then((function(e){return t.ResponseListSnapshots.decode(new f.default.Reader(e))}))}},{key:"OfferSnapshot",value:function(e){var n=t.RequestOfferSnapshot.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","OfferSnapshot",n).then((function(e){return t.ResponseOfferSnapshot.decode(new f.default.Reader(e))}))}},{key:"LoadSnapshotChunk",value:function(e){var n=t.RequestLoadSnapshotChunk.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","LoadSnapshotChunk",n).then((function(e){return t.ResponseLoadSnapshotChunk.decode(new f.default.Reader(e))}))}},{key:"ApplySnapshotChunk",value:function(e){var n=t.RequestApplySnapshotChunk.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","ApplySnapshotChunk",n).then((function(e){return t.ResponseApplySnapshotChunk.decode(new f.default.Reader(e))}))}}]),e}();t.ABCIApplicationClientImpl=he;var ge=function(){if("undefined"!==typeof ge)return ge;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),ye=ge.atob||function(e){return ge.Buffer.from(e,"base64").toString("binary")};function ve(e){for(var t=ye(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.ed25519&&t.uint32(10).bytes(e.ed25519),void 0!==e.secp256k1&&t.uint32(18).bytes(e.secp256k1),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);n.pos>>3){case 1:o.ed25519=n.bytes();break;case 2:o.secp256k1=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},s);return void 0!==e.ed25519&&null!==e.ed25519&&(t.ed25519=d(e.ed25519)),void 0!==e.secp256k1&&null!==e.secp256k1&&(t.secp256k1=d(e.secp256k1)),t},toJSON:function(e){var t={};return void 0!==e.ed25519&&(t.ed25519=void 0!==e.ed25519?f(e.ed25519):void 0),void 0!==e.secp256k1&&(t.secp256k1=void 0!==e.secp256k1?f(e.secp256k1):void 0),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.ed25519&&null!==e.ed25519?t.ed25519=e.ed25519:t.ed25519=void 0,void 0!==e.secp256k1&&null!==e.secp256k1?t.secp256k1=e.secp256k1:t.secp256k1=void 0,t}};var c=function(){if("undefined"!==typeof c)return c;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),u=c.atob||function(e){return c.Buffer.from(e,"base64").toString("binary")};function d(e){for(var t=u(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();e.total.isZero()||t.uint32(8).int64(e.total),e.index.isZero()||t.uint32(16).int64(e.index),0!==e.leafHash.length&&t.uint32(26).bytes(e.leafHash);var n,o=a(e.aunts);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(34).bytes(r)}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.aunts=[],o.leafHash=new Uint8Array;n.pos>>3){case 1:o.total=n.int64();break;case 2:o.index=n.int64();break;case 3:o.leafHash=n.bytes();break;case 4:o.aunts.push(n.bytes());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},s);if(t.aunts=[],t.leafHash=new Uint8Array,void 0!==e.total&&null!==e.total?t.total=r.default.fromString(e.total):t.total=r.default.ZERO,void 0!==e.index&&null!==e.index?t.index=r.default.fromString(e.index):t.index=r.default.ZERO,void 0!==e.leafHash&&null!==e.leafHash&&(t.leafHash=b(e.leafHash)),void 0!==e.aunts&&null!==e.aunts){var n,o=a(e.aunts);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.aunts.push(b(i))}}catch(c){o.e(c)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.total&&(t.total=(e.total||r.default.ZERO).toString()),void 0!==e.index&&(t.index=(e.index||r.default.ZERO).toString()),void 0!==e.leafHash&&(t.leafHash=h(void 0!==e.leafHash?e.leafHash:new Uint8Array)),e.aunts?t.aunts=e.aunts.map((function(e){return h(void 0!==e?e:new Uint8Array)})):t.aunts=[],t},fromPartial:function(e){var t=Object.assign({},s);if(t.aunts=[],void 0!==e.total&&null!==e.total?t.total=e.total:t.total=r.default.ZERO,void 0!==e.index&&null!==e.index?t.index=e.index:t.index=r.default.ZERO,void 0!==e.leafHash&&null!==e.leafHash?t.leafHash=e.leafHash:t.leafHash=new Uint8Array,void 0!==e.aunts&&null!==e.aunts){var n,o=a(e.aunts);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.aunts.push(i)}}catch(c){o.e(c)}finally{o.f()}}return t}};var c={};t.ValueOp={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.proof&&t.Proof.encode(e.proof,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},c);for(r.key=new Uint8Array;a.pos>>3){case 1:r.key=a.bytes();break;case 2:r.proof=t.Proof.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},c);return n.key=new Uint8Array,void 0!==e.key&&null!==e.key&&(n.key=b(e.key)),void 0!==e.proof&&null!==e.proof?n.proof=t.Proof.fromJSON(e.proof):n.proof=void 0,n},toJSON:function(e){var n={};return void 0!==e.key&&(n.key=h(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.proof&&(n.proof=e.proof?t.Proof.toJSON(e.proof):void 0),n},fromPartial:function(e){var n=Object.assign({},c);return void 0!==e.key&&null!==e.key?n.key=e.key:n.key=new Uint8Array,void 0!==e.proof&&null!==e.proof?n.proof=t.Proof.fromPartial(e.proof):n.proof=void 0,n}};var u={key:"",input:"",output:""};t.DominoOp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.input&&t.uint32(18).string(e.input),""!==e.output&&t.uint32(26).string(e.output),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.key=n.string();break;case 2:o.input=n.string();break;case 3:o.output=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.key&&null!==e.key?t.key=String(e.key):t.key="",void 0!==e.input&&null!==e.input?t.input=String(e.input):t.input="",void 0!==e.output&&null!==e.output?t.output=String(e.output):t.output="",t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.input&&(t.input=e.input),void 0!==e.output&&(t.output=e.output),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key="",void 0!==e.input&&null!==e.input?t.input=e.input:t.input="",void 0!==e.output&&null!==e.output?t.output=e.output:t.output="",t}};var d={type:""};t.ProofOp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.type&&t.uint32(10).string(e.type),0!==e.key.length&&t.uint32(18).bytes(e.key),0!==e.data.length&&t.uint32(26).bytes(e.data),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);for(o.key=new Uint8Array,o.data=new Uint8Array;n.pos>>3){case 1:o.type=n.string();break;case 2:o.key=n.bytes();break;case 3:o.data=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return t.key=new Uint8Array,t.data=new Uint8Array,void 0!==e.type&&null!==e.type?t.type=String(e.type):t.type="",void 0!==e.key&&null!==e.key&&(t.key=b(e.key)),void 0!==e.data&&null!==e.data&&(t.data=b(e.data)),t},toJSON:function(e){var t={};return void 0!==e.type&&(t.type=e.type),void 0!==e.key&&(t.key=h(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.data&&(t.data=h(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.type&&null!==e.type?t.type=e.type:t.type="",void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var l={};t.ProofOps={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.ops);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.ProofOp.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},l);for(r.ops=[];a.pos>>3===1)r.ops.push(t.ProofOp.decode(a,a.uint32()));else a.skipType(7&s)}return r},fromJSON:function(e){var n=Object.assign({},l);if(n.ops=[],void 0!==e.ops&&null!==e.ops){var o,r=a(e.ops);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.ops.push(t.ProofOp.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return e.ops?n.ops=e.ops.map((function(e){return e?t.ProofOp.toJSON(e):void 0})):n.ops=[],n},fromPartial:function(e){var n=Object.assign({},l);if(n.ops=[],void 0!==e.ops&&null!==e.ops){var o,r=a(e.ops);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.ops.push(t.ProofOp.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var f=function(){if("undefined"!==typeof f)return f;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),p=f.atob||function(e){return f.Buffer.from(e,"base64").toString("binary")};function b(e){for(var t=p(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.block&&t.BlockParams.encode(e.block,n.uint32(10).fork()).ldelim(),void 0!==e.evidence&&t.EvidenceParams.encode(e.evidence,n.uint32(18).fork()).ldelim(),void 0!==e.validator&&t.ValidatorParams.encode(e.validator,n.uint32(26).fork()).ldelim(),void 0!==e.version&&t.VersionParams.encode(e.version,n.uint32(34).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},c);a.pos>>3){case 1:r.block=t.BlockParams.decode(a,a.uint32());break;case 2:r.evidence=t.EvidenceParams.decode(a,a.uint32());break;case 3:r.validator=t.ValidatorParams.decode(a,a.uint32());break;case 4:r.version=t.VersionParams.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},c);return void 0!==e.block&&null!==e.block?n.block=t.BlockParams.fromJSON(e.block):n.block=void 0,void 0!==e.evidence&&null!==e.evidence?n.evidence=t.EvidenceParams.fromJSON(e.evidence):n.evidence=void 0,void 0!==e.validator&&null!==e.validator?n.validator=t.ValidatorParams.fromJSON(e.validator):n.validator=void 0,void 0!==e.version&&null!==e.version?n.version=t.VersionParams.fromJSON(e.version):n.version=void 0,n},toJSON:function(e){var n={};return void 0!==e.block&&(n.block=e.block?t.BlockParams.toJSON(e.block):void 0),void 0!==e.evidence&&(n.evidence=e.evidence?t.EvidenceParams.toJSON(e.evidence):void 0),void 0!==e.validator&&(n.validator=e.validator?t.ValidatorParams.toJSON(e.validator):void 0),void 0!==e.version&&(n.version=e.version?t.VersionParams.toJSON(e.version):void 0),n},fromPartial:function(e){var n=Object.assign({},c);return void 0!==e.block&&null!==e.block?n.block=t.BlockParams.fromPartial(e.block):n.block=void 0,void 0!==e.evidence&&null!==e.evidence?n.evidence=t.EvidenceParams.fromPartial(e.evidence):n.evidence=void 0,void 0!==e.validator&&null!==e.validator?n.validator=t.ValidatorParams.fromPartial(e.validator):n.validator=void 0,void 0!==e.version&&null!==e.version?n.version=t.VersionParams.fromPartial(e.version):n.version=void 0,n}};var u={maxBytes:r.default.ZERO,maxGas:r.default.ZERO,timeIotaMs:r.default.ZERO};t.BlockParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.maxBytes.isZero()||t.uint32(8).int64(e.maxBytes),e.maxGas.isZero()||t.uint32(16).int64(e.maxGas),e.timeIotaMs.isZero()||t.uint32(24).int64(e.timeIotaMs),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.maxBytes=n.int64();break;case 2:o.maxGas=n.int64();break;case 3:o.timeIotaMs=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=r.default.fromString(e.maxBytes):t.maxBytes=r.default.ZERO,void 0!==e.maxGas&&null!==e.maxGas?t.maxGas=r.default.fromString(e.maxGas):t.maxGas=r.default.ZERO,void 0!==e.timeIotaMs&&null!==e.timeIotaMs?t.timeIotaMs=r.default.fromString(e.timeIotaMs):t.timeIotaMs=r.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||r.default.ZERO).toString()),void 0!==e.maxGas&&(t.maxGas=(e.maxGas||r.default.ZERO).toString()),void 0!==e.timeIotaMs&&(t.timeIotaMs=(e.timeIotaMs||r.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=e.maxBytes:t.maxBytes=r.default.ZERO,void 0!==e.maxGas&&null!==e.maxGas?t.maxGas=e.maxGas:t.maxGas=r.default.ZERO,void 0!==e.timeIotaMs&&null!==e.timeIotaMs?t.timeIotaMs=e.timeIotaMs:t.timeIotaMs=r.default.ZERO,t}};var d={maxAgeNumBlocks:r.default.ZERO,maxBytes:r.default.ZERO};t.EvidenceParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.maxAgeNumBlocks.isZero()||t.uint32(8).int64(e.maxAgeNumBlocks),void 0!==e.maxAgeDuration&&s.Duration.encode(e.maxAgeDuration,t.uint32(18).fork()).ldelim(),e.maxBytes.isZero()||t.uint32(24).int64(e.maxBytes),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.maxAgeNumBlocks=n.int64();break;case 2:o.maxAgeDuration=s.Duration.decode(n,n.uint32());break;case 3:o.maxBytes=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.maxAgeNumBlocks&&null!==e.maxAgeNumBlocks?t.maxAgeNumBlocks=r.default.fromString(e.maxAgeNumBlocks):t.maxAgeNumBlocks=r.default.ZERO,void 0!==e.maxAgeDuration&&null!==e.maxAgeDuration?t.maxAgeDuration=s.Duration.fromJSON(e.maxAgeDuration):t.maxAgeDuration=void 0,void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=r.default.fromString(e.maxBytes):t.maxBytes=r.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.maxAgeNumBlocks&&(t.maxAgeNumBlocks=(e.maxAgeNumBlocks||r.default.ZERO).toString()),void 0!==e.maxAgeDuration&&(t.maxAgeDuration=e.maxAgeDuration?s.Duration.toJSON(e.maxAgeDuration):void 0),void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||r.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.maxAgeNumBlocks&&null!==e.maxAgeNumBlocks?t.maxAgeNumBlocks=e.maxAgeNumBlocks:t.maxAgeNumBlocks=r.default.ZERO,void 0!==e.maxAgeDuration&&null!==e.maxAgeDuration?t.maxAgeDuration=s.Duration.fromPartial(e.maxAgeDuration):t.maxAgeDuration=void 0,void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=e.maxBytes:t.maxBytes=r.default.ZERO,t}};var l={pubKeyTypes:""};t.ValidatorParams={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.pubKeyTypes);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).string(r)}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);for(o.pubKeyTypes=[];n.pos>>3===1)o.pubKeyTypes.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},l);if(t.pubKeyTypes=[],void 0!==e.pubKeyTypes&&null!==e.pubKeyTypes){var n,o=a(e.pubKeyTypes);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.pubKeyTypes.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.pubKeyTypes?t.pubKeyTypes=e.pubKeyTypes.map((function(e){return e})):t.pubKeyTypes=[],t},fromPartial:function(e){var t=Object.assign({},l);if(t.pubKeyTypes=[],void 0!==e.pubKeyTypes&&null!==e.pubKeyTypes){var n,o=a(e.pubKeyTypes);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.pubKeyTypes.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var f={appVersion:r.default.UZERO};t.VersionParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.appVersion.isZero()||t.uint32(8).uint64(e.appVersion),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3===1)o.appVersion=n.uint64();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.appVersion&&null!==e.appVersion?t.appVersion=r.default.fromString(e.appVersion):t.appVersion=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.appVersion&&(t.appVersion=(e.appVersion||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.appVersion&&null!==e.appVersion?t.appVersion=e.appVersion:t.appVersion=r.default.UZERO,t}};var p={blockMaxBytes:r.default.ZERO,blockMaxGas:r.default.ZERO};t.HashedParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.blockMaxBytes.isZero()||t.uint32(8).int64(e.blockMaxBytes),e.blockMaxGas.isZero()||t.uint32(16).int64(e.blockMaxGas),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos>>3){case 1:o.blockMaxBytes=n.int64();break;case 2:o.blockMaxGas=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return void 0!==e.blockMaxBytes&&null!==e.blockMaxBytes?t.blockMaxBytes=r.default.fromString(e.blockMaxBytes):t.blockMaxBytes=r.default.ZERO,void 0!==e.blockMaxGas&&null!==e.blockMaxGas?t.blockMaxGas=r.default.fromString(e.blockMaxGas):t.blockMaxGas=r.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.blockMaxBytes&&(t.blockMaxBytes=(e.blockMaxBytes||r.default.ZERO).toString()),void 0!==e.blockMaxGas&&(t.blockMaxGas=(e.blockMaxGas||r.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.blockMaxBytes&&null!==e.blockMaxBytes?t.blockMaxBytes=e.blockMaxBytes:t.blockMaxBytes=r.default.ZERO,void 0!==e.blockMaxGas&&null!==e.blockMaxGas?t.blockMaxGas=e.blockMaxGas:t.blockMaxGas=r.default.ZERO,t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},96322:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TxProof=t.BlockMeta=t.LightBlock=t.SignedHeader=t.Proposal=t.CommitSig=t.Commit=t.Vote=t.Data=t.Header=t.BlockID=t.Part=t.PartSetHeader=t.signedMsgTypeToJSON=t.signedMsgTypeFromJSON=t.SignedMsgType=t.blockIDFlagToJSON=t.blockIDFlagFromJSON=t.BlockIDFlag=t.protobufPackage=void 0;var r,i,s=o(n(29600)),c=o(n(80121)),u=n(51340),d=n(35240),l=n(33579),f=n(22079);function p(e){switch(e){case 0:case"BLOCK_ID_FLAG_UNKNOWN":return r.BLOCK_ID_FLAG_UNKNOWN;case 1:case"BLOCK_ID_FLAG_ABSENT":return r.BLOCK_ID_FLAG_ABSENT;case 2:case"BLOCK_ID_FLAG_COMMIT":return r.BLOCK_ID_FLAG_COMMIT;case 3:case"BLOCK_ID_FLAG_NIL":return r.BLOCK_ID_FLAG_NIL;default:return r.UNRECOGNIZED}}function b(e){switch(e){case r.BLOCK_ID_FLAG_UNKNOWN:return"BLOCK_ID_FLAG_UNKNOWN";case r.BLOCK_ID_FLAG_ABSENT:return"BLOCK_ID_FLAG_ABSENT";case r.BLOCK_ID_FLAG_COMMIT:return"BLOCK_ID_FLAG_COMMIT";case r.BLOCK_ID_FLAG_NIL:return"BLOCK_ID_FLAG_NIL";default:return"UNKNOWN"}}function m(e){switch(e){case 0:case"SIGNED_MSG_TYPE_UNKNOWN":return i.SIGNED_MSG_TYPE_UNKNOWN;case 1:case"SIGNED_MSG_TYPE_PREVOTE":return i.SIGNED_MSG_TYPE_PREVOTE;case 2:case"SIGNED_MSG_TYPE_PRECOMMIT":return i.SIGNED_MSG_TYPE_PRECOMMIT;case 32:case"SIGNED_MSG_TYPE_PROPOSAL":return i.SIGNED_MSG_TYPE_PROPOSAL;default:return i.UNRECOGNIZED}}function h(e){switch(e){case i.SIGNED_MSG_TYPE_UNKNOWN:return"SIGNED_MSG_TYPE_UNKNOWN";case i.SIGNED_MSG_TYPE_PREVOTE:return"SIGNED_MSG_TYPE_PREVOTE";case i.SIGNED_MSG_TYPE_PRECOMMIT:return"SIGNED_MSG_TYPE_PRECOMMIT";case i.SIGNED_MSG_TYPE_PROPOSAL:return"SIGNED_MSG_TYPE_PROPOSAL";default:return"UNKNOWN"}}t.protobufPackage="tendermint.types",function(e){e[e.BLOCK_ID_FLAG_UNKNOWN=0]="BLOCK_ID_FLAG_UNKNOWN",e[e.BLOCK_ID_FLAG_ABSENT=1]="BLOCK_ID_FLAG_ABSENT",e[e.BLOCK_ID_FLAG_COMMIT=2]="BLOCK_ID_FLAG_COMMIT",e[e.BLOCK_ID_FLAG_NIL=3]="BLOCK_ID_FLAG_NIL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(r=t.BlockIDFlag||(t.BlockIDFlag={})),t.blockIDFlagFromJSON=p,t.blockIDFlagToJSON=b,function(e){e[e.SIGNED_MSG_TYPE_UNKNOWN=0]="SIGNED_MSG_TYPE_UNKNOWN",e[e.SIGNED_MSG_TYPE_PREVOTE=1]="SIGNED_MSG_TYPE_PREVOTE",e[e.SIGNED_MSG_TYPE_PRECOMMIT=2]="SIGNED_MSG_TYPE_PRECOMMIT",e[e.SIGNED_MSG_TYPE_PROPOSAL=32]="SIGNED_MSG_TYPE_PROPOSAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.SignedMsgType||(t.SignedMsgType={})),t.signedMsgTypeFromJSON=m,t.signedMsgTypeToJSON=h;var g={total:0};t.PartSetHeader={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.total&&t.uint32(8).uint32(e.total),0!==e.hash.length&&t.uint32(18).bytes(e.hash),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);for(o.hash=new Uint8Array;n.pos>>3){case 1:o.total=n.uint32();break;case 2:o.hash=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},g);return t.hash=new Uint8Array,void 0!==e.total&&null!==e.total?t.total=Number(e.total):t.total=0,void 0!==e.hash&&null!==e.hash&&(t.hash=U(e.hash)),t},toJSON:function(e){var t={};return void 0!==e.total&&(t.total=e.total),void 0!==e.hash&&(t.hash=B(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.total&&null!==e.total?t.total=e.total:t.total=0,void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash=new Uint8Array,t}};var y={index:0};t.Part={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.index&&t.uint32(8).uint32(e.index),0!==e.bytes.length&&t.uint32(18).bytes(e.bytes),void 0!==e.proof&&u.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.bytes=new Uint8Array;n.pos>>3){case 1:o.index=n.uint32();break;case 2:o.bytes=n.bytes();break;case 3:o.proof=u.Proof.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return t.bytes=new Uint8Array,void 0!==e.index&&null!==e.index?t.index=Number(e.index):t.index=0,void 0!==e.bytes&&null!==e.bytes&&(t.bytes=U(e.bytes)),void 0!==e.proof&&null!==e.proof?t.proof=u.Proof.fromJSON(e.proof):t.proof=void 0,t},toJSON:function(e){var t={};return void 0!==e.index&&(t.index=e.index),void 0!==e.bytes&&(t.bytes=B(void 0!==e.bytes?e.bytes:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?u.Proof.toJSON(e.proof):void 0),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.index&&null!==e.index?t.index=e.index:t.index=0,void 0!==e.bytes&&null!==e.bytes?t.bytes=e.bytes:t.bytes=new Uint8Array,void 0!==e.proof&&null!==e.proof?t.proof=u.Proof.fromPartial(e.proof):t.proof=void 0,t}};var v={};t.BlockID={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.hash.length&&n.uint32(10).bytes(e.hash),void 0!==e.partSetHeader&&t.PartSetHeader.encode(e.partSetHeader,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},v);for(r.hash=new Uint8Array;a.pos>>3){case 1:r.hash=a.bytes();break;case 2:r.partSetHeader=t.PartSetHeader.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},v);return n.hash=new Uint8Array,void 0!==e.hash&&null!==e.hash&&(n.hash=U(e.hash)),void 0!==e.partSetHeader&&null!==e.partSetHeader?n.partSetHeader=t.PartSetHeader.fromJSON(e.partSetHeader):n.partSetHeader=void 0,n},toJSON:function(e){var n={};return void 0!==e.hash&&(n.hash=B(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.partSetHeader&&(n.partSetHeader=e.partSetHeader?t.PartSetHeader.toJSON(e.partSetHeader):void 0),n},fromPartial:function(e){var n=Object.assign({},v);return void 0!==e.hash&&null!==e.hash?n.hash=e.hash:n.hash=new Uint8Array,void 0!==e.partSetHeader&&null!==e.partSetHeader?n.partSetHeader=t.PartSetHeader.fromPartial(e.partSetHeader):n.partSetHeader=void 0,n}};var w={chainId:"",height:s.default.ZERO};t.Header={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.version&&d.Consensus.encode(e.version,n.uint32(10).fork()).ldelim(),""!==e.chainId&&n.uint32(18).string(e.chainId),e.height.isZero()||n.uint32(24).int64(e.height),void 0!==e.time&&f.Timestamp.encode(D(e.time),n.uint32(34).fork()).ldelim(),void 0!==e.lastBlockId&&t.BlockID.encode(e.lastBlockId,n.uint32(42).fork()).ldelim(),0!==e.lastCommitHash.length&&n.uint32(50).bytes(e.lastCommitHash),0!==e.dataHash.length&&n.uint32(58).bytes(e.dataHash),0!==e.validatorsHash.length&&n.uint32(66).bytes(e.validatorsHash),0!==e.nextValidatorsHash.length&&n.uint32(74).bytes(e.nextValidatorsHash),0!==e.consensusHash.length&&n.uint32(82).bytes(e.consensusHash),0!==e.appHash.length&&n.uint32(90).bytes(e.appHash),0!==e.lastResultsHash.length&&n.uint32(98).bytes(e.lastResultsHash),0!==e.evidenceHash.length&&n.uint32(106).bytes(e.evidenceHash),0!==e.proposerAddress.length&&n.uint32(114).bytes(e.proposerAddress),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},w);for(r.lastCommitHash=new Uint8Array,r.dataHash=new Uint8Array,r.validatorsHash=new Uint8Array,r.nextValidatorsHash=new Uint8Array,r.consensusHash=new Uint8Array,r.appHash=new Uint8Array,r.lastResultsHash=new Uint8Array,r.evidenceHash=new Uint8Array,r.proposerAddress=new Uint8Array;a.pos>>3){case 1:r.version=d.Consensus.decode(a,a.uint32());break;case 2:r.chainId=a.string();break;case 3:r.height=a.int64();break;case 4:r.time=N(f.Timestamp.decode(a,a.uint32()));break;case 5:r.lastBlockId=t.BlockID.decode(a,a.uint32());break;case 6:r.lastCommitHash=a.bytes();break;case 7:r.dataHash=a.bytes();break;case 8:r.validatorsHash=a.bytes();break;case 9:r.nextValidatorsHash=a.bytes();break;case 10:r.consensusHash=a.bytes();break;case 11:r.appHash=a.bytes();break;case 12:r.lastResultsHash=a.bytes();break;case 13:r.evidenceHash=a.bytes();break;case 14:r.proposerAddress=a.bytes();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},w);return n.lastCommitHash=new Uint8Array,n.dataHash=new Uint8Array,n.validatorsHash=new Uint8Array,n.nextValidatorsHash=new Uint8Array,n.consensusHash=new Uint8Array,n.appHash=new Uint8Array,n.lastResultsHash=new Uint8Array,n.evidenceHash=new Uint8Array,n.proposerAddress=new Uint8Array,void 0!==e.version&&null!==e.version?n.version=d.Consensus.fromJSON(e.version):n.version=void 0,void 0!==e.chainId&&null!==e.chainId?n.chainId=String(e.chainId):n.chainId="",void 0!==e.height&&null!==e.height?n.height=s.default.fromString(e.height):n.height=s.default.ZERO,void 0!==e.time&&null!==e.time?n.time=O(e.time):n.time=void 0,void 0!==e.lastBlockId&&null!==e.lastBlockId?n.lastBlockId=t.BlockID.fromJSON(e.lastBlockId):n.lastBlockId=void 0,void 0!==e.lastCommitHash&&null!==e.lastCommitHash&&(n.lastCommitHash=U(e.lastCommitHash)),void 0!==e.dataHash&&null!==e.dataHash&&(n.dataHash=U(e.dataHash)),void 0!==e.validatorsHash&&null!==e.validatorsHash&&(n.validatorsHash=U(e.validatorsHash)),void 0!==e.nextValidatorsHash&&null!==e.nextValidatorsHash&&(n.nextValidatorsHash=U(e.nextValidatorsHash)),void 0!==e.consensusHash&&null!==e.consensusHash&&(n.consensusHash=U(e.consensusHash)),void 0!==e.appHash&&null!==e.appHash&&(n.appHash=U(e.appHash)),void 0!==e.lastResultsHash&&null!==e.lastResultsHash&&(n.lastResultsHash=U(e.lastResultsHash)),void 0!==e.evidenceHash&&null!==e.evidenceHash&&(n.evidenceHash=U(e.evidenceHash)),void 0!==e.proposerAddress&&null!==e.proposerAddress&&(n.proposerAddress=U(e.proposerAddress)),n},toJSON:function(e){var n={};return void 0!==e.version&&(n.version=e.version?d.Consensus.toJSON(e.version):void 0),void 0!==e.chainId&&(n.chainId=e.chainId),void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.time&&(n.time=e.time.toISOString()),void 0!==e.lastBlockId&&(n.lastBlockId=e.lastBlockId?t.BlockID.toJSON(e.lastBlockId):void 0),void 0!==e.lastCommitHash&&(n.lastCommitHash=B(void 0!==e.lastCommitHash?e.lastCommitHash:new Uint8Array)),void 0!==e.dataHash&&(n.dataHash=B(void 0!==e.dataHash?e.dataHash:new Uint8Array)),void 0!==e.validatorsHash&&(n.validatorsHash=B(void 0!==e.validatorsHash?e.validatorsHash:new Uint8Array)),void 0!==e.nextValidatorsHash&&(n.nextValidatorsHash=B(void 0!==e.nextValidatorsHash?e.nextValidatorsHash:new Uint8Array)),void 0!==e.consensusHash&&(n.consensusHash=B(void 0!==e.consensusHash?e.consensusHash:new Uint8Array)),void 0!==e.appHash&&(n.appHash=B(void 0!==e.appHash?e.appHash:new Uint8Array)),void 0!==e.lastResultsHash&&(n.lastResultsHash=B(void 0!==e.lastResultsHash?e.lastResultsHash:new Uint8Array)),void 0!==e.evidenceHash&&(n.evidenceHash=B(void 0!==e.evidenceHash?e.evidenceHash:new Uint8Array)),void 0!==e.proposerAddress&&(n.proposerAddress=B(void 0!==e.proposerAddress?e.proposerAddress:new Uint8Array)),n},fromPartial:function(e){var n=Object.assign({},w);return void 0!==e.version&&null!==e.version?n.version=d.Consensus.fromPartial(e.version):n.version=void 0,void 0!==e.chainId&&null!==e.chainId?n.chainId=e.chainId:n.chainId="",void 0!==e.height&&null!==e.height?n.height=e.height:n.height=s.default.ZERO,void 0!==e.time&&null!==e.time?n.time=e.time:n.time=void 0,void 0!==e.lastBlockId&&null!==e.lastBlockId?n.lastBlockId=t.BlockID.fromPartial(e.lastBlockId):n.lastBlockId=void 0,void 0!==e.lastCommitHash&&null!==e.lastCommitHash?n.lastCommitHash=e.lastCommitHash:n.lastCommitHash=new Uint8Array,void 0!==e.dataHash&&null!==e.dataHash?n.dataHash=e.dataHash:n.dataHash=new Uint8Array,void 0!==e.validatorsHash&&null!==e.validatorsHash?n.validatorsHash=e.validatorsHash:n.validatorsHash=new Uint8Array,void 0!==e.nextValidatorsHash&&null!==e.nextValidatorsHash?n.nextValidatorsHash=e.nextValidatorsHash:n.nextValidatorsHash=new Uint8Array,void 0!==e.consensusHash&&null!==e.consensusHash?n.consensusHash=e.consensusHash:n.consensusHash=new Uint8Array,void 0!==e.appHash&&null!==e.appHash?n.appHash=e.appHash:n.appHash=new Uint8Array,void 0!==e.lastResultsHash&&null!==e.lastResultsHash?n.lastResultsHash=e.lastResultsHash:n.lastResultsHash=new Uint8Array,void 0!==e.evidenceHash&&null!==e.evidenceHash?n.evidenceHash=e.evidenceHash:n.evidenceHash=new Uint8Array,void 0!==e.proposerAddress&&null!==e.proposerAddress?n.proposerAddress=e.proposerAddress:n.proposerAddress=new Uint8Array,n}};var k={};t.Data={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create(),o=a(e.txs);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).bytes(r)}}catch(i){o.e(i)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);for(o.txs=[];n.pos>>3===1)o.txs.push(n.bytes());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},k);if(t.txs=[],void 0!==e.txs&&null!==e.txs){var n,o=a(e.txs);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.txs.push(U(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.txs?t.txs=e.txs.map((function(e){return B(void 0!==e?e:new Uint8Array)})):t.txs=[],t},fromPartial:function(e){var t=Object.assign({},k);if(t.txs=[],void 0!==e.txs&&null!==e.txs){var n,o=a(e.txs);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.txs.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var A={type:0,height:s.default.ZERO,round:0,validatorIndex:0};t.Vote={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.type&&n.uint32(8).int32(e.type),e.height.isZero()||n.uint32(16).int64(e.height),0!==e.round&&n.uint32(24).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(34).fork()).ldelim(),void 0!==e.timestamp&&f.Timestamp.encode(D(e.timestamp),n.uint32(42).fork()).ldelim(),0!==e.validatorAddress.length&&n.uint32(50).bytes(e.validatorAddress),0!==e.validatorIndex&&n.uint32(56).int32(e.validatorIndex),0!==e.signature.length&&n.uint32(66).bytes(e.signature),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},A);for(r.validatorAddress=new Uint8Array,r.signature=new Uint8Array;a.pos>>3){case 1:r.type=a.int32();break;case 2:r.height=a.int64();break;case 3:r.round=a.int32();break;case 4:r.blockId=t.BlockID.decode(a,a.uint32());break;case 5:r.timestamp=N(f.Timestamp.decode(a,a.uint32()));break;case 6:r.validatorAddress=a.bytes();break;case 7:r.validatorIndex=a.int32();break;case 8:r.signature=a.bytes();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},A);return n.validatorAddress=new Uint8Array,n.signature=new Uint8Array,void 0!==e.type&&null!==e.type?n.type=m(e.type):n.type=0,void 0!==e.height&&null!==e.height?n.height=s.default.fromString(e.height):n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=Number(e.round):n.round=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromJSON(e.blockId):n.blockId=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=O(e.timestamp):n.timestamp=void 0,void 0!==e.validatorAddress&&null!==e.validatorAddress&&(n.validatorAddress=U(e.validatorAddress)),void 0!==e.validatorIndex&&null!==e.validatorIndex?n.validatorIndex=Number(e.validatorIndex):n.validatorIndex=0,void 0!==e.signature&&null!==e.signature&&(n.signature=U(e.signature)),n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=h(e.type)),void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(n.timestamp=e.timestamp.toISOString()),void 0!==e.validatorAddress&&(n.validatorAddress=B(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.validatorIndex&&(n.validatorIndex=e.validatorIndex),void 0!==e.signature&&(n.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),n},fromPartial:function(e){var n=Object.assign({},A);return void 0!==e.type&&null!==e.type?n.type=e.type:n.type=0,void 0!==e.height&&null!==e.height?n.height=e.height:n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=e.round:n.round=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromPartial(e.blockId):n.blockId=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=e.timestamp:n.timestamp=void 0,void 0!==e.validatorAddress&&null!==e.validatorAddress?n.validatorAddress=e.validatorAddress:n.validatorAddress=new Uint8Array,void 0!==e.validatorIndex&&null!==e.validatorIndex?n.validatorIndex=e.validatorIndex:n.validatorIndex=0,void 0!==e.signature&&null!==e.signature?n.signature=e.signature:n.signature=new Uint8Array,n}};var x={height:s.default.ZERO,round:0};t.Commit={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();e.height.isZero()||n.uint32(8).int64(e.height),0!==e.round&&n.uint32(16).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(26).fork()).ldelim();var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.CommitSig.encode(i,n.uint32(34).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},x);for(r.signatures=[];a.pos>>3){case 1:r.height=a.int64();break;case 2:r.round=a.int32();break;case 3:r.blockId=t.BlockID.decode(a,a.uint32());break;case 4:r.signatures.push(t.CommitSig.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},x);if(n.signatures=[],void 0!==e.height&&null!==e.height?n.height=s.default.fromString(e.height):n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=Number(e.round):n.round=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromJSON(e.blockId):n.blockId=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.CommitSig.fromJSON(i))}}catch(c){r.e(c)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return e?t.CommitSig.toJSON(e):void 0})):n.signatures=[],n},fromPartial:function(e){var n=Object.assign({},x);if(n.signatures=[],void 0!==e.height&&null!==e.height?n.height=e.height:n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=e.round:n.round=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromPartial(e.blockId):n.blockId=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.CommitSig.fromPartial(i))}}catch(c){r.e(c)}finally{r.f()}}return n}};var I={blockIdFlag:0};t.CommitSig={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.blockIdFlag&&t.uint32(8).int32(e.blockIdFlag),0!==e.validatorAddress.length&&t.uint32(18).bytes(e.validatorAddress),void 0!==e.timestamp&&f.Timestamp.encode(D(e.timestamp),t.uint32(26).fork()).ldelim(),0!==e.signature.length&&t.uint32(34).bytes(e.signature),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},I);for(o.validatorAddress=new Uint8Array,o.signature=new Uint8Array;n.pos>>3){case 1:o.blockIdFlag=n.int32();break;case 2:o.validatorAddress=n.bytes();break;case 3:o.timestamp=N(f.Timestamp.decode(n,n.uint32()));break;case 4:o.signature=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},I);return t.validatorAddress=new Uint8Array,t.signature=new Uint8Array,void 0!==e.blockIdFlag&&null!==e.blockIdFlag?t.blockIdFlag=p(e.blockIdFlag):t.blockIdFlag=0,void 0!==e.validatorAddress&&null!==e.validatorAddress&&(t.validatorAddress=U(e.validatorAddress)),void 0!==e.timestamp&&null!==e.timestamp?t.timestamp=O(e.timestamp):t.timestamp=void 0,void 0!==e.signature&&null!==e.signature&&(t.signature=U(e.signature)),t},toJSON:function(e){var t={};return void 0!==e.blockIdFlag&&(t.blockIdFlag=b(e.blockIdFlag)),void 0!==e.validatorAddress&&(t.validatorAddress=B(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.timestamp&&(t.timestamp=e.timestamp.toISOString()),void 0!==e.signature&&(t.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},I);return void 0!==e.blockIdFlag&&null!==e.blockIdFlag?t.blockIdFlag=e.blockIdFlag:t.blockIdFlag=0,void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress=new Uint8Array,void 0!==e.timestamp&&null!==e.timestamp?t.timestamp=e.timestamp:t.timestamp=void 0,void 0!==e.signature&&null!==e.signature?t.signature=e.signature:t.signature=new Uint8Array,t}};var T={type:0,height:s.default.ZERO,round:0,polRound:0};t.Proposal={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.type&&n.uint32(8).int32(e.type),e.height.isZero()||n.uint32(16).int64(e.height),0!==e.round&&n.uint32(24).int32(e.round),0!==e.polRound&&n.uint32(32).int32(e.polRound),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(42).fork()).ldelim(),void 0!==e.timestamp&&f.Timestamp.encode(D(e.timestamp),n.uint32(50).fork()).ldelim(),0!==e.signature.length&&n.uint32(58).bytes(e.signature),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},T);for(r.signature=new Uint8Array;a.pos>>3){case 1:r.type=a.int32();break;case 2:r.height=a.int64();break;case 3:r.round=a.int32();break;case 4:r.polRound=a.int32();break;case 5:r.blockId=t.BlockID.decode(a,a.uint32());break;case 6:r.timestamp=N(f.Timestamp.decode(a,a.uint32()));break;case 7:r.signature=a.bytes();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},T);return n.signature=new Uint8Array,void 0!==e.type&&null!==e.type?n.type=m(e.type):n.type=0,void 0!==e.height&&null!==e.height?n.height=s.default.fromString(e.height):n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=Number(e.round):n.round=0,void 0!==e.polRound&&null!==e.polRound?n.polRound=Number(e.polRound):n.polRound=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromJSON(e.blockId):n.blockId=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=O(e.timestamp):n.timestamp=void 0,void 0!==e.signature&&null!==e.signature&&(n.signature=U(e.signature)),n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=h(e.type)),void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.polRound&&(n.polRound=e.polRound),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(n.timestamp=e.timestamp.toISOString()),void 0!==e.signature&&(n.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),n},fromPartial:function(e){var n=Object.assign({},T);return void 0!==e.type&&null!==e.type?n.type=e.type:n.type=0,void 0!==e.height&&null!==e.height?n.height=e.height:n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=e.round:n.round=0,void 0!==e.polRound&&null!==e.polRound?n.polRound=e.polRound:n.polRound=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromPartial(e.blockId):n.blockId=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=e.timestamp:n.timestamp=void 0,void 0!==e.signature&&null!==e.signature?n.signature=e.signature:n.signature=new Uint8Array,n}};var S={};t.SignedHeader={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.header&&t.Header.encode(e.header,n.uint32(10).fork()).ldelim(),void 0!==e.commit&&t.Commit.encode(e.commit,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},S);a.pos>>3){case 1:r.header=t.Header.decode(a,a.uint32());break;case 2:r.commit=t.Commit.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},S);return void 0!==e.header&&null!==e.header?n.header=t.Header.fromJSON(e.header):n.header=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.Commit.fromJSON(e.commit):n.commit=void 0,n},toJSON:function(e){var n={};return void 0!==e.header&&(n.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.commit&&(n.commit=e.commit?t.Commit.toJSON(e.commit):void 0),n},fromPartial:function(e){var n=Object.assign({},S);return void 0!==e.header&&null!==e.header?n.header=t.Header.fromPartial(e.header):n.header=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.Commit.fromPartial(e.commit):n.commit=void 0,n}};var C={};t.LightBlock={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.signedHeader&&t.SignedHeader.encode(e.signedHeader,n.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&l.ValidatorSet.encode(e.validatorSet,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},C);a.pos>>3){case 1:r.signedHeader=t.SignedHeader.decode(a,a.uint32());break;case 2:r.validatorSet=l.ValidatorSet.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},C);return void 0!==e.signedHeader&&null!==e.signedHeader?n.signedHeader=t.SignedHeader.fromJSON(e.signedHeader):n.signedHeader=void 0,void 0!==e.validatorSet&&null!==e.validatorSet?n.validatorSet=l.ValidatorSet.fromJSON(e.validatorSet):n.validatorSet=void 0,n},toJSON:function(e){var n={};return void 0!==e.signedHeader&&(n.signedHeader=e.signedHeader?t.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(n.validatorSet=e.validatorSet?l.ValidatorSet.toJSON(e.validatorSet):void 0),n},fromPartial:function(e){var n=Object.assign({},C);return void 0!==e.signedHeader&&null!==e.signedHeader?n.signedHeader=t.SignedHeader.fromPartial(e.signedHeader):n.signedHeader=void 0,void 0!==e.validatorSet&&null!==e.validatorSet?n.validatorSet=l.ValidatorSet.fromPartial(e.validatorSet):n.validatorSet=void 0,n}};var E={blockSize:s.default.ZERO,numTxs:s.default.ZERO};t.BlockMeta={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(10).fork()).ldelim(),e.blockSize.isZero()||n.uint32(16).int64(e.blockSize),void 0!==e.header&&t.Header.encode(e.header,n.uint32(26).fork()).ldelim(),e.numTxs.isZero()||n.uint32(32).int64(e.numTxs),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},E);a.pos>>3){case 1:r.blockId=t.BlockID.decode(a,a.uint32());break;case 2:r.blockSize=a.int64();break;case 3:r.header=t.Header.decode(a,a.uint32());break;case 4:r.numTxs=a.int64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},E);return void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromJSON(e.blockId):n.blockId=void 0,void 0!==e.blockSize&&null!==e.blockSize?n.blockSize=s.default.fromString(e.blockSize):n.blockSize=s.default.ZERO,void 0!==e.header&&null!==e.header?n.header=t.Header.fromJSON(e.header):n.header=void 0,void 0!==e.numTxs&&null!==e.numTxs?n.numTxs=s.default.fromString(e.numTxs):n.numTxs=s.default.ZERO,n},toJSON:function(e){var n={};return void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.blockSize&&(n.blockSize=(e.blockSize||s.default.ZERO).toString()),void 0!==e.header&&(n.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.numTxs&&(n.numTxs=(e.numTxs||s.default.ZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},E);return void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromPartial(e.blockId):n.blockId=void 0,void 0!==e.blockSize&&null!==e.blockSize?n.blockSize=e.blockSize:n.blockSize=s.default.ZERO,void 0!==e.header&&null!==e.header?n.header=t.Header.fromPartial(e.header):n.header=void 0,void 0!==e.numTxs&&null!==e.numTxs?n.numTxs=e.numTxs:n.numTxs=s.default.ZERO,n}};var R={};t.TxProof={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.rootHash.length&&t.uint32(10).bytes(e.rootHash),0!==e.data.length&&t.uint32(18).bytes(e.data),void 0!==e.proof&&u.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},R);for(o.rootHash=new Uint8Array,o.data=new Uint8Array;n.pos>>3){case 1:o.rootHash=n.bytes();break;case 2:o.data=n.bytes();break;case 3:o.proof=u.Proof.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},R);return t.rootHash=new Uint8Array,t.data=new Uint8Array,void 0!==e.rootHash&&null!==e.rootHash&&(t.rootHash=U(e.rootHash)),void 0!==e.data&&null!==e.data&&(t.data=U(e.data)),void 0!==e.proof&&null!==e.proof?t.proof=u.Proof.fromJSON(e.proof):t.proof=void 0,t},toJSON:function(e){var t={};return void 0!==e.rootHash&&(t.rootHash=B(void 0!==e.rootHash?e.rootHash:new Uint8Array)),void 0!==e.data&&(t.data=B(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?u.Proof.toJSON(e.proof):void 0),t},fromPartial:function(e){var t=Object.assign({},R);return void 0!==e.rootHash&&null!==e.rootHash?t.rootHash=e.rootHash:t.rootHash=new Uint8Array,void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,void 0!==e.proof&&null!==e.proof?t.proof=u.Proof.fromPartial(e.proof):t.proof=void 0,t}};var M=function(){if("undefined"!==typeof M)return M;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),P=M.atob||function(e){return M.Buffer.from(e,"base64").toString("binary")};function U(e){for(var t=P(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.validators);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.Validator.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return void 0!==e.proposer&&t.Validator.encode(e.proposer,o.uint32(18).fork()).ldelim(),e.totalVotingPower.isZero()||o.uint32(24).int64(e.totalVotingPower),o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},c);for(r.validators=[];a.pos>>3){case 1:r.validators.push(t.Validator.decode(a,a.uint32()));break;case 2:r.proposer=t.Validator.decode(a,a.uint32());break;case 3:r.totalVotingPower=a.int64();break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},c);if(n.validators=[],void 0!==e.validators&&null!==e.validators){var o,i=a(e.validators);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.validators.push(t.Validator.fromJSON(s))}}catch(u){i.e(u)}finally{i.f()}}return void 0!==e.proposer&&null!==e.proposer?n.proposer=t.Validator.fromJSON(e.proposer):n.proposer=void 0,void 0!==e.totalVotingPower&&null!==e.totalVotingPower?n.totalVotingPower=r.default.fromString(e.totalVotingPower):n.totalVotingPower=r.default.ZERO,n},toJSON:function(e){var n={};return e.validators?n.validators=e.validators.map((function(e){return e?t.Validator.toJSON(e):void 0})):n.validators=[],void 0!==e.proposer&&(n.proposer=e.proposer?t.Validator.toJSON(e.proposer):void 0),void 0!==e.totalVotingPower&&(n.totalVotingPower=(e.totalVotingPower||r.default.ZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},c);if(n.validators=[],void 0!==e.validators&&null!==e.validators){var o,i=a(e.validators);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.validators.push(t.Validator.fromPartial(s))}}catch(u){i.e(u)}finally{i.f()}}return void 0!==e.proposer&&null!==e.proposer?n.proposer=t.Validator.fromPartial(e.proposer):n.proposer=void 0,void 0!==e.totalVotingPower&&null!==e.totalVotingPower?n.totalVotingPower=e.totalVotingPower:n.totalVotingPower=r.default.ZERO,n}};var u={votingPower:r.default.ZERO,proposerPriority:r.default.ZERO};t.Validator={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.address.length&&t.uint32(10).bytes(e.address),void 0!==e.pubKey&&s.PublicKey.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.votingPower.isZero()||t.uint32(24).int64(e.votingPower),e.proposerPriority.isZero()||t.uint32(32).int64(e.proposerPriority),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);for(o.address=new Uint8Array;n.pos>>3){case 1:o.address=n.bytes();break;case 2:o.pubKey=s.PublicKey.decode(n,n.uint32());break;case 3:o.votingPower=n.int64();break;case 4:o.proposerPriority=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return t.address=new Uint8Array,void 0!==e.address&&null!==e.address&&(t.address=function(e){for(var t=f(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.pubKey&&s.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.votingPower.isZero()||t.uint32(16).int64(e.votingPower),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.pubKey=s.PublicKey.decode(n,n.uint32());break;case 2:o.votingPower=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=s.PublicKey.fromJSON(e.pubKey):t.pubKey=void 0,void 0!==e.votingPower&&null!==e.votingPower?t.votingPower=r.default.fromString(e.votingPower):t.votingPower=r.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?s.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=(e.votingPower||r.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=s.PublicKey.fromPartial(e.pubKey):t.pubKey=void 0,void 0!==e.votingPower&&null!==e.votingPower?t.votingPower=e.votingPower:t.votingPower=r.default.ZERO,t}};var l=function(){if("undefined"!==typeof l)return l;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),f=l.atob||function(e){return l.Buffer.from(e,"base64").toString("binary")};var p=l.btoa||function(e){return l.Buffer.from(e,"binary").toString("base64")};i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},35240:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Consensus=t.App=t.protobufPackage=void 0;var o=a(n(29600)),r=a(n(80121));t.protobufPackage="tendermint.version";var i={protocol:o.default.UZERO,software:""};t.App={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return e.protocol.isZero()||t.uint32(8).uint64(e.protocol),""!==e.software&&t.uint32(18).string(e.software),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.protocol=n.uint64();break;case 2:o.software=n.string();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.protocol&&null!==e.protocol?t.protocol=o.default.fromString(e.protocol):t.protocol=o.default.UZERO,void 0!==e.software&&null!==e.software?t.software=String(e.software):t.software="",t},toJSON:function(e){var t={};return void 0!==e.protocol&&(t.protocol=(e.protocol||o.default.UZERO).toString()),void 0!==e.software&&(t.software=e.software),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.protocol&&null!==e.protocol?t.protocol=e.protocol:t.protocol=o.default.UZERO,void 0!==e.software&&null!==e.software?t.software=e.software:t.software="",t}};var s={block:o.default.UZERO,app:o.default.UZERO};t.Consensus={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return e.block.isZero()||t.uint32(8).uint64(e.block),e.app.isZero()||t.uint32(16).uint64(e.app),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);n.pos>>3){case 1:o.block=n.uint64();break;case 2:o.app=n.uint64();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},s);return void 0!==e.block&&null!==e.block?t.block=o.default.fromString(e.block):t.block=o.default.UZERO,void 0!==e.app&&null!==e.app?t.app=o.default.fromString(e.app):t.app=o.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.block&&(t.block=(e.block||o.default.UZERO).toString()),void 0!==e.app&&(t.app=(e.app||o.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.block&&null!==e.block?t.block=e.block:t.block=o.default.UZERO,void 0!==e.app&&null!==e.app?t.app=e.app:t.app=o.default.UZERO,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},97823:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgSwapSendResponse=t.MsgSwapSend=t.MsgSwapResponse=t.MsgSwap=t.protobufPackage=void 0;var i=r(n(29600)),s=r(n(80121)),c=n(5449);t.protobufPackage="terra.market.v1beta1";var u={trader:"",askDenom:""};t.MsgSwap={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.trader&&t.uint32(10).string(e.trader),void 0!==e.offerCoin&&c.Coin.encode(e.offerCoin,t.uint32(18).fork()).ldelim(),""!==e.askDenom&&t.uint32(26).string(e.askDenom),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.trader=n.string();break;case 2:o.offerCoin=c.Coin.decode(n,n.uint32());break;case 3:o.askDenom=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.trader&&null!==e.trader?t.trader=String(e.trader):t.trader="",void 0!==e.offerCoin&&null!==e.offerCoin?t.offerCoin=c.Coin.fromJSON(e.offerCoin):t.offerCoin=void 0,void 0!==e.askDenom&&null!==e.askDenom?t.askDenom=String(e.askDenom):t.askDenom="",t},toJSON:function(e){var t={};return void 0!==e.trader&&(t.trader=e.trader),void 0!==e.offerCoin&&(t.offerCoin=e.offerCoin?c.Coin.toJSON(e.offerCoin):void 0),void 0!==e.askDenom&&(t.askDenom=e.askDenom),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.trader&&null!==e.trader?t.trader=e.trader:t.trader="",void 0!==e.offerCoin&&null!==e.offerCoin?t.offerCoin=c.Coin.fromPartial(e.offerCoin):t.offerCoin=void 0,void 0!==e.askDenom&&null!==e.askDenom?t.askDenom=e.askDenom:t.askDenom="",t}};var d={};t.MsgSwapResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.swapCoin&&c.Coin.encode(e.swapCoin,t.uint32(10).fork()).ldelim(),void 0!==e.swapFee&&c.Coin.encode(e.swapFee,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.swapCoin=c.Coin.decode(n,n.uint32());break;case 2:o.swapFee=c.Coin.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.swapCoin&&null!==e.swapCoin?t.swapCoin=c.Coin.fromJSON(e.swapCoin):t.swapCoin=void 0,void 0!==e.swapFee&&null!==e.swapFee?t.swapFee=c.Coin.fromJSON(e.swapFee):t.swapFee=void 0,t},toJSON:function(e){var t={};return void 0!==e.swapCoin&&(t.swapCoin=e.swapCoin?c.Coin.toJSON(e.swapCoin):void 0),void 0!==e.swapFee&&(t.swapFee=e.swapFee?c.Coin.toJSON(e.swapFee):void 0),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.swapCoin&&null!==e.swapCoin?t.swapCoin=c.Coin.fromPartial(e.swapCoin):t.swapCoin=void 0,void 0!==e.swapFee&&null!==e.swapFee?t.swapFee=c.Coin.fromPartial(e.swapFee):t.swapFee=void 0,t}};var l={fromAddress:"",toAddress:"",askDenom:""};t.MsgSwapSend={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),void 0!==e.offerCoin&&c.Coin.encode(e.offerCoin,t.uint32(26).fork()).ldelim(),""!==e.askDenom&&t.uint32(34).string(e.askDenom),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos>>3){case 1:o.fromAddress=n.string();break;case 2:o.toAddress=n.string();break;case 3:o.offerCoin=c.Coin.decode(n,n.uint32());break;case 4:o.askDenom=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},l);return void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=String(e.fromAddress):t.fromAddress="",void 0!==e.toAddress&&null!==e.toAddress?t.toAddress=String(e.toAddress):t.toAddress="",void 0!==e.offerCoin&&null!==e.offerCoin?t.offerCoin=c.Coin.fromJSON(e.offerCoin):t.offerCoin=void 0,void 0!==e.askDenom&&null!==e.askDenom?t.askDenom=String(e.askDenom):t.askDenom="",t},toJSON:function(e){var t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),void 0!==e.offerCoin&&(t.offerCoin=e.offerCoin?c.Coin.toJSON(e.offerCoin):void 0),void 0!==e.askDenom&&(t.askDenom=e.askDenom),t},fromPartial:function(e){var t=Object.assign({},l);return void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=e.fromAddress:t.fromAddress="",void 0!==e.toAddress&&null!==e.toAddress?t.toAddress=e.toAddress:t.toAddress="",void 0!==e.offerCoin&&null!==e.offerCoin?t.offerCoin=c.Coin.fromPartial(e.offerCoin):t.offerCoin=void 0,void 0!==e.askDenom&&null!==e.askDenom?t.askDenom=e.askDenom:t.askDenom="",t}};var f={};t.MsgSwapSendResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.swapCoin&&c.Coin.encode(e.swapCoin,t.uint32(10).fork()).ldelim(),void 0!==e.swapFee&&c.Coin.encode(e.swapFee,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3){case 1:o.swapCoin=c.Coin.decode(n,n.uint32());break;case 2:o.swapFee=c.Coin.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.swapCoin&&null!==e.swapCoin?t.swapCoin=c.Coin.fromJSON(e.swapCoin):t.swapCoin=void 0,void 0!==e.swapFee&&null!==e.swapFee?t.swapFee=c.Coin.fromJSON(e.swapFee):t.swapFee=void 0,t},toJSON:function(e){var t={};return void 0!==e.swapCoin&&(t.swapCoin=e.swapCoin?c.Coin.toJSON(e.swapCoin):void 0),void 0!==e.swapFee&&(t.swapFee=e.swapFee?c.Coin.toJSON(e.swapFee):void 0),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.swapCoin&&null!==e.swapCoin?t.swapCoin=c.Coin.fromPartial(e.swapCoin):t.swapCoin=void 0,void 0!==e.swapFee&&null!==e.swapFee?t.swapFee=c.Coin.fromPartial(e.swapFee):t.swapFee=void 0,t}};var p=function(){function e(t){a(this,e),this.rpc=t,this.Swap=this.Swap.bind(this),this.SwapSend=this.SwapSend.bind(this)}return o(e,[{key:"Swap",value:function(e){var n=t.MsgSwap.encode(e).finish();return this.rpc.request("terra.market.v1beta1.Msg","Swap",n).then((function(e){return t.MsgSwapResponse.decode(new s.default.Reader(e))}))}},{key:"SwapSend",value:function(e){var n=t.MsgSwapSend.encode(e).finish();return this.rpc.request("terra.market.v1beta1.Msg","SwapSend",n).then((function(e){return t.MsgSwapSendResponse.decode(new s.default.Reader(e))}))}}]),e}();t.MsgClientImpl=p,s.default.util.Long!==i.default&&(s.default.util.Long=i.default,s.default.configure())},39783:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExchangeRateTuple=t.AggregateExchangeRateVote=t.AggregateExchangeRatePrevote=t.Denom=t.Params=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121));t.protobufPackage="terra.oracle.v1beta1";var s={votePeriod:r.default.UZERO,voteThreshold:"",rewardBand:"",rewardDistributionWindow:r.default.UZERO,slashFraction:"",slashWindow:r.default.UZERO,minValidPerWindow:""};t.Params={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();e.votePeriod.isZero()||n.uint32(8).uint64(e.votePeriod),""!==e.voteThreshold&&n.uint32(18).string(e.voteThreshold),""!==e.rewardBand&&n.uint32(26).string(e.rewardBand),e.rewardDistributionWindow.isZero()||n.uint32(32).uint64(e.rewardDistributionWindow);var o,r=a(e.whitelist);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.Denom.encode(s,n.uint32(42).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return""!==e.slashFraction&&n.uint32(50).string(e.slashFraction),e.slashWindow.isZero()||n.uint32(56).uint64(e.slashWindow),""!==e.minValidPerWindow&&n.uint32(66).string(e.minValidPerWindow),n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},s);for(r.whitelist=[];a.pos>>3){case 1:r.votePeriod=a.uint64();break;case 2:r.voteThreshold=a.string();break;case 3:r.rewardBand=a.string();break;case 4:r.rewardDistributionWindow=a.uint64();break;case 5:r.whitelist.push(t.Denom.decode(a,a.uint32()));break;case 6:r.slashFraction=a.string();break;case 7:r.slashWindow=a.uint64();break;case 8:r.minValidPerWindow=a.string();break;default:a.skipType(7&c)}}return r},fromJSON:function(e){var n=Object.assign({},s);if(n.whitelist=[],void 0!==e.votePeriod&&null!==e.votePeriod?n.votePeriod=r.default.fromString(e.votePeriod):n.votePeriod=r.default.UZERO,void 0!==e.voteThreshold&&null!==e.voteThreshold?n.voteThreshold=String(e.voteThreshold):n.voteThreshold="",void 0!==e.rewardBand&&null!==e.rewardBand?n.rewardBand=String(e.rewardBand):n.rewardBand="",void 0!==e.rewardDistributionWindow&&null!==e.rewardDistributionWindow?n.rewardDistributionWindow=r.default.fromString(e.rewardDistributionWindow):n.rewardDistributionWindow=r.default.UZERO,void 0!==e.whitelist&&null!==e.whitelist){var o,i=a(e.whitelist);try{for(i.s();!(o=i.n()).done;){var c=o.value;n.whitelist.push(t.Denom.fromJSON(c))}}catch(u){i.e(u)}finally{i.f()}}return void 0!==e.slashFraction&&null!==e.slashFraction?n.slashFraction=String(e.slashFraction):n.slashFraction="",void 0!==e.slashWindow&&null!==e.slashWindow?n.slashWindow=r.default.fromString(e.slashWindow):n.slashWindow=r.default.UZERO,void 0!==e.minValidPerWindow&&null!==e.minValidPerWindow?n.minValidPerWindow=String(e.minValidPerWindow):n.minValidPerWindow="",n},toJSON:function(e){var n={};return void 0!==e.votePeriod&&(n.votePeriod=(e.votePeriod||r.default.UZERO).toString()),void 0!==e.voteThreshold&&(n.voteThreshold=e.voteThreshold),void 0!==e.rewardBand&&(n.rewardBand=e.rewardBand),void 0!==e.rewardDistributionWindow&&(n.rewardDistributionWindow=(e.rewardDistributionWindow||r.default.UZERO).toString()),e.whitelist?n.whitelist=e.whitelist.map((function(e){return e?t.Denom.toJSON(e):void 0})):n.whitelist=[],void 0!==e.slashFraction&&(n.slashFraction=e.slashFraction),void 0!==e.slashWindow&&(n.slashWindow=(e.slashWindow||r.default.UZERO).toString()),void 0!==e.minValidPerWindow&&(n.minValidPerWindow=e.minValidPerWindow),n},fromPartial:function(e){var n=Object.assign({},s);if(n.whitelist=[],void 0!==e.votePeriod&&null!==e.votePeriod?n.votePeriod=e.votePeriod:n.votePeriod=r.default.UZERO,void 0!==e.voteThreshold&&null!==e.voteThreshold?n.voteThreshold=e.voteThreshold:n.voteThreshold="",void 0!==e.rewardBand&&null!==e.rewardBand?n.rewardBand=e.rewardBand:n.rewardBand="",void 0!==e.rewardDistributionWindow&&null!==e.rewardDistributionWindow?n.rewardDistributionWindow=e.rewardDistributionWindow:n.rewardDistributionWindow=r.default.UZERO,void 0!==e.whitelist&&null!==e.whitelist){var o,i=a(e.whitelist);try{for(i.s();!(o=i.n()).done;){var c=o.value;n.whitelist.push(t.Denom.fromPartial(c))}}catch(u){i.e(u)}finally{i.f()}}return void 0!==e.slashFraction&&null!==e.slashFraction?n.slashFraction=e.slashFraction:n.slashFraction="",void 0!==e.slashWindow&&null!==e.slashWindow?n.slashWindow=e.slashWindow:n.slashWindow=r.default.UZERO,void 0!==e.minValidPerWindow&&null!==e.minValidPerWindow?n.minValidPerWindow=e.minValidPerWindow:n.minValidPerWindow="",n}};var c={name:"",tobinTax:""};t.Denom={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),""!==e.tobinTax&&t.uint32(18).string(e.tobinTax),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.name=n.string();break;case 2:o.tobinTax=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.name&&null!==e.name?t.name=String(e.name):t.name="",void 0!==e.tobinTax&&null!==e.tobinTax?t.tobinTax=String(e.tobinTax):t.tobinTax="",t},toJSON:function(e){var t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.tobinTax&&(t.tobinTax=e.tobinTax),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.name&&null!==e.name?t.name=e.name:t.name="",void 0!==e.tobinTax&&null!==e.tobinTax?t.tobinTax=e.tobinTax:t.tobinTax="",t}};var u={hash:"",voter:"",submitBlock:r.default.UZERO};t.AggregateExchangeRatePrevote={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.hash&&t.uint32(10).string(e.hash),""!==e.voter&&t.uint32(18).string(e.voter),e.submitBlock.isZero()||t.uint32(24).uint64(e.submitBlock),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.hash=n.string();break;case 2:o.voter=n.string();break;case 3:o.submitBlock=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.hash&&null!==e.hash?t.hash=String(e.hash):t.hash="",void 0!==e.voter&&null!==e.voter?t.voter=String(e.voter):t.voter="",void 0!==e.submitBlock&&null!==e.submitBlock?t.submitBlock=r.default.fromString(e.submitBlock):t.submitBlock=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=e.hash),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.submitBlock&&(t.submitBlock=(e.submitBlock||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash="",void 0!==e.voter&&null!==e.voter?t.voter=e.voter:t.voter="",void 0!==e.submitBlock&&null!==e.submitBlock?t.submitBlock=e.submitBlock:t.submitBlock=r.default.UZERO,t}};var d={voter:""};t.AggregateExchangeRateVote={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.exchangeRateTuples);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.ExchangeRateTuple.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return""!==e.voter&&o.uint32(18).string(e.voter),o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},d);for(r.exchangeRateTuples=[];a.pos>>3){case 1:r.exchangeRateTuples.push(t.ExchangeRateTuple.decode(a,a.uint32()));break;case 2:r.voter=a.string();break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},d);if(n.exchangeRateTuples=[],void 0!==e.exchangeRateTuples&&null!==e.exchangeRateTuples){var o,r=a(e.exchangeRateTuples);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.exchangeRateTuples.push(t.ExchangeRateTuple.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.voter&&null!==e.voter?n.voter=String(e.voter):n.voter="",n},toJSON:function(e){var n={};return e.exchangeRateTuples?n.exchangeRateTuples=e.exchangeRateTuples.map((function(e){return e?t.ExchangeRateTuple.toJSON(e):void 0})):n.exchangeRateTuples=[],void 0!==e.voter&&(n.voter=e.voter),n},fromPartial:function(e){var n=Object.assign({},d);if(n.exchangeRateTuples=[],void 0!==e.exchangeRateTuples&&null!==e.exchangeRateTuples){var o,r=a(e.exchangeRateTuples);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.exchangeRateTuples.push(t.ExchangeRateTuple.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.voter&&null!==e.voter?n.voter=e.voter:n.voter="",n}};var l={denom:"",exchangeRate:""};t.ExchangeRateTuple={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.exchangeRate&&t.uint32(18).string(e.exchangeRate),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos>>3){case 1:o.denom=n.string();break;case 2:o.exchangeRate=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},l);return void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.exchangeRate&&null!==e.exchangeRate?t.exchangeRate=String(e.exchangeRate):t.exchangeRate="",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.exchangeRate&&(t.exchangeRate=e.exchangeRate),t},fromPartial:function(e){var t=Object.assign({},l);return void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.exchangeRate&&null!==e.exchangeRate?t.exchangeRate=e.exchangeRate:t.exchangeRate="",t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},16974:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgDelegateFeedConsentResponse=t.MsgDelegateFeedConsent=t.MsgAggregateExchangeRateVoteResponse=t.MsgAggregateExchangeRateVote=t.MsgAggregateExchangeRatePrevoteResponse=t.MsgAggregateExchangeRatePrevote=t.protobufPackage=void 0;var i=r(n(29600)),s=r(n(80121));t.protobufPackage="terra.oracle.v1beta1";var c={hash:"",feeder:"",validator:""};t.MsgAggregateExchangeRatePrevote={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.hash&&t.uint32(10).string(e.hash),""!==e.feeder&&t.uint32(18).string(e.feeder),""!==e.validator&&t.uint32(26).string(e.validator),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.hash=n.string();break;case 2:o.feeder=n.string();break;case 3:o.validator=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.hash&&null!==e.hash?t.hash=String(e.hash):t.hash="",void 0!==e.feeder&&null!==e.feeder?t.feeder=String(e.feeder):t.feeder="",void 0!==e.validator&&null!==e.validator?t.validator=String(e.validator):t.validator="",t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=e.hash),void 0!==e.feeder&&(t.feeder=e.feeder),void 0!==e.validator&&(t.validator=e.validator),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash="",void 0!==e.feeder&&null!==e.feeder?t.feeder=e.feeder:t.feeder="",void 0!==e.validator&&null!==e.validator?t.validator=e.validator:t.validator="",t}};var u={};t.MsgAggregateExchangeRatePrevoteResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create()},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.salt&&t.uint32(10).string(e.salt),""!==e.exchangeRates&&t.uint32(18).string(e.exchangeRates),""!==e.feeder&&t.uint32(26).string(e.feeder),""!==e.validator&&t.uint32(34).string(e.validator),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.salt=n.string();break;case 2:o.exchangeRates=n.string();break;case 3:o.feeder=n.string();break;case 4:o.validator=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.salt&&null!==e.salt?t.salt=String(e.salt):t.salt="",void 0!==e.exchangeRates&&null!==e.exchangeRates?t.exchangeRates=String(e.exchangeRates):t.exchangeRates="",void 0!==e.feeder&&null!==e.feeder?t.feeder=String(e.feeder):t.feeder="",void 0!==e.validator&&null!==e.validator?t.validator=String(e.validator):t.validator="",t},toJSON:function(e){var t={};return void 0!==e.salt&&(t.salt=e.salt),void 0!==e.exchangeRates&&(t.exchangeRates=e.exchangeRates),void 0!==e.feeder&&(t.feeder=e.feeder),void 0!==e.validator&&(t.validator=e.validator),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.salt&&null!==e.salt?t.salt=e.salt:t.salt="",void 0!==e.exchangeRates&&null!==e.exchangeRates?t.exchangeRates=e.exchangeRates:t.exchangeRates="",void 0!==e.feeder&&null!==e.feeder?t.feeder=e.feeder:t.feeder="",void 0!==e.validator&&null!==e.validator?t.validator=e.validator:t.validator="",t}};var l={};t.MsgAggregateExchangeRateVoteResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create()},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.operator&&t.uint32(10).string(e.operator),""!==e.delegate&&t.uint32(18).string(e.delegate),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3){case 1:o.operator=n.string();break;case 2:o.delegate=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.operator&&null!==e.operator?t.operator=String(e.operator):t.operator="",void 0!==e.delegate&&null!==e.delegate?t.delegate=String(e.delegate):t.delegate="",t},toJSON:function(e){var t={};return void 0!==e.operator&&(t.operator=e.operator),void 0!==e.delegate&&(t.delegate=e.delegate),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.operator&&null!==e.operator?t.operator=e.operator:t.operator="",void 0!==e.delegate&&null!==e.delegate?t.delegate=e.delegate:t.delegate="",t}};var p={};t.MsgDelegateFeedConsentResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create()},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.taxPolicy&&t.PolicyConstraints.encode(e.taxPolicy,n.uint32(10).fork()).ldelim(),void 0!==e.rewardPolicy&&t.PolicyConstraints.encode(e.rewardPolicy,n.uint32(18).fork()).ldelim(),""!==e.seigniorageBurdenTarget&&n.uint32(26).string(e.seigniorageBurdenTarget),""!==e.miningIncrement&&n.uint32(34).string(e.miningIncrement),e.windowShort.isZero()||n.uint32(40).uint64(e.windowShort),e.windowLong.isZero()||n.uint32(48).uint64(e.windowLong),e.windowProbation.isZero()||n.uint32(56).uint64(e.windowProbation),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},c);a.pos>>3){case 1:r.taxPolicy=t.PolicyConstraints.decode(a,a.uint32());break;case 2:r.rewardPolicy=t.PolicyConstraints.decode(a,a.uint32());break;case 3:r.seigniorageBurdenTarget=a.string();break;case 4:r.miningIncrement=a.string();break;case 5:r.windowShort=a.uint64();break;case 6:r.windowLong=a.uint64();break;case 7:r.windowProbation=a.uint64();break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},c);return void 0!==e.taxPolicy&&null!==e.taxPolicy?n.taxPolicy=t.PolicyConstraints.fromJSON(e.taxPolicy):n.taxPolicy=void 0,void 0!==e.rewardPolicy&&null!==e.rewardPolicy?n.rewardPolicy=t.PolicyConstraints.fromJSON(e.rewardPolicy):n.rewardPolicy=void 0,void 0!==e.seigniorageBurdenTarget&&null!==e.seigniorageBurdenTarget?n.seigniorageBurdenTarget=String(e.seigniorageBurdenTarget):n.seigniorageBurdenTarget="",void 0!==e.miningIncrement&&null!==e.miningIncrement?n.miningIncrement=String(e.miningIncrement):n.miningIncrement="",void 0!==e.windowShort&&null!==e.windowShort?n.windowShort=r.default.fromString(e.windowShort):n.windowShort=r.default.UZERO,void 0!==e.windowLong&&null!==e.windowLong?n.windowLong=r.default.fromString(e.windowLong):n.windowLong=r.default.UZERO,void 0!==e.windowProbation&&null!==e.windowProbation?n.windowProbation=r.default.fromString(e.windowProbation):n.windowProbation=r.default.UZERO,n},toJSON:function(e){var n={};return void 0!==e.taxPolicy&&(n.taxPolicy=e.taxPolicy?t.PolicyConstraints.toJSON(e.taxPolicy):void 0),void 0!==e.rewardPolicy&&(n.rewardPolicy=e.rewardPolicy?t.PolicyConstraints.toJSON(e.rewardPolicy):void 0),void 0!==e.seigniorageBurdenTarget&&(n.seigniorageBurdenTarget=e.seigniorageBurdenTarget),void 0!==e.miningIncrement&&(n.miningIncrement=e.miningIncrement),void 0!==e.windowShort&&(n.windowShort=(e.windowShort||r.default.UZERO).toString()),void 0!==e.windowLong&&(n.windowLong=(e.windowLong||r.default.UZERO).toString()),void 0!==e.windowProbation&&(n.windowProbation=(e.windowProbation||r.default.UZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},c);return void 0!==e.taxPolicy&&null!==e.taxPolicy?n.taxPolicy=t.PolicyConstraints.fromPartial(e.taxPolicy):n.taxPolicy=void 0,void 0!==e.rewardPolicy&&null!==e.rewardPolicy?n.rewardPolicy=t.PolicyConstraints.fromPartial(e.rewardPolicy):n.rewardPolicy=void 0,void 0!==e.seigniorageBurdenTarget&&null!==e.seigniorageBurdenTarget?n.seigniorageBurdenTarget=e.seigniorageBurdenTarget:n.seigniorageBurdenTarget="",void 0!==e.miningIncrement&&null!==e.miningIncrement?n.miningIncrement=e.miningIncrement:n.miningIncrement="",void 0!==e.windowShort&&null!==e.windowShort?n.windowShort=e.windowShort:n.windowShort=r.default.UZERO,void 0!==e.windowLong&&null!==e.windowLong?n.windowLong=e.windowLong:n.windowLong=r.default.UZERO,void 0!==e.windowProbation&&null!==e.windowProbation?n.windowProbation=e.windowProbation:n.windowProbation=r.default.UZERO,n}};var u={rateMin:"",rateMax:"",changeRateMax:""};t.PolicyConstraints={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.rateMin&&t.uint32(10).string(e.rateMin),""!==e.rateMax&&t.uint32(18).string(e.rateMax),void 0!==e.cap&&s.Coin.encode(e.cap,t.uint32(26).fork()).ldelim(),""!==e.changeRateMax&&t.uint32(34).string(e.changeRateMax),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.rateMin=n.string();break;case 2:o.rateMax=n.string();break;case 3:o.cap=s.Coin.decode(n,n.uint32());break;case 4:o.changeRateMax=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.rateMin&&null!==e.rateMin?t.rateMin=String(e.rateMin):t.rateMin="",void 0!==e.rateMax&&null!==e.rateMax?t.rateMax=String(e.rateMax):t.rateMax="",void 0!==e.cap&&null!==e.cap?t.cap=s.Coin.fromJSON(e.cap):t.cap=void 0,void 0!==e.changeRateMax&&null!==e.changeRateMax?t.changeRateMax=String(e.changeRateMax):t.changeRateMax="",t},toJSON:function(e){var t={};return void 0!==e.rateMin&&(t.rateMin=e.rateMin),void 0!==e.rateMax&&(t.rateMax=e.rateMax),void 0!==e.cap&&(t.cap=e.cap?s.Coin.toJSON(e.cap):void 0),void 0!==e.changeRateMax&&(t.changeRateMax=e.changeRateMax),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.rateMin&&null!==e.rateMin?t.rateMin=e.rateMin:t.rateMin="",void 0!==e.rateMax&&null!==e.rateMax?t.rateMax=e.rateMax:t.rateMax="",void 0!==e.cap&&null!==e.cap?t.cap=s.Coin.fromPartial(e.cap):t.cap=void 0,void 0!==e.changeRateMax&&null!==e.changeRateMax?t.changeRateMax=e.changeRateMax:t.changeRateMax="",t}};var d={};t.EpochTaxProceeds={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.taxProceeds);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);for(o.taxProceeds=[];n.pos>>3===1)o.taxProceeds.push(s.Coin.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},d);if(t.taxProceeds=[],void 0!==e.taxProceeds&&null!==e.taxProceeds){var n,o=a(e.taxProceeds);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.taxProceeds.push(s.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.taxProceeds?t.taxProceeds=e.taxProceeds.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.taxProceeds=[],t},fromPartial:function(e){var t=Object.assign({},d);if(t.taxProceeds=[],void 0!==e.taxProceeds&&null!==e.taxProceeds){var n,o=a(e.taxProceeds);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.taxProceeds.push(s.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var l={};t.EpochInitialIssuance={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.issuance);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);for(o.issuance=[];n.pos>>3===1)o.issuance.push(s.Coin.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},l);if(t.issuance=[],void 0!==e.issuance&&null!==e.issuance){var n,o=a(e.issuance);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.issuance.push(s.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.issuance?t.issuance=e.issuance.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.issuance=[],t},fromPartial:function(e){var t=Object.assign({},l);if(t.issuance=[],void 0!==e.issuance&&null!==e.issuance){var n,o=a(e.issuance);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.issuance.push(s.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},81017:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.VestingSchedule=t.Schedule=t.LazyGradedVestingAccount=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121)),s=n(63004);t.protobufPackage="terra.vesting.v1beta1";var c={};t.LazyGradedVestingAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.baseVestingAccount&&s.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim();var o,r=a(e.vestingSchedules);try{for(r.s();!(o=r.n()).done;){var c=o.value;t.VestingSchedule.encode(c,n.uint32(18).fork()).ldelim()}}catch(u){r.e(u)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},c);for(r.vestingSchedules=[];a.pos>>3){case 1:r.baseVestingAccount=s.BaseVestingAccount.decode(a,a.uint32());break;case 2:r.vestingSchedules.push(t.VestingSchedule.decode(a,a.uint32()));break;default:a.skipType(7&u)}}return r},fromJSON:function(e){var n=Object.assign({},c);if(n.vestingSchedules=[],void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=s.BaseVestingAccount.fromJSON(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.vestingSchedules&&null!==e.vestingSchedules){var o,r=a(e.vestingSchedules);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.vestingSchedules.push(t.VestingSchedule.fromJSON(i))}}catch(u){r.e(u)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?s.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),e.vestingSchedules?n.vestingSchedules=e.vestingSchedules.map((function(e){return e?t.VestingSchedule.toJSON(e):void 0})):n.vestingSchedules=[],n},fromPartial:function(e){var n=Object.assign({},c);if(n.vestingSchedules=[],void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=s.BaseVestingAccount.fromPartial(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.vestingSchedules&&null!==e.vestingSchedules){var o,r=a(e.vestingSchedules);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.vestingSchedules.push(t.VestingSchedule.fromPartial(i))}}catch(u){r.e(u)}finally{r.f()}}return n}};var u={startTime:r.default.ZERO,endTime:r.default.ZERO,ratio:""};t.Schedule={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.startTime.isZero()||t.uint32(8).int64(e.startTime),e.endTime.isZero()||t.uint32(16).int64(e.endTime),""!==e.ratio&&t.uint32(26).string(e.ratio),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.startTime=n.int64();break;case 2:o.endTime=n.int64();break;case 3:o.ratio=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.startTime&&null!==e.startTime?t.startTime=r.default.fromString(e.startTime):t.startTime=r.default.ZERO,void 0!==e.endTime&&null!==e.endTime?t.endTime=r.default.fromString(e.endTime):t.endTime=r.default.ZERO,void 0!==e.ratio&&null!==e.ratio?t.ratio=String(e.ratio):t.ratio="",t},toJSON:function(e){var t={};return void 0!==e.startTime&&(t.startTime=(e.startTime||r.default.ZERO).toString()),void 0!==e.endTime&&(t.endTime=(e.endTime||r.default.ZERO).toString()),void 0!==e.ratio&&(t.ratio=e.ratio),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.startTime&&null!==e.startTime?t.startTime=e.startTime:t.startTime=r.default.ZERO,void 0!==e.endTime&&null!==e.endTime?t.endTime=e.endTime:t.endTime=r.default.ZERO,void 0!==e.ratio&&null!==e.ratio?t.ratio=e.ratio:t.ratio="",t}};var d={denom:""};t.VestingSchedule={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.denom&&n.uint32(10).string(e.denom);var o,r=a(e.schedules);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.Schedule.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},d);for(r.schedules=[];a.pos>>3){case 1:r.denom=a.string();break;case 2:r.schedules.push(t.Schedule.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},d);if(n.schedules=[],void 0!==e.denom&&null!==e.denom?n.denom=String(e.denom):n.denom="",void 0!==e.schedules&&null!==e.schedules){var o,r=a(e.schedules);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.schedules.push(t.Schedule.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.denom&&(n.denom=e.denom),e.schedules?n.schedules=e.schedules.map((function(e){return e?t.Schedule.toJSON(e):void 0})):n.schedules=[],n},fromPartial:function(e){var n=Object.assign({},d);if(n.schedules=[],void 0!==e.denom&&null!==e.denom?n.denom=e.denom:n.denom="",void 0!==e.schedules&&null!==e.schedules){var o,r=a(e.schedules);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.schedules.push(t.Schedule.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},5427:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgClearContractAdminResponse=t.MsgClearContractAdmin=t.MsgUpdateContractAdminResponse=t.MsgUpdateContractAdmin=t.MsgMigrateContractResponse=t.MsgMigrateContract=t.MsgExecuteContractResponse=t.MsgExecuteContract=t.MsgInstantiateContractResponse=t.MsgInstantiateContract=t.MsgMigrateCodeResponse=t.MsgMigrateCode=t.MsgStoreCodeResponse=t.MsgStoreCode=t.protobufPackage=void 0;var s=i(n(29600)),c=i(n(80121)),u=n(5449);t.protobufPackage="terra.wasm.v1beta1";var d={sender:""};t.MsgStoreCode={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),0!==e.wasmByteCode.length&&t.uint32(18).bytes(e.wasmByteCode),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);for(o.wasmByteCode=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.wasmByteCode=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return t.wasmByteCode=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode&&(t.wasmByteCode=C(e.wasmByteCode)),t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.wasmByteCode&&(t.wasmByteCode=R(void 0!==e.wasmByteCode?e.wasmByteCode:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode?t.wasmByteCode=e.wasmByteCode:t.wasmByteCode=new Uint8Array,t}};var l={codeId:s.default.UZERO};t.MsgStoreCodeResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return e.codeId.isZero()||t.uint32(8).uint64(e.codeId),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos>>3===1)o.codeId=n.uint64();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},l);return void 0!==e.codeId&&null!==e.codeId?t.codeId=s.default.fromString(e.codeId):t.codeId=s.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||s.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},l);return void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=s.default.UZERO,t}};var f={codeId:s.default.UZERO,sender:""};t.MsgMigrateCode={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return e.codeId.isZero()||t.uint32(8).uint64(e.codeId),""!==e.sender&&t.uint32(18).string(e.sender),0!==e.wasmByteCode.length&&t.uint32(26).bytes(e.wasmByteCode),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);for(o.wasmByteCode=new Uint8Array;n.pos>>3){case 1:o.codeId=n.uint64();break;case 2:o.sender=n.string();break;case 3:o.wasmByteCode=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return t.wasmByteCode=new Uint8Array,void 0!==e.codeId&&null!==e.codeId?t.codeId=s.default.fromString(e.codeId):t.codeId=s.default.UZERO,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode&&(t.wasmByteCode=C(e.wasmByteCode)),t},toJSON:function(e){var t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||s.default.UZERO).toString()),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.wasmByteCode&&(t.wasmByteCode=R(void 0!==e.wasmByteCode?e.wasmByteCode:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=s.default.UZERO,void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode?t.wasmByteCode=e.wasmByteCode:t.wasmByteCode=new Uint8Array,t}};var p={};t.MsgMigrateCodeResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();""!==e.sender&&t.uint32(10).string(e.sender),""!==e.admin&&t.uint32(18).string(e.admin),e.codeId.isZero()||t.uint32(24).uint64(e.codeId),0!==e.initMsg.length&&t.uint32(34).bytes(e.initMsg);var n,a=r(e.initCoins);try{for(a.s();!(n=a.n()).done;){var o=n.value;u.Coin.encode(o,t.uint32(42).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);for(o.initCoins=[],o.initMsg=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.admin=n.string();break;case 3:o.codeId=n.uint64();break;case 4:o.initMsg=n.bytes();break;case 5:o.initCoins.push(u.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);if(t.initCoins=[],t.initMsg=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.admin&&null!==e.admin?t.admin=String(e.admin):t.admin="",void 0!==e.codeId&&null!==e.codeId?t.codeId=s.default.fromString(e.codeId):t.codeId=s.default.UZERO,void 0!==e.initMsg&&null!==e.initMsg&&(t.initMsg=C(e.initMsg)),void 0!==e.initCoins&&null!==e.initCoins){var n,a=r(e.initCoins);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.initCoins.push(u.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.codeId&&(t.codeId=(e.codeId||s.default.UZERO).toString()),void 0!==e.initMsg&&(t.initMsg=R(void 0!==e.initMsg?e.initMsg:new Uint8Array)),e.initCoins?t.initCoins=e.initCoins.map((function(e){return e?u.Coin.toJSON(e):void 0})):t.initCoins=[],t},fromPartial:function(e){var t=Object.assign({},b);if(t.initCoins=[],void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.admin&&null!==e.admin?t.admin=e.admin:t.admin="",void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=s.default.UZERO,void 0!==e.initMsg&&null!==e.initMsg?t.initMsg=e.initMsg:t.initMsg=new Uint8Array,void 0!==e.initCoins&&null!==e.initCoins){var n,a=r(e.initCoins);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.initCoins.push(u.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return t}};var m={contractAddress:""};t.MsgInstantiateContractResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.contractAddress&&t.uint32(10).string(e.contractAddress),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);for(o.data=new Uint8Array;n.pos>>3){case 1:o.contractAddress=n.string();break;case 2:o.data=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},m);return t.data=new Uint8Array,void 0!==e.contractAddress&&null!==e.contractAddress?t.contractAddress=String(e.contractAddress):t.contractAddress="",void 0!==e.data&&null!==e.data&&(t.data=C(e.data)),t},toJSON:function(e){var t={};return void 0!==e.contractAddress&&(t.contractAddress=e.contractAddress),void 0!==e.data&&(t.data=R(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},m);return void 0!==e.contractAddress&&null!==e.contractAddress?t.contractAddress=e.contractAddress:t.contractAddress="",void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var h={sender:"",contract:""};t.MsgExecuteContract={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),0!==e.executeMsg.length&&t.uint32(26).bytes(e.executeMsg);var n,a=r(e.coins);try{for(a.s();!(n=a.n()).done;){var o=n.value;u.Coin.encode(o,t.uint32(42).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.coins=[],o.executeMsg=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.contract=n.string();break;case 3:o.executeMsg=n.bytes();break;case 5:o.coins.push(u.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);if(t.coins=[],t.executeMsg=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",void 0!==e.executeMsg&&null!==e.executeMsg&&(t.executeMsg=C(e.executeMsg)),void 0!==e.coins&&null!==e.coins){var n,a=r(e.coins);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.coins.push(u.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.executeMsg&&(t.executeMsg=R(void 0!==e.executeMsg?e.executeMsg:new Uint8Array)),e.coins?t.coins=e.coins.map((function(e){return e?u.Coin.toJSON(e):void 0})):t.coins=[],t},fromPartial:function(e){var t=Object.assign({},h);if(t.coins=[],void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",void 0!==e.executeMsg&&null!==e.executeMsg?t.executeMsg=e.executeMsg:t.executeMsg=new Uint8Array,void 0!==e.coins&&null!==e.coins){var n,a=r(e.coins);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.coins.push(u.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return t}};var g={};t.MsgExecuteContractResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);for(o.data=new Uint8Array;n.pos>>3===1)o.data=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},g);return t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=C(e.data)),t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=R(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var y={admin:"",contract:"",newCodeId:s.default.UZERO};t.MsgMigrateContract={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.contract&&t.uint32(18).string(e.contract),e.newCodeId.isZero()||t.uint32(24).uint64(e.newCodeId),0!==e.migrateMsg.length&&t.uint32(34).bytes(e.migrateMsg),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.migrateMsg=new Uint8Array;n.pos>>3){case 1:o.admin=n.string();break;case 2:o.contract=n.string();break;case 3:o.newCodeId=n.uint64();break;case 4:o.migrateMsg=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return t.migrateMsg=new Uint8Array,void 0!==e.admin&&null!==e.admin?t.admin=String(e.admin):t.admin="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",void 0!==e.newCodeId&&null!==e.newCodeId?t.newCodeId=s.default.fromString(e.newCodeId):t.newCodeId=s.default.UZERO,void 0!==e.migrateMsg&&null!==e.migrateMsg&&(t.migrateMsg=C(e.migrateMsg)),t},toJSON:function(e){var t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.newCodeId&&(t.newCodeId=(e.newCodeId||s.default.UZERO).toString()),void 0!==e.migrateMsg&&(t.migrateMsg=R(void 0!==e.migrateMsg?e.migrateMsg:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.admin&&null!==e.admin?t.admin=e.admin:t.admin="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",void 0!==e.newCodeId&&null!==e.newCodeId?t.newCodeId=e.newCodeId:t.newCodeId=s.default.UZERO,void 0!==e.migrateMsg&&null!==e.migrateMsg?t.migrateMsg=e.migrateMsg:t.migrateMsg=new Uint8Array,t}};var v={};t.MsgMigrateContractResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);for(o.data=new Uint8Array;n.pos>>3===1)o.data=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},v);return t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=C(e.data)),t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=R(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},v);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var w={admin:"",newAdmin:"",contract:""};t.MsgUpdateContractAdmin={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.newAdmin&&t.uint32(18).string(e.newAdmin),""!==e.contract&&t.uint32(26).string(e.contract),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);n.pos>>3){case 1:o.admin=n.string();break;case 2:o.newAdmin=n.string();break;case 3:o.contract=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},w);return void 0!==e.admin&&null!==e.admin?t.admin=String(e.admin):t.admin="",void 0!==e.newAdmin&&null!==e.newAdmin?t.newAdmin=String(e.newAdmin):t.newAdmin="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",t},toJSON:function(e){var t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial:function(e){var t=Object.assign({},w);return void 0!==e.admin&&null!==e.admin?t.admin=e.admin:t.admin="",void 0!==e.newAdmin&&null!==e.newAdmin?t.newAdmin=e.newAdmin:t.newAdmin="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",t}};var k={};t.MsgUpdateContractAdminResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.contract&&t.uint32(18).string(e.contract),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},A);n.pos>>3){case 1:o.admin=n.string();break;case 2:o.contract=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},A);return void 0!==e.admin&&null!==e.admin?t.admin=String(e.admin):t.admin="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",t},toJSON:function(e){var t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial:function(e){var t=Object.assign({},A);return void 0!==e.admin&&null!==e.admin?t.admin=e.admin:t.admin="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",t}};var x={};t.MsgClearContractAdminResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},x);n.pos0||-1===this._reconnectCount)?(-1!==this._reconnectCount&&this._reconnectCount--,this.reconnectTimeoutId&&clearTimeout(this.reconnectTimeoutId),this.reconnectTimeoutId=setTimeout((function(){e.emit("reconnect"),e.start()}),this.reconnectInterval)):this.emit("destroyed")},t.prototype.subscribe=function(e,t,n){this.queryParams=function(e){for(var t=[],n=0,a=Object.keys(e);n":case"<":case"<=":case">=":r="number"!==typeof i[1]?"".concat(o).concat(i[0]).concat(i[1].toISOString()):"".concat(o).concat(i[0]).concat(i[1]);break;case"CONTAINS":r="".concat(o," CONTAINS '").concat(u(i[1]),"'");break;case"EXISTS":r="".concat(o," EXISTS")}else switch(typeof i){case"number":r="".concat(o,"=").concat(i);break;case"string":r="".concat(o,"='").concat(u(i),"'");break;default:r="".concat(o,"=").concat(i.toISOString())}t.push(r)}return t.join(" AND ")}(o({"tm.event":e},t)),this.callback=n},t.prototype.subscribeTx=function(e,t){this.subscribe("Tx",e,(function(e){return e.value.TxResult.txhash=(0,c.hashToHex)(e.value.TxResult.tx),t(e)}))},t}(i.EventEmitter);t.WebSocketClient=d},98974:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(25289),t),o(n(16731),t),o(n(66497),t),o(n(26629),t),o(n(50431),t)},35130:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&(s=u)),d=new c.TxBody(t.msgs,t.memo||""),l=new c.AuthInfo([],new c.Fee(0,new c.Coins)),(f=new c.Tx(d,l,[])).appendEmptySignatures(e),r&&"auto"!==r&&"0"!==r?[3,2]:[4,this.estimateGas(f,{gasAdjustment:a})];case 1:r=i.sent().toString(),i.label=2;case 2:return p=s?s.mul(r).toIntCeilCoins():this.lcd.config.isClassic?"0uusd":"0uluna",[2,new c.Fee(Number.parseInt(r),p,"","")]}}))}))},t.prototype.estimateGas=function(e,t){return r(this,void 0,void 0,(function(){var n,a,o,r;return i(this,(function(i){switch(i.label){case 0:if(n=(null===t||void 0===t?void 0:t.gasAdjustment)||this.lcd.config.gasAdjustment,a=e,e.signatures.length<=0){if(!(t&&t.signers&&t.signers.length>0))throw Error("cannot append signature");o=new c.AuthInfo([],new c.Fee(0,new c.Coins)),(a=new c.Tx(e.body,o,[])).appendEmptySignatures(t.signers)}return[4,this.c.post("/cosmos/tx/v1beta1/simulate",{tx_bytes:this.encode(a)}).then((function(e){return l.fromData(e)}))];case 1:return r=i.sent(),[2,new c.Dec(n).mul(r.gas_info.gas_used).toNumber()]}}))}))},t.prototype.computeTax=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){throw new Error("Tax was removed from network")}))}))},t.prototype.encode=function(e){return a.from(e.toBytes(this.lcd.config.isClassic)).toString("base64")},t.prototype.decode=function(e){return c.Tx.fromBuffer(a.from(e,"base64"),this.lcd.config.isClassic)},t.prototype.hash=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.encode(e)];case 1:return t=n.sent(),[2,(0,u.hashToHex)(t)]}}))}))},t.prototype._broadcast=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.c.post("/cosmos/tx/v1beta1/txs",{tx_bytes:this.encode(e),mode:t})];case 1:return[2,n.sent()]}}))}))},t.prototype.broadcast=function(e,t){return void 0===t&&(t=3e4),r(this,void 0,void 0,(function(){var n,a,o,r;return i(this,(function(i){switch(i.label){case 0:return n=500,[4,this._broadcast(e,"BROADCAST_MODE_SYNC")];case 1:if(void 0!=(a=i.sent().tx_response).code&&0!=a.code)return[2,{height:Number.parseInt(a.height),txhash:a.txhash,raw_log:a.raw_log,code:a.code,codespace:a.codespace,gas_used:0,gas_wanted:0,timestamp:"",logs:[]}];r=0,i.label=2;case 2:if(!(r<=t/n))return[3,9];i.label=3;case 3:return i.trys.push([3,5,,6]),[4,this.txInfo(a.txhash)];case 4:return o=i.sent(),[3,6];case 5:return i.sent(),[3,6];case 6:return o?[3,9]:[4,new Promise((function(e){return setTimeout(e,n)}))];case 7:i.sent(),i.label=8;case 8:return r++,[3,2];case 9:if(!o)throw new Error("Transaction was not included in a block before timeout of ".concat(t,"ms"));return[2,{txhash:o.txhash,raw_log:o.raw_log,gas_wanted:o.gas_wanted,gas_used:o.gas_used,height:+o.height,logs:(o.logs||[]).map((function(e){return d.TxLog.fromData(e)})),code:o.code,codespace:o.codespace,timestamp:o.timestamp}]}}))}))},t.prototype.broadcastBlock=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._broadcast(e,"BROADCAST_MODE_BLOCK").then((function(e){var t=e.tx_response;return{txhash:t.txhash,raw_log:t.raw_log,gas_wanted:Number.parseInt(t.gas_wanted),gas_used:Number.parseInt(t.gas_used),height:+t.height,logs:t.logs.map((function(e){return d.TxLog.fromData(e)})),code:t.code,codespace:t.codespace,data:t.data,info:t.info,timestamp:t.timestamp}}))]}))}))},t.prototype.broadcastSync=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._broadcast(e,"BROADCAST_MODE_SYNC").then((function(e){var t=e.tx_response,n={height:+t.height,txhash:t.txhash,raw_log:t.raw_log};return t.code&&(n.code=t.code),t.codespace&&(n.codespace=t.codespace),n}))]}))}))},t.prototype.broadcastAsync=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._broadcast(e,"BROADCAST_MODE_ASYNC").then((function(e){var t=e.tx_response;return{height:+t.height,txhash:t.txhash}}))]}))}))},t.prototype.search=function(e){var t;return r(this,void 0,void 0,(function(){var n,a=this;return i(this,(function(o){return n=new URLSearchParams,null===(t=e.events)||void 0===t||t.forEach((function(e){return n.append("events","tx.height"===e.key?"".concat(e.key,"=").concat(e.value):"".concat(e.key,"='").concat(e.value,"'"))})),delete e.events,Object.entries(e).forEach((function(e){n.append(e[0],e[1])})),[2,this.c.getRaw("/cosmos/tx/v1beta1/txs",n).then((function(e){return{txs:e.tx_responses.map((function(e){return c.TxInfo.fromData(e,a.lcd.config.isClassic)})),pagination:e.pagination}}))]}))}))},t}(s.BaseAPI);t.TxAPI=f},94457:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]Math.pow(2,32)-1)throw new Error("CompactBitArray overflow");return new e(t%8,a.alloc(n))},e.prototype.count=function(){return 0==this.extra_bits_stored?8*this.elems.length:8*(this.elems.length-1)+this.extra_bits_stored},e.prototype.getIndex=function(e){return!(e<0||e>=this.count())&&(this.elems.readUInt8(e>>3)&1<<7-e%8)>0},e.prototype.setIndex=function(e,t){return!(e<0||e>=this.count())&&(t?this.elems[e>>3]|=1<<7-e%8:this.elems[e>>3]&=~(1<<7-e%8),!0)},e.prototype.numTrueBitsBefore=function(e){var t=function(e){return e.toString(2).split("0").join("").length},n=0,a=this.count();e>a&&(e=a);for(var o=0;;o++){if(8*o+7>=e)return n+=t(this.elems[o]>>7-e%8+1);n+=t(this.elems[o])}},e.fromData=function(t){return new e(t.extra_bits_stored,a.from(t.elems,"base64"))},e.prototype.toData=function(){return{elems:this.elems.toString("base64"),extra_bits_stored:this.extra_bits_stored}},e.fromProto=function(t){return new e(t.extraBitsStored,a.from(t.elems))},e.prototype.toProto=function(){return o.CompactBitArray.fromPartial({elems:this.elems,extraBitsStored:this.extra_bits_stored})},e}();t.CompactBitArray=r},89371:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},44171:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Deposit=void 0;var s=n(80856),c=n(90743),u=n(87327),d=i(n(29600)),l=function(e){function t(t,n,a){var o=e.call(this)||this;return o.proposal_id=t,o.depositor=n,o.amount=new s.Coins(a),o}return a(t,e),t.fromAmino=function(e){var n=e.proposal_id,a=e.depositor,o=e.amount;return new t(Number.parseInt(n),a,s.Coins.fromAmino(o))},t.prototype.toAmino=function(){var e=this,t=e.proposal_id,n=e.depositor,a=e.amount;return{proposal_id:t.toString(),depositor:n,amount:a.toAmino()}},t.fromData=function(e){var n=e.proposal_id,a=e.depositor,o=e.amount;return new t(Number.parseInt(n),a,s.Coins.fromData(o))},t.prototype.toData=function(){var e=this,t=e.proposal_id,n=e.depositor,a=e.amount;return{proposal_id:t.toString(),depositor:n,amount:a.toData()}},t.fromProto=function(e){return new t(e.proposalId.toNumber(),e.depositor,s.Coins.fromProto(e.amount))},t.prototype.toProto=function(){var e=this,t=e.proposal_id,n=e.depositor,a=e.amount;return u.Deposit.fromPartial({proposalId:d.fromNumber(t),depositor:n,amount:a.toProto()})},t}(c.JSONSerializable);t.Deposit=l},69981:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Fee=void 0;var s=n(90743),c=n(80856),u=n(16106),d=n(28824),l=i(n(29600)),f=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.gas_limit=t,r.payer=a,r.granter=o,r.amount=new c.Coins(n),r}return a(t,e),t.fromAmino=function(e){var n=e.gas,a=e.amount;return new t(Number.parseInt(n),c.Coins.fromAmino(a),"","")},t.prototype.toAmino=function(){return{gas:new u.Int(this.gas_limit).toString(),amount:this.amount.toAmino()}},t.fromData=function(e){return new t(Number.parseInt(e.gas_limit),c.Coins.fromData(e.amount),e.payer,e.granter)},t.prototype.toData=function(){var e=this,t=e.amount,n=e.gas_limit,a=e.payer,o=e.granter;return{amount:t.toData(),gas_limit:n.toFixed(),granter:null!==o&&void 0!==o?o:"",payer:null!==a&&void 0!==a?a:""}},t.fromProto=function(e){return new t(e.gasLimit.toNumber(),c.Coins.fromProto(e.amount),e.payer,e.granter)},t.prototype.toProto=function(){var e=this,t=e.amount,n=e.gas_limit,a=e.payer,o=e.granter;return d.Fee.fromPartial({amount:t.toProto(),gasLimit:l.fromNumber(n),granter:o,payer:a})},t.prototype.gasPrices=function(){return this.amount.toDecCoins().div(this.gas_limit)},t}(s.JSONSerializable);t.Fee=f},50292:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Msg=void 0;var a=n(87425),o=n(16174),r=n(63029),i=n(39356),s=n(60777),c=n(11330),u=n(21945),d=n(21480),l=n(55407),f=n(66956),p=n(52354),b=n(11018),m=n(45319),h=n(82100),g=n(10535),y=n(92911);!function(e){e.fromAmino=function(e,t){switch(e.type){case"bank/MsgSend":case"cosmos-sdk/MsgSend":return a.MsgSend.fromAmino(e,t);case"bank/MsgMultiSend":case"cosmos-sdk/MsgMultiSend":return a.MsgMultiSend.fromAmino(e,t);case"distribution/MsgModifyWithdrawAddress":case"cosmos-sdk/MsgModifyWithdrawAddress":return o.MsgSetWithdrawAddress.fromAmino(e,t);case"distribution/MsgWithdrawDelegationReward":case"cosmos-sdk/MsgWithdrawDelegationReward":return o.MsgWithdrawDelegatorReward.fromAmino(e,t);case"distribution/MsgWithdrawValidatorCommission":case"cosmos-sdk/MsgWithdrawValidatorCommission":return o.MsgWithdrawValidatorCommission.fromAmino(e,t);case"distribution/MsgFundCommunityPool":case"cosmos-sdk/MsgFundCommunityPool":return o.MsgFundCommunityPool.fromAmino(e,t);case"feegrant/MsgGrantAllowance":case"cosmos-sdk/MsgGrantAllowance":return r.MsgGrantAllowance.fromAmino(e,t);case"feegrant/MsgRevokeAllowance":case"cosmos-sdk/MsgRevokeAllowance":return r.MsgRevokeAllowance.fromAmino(e,t);case"gov/MsgDeposit":case"cosmos-sdk/MsgDeposit":return i.MsgDeposit.fromAmino(e,t);case"gov/MsgSubmitProposal":case"cosmos-sdk/MsgSubmitProposal":return i.MsgSubmitProposal.fromAmino(e,t);case"gov/MsgVote":case"cosmos-sdk/MsgVote":return i.MsgVote.fromAmino(e,t);case"gov/MsgVoteWeighted":case"cosmos-sdk/MsgVoteWeighted":return i.MsgVoteWeighted.fromAmino(e,t);case"market/MsgSwap":return s.MsgSwap.fromAmino(e,t);case"market/MsgSwapSend":return s.MsgSwapSend.fromAmino(e,t);case"msgauth/MsgGrantAuthorization":case"cosmos-sdk/MsgGrant":return c.MsgGrantAuthorization.fromAmino(e,t);case"msgauth/MsgRevokeAuthorization":case"cosmos-sdk/MsgRevoke":return c.MsgRevokeAuthorization.fromAmino(e,t);case"msgauth/MsgExecAuthorized":case"cosmos-sdk/MsgExec":return c.MsgExecAuthorized.fromAmino(e,t);case"oracle/MsgDelegateFeedConsent":return u.MsgDelegateFeedConsent.fromAmino(e,t);case"oracle/MsgAggregateExchangeRatePrevote":return u.MsgAggregateExchangeRatePrevote.fromAmino(e,t);case"oracle/MsgAggregateExchangeRateVote":return u.MsgAggregateExchangeRateVote.fromAmino(e,t);case"slashing/MsgUnjail":case"cosmos-sdk/MsgUnjail":return d.MsgUnjail.fromAmino(e,t);case"staking/MsgDelegate":case"cosmos-sdk/MsgDelegate":return l.MsgDelegate.fromAmino(e,t);case"staking/MsgUndelegate":case"cosmos-sdk/MsgUndelegate":return l.MsgUndelegate.fromAmino(e,t);case"staking/MsgBeginRedelegate":case"cosmos-sdk/MsgBeginRedelegate":return l.MsgBeginRedelegate.fromAmino(e,t);case"staking/MsgCreateValidator":case"cosmos-sdk/MsgCreateValidator":return l.MsgCreateValidator.fromAmino(e,t);case"staking/MsgEditValidator":case"cosmos-sdk/MsgEditValidator":return l.MsgEditValidator.fromAmino(e,t);case"cosmos-sdk/MsgCreatePeriodicVestingAccount":return f.MsgCreatePeriodicVestingAccount.fromAmino(e,t);case"cosmos-sdk/MsgCreateVestingAccount":return f.MsgCreateVestingAccount.fromAmino(e,t);case"cosmos-sdk/MsgDonateAllVestingTokens":return f.MsgDonateAllVestingTokens.fromAmino(e,t);case"wasm/MsgStoreCode":return p.MsgStoreCode.fromAmino(e,t);case"wasm/MsgMigrateCode":return p.MsgMigrateCode.fromAmino(e,t);case"wasm/MsgInstantiateContract":return p.MsgInstantiateContract.fromAmino(e,t);case"wasm/MsgExecuteContract":return p.MsgExecuteContract.fromAmino(e,t);case"wasm/MsgMigrateContract":return p.MsgMigrateContract.fromAmino(e,t);case"wasm/MsgUpdateContractAdmin":case"wasm/MsgUpdateAdmin":return p.MsgUpdateContractAdmin.fromAmino(e,t);case"wasm/MsgClearContractAdmin":case"wasm/MsgClearAdmin":return p.MsgClearContractAdmin.fromAmino(e,t);case"cosmos-sdk/MsgTransfer":return b.MsgTransfer.fromAmino(e,t);case"crisis/MsgVerifyInvariant":case"cosmos-sdk/MsgVerifyInvariant":return y.MsgVerifyInvariant.fromAmino(e,t)}},e.fromData=function(e,t){switch(e["@type"]){case"/cosmos.bank.v1beta1.MsgSend":return a.MsgSend.fromData(e,t);case"/cosmos.bank.v1beta1.MsgMultiSend":return a.MsgMultiSend.fromData(e,t);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return o.MsgSetWithdrawAddress.fromData(e,t);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return o.MsgWithdrawDelegatorReward.fromData(e,t);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return o.MsgWithdrawValidatorCommission.fromData(e,t);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return o.MsgFundCommunityPool.fromData(e,t);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return r.MsgGrantAllowance.fromData(e,t);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return r.MsgRevokeAllowance.fromData(e,t);case"/cosmos.gov.v1beta1.MsgDeposit":return i.MsgDeposit.fromData(e,t);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return i.MsgSubmitProposal.fromData(e,t);case"/cosmos.gov.v1beta1.MsgVote":return i.MsgVote.fromData(e,t);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return i.MsgVoteWeighted.fromData(e,t);case"/terra.market.v1beta1.MsgSwap":return s.MsgSwap.fromData(e,t);case"/terra.market.v1beta1.MsgSwapSend":return s.MsgSwapSend.fromData(e,t);case"/cosmos.authz.v1beta1.MsgGrant":return c.MsgGrantAuthorization.fromData(e,t);case"/cosmos.authz.v1beta1.MsgRevoke":return c.MsgRevokeAuthorization.fromData(e,t);case"/cosmos.authz.v1beta1.MsgExec":return c.MsgExecAuthorized.fromData(e,t);case"/terra.oracle.v1beta1.MsgDelegateFeedConsent":return u.MsgDelegateFeedConsent.fromData(e,t);case"/terra.oracle.v1beta1.MsgAggregateExchangeRatePrevote":return u.MsgAggregateExchangeRatePrevote.fromData(e,t);case"/terra.oracle.v1beta1.MsgAggregateExchangeRateVote":return u.MsgAggregateExchangeRateVote.fromData(e,t);case"/cosmos.slashing.v1beta1.MsgUnjail":return d.MsgUnjail.fromData(e,t);case"/cosmos.staking.v1beta1.MsgDelegate":return l.MsgDelegate.fromData(e,t);case"/cosmos.staking.v1beta1.MsgUndelegate":return l.MsgUndelegate.fromData(e,t);case"/cosmos.staking.v1beta1.MsgBeginRedelegate":return l.MsgBeginRedelegate.fromData(e,t);case"/cosmos.staking.v1beta1.MsgCreateValidator":return l.MsgCreateValidator.fromData(e,t);case"/cosmos.staking.v1beta1.MsgEditValidator":return l.MsgEditValidator.fromData(e,t);case"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount":return f.MsgCreatePeriodicVestingAccount.fromData(e,t);case"/cosmos.vesting.v1beta1.MsgCreateVestingAccount":return f.MsgCreateVestingAccount.fromData(e,t);case"/cosmos.vesting.v1beta1.MsgDonateAllVestingTokens":return f.MsgDonateAllVestingTokens.fromData(e,t);case"/terra.wasm.v1beta1.MsgStoreCode":case"/cosmwasm.wasm.v1.MsgStoreCode":return p.MsgStoreCode.fromData(e,t);case"/terra.wasm.v1beta1.MsgMigrateCode":return p.MsgMigrateCode.fromData(e,t);case"/terra.wasm.v1beta1.MsgInstantiateContract":case"/cosmwasm.wasm.v1.MsgInstantiateContract":return p.MsgInstantiateContract.fromData(e,t);case"/terra.wasm.v1beta1.MsgExecuteContract":case"/cosmwasm.wasm.v1.MsgExecuteContract":return p.MsgExecuteContract.fromData(e,t);case"/terra.wasm.v1beta1.MsgMigrateContract":case"/cosmwasm.wasm.v1.MsgMigrateContract":return p.MsgMigrateContract.fromData(e,t);case"/terra.wasm.v1beta1.MsgUpdateContractAdmin":case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return p.MsgUpdateContractAdmin.fromData(e,t);case"/terra.wasm.v1beta1.MsgClearContractAdmin":case"/cosmwasm.wasm.v1.MsgClearAdmin":return p.MsgClearContractAdmin.fromData(e,t);case"/ibc.applications.transfer.v1.MsgTransfer":return b.MsgTransfer.fromData(e,t);case"/ibc.core.client.v1.MsgCreateClient":return m.MsgCreateClient.fromData(e,t);case"/ibc.core.client.v1.MsgUpdateClient":return m.MsgUpdateClient.fromData(e,t);case"/ibc.core.client.v1.MsgUpgradeClient":return m.MsgUpgradeClient.fromData(e,t);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return m.MsgSubmitMisbehaviour.fromData(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return h.MsgConnectionOpenInit.fromData(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return h.MsgConnectionOpenTry.fromData(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return h.MsgConnectionOpenConfirm.fromData(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return h.MsgConnectionOpenAck.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelOpenInit":return g.MsgChannelOpenInit.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelOpenTry":return g.MsgChannelOpenTry.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return g.MsgChannelOpenConfirm.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelOpenAck":return g.MsgChannelOpenAck.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelCloseInit":return g.MsgChannelCloseInit.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return g.MsgChannelCloseConfirm.fromData(e,t);case"/ibc.core.channel.v1.MsgRecvPacket":return g.MsgRecvPacket.fromData(e,t);case"/ibc.core.channel.v1.MsgAcknowledgement":return g.MsgAcknowledgement.fromData(e,t);case"/ibc.core.channel.v1.MsgTimeout":return g.MsgTimeout.fromData(e,t);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return g.MsgTimeoutOnClose.fromData(e,t);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return y.MsgVerifyInvariant.fromData(e,t);default:throw Error("not supported msg ".concat(e["@type"]))}},e.fromProto=function(e,t){switch(e.typeUrl){case"/cosmos.bank.v1beta1.MsgSend":return a.MsgSend.unpackAny(e,t);case"/cosmos.bank.v1beta1.MsgMultiSend":return a.MsgMultiSend.unpackAny(e,t);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return o.MsgSetWithdrawAddress.unpackAny(e,t);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return o.MsgWithdrawDelegatorReward.unpackAny(e,t);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return o.MsgWithdrawValidatorCommission.unpackAny(e,t);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return o.MsgFundCommunityPool.unpackAny(e,t);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return r.MsgGrantAllowance.unpackAny(e,t);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return r.MsgRevokeAllowance.unpackAny(e,t);case"/cosmos.gov.v1beta1.MsgDeposit":return i.MsgDeposit.unpackAny(e,t);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return i.MsgSubmitProposal.unpackAny(e,t);case"/cosmos.gov.v1beta1.MsgVote":return i.MsgVote.unpackAny(e,t);case"/terra.market.v1beta1.MsgSwap":return s.MsgSwap.unpackAny(e,t);case"/terra.market.v1beta1.MsgSwapSend":return s.MsgSwapSend.unpackAny(e,t);case"/cosmos.authz.v1beta1.MsgGrant":return c.MsgGrantAuthorization.unpackAny(e,t);case"/cosmos.authz.v1beta1.MsgRevoke":return c.MsgRevokeAuthorization.unpackAny(e,t);case"/cosmos.authz.v1beta1.MsgExec":return c.MsgExecAuthorized.unpackAny(e,t);case"/terra.oracle.v1beta1.MsgDelegateFeedConsent":return u.MsgDelegateFeedConsent.unpackAny(e,t);case"/terra.oracle.v1beta1.MsgAggregateExchangeRatePrevote":return u.MsgAggregateExchangeRatePrevote.unpackAny(e,t);case"/terra.oracle.v1beta1.MsgAggregateExchangeRateVote":return u.MsgAggregateExchangeRateVote.unpackAny(e,t);case"/cosmos.slashing.v1beta1.MsgUnjail":return d.MsgUnjail.unpackAny(e,t);case"/cosmos.staking.v1beta1.MsgDelegate":return l.MsgDelegate.unpackAny(e,t);case"/cosmos.staking.v1beta1.MsgUndelegate":return l.MsgUndelegate.unpackAny(e,t);case"/cosmos.staking.v1beta1.MsgBeginRedelegate":return l.MsgBeginRedelegate.unpackAny(e,t);case"/cosmos.staking.v1beta1.MsgCreateValidator":return l.MsgCreateValidator.unpackAny(e,t);case"/cosmos.staking.v1beta1.MsgEditValidator":return l.MsgEditValidator.unpackAny(e,t);case"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount":return f.MsgCreatePeriodicVestingAccount.unpackAny(e,t);case"/cosmos.vesting.v1beta1.MsgCreateVestingAccount":return f.MsgCreateVestingAccount.unpackAny(e,t);case"/cosmos.vesting.v1beta1.MsgDonateAllVestingTokens":return f.MsgDonateAllVestingTokens.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgStoreCode":case"/cosmwasm.wasm.v1.MsgStoreCode":return p.MsgStoreCode.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgMigrateCode":return p.MsgMigrateCode.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgInstantiateContract":case"/cosmwasm.wasm.v1.MsgInstantiateContract":return p.MsgInstantiateContract.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgExecuteContract":case"/cosmwasm.wasm.v1.MsgExecuteContract":return p.MsgExecuteContract.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgMigrateContract":case"/cosmwasm.wasm.v1beta1.MsgMigrateContract":return p.MsgMigrateContract.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgUpdateContractAdmin":case"/cosmwasm.wasm.v1beta1.MsgUpdateAdmin":return p.MsgUpdateContractAdmin.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgClearContractAdmin":case"/cosmwasm.wasm.v1.MsgClearAdmin":return p.MsgClearContractAdmin.unpackAny(e,t);case"/ibc.applications.transfer.v1.MsgTransfer":return b.MsgTransfer.unpackAny(e,t);case"/ibc.core.client.v1.MsgCreateClient":return m.MsgCreateClient.unpackAny(e,t);case"/ibc.core.client.v1.MsgUpdateClient":return m.MsgUpdateClient.unpackAny(e,t);case"/ibc.core.client.v1.MsgUpgradeClient":return m.MsgUpgradeClient.unpackAny(e,t);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return m.MsgSubmitMisbehaviour.unpackAny(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return h.MsgConnectionOpenInit.unpackAny(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return h.MsgConnectionOpenTry.unpackAny(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return h.MsgConnectionOpenConfirm.unpackAny(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return h.MsgConnectionOpenAck.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelOpenInit":return g.MsgChannelOpenInit.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelOpenTry":return g.MsgChannelOpenTry.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return g.MsgChannelOpenConfirm.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelOpenAck":return g.MsgChannelOpenAck.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelCloseInit":return g.MsgChannelCloseInit.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return g.MsgChannelCloseConfirm.unpackAny(e,t);case"/ibc.core.channel.v1.MsgRecvPacket":return g.MsgRecvPacket.unpackAny(e,t);case"/ibc.core.channel.v1.MsgAcknowledgement":return g.MsgAcknowledgement.unpackAny(e,t);case"/ibc.core.channel.v1.MsgTimeout":return g.MsgTimeout.unpackAny(e,t);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return g.MsgTimeoutOnClose.unpackAny(e,t);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return y.MsgVerifyInvariant.unpackAny(e,t);default:throw Error("not supported msg ".concat(e.typeUrl))}}}(t.Msg||(t.Msg={}))},36853:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiSignature=void 0;var a=n(44611),o=n(90048),r=n(99540),i=function(){function e(e){this.multisig_pubkey=e;var t=e.pubkeys.length;this.bitarray=o.CompactBitArray.fromBits(t),this.signatures=[]}return e.prototype.appendSignature=function(e,t){var n=this.bitarray.numTrueBitsBefore(t);this.bitarray.getIndex(t)?this.signatures[n]=e:(this.bitarray.setIndex(t,!0),n!=this.signatures.length?this.signatures.splice(n,0,e):this.signatures.push(e))},e.prototype.appendSignatureFromPubKey=function(e,t){var n=this.multisig_pubkey.pubkeys.findIndex((function(e){return e.key===t.key}));if(-1==n)throw new Error("provided key doesn't exist in public_keys");this.appendSignature(e,n)},e.prototype.appendSignatureV2s=function(e){for(var t=0,n=e;t127)throw new Error("Encoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.PutUvarint implementation from the Go standard library and write some tests.");return[t]};!function(e){e.fromAmino=function(e){switch(e.type){case"tendermint/PubKeySecp256k1":return h.fromAmino(e);case"tendermint/PubKeyMultisigThreshold":return g.fromAmino(e);case"tendermint/PubKeyEd25519":return y.fromAmino(e)}},e.fromData=function(e){switch(e["@type"]){case"/cosmos.crypto.secp256k1.PubKey":return h.fromData(e);case"/cosmos.crypto.multisig.LegacyAminoPubKey":return g.fromData(e);case"/cosmos.crypto.ed25519.PubKey":return y.fromData(e)}},e.fromProto=function(e){var t=e.typeUrl;if("/cosmos.crypto.secp256k1.PubKey"===t)return h.unpackAny(e);if("/cosmos.crypto.multisig.LegacyAminoPubKey"===t)return g.unpackAny(e);if("/cosmos.crypto.ed25519.PubKey"===t)return y.unpackAny(e);throw new Error("Pubkey type ".concat(t," not recognized"))}}(t.PublicKey||(t.PublicKey={}));var h=function(e){function t(t){var n=e.call(this)||this;return n.key=t,n}return o(t,e),t.fromAmino=function(e){return new t(e.value)},t.prototype.toAmino=function(){return{type:"tendermint/PubKeySecp256k1",value:this.key}},t.fromData=function(e){return new t(e.key)},t.prototype.toData=function(){return{"@type":"/cosmos.crypto.secp256k1.PubKey",key:this.key}},t.fromProto=function(e){return new t(a.from(e.key).toString("base64"))},t.prototype.toProto=function(){return u.PubKey.fromPartial({key:a.from(this.key,"base64")})},t.prototype.packAny=function(){return c.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:u.PubKey.encode(this.toProto()).finish()})},t.unpackAny=function(e){return t.fromProto(u.PubKey.decode(e.value))},t.prototype.encodeAminoPubkey=function(){return a.concat([f,a.from(this.key,"base64")])},t.prototype.rawAddress=function(){var e=a.from(this.key,"base64");return(0,i.ripemd160)((0,i.sha256)(e))},t.prototype.address=function(){return l.bech32.encode("terra",l.bech32.toWords(this.rawAddress()))},t.prototype.pubkeyAddress=function(){return l.bech32.encode("terrapub",l.bech32.toWords(this.encodeAminoPubkey()))},t}(r.JSONSerializable);t.SimplePublicKey=h;var g=function(e){function t(t,n){var a=e.call(this)||this;return a.threshold=t,a.pubkeys=n,a}return o(t,e),t.prototype.encodeAminoPubkey=function(){var e=Array.from(b);e.push(8),e.push.apply(e,m(this.threshold));for(var t=0,n=this.pubkeys.map((function(e){return e.encodeAminoPubkey()}));t0?e.toFixed():void 0,revision_height:t>0?t.toFixed():void 0}},t.fromData=function(e){var n=e.revision_number,a=e.revision_height;return new t(Number.parseInt(n),Number.parseInt(a))},t.prototype.toData=function(){var e=this.revision_number,t=this.revision_height;return{revision_number:e.toFixed(),revision_height:t.toFixed()}},t.fromProto=function(e){return new t(e.revisionNumber.toNumber(),e.revisionHeight.toNumber())},t.prototype.toProto=function(){var e=this.revision_number,t=this.revision_height;return s.Height.fromPartial({revisionNumber:c.fromNumber(e),revisionHeight:c.fromNumber(t)})},t}(n(90743).JSONSerializable);t.Height=u},84545:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.IdentifiedClientState=void 0;var o=n(39553),r=function(e){function t(t,n){var a=e.call(this)||this;return a.client_id=t,a.client_state=n,a}return a(t,e),t.fromAmino=function(e){return new t(e.client_id,e.client_state)},t.prototype.toAmino=function(){return{client_id:this.client_id,client_state:this.client_state}},t.fromData=function(e){return new t(e.client_id,e.client_state)},t.prototype.toData=function(){return{client_id:this.client_id,client_state:this.client_state}},t.fromProto=function(e){return new t(e.clientId,e.clientState)},t.prototype.toProto=function(){var e=this.client_id,t=this.client_state;return o.IdentifiedClientState.fromPartial({clientId:e,clientState:t})},t}(n(90743).JSONSerializable);t.IdentifiedClientState=r},95362:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MerklePrefix=void 0;var r=n(76557),i=function(e){function t(t){var n=e.call(this)||this;return n.key_prefix=t,n}return o(t,e),t.fromAmino=function(e){return new t(e.key_prefix)},t.prototype.toAmino=function(){return{key_prefix:this.key_prefix}},t.fromData=function(e){return new t(e.key_prefix)},t.prototype.toData=function(){return{key_prefix:this.key_prefix}},t.fromProto=function(e){return new t(a.from(e.keyPrefix).toString("base64"))},t.prototype.toProto=function(){var e=this.key_prefix;return r.MerklePrefix.fromPartial({keyPrefix:a.from(e,"base64")})},t}(n(90743).JSONSerializable);t.MerklePrefix=i},76530:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Counterparty=void 0;var o=n(97672),r=n(90743),i=n(95362),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.client_id=t,o.connection_id=n,o.prefix=a,o}return a(t,e),t.fromAmino=function(e){var n=e.client_id,a=e.connection_id,o=e.prefix;return new t(n,a,o?i.MerklePrefix.fromAmino(o):void 0)},t.prototype.toAmino=function(){var e=this;return{client_id:e.client_id,connection_id:e.connection_id,prefix:e.prefix}},t.fromData=function(e){var n=e.client_id,a=e.connection_id,o=e.prefix;return new t(n,a,o?i.MerklePrefix.fromData(o):void 0)},t.prototype.toData=function(){var e=this,t=e.client_id,n=e.connection_id,a=e.prefix;return{client_id:t,connection_id:n,prefix:a?a.toData():void 0}},t.fromProto=function(e){return new t(e.clientId,e.connectionId,e.prefix?i.MerklePrefix.fromProto(e.prefix):void 0)},t.prototype.toProto=function(){var e=this,t=e.client_id,n=e.connection_id,a=e.prefix;return o.Counterparty.fromPartial({clientId:t,connectionId:n,prefix:a?a.toProto():void 0})},t}(r.JSONSerializable);t.Counterparty=s},65972:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IdentifiedConnection=t.stateToJSON=t.stateFromJSON=t.State=void 0;var r=n(97672),i=n(90743),s=n(5767),c=n(97672);Object.defineProperty(t,"State",{enumerable:!0,get:function(){return c.State}}),Object.defineProperty(t,"stateFromJSON",{enumerable:!0,get:function(){return c.stateFromJSON}}),Object.defineProperty(t,"stateToJSON",{enumerable:!0,get:function(){return c.stateToJSON}});var u=n(76530),d=o(n(29600)),l=function(e){function t(t,n,a,o,r,i){var s=e.call(this)||this;return s.id=t,s.client_id=n,s.versions=a,s.state=o,s.counterparty=r,s.delay_period=i,s}return a(t,e),t.fromAmino=function(e){var n=e.id,a=e.client_id,o=e.versions,r=e.state,i=e.counterparty,d=e.delay_period;return new t(n,a,o.map(s.Version.fromAmino),(0,c.stateFromJSON)(r),i?u.Counterparty.fromAmino(i):void 0,Number.parseInt(d))},t.prototype.toAmino=function(){var e=this,t=e.id,n=e.client_id,a=e.versions,o=e.state,r=e.counterparty,i=e.delay_period;return{id:t,client_id:n,versions:a.map((function(e){return e.toAmino()})),state:(0,c.stateToJSON)(o),counterparty:null===r||void 0===r?void 0:r.toAmino(),delay_period:i.toFixed()}},t.fromData=function(e){var n=e.id,a=e.client_id,o=e.versions,r=e.state,i=e.counterparty,d=e.delay_period;return new t(n,a,o.map(s.Version.fromData),(0,c.stateFromJSON)(r),i?u.Counterparty.fromData(i):void 0,Number.parseInt(d))},t.prototype.toData=function(){var e=this,t=e.id,n=e.client_id,a=e.versions,o=e.state,r=e.counterparty,i=e.delay_period;return{id:t,client_id:n,versions:a.map((function(e){return e.toData()})),state:(0,c.stateToJSON)(o),counterparty:null===r||void 0===r?void 0:r.toData(),delay_period:i.toFixed()}},t.fromProto=function(e){return new t(e.id,e.clientId,e.versions.map(s.Version.fromProto),e.state,e.counterparty?u.Counterparty.fromProto(e.counterparty):void 0,e.delayPeriod.toNumber())},t.prototype.toProto=function(){var e=this,t=e.id,n=e.client_id,a=e.versions,o=e.state,i=e.counterparty,s=e.delay_period;return r.IdentifiedConnection.fromPartial({id:t,clientId:n,versions:a.map((function(e){return e.toProto()})),state:o,counterparty:null===i||void 0===i?void 0:i.toProto(),delayPeriod:d.default.fromNumber(s)})},t}(i.JSONSerializable);t.IdentifiedConnection=l},5767:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Version=void 0;var o=n(97672),r=function(e){function t(t,n){var a=e.call(this)||this;return a.identifier=t,a.features=n,a}return a(t,e),t.fromAmino=function(e){return new t(e.identifier,e.features)},t.prototype.toAmino=function(){return{identifier:this.identifier,features:this.features}},t.fromData=function(e){return new t(e.identifier,e.features)},t.prototype.toData=function(){return{identifier:this.identifier,features:this.features}},t.fromProto=function(e){return new t(e.identifier,e.features)},t.prototype.toProto=function(){var e=this.identifier,t=this.features;return o.Version.fromPartial({identifier:e,features:t})},t}(n(90743).JSONSerializable);t.Version=r},238:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(76530),t),o(n(5767),t),o(n(65972),t)},51124:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Header=void 0;var o=n(90743),r=n(53855),i=n(97045),s=n(55695),c=n(85920),u=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.signedHeader=t,r.validatorSet=n,r.trustedHeight=a,r.trustedValidators=o,r}return a(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.signed_header,a=e.validator_set,o=e.trusted_height,r=e.trusted_validators;return new t(n?s.SignedHeader.fromData(n):void 0,a?s.ValidatorSet.fromData(a):void 0,o?i.Height.fromData(o):void 0,r?s.ValidatorSet.fromData(r):void 0)},t.prototype.toData=function(){var e=this,t=e.signedHeader,n=e.validatorSet,a=e.trustedHeight,o=e.trustedValidators;return{signed_header:(null===t||void 0===t?void 0:t.toData())||void 0,validator_set:(null===n||void 0===n?void 0:n.toData())||void 0,trusted_height:(null===a||void 0===a?void 0:a.toData())||void 0,trusted_validators:(null===o||void 0===o?void 0:o.toData())||void 0}},t.fromProto=function(e){var n=e.signedHeader,a=e.validatorSet,o=e.trustedHeight,r=e.trustedValidators;return new t(n?s.SignedHeader.fromProto(n):void 0,a?s.ValidatorSet.fromProto(a):void 0,o?i.Height.fromProto(o):void 0,r?s.ValidatorSet.fromProto(r):void 0)},t.prototype.toProto=function(){var e=this,t=e.signedHeader,n=e.validatorSet,a=e.trustedHeight,o=e.trustedValidators;return r.Header.fromPartial({signedHeader:(null===t||void 0===t?void 0:t.toProto())||void 0,validatorSet:(null===n||void 0===n?void 0:n.toProto())||void 0,trustedHeight:(null===a||void 0===a?void 0:a.toProto())||void 0,trustedValidators:(null===o||void 0===o?void 0:o.toProto())||void 0})},t.prototype.packAny=function(){return c.Any.fromPartial({typeUrl:"ibc.lightclients.tendermint.v1.Header",value:r.Header.encode(this.toProto()).finish()})},t.unpackAny=function(e){return t.fromProto(r.Header.decode(e.value))},t}(o.JSONSerializable);t.Header=u},58367:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelCloseConfirm=void 0;var r=n(90743),i=n(85920),s=n(97045),c=n(99148),u=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.port_id=t,i.channel_id=n,i.proof_init=a,i.proof_height=o,i.signer=r,i}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.port_id,o=e.channel_id,r=e.proof_init,i=e.proof_height,c=e.signer;return new t(a,o,r,i?s.Height.fromData(i):void 0,c)},t.prototype.toData=function(e){var t=this,n=t.port_id,a=t.channel_id,o=t.proof_init,r=t.proof_height,i=t.signer;return{"@type":"/ibc.core.channel.v1.MsgChannelCloseConfirm",port_id:n,channel_id:a,proof_init:o,proof_height:r?r.toData():void 0,signer:i}},t.fromProto=function(e,n){return new t(e.portId,e.channelId,a.from(e.proofInit).toString("base64"),e.proofHeight?s.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,o=t.channel_id,r=t.proof_init,i=t.proof_height,s=t.signer;return c.MsgChannelCloseConfirm.fromPartial({portId:n,channelId:o,proofInit:a.from(r,"base64"),proofHeight:i?i.toProto():void 0,signer:s})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirm",value:c.MsgChannelCloseConfirm.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.MsgChannelCloseConfirm.decode(e.value))},t}(r.JSONSerializable);t.MsgChannelCloseConfirm=u},16186:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelCloseInit=void 0;var o=n(90743),r=n(85920),i=n(99148),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.port_id=t,o.channel_id=n,o.signer=a,o}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){return new t(e.port_id,e.channel_id,e.signer)},t.prototype.toData=function(e){var t=this;return{"@type":"/ibc.core.channel.v1.MsgChannelCloseInit",port_id:t.port_id,channel_id:t.channel_id,signer:t.signer}},t.fromProto=function(e,n){return new t(e.portId,e.channelId,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,a=t.channel_id,o=t.signer;return i.MsgChannelCloseInit.fromPartial({portId:n,channelId:a,signer:o})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInit",value:i.MsgChannelCloseInit.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.MsgChannelCloseInit.decode(e.value))},t}(o.JSONSerializable);t.MsgChannelCloseInit=s},94822:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelOpenAck=void 0;var r=n(90743),i=n(85920),s=n(97045),c=n(99148),u=function(e){function t(t,n,a,o,r,i,s){var c=e.call(this)||this;return c.port_id=t,c.channel_id=n,c.counterparty_channel_id=a,c.counterparty_version=o,c.proof_try=r,c.proof_height=i,c.signer=s,c}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.port_id,o=e.channel_id,r=e.counterparty_channel_id,i=e.counterparty_version,c=e.proof_try,u=e.proof_height,d=e.signer;return new t(a,o,r,i,c,u?s.Height.fromData(u):void 0,d)},t.prototype.toData=function(e){var t=this,n=t.port_id,a=t.channel_id,o=t.counterparty_channel_id,r=t.counterparty_version,i=t.proof_try,s=t.proof_height,c=t.signer;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenAck",port_id:n,channel_id:a,counterparty_channel_id:o,counterparty_version:r,proof_try:i,proof_height:s?s.toData():void 0,signer:c}},t.fromProto=function(e,n){return new t(e.portId,e.channelId,e.counterpartyChannelId,e.counterpartyVersion,a.from(e.proofTry).toString("base64"),e.proofHeight?s.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,o=t.channel_id,r=t.counterparty_channel_id,i=t.counterparty_version,s=t.proof_try,u=t.proof_height,d=t.signer;return c.MsgChannelOpenAck.fromPartial({portId:n,channelId:o,counterpartyChannelId:r,counterpartyVersion:i,proofTry:a.from(s,"base64"),proofHeight:u?u.toProto():void 0,signer:d})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAck",value:c.MsgChannelOpenAck.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.MsgChannelOpenAck.decode(e.value))},t}(r.JSONSerializable);t.MsgChannelOpenAck=u},18915:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelOpenConfirm=void 0;var r=n(90743),i=n(85920),s=n(97045),c=n(99148),u=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.port_id=t,i.channel_id=n,i.proof_ack=a,i.proof_height=o,i.signer=r,i}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.port_id,o=e.channel_id,r=e.proof_ack,i=e.proof_height,c=e.signer;return new t(a,o,r,i?s.Height.fromData(i):void 0,c)},t.prototype.toData=function(e){var t=this,n=t.port_id,a=t.channel_id,o=t.proof_ack,r=t.proof_height,i=t.signer;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenConfirm",port_id:n,channel_id:a,proof_ack:o,proof_height:r?r.toData():void 0,signer:i}},t.fromProto=function(e,n){return new t(e.portId,e.channelId,a.from(e.proofAck).toString("base64"),e.proofHeight?s.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,o=t.channel_id,r=t.proof_ack,i=t.proof_height,s=t.signer;return c.MsgChannelOpenConfirm.fromPartial({portId:n,channelId:o,proofAck:a.from(r,"base64"),proofHeight:i?i.toProto():void 0,signer:s})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirm",value:c.MsgChannelOpenConfirm.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.MsgChannelOpenConfirm.decode(e.value))},t}(r.JSONSerializable);t.MsgChannelOpenConfirm=u},42716:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelOpenInit=void 0;var o=n(90743),r=n(85920),i=n(4512),s=n(99148),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.port_id=t,o.channel=n,o.signer=a,o}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.port_id,o=e.channel,r=e.signer;return new t(a,o?i.Channel.fromData(o):void 0,r)},t.prototype.toData=function(e){var t=this,n=t.port_id,a=t.channel,o=t.signer;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenInit",port_id:n,channel:a?a.toData():void 0,signer:o}},t.fromProto=function(e,n){return new t(e.portId,e.channel?i.Channel.fromProto(e.channel):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,a=t.channel,o=t.signer;return s.MsgChannelOpenInit.fromPartial({portId:n,channel:a?a.toProto():void 0,signer:o})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInit",value:s.MsgChannelOpenInit.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgChannelOpenInit.decode(e.value))},t}(o.JSONSerializable);t.MsgChannelOpenInit=c},95864:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelOpenTry=void 0;var r=n(90743),i=n(85920),s=n(4512),c=n(97045),u=n(99148),d=function(e){function t(t,n,a,o,r,i,s){var c=e.call(this)||this;return c.port_id=t,c.previous_channel_id=n,c.channel=a,c.counterparty_version=o,c.proof_init=r,c.proof_height=i,c.signer=s,c}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.port_id,o=e.previous_channel_id,r=e.channel,i=e.counterparty_version,u=e.proof_init,d=e.proof_height,l=e.signer;return new t(a,o,r?s.Channel.fromData(r):void 0,i,u,d?c.Height.fromData(d):void 0,l)},t.prototype.toData=function(e){var t=this,n=t.port_id,a=t.previous_channel_id,o=t.channel,r=t.counterparty_version,i=t.proof_init,s=t.proof_height,c=t.signer;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenTry",port_id:n,previous_channel_id:a,channel:o?o.toData():void 0,counterparty_version:r,proof_init:i,proof_height:s?s.toData():void 0,signer:c}},t.fromProto=function(e,n){return new t(e.portId,e.previousChannelId,e.channel?s.Channel.fromProto(e.channel):void 0,e.counterpartyVersion,a.from(e.proofInit).toString("base64"),e.proofHeight?c.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,o=t.previous_channel_id,r=t.channel,i=t.counterparty_version,s=t.proof_init,c=t.proof_height,d=t.signer;return u.MsgChannelOpenTry.fromPartial({portId:n,previousChannelId:o,channel:r?r.toProto():void 0,counterpartyVersion:i,proofInit:a.from(s,"base64"),proofHeight:c?c.toProto():void 0,signer:d})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTry",value:u.MsgChannelOpenTry.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(u.MsgChannelOpenTry.decode(e.value))},t}(r.JSONSerializable);t.MsgChannelOpenTry=d},59526:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgAcknowledgement=void 0;var r=n(90743),i=n(85920),s=n(97045),c=n(37977),u=n(99148),d=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.packet=t,i.acknowledgement=n,i.proof_acked=a,i.proof_height=o,i.signer=r,i}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.packet,o=e.acknowledgement,r=e.proof_acked,i=e.proof_height,u=e.signer;return new t(a?c.Packet.fromData(a):void 0,r,o,i?s.Height.fromData(i):void 0,u)},t.prototype.toData=function(e){var t=this,n=t.packet,a=t.acknowledgement,o=t.proof_acked,r=t.proof_height,i=t.signer;return{"@type":"/ibc.core.channel.v1.MsgAcknowledgement",packet:n?n.toData():void 0,acknowledgement:a,proof_acked:o,proof_height:r?r.toData():void 0,signer:i}},t.fromProto=function(e,n){return new t(e.packet?c.Packet.fromProto(e.packet):void 0,a.from(e.acknowledgement).toString("base64"),a.from(e.proofAcked).toString("base64"),e.proofHeight?s.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.packet,o=t.acknowledgement,r=t.proof_acked,i=t.proof_height,s=t.signer;return u.MsgAcknowledgement.fromPartial({packet:n?n.toProto():void 0,acknowledgement:a.from(o,"base64"),proofAcked:a.from(r,"base64"),proofHeight:i?i.toProto():void 0,signer:s})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgAcknowledgement",value:u.MsgAcknowledgement.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(u.MsgAcknowledgement.decode(e.value))},t}(r.JSONSerializable);t.MsgAcknowledgement=d},81989:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgRecvPacket=void 0;var r=n(90743),i=n(85920),s=n(97045),c=n(37977),u=n(99148),d=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.packet=t,r.proof_commitment=n,r.proof_height=a,r.signer=o,r}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.packet,o=e.proof_commitment,r=e.proof_height,i=e.signer;return new t(a?c.Packet.fromData(a):void 0,o,r?s.Height.fromData(r):void 0,i)},t.prototype.toData=function(e){var t=this,n=t.packet,a=t.proof_commitment,o=t.proof_height,r=t.signer;return{"@type":"/ibc.core.channel.v1.MsgRecvPacket",packet:n?n.toData():void 0,proof_commitment:a,proof_height:o?o.toData():void 0,signer:r}},t.fromProto=function(e,n){return new t(e.packet?c.Packet.fromProto(e.packet):void 0,a.from(e.proofCommitment).toString("base64"),e.proofHeight?s.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.packet,o=t.proof_commitment,r=t.proof_height,i=t.signer;return u.MsgRecvPacket.fromPartial({packet:n?n.toProto():void 0,proofCommitment:a.from(o,"base64"),proofHeight:r?r.toProto():void 0,signer:i})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgRecvPacket",value:u.MsgRecvPacket.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(u.MsgRecvPacket.decode(e.value))},t}(r.JSONSerializable);t.MsgRecvPacket=d},3323:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgTimeout=void 0;var i=n(90743),s=n(85920),c=n(97045),u=n(37977),d=n(99148),l=r(n(29600)),f=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.packet=t,i.proof_unreceived=n,i.proof_height=a,i.next_sequence_recv=o,i.signer=r,i}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.packet,o=e.proof_unreceived,r=e.proof_height,i=e.next_sequence_recv,s=e.signer;return new t(a?u.Packet.fromData(a):void 0,o,r?c.Height.fromData(r):void 0,Number.parseInt(i),s)},t.prototype.toData=function(e){var t=this,n=t.packet,a=t.proof_unreceived,o=t.proof_height,r=t.next_sequence_recv,i=t.signer;return{"@type":"/ibc.core.channel.v1.MsgTimeout",packet:n?n.toData():void 0,proof_unreceived:a,proof_height:o?o.toData():void 0,next_sequence_recv:r.toFixed(),signer:i}},t.fromProto=function(e,n){return new t(e.packet?u.Packet.fromProto(e.packet):void 0,a.from(e.proofUnreceived).toString("base64"),e.proofHeight?c.Height.fromProto(e.proofHeight):void 0,e.nextSequenceRecv.toNumber(),e.signer)},t.prototype.toProto=function(e){var t=this,n=t.packet,o=t.proof_unreceived,r=t.proof_height,i=t.next_sequence_recv,s=t.signer;return d.MsgTimeout.fromPartial({packet:n?n.toProto():void 0,proofUnreceived:a.from(o,"base64"),proofHeight:r?r.toProto():void 0,nextSequenceRecv:l.default.fromNumber(i),signer:s})},t.prototype.packAny=function(e){return s.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeout",value:d.MsgTimeout.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(d.MsgTimeout.decode(e.value))},t}(i.JSONSerializable);t.MsgTimeout=f},10165:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgTimeoutOnClose=void 0;var i=n(90743),s=n(85920),c=n(97045),u=n(37977),d=n(99148),l=r(n(29600)),f=function(e){function t(t,n,a,o,r,i){var s=e.call(this)||this;return s.packet=t,s.proof_unreceived=n,s.proof_close=a,s.proof_height=o,s.next_sequence_recv=r,s.signer=i,s}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.packet,o=e.proof_unreceived,r=e.proof_close,i=e.proof_height,s=e.next_sequence_recv,d=e.signer;return new t(a?u.Packet.fromData(a):void 0,r,o,i?c.Height.fromData(i):void 0,Number.parseInt(s),d)},t.prototype.toData=function(e){var t=this,n=t.packet,a=t.proof_unreceived,o=t.proof_close,r=t.proof_height,i=t.next_sequence_recv,s=t.signer;return{"@type":"/ibc.core.channel.v1.MsgTimeoutOnClose",packet:n?n.toData():void 0,proof_unreceived:a,proof_close:o,proof_height:r?r.toData():void 0,next_sequence_recv:i.toFixed(),signer:s}},t.fromProto=function(e,n){return new t(e.packet?u.Packet.fromProto(e.packet):void 0,a.from(e.proofUnreceived).toString("base64"),a.from(e.proofClose).toString("base64"),e.proofHeight?c.Height.fromProto(e.proofHeight):void 0,e.nextSequenceRecv.toNumber(),e.signer)},t.prototype.toProto=function(e){var t=this,n=t.packet,o=t.proof_unreceived,r=t.proof_close,i=t.proof_height,s=t.next_sequence_recv,c=t.signer;return d.MsgTimeoutOnClose.fromPartial({packet:n?n.toProto():void 0,proofUnreceived:a.from(o,"base64"),proofClose:a.from(r,"base64"),proofHeight:i?i.toProto():void 0,nextSequenceRecv:l.default.fromNumber(s),signer:c})},t.prototype.packAny=function(e){return s.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnClose",value:d.MsgTimeoutOnClose.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(d.MsgTimeoutOnClose.decode(e.value))},t}(i.JSONSerializable);t.MsgTimeoutOnClose=f},10535:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(42716),t),o(n(95864),t),o(n(18915),t),o(n(94822),t),o(n(16186),t),o(n(58367),t),o(n(81989),t),o(n(59526),t),o(n(3323),t),o(n(10165),t)},80198:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgCreateClient=void 0;var o=n(90743),r=n(85920),i=n(26864),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.client_state=t,o.consensus_state=n,o.signer=a,o}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){return new t(e.client_state,e.consensus_state,e.signer)},t.prototype.toData=function(e){var t=this;return{"@type":"/ibc.core.client.v1.MsgCreateClient",client_state:t.client_state,consensus_state:t.consensus_state,signer:t.signer}},t.fromProto=function(e,n){return new t(e.clientState,e.consensusState,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.client_state,a=t.consensus_state,o=t.signer;return i.MsgCreateClient.fromPartial({clientState:n,consensusState:a,signer:o})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgCreateClient",value:i.MsgCreateClient.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.MsgCreateClient.decode(e.value))},t}(o.JSONSerializable);t.MsgCreateClient=s},18278:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgSubmitMisbehaviour=void 0;var o=n(90743),r=n(85920),i=n(26864),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.client_id=t,o.misbehaviour=n,o.signer=a,o}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){return new t(e.client_id,e.misbehaviour,e.signer)},t.prototype.toData=function(e){var t=this;return{"@type":"/ibc.core.client.v1.MsgSubmitMisbehaviour",client_id:t.client_id,misbehaviour:t.misbehaviour,signer:t.signer}},t.fromProto=function(e,n){return new t(e.clientId,e.misbehaviour,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.client_id,a=t.misbehaviour,o=t.signer;return i.MsgSubmitMisbehaviour.fromPartial({clientId:n,misbehaviour:a,signer:o})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviour",value:i.MsgSubmitMisbehaviour.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.MsgSubmitMisbehaviour.decode(e.value))},t}(o.JSONSerializable);t.MsgSubmitMisbehaviour=s},86885:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgUpdateClient=void 0;var o=n(90743),r=n(85920),i=n(26864),s=n(51124),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.client_id=t,o.header=n,o.signer=a,o}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.client_id,o=e.header,r=e.signer;return new t(a,o?s.Header.fromData(o):void 0,r)},t.prototype.toData=function(e){var t=this,n=t.client_id,a=t.header,o=t.signer;return{"@type":"/ibc.core.client.v1.MsgUpdateClient",client_id:n,header:(null===a||void 0===a?void 0:a.toData())||void 0,signer:o}},t.fromProto=function(e,n){return new t(e.clientId,e.header?s.Header.unpackAny(e.header):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.client_id,a=t.header,o=t.signer;return i.MsgUpdateClient.fromPartial({clientId:n,header:(null===a||void 0===a?void 0:a.packAny())||void 0,signer:o})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateClient",value:i.MsgUpdateClient.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.MsgUpdateClient.decode(e.value))},t}(o.JSONSerializable);t.MsgUpdateClient=c},45537:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgUpgradeClient=void 0;var r=n(90743),i=n(85920),s=n(26864),c=function(e){function t(t,n,a,o,r,i){var s=e.call(this)||this;return s.client_id=t,s.client_state=n,s.consensus_state=a,s.proof_upgrade_client=o,s.proof_upgrade_consensus_state=r,s.signer=i,s}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){return new t(e.client_id,e.client_state,e.consensus_state,e.proof_upgrade_client,e.proof_upgrade_consensus_state,e.signer)},t.prototype.toData=function(e){var t=this;return{"@type":"/ibc.core.client.v1.MsgUpgradeClient",client_id:t.client_id,client_state:t.client_state,consensus_state:t.consensus_state,proof_upgrade_client:t.proof_upgrade_client,proof_upgrade_consensus_state:t.proof_upgrade_consensus_state,signer:t.signer}},t.fromProto=function(e,n){return new t(e.clientId,e.clientState,e.consensusState,a.from(e.proofUpgradeClient).toString("base64"),a.from(e.proofUpgradeConsensusState).toString("base64"),e.signer)},t.prototype.toProto=function(e){var t=this,n=t.client_id,o=t.client_state,r=t.consensus_state,i=t.proof_upgrade_client,c=t.proof_upgrade_consensus_state,u=t.signer;return s.MsgUpgradeClient.fromPartial({clientId:n,clientState:o,consensusState:r,proofUpgradeClient:a.from(i,"base64"),proofUpgradeConsensusState:a.from(c,"base64"),signer:u})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpgradeClient",value:s.MsgUpgradeClient.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgUpgradeClient.decode(e.value))},t}(r.JSONSerializable);t.MsgUpgradeClient=c},45319:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(80198),t),o(n(86885),t),o(n(45537),t),o(n(18278),t)},64559:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=t.Proof=void 0;var c=n(46760),u=n(52620),d=s(n(29600)),l=n(90743),f=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.total=t,r.index=n,r.leafHash=a,r.aunts=o,r}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.total,a=e.index,o=e.leaf_hash,r=e.aunts;return new t(Number.parseInt(n),Number.parseInt(a),o,r)},t.prototype.toData=function(){var e=this,t=e.total,n=e.index,a=e.leafHash,o=e.aunts;return{total:t.toFixed(),index:n.toFixed(),leaf_hash:a,aunts:o}},t.fromProto=function(e){return new t(e.total.toNumber(),e.index.toNumber(),a.from(e.leafHash).toString("base64"),e.aunts.map((function(e){return a.from(e).toString("base64")})))},t.prototype.toProto=function(){var e=this,t=e.total,n=e.index,o=e.leafHash,r=e.aunts;return c.Proof.fromPartial({total:d.fromNumber(t),index:d.fromNumber(n),leafHash:a.from(o,"base64"),aunts:r.map((function(e){return a.from(e,"base64")}))})},t}(l.JSONSerializable);t.Proof=f;var p=function(e){function t(t,n){var a=e.call(this)||this;return a.ed25519=t,a.secp256k1=n,a}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){return new t(e.ed25519,e.secp256k1)},t.prototype.toData=function(){return{ed25519:this.ed25519,secp256k1:this.secp256k1}},t.fromProto=function(e){var n=e.ed25519,o=e.secp256k1;return new t(n?a.from(n).toString("base64"):void 0,o?a.from(o).toString("base64"):void 0)},t.prototype.toProto=function(){var e=this.ed25519,t=this.secp256k1;return u.PublicKey.fromPartial({ed25519:e?a.from(e,"base64"):void 0,secp256k1:t?a.from(t,"base64"):void 0})},t}(l.JSONSerializable);t.PublicKey=p},55695:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=t.ValidatorSet=t.CommitSig=t.Commit=t.PartSetHeader=t.BlockID=t.SignedHeader=t.Header=void 0;var c=n(78750),u=n(50262),d=s(n(29600)),l=n(90743),f=n(55736),p=n(64559),b=function(e){function t(t,n,a,o,r,i,s,c,u,d,l,f,p,b){var m=e.call(this)||this;return m.version=t,m.chainId=n,m.height=a,m.time=o,m.lastBlockId=r,m.lastCommitHash=i,m.dataHash=s,m.validatorsHash=c,m.nextValidatorsHash=u,m.consensusHash=d,m.appHash=l,m.lastResultsHash=f,m.evidenceHash=p,m.proposerAddress=b,m}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.version,a=e.chain_id,o=e.height,r=e.time,i=e.last_block_id,s=e.last_commit_hash,c=e.data_hash,u=e.validators_hash,d=e.next_validators_hash,l=e.consensus_hash,p=e.app_hash,b=e.last_results_hash,m=e.evidence_hash,g=e.proposer_address;return new t(n?f.Consensus.fromData(n):void 0,a,o,r?new Date(r):void 0,i?h.fromData(i):void 0,s,c,u,d,l,p,b,m,g)},t.prototype.toData=function(){var e=this,t=e.version,n=e.chainId,a=e.height,o=e.time,r=e.lastBlockId,i=e.lastCommitHash,s=e.dataHash,c=e.validatorsHash,u=e.nextValidatorsHash,d=e.consensusHash,l=e.appHash,f=e.lastResultsHash,p=e.evidenceHash,b=e.proposerAddress;return{version:null===t||void 0===t?void 0:t.toData(),chain_id:n,height:a,time:o?o.toISOString().replace(/\.000Z$/,"Z"):void 0,last_block_id:r?r.toData():void 0,last_commit_hash:i,data_hash:s,validators_hash:c,next_validators_hash:u,consensus_hash:d,app_hash:l,last_results_hash:f,evidence_hash:p,proposer_address:b}},t.fromProto=function(e){var n=e.version,o=e.chainId,r=e.height,i=e.time,s=e.lastBlockId,c=e.lastCommitHash,u=e.dataHash,d=e.validatorsHash,l=e.nextValidatorsHash,p=e.consensusHash,b=e.appHash,m=e.lastResultsHash,g=e.evidenceHash,y=e.proposerAddress;return new t(n?f.Consensus.fromProto(n):void 0,o,r.toString(),i,s?h.fromProto(s):void 0,a.from(c).toString("base64"),a.from(u).toString("base64"),a.from(d).toString("base64"),a.from(l).toString("base64"),a.from(p).toString("base64"),a.from(b).toString("base64"),a.from(m).toString("base64"),a.from(g).toString("base64"),y.toString())},t.prototype.toProto=function(){var e=this,t=e.version,n=e.chainId,o=e.height,r=e.time,i=e.lastBlockId,s=e.lastCommitHash,u=e.dataHash,l=e.validatorsHash,f=e.nextValidatorsHash,p=e.consensusHash,b=e.appHash,m=e.lastResultsHash,h=e.evidenceHash,g=e.proposerAddress;return c.Header.fromPartial({version:null===t||void 0===t?void 0:t.toProto(),chainId:n,height:d.fromString(o),time:r,lastBlockId:null===i||void 0===i?void 0:i.toProto(),lastCommitHash:a.from(s,"base64"),dataHash:a.from(u,"base64"),validatorsHash:a.from(l,"base64"),nextValidatorsHash:a.from(f,"base64"),consensusHash:a.from(p,"base64"),appHash:a.from(b,"base64"),lastResultsHash:a.from(m,"base64"),evidenceHash:a.from(h,"base64"),proposerAddress:a.from(g)})},t}(l.JSONSerializable);t.Header=b;var m=function(e){function t(t,n){var a=e.call(this)||this;return a.header=t,a.commit=n,a}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.header,a=e.commit;return new t(n?b.fromData(n):void 0,a?y.fromData(a):void 0)},t.prototype.toData=function(){var e=this.header,t=this.commit;return{header:null===e||void 0===e?void 0:e.toData(),commit:null===t||void 0===t?void 0:t.toData()}},t.fromProto=function(e){return new t(e.header?b.fromProto(e.header):void 0,e.commit?y.fromProto(e.commit):void 0)},t.prototype.toProto=function(){var e=this.header,t=this.commit;return c.SignedHeader.fromPartial({header:null===e||void 0===e?void 0:e.toProto(),commit:null===t||void 0===t?void 0:t.toProto()})},t}(l.JSONSerializable);t.SignedHeader=m;var h=function(e){function t(t,n){var a=e.call(this)||this;return a.hash=t,a.partSetHeader=n,a}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.hash,a=e.part_set_header;return new t(n,a?g.fromData(a):void 0)},t.prototype.toData=function(){var e=this.hash,t=this.partSetHeader;return{hash:e,part_set_header:null===t||void 0===t?void 0:t.toData()}},t.fromProto=function(e){return new t(a.from(e.hash).toString("base64"),e.partSetHeader?g.fromProto(e.partSetHeader):void 0)},t.prototype.toProto=function(){var e=this.hash,t=this.partSetHeader;return c.BlockID.fromPartial({hash:a.from(e,"base64"),partSetHeader:t?t.toProto():void 0})},t}(l.JSONSerializable);t.BlockID=h;var g=function(e){function t(t,n){var a=e.call(this)||this;return a.total=t,a.hash=n,a}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.total,a=e.hash;return new t(parseInt(n),a)},t.prototype.toData=function(){var e=this.total,t=this.hash;return{total:e.toFixed(),hash:t}},t.fromProto=function(e){return new t(e.total,a.from(e.hash).toString("base64"))},t.prototype.toProto=function(){var e=this.total,t=this.hash;return c.PartSetHeader.fromPartial({total:e,hash:a.from(t,"base64")})},t}(l.JSONSerializable);t.PartSetHeader=g;var y=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.height=t,r.round=n,r.blockId=a,r.signatures=o,r}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.height,a=e.round,o=e.block_id,r=e.signatures;return new t(d.fromString(n),Number.parseInt(a),o?h.fromData(o):void 0,r.map((function(e){return v.fromData(e)})))},t.prototype.toData=function(){var e=this,t=e.height,n=e.round,a=e.blockId,o=e.signatures;return{height:t.toString(),round:n.toFixed(),block_id:null===a||void 0===a?void 0:a.toData(),signatures:o.map((function(e){return e.toData()}))}},t.fromProto=function(e){var n=e.height,a=e.round,o=e.blockId,r=e.signatures;return new t(n,a,o?h.fromProto(o):void 0,r.map((function(e){return v.fromProto(e)})))},t.prototype.toProto=function(){var e=this,t=e.height,n=e.round,a=e.blockId,o=e.signatures;return c.Commit.fromPartial({height:t,round:n,blockId:null===a||void 0===a?void 0:a.toProto(),signatures:o.map((function(e){return e.toProto()}))})},t}(l.JSONSerializable);t.Commit=y;var v=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.blockIdFlag=t,r.validatorAddress=n,r.timestamp=a,r.signature=o,r}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.block_id_flag,a=e.validator_address,o=e.timestamp,r=e.signature;return new t((0,c.blockIDFlagFromJSON)(n),a,o?new Date(o):void 0,r)},t.prototype.toData=function(){var e=this,t=e.blockIdFlag,n=e.validatorAddress,a=e.timestamp,o=e.signature;return{block_id_flag:(0,c.blockIDFlagToJSON)(t),validator_address:n||"",timestamp:a?a.toISOString().replace(/\.000Z$/,"Z"):void 0,signature:o||""}},t.fromProto=function(e){var n=e.blockIdFlag,o=e.validatorAddress,r=e.timestamp,i=e.signature;return new t(n,a.from(o).toString("base64"),r,a.from(i).toString("base64"))},t.prototype.toProto=function(){var e=this,t=e.blockIdFlag,n=e.validatorAddress,o=e.timestamp,r=e.signature;return c.CommitSig.fromPartial({blockIdFlag:t,validatorAddress:n?a.from(n,"base64"):void 0,timestamp:o,signature:r?a.from(r,"base64"):void 0})},t}(l.JSONSerializable);t.CommitSig=v;var w=function(e){function t(t,n,a){var o=e.call(this)||this;return o.validators=t,o.proposer=n,o.totalVotingPower=a,o}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.validators,a=e.proposer,o=e.total_voting_power;return new t(n.map((function(e){return k.fromData(e)})),a?k.fromData(a):void 0,d.fromString(o))},t.prototype.toData=function(){var e=this,t=e.validators,n=e.proposer,a=e.totalVotingPower;return{validators:t.map((function(e){return e.toData()})),proposer:null===n||void 0===n?void 0:n.toData(),total_voting_power:a.toString()}},t.fromProto=function(e){var n=e.validators,a=e.proposer,o=e.totalVotingPower;return new t(n.map((function(e){return k.fromProto(e)})),a?k.fromProto(a):void 0,o)},t.prototype.toProto=function(){var e=this,t=e.validators,n=e.proposer,a=e.totalVotingPower;return u.ValidatorSet.fromPartial({validators:t.map((function(e){return e.toProto()})),proposer:(null===n||void 0===n?void 0:n.toProto())||void 0,totalVotingPower:a})},t}(l.JSONSerializable);t.ValidatorSet=w;var k=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.address=t,r.pubKey=n,r.votingPower=a,r.proposerPriority=o,r}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.address,a=e.pub_key,o=e.voting_power,r=e.proposer_priority;return new t(n,a?p.PublicKey.fromData(a):void 0,d.fromString(o),d.fromString(r))},t.prototype.toData=function(){var e=this,t=e.address,n=e.pubKey,a=e.votingPower,o=e.proposerPriority;return{address:t,pub_key:null===n||void 0===n?void 0:n.toData(),voting_power:a.toString(),proposer_priority:o.toString()}},t.fromProto=function(e){var n=e.address,o=e.pubKey,r=e.votingPower,i=e.proposerPriority;return new t(a.from(n).toString("base64"),o?p.PublicKey.fromProto(o):void 0,r,i)},t.prototype.toProto=function(){var e=this,t=e.address,n=e.pubKey,o=e.votingPower,r=e.proposerPriority;return u.Validator.fromPartial({address:a.from(t,"base64"),pubKey:(null===n||void 0===n?void 0:n.toProto())||void 0,votingPower:o,proposerPriority:r})},t}(l.JSONSerializable);t.Validator=k},55736:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.App=t.Consensus=void 0;var s=n(70897),c=n(70897),u=i(n(29600)),d=n(90743),l=function(e){function t(t,n){var a=e.call(this)||this;return a.block=t,a.app=n,a}return a(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.block,a=e.app;return new t(Number.parseInt(n),Number.parseInt(a))},t.prototype.toData=function(){var e=this.block,t=this.app;return{block:e.toFixed(),app:t.toFixed()}},t.fromProto=function(e){return new t(e.block.toNumber(),e.app.toNumber())},t.prototype.toProto=function(){var e=this.block,t=this.app;return s.Consensus.fromPartial({block:u.fromNumber(e),app:u.fromNumber(t)})},t}(d.JSONSerializable);t.Consensus=l;var f=function(e){function t(t,n){var a=e.call(this)||this;return a.protocol=t,a.software=n,a}return a(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.protocol,a=e.software;return new t(Number.parseInt(n),a)},t.prototype.toData=function(){var e=this.protocol,t=this.software;return{protocol:e.toFixed(),software:t}},t.fromProto=function(e){return new t(e.protocol.toNumber(),e.software)},t.prototype.toProto=function(){var e=this.protocol,t=this.software;return c.App.fromPartial({protocol:u.fromNumber(e),software:t})},t}(d.JSONSerializable);t.App=f},719:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgConnectionOpenAck=void 0;var r=n(90743),i=n(85920),s=n(5767),c=n(91592),u=n(97045),d=function(e){function t(t,n,a,o,r,i,s,c,u,d){var l=e.call(this)||this;return l.connection_id=t,l.counterparty_connection_id=n,l.version=a,l.client_state=o,l.proof_height=r,l.proof_try=i,l.proof_client=s,l.proof_consensus=c,l.consensus_height=u,l.signer=d,l}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.connection_id,o=e.counterparty_connection_id,r=e.version,i=e.client_state,c=e.proof_height,d=e.proof_try,l=e.proof_client,f=e.proof_consensus,p=e.consensus_height,b=e.signer;return new t(a,o,r?s.Version.fromData(r):void 0,i,c?u.Height.fromData(c):void 0,d,l,f,p?u.Height.fromData(p):void 0,b)},t.prototype.toData=function(e){var t=this,n=t.connection_id,a=t.counterparty_connection_id,o=t.version,r=t.client_state,i=t.proof_height,s=t.proof_try,c=t.proof_client,u=t.proof_consensus,d=t.consensus_height,l=t.signer;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenAck",connection_id:n,counterparty_connection_id:a,version:o?o.toData():void 0,client_state:r,proof_height:i?i.toData():void 0,proof_try:s,proof_client:c,proof_consensus:u,consensus_height:d?d.toData():void 0,signer:l}},t.fromProto=function(e,n){return new t(e.connectionId,e.counterpartyConnectionId,e.version?s.Version.fromProto(e.version):void 0,e.clientState,e.proofHeight?u.Height.fromProto(e.proofHeight):void 0,a.from(e.proofTry).toString("base64"),a.from(e.proofClient).toString("base64"),a.from(e.proofConsensus).toString("base64"),e.consensusHeight?u.Height.fromProto(e.consensusHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.connection_id,o=t.counterparty_connection_id,r=t.version,i=t.client_state,s=t.proof_height,u=t.proof_try,d=t.proof_client,l=t.proof_consensus,f=t.consensus_height,p=t.signer;return c.MsgConnectionOpenAck.fromPartial({connectionId:n,counterpartyConnectionId:o,version:r?r.toProto():void 0,clientState:i,proofHeight:s?s.toProto():void 0,proofTry:a.from(u,"base64"),proofClient:a.from(d,"base64"),proofConsensus:a.from(l,"base64"),consensusHeight:f?f.toProto():void 0,signer:p})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAck",value:c.MsgConnectionOpenAck.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.MsgConnectionOpenAck.decode(e.value))},t}(r.JSONSerializable);t.MsgConnectionOpenAck=d},10526:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgConnectionOpenConfirm=void 0;var r=n(90743),i=n(85920),s=n(91592),c=n(97045),u=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.connection_id=t,r.proof_ack=n,r.proof_height=a,r.signer=o,r}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.connection_id,o=e.proof_ack,r=e.proof_height,i=e.signer;return new t(a,o,r?c.Height.fromData(r):void 0,i)},t.prototype.toData=function(e){var t=this,n=t.connection_id,a=t.proof_ack,o=t.proof_height,r=t.signer;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenConfirm",connection_id:n,proof_ack:a,proof_height:o?o.toData():void 0,signer:r}},t.fromProto=function(e,n){return new t(e.connectionId,a.from(e.proofAck).toString("base64"),e.proofHeight?c.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.connection_id,o=t.proof_ack,r=t.proof_height,i=t.signer;return s.MsgConnectionOpenConfirm.fromPartial({connectionId:n,proofAck:a.from(o,"base64"),proofHeight:r?r.toProto():void 0,signer:i})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirm",value:s.MsgConnectionOpenConfirm.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgConnectionOpenConfirm.decode(e.value))},t}(r.JSONSerializable);t.MsgConnectionOpenConfirm=u},35718:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgConnectionOpenInit=void 0;var r=n(90743),i=n(85920),s=n(76530),c=n(5767),u=n(91592),d=o(n(29600)),l=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.client_id=t,i.delay_period=n,i.signer=a,i.counterparty=o,i.version=r,i}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.client_id,o=e.counterparty,r=e.version,i=e.delay_period,u=e.signer;return new t(a,Number.parseInt(i),u,o?s.Counterparty.fromData(o):void 0,r?c.Version.fromData(r):void 0)},t.prototype.toData=function(e){var t=this,n=t.client_id,a=t.counterparty,o=t.version,r=t.delay_period,i=t.signer;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenInit",client_id:n,delay_period:r.toFixed(),signer:i,counterparty:a?a.toData():void 0,version:o?o.toData():void 0}},t.fromProto=function(e,n){return new t(e.clientId,e.delayPeriod.toNumber(),e.signer,e.counterparty?s.Counterparty.fromProto(e.counterparty):void 0,e.version?c.Version.fromProto(e.version):void 0)},t.prototype.toProto=function(e){var t=this,n=t.client_id,a=t.counterparty,o=t.version,r=t.delay_period,i=t.signer;return u.MsgConnectionOpenInit.fromPartial({clientId:n,delayPeriod:d.default.fromNumber(r),signer:i,counterparty:a?a.toProto():void 0,version:o?o.toProto():void 0})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInit",value:u.MsgConnectionOpenInit.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(u.MsgConnectionOpenInit.decode(e.value))},t}(r.JSONSerializable);t.MsgConnectionOpenInit=l},96842:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgConnectionOpenTry=void 0;var i=n(90743),s=n(85920),c=n(76530),u=n(5767),d=n(91592),l=r(n(29600)),f=n(97045),p=function(e){function t(t,n,a,o,r,i,s,c,u,d,l,f){var p=e.call(this)||this;return p.client_id=t,p.previous_connection_id=n,p.client_state=a,p.counterparty=o,p.delay_period=r,p.counterparty_versions=i,p.proof_height=s,p.proof_init=c,p.proof_client=u,p.proof_consensus=d,p.consensus_height=l,p.signer=f,p}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var o=e.client_id,r=e.previous_connection_id,i=e.client_state,s=e.counterparty,d=e.delay_period,l=e.counterparty_versions,p=e.proof_height,b=e.proof_init,m=e.proof_client,h=e.proof_consensus,g=e.consensus_height,y=e.signer;return new t(o,r,i,s?c.Counterparty.fromData(s):void 0,Number.parseInt(d),l.length>0?l.map((function(e){return u.Version.fromData(e)})):[],p?f.Height.fromData(p):void 0,a.from(b).toString("base64"),a.from(m).toString("base64"),a.from(h).toString("base64"),g?f.Height.fromData(g):void 0,y)},t.prototype.toData=function(e){var t=this,n=t.client_id,a=t.previous_connection_id,o=t.client_state,r=t.counterparty,i=t.delay_period,s=t.counterparty_versions,c=t.proof_height,u=t.proof_init,d=t.proof_client,l=t.proof_consensus,f=t.consensus_height,p=t.signer;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenTry",client_id:n,previous_connection_id:a,client_state:o,counterparty:r?r.toData():void 0,delay_period:i.toFixed(),counterparty_versions:s.length>0?s.map((function(e){return e.toData()})):[],proof_height:c?c.toData():void 0,proof_init:u,proof_client:d,proof_consensus:l,consensus_height:f?f.toData():void 0,signer:p}},t.fromProto=function(e,n){return new t(e.clientId,e.previousConnectionId,e.clientState,e.counterparty?c.Counterparty.fromProto(e.counterparty):void 0,e.delayPeriod.toNumber(),e.counterpartyVersions.length>0?e.counterpartyVersions.map((function(e){return u.Version.fromProto(e)})):[],e.proofHeight?f.Height.fromProto(e.proofHeight):void 0,a.from(e.proofInit).toString("base64"),a.from(e.proofClient).toString("base64"),a.from(e.proofConsensus).toString("base64"),e.consensusHeight?f.Height.fromProto(e.consensusHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.client_id,o=t.previous_connection_id,r=t.client_state,i=t.counterparty,s=t.delay_period,c=t.counterparty_versions,u=t.proof_height,f=t.proof_init,p=t.proof_client,b=t.proof_consensus,m=t.consensus_height,h=t.signer;return d.MsgConnectionOpenTry.fromPartial({clientId:n,previousConnectionId:o,clientState:r.toProto(),counterparty:i?i.toProto():void 0,delayPeriod:l.default.fromNumber(s),counterpartyVersions:c.length>0?c.map((function(e){return e.toProto()})):[],proofHeight:u?u.toProto():void 0,proofInit:a.from(f,"base64"),proofClient:a.from(p,"base64"),proofConsensus:a.from(b,"base64"),consensusHeight:m?m.toProto():void 0,signer:h})},t.prototype.packAny=function(e){return s.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTry",value:d.MsgConnectionOpenTry.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(d.MsgConnectionOpenTry.decode(e.value))},t}(i.JSONSerializable);t.MsgConnectionOpenTry=p},82100:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(35718),t),o(n(96842),t),o(n(10526),t),o(n(719),t)},70321:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ClientUpdateProposal=void 0;var o=n(90743),r=n(85920),i=n(39553),s=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.title=t,r.description=n,r.subjectClientId=a,r.substituteClientId=o,r}return a(t,e),t.fromAmino=function(e,n){var a=e.value;return new t(a.title,a.description,a.subjectClientId,a.substituteClientId)},t.prototype.toAmino=function(e){var t=this;return{type:"ibc/ClientUpdateProposal",value:{title:t.title,description:t.description,subjectClientId:t.subjectClientId,substituteClientId:t.substituteClientId}}},t.fromData=function(e,n){return new t(e.title,e.description,e.subject_client_id,e.substitute_client_id)},t.prototype.toData=function(e){var t=this;return{"@type":"/ibc.core.client.v1.ClientUpdateProposal",title:t.title,description:t.description,subject_client_id:t.subjectClientId,substitute_client_id:t.substituteClientId}},t.fromProto=function(e,n){return new t(e.title,e.description,e.subjectClientId,e.substituteClientId)},t.prototype.toProto=function(e){var t=this,n=t.title,a=t.description,o=t.subjectClientId,r=t.substituteClientId;return i.ClientUpdateProposal.fromPartial({subjectClientId:o,substituteClientId:r,description:a,title:n})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.client.v1.ClientUpdateProposal",value:i.ClientUpdateProposal.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.ClientUpdateProposal.decode(e.value))},t}(o.JSONSerializable);t.ClientUpdateProposal=s},1170:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(70321),t)},67485:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(34411),t),o(n(79850),t),o(n(80856),t),o(n(89371),t),o(n(50292),t),o(n(16106),t),o(n(44611),t),o(n(69981),t),o(n(22729),t),o(n(13753),t),o(n(60131),t),o(n(71505),t),o(n(44171),t),o(n(99540),t),o(n(36853),t),o(n(19848),t),o(n(35037),t),o(n(72742),t),o(n(69779),t),o(n(20302),t),o(n(99511),t),o(n(82165),t),o(n(87425),t),o(n(16174),t),o(n(83868),t),o(n(63029),t),o(n(48358),t),o(n(39356),t),o(n(20339),t),o(n(35703),t),o(n(91003),t),o(n(60777),t),o(n(11330),t),o(n(76689),t),o(n(21945),t),o(n(5016),t),o(n(25686),t),o(n(34762),t),o(n(1056),t),o(n(21480),t),o(n(55407),t),o(n(96211),t),o(n(33930),t),o(n(76206),t),o(n(33040),t),o(n(5806),t),o(n(57706),t),o(n(88422),t),o(n(37783),t),o(n(52354),t),o(n(14557),t),o(n(10535),t),o(n(45319),t),o(n(82100),t),o(n(11018),t),o(n(70007),t)},43537:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgSwap=void 0;var o=n(90743),r=n(79850),i=n(26930),s=n(85920),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.trader=t,o.offer_coin=n,o.ask_denom=a,o}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value,o=a.trader,i=a.offer_coin,s=a.ask_denom;return new t(o,r.Coin.fromAmino(i),s)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.trader,a=t.offer_coin,o=t.ask_denom;return{type:"market/MsgSwap",value:{trader:n,offer_coin:a.toAmino(),ask_denom:o}}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.trader,r.Coin.fromProto(e.offerCoin),e.askDenom)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.trader,a=t.offer_coin,o=t.ask_denom;return i.MsgSwap.fromPartial({askDenom:o,offerCoin:a.toProto(),trader:n})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return s.Any.fromPartial({typeUrl:"/terra.market.v1beta1.MsgSwap",value:i.MsgSwap.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(i.MsgSwap.decode(e.value),n)},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.trader,o=e.offer_coin,i=e.ask_denom;return new t(a,r.Coin.fromData(o),i)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.trader,a=t.offer_coin,o=t.ask_denom;return{"@type":"/terra.market.v1beta1.MsgSwap",trader:n,offer_coin:a.toData(),ask_denom:o}},t}(o.JSONSerializable);t.MsgSwap=c},75855:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgSwapSend=void 0;var o=n(90743),r=n(79850),i=n(85920),s=n(26930),c=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.from_address=t,r.to_address=n,r.offer_coin=a,r.ask_denom=o,r}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value,o=a.from_address,i=a.to_address,s=a.offer_coin,c=a.ask_denom;return new t(o,i,r.Coin.fromAmino(s),c)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.offer_coin,r=t.ask_denom;return{type:"market/MsgSwapSend",value:{from_address:n,to_address:a,offer_coin:o.toAmino(),ask_denom:r}}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.fromAddress,e.toAddress,r.Coin.fromProto(e.offerCoin),e.askDenom)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.offer_coin,r=t.ask_denom;return s.MsgSwapSend.fromPartial({askDenom:r,fromAddress:n,offerCoin:o.toProto(),toAddress:a})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return i.Any.fromPartial({typeUrl:"/terra.market.v1beta1.MsgSwapSend",value:s.MsgSwapSend.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(s.MsgSwapSend.decode(e.value),n)},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.from_address,o=e.to_address,i=e.offer_coin,s=e.ask_denom;return new t(a,o,r.Coin.fromData(i),s)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.offer_coin,r=t.ask_denom;return{"@type":"/terra.market.v1beta1.MsgSwapSend",from_address:n,to_address:a,offer_coin:o.toData(),ask_denom:r}},t}(o.JSONSerializable);t.MsgSwapSend=c},60777:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(43537),t),o(n(75855),t)},16106:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.int=t.dec=t.Int=t.Dec=t.Numeric=t.DEC_PRECISION=void 0;var r,i=o(n(61017));t.DEC_PRECISION=18,function(e){e.parse=function(e){if(e instanceof s)return e;if("string"===typeof e)return e.includes(".")?new s(e):new c(e);var t=new i.default(e);return t.isInteger()?new c(t):new s(t.toString())}}(r=t.Numeric||(t.Numeric={}));var s=function(e){function n(t){return e.call(this,(null!==t&&void 0!==t?t:0).toString())||this}return a(n,e),n.prototype.toString=function(){return this.toFixed(t.DEC_PRECISION)},n.withPrec=function(e,t){return new n(new n(e).div(Math.pow(10,t)))},n.prototype.toInt=function(){return new c(this)},n.prototype.add=function(t){var a=new n(r.parse(t));return new n(e.prototype.add.call(this,a))},n.prototype.sub=function(t){var a=new n(r.parse(t));return new n(e.prototype.sub.call(this,a))},n.prototype.mul=function(t){var a=new n(r.parse(t));return new n(e.prototype.mul.call(this,a))},n.prototype.div=function(t){var a=new n(r.parse(t));return new n(e.prototype.div.call(this,a))},n.prototype.mod=function(t){var a=new n(r.parse(t));return new n(e.prototype.mod.call(this,a))},n}(i.default);t.Dec=s;var c=function(e){function t(t){var n=new i.default((null!==t&&void 0!==t?t:0).toString());return e.call(this,n.divToInt(1))||this}return a(t,e),t.prototype.toString=function(){return this.toFixed()},t.prototype.toDec=function(){return new s(this)},t.prototype.add=function(e){var n=r.parse(e);return n instanceof s?new s(this).add(n):new t(this.plus(n))},t.prototype.sub=function(e){var n=r.parse(e);return n instanceof s?new s(this).sub(n):new t(this.minus(n))},t.prototype.mul=function(e){var n=r.parse(e);return n instanceof s?new s(this).mul(n):new t(this.times(n))},t.prototype.div=function(n){var a=r.parse(n);return a instanceof s?new s(this).div(a):new t(e.prototype.div.call(this,a))},t.prototype.mod=function(n){var a=r.parse(n);return a instanceof s?new s(this).mod(a):new t(e.prototype.mod.call(this,a))},t}(i.default.clone());t.Int=c,t.dec=function(e){return new s(e[0])},t.int=function(e){return new c(e[0])}},5016:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AggregateExchangeRatePrevote=void 0;var s=n(90743),c=n(2244),u=i(n(29600)),d=function(e){function t(t,n,a){var o=e.call(this)||this;return o.hash=t,o.voter=n,o.submit_block=a,o}return a(t,e),t.fromAmino=function(e){var n=e.hash,a=e.voter,o=e.submit_block;return new t(n,a,Number.parseInt(o))},t.prototype.toAmino=function(){var e=this;return{hash:e.hash,voter:e.voter,submit_block:e.submit_block.toFixed()}},t.fromData=function(e){var n=e.hash,a=e.voter,o=e.submit_block;return new t(n,a,Number.parseInt(o))},t.prototype.toData=function(){var e=this;return{hash:e.hash,voter:e.voter,submit_block:e.submit_block.toFixed()}},t.fromProto=function(e){return new t(e.hash,e.voter,e.submitBlock.toNumber())},t.prototype.toProto=function(){var e=this,t=e.hash,n=e.voter,a=e.submit_block;return c.AggregateExchangeRatePrevote.fromPartial({hash:t,submitBlock:u.fromNumber(a),voter:n})},t}(s.JSONSerializable);t.AggregateExchangeRatePrevote=d},25686:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ExchangeRateTuple=t.AggregateExchangeRateVote=void 0;var o=n(90743),r=n(2244),i=n(16106),s=function(e){function t(t,n){var a=e.call(this)||this;return a.exchange_rate_tuples=t,a.voter=n,a}return a(t,e),t.fromAmino=function(e){var n=e.exchange_rate_tuples,a=e.voter;return new t(n.map((function(e){return c.fromAmino(e)})),a)},t.prototype.toAmino=function(){var e=this.exchange_rate_tuples,t=this.voter;return{exchange_rate_tuples:e.map((function(e){return e.toAmino()})),voter:t}},t.fromData=function(e){var n=e.exchange_rate_tuples,a=e.voter;return new t(n.map((function(e){return c.fromData(e)})),a)},t.prototype.toData=function(){var e=this.exchange_rate_tuples,t=this.voter;return{exchange_rate_tuples:e.map((function(e){return e.toData()})),voter:t}},t.fromProto=function(e){return new t(e.exchangeRateTuples.map((function(e){return c.fromProto(e)})),e.voter)},t.prototype.toProto=function(){var e=this.exchange_rate_tuples,t=this.voter;return r.AggregateExchangeRateVote.fromPartial({exchangeRateTuples:e.map((function(e){return e.toProto()})),voter:t})},t}(o.JSONSerializable);t.AggregateExchangeRateVote=s;var c=function(e){function t(t,n){var a=e.call(this)||this;return a.denom=t,a.exchange_rate=new i.Dec(n),a}return a(t,e),t.fromAmino=function(e){return new t(e.denom,e.exchange_rate)},t.prototype.toAmino=function(){return{denom:this.denom,exchange_rate:this.exchange_rate.toString()}},t.fromData=function(e){return new t(e.denom,e.exchange_rate)},t.prototype.toData=function(){return{denom:this.denom,exchange_rate:this.exchange_rate.toString()}},t.fromProto=function(e){return new t(e.denom,e.exchangeRate)},t.prototype.toProto=function(){var e=this.denom,t=this.exchange_rate;return r.ExchangeRateTuple.fromPartial({denom:e,exchangeRate:t.toString()})},t}(o.JSONSerializable);t.ExchangeRateTuple=c},19337:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgAggregateExchangeRatePrevote=void 0;var o=n(90743),r=n(85920),i=n(12306),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.hash=t,o.feeder=n,o.validator=a,o}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value;return new t(a.hash,a.feeder,a.validator)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this;return{type:"oracle/MsgAggregateExchangeRatePrevote",value:{hash:t.hash,feeder:t.feeder,validator:t.validator}}},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.hash,e.feeder,e.validator)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this;return{"@type":"/terra.oracle.v1beta1.MsgAggregateExchangeRatePrevote",hash:t.hash,feeder:t.feeder,validator:t.validator}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.hash,e.feeder,e.validator)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.hash,a=t.feeder,o=t.validator;return i.MsgAggregateExchangeRatePrevote.fromPartial({hash:n,feeder:a,validator:o})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/terra.oracle.v1beta1.MsgAggregateExchangeRatePrevote",value:i.MsgAggregateExchangeRatePrevote.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(i.MsgAggregateExchangeRatePrevote.decode(e.value),n)},t}(o.JSONSerializable);t.MsgAggregateExchangeRatePrevote=s},67988:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgAggregateExchangeRateVote=t.aggregateVoteHash=void 0;var o=n(47738),r=n(90743),i=n(19337),s=n(80856),c=n(85920),u=n(12306);function d(e,t,n){var a="".concat(t,":").concat(e.toDecCoins().toString(),":").concat(n);return o.SHA256.hash(a).toString().substring(0,40)}t.aggregateVoteHash=d;var l=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.salt=n,r.feeder=a,r.validator=o,r.exchange_rates=new s.Coins(t).toDecCoins(),r}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value,o=a.exchange_rates,r=a.salt,i=a.feeder,c=a.validator;return new t(s.Coins.fromString(o),r,i,c)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.exchange_rates,a=t.salt,o=t.feeder,r=t.validator;return{type:"oracle/MsgAggregateExchangeRateVote",value:{exchange_rates:n.toDecCoins().toString(),salt:a,feeder:o,validator:r}}},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.exchange_rates,o=e.salt,r=e.feeder,i=e.validator;return new t(s.Coins.fromString(a),o,r,i)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.exchange_rates,a=t.salt,o=t.feeder,r=t.validator;return{"@type":"/terra.oracle.v1beta1.MsgAggregateExchangeRateVote",exchange_rates:n.toDecCoins().toString(),salt:a,feeder:o,validator:r}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(s.Coins.fromString(e.exchangeRates),e.salt,e.feeder,e.validator)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.exchange_rates,a=t.salt,o=t.feeder,r=t.validator;return u.MsgAggregateExchangeRateVote.fromPartial({exchangeRates:n.toString(),feeder:o,salt:a,validator:r})},t.prototype.getAggregateVoteHash=function(){return d(this.exchange_rates,this.salt,this.validator)},t.prototype.getPrevote=function(){return new i.MsgAggregateExchangeRatePrevote(this.getAggregateVoteHash(),this.feeder,this.validator)},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return c.Any.fromPartial({typeUrl:"/terra.oracle.v1beta1.MsgAggregateExchangeRateVote",value:u.MsgAggregateExchangeRateVote.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(u.MsgAggregateExchangeRateVote.decode(e.value),n)},t}(r.JSONSerializable);t.MsgAggregateExchangeRateVote=l},38543:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgDelegateFeedConsent=void 0;var o=n(90743),r=n(85920),i=n(12306),s=function(e){function t(t,n){var a=e.call(this)||this;return a.operator=t,a.delegate=n,a}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value;return new t(a.operator,a.delegate)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");return{type:"oracle/MsgDelegateFeedConsent",value:{operator:this.operator,delegate:this.delegate}}},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.operator,e.delegate)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");return{"@type":"/terra.oracle.v1beta1.MsgDelegateFeedConsent",operator:this.operator,delegate:this.delegate}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.operator,e.delegate)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this.operator,n=this.delegate;return i.MsgDelegateFeedConsent.fromPartial({delegate:n,operator:t})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/terra.oracle.v1beta1.MsgDelegateFeedConsent",value:i.MsgDelegateFeedConsent.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(i.MsgDelegateFeedConsent.decode(e.value),n)},t}(o.JSONSerializable);t.MsgDelegateFeedConsent=s},21945:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(38543),t),o(n(67988),t),o(n(19337),t)},1056:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ParamChange=t.ParamChanges=void 0;var o=n(90743),r=n(54265),i=function(e){function t(t){var n=e.call(this)||this;return n.paramChanges=t,n}return a(t,e),t.fromAmino=function(e){return new t((null!==e&&void 0!==e?e:[]).map(s.fromAmino))},t.prototype.toAmino=function(){return this.paramChanges.map((function(e){return e.toAmino()}))},t.fromData=function(e){return new t((null!==e&&void 0!==e?e:[]).map(s.fromData))},t.prototype.toData=function(){return this.paramChanges.map((function(e){return e.toData()}))},t.fromProto=function(e){return new t((null!==e&&void 0!==e?e:[]).map(s.fromProto))},t.prototype.toProto=function(){return this.paramChanges.map((function(e){return e.toProto()}))},t}(o.JSONSerializable);t.ParamChanges=i;var s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.subspace=t,o.key=n,o.value=a,o}return a(t,e),t.fromAmino=function(e){return new t(e.subspace,e.key,e.value)},t.prototype.toAmino=function(){var e=this;return{subspace:e.subspace,key:e.key,value:e.value}},t.fromData=function(e){return new t(e.subspace,e.key,e.value)},t.prototype.toData=function(){var e=this;return{subspace:e.subspace,key:e.key,value:e.value}},t.fromProto=function(e){return new t(e.subspace,e.key,e.value)},t.prototype.toProto=function(){var e=this,t=e.subspace,n=e.key,a=e.value;return r.ParamChange.fromPartial({key:n,subspace:t,value:a})},t}(o.JSONSerializable);t.ParamChange=s},36522:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterChangeProposal=void 0;var o=n(90743),r=n(1056),i=n(85920),s=n(54265),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,Array.isArray(a)?o.changes=r.ParamChanges.fromData(a):o.changes=a,o}return a(t,e),t.fromAmino=function(e,n){var a=e.value,o=a.title,i=a.description,s=a.changes;return new t(o,i,r.ParamChanges.fromAmino(s))},t.prototype.toAmino=function(e){var t=this;return{type:e?"params/ParameterChangeProposal":"cosmos-sdk/ParameterChangeProposal",value:{title:t.title,description:t.description,changes:t.changes.toAmino()}}},t.fromData=function(e,n){var a=e.title,o=e.description,i=e.changes;return new t(a,o,r.ParamChanges.fromData(i))},t.prototype.toData=function(e){var t=this;return{"@type":"/cosmos.params.v1beta1.ParameterChangeProposal",title:t.title,description:t.description,changes:t.changes.toData()}},t.fromProto=function(e,n){return new t(e.title,e.description,r.ParamChanges.fromProto(e.changes))},t.prototype.toProto=function(e){var t=this,n=t.title,a=t.description,o=t.changes;return s.ParameterChangeProposal.fromPartial({changes:o.toProto(),description:a,title:n})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/cosmos.params.v1beta1.ParameterChangeProposal",value:s.ParameterChangeProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.ParameterChangeProposal.decode(e.value),n)},t}(o.JSONSerializable);t.ParameterChangeProposal=c},34762:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(36522),t)},9792:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgUnjail=void 0;var o=n(90743),r=n(85920),i=n(42670),s=function(e){function t(t){var n=e.call(this)||this;return n.address=t,n}return a(t,e),t.fromAmino=function(e,n){return new t(e.value.address)},t.prototype.toAmino=function(e){return{type:e?"slashing/MsgUnjail":"cosmos-sdk/MsgUnjail",value:{address:this.address}}},t.fromData=function(e,n){return new t(e.address)},t.prototype.toData=function(e){return{"@type":"/cosmos.slashing.v1beta1.MsgUnjail",address:this.address}},t.fromProto=function(e,n){return new t(e.validatorAddr)},t.prototype.toProto=function(e){var t=this.address;return i.MsgUnjail.fromPartial({validatorAddr:t})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUnjail",value:i.MsgUnjail.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.MsgUnjail.decode(e.value),n)},t}(o.JSONSerializable);t.MsgUnjail=s},21480:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(9792),t)},96211:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Delegation=void 0;var o=n(90743),r=n(16106),i=n(79850),s=n(56189),c=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.delegator_address=t,r.validator_address=n,r.shares=a,r.balance=o,r}return a(t,e),t.fromAmino=function(e){var n=e.delegation,a=n.delegator_address,o=n.validator_address,s=n.shares,c=e.balance;return new t(a,o,new r.Dec(s),i.Coin.fromAmino(c))},t.prototype.toAmino=function(){var e=this,t=e.delegator_address,n=e.validator_address,a=e.shares,o=e.balance;return{delegation:{delegator_address:t,validator_address:n,shares:a.toString()},balance:o.toAmino()}},t.fromData=function(e){var n=e.delegation,a=n.delegator_address,o=n.validator_address,s=n.shares,c=e.balance;return new t(a,o,new r.Dec(s),i.Coin.fromData(c))},t.prototype.toData=function(){var e=this,t=e.delegator_address,n=e.validator_address,a=e.shares,o=e.balance;return{delegation:{delegator_address:t,validator_address:n,shares:a.toString()},balance:o.toData()}},t.fromProto=function(e){var n=e.delegation;return new t(n.delegatorAddress,n.validatorAddress,new r.Dec(n.shares),i.Coin.fromProto(e.balance))},t.prototype.toProto=function(){var e=this,t=e.delegator_address,n=e.validator_address,a=e.shares,o=e.balance;return s.DelegationResponse.fromPartial({delegation:s.Delegation.fromPartial({delegatorAddress:t,shares:a.toString(),validatorAddress:n}),balance:o.toProto()})},t}(o.JSONSerializable);t.Delegation=c},33930:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Redelegation=void 0;var s=n(90743),c=n(16106),u=n(56189),d=i(n(29600)),l=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.delegator_address=t,r.validator_src_address=n,r.validator_dst_address=a,r.entries=o,r}return a(t,e),t.fromAmino=function(e){var n=e.redelegation;return new t(n.delegator_address,n.validator_src_address,n.validator_dst_address,e.entries.map((function(e){return t.Entry.fromAmino(e)})))},t.prototype.toAmino=function(){var e=this;return{redelegation:{delegator_address:e.delegator_address,validator_src_address:e.validator_src_address,validator_dst_address:e.validator_dst_address},entries:e.entries.map((function(e){return e.toAmino()}))}},t.fromData=function(e){var n=e.redelegation;return new t(n.delegator_address,n.validator_src_address,n.validator_dst_address,e.entries.map((function(e){return t.Entry.fromData(e)})))},t.prototype.toData=function(){var e=this;return{redelegation:{delegator_address:e.delegator_address,validator_src_address:e.validator_src_address,validator_dst_address:e.validator_dst_address},entries:e.entries.map((function(e){return e.toData()}))}},t.fromProto=function(e){var n=e.redelegation;return new t(n.delegatorAddress,n.validatorDstAddress,n.validatorDstAddress,e.entries.map((function(e){return t.Entry.fromProto(e)})))},t.prototype.toProto=function(){var e=this,t=e.delegator_address,n=e.validator_src_address,a=e.validator_dst_address,o=e.entries;return u.RedelegationResponse.fromPartial({entries:o.map((function(e){return e.toProto()})),redelegation:u.Redelegation.fromPartial({delegatorAddress:t,entries:o.map((function(e){return e.toProto().redelegationEntry})),validatorDstAddress:a,validatorSrcAddress:n})})},t}(s.JSONSerializable);t.Redelegation=l,function(e){var t=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.initial_balance=t,i.balance=n,i.shares_dst=a,i.creation_height=o,i.completion_time=r,i}return a(t,e),t.prototype.toAmino=function(){return{redelegation_entry:{initial_balance:this.initial_balance.toString(),shares_dst:this.shares_dst.toString(),creation_height:this.creation_height,completion_time:this.completion_time.toISOString()},balance:this.balance.toString()}},t.fromAmino=function(e){var n=e.redelegation_entry,a=n.initial_balance,o=n.shares_dst,r=n.creation_height,i=n.completion_time,s=e.balance;return new t(new c.Int(a),new c.Int(s),new c.Dec(o),r,new Date(i))},t.prototype.toData=function(){return{redelegation_entry:{initial_balance:this.initial_balance.toString(),shares_dst:this.shares_dst.toString(),creation_height:this.creation_height,completion_time:this.completion_time.toISOString()},balance:this.balance.toString()}},t.fromData=function(e){var n=e.redelegation_entry,a=n.initial_balance,o=n.shares_dst,r=n.creation_height,i=n.completion_time,s=e.balance;return new t(new c.Int(a),new c.Int(s),new c.Dec(o),r,new Date(i))},t.prototype.toProto=function(){var e=this,t=e.initial_balance,n=e.balance,a=e.shares_dst,o=e.creation_height,r=e.completion_time;return u.RedelegationEntryResponse.fromPartial({balance:n.toString(),redelegationEntry:u.RedelegationEntry.fromPartial({completionTime:r,creationHeight:d.fromNumber(o),initialBalance:t.toString(),sharesDst:a.toString()})})},t.fromProto=function(e){var n=e.redelegationEntry;return new t(new c.Int(n.initialBalance),new c.Int(e.balance),new c.Dec(n.sharesDst),n.creationHeight.toNumber(),n.completionTime)},t}(s.JSONSerializable);e.Entry=t}(l=t.Redelegation||(t.Redelegation={})),t.Redelegation=l},76206:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.UnbondingDelegation=void 0;var s=n(90743),c=n(16106),u=n(56189),d=i(n(29600)),l=function(e){function t(t,n,a){var o=e.call(this)||this;return o.delegator_address=t,o.validator_address=n,o.entries=a,o}return a(t,e),t.fromAmino=function(e){return new t(e.delegator_address,e.validator_address,e.entries.map((function(e){return t.Entry.fromAmino(e)})))},t.prototype.toAmino=function(){var e=this;return{delegator_address:e.delegator_address,validator_address:e.validator_address,entries:e.entries.map((function(e){return e.toAmino()}))}},t.fromData=function(e){return new t(e.delegator_address,e.validator_address,e.entries.map((function(e){return t.Entry.fromData(e)})))},t.prototype.toData=function(){var e=this;return{delegator_address:e.delegator_address,validator_address:e.validator_address,entries:e.entries.map((function(e){return e.toData()}))}},t.prototype.toProto=function(){var e=this,t=e.delegator_address,n=e.validator_address,a=e.entries;return u.UnbondingDelegation.fromPartial({delegatorAddress:t,entries:a.map((function(e){return e.toProto()})),validatorAddress:n})},t.fromProto=function(e){return new t(e.delegatorAddress,e.validatorAddress,e.entries.map((function(e){return t.Entry.fromProto(e)})))},t}(s.JSONSerializable);t.UnbondingDelegation=l,function(e){var t=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.initial_balance=t,r.balance=n,r.creation_height=a,r.completion_time=o,r}return a(t,e),t.prototype.toAmino=function(){return{initial_balance:this.initial_balance.toString(),balance:this.balance.toString(),creation_height:this.creation_height.toFixed(),completion_time:this.completion_time.toISOString()}},t.fromAmino=function(e){var n=e.initial_balance,a=e.balance,o=e.creation_height,r=e.completion_time;return new t(new c.Int(n),new c.Int(a),Number.parseInt(o),new Date(r))},t.prototype.toData=function(){return{initial_balance:this.initial_balance.toString(),balance:this.balance.toString(),creation_height:this.creation_height.toFixed(),completion_time:this.completion_time.toISOString()}},t.fromData=function(e){var n=e.initial_balance,a=e.balance,o=e.creation_height,r=e.completion_time;return new t(new c.Int(n),new c.Int(a),Number.parseInt(o),new Date(r))},t.prototype.toProto=function(){var e=this,t=e.initial_balance,n=e.balance,a=e.creation_height,o=e.completion_time;return u.UnbondingDelegationEntry.fromPartial({balance:n.toString(),completionTime:o,creationHeight:d.fromNumber(a),initialBalance:t.toString()})},t.fromProto=function(e){return new t(new c.Int(e.initialBalance),new c.Int(e.balance),e.creationHeight.toNumber(),e.completionTime)},t}(s.JSONSerializable);e.Entry=t}(l=t.UnbondingDelegation||(t.UnbondingDelegation={})),t.UnbondingDelegation=l},33040:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;var s=n(90743),c=n(16106),u=n(44611),d=n(56189),l=i(n(29600)),f=function(e){function t(t,n,a,o,r,i,s,c,u,d,l){var f=e.call(this)||this;return f.operator_address=t,f.consensus_pubkey=n,f.jailed=a,f.status=o,f.tokens=r,f.delegator_shares=i,f.description=s,f.unbonding_height=c,f.unbonding_time=u,f.commission=d,f.min_self_delegation=l,f}return a(t,e),t.prototype.toAmino=function(){return{operator_address:this.operator_address,consensus_pubkey:this.consensus_pubkey.toAmino(),jailed:this.jailed,status:this.status,tokens:this.tokens.toString(),delegator_shares:this.delegator_shares.toString(),description:this.description,unbonding_height:this.unbonding_height.toFixed(),unbonding_time:this.unbonding_time.toISOString(),commission:this.commission.toAmino(),min_self_delegation:this.min_self_delegation.toString()}},t.fromAmino=function(e){return new t(e.operator_address,u.ValConsPublicKey.fromAmino(e.consensus_pubkey),e.jailed||!1,e.status||0,new c.Int(e.tokens),new c.Dec(e.delegator_shares),t.Description.fromAmino(e.description),Number.parseInt(e.unbonding_height),new Date(e.unbonding_time),t.Commission.fromAmino(e.commission),new c.Int(e.min_self_delegation))},t.prototype.toData=function(){return{operator_address:this.operator_address,consensus_pubkey:this.consensus_pubkey.toData(),jailed:this.jailed,status:this.status,tokens:this.tokens.toString(),delegator_shares:this.delegator_shares.toString(),description:this.description,unbonding_height:this.unbonding_height.toFixed(),unbonding_time:this.unbonding_time.toISOString(),commission:this.commission.toData(),min_self_delegation:this.min_self_delegation.toString()}},t.fromData=function(e){return new t(e.operator_address,u.ValConsPublicKey.fromData(e.consensus_pubkey),e.jailed||!1,e.status||0,new c.Int(e.tokens),new c.Dec(e.delegator_shares),t.Description.fromData(e.description),Number.parseInt(e.unbonding_height),new Date(e.unbonding_time),t.Commission.fromData(e.commission),new c.Int(e.min_self_delegation))},t.prototype.toProto=function(){var e=this,t=e.operator_address,n=e.consensus_pubkey,a=e.jailed,o=e.status,r=e.tokens,i=e.delegator_shares,s=e.description,c=e.unbonding_height,u=e.unbonding_time,f=e.commission,p=e.min_self_delegation;return d.Validator.fromPartial({commission:f.toProto(),consensusPubkey:n.packAny(),delegatorShares:i.toString(),description:s.toProto(),jailed:a,minSelfDelegation:p.toString(),operatorAddress:t,status:o,tokens:r.toString(),unbondingHeight:l.fromNumber(c),unbondingTime:u})},t.fromProto=function(e){return new t(e.operatorAddress,u.ValConsPublicKey.unpackAny(e.consensusPubkey),e.jailed,e.status,new c.Int(e.tokens),new c.Dec(e.delegatorShares),t.Description.fromProto(e.description),e.unbondingHeight.toNumber(),e.unbondingTime,t.Commission.fromProto(e.commission),new c.Int(e.minSelfDelegation))},t}(s.JSONSerializable);t.Validator=f,function(e){e.Status=d.BondStatus;var t=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.moniker=t,i.identity=n,i.website=a,i.details=o,i.security_contact=r,i}return a(t,e),t.prototype.toAmino=function(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}},t.fromAmino=function(e){return new t(e.moniker,e.identity||"",e.website||"",e.details||"",e.security_contact||"")},t.prototype.toData=function(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}},t.fromData=function(e){return new t(e.moniker,e.identity||"",e.website||"",e.details||"",e.security_contact||"")},t.prototype.toProto=function(){var e=this,t=e.moniker,n=e.identity,a=e.website,o=e.details,r=e.security_contact;return d.Description.fromPartial({details:o,identity:n,moniker:t,securityContact:r,website:a})},t.fromProto=function(e){return new t(e.moniker,e.identity,e.website,e.details,e.securityContact)},t}(s.JSONSerializable);e.Description=t;var n=function(e){function t(t,n,a){var o=e.call(this)||this;return o.rate=t,o.max_rate=n,o.max_change_rate=a,o}return a(t,e),t.fromAmino=function(e){var n=e.rate,a=e.max_rate,o=e.max_change_rate;return new t(new c.Dec(n),new c.Dec(a),new c.Dec(o))},t.prototype.toAmino=function(){var e=this,t=e.rate,n=e.max_rate,a=e.max_change_rate;return{rate:t.toString(),max_rate:n.toString(),max_change_rate:a.toString()}},t.fromData=function(e){var n=e.rate,a=e.max_rate,o=e.max_change_rate;return new t(new c.Dec(n),new c.Dec(a),new c.Dec(o))},t.prototype.toData=function(){var e=this,t=e.rate,n=e.max_rate,a=e.max_change_rate;return{rate:t.toString(),max_rate:n.toString(),max_change_rate:a.toString()}},t.fromProto=function(e){return new t(new c.Dec(e.rate),new c.Dec(e.maxRate),new c.Dec(e.maxChangeRate))},t.prototype.toProto=function(){var e=this,t=e.rate,n=e.max_rate,a=e.max_change_rate;return d.CommissionRates.fromPartial({maxChangeRate:a.toString(),maxRate:n.toString(),rate:t.toString()})},t}(s.JSONSerializable);e.CommissionRates=n;var o=function(e){function t(t,n){var a=e.call(this)||this;return a.commission_rates=t,a.update_time=n,a}return a(t,e),t.prototype.toAmino=function(){return{commission_rates:this.commission_rates.toAmino(),update_time:this.update_time.toISOString()}},t.fromAmino=function(e){return new t(n.fromAmino(e.commission_rates),new Date(e.update_time))},t.prototype.toData=function(){return{commission_rates:this.commission_rates.toData(),update_time:this.update_time.toISOString()}},t.fromData=function(e){return new t(n.fromData(e.commission_rates),new Date(e.update_time))},t.prototype.toProto=function(){var e=this.commission_rates,t=this.update_time;return d.Commission.fromPartial({commissionRates:e.toProto(),updateTime:t})},t.fromProto=function(e){return new t(n.fromProto(e.commissionRates),e.updateTime)},t}(s.JSONSerializable);e.Commission=o}(f=t.Validator||(t.Validator={})),t.Validator=f},81209:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgBeginRedelegate=void 0;var o=n(90743),r=n(79850),i=n(85920),s=n(36835),c=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.delegator_address=t,r.validator_src_address=n,r.validator_dst_address=a,r.amount=o,r}return a(t,e),t.fromAmino=function(e,n){var a=e.value,o=a.delegator_address,i=a.validator_src_address,s=a.validator_dst_address,c=a.amount;return new t(o,i,s,r.Coin.fromAmino(c))},t.prototype.toAmino=function(e){var t=this;return{type:e?"staking/MsgBeginRedelegate":"cosmos-sdk/MsgBeginRedelegate",value:{delegator_address:t.delegator_address,validator_src_address:t.validator_src_address,validator_dst_address:t.validator_dst_address,amount:t.amount.toAmino()}}},t.fromData=function(e,n){var a=e.delegator_address,o=e.validator_src_address,i=e.validator_dst_address,s=e.amount;return new t(a,o,i,r.Coin.fromData(s))},t.prototype.toData=function(e){var t=this;return{"@type":"/cosmos.staking.v1beta1.MsgBeginRedelegate",delegator_address:t.delegator_address,validator_src_address:t.validator_src_address,validator_dst_address:t.validator_dst_address,amount:t.amount.toData()}},t.fromProto=function(e,n){return new t(e.delegatorAddress,e.validatorSrcAddress,e.validatorDstAddress,r.Coin.fromProto(e.amount))},t.prototype.toProto=function(e){var t=this,n=t.delegator_address,a=t.validator_src_address,o=t.validator_dst_address,r=t.amount;return s.MsgBeginRedelegate.fromPartial({amount:r.toProto(),delegatorAddress:n,validatorDstAddress:o,validatorSrcAddress:a})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/cosmos.staking.v1beta1.MsgBeginRedelegate",value:s.MsgBeginRedelegate.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgBeginRedelegate.decode(e.value),n)},t}(o.JSONSerializable);t.MsgBeginRedelegate=c},71010:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgCreateValidator=void 0;var o=n(90743),r=n(79850),i=n(16106),s=n(33040),c=n(85920),u=n(36835),d=n(44611),l=function(e){function t(t,n,a,o,r,i,s){var c=e.call(this)||this;return c.description=t,c.commission=n,c.min_self_delegation=a,c.delegator_address=o,c.validator_address=r,c.pubkey=i,c.value=s,c}return a(t,e),t.fromAmino=function(e,n){var a=e.value,o=a.description,c=a.commission,u=a.min_self_delegation,l=a.delegator_address,f=a.validator_address,p=a.pubkey,b=a.value;return new t(o,s.Validator.CommissionRates.fromAmino(c),new i.Int(u),l,f,d.ValConsPublicKey.fromAmino(p),r.Coin.fromAmino(b))},t.prototype.toAmino=function(e){var t=this,n=t.description,a=t.commission,o=t.min_self_delegation,r=t.delegator_address,i=t.validator_address,s=t.pubkey,c=t.value;return{type:e?"staking/MsgCreateValidator":"cosmos-sdk/MsgCreateValidator",value:{description:n,commission:a.toAmino(),min_self_delegation:o.toString(),delegator_address:r,validator_address:i,pubkey:s.toAmino(),value:c.toAmino()}}},t.fromData=function(e,n){var a=e.description,o=e.commission,c=e.min_self_delegation,u=e.delegator_address,l=e.validator_address,f=e.pubkey,p=e.value;return new t(a,s.Validator.CommissionRates.fromData(o),new i.Int(c),u,l,d.ValConsPublicKey.fromData(f),r.Coin.fromData(p))},t.prototype.toData=function(e){var t=this,n=t.description,a=t.commission,o=t.min_self_delegation,r=t.delegator_address,i=t.validator_address,s=t.pubkey,c=t.value;return{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator",description:n,commission:a.toData(),min_self_delegation:o.toString(),delegator_address:r,validator_address:i,pubkey:s.toData(),value:c.toData()}},t.fromProto=function(e,n){return new t(s.Validator.Description.fromProto(e.description),s.Validator.CommissionRates.fromProto(e.commission),new i.Int(e.minSelfDelegation),e.delegatorAddress,e.validatorAddress,d.PublicKey.fromProto(e.pubkey),r.Coin.fromProto(e.value))},t.prototype.toProto=function(e){var t=this,n=t.description,a=t.commission,o=t.min_self_delegation,r=t.delegator_address,i=t.validator_address,s=t.pubkey,c=t.value;return u.MsgCreateValidator.fromPartial({commission:a.toProto(),delegatorAddress:r,description:n.toProto(),minSelfDelegation:o.toString(),pubkey:s.packAny(),validatorAddress:i,value:c.toProto()})},t.prototype.packAny=function(e){return c.Any.fromPartial({typeUrl:"/cosmos.staking.v1beta1.MsgCreateValidator",value:u.MsgCreateValidator.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(u.MsgCreateValidator.decode(e.value),n)},t}(o.JSONSerializable);t.MsgCreateValidator=l},39410:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgDelegate=void 0;var o=n(79850),r=n(90743),i=n(85920),s=n(36835),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.delegator_address=t,o.validator_address=n,o.amount=a,o}return a(t,e),t.fromAmino=function(e,n){var a=e.value,r=a.delegator_address,i=a.validator_address,s=a.amount;return new t(r,i,o.Coin.fromAmino(s))},t.prototype.toAmino=function(e){var t=this;return{type:e?"staking/MsgDelegate":"cosmos-sdk/MsgDelegate",value:{delegator_address:t.delegator_address,validator_address:t.validator_address,amount:t.amount.toAmino()}}},t.fromProto=function(e,n){return new t(e.delegatorAddress,e.validatorAddress,o.Coin.fromProto(e.amount))},t.prototype.toProto=function(e){var t=this,n=t.delegator_address,a=t.validator_address,o=t.amount;return s.MsgDelegate.fromPartial({amount:o.toProto(),delegatorAddress:n,validatorAddress:a})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:s.MsgDelegate.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgDelegate.decode(e.value),n)},t.fromData=function(e,n){var a=e.delegator_address,r=e.validator_address,i=e.amount;return new t(a,r,o.Coin.fromData(i))},t.prototype.toData=function(e){var t=this;return{"@type":"/cosmos.staking.v1beta1.MsgDelegate",delegator_address:t.delegator_address,validator_address:t.validator_address,amount:t.amount.toData()}},t}(r.JSONSerializable);t.MsgDelegate=c},50083:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgEditValidator=void 0;var o=n(90743),r=n(16106),i=n(33040),s=n(85920),c=n(36835),u=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.description=t,r.validator_address=n,r.commission_rate=a,r.min_self_delegation=o,r}return a(t,e),t.fromAmino=function(e,n){var a=e.value,o=a.description,s=a.validator_address,c=a.commission_rate,u=a.min_self_delegation;return new t(i.Validator.Description.fromAmino(o),s,c?new r.Dec(c):void 0,u?new r.Int(u):void 0)},t.prototype.toAmino=function(e){var t=this,n=t.description,a=t.validator_address,o=t.commission_rate,r=t.min_self_delegation;return{type:e?"staking/MsgEditValidator":"cosmos-sdk/MsgEditValidator",value:{description:n,validator_address:a,commission_rate:o?o.toString():void 0,min_self_delegation:r?r.toString():void 0}}},t.fromProto=function(e,n){return new t(i.Validator.Description.fromProto(e.description),e.validatorAddress,""!==e.commissionRate?new r.Dec(e.commissionRate):void 0,""!==e.minSelfDelegation?new r.Int(e.minSelfDelegation):void 0)},t.prototype.toProto=function(e){var t=this,n=t.description,a=t.validator_address,o=t.commission_rate,r=t.min_self_delegation;return c.MsgEditValidator.fromPartial({description:n.toProto(),commissionRate:(null===o||void 0===o?void 0:o.toString())||"",minSelfDelegation:(null===r||void 0===r?void 0:r.toString())||"",validatorAddress:a})},t.prototype.packAny=function(e){return s.Any.fromPartial({typeUrl:"/cosmos.staking.v1beta1.MsgEditValidator",value:c.MsgEditValidator.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.MsgEditValidator.decode(e.value),n)},t.fromData=function(e,n){var a=e.description,o=e.validator_address,s=e.commission_rate,c=e.min_self_delegation;return new t(i.Validator.Description.fromData(a),o,s?new r.Dec(s):void 0,c?new r.Int(c):void 0)},t.prototype.toData=function(e){var t=this,n=t.description,a=t.validator_address,o=t.commission_rate,r=t.min_self_delegation;return{"@type":"/cosmos.staking.v1beta1.MsgEditValidator",description:n,validator_address:a,commission_rate:o?o.toString():void 0,min_self_delegation:r?r.toString():void 0}},t}(o.JSONSerializable);t.MsgEditValidator=u,function(e){e.DESC_DO_NOT_MODIFY={moniker:"[do-not-modify]",website:"[do-not-modify]",identity:"[do-not-modify]",details:"[do-not-modify]",security_contact:"[do-not-modify]"}}(u=t.MsgEditValidator||(t.MsgEditValidator={})),t.MsgEditValidator=u},11534:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgUndelegate=void 0;var o=n(79850),r=n(90743),i=n(85920),s=n(36835),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.delegator_address=t,o.validator_address=n,o.amount=a,o}return a(t,e),t.fromAmino=function(e,n){var a=e.value,r=a.delegator_address,i=a.validator_address,s=a.amount;return new t(r,i,o.Coin.fromAmino(s))},t.prototype.toAmino=function(e){var t=this;return{type:e?"staking/MsgUndelegate":"cosmos-sdk/MsgUndelegate",value:{delegator_address:t.delegator_address,validator_address:t.validator_address,amount:t.amount.toAmino()}}},t.fromProto=function(e,n){return new t(e.delegatorAddress,e.validatorAddress,o.Coin.fromProto(e.amount))},t.prototype.toProto=function(e){var t=this,n=t.delegator_address,a=t.validator_address,o=t.amount;return s.MsgUndelegate.fromPartial({amount:o.toProto(),delegatorAddress:n,validatorAddress:a})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:s.MsgUndelegate.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgUndelegate.decode(e.value),n)},t.fromData=function(e,n){var a=e.delegator_address,r=e.validator_address,i=e.amount;return new t(a,r,o.Coin.fromData(i))},t.prototype.toData=function(e){var t=this;return{"@type":"/cosmos.staking.v1beta1.MsgUndelegate",delegator_address:t.delegator_address,validator_address:t.validator_address,amount:t.amount.toData()}},t}(r.JSONSerializable);t.MsgUndelegate=c},55407:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(39410),t),o(n(11534),t),o(n(81209),t),o(n(71010),t),o(n(50083),t)},5806:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyConstraints=void 0;var o=n(90743),r=n(79850),i=n(16106),s=n(56091),c=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.cap=a,r.rate_min=new i.Dec(t),r.rate_max=new i.Dec(n),r.change_rate_max=new i.Dec(o),r}return a(t,e),t.fromAmino=function(e){var n=e.rate_min,a=e.rate_max,o=e.cap,i=e.change_rate_max;return new t(n,a,r.Coin.fromAmino(o),i)},t.prototype.toAmino=function(){var e=this,t=e.rate_min,n=e.rate_max,a=e.cap,o=e.change_rate_max;return{rate_min:t.toString(),rate_max:n.toString(),cap:a.toAmino(),change_rate_max:o.toString()}},t.fromData=function(e){var n=e.rate_min,a=e.rate_max,o=e.cap,i=e.change_rate_max;return new t(n,a,r.Coin.fromData(o),i)},t.prototype.toData=function(){var e=this,t=e.rate_min,n=e.rate_max,a=e.cap,o=e.change_rate_max;return{rate_min:t.toString(),rate_max:n.toString(),cap:a.toData(),change_rate_max:o.toString()}},t.fromProto=function(e){return new t(e.rateMax,e.rateMin,r.Coin.fromProto(e.cap),e.changeRateMax)},t.prototype.toProto=function(){var e=this,t=e.rate_min,n=e.rate_max,a=e.cap,o=e.change_rate_max;return s.PolicyConstraints.fromPartial({cap:a.toProto(),changeRateMax:o.toString(),rateMax:n.toString(),rateMin:t.toString()})},t.prototype.clamp=function(e,t){var n=new i.Dec(e),a=new i.Dec(t);a.lt(this.rate_min)?a=this.rate_min:a.gt(this.rate_max)&&(a=this.rate_max);var o=a.sub(n);return a.gt(n)?o.gt(this.change_rate_max)&&(a=n.add(this.change_rate_max)):o.abs().gt(this.change_rate_max)&&(a=n.sub(this.change_rate_max)),a},t}(o.JSONSerializable);t.PolicyConstraints=c},14901:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.AddBurnTaxExemptionAddressProposal=void 0;var o=n(90743),r=n(85920),i=n(93439),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.addresses=a,o}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.addresses)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this;return{type:"treasury/AddBurnTaxExemptionAddressProposal",value:{title:t.title,description:t.description,addresses:t.addresses}}},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.addresses)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this;return{"@type":"/terra.treasury.v1beta1.AddBurnTaxExemptionAddressProposal",title:t.title,description:t.description,addresses:t.addresses}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.addresses)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.addresses;return i.AddBurnTaxExemptionAddressProposal.fromPartial({title:n,description:a,addresses:o})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/terra.treasury.v1beta1.AddBurnTaxExemptionAddressProposal",value:i.AddBurnTaxExemptionAddressProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(i.AddBurnTaxExemptionAddressProposal.decode(e.value),n)},t}(o.JSONSerializable);t.AddBurnTaxExemptionAddressProposal=s},54928:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveBurnTaxExemptionAddressProposal=void 0;var o=n(90743),r=n(85920),i=n(93439),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.addresses=a,o}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.addresses)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this;return{type:"treasury/RemoveBurnTaxExemptionAddressProposal",value:{title:t.title,description:t.description,addresses:t.addresses}}},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.addresses)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this;return{"@type":"/terra.treasury.v1beta1.RemoveBurnTaxExemptionAddressProposal",title:t.title,description:t.description,addresses:t.addresses}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.addresses)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.addresses;return i.RemoveBurnTaxExemptionAddressProposal.fromPartial({title:n,description:a,addresses:o})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/terra.treasury.v1beta1.RemoveBurnTaxExemptionAddressProposal",value:i.RemoveBurnTaxExemptionAddressProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(i.RemoveBurnTaxExemptionAddressProposal.decode(e.value),n)},t}(o.JSONSerializable);t.RemoveBurnTaxExemptionAddressProposal=s},93987:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(14901),t),o(n(54928),t)},70609:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Plan=void 0;var r=n(90743),i=n(36495),s=o(n(29600)),c=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.name=t,i.time=n,i.height=a,i.info=o,i.upgraded_client_state=r,i}return a(t,e),t.fromAmino=function(e){var n=e.name,a=e.time,o=e.height,r=e.info,i=e.upgraded_client_state;return new t(n,a?new Date(a):void 0,o,r,i)},t.prototype.toAmino=function(){var e=this,t=e.name,n=e.time,a=e.height,o=e.info,r=e.upgraded_client_state;return{name:t,time:n?n.toISOString().replace(/\.000Z$/,"Z"):void 0,height:a,info:o,upgraded_client_state:r}},t.fromData=function(e){var n=e.name,a=e.time,o=e.height,r=e.info,i=e.upgraded_client_state;return new t(n,a?new Date(a):void 0,o,r,i)},t.prototype.toData=function(){var e=this,t=e.name,n=e.time,a=e.height,o=e.info,r=e.upgraded_client_state;return{name:t,time:n?n.toISOString().replace(/\.000Z$/,"Z"):void 0,height:a,info:o,upgraded_client_state:r}},t.fromProto=function(e){return new t(e.name,e.time,e.height.toString(),e.info,e.upgradedClientState)},t.prototype.toProto=function(){var e=this,t=e.name,n=e.time,a=e.height,o=e.info,r=e.upgraded_client_state;return i.Plan.fromPartial({name:t,time:n,height:s.default.fromString(a),info:o,upgradedClientState:r})},t}(r.JSONSerializable);t.Plan=c},88422:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(70609),t),o(n(39870),t)},48520:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CancelSoftwareUpgradeProposal=void 0;var o=n(90743),r=n(85920),i=n(36495),s=function(e){function t(t,n){var a=e.call(this)||this;return a.title=t,a.description=n,a}return a(t,e),t.fromAmino=function(e,n){var a=e.value;return new t(a.title,a.description)},t.prototype.toAmino=function(e){return{type:e?"upgrade/CancelSoftwareUpgradeProposal":"cosmos-sdk/CancelSoftwareUpgradeProposal",value:{title:this.title,description:this.description}}},t.fromData=function(e,n){return new t(e.title,e.description)},t.prototype.toData=function(e){return{"@type":"/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal",title:this.title,description:this.description}},t.fromProto=function(e,n){return new t(e.title,e.description)},t.prototype.toProto=function(e){var t=this.title,n=this.description;return i.CancelSoftwareUpgradeProposal.fromPartial({title:t,description:n})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal",value:i.CancelSoftwareUpgradeProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.CancelSoftwareUpgradeProposal.decode(e.value),n)},t}(o.JSONSerializable);t.CancelSoftwareUpgradeProposal=s},14974:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SoftwareUpgradeProposal=void 0;var o=n(90743),r=n(85920),i=n(36495),s=n(70609),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.plan=a,o}return a(t,e),t.fromAmino=function(e,n){var a=e.value,o=a.title,r=a.description,i=a.plan;return new t(o,r,i?s.Plan.fromAmino(i):void 0)},t.prototype.toAmino=function(e){var t=this,n=t.title,a=t.description,o=t.plan;return{type:e?"upgrade/SoftwareUpgradeProposal":"cosmos-sdk/SoftwareUpgradeProposal",value:{title:n,description:a,plan:o?o.toAmino():void 0}}},t.fromData=function(e,n){var a=e.title,o=e.description,r=e.plan;return new t(a,o,r?s.Plan.fromData(r):void 0)},t.prototype.toData=function(e){var t=this,n=t.title,a=t.description,o=t.plan;return{"@type":"/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal",title:n,description:a,plan:o?o.toData():void 0}},t.fromProto=function(e,n){return new t(e.title,e.description,e.plan?s.Plan.fromProto(e.plan):void 0)},t.prototype.toProto=function(e){var t=this,n=t.title,a=t.description,o=t.plan;return i.SoftwareUpgradeProposal.fromPartial({title:n,description:a,plan:o?o.toProto():void 0})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal",value:i.SoftwareUpgradeProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.SoftwareUpgradeProposal.decode(e.value),n)},t}(o.JSONSerializable);t.SoftwareUpgradeProposal=c},39870:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(14974),t),o(n(48520),t)},34215:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Period=void 0;var s=n(80856),c=n(46619),u=n(90743),d=i(n(29600)),l=function(e){function t(t,n){var a=e.call(this)||this;return a.length=t,a.amount=new s.Coins(n),a}return a(t,e),t.fromAmino=function(e,n){var a=e.length,o=e.amount;return new t(Number.parseInt(a),s.Coins.fromAmino(o))},t.prototype.toAmino=function(e){var t=this.length,n=this.amount;return{length:t.toFixed(),amount:n.toAmino()}},t.fromData=function(e,n){var a=e.length,o=e.amount;return new t(Number.parseInt(a),s.Coins.fromData(o))},t.prototype.toData=function(e){var t=this.length,n=this.amount;return{length:t.toFixed(),amount:n.toData()}},t.fromProto=function(e,n){return new t(e.length.toNumber(),s.Coins.fromProto(e.amount))},t.prototype.toProto=function(e){var t=this.length,n=this.amount;return c.Period.fromPartial({length:d.fromNumber(t),amount:n.toProto()})},t}(u.JSONSerializable);t.Period=l},57706:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(34215),t),o(n(66956),t)},97157:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgCreatePeriodicVestingAccount=void 0;var r=n(34215),i=n(90743),s=n(85920),c=n(60279),u=o(n(29600)),d=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.from_address=t,r.to_address=n,r.start_time=a,r.vesting_periods=o,r}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.from_address,i=a.to_address,s=a.start_time,c=a.vesting_periods;return new t(o,i,Number.parseInt(s),c.map((function(e){return r.Period.fromAmino(e,n)})))},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.start_time,r=t.vesting_periods;return{type:"cosmos-sdk/MsgCreatePeriodicVestingAccount",value:{from_address:n,to_address:a,start_time:o.toFixed(),vesting_periods:r.map((function(t){return t.toAmino(e)}))}}},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.from_address,o=e.to_address,i=e.start_time,s=e.vesting_periods;return new t(a,o,Number.parseInt(i),s.map((function(e){return r.Period.fromData(e,n)})))},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.start_time,r=t.vesting_periods;return{"@type":"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount",from_address:n,to_address:a,start_time:o.toFixed(),vesting_periods:r.map((function(t){return t.toData(e)}))}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.fromAddress,e.toAddress,e.startTime.toNumber(),e.vestingPeriods.map((function(e){return r.Period.fromProto(e,n)})))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.start_time,r=t.vesting_periods;return c.MsgCreatePeriodicVestingAccount.fromPartial({fromAddress:n,toAddress:a,startTime:u.default.fromNumber(o),vestingPeriods:r.map((function(t){return t.toProto(e)}))})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return s.Any.fromPartial({typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount",value:c.MsgCreatePeriodicVestingAccount.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(c.MsgCreatePeriodicVestingAccount.decode(e.value),n)},t}(i.JSONSerializable);t.MsgCreatePeriodicVestingAccount=d},78029:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgCreateVestingAccount=void 0;var r=n(80856),i=n(90743),s=n(85920),c=n(60279),u=o(n(29600)),d=function(e){function t(t,n,a,o,i){var s=e.call(this)||this;return s.from_address=t,s.to_address=n,s.end_time=o,s.delayed=i,s.amount=new r.Coins(a),s}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.from_address,i=a.to_address,s=a.amount,c=a.end_time,u=a.delayed;return new t(o,i,r.Coins.fromAmino(s),Number.parseInt(c),u)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.amount,r=t.end_time,i=t.delayed;return{type:"cosmos-sdk/MsgCreateVestingAccount",value:{from_address:n,to_address:a,amount:o.toAmino(),end_time:r.toFixed(),delayed:i}}},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.from_address,o=e.to_address,i=e.amount,s=e.end_time,c=e.delayed;return new t(a,o,r.Coins.fromData(i),Number.parseInt(s),c)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.amount,r=t.end_time,i=t.delayed;return{"@type":"/cosmos.vesting.v1beta1.MsgCreateVestingAccount",from_address:n,to_address:a,amount:o.toData(),end_time:r.toFixed(),delayed:i}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.fromAddress,e.toAddress,r.Coins.fromProto(e.amount),e.endTime.toNumber(),e.delayed)},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.amount,r=t.end_time,i=t.delayed;return c.MsgCreateVestingAccount.fromPartial({fromAddress:n,toAddress:a,amount:o.toProto(),endTime:u.default.fromNumber(r),delayed:i})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return s.Any.fromPartial({typeUrl:"/cosmos.vesting.v1beta1.MsgCreateVestingAccount",value:c.MsgCreateVestingAccount.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(c.MsgCreateVestingAccount.decode(e.value),n)},t}(i.JSONSerializable);t.MsgCreateVestingAccount=d},74354:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgDonateAllVestingTokens=void 0;var o=n(90743),r=n(85920),i=n(60279),s=function(e){function t(t){var n=e.call(this)||this;return n.from_address=t,n}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.value.from_address)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");return{type:"cosmos-sdk/MsgDonateAllVestingTokens",value:{from_address:this.from_address}}},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.from_address)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");return{"@type":"/cosmos.vesting.v1beta1.MsgDonateAllVestingTokens",from_address:this.from_address}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.fromAddress)},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");return i.MsgDonateAllVestingTokens.fromPartial({fromAddress:this.from_address})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/cosmos.vesting.v1beta1.MsgDonateAllVestingTokens",value:i.MsgDonateAllVestingTokens.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(i.MsgDonateAllVestingTokens.decode(e.value),n)},t}(o.JSONSerializable);t.MsgDonateAllVestingTokens=s},66956:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(97157),t),o(n(78029),t),o(n(74354),t)},95921:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AbsoluteTxPosition=void 0;var s=n(74927),c=n(90743),u=i(n(29600)),d=function(e){function t(t,n){var a=e.call(this)||this;return a.block_height=t,a.tx_index=n,a}return a(t,e),t.fromAmino=function(e){return new t(Number.parseInt(e.block_height),Number.parseInt(e.tx_index))},t.prototype.toAmino=function(){return{block_height:this.block_height.toFixed(),tx_index:this.tx_index.toFixed()}},t.fromData=function(e){return new t(Number.parseInt(e.block_height),Number.parseInt(e.tx_index))},t.prototype.toData=function(){return{block_height:this.block_height.toFixed(),tx_index:this.tx_index.toFixed()}},t.fromProto=function(e){return new t(e.blockHeight.toNumber(),e.txIndex.toNumber())},t.prototype.toProto=function(){return s.AbsoluteTxPosition.fromPartial({blockHeight:u.fromNumber(this.block_height),txIndex:u.fromNumber(this.tx_index)})},t}(c.JSONSerializable);t.AbsoluteTxPosition=d},57841:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.AccessConfig=t.AccessType=void 0;var o=n(74927);Object.defineProperty(t,"AccessType",{enumerable:!0,get:function(){return o.AccessType}});var r=n(90743),i=n(99694),s=function(e){function t(t,n){var a=e.call(this)||this;return a.permission=t,a.address=n,a}return a(t,e),t.fromAmino=function(e){return new t((0,i.convertAccessTypeFromJSON)(e.permission),e.address)},t.prototype.toAmino=function(){return{permission:(0,o.accessTypeToJSON)(this.permission),address:this.address}},t.fromData=function(e){return new t((0,i.convertAccessTypeFromJSON)(e.permission),e.address)},t.prototype.toData=function(){return{permission:(0,o.accessTypeToJSON)(this.permission),address:this.address}},t.fromProto=function(e){return new t(e.permission,e.address)},t.prototype.toProto=function(){return o.AccessConfig.fromPartial({permission:this.permission,address:this.address})},t}(r.JSONSerializable);t.AccessConfig=s},69893:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessConfigUpdate=void 0;var s=n(79985),c=n(90743),u=n(57841),d=i(n(29600)),l=function(e){function t(t,n){var a=e.call(this)||this;return a.code_id=t,a.instantiate_permission=n,a}return a(t,e),t.fromAmino=function(e){return new t(Number.parseInt(e.code_id),e.instantiate_permission?u.AccessConfig.fromAmino(e.instantiate_permission):void 0)},t.prototype.toAmino=function(){var e;return{code_id:this.code_id.toFixed(),instantiate_permission:null===(e=this.instantiate_permission)||void 0===e?void 0:e.toAmino()}},t.fromData=function(e){return new t(Number.parseInt(e.code_id),e.instantiate_permission?u.AccessConfig.fromData(e.instantiate_permission):void 0)},t.prototype.toData=function(){var e;return{code_id:this.code_id.toFixed(),instantiate_permission:null===(e=this.instantiate_permission)||void 0===e?void 0:e.toData()}},t.fromProto=function(e){return new t(e.codeId.toNumber(),e.instantiatePermission?u.AccessConfig.fromProto(e.instantiatePermission):void 0)},t.prototype.toProto=function(){var e;return s.AccessConfigUpdate.fromPartial({codeId:d.fromNumber(this.code_id),instantiatePermission:null===(e=this.instantiate_permission)||void 0===e?void 0:e.toProto()})},t}(c.JSONSerializable);t.AccessConfigUpdate=l},485:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.AccessTypeParam=t.AccessType=void 0;var o=n(74927);Object.defineProperty(t,"AccessType",{enumerable:!0,get:function(){return o.AccessType}});var r=n(90743),i=n(99694),s=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return a(t,e),t.fromAmino=function(e){return new t((0,i.convertAccessTypeFromJSON)(e.value))},t.prototype.toAmino=function(){return{value:(0,o.accessTypeToJSON)(this.value)}},t.fromData=function(e){return new t((0,i.convertAccessTypeFromJSON)(e.value))},t.prototype.toData=function(){return{value:(0,o.accessTypeToJSON)(this.value)}},t.fromProto=function(e){return new t(e.value)},t.prototype.toProto=function(){return o.AccessTypeParam.fromPartial({value:this.value})},t}(r.JSONSerializable);t.AccessTypeParam=s},85336:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryEntry=void 0;var c=n(74927),u=n(90743),d=s(n(29600)),l=n(95921),f=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.operation=t,r.code_id=n,r.updated=a,r.msg=o,r}return o(t,e),t.fromAmino=function(e){return new t((0,c.contractCodeHistoryOperationTypeFromJSON)(e.operation),Number.parseInt(e.code_id),e.updated?l.AbsoluteTxPosition.fromAmino(e.updated):void 0,e.msg)},t.prototype.toAmino=function(){var e;return{operation:(0,c.contractCodeHistoryOperationTypeToJSON)(this.operation),code_id:this.code_id.toFixed(),updated:null===(e=this.updated)||void 0===e?void 0:e.toAmino(),msg:this.msg}},t.fromData=function(e){return new t((0,c.contractCodeHistoryOperationTypeFromJSON)(e.operation),Number.parseInt(e.code_id),e.updated?l.AbsoluteTxPosition.fromData(e.updated):void 0,e.msg)},t.prototype.toData=function(){var e;return{operation:(0,c.contractCodeHistoryOperationTypeToJSON)(this.operation),code_id:this.code_id.toFixed(),updated:null===(e=this.updated)||void 0===e?void 0:e.toData(),msg:this.msg}},t.fromProto=function(e){return new t(e.operation,e.codeId.toNumber(),e.updated?l.AbsoluteTxPosition.fromProto(e.updated):void 0,JSON.parse(a.from(e.msg).toString("utf-8")))},t.prototype.toProto=function(){var e;return c.ContractCodeHistoryEntry.fromPartial({operation:this.operation,codeId:d.fromNumber(this.code_id),updated:null===(e=this.updated)||void 0===e?void 0:e.toProto(),msg:a.from(JSON.stringify((0,u.removeNull)(this.msg)),"utf-8")})},t}(u.JSONSerializable);t.HistoryEntry=f},37783:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(485),t),o(n(57841),t)},47661:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClearContractAdmin=void 0;var o=n(90743),r=n(85920),i=n(98901),s=n(58348),c=function(e){function t(t,n){var a=e.call(this)||this;return a.admin=t,a.contract=n,a}return a(t,e),t.fromAmino=function(e,n){if(n){var a=e.value;return new t(a.admin,a.contract)}var o=e.value;return new t(o.sender,o.contract)},t.prototype.toAmino=function(e){var t=this.admin,n=this.contract;return e?{type:"wasm/MsgClearContractAdmin",value:{admin:t,contract:n}}:{type:"wasm/MsgClearAdmin",value:{sender:t,contract:n}}},t.fromProto=function(e,n){if(n){var a=e;return new t(a.admin,a.contract)}var o=e;return new t(o.sender,o.contract)},t.prototype.toProto=function(e){return e?i.MsgClearContractAdmin.fromPartial({admin:this.admin,contract:this.contract}):s.MsgClearAdmin.fromPartial({sender:this.admin,contract:this.contract})},t.prototype.packAny=function(e){return e?r.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgClearContractAdmin",value:i.MsgClearContractAdmin.encode(this.toProto(e)).finish()}):r.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:s.MsgClearAdmin.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return n?t.fromProto(i.MsgClearContractAdmin.decode(e.value),n):t.fromProto(s.MsgClearAdmin.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e;return new t(a.admin,a.contract)}var o=e;return new t(o.sender,o.contract)},t.prototype.toData=function(e){return e?{"@type":"/terra.wasm.v1beta1.MsgClearContractAdmin",admin:this.admin,contract:this.contract}:{"@type":"/cosmwasm.wasm.v1.MsgClearAdmin",sender:this.admin,contract:this.contract}},t}(o.JSONSerializable);t.MsgClearContractAdmin=c},9975:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgExecuteContract=void 0;var r=n(90743),i=n(80856),s=n(85920),c=n(98901),u=n(58348),d=function(e){function t(t,n,a,o){void 0===o&&(o={});var r=e.call(this)||this;return r.sender=t,r.contract=n,r.execute_msg=a,r.coins=new i.Coins(o),r}return o(t,e),t.fromAmino=function(e,n){if(n){var a=e.value,o=a.sender,r=a.contract,s=a.execute_msg,c=a.coins;return new t(o,r,s,i.Coins.fromAmino(c))}var u=e.value,d=(o=u.sender,r=u.contract,u.msg),l=u.funds;return new t(o,r,d,i.Coins.fromAmino(l))},t.prototype.toAmino=function(e){var t=this,n=t.sender,a=t.contract,o=t.execute_msg,i=t.coins;return e?{type:"wasm/MsgExecuteContract",value:{sender:n,contract:a,execute_msg:(0,r.removeNull)(o),coins:i.toAmino()}}:{type:"wasm/MsgExecuteContract",value:{sender:n,contract:a,msg:(0,r.removeNull)(o),funds:i.toAmino()}}},t.fromProto=function(e,n){var o;return n?new t((o=e).sender,o.contract,JSON.parse(a.from(o.executeMsg).toString("utf-8")),i.Coins.fromProto(o.coins)):new t((o=e).sender,o.contract,JSON.parse(a.from(o.msg).toString("utf-8")),i.Coins.fromProto(o.funds))},t.prototype.toProto=function(e){var t=this,n=t.sender,o=t.contract,i=t.execute_msg,s=t.coins;return e?c.MsgExecuteContract.fromPartial({coins:s.toProto(),contract:o,sender:n,executeMsg:a.from(JSON.stringify((0,r.removeNull)(i)),"utf-8")}):u.MsgExecuteContract.fromPartial({funds:s.toProto(),contract:o,sender:n,msg:a.from(JSON.stringify((0,r.removeNull)(i)),"utf-8")})},t.prototype.packAny=function(e){return e?s.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgExecuteContract",value:c.MsgExecuteContract.encode(this.toProto(e)).finish()}):s.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:u.MsgExecuteContract.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(n?c.MsgExecuteContract.decode(e.value):u.MsgExecuteContract.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e,o=a.sender,r=a.contract,s=a.execute_msg,c=a.coins;return new t(o,r,s,i.Coins.fromData(c))}var u=e,d=(o=u.sender,r=u.contract,u.msg),l=u.funds;return new t(o,r,d,i.Coins.fromData(l))},t.prototype.toData=function(e){var t=this,n=t.sender,a=t.contract,o=t.execute_msg,r=t.coins;return e?{"@type":"/terra.wasm.v1beta1.MsgExecuteContract",sender:n,contract:a,execute_msg:o,coins:r.toData()}:{"@type":"/cosmwasm.wasm.v1.MsgExecuteContract",sender:n,contract:a,msg:o,funds:r.toData()}},t}(r.JSONSerializable);t.MsgExecuteContract=d},9714:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgInstantiateContract=void 0;var c=n(90743),u=n(80856),d=n(85920),l=n(98901),f=n(58348),p=s(n(29600)),b=function(e){function t(t,n,a,o,r,i){void 0===r&&(r={});var s=e.call(this)||this;return s.sender=t,s.admin=n,s.code_id=a,s.init_msg=o,s.label=i,s.init_coins=new u.Coins(r),s}return o(t,e),t.fromAmino=function(e,n){if(n){var a=e.value,o=a.sender,r=a.admin,i=a.code_id,s=a.init_msg,c=a.init_coins;return new t(o,r,Number.parseInt(i),s,u.Coins.fromAmino(c))}var d=e.value,l=(o=d.sender,r=d.admin,i=d.code_id,d.msg),f=d.funds,p=d.label;return new t(o,r,Number.parseInt(i),l,u.Coins.fromAmino(f),p)},t.prototype.toAmino=function(e){var t=this,n=t.sender,a=t.admin,o=t.code_id,r=t.init_msg,i=t.init_coins,s=t.label;return e?{type:"wasm/MsgInstantiateContract",value:{sender:n,admin:a,code_id:o.toFixed(),init_msg:(0,c.removeNull)(r),init_coins:i.toAmino()}}:{type:"wasm/MsgInstantiateContract",value:{sender:n,admin:a,code_id:o.toFixed(),label:s,msg:(0,c.removeNull)(r),funds:i.toAmino()}}},t.fromProto=function(e,n){var o;return n?new t((o=e).sender,""!==o.admin?o.admin:void 0,o.codeId.toNumber(),JSON.parse(a.from(o.initMsg).toString("utf-8")),u.Coins.fromProto(o.initCoins)):new t((o=e).sender,""!==o.admin?o.admin:void 0,o.codeId.toNumber(),JSON.parse(a.from(o.msg).toString("utf-8")),u.Coins.fromProto(o.funds),""!==o.label?o.label:void 0)},t.prototype.toProto=function(e){var t=this,n=t.sender,o=t.admin,r=t.code_id,i=t.init_msg,s=t.init_coins,c=t.label;return e?l.MsgInstantiateContract.fromPartial({admin:o,codeId:p.fromNumber(r),initCoins:s.toProto(),initMsg:a.from(JSON.stringify(i),"utf-8"),sender:n}):f.MsgInstantiateContract.fromPartial({admin:o,codeId:p.fromNumber(r),funds:s.toProto(),msg:a.from(JSON.stringify(i),"utf-8"),sender:n,label:c})},t.prototype.packAny=function(e){return e?d.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgInstantiateContract",value:l.MsgInstantiateContract.encode(this.toProto(e)).finish()}):d.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:f.MsgInstantiateContract.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return n?t.fromProto(l.MsgInstantiateContract.decode(e.value),n):t.fromProto(f.MsgInstantiateContract.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e,o=a.sender,r=a.admin,i=a.code_id,s=a.init_msg,c=a.init_coins;return new t(o,""!==r?r:void 0,Number.parseInt(i),s,u.Coins.fromData(c))}var d=e,l=(o=d.sender,r=d.admin,i=d.code_id,d.label),f=d.msg,p=d.funds;return new t(o,""!==r?r:void 0,Number.parseInt(i),f,u.Coins.fromData(p),l)},t.prototype.toData=function(e){var t=this,n=t.sender,a=t.admin,o=t.code_id,r=t.label,i=t.init_msg,s=t.init_coins;return e?{"@type":"/terra.wasm.v1beta1.MsgInstantiateContract",sender:n,admin:a||"",code_id:o.toFixed(),init_msg:(0,c.removeNull)(i),init_coins:s.toData()}:{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract",sender:n,admin:a||"",code_id:o.toFixed(),label:r,msg:(0,c.removeNull)(i),funds:s.toData()}},t}(c.JSONSerializable);t.MsgInstantiateContract=b},58066:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgMigrateCode=void 0;var c=n(90743),u=n(85920),d=n(98901),l=s(n(29600)),f=function(e){function t(t,n,a){var o=e.call(this)||this;return o.sender=t,o.code_id=n,o.wasm_byte_code=a,o}return o(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value,o=a.sender,r=a.code_id,i=a.wasm_byte_code;return new t(o,Number.parseInt(r),i)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.sender,a=t.code_id,o=t.wasm_byte_code;return{type:"wasm/MsgMigrateCode",value:{sender:n,code_id:a.toFixed(),wasm_byte_code:o}}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.sender,e.codeId.toNumber(),a.from(e.wasmByteCode).toString("base64"))},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.sender,o=t.code_id,r=t.wasm_byte_code;return d.MsgMigrateCode.fromPartial({codeId:l.fromNumber(o),sender:n,wasmByteCode:a.from(r,"base64")})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return u.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgMigrateCode",value:d.MsgMigrateCode.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(d.MsgMigrateCode.decode(e.value),n)},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.sender,o=e.code_id,r=e.wasm_byte_code;return new t(a,Number.parseInt(o),r)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.sender,a=t.code_id,o=t.wasm_byte_code;return{"@type":"/terra.wasm.v1beta1.MsgMigrateCode",sender:n,code_id:a.toFixed(),wasm_byte_code:o}},t}(c.JSONSerializable);t.MsgMigrateCode=f},23861:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgMigrateContract=void 0;var c=n(90743),u=n(85920),d=n(98901),l=n(58348),f=s(n(29600)),p=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.admin=t,r.contract=n,r.new_code_id=a,r.migrate_msg=o,r}return o(t,e),t.fromAmino=function(e,n){if(n){var a=e.value,o=a.admin,r=a.contract,i=a.new_code_id,s=a.migrate_msg;return new t(o,r,Number.parseInt(i),s)}var c=e.value,u=c.sender,d=(r=c.contract,c.code_id),l=c.msg;return new t(u,r,Number.parseInt(d),l)},t.prototype.toAmino=function(e){if(e){var t=this,n=t.admin,a=t.contract,o=t.new_code_id,r=t.migrate_msg;return{type:"wasm/MsgMigrateContract",value:{admin:n,contract:a,new_code_id:o.toFixed(),migrate_msg:(0,c.removeNull)(r)}}}var i=this;n=i.admin,a=i.contract,o=i.new_code_id,r=i.migrate_msg;return{type:"wasm/MsgMigrateContract",value:{sender:n,contract:a,code_id:o.toFixed(),msg:(0,c.removeNull)(r)}}},t.fromProto=function(e,n){var o;return n?new t((o=e).admin,o.contract,o.newCodeId.toNumber(),JSON.parse(a.from(o.migrateMsg).toString("utf-8"))):new t((o=e).sender,o.contract,o.codeId.toNumber(),JSON.parse(a.from(o.msg).toString("utf-8")))},t.prototype.toProto=function(e){var t=this,n=t.admin,o=t.contract,r=t.new_code_id,i=t.migrate_msg;return e?d.MsgMigrateContract.fromPartial({admin:n,contract:o,newCodeId:f.fromNumber(r),migrateMsg:a.from(JSON.stringify(i),"utf-8")}):l.MsgMigrateContract.fromPartial({sender:n,contract:o,codeId:f.fromNumber(r),msg:a.from(JSON.stringify(i),"utf-8")})},t.prototype.packAny=function(e){return e?u.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgMigrateContract",value:d.MsgMigrateContract.encode(this.toProto(e)).finish()}):u.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:l.MsgMigrateContract.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(n?d.MsgMigrateContract.decode(e.value):l.MsgMigrateContract.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e,o=a.admin,r=a.contract,i=a.new_code_id,s=a.migrate_msg;return new t(o,r,Number.parseInt(i),s)}var c=e,u=c.sender,d=(r=c.contract,c.code_id),l=c.msg;return new t(u,r,Number.parseInt(d),l)},t.prototype.toData=function(e){var t=this,n=t.admin,a=t.contract,o=t.new_code_id,r=t.migrate_msg;return e?{"@type":"/terra.wasm.v1beta1.MsgMigrateContract",admin:n,contract:a,new_code_id:o.toFixed(),migrate_msg:(0,c.removeNull)(r)}:{"@type":"/cosmwasm.wasm.v1.MsgMigrateContract",sender:n,contract:a,code_id:o.toFixed(),msg:(0,c.removeNull)(r)}},t}(c.JSONSerializable);t.MsgMigrateContract=p},7468:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgStoreCode=void 0;var r=n(90743),i=n(85920),s=n(98901),c=n(58348),u=n(57841),d=function(e){function t(t,n,a){var o=e.call(this)||this;return o.sender=t,o.wasm_byte_code=n,o.instantiate_permission=a,o}return o(t,e),t.fromAmino=function(e,n){if(n){var a=e.value;return new t(r=a.sender,i=a.wasm_byte_code)}var o=e.value,r=o.sender,i=o.wasm_byte_code,s=o.instantiate_permission;return new t(r,i,s?u.AccessConfig.fromAmino(s):void 0)},t.prototype.toAmino=function(e){var t=this,n=t.sender,a=t.wasm_byte_code,o=t.instantiate_permission;return e?{type:"wasm/MsgStoreCode",value:{sender:n,wasm_byte_code:a}}:{type:"wasm/MsgStoreCode",value:{sender:n,wasm_byte_code:a,instantiate_permission:null===o||void 0===o?void 0:o.toAmino()}}},t.fromProto=function(e,n){if(n)return new t(e.sender,a.from(e.wasmByteCode).toString("base64"));var o=e;return new t(o.sender,a.from(o.wasmByteCode).toString("base64"),o.instantiatePermission?u.AccessConfig.fromProto(o.instantiatePermission):void 0)},t.prototype.toProto=function(e){var t=this,n=t.sender,o=t.wasm_byte_code,r=t.instantiate_permission;return e?s.MsgStoreCode.fromPartial({sender:n,wasmByteCode:a.from(o,"base64")}):c.MsgStoreCode.fromPartial({sender:n,wasmByteCode:a.from(o,"base64"),instantiatePermission:null===r||void 0===r?void 0:r.toProto()})},t.prototype.packAny=function(e){var t;return t=e?"/terra.wasm.v1beta1.MsgStoreCode":"/cosmwasm.wasm.v1.MsgStoreCode",i.Any.fromPartial({typeUrl:t,value:e?s.MsgStoreCode.encode(this.toProto(e)).finish():c.MsgStoreCode.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return n?t.fromProto(s.MsgStoreCode.decode(e.value),n):t.fromProto(c.MsgStoreCode.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e;return new t(r=a.sender,i=a.wasm_byte_code)}var o=e,r=o.sender,i=o.wasm_byte_code,s=o.instantiate_permission;return new t(r,i,s?u.AccessConfig.fromData(s):void 0)},t.prototype.toData=function(e){var t=this,n=t.sender,a=t.wasm_byte_code,o=t.instantiate_permission;return e?{"@type":"/terra.wasm.v1beta1.MsgStoreCode",sender:n,wasm_byte_code:a}:{"@type":"/cosmwasm.wasm.v1.MsgStoreCode",sender:n,wasm_byte_code:a,instantiate_permission:null===o||void 0===o?void 0:o.toData()}},t}(r.JSONSerializable);t.MsgStoreCode=d},60872:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgUpdateContractAdmin=void 0;var o=n(90743),r=n(85920),i=n(98901),s=n(58348),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.admin=t,o.new_admin=n,o.contract=a,o}return a(t,e),t.fromAmino=function(e,n){if(n){var a=e.value;return new t(a.admin,a.new_admin,a.contract)}var o=e.value;return new t(o.sender,o.new_admin,o.contract)},t.prototype.toAmino=function(e){var t=this,n=t.admin,a=t.new_admin,o=t.contract;return e?{type:"wasm/MsgUpdateContractAdmin",value:{admin:n,new_admin:a,contract:o}}:{type:"wasm/MsgUpdateAdmin",value:{sender:n,new_admin:a,contract:o}}},t.fromProto=function(e,n){var a;return new t(n?(a=e).admin:(a=e).sender,a.newAdmin,a.contract)},t.prototype.toProto=function(e){var t=this,n=t.admin,a=t.new_admin,o=t.contract;return e?i.MsgUpdateContractAdmin.fromPartial({admin:n,contract:o,newAdmin:a}):s.MsgUpdateAdmin.fromPartial({sender:n,contract:o,newAdmin:a})},t.prototype.packAny=function(e){return e?r.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgUpdateContractAdmin",value:i.MsgUpdateContractAdmin.encode(this.toProto(e)).finish()}):r.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:s.MsgUpdateAdmin.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return n?t.fromProto(i.MsgUpdateContractAdmin.decode(e.value),n):t.fromProto(s.MsgUpdateAdmin.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e;return new t(a.admin,a.new_admin,a.contract)}var o=e;return new t(o.sender,o.new_admin,o.contract)},t.prototype.toData=function(e){var t=this,n=t.admin,a=t.new_admin,o=t.contract;return e?{"@type":"/terra.wasm.v1beta1.MsgUpdateContractAdmin",admin:n,new_admin:a,contract:o}:{"@type":"/cosmwasm.wasm.v1.MsgUpdateAdmin",sender:n,new_admin:a,contract:o}},t}(o.JSONSerializable);t.MsgUpdateContractAdmin=c},52354:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(7468),t),o(n(58066),t),o(n(9714),t),o(n(9975),t),o(n(23861),t),o(n(60872),t),o(n(47661),t)},38927:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ClearAdminProposal=void 0;var o=n(90743),r=n(85920),i=n(79985),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.contract=a,o}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.contract)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{type:"wasm/ClearAdminProposal",value:{title:t.title,description:t.description,contract:t.contract}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.contract)},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract;return i.ClearAdminProposal.fromPartial({title:n,description:a,contract:o})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ClearAdminProposal",value:i.ClearAdminProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(i.ClearAdminProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.contract)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{"@type":"/cosmwasm.wasm.v1.ClearAdminProposal",title:t.title,description:t.description,contract:t.contract}},t}(o.JSONSerializable);t.ClearAdminProposal=s},51918:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteContractProposal=void 0;var r=n(90743),i=n(80856),s=n(85920),c=n(79985),u=function(e){function t(t,n,a,o,r,s){void 0===s&&(s={});var c=e.call(this)||this;return c.title=t,c.description=n,c.run_as=a,c.contract=o,c.execute_msg=r,c.coins=new i.Coins(s),c}return o(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.title,r=a.description,s=a.run_as,c=a.contract,u=a.msg,d=a.funds;return new t(o,r,s,c,u,i.Coins.fromAmino(d))},t.prototype.toAmino=function(e){var t=this,n=t.title,a=t.description,o=t.run_as,i=t.contract,s=t.execute_msg,c=t.coins;if(e)throw new Error("Not supported for the network");return{type:"wasm/ExecuteContractProposal",value:{title:n,description:a,run_as:o,contract:i,msg:(0,r.removeNull)(s),funds:c.toAmino()}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.runAs,e.contract,JSON.parse(a.from(e.msg).toString("utf-8")),i.Coins.fromProto(e.funds))},t.prototype.toProto=function(e){var t=this,n=t.title,o=t.description,i=t.run_as,s=t.contract,u=t.execute_msg,d=t.coins;if(e)throw new Error("Not supported for the network");return c.ExecuteContractProposal.fromPartial({title:n,description:o,funds:d.toProto(),contract:s,runAs:i,msg:a.from(JSON.stringify((0,r.removeNull)(u)),"utf-8")})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return s.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ExecuteContractProposal",value:c.ExecuteContractProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.ExecuteContractProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e,o=a.title,r=a.description,s=a.run_as,c=a.contract,u=a.msg,d=a.funds;return new t(o,r,s,c,u,i.Coins.fromData(d))},t.prototype.toData=function(e){var t=this,n=t.title,a=t.description,o=t.run_as,r=t.contract,i=t.execute_msg,s=t.coins;if(e)throw new Error("Not supported for the network");return{"@type":"/cosmwasm.wasm.v1.ExecuteContractProposal",title:n,description:a,run_as:o,contract:r,msg:i,funds:s.toData()}},t}(r.JSONSerializable);t.ExecuteContractProposal=u},65248:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.InstantiateContractProposal=void 0;var c=n(90743),u=n(80856),d=n(85920),l=n(79985),f=s(n(29600)),p=function(e){function t(t,n,a,o,r,i,s,c){void 0===s&&(s={});var d=e.call(this)||this;return d.title=t,d.description=n,d.run_as=a,d.admin=o,d.code_id=r,d.init_msg=i,d.label=c,d.init_coins=new u.Coins(s),d}return o(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.title,r=a.description,i=a.run_as,s=a.admin,c=a.code_id,d=a.msg,l=a.funds,f=a.label;return new t(o,r,i,s,Number.parseInt(c),d,u.Coins.fromAmino(l),f)},t.prototype.toAmino=function(e){var t=this,n=t.title,a=t.description,o=t.run_as,r=t.admin,i=t.code_id,s=t.init_msg,u=t.init_coins,d=t.label;if(e)throw new Error("Not supported for the network");return{type:"wasm/InstantiateContractProposal",value:{title:n,description:a,run_as:o,admin:r,code_id:i.toFixed(),label:d,msg:(0,c.removeNull)(s),funds:u.toAmino()}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.runAs,""!==e.admin?e.admin:void 0,e.codeId.toNumber(),JSON.parse(a.from(e.msg).toString("utf-8")),u.Coins.fromProto(e.funds),e.label)},t.prototype.toProto=function(e){var t=this,n=t.title,o=t.description,r=t.run_as,i=t.admin,s=t.code_id,c=t.init_msg,u=t.init_coins,d=t.label;if(e)throw new Error("Not supported for the network");return l.InstantiateContractProposal.fromPartial({title:n,description:o,runAs:r,admin:i,codeId:f.fromNumber(s),funds:u.toProto(),msg:a.from(JSON.stringify(c),"utf-8"),label:d})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return d.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.InstantiateContractProposal",value:l.InstantiateContractProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(l.InstantiateContractProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e,o=a.title,r=a.description,i=a.run_as,s=a.admin,c=a.code_id,d=a.label,l=a.msg,f=a.funds;return new t(o,r,i,""!==s?s:void 0,Number.parseInt(c),l,u.Coins.fromData(f),d)},t.prototype.toData=function(e){var t=this,n=t.title,a=t.description,o=t.run_as,r=t.admin,i=t.code_id,s=t.label,u=t.init_msg,d=t.init_coins;if(e)throw new Error("Not supported for the network");return{"@type":"/cosmwasm.wasm.v1.InstantiateContractProposal",title:n,description:a,run_as:o,admin:r||"",code_id:i.toFixed(),label:s,msg:(0,c.removeNull)(u),funds:d.toData()}},t}(c.JSONSerializable);t.InstantiateContractProposal=p},30375:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MigrateContractProposal=void 0;var c=n(90743),u=n(85920),d=n(79985),l=s(n(29600)),f=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.title=t,i.description=n,i.contract=a,i.new_code_id=o,i.migrate_msg=r,i}return o(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.title,r=a.description,i=a.contract,s=a.code_id,c=a.msg;return new t(o,r,i,Number.parseInt(s),c)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract,r=t.new_code_id,i=t.migrate_msg;return{type:"wasm/MigrateContractProposal",value:{title:n,description:a,contract:o,code_id:r.toFixed(),msg:(0,c.removeNull)(i)}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.contract,e.codeId.toNumber(),JSON.parse(a.from(e.msg).toString("utf-8")))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,o=t.description,r=t.contract,i=t.new_code_id,s=t.migrate_msg;return d.MigrateContractProposal.fromPartial({title:n,description:o,contract:r,codeId:l.fromNumber(i),msg:a.from(JSON.stringify(s),"utf-8")})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return u.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MigrateContractProposal",value:d.MigrateContractProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(d.MigrateContractProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e,o=a.title,r=a.description,i=a.contract,s=a.code_id,c=a.msg;return new t(o,r,i,Number.parseInt(s),c)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract,r=t.new_code_id,i=t.migrate_msg;return{"@type":"/cosmwasm.wasm.v1.MigrateContractProposal",title:n,description:a,contract:o,code_id:r.toFixed(),msg:(0,c.removeNull)(i)}},t}(c.JSONSerializable);t.MigrateContractProposal=f},91745:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PinCodesProposal=void 0;var s=n(90743),c=n(85920),u=n(79985),d=i(n(29600)),l=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.code_ids=a,o}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.code_ids.map((function(e){return Number.parseInt(e)})))},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{type:"wasm/PinCodesProposal",value:{title:t.title,description:t.description,code_ids:t.code_ids.map((function(e){return e.toFixed()}))}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.codeIds.map((function(e){return e.toNumber()})))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.code_ids;return u.PinCodesProposal.fromPartial({title:n,description:a,codeIds:o.map((function(e){return d.fromNumber(e)}))})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return c.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.PinCodesProposal",value:u.PinCodesProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(u.PinCodesProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.code_ids.map((function(e){return Number.parseInt(e)})))},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{"@type":"/cosmwasm.wasm.v1.PinCodesProposal",title:t.title,description:t.description,code_ids:t.code_ids.map((function(e){return e.toFixed()}))}},t}(s.JSONSerializable);t.PinCodesProposal=l},11503:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.StoreCodeProposal=void 0;var r=n(90743),i=n(85920),s=n(79985),c=n(57841),u=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.title=t,i.description=n,i.run_as=a,i.wasm_byte_code=o,i.instantiate_permission=r,i}return o(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.title,r=a.description,i=a.run_as,s=a.wasm_byte_code,u=a.instantiate_permission;return new t(o,r,i,s,u?c.AccessConfig.fromAmino(u):void 0)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.run_as,r=t.wasm_byte_code,i=t.instantiate_permission;return{type:"wasm/StoreCodeProposal",value:{title:n,description:a,run_as:o,wasm_byte_code:r,instantiate_permission:null===i||void 0===i?void 0:i.toAmino()}}},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.title,o=e.description,r=e.run_as,i=e.wasm_byte_code,s=e.instantiate_permission;return new t(a,o,r,i,s?c.AccessConfig.fromData(s):void 0)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.run_as,r=t.wasm_byte_code,i=t.instantiate_permission;return{"@type":"/cosmwasm.wasm.v1.StoreCodeProposal",title:n,description:a,run_as:o,wasm_byte_code:r,instantiate_permission:null===i||void 0===i?void 0:i.toData()}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.runAs,a.from(e.wasmByteCode).toString("base64"),e.instantiatePermission?c.AccessConfig.fromProto(e.instantiatePermission):void 0)},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,o=t.description,r=t.run_as,i=t.wasm_byte_code,c=t.instantiate_permission;return s.StoreCodeProposal.fromPartial({title:n,description:o,runAs:r,wasmByteCode:a.from(i,"base64"),instantiatePermission:null===c||void 0===c?void 0:c.toProto()})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return i.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.StoreCodeProposal",value:s.StoreCodeProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(s.StoreCodeProposal.decode(e.value),n)},t}(r.JSONSerializable);t.StoreCodeProposal=u},96945:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SudoContractProposal=void 0;var r=n(90743),i=n(85920),s=n(79985),c=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.title=t,r.description=n,r.contract=a,r.msg=o,r}return o(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.contract,a.msg)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract,i=t.msg;return{type:"wasm/SudoContractProposal",value:{title:n,description:a,contract:o,msg:(0,r.removeNull)(i)}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.contract,JSON.parse(a.from(e.msg).toString("utf-8")))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,o=t.description,r=t.contract,i=t.msg;return s.SudoContractProposal.fromPartial({title:n,description:o,contract:r,msg:a.from(JSON.stringify(i),"utf-8")})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return i.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.SudoContractProposal",value:s.SudoContractProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(s.SudoContractProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.contract,a.msg)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract,i=t.msg;return{"@type":"/cosmwasm.wasm.v1.SudoContractProposal",title:n,description:a,contract:o,msg:(0,r.removeNull)(i)}},t}(r.JSONSerializable);t.SudoContractProposal=c},72653:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.UnpinCodesProposal=void 0;var s=n(90743),c=n(85920),u=n(79985),d=i(n(29600)),l=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.code_ids=a,o}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.code_ids.map((function(e){return Number.parseInt(e)})))},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{type:"wasm/UnpinCodesProposal",value:{title:t.title,description:t.description,code_ids:t.code_ids.map((function(e){return e.toFixed()}))}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.codeIds.map((function(e){return e.toNumber()})))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.code_ids;return u.UnpinCodesProposal.fromPartial({title:n,description:a,codeIds:o.map((function(e){return d.fromNumber(e)}))})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return c.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.UnpinCodesProposal",value:u.UnpinCodesProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(u.UnpinCodesProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.code_ids.map((function(e){return Number.parseInt(e)})))},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{"@type":"/cosmwasm.wasm.v1.UnpinCodesProposal",title:t.title,description:t.description,code_ids:t.code_ids.map((function(e){return e.toFixed()}))}},t}(s.JSONSerializable);t.UnpinCodesProposal=l},8:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateAdminProposal=void 0;var o=n(90743),r=n(85920),i=n(79985),s=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.title=t,r.description=n,r.contract=a,r.new_admin=o,r}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.contract,a.new_admin)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{type:"wasm/UpdateAdminProposal",value:{title:t.title,description:t.description,contract:t.contract,new_admin:t.new_admin}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.contract,e.newAdmin)},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract,r=t.new_admin;return i.UpdateAdminProposal.fromPartial({title:n,description:a,contract:o,newAdmin:r})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.UpdateAdminProposal",value:i.UpdateAdminProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(i.UpdateAdminProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.contract,a.new_admin)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{"@type":"/cosmwasm.wasm.v1.UpdateAdminProposal",title:t.title,description:t.description,contract:t.contract,new_admin:t.new_admin}},t}(o.JSONSerializable);t.UpdateAdminProposal=s},80996:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateInstantiateConfigProposal=void 0;var o=n(90743),r=n(85920),i=n(79985),s=n(69893),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.access_config_updates=a,o}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.access_config_updates.map((function(e){return s.AccessConfigUpdate.fromAmino(e)})))},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{type:"wasm/UpdateInstantiateConfigProposal",value:{title:t.title,description:t.description,access_config_updates:t.access_config_updates.map((function(e){return e.toAmino()}))}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.accessConfigUpdates.map((function(e){return s.AccessConfigUpdate.fromProto(e)})))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.access_config_updates;return i.UpdateInstantiateConfigProposal.fromPartial({title:n,description:a,accessConfigUpdates:o.map((function(e){return e.toProto()}))})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.UpdateInstantiateConfigProposal",value:i.UpdateInstantiateConfigProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(i.UpdateInstantiateConfigProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.access_config_updates.map((function(e){return s.AccessConfigUpdate.fromData(e)})))},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{"@type":"/cosmwasm.wasm.v1.UpdateInstantiateConfigProposal",title:t.title,description:t.description,access_config_updates:t.access_config_updates.map((function(e){return e.toData()}))}},t}(o.JSONSerializable);t.UpdateInstantiateConfigProposal=c},14557:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(38927),t),o(n(51918),t),o(n(65248),t),o(n(30375),t),o(n(91745),t),o(n(11503),t),o(n(96945),t),o(n(72653),t),o(n(8),t),o(n(80996),t)},99694:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertAccessTypeFromJSON=void 0;var a=n(74927);t.convertAccessTypeFromJSON=function(e){var t=e;switch(e){case"Everybody":t="ACCESS_TYPE_EVERYBODY";break;case"Nobody":t="ACCESS_TYPE_NOBODY";break;case"OnlyAddress":t="ACCESS_TYPE_ONLY_ADDRESS";break;case"Unspecified":t="ACCESS_TYPE_UNSPECIFIED"}return(0,a.accessTypeFromJSON)(t)}},82753:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(78899),r=function(){},i=function(e){function t(t){var n=t.name,a=t.target,o=t.targetWindow,i=e.call(this,{objectMode:!0})||this;return i._name=n,i._target=a,i._targetWindow=o||window,i._origin=o?"*":location.origin,i._init=!1,i._haveSyn=!1,i._onMessage=i._onMessage.bind(i),window.addEventListener("message",i._onMessage,!1),i._write("SYN",null,r),i.cork(),i}return a(t,e),t.prototype._destroy=function(){window.removeEventListener("message",this._onMessage,!1)},t.prototype._onMessage=function(e){var t=e.data;if(("*"===this._origin||e.origin===this._origin)&&e.source===this._targetWindow&&"object"===typeof t&&t.target===this._name&&t.data)if(this._init)try{this.push(t.data)}catch(n){this.emit("error",n)}else"SYN"===t.data?(this._haveSyn=!0,this._write("ACK",null,r)):"ACK"===t.data&&(this._init=!0,this._haveSyn||this._write("ACK",null,r),this.uncork())},t.prototype._read=function(){},t.prototype._write=function(e,t,n){var a={target:this._target,data:e};this._targetWindow.postMessage(a,this._origin),n(null)},t}(o.Duplex);t.default=i},39889:function(e,t,n){"use strict";var a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){l.headers[e]=o.merge(u)})),e.exports=l},25441:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},6898:function(e){e.exports={version:"0.27.2"}},48386:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),a=0;a=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},64087:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},28555:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},24490:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(52447);e.exports=function(e,t){t=t||new FormData;var n=[];function r(e){return null===e?"":o.isDate(e)?e.toISOString():o.isArrayBuffer(e)||o.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):a.from(e):e}return function e(a,i){if(o.isPlainObject(a)||o.isArray(a)){if(-1!==n.indexOf(a))throw Error("Circular reference detected in "+i);n.push(a),o.forEach(a,(function(n,a){if(!o.isUndefined(n)){var s,c=i?i+"."+a:a;if(n&&!i&&"object"===typeof n)if(o.endsWith(a,"{}"))n=JSON.stringify(n);else if(o.endsWith(a,"[]")&&(s=o.toArray(n)))return void s.forEach((function(e){!o.isUndefined(e)&&t.append(c,r(e))}));e(n,c)}})),n.pop()}else t.append(i,r(a))}(e),t}},2221:function(e,t,n){"use strict";var a=n(65218),o=n(6898).version,r=n(80748),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+o+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,c){if(!1===e)throw new r(i(o," has been removed"+(t?" in "+t:"")),r.ERR_DEPRECATED);return t&&!s[o]&&(s[o]=!0,a.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,c)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new r("options must be an object",r.ERR_BAD_OPTION_VALUE);for(var a=Object.keys(e),o=a.length;o-- >0;){var i=a[o],s=t[i];if(s){var c=e[i],u=void 0===c||s(c,i,e);if(!0!==u)throw new r("option "+i+" must be "+u,r.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new r("Unknown option "+i,r.ERR_BAD_OPTION)}},validators:i}},52447:function(e,t,n){"use strict";var a,o=n(48386),r=Object.prototype.toString,i=(a=Object.create(null),function(e){var t=r.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return i(t)===e}}function c(e){return Array.isArray(e)}function u(e){return"undefined"===typeof e}var d=s("ArrayBuffer");function l(e){return null!==e&&"object"===typeof e}function f(e){if("object"!==i(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var p=s("Date"),b=s("File"),m=s("Blob"),h=s("FileList");function g(e){return"[object Function]"===r.call(e)}var y=s("URLSearchParams");function v(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),c(e))for(var n=0,a=e.length;n0;)i[r=a[o]]||(t[r]=e[r],i[r]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var a=e.indexOf(t,n);return-1!==a&&a===n},toArray:function(e){if(!e)return null;var t=e.length;if(u(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:k,isFileList:h}},17408:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompressedNonExistenceProof=t.CompressedExistenceProof=t.CompressedBatchEntry=t.CompressedBatchProof=t.BatchEntry=t.BatchProof=t.InnerSpec=t.ProofSpec=t.InnerOp=t.LeafOp=t.CommitmentProof=t.NonExistenceProof=t.ExistenceProof=t.lengthOpToJSON=t.lengthOpFromJSON=t.LengthOp=t.hashOpToJSON=t.hashOpFromJSON=t.HashOp=t.protobufPackage=void 0;var r,i,s=o(n(29600)),c=o(n(80121));function u(e){switch(e){case 0:case"NO_HASH":return r.NO_HASH;case 1:case"SHA256":return r.SHA256;case 2:case"SHA512":return r.SHA512;case 3:case"KECCAK":return r.KECCAK;case 4:case"RIPEMD160":return r.RIPEMD160;case 5:case"BITCOIN":return r.BITCOIN;default:return r.UNRECOGNIZED}}function d(e){switch(e){case r.NO_HASH:return"NO_HASH";case r.SHA256:return"SHA256";case r.SHA512:return"SHA512";case r.KECCAK:return"KECCAK";case r.RIPEMD160:return"RIPEMD160";case r.BITCOIN:return"BITCOIN";default:return"UNKNOWN"}}function l(e){switch(e){case 0:case"NO_PREFIX":return i.NO_PREFIX;case 1:case"VAR_PROTO":return i.VAR_PROTO;case 2:case"VAR_RLP":return i.VAR_RLP;case 3:case"FIXED32_BIG":return i.FIXED32_BIG;case 4:case"FIXED32_LITTLE":return i.FIXED32_LITTLE;case 5:case"FIXED64_BIG":return i.FIXED64_BIG;case 6:case"FIXED64_LITTLE":return i.FIXED64_LITTLE;case 7:case"REQUIRE_32_BYTES":return i.REQUIRE_32_BYTES;case 8:case"REQUIRE_64_BYTES":return i.REQUIRE_64_BYTES;default:return i.UNRECOGNIZED}}function f(e){switch(e){case i.NO_PREFIX:return"NO_PREFIX";case i.VAR_PROTO:return"VAR_PROTO";case i.VAR_RLP:return"VAR_RLP";case i.FIXED32_BIG:return"FIXED32_BIG";case i.FIXED32_LITTLE:return"FIXED32_LITTLE";case i.FIXED64_BIG:return"FIXED64_BIG";case i.FIXED64_LITTLE:return"FIXED64_LITTLE";case i.REQUIRE_32_BYTES:return"REQUIRE_32_BYTES";case i.REQUIRE_64_BYTES:return"REQUIRE_64_BYTES";default:return"UNKNOWN"}}t.protobufPackage="ics23",function(e){e[e.NO_HASH=0]="NO_HASH",e[e.SHA256=1]="SHA256",e[e.SHA512=2]="SHA512",e[e.KECCAK=3]="KECCAK",e[e.RIPEMD160=4]="RIPEMD160",e[e.BITCOIN=5]="BITCOIN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(r=t.HashOp||(t.HashOp={})),t.hashOpFromJSON=u,t.hashOpToJSON=d,function(e){e[e.NO_PREFIX=0]="NO_PREFIX",e[e.VAR_PROTO=1]="VAR_PROTO",e[e.VAR_RLP=2]="VAR_RLP",e[e.FIXED32_BIG=3]="FIXED32_BIG",e[e.FIXED32_LITTLE=4]="FIXED32_LITTLE",e[e.FIXED64_BIG=5]="FIXED64_BIG",e[e.FIXED64_LITTLE=6]="FIXED64_LITTLE",e[e.REQUIRE_32_BYTES=7]="REQUIRE_32_BYTES",e[e.REQUIRE_64_BYTES=8]="REQUIRE_64_BYTES",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.LengthOp||(t.LengthOp={})),t.lengthOpFromJSON=l,t.lengthOpToJSON=f;var p={};t.ExistenceProof={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();0!==e.key.length&&n.uint32(10).bytes(e.key),0!==e.value.length&&n.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,n.uint32(26).fork()).ldelim();var o,r=a(e.path);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.InnerOp.encode(i,n.uint32(34).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},p);for(r.path=[],r.key=new Uint8Array,r.value=new Uint8Array;a.pos>>3){case 1:r.key=a.bytes();break;case 2:r.value=a.bytes();break;case 3:r.leaf=t.LeafOp.decode(a,a.uint32());break;case 4:r.path.push(t.InnerOp.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},p);if(n.path=[],n.key=new Uint8Array,n.value=new Uint8Array,void 0!==e.key&&null!==e.key&&(n.key=E(e.key)),void 0!==e.value&&null!==e.value&&(n.value=E(e.value)),void 0!==e.leaf&&null!==e.leaf?n.leaf=t.LeafOp.fromJSON(e.leaf):n.leaf=void 0,void 0!==e.path&&null!==e.path){var o,r=a(e.path);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.path.push(t.InnerOp.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.key&&(n.key=M(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(n.value=M(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.leaf&&(n.leaf=e.leaf?t.LeafOp.toJSON(e.leaf):void 0),e.path?n.path=e.path.map((function(e){return e?t.InnerOp.toJSON(e):void 0})):n.path=[],n},fromPartial:function(e){var n=Object.assign({},p);if(n.path=[],void 0!==e.key&&null!==e.key?n.key=e.key:n.key=new Uint8Array,void 0!==e.value&&null!==e.value?n.value=e.value:n.value=new Uint8Array,void 0!==e.leaf&&null!==e.leaf?n.leaf=t.LeafOp.fromPartial(e.leaf):n.leaf=void 0,void 0!==e.path&&null!==e.path){var o,r=a(e.path);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.path.push(t.InnerOp.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var b={};t.NonExistenceProof={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.left&&t.ExistenceProof.encode(e.left,n.uint32(18).fork()).ldelim(),void 0!==e.right&&t.ExistenceProof.encode(e.right,n.uint32(26).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},b);for(r.key=new Uint8Array;a.pos>>3){case 1:r.key=a.bytes();break;case 2:r.left=t.ExistenceProof.decode(a,a.uint32());break;case 3:r.right=t.ExistenceProof.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},b);return n.key=new Uint8Array,void 0!==e.key&&null!==e.key&&(n.key=E(e.key)),void 0!==e.left&&null!==e.left?n.left=t.ExistenceProof.fromJSON(e.left):n.left=void 0,void 0!==e.right&&null!==e.right?n.right=t.ExistenceProof.fromJSON(e.right):n.right=void 0,n},toJSON:function(e){var n={};return void 0!==e.key&&(n.key=M(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(n.left=e.left?t.ExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(n.right=e.right?t.ExistenceProof.toJSON(e.right):void 0),n},fromPartial:function(e){var n=Object.assign({},b);return void 0!==e.key&&null!==e.key?n.key=e.key:n.key=new Uint8Array,void 0!==e.left&&null!==e.left?n.left=t.ExistenceProof.fromPartial(e.left):n.left=void 0,void 0!==e.right&&null!==e.right?n.right=t.ExistenceProof.fromPartial(e.right):n.right=void 0,n}};var m={};t.CommitmentProof={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.exist&&t.ExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),void 0!==e.batch&&t.BatchProof.encode(e.batch,n.uint32(26).fork()).ldelim(),void 0!==e.compressed&&t.CompressedBatchProof.encode(e.compressed,n.uint32(34).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},m);a.pos>>3){case 1:r.exist=t.ExistenceProof.decode(a,a.uint32());break;case 2:r.nonexist=t.NonExistenceProof.decode(a,a.uint32());break;case 3:r.batch=t.BatchProof.decode(a,a.uint32());break;case 4:r.compressed=t.CompressedBatchProof.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},m);return void 0!==e.exist&&null!==e.exist?n.exist=t.ExistenceProof.fromJSON(e.exist):n.exist=void 0,void 0!==e.nonexist&&null!==e.nonexist?n.nonexist=t.NonExistenceProof.fromJSON(e.nonexist):n.nonexist=void 0,void 0!==e.batch&&null!==e.batch?n.batch=t.BatchProof.fromJSON(e.batch):n.batch=void 0,void 0!==e.compressed&&null!==e.compressed?n.compressed=t.CompressedBatchProof.fromJSON(e.compressed):n.compressed=void 0,n},toJSON:function(e){var n={};return void 0!==e.exist&&(n.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),void 0!==e.batch&&(n.batch=e.batch?t.BatchProof.toJSON(e.batch):void 0),void 0!==e.compressed&&(n.compressed=e.compressed?t.CompressedBatchProof.toJSON(e.compressed):void 0),n},fromPartial:function(e){var n=Object.assign({},m);return void 0!==e.exist&&null!==e.exist?n.exist=t.ExistenceProof.fromPartial(e.exist):n.exist=void 0,void 0!==e.nonexist&&null!==e.nonexist?n.nonexist=t.NonExistenceProof.fromPartial(e.nonexist):n.nonexist=void 0,void 0!==e.batch&&null!==e.batch?n.batch=t.BatchProof.fromPartial(e.batch):n.batch=void 0,void 0!==e.compressed&&null!==e.compressed?n.compressed=t.CompressedBatchProof.fromPartial(e.compressed):n.compressed=void 0,n}};var h={hash:0,prehashKey:0,prehashValue:0,length:0};t.LeafOp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.hash&&t.uint32(8).int32(e.hash),0!==e.prehashKey&&t.uint32(16).int32(e.prehashKey),0!==e.prehashValue&&t.uint32(24).int32(e.prehashValue),0!==e.length&&t.uint32(32).int32(e.length),0!==e.prefix.length&&t.uint32(42).bytes(e.prefix),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.prefix=new Uint8Array;n.pos>>3){case 1:o.hash=n.int32();break;case 2:o.prehashKey=n.int32();break;case 3:o.prehashValue=n.int32();break;case 4:o.length=n.int32();break;case 5:o.prefix=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);return t.prefix=new Uint8Array,void 0!==e.hash&&null!==e.hash?t.hash=u(e.hash):t.hash=0,void 0!==e.prehashKey&&null!==e.prehashKey?t.prehashKey=u(e.prehashKey):t.prehashKey=0,void 0!==e.prehashValue&&null!==e.prehashValue?t.prehashValue=u(e.prehashValue):t.prehashValue=0,void 0!==e.length&&null!==e.length?t.length=l(e.length):t.length=0,void 0!==e.prefix&&null!==e.prefix&&(t.prefix=E(e.prefix)),t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=d(e.hash)),void 0!==e.prehashKey&&(t.prehashKey=d(e.prehashKey)),void 0!==e.prehashValue&&(t.prehashValue=d(e.prehashValue)),void 0!==e.length&&(t.length=f(e.length)),void 0!==e.prefix&&(t.prefix=M(void 0!==e.prefix?e.prefix:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},h);return void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash=0,void 0!==e.prehashKey&&null!==e.prehashKey?t.prehashKey=e.prehashKey:t.prehashKey=0,void 0!==e.prehashValue&&null!==e.prehashValue?t.prehashValue=e.prehashValue:t.prehashValue=0,void 0!==e.length&&null!==e.length?t.length=e.length:t.length=0,void 0!==e.prefix&&null!==e.prefix?t.prefix=e.prefix:t.prefix=new Uint8Array,t}};var g={hash:0};t.InnerOp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.hash&&t.uint32(8).int32(e.hash),0!==e.prefix.length&&t.uint32(18).bytes(e.prefix),0!==e.suffix.length&&t.uint32(26).bytes(e.suffix),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);for(o.prefix=new Uint8Array,o.suffix=new Uint8Array;n.pos>>3){case 1:o.hash=n.int32();break;case 2:o.prefix=n.bytes();break;case 3:o.suffix=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},g);return t.prefix=new Uint8Array,t.suffix=new Uint8Array,void 0!==e.hash&&null!==e.hash?t.hash=u(e.hash):t.hash=0,void 0!==e.prefix&&null!==e.prefix&&(t.prefix=E(e.prefix)),void 0!==e.suffix&&null!==e.suffix&&(t.suffix=E(e.suffix)),t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=d(e.hash)),void 0!==e.prefix&&(t.prefix=M(void 0!==e.prefix?e.prefix:new Uint8Array)),void 0!==e.suffix&&(t.suffix=M(void 0!==e.suffix?e.suffix:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash=0,void 0!==e.prefix&&null!==e.prefix?t.prefix=e.prefix:t.prefix=new Uint8Array,void 0!==e.suffix&&null!==e.suffix?t.suffix=e.suffix:t.suffix=new Uint8Array,t}};var y={maxDepth:0,minDepth:0};t.ProofSpec={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.leafSpec&&t.LeafOp.encode(e.leafSpec,n.uint32(10).fork()).ldelim(),void 0!==e.innerSpec&&t.InnerSpec.encode(e.innerSpec,n.uint32(18).fork()).ldelim(),0!==e.maxDepth&&n.uint32(24).int32(e.maxDepth),0!==e.minDepth&&n.uint32(32).int32(e.minDepth),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},y);a.pos>>3){case 1:r.leafSpec=t.LeafOp.decode(a,a.uint32());break;case 2:r.innerSpec=t.InnerSpec.decode(a,a.uint32());break;case 3:r.maxDepth=a.int32();break;case 4:r.minDepth=a.int32();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},y);return void 0!==e.leafSpec&&null!==e.leafSpec?n.leafSpec=t.LeafOp.fromJSON(e.leafSpec):n.leafSpec=void 0,void 0!==e.innerSpec&&null!==e.innerSpec?n.innerSpec=t.InnerSpec.fromJSON(e.innerSpec):n.innerSpec=void 0,void 0!==e.maxDepth&&null!==e.maxDepth?n.maxDepth=Number(e.maxDepth):n.maxDepth=0,void 0!==e.minDepth&&null!==e.minDepth?n.minDepth=Number(e.minDepth):n.minDepth=0,n},toJSON:function(e){var n={};return void 0!==e.leafSpec&&(n.leafSpec=e.leafSpec?t.LeafOp.toJSON(e.leafSpec):void 0),void 0!==e.innerSpec&&(n.innerSpec=e.innerSpec?t.InnerSpec.toJSON(e.innerSpec):void 0),void 0!==e.maxDepth&&(n.maxDepth=e.maxDepth),void 0!==e.minDepth&&(n.minDepth=e.minDepth),n},fromPartial:function(e){var n=Object.assign({},y);return void 0!==e.leafSpec&&null!==e.leafSpec?n.leafSpec=t.LeafOp.fromPartial(e.leafSpec):n.leafSpec=void 0,void 0!==e.innerSpec&&null!==e.innerSpec?n.innerSpec=t.InnerSpec.fromPartial(e.innerSpec):n.innerSpec=void 0,void 0!==e.maxDepth&&null!==e.maxDepth?n.maxDepth=e.maxDepth:n.maxDepth=0,void 0!==e.minDepth&&null!==e.minDepth?n.minDepth=e.minDepth:n.minDepth=0,n}};var v={childOrder:0,childSize:0,minPrefixLength:0,maxPrefixLength:0,hash:0};t.InnerSpec={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();t.uint32(10).fork();var n,o=a(e.childOrder);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.int32(r)}}catch(i){o.e(i)}finally{o.f()}return t.ldelim(),0!==e.childSize&&t.uint32(16).int32(e.childSize),0!==e.minPrefixLength&&t.uint32(24).int32(e.minPrefixLength),0!==e.maxPrefixLength&&t.uint32(32).int32(e.maxPrefixLength),0!==e.emptyChild.length&&t.uint32(42).bytes(e.emptyChild),0!==e.hash&&t.uint32(48).int32(e.hash),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);for(o.childOrder=[],o.emptyChild=new Uint8Array;n.pos>>3){case 1:if(2===(7&r))for(var i=n.uint32()+n.pos;n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create(),r=a(e.entries);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.BatchEntry.encode(i,o.uint32(10).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return o},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},w);for(r.entries=[];a.pos>>3===1)r.entries.push(t.BatchEntry.decode(a,a.uint32()));else a.skipType(7&i)}return r},fromJSON:function(e){var n=Object.assign({},w);if(n.entries=[],void 0!==e.entries&&null!==e.entries){var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.entries.push(t.BatchEntry.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return e.entries?n.entries=e.entries.map((function(e){return e?t.BatchEntry.toJSON(e):void 0})):n.entries=[],n},fromPartial:function(e){var n=Object.assign({},w);if(n.entries=[],void 0!==e.entries&&null!==e.entries){var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.entries.push(t.BatchEntry.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var k={};t.BatchEntry={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.exist&&t.ExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},k);a.pos>>3){case 1:r.exist=t.ExistenceProof.decode(a,a.uint32());break;case 2:r.nonexist=t.NonExistenceProof.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},k);return void 0!==e.exist&&null!==e.exist?n.exist=t.ExistenceProof.fromJSON(e.exist):n.exist=void 0,void 0!==e.nonexist&&null!==e.nonexist?n.nonexist=t.NonExistenceProof.fromJSON(e.nonexist):n.nonexist=void 0,n},toJSON:function(e){var n={};return void 0!==e.exist&&(n.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),n},fromPartial:function(e){var n=Object.assign({},k);return void 0!==e.exist&&null!==e.exist?n.exist=t.ExistenceProof.fromPartial(e.exist):n.exist=void 0,void 0!==e.nonexist&&null!==e.nonexist?n.nonexist=t.NonExistenceProof.fromPartial(e.nonexist):n.nonexist=void 0,n}};var A={};t.CompressedBatchProof={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create(),r=a(e.entries);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.CompressedBatchEntry.encode(i,o.uint32(10).fork()).ldelim()}}catch(l){r.e(l)}finally{r.f()}var s,u=a(e.lookupInners);try{for(u.s();!(s=u.n()).done;){var d=s.value;t.InnerOp.encode(d,o.uint32(18).fork()).ldelim()}}catch(l){u.e(l)}finally{u.f()}return o},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},A);for(r.entries=[],r.lookupInners=[];a.pos>>3){case 1:r.entries.push(t.CompressedBatchEntry.decode(a,a.uint32()));break;case 2:r.lookupInners.push(t.InnerOp.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},A);if(n.entries=[],n.lookupInners=[],void 0!==e.entries&&null!==e.entries){var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.entries.push(t.CompressedBatchEntry.fromJSON(i))}}catch(d){r.e(d)}finally{r.f()}}if(void 0!==e.lookupInners&&null!==e.lookupInners){var s,c=a(e.lookupInners);try{for(c.s();!(s=c.n()).done;){var u=s.value;n.lookupInners.push(t.InnerOp.fromJSON(u))}}catch(d){c.e(d)}finally{c.f()}}return n},toJSON:function(e){var n={};return e.entries?n.entries=e.entries.map((function(e){return e?t.CompressedBatchEntry.toJSON(e):void 0})):n.entries=[],e.lookupInners?n.lookupInners=e.lookupInners.map((function(e){return e?t.InnerOp.toJSON(e):void 0})):n.lookupInners=[],n},fromPartial:function(e){var n=Object.assign({},A);if(n.entries=[],n.lookupInners=[],void 0!==e.entries&&null!==e.entries){var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.entries.push(t.CompressedBatchEntry.fromPartial(i))}}catch(d){r.e(d)}finally{r.f()}}if(void 0!==e.lookupInners&&null!==e.lookupInners){var s,c=a(e.lookupInners);try{for(c.s();!(s=c.n()).done;){var u=s.value;n.lookupInners.push(t.InnerOp.fromPartial(u))}}catch(d){c.e(d)}finally{c.f()}}return n}};var x={};t.CompressedBatchEntry={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.exist&&t.CompressedExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.CompressedNonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},x);a.pos>>3){case 1:r.exist=t.CompressedExistenceProof.decode(a,a.uint32());break;case 2:r.nonexist=t.CompressedNonExistenceProof.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},x);return void 0!==e.exist&&null!==e.exist?n.exist=t.CompressedExistenceProof.fromJSON(e.exist):n.exist=void 0,void 0!==e.nonexist&&null!==e.nonexist?n.nonexist=t.CompressedNonExistenceProof.fromJSON(e.nonexist):n.nonexist=void 0,n},toJSON:function(e){var n={};return void 0!==e.exist&&(n.exist=e.exist?t.CompressedExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.CompressedNonExistenceProof.toJSON(e.nonexist):void 0),n},fromPartial:function(e){var n=Object.assign({},x);return void 0!==e.exist&&null!==e.exist?n.exist=t.CompressedExistenceProof.fromPartial(e.exist):n.exist=void 0,void 0!==e.nonexist&&null!==e.nonexist?n.nonexist=t.CompressedNonExistenceProof.fromPartial(e.nonexist):n.nonexist=void 0,n}};var I={path:0};t.CompressedExistenceProof={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();0!==e.key.length&&n.uint32(10).bytes(e.key),0!==e.value.length&&n.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,n.uint32(26).fork()).ldelim(),n.uint32(34).fork();var o,r=a(e.path);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.int32(i)}}catch(s){r.e(s)}finally{r.f()}return n.ldelim(),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},I);for(r.path=[],r.key=new Uint8Array,r.value=new Uint8Array;a.pos>>3){case 1:r.key=a.bytes();break;case 2:r.value=a.bytes();break;case 3:r.leaf=t.LeafOp.decode(a,a.uint32());break;case 4:if(2===(7&i))for(var s=a.uint32()+a.pos;a.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.left&&t.CompressedExistenceProof.encode(e.left,n.uint32(18).fork()).ldelim(),void 0!==e.right&&t.CompressedExistenceProof.encode(e.right,n.uint32(26).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},T);for(r.key=new Uint8Array;a.pos>>3){case 1:r.key=a.bytes();break;case 2:r.left=t.CompressedExistenceProof.decode(a,a.uint32());break;case 3:r.right=t.CompressedExistenceProof.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},T);return n.key=new Uint8Array,void 0!==e.key&&null!==e.key&&(n.key=E(e.key)),void 0!==e.left&&null!==e.left?n.left=t.CompressedExistenceProof.fromJSON(e.left):n.left=void 0,void 0!==e.right&&null!==e.right?n.right=t.CompressedExistenceProof.fromJSON(e.right):n.right=void 0,n},toJSON:function(e){var n={};return void 0!==e.key&&(n.key=M(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(n.left=e.left?t.CompressedExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(n.right=e.right?t.CompressedExistenceProof.toJSON(e.right):void 0),n},fromPartial:function(e){var n=Object.assign({},T);return void 0!==e.key&&null!==e.key?n.key=e.key:n.key=new Uint8Array,void 0!==e.left&&null!==e.left?n.left=t.CompressedExistenceProof.fromPartial(e.left):n.left=void 0,void 0!==e.right&&null!==e.right?n.right=t.CompressedExistenceProof.fromPartial(e.right):n.right=void 0,n}};var S=function(){if("undefined"!==typeof S)return S;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),C=S.atob||function(e){return S.Buffer.from(e,"base64").toString("binary")};function E(e){for(var t=C(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pubKey&&s.Any.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.accountNumber.isZero()||t.uint32(24).uint64(e.accountNumber),e.sequence.isZero()||t.uint32(32).uint64(e.sequence),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.address=n.string();break;case 2:o.pubKey=s.Any.decode(n,n.uint32());break;case 3:o.accountNumber=n.uint64();break;case 4:o.sequence=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.address&&null!==e.address?t.address=String(e.address):t.address="",void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=s.Any.fromJSON(e.pubKey):t.pubKey=void 0,void 0!==e.accountNumber&&null!==e.accountNumber?t.accountNumber=r.default.fromString(e.accountNumber):t.accountNumber=r.default.UZERO,void 0!==e.sequence&&null!==e.sequence?t.sequence=r.default.fromString(e.sequence):t.sequence=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pubKey&&(t.pubKey=e.pubKey?s.Any.toJSON(e.pubKey):void 0),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||r.default.UZERO).toString()),void 0!==e.sequence&&(t.sequence=(e.sequence||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.address&&null!==e.address?t.address=e.address:t.address="",void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=s.Any.fromPartial(e.pubKey):t.pubKey=void 0,void 0!==e.accountNumber&&null!==e.accountNumber?t.accountNumber=e.accountNumber:t.accountNumber=r.default.UZERO,void 0!==e.sequence&&null!==e.sequence?t.sequence=e.sequence:t.sequence=r.default.UZERO,t}};var u={name:"",permissions:""};t.ModuleAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.baseAccount&&t.BaseAccount.encode(e.baseAccount,n.uint32(10).fork()).ldelim(),""!==e.name&&n.uint32(18).string(e.name);var o,r=a(e.permissions);try{for(r.s();!(o=r.n()).done;){var s=o.value;n.uint32(26).string(s)}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},u);for(r.permissions=[];a.pos>>3){case 1:r.baseAccount=t.BaseAccount.decode(a,a.uint32());break;case 2:r.name=a.string();break;case 3:r.permissions.push(a.string());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},u);if(n.permissions=[],void 0!==e.baseAccount&&null!==e.baseAccount?n.baseAccount=t.BaseAccount.fromJSON(e.baseAccount):n.baseAccount=void 0,void 0!==e.name&&null!==e.name?n.name=String(e.name):n.name="",void 0!==e.permissions&&null!==e.permissions){var o,r=a(e.permissions);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.permissions.push(String(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.baseAccount&&(n.baseAccount=e.baseAccount?t.BaseAccount.toJSON(e.baseAccount):void 0),void 0!==e.name&&(n.name=e.name),e.permissions?n.permissions=e.permissions.map((function(e){return e})):n.permissions=[],n},fromPartial:function(e){var n=Object.assign({},u);if(n.permissions=[],void 0!==e.baseAccount&&null!==e.baseAccount?n.baseAccount=t.BaseAccount.fromPartial(e.baseAccount):n.baseAccount=void 0,void 0!==e.name&&null!==e.name?n.name=e.name:n.name="",void 0!==e.permissions&&null!==e.permissions){var o,r=a(e.permissions);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.permissions.push(i)}}catch(s){r.e(s)}finally{r.f()}}return n}};var d={maxMemoCharacters:r.default.UZERO,txSigLimit:r.default.UZERO,txSizeCostPerByte:r.default.UZERO,sigVerifyCostEd25519:r.default.UZERO,sigVerifyCostSecp256k1:r.default.UZERO};t.Params={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.maxMemoCharacters.isZero()||t.uint32(8).uint64(e.maxMemoCharacters),e.txSigLimit.isZero()||t.uint32(16).uint64(e.txSigLimit),e.txSizeCostPerByte.isZero()||t.uint32(24).uint64(e.txSizeCostPerByte),e.sigVerifyCostEd25519.isZero()||t.uint32(32).uint64(e.sigVerifyCostEd25519),e.sigVerifyCostSecp256k1.isZero()||t.uint32(40).uint64(e.sigVerifyCostSecp256k1),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.maxMemoCharacters=n.uint64();break;case 2:o.txSigLimit=n.uint64();break;case 3:o.txSizeCostPerByte=n.uint64();break;case 4:o.sigVerifyCostEd25519=n.uint64();break;case 5:o.sigVerifyCostSecp256k1=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters?t.maxMemoCharacters=r.default.fromString(e.maxMemoCharacters):t.maxMemoCharacters=r.default.UZERO,void 0!==e.txSigLimit&&null!==e.txSigLimit?t.txSigLimit=r.default.fromString(e.txSigLimit):t.txSigLimit=r.default.UZERO,void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte?t.txSizeCostPerByte=r.default.fromString(e.txSizeCostPerByte):t.txSizeCostPerByte=r.default.UZERO,void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519?t.sigVerifyCostEd25519=r.default.fromString(e.sigVerifyCostEd25519):t.sigVerifyCostEd25519=r.default.UZERO,void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1?t.sigVerifyCostSecp256k1=r.default.fromString(e.sigVerifyCostSecp256k1):t.sigVerifyCostSecp256k1=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.maxMemoCharacters&&(t.maxMemoCharacters=(e.maxMemoCharacters||r.default.UZERO).toString()),void 0!==e.txSigLimit&&(t.txSigLimit=(e.txSigLimit||r.default.UZERO).toString()),void 0!==e.txSizeCostPerByte&&(t.txSizeCostPerByte=(e.txSizeCostPerByte||r.default.UZERO).toString()),void 0!==e.sigVerifyCostEd25519&&(t.sigVerifyCostEd25519=(e.sigVerifyCostEd25519||r.default.UZERO).toString()),void 0!==e.sigVerifyCostSecp256k1&&(t.sigVerifyCostSecp256k1=(e.sigVerifyCostSecp256k1||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters?t.maxMemoCharacters=e.maxMemoCharacters:t.maxMemoCharacters=r.default.UZERO,void 0!==e.txSigLimit&&null!==e.txSigLimit?t.txSigLimit=e.txSigLimit:t.txSigLimit=r.default.UZERO,void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte?t.txSizeCostPerByte=e.txSizeCostPerByte:t.txSizeCostPerByte=r.default.UZERO,void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519?t.sigVerifyCostEd25519=e.sigVerifyCostEd25519:t.sigVerifyCostEd25519=r.default.UZERO,void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1?t.sigVerifyCostSecp256k1=e.sigVerifyCostSecp256k1:t.sigVerifyCostSecp256k1=r.default.UZERO,t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},25169:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrantAuthorization=t.Grant=t.GenericAuthorization=t.protobufPackage=void 0;var o=a(n(29600)),r=a(n(80121)),i=n(85920),s=n(47478);t.protobufPackage="cosmos.authz.v1beta1";var c={msg:""};t.GenericAuthorization={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.msg&&t.uint32(10).string(e.msg),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3===1)o.msg=n.string();else n.skipType(7&i)}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.msg&&null!==e.msg?t.msg=String(e.msg):t.msg="",t},toJSON:function(e){var t={};return void 0!==e.msg&&(t.msg=e.msg),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.msg&&null!==e.msg?t.msg=e.msg:t.msg="",t}};var u={};t.Grant={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return void 0!==e.authorization&&i.Any.encode(e.authorization,t.uint32(10).fork()).ldelim(),void 0!==e.expiration&&s.Timestamp.encode(l(e.expiration),t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.authorization=i.Any.decode(n,n.uint32());break;case 2:o.expiration=f(s.Timestamp.decode(n,n.uint32()));break;default:n.skipType(7&c)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.authorization&&null!==e.authorization?t.authorization=i.Any.fromJSON(e.authorization):t.authorization=void 0,void 0!==e.expiration&&null!==e.expiration?t.expiration=p(e.expiration):t.expiration=void 0,t},toJSON:function(e){var t={};return void 0!==e.authorization&&(t.authorization=e.authorization?i.Any.toJSON(e.authorization):void 0),void 0!==e.expiration&&(t.expiration=e.expiration.toISOString()),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.authorization&&null!==e.authorization?t.authorization=i.Any.fromPartial(e.authorization):t.authorization=void 0,void 0!==e.expiration&&null!==e.expiration?t.expiration=e.expiration:t.expiration=void 0,t}};var d={granter:"",grantee:""};function l(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function f(e){var t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function p(e){return e instanceof Date?e:"string"===typeof e?new Date(e):f(s.Timestamp.fromJSON(e))}t.GrantAuthorization={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.authorization&&i.Any.encode(e.authorization,t.uint32(26).fork()).ldelim(),void 0!==e.expiration&&s.Timestamp.encode(l(e.expiration),t.uint32(34).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.granter=n.string();break;case 2:o.grantee=n.string();break;case 3:o.authorization=i.Any.decode(n,n.uint32());break;case 4:o.expiration=f(s.Timestamp.decode(n,n.uint32()));break;default:n.skipType(7&c)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.granter&&null!==e.granter?t.granter=String(e.granter):t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=String(e.grantee):t.grantee="",void 0!==e.authorization&&null!==e.authorization?t.authorization=i.Any.fromJSON(e.authorization):t.authorization=void 0,void 0!==e.expiration&&null!==e.expiration?t.expiration=p(e.expiration):t.expiration=void 0,t},toJSON:function(e){var t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.authorization&&(t.authorization=e.authorization?i.Any.toJSON(e.authorization):void 0),void 0!==e.expiration&&(t.expiration=e.expiration.toISOString()),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.granter&&null!==e.granter?t.granter=e.granter:t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=e.grantee:t.grantee="",void 0!==e.authorization&&null!==e.authorization?t.authorization=i.Any.fromPartial(e.authorization):t.authorization=void 0,void 0!==e.expiration&&null!==e.expiration?t.expiration=e.expiration:t.expiration=void 0,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},2922:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgRevokeDesc=t.MsgExecDesc=t.MsgGrantDesc=t.MsgDesc=t.MsgClientImpl=t.MsgRevokeResponse=t.MsgRevoke=t.MsgGrantResponse=t.MsgExec=t.MsgExecResponse=t.MsgGrant=t.protobufPackage=void 0;var s=i(n(29600)),c=n(93704),u=i(n(80121)),d=n(25169),l=n(82576),f=n(85920);t.protobufPackage="cosmos.authz.v1beta1";var p={granter:"",grantee:""};t.MsgGrant={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.grant&&d.Grant.encode(e.grant,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos>>3){case 1:o.granter=n.string();break;case 2:o.grantee=n.string();break;case 3:o.grant=d.Grant.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return void 0!==e.granter&&null!==e.granter?t.granter=String(e.granter):t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=String(e.grantee):t.grantee="",void 0!==e.grant&&null!==e.grant?t.grant=d.Grant.fromJSON(e.grant):t.grant=void 0,t},toJSON:function(e){var t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.grant&&(t.grant=e.grant?d.Grant.toJSON(e.grant):void 0),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.granter&&null!==e.granter?t.granter=e.granter:t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=e.grantee:t.grantee="",void 0!==e.grant&&null!==e.grant?t.grant=d.Grant.fromPartial(e.grant):t.grant=void 0,t}};var b={};t.MsgExecResponse={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create(),a=r(e.results);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.uint32(10).bytes(o)}}catch(i){a.e(i)}finally{a.f()}return n},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);for(o.results=[];n.pos>>3===1)o.results.push(n.bytes());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},b);if(t.results=[],void 0!==e.results&&null!==e.results){var n,a=r(e.results);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.results.push(x(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return e.results?t.results=e.results.map((function(e){return function(e){var t,n=[],a=r(e);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.push(String.fromCharCode(o))}}catch(i){a.e(i)}finally{a.f()}return I(n.join(""))}(void 0!==e?e:new Uint8Array)})):t.results=[],t},fromPartial:function(e){var t=Object.assign({},b);if(t.results=[],void 0!==e.results&&null!==e.results){var n,a=r(e.results);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.results.push(o)}}catch(i){a.e(i)}finally{a.f()}}return t}};var m={grantee:""};t.MsgExec={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();""!==e.grantee&&t.uint32(10).string(e.grantee);var n,a=r(e.msgs);try{for(a.s();!(n=a.n()).done;){var o=n.value;f.Any.encode(o,t.uint32(18).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);for(o.msgs=[];n.pos>>3){case 1:o.grantee=n.string();break;case 2:o.msgs.push(f.Any.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},m);if(t.msgs=[],void 0!==e.grantee&&null!==e.grantee?t.grantee=String(e.grantee):t.grantee="",void 0!==e.msgs&&null!==e.msgs){var n,a=r(e.msgs);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.msgs.push(f.Any.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return void 0!==e.grantee&&(t.grantee=e.grantee),e.msgs?t.msgs=e.msgs.map((function(e){return e?f.Any.toJSON(e):void 0})):t.msgs=[],t},fromPartial:function(e){var t=Object.assign({},m);if(t.msgs=[],void 0!==e.grantee&&null!==e.grantee?t.grantee=e.grantee:t.grantee="",void 0!==e.msgs&&null!==e.msgs){var n,a=r(e.msgs);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.msgs.push(f.Any.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return t}};var h={};t.MsgGrantResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),""!==e.msgTypeUrl&&t.uint32(26).string(e.msgTypeUrl),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos>>3){case 1:o.granter=n.string();break;case 2:o.grantee=n.string();break;case 3:o.msgTypeUrl=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},g);return void 0!==e.granter&&null!==e.granter?t.granter=String(e.granter):t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=String(e.grantee):t.grantee="",void 0!==e.msgTypeUrl&&null!==e.msgTypeUrl?t.msgTypeUrl=String(e.msgTypeUrl):t.msgTypeUrl="",t},toJSON:function(e){var t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.msgTypeUrl&&(t.msgTypeUrl=e.msgTypeUrl),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.granter&&null!==e.granter?t.granter=e.granter:t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=e.grantee:t.grantee="",void 0!==e.msgTypeUrl&&null!==e.msgTypeUrl?t.msgTypeUrl=e.msgTypeUrl:t.msgTypeUrl="",t}};var y={};t.MsgRevokeResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.spendLimit);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);for(o.spendLimit=[];n.pos>>3===1)o.spendLimit.push(s.Coin.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},c);if(t.spendLimit=[],void 0!==e.spendLimit&&null!==e.spendLimit){var n,o=a(e.spendLimit);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.spendLimit.push(s.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.spendLimit?t.spendLimit=e.spendLimit.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.spendLimit=[],t},fromPartial:function(e){var t=Object.assign({},c);if(t.spendLimit=[],void 0!==e.spendLimit&&null!==e.spendLimit){var n,o=a(e.spendLimit);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.spendLimit.push(s.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},3718:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=t.DenomUnit=t.Supply=t.Output=t.Input=t.SendEnabled=t.Params=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121)),s=n(39705);t.protobufPackage="cosmos.bank.v1beta1";var c={defaultSendEnabled:!1};t.Params={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.sendEnabled);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.SendEnabled.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return!0===e.defaultSendEnabled&&o.uint32(16).bool(e.defaultSendEnabled),o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},c);for(r.sendEnabled=[];a.pos>>3){case 1:r.sendEnabled.push(t.SendEnabled.decode(a,a.uint32()));break;case 2:r.defaultSendEnabled=a.bool();break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},c);if(n.sendEnabled=[],void 0!==e.sendEnabled&&null!==e.sendEnabled){var o,r=a(e.sendEnabled);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.sendEnabled.push(t.SendEnabled.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.defaultSendEnabled&&null!==e.defaultSendEnabled?n.defaultSendEnabled=Boolean(e.defaultSendEnabled):n.defaultSendEnabled=!1,n},toJSON:function(e){var n={};return e.sendEnabled?n.sendEnabled=e.sendEnabled.map((function(e){return e?t.SendEnabled.toJSON(e):void 0})):n.sendEnabled=[],void 0!==e.defaultSendEnabled&&(n.defaultSendEnabled=e.defaultSendEnabled),n},fromPartial:function(e){var n=Object.assign({},c);if(n.sendEnabled=[],void 0!==e.sendEnabled&&null!==e.sendEnabled){var o,r=a(e.sendEnabled);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.sendEnabled.push(t.SendEnabled.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.defaultSendEnabled&&null!==e.defaultSendEnabled?n.defaultSendEnabled=e.defaultSendEnabled:n.defaultSendEnabled=!1,n}};var u={denom:"",enabled:!1};t.SendEnabled={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),!0===e.enabled&&t.uint32(16).bool(e.enabled),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.denom=n.string();break;case 2:o.enabled=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.enabled&&null!==e.enabled?t.enabled=Boolean(e.enabled):t.enabled=!1,t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.enabled&&(t.enabled=e.enabled),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.enabled&&null!==e.enabled?t.enabled=e.enabled:t.enabled=!1,t}};var d={address:""};t.Input={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.address&&t.uint32(10).string(e.address);var n,o=a(e.coins);try{for(o.s();!(n=o.n()).done;){var r=n.value;s.Coin.encode(r,t.uint32(18).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);for(o.coins=[];n.pos>>3){case 1:o.address=n.string();break;case 2:o.coins.push(s.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);if(t.coins=[],void 0!==e.address&&null!==e.address?t.address=String(e.address):t.address="",void 0!==e.coins&&null!==e.coins){var n,o=a(e.coins);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.coins.push(s.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.coins=[],t},fromPartial:function(e){var t=Object.assign({},d);if(t.coins=[],void 0!==e.address&&null!==e.address?t.address=e.address:t.address="",void 0!==e.coins&&null!==e.coins){var n,o=a(e.coins);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.coins.push(s.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var l={address:""};t.Output={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.address&&t.uint32(10).string(e.address);var n,o=a(e.coins);try{for(o.s();!(n=o.n()).done;){var r=n.value;s.Coin.encode(r,t.uint32(18).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);for(o.coins=[];n.pos>>3){case 1:o.address=n.string();break;case 2:o.coins.push(s.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},l);if(t.coins=[],void 0!==e.address&&null!==e.address?t.address=String(e.address):t.address="",void 0!==e.coins&&null!==e.coins){var n,o=a(e.coins);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.coins.push(s.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.coins=[],t},fromPartial:function(e){var t=Object.assign({},l);if(t.coins=[],void 0!==e.address&&null!==e.address?t.address=e.address:t.address="",void 0!==e.coins&&null!==e.coins){var n,o=a(e.coins);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.coins.push(s.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var f={};t.Supply={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.total);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);for(o.total=[];n.pos>>3===1)o.total.push(s.Coin.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},f);if(t.total=[],void 0!==e.total&&null!==e.total){var n,o=a(e.total);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.total.push(s.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.total?t.total=e.total.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.total=[],t},fromPartial:function(e){var t=Object.assign({},f);if(t.total=[],void 0!==e.total&&null!==e.total){var n,o=a(e.total);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.total.push(s.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var p={denom:"",exponent:0,aliases:""};t.DenomUnit={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.denom&&t.uint32(10).string(e.denom),0!==e.exponent&&t.uint32(16).uint32(e.exponent);var n,o=a(e.aliases);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(26).string(r)}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);for(o.aliases=[];n.pos>>3){case 1:o.denom=n.string();break;case 2:o.exponent=n.uint32();break;case 3:o.aliases.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);if(t.aliases=[],void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.exponent&&null!==e.exponent?t.exponent=Number(e.exponent):t.exponent=0,void 0!==e.aliases&&null!==e.aliases){var n,o=a(e.aliases);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.aliases.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.exponent&&(t.exponent=e.exponent),e.aliases?t.aliases=e.aliases.map((function(e){return e})):t.aliases=[],t},fromPartial:function(e){var t=Object.assign({},p);if(t.aliases=[],void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.exponent&&null!==e.exponent?t.exponent=e.exponent:t.exponent=0,void 0!==e.aliases&&null!==e.aliases){var n,o=a(e.aliases);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.aliases.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var b={description:"",base:"",display:"",name:"",symbol:""};t.Metadata={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.description&&n.uint32(10).string(e.description);var o,r=a(e.denomUnits);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.DenomUnit.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return""!==e.base&&n.uint32(26).string(e.base),""!==e.display&&n.uint32(34).string(e.display),""!==e.name&&n.uint32(42).string(e.name),""!==e.symbol&&n.uint32(50).string(e.symbol),n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},b);for(r.denomUnits=[];a.pos>>3){case 1:r.description=a.string();break;case 2:r.denomUnits.push(t.DenomUnit.decode(a,a.uint32()));break;case 3:r.base=a.string();break;case 4:r.display=a.string();break;case 5:r.name=a.string();break;case 6:r.symbol=a.string();break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},b);if(n.denomUnits=[],void 0!==e.description&&null!==e.description?n.description=String(e.description):n.description="",void 0!==e.denomUnits&&null!==e.denomUnits){var o,r=a(e.denomUnits);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.denomUnits.push(t.DenomUnit.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.base&&null!==e.base?n.base=String(e.base):n.base="",void 0!==e.display&&null!==e.display?n.display=String(e.display):n.display="",void 0!==e.name&&null!==e.name?n.name=String(e.name):n.name="",void 0!==e.symbol&&null!==e.symbol?n.symbol=String(e.symbol):n.symbol="",n},toJSON:function(e){var n={};return void 0!==e.description&&(n.description=e.description),e.denomUnits?n.denomUnits=e.denomUnits.map((function(e){return e?t.DenomUnit.toJSON(e):void 0})):n.denomUnits=[],void 0!==e.base&&(n.base=e.base),void 0!==e.display&&(n.display=e.display),void 0!==e.name&&(n.name=e.name),void 0!==e.symbol&&(n.symbol=e.symbol),n},fromPartial:function(e){var n=Object.assign({},b);if(n.denomUnits=[],void 0!==e.description&&null!==e.description?n.description=e.description:n.description="",void 0!==e.denomUnits&&null!==e.denomUnits){var o,r=a(e.denomUnits);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.denomUnits.push(t.DenomUnit.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.base&&null!==e.base?n.base=e.base:n.base="",void 0!==e.display&&null!==e.display?n.display=e.display:n.display="",void 0!==e.name&&null!==e.name?n.name=e.name:n.name="",void 0!==e.symbol&&null!==e.symbol?n.symbol=e.symbol:n.symbol="",n}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},68489:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgMultiSendDesc=t.MsgSendDesc=t.MsgDesc=t.MsgClientImpl=t.MsgMultiSendResponse=t.MsgMultiSend=t.MsgSendResponse=t.MsgSend=t.protobufPackage=void 0;var s=i(n(29600)),c=n(93704),u=i(n(80121)),d=n(82576),l=n(39705),f=n(3718);t.protobufPackage="cosmos.bank.v1beta1";var p={fromAddress:"",toAddress:""};t.MsgSend={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress);var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;l.Coin.encode(o,t.uint32(26).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);for(o.amount=[];n.pos>>3){case 1:o.fromAddress=n.string();break;case 2:o.toAddress=n.string();break;case 3:o.amount.push(l.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);if(t.amount=[],void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=String(e.fromAddress):t.fromAddress="",void 0!==e.toAddress&&null!==e.toAddress?t.toAddress=String(e.toAddress):t.toAddress="",void 0!==e.amount&&null!==e.amount){var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.amount.push(l.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map((function(e){return e?l.Coin.toJSON(e):void 0})):t.amount=[],t},fromPartial:function(e){var t=Object.assign({},p);if(t.amount=[],void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=e.fromAddress:t.fromAddress="",void 0!==e.toAddress&&null!==e.toAddress?t.toAddress=e.toAddress:t.toAddress="",void 0!==e.amount&&null!==e.amount){var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.amount.push(l.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return t}};var b={};t.MsgSendResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create(),a=r(e.inputs);try{for(a.s();!(t=a.n()).done;){var o=t.value;f.Input.encode(o,n.uint32(10).fork()).ldelim()}}catch(d){a.e(d)}finally{a.f()}var i,s=r(e.outputs);try{for(s.s();!(i=s.n()).done;){var c=i.value;f.Output.encode(c,n.uint32(18).fork()).ldelim()}}catch(d){s.e(d)}finally{s.f()}return n},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);for(o.inputs=[],o.outputs=[];n.pos>>3){case 1:o.inputs.push(f.Input.decode(n,n.uint32()));break;case 2:o.outputs.push(f.Output.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},m);if(t.inputs=[],t.outputs=[],void 0!==e.inputs&&null!==e.inputs){var n,a=r(e.inputs);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.inputs.push(f.Input.fromJSON(o))}}catch(u){a.e(u)}finally{a.f()}}if(void 0!==e.outputs&&null!==e.outputs){var i,s=r(e.outputs);try{for(s.s();!(i=s.n()).done;){var c=i.value;t.outputs.push(f.Output.fromJSON(c))}}catch(u){s.e(u)}finally{s.f()}}return t},toJSON:function(e){var t={};return e.inputs?t.inputs=e.inputs.map((function(e){return e?f.Input.toJSON(e):void 0})):t.inputs=[],e.outputs?t.outputs=e.outputs.map((function(e){return e?f.Output.toJSON(e):void 0})):t.outputs=[],t},fromPartial:function(e){var t=Object.assign({},m);if(t.inputs=[],t.outputs=[],void 0!==e.inputs&&null!==e.inputs){var n,a=r(e.inputs);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.inputs.push(f.Input.fromPartial(o))}}catch(u){a.e(u)}finally{a.f()}}if(void 0!==e.outputs&&null!==e.outputs){var i,s=r(e.outputs);try{for(s.s();!(i=s.n()).done;){var c=i.value;t.outputs.push(f.Output.fromPartial(c))}}catch(u){s.e(u)}finally{s.f()}}return t}};var h={};t.MsgMultiSendResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();e.height.isZero()||n.uint32(8).int64(e.height),""!==e.txhash&&n.uint32(18).string(e.txhash),""!==e.codespace&&n.uint32(26).string(e.codespace),0!==e.code&&n.uint32(32).uint32(e.code),""!==e.data&&n.uint32(42).string(e.data),""!==e.rawLog&&n.uint32(50).string(e.rawLog);var o,r=a(e.logs);try{for(r.s();!(o=r.n()).done;){var u=o.value;t.ABCIMessageLog.encode(u,n.uint32(58).fork()).ldelim()}}catch(p){r.e(p)}finally{r.f()}""!==e.info&&n.uint32(66).string(e.info),e.gasWanted.isZero()||n.uint32(72).int64(e.gasWanted),e.gasUsed.isZero()||n.uint32(80).int64(e.gasUsed),void 0!==e.tx&&s.Any.encode(e.tx,n.uint32(90).fork()).ldelim(),""!==e.timestamp&&n.uint32(98).string(e.timestamp);var d,l=a(e.events);try{for(l.s();!(d=l.n()).done;){var f=d.value;c.Event.encode(f,n.uint32(106).fork()).ldelim()}}catch(p){l.e(p)}finally{l.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},u);for(r.logs=[],r.events=[];a.pos>>3){case 1:r.height=a.int64();break;case 2:r.txhash=a.string();break;case 3:r.codespace=a.string();break;case 4:r.code=a.uint32();break;case 5:r.data=a.string();break;case 6:r.rawLog=a.string();break;case 7:r.logs.push(t.ABCIMessageLog.decode(a,a.uint32()));break;case 8:r.info=a.string();break;case 9:r.gasWanted=a.int64();break;case 10:r.gasUsed=a.int64();break;case 11:r.tx=s.Any.decode(a,a.uint32());break;case 12:r.timestamp=a.string();break;case 13:r.events.push(c.Event.decode(a,a.uint32()));break;default:a.skipType(7&d)}}return r},fromJSON:function(e){var n=Object.assign({},u);if(n.logs=[],n.events=[],void 0!==e.height&&null!==e.height?n.height=r.default.fromString(e.height):n.height=r.default.ZERO,void 0!==e.txhash&&null!==e.txhash?n.txhash=String(e.txhash):n.txhash="",void 0!==e.codespace&&null!==e.codespace?n.codespace=String(e.codespace):n.codespace="",void 0!==e.code&&null!==e.code?n.code=Number(e.code):n.code=0,void 0!==e.data&&null!==e.data?n.data=String(e.data):n.data="",void 0!==e.rawLog&&null!==e.rawLog?n.rawLog=String(e.rawLog):n.rawLog="",void 0!==e.logs&&null!==e.logs){var o,i=a(e.logs);try{for(i.s();!(o=i.n()).done;){var d=o.value;n.logs.push(t.ABCIMessageLog.fromJSON(d))}}catch(b){i.e(b)}finally{i.f()}}if(void 0!==e.info&&null!==e.info?n.info=String(e.info):n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=r.default.fromString(e.gasWanted):n.gasWanted=r.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=r.default.fromString(e.gasUsed):n.gasUsed=r.default.ZERO,void 0!==e.tx&&null!==e.tx?n.tx=s.Any.fromJSON(e.tx):n.tx=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=String(e.timestamp):n.timestamp="",void 0!==e.events&&null!==e.events){var l,f=a(e.events);try{for(f.s();!(l=f.n()).done;){var p=l.value;n.events.push(c.Event.fromJSON(p))}}catch(b){f.e(b)}finally{f.f()}}return n},toJSON:function(e){var n={};return void 0!==e.height&&(n.height=(e.height||r.default.ZERO).toString()),void 0!==e.txhash&&(n.txhash=e.txhash),void 0!==e.codespace&&(n.codespace=e.codespace),void 0!==e.code&&(n.code=e.code),void 0!==e.data&&(n.data=e.data),void 0!==e.rawLog&&(n.rawLog=e.rawLog),e.logs?n.logs=e.logs.map((function(e){return e?t.ABCIMessageLog.toJSON(e):void 0})):n.logs=[],void 0!==e.info&&(n.info=e.info),void 0!==e.gasWanted&&(n.gasWanted=(e.gasWanted||r.default.ZERO).toString()),void 0!==e.gasUsed&&(n.gasUsed=(e.gasUsed||r.default.ZERO).toString()),void 0!==e.tx&&(n.tx=e.tx?s.Any.toJSON(e.tx):void 0),void 0!==e.timestamp&&(n.timestamp=e.timestamp),e.events?n.events=e.events.map((function(e){return e?c.Event.toJSON(e):void 0})):n.events=[],n},fromPartial:function(e){var n=Object.assign({},u);if(n.logs=[],n.events=[],void 0!==e.height&&null!==e.height?n.height=e.height:n.height=r.default.ZERO,void 0!==e.txhash&&null!==e.txhash?n.txhash=e.txhash:n.txhash="",void 0!==e.codespace&&null!==e.codespace?n.codespace=e.codespace:n.codespace="",void 0!==e.code&&null!==e.code?n.code=e.code:n.code=0,void 0!==e.data&&null!==e.data?n.data=e.data:n.data="",void 0!==e.rawLog&&null!==e.rawLog?n.rawLog=e.rawLog:n.rawLog="",void 0!==e.logs&&null!==e.logs){var o,i=a(e.logs);try{for(i.s();!(o=i.n()).done;){var d=o.value;n.logs.push(t.ABCIMessageLog.fromPartial(d))}}catch(b){i.e(b)}finally{i.f()}}if(void 0!==e.info&&null!==e.info?n.info=e.info:n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=e.gasWanted:n.gasWanted=r.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=e.gasUsed:n.gasUsed=r.default.ZERO,void 0!==e.tx&&null!==e.tx?n.tx=s.Any.fromPartial(e.tx):n.tx=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=e.timestamp:n.timestamp="",void 0!==e.events&&null!==e.events){var l,f=a(e.events);try{for(f.s();!(l=f.n()).done;){var p=l.value;n.events.push(c.Event.fromPartial(p))}}catch(b){f.e(b)}finally{f.f()}}return n}};var d={msgIndex:0,log:""};t.ABCIMessageLog={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();0!==e.msgIndex&&n.uint32(8).uint32(e.msgIndex),""!==e.log&&n.uint32(18).string(e.log);var o,r=a(e.events);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.StringEvent.encode(s,n.uint32(26).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},d);for(r.events=[];a.pos>>3){case 1:r.msgIndex=a.uint32();break;case 2:r.log=a.string();break;case 3:r.events.push(t.StringEvent.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},d);if(n.events=[],void 0!==e.msgIndex&&null!==e.msgIndex?n.msgIndex=Number(e.msgIndex):n.msgIndex=0,void 0!==e.log&&null!==e.log?n.log=String(e.log):n.log="",void 0!==e.events&&null!==e.events){var o,r=a(e.events);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.events.push(t.StringEvent.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.msgIndex&&(n.msgIndex=e.msgIndex),void 0!==e.log&&(n.log=e.log),e.events?n.events=e.events.map((function(e){return e?t.StringEvent.toJSON(e):void 0})):n.events=[],n},fromPartial:function(e){var n=Object.assign({},d);if(n.events=[],void 0!==e.msgIndex&&null!==e.msgIndex?n.msgIndex=e.msgIndex:n.msgIndex=0,void 0!==e.log&&null!==e.log?n.log=e.log:n.log="",void 0!==e.events&&null!==e.events){var o,r=a(e.events);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.events.push(t.StringEvent.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var l={type:""};t.StringEvent={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.type&&n.uint32(10).string(e.type);var o,r=a(e.attributes);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.Attribute.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},l);for(r.attributes=[];a.pos>>3){case 1:r.type=a.string();break;case 2:r.attributes.push(t.Attribute.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},l);if(n.attributes=[],void 0!==e.type&&null!==e.type?n.type=String(e.type):n.type="",void 0!==e.attributes&&null!==e.attributes){var o,r=a(e.attributes);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.attributes.push(t.Attribute.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=e.type),e.attributes?n.attributes=e.attributes.map((function(e){return e?t.Attribute.toJSON(e):void 0})):n.attributes=[],n},fromPartial:function(e){var n=Object.assign({},l);if(n.attributes=[],void 0!==e.type&&null!==e.type?n.type=e.type:n.type="",void 0!==e.attributes&&null!==e.attributes){var o,r=a(e.attributes);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.attributes.push(t.Attribute.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var f={key:"",value:""};t.Attribute={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.value&&t.uint32(18).string(e.value),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3){case 1:o.key=n.string();break;case 2:o.value=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.key&&null!==e.key?t.key=String(e.key):t.key="",void 0!==e.value&&null!==e.value?t.value=String(e.value):t.value="",t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=e.value),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key="",void 0!==e.value&&null!==e.value?t.value=e.value:t.value="",t}};var p={gasWanted:r.default.UZERO,gasUsed:r.default.UZERO};t.GasInfo={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.gasWanted.isZero()||t.uint32(8).uint64(e.gasWanted),e.gasUsed.isZero()||t.uint32(16).uint64(e.gasUsed),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos>>3){case 1:o.gasWanted=n.uint64();break;case 2:o.gasUsed=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return void 0!==e.gasWanted&&null!==e.gasWanted?t.gasWanted=r.default.fromString(e.gasWanted):t.gasWanted=r.default.UZERO,void 0!==e.gasUsed&&null!==e.gasUsed?t.gasUsed=r.default.fromString(e.gasUsed):t.gasUsed=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.gasWanted&&(t.gasWanted=(e.gasWanted||r.default.UZERO).toString()),void 0!==e.gasUsed&&(t.gasUsed=(e.gasUsed||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.gasWanted&&null!==e.gasWanted?t.gasWanted=e.gasWanted:t.gasWanted=r.default.UZERO,void 0!==e.gasUsed&&null!==e.gasUsed?t.gasUsed=e.gasUsed:t.gasUsed=r.default.UZERO,t}};var b={log:""};t.Result={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();0!==e.data.length&&t.uint32(10).bytes(e.data),""!==e.log&&t.uint32(18).string(e.log);var n,o=a(e.events);try{for(o.s();!(n=o.n()).done;){var r=n.value;c.Event.encode(r,t.uint32(26).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);for(o.events=[],o.data=new Uint8Array;n.pos>>3){case 1:o.data=n.bytes();break;case 2:o.log=n.string();break;case 3:o.events.push(c.Event.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);if(t.events=[],t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=k(e.data)),void 0!==e.log&&null!==e.log?t.log=String(e.log):t.log="",void 0!==e.events&&null!==e.events){var n,o=a(e.events);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.events.push(c.Event.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=x(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.log&&(t.log=e.log),e.events?t.events=e.events.map((function(e){return e?c.Event.toJSON(e):void 0})):t.events=[],t},fromPartial:function(e){var t=Object.assign({},b);if(t.events=[],void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,void 0!==e.log&&null!==e.log?t.log=e.log:t.log="",void 0!==e.events&&null!==e.events){var n,o=a(e.events);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.events.push(c.Event.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var m={};t.SimulationResponse={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.gasInfo&&t.GasInfo.encode(e.gasInfo,n.uint32(10).fork()).ldelim(),void 0!==e.result&&t.Result.encode(e.result,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},m);a.pos>>3){case 1:r.gasInfo=t.GasInfo.decode(a,a.uint32());break;case 2:r.result=t.Result.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},m);return void 0!==e.gasInfo&&null!==e.gasInfo?n.gasInfo=t.GasInfo.fromJSON(e.gasInfo):n.gasInfo=void 0,void 0!==e.result&&null!==e.result?n.result=t.Result.fromJSON(e.result):n.result=void 0,n},toJSON:function(e){var n={};return void 0!==e.gasInfo&&(n.gasInfo=e.gasInfo?t.GasInfo.toJSON(e.gasInfo):void 0),void 0!==e.result&&(n.result=e.result?t.Result.toJSON(e.result):void 0),n},fromPartial:function(e){var n=Object.assign({},m);return void 0!==e.gasInfo&&null!==e.gasInfo?n.gasInfo=t.GasInfo.fromPartial(e.gasInfo):n.gasInfo=void 0,void 0!==e.result&&null!==e.result?n.result=t.Result.fromPartial(e.result):n.result=void 0,n}};var h={msgType:""};t.MsgData={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.msgType&&t.uint32(10).string(e.msgType),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.data=new Uint8Array;n.pos>>3){case 1:o.msgType=n.string();break;case 2:o.data=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);return t.data=new Uint8Array,void 0!==e.msgType&&null!==e.msgType?t.msgType=String(e.msgType):t.msgType="",void 0!==e.data&&null!==e.data&&(t.data=k(e.data)),t},toJSON:function(e){var t={};return void 0!==e.msgType&&(t.msgType=e.msgType),void 0!==e.data&&(t.data=x(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},h);return void 0!==e.msgType&&null!==e.msgType?t.msgType=e.msgType:t.msgType="",void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var g={};t.TxMsgData={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.data);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.MsgData.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},g);for(r.data=[];a.pos>>3===1)r.data.push(t.MsgData.decode(a,a.uint32()));else a.skipType(7&s)}return r},fromJSON:function(e){var n=Object.assign({},g);if(n.data=[],void 0!==e.data&&null!==e.data){var o,r=a(e.data);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.data.push(t.MsgData.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return e.data?n.data=e.data.map((function(e){return e?t.MsgData.toJSON(e):void 0})):n.data=[],n},fromPartial:function(e){var n=Object.assign({},g);if(n.data=[],void 0!==e.data&&null!==e.data){var o,r=a(e.data);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.data.push(t.MsgData.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var y={totalCount:r.default.UZERO,count:r.default.UZERO,pageNumber:r.default.UZERO,pageTotal:r.default.UZERO,limit:r.default.UZERO};t.SearchTxsResult={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();e.totalCount.isZero()||n.uint32(8).uint64(e.totalCount),e.count.isZero()||n.uint32(16).uint64(e.count),e.pageNumber.isZero()||n.uint32(24).uint64(e.pageNumber),e.pageTotal.isZero()||n.uint32(32).uint64(e.pageTotal),e.limit.isZero()||n.uint32(40).uint64(e.limit);var o,r=a(e.txs);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.TxResponse.encode(s,n.uint32(50).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},y);for(r.txs=[];a.pos>>3){case 1:r.totalCount=a.uint64();break;case 2:r.count=a.uint64();break;case 3:r.pageNumber=a.uint64();break;case 4:r.pageTotal=a.uint64();break;case 5:r.limit=a.uint64();break;case 6:r.txs.push(t.TxResponse.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},y);if(n.txs=[],void 0!==e.totalCount&&null!==e.totalCount?n.totalCount=r.default.fromString(e.totalCount):n.totalCount=r.default.UZERO,void 0!==e.count&&null!==e.count?n.count=r.default.fromString(e.count):n.count=r.default.UZERO,void 0!==e.pageNumber&&null!==e.pageNumber?n.pageNumber=r.default.fromString(e.pageNumber):n.pageNumber=r.default.UZERO,void 0!==e.pageTotal&&null!==e.pageTotal?n.pageTotal=r.default.fromString(e.pageTotal):n.pageTotal=r.default.UZERO,void 0!==e.limit&&null!==e.limit?n.limit=r.default.fromString(e.limit):n.limit=r.default.UZERO,void 0!==e.txs&&null!==e.txs){var o,i=a(e.txs);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.txs.push(t.TxResponse.fromJSON(s))}}catch(c){i.e(c)}finally{i.f()}}return n},toJSON:function(e){var n={};return void 0!==e.totalCount&&(n.totalCount=(e.totalCount||r.default.UZERO).toString()),void 0!==e.count&&(n.count=(e.count||r.default.UZERO).toString()),void 0!==e.pageNumber&&(n.pageNumber=(e.pageNumber||r.default.UZERO).toString()),void 0!==e.pageTotal&&(n.pageTotal=(e.pageTotal||r.default.UZERO).toString()),void 0!==e.limit&&(n.limit=(e.limit||r.default.UZERO).toString()),e.txs?n.txs=e.txs.map((function(e){return e?t.TxResponse.toJSON(e):void 0})):n.txs=[],n},fromPartial:function(e){var n=Object.assign({},y);if(n.txs=[],void 0!==e.totalCount&&null!==e.totalCount?n.totalCount=e.totalCount:n.totalCount=r.default.UZERO,void 0!==e.count&&null!==e.count?n.count=e.count:n.count=r.default.UZERO,void 0!==e.pageNumber&&null!==e.pageNumber?n.pageNumber=e.pageNumber:n.pageNumber=r.default.UZERO,void 0!==e.pageTotal&&null!==e.pageTotal?n.pageTotal=e.pageTotal:n.pageTotal=r.default.UZERO,void 0!==e.limit&&null!==e.limit?n.limit=e.limit:n.limit=r.default.UZERO,void 0!==e.txs&&null!==e.txs){var o,i=a(e.txs);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.txs.push(t.TxResponse.fromPartial(s))}}catch(c){i.e(c)}finally{i.f()}}return n}};var v=function(){if("undefined"!==typeof v)return v;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),w=v.atob||function(e){return v.Buffer.from(e,"base64").toString("binary")};function k(e){for(var t=w(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),e.offset.isZero()||t.uint32(16).uint64(e.offset),e.limit.isZero()||t.uint32(24).uint64(e.limit),!0===e.countTotal&&t.uint32(32).bool(e.countTotal),!0===e.reverse&&t.uint32(40).bool(e.reverse),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.key=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.offset=n.uint64();break;case 3:o.limit=n.uint64();break;case 4:o.countTotal=n.bool();break;case 5:o.reverse=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},s);return t.key=new Uint8Array,void 0!==e.key&&null!==e.key&&(t.key=l(e.key)),void 0!==e.offset&&null!==e.offset?t.offset=r.default.fromString(e.offset):t.offset=r.default.UZERO,void 0!==e.limit&&null!==e.limit?t.limit=r.default.fromString(e.limit):t.limit=r.default.UZERO,void 0!==e.countTotal&&null!==e.countTotal?t.countTotal=Boolean(e.countTotal):t.countTotal=!1,void 0!==e.reverse&&null!==e.reverse?t.reverse=Boolean(e.reverse):t.reverse=!1,t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=p(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.offset&&(t.offset=(e.offset||r.default.UZERO).toString()),void 0!==e.limit&&(t.limit=(e.limit||r.default.UZERO).toString()),void 0!==e.countTotal&&(t.countTotal=e.countTotal),void 0!==e.reverse&&(t.reverse=e.reverse),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,void 0!==e.offset&&null!==e.offset?t.offset=e.offset:t.offset=r.default.UZERO,void 0!==e.limit&&null!==e.limit?t.limit=e.limit:t.limit=r.default.UZERO,void 0!==e.countTotal&&null!==e.countTotal?t.countTotal=e.countTotal:t.countTotal=!1,void 0!==e.reverse&&null!==e.reverse?t.reverse=e.reverse:t.reverse=!1,t}};var c={total:r.default.UZERO};t.PageResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.nextKey.length&&t.uint32(10).bytes(e.nextKey),e.total.isZero()||t.uint32(16).uint64(e.total),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);for(o.nextKey=new Uint8Array;n.pos>>3){case 1:o.nextKey=n.bytes();break;case 2:o.total=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return t.nextKey=new Uint8Array,void 0!==e.nextKey&&null!==e.nextKey&&(t.nextKey=l(e.nextKey)),void 0!==e.total&&null!==e.total?t.total=r.default.fromString(e.total):t.total=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.nextKey&&(t.nextKey=p(void 0!==e.nextKey?e.nextKey:new Uint8Array)),void 0!==e.total&&(t.total=(e.total||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.nextKey&&null!==e.nextKey?t.nextKey=e.nextKey:t.nextKey=new Uint8Array,void 0!==e.total&&null!==e.total?t.total=e.total:t.total=r.default.UZERO,t}};var u=function(){if("undefined"!==typeof u)return u;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),d=u.atob||function(e){return u.Buffer.from(e,"base64").toString("binary")};function l(e){for(var t=d(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=String(e.amount):t.amount="",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=e.amount:t.amount="",t}};var s={denom:"",amount:""};t.DecCoin={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},s);return void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=String(e.amount):t.amount="",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=e.amount:t.amount="",t}};var c={int:""};t.IntProto={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.int&&t.uint32(10).string(e.int),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3===1)o.int=n.string();else n.skipType(7&i)}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.int&&null!==e.int?t.int=String(e.int):t.int="",t},toJSON:function(e){var t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.int&&null!==e.int?t.int=e.int:t.int="",t}};var u={dec:""};t.DecProto={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.dec&&t.uint32(10).string(e.dec),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3===1)o.dec=n.string();else n.skipType(7&i)}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.dec&&null!==e.dec?t.dec=String(e.dec):t.dec="",t},toJSON:function(e){var t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.dec&&null!==e.dec?t.dec=e.dec:t.dec="",t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},84086:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgVerifyInvariantDesc=t.MsgDesc=t.MsgClientImpl=t.MsgVerifyInvariantResponse=t.MsgVerifyInvariant=t.protobufPackage=void 0;var i=r(n(29600)),s=n(93704),c=r(n(80121)),u=n(82576);t.protobufPackage="cosmos.crisis.v1beta1";var d={sender:"",invariantModuleName:"",invariantRoute:""};t.MsgVerifyInvariant={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.invariantModuleName&&t.uint32(18).string(e.invariantModuleName),""!==e.invariantRoute&&t.uint32(26).string(e.invariantRoute),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.sender=n.string();break;case 2:o.invariantModuleName=n.string();break;case 3:o.invariantRoute=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.invariantModuleName&&null!==e.invariantModuleName?t.invariantModuleName=String(e.invariantModuleName):t.invariantModuleName="",void 0!==e.invariantRoute&&null!==e.invariantRoute?t.invariantRoute=String(e.invariantRoute):t.invariantRoute="",t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.invariantModuleName&&(t.invariantModuleName=e.invariantModuleName),void 0!==e.invariantRoute&&(t.invariantRoute=e.invariantRoute),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.invariantModuleName&&null!==e.invariantModuleName?t.invariantModuleName=e.invariantModuleName:t.invariantModuleName="",void 0!==e.invariantRoute&&null!==e.invariantRoute?t.invariantRoute=e.invariantRoute:t.invariantRoute="",t}};var l={};t.MsgVerifyInvariantResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.key=new Uint8Array;n.pos>>3===1)o.key=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},s);return t.key=new Uint8Array,void 0!==e.key&&null!==e.key&&(t.key=l(e.key)),t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=p(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,t}};var c={};t.PrivKey={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);for(o.key=new Uint8Array;n.pos>>3===1)o.key=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},c);return t.key=new Uint8Array,void 0!==e.key&&null!==e.key&&(t.key=l(e.key)),t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=p(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,t}};var u=function(){if("undefined"!==typeof u)return u;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),d=u.atob||function(e){return u.Buffer.from(e,"base64").toString("binary")};function l(e){for(var t=d(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();0!==e.threshold&&t.uint32(8).uint32(e.threshold);var n,o=a(e.publicKeys);try{for(o.s();!(n=o.n()).done;){var r=n.value;s.Any.encode(r,t.uint32(18).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);for(o.publicKeys=[];n.pos>>3){case 1:o.threshold=n.uint32();break;case 2:o.publicKeys.push(s.Any.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);if(t.publicKeys=[],void 0!==e.threshold&&null!==e.threshold?t.threshold=Number(e.threshold):t.threshold=0,void 0!==e.publicKeys&&null!==e.publicKeys){var n,o=a(e.publicKeys);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.publicKeys.push(s.Any.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.threshold&&(t.threshold=e.threshold),e.publicKeys?t.publicKeys=e.publicKeys.map((function(e){return e?s.Any.toJSON(e):void 0})):t.publicKeys=[],t},fromPartial:function(e){var t=Object.assign({},c);if(t.publicKeys=[],void 0!==e.threshold&&null!==e.threshold?t.threshold=e.threshold:t.threshold=0,void 0!==e.publicKeys&&null!==e.publicKeys){var n,o=a(e.publicKeys);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.publicKeys.push(s.Any.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},51107:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompactBitArray=t.MultiSignature=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121));t.protobufPackage="cosmos.crypto.multisig.v1beta1";var s={};t.MultiSignature={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.signatures);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).bytes(r)}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.signatures=[];n.pos>>3===1)o.signatures.push(n.bytes());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},s);if(t.signatures=[],void 0!==e.signatures&&null!==e.signatures){var n,o=a(e.signatures);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.signatures.push(l(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.signatures?t.signatures=e.signatures.map((function(e){return p(void 0!==e?e:new Uint8Array)})):t.signatures=[],t},fromPartial:function(e){var t=Object.assign({},s);if(t.signatures=[],void 0!==e.signatures&&null!==e.signatures){var n,o=a(e.signatures);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.signatures.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var c={extraBitsStored:0};t.CompactBitArray={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);for(o.elems=new Uint8Array;n.pos>>3){case 1:o.extraBitsStored=n.uint32();break;case 2:o.elems=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return t.elems=new Uint8Array,void 0!==e.extraBitsStored&&null!==e.extraBitsStored?t.extraBitsStored=Number(e.extraBitsStored):t.extraBitsStored=0,void 0!==e.elems&&null!==e.elems&&(t.elems=l(e.elems)),t},toJSON:function(e){var t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=e.extraBitsStored),void 0!==e.elems&&(t.elems=p(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.extraBitsStored&&null!==e.extraBitsStored?t.extraBitsStored=e.extraBitsStored:t.extraBitsStored=0,void 0!==e.elems&&null!==e.elems?t.elems=e.elems:t.elems=new Uint8Array,t}};var u=function(){if("undefined"!==typeof u)return u;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),d=u.atob||function(e){return u.Buffer.from(e,"base64").toString("binary")};function l(e){for(var t=d(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.key=new Uint8Array;n.pos>>3===1)o.key=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},s);return t.key=new Uint8Array,void 0!==e.key&&null!==e.key&&(t.key=l(e.key)),t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=p(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,t}};var c={};t.PrivKey={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);for(o.key=new Uint8Array;n.pos>>3===1)o.key=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},c);return t.key=new Uint8Array,void 0!==e.key&&null!==e.key&&(t.key=l(e.key)),t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=p(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,t}};var u=function(){if("undefined"!==typeof u)return u;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),d=u.atob||function(e){return u.Buffer.from(e,"base64").toString("binary")};function l(e){for(var t=d(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.communityTax&&t.uint32(10).string(e.communityTax),""!==e.baseProposerReward&&t.uint32(18).string(e.baseProposerReward),""!==e.bonusProposerReward&&t.uint32(26).string(e.bonusProposerReward),!0===e.withdrawAddrEnabled&&t.uint32(32).bool(e.withdrawAddrEnabled),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.communityTax=n.string();break;case 2:o.baseProposerReward=n.string();break;case 3:o.bonusProposerReward=n.string();break;case 4:o.withdrawAddrEnabled=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.communityTax&&null!==e.communityTax?t.communityTax=String(e.communityTax):t.communityTax="",void 0!==e.baseProposerReward&&null!==e.baseProposerReward?t.baseProposerReward=String(e.baseProposerReward):t.baseProposerReward="",void 0!==e.bonusProposerReward&&null!==e.bonusProposerReward?t.bonusProposerReward=String(e.bonusProposerReward):t.bonusProposerReward="",void 0!==e.withdrawAddrEnabled&&null!==e.withdrawAddrEnabled?t.withdrawAddrEnabled=Boolean(e.withdrawAddrEnabled):t.withdrawAddrEnabled=!1,t},toJSON:function(e){var t={};return void 0!==e.communityTax&&(t.communityTax=e.communityTax),void 0!==e.baseProposerReward&&(t.baseProposerReward=e.baseProposerReward),void 0!==e.bonusProposerReward&&(t.bonusProposerReward=e.bonusProposerReward),void 0!==e.withdrawAddrEnabled&&(t.withdrawAddrEnabled=e.withdrawAddrEnabled),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.communityTax&&null!==e.communityTax?t.communityTax=e.communityTax:t.communityTax="",void 0!==e.baseProposerReward&&null!==e.baseProposerReward?t.baseProposerReward=e.baseProposerReward:t.baseProposerReward="",void 0!==e.bonusProposerReward&&null!==e.bonusProposerReward?t.bonusProposerReward=e.bonusProposerReward:t.bonusProposerReward="",void 0!==e.withdrawAddrEnabled&&null!==e.withdrawAddrEnabled?t.withdrawAddrEnabled=e.withdrawAddrEnabled:t.withdrawAddrEnabled=!1,t}};var u={referenceCount:0};t.ValidatorHistoricalRewards={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.cumulativeRewardRatio);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.DecCoin.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return 0!==e.referenceCount&&n.uint32(16).uint32(e.referenceCount),n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);for(o.cumulativeRewardRatio=[];n.pos>>3){case 1:o.cumulativeRewardRatio.push(s.DecCoin.decode(n,n.uint32()));break;case 2:o.referenceCount=n.uint32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);if(t.cumulativeRewardRatio=[],void 0!==e.cumulativeRewardRatio&&null!==e.cumulativeRewardRatio){var n,o=a(e.cumulativeRewardRatio);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.cumulativeRewardRatio.push(s.DecCoin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return void 0!==e.referenceCount&&null!==e.referenceCount?t.referenceCount=Number(e.referenceCount):t.referenceCount=0,t},toJSON:function(e){var t={};return e.cumulativeRewardRatio?t.cumulativeRewardRatio=e.cumulativeRewardRatio.map((function(e){return e?s.DecCoin.toJSON(e):void 0})):t.cumulativeRewardRatio=[],void 0!==e.referenceCount&&(t.referenceCount=e.referenceCount),t},fromPartial:function(e){var t=Object.assign({},u);if(t.cumulativeRewardRatio=[],void 0!==e.cumulativeRewardRatio&&null!==e.cumulativeRewardRatio){var n,o=a(e.cumulativeRewardRatio);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.cumulativeRewardRatio.push(s.DecCoin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return void 0!==e.referenceCount&&null!==e.referenceCount?t.referenceCount=e.referenceCount:t.referenceCount=0,t}};var d={period:r.default.UZERO};t.ValidatorCurrentRewards={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.rewards);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.DecCoin.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return e.period.isZero()||n.uint32(16).uint64(e.period),n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);for(o.rewards=[];n.pos>>3){case 1:o.rewards.push(s.DecCoin.decode(n,n.uint32()));break;case 2:o.period=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);if(t.rewards=[],void 0!==e.rewards&&null!==e.rewards){var n,o=a(e.rewards);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.rewards.push(s.DecCoin.fromJSON(i))}}catch(c){o.e(c)}finally{o.f()}}return void 0!==e.period&&null!==e.period?t.period=r.default.fromString(e.period):t.period=r.default.UZERO,t},toJSON:function(e){var t={};return e.rewards?t.rewards=e.rewards.map((function(e){return e?s.DecCoin.toJSON(e):void 0})):t.rewards=[],void 0!==e.period&&(t.period=(e.period||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},d);if(t.rewards=[],void 0!==e.rewards&&null!==e.rewards){var n,o=a(e.rewards);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.rewards.push(s.DecCoin.fromPartial(i))}}catch(c){o.e(c)}finally{o.f()}}return void 0!==e.period&&null!==e.period?t.period=e.period:t.period=r.default.UZERO,t}};var l={};t.ValidatorAccumulatedCommission={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.commission);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.DecCoin.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);for(o.commission=[];n.pos>>3===1)o.commission.push(s.DecCoin.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},l);if(t.commission=[],void 0!==e.commission&&null!==e.commission){var n,o=a(e.commission);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.commission.push(s.DecCoin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.commission?t.commission=e.commission.map((function(e){return e?s.DecCoin.toJSON(e):void 0})):t.commission=[],t},fromPartial:function(e){var t=Object.assign({},l);if(t.commission=[],void 0!==e.commission&&null!==e.commission){var n,o=a(e.commission);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.commission.push(s.DecCoin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var f={};t.ValidatorOutstandingRewards={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.rewards);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.DecCoin.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);for(o.rewards=[];n.pos>>3===1)o.rewards.push(s.DecCoin.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},f);if(t.rewards=[],void 0!==e.rewards&&null!==e.rewards){var n,o=a(e.rewards);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.rewards.push(s.DecCoin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.rewards?t.rewards=e.rewards.map((function(e){return e?s.DecCoin.toJSON(e):void 0})):t.rewards=[],t},fromPartial:function(e){var t=Object.assign({},f);if(t.rewards=[],void 0!==e.rewards&&null!==e.rewards){var n,o=a(e.rewards);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.rewards.push(s.DecCoin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var p={validatorPeriod:r.default.UZERO,fraction:""};t.ValidatorSlashEvent={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.validatorPeriod.isZero()||t.uint32(8).uint64(e.validatorPeriod),""!==e.fraction&&t.uint32(18).string(e.fraction),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos>>3){case 1:o.validatorPeriod=n.uint64();break;case 2:o.fraction=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return void 0!==e.validatorPeriod&&null!==e.validatorPeriod?t.validatorPeriod=r.default.fromString(e.validatorPeriod):t.validatorPeriod=r.default.UZERO,void 0!==e.fraction&&null!==e.fraction?t.fraction=String(e.fraction):t.fraction="",t},toJSON:function(e){var t={};return void 0!==e.validatorPeriod&&(t.validatorPeriod=(e.validatorPeriod||r.default.UZERO).toString()),void 0!==e.fraction&&(t.fraction=e.fraction),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.validatorPeriod&&null!==e.validatorPeriod?t.validatorPeriod=e.validatorPeriod:t.validatorPeriod=r.default.UZERO,void 0!==e.fraction&&null!==e.fraction?t.fraction=e.fraction:t.fraction="",t}};var b={};t.ValidatorSlashEvents={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.validatorSlashEvents);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.ValidatorSlashEvent.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},b);for(r.validatorSlashEvents=[];a.pos>>3===1)r.validatorSlashEvents.push(t.ValidatorSlashEvent.decode(a,a.uint32()));else a.skipType(7&s)}return r},fromJSON:function(e){var n=Object.assign({},b);if(n.validatorSlashEvents=[],void 0!==e.validatorSlashEvents&&null!==e.validatorSlashEvents){var o,r=a(e.validatorSlashEvents);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.validatorSlashEvents.push(t.ValidatorSlashEvent.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return e.validatorSlashEvents?n.validatorSlashEvents=e.validatorSlashEvents.map((function(e){return e?t.ValidatorSlashEvent.toJSON(e):void 0})):n.validatorSlashEvents=[],n},fromPartial:function(e){var n=Object.assign({},b);if(n.validatorSlashEvents=[],void 0!==e.validatorSlashEvents&&null!==e.validatorSlashEvents){var o,r=a(e.validatorSlashEvents);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.validatorSlashEvents.push(t.ValidatorSlashEvent.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var m={};t.FeePool={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.communityPool);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.DecCoin.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);for(o.communityPool=[];n.pos>>3===1)o.communityPool.push(s.DecCoin.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},m);if(t.communityPool=[],void 0!==e.communityPool&&null!==e.communityPool){var n,o=a(e.communityPool);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.communityPool.push(s.DecCoin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.communityPool?t.communityPool=e.communityPool.map((function(e){return e?s.DecCoin.toJSON(e):void 0})):t.communityPool=[],t},fromPartial:function(e){var t=Object.assign({},m);if(t.communityPool=[],void 0!==e.communityPool&&null!==e.communityPool){var n,o=a(e.communityPool);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.communityPool.push(s.DecCoin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var h={title:"",description:"",recipient:""};t.CommunityPoolSpendProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.recipient&&t.uint32(26).string(e.recipient);var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var r=n.value;s.Coin.encode(r,t.uint32(34).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.amount=[];n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.recipient=n.string();break;case 4:o.amount.push(s.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);if(t.amount=[],void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.recipient&&null!==e.recipient?t.recipient=String(e.recipient):t.recipient="",void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.amount.push(s.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.recipient&&(t.recipient=e.recipient),e.amount?t.amount=e.amount.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.amount=[],t},fromPartial:function(e){var t=Object.assign({},h);if(t.amount=[],void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.recipient&&null!==e.recipient?t.recipient=e.recipient:t.recipient="",void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.amount.push(s.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var g={previousPeriod:r.default.UZERO,stake:"",height:r.default.UZERO};t.DelegatorStartingInfo={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.previousPeriod.isZero()||t.uint32(8).uint64(e.previousPeriod),""!==e.stake&&t.uint32(18).string(e.stake),e.height.isZero()||t.uint32(24).uint64(e.height),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos>>3){case 1:o.previousPeriod=n.uint64();break;case 2:o.stake=n.string();break;case 3:o.height=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},g);return void 0!==e.previousPeriod&&null!==e.previousPeriod?t.previousPeriod=r.default.fromString(e.previousPeriod):t.previousPeriod=r.default.UZERO,void 0!==e.stake&&null!==e.stake?t.stake=String(e.stake):t.stake="",void 0!==e.height&&null!==e.height?t.height=r.default.fromString(e.height):t.height=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.previousPeriod&&(t.previousPeriod=(e.previousPeriod||r.default.UZERO).toString()),void 0!==e.stake&&(t.stake=e.stake),void 0!==e.height&&(t.height=(e.height||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.previousPeriod&&null!==e.previousPeriod?t.previousPeriod=e.previousPeriod:t.previousPeriod=r.default.UZERO,void 0!==e.stake&&null!==e.stake?t.stake=e.stake:t.stake="",void 0!==e.height&&null!==e.height?t.height=e.height:t.height=r.default.UZERO,t}};var y={validatorAddress:""};t.DelegationDelegatorReward={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress);var n,o=a(e.reward);try{for(o.s();!(n=o.n()).done;){var r=n.value;s.DecCoin.encode(r,t.uint32(18).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.reward=[];n.pos>>3){case 1:o.validatorAddress=n.string();break;case 2:o.reward.push(s.DecCoin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);if(t.reward=[],void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=String(e.validatorAddress):t.validatorAddress="",void 0!==e.reward&&null!==e.reward){var n,o=a(e.reward);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.reward.push(s.DecCoin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),e.reward?t.reward=e.reward.map((function(e){return e?s.DecCoin.toJSON(e):void 0})):t.reward=[],t},fromPartial:function(e){var t=Object.assign({},y);if(t.reward=[],void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress="",void 0!==e.reward&&null!==e.reward){var n,o=a(e.reward);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.reward.push(s.DecCoin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var v={title:"",description:"",recipient:"",amount:"",deposit:""};t.CommunityPoolSpendProposalWithDeposit={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.recipient&&t.uint32(26).string(e.recipient),""!==e.amount&&t.uint32(34).string(e.amount),""!==e.deposit&&t.uint32(42).string(e.deposit),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.recipient=n.string();break;case 4:o.amount=n.string();break;case 5:o.deposit=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},v);return void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.recipient&&null!==e.recipient?t.recipient=String(e.recipient):t.recipient="",void 0!==e.amount&&null!==e.amount?t.amount=String(e.amount):t.amount="",void 0!==e.deposit&&null!==e.deposit?t.deposit=String(e.deposit):t.deposit="",t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.recipient&&(t.recipient=e.recipient),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.deposit&&(t.deposit=e.deposit),t},fromPartial:function(e){var t=Object.assign({},v);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.recipient&&null!==e.recipient?t.recipient=e.recipient:t.recipient="",void 0!==e.amount&&null!==e.amount?t.amount=e.amount:t.amount="",void 0!==e.deposit&&null!==e.deposit?t.deposit=e.deposit:t.deposit="",t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},31138:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgFundCommunityPoolDesc=t.MsgWithdrawValidatorCommissionDesc=t.MsgWithdrawDelegatorRewardDesc=t.MsgSetWithdrawAddressDesc=t.MsgDesc=t.MsgClientImpl=t.MsgFundCommunityPoolResponse=t.MsgFundCommunityPool=t.MsgWithdrawValidatorCommissionResponse=t.MsgWithdrawValidatorCommission=t.MsgWithdrawDelegatorRewardResponse=t.MsgWithdrawDelegatorReward=t.MsgSetWithdrawAddressResponse=t.MsgSetWithdrawAddress=t.protobufPackage=void 0;var s=i(n(29600)),c=n(93704),u=i(n(80121)),d=n(82576),l=n(39705);t.protobufPackage="cosmos.distribution.v1beta1";var f={delegatorAddress:"",withdrawAddress:""};t.MsgSetWithdrawAddress={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.withdrawAddress&&t.uint32(18).string(e.withdrawAddress),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.withdrawAddress=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=String(e.delegatorAddress):t.delegatorAddress="",void 0!==e.withdrawAddress&&null!==e.withdrawAddress?t.withdrawAddress=String(e.withdrawAddress):t.withdrawAddress="",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=e.delegatorAddress:t.delegatorAddress="",void 0!==e.withdrawAddress&&null!==e.withdrawAddress?t.withdrawAddress=e.withdrawAddress:t.withdrawAddress="",t}};var p={};t.MsgSetWithdrawAddressResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=String(e.delegatorAddress):t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=String(e.validatorAddress):t.validatorAddress="",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=e.delegatorAddress:t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress="",t}};var m={};t.MsgWithdrawDelegatorRewardResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);n.pos>>3===1)o.validatorAddress=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},h);return void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=String(e.validatorAddress):t.validatorAddress="",t},toJSON:function(e){var t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial:function(e){var t=Object.assign({},h);return void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress="",t}};var g={};t.MsgWithdrawValidatorCommissionResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create(),a=r(e.amount);try{for(a.s();!(t=a.n()).done;){var o=t.value;l.Coin.encode(o,n.uint32(10).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return""!==e.depositor&&n.uint32(18).string(e.depositor),n},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.amount=[];n.pos>>3){case 1:o.amount.push(l.Coin.decode(n,n.uint32()));break;case 2:o.depositor=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);if(t.amount=[],void 0!==e.amount&&null!==e.amount){var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.amount.push(l.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.depositor&&null!==e.depositor?t.depositor=String(e.depositor):t.depositor="",t},toJSON:function(e){var t={};return e.amount?t.amount=e.amount.map((function(e){return e?l.Coin.toJSON(e):void 0})):t.amount=[],void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial:function(e){var t=Object.assign({},y);if(t.amount=[],void 0!==e.amount&&null!==e.amount){var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.amount.push(l.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.depositor&&null!==e.depositor?t.depositor=e.depositor:t.depositor="",t}};var v={};t.MsgFundCommunityPoolResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.spendLimit);try{for(o.s();!(t=o.n()).done;){var r=t.value;d.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return void 0!==e.expiration&&u.Timestamp.encode(m(e.expiration),n.uint32(18).fork()).ldelim(),n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);for(o.spendLimit=[];n.pos>>3){case 1:o.spendLimit.push(d.Coin.decode(n,n.uint32()));break;case 2:o.expiration=h(u.Timestamp.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},l);if(t.spendLimit=[],void 0!==e.spendLimit&&null!==e.spendLimit){var n,o=a(e.spendLimit);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.spendLimit.push(d.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return void 0!==e.expiration&&null!==e.expiration?t.expiration=g(e.expiration):t.expiration=void 0,t},toJSON:function(e){var t={};return e.spendLimit?t.spendLimit=e.spendLimit.map((function(e){return e?d.Coin.toJSON(e):void 0})):t.spendLimit=[],void 0!==e.expiration&&(t.expiration=e.expiration.toISOString()),t},fromPartial:function(e){var t=Object.assign({},l);if(t.spendLimit=[],void 0!==e.spendLimit&&null!==e.spendLimit){var n,o=a(e.spendLimit);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.spendLimit.push(d.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return void 0!==e.expiration&&null!==e.expiration?t.expiration=e.expiration:t.expiration=void 0,t}};var f={};t.PeriodicAllowance={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.basic&&t.BasicAllowance.encode(e.basic,n.uint32(10).fork()).ldelim(),void 0!==e.period&&s.Duration.encode(e.period,n.uint32(18).fork()).ldelim();var o,r=a(e.periodSpendLimit);try{for(r.s();!(o=r.n()).done;){var c=o.value;d.Coin.encode(c,n.uint32(26).fork()).ldelim()}}catch(b){r.e(b)}finally{r.f()}var l,f=a(e.periodCanSpend);try{for(f.s();!(l=f.n()).done;){var p=l.value;d.Coin.encode(p,n.uint32(34).fork()).ldelim()}}catch(b){f.e(b)}finally{f.f()}return void 0!==e.periodReset&&u.Timestamp.encode(m(e.periodReset),n.uint32(42).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},f);for(r.periodSpendLimit=[],r.periodCanSpend=[];a.pos>>3){case 1:r.basic=t.BasicAllowance.decode(a,a.uint32());break;case 2:r.period=s.Duration.decode(a,a.uint32());break;case 3:r.periodSpendLimit.push(d.Coin.decode(a,a.uint32()));break;case 4:r.periodCanSpend.push(d.Coin.decode(a,a.uint32()));break;case 5:r.periodReset=h(u.Timestamp.decode(a,a.uint32()));break;default:a.skipType(7&c)}}return r},fromJSON:function(e){var n=Object.assign({},f);if(n.periodSpendLimit=[],n.periodCanSpend=[],void 0!==e.basic&&null!==e.basic?n.basic=t.BasicAllowance.fromJSON(e.basic):n.basic=void 0,void 0!==e.period&&null!==e.period?n.period=s.Duration.fromJSON(e.period):n.period=void 0,void 0!==e.periodSpendLimit&&null!==e.periodSpendLimit){var o,r=a(e.periodSpendLimit);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.periodSpendLimit.push(d.Coin.fromJSON(i))}}catch(p){r.e(p)}finally{r.f()}}if(void 0!==e.periodCanSpend&&null!==e.periodCanSpend){var c,u=a(e.periodCanSpend);try{for(u.s();!(c=u.n()).done;){var l=c.value;n.periodCanSpend.push(d.Coin.fromJSON(l))}}catch(p){u.e(p)}finally{u.f()}}return void 0!==e.periodReset&&null!==e.periodReset?n.periodReset=g(e.periodReset):n.periodReset=void 0,n},toJSON:function(e){var n={};return void 0!==e.basic&&(n.basic=e.basic?t.BasicAllowance.toJSON(e.basic):void 0),void 0!==e.period&&(n.period=e.period?s.Duration.toJSON(e.period):void 0),e.periodSpendLimit?n.periodSpendLimit=e.periodSpendLimit.map((function(e){return e?d.Coin.toJSON(e):void 0})):n.periodSpendLimit=[],e.periodCanSpend?n.periodCanSpend=e.periodCanSpend.map((function(e){return e?d.Coin.toJSON(e):void 0})):n.periodCanSpend=[],void 0!==e.periodReset&&(n.periodReset=e.periodReset.toISOString()),n},fromPartial:function(e){var n=Object.assign({},f);if(n.periodSpendLimit=[],n.periodCanSpend=[],void 0!==e.basic&&null!==e.basic?n.basic=t.BasicAllowance.fromPartial(e.basic):n.basic=void 0,void 0!==e.period&&null!==e.period?n.period=s.Duration.fromPartial(e.period):n.period=void 0,void 0!==e.periodSpendLimit&&null!==e.periodSpendLimit){var o,r=a(e.periodSpendLimit);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.periodSpendLimit.push(d.Coin.fromPartial(i))}}catch(p){r.e(p)}finally{r.f()}}if(void 0!==e.periodCanSpend&&null!==e.periodCanSpend){var c,u=a(e.periodCanSpend);try{for(u.s();!(c=u.n()).done;){var l=c.value;n.periodCanSpend.push(d.Coin.fromPartial(l))}}catch(p){u.e(p)}finally{u.f()}}return void 0!==e.periodReset&&null!==e.periodReset?n.periodReset=e.periodReset:n.periodReset=void 0,n}};var p={allowedMessages:""};t.AllowedMsgAllowance={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.allowance&&c.Any.encode(e.allowance,t.uint32(10).fork()).ldelim();var n,o=a(e.allowedMessages);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(18).string(r)}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);for(o.allowedMessages=[];n.pos>>3){case 1:o.allowance=c.Any.decode(n,n.uint32());break;case 2:o.allowedMessages.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);if(t.allowedMessages=[],void 0!==e.allowance&&null!==e.allowance?t.allowance=c.Any.fromJSON(e.allowance):t.allowance=void 0,void 0!==e.allowedMessages&&null!==e.allowedMessages){var n,o=a(e.allowedMessages);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.allowedMessages.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.allowance&&(t.allowance=e.allowance?c.Any.toJSON(e.allowance):void 0),e.allowedMessages?t.allowedMessages=e.allowedMessages.map((function(e){return e})):t.allowedMessages=[],t},fromPartial:function(e){var t=Object.assign({},p);if(t.allowedMessages=[],void 0!==e.allowance&&null!==e.allowance?t.allowance=c.Any.fromPartial(e.allowance):t.allowance=void 0,void 0!==e.allowedMessages&&null!==e.allowedMessages){var n,o=a(e.allowedMessages);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.allowedMessages.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var b={granter:"",grantee:""};function m(e){var t;return{seconds:(t=e.getTime()/1e3,r.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function h(e){var t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function g(e){return e instanceof Date?e:"string"===typeof e?new Date(e):h(u.Timestamp.fromJSON(e))}t.Grant={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.allowance&&c.Any.encode(e.allowance,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3){case 1:o.granter=n.string();break;case 2:o.grantee=n.string();break;case 3:o.allowance=c.Any.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.granter&&null!==e.granter?t.granter=String(e.granter):t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=String(e.grantee):t.grantee="",void 0!==e.allowance&&null!==e.allowance?t.allowance=c.Any.fromJSON(e.allowance):t.allowance=void 0,t},toJSON:function(e){var t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.allowance&&(t.allowance=e.allowance?c.Any.toJSON(e.allowance):void 0),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.granter&&null!==e.granter?t.granter=e.granter:t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=e.grantee:t.grantee="",void 0!==e.allowance&&null!==e.allowance?t.allowance=c.Any.fromPartial(e.allowance):t.allowance=void 0,t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},95329:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgRevokeAllowanceDesc=t.MsgGrantAllowanceDesc=t.MsgDesc=t.MsgClientImpl=t.MsgRevokeAllowanceResponse=t.MsgRevokeAllowance=t.MsgGrantAllowanceResponse=t.MsgGrantAllowance=t.protobufPackage=void 0;var i=r(n(29600)),s=n(93704),c=r(n(80121)),u=n(85920),d=n(82576);t.protobufPackage="cosmos.feegrant.v1beta1";var l={granter:"",grantee:""};t.MsgGrantAllowance={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.allowance&&u.Any.encode(e.allowance,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos>>3){case 1:o.granter=n.string();break;case 2:o.grantee=n.string();break;case 3:o.allowance=u.Any.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},l);return void 0!==e.granter&&null!==e.granter?t.granter=String(e.granter):t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=String(e.grantee):t.grantee="",void 0!==e.allowance&&null!==e.allowance?t.allowance=u.Any.fromJSON(e.allowance):t.allowance=void 0,t},toJSON:function(e){var t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.allowance&&(t.allowance=e.allowance?u.Any.toJSON(e.allowance):void 0),t},fromPartial:function(e){var t=Object.assign({},l);return void 0!==e.granter&&null!==e.granter?t.granter=e.granter:t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=e.grantee:t.grantee="",void 0!==e.allowance&&null!==e.allowance?t.allowance=u.Any.fromPartial(e.allowance):t.allowance=void 0,t}};var f={};t.MsgGrantAllowanceResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos>>3){case 1:o.granter=n.string();break;case 2:o.grantee=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return void 0!==e.granter&&null!==e.granter?t.granter=String(e.granter):t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=String(e.grantee):t.grantee="",t},toJSON:function(e){var t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.granter&&null!==e.granter?t.granter=e.granter:t.granter="",void 0!==e.grantee&&null!==e.grantee?t.grantee=e.grantee:t.grantee="",t}};var b={};t.MsgRevokeAllowanceResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.option&&t.uint32(8).int32(e.option),""!==e.weight&&t.uint32(18).string(e.weight),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos>>3){case 1:o.option=n.int32();break;case 2:o.weight=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},g);return void 0!==e.option&&null!==e.option?t.option=p(e.option):t.option=0,void 0!==e.weight&&null!==e.weight?t.weight=String(e.weight):t.weight="",t},toJSON:function(e){var t={};return void 0!==e.option&&(t.option=b(e.option)),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.option&&null!==e.option?t.option=e.option:t.option=0,void 0!==e.weight&&null!==e.weight?t.weight=e.weight:t.weight="",t}};var y={title:"",description:""};t.TextProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",t}};var v={proposalId:s.default.UZERO,depositor:""};t.Deposit={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor);var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var r=n.value;f.Coin.encode(r,t.uint32(26).fork()).ldelim()}}catch(i){o.e(i)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);for(o.amount=[];n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.depositor=n.string();break;case 3:o.amount.push(f.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},v);if(t.amount=[],void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=s.default.fromString(e.proposalId):t.proposalId=s.default.UZERO,void 0!==e.depositor&&null!==e.depositor?t.depositor=String(e.depositor):t.depositor="",void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.amount.push(f.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map((function(e){return e?f.Coin.toJSON(e):void 0})):t.amount=[],t},fromPartial:function(e){var t=Object.assign({},v);if(t.amount=[],void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=e.proposalId:t.proposalId=s.default.UZERO,void 0!==e.depositor&&null!==e.depositor?t.depositor=e.depositor:t.depositor="",void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.amount.push(f.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var w={proposalId:s.default.UZERO,status:0};t.Proposal={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();e.proposalId.isZero()||n.uint32(8).uint64(e.proposalId),void 0!==e.content&&u.Any.encode(e.content,n.uint32(18).fork()).ldelim(),0!==e.status&&n.uint32(24).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,n.uint32(34).fork()).ldelim(),void 0!==e.submitTime&&l.Timestamp.encode(P(e.submitTime),n.uint32(42).fork()).ldelim(),void 0!==e.depositEndTime&&l.Timestamp.encode(P(e.depositEndTime),n.uint32(50).fork()).ldelim();var o,r=a(e.totalDeposit);try{for(r.s();!(o=r.n()).done;){var i=o.value;f.Coin.encode(i,n.uint32(58).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return void 0!==e.votingStartTime&&l.Timestamp.encode(P(e.votingStartTime),n.uint32(66).fork()).ldelim(),void 0!==e.votingEndTime&&l.Timestamp.encode(P(e.votingEndTime),n.uint32(74).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},w);for(r.totalDeposit=[];a.pos>>3){case 1:r.proposalId=a.uint64();break;case 2:r.content=u.Any.decode(a,a.uint32());break;case 3:r.status=a.int32();break;case 4:r.finalTallyResult=t.TallyResult.decode(a,a.uint32());break;case 5:r.submitTime=U(l.Timestamp.decode(a,a.uint32()));break;case 6:r.depositEndTime=U(l.Timestamp.decode(a,a.uint32()));break;case 7:r.totalDeposit.push(f.Coin.decode(a,a.uint32()));break;case 8:r.votingStartTime=U(l.Timestamp.decode(a,a.uint32()));break;case 9:r.votingEndTime=U(l.Timestamp.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},w);if(n.totalDeposit=[],void 0!==e.proposalId&&null!==e.proposalId?n.proposalId=s.default.fromString(e.proposalId):n.proposalId=s.default.UZERO,void 0!==e.content&&null!==e.content?n.content=u.Any.fromJSON(e.content):n.content=void 0,void 0!==e.status&&null!==e.status?n.status=m(e.status):n.status=0,void 0!==e.finalTallyResult&&null!==e.finalTallyResult?n.finalTallyResult=t.TallyResult.fromJSON(e.finalTallyResult):n.finalTallyResult=void 0,void 0!==e.submitTime&&null!==e.submitTime?n.submitTime=_(e.submitTime):n.submitTime=void 0,void 0!==e.depositEndTime&&null!==e.depositEndTime?n.depositEndTime=_(e.depositEndTime):n.depositEndTime=void 0,void 0!==e.totalDeposit&&null!==e.totalDeposit){var o,r=a(e.totalDeposit);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.totalDeposit.push(f.Coin.fromJSON(i))}}catch(c){r.e(c)}finally{r.f()}}return void 0!==e.votingStartTime&&null!==e.votingStartTime?n.votingStartTime=_(e.votingStartTime):n.votingStartTime=void 0,void 0!==e.votingEndTime&&null!==e.votingEndTime?n.votingEndTime=_(e.votingEndTime):n.votingEndTime=void 0,n},toJSON:function(e){var n={};return void 0!==e.proposalId&&(n.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.content&&(n.content=e.content?u.Any.toJSON(e.content):void 0),void 0!==e.status&&(n.status=h(e.status)),void 0!==e.finalTallyResult&&(n.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(n.submitTime=e.submitTime.toISOString()),void 0!==e.depositEndTime&&(n.depositEndTime=e.depositEndTime.toISOString()),e.totalDeposit?n.totalDeposit=e.totalDeposit.map((function(e){return e?f.Coin.toJSON(e):void 0})):n.totalDeposit=[],void 0!==e.votingStartTime&&(n.votingStartTime=e.votingStartTime.toISOString()),void 0!==e.votingEndTime&&(n.votingEndTime=e.votingEndTime.toISOString()),n},fromPartial:function(e){var n=Object.assign({},w);if(n.totalDeposit=[],void 0!==e.proposalId&&null!==e.proposalId?n.proposalId=e.proposalId:n.proposalId=s.default.UZERO,void 0!==e.content&&null!==e.content?n.content=u.Any.fromPartial(e.content):n.content=void 0,void 0!==e.status&&null!==e.status?n.status=e.status:n.status=0,void 0!==e.finalTallyResult&&null!==e.finalTallyResult?n.finalTallyResult=t.TallyResult.fromPartial(e.finalTallyResult):n.finalTallyResult=void 0,void 0!==e.submitTime&&null!==e.submitTime?n.submitTime=e.submitTime:n.submitTime=void 0,void 0!==e.depositEndTime&&null!==e.depositEndTime?n.depositEndTime=e.depositEndTime:n.depositEndTime=void 0,void 0!==e.totalDeposit&&null!==e.totalDeposit){var o,r=a(e.totalDeposit);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.totalDeposit.push(f.Coin.fromPartial(i))}}catch(c){r.e(c)}finally{r.f()}}return void 0!==e.votingStartTime&&null!==e.votingStartTime?n.votingStartTime=e.votingStartTime:n.votingStartTime=void 0,void 0!==e.votingEndTime&&null!==e.votingEndTime?n.votingEndTime=e.votingEndTime:n.votingEndTime=void 0,n}};var k={yes:"",abstain:"",no:"",noWithVeto:""};t.TallyResult={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.yes&&t.uint32(10).string(e.yes),""!==e.abstain&&t.uint32(18).string(e.abstain),""!==e.no&&t.uint32(26).string(e.no),""!==e.noWithVeto&&t.uint32(34).string(e.noWithVeto),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);n.pos>>3){case 1:o.yes=n.string();break;case 2:o.abstain=n.string();break;case 3:o.no=n.string();break;case 4:o.noWithVeto=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},k);return void 0!==e.yes&&null!==e.yes?t.yes=String(e.yes):t.yes="",void 0!==e.abstain&&null!==e.abstain?t.abstain=String(e.abstain):t.abstain="",void 0!==e.no&&null!==e.no?t.no=String(e.no):t.no="",void 0!==e.noWithVeto&&null!==e.noWithVeto?t.noWithVeto=String(e.noWithVeto):t.noWithVeto="",t},toJSON:function(e){var t={};return void 0!==e.yes&&(t.yes=e.yes),void 0!==e.abstain&&(t.abstain=e.abstain),void 0!==e.no&&(t.no=e.no),void 0!==e.noWithVeto&&(t.noWithVeto=e.noWithVeto),t},fromPartial:function(e){var t=Object.assign({},k);return void 0!==e.yes&&null!==e.yes?t.yes=e.yes:t.yes="",void 0!==e.abstain&&null!==e.abstain?t.abstain=e.abstain:t.abstain="",void 0!==e.no&&null!==e.no?t.no=e.no:t.no="",void 0!==e.noWithVeto&&null!==e.noWithVeto?t.noWithVeto=e.noWithVeto:t.noWithVeto="",t}};var A={proposalId:s.default.UZERO,voter:"",option:0};t.Vote={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();e.proposalId.isZero()||n.uint32(8).uint64(e.proposalId),""!==e.voter&&n.uint32(18).string(e.voter),0!==e.option&&n.uint32(24).int32(e.option);var o,r=a(e.options);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.WeightedVoteOption.encode(i,n.uint32(34).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},A);for(r.options=[];a.pos>>3){case 1:r.proposalId=a.uint64();break;case 2:r.voter=a.string();break;case 3:r.option=a.int32();break;case 4:r.options.push(t.WeightedVoteOption.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},A);if(n.options=[],void 0!==e.proposalId&&null!==e.proposalId?n.proposalId=s.default.fromString(e.proposalId):n.proposalId=s.default.UZERO,void 0!==e.voter&&null!==e.voter?n.voter=String(e.voter):n.voter="",void 0!==e.option&&null!==e.option?n.option=p(e.option):n.option=0,void 0!==e.options&&null!==e.options){var o,r=a(e.options);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.options.push(t.WeightedVoteOption.fromJSON(i))}}catch(c){r.e(c)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.proposalId&&(n.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.voter&&(n.voter=e.voter),void 0!==e.option&&(n.option=b(e.option)),e.options?n.options=e.options.map((function(e){return e?t.WeightedVoteOption.toJSON(e):void 0})):n.options=[],n},fromPartial:function(e){var n=Object.assign({},A);if(n.options=[],void 0!==e.proposalId&&null!==e.proposalId?n.proposalId=e.proposalId:n.proposalId=s.default.UZERO,void 0!==e.voter&&null!==e.voter?n.voter=e.voter:n.voter="",void 0!==e.option&&null!==e.option?n.option=e.option:n.option=0,void 0!==e.options&&null!==e.options){var o,r=a(e.options);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.options.push(t.WeightedVoteOption.fromPartial(i))}}catch(c){r.e(c)}finally{r.f()}}return n}};var x={};t.DepositParams={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create(),o=a(e.minDeposit);try{for(o.s();!(t=o.n()).done;){var r=t.value;f.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(i){o.e(i)}finally{o.f()}return void 0!==e.maxDepositPeriod&&d.Duration.encode(e.maxDepositPeriod,n.uint32(18).fork()).ldelim(),n},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},x);for(o.minDeposit=[];n.pos>>3){case 1:o.minDeposit.push(f.Coin.decode(n,n.uint32()));break;case 2:o.maxDepositPeriod=d.Duration.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},x);if(t.minDeposit=[],void 0!==e.minDeposit&&null!==e.minDeposit){var n,o=a(e.minDeposit);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.minDeposit.push(f.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod?t.maxDepositPeriod=d.Duration.fromJSON(e.maxDepositPeriod):t.maxDepositPeriod=void 0,t},toJSON:function(e){var t={};return e.minDeposit?t.minDeposit=e.minDeposit.map((function(e){return e?f.Coin.toJSON(e):void 0})):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?d.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial:function(e){var t=Object.assign({},x);if(t.minDeposit=[],void 0!==e.minDeposit&&null!==e.minDeposit){var n,o=a(e.minDeposit);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.minDeposit.push(f.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod?t.maxDepositPeriod=d.Duration.fromPartial(e.maxDepositPeriod):t.maxDepositPeriod=void 0,t}};var I={};t.VotingParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.votingPeriod&&d.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},I);n.pos>>3===1)o.votingPeriod=d.Duration.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},I);return void 0!==e.votingPeriod&&null!==e.votingPeriod?t.votingPeriod=d.Duration.fromJSON(e.votingPeriod):t.votingPeriod=void 0,t},toJSON:function(e){var t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?d.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial:function(e){var t=Object.assign({},I);return void 0!==e.votingPeriod&&null!==e.votingPeriod?t.votingPeriod=d.Duration.fromPartial(e.votingPeriod):t.votingPeriod=void 0,t}};var T={};t.TallyParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.quorum.length&&t.uint32(10).bytes(e.quorum),0!==e.threshold.length&&t.uint32(18).bytes(e.threshold),0!==e.vetoThreshold.length&&t.uint32(26).bytes(e.vetoThreshold),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},T);for(o.quorum=new Uint8Array,o.threshold=new Uint8Array,o.vetoThreshold=new Uint8Array;n.pos>>3){case 1:o.quorum=n.bytes();break;case 2:o.threshold=n.bytes();break;case 3:o.vetoThreshold=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},T);return t.quorum=new Uint8Array,t.threshold=new Uint8Array,t.vetoThreshold=new Uint8Array,void 0!==e.quorum&&null!==e.quorum&&(t.quorum=E(e.quorum)),void 0!==e.threshold&&null!==e.threshold&&(t.threshold=E(e.threshold)),void 0!==e.vetoThreshold&&null!==e.vetoThreshold&&(t.vetoThreshold=E(e.vetoThreshold)),t},toJSON:function(e){var t={};return void 0!==e.quorum&&(t.quorum=M(void 0!==e.quorum?e.quorum:new Uint8Array)),void 0!==e.threshold&&(t.threshold=M(void 0!==e.threshold?e.threshold:new Uint8Array)),void 0!==e.vetoThreshold&&(t.vetoThreshold=M(void 0!==e.vetoThreshold?e.vetoThreshold:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},T);return void 0!==e.quorum&&null!==e.quorum?t.quorum=e.quorum:t.quorum=new Uint8Array,void 0!==e.threshold&&null!==e.threshold?t.threshold=e.threshold:t.threshold=new Uint8Array,void 0!==e.vetoThreshold&&null!==e.vetoThreshold?t.vetoThreshold=e.vetoThreshold:t.vetoThreshold=new Uint8Array,t}};var S=function(){if("undefined"!==typeof S)return S;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),C=S.atob||function(e){return S.Buffer.from(e,"base64").toString("binary")};function E(e){for(var t=C(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();void 0!==e.content&&d.Any.encode(e.content,t.uint32(10).fork()).ldelim();var n,a=r(e.initialDeposit);try{for(a.s();!(n=a.n()).done;){var o=n.value;p.Coin.encode(o,t.uint32(18).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return""!==e.proposer&&t.uint32(26).string(e.proposer),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);for(o.initialDeposit=[];n.pos>>3){case 1:o.content=d.Any.decode(n,n.uint32());break;case 2:o.initialDeposit.push(p.Coin.decode(n,n.uint32()));break;case 3:o.proposer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);if(t.initialDeposit=[],void 0!==e.content&&null!==e.content?t.content=d.Any.fromJSON(e.content):t.content=void 0,void 0!==e.initialDeposit&&null!==e.initialDeposit){var n,a=r(e.initialDeposit);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.initialDeposit.push(p.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.proposer&&null!==e.proposer?t.proposer=String(e.proposer):t.proposer="",t},toJSON:function(e){var t={};return void 0!==e.content&&(t.content=e.content?d.Any.toJSON(e.content):void 0),e.initialDeposit?t.initialDeposit=e.initialDeposit.map((function(e){return e?p.Coin.toJSON(e):void 0})):t.initialDeposit=[],void 0!==e.proposer&&(t.proposer=e.proposer),t},fromPartial:function(e){var t=Object.assign({},b);if(t.initialDeposit=[],void 0!==e.content&&null!==e.content?t.content=d.Any.fromPartial(e.content):t.content=void 0,void 0!==e.initialDeposit&&null!==e.initialDeposit){var n,a=r(e.initialDeposit);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.initialDeposit.push(p.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.proposer&&null!==e.proposer?t.proposer=e.proposer:t.proposer="",t}};var m={proposalId:s.default.UZERO};t.MsgSubmitProposalResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);n.pos>>3===1)o.proposalId=n.uint64();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},m);return void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=s.default.fromString(e.proposalId):t.proposalId=s.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||s.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},m);return void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=e.proposalId:t.proposalId=s.default.UZERO,t}};var h={proposalId:s.default.UZERO,voter:"",option:0};t.MsgVote={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.voter=n.string();break;case 3:o.option=n.int32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);return void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=s.default.fromString(e.proposalId):t.proposalId=s.default.UZERO,void 0!==e.voter&&null!==e.voter?t.voter=String(e.voter):t.voter="",void 0!==e.option&&null!==e.option?t.option=l.voteOptionFromJSON(e.option):t.option=0,t},toJSON:function(e){var t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=l.voteOptionToJSON(e.option)),t},fromPartial:function(e){var t=Object.assign({},h);return void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=e.proposalId:t.proposalId=s.default.UZERO,void 0!==e.voter&&null!==e.voter?t.voter=e.voter:t.voter="",void 0!==e.option&&null!==e.option?t.option=e.option:t.option=0,t}};var g={};t.MsgVoteResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter);var n,a=r(e.options);try{for(a.s();!(n=a.n()).done;){var o=n.value;l.WeightedVoteOption.encode(o,t.uint32(26).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.options=[];n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.voter=n.string();break;case 3:o.options.push(l.WeightedVoteOption.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);if(t.options=[],void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=s.default.fromString(e.proposalId):t.proposalId=s.default.UZERO,void 0!==e.voter&&null!==e.voter?t.voter=String(e.voter):t.voter="",void 0!==e.options&&null!==e.options){var n,a=r(e.options);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.options.push(l.WeightedVoteOption.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.voter&&(t.voter=e.voter),e.options?t.options=e.options.map((function(e){return e?l.WeightedVoteOption.toJSON(e):void 0})):t.options=[],t},fromPartial:function(e){var t=Object.assign({},y);if(t.options=[],void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=e.proposalId:t.proposalId=s.default.UZERO,void 0!==e.voter&&null!==e.voter?t.voter=e.voter:t.voter="",void 0!==e.options&&null!==e.options){var n,a=r(e.options);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.options.push(l.WeightedVoteOption.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return t}};var v={};t.MsgVoteWeightedResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor);var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;p.Coin.encode(o,t.uint32(26).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);for(o.amount=[];n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.depositor=n.string();break;case 3:o.amount.push(p.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},w);if(t.amount=[],void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=s.default.fromString(e.proposalId):t.proposalId=s.default.UZERO,void 0!==e.depositor&&null!==e.depositor?t.depositor=String(e.depositor):t.depositor="",void 0!==e.amount&&null!==e.amount){var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.amount.push(p.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map((function(e){return e?p.Coin.toJSON(e):void 0})):t.amount=[],t},fromPartial:function(e){var t=Object.assign({},w);if(t.amount=[],void 0!==e.proposalId&&null!==e.proposalId?t.proposalId=e.proposalId:t.proposalId=s.default.UZERO,void 0!==e.depositor&&null!==e.depositor?t.depositor=e.depositor:t.depositor="",void 0!==e.amount&&null!==e.amount){var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.amount.push(p.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return t}};var k={};t.MsgDepositResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.title&&n.uint32(10).string(e.title),""!==e.description&&n.uint32(18).string(e.description);var o,r=a(e.changes);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.ParamChange.encode(s,n.uint32(26).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},s);for(r.changes=[];a.pos>>3){case 1:r.title=a.string();break;case 2:r.description=a.string();break;case 3:r.changes.push(t.ParamChange.decode(a,a.uint32()));break;default:a.skipType(7&c)}}return r},fromJSON:function(e){var n=Object.assign({},s);if(n.changes=[],void 0!==e.title&&null!==e.title?n.title=String(e.title):n.title="",void 0!==e.description&&null!==e.description?n.description=String(e.description):n.description="",void 0!==e.changes&&null!==e.changes){var o,r=a(e.changes);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.changes.push(t.ParamChange.fromJSON(i))}}catch(c){r.e(c)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.title&&(n.title=e.title),void 0!==e.description&&(n.description=e.description),e.changes?n.changes=e.changes.map((function(e){return e?t.ParamChange.toJSON(e):void 0})):n.changes=[],n},fromPartial:function(e){var n=Object.assign({},s);if(n.changes=[],void 0!==e.title&&null!==e.title?n.title=e.title:n.title="",void 0!==e.description&&null!==e.description?n.description=e.description:n.description="",void 0!==e.changes&&null!==e.changes){var o,r=a(e.changes);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.changes.push(t.ParamChange.fromPartial(i))}}catch(c){r.e(c)}finally{r.f()}}return n}};var c={subspace:"",key:"",value:""};t.ParamChange={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.subspace&&t.uint32(10).string(e.subspace),""!==e.key&&t.uint32(18).string(e.key),""!==e.value&&t.uint32(26).string(e.value),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.subspace=n.string();break;case 2:o.key=n.string();break;case 3:o.value=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.subspace&&null!==e.subspace?t.subspace=String(e.subspace):t.subspace="",void 0!==e.key&&null!==e.key?t.key=String(e.key):t.key="",void 0!==e.value&&null!==e.value?t.value=String(e.value):t.value="",t},toJSON:function(e){var t={};return void 0!==e.subspace&&(t.subspace=e.subspace),void 0!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=e.value),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.subspace&&null!==e.subspace?t.subspace=e.subspace:t.subspace="",void 0!==e.key&&null!==e.key?t.key=e.key:t.key="",void 0!==e.value&&null!==e.value?t.value=e.value:t.value="",t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},42670:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgUnjailDesc=t.MsgDesc=t.MsgClientImpl=t.MsgUnjailResponse=t.MsgUnjail=t.protobufPackage=void 0;var i=r(n(29600)),s=n(93704),c=r(n(80121)),u=n(82576);t.protobufPackage="cosmos.slashing.v1beta1";var d={validatorAddr:""};t.MsgUnjail={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.validatorAddr&&t.uint32(10).string(e.validatorAddr),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3===1)o.validatorAddr=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.validatorAddr&&null!==e.validatorAddr?t.validatorAddr=String(e.validatorAddr):t.validatorAddr="",t},toJSON:function(e){var t={};return void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.validatorAddr&&null!==e.validatorAddr?t.validatorAddr=e.validatorAddr:t.validatorAddr="",t}};var l={};t.MsgUnjailResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.maxTokens&&c.Coin.encode(e.maxTokens,n.uint32(10).fork()).ldelim(),void 0!==e.allowList&&t.StakeAuthorization_Validators.encode(e.allowList,n.uint32(18).fork()).ldelim(),void 0!==e.denyList&&t.StakeAuthorization_Validators.encode(e.denyList,n.uint32(26).fork()).ldelim(),0!==e.authorizationType&&n.uint32(32).int32(e.authorizationType),n},decode:function(e,n){for(var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},l);a.pos>>3){case 1:r.maxTokens=c.Coin.decode(a,a.uint32());break;case 2:r.allowList=t.StakeAuthorization_Validators.decode(a,a.uint32());break;case 3:r.denyList=t.StakeAuthorization_Validators.decode(a,a.uint32());break;case 4:r.authorizationType=a.int32();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},l);return void 0!==e.maxTokens&&null!==e.maxTokens?n.maxTokens=c.Coin.fromJSON(e.maxTokens):n.maxTokens=void 0,void 0!==e.allowList&&null!==e.allowList?n.allowList=t.StakeAuthorization_Validators.fromJSON(e.allowList):n.allowList=void 0,void 0!==e.denyList&&null!==e.denyList?n.denyList=t.StakeAuthorization_Validators.fromJSON(e.denyList):n.denyList=void 0,void 0!==e.authorizationType&&null!==e.authorizationType?n.authorizationType=u(e.authorizationType):n.authorizationType=0,n},toJSON:function(e){var n={};return void 0!==e.maxTokens&&(n.maxTokens=e.maxTokens?c.Coin.toJSON(e.maxTokens):void 0),void 0!==e.allowList&&(n.allowList=e.allowList?t.StakeAuthorization_Validators.toJSON(e.allowList):void 0),void 0!==e.denyList&&(n.denyList=e.denyList?t.StakeAuthorization_Validators.toJSON(e.denyList):void 0),void 0!==e.authorizationType&&(n.authorizationType=d(e.authorizationType)),n},fromPartial:function(e){var n=Object.assign({},l);return void 0!==e.maxTokens&&null!==e.maxTokens?n.maxTokens=c.Coin.fromPartial(e.maxTokens):n.maxTokens=void 0,void 0!==e.allowList&&null!==e.allowList?n.allowList=t.StakeAuthorization_Validators.fromPartial(e.allowList):n.allowList=void 0,void 0!==e.denyList&&null!==e.denyList?n.denyList=t.StakeAuthorization_Validators.fromPartial(e.denyList):n.denyList=void 0,void 0!==e.authorizationType&&null!==e.authorizationType?n.authorizationType=e.authorizationType:n.authorizationType=0,n}};var f={address:""};t.StakeAuthorization_Validators={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),o=a(e.address);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).string(r)}}catch(i){o.e(i)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);for(o.address=[];n.pos>>3===1)o.address.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},f);if(t.address=[],void 0!==e.address&&null!==e.address){var n,o=a(e.address);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.address.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.address?t.address=e.address.map((function(e){return e})):t.address=[],t},fromPartial:function(e){var t=Object.assign({},f);if(t.address=[],void 0!==e.address&&null!==e.address){var n,o=a(e.address);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.address.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}},s.default.util.Long!==i.default&&(s.default.util.Long=i.default,s.default.configure())},56189:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Pool=t.RedelegationResponse=t.RedelegationEntryResponse=t.DelegationResponse=t.Params=t.Redelegation=t.RedelegationEntry=t.UnbondingDelegationEntry=t.UnbondingDelegation=t.Delegation=t.DVVTriplets=t.DVVTriplet=t.DVPairs=t.DVPair=t.ValAddresses=t.Validator=t.Description=t.Commission=t.CommissionRates=t.HistoricalInfo=t.bondStatusToJSON=t.bondStatusFromJSON=t.BondStatus=t.protobufPackage=void 0;var r,i=o(n(29600)),s=o(n(80121)),c=n(78750),u=n(85920),d=n(51090),l=n(39705),f=n(47478);function p(e){switch(e){case 0:case"BOND_STATUS_UNSPECIFIED":return r.BOND_STATUS_UNSPECIFIED;case 1:case"BOND_STATUS_UNBONDED":return r.BOND_STATUS_UNBONDED;case 2:case"BOND_STATUS_UNBONDING":return r.BOND_STATUS_UNBONDING;case 3:case"BOND_STATUS_BONDED":return r.BOND_STATUS_BONDED;default:return r.UNRECOGNIZED}}function b(e){switch(e){case r.BOND_STATUS_UNSPECIFIED:return"BOND_STATUS_UNSPECIFIED";case r.BOND_STATUS_UNBONDED:return"BOND_STATUS_UNBONDED";case r.BOND_STATUS_UNBONDING:return"BOND_STATUS_UNBONDING";case r.BOND_STATUS_BONDED:return"BOND_STATUS_BONDED";default:return"UNKNOWN"}}t.protobufPackage="cosmos.staking.v1beta1",function(e){e[e.BOND_STATUS_UNSPECIFIED=0]="BOND_STATUS_UNSPECIFIED",e[e.BOND_STATUS_UNBONDED=1]="BOND_STATUS_UNBONDED",e[e.BOND_STATUS_UNBONDING=2]="BOND_STATUS_UNBONDING",e[e.BOND_STATUS_BONDED=3]="BOND_STATUS_BONDED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(r=t.BondStatus||(t.BondStatus={})),t.bondStatusFromJSON=p,t.bondStatusToJSON=b;var m={};t.HistoricalInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();void 0!==e.header&&c.Header.encode(e.header,n.uint32(10).fork()).ldelim();var o,r=a(e.valset);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.Validator.encode(i,n.uint32(18).fork()).ldelim()}}catch(u){r.e(u)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},m);for(r.valset=[];a.pos>>3){case 1:r.header=c.Header.decode(a,a.uint32());break;case 2:r.valset.push(t.Validator.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},m);if(n.valset=[],void 0!==e.header&&null!==e.header?n.header=c.Header.fromJSON(e.header):n.header=void 0,void 0!==e.valset&&null!==e.valset){var o,r=a(e.valset);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.valset.push(t.Validator.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.header&&(n.header=e.header?c.Header.toJSON(e.header):void 0),e.valset?n.valset=e.valset.map((function(e){return e?t.Validator.toJSON(e):void 0})):n.valset=[],n},fromPartial:function(e){var n=Object.assign({},m);if(n.valset=[],void 0!==e.header&&null!==e.header?n.header=c.Header.fromPartial(e.header):n.header=void 0,void 0!==e.valset&&null!==e.valset){var o,r=a(e.valset);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.valset.push(t.Validator.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var h={rate:"",maxRate:"",maxChangeRate:""};t.CommissionRates={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.rate&&t.uint32(10).string(e.rate),""!==e.maxRate&&t.uint32(18).string(e.maxRate),""!==e.maxChangeRate&&t.uint32(26).string(e.maxChangeRate),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);n.pos>>3){case 1:o.rate=n.string();break;case 2:o.maxRate=n.string();break;case 3:o.maxChangeRate=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);return void 0!==e.rate&&null!==e.rate?t.rate=String(e.rate):t.rate="",void 0!==e.maxRate&&null!==e.maxRate?t.maxRate=String(e.maxRate):t.maxRate="",void 0!==e.maxChangeRate&&null!==e.maxChangeRate?t.maxChangeRate=String(e.maxChangeRate):t.maxChangeRate="",t},toJSON:function(e){var t={};return void 0!==e.rate&&(t.rate=e.rate),void 0!==e.maxRate&&(t.maxRate=e.maxRate),void 0!==e.maxChangeRate&&(t.maxChangeRate=e.maxChangeRate),t},fromPartial:function(e){var t=Object.assign({},h);return void 0!==e.rate&&null!==e.rate?t.rate=e.rate:t.rate="",void 0!==e.maxRate&&null!==e.maxRate?t.maxRate=e.maxRate:t.maxRate="",void 0!==e.maxChangeRate&&null!==e.maxChangeRate?t.maxChangeRate=e.maxChangeRate:t.maxChangeRate="",t}};var g={};t.Commission={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.commissionRates&&t.CommissionRates.encode(e.commissionRates,n.uint32(10).fork()).ldelim(),void 0!==e.updateTime&&f.Timestamp.encode(D(e.updateTime),n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},g);a.pos>>3){case 1:r.commissionRates=t.CommissionRates.decode(a,a.uint32());break;case 2:r.updateTime=N(f.Timestamp.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},g);return void 0!==e.commissionRates&&null!==e.commissionRates?n.commissionRates=t.CommissionRates.fromJSON(e.commissionRates):n.commissionRates=void 0,void 0!==e.updateTime&&null!==e.updateTime?n.updateTime=O(e.updateTime):n.updateTime=void 0,n},toJSON:function(e){var n={};return void 0!==e.commissionRates&&(n.commissionRates=e.commissionRates?t.CommissionRates.toJSON(e.commissionRates):void 0),void 0!==e.updateTime&&(n.updateTime=e.updateTime.toISOString()),n},fromPartial:function(e){var n=Object.assign({},g);return void 0!==e.commissionRates&&null!==e.commissionRates?n.commissionRates=t.CommissionRates.fromPartial(e.commissionRates):n.commissionRates=void 0,void 0!==e.updateTime&&null!==e.updateTime?n.updateTime=e.updateTime:n.updateTime=void 0,n}};var y={moniker:"",identity:"",website:"",securityContact:"",details:""};t.Description={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.moniker&&t.uint32(10).string(e.moniker),""!==e.identity&&t.uint32(18).string(e.identity),""!==e.website&&t.uint32(26).string(e.website),""!==e.securityContact&&t.uint32(34).string(e.securityContact),""!==e.details&&t.uint32(42).string(e.details),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);n.pos>>3){case 1:o.moniker=n.string();break;case 2:o.identity=n.string();break;case 3:o.website=n.string();break;case 4:o.securityContact=n.string();break;case 5:o.details=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return void 0!==e.moniker&&null!==e.moniker?t.moniker=String(e.moniker):t.moniker="",void 0!==e.identity&&null!==e.identity?t.identity=String(e.identity):t.identity="",void 0!==e.website&&null!==e.website?t.website=String(e.website):t.website="",void 0!==e.securityContact&&null!==e.securityContact?t.securityContact=String(e.securityContact):t.securityContact="",void 0!==e.details&&null!==e.details?t.details=String(e.details):t.details="",t},toJSON:function(e){var t={};return void 0!==e.moniker&&(t.moniker=e.moniker),void 0!==e.identity&&(t.identity=e.identity),void 0!==e.website&&(t.website=e.website),void 0!==e.securityContact&&(t.securityContact=e.securityContact),void 0!==e.details&&(t.details=e.details),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.moniker&&null!==e.moniker?t.moniker=e.moniker:t.moniker="",void 0!==e.identity&&null!==e.identity?t.identity=e.identity:t.identity="",void 0!==e.website&&null!==e.website?t.website=e.website:t.website="",void 0!==e.securityContact&&null!==e.securityContact?t.securityContact=e.securityContact:t.securityContact="",void 0!==e.details&&null!==e.details?t.details=e.details:t.details="",t}};var v={operatorAddress:"",jailed:!1,status:0,tokens:"",delegatorShares:"",unbondingHeight:i.default.ZERO,minSelfDelegation:""};t.Validator={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.operatorAddress&&n.uint32(10).string(e.operatorAddress),void 0!==e.consensusPubkey&&u.Any.encode(e.consensusPubkey,n.uint32(18).fork()).ldelim(),!0===e.jailed&&n.uint32(24).bool(e.jailed),0!==e.status&&n.uint32(32).int32(e.status),""!==e.tokens&&n.uint32(42).string(e.tokens),""!==e.delegatorShares&&n.uint32(50).string(e.delegatorShares),void 0!==e.description&&t.Description.encode(e.description,n.uint32(58).fork()).ldelim(),e.unbondingHeight.isZero()||n.uint32(64).int64(e.unbondingHeight),void 0!==e.unbondingTime&&f.Timestamp.encode(D(e.unbondingTime),n.uint32(74).fork()).ldelim(),void 0!==e.commission&&t.Commission.encode(e.commission,n.uint32(82).fork()).ldelim(),""!==e.minSelfDelegation&&n.uint32(90).string(e.minSelfDelegation),n},decode:function(e,n){for(var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},v);a.pos>>3){case 1:r.operatorAddress=a.string();break;case 2:r.consensusPubkey=u.Any.decode(a,a.uint32());break;case 3:r.jailed=a.bool();break;case 4:r.status=a.int32();break;case 5:r.tokens=a.string();break;case 6:r.delegatorShares=a.string();break;case 7:r.description=t.Description.decode(a,a.uint32());break;case 8:r.unbondingHeight=a.int64();break;case 9:r.unbondingTime=N(f.Timestamp.decode(a,a.uint32()));break;case 10:r.commission=t.Commission.decode(a,a.uint32());break;case 11:r.minSelfDelegation=a.string();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},v);return void 0!==e.operatorAddress&&null!==e.operatorAddress?n.operatorAddress=String(e.operatorAddress):n.operatorAddress="",void 0!==e.consensusPubkey&&null!==e.consensusPubkey?n.consensusPubkey=u.Any.fromJSON(e.consensusPubkey):n.consensusPubkey=void 0,void 0!==e.jailed&&null!==e.jailed?n.jailed=Boolean(e.jailed):n.jailed=!1,void 0!==e.status&&null!==e.status?n.status=p(e.status):n.status=0,void 0!==e.tokens&&null!==e.tokens?n.tokens=String(e.tokens):n.tokens="",void 0!==e.delegatorShares&&null!==e.delegatorShares?n.delegatorShares=String(e.delegatorShares):n.delegatorShares="",void 0!==e.description&&null!==e.description?n.description=t.Description.fromJSON(e.description):n.description=void 0,void 0!==e.unbondingHeight&&null!==e.unbondingHeight?n.unbondingHeight=i.default.fromString(e.unbondingHeight):n.unbondingHeight=i.default.ZERO,void 0!==e.unbondingTime&&null!==e.unbondingTime?n.unbondingTime=O(e.unbondingTime):n.unbondingTime=void 0,void 0!==e.commission&&null!==e.commission?n.commission=t.Commission.fromJSON(e.commission):n.commission=void 0,void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?n.minSelfDelegation=String(e.minSelfDelegation):n.minSelfDelegation="",n},toJSON:function(e){var n={};return void 0!==e.operatorAddress&&(n.operatorAddress=e.operatorAddress),void 0!==e.consensusPubkey&&(n.consensusPubkey=e.consensusPubkey?u.Any.toJSON(e.consensusPubkey):void 0),void 0!==e.jailed&&(n.jailed=e.jailed),void 0!==e.status&&(n.status=b(e.status)),void 0!==e.tokens&&(n.tokens=e.tokens),void 0!==e.delegatorShares&&(n.delegatorShares=e.delegatorShares),void 0!==e.description&&(n.description=e.description?t.Description.toJSON(e.description):void 0),void 0!==e.unbondingHeight&&(n.unbondingHeight=(e.unbondingHeight||i.default.ZERO).toString()),void 0!==e.unbondingTime&&(n.unbondingTime=e.unbondingTime.toISOString()),void 0!==e.commission&&(n.commission=e.commission?t.Commission.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(n.minSelfDelegation=e.minSelfDelegation),n},fromPartial:function(e){var n=Object.assign({},v);return void 0!==e.operatorAddress&&null!==e.operatorAddress?n.operatorAddress=e.operatorAddress:n.operatorAddress="",void 0!==e.consensusPubkey&&null!==e.consensusPubkey?n.consensusPubkey=u.Any.fromPartial(e.consensusPubkey):n.consensusPubkey=void 0,void 0!==e.jailed&&null!==e.jailed?n.jailed=e.jailed:n.jailed=!1,void 0!==e.status&&null!==e.status?n.status=e.status:n.status=0,void 0!==e.tokens&&null!==e.tokens?n.tokens=e.tokens:n.tokens="",void 0!==e.delegatorShares&&null!==e.delegatorShares?n.delegatorShares=e.delegatorShares:n.delegatorShares="",void 0!==e.description&&null!==e.description?n.description=t.Description.fromPartial(e.description):n.description=void 0,void 0!==e.unbondingHeight&&null!==e.unbondingHeight?n.unbondingHeight=e.unbondingHeight:n.unbondingHeight=i.default.ZERO,void 0!==e.unbondingTime&&null!==e.unbondingTime?n.unbondingTime=e.unbondingTime:n.unbondingTime=void 0,void 0!==e.commission&&null!==e.commission?n.commission=t.Commission.fromPartial(e.commission):n.commission=void 0,void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?n.minSelfDelegation=e.minSelfDelegation:n.minSelfDelegation="",n}};var w={addresses:""};t.ValAddresses={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),o=a(e.addresses);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).string(r)}}catch(i){o.e(i)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);for(o.addresses=[];n.pos>>3===1)o.addresses.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},w);if(t.addresses=[],void 0!==e.addresses&&null!==e.addresses){var n,o=a(e.addresses);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.addresses.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.addresses?t.addresses=e.addresses.map((function(e){return e})):t.addresses=[],t},fromPartial:function(e){var t=Object.assign({},w);if(t.addresses=[],void 0!==e.addresses&&null!==e.addresses){var n,o=a(e.addresses);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.addresses.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var k={delegatorAddress:"",validatorAddress:""};t.DVPair={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},k);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=String(e.delegatorAddress):t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=String(e.validatorAddress):t.validatorAddress="",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial:function(e){var t=Object.assign({},k);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=e.delegatorAddress:t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress="",t}};var A={};t.DVPairs={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),r=a(e.pairs);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.DVPair.encode(i,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return o},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},A);for(r.pairs=[];a.pos>>3===1)r.pairs.push(t.DVPair.decode(a,a.uint32()));else a.skipType(7&i)}return r},fromJSON:function(e){var n=Object.assign({},A);if(n.pairs=[],void 0!==e.pairs&&null!==e.pairs){var o,r=a(e.pairs);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.pairs.push(t.DVPair.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return e.pairs?n.pairs=e.pairs.map((function(e){return e?t.DVPair.toJSON(e):void 0})):n.pairs=[],n},fromPartial:function(e){var n=Object.assign({},A);if(n.pairs=[],void 0!==e.pairs&&null!==e.pairs){var o,r=a(e.pairs);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.pairs.push(t.DVPair.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var x={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};t.DVVTriplet={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},x);n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorSrcAddress=n.string();break;case 3:o.validatorDstAddress=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},x);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=String(e.delegatorAddress):t.delegatorAddress="",void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?t.validatorSrcAddress=String(e.validatorSrcAddress):t.validatorSrcAddress="",void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?t.validatorDstAddress=String(e.validatorDstAddress):t.validatorDstAddress="",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),t},fromPartial:function(e){var t=Object.assign({},x);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=e.delegatorAddress:t.delegatorAddress="",void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?t.validatorSrcAddress=e.validatorSrcAddress:t.validatorSrcAddress="",void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?t.validatorDstAddress=e.validatorDstAddress:t.validatorDstAddress="",t}};var I={};t.DVVTriplets={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),r=a(e.triplets);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.DVVTriplet.encode(i,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return o},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},I);for(r.triplets=[];a.pos>>3===1)r.triplets.push(t.DVVTriplet.decode(a,a.uint32()));else a.skipType(7&i)}return r},fromJSON:function(e){var n=Object.assign({},I);if(n.triplets=[],void 0!==e.triplets&&null!==e.triplets){var o,r=a(e.triplets);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.triplets.push(t.DVVTriplet.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return e.triplets?n.triplets=e.triplets.map((function(e){return e?t.DVVTriplet.toJSON(e):void 0})):n.triplets=[],n},fromPartial:function(e){var n=Object.assign({},I);if(n.triplets=[],void 0!==e.triplets&&null!==e.triplets){var o,r=a(e.triplets);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.triplets.push(t.DVVTriplet.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var T={delegatorAddress:"",validatorAddress:"",shares:""};t.Delegation={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.shares&&t.uint32(26).string(e.shares),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},T);n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;case 3:o.shares=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},T);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=String(e.delegatorAddress):t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=String(e.validatorAddress):t.validatorAddress="",void 0!==e.shares&&null!==e.shares?t.shares=String(e.shares):t.shares="",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.shares&&(t.shares=e.shares),t},fromPartial:function(e){var t=Object.assign({},T);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=e.delegatorAddress:t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress="",void 0!==e.shares&&null!==e.shares?t.shares=e.shares:t.shares="",t}};var S={delegatorAddress:"",validatorAddress:""};t.UnbondingDelegation={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.delegatorAddress&&n.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&n.uint32(18).string(e.validatorAddress);var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.UnbondingDelegationEntry.encode(i,n.uint32(26).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},S);for(r.entries=[];a.pos>>3){case 1:r.delegatorAddress=a.string();break;case 2:r.validatorAddress=a.string();break;case 3:r.entries.push(t.UnbondingDelegationEntry.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},S);if(n.entries=[],void 0!==e.delegatorAddress&&null!==e.delegatorAddress?n.delegatorAddress=String(e.delegatorAddress):n.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?n.validatorAddress=String(e.validatorAddress):n.validatorAddress="",void 0!==e.entries&&null!==e.entries){var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.entries.push(t.UnbondingDelegationEntry.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.delegatorAddress&&(n.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(n.validatorAddress=e.validatorAddress),e.entries?n.entries=e.entries.map((function(e){return e?t.UnbondingDelegationEntry.toJSON(e):void 0})):n.entries=[],n},fromPartial:function(e){var n=Object.assign({},S);if(n.entries=[],void 0!==e.delegatorAddress&&null!==e.delegatorAddress?n.delegatorAddress=e.delegatorAddress:n.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?n.validatorAddress=e.validatorAddress:n.validatorAddress="",void 0!==e.entries&&null!==e.entries){var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.entries.push(t.UnbondingDelegationEntry.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var C={creationHeight:i.default.ZERO,initialBalance:"",balance:""};t.UnbondingDelegationEntry={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return e.creationHeight.isZero()||t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&f.Timestamp.encode(D(e.completionTime),t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.balance&&t.uint32(34).string(e.balance),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},C);n.pos>>3){case 1:o.creationHeight=n.int64();break;case 2:o.completionTime=N(f.Timestamp.decode(n,n.uint32()));break;case 3:o.initialBalance=n.string();break;case 4:o.balance=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},C);return void 0!==e.creationHeight&&null!==e.creationHeight?t.creationHeight=i.default.fromString(e.creationHeight):t.creationHeight=i.default.ZERO,void 0!==e.completionTime&&null!==e.completionTime?t.completionTime=O(e.completionTime):t.completionTime=void 0,void 0!==e.initialBalance&&null!==e.initialBalance?t.initialBalance=String(e.initialBalance):t.initialBalance="",void 0!==e.balance&&null!==e.balance?t.balance=String(e.balance):t.balance="",t},toJSON:function(e){var t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||i.default.ZERO).toString()),void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.balance&&(t.balance=e.balance),t},fromPartial:function(e){var t=Object.assign({},C);return void 0!==e.creationHeight&&null!==e.creationHeight?t.creationHeight=e.creationHeight:t.creationHeight=i.default.ZERO,void 0!==e.completionTime&&null!==e.completionTime?t.completionTime=e.completionTime:t.completionTime=void 0,void 0!==e.initialBalance&&null!==e.initialBalance?t.initialBalance=e.initialBalance:t.initialBalance="",void 0!==e.balance&&null!==e.balance?t.balance=e.balance:t.balance="",t}};var E={creationHeight:i.default.ZERO,initialBalance:"",sharesDst:""};t.RedelegationEntry={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return e.creationHeight.isZero()||t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&f.Timestamp.encode(D(e.completionTime),t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.sharesDst&&t.uint32(34).string(e.sharesDst),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},E);n.pos>>3){case 1:o.creationHeight=n.int64();break;case 2:o.completionTime=N(f.Timestamp.decode(n,n.uint32()));break;case 3:o.initialBalance=n.string();break;case 4:o.sharesDst=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},E);return void 0!==e.creationHeight&&null!==e.creationHeight?t.creationHeight=i.default.fromString(e.creationHeight):t.creationHeight=i.default.ZERO,void 0!==e.completionTime&&null!==e.completionTime?t.completionTime=O(e.completionTime):t.completionTime=void 0,void 0!==e.initialBalance&&null!==e.initialBalance?t.initialBalance=String(e.initialBalance):t.initialBalance="",void 0!==e.sharesDst&&null!==e.sharesDst?t.sharesDst=String(e.sharesDst):t.sharesDst="",t},toJSON:function(e){var t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||i.default.ZERO).toString()),void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.sharesDst&&(t.sharesDst=e.sharesDst),t},fromPartial:function(e){var t=Object.assign({},E);return void 0!==e.creationHeight&&null!==e.creationHeight?t.creationHeight=e.creationHeight:t.creationHeight=i.default.ZERO,void 0!==e.completionTime&&null!==e.completionTime?t.completionTime=e.completionTime:t.completionTime=void 0,void 0!==e.initialBalance&&null!==e.initialBalance?t.initialBalance=e.initialBalance:t.initialBalance="",void 0!==e.sharesDst&&null!==e.sharesDst?t.sharesDst=e.sharesDst:t.sharesDst="",t}};var R={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};t.Redelegation={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.delegatorAddress&&n.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&n.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&n.uint32(26).string(e.validatorDstAddress);var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.RedelegationEntry.encode(i,n.uint32(34).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},R);for(r.entries=[];a.pos>>3){case 1:r.delegatorAddress=a.string();break;case 2:r.validatorSrcAddress=a.string();break;case 3:r.validatorDstAddress=a.string();break;case 4:r.entries.push(t.RedelegationEntry.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},R);if(n.entries=[],void 0!==e.delegatorAddress&&null!==e.delegatorAddress?n.delegatorAddress=String(e.delegatorAddress):n.delegatorAddress="",void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?n.validatorSrcAddress=String(e.validatorSrcAddress):n.validatorSrcAddress="",void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?n.validatorDstAddress=String(e.validatorDstAddress):n.validatorDstAddress="",void 0!==e.entries&&null!==e.entries){var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.entries.push(t.RedelegationEntry.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.delegatorAddress&&(n.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(n.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(n.validatorDstAddress=e.validatorDstAddress),e.entries?n.entries=e.entries.map((function(e){return e?t.RedelegationEntry.toJSON(e):void 0})):n.entries=[],n},fromPartial:function(e){var n=Object.assign({},R);if(n.entries=[],void 0!==e.delegatorAddress&&null!==e.delegatorAddress?n.delegatorAddress=e.delegatorAddress:n.delegatorAddress="",void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?n.validatorSrcAddress=e.validatorSrcAddress:n.validatorSrcAddress="",void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?n.validatorDstAddress=e.validatorDstAddress:n.validatorDstAddress="",void 0!==e.entries&&null!==e.entries){var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.entries.push(t.RedelegationEntry.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var M={maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:""};t.Params={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.unbondingTime&&d.Duration.encode(e.unbondingTime,t.uint32(10).fork()).ldelim(),0!==e.maxValidators&&t.uint32(16).uint32(e.maxValidators),0!==e.maxEntries&&t.uint32(24).uint32(e.maxEntries),0!==e.historicalEntries&&t.uint32(32).uint32(e.historicalEntries),""!==e.bondDenom&&t.uint32(42).string(e.bondDenom),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},M);n.pos>>3){case 1:o.unbondingTime=d.Duration.decode(n,n.uint32());break;case 2:o.maxValidators=n.uint32();break;case 3:o.maxEntries=n.uint32();break;case 4:o.historicalEntries=n.uint32();break;case 5:o.bondDenom=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},M);return void 0!==e.unbondingTime&&null!==e.unbondingTime?t.unbondingTime=d.Duration.fromJSON(e.unbondingTime):t.unbondingTime=void 0,void 0!==e.maxValidators&&null!==e.maxValidators?t.maxValidators=Number(e.maxValidators):t.maxValidators=0,void 0!==e.maxEntries&&null!==e.maxEntries?t.maxEntries=Number(e.maxEntries):t.maxEntries=0,void 0!==e.historicalEntries&&null!==e.historicalEntries?t.historicalEntries=Number(e.historicalEntries):t.historicalEntries=0,void 0!==e.bondDenom&&null!==e.bondDenom?t.bondDenom=String(e.bondDenom):t.bondDenom="",t},toJSON:function(e){var t={};return void 0!==e.unbondingTime&&(t.unbondingTime=e.unbondingTime?d.Duration.toJSON(e.unbondingTime):void 0),void 0!==e.maxValidators&&(t.maxValidators=e.maxValidators),void 0!==e.maxEntries&&(t.maxEntries=e.maxEntries),void 0!==e.historicalEntries&&(t.historicalEntries=e.historicalEntries),void 0!==e.bondDenom&&(t.bondDenom=e.bondDenom),t},fromPartial:function(e){var t=Object.assign({},M);return void 0!==e.unbondingTime&&null!==e.unbondingTime?t.unbondingTime=d.Duration.fromPartial(e.unbondingTime):t.unbondingTime=void 0,void 0!==e.maxValidators&&null!==e.maxValidators?t.maxValidators=e.maxValidators:t.maxValidators=0,void 0!==e.maxEntries&&null!==e.maxEntries?t.maxEntries=e.maxEntries:t.maxEntries=0,void 0!==e.historicalEntries&&null!==e.historicalEntries?t.historicalEntries=e.historicalEntries:t.historicalEntries=0,void 0!==e.bondDenom&&null!==e.bondDenom?t.bondDenom=e.bondDenom:t.bondDenom="",t}};var P={};t.DelegationResponse={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.delegation&&t.Delegation.encode(e.delegation,n.uint32(10).fork()).ldelim(),void 0!==e.balance&&l.Coin.encode(e.balance,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},P);a.pos>>3){case 1:r.delegation=t.Delegation.decode(a,a.uint32());break;case 2:r.balance=l.Coin.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},P);return void 0!==e.delegation&&null!==e.delegation?n.delegation=t.Delegation.fromJSON(e.delegation):n.delegation=void 0,void 0!==e.balance&&null!==e.balance?n.balance=l.Coin.fromJSON(e.balance):n.balance=void 0,n},toJSON:function(e){var n={};return void 0!==e.delegation&&(n.delegation=e.delegation?t.Delegation.toJSON(e.delegation):void 0),void 0!==e.balance&&(n.balance=e.balance?l.Coin.toJSON(e.balance):void 0),n},fromPartial:function(e){var n=Object.assign({},P);return void 0!==e.delegation&&null!==e.delegation?n.delegation=t.Delegation.fromPartial(e.delegation):n.delegation=void 0,void 0!==e.balance&&null!==e.balance?n.balance=l.Coin.fromPartial(e.balance):n.balance=void 0,n}};var U={balance:""};t.RedelegationEntryResponse={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.redelegationEntry&&t.RedelegationEntry.encode(e.redelegationEntry,n.uint32(10).fork()).ldelim(),""!==e.balance&&n.uint32(34).string(e.balance),n},decode:function(e,n){for(var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},U);a.pos>>3){case 1:r.redelegationEntry=t.RedelegationEntry.decode(a,a.uint32());break;case 4:r.balance=a.string();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},U);return void 0!==e.redelegationEntry&&null!==e.redelegationEntry?n.redelegationEntry=t.RedelegationEntry.fromJSON(e.redelegationEntry):n.redelegationEntry=void 0,void 0!==e.balance&&null!==e.balance?n.balance=String(e.balance):n.balance="",n},toJSON:function(e){var n={};return void 0!==e.redelegationEntry&&(n.redelegationEntry=e.redelegationEntry?t.RedelegationEntry.toJSON(e.redelegationEntry):void 0),void 0!==e.balance&&(n.balance=e.balance),n},fromPartial:function(e){var n=Object.assign({},U);return void 0!==e.redelegationEntry&&null!==e.redelegationEntry?n.redelegationEntry=t.RedelegationEntry.fromPartial(e.redelegationEntry):n.redelegationEntry=void 0,void 0!==e.balance&&null!==e.balance?n.balance=e.balance:n.balance="",n}};var _={};t.RedelegationResponse={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();void 0!==e.redelegation&&t.Redelegation.encode(e.redelegation,n.uint32(10).fork()).ldelim();var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.RedelegationEntryResponse.encode(i,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},_);for(r.entries=[];a.pos>>3){case 1:r.redelegation=t.Redelegation.decode(a,a.uint32());break;case 2:r.entries.push(t.RedelegationEntryResponse.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},_);if(n.entries=[],void 0!==e.redelegation&&null!==e.redelegation?n.redelegation=t.Redelegation.fromJSON(e.redelegation):n.redelegation=void 0,void 0!==e.entries&&null!==e.entries){var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.entries.push(t.RedelegationEntryResponse.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.redelegation&&(n.redelegation=e.redelegation?t.Redelegation.toJSON(e.redelegation):void 0),e.entries?n.entries=e.entries.map((function(e){return e?t.RedelegationEntryResponse.toJSON(e):void 0})):n.entries=[],n},fromPartial:function(e){var n=Object.assign({},_);if(n.entries=[],void 0!==e.redelegation&&null!==e.redelegation?n.redelegation=t.Redelegation.fromPartial(e.redelegation):n.redelegation=void 0,void 0!==e.entries&&null!==e.entries){var o,r=a(e.entries);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.entries.push(t.RedelegationEntryResponse.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var B={notBondedTokens:"",bondedTokens:""};function D(e){var t;return{seconds:(t=e.getTime()/1e3,i.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function N(e){var t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function O(e){return e instanceof Date?e:"string"===typeof e?new Date(e):N(f.Timestamp.fromJSON(e))}t.Pool={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.notBondedTokens&&t.uint32(10).string(e.notBondedTokens),""!==e.bondedTokens&&t.uint32(18).string(e.bondedTokens),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},B);n.pos>>3){case 1:o.notBondedTokens=n.string();break;case 2:o.bondedTokens=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},B);return void 0!==e.notBondedTokens&&null!==e.notBondedTokens?t.notBondedTokens=String(e.notBondedTokens):t.notBondedTokens="",void 0!==e.bondedTokens&&null!==e.bondedTokens?t.bondedTokens=String(e.bondedTokens):t.bondedTokens="",t},toJSON:function(e){var t={};return void 0!==e.notBondedTokens&&(t.notBondedTokens=e.notBondedTokens),void 0!==e.bondedTokens&&(t.bondedTokens=e.bondedTokens),t},fromPartial:function(e){var t=Object.assign({},B);return void 0!==e.notBondedTokens&&null!==e.notBondedTokens?t.notBondedTokens=e.notBondedTokens:t.notBondedTokens="",void 0!==e.bondedTokens&&null!==e.bondedTokens?t.bondedTokens=e.bondedTokens:t.bondedTokens="",t}},s.default.util.Long!==i.default&&(s.default.util.Long=i.default,s.default.configure())},36835:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgUndelegateDesc=t.MsgBeginRedelegateDesc=t.MsgDelegateDesc=t.MsgEditValidatorDesc=t.MsgCreateValidatorDesc=t.MsgDesc=t.MsgClientImpl=t.MsgUndelegateResponse=t.MsgUndelegate=t.MsgBeginRedelegateResponse=t.MsgBeginRedelegate=t.MsgDelegateResponse=t.MsgDelegate=t.MsgEditValidatorResponse=t.MsgEditValidator=t.MsgCreateValidatorResponse=t.MsgCreateValidator=t.protobufPackage=void 0;var i=r(n(29600)),s=n(93704),c=r(n(80121)),u=n(56189),d=n(85920),l=n(39705),f=n(82576),p=n(47478);t.protobufPackage="cosmos.staking.v1beta1";var b={minSelfDelegation:"",delegatorAddress:"",validatorAddress:""};t.MsgCreateValidator={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.description&&u.Description.encode(e.description,t.uint32(10).fork()).ldelim(),void 0!==e.commission&&u.CommissionRates.encode(e.commission,t.uint32(18).fork()).ldelim(),""!==e.minSelfDelegation&&t.uint32(26).string(e.minSelfDelegation),""!==e.delegatorAddress&&t.uint32(34).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(42).string(e.validatorAddress),void 0!==e.pubkey&&d.Any.encode(e.pubkey,t.uint32(50).fork()).ldelim(),void 0!==e.value&&l.Coin.encode(e.value,t.uint32(58).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3){case 1:o.description=u.Description.decode(n,n.uint32());break;case 2:o.commission=u.CommissionRates.decode(n,n.uint32());break;case 3:o.minSelfDelegation=n.string();break;case 4:o.delegatorAddress=n.string();break;case 5:o.validatorAddress=n.string();break;case 6:o.pubkey=d.Any.decode(n,n.uint32());break;case 7:o.value=l.Coin.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.description&&null!==e.description?t.description=u.Description.fromJSON(e.description):t.description=void 0,void 0!==e.commission&&null!==e.commission?t.commission=u.CommissionRates.fromJSON(e.commission):t.commission=void 0,void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?t.minSelfDelegation=String(e.minSelfDelegation):t.minSelfDelegation="",void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=String(e.delegatorAddress):t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=String(e.validatorAddress):t.validatorAddress="",void 0!==e.pubkey&&null!==e.pubkey?t.pubkey=d.Any.fromJSON(e.pubkey):t.pubkey=void 0,void 0!==e.value&&null!==e.value?t.value=l.Coin.fromJSON(e.value):t.value=void 0,t},toJSON:function(e){var t={};return void 0!==e.description&&(t.description=e.description?u.Description.toJSON(e.description):void 0),void 0!==e.commission&&(t.commission=e.commission?u.CommissionRates.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.pubkey&&(t.pubkey=e.pubkey?d.Any.toJSON(e.pubkey):void 0),void 0!==e.value&&(t.value=e.value?l.Coin.toJSON(e.value):void 0),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.description&&null!==e.description?t.description=u.Description.fromPartial(e.description):t.description=void 0,void 0!==e.commission&&null!==e.commission?t.commission=u.CommissionRates.fromPartial(e.commission):t.commission=void 0,void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?t.minSelfDelegation=e.minSelfDelegation:t.minSelfDelegation="",void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=e.delegatorAddress:t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress="",void 0!==e.pubkey&&null!==e.pubkey?t.pubkey=d.Any.fromPartial(e.pubkey):t.pubkey=void 0,void 0!==e.value&&null!==e.value?t.value=l.Coin.fromPartial(e.value):t.value=void 0,t}};var m={};t.MsgCreateValidatorResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.description&&u.Description.encode(e.description,t.uint32(10).fork()).ldelim(),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.commissionRate&&t.uint32(26).string(e.commissionRate),""!==e.minSelfDelegation&&t.uint32(34).string(e.minSelfDelegation),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);n.pos>>3){case 1:o.description=u.Description.decode(n,n.uint32());break;case 2:o.validatorAddress=n.string();break;case 3:o.commissionRate=n.string();break;case 4:o.minSelfDelegation=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);return void 0!==e.description&&null!==e.description?t.description=u.Description.fromJSON(e.description):t.description=void 0,void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=String(e.validatorAddress):t.validatorAddress="",void 0!==e.commissionRate&&null!==e.commissionRate?t.commissionRate=String(e.commissionRate):t.commissionRate="",void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?t.minSelfDelegation=String(e.minSelfDelegation):t.minSelfDelegation="",t},toJSON:function(e){var t={};return void 0!==e.description&&(t.description=e.description?u.Description.toJSON(e.description):void 0),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.commissionRate&&(t.commissionRate=e.commissionRate),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),t},fromPartial:function(e){var t=Object.assign({},h);return void 0!==e.description&&null!==e.description?t.description=u.Description.fromPartial(e.description):t.description=void 0,void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress="",void 0!==e.commissionRate&&null!==e.commissionRate?t.commissionRate=e.commissionRate:t.commissionRate="",void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?t.minSelfDelegation=e.minSelfDelegation:t.minSelfDelegation="",t}};var g={};t.MsgEditValidatorResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&l.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;case 3:o.amount=l.Coin.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=String(e.delegatorAddress):t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=String(e.validatorAddress):t.validatorAddress="",void 0!==e.amount&&null!==e.amount?t.amount=l.Coin.fromJSON(e.amount):t.amount=void 0,t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?l.Coin.toJSON(e.amount):void 0),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=e.delegatorAddress:t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress="",void 0!==e.amount&&null!==e.amount?t.amount=l.Coin.fromPartial(e.amount):t.amount=void 0,t}};var v={};t.MsgDelegateResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),void 0!==e.amount&&l.Coin.encode(e.amount,t.uint32(34).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorSrcAddress=n.string();break;case 3:o.validatorDstAddress=n.string();break;case 4:o.amount=l.Coin.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},w);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=String(e.delegatorAddress):t.delegatorAddress="",void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?t.validatorSrcAddress=String(e.validatorSrcAddress):t.validatorSrcAddress="",void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?t.validatorDstAddress=String(e.validatorDstAddress):t.validatorDstAddress="",void 0!==e.amount&&null!==e.amount?t.amount=l.Coin.fromJSON(e.amount):t.amount=void 0,t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),void 0!==e.amount&&(t.amount=e.amount?l.Coin.toJSON(e.amount):void 0),t},fromPartial:function(e){var t=Object.assign({},w);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=e.delegatorAddress:t.delegatorAddress="",void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?t.validatorSrcAddress=e.validatorSrcAddress:t.validatorSrcAddress="",void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?t.validatorDstAddress=e.validatorDstAddress:t.validatorDstAddress="",void 0!==e.amount&&null!==e.amount?t.amount=l.Coin.fromPartial(e.amount):t.amount=void 0,t}};var k={};t.MsgBeginRedelegateResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.completionTime&&p.Timestamp.encode(S(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);n.pos>>3===1)o.completionTime=C(p.Timestamp.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},k);return void 0!==e.completionTime&&null!==e.completionTime?t.completionTime=E(e.completionTime):t.completionTime=void 0,t},toJSON:function(e){var t={};return void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial:function(e){var t=Object.assign({},k);return void 0!==e.completionTime&&null!==e.completionTime?t.completionTime=e.completionTime:t.completionTime=void 0,t}};var A={delegatorAddress:"",validatorAddress:""};t.MsgUndelegate={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&l.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},A);n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;case 3:o.amount=l.Coin.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},A);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=String(e.delegatorAddress):t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=String(e.validatorAddress):t.validatorAddress="",void 0!==e.amount&&null!==e.amount?t.amount=l.Coin.fromJSON(e.amount):t.amount=void 0,t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?l.Coin.toJSON(e.amount):void 0),t},fromPartial:function(e){var t=Object.assign({},A);return void 0!==e.delegatorAddress&&null!==e.delegatorAddress?t.delegatorAddress=e.delegatorAddress:t.delegatorAddress="",void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress="",void 0!==e.amount&&null!==e.amount?t.amount=l.Coin.fromPartial(e.amount):t.amount=void 0,t}};var x={};t.MsgUndelegateResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.completionTime&&p.Timestamp.encode(S(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},x);n.pos>>3===1)o.completionTime=C(p.Timestamp.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},x);return void 0!==e.completionTime&&null!==e.completionTime?t.completionTime=E(e.completionTime):t.completionTime=void 0,t},toJSON:function(e){var t={};return void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial:function(e){var t=Object.assign({},x);return void 0!==e.completionTime&&null!==e.completionTime?t.completionTime=e.completionTime:t.completionTime=void 0,t}};var I=function(){function e(t){a(this,e),this.rpc=t,this.CreateValidator=this.CreateValidator.bind(this),this.EditValidator=this.EditValidator.bind(this),this.Delegate=this.Delegate.bind(this),this.BeginRedelegate=this.BeginRedelegate.bind(this),this.Undelegate=this.Undelegate.bind(this)}return o(e,[{key:"CreateValidator",value:function(e,n){return this.rpc.unary(t.MsgCreateValidatorDesc,t.MsgCreateValidator.fromPartial(e),n)}},{key:"EditValidator",value:function(e,n){return this.rpc.unary(t.MsgEditValidatorDesc,t.MsgEditValidator.fromPartial(e),n)}},{key:"Delegate",value:function(e,n){return this.rpc.unary(t.MsgDelegateDesc,t.MsgDelegate.fromPartial(e),n)}},{key:"BeginRedelegate",value:function(e,n){return this.rpc.unary(t.MsgBeginRedelegateDesc,t.MsgBeginRedelegate.fromPartial(e),n)}},{key:"Undelegate",value:function(e,n){return this.rpc.unary(t.MsgUndelegateDesc,t.MsgUndelegate.fromPartial(e),n)}}]),e}();t.MsgClientImpl=I,t.MsgDesc={serviceName:"cosmos.staking.v1beta1.Msg"},t.MsgCreateValidatorDesc={methodName:"CreateValidator",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgCreateValidator.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgCreateValidatorResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgEditValidatorDesc={methodName:"EditValidator",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgEditValidator.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgEditValidatorResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgDelegateDesc={methodName:"Delegate",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgDelegate.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgDelegateResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgBeginRedelegateDesc={methodName:"BeginRedelegate",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgBeginRedelegate.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgBeginRedelegateResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgUndelegateDesc={methodName:"Undelegate",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgUndelegate.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgUndelegateResponse.decode(e)),{toObject:function(){return this}})}}};var T=function(){function e(t,n){a(this,e),this.host=t,this.options=n}return o(e,[{key:"unary",value:function(e,t,n){var a,o=this,r=Object.assign(Object.assign({},t),e.requestType),i=n&&this.options.metadata?new f.BrowserHeaders(Object.assign(Object.assign({},null===(a=this.options)||void 0===a?void 0:a.metadata.headersMap),null===n||void 0===n?void 0:n.headersMap)):n||this.options.metadata;return new Promise((function(t,n){s.grpc.unary(e,{request:r,host:o.host,metadata:i,transport:o.options.transport,debug:o.options.debug,onEnd:function(e){if(e.status===s.grpc.Code.OK)t(e.message);else{var a=new Error(e.statusMessage);a.code=e.status,a.metadata=e.trailers,n(a)}}})}))}}]),e}();function S(e){var t;return{seconds:(t=e.getTime()/1e3,i.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function C(e){var t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function E(e){return e instanceof Date?e:"string"===typeof e?new Date(e):C(p.Timestamp.fromJSON(e))}t.GrpcWebImpl=T,c.default.util.Long!==i.default&&(c.default.util.Long=i.default,c.default.configure())},15944:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureDescriptor_Data_Multi=t.SignatureDescriptor_Data_Single=t.SignatureDescriptor_Data=t.SignatureDescriptor=t.SignatureDescriptors=t.signModeToJSON=t.signModeFromJSON=t.SignMode=t.protobufPackage=void 0;var r,i=o(n(29600)),s=o(n(80121)),c=n(85920),u=n(51107);function d(e){switch(e){case 0:case"SIGN_MODE_UNSPECIFIED":return r.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return r.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return r.SIGN_MODE_TEXTUAL;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return r.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case"SIGN_MODE_EIP_191":return r.SIGN_MODE_EIP_191;default:return r.UNRECOGNIZED}}function l(e){switch(e){case r.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case r.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case r.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case r.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";case r.SIGN_MODE_EIP_191:return"SIGN_MODE_EIP_191";default:return"UNKNOWN"}}t.protobufPackage="cosmos.tx.signing.v1beta1",function(e){e[e.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",e[e.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",e[e.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",e[e.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(r=t.SignMode||(t.SignMode={})),t.signModeFromJSON=d,t.signModeToJSON=l;var f={};t.SignatureDescriptors={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),r=a(e.signatures);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.SignatureDescriptor.encode(i,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return o},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},f);for(r.signatures=[];a.pos>>3===1)r.signatures.push(t.SignatureDescriptor.decode(a,a.uint32()));else a.skipType(7&i)}return r},fromJSON:function(e){var n=Object.assign({},f);if(n.signatures=[],void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.SignatureDescriptor.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return e.signatures?n.signatures=e.signatures.map((function(e){return e?t.SignatureDescriptor.toJSON(e):void 0})):n.signatures=[],n},fromPartial:function(e){var n=Object.assign({},f);if(n.signatures=[],void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.SignatureDescriptor.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var p={sequence:i.default.UZERO};t.SignatureDescriptor={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.publicKey&&c.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.data&&t.SignatureDescriptor_Data.encode(e.data,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n},decode:function(e,n){for(var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},p);a.pos>>3){case 1:r.publicKey=c.Any.decode(a,a.uint32());break;case 2:r.data=t.SignatureDescriptor_Data.decode(a,a.uint32());break;case 3:r.sequence=a.uint64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},p);return void 0!==e.publicKey&&null!==e.publicKey?n.publicKey=c.Any.fromJSON(e.publicKey):n.publicKey=void 0,void 0!==e.data&&null!==e.data?n.data=t.SignatureDescriptor_Data.fromJSON(e.data):n.data=void 0,void 0!==e.sequence&&null!==e.sequence?n.sequence=i.default.fromString(e.sequence):n.sequence=i.default.UZERO,n},toJSON:function(e){var n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?c.Any.toJSON(e.publicKey):void 0),void 0!==e.data&&(n.data=e.data?t.SignatureDescriptor_Data.toJSON(e.data):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||i.default.UZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},p);return void 0!==e.publicKey&&null!==e.publicKey?n.publicKey=c.Any.fromPartial(e.publicKey):n.publicKey=void 0,void 0!==e.data&&null!==e.data?n.data=t.SignatureDescriptor_Data.fromPartial(e.data):n.data=void 0,void 0!==e.sequence&&null!==e.sequence?n.sequence=e.sequence:n.sequence=i.default.UZERO,n}};var b={};t.SignatureDescriptor_Data={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.single&&t.SignatureDescriptor_Data_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.SignatureDescriptor_Data_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},b);a.pos>>3){case 1:r.single=t.SignatureDescriptor_Data_Single.decode(a,a.uint32());break;case 2:r.multi=t.SignatureDescriptor_Data_Multi.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},b);return void 0!==e.single&&null!==e.single?n.single=t.SignatureDescriptor_Data_Single.fromJSON(e.single):n.single=void 0,void 0!==e.multi&&null!==e.multi?n.multi=t.SignatureDescriptor_Data_Multi.fromJSON(e.multi):n.multi=void 0,n},toJSON:function(e){var n={};return void 0!==e.single&&(n.single=e.single?t.SignatureDescriptor_Data_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.SignatureDescriptor_Data_Multi.toJSON(e.multi):void 0),n},fromPartial:function(e){var n=Object.assign({},b);return void 0!==e.single&&null!==e.single?n.single=t.SignatureDescriptor_Data_Single.fromPartial(e.single):n.single=void 0,void 0!==e.multi&&null!==e.multi?n.multi=t.SignatureDescriptor_Data_Multi.fromPartial(e.multi):n.multi=void 0,n}};var m={mode:0};t.SignatureDescriptor_Data_Single={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),0!==e.signature.length&&t.uint32(18).bytes(e.signature),t},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);for(o.signature=new Uint8Array;n.pos>>3){case 1:o.mode=n.int32();break;case 2:o.signature=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},m);return t.signature=new Uint8Array,void 0!==e.mode&&null!==e.mode?t.mode=d(e.mode):t.mode=0,void 0!==e.signature&&null!==e.signature&&(t.signature=function(e){for(var t=y(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();void 0!==e.bitarray&&u.CompactBitArray.encode(e.bitarray,n.uint32(10).fork()).ldelim();var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.SignatureDescriptor_Data.encode(i,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},h);for(r.signatures=[];a.pos>>3){case 1:r.bitarray=u.CompactBitArray.decode(a,a.uint32());break;case 2:r.signatures.push(t.SignatureDescriptor_Data.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},h);if(n.signatures=[],void 0!==e.bitarray&&null!==e.bitarray?n.bitarray=u.CompactBitArray.fromJSON(e.bitarray):n.bitarray=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.SignatureDescriptor_Data.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?u.CompactBitArray.toJSON(e.bitarray):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return e?t.SignatureDescriptor_Data.toJSON(e):void 0})):n.signatures=[],n},fromPartial:function(e){var n=Object.assign({},h);if(n.signatures=[],void 0!==e.bitarray&&null!==e.bitarray?n.bitarray=u.CompactBitArray.fromPartial(e.bitarray):n.bitarray=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.SignatureDescriptor_Data.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var g=function(){if("undefined"!==typeof g)return g;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),y=g.atob||function(e){return g.Buffer.from(e,"base64").toString("binary")};var v=g.btoa||function(e){return g.Buffer.from(e,"binary").toString("base64")};s.default.util.Long!==i.default&&(s.default.util.Long=i.default,s.default.configure())},46933:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.ServiceGetBlockWithTxsDesc=t.ServiceGetTxsEventDesc=t.ServiceBroadcastTxDesc=t.ServiceGetTxDesc=t.ServiceSimulateDesc=t.ServiceDesc=t.ServiceClientImpl=t.GetBlockWithTxsResponse=t.GetBlockWithTxsRequest=t.GetTxResponse=t.GetTxRequest=t.SimulateResponse=t.SimulateRequest=t.BroadcastTxResponse=t.BroadcastTxRequest=t.GetTxsEventResponse=t.GetTxsEventRequest=t.broadcastModeToJSON=t.broadcastModeFromJSON=t.BroadcastMode=t.orderByToJSON=t.orderByFromJSON=t.OrderBy=t.protobufPackage=void 0;var s,c,u=i(n(29600)),d=n(93704),l=i(n(80121)),f=n(31613),p=n(55226),b=n(28824),m=n(78750),h=n(73925),g=n(82576);function y(e){switch(e){case 0:case"ORDER_BY_UNSPECIFIED":return s.ORDER_BY_UNSPECIFIED;case 1:case"ORDER_BY_ASC":return s.ORDER_BY_ASC;case 2:case"ORDER_BY_DESC":return s.ORDER_BY_DESC;default:return s.UNRECOGNIZED}}function v(e){switch(e){case s.ORDER_BY_UNSPECIFIED:return"ORDER_BY_UNSPECIFIED";case s.ORDER_BY_ASC:return"ORDER_BY_ASC";case s.ORDER_BY_DESC:return"ORDER_BY_DESC";default:return"UNKNOWN"}}function w(e){switch(e){case 0:case"BROADCAST_MODE_UNSPECIFIED":return c.BROADCAST_MODE_UNSPECIFIED;case 1:case"BROADCAST_MODE_BLOCK":return c.BROADCAST_MODE_BLOCK;case 2:case"BROADCAST_MODE_SYNC":return c.BROADCAST_MODE_SYNC;case 3:case"BROADCAST_MODE_ASYNC":return c.BROADCAST_MODE_ASYNC;default:return c.UNRECOGNIZED}}function k(e){switch(e){case c.BROADCAST_MODE_UNSPECIFIED:return"BROADCAST_MODE_UNSPECIFIED";case c.BROADCAST_MODE_BLOCK:return"BROADCAST_MODE_BLOCK";case c.BROADCAST_MODE_SYNC:return"BROADCAST_MODE_SYNC";case c.BROADCAST_MODE_ASYNC:return"BROADCAST_MODE_ASYNC";default:return"UNKNOWN"}}t.protobufPackage="cosmos.tx.v1beta1",function(e){e[e.ORDER_BY_UNSPECIFIED=0]="ORDER_BY_UNSPECIFIED",e[e.ORDER_BY_ASC=1]="ORDER_BY_ASC",e[e.ORDER_BY_DESC=2]="ORDER_BY_DESC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(s=t.OrderBy||(t.OrderBy={})),t.orderByFromJSON=y,t.orderByToJSON=v,function(e){e[e.BROADCAST_MODE_UNSPECIFIED=0]="BROADCAST_MODE_UNSPECIFIED",e[e.BROADCAST_MODE_BLOCK=1]="BROADCAST_MODE_BLOCK",e[e.BROADCAST_MODE_SYNC=2]="BROADCAST_MODE_SYNC",e[e.BROADCAST_MODE_ASYNC=3]="BROADCAST_MODE_ASYNC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(c=t.BroadcastMode||(t.BroadcastMode={})),t.broadcastModeFromJSON=w,t.broadcastModeToJSON=k;var A={events:"",orderBy:0};t.GetTxsEventRequest={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.Writer.create(),a=r(e.events);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(i){a.e(i)}finally{a.f()}return void 0!==e.pagination&&f.PageRequest.encode(e.pagination,n.uint32(18).fork()).ldelim(),0!==e.orderBy&&n.uint32(24).int32(e.orderBy),n},decode:function(e,t){var n=e instanceof l.default.Reader?e:new l.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},A);for(o.events=[];n.pos>>3){case 1:o.events.push(n.string());break;case 2:o.pagination=f.PageRequest.decode(n,n.uint32());break;case 3:o.orderBy=n.int32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},A);if(t.events=[],void 0!==e.events&&null!==e.events){var n,a=r(e.events);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.events.push(String(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.pagination&&null!==e.pagination?t.pagination=f.PageRequest.fromJSON(e.pagination):t.pagination=void 0,void 0!==e.orderBy&&null!==e.orderBy?t.orderBy=y(e.orderBy):t.orderBy=0,t},toJSON:function(e){var t={};return e.events?t.events=e.events.map((function(e){return e})):t.events=[],void 0!==e.pagination&&(t.pagination=e.pagination?f.PageRequest.toJSON(e.pagination):void 0),void 0!==e.orderBy&&(t.orderBy=v(e.orderBy)),t},fromPartial:function(e){var t=Object.assign({},A);if(t.events=[],void 0!==e.events&&null!==e.events){var n,a=r(e.events);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.events.push(o)}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.pagination&&null!==e.pagination?t.pagination=f.PageRequest.fromPartial(e.pagination):t.pagination=void 0,void 0!==e.orderBy&&null!==e.orderBy?t.orderBy=e.orderBy:t.orderBy=0,t}};var x={};t.GetTxsEventResponse={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.Writer.create(),a=r(e.txs);try{for(a.s();!(t=a.n()).done;){var o=t.value;b.Tx.encode(o,n.uint32(10).fork()).ldelim()}}catch(u){a.e(u)}finally{a.f()}var i,s=r(e.txResponses);try{for(s.s();!(i=s.n()).done;){var c=i.value;p.TxResponse.encode(c,n.uint32(18).fork()).ldelim()}}catch(u){s.e(u)}finally{s.f()}return void 0!==e.pagination&&f.PageResponse.encode(e.pagination,n.uint32(26).fork()).ldelim(),n},decode:function(e,t){var n=e instanceof l.default.Reader?e:new l.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},x);for(o.txs=[],o.txResponses=[];n.pos>>3){case 1:o.txs.push(b.Tx.decode(n,n.uint32()));break;case 2:o.txResponses.push(p.TxResponse.decode(n,n.uint32()));break;case 3:o.pagination=f.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},x);if(t.txs=[],t.txResponses=[],void 0!==e.txs&&null!==e.txs){var n,a=r(e.txs);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.txs.push(b.Tx.fromJSON(o))}}catch(u){a.e(u)}finally{a.f()}}if(void 0!==e.txResponses&&null!==e.txResponses){var i,s=r(e.txResponses);try{for(s.s();!(i=s.n()).done;){var c=i.value;t.txResponses.push(p.TxResponse.fromJSON(c))}}catch(u){s.e(u)}finally{s.f()}}return void 0!==e.pagination&&null!==e.pagination?t.pagination=f.PageResponse.fromJSON(e.pagination):t.pagination=void 0,t},toJSON:function(e){var t={};return e.txs?t.txs=e.txs.map((function(e){return e?b.Tx.toJSON(e):void 0})):t.txs=[],e.txResponses?t.txResponses=e.txResponses.map((function(e){return e?p.TxResponse.toJSON(e):void 0})):t.txResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?f.PageResponse.toJSON(e.pagination):void 0),t},fromPartial:function(e){var t=Object.assign({},x);if(t.txs=[],t.txResponses=[],void 0!==e.txs&&null!==e.txs){var n,a=r(e.txs);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.txs.push(b.Tx.fromPartial(o))}}catch(u){a.e(u)}finally{a.f()}}if(void 0!==e.txResponses&&null!==e.txResponses){var i,s=r(e.txResponses);try{for(s.s();!(i=s.n()).done;){var c=i.value;t.txResponses.push(p.TxResponse.fromPartial(c))}}catch(u){s.e(u)}finally{s.f()}}return void 0!==e.pagination&&null!==e.pagination?t.pagination=f.PageResponse.fromPartial(e.pagination):t.pagination=void 0,t}};var I={mode:0};t.BroadcastTxRequest={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.Writer.create();return 0!==e.txBytes.length&&t.uint32(10).bytes(e.txBytes),0!==e.mode&&t.uint32(16).int32(e.mode),t},decode:function(e,t){var n=e instanceof l.default.Reader?e:new l.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},I);for(o.txBytes=new Uint8Array;n.pos>>3){case 1:o.txBytes=n.bytes();break;case 2:o.mode=n.int32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},I);return t.txBytes=new Uint8Array,void 0!==e.txBytes&&null!==e.txBytes&&(t.txBytes=N(e.txBytes)),void 0!==e.mode&&null!==e.mode?t.mode=w(e.mode):t.mode=0,t},toJSON:function(e){var t={};return void 0!==e.txBytes&&(t.txBytes=F(void 0!==e.txBytes?e.txBytes:new Uint8Array)),void 0!==e.mode&&(t.mode=k(e.mode)),t},fromPartial:function(e){var t=Object.assign({},I);return void 0!==e.txBytes&&null!==e.txBytes?t.txBytes=e.txBytes:t.txBytes=new Uint8Array,void 0!==e.mode&&null!==e.mode?t.mode=e.mode:t.mode=0,t}};var T={};t.BroadcastTxResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.Writer.create();return void 0!==e.txResponse&&p.TxResponse.encode(e.txResponse,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof l.default.Reader?e:new l.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},T);n.pos>>3===1)o.txResponse=p.TxResponse.decode(n,n.uint32());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},T);return void 0!==e.txResponse&&null!==e.txResponse?t.txResponse=p.TxResponse.fromJSON(e.txResponse):t.txResponse=void 0,t},toJSON:function(e){var t={};return void 0!==e.txResponse&&(t.txResponse=e.txResponse?p.TxResponse.toJSON(e.txResponse):void 0),t},fromPartial:function(e){var t=Object.assign({},T);return void 0!==e.txResponse&&null!==e.txResponse?t.txResponse=p.TxResponse.fromPartial(e.txResponse):t.txResponse=void 0,t}};var S={};t.SimulateRequest={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.Writer.create();return void 0!==e.tx&&b.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),0!==e.txBytes.length&&t.uint32(18).bytes(e.txBytes),t},decode:function(e,t){var n=e instanceof l.default.Reader?e:new l.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},S);for(o.txBytes=new Uint8Array;n.pos>>3){case 1:o.tx=b.Tx.decode(n,n.uint32());break;case 2:o.txBytes=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},S);return t.txBytes=new Uint8Array,void 0!==e.tx&&null!==e.tx?t.tx=b.Tx.fromJSON(e.tx):t.tx=void 0,void 0!==e.txBytes&&null!==e.txBytes&&(t.txBytes=N(e.txBytes)),t},toJSON:function(e){var t={};return void 0!==e.tx&&(t.tx=e.tx?b.Tx.toJSON(e.tx):void 0),void 0!==e.txBytes&&(t.txBytes=F(void 0!==e.txBytes?e.txBytes:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},S);return void 0!==e.tx&&null!==e.tx?t.tx=b.Tx.fromPartial(e.tx):t.tx=void 0,void 0!==e.txBytes&&null!==e.txBytes?t.txBytes=e.txBytes:t.txBytes=new Uint8Array,t}};var C={};t.SimulateResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.Writer.create();return void 0!==e.gasInfo&&p.GasInfo.encode(e.gasInfo,t.uint32(10).fork()).ldelim(),void 0!==e.result&&p.Result.encode(e.result,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof l.default.Reader?e:new l.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},C);n.pos>>3){case 1:o.gasInfo=p.GasInfo.decode(n,n.uint32());break;case 2:o.result=p.Result.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},C);return void 0!==e.gasInfo&&null!==e.gasInfo?t.gasInfo=p.GasInfo.fromJSON(e.gasInfo):t.gasInfo=void 0,void 0!==e.result&&null!==e.result?t.result=p.Result.fromJSON(e.result):t.result=void 0,t},toJSON:function(e){var t={};return void 0!==e.gasInfo&&(t.gasInfo=e.gasInfo?p.GasInfo.toJSON(e.gasInfo):void 0),void 0!==e.result&&(t.result=e.result?p.Result.toJSON(e.result):void 0),t},fromPartial:function(e){var t=Object.assign({},C);return void 0!==e.gasInfo&&null!==e.gasInfo?t.gasInfo=p.GasInfo.fromPartial(e.gasInfo):t.gasInfo=void 0,void 0!==e.result&&null!==e.result?t.result=p.Result.fromPartial(e.result):t.result=void 0,t}};var E={hash:""};t.GetTxRequest={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.Writer.create();return""!==e.hash&&t.uint32(10).string(e.hash),t},decode:function(e,t){for(var n=e instanceof l.default.Reader?e:new l.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},E);n.pos>>3===1)o.hash=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},E);return void 0!==e.hash&&null!==e.hash?t.hash=String(e.hash):t.hash="",t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=e.hash),t},fromPartial:function(e){var t=Object.assign({},E);return void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash="",t}};var R={};t.GetTxResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.Writer.create();return void 0!==e.tx&&b.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),void 0!==e.txResponse&&p.TxResponse.encode(e.txResponse,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof l.default.Reader?e:new l.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},R);n.pos>>3){case 1:o.tx=b.Tx.decode(n,n.uint32());break;case 2:o.txResponse=p.TxResponse.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},R);return void 0!==e.tx&&null!==e.tx?t.tx=b.Tx.fromJSON(e.tx):t.tx=void 0,void 0!==e.txResponse&&null!==e.txResponse?t.txResponse=p.TxResponse.fromJSON(e.txResponse):t.txResponse=void 0,t},toJSON:function(e){var t={};return void 0!==e.tx&&(t.tx=e.tx?b.Tx.toJSON(e.tx):void 0),void 0!==e.txResponse&&(t.txResponse=e.txResponse?p.TxResponse.toJSON(e.txResponse):void 0),t},fromPartial:function(e){var t=Object.assign({},R);return void 0!==e.tx&&null!==e.tx?t.tx=b.Tx.fromPartial(e.tx):t.tx=void 0,void 0!==e.txResponse&&null!==e.txResponse?t.txResponse=p.TxResponse.fromPartial(e.txResponse):t.txResponse=void 0,t}};var M={height:u.default.ZERO};t.GetBlockWithTxsRequest={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.Writer.create();return e.height.isZero()||t.uint32(8).int64(e.height),void 0!==e.pagination&&f.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof l.default.Reader?e:new l.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},M);n.pos>>3){case 1:o.height=n.int64();break;case 2:o.pagination=f.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},M);return void 0!==e.height&&null!==e.height?t.height=u.default.fromString(e.height):t.height=u.default.ZERO,void 0!==e.pagination&&null!==e.pagination?t.pagination=f.PageRequest.fromJSON(e.pagination):t.pagination=void 0,t},toJSON:function(e){var t={};return void 0!==e.height&&(t.height=(e.height||u.default.ZERO).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?f.PageRequest.toJSON(e.pagination):void 0),t},fromPartial:function(e){var t=Object.assign({},M);return void 0!==e.height&&null!==e.height?t.height=e.height:t.height=u.default.ZERO,void 0!==e.pagination&&null!==e.pagination?t.pagination=f.PageRequest.fromPartial(e.pagination):t.pagination=void 0,t}};var P={};t.GetBlockWithTxsResponse={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.Writer.create(),a=r(e.txs);try{for(a.s();!(t=a.n()).done;){var o=t.value;b.Tx.encode(o,n.uint32(10).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return void 0!==e.blockId&&m.BlockID.encode(e.blockId,n.uint32(18).fork()).ldelim(),void 0!==e.block&&h.Block.encode(e.block,n.uint32(26).fork()).ldelim(),void 0!==e.pagination&&f.PageResponse.encode(e.pagination,n.uint32(34).fork()).ldelim(),n},decode:function(e,t){var n=e instanceof l.default.Reader?e:new l.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},P);for(o.txs=[];n.pos>>3){case 1:o.txs.push(b.Tx.decode(n,n.uint32()));break;case 2:o.blockId=m.BlockID.decode(n,n.uint32());break;case 3:o.block=h.Block.decode(n,n.uint32());break;case 4:o.pagination=f.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},P);if(t.txs=[],void 0!==e.txs&&null!==e.txs){var n,a=r(e.txs);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.txs.push(b.Tx.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.blockId&&null!==e.blockId?t.blockId=m.BlockID.fromJSON(e.blockId):t.blockId=void 0,void 0!==e.block&&null!==e.block?t.block=h.Block.fromJSON(e.block):t.block=void 0,void 0!==e.pagination&&null!==e.pagination?t.pagination=f.PageResponse.fromJSON(e.pagination):t.pagination=void 0,t},toJSON:function(e){var t={};return e.txs?t.txs=e.txs.map((function(e){return e?b.Tx.toJSON(e):void 0})):t.txs=[],void 0!==e.blockId&&(t.blockId=e.blockId?m.BlockID.toJSON(e.blockId):void 0),void 0!==e.block&&(t.block=e.block?h.Block.toJSON(e.block):void 0),void 0!==e.pagination&&(t.pagination=e.pagination?f.PageResponse.toJSON(e.pagination):void 0),t},fromPartial:function(e){var t=Object.assign({},P);if(t.txs=[],void 0!==e.txs&&null!==e.txs){var n,a=r(e.txs);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.txs.push(b.Tx.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.blockId&&null!==e.blockId?t.blockId=m.BlockID.fromPartial(e.blockId):t.blockId=void 0,void 0!==e.block&&null!==e.block?t.block=h.Block.fromPartial(e.block):t.block=void 0,void 0!==e.pagination&&null!==e.pagination?t.pagination=f.PageResponse.fromPartial(e.pagination):t.pagination=void 0,t}};var U=function(){function e(t){a(this,e),this.rpc=t,this.Simulate=this.Simulate.bind(this),this.GetTx=this.GetTx.bind(this),this.BroadcastTx=this.BroadcastTx.bind(this),this.GetTxsEvent=this.GetTxsEvent.bind(this),this.GetBlockWithTxs=this.GetBlockWithTxs.bind(this)}return o(e,[{key:"Simulate",value:function(e,n){return this.rpc.unary(t.ServiceSimulateDesc,t.SimulateRequest.fromPartial(e),n)}},{key:"GetTx",value:function(e,n){return this.rpc.unary(t.ServiceGetTxDesc,t.GetTxRequest.fromPartial(e),n)}},{key:"BroadcastTx",value:function(e,n){return this.rpc.unary(t.ServiceBroadcastTxDesc,t.BroadcastTxRequest.fromPartial(e),n)}},{key:"GetTxsEvent",value:function(e,n){return this.rpc.unary(t.ServiceGetTxsEventDesc,t.GetTxsEventRequest.fromPartial(e),n)}},{key:"GetBlockWithTxs",value:function(e,n){return this.rpc.unary(t.ServiceGetBlockWithTxsDesc,t.GetBlockWithTxsRequest.fromPartial(e),n)}}]),e}();t.ServiceClientImpl=U,t.ServiceDesc={serviceName:"cosmos.tx.v1beta1.Service"},t.ServiceSimulateDesc={methodName:"Simulate",service:t.ServiceDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.SimulateRequest.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.SimulateResponse.decode(e)),{toObject:function(){return this}})}}},t.ServiceGetTxDesc={methodName:"GetTx",service:t.ServiceDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.GetTxRequest.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.GetTxResponse.decode(e)),{toObject:function(){return this}})}}},t.ServiceBroadcastTxDesc={methodName:"BroadcastTx",service:t.ServiceDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.BroadcastTxRequest.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.BroadcastTxResponse.decode(e)),{toObject:function(){return this}})}}},t.ServiceGetTxsEventDesc={methodName:"GetTxsEvent",service:t.ServiceDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.GetTxsEventRequest.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.GetTxsEventResponse.decode(e)),{toObject:function(){return this}})}}},t.ServiceGetBlockWithTxsDesc={methodName:"GetBlockWithTxs",service:t.ServiceDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.GetBlockWithTxsRequest.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.GetBlockWithTxsResponse.decode(e)),{toObject:function(){return this}})}}};var _=function(){function e(t,n){a(this,e),this.host=t,this.options=n}return o(e,[{key:"unary",value:function(e,t,n){var a,o=this,r=Object.assign(Object.assign({},t),e.requestType),i=n&&this.options.metadata?new g.BrowserHeaders(Object.assign(Object.assign({},null===(a=this.options)||void 0===a?void 0:a.metadata.headersMap),null===n||void 0===n?void 0:n.headersMap)):n||this.options.metadata;return new Promise((function(t,n){d.grpc.unary(e,{request:r,host:o.host,metadata:i,transport:o.options.transport,debug:o.options.debug,onEnd:function(e){if(e.status===d.grpc.Code.OK)t(e.message);else{var a=new Error(e.statusMessage);a.code=e.status,a.metadata=e.trailers,n(a)}}})}))}}]),e}();t.GrpcWebImpl=_;var B=function(){if("undefined"!==typeof B)return B;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),D=B.atob||function(e){return B.Buffer.from(e,"base64").toString("binary")};function N(e){for(var t=D(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.body&&t.TxBody.encode(e.body,n.uint32(10).fork()).ldelim(),void 0!==e.authInfo&&t.AuthInfo.encode(e.authInfo,n.uint32(18).fork()).ldelim();var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var s=o.value;n.uint32(26).bytes(s)}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},l);for(r.signatures=[];a.pos>>3){case 1:r.body=t.TxBody.decode(a,a.uint32());break;case 2:r.authInfo=t.AuthInfo.decode(a,a.uint32());break;case 3:r.signatures.push(a.bytes());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},l);if(n.signatures=[],void 0!==e.body&&null!==e.body?n.body=t.TxBody.fromJSON(e.body):n.body=void 0,void 0!==e.authInfo&&null!==e.authInfo?n.authInfo=t.AuthInfo.fromJSON(e.authInfo):n.authInfo=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(x(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.body&&(n.body=e.body?t.TxBody.toJSON(e.body):void 0),void 0!==e.authInfo&&(n.authInfo=e.authInfo?t.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return T(void 0!==e?e:new Uint8Array)})):n.signatures=[],n},fromPartial:function(e){var n=Object.assign({},l);if(n.signatures=[],void 0!==e.body&&null!==e.body?n.body=t.TxBody.fromPartial(e.body):n.body=void 0,void 0!==e.authInfo&&null!==e.authInfo?n.authInfo=t.AuthInfo.fromPartial(e.authInfo):n.authInfo=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(i)}}catch(s){r.e(s)}finally{r.f()}}return n}};var f={};t.TxRaw={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes);var n,o=a(e.signatures);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(26).bytes(r)}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);for(o.signatures=[],o.bodyBytes=new Uint8Array,o.authInfoBytes=new Uint8Array;n.pos>>3){case 1:o.bodyBytes=n.bytes();break;case 2:o.authInfoBytes=n.bytes();break;case 3:o.signatures.push(n.bytes());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);if(t.signatures=[],t.bodyBytes=new Uint8Array,t.authInfoBytes=new Uint8Array,void 0!==e.bodyBytes&&null!==e.bodyBytes&&(t.bodyBytes=x(e.bodyBytes)),void 0!==e.authInfoBytes&&null!==e.authInfoBytes&&(t.authInfoBytes=x(e.authInfoBytes)),void 0!==e.signatures&&null!==e.signatures){var n,o=a(e.signatures);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.signatures.push(x(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.bodyBytes&&(t.bodyBytes=T(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=T(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map((function(e){return T(void 0!==e?e:new Uint8Array)})):t.signatures=[],t},fromPartial:function(e){var t=Object.assign({},f);if(t.signatures=[],void 0!==e.bodyBytes&&null!==e.bodyBytes?t.bodyBytes=e.bodyBytes:t.bodyBytes=new Uint8Array,void 0!==e.authInfoBytes&&null!==e.authInfoBytes?t.authInfoBytes=e.authInfoBytes:t.authInfoBytes=new Uint8Array,void 0!==e.signatures&&null!==e.signatures){var n,o=a(e.signatures);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.signatures.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var p={chainId:"",accountNumber:r.default.UZERO};t.SignDoc={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),""!==e.chainId&&t.uint32(26).string(e.chainId),e.accountNumber.isZero()||t.uint32(32).uint64(e.accountNumber),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);for(o.bodyBytes=new Uint8Array,o.authInfoBytes=new Uint8Array;n.pos>>3){case 1:o.bodyBytes=n.bytes();break;case 2:o.authInfoBytes=n.bytes();break;case 3:o.chainId=n.string();break;case 4:o.accountNumber=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return t.bodyBytes=new Uint8Array,t.authInfoBytes=new Uint8Array,void 0!==e.bodyBytes&&null!==e.bodyBytes&&(t.bodyBytes=x(e.bodyBytes)),void 0!==e.authInfoBytes&&null!==e.authInfoBytes&&(t.authInfoBytes=x(e.authInfoBytes)),void 0!==e.chainId&&null!==e.chainId?t.chainId=String(e.chainId):t.chainId="",void 0!==e.accountNumber&&null!==e.accountNumber?t.accountNumber=r.default.fromString(e.accountNumber):t.accountNumber=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.bodyBytes&&(t.bodyBytes=T(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=T(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.bodyBytes&&null!==e.bodyBytes?t.bodyBytes=e.bodyBytes:t.bodyBytes=new Uint8Array,void 0!==e.authInfoBytes&&null!==e.authInfoBytes?t.authInfoBytes=e.authInfoBytes:t.authInfoBytes=new Uint8Array,void 0!==e.chainId&&null!==e.chainId?t.chainId=e.chainId:t.chainId="",void 0!==e.accountNumber&&null!==e.accountNumber?t.accountNumber=e.accountNumber:t.accountNumber=r.default.UZERO,t}};var b={memo:"",timeoutHeight:r.default.UZERO};t.TxBody={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.messages);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.Any.encode(r,n.uint32(10).fork()).ldelim()}}catch(b){o.e(b)}finally{o.f()}""!==e.memo&&n.uint32(18).string(e.memo),e.timeoutHeight.isZero()||n.uint32(24).uint64(e.timeoutHeight);var c,u=a(e.extensionOptions);try{for(u.s();!(c=u.n()).done;){var d=c.value;s.Any.encode(d,n.uint32(8186).fork()).ldelim()}}catch(b){u.e(b)}finally{u.f()}var l,f=a(e.nonCriticalExtensionOptions);try{for(f.s();!(l=f.n()).done;){var p=l.value;s.Any.encode(p,n.uint32(16378).fork()).ldelim()}}catch(b){f.e(b)}finally{f.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);for(o.messages=[],o.extensionOptions=[],o.nonCriticalExtensionOptions=[];n.pos>>3){case 1:o.messages.push(s.Any.decode(n,n.uint32()));break;case 2:o.memo=n.string();break;case 3:o.timeoutHeight=n.uint64();break;case 1023:o.extensionOptions.push(s.Any.decode(n,n.uint32()));break;case 2047:o.nonCriticalExtensionOptions.push(s.Any.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);if(t.messages=[],t.extensionOptions=[],t.nonCriticalExtensionOptions=[],void 0!==e.messages&&null!==e.messages){var n,o=a(e.messages);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.messages.push(s.Any.fromJSON(i))}}catch(m){o.e(m)}finally{o.f()}}if(void 0!==e.memo&&null!==e.memo?t.memo=String(e.memo):t.memo="",void 0!==e.timeoutHeight&&null!==e.timeoutHeight?t.timeoutHeight=r.default.fromString(e.timeoutHeight):t.timeoutHeight=r.default.UZERO,void 0!==e.extensionOptions&&null!==e.extensionOptions){var c,u=a(e.extensionOptions);try{for(u.s();!(c=u.n()).done;){var d=c.value;t.extensionOptions.push(s.Any.fromJSON(d))}}catch(m){u.e(m)}finally{u.f()}}if(void 0!==e.nonCriticalExtensionOptions&&null!==e.nonCriticalExtensionOptions){var l,f=a(e.nonCriticalExtensionOptions);try{for(f.s();!(l=f.n()).done;){var p=l.value;t.nonCriticalExtensionOptions.push(s.Any.fromJSON(p))}}catch(m){f.e(m)}finally{f.f()}}return t},toJSON:function(e){var t={};return e.messages?t.messages=e.messages.map((function(e){return e?s.Any.toJSON(e):void 0})):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=(e.timeoutHeight||r.default.UZERO).toString()),e.extensionOptions?t.extensionOptions=e.extensionOptions.map((function(e){return e?s.Any.toJSON(e):void 0})):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map((function(e){return e?s.Any.toJSON(e):void 0})):t.nonCriticalExtensionOptions=[],t},fromPartial:function(e){var t=Object.assign({},b);if(t.messages=[],t.extensionOptions=[],t.nonCriticalExtensionOptions=[],void 0!==e.messages&&null!==e.messages){var n,o=a(e.messages);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.messages.push(s.Any.fromPartial(i))}}catch(m){o.e(m)}finally{o.f()}}if(void 0!==e.memo&&null!==e.memo?t.memo=e.memo:t.memo="",void 0!==e.timeoutHeight&&null!==e.timeoutHeight?t.timeoutHeight=e.timeoutHeight:t.timeoutHeight=r.default.UZERO,void 0!==e.extensionOptions&&null!==e.extensionOptions){var c,u=a(e.extensionOptions);try{for(u.s();!(c=u.n()).done;){var d=c.value;t.extensionOptions.push(s.Any.fromPartial(d))}}catch(m){u.e(m)}finally{u.f()}}if(void 0!==e.nonCriticalExtensionOptions&&null!==e.nonCriticalExtensionOptions){var l,f=a(e.nonCriticalExtensionOptions);try{for(f.s();!(l=f.n()).done;){var p=l.value;t.nonCriticalExtensionOptions.push(s.Any.fromPartial(p))}}catch(m){f.e(m)}finally{f.f()}}return t}};var m={};t.AuthInfo={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.signerInfos);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.SignerInfo.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return void 0!==e.fee&&t.Fee.encode(e.fee,o.uint32(18).fork()).ldelim(),o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},m);for(r.signerInfos=[];a.pos>>3){case 1:r.signerInfos.push(t.SignerInfo.decode(a,a.uint32()));break;case 2:r.fee=t.Fee.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},m);if(n.signerInfos=[],void 0!==e.signerInfos&&null!==e.signerInfos){var o,r=a(e.signerInfos);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signerInfos.push(t.SignerInfo.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.fee&&null!==e.fee?n.fee=t.Fee.fromJSON(e.fee):n.fee=void 0,n},toJSON:function(e){var n={};return e.signerInfos?n.signerInfos=e.signerInfos.map((function(e){return e?t.SignerInfo.toJSON(e):void 0})):n.signerInfos=[],void 0!==e.fee&&(n.fee=e.fee?t.Fee.toJSON(e.fee):void 0),n},fromPartial:function(e){var n=Object.assign({},m);if(n.signerInfos=[],void 0!==e.signerInfos&&null!==e.signerInfos){var o,r=a(e.signerInfos);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signerInfos.push(t.SignerInfo.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.fee&&null!==e.fee?n.fee=t.Fee.fromPartial(e.fee):n.fee=void 0,n}};var h={sequence:r.default.UZERO};t.SignerInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.publicKey&&s.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&t.ModeInfo.encode(e.modeInfo,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},h);a.pos>>3){case 1:r.publicKey=s.Any.decode(a,a.uint32());break;case 2:r.modeInfo=t.ModeInfo.decode(a,a.uint32());break;case 3:r.sequence=a.uint64();break;default:a.skipType(7&c)}}return r},fromJSON:function(e){var n=Object.assign({},h);return void 0!==e.publicKey&&null!==e.publicKey?n.publicKey=s.Any.fromJSON(e.publicKey):n.publicKey=void 0,void 0!==e.modeInfo&&null!==e.modeInfo?n.modeInfo=t.ModeInfo.fromJSON(e.modeInfo):n.modeInfo=void 0,void 0!==e.sequence&&null!==e.sequence?n.sequence=r.default.fromString(e.sequence):n.sequence=r.default.UZERO,n},toJSON:function(e){var n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?s.Any.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(n.modeInfo=e.modeInfo?t.ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||r.default.UZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},h);return void 0!==e.publicKey&&null!==e.publicKey?n.publicKey=s.Any.fromPartial(e.publicKey):n.publicKey=void 0,void 0!==e.modeInfo&&null!==e.modeInfo?n.modeInfo=t.ModeInfo.fromPartial(e.modeInfo):n.modeInfo=void 0,void 0!==e.sequence&&null!==e.sequence?n.sequence=e.sequence:n.sequence=r.default.UZERO,n}};var g={};t.ModeInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.single&&t.ModeInfo_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.ModeInfo_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},g);a.pos>>3){case 1:r.single=t.ModeInfo_Single.decode(a,a.uint32());break;case 2:r.multi=t.ModeInfo_Multi.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},g);return void 0!==e.single&&null!==e.single?n.single=t.ModeInfo_Single.fromJSON(e.single):n.single=void 0,void 0!==e.multi&&null!==e.multi?n.multi=t.ModeInfo_Multi.fromJSON(e.multi):n.multi=void 0,n},toJSON:function(e){var n={};return void 0!==e.single&&(n.single=e.single?t.ModeInfo_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.ModeInfo_Multi.toJSON(e.multi):void 0),n},fromPartial:function(e){var n=Object.assign({},g);return void 0!==e.single&&null!==e.single?n.single=t.ModeInfo_Single.fromPartial(e.single):n.single=void 0,void 0!==e.multi&&null!==e.multi?n.multi=t.ModeInfo_Multi.fromPartial(e.multi):n.multi=void 0,n}};var y={mode:0};t.ModeInfo_Single={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);n.pos>>3===1)o.mode=n.int32();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},y);return void 0!==e.mode&&null!==e.mode?t.mode=c.signModeFromJSON(e.mode):t.mode=0,t},toJSON:function(e){var t={};return void 0!==e.mode&&(t.mode=c.signModeToJSON(e.mode)),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.mode&&null!==e.mode?t.mode=e.mode:t.mode=0,t}};var v={};t.ModeInfo_Multi={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.bitarray&&u.CompactBitArray.encode(e.bitarray,n.uint32(10).fork()).ldelim();var o,r=a(e.modeInfos);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.ModeInfo.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},v);for(r.modeInfos=[];a.pos>>3){case 1:r.bitarray=u.CompactBitArray.decode(a,a.uint32());break;case 2:r.modeInfos.push(t.ModeInfo.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},v);if(n.modeInfos=[],void 0!==e.bitarray&&null!==e.bitarray?n.bitarray=u.CompactBitArray.fromJSON(e.bitarray):n.bitarray=void 0,void 0!==e.modeInfos&&null!==e.modeInfos){var o,r=a(e.modeInfos);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.modeInfos.push(t.ModeInfo.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?u.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?n.modeInfos=e.modeInfos.map((function(e){return e?t.ModeInfo.toJSON(e):void 0})):n.modeInfos=[],n},fromPartial:function(e){var n=Object.assign({},v);if(n.modeInfos=[],void 0!==e.bitarray&&null!==e.bitarray?n.bitarray=u.CompactBitArray.fromPartial(e.bitarray):n.bitarray=void 0,void 0!==e.modeInfos&&null!==e.modeInfos){var o,r=a(e.modeInfos);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.modeInfos.push(t.ModeInfo.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var w={gasLimit:r.default.UZERO,payer:"",granter:""};t.Fee={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.amount);try{for(o.s();!(t=o.n()).done;){var r=t.value;d.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return e.gasLimit.isZero()||n.uint32(16).uint64(e.gasLimit),""!==e.payer&&n.uint32(26).string(e.payer),""!==e.granter&&n.uint32(34).string(e.granter),n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);for(o.amount=[];n.pos>>3){case 1:o.amount.push(d.Coin.decode(n,n.uint32()));break;case 2:o.gasLimit=n.uint64();break;case 3:o.payer=n.string();break;case 4:o.granter=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},w);if(t.amount=[],void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.amount.push(d.Coin.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.gasLimit&&null!==e.gasLimit?t.gasLimit=r.default.fromString(e.gasLimit):t.gasLimit=r.default.UZERO,void 0!==e.payer&&null!==e.payer?t.payer=String(e.payer):t.payer="",void 0!==e.granter&&null!==e.granter?t.granter=String(e.granter):t.granter="",t},toJSON:function(e){var t={};return e.amount?t.amount=e.amount.map((function(e){return e?d.Coin.toJSON(e):void 0})):t.amount=[],void 0!==e.gasLimit&&(t.gasLimit=(e.gasLimit||r.default.UZERO).toString()),void 0!==e.payer&&(t.payer=e.payer),void 0!==e.granter&&(t.granter=e.granter),t},fromPartial:function(e){var t=Object.assign({},w);if(t.amount=[],void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.amount.push(d.Coin.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.gasLimit&&null!==e.gasLimit?t.gasLimit=e.gasLimit:t.gasLimit=r.default.UZERO,void 0!==e.payer&&null!==e.payer?t.payer=e.payer:t.payer="",void 0!==e.granter&&null!==e.granter?t.granter=e.granter:t.granter="",t}};var k=function(){if("undefined"!==typeof k)return k;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),A=k.atob||function(e){return k.Buffer.from(e,"base64").toString("binary")};function x(e){for(var t=A(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),void 0!==e.time&&s.Timestamp.encode(function(e){var t=(a=e.getTime()/1e3,o.default.fromNumber(a)),n=e.getTime()%1e3*1e6;var a;return{seconds:t,nanos:n}}(e.time),t.uint32(18).fork()).ldelim(),e.height.isZero()||t.uint32(24).int64(e.height),""!==e.info&&t.uint32(34).string(e.info),void 0!==e.upgradedClientState&&i.Any.encode(e.upgradedClientState,t.uint32(42).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.name=n.string();break;case 2:o.time=f(s.Timestamp.decode(n,n.uint32()));break;case 3:o.height=n.int64();break;case 4:o.info=n.string();break;case 5:o.upgradedClientState=i.Any.decode(n,n.uint32());break;default:n.skipType(7&u)}}return o},fromJSON:function(e){var t,n=Object.assign({},c);return void 0!==e.name&&null!==e.name?n.name=String(e.name):n.name="",void 0!==e.time&&null!==e.time?n.time=(t=e.time)instanceof Date?t:"string"===typeof t?new Date(t):f(s.Timestamp.fromJSON(t)):n.time=void 0,void 0!==e.height&&null!==e.height?n.height=o.default.fromString(e.height):n.height=o.default.ZERO,void 0!==e.info&&null!==e.info?n.info=String(e.info):n.info="",void 0!==e.upgradedClientState&&null!==e.upgradedClientState?n.upgradedClientState=i.Any.fromJSON(e.upgradedClientState):n.upgradedClientState=void 0,n},toJSON:function(e){var t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.time&&(t.time=e.time.toISOString()),void 0!==e.height&&(t.height=(e.height||o.default.ZERO).toString()),void 0!==e.info&&(t.info=e.info),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?i.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.name&&null!==e.name?t.name=e.name:t.name="",void 0!==e.time&&null!==e.time?t.time=e.time:t.time=void 0,void 0!==e.height&&null!==e.height?t.height=e.height:t.height=o.default.ZERO,void 0!==e.info&&null!==e.info?t.info=e.info:t.info="",void 0!==e.upgradedClientState&&null!==e.upgradedClientState?t.upgradedClientState=i.Any.fromPartial(e.upgradedClientState):t.upgradedClientState=void 0,t}};var u={title:"",description:""};t.SoftwareUpgradeProposal={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.title&&n.uint32(10).string(e.title),""!==e.description&&n.uint32(18).string(e.description),void 0!==e.plan&&t.Plan.encode(e.plan,n.uint32(26).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof r.default.Reader?e:new r.default.Reader(e),o=void 0===n?a.len:a.pos+n,i=Object.assign({},u);a.pos>>3){case 1:i.title=a.string();break;case 2:i.description=a.string();break;case 3:i.plan=t.Plan.decode(a,a.uint32());break;default:a.skipType(7&s)}}return i},fromJSON:function(e){var n=Object.assign({},u);return void 0!==e.title&&null!==e.title?n.title=String(e.title):n.title="",void 0!==e.description&&null!==e.description?n.description=String(e.description):n.description="",void 0!==e.plan&&null!==e.plan?n.plan=t.Plan.fromJSON(e.plan):n.plan=void 0,n},toJSON:function(e){var n={};return void 0!==e.title&&(n.title=e.title),void 0!==e.description&&(n.description=e.description),void 0!==e.plan&&(n.plan=e.plan?t.Plan.toJSON(e.plan):void 0),n},fromPartial:function(e){var n=Object.assign({},u);return void 0!==e.title&&null!==e.title?n.title=e.title:n.title="",void 0!==e.description&&null!==e.description?n.description=e.description:n.description="",void 0!==e.plan&&null!==e.plan?n.plan=t.Plan.fromPartial(e.plan):n.plan=void 0,n}};var d={title:"",description:""};t.CancelSoftwareUpgradeProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",t}};var l={name:"",version:o.default.UZERO};function f(e){var t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}t.ModuleVersion={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),e.version.isZero()||t.uint32(16).uint64(e.version),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos>>3){case 1:o.name=n.string();break;case 2:o.version=n.uint64();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},l);return void 0!==e.name&&null!==e.name?t.name=String(e.name):t.name="",void 0!==e.version&&null!==e.version?t.version=o.default.fromString(e.version):t.version=o.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.version&&(t.version=(e.version||o.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},l);return void 0!==e.name&&null!==e.name?t.name=e.name:t.name="",void 0!==e.version&&null!==e.version?t.version=e.version:t.version=o.default.UZERO,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},60279:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgDonateAllVestingTokensDesc=t.MsgCreatePeriodicVestingAccountDesc=t.MsgCreateVestingAccountDesc=t.MsgDesc=t.MsgClientImpl=t.MsgDonateAllVestingTokensResponse=t.MsgDonateAllVestingTokens=t.MsgCreatePeriodicVestingAccountResponse=t.MsgCreatePeriodicVestingAccount=t.MsgCreateVestingAccountResponse=t.MsgCreateVestingAccount=t.protobufPackage=void 0;var s=i(n(29600)),c=n(93704),u=i(n(80121)),d=n(82576),l=n(39705),f=n(46619);t.protobufPackage="cosmos.vesting.v1beta1";var p={fromAddress:"",toAddress:"",endTime:s.default.ZERO,delayed:!1};t.MsgCreateVestingAccount={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress);var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;l.Coin.encode(o,t.uint32(26).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return e.endTime.isZero()||t.uint32(32).int64(e.endTime),!0===e.delayed&&t.uint32(40).bool(e.delayed),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);for(o.amount=[];n.pos>>3){case 1:o.fromAddress=n.string();break;case 2:o.toAddress=n.string();break;case 3:o.amount.push(l.Coin.decode(n,n.uint32()));break;case 4:o.endTime=n.int64();break;case 5:o.delayed=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);if(t.amount=[],void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=String(e.fromAddress):t.fromAddress="",void 0!==e.toAddress&&null!==e.toAddress?t.toAddress=String(e.toAddress):t.toAddress="",void 0!==e.amount&&null!==e.amount){var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.amount.push(l.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.endTime&&null!==e.endTime?t.endTime=s.default.fromString(e.endTime):t.endTime=s.default.ZERO,void 0!==e.delayed&&null!==e.delayed?t.delayed=Boolean(e.delayed):t.delayed=!1,t},toJSON:function(e){var t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map((function(e){return e?l.Coin.toJSON(e):void 0})):t.amount=[],void 0!==e.endTime&&(t.endTime=(e.endTime||s.default.ZERO).toString()),void 0!==e.delayed&&(t.delayed=e.delayed),t},fromPartial:function(e){var t=Object.assign({},p);if(t.amount=[],void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=e.fromAddress:t.fromAddress="",void 0!==e.toAddress&&null!==e.toAddress?t.toAddress=e.toAddress:t.toAddress="",void 0!==e.amount&&null!==e.amount){var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.amount.push(l.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.endTime&&null!==e.endTime?t.endTime=e.endTime:t.endTime=s.default.ZERO,void 0!==e.delayed&&null!==e.delayed?t.delayed=e.delayed:t.delayed=!1,t}};var b={};t.MsgCreateVestingAccountResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),e.startTime.isZero()||t.uint32(24).int64(e.startTime);var n,a=r(e.vestingPeriods);try{for(a.s();!(n=a.n()).done;){var o=n.value;f.Period.encode(o,t.uint32(34).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);for(o.vestingPeriods=[];n.pos>>3){case 1:o.fromAddress=n.string();break;case 2:o.toAddress=n.string();break;case 3:o.startTime=n.int64();break;case 4:o.vestingPeriods.push(f.Period.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},m);if(t.vestingPeriods=[],void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=String(e.fromAddress):t.fromAddress="",void 0!==e.toAddress&&null!==e.toAddress?t.toAddress=String(e.toAddress):t.toAddress="",void 0!==e.startTime&&null!==e.startTime?t.startTime=s.default.fromString(e.startTime):t.startTime=s.default.ZERO,void 0!==e.vestingPeriods&&null!==e.vestingPeriods){var n,a=r(e.vestingPeriods);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.vestingPeriods.push(f.Period.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),void 0!==e.startTime&&(t.startTime=(e.startTime||s.default.ZERO).toString()),e.vestingPeriods?t.vestingPeriods=e.vestingPeriods.map((function(e){return e?f.Period.toJSON(e):void 0})):t.vestingPeriods=[],t},fromPartial:function(e){var t=Object.assign({},m);if(t.vestingPeriods=[],void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=e.fromAddress:t.fromAddress="",void 0!==e.toAddress&&null!==e.toAddress?t.toAddress=e.toAddress:t.toAddress="",void 0!==e.startTime&&null!==e.startTime?t.startTime=e.startTime:t.startTime=s.default.ZERO,void 0!==e.vestingPeriods&&null!==e.vestingPeriods){var n,a=r(e.vestingPeriods);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.vestingPeriods.push(f.Period.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return t}};var h={};t.MsgCreatePeriodicVestingAccountResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos>>3===1)o.fromAddress=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},g);return void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=String(e.fromAddress):t.fromAddress="",t},toJSON:function(e){var t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.fromAddress&&null!==e.fromAddress?t.fromAddress=e.fromAddress:t.fromAddress="",t}};var y={};t.MsgDonateAllVestingTokensResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.baseAccount&&s.BaseAccount.encode(e.baseAccount,t.uint32(10).fork()).ldelim();var n,o=a(e.originalVesting);try{for(o.s();!(n=o.n()).done;){var r=n.value;c.Coin.encode(r,t.uint32(18).fork()).ldelim()}}catch(m){o.e(m)}finally{o.f()}var u,d=a(e.delegatedFree);try{for(d.s();!(u=d.n()).done;){var l=u.value;c.Coin.encode(l,t.uint32(26).fork()).ldelim()}}catch(m){d.e(m)}finally{d.f()}var f,p=a(e.delegatedVesting);try{for(p.s();!(f=p.n()).done;){var b=f.value;c.Coin.encode(b,t.uint32(34).fork()).ldelim()}}catch(m){p.e(m)}finally{p.f()}return e.endTime.isZero()||t.uint32(40).int64(e.endTime),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);for(o.originalVesting=[],o.delegatedFree=[],o.delegatedVesting=[];n.pos>>3){case 1:o.baseAccount=s.BaseAccount.decode(n,n.uint32());break;case 2:o.originalVesting.push(c.Coin.decode(n,n.uint32()));break;case 3:o.delegatedFree.push(c.Coin.decode(n,n.uint32()));break;case 4:o.delegatedVesting.push(c.Coin.decode(n,n.uint32()));break;case 5:o.endTime=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);if(t.originalVesting=[],t.delegatedFree=[],t.delegatedVesting=[],void 0!==e.baseAccount&&null!==e.baseAccount?t.baseAccount=s.BaseAccount.fromJSON(e.baseAccount):t.baseAccount=void 0,void 0!==e.originalVesting&&null!==e.originalVesting){var n,o=a(e.originalVesting);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.originalVesting.push(c.Coin.fromJSON(i))}}catch(h){o.e(h)}finally{o.f()}}if(void 0!==e.delegatedFree&&null!==e.delegatedFree){var d,l=a(e.delegatedFree);try{for(l.s();!(d=l.n()).done;){var f=d.value;t.delegatedFree.push(c.Coin.fromJSON(f))}}catch(h){l.e(h)}finally{l.f()}}if(void 0!==e.delegatedVesting&&null!==e.delegatedVesting){var p,b=a(e.delegatedVesting);try{for(b.s();!(p=b.n()).done;){var m=p.value;t.delegatedVesting.push(c.Coin.fromJSON(m))}}catch(h){b.e(h)}finally{b.f()}}return void 0!==e.endTime&&null!==e.endTime?t.endTime=r.default.fromString(e.endTime):t.endTime=r.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.baseAccount&&(t.baseAccount=e.baseAccount?s.BaseAccount.toJSON(e.baseAccount):void 0),e.originalVesting?t.originalVesting=e.originalVesting.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.originalVesting=[],e.delegatedFree?t.delegatedFree=e.delegatedFree.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.delegatedFree=[],e.delegatedVesting?t.delegatedVesting=e.delegatedVesting.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.delegatedVesting=[],void 0!==e.endTime&&(t.endTime=(e.endTime||r.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},u);if(t.originalVesting=[],t.delegatedFree=[],t.delegatedVesting=[],void 0!==e.baseAccount&&null!==e.baseAccount?t.baseAccount=s.BaseAccount.fromPartial(e.baseAccount):t.baseAccount=void 0,void 0!==e.originalVesting&&null!==e.originalVesting){var n,o=a(e.originalVesting);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.originalVesting.push(c.Coin.fromPartial(i))}}catch(h){o.e(h)}finally{o.f()}}if(void 0!==e.delegatedFree&&null!==e.delegatedFree){var d,l=a(e.delegatedFree);try{for(l.s();!(d=l.n()).done;){var f=d.value;t.delegatedFree.push(c.Coin.fromPartial(f))}}catch(h){l.e(h)}finally{l.f()}}if(void 0!==e.delegatedVesting&&null!==e.delegatedVesting){var p,b=a(e.delegatedVesting);try{for(b.s();!(p=b.n()).done;){var m=p.value;t.delegatedVesting.push(c.Coin.fromPartial(m))}}catch(h){b.e(h)}finally{b.f()}}return void 0!==e.endTime&&null!==e.endTime?t.endTime=e.endTime:t.endTime=r.default.ZERO,t}};var d={startTime:r.default.ZERO};t.ContinuousVestingAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),e.startTime.isZero()||n.uint32(16).int64(e.startTime),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},d);a.pos>>3){case 1:r.baseVestingAccount=t.BaseVestingAccount.decode(a,a.uint32());break;case 2:r.startTime=a.int64();break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},d);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.startTime&&null!==e.startTime?n.startTime=r.default.fromString(e.startTime):n.startTime=r.default.ZERO,n},toJSON:function(e){var n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),void 0!==e.startTime&&(n.startTime=(e.startTime||r.default.ZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},d);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.startTime&&null!==e.startTime?n.startTime=e.startTime:n.startTime=r.default.ZERO,n}};var l={};t.DelayedVestingAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},l);a.pos>>3===1)r.baseVestingAccount=t.BaseVestingAccount.decode(a,a.uint32());else a.skipType(7&s)}return r},fromJSON:function(e){var n=Object.assign({},l);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount):n.baseVestingAccount=void 0,n},toJSON:function(e){var n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),n},fromPartial:function(e){var n=Object.assign({},l);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount):n.baseVestingAccount=void 0,n}};var f={length:r.default.ZERO};t.Period={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();e.length.isZero()||t.uint32(8).int64(e.length);var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var r=n.value;c.Coin.encode(r,t.uint32(18).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);for(o.amount=[];n.pos>>3){case 1:o.length=n.int64();break;case 2:o.amount.push(c.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);if(t.amount=[],void 0!==e.length&&null!==e.length?t.length=r.default.fromString(e.length):t.length=r.default.ZERO,void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.amount.push(c.Coin.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.length&&(t.length=(e.length||r.default.ZERO).toString()),e.amount?t.amount=e.amount.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.amount=[],t},fromPartial:function(e){var t=Object.assign({},f);if(t.amount=[],void 0!==e.length&&null!==e.length?t.length=e.length:t.length=r.default.ZERO,void 0!==e.amount&&null!==e.amount){var n,o=a(e.amount);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.amount.push(c.Coin.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return t}};var p={startTime:r.default.ZERO};t.PeriodicVestingAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),e.startTime.isZero()||n.uint32(16).int64(e.startTime);var o,r=a(e.vestingPeriods);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.Period.encode(s,n.uint32(26).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},p);for(r.vestingPeriods=[];a.pos>>3){case 1:r.baseVestingAccount=t.BaseVestingAccount.decode(a,a.uint32());break;case 2:r.startTime=a.int64();break;case 3:r.vestingPeriods.push(t.Period.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},p);if(n.vestingPeriods=[],void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.startTime&&null!==e.startTime?n.startTime=r.default.fromString(e.startTime):n.startTime=r.default.ZERO,void 0!==e.vestingPeriods&&null!==e.vestingPeriods){var o,i=a(e.vestingPeriods);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.vestingPeriods.push(t.Period.fromJSON(s))}}catch(c){i.e(c)}finally{i.f()}}return n},toJSON:function(e){var n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),void 0!==e.startTime&&(n.startTime=(e.startTime||r.default.ZERO).toString()),e.vestingPeriods?n.vestingPeriods=e.vestingPeriods.map((function(e){return e?t.Period.toJSON(e):void 0})):n.vestingPeriods=[],n},fromPartial:function(e){var n=Object.assign({},p);if(n.vestingPeriods=[],void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount):n.baseVestingAccount=void 0,void 0!==e.startTime&&null!==e.startTime?n.startTime=e.startTime:n.startTime=r.default.ZERO,void 0!==e.vestingPeriods&&null!==e.vestingPeriods){var o,i=a(e.vestingPeriods);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.vestingPeriods.push(t.Period.fromPartial(s))}}catch(c){i.e(c)}finally{i.f()}}return n}};var b={};t.PermanentLockedAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},b);a.pos>>3===1)r.baseVestingAccount=t.BaseVestingAccount.decode(a,a.uint32());else a.skipType(7&s)}return r},fromJSON:function(e){var n=Object.assign({},b);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount):n.baseVestingAccount=void 0,n},toJSON:function(e){var n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),n},fromPartial:function(e){var n=Object.assign({},b);return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?n.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount):n.baseVestingAccount=void 0,n}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},79985:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateInstantiateConfigProposal=t.AccessConfigUpdate=t.UnpinCodesProposal=t.PinCodesProposal=t.ClearAdminProposal=t.UpdateAdminProposal=t.ExecuteContractProposal=t.SudoContractProposal=t.MigrateContractProposal=t.InstantiateContractProposal=t.StoreCodeProposal=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121)),s=n(74927),c=n(39705);t.protobufPackage="cosmwasm.wasm.v1";var u={title:"",description:"",runAs:""};t.StoreCodeProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.runAs&&t.uint32(26).string(e.runAs),0!==e.wasmByteCode.length&&t.uint32(34).bytes(e.wasmByteCode),void 0!==e.instantiatePermission&&s.AccessConfig.encode(e.instantiatePermission,t.uint32(58).fork()).ldelim(),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);for(o.wasmByteCode=new Uint8Array;n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.runAs=n.string();break;case 4:o.wasmByteCode=n.bytes();break;case 7:o.instantiatePermission=s.AccessConfig.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return t.wasmByteCode=new Uint8Array,void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.runAs&&null!==e.runAs?t.runAs=String(e.runAs):t.runAs="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode&&(t.wasmByteCode=A(e.wasmByteCode)),void 0!==e.instantiatePermission&&null!==e.instantiatePermission?t.instantiatePermission=s.AccessConfig.fromJSON(e.instantiatePermission):t.instantiatePermission=void 0,t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.runAs&&(t.runAs=e.runAs),void 0!==e.wasmByteCode&&(t.wasmByteCode=I(void 0!==e.wasmByteCode?e.wasmByteCode:new Uint8Array)),void 0!==e.instantiatePermission&&(t.instantiatePermission=e.instantiatePermission?s.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.runAs&&null!==e.runAs?t.runAs=e.runAs:t.runAs="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode?t.wasmByteCode=e.wasmByteCode:t.wasmByteCode=new Uint8Array,void 0!==e.instantiatePermission&&null!==e.instantiatePermission?t.instantiatePermission=s.AccessConfig.fromPartial(e.instantiatePermission):t.instantiatePermission=void 0,t}};var d={title:"",description:"",runAs:"",admin:"",codeId:r.default.UZERO,label:""};t.InstantiateContractProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.runAs&&t.uint32(26).string(e.runAs),""!==e.admin&&t.uint32(34).string(e.admin),e.codeId.isZero()||t.uint32(40).uint64(e.codeId),""!==e.label&&t.uint32(50).string(e.label),0!==e.msg.length&&t.uint32(58).bytes(e.msg);var n,o=a(e.funds);try{for(o.s();!(n=o.n()).done;){var r=n.value;c.Coin.encode(r,t.uint32(66).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);for(o.funds=[],o.msg=new Uint8Array;n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.runAs=n.string();break;case 4:o.admin=n.string();break;case 5:o.codeId=n.uint64();break;case 6:o.label=n.string();break;case 7:o.msg=n.bytes();break;case 8:o.funds.push(c.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);if(t.funds=[],t.msg=new Uint8Array,void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.runAs&&null!==e.runAs?t.runAs=String(e.runAs):t.runAs="",void 0!==e.admin&&null!==e.admin?t.admin=String(e.admin):t.admin="",void 0!==e.codeId&&null!==e.codeId?t.codeId=r.default.fromString(e.codeId):t.codeId=r.default.UZERO,void 0!==e.label&&null!==e.label?t.label=String(e.label):t.label="",void 0!==e.msg&&null!==e.msg&&(t.msg=A(e.msg)),void 0!==e.funds&&null!==e.funds){var n,o=a(e.funds);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.funds.push(c.Coin.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.runAs&&(t.runAs=e.runAs),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.codeId&&(t.codeId=(e.codeId||r.default.UZERO).toString()),void 0!==e.label&&(t.label=e.label),void 0!==e.msg&&(t.msg=I(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.funds=[],t},fromPartial:function(e){var t=Object.assign({},d);if(t.funds=[],void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.runAs&&null!==e.runAs?t.runAs=e.runAs:t.runAs="",void 0!==e.admin&&null!==e.admin?t.admin=e.admin:t.admin="",void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=r.default.UZERO,void 0!==e.label&&null!==e.label?t.label=e.label:t.label="",void 0!==e.msg&&null!==e.msg?t.msg=e.msg:t.msg=new Uint8Array,void 0!==e.funds&&null!==e.funds){var n,o=a(e.funds);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.funds.push(c.Coin.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return t}};var l={title:"",description:"",contract:"",codeId:r.default.UZERO};t.MigrateContractProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.contract&&t.uint32(34).string(e.contract),e.codeId.isZero()||t.uint32(40).uint64(e.codeId),0!==e.msg.length&&t.uint32(50).bytes(e.msg),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);for(o.msg=new Uint8Array;n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 4:o.contract=n.string();break;case 5:o.codeId=n.uint64();break;case 6:o.msg=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},l);return t.msg=new Uint8Array,void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",void 0!==e.codeId&&null!==e.codeId?t.codeId=r.default.fromString(e.codeId):t.codeId=r.default.UZERO,void 0!==e.msg&&null!==e.msg&&(t.msg=A(e.msg)),t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.codeId&&(t.codeId=(e.codeId||r.default.UZERO).toString()),void 0!==e.msg&&(t.msg=I(void 0!==e.msg?e.msg:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},l);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=r.default.UZERO,void 0!==e.msg&&null!==e.msg?t.msg=e.msg:t.msg=new Uint8Array,t}};var f={title:"",description:"",contract:""};t.SudoContractProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.contract&&t.uint32(26).string(e.contract),0!==e.msg.length&&t.uint32(34).bytes(e.msg),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);for(o.msg=new Uint8Array;n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.contract=n.string();break;case 4:o.msg=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return t.msg=new Uint8Array,void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",void 0!==e.msg&&null!==e.msg&&(t.msg=A(e.msg)),t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.msg&&(t.msg=I(void 0!==e.msg?e.msg:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",void 0!==e.msg&&null!==e.msg?t.msg=e.msg:t.msg=new Uint8Array,t}};var p={title:"",description:"",runAs:"",contract:""};t.ExecuteContractProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.runAs&&t.uint32(26).string(e.runAs),""!==e.contract&&t.uint32(34).string(e.contract),0!==e.msg.length&&t.uint32(42).bytes(e.msg);var n,o=a(e.funds);try{for(o.s();!(n=o.n()).done;){var r=n.value;c.Coin.encode(r,t.uint32(50).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);for(o.funds=[],o.msg=new Uint8Array;n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.runAs=n.string();break;case 4:o.contract=n.string();break;case 5:o.msg=n.bytes();break;case 6:o.funds.push(c.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);if(t.funds=[],t.msg=new Uint8Array,void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.runAs&&null!==e.runAs?t.runAs=String(e.runAs):t.runAs="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",void 0!==e.msg&&null!==e.msg&&(t.msg=A(e.msg)),void 0!==e.funds&&null!==e.funds){var n,o=a(e.funds);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.funds.push(c.Coin.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.runAs&&(t.runAs=e.runAs),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.msg&&(t.msg=I(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.funds=[],t},fromPartial:function(e){var t=Object.assign({},p);if(t.funds=[],void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.runAs&&null!==e.runAs?t.runAs=e.runAs:t.runAs="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",void 0!==e.msg&&null!==e.msg?t.msg=e.msg:t.msg=new Uint8Array,void 0!==e.funds&&null!==e.funds){var n,o=a(e.funds);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.funds.push(c.Coin.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var b={title:"",description:"",newAdmin:"",contract:""};t.UpdateAdminProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.newAdmin&&t.uint32(26).string(e.newAdmin),""!==e.contract&&t.uint32(34).string(e.contract),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.newAdmin=n.string();break;case 4:o.contract=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.newAdmin&&null!==e.newAdmin?t.newAdmin=String(e.newAdmin):t.newAdmin="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.newAdmin&&null!==e.newAdmin?t.newAdmin=e.newAdmin:t.newAdmin="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",t}};var m={title:"",description:"",contract:""};t.ClearAdminProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.contract&&t.uint32(26).string(e.contract),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.contract=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},m);return void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial:function(e){var t=Object.assign({},m);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",t}};var h={title:"",description:"",codeIds:r.default.UZERO};t.PinCodesProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t.uint32(26).fork();var n,o=a(e.codeIds);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint64(r)}}catch(s){o.e(s)}finally{o.f()}return t.ldelim(),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.codeIds=[];n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:if(2===(7&r))for(var s=n.uint32()+n.pos;n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t.uint32(26).fork();var n,o=a(e.codeIds);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint64(r)}}catch(s){o.e(s)}finally{o.f()}return t.ldelim(),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);for(o.codeIds=[];n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:if(2===(7&r))for(var s=n.uint32()+n.pos;n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.codeId.isZero()||t.uint32(8).uint64(e.codeId),void 0!==e.instantiatePermission&&s.AccessConfig.encode(e.instantiatePermission,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);n.pos>>3){case 1:o.codeId=n.uint64();break;case 2:o.instantiatePermission=s.AccessConfig.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return void 0!==e.codeId&&null!==e.codeId?t.codeId=r.default.fromString(e.codeId):t.codeId=r.default.UZERO,void 0!==e.instantiatePermission&&null!==e.instantiatePermission?t.instantiatePermission=s.AccessConfig.fromJSON(e.instantiatePermission):t.instantiatePermission=void 0,t},toJSON:function(e){var t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||r.default.UZERO).toString()),void 0!==e.instantiatePermission&&(t.instantiatePermission=e.instantiatePermission?s.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=r.default.UZERO,void 0!==e.instantiatePermission&&null!==e.instantiatePermission?t.instantiatePermission=s.AccessConfig.fromPartial(e.instantiatePermission):t.instantiatePermission=void 0,t}};var v={title:"",description:""};t.UpdateInstantiateConfigProposal={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.title&&n.uint32(10).string(e.title),""!==e.description&&n.uint32(18).string(e.description);var o,r=a(e.accessConfigUpdates);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.AccessConfigUpdate.encode(s,n.uint32(26).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},v);for(r.accessConfigUpdates=[];a.pos>>3){case 1:r.title=a.string();break;case 2:r.description=a.string();break;case 3:r.accessConfigUpdates.push(t.AccessConfigUpdate.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},v);if(n.accessConfigUpdates=[],void 0!==e.title&&null!==e.title?n.title=String(e.title):n.title="",void 0!==e.description&&null!==e.description?n.description=String(e.description):n.description="",void 0!==e.accessConfigUpdates&&null!==e.accessConfigUpdates){var o,r=a(e.accessConfigUpdates);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.accessConfigUpdates.push(t.AccessConfigUpdate.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.title&&(n.title=e.title),void 0!==e.description&&(n.description=e.description),e.accessConfigUpdates?n.accessConfigUpdates=e.accessConfigUpdates.map((function(e){return e?t.AccessConfigUpdate.toJSON(e):void 0})):n.accessConfigUpdates=[],n},fromPartial:function(e){var n=Object.assign({},v);if(n.accessConfigUpdates=[],void 0!==e.title&&null!==e.title?n.title=e.title:n.title="",void 0!==e.description&&null!==e.description?n.description=e.description:n.description="",void 0!==e.accessConfigUpdates&&null!==e.accessConfigUpdates){var o,r=a(e.accessConfigUpdates);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.accessConfigUpdates.push(t.AccessConfigUpdate.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var w=function(){if("undefined"!==typeof w)return w;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),k=w.atob||function(e){return w.Buffer.from(e,"base64").toString("binary")};function A(e){for(var t=k(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),0!==e.wasmByteCode.length&&t.uint32(18).bytes(e.wasmByteCode),void 0!==e.instantiatePermission&&d.AccessConfig.encode(e.instantiatePermission,t.uint32(42).fork()).ldelim(),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);for(o.wasmByteCode=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.wasmByteCode=n.bytes();break;case 5:o.instantiatePermission=d.AccessConfig.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return t.wasmByteCode=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode&&(t.wasmByteCode=R(e.wasmByteCode)),void 0!==e.instantiatePermission&&null!==e.instantiatePermission?t.instantiatePermission=d.AccessConfig.fromJSON(e.instantiatePermission):t.instantiatePermission=void 0,t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.wasmByteCode&&(t.wasmByteCode=P(void 0!==e.wasmByteCode?e.wasmByteCode:new Uint8Array)),void 0!==e.instantiatePermission&&(t.instantiatePermission=e.instantiatePermission?d.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.wasmByteCode&&null!==e.wasmByteCode?t.wasmByteCode=e.wasmByteCode:t.wasmByteCode=new Uint8Array,void 0!==e.instantiatePermission&&null!==e.instantiatePermission?t.instantiatePermission=d.AccessConfig.fromPartial(e.instantiatePermission):t.instantiatePermission=void 0,t}};var b={codeId:s.default.UZERO};t.MsgStoreCodeResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return e.codeId.isZero()||t.uint32(8).uint64(e.codeId),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3===1)o.codeId=n.uint64();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.codeId&&null!==e.codeId?t.codeId=s.default.fromString(e.codeId):t.codeId=s.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||s.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=s.default.UZERO,t}};var m={sender:"",admin:"",codeId:s.default.UZERO,label:""};t.MsgInstantiateContract={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();""!==e.sender&&t.uint32(10).string(e.sender),""!==e.admin&&t.uint32(18).string(e.admin),e.codeId.isZero()||t.uint32(24).uint64(e.codeId),""!==e.label&&t.uint32(34).string(e.label),0!==e.msg.length&&t.uint32(42).bytes(e.msg);var n,a=r(e.funds);try{for(a.s();!(n=a.n()).done;){var o=n.value;f.Coin.encode(o,t.uint32(50).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);for(o.funds=[],o.msg=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.admin=n.string();break;case 3:o.codeId=n.uint64();break;case 4:o.label=n.string();break;case 5:o.msg=n.bytes();break;case 6:o.funds.push(f.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},m);if(t.funds=[],t.msg=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.admin&&null!==e.admin?t.admin=String(e.admin):t.admin="",void 0!==e.codeId&&null!==e.codeId?t.codeId=s.default.fromString(e.codeId):t.codeId=s.default.UZERO,void 0!==e.label&&null!==e.label?t.label=String(e.label):t.label="",void 0!==e.msg&&null!==e.msg&&(t.msg=R(e.msg)),void 0!==e.funds&&null!==e.funds){var n,a=r(e.funds);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.funds.push(f.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.codeId&&(t.codeId=(e.codeId||s.default.UZERO).toString()),void 0!==e.label&&(t.label=e.label),void 0!==e.msg&&(t.msg=P(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map((function(e){return e?f.Coin.toJSON(e):void 0})):t.funds=[],t},fromPartial:function(e){var t=Object.assign({},m);if(t.funds=[],void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.admin&&null!==e.admin?t.admin=e.admin:t.admin="",void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=s.default.UZERO,void 0!==e.label&&null!==e.label?t.label=e.label:t.label="",void 0!==e.msg&&null!==e.msg?t.msg=e.msg:t.msg=new Uint8Array,void 0!==e.funds&&null!==e.funds){var n,a=r(e.funds);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.funds.push(f.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return t}};var h={address:""};t.MsgInstantiateContractResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.data=new Uint8Array;n.pos>>3){case 1:o.address=n.string();break;case 2:o.data=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);return t.data=new Uint8Array,void 0!==e.address&&null!==e.address?t.address=String(e.address):t.address="",void 0!==e.data&&null!==e.data&&(t.data=R(e.data)),t},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.data&&(t.data=P(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},h);return void 0!==e.address&&null!==e.address?t.address=e.address:t.address="",void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var g={sender:"",contract:""};t.MsgExecuteContract={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),0!==e.msg.length&&t.uint32(26).bytes(e.msg);var n,a=r(e.funds);try{for(a.s();!(n=a.n()).done;){var o=n.value;f.Coin.encode(o,t.uint32(42).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);for(o.funds=[],o.msg=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.contract=n.string();break;case 3:o.msg=n.bytes();break;case 5:o.funds.push(f.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},g);if(t.funds=[],t.msg=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",void 0!==e.msg&&null!==e.msg&&(t.msg=R(e.msg)),void 0!==e.funds&&null!==e.funds){var n,a=r(e.funds);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.funds.push(f.Coin.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.msg&&(t.msg=P(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map((function(e){return e?f.Coin.toJSON(e):void 0})):t.funds=[],t},fromPartial:function(e){var t=Object.assign({},g);if(t.funds=[],void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",void 0!==e.msg&&null!==e.msg?t.msg=e.msg:t.msg=new Uint8Array,void 0!==e.funds&&null!==e.funds){var n,a=r(e.funds);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.funds.push(f.Coin.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return t}};var y={};t.MsgExecuteContractResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.data=new Uint8Array;n.pos>>3===1)o.data=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},y);return t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=R(e.data)),t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=P(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var v={sender:"",contract:"",codeId:s.default.UZERO};t.MsgMigrateContract={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),e.codeId.isZero()||t.uint32(24).uint64(e.codeId),0!==e.msg.length&&t.uint32(34).bytes(e.msg),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);for(o.msg=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.contract=n.string();break;case 3:o.codeId=n.uint64();break;case 4:o.msg=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},v);return t.msg=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",void 0!==e.codeId&&null!==e.codeId?t.codeId=s.default.fromString(e.codeId):t.codeId=s.default.UZERO,void 0!==e.msg&&null!==e.msg&&(t.msg=R(e.msg)),t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.codeId&&(t.codeId=(e.codeId||s.default.UZERO).toString()),void 0!==e.msg&&(t.msg=P(void 0!==e.msg?e.msg:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},v);return void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",void 0!==e.codeId&&null!==e.codeId?t.codeId=e.codeId:t.codeId=s.default.UZERO,void 0!==e.msg&&null!==e.msg?t.msg=e.msg:t.msg=new Uint8Array,t}};var w={};t.MsgMigrateContractResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);for(o.data=new Uint8Array;n.pos>>3===1)o.data=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},w);return t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=R(e.data)),t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=P(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},w);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var k={sender:"",newAdmin:"",contract:""};t.MsgUpdateAdmin={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.newAdmin&&t.uint32(18).string(e.newAdmin),""!==e.contract&&t.uint32(26).string(e.contract),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);n.pos>>3){case 1:o.sender=n.string();break;case 2:o.newAdmin=n.string();break;case 3:o.contract=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},k);return void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.newAdmin&&null!==e.newAdmin?t.newAdmin=String(e.newAdmin):t.newAdmin="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial:function(e){var t=Object.assign({},k);return void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.newAdmin&&null!==e.newAdmin?t.newAdmin=e.newAdmin:t.newAdmin="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",t}};var A={};t.MsgUpdateAdminResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},A);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(26).string(e.contract),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},x);n.pos>>3){case 1:o.sender=n.string();break;case 3:o.contract=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},x);return void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.contract&&null!==e.contract?t.contract=String(e.contract):t.contract="",t},toJSON:function(e){var t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial:function(e){var t=Object.assign({},x);return void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.contract&&null!==e.contract?t.contract=e.contract:t.contract="",t}};var I={};t.MsgClearAdminResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},I);n.pos1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.value&&t.uint32(8).int32(e.value),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3===1)o.value=n.int32();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.value&&null!==e.value?t.value=d(e.value):t.value=0,t},toJSON:function(e){var t={};return void 0!==e.value&&(t.value=l(e.value)),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.value&&null!==e.value?t.value=e.value:t.value=0,t}};var m={permission:0,address:""};t.AccessConfig={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.permission&&t.uint32(8).int32(e.permission),""!==e.address&&t.uint32(18).string(e.address),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);n.pos>>3){case 1:o.permission=n.int32();break;case 2:o.address=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},m);return void 0!==e.permission&&null!==e.permission?t.permission=d(e.permission):t.permission=0,void 0!==e.address&&null!==e.address?t.address=String(e.address):t.address="",t},toJSON:function(e){var t={};return void 0!==e.permission&&(t.permission=l(e.permission)),void 0!==e.address&&(t.address=e.address),t},fromPartial:function(e){var t=Object.assign({},m);return void 0!==e.permission&&null!==e.permission?t.permission=e.permission:t.permission=0,void 0!==e.address&&null!==e.address?t.address=e.address:t.address="",t}};var h={instantiateDefaultPermission:0};t.Params={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.codeUploadAccess&&t.AccessConfig.encode(e.codeUploadAccess,n.uint32(10).fork()).ldelim(),0!==e.instantiateDefaultPermission&&n.uint32(16).int32(e.instantiateDefaultPermission),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},h);a.pos>>3){case 1:r.codeUploadAccess=t.AccessConfig.decode(a,a.uint32());break;case 2:r.instantiateDefaultPermission=a.int32();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},h);return void 0!==e.codeUploadAccess&&null!==e.codeUploadAccess?n.codeUploadAccess=t.AccessConfig.fromJSON(e.codeUploadAccess):n.codeUploadAccess=void 0,void 0!==e.instantiateDefaultPermission&&null!==e.instantiateDefaultPermission?n.instantiateDefaultPermission=d(e.instantiateDefaultPermission):n.instantiateDefaultPermission=0,n},toJSON:function(e){var n={};return void 0!==e.codeUploadAccess&&(n.codeUploadAccess=e.codeUploadAccess?t.AccessConfig.toJSON(e.codeUploadAccess):void 0),void 0!==e.instantiateDefaultPermission&&(n.instantiateDefaultPermission=l(e.instantiateDefaultPermission)),n},fromPartial:function(e){var n=Object.assign({},h);return void 0!==e.codeUploadAccess&&null!==e.codeUploadAccess?n.codeUploadAccess=t.AccessConfig.fromPartial(e.codeUploadAccess):n.codeUploadAccess=void 0,void 0!==e.instantiateDefaultPermission&&null!==e.instantiateDefaultPermission?n.instantiateDefaultPermission=e.instantiateDefaultPermission:n.instantiateDefaultPermission=0,n}};var g={creator:""};t.CodeInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.codeHash.length&&n.uint32(10).bytes(e.codeHash),""!==e.creator&&n.uint32(18).string(e.creator),void 0!==e.instantiateConfig&&t.AccessConfig.encode(e.instantiateConfig,n.uint32(42).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},g);for(r.codeHash=new Uint8Array;a.pos>>3){case 1:r.codeHash=a.bytes();break;case 2:r.creator=a.string();break;case 5:r.instantiateConfig=t.AccessConfig.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},g);return n.codeHash=new Uint8Array,void 0!==e.codeHash&&null!==e.codeHash&&(n.codeHash=I(e.codeHash)),void 0!==e.creator&&null!==e.creator?n.creator=String(e.creator):n.creator="",void 0!==e.instantiateConfig&&null!==e.instantiateConfig?n.instantiateConfig=t.AccessConfig.fromJSON(e.instantiateConfig):n.instantiateConfig=void 0,n},toJSON:function(e){var n={};return void 0!==e.codeHash&&(n.codeHash=S(void 0!==e.codeHash?e.codeHash:new Uint8Array)),void 0!==e.creator&&(n.creator=e.creator),void 0!==e.instantiateConfig&&(n.instantiateConfig=e.instantiateConfig?t.AccessConfig.toJSON(e.instantiateConfig):void 0),n},fromPartial:function(e){var n=Object.assign({},g);return void 0!==e.codeHash&&null!==e.codeHash?n.codeHash=e.codeHash:n.codeHash=new Uint8Array,void 0!==e.creator&&null!==e.creator?n.creator=e.creator:n.creator="",void 0!==e.instantiateConfig&&null!==e.instantiateConfig?n.instantiateConfig=t.AccessConfig.fromPartial(e.instantiateConfig):n.instantiateConfig=void 0,n}};var y={codeId:s.default.UZERO,creator:"",admin:"",label:"",ibcPortId:""};t.ContractInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return e.codeId.isZero()||n.uint32(8).uint64(e.codeId),""!==e.creator&&n.uint32(18).string(e.creator),""!==e.admin&&n.uint32(26).string(e.admin),""!==e.label&&n.uint32(34).string(e.label),void 0!==e.created&&t.AbsoluteTxPosition.encode(e.created,n.uint32(42).fork()).ldelim(),""!==e.ibcPortId&&n.uint32(50).string(e.ibcPortId),void 0!==e.extension&&u.Any.encode(e.extension,n.uint32(58).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},y);a.pos>>3){case 1:r.codeId=a.uint64();break;case 2:r.creator=a.string();break;case 3:r.admin=a.string();break;case 4:r.label=a.string();break;case 5:r.created=t.AbsoluteTxPosition.decode(a,a.uint32());break;case 6:r.ibcPortId=a.string();break;case 7:r.extension=u.Any.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},y);return void 0!==e.codeId&&null!==e.codeId?n.codeId=s.default.fromString(e.codeId):n.codeId=s.default.UZERO,void 0!==e.creator&&null!==e.creator?n.creator=String(e.creator):n.creator="",void 0!==e.admin&&null!==e.admin?n.admin=String(e.admin):n.admin="",void 0!==e.label&&null!==e.label?n.label=String(e.label):n.label="",void 0!==e.created&&null!==e.created?n.created=t.AbsoluteTxPosition.fromJSON(e.created):n.created=void 0,void 0!==e.ibcPortId&&null!==e.ibcPortId?n.ibcPortId=String(e.ibcPortId):n.ibcPortId="",void 0!==e.extension&&null!==e.extension?n.extension=u.Any.fromJSON(e.extension):n.extension=void 0,n},toJSON:function(e){var n={};return void 0!==e.codeId&&(n.codeId=(e.codeId||s.default.UZERO).toString()),void 0!==e.creator&&(n.creator=e.creator),void 0!==e.admin&&(n.admin=e.admin),void 0!==e.label&&(n.label=e.label),void 0!==e.created&&(n.created=e.created?t.AbsoluteTxPosition.toJSON(e.created):void 0),void 0!==e.ibcPortId&&(n.ibcPortId=e.ibcPortId),void 0!==e.extension&&(n.extension=e.extension?u.Any.toJSON(e.extension):void 0),n},fromPartial:function(e){var n=Object.assign({},y);return void 0!==e.codeId&&null!==e.codeId?n.codeId=e.codeId:n.codeId=s.default.UZERO,void 0!==e.creator&&null!==e.creator?n.creator=e.creator:n.creator="",void 0!==e.admin&&null!==e.admin?n.admin=e.admin:n.admin="",void 0!==e.label&&null!==e.label?n.label=e.label:n.label="",void 0!==e.created&&null!==e.created?n.created=t.AbsoluteTxPosition.fromPartial(e.created):n.created=void 0,void 0!==e.ibcPortId&&null!==e.ibcPortId?n.ibcPortId=e.ibcPortId:n.ibcPortId="",void 0!==e.extension&&null!==e.extension?n.extension=u.Any.fromPartial(e.extension):n.extension=void 0,n}};var v={operation:0,codeId:s.default.UZERO};t.ContractCodeHistoryEntry={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.operation&&n.uint32(8).int32(e.operation),e.codeId.isZero()||n.uint32(16).uint64(e.codeId),void 0!==e.updated&&t.AbsoluteTxPosition.encode(e.updated,n.uint32(26).fork()).ldelim(),0!==e.msg.length&&n.uint32(34).bytes(e.msg),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},v);for(r.msg=new Uint8Array;a.pos>>3){case 1:r.operation=a.int32();break;case 2:r.codeId=a.uint64();break;case 3:r.updated=t.AbsoluteTxPosition.decode(a,a.uint32());break;case 4:r.msg=a.bytes();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},v);return n.msg=new Uint8Array,void 0!==e.operation&&null!==e.operation?n.operation=f(e.operation):n.operation=0,void 0!==e.codeId&&null!==e.codeId?n.codeId=s.default.fromString(e.codeId):n.codeId=s.default.UZERO,void 0!==e.updated&&null!==e.updated?n.updated=t.AbsoluteTxPosition.fromJSON(e.updated):n.updated=void 0,void 0!==e.msg&&null!==e.msg&&(n.msg=I(e.msg)),n},toJSON:function(e){var n={};return void 0!==e.operation&&(n.operation=p(e.operation)),void 0!==e.codeId&&(n.codeId=(e.codeId||s.default.UZERO).toString()),void 0!==e.updated&&(n.updated=e.updated?t.AbsoluteTxPosition.toJSON(e.updated):void 0),void 0!==e.msg&&(n.msg=S(void 0!==e.msg?e.msg:new Uint8Array)),n},fromPartial:function(e){var n=Object.assign({},v);return void 0!==e.operation&&null!==e.operation?n.operation=e.operation:n.operation=0,void 0!==e.codeId&&null!==e.codeId?n.codeId=e.codeId:n.codeId=s.default.UZERO,void 0!==e.updated&&null!==e.updated?n.updated=t.AbsoluteTxPosition.fromPartial(e.updated):n.updated=void 0,void 0!==e.msg&&null!==e.msg?n.msg=e.msg:n.msg=new Uint8Array,n}};var w={blockHeight:s.default.UZERO,txIndex:s.default.UZERO};t.AbsoluteTxPosition={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return e.blockHeight.isZero()||t.uint32(8).uint64(e.blockHeight),e.txIndex.isZero()||t.uint32(16).uint64(e.txIndex),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);n.pos>>3){case 1:o.blockHeight=n.uint64();break;case 2:o.txIndex=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},w);return void 0!==e.blockHeight&&null!==e.blockHeight?t.blockHeight=s.default.fromString(e.blockHeight):t.blockHeight=s.default.UZERO,void 0!==e.txIndex&&null!==e.txIndex?t.txIndex=s.default.fromString(e.txIndex):t.txIndex=s.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.blockHeight&&(t.blockHeight=(e.blockHeight||s.default.UZERO).toString()),void 0!==e.txIndex&&(t.txIndex=(e.txIndex||s.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},w);return void 0!==e.blockHeight&&null!==e.blockHeight?t.blockHeight=e.blockHeight:t.blockHeight=s.default.UZERO,void 0!==e.txIndex&&null!==e.txIndex?t.txIndex=e.txIndex:t.txIndex=s.default.UZERO,t}};var k={};t.Model={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);for(o.key=new Uint8Array,o.value=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.value=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},k);return t.key=new Uint8Array,t.value=new Uint8Array,void 0!==e.key&&null!==e.key&&(t.key=I(e.key)),void 0!==e.value&&null!==e.value&&(t.value=I(e.value)),t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=S(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=S(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},k);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,void 0!==e.value&&null!==e.value?t.value=e.value:t.value=new Uint8Array,t}};var A=function(){if("undefined"!==typeof A)return A;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),x=A.atob||function(e){return A.Buffer.from(e,"base64").toString("binary")};function I(e){for(var t=x(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.value=new Uint8Array;n.pos>>3){case 1:o.typeUrl=n.string();break;case 2:o.value=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},s);return t.value=new Uint8Array,void 0!==e.typeUrl&&null!==e.typeUrl?t.typeUrl=String(e.typeUrl):t.typeUrl="",void 0!==e.value&&null!==e.value&&(t.value=function(e){for(var t=u(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.seconds=n.int64();break;case 2:o.nanos=n.int32();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.seconds&&null!==e.seconds?t.seconds=o.default.fromString(e.seconds):t.seconds=o.default.ZERO,void 0!==e.nanos&&null!==e.nanos?t.nanos=Number(e.nanos):t.nanos=0,t},toJSON:function(e){var t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||o.default.ZERO).toString()),void 0!==e.nanos&&(t.nanos=e.nanos),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.seconds&&null!==e.seconds?t.seconds=e.seconds:t.seconds=o.default.ZERO,void 0!==e.nanos&&null!==e.nanos?t.nanos=e.nanos:t.nanos=0,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},47478:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=t.protobufPackage=void 0;var o=a(n(29600)),r=a(n(80121));t.protobufPackage="google.protobuf";var i={seconds:o.default.ZERO,nanos:0};t.Timestamp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.seconds=n.int64();break;case 2:o.nanos=n.int32();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.seconds&&null!==e.seconds?t.seconds=o.default.fromString(e.seconds):t.seconds=o.default.ZERO,void 0!==e.nanos&&null!==e.nanos?t.nanos=Number(e.nanos):t.nanos=0,t},toJSON:function(e){var t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||o.default.ZERO).toString()),void 0!==e.nanos&&(t.nanos=e.nanos),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.seconds&&null!==e.seconds?t.seconds=e.seconds:t.seconds=o.default.ZERO,void 0!==e.nanos&&null!==e.nanos?t.nanos=e.nanos:t.nanos=0,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},22868:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121));t.protobufPackage="ibc.applications.interchain_accounts.host.v1";var s={hostEnabled:!1,allowMessages:""};t.Params={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();!0===e.hostEnabled&&t.uint32(8).bool(e.hostEnabled);var n,o=a(e.allowMessages);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(18).string(r)}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.allowMessages=[];n.pos>>3){case 1:o.hostEnabled=n.bool();break;case 2:o.allowMessages.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},s);if(t.allowMessages=[],void 0!==e.hostEnabled&&null!==e.hostEnabled?t.hostEnabled=Boolean(e.hostEnabled):t.hostEnabled=!1,void 0!==e.allowMessages&&null!==e.allowMessages){var n,o=a(e.allowMessages);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.allowMessages.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.hostEnabled&&(t.hostEnabled=e.hostEnabled),e.allowMessages?t.allowMessages=e.allowMessages.map((function(e){return e})):t.allowMessages=[],t},fromPartial:function(e){var t=Object.assign({},s);if(t.allowMessages=[],void 0!==e.hostEnabled&&null!==e.hostEnabled?t.hostEnabled=e.hostEnabled:t.hostEnabled=!1,void 0!==e.allowMessages&&null!==e.allowMessages){var n,o=a(e.allowMessages);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.allowMessages.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},68354:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.DenomTrace=t.protobufPackage=void 0;var o=a(n(29600)),r=a(n(80121));t.protobufPackage="ibc.applications.transfer.v1";var i={path:"",baseDenom:""};t.DenomTrace={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.path&&t.uint32(10).string(e.path),""!==e.baseDenom&&t.uint32(18).string(e.baseDenom),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.path=n.string();break;case 2:o.baseDenom=n.string();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.path&&null!==e.path?t.path=String(e.path):t.path="",void 0!==e.baseDenom&&null!==e.baseDenom?t.baseDenom=String(e.baseDenom):t.baseDenom="",t},toJSON:function(e){var t={};return void 0!==e.path&&(t.path=e.path),void 0!==e.baseDenom&&(t.baseDenom=e.baseDenom),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.path&&null!==e.path?t.path=e.path:t.path="",void 0!==e.baseDenom&&null!==e.baseDenom?t.baseDenom=e.baseDenom:t.baseDenom="",t}};var s={sendEnabled:!1,receiveEnabled:!1};t.Params={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return!0===e.sendEnabled&&t.uint32(8).bool(e.sendEnabled),!0===e.receiveEnabled&&t.uint32(16).bool(e.receiveEnabled),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);n.pos>>3){case 1:o.sendEnabled=n.bool();break;case 2:o.receiveEnabled=n.bool();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},s);return void 0!==e.sendEnabled&&null!==e.sendEnabled?t.sendEnabled=Boolean(e.sendEnabled):t.sendEnabled=!1,void 0!==e.receiveEnabled&&null!==e.receiveEnabled?t.receiveEnabled=Boolean(e.receiveEnabled):t.receiveEnabled=!1,t},toJSON:function(e){var t={};return void 0!==e.sendEnabled&&(t.sendEnabled=e.sendEnabled),void 0!==e.receiveEnabled&&(t.receiveEnabled=e.receiveEnabled),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.sendEnabled&&null!==e.sendEnabled?t.sendEnabled=e.sendEnabled:t.sendEnabled=!1,void 0!==e.receiveEnabled&&null!==e.receiveEnabled?t.receiveEnabled=e.receiveEnabled:t.receiveEnabled=!1,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},48688:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgTransferDesc=t.MsgDesc=t.MsgClientImpl=t.MsgTransferResponse=t.MsgTransfer=t.protobufPackage=void 0;var i=r(n(29600)),s=n(93704),c=r(n(80121)),u=n(39705),d=n(39553),l=n(82576);t.protobufPackage="ibc.applications.transfer.v1";var f={sourcePort:"",sourceChannel:"",sender:"",receiver:"",timeoutTimestamp:i.default.UZERO};t.MsgTransfer={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.sourcePort&&t.uint32(10).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(18).string(e.sourceChannel),void 0!==e.token&&u.Coin.encode(e.token,t.uint32(26).fork()).ldelim(),""!==e.sender&&t.uint32(34).string(e.sender),""!==e.receiver&&t.uint32(42).string(e.receiver),void 0!==e.timeoutHeight&&d.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),e.timeoutTimestamp.isZero()||t.uint32(56).uint64(e.timeoutTimestamp),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3){case 1:o.sourcePort=n.string();break;case 2:o.sourceChannel=n.string();break;case 3:o.token=u.Coin.decode(n,n.uint32());break;case 4:o.sender=n.string();break;case 5:o.receiver=n.string();break;case 6:o.timeoutHeight=d.Height.decode(n,n.uint32());break;case 7:o.timeoutTimestamp=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.sourcePort&&null!==e.sourcePort?t.sourcePort=String(e.sourcePort):t.sourcePort="",void 0!==e.sourceChannel&&null!==e.sourceChannel?t.sourceChannel=String(e.sourceChannel):t.sourceChannel="",void 0!==e.token&&null!==e.token?t.token=u.Coin.fromJSON(e.token):t.token=void 0,void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.receiver&&null!==e.receiver?t.receiver=String(e.receiver):t.receiver="",void 0!==e.timeoutHeight&&null!==e.timeoutHeight?t.timeoutHeight=d.Height.fromJSON(e.timeoutHeight):t.timeoutHeight=void 0,void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?t.timeoutTimestamp=i.default.fromString(e.timeoutTimestamp):t.timeoutTimestamp=i.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.token&&(t.token=e.token?u.Coin.toJSON(e.token):void 0),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.receiver&&(t.receiver=e.receiver),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?d.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||i.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.sourcePort&&null!==e.sourcePort?t.sourcePort=e.sourcePort:t.sourcePort="",void 0!==e.sourceChannel&&null!==e.sourceChannel?t.sourceChannel=e.sourceChannel:t.sourceChannel="",void 0!==e.token&&null!==e.token?t.token=u.Coin.fromPartial(e.token):t.token=void 0,void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.receiver&&null!==e.receiver?t.receiver=e.receiver:t.receiver="",void 0!==e.timeoutHeight&&null!==e.timeoutHeight?t.timeoutHeight=d.Height.fromPartial(e.timeoutHeight):t.timeoutHeight=void 0,void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?t.timeoutTimestamp=e.timeoutTimestamp:t.timeoutTimestamp=i.default.UZERO,t}};var p={};t.MsgTransferResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create()},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),""!==e.sender&&t.uint32(26).string(e.sender),""!==e.receiver&&t.uint32(34).string(e.receiver),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;case 3:o.sender=n.string();break;case 4:o.receiver=n.string();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.denom&&null!==e.denom?t.denom=String(e.denom):t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=String(e.amount):t.amount="",void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",void 0!==e.receiver&&null!==e.receiver?t.receiver=String(e.receiver):t.receiver="",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.receiver&&(t.receiver=e.receiver),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.denom&&null!==e.denom?t.denom=e.denom:t.denom="",void 0!==e.amount&&null!==e.amount?t.amount=e.amount:t.amount="",void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",void 0!==e.receiver&&null!==e.receiver?t.receiver=e.receiver:t.receiver="",t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},94734:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Acknowledgement=t.PacketId=t.PacketState=t.Packet=t.Counterparty=t.IdentifiedChannel=t.Channel=t.orderToJSON=t.orderFromJSON=t.Order=t.stateToJSON=t.stateFromJSON=t.State=t.protobufPackage=void 0;var r,i,s=o(n(29600)),c=o(n(80121)),u=n(39553);function d(e){switch(e){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return r.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return r.STATE_INIT;case 2:case"STATE_TRYOPEN":return r.STATE_TRYOPEN;case 3:case"STATE_OPEN":return r.STATE_OPEN;case 4:case"STATE_CLOSED":return r.STATE_CLOSED;default:return r.UNRECOGNIZED}}function l(e){switch(e){case r.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case r.STATE_INIT:return"STATE_INIT";case r.STATE_TRYOPEN:return"STATE_TRYOPEN";case r.STATE_OPEN:return"STATE_OPEN";case r.STATE_CLOSED:return"STATE_CLOSED";default:return"UNKNOWN"}}function f(e){switch(e){case 0:case"ORDER_NONE_UNSPECIFIED":return i.ORDER_NONE_UNSPECIFIED;case 1:case"ORDER_UNORDERED":return i.ORDER_UNORDERED;case 2:case"ORDER_ORDERED":return i.ORDER_ORDERED;default:return i.UNRECOGNIZED}}function p(e){switch(e){case i.ORDER_NONE_UNSPECIFIED:return"ORDER_NONE_UNSPECIFIED";case i.ORDER_UNORDERED:return"ORDER_UNORDERED";case i.ORDER_ORDERED:return"ORDER_ORDERED";default:return"UNKNOWN"}}t.protobufPackage="ibc.core.channel.v1",function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.STATE_CLOSED=4]="STATE_CLOSED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(r=t.State||(t.State={})),t.stateFromJSON=d,t.stateToJSON=l,function(e){e[e.ORDER_NONE_UNSPECIFIED=0]="ORDER_NONE_UNSPECIFIED",e[e.ORDER_UNORDERED=1]="ORDER_UNORDERED",e[e.ORDER_ORDERED=2]="ORDER_ORDERED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.Order||(t.Order={})),t.orderFromJSON=f,t.orderToJSON=p;var b={state:0,ordering:0,connectionHops:"",version:""};t.Channel={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();0!==e.state&&n.uint32(8).int32(e.state),0!==e.ordering&&n.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(26).fork()).ldelim();var o,r=a(e.connectionHops);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.uint32(34).string(i)}}catch(s){r.e(s)}finally{r.f()}return""!==e.version&&n.uint32(42).string(e.version),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},b);for(r.connectionHops=[];a.pos>>3){case 1:r.state=a.int32();break;case 2:r.ordering=a.int32();break;case 3:r.counterparty=t.Counterparty.decode(a,a.uint32());break;case 4:r.connectionHops.push(a.string());break;case 5:r.version=a.string();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},b);if(n.connectionHops=[],void 0!==e.state&&null!==e.state?n.state=d(e.state):n.state=0,void 0!==e.ordering&&null!==e.ordering?n.ordering=f(e.ordering):n.ordering=0,void 0!==e.counterparty&&null!==e.counterparty?n.counterparty=t.Counterparty.fromJSON(e.counterparty):n.counterparty=void 0,void 0!==e.connectionHops&&null!==e.connectionHops){var o,r=a(e.connectionHops);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.connectionHops.push(String(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.version&&null!==e.version?n.version=String(e.version):n.version="",n},toJSON:function(e){var n={};return void 0!==e.state&&(n.state=l(e.state)),void 0!==e.ordering&&(n.ordering=p(e.ordering)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?n.connectionHops=e.connectionHops.map((function(e){return e})):n.connectionHops=[],void 0!==e.version&&(n.version=e.version),n},fromPartial:function(e){var n=Object.assign({},b);if(n.connectionHops=[],void 0!==e.state&&null!==e.state?n.state=e.state:n.state=0,void 0!==e.ordering&&null!==e.ordering?n.ordering=e.ordering:n.ordering=0,void 0!==e.counterparty&&null!==e.counterparty?n.counterparty=t.Counterparty.fromPartial(e.counterparty):n.counterparty=void 0,void 0!==e.connectionHops&&null!==e.connectionHops){var o,r=a(e.connectionHops);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.connectionHops.push(i)}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.version&&null!==e.version?n.version=e.version:n.version="",n}};var m={state:0,ordering:0,connectionHops:"",version:"",portId:"",channelId:""};t.IdentifiedChannel={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();0!==e.state&&n.uint32(8).int32(e.state),0!==e.ordering&&n.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(26).fork()).ldelim();var o,r=a(e.connectionHops);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.uint32(34).string(i)}}catch(s){r.e(s)}finally{r.f()}return""!==e.version&&n.uint32(42).string(e.version),""!==e.portId&&n.uint32(50).string(e.portId),""!==e.channelId&&n.uint32(58).string(e.channelId),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},m);for(r.connectionHops=[];a.pos>>3){case 1:r.state=a.int32();break;case 2:r.ordering=a.int32();break;case 3:r.counterparty=t.Counterparty.decode(a,a.uint32());break;case 4:r.connectionHops.push(a.string());break;case 5:r.version=a.string();break;case 6:r.portId=a.string();break;case 7:r.channelId=a.string();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},m);if(n.connectionHops=[],void 0!==e.state&&null!==e.state?n.state=d(e.state):n.state=0,void 0!==e.ordering&&null!==e.ordering?n.ordering=f(e.ordering):n.ordering=0,void 0!==e.counterparty&&null!==e.counterparty?n.counterparty=t.Counterparty.fromJSON(e.counterparty):n.counterparty=void 0,void 0!==e.connectionHops&&null!==e.connectionHops){var o,r=a(e.connectionHops);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.connectionHops.push(String(i))}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.version&&null!==e.version?n.version=String(e.version):n.version="",void 0!==e.portId&&null!==e.portId?n.portId=String(e.portId):n.portId="",void 0!==e.channelId&&null!==e.channelId?n.channelId=String(e.channelId):n.channelId="",n},toJSON:function(e){var n={};return void 0!==e.state&&(n.state=l(e.state)),void 0!==e.ordering&&(n.ordering=p(e.ordering)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?n.connectionHops=e.connectionHops.map((function(e){return e})):n.connectionHops=[],void 0!==e.version&&(n.version=e.version),void 0!==e.portId&&(n.portId=e.portId),void 0!==e.channelId&&(n.channelId=e.channelId),n},fromPartial:function(e){var n=Object.assign({},m);if(n.connectionHops=[],void 0!==e.state&&null!==e.state?n.state=e.state:n.state=0,void 0!==e.ordering&&null!==e.ordering?n.ordering=e.ordering:n.ordering=0,void 0!==e.counterparty&&null!==e.counterparty?n.counterparty=t.Counterparty.fromPartial(e.counterparty):n.counterparty=void 0,void 0!==e.connectionHops&&null!==e.connectionHops){var o,r=a(e.connectionHops);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.connectionHops.push(i)}}catch(s){r.e(s)}finally{r.f()}}return void 0!==e.version&&null!==e.version?n.version=e.version:n.version="",void 0!==e.portId&&null!==e.portId?n.portId=e.portId:n.portId="",void 0!==e.channelId&&null!==e.channelId?n.channelId=e.channelId:n.channelId="",n}};var h={portId:"",channelId:""};t.Counterparty={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);return void 0!==e.portId&&null!==e.portId?t.portId=String(e.portId):t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=String(e.channelId):t.channelId="",t},toJSON:function(e){var t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial:function(e){var t=Object.assign({},h);return void 0!==e.portId&&null!==e.portId?t.portId=e.portId:t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=e.channelId:t.channelId="",t}};var g={sequence:s.default.UZERO,sourcePort:"",sourceChannel:"",destinationPort:"",destinationChannel:"",timeoutTimestamp:s.default.UZERO};t.Packet={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return e.sequence.isZero()||t.uint32(8).uint64(e.sequence),""!==e.sourcePort&&t.uint32(18).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(26).string(e.sourceChannel),""!==e.destinationPort&&t.uint32(34).string(e.destinationPort),""!==e.destinationChannel&&t.uint32(42).string(e.destinationChannel),0!==e.data.length&&t.uint32(50).bytes(e.data),void 0!==e.timeoutHeight&&u.Height.encode(e.timeoutHeight,t.uint32(58).fork()).ldelim(),e.timeoutTimestamp.isZero()||t.uint32(64).uint64(e.timeoutTimestamp),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);for(o.data=new Uint8Array;n.pos>>3){case 1:o.sequence=n.uint64();break;case 2:o.sourcePort=n.string();break;case 3:o.sourceChannel=n.string();break;case 4:o.destinationPort=n.string();break;case 5:o.destinationChannel=n.string();break;case 6:o.data=n.bytes();break;case 7:o.timeoutHeight=u.Height.decode(n,n.uint32());break;case 8:o.timeoutTimestamp=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},g);return t.data=new Uint8Array,void 0!==e.sequence&&null!==e.sequence?t.sequence=s.default.fromString(e.sequence):t.sequence=s.default.UZERO,void 0!==e.sourcePort&&null!==e.sourcePort?t.sourcePort=String(e.sourcePort):t.sourcePort="",void 0!==e.sourceChannel&&null!==e.sourceChannel?t.sourceChannel=String(e.sourceChannel):t.sourceChannel="",void 0!==e.destinationPort&&null!==e.destinationPort?t.destinationPort=String(e.destinationPort):t.destinationPort="",void 0!==e.destinationChannel&&null!==e.destinationChannel?t.destinationChannel=String(e.destinationChannel):t.destinationChannel="",void 0!==e.data&&null!==e.data&&(t.data=x(e.data)),void 0!==e.timeoutHeight&&null!==e.timeoutHeight?t.timeoutHeight=u.Height.fromJSON(e.timeoutHeight):t.timeoutHeight=void 0,void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?t.timeoutTimestamp=s.default.fromString(e.timeoutTimestamp):t.timeoutTimestamp=s.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.sequence&&(t.sequence=(e.sequence||s.default.UZERO).toString()),void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.destinationPort&&(t.destinationPort=e.destinationPort),void 0!==e.destinationChannel&&(t.destinationChannel=e.destinationChannel),void 0!==e.data&&(t.data=T(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?u.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||s.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.sequence&&null!==e.sequence?t.sequence=e.sequence:t.sequence=s.default.UZERO,void 0!==e.sourcePort&&null!==e.sourcePort?t.sourcePort=e.sourcePort:t.sourcePort="",void 0!==e.sourceChannel&&null!==e.sourceChannel?t.sourceChannel=e.sourceChannel:t.sourceChannel="",void 0!==e.destinationPort&&null!==e.destinationPort?t.destinationPort=e.destinationPort:t.destinationPort="",void 0!==e.destinationChannel&&null!==e.destinationChannel?t.destinationChannel=e.destinationChannel:t.destinationChannel="",void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,void 0!==e.timeoutHeight&&null!==e.timeoutHeight?t.timeoutHeight=u.Height.fromPartial(e.timeoutHeight):t.timeoutHeight=void 0,void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?t.timeoutTimestamp=e.timeoutTimestamp:t.timeoutTimestamp=s.default.UZERO,t}};var y={portId:"",channelId:"",sequence:s.default.UZERO};t.PacketState={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence.isZero()||t.uint32(24).uint64(e.sequence),0!==e.data.length&&t.uint32(34).bytes(e.data),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.data=new Uint8Array;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.sequence=n.uint64();break;case 4:o.data=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return t.data=new Uint8Array,void 0!==e.portId&&null!==e.portId?t.portId=String(e.portId):t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=String(e.channelId):t.channelId="",void 0!==e.sequence&&null!==e.sequence?t.sequence=s.default.fromString(e.sequence):t.sequence=s.default.UZERO,void 0!==e.data&&null!==e.data&&(t.data=x(e.data)),t},toJSON:function(e){var t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||s.default.UZERO).toString()),void 0!==e.data&&(t.data=T(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.portId&&null!==e.portId?t.portId=e.portId:t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=e.channelId:t.channelId="",void 0!==e.sequence&&null!==e.sequence?t.sequence=e.sequence:t.sequence=s.default.UZERO,void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var v={portId:"",channelId:"",sequence:s.default.UZERO};t.PacketId={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence.isZero()||t.uint32(24).uint64(e.sequence),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.sequence=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},v);return void 0!==e.portId&&null!==e.portId?t.portId=String(e.portId):t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=String(e.channelId):t.channelId="",void 0!==e.sequence&&null!==e.sequence?t.sequence=s.default.fromString(e.sequence):t.sequence=s.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||s.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},v);return void 0!==e.portId&&null!==e.portId?t.portId=e.portId:t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=e.channelId:t.channelId="",void 0!==e.sequence&&null!==e.sequence?t.sequence=e.sequence:t.sequence=s.default.UZERO,t}};var w={};t.Acknowledgement={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.result&&t.uint32(170).bytes(e.result),void 0!==e.error&&t.uint32(178).string(e.error),t},decode:function(e,t){for(var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);n.pos>>3){case 21:o.result=n.bytes();break;case 22:o.error=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},w);return void 0!==e.result&&null!==e.result&&(t.result=x(e.result)),void 0!==e.error&&null!==e.error?t.error=String(e.error):t.error=void 0,t},toJSON:function(e){var t={};return void 0!==e.result&&(t.result=void 0!==e.result?T(e.result):void 0),void 0!==e.error&&(t.error=e.error),t},fromPartial:function(e){var t=Object.assign({},w);return void 0!==e.result&&null!==e.result?t.result=e.result:t.result=void 0,void 0!==e.error&&null!==e.error?t.error=e.error:t.error=void 0,t}};var k=function(){if("undefined"!==typeof k)return k;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),A=k.atob||function(e){return k.Buffer.from(e,"base64").toString("binary")};function x(e){for(var t=A(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),void 0!==e.channel&&l.Channel.encode(e.channel,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channel=l.Channel.decode(n,n.uint32());break;case 3:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);return void 0!==e.portId&&null!==e.portId?t.portId=String(e.portId):t.portId="",void 0!==e.channel&&null!==e.channel?t.channel=l.Channel.fromJSON(e.channel):t.channel=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channel&&(t.channel=e.channel?l.Channel.toJSON(e.channel):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},h);return void 0!==e.portId&&null!==e.portId?t.portId=e.portId:t.portId="",void 0!==e.channel&&null!==e.channel?t.channel=l.Channel.fromPartial(e.channel):t.channel=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var g={channelId:""};t.MsgChannelOpenInitResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return""!==e.channelId&&t.uint32(10).string(e.channelId),t},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos>>3===1)o.channelId=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},g);return void 0!==e.channelId&&null!==e.channelId?t.channelId=String(e.channelId):t.channelId="",t},toJSON:function(e){var t={};return void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.channelId&&null!==e.channelId?t.channelId=e.channelId:t.channelId="",t}};var y={portId:"",previousChannelId:"",counterpartyVersion:"",signer:""};t.MsgChannelOpenTry={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.previousChannelId&&t.uint32(18).string(e.previousChannelId),void 0!==e.channel&&l.Channel.encode(e.channel,t.uint32(26).fork()).ldelim(),""!==e.counterpartyVersion&&t.uint32(34).string(e.counterpartyVersion),0!==e.proofInit.length&&t.uint32(42).bytes(e.proofInit),void 0!==e.proofHeight&&f.Height.encode(e.proofHeight,t.uint32(50).fork()).ldelim(),""!==e.signer&&t.uint32(58).string(e.signer),t},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.proofInit=new Uint8Array;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.previousChannelId=n.string();break;case 3:o.channel=l.Channel.decode(n,n.uint32());break;case 4:o.counterpartyVersion=n.string();break;case 5:o.proofInit=n.bytes();break;case 6:o.proofHeight=f.Height.decode(n,n.uint32());break;case 7:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return t.proofInit=new Uint8Array,void 0!==e.portId&&null!==e.portId?t.portId=String(e.portId):t.portId="",void 0!==e.previousChannelId&&null!==e.previousChannelId?t.previousChannelId=String(e.previousChannelId):t.previousChannelId="",void 0!==e.channel&&null!==e.channel?t.channel=l.Channel.fromJSON(e.channel):t.channel=void 0,void 0!==e.counterpartyVersion&&null!==e.counterpartyVersion?t.counterpartyVersion=String(e.counterpartyVersion):t.counterpartyVersion="",void 0!==e.proofInit&&null!==e.proofInit&&(t.proofInit=j(e.proofInit)),void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromJSON(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.previousChannelId&&(t.previousChannelId=e.previousChannelId),void 0!==e.channel&&(t.channel=e.channel?l.Channel.toJSON(e.channel):void 0),void 0!==e.counterpartyVersion&&(t.counterpartyVersion=e.counterpartyVersion),void 0!==e.proofInit&&(t.proofInit=G(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?f.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.portId&&null!==e.portId?t.portId=e.portId:t.portId="",void 0!==e.previousChannelId&&null!==e.previousChannelId?t.previousChannelId=e.previousChannelId:t.previousChannelId="",void 0!==e.channel&&null!==e.channel?t.channel=l.Channel.fromPartial(e.channel):t.channel=void 0,void 0!==e.counterpartyVersion&&null!==e.counterpartyVersion?t.counterpartyVersion=e.counterpartyVersion:t.counterpartyVersion="",void 0!==e.proofInit&&null!==e.proofInit?t.proofInit=e.proofInit:t.proofInit=new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromPartial(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var v={};t.MsgChannelOpenTryResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create()},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);n.pos1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.counterpartyChannelId&&t.uint32(26).string(e.counterpartyChannelId),""!==e.counterpartyVersion&&t.uint32(34).string(e.counterpartyVersion),0!==e.proofTry.length&&t.uint32(42).bytes(e.proofTry),void 0!==e.proofHeight&&f.Height.encode(e.proofHeight,t.uint32(50).fork()).ldelim(),""!==e.signer&&t.uint32(58).string(e.signer),t},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);for(o.proofTry=new Uint8Array;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.counterpartyChannelId=n.string();break;case 4:o.counterpartyVersion=n.string();break;case 5:o.proofTry=n.bytes();break;case 6:o.proofHeight=f.Height.decode(n,n.uint32());break;case 7:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},w);return t.proofTry=new Uint8Array,void 0!==e.portId&&null!==e.portId?t.portId=String(e.portId):t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=String(e.channelId):t.channelId="",void 0!==e.counterpartyChannelId&&null!==e.counterpartyChannelId?t.counterpartyChannelId=String(e.counterpartyChannelId):t.counterpartyChannelId="",void 0!==e.counterpartyVersion&&null!==e.counterpartyVersion?t.counterpartyVersion=String(e.counterpartyVersion):t.counterpartyVersion="",void 0!==e.proofTry&&null!==e.proofTry&&(t.proofTry=j(e.proofTry)),void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromJSON(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.counterpartyChannelId&&(t.counterpartyChannelId=e.counterpartyChannelId),void 0!==e.counterpartyVersion&&(t.counterpartyVersion=e.counterpartyVersion),void 0!==e.proofTry&&(t.proofTry=G(void 0!==e.proofTry?e.proofTry:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?f.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},w);return void 0!==e.portId&&null!==e.portId?t.portId=e.portId:t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=e.channelId:t.channelId="",void 0!==e.counterpartyChannelId&&null!==e.counterpartyChannelId?t.counterpartyChannelId=e.counterpartyChannelId:t.counterpartyChannelId="",void 0!==e.counterpartyVersion&&null!==e.counterpartyVersion?t.counterpartyVersion=e.counterpartyVersion:t.counterpartyVersion="",void 0!==e.proofTry&&null!==e.proofTry?t.proofTry=e.proofTry:t.proofTry=new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromPartial(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var k={};t.MsgChannelOpenAckResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create()},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);n.pos1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),0!==e.proofAck.length&&t.uint32(26).bytes(e.proofAck),void 0!==e.proofHeight&&f.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},A);for(o.proofAck=new Uint8Array;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.proofAck=n.bytes();break;case 4:o.proofHeight=f.Height.decode(n,n.uint32());break;case 5:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},A);return t.proofAck=new Uint8Array,void 0!==e.portId&&null!==e.portId?t.portId=String(e.portId):t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=String(e.channelId):t.channelId="",void 0!==e.proofAck&&null!==e.proofAck&&(t.proofAck=j(e.proofAck)),void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromJSON(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.proofAck&&(t.proofAck=G(void 0!==e.proofAck?e.proofAck:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?f.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},A);return void 0!==e.portId&&null!==e.portId?t.portId=e.portId:t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=e.channelId:t.channelId="",void 0!==e.proofAck&&null!==e.proofAck?t.proofAck=e.proofAck:t.proofAck=new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromPartial(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var x={};t.MsgChannelOpenConfirmResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create()},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},x);n.pos1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.signer&&t.uint32(26).string(e.signer),t},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},I);n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},I);return void 0!==e.portId&&null!==e.portId?t.portId=String(e.portId):t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=String(e.channelId):t.channelId="",void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},I);return void 0!==e.portId&&null!==e.portId?t.portId=e.portId:t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=e.channelId:t.channelId="",void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var T={};t.MsgChannelCloseInitResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create()},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},T);n.pos1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),0!==e.proofInit.length&&t.uint32(26).bytes(e.proofInit),void 0!==e.proofHeight&&f.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},S);for(o.proofInit=new Uint8Array;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.proofInit=n.bytes();break;case 4:o.proofHeight=f.Height.decode(n,n.uint32());break;case 5:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},S);return t.proofInit=new Uint8Array,void 0!==e.portId&&null!==e.portId?t.portId=String(e.portId):t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=String(e.channelId):t.channelId="",void 0!==e.proofInit&&null!==e.proofInit&&(t.proofInit=j(e.proofInit)),void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromJSON(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.proofInit&&(t.proofInit=G(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?f.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},S);return void 0!==e.portId&&null!==e.portId?t.portId=e.portId:t.portId="",void 0!==e.channelId&&null!==e.channelId?t.channelId=e.channelId:t.channelId="",void 0!==e.proofInit&&null!==e.proofInit?t.proofInit=e.proofInit:t.proofInit=new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromPartial(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var C={};t.MsgChannelCloseConfirmResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create()},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},C);n.pos1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return void 0!==e.packet&&l.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofCommitment.length&&t.uint32(18).bytes(e.proofCommitment),void 0!==e.proofHeight&&f.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),""!==e.signer&&t.uint32(34).string(e.signer),t},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},E);for(o.proofCommitment=new Uint8Array;n.pos>>3){case 1:o.packet=l.Packet.decode(n,n.uint32());break;case 2:o.proofCommitment=n.bytes();break;case 3:o.proofHeight=f.Height.decode(n,n.uint32());break;case 4:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},E);return t.proofCommitment=new Uint8Array,void 0!==e.packet&&null!==e.packet?t.packet=l.Packet.fromJSON(e.packet):t.packet=void 0,void 0!==e.proofCommitment&&null!==e.proofCommitment&&(t.proofCommitment=j(e.proofCommitment)),void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromJSON(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.packet&&(t.packet=e.packet?l.Packet.toJSON(e.packet):void 0),void 0!==e.proofCommitment&&(t.proofCommitment=G(void 0!==e.proofCommitment?e.proofCommitment:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?f.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},E);return void 0!==e.packet&&null!==e.packet?t.packet=l.Packet.fromPartial(e.packet):t.packet=void 0,void 0!==e.proofCommitment&&null!==e.proofCommitment?t.proofCommitment=e.proofCommitment:t.proofCommitment=new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromPartial(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var R={result:0};t.MsgRecvPacketResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},R);n.pos>>3===1)o.result=n.int32();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},R);return void 0!==e.result&&null!==e.result?t.result=b(e.result):t.result=0,t},toJSON:function(e){var t={};return void 0!==e.result&&(t.result=m(e.result)),t},fromPartial:function(e){var t=Object.assign({},R);return void 0!==e.result&&null!==e.result?t.result=e.result:t.result=0,t}};var M={nextSequenceRecv:c.default.UZERO,signer:""};t.MsgTimeout={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return void 0!==e.packet&&l.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofUnreceived.length&&t.uint32(18).bytes(e.proofUnreceived),void 0!==e.proofHeight&&f.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),e.nextSequenceRecv.isZero()||t.uint32(32).uint64(e.nextSequenceRecv),""!==e.signer&&t.uint32(42).string(e.signer),t},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},M);for(o.proofUnreceived=new Uint8Array;n.pos>>3){case 1:o.packet=l.Packet.decode(n,n.uint32());break;case 2:o.proofUnreceived=n.bytes();break;case 3:o.proofHeight=f.Height.decode(n,n.uint32());break;case 4:o.nextSequenceRecv=n.uint64();break;case 5:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},M);return t.proofUnreceived=new Uint8Array,void 0!==e.packet&&null!==e.packet?t.packet=l.Packet.fromJSON(e.packet):t.packet=void 0,void 0!==e.proofUnreceived&&null!==e.proofUnreceived&&(t.proofUnreceived=j(e.proofUnreceived)),void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromJSON(e.proofHeight):t.proofHeight=void 0,void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv?t.nextSequenceRecv=c.default.fromString(e.nextSequenceRecv):t.nextSequenceRecv=c.default.UZERO,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.packet&&(t.packet=e.packet?l.Packet.toJSON(e.packet):void 0),void 0!==e.proofUnreceived&&(t.proofUnreceived=G(void 0!==e.proofUnreceived?e.proofUnreceived:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?f.Height.toJSON(e.proofHeight):void 0),void 0!==e.nextSequenceRecv&&(t.nextSequenceRecv=(e.nextSequenceRecv||c.default.UZERO).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},M);return void 0!==e.packet&&null!==e.packet?t.packet=l.Packet.fromPartial(e.packet):t.packet=void 0,void 0!==e.proofUnreceived&&null!==e.proofUnreceived?t.proofUnreceived=e.proofUnreceived:t.proofUnreceived=new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromPartial(e.proofHeight):t.proofHeight=void 0,void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv?t.nextSequenceRecv=e.nextSequenceRecv:t.nextSequenceRecv=c.default.UZERO,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var P={result:0};t.MsgTimeoutResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},P);n.pos>>3===1)o.result=n.int32();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},P);return void 0!==e.result&&null!==e.result?t.result=b(e.result):t.result=0,t},toJSON:function(e){var t={};return void 0!==e.result&&(t.result=m(e.result)),t},fromPartial:function(e){var t=Object.assign({},P);return void 0!==e.result&&null!==e.result?t.result=e.result:t.result=0,t}};var U={nextSequenceRecv:c.default.UZERO,signer:""};t.MsgTimeoutOnClose={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return void 0!==e.packet&&l.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofUnreceived.length&&t.uint32(18).bytes(e.proofUnreceived),0!==e.proofClose.length&&t.uint32(26).bytes(e.proofClose),void 0!==e.proofHeight&&f.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),e.nextSequenceRecv.isZero()||t.uint32(40).uint64(e.nextSequenceRecv),""!==e.signer&&t.uint32(50).string(e.signer),t},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},U);for(o.proofUnreceived=new Uint8Array,o.proofClose=new Uint8Array;n.pos>>3){case 1:o.packet=l.Packet.decode(n,n.uint32());break;case 2:o.proofUnreceived=n.bytes();break;case 3:o.proofClose=n.bytes();break;case 4:o.proofHeight=f.Height.decode(n,n.uint32());break;case 5:o.nextSequenceRecv=n.uint64();break;case 6:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},U);return t.proofUnreceived=new Uint8Array,t.proofClose=new Uint8Array,void 0!==e.packet&&null!==e.packet?t.packet=l.Packet.fromJSON(e.packet):t.packet=void 0,void 0!==e.proofUnreceived&&null!==e.proofUnreceived&&(t.proofUnreceived=j(e.proofUnreceived)),void 0!==e.proofClose&&null!==e.proofClose&&(t.proofClose=j(e.proofClose)),void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromJSON(e.proofHeight):t.proofHeight=void 0,void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv?t.nextSequenceRecv=c.default.fromString(e.nextSequenceRecv):t.nextSequenceRecv=c.default.UZERO,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.packet&&(t.packet=e.packet?l.Packet.toJSON(e.packet):void 0),void 0!==e.proofUnreceived&&(t.proofUnreceived=G(void 0!==e.proofUnreceived?e.proofUnreceived:new Uint8Array)),void 0!==e.proofClose&&(t.proofClose=G(void 0!==e.proofClose?e.proofClose:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?f.Height.toJSON(e.proofHeight):void 0),void 0!==e.nextSequenceRecv&&(t.nextSequenceRecv=(e.nextSequenceRecv||c.default.UZERO).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},U);return void 0!==e.packet&&null!==e.packet?t.packet=l.Packet.fromPartial(e.packet):t.packet=void 0,void 0!==e.proofUnreceived&&null!==e.proofUnreceived?t.proofUnreceived=e.proofUnreceived:t.proofUnreceived=new Uint8Array,void 0!==e.proofClose&&null!==e.proofClose?t.proofClose=e.proofClose:t.proofClose=new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromPartial(e.proofHeight):t.proofHeight=void 0,void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv?t.nextSequenceRecv=e.nextSequenceRecv:t.nextSequenceRecv=c.default.UZERO,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var _={result:0};t.MsgTimeoutOnCloseResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},_);n.pos>>3===1)o.result=n.int32();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},_);return void 0!==e.result&&null!==e.result?t.result=b(e.result):t.result=0,t},toJSON:function(e){var t={};return void 0!==e.result&&(t.result=m(e.result)),t},fromPartial:function(e){var t=Object.assign({},_);return void 0!==e.result&&null!==e.result?t.result=e.result:t.result=0,t}};var B={signer:""};t.MsgAcknowledgement={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return void 0!==e.packet&&l.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.acknowledgement.length&&t.uint32(18).bytes(e.acknowledgement),0!==e.proofAcked.length&&t.uint32(26).bytes(e.proofAcked),void 0!==e.proofHeight&&f.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t},decode:function(e,t){var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},B);for(o.acknowledgement=new Uint8Array,o.proofAcked=new Uint8Array;n.pos>>3){case 1:o.packet=l.Packet.decode(n,n.uint32());break;case 2:o.acknowledgement=n.bytes();break;case 3:o.proofAcked=n.bytes();break;case 4:o.proofHeight=f.Height.decode(n,n.uint32());break;case 5:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},B);return t.acknowledgement=new Uint8Array,t.proofAcked=new Uint8Array,void 0!==e.packet&&null!==e.packet?t.packet=l.Packet.fromJSON(e.packet):t.packet=void 0,void 0!==e.acknowledgement&&null!==e.acknowledgement&&(t.acknowledgement=j(e.acknowledgement)),void 0!==e.proofAcked&&null!==e.proofAcked&&(t.proofAcked=j(e.proofAcked)),void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromJSON(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.packet&&(t.packet=e.packet?l.Packet.toJSON(e.packet):void 0),void 0!==e.acknowledgement&&(t.acknowledgement=G(void 0!==e.acknowledgement?e.acknowledgement:new Uint8Array)),void 0!==e.proofAcked&&(t.proofAcked=G(void 0!==e.proofAcked?e.proofAcked:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?f.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},B);return void 0!==e.packet&&null!==e.packet?t.packet=l.Packet.fromPartial(e.packet):t.packet=void 0,void 0!==e.acknowledgement&&null!==e.acknowledgement?t.acknowledgement=e.acknowledgement:t.acknowledgement=new Uint8Array,void 0!==e.proofAcked&&null!==e.proofAcked?t.proofAcked=e.proofAcked:t.proofAcked=new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromPartial(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var D={result:0};t.MsgAcknowledgementResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.default.Writer.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode:function(e,t){for(var n=e instanceof d.default.Reader?e:new d.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},D);n.pos>>3===1)o.result=n.int32();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},D);return void 0!==e.result&&null!==e.result?t.result=b(e.result):t.result=0,t},toJSON:function(e){var t={};return void 0!==e.result&&(t.result=m(e.result)),t},fromPartial:function(e){var t=Object.assign({},D);return void 0!==e.result&&null!==e.result?t.result=e.result:t.result=0,t}};var N=function(){function e(t){o(this,e),this.rpc=t,this.ChannelOpenInit=this.ChannelOpenInit.bind(this),this.ChannelOpenTry=this.ChannelOpenTry.bind(this),this.ChannelOpenAck=this.ChannelOpenAck.bind(this),this.ChannelOpenConfirm=this.ChannelOpenConfirm.bind(this),this.ChannelCloseInit=this.ChannelCloseInit.bind(this),this.ChannelCloseConfirm=this.ChannelCloseConfirm.bind(this),this.RecvPacket=this.RecvPacket.bind(this),this.Timeout=this.Timeout.bind(this),this.TimeoutOnClose=this.TimeoutOnClose.bind(this),this.Acknowledgement=this.Acknowledgement.bind(this)}return r(e,[{key:"ChannelOpenInit",value:function(e,n){return this.rpc.unary(t.MsgChannelOpenInitDesc,t.MsgChannelOpenInit.fromPartial(e),n)}},{key:"ChannelOpenTry",value:function(e,n){return this.rpc.unary(t.MsgChannelOpenTryDesc,t.MsgChannelOpenTry.fromPartial(e),n)}},{key:"ChannelOpenAck",value:function(e,n){return this.rpc.unary(t.MsgChannelOpenAckDesc,t.MsgChannelOpenAck.fromPartial(e),n)}},{key:"ChannelOpenConfirm",value:function(e,n){return this.rpc.unary(t.MsgChannelOpenConfirmDesc,t.MsgChannelOpenConfirm.fromPartial(e),n)}},{key:"ChannelCloseInit",value:function(e,n){return this.rpc.unary(t.MsgChannelCloseInitDesc,t.MsgChannelCloseInit.fromPartial(e),n)}},{key:"ChannelCloseConfirm",value:function(e,n){return this.rpc.unary(t.MsgChannelCloseConfirmDesc,t.MsgChannelCloseConfirm.fromPartial(e),n)}},{key:"RecvPacket",value:function(e,n){return this.rpc.unary(t.MsgRecvPacketDesc,t.MsgRecvPacket.fromPartial(e),n)}},{key:"Timeout",value:function(e,n){return this.rpc.unary(t.MsgTimeoutDesc,t.MsgTimeout.fromPartial(e),n)}},{key:"TimeoutOnClose",value:function(e,n){return this.rpc.unary(t.MsgTimeoutOnCloseDesc,t.MsgTimeoutOnClose.fromPartial(e),n)}},{key:"Acknowledgement",value:function(e,n){return this.rpc.unary(t.MsgAcknowledgementDesc,t.MsgAcknowledgement.fromPartial(e),n)}}]),e}();t.MsgClientImpl=N,t.MsgDesc={serviceName:"ibc.core.channel.v1.Msg"},t.MsgChannelOpenInitDesc={methodName:"ChannelOpenInit",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgChannelOpenInit.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgChannelOpenInitResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgChannelOpenTryDesc={methodName:"ChannelOpenTry",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgChannelOpenTry.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgChannelOpenTryResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgChannelOpenAckDesc={methodName:"ChannelOpenAck",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgChannelOpenAck.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgChannelOpenAckResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgChannelOpenConfirmDesc={methodName:"ChannelOpenConfirm",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgChannelOpenConfirm.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgChannelOpenConfirmResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgChannelCloseInitDesc={methodName:"ChannelCloseInit",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgChannelCloseInit.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgChannelCloseInitResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgChannelCloseConfirmDesc={methodName:"ChannelCloseConfirm",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgChannelCloseConfirm.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgChannelCloseConfirmResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgRecvPacketDesc={methodName:"RecvPacket",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgRecvPacket.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgRecvPacketResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgTimeoutDesc={methodName:"Timeout",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgTimeout.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgTimeoutResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgTimeoutOnCloseDesc={methodName:"TimeoutOnClose",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgTimeoutOnClose.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgTimeoutOnCloseResponse.decode(e)),{toObject:function(){return this}})}}},t.MsgAcknowledgementDesc={methodName:"Acknowledgement",service:t.MsgDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.MsgAcknowledgement.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.MsgAcknowledgementResponse.decode(e)),{toObject:function(){return this}})}}};var O=function(){function e(t,n){o(this,e),this.host=t,this.options=n}return r(e,[{key:"unary",value:function(e,t,n){var a,o=this,r=Object.assign(Object.assign({},t),e.requestType),i=n&&this.options.metadata?new p.BrowserHeaders(Object.assign(Object.assign({},null===(a=this.options)||void 0===a?void 0:a.metadata.headersMap),null===n||void 0===n?void 0:n.headersMap)):n||this.options.metadata;return new Promise((function(t,n){u.grpc.unary(e,{request:r,host:o.host,metadata:i,transport:o.options.transport,debug:o.options.debug,onEnd:function(e){if(e.status===u.grpc.Code.OK)t(e.message);else{var a=new Error(e.statusMessage);a.code=e.status,a.metadata=e.trailers,n(a)}}})}))}}]),e}();t.GrpcWebImpl=O;var F=function(){if("undefined"!==typeof F)return F;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),L=F.atob||function(e){return F.Buffer.from(e,"base64").toString("binary")};function j(e){for(var t=L(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&s.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.clientState=s.Any.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.clientId&&null!==e.clientId?t.clientId=String(e.clientId):t.clientId="",void 0!==e.clientState&&null!==e.clientState?t.clientState=s.Any.fromJSON(e.clientState):t.clientState=void 0,t},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?s.Any.toJSON(e.clientState):void 0),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.clientId&&null!==e.clientId?t.clientId=e.clientId:t.clientId="",void 0!==e.clientState&&null!==e.clientState?t.clientState=s.Any.fromPartial(e.clientState):t.clientState=void 0,t}};var d={};t.ConsensusStateWithHeight={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.height&&t.Height.encode(e.height,n.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&s.Any.encode(e.consensusState,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},d);a.pos>>3){case 1:r.height=t.Height.decode(a,a.uint32());break;case 2:r.consensusState=s.Any.decode(a,a.uint32());break;default:a.skipType(7&c)}}return r},fromJSON:function(e){var n=Object.assign({},d);return void 0!==e.height&&null!==e.height?n.height=t.Height.fromJSON(e.height):n.height=void 0,void 0!==e.consensusState&&null!==e.consensusState?n.consensusState=s.Any.fromJSON(e.consensusState):n.consensusState=void 0,n},toJSON:function(e){var n={};return void 0!==e.height&&(n.height=e.height?t.Height.toJSON(e.height):void 0),void 0!==e.consensusState&&(n.consensusState=e.consensusState?s.Any.toJSON(e.consensusState):void 0),n},fromPartial:function(e){var n=Object.assign({},d);return void 0!==e.height&&null!==e.height?n.height=t.Height.fromPartial(e.height):n.height=void 0,void 0!==e.consensusState&&null!==e.consensusState?n.consensusState=s.Any.fromPartial(e.consensusState):n.consensusState=void 0,n}};var l={clientId:""};t.ClientConsensusStates={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.clientId&&n.uint32(10).string(e.clientId);var o,r=a(e.consensusStates);try{for(r.s();!(o=r.n()).done;){var s=o.value;t.ConsensusStateWithHeight.encode(s,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},l);for(r.consensusStates=[];a.pos>>3){case 1:r.clientId=a.string();break;case 2:r.consensusStates.push(t.ConsensusStateWithHeight.decode(a,a.uint32()));break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},l);if(n.consensusStates=[],void 0!==e.clientId&&null!==e.clientId?n.clientId=String(e.clientId):n.clientId="",void 0!==e.consensusStates&&null!==e.consensusStates){var o,r=a(e.consensusStates);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.consensusStates.push(t.ConsensusStateWithHeight.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.clientId&&(n.clientId=e.clientId),e.consensusStates?n.consensusStates=e.consensusStates.map((function(e){return e?t.ConsensusStateWithHeight.toJSON(e):void 0})):n.consensusStates=[],n},fromPartial:function(e){var n=Object.assign({},l);if(n.consensusStates=[],void 0!==e.clientId&&null!==e.clientId?n.clientId=e.clientId:n.clientId="",void 0!==e.consensusStates&&null!==e.consensusStates){var o,r=a(e.consensusStates);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.consensusStates.push(t.ConsensusStateWithHeight.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var f={title:"",description:"",subjectClientId:"",substituteClientId:""};t.ClientUpdateProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.subjectClientId&&t.uint32(26).string(e.subjectClientId),""!==e.substituteClientId&&t.uint32(34).string(e.substituteClientId),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.subjectClientId=n.string();break;case 4:o.substituteClientId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.subjectClientId&&null!==e.subjectClientId?t.subjectClientId=String(e.subjectClientId):t.subjectClientId="",void 0!==e.substituteClientId&&null!==e.substituteClientId?t.substituteClientId=String(e.substituteClientId):t.substituteClientId="",t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.subjectClientId&&(t.subjectClientId=e.subjectClientId),void 0!==e.substituteClientId&&(t.substituteClientId=e.substituteClientId),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.subjectClientId&&null!==e.subjectClientId?t.subjectClientId=e.subjectClientId:t.subjectClientId="",void 0!==e.substituteClientId&&null!==e.substituteClientId?t.substituteClientId=e.substituteClientId:t.substituteClientId="",t}};var p={title:"",description:""};t.UpgradeProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),void 0!==e.plan&&c.Plan.encode(e.plan,t.uint32(26).fork()).ldelim(),void 0!==e.upgradedClientState&&s.Any.encode(e.upgradedClientState,t.uint32(34).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.plan=c.Plan.decode(n,n.uint32());break;case 4:o.upgradedClientState=s.Any.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",void 0!==e.description&&null!==e.description?t.description=String(e.description):t.description="",void 0!==e.plan&&null!==e.plan?t.plan=c.Plan.fromJSON(e.plan):t.plan=void 0,void 0!==e.upgradedClientState&&null!==e.upgradedClientState?t.upgradedClientState=s.Any.fromJSON(e.upgradedClientState):t.upgradedClientState=void 0,t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.plan&&(t.plan=e.plan?c.Plan.toJSON(e.plan):void 0),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?s.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",void 0!==e.description&&null!==e.description?t.description=e.description:t.description="",void 0!==e.plan&&null!==e.plan?t.plan=c.Plan.fromPartial(e.plan):t.plan=void 0,void 0!==e.upgradedClientState&&null!==e.upgradedClientState?t.upgradedClientState=s.Any.fromPartial(e.upgradedClientState):t.upgradedClientState=void 0,t}};var b={revisionNumber:r.default.UZERO,revisionHeight:r.default.UZERO};t.Height={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.revisionNumber.isZero()||t.uint32(8).uint64(e.revisionNumber),e.revisionHeight.isZero()||t.uint32(16).uint64(e.revisionHeight),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3){case 1:o.revisionNumber=n.uint64();break;case 2:o.revisionHeight=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.revisionNumber&&null!==e.revisionNumber?t.revisionNumber=r.default.fromString(e.revisionNumber):t.revisionNumber=r.default.UZERO,void 0!==e.revisionHeight&&null!==e.revisionHeight?t.revisionHeight=r.default.fromString(e.revisionHeight):t.revisionHeight=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||r.default.UZERO).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.revisionNumber&&null!==e.revisionNumber?t.revisionNumber=e.revisionNumber:t.revisionNumber=r.default.UZERO,void 0!==e.revisionHeight&&null!==e.revisionHeight?t.revisionHeight=e.revisionHeight:t.revisionHeight=r.default.UZERO,t}};var m={allowedClients:""};t.Params={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.allowedClients);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).string(r)}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);for(o.allowedClients=[];n.pos>>3===1)o.allowedClients.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},m);if(t.allowedClients=[],void 0!==e.allowedClients&&null!==e.allowedClients){var n,o=a(e.allowedClients);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.allowedClients.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.allowedClients?t.allowedClients=e.allowedClients.map((function(e){return e})):t.allowedClients=[],t},fromPartial:function(e){var t=Object.assign({},m);if(t.allowedClients=[],void 0!==e.allowedClients&&null!==e.allowedClients){var n,o=a(e.allowedClients);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.allowedClients.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},26864:function(e,t,n){"use strict";var a=n(74704).default,o=n(56690).default,r=n(89728).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgSubmitMisbehaviourDesc=t.MsgUpgradeClientDesc=t.MsgUpdateClientDesc=t.MsgCreateClientDesc=t.MsgDesc=t.MsgClientImpl=t.MsgSubmitMisbehaviourResponse=t.MsgSubmitMisbehaviour=t.MsgUpgradeClientResponse=t.MsgUpgradeClient=t.MsgUpdateClientResponse=t.MsgUpdateClient=t.MsgCreateClientResponse=t.MsgCreateClient=t.protobufPackage=void 0;var s=i(n(29600)),c=n(93704),u=i(n(80121)),d=n(85920),l=n(82576);t.protobufPackage="ibc.core.client.v1";var f={signer:""};t.MsgCreateClient={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return void 0!==e.clientState&&d.Any.encode(e.clientState,t.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&d.Any.encode(e.consensusState,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3){case 1:o.clientState=d.Any.decode(n,n.uint32());break;case 2:o.consensusState=d.Any.decode(n,n.uint32());break;case 3:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.clientState&&null!==e.clientState?t.clientState=d.Any.fromJSON(e.clientState):t.clientState=void 0,void 0!==e.consensusState&&null!==e.consensusState?t.consensusState=d.Any.fromJSON(e.consensusState):t.consensusState=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.clientState&&(t.clientState=e.clientState?d.Any.toJSON(e.clientState):void 0),void 0!==e.consensusState&&(t.consensusState=e.consensusState?d.Any.toJSON(e.consensusState):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.clientState&&null!==e.clientState?t.clientState=d.Any.fromPartial(e.clientState):t.clientState=void 0,void 0!==e.consensusState&&null!==e.consensusState?t.consensusState=d.Any.fromPartial(e.consensusState):t.consensusState=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var p={};t.MsgCreateClientResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.header&&d.Any.encode(e.header,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.header=d.Any.decode(n,n.uint32());break;case 3:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.clientId&&null!==e.clientId?t.clientId=String(e.clientId):t.clientId="",void 0!==e.header&&null!==e.header?t.header=d.Any.fromJSON(e.header):t.header=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.header&&(t.header=e.header?d.Any.toJSON(e.header):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.clientId&&null!==e.clientId?t.clientId=e.clientId:t.clientId="",void 0!==e.header&&null!==e.header?t.header=d.Any.fromPartial(e.header):t.header=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var m={};t.MsgUpdateClientResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&d.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),void 0!==e.consensusState&&d.Any.encode(e.consensusState,t.uint32(26).fork()).ldelim(),0!==e.proofUpgradeClient.length&&t.uint32(34).bytes(e.proofUpgradeClient),0!==e.proofUpgradeConsensusState.length&&t.uint32(42).bytes(e.proofUpgradeConsensusState),""!==e.signer&&t.uint32(50).string(e.signer),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.proofUpgradeClient=new Uint8Array,o.proofUpgradeConsensusState=new Uint8Array;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.clientState=d.Any.decode(n,n.uint32());break;case 3:o.consensusState=d.Any.decode(n,n.uint32());break;case 4:o.proofUpgradeClient=n.bytes();break;case 5:o.proofUpgradeConsensusState=n.bytes();break;case 6:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);return t.proofUpgradeClient=new Uint8Array,t.proofUpgradeConsensusState=new Uint8Array,void 0!==e.clientId&&null!==e.clientId?t.clientId=String(e.clientId):t.clientId="",void 0!==e.clientState&&null!==e.clientState?t.clientState=d.Any.fromJSON(e.clientState):t.clientState=void 0,void 0!==e.consensusState&&null!==e.consensusState?t.consensusState=d.Any.fromJSON(e.consensusState):t.consensusState=void 0,void 0!==e.proofUpgradeClient&&null!==e.proofUpgradeClient&&(t.proofUpgradeClient=I(e.proofUpgradeClient)),void 0!==e.proofUpgradeConsensusState&&null!==e.proofUpgradeConsensusState&&(t.proofUpgradeConsensusState=I(e.proofUpgradeConsensusState)),void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?d.Any.toJSON(e.clientState):void 0),void 0!==e.consensusState&&(t.consensusState=e.consensusState?d.Any.toJSON(e.consensusState):void 0),void 0!==e.proofUpgradeClient&&(t.proofUpgradeClient=S(void 0!==e.proofUpgradeClient?e.proofUpgradeClient:new Uint8Array)),void 0!==e.proofUpgradeConsensusState&&(t.proofUpgradeConsensusState=S(void 0!==e.proofUpgradeConsensusState?e.proofUpgradeConsensusState:new Uint8Array)),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},h);return void 0!==e.clientId&&null!==e.clientId?t.clientId=e.clientId:t.clientId="",void 0!==e.clientState&&null!==e.clientState?t.clientState=d.Any.fromPartial(e.clientState):t.clientState=void 0,void 0!==e.consensusState&&null!==e.consensusState?t.consensusState=d.Any.fromPartial(e.consensusState):t.consensusState=void 0,void 0!==e.proofUpgradeClient&&null!==e.proofUpgradeClient?t.proofUpgradeClient=e.proofUpgradeClient:t.proofUpgradeClient=new Uint8Array,void 0!==e.proofUpgradeConsensusState&&null!==e.proofUpgradeConsensusState?t.proofUpgradeConsensusState=e.proofUpgradeConsensusState:t.proofUpgradeConsensusState=new Uint8Array,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var g={};t.MsgUpgradeClientResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.misbehaviour&&d.Any.encode(e.misbehaviour,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.misbehaviour=d.Any.decode(n,n.uint32());break;case 3:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return void 0!==e.clientId&&null!==e.clientId?t.clientId=String(e.clientId):t.clientId="",void 0!==e.misbehaviour&&null!==e.misbehaviour?t.misbehaviour=d.Any.fromJSON(e.misbehaviour):t.misbehaviour=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.misbehaviour&&(t.misbehaviour=e.misbehaviour?d.Any.toJSON(e.misbehaviour):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.clientId&&null!==e.clientId?t.clientId=e.clientId:t.clientId="",void 0!==e.misbehaviour&&null!==e.misbehaviour?t.misbehaviour=d.Any.fromPartial(e.misbehaviour):t.misbehaviour=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var v={};t.MsgSubmitMisbehaviourResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.hash.length&&t.uint32(10).bytes(e.hash),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);for(o.hash=new Uint8Array;n.pos>>3===1)o.hash=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},c);return t.hash=new Uint8Array,void 0!==e.hash&&null!==e.hash&&(t.hash=b(e.hash)),t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=h(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash=new Uint8Array,t}};var u={};t.MerklePrefix={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.keyPrefix.length&&t.uint32(10).bytes(e.keyPrefix),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);for(o.keyPrefix=new Uint8Array;n.pos>>3===1)o.keyPrefix=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},u);return t.keyPrefix=new Uint8Array,void 0!==e.keyPrefix&&null!==e.keyPrefix&&(t.keyPrefix=b(e.keyPrefix)),t},toJSON:function(e){var t={};return void 0!==e.keyPrefix&&(t.keyPrefix=h(void 0!==e.keyPrefix?e.keyPrefix:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.keyPrefix&&null!==e.keyPrefix?t.keyPrefix=e.keyPrefix:t.keyPrefix=new Uint8Array,t}};var d={keyPath:""};t.MerklePath={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.keyPath);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).string(r)}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);for(o.keyPath=[];n.pos>>3===1)o.keyPath.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},d);if(t.keyPath=[],void 0!==e.keyPath&&null!==e.keyPath){var n,o=a(e.keyPath);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.keyPath.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.keyPath?t.keyPath=e.keyPath.map((function(e){return e})):t.keyPath=[],t},fromPartial:function(e){var t=Object.assign({},d);if(t.keyPath=[],void 0!==e.keyPath&&null!==e.keyPath){var n,o=a(e.keyPath);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.keyPath.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var l={};t.MerkleProof={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.proofs);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.CommitmentProof.encode(r,n.uint32(10).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);for(o.proofs=[];n.pos>>3===1)o.proofs.push(s.CommitmentProof.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},l);if(t.proofs=[],void 0!==e.proofs&&null!==e.proofs){var n,o=a(e.proofs);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.proofs.push(s.CommitmentProof.fromJSON(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.proofs?t.proofs=e.proofs.map((function(e){return e?s.CommitmentProof.toJSON(e):void 0})):t.proofs=[],t},fromPartial:function(e){var t=Object.assign({},l);if(t.proofs=[],void 0!==e.proofs&&null!==e.proofs){var n,o=a(e.proofs);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.proofs.push(s.CommitmentProof.fromPartial(r))}}catch(i){o.e(i)}finally{o.f()}}return t}};var f=function(){if("undefined"!==typeof f)return f;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),p=f.atob||function(e){return f.Buffer.from(e,"base64").toString("binary")};function b(e){for(var t=p(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.clientId&&n.uint32(10).string(e.clientId);var o,r=a(e.versions);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.Version.encode(i,n.uint32(18).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return 0!==e.state&&n.uint32(24).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(34).fork()).ldelim(),e.delayPeriod.isZero()||n.uint32(40).uint64(e.delayPeriod),n},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},l);for(r.versions=[];a.pos>>3){case 1:r.clientId=a.string();break;case 2:r.versions.push(t.Version.decode(a,a.uint32()));break;case 3:r.state=a.int32();break;case 4:r.counterparty=t.Counterparty.decode(a,a.uint32());break;case 5:r.delayPeriod=a.uint64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},l);if(n.versions=[],void 0!==e.clientId&&null!==e.clientId?n.clientId=String(e.clientId):n.clientId="",void 0!==e.versions&&null!==e.versions){var o,r=a(e.versions);try{for(r.s();!(o=r.n()).done;){var s=o.value;n.versions.push(t.Version.fromJSON(s))}}catch(c){r.e(c)}finally{r.f()}}return void 0!==e.state&&null!==e.state?n.state=u(e.state):n.state=0,void 0!==e.counterparty&&null!==e.counterparty?n.counterparty=t.Counterparty.fromJSON(e.counterparty):n.counterparty=void 0,void 0!==e.delayPeriod&&null!==e.delayPeriod?n.delayPeriod=i.default.fromString(e.delayPeriod):n.delayPeriod=i.default.UZERO,n},toJSON:function(e){var n={};return void 0!==e.clientId&&(n.clientId=e.clientId),e.versions?n.versions=e.versions.map((function(e){return e?t.Version.toJSON(e):void 0})):n.versions=[],void 0!==e.state&&(n.state=d(e.state)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(n.delayPeriod=(e.delayPeriod||i.default.UZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},l);if(n.versions=[],void 0!==e.clientId&&null!==e.clientId?n.clientId=e.clientId:n.clientId="",void 0!==e.versions&&null!==e.versions){var o,r=a(e.versions);try{for(r.s();!(o=r.n()).done;){var s=o.value;n.versions.push(t.Version.fromPartial(s))}}catch(c){r.e(c)}finally{r.f()}}return void 0!==e.state&&null!==e.state?n.state=e.state:n.state=0,void 0!==e.counterparty&&null!==e.counterparty?n.counterparty=t.Counterparty.fromPartial(e.counterparty):n.counterparty=void 0,void 0!==e.delayPeriod&&null!==e.delayPeriod?n.delayPeriod=e.delayPeriod:n.delayPeriod=i.default.UZERO,n}};var f={id:"",clientId:"",state:0,delayPeriod:i.default.UZERO};t.IdentifiedConnection={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.id&&n.uint32(10).string(e.id),""!==e.clientId&&n.uint32(18).string(e.clientId);var o,r=a(e.versions);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.Version.encode(i,n.uint32(26).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return 0!==e.state&&n.uint32(32).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(42).fork()).ldelim(),e.delayPeriod.isZero()||n.uint32(48).uint64(e.delayPeriod),n},decode:function(e,n){var a=e instanceof s.default.Reader?e:new s.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},f);for(r.versions=[];a.pos>>3){case 1:r.id=a.string();break;case 2:r.clientId=a.string();break;case 3:r.versions.push(t.Version.decode(a,a.uint32()));break;case 4:r.state=a.int32();break;case 5:r.counterparty=t.Counterparty.decode(a,a.uint32());break;case 6:r.delayPeriod=a.uint64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},f);if(n.versions=[],void 0!==e.id&&null!==e.id?n.id=String(e.id):n.id="",void 0!==e.clientId&&null!==e.clientId?n.clientId=String(e.clientId):n.clientId="",void 0!==e.versions&&null!==e.versions){var o,r=a(e.versions);try{for(r.s();!(o=r.n()).done;){var s=o.value;n.versions.push(t.Version.fromJSON(s))}}catch(c){r.e(c)}finally{r.f()}}return void 0!==e.state&&null!==e.state?n.state=u(e.state):n.state=0,void 0!==e.counterparty&&null!==e.counterparty?n.counterparty=t.Counterparty.fromJSON(e.counterparty):n.counterparty=void 0,void 0!==e.delayPeriod&&null!==e.delayPeriod?n.delayPeriod=i.default.fromString(e.delayPeriod):n.delayPeriod=i.default.UZERO,n},toJSON:function(e){var n={};return void 0!==e.id&&(n.id=e.id),void 0!==e.clientId&&(n.clientId=e.clientId),e.versions?n.versions=e.versions.map((function(e){return e?t.Version.toJSON(e):void 0})):n.versions=[],void 0!==e.state&&(n.state=d(e.state)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(n.delayPeriod=(e.delayPeriod||i.default.UZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},f);if(n.versions=[],void 0!==e.id&&null!==e.id?n.id=e.id:n.id="",void 0!==e.clientId&&null!==e.clientId?n.clientId=e.clientId:n.clientId="",void 0!==e.versions&&null!==e.versions){var o,r=a(e.versions);try{for(r.s();!(o=r.n()).done;){var s=o.value;n.versions.push(t.Version.fromPartial(s))}}catch(c){r.e(c)}finally{r.f()}}return void 0!==e.state&&null!==e.state?n.state=e.state:n.state=0,void 0!==e.counterparty&&null!==e.counterparty?n.counterparty=t.Counterparty.fromPartial(e.counterparty):n.counterparty=void 0,void 0!==e.delayPeriod&&null!==e.delayPeriod?n.delayPeriod=e.delayPeriod:n.delayPeriod=i.default.UZERO,n}};var p={clientId:"",connectionId:""};t.Counterparty={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),""!==e.connectionId&&t.uint32(18).string(e.connectionId),void 0!==e.prefix&&c.MerklePrefix.encode(e.prefix,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.connectionId=n.string();break;case 3:o.prefix=c.MerklePrefix.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return void 0!==e.clientId&&null!==e.clientId?t.clientId=String(e.clientId):t.clientId="",void 0!==e.connectionId&&null!==e.connectionId?t.connectionId=String(e.connectionId):t.connectionId="",void 0!==e.prefix&&null!==e.prefix?t.prefix=c.MerklePrefix.fromJSON(e.prefix):t.prefix=void 0,t},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.prefix&&(t.prefix=e.prefix?c.MerklePrefix.toJSON(e.prefix):void 0),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.clientId&&null!==e.clientId?t.clientId=e.clientId:t.clientId="",void 0!==e.connectionId&&null!==e.connectionId?t.connectionId=e.connectionId:t.connectionId="",void 0!==e.prefix&&null!==e.prefix?t.prefix=c.MerklePrefix.fromPartial(e.prefix):t.prefix=void 0,t}};var b={paths:""};t.ClientPaths={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),o=a(e.paths);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).string(r)}}catch(i){o.e(i)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);for(o.paths=[];n.pos>>3===1)o.paths.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},b);if(t.paths=[],void 0!==e.paths&&null!==e.paths){var n,o=a(e.paths);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.paths.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.paths?t.paths=e.paths.map((function(e){return e})):t.paths=[],t},fromPartial:function(e){var t=Object.assign({},b);if(t.paths=[],void 0!==e.paths&&null!==e.paths){var n,o=a(e.paths);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.paths.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var m={clientId:"",paths:""};t.ConnectionPaths={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.clientId&&t.uint32(10).string(e.clientId);var n,o=a(e.paths);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(18).string(r)}}catch(i){o.e(i)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);for(o.paths=[];n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.paths.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},m);if(t.paths=[],void 0!==e.clientId&&null!==e.clientId?t.clientId=String(e.clientId):t.clientId="",void 0!==e.paths&&null!==e.paths){var n,o=a(e.paths);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.paths.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),e.paths?t.paths=e.paths.map((function(e){return e})):t.paths=[],t},fromPartial:function(e){var t=Object.assign({},m);if(t.paths=[],void 0!==e.clientId&&null!==e.clientId?t.clientId=e.clientId:t.clientId="",void 0!==e.paths&&null!==e.paths){var n,o=a(e.paths);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.paths.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var h={identifier:"",features:""};t.Version={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.identifier&&t.uint32(10).string(e.identifier);var n,o=a(e.features);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(18).string(r)}}catch(i){o.e(i)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.features=[];n.pos>>3){case 1:o.identifier=n.string();break;case 2:o.features.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);if(t.features=[],void 0!==e.identifier&&null!==e.identifier?t.identifier=String(e.identifier):t.identifier="",void 0!==e.features&&null!==e.features){var n,o=a(e.features);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.features.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.identifier&&(t.identifier=e.identifier),e.features?t.features=e.features.map((function(e){return e})):t.features=[],t},fromPartial:function(e){var t=Object.assign({},h);if(t.features=[],void 0!==e.identifier&&null!==e.identifier?t.identifier=e.identifier:t.identifier="",void 0!==e.features&&null!==e.features){var n,o=a(e.features);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.features.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var g={maxExpectedTimePerBlock:i.default.UZERO};t.Params={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return e.maxExpectedTimePerBlock.isZero()||t.uint32(8).uint64(e.maxExpectedTimePerBlock),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos>>3===1)o.maxExpectedTimePerBlock=n.uint64();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},g);return void 0!==e.maxExpectedTimePerBlock&&null!==e.maxExpectedTimePerBlock?t.maxExpectedTimePerBlock=i.default.fromString(e.maxExpectedTimePerBlock):t.maxExpectedTimePerBlock=i.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.maxExpectedTimePerBlock&&(t.maxExpectedTimePerBlock=(e.maxExpectedTimePerBlock||i.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.maxExpectedTimePerBlock&&null!==e.maxExpectedTimePerBlock?t.maxExpectedTimePerBlock=e.maxExpectedTimePerBlock:t.maxExpectedTimePerBlock=i.default.UZERO,t}},s.default.util.Long!==i.default&&(s.default.util.Long=i.default,s.default.configure())},91592:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.MsgConnectionOpenConfirmDesc=t.MsgConnectionOpenAckDesc=t.MsgConnectionOpenTryDesc=t.MsgConnectionOpenInitDesc=t.MsgDesc=t.MsgClientImpl=t.MsgConnectionOpenConfirmResponse=t.MsgConnectionOpenConfirm=t.MsgConnectionOpenAckResponse=t.MsgConnectionOpenAck=t.MsgConnectionOpenTryResponse=t.MsgConnectionOpenTry=t.MsgConnectionOpenInitResponse=t.MsgConnectionOpenInit=t.protobufPackage=void 0;var s=i(n(29600)),c=n(93704),u=i(n(80121)),d=n(97672),l=n(85920),f=n(39553),p=n(82576);t.protobufPackage="ibc.core.connection.v1";var b={clientId:"",delayPeriod:s.default.UZERO,signer:""};t.MsgConnectionOpenInit={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.counterparty&&d.Counterparty.encode(e.counterparty,t.uint32(18).fork()).ldelim(),void 0!==e.version&&d.Version.encode(e.version,t.uint32(26).fork()).ldelim(),e.delayPeriod.isZero()||t.uint32(32).uint64(e.delayPeriod),""!==e.signer&&t.uint32(42).string(e.signer),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},b);n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.counterparty=d.Counterparty.decode(n,n.uint32());break;case 3:o.version=d.Version.decode(n,n.uint32());break;case 4:o.delayPeriod=n.uint64();break;case 5:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},b);return void 0!==e.clientId&&null!==e.clientId?t.clientId=String(e.clientId):t.clientId="",void 0!==e.counterparty&&null!==e.counterparty?t.counterparty=d.Counterparty.fromJSON(e.counterparty):t.counterparty=void 0,void 0!==e.version&&null!==e.version?t.version=d.Version.fromJSON(e.version):t.version=void 0,void 0!==e.delayPeriod&&null!==e.delayPeriod?t.delayPeriod=s.default.fromString(e.delayPeriod):t.delayPeriod=s.default.UZERO,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.counterparty&&(t.counterparty=e.counterparty?d.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.version&&(t.version=e.version?d.Version.toJSON(e.version):void 0),void 0!==e.delayPeriod&&(t.delayPeriod=(e.delayPeriod||s.default.UZERO).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},b);return void 0!==e.clientId&&null!==e.clientId?t.clientId=e.clientId:t.clientId="",void 0!==e.counterparty&&null!==e.counterparty?t.counterparty=d.Counterparty.fromPartial(e.counterparty):t.counterparty=void 0,void 0!==e.version&&null!==e.version?t.version=d.Version.fromPartial(e.version):t.version=void 0,void 0!==e.delayPeriod&&null!==e.delayPeriod?t.delayPeriod=e.delayPeriod:t.delayPeriod=s.default.UZERO,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var m={};t.MsgConnectionOpenInitResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();""!==e.clientId&&t.uint32(10).string(e.clientId),""!==e.previousConnectionId&&t.uint32(18).string(e.previousConnectionId),void 0!==e.clientState&&l.Any.encode(e.clientState,t.uint32(26).fork()).ldelim(),void 0!==e.counterparty&&d.Counterparty.encode(e.counterparty,t.uint32(34).fork()).ldelim(),e.delayPeriod.isZero()||t.uint32(40).uint64(e.delayPeriod);var n,a=r(e.counterpartyVersions);try{for(a.s();!(n=a.n()).done;){var o=n.value;d.Version.encode(o,t.uint32(50).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return void 0!==e.proofHeight&&f.Height.encode(e.proofHeight,t.uint32(58).fork()).ldelim(),0!==e.proofInit.length&&t.uint32(66).bytes(e.proofInit),0!==e.proofClient.length&&t.uint32(74).bytes(e.proofClient),0!==e.proofConsensus.length&&t.uint32(82).bytes(e.proofConsensus),void 0!==e.consensusHeight&&f.Height.encode(e.consensusHeight,t.uint32(90).fork()).ldelim(),""!==e.signer&&t.uint32(98).string(e.signer),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},h);for(o.counterpartyVersions=[],o.proofInit=new Uint8Array,o.proofClient=new Uint8Array,o.proofConsensus=new Uint8Array;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.previousConnectionId=n.string();break;case 3:o.clientState=l.Any.decode(n,n.uint32());break;case 4:o.counterparty=d.Counterparty.decode(n,n.uint32());break;case 5:o.delayPeriod=n.uint64();break;case 6:o.counterpartyVersions.push(d.Version.decode(n,n.uint32()));break;case 7:o.proofHeight=f.Height.decode(n,n.uint32());break;case 8:o.proofInit=n.bytes();break;case 9:o.proofClient=n.bytes();break;case 10:o.proofConsensus=n.bytes();break;case 11:o.consensusHeight=f.Height.decode(n,n.uint32());break;case 12:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},h);if(t.counterpartyVersions=[],t.proofInit=new Uint8Array,t.proofClient=new Uint8Array,t.proofConsensus=new Uint8Array,void 0!==e.clientId&&null!==e.clientId?t.clientId=String(e.clientId):t.clientId="",void 0!==e.previousConnectionId&&null!==e.previousConnectionId?t.previousConnectionId=String(e.previousConnectionId):t.previousConnectionId="",void 0!==e.clientState&&null!==e.clientState?t.clientState=l.Any.fromJSON(e.clientState):t.clientState=void 0,void 0!==e.counterparty&&null!==e.counterparty?t.counterparty=d.Counterparty.fromJSON(e.counterparty):t.counterparty=void 0,void 0!==e.delayPeriod&&null!==e.delayPeriod?t.delayPeriod=s.default.fromString(e.delayPeriod):t.delayPeriod=s.default.UZERO,void 0!==e.counterpartyVersions&&null!==e.counterpartyVersions){var n,a=r(e.counterpartyVersions);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.counterpartyVersions.push(d.Version.fromJSON(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromJSON(e.proofHeight):t.proofHeight=void 0,void 0!==e.proofInit&&null!==e.proofInit&&(t.proofInit=S(e.proofInit)),void 0!==e.proofClient&&null!==e.proofClient&&(t.proofClient=S(e.proofClient)),void 0!==e.proofConsensus&&null!==e.proofConsensus&&(t.proofConsensus=S(e.proofConsensus)),void 0!==e.consensusHeight&&null!==e.consensusHeight?t.consensusHeight=f.Height.fromJSON(e.consensusHeight):t.consensusHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.previousConnectionId&&(t.previousConnectionId=e.previousConnectionId),void 0!==e.clientState&&(t.clientState=e.clientState?l.Any.toJSON(e.clientState):void 0),void 0!==e.counterparty&&(t.counterparty=e.counterparty?d.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(t.delayPeriod=(e.delayPeriod||s.default.UZERO).toString()),e.counterpartyVersions?t.counterpartyVersions=e.counterpartyVersions.map((function(e){return e?d.Version.toJSON(e):void 0})):t.counterpartyVersions=[],void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?f.Height.toJSON(e.proofHeight):void 0),void 0!==e.proofInit&&(t.proofInit=E(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofClient&&(t.proofClient=E(void 0!==e.proofClient?e.proofClient:new Uint8Array)),void 0!==e.proofConsensus&&(t.proofConsensus=E(void 0!==e.proofConsensus?e.proofConsensus:new Uint8Array)),void 0!==e.consensusHeight&&(t.consensusHeight=e.consensusHeight?f.Height.toJSON(e.consensusHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},h);if(t.counterpartyVersions=[],void 0!==e.clientId&&null!==e.clientId?t.clientId=e.clientId:t.clientId="",void 0!==e.previousConnectionId&&null!==e.previousConnectionId?t.previousConnectionId=e.previousConnectionId:t.previousConnectionId="",void 0!==e.clientState&&null!==e.clientState?t.clientState=l.Any.fromPartial(e.clientState):t.clientState=void 0,void 0!==e.counterparty&&null!==e.counterparty?t.counterparty=d.Counterparty.fromPartial(e.counterparty):t.counterparty=void 0,void 0!==e.delayPeriod&&null!==e.delayPeriod?t.delayPeriod=e.delayPeriod:t.delayPeriod=s.default.UZERO,void 0!==e.counterpartyVersions&&null!==e.counterpartyVersions){var n,a=r(e.counterpartyVersions);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.counterpartyVersions.push(d.Version.fromPartial(o))}}catch(i){a.e(i)}finally{a.f()}}return void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromPartial(e.proofHeight):t.proofHeight=void 0,void 0!==e.proofInit&&null!==e.proofInit?t.proofInit=e.proofInit:t.proofInit=new Uint8Array,void 0!==e.proofClient&&null!==e.proofClient?t.proofClient=e.proofClient:t.proofClient=new Uint8Array,void 0!==e.proofConsensus&&null!==e.proofConsensus?t.proofConsensus=e.proofConsensus:t.proofConsensus=new Uint8Array,void 0!==e.consensusHeight&&null!==e.consensusHeight?t.consensusHeight=f.Height.fromPartial(e.consensusHeight):t.consensusHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var g={};t.MsgConnectionOpenTryResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),""!==e.counterpartyConnectionId&&t.uint32(18).string(e.counterpartyConnectionId),void 0!==e.version&&d.Version.encode(e.version,t.uint32(26).fork()).ldelim(),void 0!==e.clientState&&l.Any.encode(e.clientState,t.uint32(34).fork()).ldelim(),void 0!==e.proofHeight&&f.Height.encode(e.proofHeight,t.uint32(42).fork()).ldelim(),0!==e.proofTry.length&&t.uint32(50).bytes(e.proofTry),0!==e.proofClient.length&&t.uint32(58).bytes(e.proofClient),0!==e.proofConsensus.length&&t.uint32(66).bytes(e.proofConsensus),void 0!==e.consensusHeight&&f.Height.encode(e.consensusHeight,t.uint32(74).fork()).ldelim(),""!==e.signer&&t.uint32(82).string(e.signer),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.proofTry=new Uint8Array,o.proofClient=new Uint8Array,o.proofConsensus=new Uint8Array;n.pos>>3){case 1:o.connectionId=n.string();break;case 2:o.counterpartyConnectionId=n.string();break;case 3:o.version=d.Version.decode(n,n.uint32());break;case 4:o.clientState=l.Any.decode(n,n.uint32());break;case 5:o.proofHeight=f.Height.decode(n,n.uint32());break;case 6:o.proofTry=n.bytes();break;case 7:o.proofClient=n.bytes();break;case 8:o.proofConsensus=n.bytes();break;case 9:o.consensusHeight=f.Height.decode(n,n.uint32());break;case 10:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return t.proofTry=new Uint8Array,t.proofClient=new Uint8Array,t.proofConsensus=new Uint8Array,void 0!==e.connectionId&&null!==e.connectionId?t.connectionId=String(e.connectionId):t.connectionId="",void 0!==e.counterpartyConnectionId&&null!==e.counterpartyConnectionId?t.counterpartyConnectionId=String(e.counterpartyConnectionId):t.counterpartyConnectionId="",void 0!==e.version&&null!==e.version?t.version=d.Version.fromJSON(e.version):t.version=void 0,void 0!==e.clientState&&null!==e.clientState?t.clientState=l.Any.fromJSON(e.clientState):t.clientState=void 0,void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromJSON(e.proofHeight):t.proofHeight=void 0,void 0!==e.proofTry&&null!==e.proofTry&&(t.proofTry=S(e.proofTry)),void 0!==e.proofClient&&null!==e.proofClient&&(t.proofClient=S(e.proofClient)),void 0!==e.proofConsensus&&null!==e.proofConsensus&&(t.proofConsensus=S(e.proofConsensus)),void 0!==e.consensusHeight&&null!==e.consensusHeight?t.consensusHeight=f.Height.fromJSON(e.consensusHeight):t.consensusHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.counterpartyConnectionId&&(t.counterpartyConnectionId=e.counterpartyConnectionId),void 0!==e.version&&(t.version=e.version?d.Version.toJSON(e.version):void 0),void 0!==e.clientState&&(t.clientState=e.clientState?l.Any.toJSON(e.clientState):void 0),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?f.Height.toJSON(e.proofHeight):void 0),void 0!==e.proofTry&&(t.proofTry=E(void 0!==e.proofTry?e.proofTry:new Uint8Array)),void 0!==e.proofClient&&(t.proofClient=E(void 0!==e.proofClient?e.proofClient:new Uint8Array)),void 0!==e.proofConsensus&&(t.proofConsensus=E(void 0!==e.proofConsensus?e.proofConsensus:new Uint8Array)),void 0!==e.consensusHeight&&(t.consensusHeight=e.consensusHeight?f.Height.toJSON(e.consensusHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.connectionId&&null!==e.connectionId?t.connectionId=e.connectionId:t.connectionId="",void 0!==e.counterpartyConnectionId&&null!==e.counterpartyConnectionId?t.counterpartyConnectionId=e.counterpartyConnectionId:t.counterpartyConnectionId="",void 0!==e.version&&null!==e.version?t.version=d.Version.fromPartial(e.version):t.version=void 0,void 0!==e.clientState&&null!==e.clientState?t.clientState=l.Any.fromPartial(e.clientState):t.clientState=void 0,void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromPartial(e.proofHeight):t.proofHeight=void 0,void 0!==e.proofTry&&null!==e.proofTry?t.proofTry=e.proofTry:t.proofTry=new Uint8Array,void 0!==e.proofClient&&null!==e.proofClient?t.proofClient=e.proofClient:t.proofClient=new Uint8Array,void 0!==e.proofConsensus&&null!==e.proofConsensus?t.proofConsensus=e.proofConsensus:t.proofConsensus=new Uint8Array,void 0!==e.consensusHeight&&null!==e.consensusHeight?t.consensusHeight=f.Height.fromPartial(e.consensusHeight):t.consensusHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var v={};t.MsgConnectionOpenAckResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},v);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),0!==e.proofAck.length&&t.uint32(18).bytes(e.proofAck),void 0!==e.proofHeight&&f.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),""!==e.signer&&t.uint32(34).string(e.signer),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},w);for(o.proofAck=new Uint8Array;n.pos>>3){case 1:o.connectionId=n.string();break;case 2:o.proofAck=n.bytes();break;case 3:o.proofHeight=f.Height.decode(n,n.uint32());break;case 4:o.signer=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},w);return t.proofAck=new Uint8Array,void 0!==e.connectionId&&null!==e.connectionId?t.connectionId=String(e.connectionId):t.connectionId="",void 0!==e.proofAck&&null!==e.proofAck&&(t.proofAck=S(e.proofAck)),void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromJSON(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=String(e.signer):t.signer="",t},toJSON:function(e){var t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.proofAck&&(t.proofAck=E(void 0!==e.proofAck?e.proofAck:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?f.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial:function(e){var t=Object.assign({},w);return void 0!==e.connectionId&&null!==e.connectionId?t.connectionId=e.connectionId:t.connectionId="",void 0!==e.proofAck&&null!==e.proofAck?t.proofAck=e.proofAck:t.proofAck=new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight?t.proofHeight=f.Height.fromPartial(e.proofHeight):t.proofHeight=void 0,void 0!==e.signer&&null!==e.signer?t.signer=e.signer:t.signer="",t}};var k={};t.MsgConnectionOpenConfirmResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create()},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);n.pos1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();""!==e.chainId&&n.uint32(10).string(e.chainId),void 0!==e.trustLevel&&t.Fraction.encode(e.trustLevel,n.uint32(18).fork()).ldelim(),void 0!==e.trustingPeriod&&s.Duration.encode(e.trustingPeriod,n.uint32(26).fork()).ldelim(),void 0!==e.unbondingPeriod&&s.Duration.encode(e.unbondingPeriod,n.uint32(34).fork()).ldelim(),void 0!==e.maxClockDrift&&s.Duration.encode(e.maxClockDrift,n.uint32(42).fork()).ldelim(),void 0!==e.frozenHeight&&c.Height.encode(e.frozenHeight,n.uint32(50).fork()).ldelim(),void 0!==e.latestHeight&&c.Height.encode(e.latestHeight,n.uint32(58).fork()).ldelim();var o,r=a(e.proofSpecs);try{for(r.s();!(o=r.n()).done;){var u=o.value;p.ProofSpec.encode(u,n.uint32(66).fork()).ldelim()}}catch(b){r.e(b)}finally{r.f()}var d,l=a(e.upgradePath);try{for(l.s();!(d=l.n()).done;){var f=d.value;n.uint32(74).string(f)}}catch(b){l.e(b)}finally{l.f()}return!0===e.allowUpdateAfterExpiry&&n.uint32(80).bool(e.allowUpdateAfterExpiry),!0===e.allowUpdateAfterMisbehaviour&&n.uint32(88).bool(e.allowUpdateAfterMisbehaviour),n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},b);for(r.proofSpecs=[],r.upgradePath=[];a.pos>>3){case 1:r.chainId=a.string();break;case 2:r.trustLevel=t.Fraction.decode(a,a.uint32());break;case 3:r.trustingPeriod=s.Duration.decode(a,a.uint32());break;case 4:r.unbondingPeriod=s.Duration.decode(a,a.uint32());break;case 5:r.maxClockDrift=s.Duration.decode(a,a.uint32());break;case 6:r.frozenHeight=c.Height.decode(a,a.uint32());break;case 7:r.latestHeight=c.Height.decode(a,a.uint32());break;case 8:r.proofSpecs.push(p.ProofSpec.decode(a,a.uint32()));break;case 9:r.upgradePath.push(a.string());break;case 10:r.allowUpdateAfterExpiry=a.bool();break;case 11:r.allowUpdateAfterMisbehaviour=a.bool();break;default:a.skipType(7&u)}}return r},fromJSON:function(e){var n=Object.assign({},b);if(n.proofSpecs=[],n.upgradePath=[],void 0!==e.chainId&&null!==e.chainId?n.chainId=String(e.chainId):n.chainId="",void 0!==e.trustLevel&&null!==e.trustLevel?n.trustLevel=t.Fraction.fromJSON(e.trustLevel):n.trustLevel=void 0,void 0!==e.trustingPeriod&&null!==e.trustingPeriod?n.trustingPeriod=s.Duration.fromJSON(e.trustingPeriod):n.trustingPeriod=void 0,void 0!==e.unbondingPeriod&&null!==e.unbondingPeriod?n.unbondingPeriod=s.Duration.fromJSON(e.unbondingPeriod):n.unbondingPeriod=void 0,void 0!==e.maxClockDrift&&null!==e.maxClockDrift?n.maxClockDrift=s.Duration.fromJSON(e.maxClockDrift):n.maxClockDrift=void 0,void 0!==e.frozenHeight&&null!==e.frozenHeight?n.frozenHeight=c.Height.fromJSON(e.frozenHeight):n.frozenHeight=void 0,void 0!==e.latestHeight&&null!==e.latestHeight?n.latestHeight=c.Height.fromJSON(e.latestHeight):n.latestHeight=void 0,void 0!==e.proofSpecs&&null!==e.proofSpecs){var o,r=a(e.proofSpecs);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.proofSpecs.push(p.ProofSpec.fromJSON(i))}}catch(f){r.e(f)}finally{r.f()}}if(void 0!==e.upgradePath&&null!==e.upgradePath){var u,d=a(e.upgradePath);try{for(d.s();!(u=d.n()).done;){var l=u.value;n.upgradePath.push(String(l))}}catch(f){d.e(f)}finally{d.f()}}return void 0!==e.allowUpdateAfterExpiry&&null!==e.allowUpdateAfterExpiry?n.allowUpdateAfterExpiry=Boolean(e.allowUpdateAfterExpiry):n.allowUpdateAfterExpiry=!1,void 0!==e.allowUpdateAfterMisbehaviour&&null!==e.allowUpdateAfterMisbehaviour?n.allowUpdateAfterMisbehaviour=Boolean(e.allowUpdateAfterMisbehaviour):n.allowUpdateAfterMisbehaviour=!1,n},toJSON:function(e){var n={};return void 0!==e.chainId&&(n.chainId=e.chainId),void 0!==e.trustLevel&&(n.trustLevel=e.trustLevel?t.Fraction.toJSON(e.trustLevel):void 0),void 0!==e.trustingPeriod&&(n.trustingPeriod=e.trustingPeriod?s.Duration.toJSON(e.trustingPeriod):void 0),void 0!==e.unbondingPeriod&&(n.unbondingPeriod=e.unbondingPeriod?s.Duration.toJSON(e.unbondingPeriod):void 0),void 0!==e.maxClockDrift&&(n.maxClockDrift=e.maxClockDrift?s.Duration.toJSON(e.maxClockDrift):void 0),void 0!==e.frozenHeight&&(n.frozenHeight=e.frozenHeight?c.Height.toJSON(e.frozenHeight):void 0),void 0!==e.latestHeight&&(n.latestHeight=e.latestHeight?c.Height.toJSON(e.latestHeight):void 0),e.proofSpecs?n.proofSpecs=e.proofSpecs.map((function(e){return e?p.ProofSpec.toJSON(e):void 0})):n.proofSpecs=[],e.upgradePath?n.upgradePath=e.upgradePath.map((function(e){return e})):n.upgradePath=[],void 0!==e.allowUpdateAfterExpiry&&(n.allowUpdateAfterExpiry=e.allowUpdateAfterExpiry),void 0!==e.allowUpdateAfterMisbehaviour&&(n.allowUpdateAfterMisbehaviour=e.allowUpdateAfterMisbehaviour),n},fromPartial:function(e){var n=Object.assign({},b);if(n.proofSpecs=[],n.upgradePath=[],void 0!==e.chainId&&null!==e.chainId?n.chainId=e.chainId:n.chainId="",void 0!==e.trustLevel&&null!==e.trustLevel?n.trustLevel=t.Fraction.fromPartial(e.trustLevel):n.trustLevel=void 0,void 0!==e.trustingPeriod&&null!==e.trustingPeriod?n.trustingPeriod=s.Duration.fromPartial(e.trustingPeriod):n.trustingPeriod=void 0,void 0!==e.unbondingPeriod&&null!==e.unbondingPeriod?n.unbondingPeriod=s.Duration.fromPartial(e.unbondingPeriod):n.unbondingPeriod=void 0,void 0!==e.maxClockDrift&&null!==e.maxClockDrift?n.maxClockDrift=s.Duration.fromPartial(e.maxClockDrift):n.maxClockDrift=void 0,void 0!==e.frozenHeight&&null!==e.frozenHeight?n.frozenHeight=c.Height.fromPartial(e.frozenHeight):n.frozenHeight=void 0,void 0!==e.latestHeight&&null!==e.latestHeight?n.latestHeight=c.Height.fromPartial(e.latestHeight):n.latestHeight=void 0,void 0!==e.proofSpecs&&null!==e.proofSpecs){var o,r=a(e.proofSpecs);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.proofSpecs.push(p.ProofSpec.fromPartial(i))}}catch(f){r.e(f)}finally{r.f()}}if(void 0!==e.upgradePath&&null!==e.upgradePath){var u,d=a(e.upgradePath);try{for(d.s();!(u=d.n()).done;){var l=u.value;n.upgradePath.push(l)}}catch(f){d.e(f)}finally{d.f()}}return void 0!==e.allowUpdateAfterExpiry&&null!==e.allowUpdateAfterExpiry?n.allowUpdateAfterExpiry=e.allowUpdateAfterExpiry:n.allowUpdateAfterExpiry=!1,void 0!==e.allowUpdateAfterMisbehaviour&&null!==e.allowUpdateAfterMisbehaviour?n.allowUpdateAfterMisbehaviour=e.allowUpdateAfterMisbehaviour:n.allowUpdateAfterMisbehaviour=!1,n}};var m={};t.ConsensusState={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.timestamp&&f.Timestamp.encode(function(e){var t=(a=e.getTime()/1e3,r.default.fromNumber(a)),n=e.getTime()%1e3*1e6;var a;return{seconds:t,nanos:n}}(e.timestamp),t.uint32(10).fork()).ldelim(),void 0!==e.root&&u.MerkleRoot.encode(e.root,t.uint32(18).fork()).ldelim(),0!==e.nextValidatorsHash.length&&t.uint32(26).bytes(e.nextValidatorsHash),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},m);for(o.nextValidatorsHash=new Uint8Array;n.pos>>3){case 1:o.timestamp=A(f.Timestamp.decode(n,n.uint32()));break;case 2:o.root=u.MerkleRoot.decode(n,n.uint32());break;case 3:o.nextValidatorsHash=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t,n=Object.assign({},m);return n.nextValidatorsHash=new Uint8Array,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=(t=e.timestamp)instanceof Date?t:"string"===typeof t?new Date(t):A(f.Timestamp.fromJSON(t)):n.timestamp=void 0,void 0!==e.root&&null!==e.root?n.root=u.MerkleRoot.fromJSON(e.root):n.root=void 0,void 0!==e.nextValidatorsHash&&null!==e.nextValidatorsHash&&(n.nextValidatorsHash=function(e){for(var t=w(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.clientId&&n.uint32(10).string(e.clientId),void 0!==e.header1&&t.Header.encode(e.header1,n.uint32(18).fork()).ldelim(),void 0!==e.header2&&t.Header.encode(e.header2,n.uint32(26).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},h);a.pos>>3){case 1:r.clientId=a.string();break;case 2:r.header1=t.Header.decode(a,a.uint32());break;case 3:r.header2=t.Header.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},h);return void 0!==e.clientId&&null!==e.clientId?n.clientId=String(e.clientId):n.clientId="",void 0!==e.header1&&null!==e.header1?n.header1=t.Header.fromJSON(e.header1):n.header1=void 0,void 0!==e.header2&&null!==e.header2?n.header2=t.Header.fromJSON(e.header2):n.header2=void 0,n},toJSON:function(e){var n={};return void 0!==e.clientId&&(n.clientId=e.clientId),void 0!==e.header1&&(n.header1=e.header1?t.Header.toJSON(e.header1):void 0),void 0!==e.header2&&(n.header2=e.header2?t.Header.toJSON(e.header2):void 0),n},fromPartial:function(e){var n=Object.assign({},h);return void 0!==e.clientId&&null!==e.clientId?n.clientId=e.clientId:n.clientId="",void 0!==e.header1&&null!==e.header1?n.header1=t.Header.fromPartial(e.header1):n.header1=void 0,void 0!==e.header2&&null!==e.header2?n.header2=t.Header.fromPartial(e.header2):n.header2=void 0,n}};var g={};t.Header={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.signedHeader&&d.SignedHeader.encode(e.signedHeader,t.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&l.ValidatorSet.encode(e.validatorSet,t.uint32(18).fork()).ldelim(),void 0!==e.trustedHeight&&c.Height.encode(e.trustedHeight,t.uint32(26).fork()).ldelim(),void 0!==e.trustedValidators&&l.ValidatorSet.encode(e.trustedValidators,t.uint32(34).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);n.pos>>3){case 1:o.signedHeader=d.SignedHeader.decode(n,n.uint32());break;case 2:o.validatorSet=l.ValidatorSet.decode(n,n.uint32());break;case 3:o.trustedHeight=c.Height.decode(n,n.uint32());break;case 4:o.trustedValidators=l.ValidatorSet.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},g);return void 0!==e.signedHeader&&null!==e.signedHeader?t.signedHeader=d.SignedHeader.fromJSON(e.signedHeader):t.signedHeader=void 0,void 0!==e.validatorSet&&null!==e.validatorSet?t.validatorSet=l.ValidatorSet.fromJSON(e.validatorSet):t.validatorSet=void 0,void 0!==e.trustedHeight&&null!==e.trustedHeight?t.trustedHeight=c.Height.fromJSON(e.trustedHeight):t.trustedHeight=void 0,void 0!==e.trustedValidators&&null!==e.trustedValidators?t.trustedValidators=l.ValidatorSet.fromJSON(e.trustedValidators):t.trustedValidators=void 0,t},toJSON:function(e){var t={};return void 0!==e.signedHeader&&(t.signedHeader=e.signedHeader?d.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(t.validatorSet=e.validatorSet?l.ValidatorSet.toJSON(e.validatorSet):void 0),void 0!==e.trustedHeight&&(t.trustedHeight=e.trustedHeight?c.Height.toJSON(e.trustedHeight):void 0),void 0!==e.trustedValidators&&(t.trustedValidators=e.trustedValidators?l.ValidatorSet.toJSON(e.trustedValidators):void 0),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.signedHeader&&null!==e.signedHeader?t.signedHeader=d.SignedHeader.fromPartial(e.signedHeader):t.signedHeader=void 0,void 0!==e.validatorSet&&null!==e.validatorSet?t.validatorSet=l.ValidatorSet.fromPartial(e.validatorSet):t.validatorSet=void 0,void 0!==e.trustedHeight&&null!==e.trustedHeight?t.trustedHeight=c.Height.fromPartial(e.trustedHeight):t.trustedHeight=void 0,void 0!==e.trustedValidators&&null!==e.trustedValidators?t.trustedValidators=l.ValidatorSet.fromPartial(e.trustedValidators):t.trustedValidators=void 0,t}};var y={numerator:r.default.UZERO,denominator:r.default.UZERO};t.Fraction={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.numerator.isZero()||t.uint32(8).uint64(e.numerator),e.denominator.isZero()||t.uint32(16).uint64(e.denominator),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);n.pos>>3){case 1:o.numerator=n.uint64();break;case 2:o.denominator=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return void 0!==e.numerator&&null!==e.numerator?t.numerator=r.default.fromString(e.numerator):t.numerator=r.default.UZERO,void 0!==e.denominator&&null!==e.denominator?t.denominator=r.default.fromString(e.denominator):t.denominator=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.numerator&&(t.numerator=(e.numerator||r.default.UZERO).toString()),void 0!==e.denominator&&(t.denominator=(e.denominator||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.numerator&&null!==e.numerator?t.numerator=e.numerator:t.numerator=r.default.UZERO,void 0!==e.denominator&&null!==e.denominator?t.denominator=e.denominator:t.denominator=r.default.UZERO,t}};var v=function(){if("undefined"!==typeof v)return v;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),w=v.atob||function(e){return v.Buffer.from(e,"base64").toString("binary")};var k=v.btoa||function(e){return v.Buffer.from(e,"binary").toString("base64")};function A(e){var t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},78645:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GrpcWebImpl=t.ABCIApplicationApplySnapshotChunkDesc=t.ABCIApplicationLoadSnapshotChunkDesc=t.ABCIApplicationOfferSnapshotDesc=t.ABCIApplicationListSnapshotsDesc=t.ABCIApplicationEndBlockDesc=t.ABCIApplicationBeginBlockDesc=t.ABCIApplicationInitChainDesc=t.ABCIApplicationCommitDesc=t.ABCIApplicationQueryDesc=t.ABCIApplicationCheckTxDesc=t.ABCIApplicationDeliverTxDesc=t.ABCIApplicationSetOptionDesc=t.ABCIApplicationInfoDesc=t.ABCIApplicationFlushDesc=t.ABCIApplicationEchoDesc=t.ABCIApplicationDesc=t.ABCIApplicationClientImpl=t.Snapshot=t.Evidence=t.VoteInfo=t.ValidatorUpdate=t.Validator=t.TxResult=t.EventAttribute=t.Event=t.LastCommitInfo=t.BlockParams=t.ConsensusParams=t.ResponseApplySnapshotChunk=t.ResponseLoadSnapshotChunk=t.ResponseOfferSnapshot=t.ResponseListSnapshots=t.ResponseCommit=t.ResponseEndBlock=t.ResponseDeliverTx=t.ResponseCheckTx=t.ResponseBeginBlock=t.ResponseQuery=t.ResponseInitChain=t.ResponseSetOption=t.ResponseInfo=t.ResponseFlush=t.ResponseEcho=t.ResponseException=t.Response=t.RequestApplySnapshotChunk=t.RequestLoadSnapshotChunk=t.RequestOfferSnapshot=t.RequestListSnapshots=t.RequestCommit=t.RequestEndBlock=t.RequestDeliverTx=t.RequestCheckTx=t.RequestBeginBlock=t.RequestQuery=t.RequestInitChain=t.RequestSetOption=t.RequestInfo=t.RequestFlush=t.RequestEcho=t.Request=t.responseApplySnapshotChunk_ResultToJSON=t.responseApplySnapshotChunk_ResultFromJSON=t.ResponseApplySnapshotChunk_Result=t.responseOfferSnapshot_ResultToJSON=t.responseOfferSnapshot_ResultFromJSON=t.ResponseOfferSnapshot_Result=t.evidenceTypeToJSON=t.evidenceTypeFromJSON=t.EvidenceType=t.checkTxTypeToJSON=t.checkTxTypeFromJSON=t.CheckTxType=t.protobufPackage=void 0;var s,c,u,d,l=i(n(29600)),f=n(93704),p=i(n(80121)),b=n(78750),m=n(46760),h=n(95836),g=n(52620),y=n(82576),v=n(47478);function w(e){switch(e){case 0:case"NEW":return s.NEW;case 1:case"RECHECK":return s.RECHECK;default:return s.UNRECOGNIZED}}function k(e){switch(e){case s.NEW:return"NEW";case s.RECHECK:return"RECHECK";default:return"UNKNOWN"}}function A(e){switch(e){case 0:case"UNKNOWN":return c.UNKNOWN;case 1:case"DUPLICATE_VOTE":return c.DUPLICATE_VOTE;case 2:case"LIGHT_CLIENT_ATTACK":return c.LIGHT_CLIENT_ATTACK;default:return c.UNRECOGNIZED}}function x(e){switch(e){case c.UNKNOWN:return"UNKNOWN";case c.DUPLICATE_VOTE:return"DUPLICATE_VOTE";case c.LIGHT_CLIENT_ATTACK:return"LIGHT_CLIENT_ATTACK";default:return"UNKNOWN"}}function I(e){switch(e){case 0:case"UNKNOWN":return u.UNKNOWN;case 1:case"ACCEPT":return u.ACCEPT;case 2:case"ABORT":return u.ABORT;case 3:case"REJECT":return u.REJECT;case 4:case"REJECT_FORMAT":return u.REJECT_FORMAT;case 5:case"REJECT_SENDER":return u.REJECT_SENDER;default:return u.UNRECOGNIZED}}function T(e){switch(e){case u.UNKNOWN:return"UNKNOWN";case u.ACCEPT:return"ACCEPT";case u.ABORT:return"ABORT";case u.REJECT:return"REJECT";case u.REJECT_FORMAT:return"REJECT_FORMAT";case u.REJECT_SENDER:return"REJECT_SENDER";default:return"UNKNOWN"}}function S(e){switch(e){case 0:case"UNKNOWN":return d.UNKNOWN;case 1:case"ACCEPT":return d.ACCEPT;case 2:case"ABORT":return d.ABORT;case 3:case"RETRY":return d.RETRY;case 4:case"RETRY_SNAPSHOT":return d.RETRY_SNAPSHOT;case 5:case"REJECT_SNAPSHOT":return d.REJECT_SNAPSHOT;default:return d.UNRECOGNIZED}}function C(e){switch(e){case d.UNKNOWN:return"UNKNOWN";case d.ACCEPT:return"ACCEPT";case d.ABORT:return"ABORT";case d.RETRY:return"RETRY";case d.RETRY_SNAPSHOT:return"RETRY_SNAPSHOT";case d.REJECT_SNAPSHOT:return"REJECT_SNAPSHOT";default:return"UNKNOWN"}}t.protobufPackage="tendermint.abci",function(e){e[e.NEW=0]="NEW",e[e.RECHECK=1]="RECHECK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(s=t.CheckTxType||(t.CheckTxType={})),t.checkTxTypeFromJSON=w,t.checkTxTypeToJSON=k,function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.DUPLICATE_VOTE=1]="DUPLICATE_VOTE",e[e.LIGHT_CLIENT_ATTACK=2]="LIGHT_CLIENT_ATTACK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(c=t.EvidenceType||(t.EvidenceType={})),t.evidenceTypeFromJSON=A,t.evidenceTypeToJSON=x,function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ACCEPT=1]="ACCEPT",e[e.ABORT=2]="ABORT",e[e.REJECT=3]="REJECT",e[e.REJECT_FORMAT=4]="REJECT_FORMAT",e[e.REJECT_SENDER=5]="REJECT_SENDER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(u=t.ResponseOfferSnapshot_Result||(t.ResponseOfferSnapshot_Result={})),t.responseOfferSnapshot_ResultFromJSON=I,t.responseOfferSnapshot_ResultToJSON=T,function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ACCEPT=1]="ACCEPT",e[e.ABORT=2]="ABORT",e[e.RETRY=3]="RETRY",e[e.RETRY_SNAPSHOT=4]="RETRY_SNAPSHOT",e[e.REJECT_SNAPSHOT=5]="REJECT_SNAPSHOT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(d=t.ResponseApplySnapshotChunk_Result||(t.ResponseApplySnapshotChunk_Result={})),t.responseApplySnapshotChunk_ResultFromJSON=S,t.responseApplySnapshotChunk_ResultToJSON=C;var E={};t.Request={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return void 0!==e.echo&&t.RequestEcho.encode(e.echo,n.uint32(10).fork()).ldelim(),void 0!==e.flush&&t.RequestFlush.encode(e.flush,n.uint32(18).fork()).ldelim(),void 0!==e.info&&t.RequestInfo.encode(e.info,n.uint32(26).fork()).ldelim(),void 0!==e.setOption&&t.RequestSetOption.encode(e.setOption,n.uint32(34).fork()).ldelim(),void 0!==e.initChain&&t.RequestInitChain.encode(e.initChain,n.uint32(42).fork()).ldelim(),void 0!==e.query&&t.RequestQuery.encode(e.query,n.uint32(50).fork()).ldelim(),void 0!==e.beginBlock&&t.RequestBeginBlock.encode(e.beginBlock,n.uint32(58).fork()).ldelim(),void 0!==e.checkTx&&t.RequestCheckTx.encode(e.checkTx,n.uint32(66).fork()).ldelim(),void 0!==e.deliverTx&&t.RequestDeliverTx.encode(e.deliverTx,n.uint32(74).fork()).ldelim(),void 0!==e.endBlock&&t.RequestEndBlock.encode(e.endBlock,n.uint32(82).fork()).ldelim(),void 0!==e.commit&&t.RequestCommit.encode(e.commit,n.uint32(90).fork()).ldelim(),void 0!==e.listSnapshots&&t.RequestListSnapshots.encode(e.listSnapshots,n.uint32(98).fork()).ldelim(),void 0!==e.offerSnapshot&&t.RequestOfferSnapshot.encode(e.offerSnapshot,n.uint32(106).fork()).ldelim(),void 0!==e.loadSnapshotChunk&&t.RequestLoadSnapshotChunk.encode(e.loadSnapshotChunk,n.uint32(114).fork()).ldelim(),void 0!==e.applySnapshotChunk&&t.RequestApplySnapshotChunk.encode(e.applySnapshotChunk,n.uint32(122).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},E);a.pos>>3){case 1:r.echo=t.RequestEcho.decode(a,a.uint32());break;case 2:r.flush=t.RequestFlush.decode(a,a.uint32());break;case 3:r.info=t.RequestInfo.decode(a,a.uint32());break;case 4:r.setOption=t.RequestSetOption.decode(a,a.uint32());break;case 5:r.initChain=t.RequestInitChain.decode(a,a.uint32());break;case 6:r.query=t.RequestQuery.decode(a,a.uint32());break;case 7:r.beginBlock=t.RequestBeginBlock.decode(a,a.uint32());break;case 8:r.checkTx=t.RequestCheckTx.decode(a,a.uint32());break;case 9:r.deliverTx=t.RequestDeliverTx.decode(a,a.uint32());break;case 10:r.endBlock=t.RequestEndBlock.decode(a,a.uint32());break;case 11:r.commit=t.RequestCommit.decode(a,a.uint32());break;case 12:r.listSnapshots=t.RequestListSnapshots.decode(a,a.uint32());break;case 13:r.offerSnapshot=t.RequestOfferSnapshot.decode(a,a.uint32());break;case 14:r.loadSnapshotChunk=t.RequestLoadSnapshotChunk.decode(a,a.uint32());break;case 15:r.applySnapshotChunk=t.RequestApplySnapshotChunk.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},E);return void 0!==e.echo&&null!==e.echo?n.echo=t.RequestEcho.fromJSON(e.echo):n.echo=void 0,void 0!==e.flush&&null!==e.flush?n.flush=t.RequestFlush.fromJSON(e.flush):n.flush=void 0,void 0!==e.info&&null!==e.info?n.info=t.RequestInfo.fromJSON(e.info):n.info=void 0,void 0!==e.setOption&&null!==e.setOption?n.setOption=t.RequestSetOption.fromJSON(e.setOption):n.setOption=void 0,void 0!==e.initChain&&null!==e.initChain?n.initChain=t.RequestInitChain.fromJSON(e.initChain):n.initChain=void 0,void 0!==e.query&&null!==e.query?n.query=t.RequestQuery.fromJSON(e.query):n.query=void 0,void 0!==e.beginBlock&&null!==e.beginBlock?n.beginBlock=t.RequestBeginBlock.fromJSON(e.beginBlock):n.beginBlock=void 0,void 0!==e.checkTx&&null!==e.checkTx?n.checkTx=t.RequestCheckTx.fromJSON(e.checkTx):n.checkTx=void 0,void 0!==e.deliverTx&&null!==e.deliverTx?n.deliverTx=t.RequestDeliverTx.fromJSON(e.deliverTx):n.deliverTx=void 0,void 0!==e.endBlock&&null!==e.endBlock?n.endBlock=t.RequestEndBlock.fromJSON(e.endBlock):n.endBlock=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.RequestCommit.fromJSON(e.commit):n.commit=void 0,void 0!==e.listSnapshots&&null!==e.listSnapshots?n.listSnapshots=t.RequestListSnapshots.fromJSON(e.listSnapshots):n.listSnapshots=void 0,void 0!==e.offerSnapshot&&null!==e.offerSnapshot?n.offerSnapshot=t.RequestOfferSnapshot.fromJSON(e.offerSnapshot):n.offerSnapshot=void 0,void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?n.loadSnapshotChunk=t.RequestLoadSnapshotChunk.fromJSON(e.loadSnapshotChunk):n.loadSnapshotChunk=void 0,void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?n.applySnapshotChunk=t.RequestApplySnapshotChunk.fromJSON(e.applySnapshotChunk):n.applySnapshotChunk=void 0,n},toJSON:function(e){var n={};return void 0!==e.echo&&(n.echo=e.echo?t.RequestEcho.toJSON(e.echo):void 0),void 0!==e.flush&&(n.flush=e.flush?t.RequestFlush.toJSON(e.flush):void 0),void 0!==e.info&&(n.info=e.info?t.RequestInfo.toJSON(e.info):void 0),void 0!==e.setOption&&(n.setOption=e.setOption?t.RequestSetOption.toJSON(e.setOption):void 0),void 0!==e.initChain&&(n.initChain=e.initChain?t.RequestInitChain.toJSON(e.initChain):void 0),void 0!==e.query&&(n.query=e.query?t.RequestQuery.toJSON(e.query):void 0),void 0!==e.beginBlock&&(n.beginBlock=e.beginBlock?t.RequestBeginBlock.toJSON(e.beginBlock):void 0),void 0!==e.checkTx&&(n.checkTx=e.checkTx?t.RequestCheckTx.toJSON(e.checkTx):void 0),void 0!==e.deliverTx&&(n.deliverTx=e.deliverTx?t.RequestDeliverTx.toJSON(e.deliverTx):void 0),void 0!==e.endBlock&&(n.endBlock=e.endBlock?t.RequestEndBlock.toJSON(e.endBlock):void 0),void 0!==e.commit&&(n.commit=e.commit?t.RequestCommit.toJSON(e.commit):void 0),void 0!==e.listSnapshots&&(n.listSnapshots=e.listSnapshots?t.RequestListSnapshots.toJSON(e.listSnapshots):void 0),void 0!==e.offerSnapshot&&(n.offerSnapshot=e.offerSnapshot?t.RequestOfferSnapshot.toJSON(e.offerSnapshot):void 0),void 0!==e.loadSnapshotChunk&&(n.loadSnapshotChunk=e.loadSnapshotChunk?t.RequestLoadSnapshotChunk.toJSON(e.loadSnapshotChunk):void 0),void 0!==e.applySnapshotChunk&&(n.applySnapshotChunk=e.applySnapshotChunk?t.RequestApplySnapshotChunk.toJSON(e.applySnapshotChunk):void 0),n},fromPartial:function(e){var n=Object.assign({},E);return void 0!==e.echo&&null!==e.echo?n.echo=t.RequestEcho.fromPartial(e.echo):n.echo=void 0,void 0!==e.flush&&null!==e.flush?n.flush=t.RequestFlush.fromPartial(e.flush):n.flush=void 0,void 0!==e.info&&null!==e.info?n.info=t.RequestInfo.fromPartial(e.info):n.info=void 0,void 0!==e.setOption&&null!==e.setOption?n.setOption=t.RequestSetOption.fromPartial(e.setOption):n.setOption=void 0,void 0!==e.initChain&&null!==e.initChain?n.initChain=t.RequestInitChain.fromPartial(e.initChain):n.initChain=void 0,void 0!==e.query&&null!==e.query?n.query=t.RequestQuery.fromPartial(e.query):n.query=void 0,void 0!==e.beginBlock&&null!==e.beginBlock?n.beginBlock=t.RequestBeginBlock.fromPartial(e.beginBlock):n.beginBlock=void 0,void 0!==e.checkTx&&null!==e.checkTx?n.checkTx=t.RequestCheckTx.fromPartial(e.checkTx):n.checkTx=void 0,void 0!==e.deliverTx&&null!==e.deliverTx?n.deliverTx=t.RequestDeliverTx.fromPartial(e.deliverTx):n.deliverTx=void 0,void 0!==e.endBlock&&null!==e.endBlock?n.endBlock=t.RequestEndBlock.fromPartial(e.endBlock):n.endBlock=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.RequestCommit.fromPartial(e.commit):n.commit=void 0,void 0!==e.listSnapshots&&null!==e.listSnapshots?n.listSnapshots=t.RequestListSnapshots.fromPartial(e.listSnapshots):n.listSnapshots=void 0,void 0!==e.offerSnapshot&&null!==e.offerSnapshot?n.offerSnapshot=t.RequestOfferSnapshot.fromPartial(e.offerSnapshot):n.offerSnapshot=void 0,void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?n.loadSnapshotChunk=t.RequestLoadSnapshotChunk.fromPartial(e.loadSnapshotChunk):n.loadSnapshotChunk=void 0,void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?n.applySnapshotChunk=t.RequestApplySnapshotChunk.fromPartial(e.applySnapshotChunk):n.applySnapshotChunk=void 0,n}};var R={message:""};t.RequestEcho={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return""!==e.message&&t.uint32(10).string(e.message),t},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},R);n.pos>>3===1)o.message=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},R);return void 0!==e.message&&null!==e.message?t.message=String(e.message):t.message="",t},toJSON:function(e){var t={};return void 0!==e.message&&(t.message=e.message),t},fromPartial:function(e){var t=Object.assign({},R);return void 0!==e.message&&null!==e.message?t.message=e.message:t.message="",t}};var M={};t.RequestFlush={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create()},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},M);n.pos1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return""!==e.version&&t.uint32(10).string(e.version),e.blockVersion.isZero()||t.uint32(16).uint64(e.blockVersion),e.p2pVersion.isZero()||t.uint32(24).uint64(e.p2pVersion),t},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},P);n.pos>>3){case 1:o.version=n.string();break;case 2:o.blockVersion=n.uint64();break;case 3:o.p2pVersion=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},P);return void 0!==e.version&&null!==e.version?t.version=String(e.version):t.version="",void 0!==e.blockVersion&&null!==e.blockVersion?t.blockVersion=l.default.fromString(e.blockVersion):t.blockVersion=l.default.UZERO,void 0!==e.p2pVersion&&null!==e.p2pVersion?t.p2pVersion=l.default.fromString(e.p2pVersion):t.p2pVersion=l.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.version&&(t.version=e.version),void 0!==e.blockVersion&&(t.blockVersion=(e.blockVersion||l.default.UZERO).toString()),void 0!==e.p2pVersion&&(t.p2pVersion=(e.p2pVersion||l.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},P);return void 0!==e.version&&null!==e.version?t.version=e.version:t.version="",void 0!==e.blockVersion&&null!==e.blockVersion?t.blockVersion=e.blockVersion:t.blockVersion=l.default.UZERO,void 0!==e.p2pVersion&&null!==e.p2pVersion?t.p2pVersion=e.p2pVersion:t.p2pVersion=l.default.UZERO,t}};var U={key:"",value:""};t.RequestSetOption={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.value&&t.uint32(18).string(e.value),t},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},U);n.pos>>3){case 1:o.key=n.string();break;case 2:o.value=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},U);return void 0!==e.key&&null!==e.key?t.key=String(e.key):t.key="",void 0!==e.value&&null!==e.value?t.value=String(e.value):t.value="",t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=e.value),t},fromPartial:function(e){var t=Object.assign({},U);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key="",void 0!==e.value&&null!==e.value?t.value=e.value:t.value="",t}};var _={chainId:"",initialHeight:l.default.ZERO};t.RequestInitChain={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();void 0!==e.time&&v.Timestamp.encode(Te(e.time),n.uint32(10).fork()).ldelim(),""!==e.chainId&&n.uint32(18).string(e.chainId),void 0!==e.consensusParams&&t.ConsensusParams.encode(e.consensusParams,n.uint32(26).fork()).ldelim();var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.ValidatorUpdate.encode(i,n.uint32(34).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return 0!==e.appStateBytes.length&&n.uint32(42).bytes(e.appStateBytes),e.initialHeight.isZero()||n.uint32(48).int64(e.initialHeight),n},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},_);for(r.validators=[],r.appStateBytes=new Uint8Array;a.pos>>3){case 1:r.time=Se(v.Timestamp.decode(a,a.uint32()));break;case 2:r.chainId=a.string();break;case 3:r.consensusParams=t.ConsensusParams.decode(a,a.uint32());break;case 4:r.validators.push(t.ValidatorUpdate.decode(a,a.uint32()));break;case 5:r.appStateBytes=a.bytes();break;case 6:r.initialHeight=a.int64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},_);if(n.validators=[],n.appStateBytes=new Uint8Array,void 0!==e.time&&null!==e.time?n.time=Ce(e.time):n.time=void 0,void 0!==e.chainId&&null!==e.chainId?n.chainId=String(e.chainId):n.chainId="",void 0!==e.consensusParams&&null!==e.consensusParams?n.consensusParams=t.ConsensusParams.fromJSON(e.consensusParams):n.consensusParams=void 0,void 0!==e.validators&&null!==e.validators){var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validators.push(t.ValidatorUpdate.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.appStateBytes&&null!==e.appStateBytes&&(n.appStateBytes=Ae(e.appStateBytes)),void 0!==e.initialHeight&&null!==e.initialHeight?n.initialHeight=l.default.fromString(e.initialHeight):n.initialHeight=l.default.ZERO,n},toJSON:function(e){var n={};return void 0!==e.time&&(n.time=e.time.toISOString()),void 0!==e.chainId&&(n.chainId=e.chainId),void 0!==e.consensusParams&&(n.consensusParams=e.consensusParams?t.ConsensusParams.toJSON(e.consensusParams):void 0),e.validators?n.validators=e.validators.map((function(e){return e?t.ValidatorUpdate.toJSON(e):void 0})):n.validators=[],void 0!==e.appStateBytes&&(n.appStateBytes=Ie(void 0!==e.appStateBytes?e.appStateBytes:new Uint8Array)),void 0!==e.initialHeight&&(n.initialHeight=(e.initialHeight||l.default.ZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},_);if(n.validators=[],void 0!==e.time&&null!==e.time?n.time=e.time:n.time=void 0,void 0!==e.chainId&&null!==e.chainId?n.chainId=e.chainId:n.chainId="",void 0!==e.consensusParams&&null!==e.consensusParams?n.consensusParams=t.ConsensusParams.fromPartial(e.consensusParams):n.consensusParams=void 0,void 0!==e.validators&&null!==e.validators){var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validators.push(t.ValidatorUpdate.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.appStateBytes&&null!==e.appStateBytes?n.appStateBytes=e.appStateBytes:n.appStateBytes=new Uint8Array,void 0!==e.initialHeight&&null!==e.initialHeight?n.initialHeight=e.initialHeight:n.initialHeight=l.default.ZERO,n}};var B={path:"",height:l.default.ZERO,prove:!1};t.RequestQuery={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),""!==e.path&&t.uint32(18).string(e.path),e.height.isZero()||t.uint32(24).int64(e.height),!0===e.prove&&t.uint32(32).bool(e.prove),t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},B);for(o.data=new Uint8Array;n.pos>>3){case 1:o.data=n.bytes();break;case 2:o.path=n.string();break;case 3:o.height=n.int64();break;case 4:o.prove=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},B);return t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=Ae(e.data)),void 0!==e.path&&null!==e.path?t.path=String(e.path):t.path="",void 0!==e.height&&null!==e.height?t.height=l.default.fromString(e.height):t.height=l.default.ZERO,void 0!==e.prove&&null!==e.prove?t.prove=Boolean(e.prove):t.prove=!1,t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=Ie(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.path&&(t.path=e.path),void 0!==e.height&&(t.height=(e.height||l.default.ZERO).toString()),void 0!==e.prove&&(t.prove=e.prove),t},fromPartial:function(e){var t=Object.assign({},B);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,void 0!==e.path&&null!==e.path?t.path=e.path:t.path="",void 0!==e.height&&null!==e.height?t.height=e.height:t.height=l.default.ZERO,void 0!==e.prove&&null!==e.prove?t.prove=e.prove:t.prove=!1,t}};var D={};t.RequestBeginBlock={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();0!==e.hash.length&&n.uint32(10).bytes(e.hash),void 0!==e.header&&b.Header.encode(e.header,n.uint32(18).fork()).ldelim(),void 0!==e.lastCommitInfo&&t.LastCommitInfo.encode(e.lastCommitInfo,n.uint32(26).fork()).ldelim();var a,o=r(e.byzantineValidators);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.Evidence.encode(i,n.uint32(34).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},D);for(r.byzantineValidators=[],r.hash=new Uint8Array;a.pos>>3){case 1:r.hash=a.bytes();break;case 2:r.header=b.Header.decode(a,a.uint32());break;case 3:r.lastCommitInfo=t.LastCommitInfo.decode(a,a.uint32());break;case 4:r.byzantineValidators.push(t.Evidence.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},D);if(n.byzantineValidators=[],n.hash=new Uint8Array,void 0!==e.hash&&null!==e.hash&&(n.hash=Ae(e.hash)),void 0!==e.header&&null!==e.header?n.header=b.Header.fromJSON(e.header):n.header=void 0,void 0!==e.lastCommitInfo&&null!==e.lastCommitInfo?n.lastCommitInfo=t.LastCommitInfo.fromJSON(e.lastCommitInfo):n.lastCommitInfo=void 0,void 0!==e.byzantineValidators&&null!==e.byzantineValidators){var a,o=r(e.byzantineValidators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.byzantineValidators.push(t.Evidence.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return void 0!==e.hash&&(n.hash=Ie(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.header&&(n.header=e.header?b.Header.toJSON(e.header):void 0),void 0!==e.lastCommitInfo&&(n.lastCommitInfo=e.lastCommitInfo?t.LastCommitInfo.toJSON(e.lastCommitInfo):void 0),e.byzantineValidators?n.byzantineValidators=e.byzantineValidators.map((function(e){return e?t.Evidence.toJSON(e):void 0})):n.byzantineValidators=[],n},fromPartial:function(e){var n=Object.assign({},D);if(n.byzantineValidators=[],void 0!==e.hash&&null!==e.hash?n.hash=e.hash:n.hash=new Uint8Array,void 0!==e.header&&null!==e.header?n.header=b.Header.fromPartial(e.header):n.header=void 0,void 0!==e.lastCommitInfo&&null!==e.lastCommitInfo?n.lastCommitInfo=t.LastCommitInfo.fromPartial(e.lastCommitInfo):n.lastCommitInfo=void 0,void 0!==e.byzantineValidators&&null!==e.byzantineValidators){var a,o=r(e.byzantineValidators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.byzantineValidators.push(t.Evidence.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return n}};var N={type:0};t.RequestCheckTx={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.tx.length&&t.uint32(10).bytes(e.tx),0!==e.type&&t.uint32(16).int32(e.type),t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},N);for(o.tx=new Uint8Array;n.pos>>3){case 1:o.tx=n.bytes();break;case 2:o.type=n.int32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},N);return t.tx=new Uint8Array,void 0!==e.tx&&null!==e.tx&&(t.tx=Ae(e.tx)),void 0!==e.type&&null!==e.type?t.type=w(e.type):t.type=0,t},toJSON:function(e){var t={};return void 0!==e.tx&&(t.tx=Ie(void 0!==e.tx?e.tx:new Uint8Array)),void 0!==e.type&&(t.type=k(e.type)),t},fromPartial:function(e){var t=Object.assign({},N);return void 0!==e.tx&&null!==e.tx?t.tx=e.tx:t.tx=new Uint8Array,void 0!==e.type&&null!==e.type?t.type=e.type:t.type=0,t}};var O={};t.RequestDeliverTx={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.tx.length&&t.uint32(10).bytes(e.tx),t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},O);for(o.tx=new Uint8Array;n.pos>>3===1)o.tx=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},O);return t.tx=new Uint8Array,void 0!==e.tx&&null!==e.tx&&(t.tx=Ae(e.tx)),t},toJSON:function(e){var t={};return void 0!==e.tx&&(t.tx=Ie(void 0!==e.tx?e.tx:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},O);return void 0!==e.tx&&null!==e.tx?t.tx=e.tx:t.tx=new Uint8Array,t}};var F={height:l.default.ZERO};t.RequestEndBlock={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return e.height.isZero()||t.uint32(8).int64(e.height),t},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},F);n.pos>>3===1)o.height=n.int64();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},F);return void 0!==e.height&&null!==e.height?t.height=l.default.fromString(e.height):t.height=l.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.height&&(t.height=(e.height||l.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},F);return void 0!==e.height&&null!==e.height?t.height=e.height:t.height=l.default.ZERO,t}};var L={};t.RequestCommit={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create()},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},L);n.pos1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create()},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},j);n.pos1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return void 0!==e.snapshot&&t.Snapshot.encode(e.snapshot,n.uint32(10).fork()).ldelim(),0!==e.appHash.length&&n.uint32(18).bytes(e.appHash),n},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},H);for(r.appHash=new Uint8Array;a.pos>>3){case 1:r.snapshot=t.Snapshot.decode(a,a.uint32());break;case 2:r.appHash=a.bytes();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},H);return n.appHash=new Uint8Array,void 0!==e.snapshot&&null!==e.snapshot?n.snapshot=t.Snapshot.fromJSON(e.snapshot):n.snapshot=void 0,void 0!==e.appHash&&null!==e.appHash&&(n.appHash=Ae(e.appHash)),n},toJSON:function(e){var n={};return void 0!==e.snapshot&&(n.snapshot=e.snapshot?t.Snapshot.toJSON(e.snapshot):void 0),void 0!==e.appHash&&(n.appHash=Ie(void 0!==e.appHash?e.appHash:new Uint8Array)),n},fromPartial:function(e){var n=Object.assign({},H);return void 0!==e.snapshot&&null!==e.snapshot?n.snapshot=t.Snapshot.fromPartial(e.snapshot):n.snapshot=void 0,void 0!==e.appHash&&null!==e.appHash?n.appHash=e.appHash:n.appHash=new Uint8Array,n}};var G={height:l.default.UZERO,format:0,chunk:0};t.RequestLoadSnapshotChunk={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return e.height.isZero()||t.uint32(8).uint64(e.height),0!==e.format&&t.uint32(16).uint32(e.format),0!==e.chunk&&t.uint32(24).uint32(e.chunk),t},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},G);n.pos>>3){case 1:o.height=n.uint64();break;case 2:o.format=n.uint32();break;case 3:o.chunk=n.uint32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},G);return void 0!==e.height&&null!==e.height?t.height=l.default.fromString(e.height):t.height=l.default.UZERO,void 0!==e.format&&null!==e.format?t.format=Number(e.format):t.format=0,void 0!==e.chunk&&null!==e.chunk?t.chunk=Number(e.chunk):t.chunk=0,t},toJSON:function(e){var t={};return void 0!==e.height&&(t.height=(e.height||l.default.UZERO).toString()),void 0!==e.format&&(t.format=e.format),void 0!==e.chunk&&(t.chunk=e.chunk),t},fromPartial:function(e){var t=Object.assign({},G);return void 0!==e.height&&null!==e.height?t.height=e.height:t.height=l.default.UZERO,void 0!==e.format&&null!==e.format?t.format=e.format:t.format=0,void 0!==e.chunk&&null!==e.chunk?t.chunk=e.chunk:t.chunk=0,t}};var z={index:0,sender:""};t.RequestApplySnapshotChunk={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.index&&t.uint32(8).uint32(e.index),0!==e.chunk.length&&t.uint32(18).bytes(e.chunk),""!==e.sender&&t.uint32(26).string(e.sender),t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},z);for(o.chunk=new Uint8Array;n.pos>>3){case 1:o.index=n.uint32();break;case 2:o.chunk=n.bytes();break;case 3:o.sender=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},z);return t.chunk=new Uint8Array,void 0!==e.index&&null!==e.index?t.index=Number(e.index):t.index=0,void 0!==e.chunk&&null!==e.chunk&&(t.chunk=Ae(e.chunk)),void 0!==e.sender&&null!==e.sender?t.sender=String(e.sender):t.sender="",t},toJSON:function(e){var t={};return void 0!==e.index&&(t.index=e.index),void 0!==e.chunk&&(t.chunk=Ie(void 0!==e.chunk?e.chunk:new Uint8Array)),void 0!==e.sender&&(t.sender=e.sender),t},fromPartial:function(e){var t=Object.assign({},z);return void 0!==e.index&&null!==e.index?t.index=e.index:t.index=0,void 0!==e.chunk&&null!==e.chunk?t.chunk=e.chunk:t.chunk=new Uint8Array,void 0!==e.sender&&null!==e.sender?t.sender=e.sender:t.sender="",t}};var K={};t.Response={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return void 0!==e.exception&&t.ResponseException.encode(e.exception,n.uint32(10).fork()).ldelim(),void 0!==e.echo&&t.ResponseEcho.encode(e.echo,n.uint32(18).fork()).ldelim(),void 0!==e.flush&&t.ResponseFlush.encode(e.flush,n.uint32(26).fork()).ldelim(),void 0!==e.info&&t.ResponseInfo.encode(e.info,n.uint32(34).fork()).ldelim(),void 0!==e.setOption&&t.ResponseSetOption.encode(e.setOption,n.uint32(42).fork()).ldelim(),void 0!==e.initChain&&t.ResponseInitChain.encode(e.initChain,n.uint32(50).fork()).ldelim(),void 0!==e.query&&t.ResponseQuery.encode(e.query,n.uint32(58).fork()).ldelim(),void 0!==e.beginBlock&&t.ResponseBeginBlock.encode(e.beginBlock,n.uint32(66).fork()).ldelim(),void 0!==e.checkTx&&t.ResponseCheckTx.encode(e.checkTx,n.uint32(74).fork()).ldelim(),void 0!==e.deliverTx&&t.ResponseDeliverTx.encode(e.deliverTx,n.uint32(82).fork()).ldelim(),void 0!==e.endBlock&&t.ResponseEndBlock.encode(e.endBlock,n.uint32(90).fork()).ldelim(),void 0!==e.commit&&t.ResponseCommit.encode(e.commit,n.uint32(98).fork()).ldelim(),void 0!==e.listSnapshots&&t.ResponseListSnapshots.encode(e.listSnapshots,n.uint32(106).fork()).ldelim(),void 0!==e.offerSnapshot&&t.ResponseOfferSnapshot.encode(e.offerSnapshot,n.uint32(114).fork()).ldelim(),void 0!==e.loadSnapshotChunk&&t.ResponseLoadSnapshotChunk.encode(e.loadSnapshotChunk,n.uint32(122).fork()).ldelim(),void 0!==e.applySnapshotChunk&&t.ResponseApplySnapshotChunk.encode(e.applySnapshotChunk,n.uint32(130).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},K);a.pos>>3){case 1:r.exception=t.ResponseException.decode(a,a.uint32());break;case 2:r.echo=t.ResponseEcho.decode(a,a.uint32());break;case 3:r.flush=t.ResponseFlush.decode(a,a.uint32());break;case 4:r.info=t.ResponseInfo.decode(a,a.uint32());break;case 5:r.setOption=t.ResponseSetOption.decode(a,a.uint32());break;case 6:r.initChain=t.ResponseInitChain.decode(a,a.uint32());break;case 7:r.query=t.ResponseQuery.decode(a,a.uint32());break;case 8:r.beginBlock=t.ResponseBeginBlock.decode(a,a.uint32());break;case 9:r.checkTx=t.ResponseCheckTx.decode(a,a.uint32());break;case 10:r.deliverTx=t.ResponseDeliverTx.decode(a,a.uint32());break;case 11:r.endBlock=t.ResponseEndBlock.decode(a,a.uint32());break;case 12:r.commit=t.ResponseCommit.decode(a,a.uint32());break;case 13:r.listSnapshots=t.ResponseListSnapshots.decode(a,a.uint32());break;case 14:r.offerSnapshot=t.ResponseOfferSnapshot.decode(a,a.uint32());break;case 15:r.loadSnapshotChunk=t.ResponseLoadSnapshotChunk.decode(a,a.uint32());break;case 16:r.applySnapshotChunk=t.ResponseApplySnapshotChunk.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},K);return void 0!==e.exception&&null!==e.exception?n.exception=t.ResponseException.fromJSON(e.exception):n.exception=void 0,void 0!==e.echo&&null!==e.echo?n.echo=t.ResponseEcho.fromJSON(e.echo):n.echo=void 0,void 0!==e.flush&&null!==e.flush?n.flush=t.ResponseFlush.fromJSON(e.flush):n.flush=void 0,void 0!==e.info&&null!==e.info?n.info=t.ResponseInfo.fromJSON(e.info):n.info=void 0,void 0!==e.setOption&&null!==e.setOption?n.setOption=t.ResponseSetOption.fromJSON(e.setOption):n.setOption=void 0,void 0!==e.initChain&&null!==e.initChain?n.initChain=t.ResponseInitChain.fromJSON(e.initChain):n.initChain=void 0,void 0!==e.query&&null!==e.query?n.query=t.ResponseQuery.fromJSON(e.query):n.query=void 0,void 0!==e.beginBlock&&null!==e.beginBlock?n.beginBlock=t.ResponseBeginBlock.fromJSON(e.beginBlock):n.beginBlock=void 0,void 0!==e.checkTx&&null!==e.checkTx?n.checkTx=t.ResponseCheckTx.fromJSON(e.checkTx):n.checkTx=void 0,void 0!==e.deliverTx&&null!==e.deliverTx?n.deliverTx=t.ResponseDeliverTx.fromJSON(e.deliverTx):n.deliverTx=void 0,void 0!==e.endBlock&&null!==e.endBlock?n.endBlock=t.ResponseEndBlock.fromJSON(e.endBlock):n.endBlock=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.ResponseCommit.fromJSON(e.commit):n.commit=void 0,void 0!==e.listSnapshots&&null!==e.listSnapshots?n.listSnapshots=t.ResponseListSnapshots.fromJSON(e.listSnapshots):n.listSnapshots=void 0,void 0!==e.offerSnapshot&&null!==e.offerSnapshot?n.offerSnapshot=t.ResponseOfferSnapshot.fromJSON(e.offerSnapshot):n.offerSnapshot=void 0,void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?n.loadSnapshotChunk=t.ResponseLoadSnapshotChunk.fromJSON(e.loadSnapshotChunk):n.loadSnapshotChunk=void 0,void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?n.applySnapshotChunk=t.ResponseApplySnapshotChunk.fromJSON(e.applySnapshotChunk):n.applySnapshotChunk=void 0,n},toJSON:function(e){var n={};return void 0!==e.exception&&(n.exception=e.exception?t.ResponseException.toJSON(e.exception):void 0),void 0!==e.echo&&(n.echo=e.echo?t.ResponseEcho.toJSON(e.echo):void 0),void 0!==e.flush&&(n.flush=e.flush?t.ResponseFlush.toJSON(e.flush):void 0),void 0!==e.info&&(n.info=e.info?t.ResponseInfo.toJSON(e.info):void 0),void 0!==e.setOption&&(n.setOption=e.setOption?t.ResponseSetOption.toJSON(e.setOption):void 0),void 0!==e.initChain&&(n.initChain=e.initChain?t.ResponseInitChain.toJSON(e.initChain):void 0),void 0!==e.query&&(n.query=e.query?t.ResponseQuery.toJSON(e.query):void 0),void 0!==e.beginBlock&&(n.beginBlock=e.beginBlock?t.ResponseBeginBlock.toJSON(e.beginBlock):void 0),void 0!==e.checkTx&&(n.checkTx=e.checkTx?t.ResponseCheckTx.toJSON(e.checkTx):void 0),void 0!==e.deliverTx&&(n.deliverTx=e.deliverTx?t.ResponseDeliverTx.toJSON(e.deliverTx):void 0),void 0!==e.endBlock&&(n.endBlock=e.endBlock?t.ResponseEndBlock.toJSON(e.endBlock):void 0),void 0!==e.commit&&(n.commit=e.commit?t.ResponseCommit.toJSON(e.commit):void 0),void 0!==e.listSnapshots&&(n.listSnapshots=e.listSnapshots?t.ResponseListSnapshots.toJSON(e.listSnapshots):void 0),void 0!==e.offerSnapshot&&(n.offerSnapshot=e.offerSnapshot?t.ResponseOfferSnapshot.toJSON(e.offerSnapshot):void 0),void 0!==e.loadSnapshotChunk&&(n.loadSnapshotChunk=e.loadSnapshotChunk?t.ResponseLoadSnapshotChunk.toJSON(e.loadSnapshotChunk):void 0),void 0!==e.applySnapshotChunk&&(n.applySnapshotChunk=e.applySnapshotChunk?t.ResponseApplySnapshotChunk.toJSON(e.applySnapshotChunk):void 0),n},fromPartial:function(e){var n=Object.assign({},K);return void 0!==e.exception&&null!==e.exception?n.exception=t.ResponseException.fromPartial(e.exception):n.exception=void 0,void 0!==e.echo&&null!==e.echo?n.echo=t.ResponseEcho.fromPartial(e.echo):n.echo=void 0,void 0!==e.flush&&null!==e.flush?n.flush=t.ResponseFlush.fromPartial(e.flush):n.flush=void 0,void 0!==e.info&&null!==e.info?n.info=t.ResponseInfo.fromPartial(e.info):n.info=void 0,void 0!==e.setOption&&null!==e.setOption?n.setOption=t.ResponseSetOption.fromPartial(e.setOption):n.setOption=void 0,void 0!==e.initChain&&null!==e.initChain?n.initChain=t.ResponseInitChain.fromPartial(e.initChain):n.initChain=void 0,void 0!==e.query&&null!==e.query?n.query=t.ResponseQuery.fromPartial(e.query):n.query=void 0,void 0!==e.beginBlock&&null!==e.beginBlock?n.beginBlock=t.ResponseBeginBlock.fromPartial(e.beginBlock):n.beginBlock=void 0,void 0!==e.checkTx&&null!==e.checkTx?n.checkTx=t.ResponseCheckTx.fromPartial(e.checkTx):n.checkTx=void 0,void 0!==e.deliverTx&&null!==e.deliverTx?n.deliverTx=t.ResponseDeliverTx.fromPartial(e.deliverTx):n.deliverTx=void 0,void 0!==e.endBlock&&null!==e.endBlock?n.endBlock=t.ResponseEndBlock.fromPartial(e.endBlock):n.endBlock=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.ResponseCommit.fromPartial(e.commit):n.commit=void 0,void 0!==e.listSnapshots&&null!==e.listSnapshots?n.listSnapshots=t.ResponseListSnapshots.fromPartial(e.listSnapshots):n.listSnapshots=void 0,void 0!==e.offerSnapshot&&null!==e.offerSnapshot?n.offerSnapshot=t.ResponseOfferSnapshot.fromPartial(e.offerSnapshot):n.offerSnapshot=void 0,void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?n.loadSnapshotChunk=t.ResponseLoadSnapshotChunk.fromPartial(e.loadSnapshotChunk):n.loadSnapshotChunk=void 0,void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?n.applySnapshotChunk=t.ResponseApplySnapshotChunk.fromPartial(e.applySnapshotChunk):n.applySnapshotChunk=void 0,n}};var W={error:""};t.ResponseException={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return""!==e.error&&t.uint32(10).string(e.error),t},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},W);n.pos>>3===1)o.error=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},W);return void 0!==e.error&&null!==e.error?t.error=String(e.error):t.error="",t},toJSON:function(e){var t={};return void 0!==e.error&&(t.error=e.error),t},fromPartial:function(e){var t=Object.assign({},W);return void 0!==e.error&&null!==e.error?t.error=e.error:t.error="",t}};var Z={message:""};t.ResponseEcho={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return""!==e.message&&t.uint32(10).string(e.message),t},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},Z);n.pos>>3===1)o.message=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},Z);return void 0!==e.message&&null!==e.message?t.message=String(e.message):t.message="",t},toJSON:function(e){var t={};return void 0!==e.message&&(t.message=e.message),t},fromPartial:function(e){var t=Object.assign({},Z);return void 0!==e.message&&null!==e.message?t.message=e.message:t.message="",t}};var V={};t.ResponseFlush={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create()},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},V);n.pos1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return""!==e.data&&t.uint32(10).string(e.data),""!==e.version&&t.uint32(18).string(e.version),e.appVersion.isZero()||t.uint32(24).uint64(e.appVersion),e.lastBlockHeight.isZero()||t.uint32(32).int64(e.lastBlockHeight),0!==e.lastBlockAppHash.length&&t.uint32(42).bytes(e.lastBlockAppHash),t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},q);for(o.lastBlockAppHash=new Uint8Array;n.pos>>3){case 1:o.data=n.string();break;case 2:o.version=n.string();break;case 3:o.appVersion=n.uint64();break;case 4:o.lastBlockHeight=n.int64();break;case 5:o.lastBlockAppHash=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},q);return t.lastBlockAppHash=new Uint8Array,void 0!==e.data&&null!==e.data?t.data=String(e.data):t.data="",void 0!==e.version&&null!==e.version?t.version=String(e.version):t.version="",void 0!==e.appVersion&&null!==e.appVersion?t.appVersion=l.default.fromString(e.appVersion):t.appVersion=l.default.UZERO,void 0!==e.lastBlockHeight&&null!==e.lastBlockHeight?t.lastBlockHeight=l.default.fromString(e.lastBlockHeight):t.lastBlockHeight=l.default.ZERO,void 0!==e.lastBlockAppHash&&null!==e.lastBlockAppHash&&(t.lastBlockAppHash=Ae(e.lastBlockAppHash)),t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=e.data),void 0!==e.version&&(t.version=e.version),void 0!==e.appVersion&&(t.appVersion=(e.appVersion||l.default.UZERO).toString()),void 0!==e.lastBlockHeight&&(t.lastBlockHeight=(e.lastBlockHeight||l.default.ZERO).toString()),void 0!==e.lastBlockAppHash&&(t.lastBlockAppHash=Ie(void 0!==e.lastBlockAppHash?e.lastBlockAppHash:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},q);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data="",void 0!==e.version&&null!==e.version?t.version=e.version:t.version="",void 0!==e.appVersion&&null!==e.appVersion?t.appVersion=e.appVersion:t.appVersion=l.default.UZERO,void 0!==e.lastBlockHeight&&null!==e.lastBlockHeight?t.lastBlockHeight=e.lastBlockHeight:t.lastBlockHeight=l.default.ZERO,void 0!==e.lastBlockAppHash&&null!==e.lastBlockAppHash?t.lastBlockAppHash=e.lastBlockAppHash:t.lastBlockAppHash=new Uint8Array,t}};var Q={code:0,log:"",info:""};t.ResponseSetOption={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.code&&t.uint32(8).uint32(e.code),""!==e.log&&t.uint32(26).string(e.log),""!==e.info&&t.uint32(34).string(e.info),t},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},Q);n.pos>>3){case 1:o.code=n.uint32();break;case 3:o.log=n.string();break;case 4:o.info=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},Q);return void 0!==e.code&&null!==e.code?t.code=Number(e.code):t.code=0,void 0!==e.log&&null!==e.log?t.log=String(e.log):t.log="",void 0!==e.info&&null!==e.info?t.info=String(e.info):t.info="",t},toJSON:function(e){var t={};return void 0!==e.code&&(t.code=e.code),void 0!==e.log&&(t.log=e.log),void 0!==e.info&&(t.info=e.info),t},fromPartial:function(e){var t=Object.assign({},Q);return void 0!==e.code&&null!==e.code?t.code=e.code:t.code=0,void 0!==e.log&&null!==e.log?t.log=e.log:t.log="",void 0!==e.info&&null!==e.info?t.info=e.info:t.info="",t}};var J={};t.ResponseInitChain={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();void 0!==e.consensusParams&&t.ConsensusParams.encode(e.consensusParams,n.uint32(10).fork()).ldelim();var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.ValidatorUpdate.encode(i,n.uint32(18).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return 0!==e.appHash.length&&n.uint32(26).bytes(e.appHash),n},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},J);for(r.validators=[],r.appHash=new Uint8Array;a.pos>>3){case 1:r.consensusParams=t.ConsensusParams.decode(a,a.uint32());break;case 2:r.validators.push(t.ValidatorUpdate.decode(a,a.uint32()));break;case 3:r.appHash=a.bytes();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},J);if(n.validators=[],n.appHash=new Uint8Array,void 0!==e.consensusParams&&null!==e.consensusParams?n.consensusParams=t.ConsensusParams.fromJSON(e.consensusParams):n.consensusParams=void 0,void 0!==e.validators&&null!==e.validators){var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validators.push(t.ValidatorUpdate.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.appHash&&null!==e.appHash&&(n.appHash=Ae(e.appHash)),n},toJSON:function(e){var n={};return void 0!==e.consensusParams&&(n.consensusParams=e.consensusParams?t.ConsensusParams.toJSON(e.consensusParams):void 0),e.validators?n.validators=e.validators.map((function(e){return e?t.ValidatorUpdate.toJSON(e):void 0})):n.validators=[],void 0!==e.appHash&&(n.appHash=Ie(void 0!==e.appHash?e.appHash:new Uint8Array)),n},fromPartial:function(e){var n=Object.assign({},J);if(n.validators=[],void 0!==e.consensusParams&&null!==e.consensusParams?n.consensusParams=t.ConsensusParams.fromPartial(e.consensusParams):n.consensusParams=void 0,void 0!==e.validators&&null!==e.validators){var a,o=r(e.validators);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validators.push(t.ValidatorUpdate.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.appHash&&null!==e.appHash?n.appHash=e.appHash:n.appHash=new Uint8Array,n}};var Y={code:0,log:"",info:"",index:l.default.ZERO,height:l.default.ZERO,codespace:""};t.ResponseQuery={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.code&&t.uint32(8).uint32(e.code),""!==e.log&&t.uint32(26).string(e.log),""!==e.info&&t.uint32(34).string(e.info),e.index.isZero()||t.uint32(40).int64(e.index),0!==e.key.length&&t.uint32(50).bytes(e.key),0!==e.value.length&&t.uint32(58).bytes(e.value),void 0!==e.proofOps&&m.ProofOps.encode(e.proofOps,t.uint32(66).fork()).ldelim(),e.height.isZero()||t.uint32(72).int64(e.height),""!==e.codespace&&t.uint32(82).string(e.codespace),t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},Y);for(o.key=new Uint8Array,o.value=new Uint8Array;n.pos>>3){case 1:o.code=n.uint32();break;case 3:o.log=n.string();break;case 4:o.info=n.string();break;case 5:o.index=n.int64();break;case 6:o.key=n.bytes();break;case 7:o.value=n.bytes();break;case 8:o.proofOps=m.ProofOps.decode(n,n.uint32());break;case 9:o.height=n.int64();break;case 10:o.codespace=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},Y);return t.key=new Uint8Array,t.value=new Uint8Array,void 0!==e.code&&null!==e.code?t.code=Number(e.code):t.code=0,void 0!==e.log&&null!==e.log?t.log=String(e.log):t.log="",void 0!==e.info&&null!==e.info?t.info=String(e.info):t.info="",void 0!==e.index&&null!==e.index?t.index=l.default.fromString(e.index):t.index=l.default.ZERO,void 0!==e.key&&null!==e.key&&(t.key=Ae(e.key)),void 0!==e.value&&null!==e.value&&(t.value=Ae(e.value)),void 0!==e.proofOps&&null!==e.proofOps?t.proofOps=m.ProofOps.fromJSON(e.proofOps):t.proofOps=void 0,void 0!==e.height&&null!==e.height?t.height=l.default.fromString(e.height):t.height=l.default.ZERO,void 0!==e.codespace&&null!==e.codespace?t.codespace=String(e.codespace):t.codespace="",t},toJSON:function(e){var t={};return void 0!==e.code&&(t.code=e.code),void 0!==e.log&&(t.log=e.log),void 0!==e.info&&(t.info=e.info),void 0!==e.index&&(t.index=(e.index||l.default.ZERO).toString()),void 0!==e.key&&(t.key=Ie(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=Ie(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.proofOps&&(t.proofOps=e.proofOps?m.ProofOps.toJSON(e.proofOps):void 0),void 0!==e.height&&(t.height=(e.height||l.default.ZERO).toString()),void 0!==e.codespace&&(t.codespace=e.codespace),t},fromPartial:function(e){var t=Object.assign({},Y);return void 0!==e.code&&null!==e.code?t.code=e.code:t.code=0,void 0!==e.log&&null!==e.log?t.log=e.log:t.log="",void 0!==e.info&&null!==e.info?t.info=e.info:t.info="",void 0!==e.index&&null!==e.index?t.index=e.index:t.index=l.default.ZERO,void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,void 0!==e.value&&null!==e.value?t.value=e.value:t.value=new Uint8Array,void 0!==e.proofOps&&null!==e.proofOps?t.proofOps=m.ProofOps.fromPartial(e.proofOps):t.proofOps=void 0,void 0!==e.height&&null!==e.height?t.height=e.height:t.height=l.default.ZERO,void 0!==e.codespace&&null!==e.codespace?t.codespace=e.codespace:t.codespace="",t}};var X={};t.ResponseBeginBlock={encode:function(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create(),o=r(e.events);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.Event.encode(i,a.uint32(10).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return a},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},X);for(r.events=[];a.pos>>3===1)r.events.push(t.Event.decode(a,a.uint32()));else a.skipType(7&i)}return r},fromJSON:function(e){var n=Object.assign({},X);if(n.events=[],void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return e.events?n.events=e.events.map((function(e){return e?t.Event.toJSON(e):void 0})):n.events=[],n},fromPartial:function(e){var n=Object.assign({},X);if(n.events=[],void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return n}};var $={code:0,log:"",info:"",gasWanted:l.default.ZERO,gasUsed:l.default.ZERO,codespace:""};t.ResponseCheckTx={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();0!==e.code&&n.uint32(8).uint32(e.code),0!==e.data.length&&n.uint32(18).bytes(e.data),""!==e.log&&n.uint32(26).string(e.log),""!==e.info&&n.uint32(34).string(e.info),e.gasWanted.isZero()||n.uint32(40).int64(e.gasWanted),e.gasUsed.isZero()||n.uint32(48).int64(e.gasUsed);var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.Event.encode(i,n.uint32(58).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return""!==e.codespace&&n.uint32(66).string(e.codespace),n},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},$);for(r.events=[],r.data=new Uint8Array;a.pos>>3){case 1:r.code=a.uint32();break;case 2:r.data=a.bytes();break;case 3:r.log=a.string();break;case 4:r.info=a.string();break;case 5:r.gasWanted=a.int64();break;case 6:r.gasUsed=a.int64();break;case 7:r.events.push(t.Event.decode(a,a.uint32()));break;case 8:r.codespace=a.string();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},$);if(n.events=[],n.data=new Uint8Array,void 0!==e.code&&null!==e.code?n.code=Number(e.code):n.code=0,void 0!==e.data&&null!==e.data&&(n.data=Ae(e.data)),void 0!==e.log&&null!==e.log?n.log=String(e.log):n.log="",void 0!==e.info&&null!==e.info?n.info=String(e.info):n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=l.default.fromString(e.gasWanted):n.gasWanted=l.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=l.default.fromString(e.gasUsed):n.gasUsed=l.default.ZERO,void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.codespace&&null!==e.codespace?n.codespace=String(e.codespace):n.codespace="",n},toJSON:function(e){var n={};return void 0!==e.code&&(n.code=e.code),void 0!==e.data&&(n.data=Ie(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.log&&(n.log=e.log),void 0!==e.info&&(n.info=e.info),void 0!==e.gasWanted&&(n.gasWanted=(e.gasWanted||l.default.ZERO).toString()),void 0!==e.gasUsed&&(n.gasUsed=(e.gasUsed||l.default.ZERO).toString()),e.events?n.events=e.events.map((function(e){return e?t.Event.toJSON(e):void 0})):n.events=[],void 0!==e.codespace&&(n.codespace=e.codespace),n},fromPartial:function(e){var n=Object.assign({},$);if(n.events=[],void 0!==e.code&&null!==e.code?n.code=e.code:n.code=0,void 0!==e.data&&null!==e.data?n.data=e.data:n.data=new Uint8Array,void 0!==e.log&&null!==e.log?n.log=e.log:n.log="",void 0!==e.info&&null!==e.info?n.info=e.info:n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=e.gasWanted:n.gasWanted=l.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=e.gasUsed:n.gasUsed=l.default.ZERO,void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.codespace&&null!==e.codespace?n.codespace=e.codespace:n.codespace="",n}};var ee={code:0,log:"",info:"",gasWanted:l.default.ZERO,gasUsed:l.default.ZERO,codespace:""};t.ResponseDeliverTx={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();0!==e.code&&n.uint32(8).uint32(e.code),0!==e.data.length&&n.uint32(18).bytes(e.data),""!==e.log&&n.uint32(26).string(e.log),""!==e.info&&n.uint32(34).string(e.info),e.gasWanted.isZero()||n.uint32(40).int64(e.gasWanted),e.gasUsed.isZero()||n.uint32(48).int64(e.gasUsed);var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.Event.encode(i,n.uint32(58).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return""!==e.codespace&&n.uint32(66).string(e.codespace),n},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},ee);for(r.events=[],r.data=new Uint8Array;a.pos>>3){case 1:r.code=a.uint32();break;case 2:r.data=a.bytes();break;case 3:r.log=a.string();break;case 4:r.info=a.string();break;case 5:r.gasWanted=a.int64();break;case 6:r.gasUsed=a.int64();break;case 7:r.events.push(t.Event.decode(a,a.uint32()));break;case 8:r.codespace=a.string();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},ee);if(n.events=[],n.data=new Uint8Array,void 0!==e.code&&null!==e.code?n.code=Number(e.code):n.code=0,void 0!==e.data&&null!==e.data&&(n.data=Ae(e.data)),void 0!==e.log&&null!==e.log?n.log=String(e.log):n.log="",void 0!==e.info&&null!==e.info?n.info=String(e.info):n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=l.default.fromString(e.gasWanted):n.gasWanted=l.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=l.default.fromString(e.gasUsed):n.gasUsed=l.default.ZERO,void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.codespace&&null!==e.codespace?n.codespace=String(e.codespace):n.codespace="",n},toJSON:function(e){var n={};return void 0!==e.code&&(n.code=e.code),void 0!==e.data&&(n.data=Ie(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.log&&(n.log=e.log),void 0!==e.info&&(n.info=e.info),void 0!==e.gasWanted&&(n.gasWanted=(e.gasWanted||l.default.ZERO).toString()),void 0!==e.gasUsed&&(n.gasUsed=(e.gasUsed||l.default.ZERO).toString()),e.events?n.events=e.events.map((function(e){return e?t.Event.toJSON(e):void 0})):n.events=[],void 0!==e.codespace&&(n.codespace=e.codespace),n},fromPartial:function(e){var n=Object.assign({},ee);if(n.events=[],void 0!==e.code&&null!==e.code?n.code=e.code:n.code=0,void 0!==e.data&&null!==e.data?n.data=e.data:n.data=new Uint8Array,void 0!==e.log&&null!==e.log?n.log=e.log:n.log="",void 0!==e.info&&null!==e.info?n.info=e.info:n.info="",void 0!==e.gasWanted&&null!==e.gasWanted?n.gasWanted=e.gasWanted:n.gasWanted=l.default.ZERO,void 0!==e.gasUsed&&null!==e.gasUsed?n.gasUsed=e.gasUsed:n.gasUsed=l.default.ZERO,void 0!==e.events&&null!==e.events){var a,o=r(e.events);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.events.push(t.Event.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.codespace&&null!==e.codespace?n.codespace=e.codespace:n.codespace="",n}};var te={};t.ResponseEndBlock={encode:function(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create(),o=r(e.validatorUpdates);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.ValidatorUpdate.encode(i,a.uint32(10).fork()).ldelim()}}catch(d){o.e(d)}finally{o.f()}void 0!==e.consensusParamUpdates&&t.ConsensusParams.encode(e.consensusParamUpdates,a.uint32(18).fork()).ldelim();var s,c=r(e.events);try{for(c.s();!(s=c.n()).done;){var u=s.value;t.Event.encode(u,a.uint32(26).fork()).ldelim()}}catch(d){c.e(d)}finally{c.f()}return a},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},te);for(r.validatorUpdates=[],r.events=[];a.pos>>3){case 1:r.validatorUpdates.push(t.ValidatorUpdate.decode(a,a.uint32()));break;case 2:r.consensusParamUpdates=t.ConsensusParams.decode(a,a.uint32());break;case 3:r.events.push(t.Event.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},te);if(n.validatorUpdates=[],n.events=[],void 0!==e.validatorUpdates&&null!==e.validatorUpdates){var a,o=r(e.validatorUpdates);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validatorUpdates.push(t.ValidatorUpdate.fromJSON(i))}}catch(d){o.e(d)}finally{o.f()}}if(void 0!==e.consensusParamUpdates&&null!==e.consensusParamUpdates?n.consensusParamUpdates=t.ConsensusParams.fromJSON(e.consensusParamUpdates):n.consensusParamUpdates=void 0,void 0!==e.events&&null!==e.events){var s,c=r(e.events);try{for(c.s();!(s=c.n()).done;){var u=s.value;n.events.push(t.Event.fromJSON(u))}}catch(d){c.e(d)}finally{c.f()}}return n},toJSON:function(e){var n={};return e.validatorUpdates?n.validatorUpdates=e.validatorUpdates.map((function(e){return e?t.ValidatorUpdate.toJSON(e):void 0})):n.validatorUpdates=[],void 0!==e.consensusParamUpdates&&(n.consensusParamUpdates=e.consensusParamUpdates?t.ConsensusParams.toJSON(e.consensusParamUpdates):void 0),e.events?n.events=e.events.map((function(e){return e?t.Event.toJSON(e):void 0})):n.events=[],n},fromPartial:function(e){var n=Object.assign({},te);if(n.validatorUpdates=[],n.events=[],void 0!==e.validatorUpdates&&null!==e.validatorUpdates){var a,o=r(e.validatorUpdates);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.validatorUpdates.push(t.ValidatorUpdate.fromPartial(i))}}catch(d){o.e(d)}finally{o.f()}}if(void 0!==e.consensusParamUpdates&&null!==e.consensusParamUpdates?n.consensusParamUpdates=t.ConsensusParams.fromPartial(e.consensusParamUpdates):n.consensusParamUpdates=void 0,void 0!==e.events&&null!==e.events){var s,c=r(e.events);try{for(c.s();!(s=c.n()).done;){var u=s.value;n.events.push(t.Event.fromPartial(u))}}catch(d){c.e(d)}finally{c.f()}}return n}};var ne={retainHeight:l.default.ZERO};t.ResponseCommit={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.data.length&&t.uint32(18).bytes(e.data),e.retainHeight.isZero()||t.uint32(24).int64(e.retainHeight),t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},ne);for(o.data=new Uint8Array;n.pos>>3){case 2:o.data=n.bytes();break;case 3:o.retainHeight=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},ne);return t.data=new Uint8Array,void 0!==e.data&&null!==e.data&&(t.data=Ae(e.data)),void 0!==e.retainHeight&&null!==e.retainHeight?t.retainHeight=l.default.fromString(e.retainHeight):t.retainHeight=l.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.data&&(t.data=Ie(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.retainHeight&&(t.retainHeight=(e.retainHeight||l.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},ne);return void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,void 0!==e.retainHeight&&null!==e.retainHeight?t.retainHeight=e.retainHeight:t.retainHeight=l.default.ZERO,t}};var ae={};t.ResponseListSnapshots={encode:function(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create(),o=r(e.snapshots);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.Snapshot.encode(i,a.uint32(10).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return a},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},ae);for(r.snapshots=[];a.pos>>3===1)r.snapshots.push(t.Snapshot.decode(a,a.uint32()));else a.skipType(7&i)}return r},fromJSON:function(e){var n=Object.assign({},ae);if(n.snapshots=[],void 0!==e.snapshots&&null!==e.snapshots){var a,o=r(e.snapshots);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.snapshots.push(t.Snapshot.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return e.snapshots?n.snapshots=e.snapshots.map((function(e){return e?t.Snapshot.toJSON(e):void 0})):n.snapshots=[],n},fromPartial:function(e){var n=Object.assign({},ae);if(n.snapshots=[],void 0!==e.snapshots&&null!==e.snapshots){var a,o=r(e.snapshots);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.snapshots.push(t.Snapshot.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return n}};var oe={result:0};t.ResponseOfferSnapshot={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},oe);n.pos>>3===1)o.result=n.int32();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},oe);return void 0!==e.result&&null!==e.result?t.result=I(e.result):t.result=0,t},toJSON:function(e){var t={};return void 0!==e.result&&(t.result=T(e.result)),t},fromPartial:function(e){var t=Object.assign({},oe);return void 0!==e.result&&null!==e.result?t.result=e.result:t.result=0,t}};var re={};t.ResponseLoadSnapshotChunk={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.chunk.length&&t.uint32(10).bytes(e.chunk),t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},re);for(o.chunk=new Uint8Array;n.pos>>3===1)o.chunk=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},re);return t.chunk=new Uint8Array,void 0!==e.chunk&&null!==e.chunk&&(t.chunk=Ae(e.chunk)),t},toJSON:function(e){var t={};return void 0!==e.chunk&&(t.chunk=Ie(void 0!==e.chunk?e.chunk:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},re);return void 0!==e.chunk&&null!==e.chunk?t.chunk=e.chunk:t.chunk=new Uint8Array,t}};var ie={result:0,refetchChunks:0,rejectSenders:""};t.ResponseApplySnapshotChunk={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();0!==e.result&&t.uint32(8).int32(e.result),t.uint32(18).fork();var n,a=r(e.refetchChunks);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.uint32(o)}}catch(u){a.e(u)}finally{a.f()}t.ldelim();var i,s=r(e.rejectSenders);try{for(s.s();!(i=s.n()).done;){var c=i.value;t.uint32(26).string(c)}}catch(u){s.e(u)}finally{s.f()}return t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},ie);for(o.refetchChunks=[],o.rejectSenders=[];n.pos>>3){case 1:o.result=n.int32();break;case 2:if(2===(7&r))for(var i=n.uint32()+n.pos;n.pos1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return void 0!==e.block&&t.BlockParams.encode(e.block,n.uint32(10).fork()).ldelim(),void 0!==e.evidence&&h.EvidenceParams.encode(e.evidence,n.uint32(18).fork()).ldelim(),void 0!==e.validator&&h.ValidatorParams.encode(e.validator,n.uint32(26).fork()).ldelim(),void 0!==e.version&&h.VersionParams.encode(e.version,n.uint32(34).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},se);a.pos>>3){case 1:r.block=t.BlockParams.decode(a,a.uint32());break;case 2:r.evidence=h.EvidenceParams.decode(a,a.uint32());break;case 3:r.validator=h.ValidatorParams.decode(a,a.uint32());break;case 4:r.version=h.VersionParams.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},se);return void 0!==e.block&&null!==e.block?n.block=t.BlockParams.fromJSON(e.block):n.block=void 0,void 0!==e.evidence&&null!==e.evidence?n.evidence=h.EvidenceParams.fromJSON(e.evidence):n.evidence=void 0,void 0!==e.validator&&null!==e.validator?n.validator=h.ValidatorParams.fromJSON(e.validator):n.validator=void 0,void 0!==e.version&&null!==e.version?n.version=h.VersionParams.fromJSON(e.version):n.version=void 0,n},toJSON:function(e){var n={};return void 0!==e.block&&(n.block=e.block?t.BlockParams.toJSON(e.block):void 0),void 0!==e.evidence&&(n.evidence=e.evidence?h.EvidenceParams.toJSON(e.evidence):void 0),void 0!==e.validator&&(n.validator=e.validator?h.ValidatorParams.toJSON(e.validator):void 0),void 0!==e.version&&(n.version=e.version?h.VersionParams.toJSON(e.version):void 0),n},fromPartial:function(e){var n=Object.assign({},se);return void 0!==e.block&&null!==e.block?n.block=t.BlockParams.fromPartial(e.block):n.block=void 0,void 0!==e.evidence&&null!==e.evidence?n.evidence=h.EvidenceParams.fromPartial(e.evidence):n.evidence=void 0,void 0!==e.validator&&null!==e.validator?n.validator=h.ValidatorParams.fromPartial(e.validator):n.validator=void 0,void 0!==e.version&&null!==e.version?n.version=h.VersionParams.fromPartial(e.version):n.version=void 0,n}};var ce={maxBytes:l.default.ZERO,maxGas:l.default.ZERO};t.BlockParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return e.maxBytes.isZero()||t.uint32(8).int64(e.maxBytes),e.maxGas.isZero()||t.uint32(16).int64(e.maxGas),t},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},ce);n.pos>>3){case 1:o.maxBytes=n.int64();break;case 2:o.maxGas=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},ce);return void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=l.default.fromString(e.maxBytes):t.maxBytes=l.default.ZERO,void 0!==e.maxGas&&null!==e.maxGas?t.maxGas=l.default.fromString(e.maxGas):t.maxGas=l.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||l.default.ZERO).toString()),void 0!==e.maxGas&&(t.maxGas=(e.maxGas||l.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},ce);return void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=e.maxBytes:t.maxBytes=l.default.ZERO,void 0!==e.maxGas&&null!==e.maxGas?t.maxGas=e.maxGas:t.maxGas=l.default.ZERO,t}};var ue={round:0};t.LastCommitInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();0!==e.round&&n.uint32(8).int32(e.round);var a,o=r(e.votes);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.VoteInfo.encode(i,n.uint32(18).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},ue);for(r.votes=[];a.pos>>3){case 1:r.round=a.int32();break;case 2:r.votes.push(t.VoteInfo.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},ue);if(n.votes=[],void 0!==e.round&&null!==e.round?n.round=Number(e.round):n.round=0,void 0!==e.votes&&null!==e.votes){var a,o=r(e.votes);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.votes.push(t.VoteInfo.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return void 0!==e.round&&(n.round=e.round),e.votes?n.votes=e.votes.map((function(e){return e?t.VoteInfo.toJSON(e):void 0})):n.votes=[],n},fromPartial:function(e){var n=Object.assign({},ue);if(n.votes=[],void 0!==e.round&&null!==e.round?n.round=e.round:n.round=0,void 0!==e.votes&&null!==e.votes){var a,o=r(e.votes);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.votes.push(t.VoteInfo.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return n}};var de={type:""};t.Event={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();""!==e.type&&n.uint32(10).string(e.type);var a,o=r(e.attributes);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.EventAttribute.encode(i,n.uint32(18).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},de);for(r.attributes=[];a.pos>>3){case 1:r.type=a.string();break;case 2:r.attributes.push(t.EventAttribute.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},de);if(n.attributes=[],void 0!==e.type&&null!==e.type?n.type=String(e.type):n.type="",void 0!==e.attributes&&null!==e.attributes){var a,o=r(e.attributes);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.attributes.push(t.EventAttribute.fromJSON(i))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=e.type),e.attributes?n.attributes=e.attributes.map((function(e){return e?t.EventAttribute.toJSON(e):void 0})):n.attributes=[],n},fromPartial:function(e){var n=Object.assign({},de);if(n.attributes=[],void 0!==e.type&&null!==e.type?n.type=e.type:n.type="",void 0!==e.attributes&&null!==e.attributes){var a,o=r(e.attributes);try{for(o.s();!(a=o.n()).done;){var i=a.value;n.attributes.push(t.EventAttribute.fromPartial(i))}}catch(s){o.e(s)}finally{o.f()}}return n}};var le={index:!1};t.EventAttribute={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),0!==e.value.length&&t.uint32(18).bytes(e.value),!0===e.index&&t.uint32(24).bool(e.index),t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},le);for(o.key=new Uint8Array,o.value=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.value=n.bytes();break;case 3:o.index=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},le);return t.key=new Uint8Array,t.value=new Uint8Array,void 0!==e.key&&null!==e.key&&(t.key=Ae(e.key)),void 0!==e.value&&null!==e.value&&(t.value=Ae(e.value)),void 0!==e.index&&null!==e.index?t.index=Boolean(e.index):t.index=!1,t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=Ie(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=Ie(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.index&&(t.index=e.index),t},fromPartial:function(e){var t=Object.assign({},le);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,void 0!==e.value&&null!==e.value?t.value=e.value:t.value=new Uint8Array,void 0!==e.index&&null!==e.index?t.index=e.index:t.index=!1,t}};var fe={height:l.default.ZERO,index:0};t.TxResult={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return e.height.isZero()||n.uint32(8).int64(e.height),0!==e.index&&n.uint32(16).uint32(e.index),0!==e.tx.length&&n.uint32(26).bytes(e.tx),void 0!==e.result&&t.ResponseDeliverTx.encode(e.result,n.uint32(34).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},fe);for(r.tx=new Uint8Array;a.pos>>3){case 1:r.height=a.int64();break;case 2:r.index=a.uint32();break;case 3:r.tx=a.bytes();break;case 4:r.result=t.ResponseDeliverTx.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},fe);return n.tx=new Uint8Array,void 0!==e.height&&null!==e.height?n.height=l.default.fromString(e.height):n.height=l.default.ZERO,void 0!==e.index&&null!==e.index?n.index=Number(e.index):n.index=0,void 0!==e.tx&&null!==e.tx&&(n.tx=Ae(e.tx)),void 0!==e.result&&null!==e.result?n.result=t.ResponseDeliverTx.fromJSON(e.result):n.result=void 0,n},toJSON:function(e){var n={};return void 0!==e.height&&(n.height=(e.height||l.default.ZERO).toString()),void 0!==e.index&&(n.index=e.index),void 0!==e.tx&&(n.tx=Ie(void 0!==e.tx?e.tx:new Uint8Array)),void 0!==e.result&&(n.result=e.result?t.ResponseDeliverTx.toJSON(e.result):void 0),n},fromPartial:function(e){var n=Object.assign({},fe);return void 0!==e.height&&null!==e.height?n.height=e.height:n.height=l.default.ZERO,void 0!==e.index&&null!==e.index?n.index=e.index:n.index=0,void 0!==e.tx&&null!==e.tx?n.tx=e.tx:n.tx=new Uint8Array,void 0!==e.result&&null!==e.result?n.result=t.ResponseDeliverTx.fromPartial(e.result):n.result=void 0,n}};var pe={power:l.default.ZERO};t.Validator={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.address.length&&t.uint32(10).bytes(e.address),e.power.isZero()||t.uint32(24).int64(e.power),t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},pe);for(o.address=new Uint8Array;n.pos>>3){case 1:o.address=n.bytes();break;case 3:o.power=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},pe);return t.address=new Uint8Array,void 0!==e.address&&null!==e.address&&(t.address=Ae(e.address)),void 0!==e.power&&null!==e.power?t.power=l.default.fromString(e.power):t.power=l.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=Ie(void 0!==e.address?e.address:new Uint8Array)),void 0!==e.power&&(t.power=(e.power||l.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},pe);return void 0!==e.address&&null!==e.address?t.address=e.address:t.address=new Uint8Array,void 0!==e.power&&null!==e.power?t.power=e.power:t.power=l.default.ZERO,t}};var be={power:l.default.ZERO};t.ValidatorUpdate={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return void 0!==e.pubKey&&g.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.power.isZero()||t.uint32(16).int64(e.power),t},decode:function(e,t){for(var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},be);n.pos>>3){case 1:o.pubKey=g.PublicKey.decode(n,n.uint32());break;case 2:o.power=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},be);return void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=g.PublicKey.fromJSON(e.pubKey):t.pubKey=void 0,void 0!==e.power&&null!==e.power?t.power=l.default.fromString(e.power):t.power=l.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?g.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.power&&(t.power=(e.power||l.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},be);return void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=g.PublicKey.fromPartial(e.pubKey):t.pubKey=void 0,void 0!==e.power&&null!==e.power?t.power=e.power:t.power=l.default.ZERO,t}};var me={signedLastBlock:!1};t.VoteInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return void 0!==e.validator&&t.Validator.encode(e.validator,n.uint32(10).fork()).ldelim(),!0===e.signedLastBlock&&n.uint32(16).bool(e.signedLastBlock),n},decode:function(e,n){for(var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},me);a.pos>>3){case 1:r.validator=t.Validator.decode(a,a.uint32());break;case 2:r.signedLastBlock=a.bool();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},me);return void 0!==e.validator&&null!==e.validator?n.validator=t.Validator.fromJSON(e.validator):n.validator=void 0,void 0!==e.signedLastBlock&&null!==e.signedLastBlock?n.signedLastBlock=Boolean(e.signedLastBlock):n.signedLastBlock=!1,n},toJSON:function(e){var n={};return void 0!==e.validator&&(n.validator=e.validator?t.Validator.toJSON(e.validator):void 0),void 0!==e.signedLastBlock&&(n.signedLastBlock=e.signedLastBlock),n},fromPartial:function(e){var n=Object.assign({},me);return void 0!==e.validator&&null!==e.validator?n.validator=t.Validator.fromPartial(e.validator):n.validator=void 0,void 0!==e.signedLastBlock&&null!==e.signedLastBlock?n.signedLastBlock=e.signedLastBlock:n.signedLastBlock=!1,n}};var he={type:0,height:l.default.ZERO,totalVotingPower:l.default.ZERO};t.Evidence={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return 0!==e.type&&n.uint32(8).int32(e.type),void 0!==e.validator&&t.Validator.encode(e.validator,n.uint32(18).fork()).ldelim(),e.height.isZero()||n.uint32(24).int64(e.height),void 0!==e.time&&v.Timestamp.encode(Te(e.time),n.uint32(34).fork()).ldelim(),e.totalVotingPower.isZero()||n.uint32(40).int64(e.totalVotingPower),n},decode:function(e,n){for(var a=e instanceof p.default.Reader?e:new p.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},he);a.pos>>3){case 1:r.type=a.int32();break;case 2:r.validator=t.Validator.decode(a,a.uint32());break;case 3:r.height=a.int64();break;case 4:r.time=Se(v.Timestamp.decode(a,a.uint32()));break;case 5:r.totalVotingPower=a.int64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},he);return void 0!==e.type&&null!==e.type?n.type=A(e.type):n.type=0,void 0!==e.validator&&null!==e.validator?n.validator=t.Validator.fromJSON(e.validator):n.validator=void 0,void 0!==e.height&&null!==e.height?n.height=l.default.fromString(e.height):n.height=l.default.ZERO,void 0!==e.time&&null!==e.time?n.time=Ce(e.time):n.time=void 0,void 0!==e.totalVotingPower&&null!==e.totalVotingPower?n.totalVotingPower=l.default.fromString(e.totalVotingPower):n.totalVotingPower=l.default.ZERO,n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=x(e.type)),void 0!==e.validator&&(n.validator=e.validator?t.Validator.toJSON(e.validator):void 0),void 0!==e.height&&(n.height=(e.height||l.default.ZERO).toString()),void 0!==e.time&&(n.time=e.time.toISOString()),void 0!==e.totalVotingPower&&(n.totalVotingPower=(e.totalVotingPower||l.default.ZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},he);return void 0!==e.type&&null!==e.type?n.type=e.type:n.type=0,void 0!==e.validator&&null!==e.validator?n.validator=t.Validator.fromPartial(e.validator):n.validator=void 0,void 0!==e.height&&null!==e.height?n.height=e.height:n.height=l.default.ZERO,void 0!==e.time&&null!==e.time?n.time=e.time:n.time=void 0,void 0!==e.totalVotingPower&&null!==e.totalVotingPower?n.totalVotingPower=e.totalVotingPower:n.totalVotingPower=l.default.ZERO,n}};var ge={height:l.default.UZERO,format:0,chunks:0};t.Snapshot={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Writer.create();return e.height.isZero()||t.uint32(8).uint64(e.height),0!==e.format&&t.uint32(16).uint32(e.format),0!==e.chunks&&t.uint32(24).uint32(e.chunks),0!==e.hash.length&&t.uint32(34).bytes(e.hash),0!==e.metadata.length&&t.uint32(42).bytes(e.metadata),t},decode:function(e,t){var n=e instanceof p.default.Reader?e:new p.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},ge);for(o.hash=new Uint8Array,o.metadata=new Uint8Array;n.pos>>3){case 1:o.height=n.uint64();break;case 2:o.format=n.uint32();break;case 3:o.chunks=n.uint32();break;case 4:o.hash=n.bytes();break;case 5:o.metadata=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},ge);return t.hash=new Uint8Array,t.metadata=new Uint8Array,void 0!==e.height&&null!==e.height?t.height=l.default.fromString(e.height):t.height=l.default.UZERO,void 0!==e.format&&null!==e.format?t.format=Number(e.format):t.format=0,void 0!==e.chunks&&null!==e.chunks?t.chunks=Number(e.chunks):t.chunks=0,void 0!==e.hash&&null!==e.hash&&(t.hash=Ae(e.hash)),void 0!==e.metadata&&null!==e.metadata&&(t.metadata=Ae(e.metadata)),t},toJSON:function(e){var t={};return void 0!==e.height&&(t.height=(e.height||l.default.UZERO).toString()),void 0!==e.format&&(t.format=e.format),void 0!==e.chunks&&(t.chunks=e.chunks),void 0!==e.hash&&(t.hash=Ie(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.metadata&&(t.metadata=Ie(void 0!==e.metadata?e.metadata:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},ge);return void 0!==e.height&&null!==e.height?t.height=e.height:t.height=l.default.UZERO,void 0!==e.format&&null!==e.format?t.format=e.format:t.format=0,void 0!==e.chunks&&null!==e.chunks?t.chunks=e.chunks:t.chunks=0,void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash=new Uint8Array,void 0!==e.metadata&&null!==e.metadata?t.metadata=e.metadata:t.metadata=new Uint8Array,t}};var ye=function(){function e(t){a(this,e),this.rpc=t,this.Echo=this.Echo.bind(this),this.Flush=this.Flush.bind(this),this.Info=this.Info.bind(this),this.SetOption=this.SetOption.bind(this),this.DeliverTx=this.DeliverTx.bind(this),this.CheckTx=this.CheckTx.bind(this),this.Query=this.Query.bind(this),this.Commit=this.Commit.bind(this),this.InitChain=this.InitChain.bind(this),this.BeginBlock=this.BeginBlock.bind(this),this.EndBlock=this.EndBlock.bind(this),this.ListSnapshots=this.ListSnapshots.bind(this),this.OfferSnapshot=this.OfferSnapshot.bind(this),this.LoadSnapshotChunk=this.LoadSnapshotChunk.bind(this),this.ApplySnapshotChunk=this.ApplySnapshotChunk.bind(this)}return o(e,[{key:"Echo",value:function(e,n){return this.rpc.unary(t.ABCIApplicationEchoDesc,t.RequestEcho.fromPartial(e),n)}},{key:"Flush",value:function(e,n){return this.rpc.unary(t.ABCIApplicationFlushDesc,t.RequestFlush.fromPartial(e),n)}},{key:"Info",value:function(e,n){return this.rpc.unary(t.ABCIApplicationInfoDesc,t.RequestInfo.fromPartial(e),n)}},{key:"SetOption",value:function(e,n){return this.rpc.unary(t.ABCIApplicationSetOptionDesc,t.RequestSetOption.fromPartial(e),n)}},{key:"DeliverTx",value:function(e,n){return this.rpc.unary(t.ABCIApplicationDeliverTxDesc,t.RequestDeliverTx.fromPartial(e),n)}},{key:"CheckTx",value:function(e,n){return this.rpc.unary(t.ABCIApplicationCheckTxDesc,t.RequestCheckTx.fromPartial(e),n)}},{key:"Query",value:function(e,n){return this.rpc.unary(t.ABCIApplicationQueryDesc,t.RequestQuery.fromPartial(e),n)}},{key:"Commit",value:function(e,n){return this.rpc.unary(t.ABCIApplicationCommitDesc,t.RequestCommit.fromPartial(e),n)}},{key:"InitChain",value:function(e,n){return this.rpc.unary(t.ABCIApplicationInitChainDesc,t.RequestInitChain.fromPartial(e),n)}},{key:"BeginBlock",value:function(e,n){return this.rpc.unary(t.ABCIApplicationBeginBlockDesc,t.RequestBeginBlock.fromPartial(e),n)}},{key:"EndBlock",value:function(e,n){return this.rpc.unary(t.ABCIApplicationEndBlockDesc,t.RequestEndBlock.fromPartial(e),n)}},{key:"ListSnapshots",value:function(e,n){return this.rpc.unary(t.ABCIApplicationListSnapshotsDesc,t.RequestListSnapshots.fromPartial(e),n)}},{key:"OfferSnapshot",value:function(e,n){return this.rpc.unary(t.ABCIApplicationOfferSnapshotDesc,t.RequestOfferSnapshot.fromPartial(e),n)}},{key:"LoadSnapshotChunk",value:function(e,n){return this.rpc.unary(t.ABCIApplicationLoadSnapshotChunkDesc,t.RequestLoadSnapshotChunk.fromPartial(e),n)}},{key:"ApplySnapshotChunk",value:function(e,n){return this.rpc.unary(t.ABCIApplicationApplySnapshotChunkDesc,t.RequestApplySnapshotChunk.fromPartial(e),n)}}]),e}();t.ABCIApplicationClientImpl=ye,t.ABCIApplicationDesc={serviceName:"tendermint.abci.ABCIApplication"},t.ABCIApplicationEchoDesc={methodName:"Echo",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestEcho.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseEcho.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationFlushDesc={methodName:"Flush",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestFlush.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseFlush.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationInfoDesc={methodName:"Info",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestInfo.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseInfo.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationSetOptionDesc={methodName:"SetOption",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestSetOption.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseSetOption.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationDeliverTxDesc={methodName:"DeliverTx",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestDeliverTx.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseDeliverTx.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationCheckTxDesc={methodName:"CheckTx",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestCheckTx.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseCheckTx.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationQueryDesc={methodName:"Query",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestQuery.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseQuery.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationCommitDesc={methodName:"Commit",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestCommit.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseCommit.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationInitChainDesc={methodName:"InitChain",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestInitChain.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseInitChain.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationBeginBlockDesc={methodName:"BeginBlock",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestBeginBlock.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseBeginBlock.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationEndBlockDesc={methodName:"EndBlock",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestEndBlock.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseEndBlock.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationListSnapshotsDesc={methodName:"ListSnapshots",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestListSnapshots.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseListSnapshots.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationOfferSnapshotDesc={methodName:"OfferSnapshot",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestOfferSnapshot.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseOfferSnapshot.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationLoadSnapshotChunkDesc={methodName:"LoadSnapshotChunk",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestLoadSnapshotChunk.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseLoadSnapshotChunk.decode(e)),{toObject:function(){return this}})}}},t.ABCIApplicationApplySnapshotChunkDesc={methodName:"ApplySnapshotChunk",service:t.ABCIApplicationDesc,requestStream:!1,responseStream:!1,requestType:{serializeBinary:function(){return t.RequestApplySnapshotChunk.encode(this).finish()}},responseType:{deserializeBinary:function(e){return Object.assign(Object.assign({},t.ResponseApplySnapshotChunk.decode(e)),{toObject:function(){return this}})}}};var ve=function(){function e(t,n){a(this,e),this.host=t,this.options=n}return o(e,[{key:"unary",value:function(e,t,n){var a,o=this,r=Object.assign(Object.assign({},t),e.requestType),i=n&&this.options.metadata?new y.BrowserHeaders(Object.assign(Object.assign({},null===(a=this.options)||void 0===a?void 0:a.metadata.headersMap),null===n||void 0===n?void 0:n.headersMap)):n||this.options.metadata;return new Promise((function(t,n){f.grpc.unary(e,{request:r,host:o.host,metadata:i,transport:o.options.transport,debug:o.options.debug,onEnd:function(e){if(e.status===f.grpc.Code.OK)t(e.message);else{var a=new Error(e.statusMessage);a.code=e.status,a.metadata=e.trailers,n(a)}}})}))}}]),e}();t.GrpcWebImpl=ve;var we=function(){if("undefined"!==typeof we)return we;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),ke=we.atob||function(e){return we.Buffer.from(e,"base64").toString("binary")};function Ae(e){for(var t=ke(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.ed25519&&t.uint32(10).bytes(e.ed25519),void 0!==e.secp256k1&&t.uint32(18).bytes(e.secp256k1),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);n.pos>>3){case 1:o.ed25519=n.bytes();break;case 2:o.secp256k1=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},s);return void 0!==e.ed25519&&null!==e.ed25519&&(t.ed25519=d(e.ed25519)),void 0!==e.secp256k1&&null!==e.secp256k1&&(t.secp256k1=d(e.secp256k1)),t},toJSON:function(e){var t={};return void 0!==e.ed25519&&(t.ed25519=void 0!==e.ed25519?f(e.ed25519):void 0),void 0!==e.secp256k1&&(t.secp256k1=void 0!==e.secp256k1?f(e.secp256k1):void 0),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.ed25519&&null!==e.ed25519?t.ed25519=e.ed25519:t.ed25519=void 0,void 0!==e.secp256k1&&null!==e.secp256k1?t.secp256k1=e.secp256k1:t.secp256k1=void 0,t}};var c=function(){if("undefined"!==typeof c)return c;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),u=c.atob||function(e){return c.Buffer.from(e,"base64").toString("binary")};function d(e){for(var t=u(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();e.total.isZero()||t.uint32(8).int64(e.total),e.index.isZero()||t.uint32(16).int64(e.index),0!==e.leafHash.length&&t.uint32(26).bytes(e.leafHash);var n,o=a(e.aunts);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(34).bytes(r)}}catch(s){o.e(s)}finally{o.f()}return t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);for(o.aunts=[],o.leafHash=new Uint8Array;n.pos>>3){case 1:o.total=n.int64();break;case 2:o.index=n.int64();break;case 3:o.leafHash=n.bytes();break;case 4:o.aunts.push(n.bytes());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},s);if(t.aunts=[],t.leafHash=new Uint8Array,void 0!==e.total&&null!==e.total?t.total=r.default.fromString(e.total):t.total=r.default.ZERO,void 0!==e.index&&null!==e.index?t.index=r.default.fromString(e.index):t.index=r.default.ZERO,void 0!==e.leafHash&&null!==e.leafHash&&(t.leafHash=b(e.leafHash)),void 0!==e.aunts&&null!==e.aunts){var n,o=a(e.aunts);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.aunts.push(b(i))}}catch(c){o.e(c)}finally{o.f()}}return t},toJSON:function(e){var t={};return void 0!==e.total&&(t.total=(e.total||r.default.ZERO).toString()),void 0!==e.index&&(t.index=(e.index||r.default.ZERO).toString()),void 0!==e.leafHash&&(t.leafHash=h(void 0!==e.leafHash?e.leafHash:new Uint8Array)),e.aunts?t.aunts=e.aunts.map((function(e){return h(void 0!==e?e:new Uint8Array)})):t.aunts=[],t},fromPartial:function(e){var t=Object.assign({},s);if(t.aunts=[],void 0!==e.total&&null!==e.total?t.total=e.total:t.total=r.default.ZERO,void 0!==e.index&&null!==e.index?t.index=e.index:t.index=r.default.ZERO,void 0!==e.leafHash&&null!==e.leafHash?t.leafHash=e.leafHash:t.leafHash=new Uint8Array,void 0!==e.aunts&&null!==e.aunts){var n,o=a(e.aunts);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.aunts.push(i)}}catch(c){o.e(c)}finally{o.f()}}return t}};var c={};t.ValueOp={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.proof&&t.Proof.encode(e.proof,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},c);for(r.key=new Uint8Array;a.pos>>3){case 1:r.key=a.bytes();break;case 2:r.proof=t.Proof.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},c);return n.key=new Uint8Array,void 0!==e.key&&null!==e.key&&(n.key=b(e.key)),void 0!==e.proof&&null!==e.proof?n.proof=t.Proof.fromJSON(e.proof):n.proof=void 0,n},toJSON:function(e){var n={};return void 0!==e.key&&(n.key=h(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.proof&&(n.proof=e.proof?t.Proof.toJSON(e.proof):void 0),n},fromPartial:function(e){var n=Object.assign({},c);return void 0!==e.key&&null!==e.key?n.key=e.key:n.key=new Uint8Array,void 0!==e.proof&&null!==e.proof?n.proof=t.Proof.fromPartial(e.proof):n.proof=void 0,n}};var u={key:"",input:"",output:""};t.DominoOp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.input&&t.uint32(18).string(e.input),""!==e.output&&t.uint32(26).string(e.output),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.key=n.string();break;case 2:o.input=n.string();break;case 3:o.output=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.key&&null!==e.key?t.key=String(e.key):t.key="",void 0!==e.input&&null!==e.input?t.input=String(e.input):t.input="",void 0!==e.output&&null!==e.output?t.output=String(e.output):t.output="",t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.input&&(t.input=e.input),void 0!==e.output&&(t.output=e.output),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.key&&null!==e.key?t.key=e.key:t.key="",void 0!==e.input&&null!==e.input?t.input=e.input:t.input="",void 0!==e.output&&null!==e.output?t.output=e.output:t.output="",t}};var d={type:""};t.ProofOp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return""!==e.type&&t.uint32(10).string(e.type),0!==e.key.length&&t.uint32(18).bytes(e.key),0!==e.data.length&&t.uint32(26).bytes(e.data),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);for(o.key=new Uint8Array,o.data=new Uint8Array;n.pos>>3){case 1:o.type=n.string();break;case 2:o.key=n.bytes();break;case 3:o.data=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return t.key=new Uint8Array,t.data=new Uint8Array,void 0!==e.type&&null!==e.type?t.type=String(e.type):t.type="",void 0!==e.key&&null!==e.key&&(t.key=b(e.key)),void 0!==e.data&&null!==e.data&&(t.data=b(e.data)),t},toJSON:function(e){var t={};return void 0!==e.type&&(t.type=e.type),void 0!==e.key&&(t.key=h(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.data&&(t.data=h(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.type&&null!==e.type?t.type=e.type:t.type="",void 0!==e.key&&null!==e.key?t.key=e.key:t.key=new Uint8Array,void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,t}};var l={};t.ProofOps={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.ops);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.ProofOp.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},l);for(r.ops=[];a.pos>>3===1)r.ops.push(t.ProofOp.decode(a,a.uint32()));else a.skipType(7&s)}return r},fromJSON:function(e){var n=Object.assign({},l);if(n.ops=[],void 0!==e.ops&&null!==e.ops){var o,r=a(e.ops);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.ops.push(t.ProofOp.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return e.ops?n.ops=e.ops.map((function(e){return e?t.ProofOp.toJSON(e):void 0})):n.ops=[],n},fromPartial:function(e){var n=Object.assign({},l);if(n.ops=[],void 0!==e.ops&&null!==e.ops){var o,r=a(e.ops);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.ops.push(t.ProofOp.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}};var f=function(){if("undefined"!==typeof f)return f;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),p=f.atob||function(e){return f.Buffer.from(e,"base64").toString("binary")};function b(e){for(var t=p(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return void 0!==e.header&&i.Header.encode(e.header,t.uint32(10).fork()).ldelim(),void 0!==e.data&&i.Data.encode(e.data,t.uint32(18).fork()).ldelim(),void 0!==e.evidence&&s.EvidenceList.encode(e.evidence,t.uint32(26).fork()).ldelim(),void 0!==e.lastCommit&&i.Commit.encode(e.lastCommit,t.uint32(34).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},c);n.pos>>3){case 1:o.header=i.Header.decode(n,n.uint32());break;case 2:o.data=i.Data.decode(n,n.uint32());break;case 3:o.evidence=s.EvidenceList.decode(n,n.uint32());break;case 4:o.lastCommit=i.Commit.decode(n,n.uint32());break;default:n.skipType(7&u)}}return o},fromJSON:function(e){var t=Object.assign({},c);return void 0!==e.header&&null!==e.header?t.header=i.Header.fromJSON(e.header):t.header=void 0,void 0!==e.data&&null!==e.data?t.data=i.Data.fromJSON(e.data):t.data=void 0,void 0!==e.evidence&&null!==e.evidence?t.evidence=s.EvidenceList.fromJSON(e.evidence):t.evidence=void 0,void 0!==e.lastCommit&&null!==e.lastCommit?t.lastCommit=i.Commit.fromJSON(e.lastCommit):t.lastCommit=void 0,t},toJSON:function(e){var t={};return void 0!==e.header&&(t.header=e.header?i.Header.toJSON(e.header):void 0),void 0!==e.data&&(t.data=e.data?i.Data.toJSON(e.data):void 0),void 0!==e.evidence&&(t.evidence=e.evidence?s.EvidenceList.toJSON(e.evidence):void 0),void 0!==e.lastCommit&&(t.lastCommit=e.lastCommit?i.Commit.toJSON(e.lastCommit):void 0),t},fromPartial:function(e){var t=Object.assign({},c);return void 0!==e.header&&null!==e.header?t.header=i.Header.fromPartial(e.header):t.header=void 0,void 0!==e.data&&null!==e.data?t.data=i.Data.fromPartial(e.data):t.data=void 0,void 0!==e.evidence&&null!==e.evidence?t.evidence=s.EvidenceList.fromPartial(e.evidence):t.evidence=void 0,void 0!==e.lastCommit&&null!==e.lastCommit?t.lastCommit=i.Commit.fromPartial(e.lastCommit):t.lastCommit=void 0,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},66900:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EvidenceList=t.LightClientAttackEvidence=t.DuplicateVoteEvidence=t.Evidence=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121)),s=n(78750),c=n(47478),u=n(50262);t.protobufPackage="tendermint.types";var d={};t.Evidence={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.duplicateVoteEvidence&&t.DuplicateVoteEvidence.encode(e.duplicateVoteEvidence,n.uint32(10).fork()).ldelim(),void 0!==e.lightClientAttackEvidence&&t.LightClientAttackEvidence.encode(e.lightClientAttackEvidence,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},d);a.pos>>3){case 1:r.duplicateVoteEvidence=t.DuplicateVoteEvidence.decode(a,a.uint32());break;case 2:r.lightClientAttackEvidence=t.LightClientAttackEvidence.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},d);return void 0!==e.duplicateVoteEvidence&&null!==e.duplicateVoteEvidence?n.duplicateVoteEvidence=t.DuplicateVoteEvidence.fromJSON(e.duplicateVoteEvidence):n.duplicateVoteEvidence=void 0,void 0!==e.lightClientAttackEvidence&&null!==e.lightClientAttackEvidence?n.lightClientAttackEvidence=t.LightClientAttackEvidence.fromJSON(e.lightClientAttackEvidence):n.lightClientAttackEvidence=void 0,n},toJSON:function(e){var n={};return void 0!==e.duplicateVoteEvidence&&(n.duplicateVoteEvidence=e.duplicateVoteEvidence?t.DuplicateVoteEvidence.toJSON(e.duplicateVoteEvidence):void 0),void 0!==e.lightClientAttackEvidence&&(n.lightClientAttackEvidence=e.lightClientAttackEvidence?t.LightClientAttackEvidence.toJSON(e.lightClientAttackEvidence):void 0),n},fromPartial:function(e){var n=Object.assign({},d);return void 0!==e.duplicateVoteEvidence&&null!==e.duplicateVoteEvidence?n.duplicateVoteEvidence=t.DuplicateVoteEvidence.fromPartial(e.duplicateVoteEvidence):n.duplicateVoteEvidence=void 0,void 0!==e.lightClientAttackEvidence&&null!==e.lightClientAttackEvidence?n.lightClientAttackEvidence=t.LightClientAttackEvidence.fromPartial(e.lightClientAttackEvidence):n.lightClientAttackEvidence=void 0,n}};var l={totalVotingPower:r.default.ZERO,validatorPower:r.default.ZERO};t.DuplicateVoteEvidence={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.voteA&&s.Vote.encode(e.voteA,t.uint32(10).fork()).ldelim(),void 0!==e.voteB&&s.Vote.encode(e.voteB,t.uint32(18).fork()).ldelim(),e.totalVotingPower.isZero()||t.uint32(24).int64(e.totalVotingPower),e.validatorPower.isZero()||t.uint32(32).int64(e.validatorPower),void 0!==e.timestamp&&c.Timestamp.encode(b(e.timestamp),t.uint32(42).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);n.pos>>3){case 1:o.voteA=s.Vote.decode(n,n.uint32());break;case 2:o.voteB=s.Vote.decode(n,n.uint32());break;case 3:o.totalVotingPower=n.int64();break;case 4:o.validatorPower=n.int64();break;case 5:o.timestamp=m(c.Timestamp.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},l);return void 0!==e.voteA&&null!==e.voteA?t.voteA=s.Vote.fromJSON(e.voteA):t.voteA=void 0,void 0!==e.voteB&&null!==e.voteB?t.voteB=s.Vote.fromJSON(e.voteB):t.voteB=void 0,void 0!==e.totalVotingPower&&null!==e.totalVotingPower?t.totalVotingPower=r.default.fromString(e.totalVotingPower):t.totalVotingPower=r.default.ZERO,void 0!==e.validatorPower&&null!==e.validatorPower?t.validatorPower=r.default.fromString(e.validatorPower):t.validatorPower=r.default.ZERO,void 0!==e.timestamp&&null!==e.timestamp?t.timestamp=h(e.timestamp):t.timestamp=void 0,t},toJSON:function(e){var t={};return void 0!==e.voteA&&(t.voteA=e.voteA?s.Vote.toJSON(e.voteA):void 0),void 0!==e.voteB&&(t.voteB=e.voteB?s.Vote.toJSON(e.voteB):void 0),void 0!==e.totalVotingPower&&(t.totalVotingPower=(e.totalVotingPower||r.default.ZERO).toString()),void 0!==e.validatorPower&&(t.validatorPower=(e.validatorPower||r.default.ZERO).toString()),void 0!==e.timestamp&&(t.timestamp=e.timestamp.toISOString()),t},fromPartial:function(e){var t=Object.assign({},l);return void 0!==e.voteA&&null!==e.voteA?t.voteA=s.Vote.fromPartial(e.voteA):t.voteA=void 0,void 0!==e.voteB&&null!==e.voteB?t.voteB=s.Vote.fromPartial(e.voteB):t.voteB=void 0,void 0!==e.totalVotingPower&&null!==e.totalVotingPower?t.totalVotingPower=e.totalVotingPower:t.totalVotingPower=r.default.ZERO,void 0!==e.validatorPower&&null!==e.validatorPower?t.validatorPower=e.validatorPower:t.validatorPower=r.default.ZERO,void 0!==e.timestamp&&null!==e.timestamp?t.timestamp=e.timestamp:t.timestamp=void 0,t}};var f={commonHeight:r.default.ZERO,totalVotingPower:r.default.ZERO};t.LightClientAttackEvidence={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();void 0!==e.conflictingBlock&&s.LightBlock.encode(e.conflictingBlock,t.uint32(10).fork()).ldelim(),e.commonHeight.isZero()||t.uint32(16).int64(e.commonHeight);var n,o=a(e.byzantineValidators);try{for(o.s();!(n=o.n()).done;){var r=n.value;u.Validator.encode(r,t.uint32(26).fork()).ldelim()}}catch(d){o.e(d)}finally{o.f()}return e.totalVotingPower.isZero()||t.uint32(32).int64(e.totalVotingPower),void 0!==e.timestamp&&c.Timestamp.encode(b(e.timestamp),t.uint32(42).fork()).ldelim(),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);for(o.byzantineValidators=[];n.pos>>3){case 1:o.conflictingBlock=s.LightBlock.decode(n,n.uint32());break;case 2:o.commonHeight=n.int64();break;case 3:o.byzantineValidators.push(u.Validator.decode(n,n.uint32()));break;case 4:o.totalVotingPower=n.int64();break;case 5:o.timestamp=m(c.Timestamp.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},f);if(t.byzantineValidators=[],void 0!==e.conflictingBlock&&null!==e.conflictingBlock?t.conflictingBlock=s.LightBlock.fromJSON(e.conflictingBlock):t.conflictingBlock=void 0,void 0!==e.commonHeight&&null!==e.commonHeight?t.commonHeight=r.default.fromString(e.commonHeight):t.commonHeight=r.default.ZERO,void 0!==e.byzantineValidators&&null!==e.byzantineValidators){var n,o=a(e.byzantineValidators);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.byzantineValidators.push(u.Validator.fromJSON(i))}}catch(c){o.e(c)}finally{o.f()}}return void 0!==e.totalVotingPower&&null!==e.totalVotingPower?t.totalVotingPower=r.default.fromString(e.totalVotingPower):t.totalVotingPower=r.default.ZERO,void 0!==e.timestamp&&null!==e.timestamp?t.timestamp=h(e.timestamp):t.timestamp=void 0,t},toJSON:function(e){var t={};return void 0!==e.conflictingBlock&&(t.conflictingBlock=e.conflictingBlock?s.LightBlock.toJSON(e.conflictingBlock):void 0),void 0!==e.commonHeight&&(t.commonHeight=(e.commonHeight||r.default.ZERO).toString()),e.byzantineValidators?t.byzantineValidators=e.byzantineValidators.map((function(e){return e?u.Validator.toJSON(e):void 0})):t.byzantineValidators=[],void 0!==e.totalVotingPower&&(t.totalVotingPower=(e.totalVotingPower||r.default.ZERO).toString()),void 0!==e.timestamp&&(t.timestamp=e.timestamp.toISOString()),t},fromPartial:function(e){var t=Object.assign({},f);if(t.byzantineValidators=[],void 0!==e.conflictingBlock&&null!==e.conflictingBlock?t.conflictingBlock=s.LightBlock.fromPartial(e.conflictingBlock):t.conflictingBlock=void 0,void 0!==e.commonHeight&&null!==e.commonHeight?t.commonHeight=e.commonHeight:t.commonHeight=r.default.ZERO,void 0!==e.byzantineValidators&&null!==e.byzantineValidators){var n,o=a(e.byzantineValidators);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.byzantineValidators.push(u.Validator.fromPartial(i))}}catch(c){o.e(c)}finally{o.f()}}return void 0!==e.totalVotingPower&&null!==e.totalVotingPower?t.totalVotingPower=e.totalVotingPower:t.totalVotingPower=r.default.ZERO,void 0!==e.timestamp&&null!==e.timestamp?t.timestamp=e.timestamp:t.timestamp=void 0,t}};var p={};function b(e){var t;return{seconds:(t=e.getTime()/1e3,r.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function m(e){var t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function h(e){return e instanceof Date?e:"string"===typeof e?new Date(e):m(c.Timestamp.fromJSON(e))}t.EvidenceList={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.evidence);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.Evidence.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},p);for(r.evidence=[];a.pos>>3===1)r.evidence.push(t.Evidence.decode(a,a.uint32()));else a.skipType(7&s)}return r},fromJSON:function(e){var n=Object.assign({},p);if(n.evidence=[],void 0!==e.evidence&&null!==e.evidence){var o,r=a(e.evidence);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.evidence.push(t.Evidence.fromJSON(i))}}catch(s){r.e(s)}finally{r.f()}}return n},toJSON:function(e){var n={};return e.evidence?n.evidence=e.evidence.map((function(e){return e?t.Evidence.toJSON(e):void 0})):n.evidence=[],n},fromPartial:function(e){var n=Object.assign({},p);if(n.evidence=[],void 0!==e.evidence&&null!==e.evidence){var o,r=a(e.evidence);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.evidence.push(t.Evidence.fromPartial(i))}}catch(s){r.e(s)}finally{r.f()}}return n}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},95836:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HashedParams=t.VersionParams=t.ValidatorParams=t.EvidenceParams=t.BlockParams=t.ConsensusParams=t.protobufPackage=void 0;var r=o(n(29600)),i=o(n(80121)),s=n(51090);t.protobufPackage="tendermint.types";var c={};t.ConsensusParams={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.block&&t.BlockParams.encode(e.block,n.uint32(10).fork()).ldelim(),void 0!==e.evidence&&t.EvidenceParams.encode(e.evidence,n.uint32(18).fork()).ldelim(),void 0!==e.validator&&t.ValidatorParams.encode(e.validator,n.uint32(26).fork()).ldelim(),void 0!==e.version&&t.VersionParams.encode(e.version,n.uint32(34).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},c);a.pos>>3){case 1:r.block=t.BlockParams.decode(a,a.uint32());break;case 2:r.evidence=t.EvidenceParams.decode(a,a.uint32());break;case 3:r.validator=t.ValidatorParams.decode(a,a.uint32());break;case 4:r.version=t.VersionParams.decode(a,a.uint32());break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},c);return void 0!==e.block&&null!==e.block?n.block=t.BlockParams.fromJSON(e.block):n.block=void 0,void 0!==e.evidence&&null!==e.evidence?n.evidence=t.EvidenceParams.fromJSON(e.evidence):n.evidence=void 0,void 0!==e.validator&&null!==e.validator?n.validator=t.ValidatorParams.fromJSON(e.validator):n.validator=void 0,void 0!==e.version&&null!==e.version?n.version=t.VersionParams.fromJSON(e.version):n.version=void 0,n},toJSON:function(e){var n={};return void 0!==e.block&&(n.block=e.block?t.BlockParams.toJSON(e.block):void 0),void 0!==e.evidence&&(n.evidence=e.evidence?t.EvidenceParams.toJSON(e.evidence):void 0),void 0!==e.validator&&(n.validator=e.validator?t.ValidatorParams.toJSON(e.validator):void 0),void 0!==e.version&&(n.version=e.version?t.VersionParams.toJSON(e.version):void 0),n},fromPartial:function(e){var n=Object.assign({},c);return void 0!==e.block&&null!==e.block?n.block=t.BlockParams.fromPartial(e.block):n.block=void 0,void 0!==e.evidence&&null!==e.evidence?n.evidence=t.EvidenceParams.fromPartial(e.evidence):n.evidence=void 0,void 0!==e.validator&&null!==e.validator?n.validator=t.ValidatorParams.fromPartial(e.validator):n.validator=void 0,void 0!==e.version&&null!==e.version?n.version=t.VersionParams.fromPartial(e.version):n.version=void 0,n}};var u={maxBytes:r.default.ZERO,maxGas:r.default.ZERO,timeIotaMs:r.default.ZERO};t.BlockParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.maxBytes.isZero()||t.uint32(8).int64(e.maxBytes),e.maxGas.isZero()||t.uint32(16).int64(e.maxGas),e.timeIotaMs.isZero()||t.uint32(24).int64(e.timeIotaMs),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);n.pos>>3){case 1:o.maxBytes=n.int64();break;case 2:o.maxGas=n.int64();break;case 3:o.timeIotaMs=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=r.default.fromString(e.maxBytes):t.maxBytes=r.default.ZERO,void 0!==e.maxGas&&null!==e.maxGas?t.maxGas=r.default.fromString(e.maxGas):t.maxGas=r.default.ZERO,void 0!==e.timeIotaMs&&null!==e.timeIotaMs?t.timeIotaMs=r.default.fromString(e.timeIotaMs):t.timeIotaMs=r.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||r.default.ZERO).toString()),void 0!==e.maxGas&&(t.maxGas=(e.maxGas||r.default.ZERO).toString()),void 0!==e.timeIotaMs&&(t.timeIotaMs=(e.timeIotaMs||r.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},u);return void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=e.maxBytes:t.maxBytes=r.default.ZERO,void 0!==e.maxGas&&null!==e.maxGas?t.maxGas=e.maxGas:t.maxGas=r.default.ZERO,void 0!==e.timeIotaMs&&null!==e.timeIotaMs?t.timeIotaMs=e.timeIotaMs:t.timeIotaMs=r.default.ZERO,t}};var d={maxAgeNumBlocks:r.default.ZERO,maxBytes:r.default.ZERO};t.EvidenceParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.maxAgeNumBlocks.isZero()||t.uint32(8).int64(e.maxAgeNumBlocks),void 0!==e.maxAgeDuration&&s.Duration.encode(e.maxAgeDuration,t.uint32(18).fork()).ldelim(),e.maxBytes.isZero()||t.uint32(24).int64(e.maxBytes),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.maxAgeNumBlocks=n.int64();break;case 2:o.maxAgeDuration=s.Duration.decode(n,n.uint32());break;case 3:o.maxBytes=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.maxAgeNumBlocks&&null!==e.maxAgeNumBlocks?t.maxAgeNumBlocks=r.default.fromString(e.maxAgeNumBlocks):t.maxAgeNumBlocks=r.default.ZERO,void 0!==e.maxAgeDuration&&null!==e.maxAgeDuration?t.maxAgeDuration=s.Duration.fromJSON(e.maxAgeDuration):t.maxAgeDuration=void 0,void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=r.default.fromString(e.maxBytes):t.maxBytes=r.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.maxAgeNumBlocks&&(t.maxAgeNumBlocks=(e.maxAgeNumBlocks||r.default.ZERO).toString()),void 0!==e.maxAgeDuration&&(t.maxAgeDuration=e.maxAgeDuration?s.Duration.toJSON(e.maxAgeDuration):void 0),void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||r.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.maxAgeNumBlocks&&null!==e.maxAgeNumBlocks?t.maxAgeNumBlocks=e.maxAgeNumBlocks:t.maxAgeNumBlocks=r.default.ZERO,void 0!==e.maxAgeDuration&&null!==e.maxAgeDuration?t.maxAgeDuration=s.Duration.fromPartial(e.maxAgeDuration):t.maxAgeDuration=void 0,void 0!==e.maxBytes&&null!==e.maxBytes?t.maxBytes=e.maxBytes:t.maxBytes=r.default.ZERO,t}};var l={pubKeyTypes:""};t.ValidatorParams={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),o=a(e.pubKeyTypes);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).string(r)}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},l);for(o.pubKeyTypes=[];n.pos>>3===1)o.pubKeyTypes.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},l);if(t.pubKeyTypes=[],void 0!==e.pubKeyTypes&&null!==e.pubKeyTypes){var n,o=a(e.pubKeyTypes);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.pubKeyTypes.push(String(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.pubKeyTypes?t.pubKeyTypes=e.pubKeyTypes.map((function(e){return e})):t.pubKeyTypes=[],t},fromPartial:function(e){var t=Object.assign({},l);if(t.pubKeyTypes=[],void 0!==e.pubKeyTypes&&null!==e.pubKeyTypes){var n,o=a(e.pubKeyTypes);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.pubKeyTypes.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var f={appVersion:r.default.UZERO};t.VersionParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.appVersion.isZero()||t.uint32(8).uint64(e.appVersion),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},f);n.pos>>3===1)o.appVersion=n.uint64();else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},f);return void 0!==e.appVersion&&null!==e.appVersion?t.appVersion=r.default.fromString(e.appVersion):t.appVersion=r.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.appVersion&&(t.appVersion=(e.appVersion||r.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},f);return void 0!==e.appVersion&&null!==e.appVersion?t.appVersion=e.appVersion:t.appVersion=r.default.UZERO,t}};var p={blockMaxBytes:r.default.ZERO,blockMaxGas:r.default.ZERO};t.HashedParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return e.blockMaxBytes.isZero()||t.uint32(8).int64(e.blockMaxBytes),e.blockMaxGas.isZero()||t.uint32(16).int64(e.blockMaxGas),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},p);n.pos>>3){case 1:o.blockMaxBytes=n.int64();break;case 2:o.blockMaxGas=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},p);return void 0!==e.blockMaxBytes&&null!==e.blockMaxBytes?t.blockMaxBytes=r.default.fromString(e.blockMaxBytes):t.blockMaxBytes=r.default.ZERO,void 0!==e.blockMaxGas&&null!==e.blockMaxGas?t.blockMaxGas=r.default.fromString(e.blockMaxGas):t.blockMaxGas=r.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.blockMaxBytes&&(t.blockMaxBytes=(e.blockMaxBytes||r.default.ZERO).toString()),void 0!==e.blockMaxGas&&(t.blockMaxGas=(e.blockMaxGas||r.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},p);return void 0!==e.blockMaxBytes&&null!==e.blockMaxBytes?t.blockMaxBytes=e.blockMaxBytes:t.blockMaxBytes=r.default.ZERO,void 0!==e.blockMaxGas&&null!==e.blockMaxGas?t.blockMaxGas=e.blockMaxGas:t.blockMaxGas=r.default.ZERO,t}},i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},78750:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TxProof=t.BlockMeta=t.LightBlock=t.SignedHeader=t.Proposal=t.CommitSig=t.Commit=t.Vote=t.Data=t.Header=t.BlockID=t.Part=t.PartSetHeader=t.signedMsgTypeToJSON=t.signedMsgTypeFromJSON=t.SignedMsgType=t.blockIDFlagToJSON=t.blockIDFlagFromJSON=t.BlockIDFlag=t.protobufPackage=void 0;var r,i,s=o(n(29600)),c=o(n(80121)),u=n(46760),d=n(70897),l=n(50262),f=n(47478);function p(e){switch(e){case 0:case"BLOCK_ID_FLAG_UNKNOWN":return r.BLOCK_ID_FLAG_UNKNOWN;case 1:case"BLOCK_ID_FLAG_ABSENT":return r.BLOCK_ID_FLAG_ABSENT;case 2:case"BLOCK_ID_FLAG_COMMIT":return r.BLOCK_ID_FLAG_COMMIT;case 3:case"BLOCK_ID_FLAG_NIL":return r.BLOCK_ID_FLAG_NIL;default:return r.UNRECOGNIZED}}function b(e){switch(e){case r.BLOCK_ID_FLAG_UNKNOWN:return"BLOCK_ID_FLAG_UNKNOWN";case r.BLOCK_ID_FLAG_ABSENT:return"BLOCK_ID_FLAG_ABSENT";case r.BLOCK_ID_FLAG_COMMIT:return"BLOCK_ID_FLAG_COMMIT";case r.BLOCK_ID_FLAG_NIL:return"BLOCK_ID_FLAG_NIL";default:return"UNKNOWN"}}function m(e){switch(e){case 0:case"SIGNED_MSG_TYPE_UNKNOWN":return i.SIGNED_MSG_TYPE_UNKNOWN;case 1:case"SIGNED_MSG_TYPE_PREVOTE":return i.SIGNED_MSG_TYPE_PREVOTE;case 2:case"SIGNED_MSG_TYPE_PRECOMMIT":return i.SIGNED_MSG_TYPE_PRECOMMIT;case 32:case"SIGNED_MSG_TYPE_PROPOSAL":return i.SIGNED_MSG_TYPE_PROPOSAL;default:return i.UNRECOGNIZED}}function h(e){switch(e){case i.SIGNED_MSG_TYPE_UNKNOWN:return"SIGNED_MSG_TYPE_UNKNOWN";case i.SIGNED_MSG_TYPE_PREVOTE:return"SIGNED_MSG_TYPE_PREVOTE";case i.SIGNED_MSG_TYPE_PRECOMMIT:return"SIGNED_MSG_TYPE_PRECOMMIT";case i.SIGNED_MSG_TYPE_PROPOSAL:return"SIGNED_MSG_TYPE_PROPOSAL";default:return"UNKNOWN"}}t.protobufPackage="tendermint.types",function(e){e[e.BLOCK_ID_FLAG_UNKNOWN=0]="BLOCK_ID_FLAG_UNKNOWN",e[e.BLOCK_ID_FLAG_ABSENT=1]="BLOCK_ID_FLAG_ABSENT",e[e.BLOCK_ID_FLAG_COMMIT=2]="BLOCK_ID_FLAG_COMMIT",e[e.BLOCK_ID_FLAG_NIL=3]="BLOCK_ID_FLAG_NIL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(r=t.BlockIDFlag||(t.BlockIDFlag={})),t.blockIDFlagFromJSON=p,t.blockIDFlagToJSON=b,function(e){e[e.SIGNED_MSG_TYPE_UNKNOWN=0]="SIGNED_MSG_TYPE_UNKNOWN",e[e.SIGNED_MSG_TYPE_PREVOTE=1]="SIGNED_MSG_TYPE_PREVOTE",e[e.SIGNED_MSG_TYPE_PRECOMMIT=2]="SIGNED_MSG_TYPE_PRECOMMIT",e[e.SIGNED_MSG_TYPE_PROPOSAL=32]="SIGNED_MSG_TYPE_PROPOSAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.SignedMsgType||(t.SignedMsgType={})),t.signedMsgTypeFromJSON=m,t.signedMsgTypeToJSON=h;var g={total:0};t.PartSetHeader={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.total&&t.uint32(8).uint32(e.total),0!==e.hash.length&&t.uint32(18).bytes(e.hash),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},g);for(o.hash=new Uint8Array;n.pos>>3){case 1:o.total=n.uint32();break;case 2:o.hash=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},g);return t.hash=new Uint8Array,void 0!==e.total&&null!==e.total?t.total=Number(e.total):t.total=0,void 0!==e.hash&&null!==e.hash&&(t.hash=U(e.hash)),t},toJSON:function(e){var t={};return void 0!==e.total&&(t.total=e.total),void 0!==e.hash&&(t.hash=B(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},g);return void 0!==e.total&&null!==e.total?t.total=e.total:t.total=0,void 0!==e.hash&&null!==e.hash?t.hash=e.hash:t.hash=new Uint8Array,t}};var y={index:0};t.Part={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.index&&t.uint32(8).uint32(e.index),0!==e.bytes.length&&t.uint32(18).bytes(e.bytes),void 0!==e.proof&&u.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},y);for(o.bytes=new Uint8Array;n.pos>>3){case 1:o.index=n.uint32();break;case 2:o.bytes=n.bytes();break;case 3:o.proof=u.Proof.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},y);return t.bytes=new Uint8Array,void 0!==e.index&&null!==e.index?t.index=Number(e.index):t.index=0,void 0!==e.bytes&&null!==e.bytes&&(t.bytes=U(e.bytes)),void 0!==e.proof&&null!==e.proof?t.proof=u.Proof.fromJSON(e.proof):t.proof=void 0,t},toJSON:function(e){var t={};return void 0!==e.index&&(t.index=e.index),void 0!==e.bytes&&(t.bytes=B(void 0!==e.bytes?e.bytes:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?u.Proof.toJSON(e.proof):void 0),t},fromPartial:function(e){var t=Object.assign({},y);return void 0!==e.index&&null!==e.index?t.index=e.index:t.index=0,void 0!==e.bytes&&null!==e.bytes?t.bytes=e.bytes:t.bytes=new Uint8Array,void 0!==e.proof&&null!==e.proof?t.proof=u.Proof.fromPartial(e.proof):t.proof=void 0,t}};var v={};t.BlockID={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.hash.length&&n.uint32(10).bytes(e.hash),void 0!==e.partSetHeader&&t.PartSetHeader.encode(e.partSetHeader,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},v);for(r.hash=new Uint8Array;a.pos>>3){case 1:r.hash=a.bytes();break;case 2:r.partSetHeader=t.PartSetHeader.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},v);return n.hash=new Uint8Array,void 0!==e.hash&&null!==e.hash&&(n.hash=U(e.hash)),void 0!==e.partSetHeader&&null!==e.partSetHeader?n.partSetHeader=t.PartSetHeader.fromJSON(e.partSetHeader):n.partSetHeader=void 0,n},toJSON:function(e){var n={};return void 0!==e.hash&&(n.hash=B(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.partSetHeader&&(n.partSetHeader=e.partSetHeader?t.PartSetHeader.toJSON(e.partSetHeader):void 0),n},fromPartial:function(e){var n=Object.assign({},v);return void 0!==e.hash&&null!==e.hash?n.hash=e.hash:n.hash=new Uint8Array,void 0!==e.partSetHeader&&null!==e.partSetHeader?n.partSetHeader=t.PartSetHeader.fromPartial(e.partSetHeader):n.partSetHeader=void 0,n}};var w={chainId:"",height:s.default.ZERO};t.Header={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.version&&d.Consensus.encode(e.version,n.uint32(10).fork()).ldelim(),""!==e.chainId&&n.uint32(18).string(e.chainId),e.height.isZero()||n.uint32(24).int64(e.height),void 0!==e.time&&f.Timestamp.encode(D(e.time),n.uint32(34).fork()).ldelim(),void 0!==e.lastBlockId&&t.BlockID.encode(e.lastBlockId,n.uint32(42).fork()).ldelim(),0!==e.lastCommitHash.length&&n.uint32(50).bytes(e.lastCommitHash),0!==e.dataHash.length&&n.uint32(58).bytes(e.dataHash),0!==e.validatorsHash.length&&n.uint32(66).bytes(e.validatorsHash),0!==e.nextValidatorsHash.length&&n.uint32(74).bytes(e.nextValidatorsHash),0!==e.consensusHash.length&&n.uint32(82).bytes(e.consensusHash),0!==e.appHash.length&&n.uint32(90).bytes(e.appHash),0!==e.lastResultsHash.length&&n.uint32(98).bytes(e.lastResultsHash),0!==e.evidenceHash.length&&n.uint32(106).bytes(e.evidenceHash),0!==e.proposerAddress.length&&n.uint32(114).bytes(e.proposerAddress),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},w);for(r.lastCommitHash=new Uint8Array,r.dataHash=new Uint8Array,r.validatorsHash=new Uint8Array,r.nextValidatorsHash=new Uint8Array,r.consensusHash=new Uint8Array,r.appHash=new Uint8Array,r.lastResultsHash=new Uint8Array,r.evidenceHash=new Uint8Array,r.proposerAddress=new Uint8Array;a.pos>>3){case 1:r.version=d.Consensus.decode(a,a.uint32());break;case 2:r.chainId=a.string();break;case 3:r.height=a.int64();break;case 4:r.time=N(f.Timestamp.decode(a,a.uint32()));break;case 5:r.lastBlockId=t.BlockID.decode(a,a.uint32());break;case 6:r.lastCommitHash=a.bytes();break;case 7:r.dataHash=a.bytes();break;case 8:r.validatorsHash=a.bytes();break;case 9:r.nextValidatorsHash=a.bytes();break;case 10:r.consensusHash=a.bytes();break;case 11:r.appHash=a.bytes();break;case 12:r.lastResultsHash=a.bytes();break;case 13:r.evidenceHash=a.bytes();break;case 14:r.proposerAddress=a.bytes();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},w);return n.lastCommitHash=new Uint8Array,n.dataHash=new Uint8Array,n.validatorsHash=new Uint8Array,n.nextValidatorsHash=new Uint8Array,n.consensusHash=new Uint8Array,n.appHash=new Uint8Array,n.lastResultsHash=new Uint8Array,n.evidenceHash=new Uint8Array,n.proposerAddress=new Uint8Array,void 0!==e.version&&null!==e.version?n.version=d.Consensus.fromJSON(e.version):n.version=void 0,void 0!==e.chainId&&null!==e.chainId?n.chainId=String(e.chainId):n.chainId="",void 0!==e.height&&null!==e.height?n.height=s.default.fromString(e.height):n.height=s.default.ZERO,void 0!==e.time&&null!==e.time?n.time=O(e.time):n.time=void 0,void 0!==e.lastBlockId&&null!==e.lastBlockId?n.lastBlockId=t.BlockID.fromJSON(e.lastBlockId):n.lastBlockId=void 0,void 0!==e.lastCommitHash&&null!==e.lastCommitHash&&(n.lastCommitHash=U(e.lastCommitHash)),void 0!==e.dataHash&&null!==e.dataHash&&(n.dataHash=U(e.dataHash)),void 0!==e.validatorsHash&&null!==e.validatorsHash&&(n.validatorsHash=U(e.validatorsHash)),void 0!==e.nextValidatorsHash&&null!==e.nextValidatorsHash&&(n.nextValidatorsHash=U(e.nextValidatorsHash)),void 0!==e.consensusHash&&null!==e.consensusHash&&(n.consensusHash=U(e.consensusHash)),void 0!==e.appHash&&null!==e.appHash&&(n.appHash=U(e.appHash)),void 0!==e.lastResultsHash&&null!==e.lastResultsHash&&(n.lastResultsHash=U(e.lastResultsHash)),void 0!==e.evidenceHash&&null!==e.evidenceHash&&(n.evidenceHash=U(e.evidenceHash)),void 0!==e.proposerAddress&&null!==e.proposerAddress&&(n.proposerAddress=U(e.proposerAddress)),n},toJSON:function(e){var n={};return void 0!==e.version&&(n.version=e.version?d.Consensus.toJSON(e.version):void 0),void 0!==e.chainId&&(n.chainId=e.chainId),void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.time&&(n.time=e.time.toISOString()),void 0!==e.lastBlockId&&(n.lastBlockId=e.lastBlockId?t.BlockID.toJSON(e.lastBlockId):void 0),void 0!==e.lastCommitHash&&(n.lastCommitHash=B(void 0!==e.lastCommitHash?e.lastCommitHash:new Uint8Array)),void 0!==e.dataHash&&(n.dataHash=B(void 0!==e.dataHash?e.dataHash:new Uint8Array)),void 0!==e.validatorsHash&&(n.validatorsHash=B(void 0!==e.validatorsHash?e.validatorsHash:new Uint8Array)),void 0!==e.nextValidatorsHash&&(n.nextValidatorsHash=B(void 0!==e.nextValidatorsHash?e.nextValidatorsHash:new Uint8Array)),void 0!==e.consensusHash&&(n.consensusHash=B(void 0!==e.consensusHash?e.consensusHash:new Uint8Array)),void 0!==e.appHash&&(n.appHash=B(void 0!==e.appHash?e.appHash:new Uint8Array)),void 0!==e.lastResultsHash&&(n.lastResultsHash=B(void 0!==e.lastResultsHash?e.lastResultsHash:new Uint8Array)),void 0!==e.evidenceHash&&(n.evidenceHash=B(void 0!==e.evidenceHash?e.evidenceHash:new Uint8Array)),void 0!==e.proposerAddress&&(n.proposerAddress=B(void 0!==e.proposerAddress?e.proposerAddress:new Uint8Array)),n},fromPartial:function(e){var n=Object.assign({},w);return void 0!==e.version&&null!==e.version?n.version=d.Consensus.fromPartial(e.version):n.version=void 0,void 0!==e.chainId&&null!==e.chainId?n.chainId=e.chainId:n.chainId="",void 0!==e.height&&null!==e.height?n.height=e.height:n.height=s.default.ZERO,void 0!==e.time&&null!==e.time?n.time=e.time:n.time=void 0,void 0!==e.lastBlockId&&null!==e.lastBlockId?n.lastBlockId=t.BlockID.fromPartial(e.lastBlockId):n.lastBlockId=void 0,void 0!==e.lastCommitHash&&null!==e.lastCommitHash?n.lastCommitHash=e.lastCommitHash:n.lastCommitHash=new Uint8Array,void 0!==e.dataHash&&null!==e.dataHash?n.dataHash=e.dataHash:n.dataHash=new Uint8Array,void 0!==e.validatorsHash&&null!==e.validatorsHash?n.validatorsHash=e.validatorsHash:n.validatorsHash=new Uint8Array,void 0!==e.nextValidatorsHash&&null!==e.nextValidatorsHash?n.nextValidatorsHash=e.nextValidatorsHash:n.nextValidatorsHash=new Uint8Array,void 0!==e.consensusHash&&null!==e.consensusHash?n.consensusHash=e.consensusHash:n.consensusHash=new Uint8Array,void 0!==e.appHash&&null!==e.appHash?n.appHash=e.appHash:n.appHash=new Uint8Array,void 0!==e.lastResultsHash&&null!==e.lastResultsHash?n.lastResultsHash=e.lastResultsHash:n.lastResultsHash=new Uint8Array,void 0!==e.evidenceHash&&null!==e.evidenceHash?n.evidenceHash=e.evidenceHash:n.evidenceHash=new Uint8Array,void 0!==e.proposerAddress&&null!==e.proposerAddress?n.proposerAddress=e.proposerAddress:n.proposerAddress=new Uint8Array,n}};var k={};t.Data={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create(),o=a(e.txs);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).bytes(r)}}catch(i){o.e(i)}finally{o.f()}return n},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},k);for(o.txs=[];n.pos>>3===1)o.txs.push(n.bytes());else n.skipType(7&r)}return o},fromJSON:function(e){var t=Object.assign({},k);if(t.txs=[],void 0!==e.txs&&null!==e.txs){var n,o=a(e.txs);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.txs.push(U(r))}}catch(i){o.e(i)}finally{o.f()}}return t},toJSON:function(e){var t={};return e.txs?t.txs=e.txs.map((function(e){return B(void 0!==e?e:new Uint8Array)})):t.txs=[],t},fromPartial:function(e){var t=Object.assign({},k);if(t.txs=[],void 0!==e.txs&&null!==e.txs){var n,o=a(e.txs);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.txs.push(r)}}catch(i){o.e(i)}finally{o.f()}}return t}};var A={type:0,height:s.default.ZERO,round:0,validatorIndex:0};t.Vote={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.type&&n.uint32(8).int32(e.type),e.height.isZero()||n.uint32(16).int64(e.height),0!==e.round&&n.uint32(24).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(34).fork()).ldelim(),void 0!==e.timestamp&&f.Timestamp.encode(D(e.timestamp),n.uint32(42).fork()).ldelim(),0!==e.validatorAddress.length&&n.uint32(50).bytes(e.validatorAddress),0!==e.validatorIndex&&n.uint32(56).int32(e.validatorIndex),0!==e.signature.length&&n.uint32(66).bytes(e.signature),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},A);for(r.validatorAddress=new Uint8Array,r.signature=new Uint8Array;a.pos>>3){case 1:r.type=a.int32();break;case 2:r.height=a.int64();break;case 3:r.round=a.int32();break;case 4:r.blockId=t.BlockID.decode(a,a.uint32());break;case 5:r.timestamp=N(f.Timestamp.decode(a,a.uint32()));break;case 6:r.validatorAddress=a.bytes();break;case 7:r.validatorIndex=a.int32();break;case 8:r.signature=a.bytes();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},A);return n.validatorAddress=new Uint8Array,n.signature=new Uint8Array,void 0!==e.type&&null!==e.type?n.type=m(e.type):n.type=0,void 0!==e.height&&null!==e.height?n.height=s.default.fromString(e.height):n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=Number(e.round):n.round=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromJSON(e.blockId):n.blockId=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=O(e.timestamp):n.timestamp=void 0,void 0!==e.validatorAddress&&null!==e.validatorAddress&&(n.validatorAddress=U(e.validatorAddress)),void 0!==e.validatorIndex&&null!==e.validatorIndex?n.validatorIndex=Number(e.validatorIndex):n.validatorIndex=0,void 0!==e.signature&&null!==e.signature&&(n.signature=U(e.signature)),n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=h(e.type)),void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(n.timestamp=e.timestamp.toISOString()),void 0!==e.validatorAddress&&(n.validatorAddress=B(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.validatorIndex&&(n.validatorIndex=e.validatorIndex),void 0!==e.signature&&(n.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),n},fromPartial:function(e){var n=Object.assign({},A);return void 0!==e.type&&null!==e.type?n.type=e.type:n.type=0,void 0!==e.height&&null!==e.height?n.height=e.height:n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=e.round:n.round=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromPartial(e.blockId):n.blockId=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=e.timestamp:n.timestamp=void 0,void 0!==e.validatorAddress&&null!==e.validatorAddress?n.validatorAddress=e.validatorAddress:n.validatorAddress=new Uint8Array,void 0!==e.validatorIndex&&null!==e.validatorIndex?n.validatorIndex=e.validatorIndex:n.validatorIndex=0,void 0!==e.signature&&null!==e.signature?n.signature=e.signature:n.signature=new Uint8Array,n}};var x={height:s.default.ZERO,round:0};t.Commit={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();e.height.isZero()||n.uint32(8).int64(e.height),0!==e.round&&n.uint32(16).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(26).fork()).ldelim();var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.CommitSig.encode(i,n.uint32(34).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},x);for(r.signatures=[];a.pos>>3){case 1:r.height=a.int64();break;case 2:r.round=a.int32();break;case 3:r.blockId=t.BlockID.decode(a,a.uint32());break;case 4:r.signatures.push(t.CommitSig.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},x);if(n.signatures=[],void 0!==e.height&&null!==e.height?n.height=s.default.fromString(e.height):n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=Number(e.round):n.round=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromJSON(e.blockId):n.blockId=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.CommitSig.fromJSON(i))}}catch(c){r.e(c)}finally{r.f()}}return n},toJSON:function(e){var n={};return void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return e?t.CommitSig.toJSON(e):void 0})):n.signatures=[],n},fromPartial:function(e){var n=Object.assign({},x);if(n.signatures=[],void 0!==e.height&&null!==e.height?n.height=e.height:n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=e.round:n.round=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromPartial(e.blockId):n.blockId=void 0,void 0!==e.signatures&&null!==e.signatures){var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.signatures.push(t.CommitSig.fromPartial(i))}}catch(c){r.e(c)}finally{r.f()}}return n}};var I={blockIdFlag:0};t.CommitSig={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.blockIdFlag&&t.uint32(8).int32(e.blockIdFlag),0!==e.validatorAddress.length&&t.uint32(18).bytes(e.validatorAddress),void 0!==e.timestamp&&f.Timestamp.encode(D(e.timestamp),t.uint32(26).fork()).ldelim(),0!==e.signature.length&&t.uint32(34).bytes(e.signature),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},I);for(o.validatorAddress=new Uint8Array,o.signature=new Uint8Array;n.pos>>3){case 1:o.blockIdFlag=n.int32();break;case 2:o.validatorAddress=n.bytes();break;case 3:o.timestamp=N(f.Timestamp.decode(n,n.uint32()));break;case 4:o.signature=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},I);return t.validatorAddress=new Uint8Array,t.signature=new Uint8Array,void 0!==e.blockIdFlag&&null!==e.blockIdFlag?t.blockIdFlag=p(e.blockIdFlag):t.blockIdFlag=0,void 0!==e.validatorAddress&&null!==e.validatorAddress&&(t.validatorAddress=U(e.validatorAddress)),void 0!==e.timestamp&&null!==e.timestamp?t.timestamp=O(e.timestamp):t.timestamp=void 0,void 0!==e.signature&&null!==e.signature&&(t.signature=U(e.signature)),t},toJSON:function(e){var t={};return void 0!==e.blockIdFlag&&(t.blockIdFlag=b(e.blockIdFlag)),void 0!==e.validatorAddress&&(t.validatorAddress=B(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.timestamp&&(t.timestamp=e.timestamp.toISOString()),void 0!==e.signature&&(t.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial:function(e){var t=Object.assign({},I);return void 0!==e.blockIdFlag&&null!==e.blockIdFlag?t.blockIdFlag=e.blockIdFlag:t.blockIdFlag=0,void 0!==e.validatorAddress&&null!==e.validatorAddress?t.validatorAddress=e.validatorAddress:t.validatorAddress=new Uint8Array,void 0!==e.timestamp&&null!==e.timestamp?t.timestamp=e.timestamp:t.timestamp=void 0,void 0!==e.signature&&null!==e.signature?t.signature=e.signature:t.signature=new Uint8Array,t}};var T={type:0,height:s.default.ZERO,round:0,polRound:0};t.Proposal={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.type&&n.uint32(8).int32(e.type),e.height.isZero()||n.uint32(16).int64(e.height),0!==e.round&&n.uint32(24).int32(e.round),0!==e.polRound&&n.uint32(32).int32(e.polRound),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(42).fork()).ldelim(),void 0!==e.timestamp&&f.Timestamp.encode(D(e.timestamp),n.uint32(50).fork()).ldelim(),0!==e.signature.length&&n.uint32(58).bytes(e.signature),n},decode:function(e,n){var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},T);for(r.signature=new Uint8Array;a.pos>>3){case 1:r.type=a.int32();break;case 2:r.height=a.int64();break;case 3:r.round=a.int32();break;case 4:r.polRound=a.int32();break;case 5:r.blockId=t.BlockID.decode(a,a.uint32());break;case 6:r.timestamp=N(f.Timestamp.decode(a,a.uint32()));break;case 7:r.signature=a.bytes();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},T);return n.signature=new Uint8Array,void 0!==e.type&&null!==e.type?n.type=m(e.type):n.type=0,void 0!==e.height&&null!==e.height?n.height=s.default.fromString(e.height):n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=Number(e.round):n.round=0,void 0!==e.polRound&&null!==e.polRound?n.polRound=Number(e.polRound):n.polRound=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromJSON(e.blockId):n.blockId=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=O(e.timestamp):n.timestamp=void 0,void 0!==e.signature&&null!==e.signature&&(n.signature=U(e.signature)),n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=h(e.type)),void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.polRound&&(n.polRound=e.polRound),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(n.timestamp=e.timestamp.toISOString()),void 0!==e.signature&&(n.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),n},fromPartial:function(e){var n=Object.assign({},T);return void 0!==e.type&&null!==e.type?n.type=e.type:n.type=0,void 0!==e.height&&null!==e.height?n.height=e.height:n.height=s.default.ZERO,void 0!==e.round&&null!==e.round?n.round=e.round:n.round=0,void 0!==e.polRound&&null!==e.polRound?n.polRound=e.polRound:n.polRound=0,void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromPartial(e.blockId):n.blockId=void 0,void 0!==e.timestamp&&null!==e.timestamp?n.timestamp=e.timestamp:n.timestamp=void 0,void 0!==e.signature&&null!==e.signature?n.signature=e.signature:n.signature=new Uint8Array,n}};var S={};t.SignedHeader={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.header&&t.Header.encode(e.header,n.uint32(10).fork()).ldelim(),void 0!==e.commit&&t.Commit.encode(e.commit,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},S);a.pos>>3){case 1:r.header=t.Header.decode(a,a.uint32());break;case 2:r.commit=t.Commit.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},S);return void 0!==e.header&&null!==e.header?n.header=t.Header.fromJSON(e.header):n.header=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.Commit.fromJSON(e.commit):n.commit=void 0,n},toJSON:function(e){var n={};return void 0!==e.header&&(n.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.commit&&(n.commit=e.commit?t.Commit.toJSON(e.commit):void 0),n},fromPartial:function(e){var n=Object.assign({},S);return void 0!==e.header&&null!==e.header?n.header=t.Header.fromPartial(e.header):n.header=void 0,void 0!==e.commit&&null!==e.commit?n.commit=t.Commit.fromPartial(e.commit):n.commit=void 0,n}};var C={};t.LightBlock={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.signedHeader&&t.SignedHeader.encode(e.signedHeader,n.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&l.ValidatorSet.encode(e.validatorSet,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},C);a.pos>>3){case 1:r.signedHeader=t.SignedHeader.decode(a,a.uint32());break;case 2:r.validatorSet=l.ValidatorSet.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},C);return void 0!==e.signedHeader&&null!==e.signedHeader?n.signedHeader=t.SignedHeader.fromJSON(e.signedHeader):n.signedHeader=void 0,void 0!==e.validatorSet&&null!==e.validatorSet?n.validatorSet=l.ValidatorSet.fromJSON(e.validatorSet):n.validatorSet=void 0,n},toJSON:function(e){var n={};return void 0!==e.signedHeader&&(n.signedHeader=e.signedHeader?t.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(n.validatorSet=e.validatorSet?l.ValidatorSet.toJSON(e.validatorSet):void 0),n},fromPartial:function(e){var n=Object.assign({},C);return void 0!==e.signedHeader&&null!==e.signedHeader?n.signedHeader=t.SignedHeader.fromPartial(e.signedHeader):n.signedHeader=void 0,void 0!==e.validatorSet&&null!==e.validatorSet?n.validatorSet=l.ValidatorSet.fromPartial(e.validatorSet):n.validatorSet=void 0,n}};var E={blockSize:s.default.ZERO,numTxs:s.default.ZERO};t.BlockMeta={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(10).fork()).ldelim(),e.blockSize.isZero()||n.uint32(16).int64(e.blockSize),void 0!==e.header&&t.Header.encode(e.header,n.uint32(26).fork()).ldelim(),e.numTxs.isZero()||n.uint32(32).int64(e.numTxs),n},decode:function(e,n){for(var a=e instanceof c.default.Reader?e:new c.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},E);a.pos>>3){case 1:r.blockId=t.BlockID.decode(a,a.uint32());break;case 2:r.blockSize=a.int64();break;case 3:r.header=t.Header.decode(a,a.uint32());break;case 4:r.numTxs=a.int64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){var n=Object.assign({},E);return void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromJSON(e.blockId):n.blockId=void 0,void 0!==e.blockSize&&null!==e.blockSize?n.blockSize=s.default.fromString(e.blockSize):n.blockSize=s.default.ZERO,void 0!==e.header&&null!==e.header?n.header=t.Header.fromJSON(e.header):n.header=void 0,void 0!==e.numTxs&&null!==e.numTxs?n.numTxs=s.default.fromString(e.numTxs):n.numTxs=s.default.ZERO,n},toJSON:function(e){var n={};return void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.blockSize&&(n.blockSize=(e.blockSize||s.default.ZERO).toString()),void 0!==e.header&&(n.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.numTxs&&(n.numTxs=(e.numTxs||s.default.ZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},E);return void 0!==e.blockId&&null!==e.blockId?n.blockId=t.BlockID.fromPartial(e.blockId):n.blockId=void 0,void 0!==e.blockSize&&null!==e.blockSize?n.blockSize=e.blockSize:n.blockSize=s.default.ZERO,void 0!==e.header&&null!==e.header?n.header=t.Header.fromPartial(e.header):n.header=void 0,void 0!==e.numTxs&&null!==e.numTxs?n.numTxs=e.numTxs:n.numTxs=s.default.ZERO,n}};var R={};t.TxProof={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Writer.create();return 0!==e.rootHash.length&&t.uint32(10).bytes(e.rootHash),0!==e.data.length&&t.uint32(18).bytes(e.data),void 0!==e.proof&&u.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){var n=e instanceof c.default.Reader?e:new c.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},R);for(o.rootHash=new Uint8Array,o.data=new Uint8Array;n.pos>>3){case 1:o.rootHash=n.bytes();break;case 2:o.data=n.bytes();break;case 3:o.proof=u.Proof.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},R);return t.rootHash=new Uint8Array,t.data=new Uint8Array,void 0!==e.rootHash&&null!==e.rootHash&&(t.rootHash=U(e.rootHash)),void 0!==e.data&&null!==e.data&&(t.data=U(e.data)),void 0!==e.proof&&null!==e.proof?t.proof=u.Proof.fromJSON(e.proof):t.proof=void 0,t},toJSON:function(e){var t={};return void 0!==e.rootHash&&(t.rootHash=B(void 0!==e.rootHash?e.rootHash:new Uint8Array)),void 0!==e.data&&(t.data=B(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?u.Proof.toJSON(e.proof):void 0),t},fromPartial:function(e){var t=Object.assign({},R);return void 0!==e.rootHash&&null!==e.rootHash?t.rootHash=e.rootHash:t.rootHash=new Uint8Array,void 0!==e.data&&null!==e.data?t.data=e.data:t.data=new Uint8Array,void 0!==e.proof&&null!==e.proof?t.proof=u.Proof.fromPartial(e.proof):t.proof=void 0,t}};var M=function(){if("undefined"!==typeof M)return M;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),P=M.atob||function(e){return M.Buffer.from(e,"base64").toString("binary")};function U(e){for(var t=P(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create(),r=a(e.validators);try{for(r.s();!(n=r.n()).done;){var s=n.value;t.Validator.encode(s,o.uint32(10).fork()).ldelim()}}catch(c){r.e(c)}finally{r.f()}return void 0!==e.proposer&&t.Validator.encode(e.proposer,o.uint32(18).fork()).ldelim(),e.totalVotingPower.isZero()||o.uint32(24).int64(e.totalVotingPower),o},decode:function(e,n){var a=e instanceof i.default.Reader?e:new i.default.Reader(e),o=void 0===n?a.len:a.pos+n,r=Object.assign({},c);for(r.validators=[];a.pos>>3){case 1:r.validators.push(t.Validator.decode(a,a.uint32()));break;case 2:r.proposer=t.Validator.decode(a,a.uint32());break;case 3:r.totalVotingPower=a.int64();break;default:a.skipType(7&s)}}return r},fromJSON:function(e){var n=Object.assign({},c);if(n.validators=[],void 0!==e.validators&&null!==e.validators){var o,i=a(e.validators);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.validators.push(t.Validator.fromJSON(s))}}catch(u){i.e(u)}finally{i.f()}}return void 0!==e.proposer&&null!==e.proposer?n.proposer=t.Validator.fromJSON(e.proposer):n.proposer=void 0,void 0!==e.totalVotingPower&&null!==e.totalVotingPower?n.totalVotingPower=r.default.fromString(e.totalVotingPower):n.totalVotingPower=r.default.ZERO,n},toJSON:function(e){var n={};return e.validators?n.validators=e.validators.map((function(e){return e?t.Validator.toJSON(e):void 0})):n.validators=[],void 0!==e.proposer&&(n.proposer=e.proposer?t.Validator.toJSON(e.proposer):void 0),void 0!==e.totalVotingPower&&(n.totalVotingPower=(e.totalVotingPower||r.default.ZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},c);if(n.validators=[],void 0!==e.validators&&null!==e.validators){var o,i=a(e.validators);try{for(i.s();!(o=i.n()).done;){var s=o.value;n.validators.push(t.Validator.fromPartial(s))}}catch(u){i.e(u)}finally{i.f()}}return void 0!==e.proposer&&null!==e.proposer?n.proposer=t.Validator.fromPartial(e.proposer):n.proposer=void 0,void 0!==e.totalVotingPower&&null!==e.totalVotingPower?n.totalVotingPower=e.totalVotingPower:n.totalVotingPower=r.default.ZERO,n}};var u={votingPower:r.default.ZERO,proposerPriority:r.default.ZERO};t.Validator={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return 0!==e.address.length&&t.uint32(10).bytes(e.address),void 0!==e.pubKey&&s.PublicKey.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.votingPower.isZero()||t.uint32(24).int64(e.votingPower),e.proposerPriority.isZero()||t.uint32(32).int64(e.proposerPriority),t},decode:function(e,t){var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},u);for(o.address=new Uint8Array;n.pos>>3){case 1:o.address=n.bytes();break;case 2:o.pubKey=s.PublicKey.decode(n,n.uint32());break;case 3:o.votingPower=n.int64();break;case 4:o.proposerPriority=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},u);return t.address=new Uint8Array,void 0!==e.address&&null!==e.address&&(t.address=function(e){for(var t=f(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:i.default.Writer.create();return void 0!==e.pubKey&&s.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.votingPower.isZero()||t.uint32(16).int64(e.votingPower),t},decode:function(e,t){for(var n=e instanceof i.default.Reader?e:new i.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},d);n.pos>>3){case 1:o.pubKey=s.PublicKey.decode(n,n.uint32());break;case 2:o.votingPower=n.int64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){var t=Object.assign({},d);return void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=s.PublicKey.fromJSON(e.pubKey):t.pubKey=void 0,void 0!==e.votingPower&&null!==e.votingPower?t.votingPower=r.default.fromString(e.votingPower):t.votingPower=r.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?s.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=(e.votingPower||r.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},d);return void 0!==e.pubKey&&null!==e.pubKey?t.pubKey=s.PublicKey.fromPartial(e.pubKey):t.pubKey=void 0,void 0!==e.votingPower&&null!==e.votingPower?t.votingPower=e.votingPower:t.votingPower=r.default.ZERO,t}};var l=function(){if("undefined"!==typeof l)return l;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),f=l.atob||function(e){return l.Buffer.from(e,"base64").toString("binary")};var p=l.btoa||function(e){return l.Buffer.from(e,"binary").toString("base64")};i.default.util.Long!==r.default&&(i.default.util.Long=r.default,i.default.configure())},70897:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Consensus=t.App=t.protobufPackage=void 0;var o=a(n(29600)),r=a(n(80121));t.protobufPackage="tendermint.version";var i={protocol:o.default.UZERO,software:""};t.App={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return e.protocol.isZero()||t.uint32(8).uint64(e.protocol),""!==e.software&&t.uint32(18).string(e.software),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},i);n.pos>>3){case 1:o.protocol=n.uint64();break;case 2:o.software=n.string();break;default:n.skipType(7&s)}}return o},fromJSON:function(e){var t=Object.assign({},i);return void 0!==e.protocol&&null!==e.protocol?t.protocol=o.default.fromString(e.protocol):t.protocol=o.default.UZERO,void 0!==e.software&&null!==e.software?t.software=String(e.software):t.software="",t},toJSON:function(e){var t={};return void 0!==e.protocol&&(t.protocol=(e.protocol||o.default.UZERO).toString()),void 0!==e.software&&(t.software=e.software),t},fromPartial:function(e){var t=Object.assign({},i);return void 0!==e.protocol&&null!==e.protocol?t.protocol=e.protocol:t.protocol=o.default.UZERO,void 0!==e.software&&null!==e.software?t.software=e.software:t.software="",t}};var s={block:o.default.UZERO,app:o.default.UZERO};t.Consensus={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.Writer.create();return e.block.isZero()||t.uint32(8).uint64(e.block),e.app.isZero()||t.uint32(16).uint64(e.app),t},decode:function(e,t){for(var n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=void 0===t?n.len:n.pos+t,o=Object.assign({},s);n.pos>>3){case 1:o.block=n.uint64();break;case 2:o.app=n.uint64();break;default:n.skipType(7&i)}}return o},fromJSON:function(e){var t=Object.assign({},s);return void 0!==e.block&&null!==e.block?t.block=o.default.fromString(e.block):t.block=o.default.UZERO,void 0!==e.app&&null!==e.app?t.app=o.default.fromString(e.app):t.app=o.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.block&&(t.block=(e.block||o.default.UZERO).toString()),void 0!==e.app&&(t.app=(e.app||o.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},s);return void 0!==e.block&&null!==e.block?t.block=e.block:t.block=o.default.UZERO,void 0!==e.app&&null!==e.app?t.app=e.app:t.app=o.default.UZERO,t}},r.default.util.Long!==o.default&&(r.default.util.Long=o.default,r.default.configure())},31656:function(e,t,n){"use strict";function a(e,t,n){return function(a,o){void 0===o&&(o=n);var r=e(a)+o;return t(r)}}function o(e){return function(t){return new Date(e(t).getTime()-1)}}function r(e,t){return function(n){return[e(n),t(n)]}}function i(e){if(e instanceof Date)return e.getFullYear();if("number"===typeof e)return e;var t=parseInt(e,10);if("string"===typeof e&&!isNaN(t))return t;throw new Error("Failed to get year from date: ".concat(e,"."))}function s(e){if(e instanceof Date)return e.getMonth();throw new Error("Failed to get month from date: ".concat(e,"."))}function c(e){if(e instanceof Date)return e.getMonth()+1;throw new Error("Failed to get human-readable month from date: ".concat(e,"."))}function u(e){if(e instanceof Date)return e.getDate();throw new Error("Failed to get year from date: ".concat(e,"."))}function d(e){if(e instanceof Date)return e.getHours();if("string"===typeof e){var t=e.split(":");if(t.length>=2){var n=t[0];if(n){var a=parseInt(n,10);if(!isNaN(a))return a}}}throw new Error("Failed to get hours from date: ".concat(e,"."))}function l(e){if(e instanceof Date)return e.getMinutes();if("string"===typeof e){var t=e.split(":");if(t.length>=2){var n=t[1]||"0",a=parseInt(n,10);if(!isNaN(a))return a}}throw new Error("Failed to get minutes from date: ".concat(e,"."))}function f(e){if(e instanceof Date)return e.getSeconds();if("string"===typeof e){var t=e.split(":");if(t.length>=2){var n=t[2]||"0",a=parseInt(n,10);if(!isNaN(a))return a}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function p(e){var t=i(e),n=t+(1-t)%100,a=new Date;return a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}n.r(t),n.d(t,{getCenturyEnd:function(){return h},getCenturyRange:function(){return v},getCenturyStart:function(){return p},getDate:function(){return u},getDayEnd:function(){return Z},getDayRange:function(){return Q},getDayStart:function(){return z},getDaysInMonth:function(){return J},getDecadeEnd:function(){return x},getDecadeRange:function(){return S},getDecadeStart:function(){return w},getHours:function(){return d},getHoursMinutes:function(){return X},getHoursMinutesSeconds:function(){return $},getISOLocalDate:function(){return te},getISOLocalDateTime:function(){return ne},getISOLocalMonth:function(){return ee},getMinutes:function(){return l},getMonth:function(){return s},getMonthEnd:function(){return F},getMonthHuman:function(){return c},getMonthRange:function(){return H},getMonthStart:function(){return D},getNextCenturyEnd:function(){return y},getNextCenturyStart:function(){return m},getNextDayEnd:function(){return q},getNextDayStart:function(){return W},getNextDecadeEnd:function(){return T},getNextDecadeStart:function(){return A},getNextMonthEnd:function(){return j},getNextMonthStart:function(){return O},getNextYearEnd:function(){return U},getNextYearStart:function(){return R},getPreviousCenturyEnd:function(){return g},getPreviousCenturyStart:function(){return b},getPreviousDayEnd:function(){return V},getPreviousDayStart:function(){return K},getPreviousDecadeEnd:function(){return I},getPreviousDecadeStart:function(){return k},getPreviousMonthEnd:function(){return L},getPreviousMonthStart:function(){return N},getPreviousYearEnd:function(){return P},getPreviousYearStart:function(){return E},getSeconds:function(){return f},getYear:function(){return i},getYearEnd:function(){return M},getYearRange:function(){return _},getYearStart:function(){return C}});var b=a(i,p,-100),m=a(i,p,100),h=o(m),g=a(i,h,-100),y=a(i,h,100),v=r(p,h);function w(e){var t=i(e),n=t+(1-t)%10,a=new Date;return a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}var k=a(i,w,-10),A=a(i,w,10),x=o(A),I=a(i,x,-10),T=a(i,x,10),S=r(w,x);function C(e){var t=i(e),n=new Date;return n.setFullYear(t,0,1),n.setHours(0,0,0,0),n}var E=a(i,C,-1),R=a(i,C,1),M=o(R),P=a(i,M,-1),U=a(i,M,1),_=r(C,M);function B(e,t){return function(n,a){void 0===a&&(a=t);var o=i(n),r=s(n)+a,c=new Date;return c.setFullYear(o,r,1),c.setHours(0,0,0,0),e(c)}}function D(e){var t=i(e),n=s(e),a=new Date;return a.setFullYear(t,n,1),a.setHours(0,0,0,0),a}var N=B(D,-1),O=B(D,1),F=o(O),L=B(F,-1),j=B(F,1),H=r(D,F);function G(e,t){return function(n,a){void 0===a&&(a=t);var o=i(n),r=s(n),c=u(n)+a,d=new Date;return d.setFullYear(o,r,c),d.setHours(0,0,0,0),e(d)}}function z(e){var t=i(e),n=s(e),a=u(e),o=new Date;return o.setFullYear(t,n,a),o.setHours(0,0,0,0),o}var K=G(z,-1),W=G(z,1),Z=o(W),V=G(Z,-1),q=G(Z,1),Q=r(z,Z);function J(e){return u(F(e))}function Y(e,t){void 0===t&&(t=2);var n="".concat(e);return n.length>=t?e:"0000".concat(n).slice(-t)}function X(e){var t=Y(d(e)),n=Y(l(e));return"".concat(t,":").concat(n)}function $(e){var t=Y(d(e)),n=Y(l(e)),a=Y(f(e));return"".concat(t,":").concat(n,":").concat(a)}function ee(e){var t=Y(i(e),4),n=Y(c(e));return"".concat(t,"-").concat(n)}function te(e){var t=Y(i(e),4),n=Y(c(e)),a=Y(u(e));return"".concat(t,"-").concat(n,"-").concat(a)}function ne(e){return"".concat(te(e),"T").concat($(e))}},84720:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.LocalXpla=void 0;var o=n(52836),r=n(8178),i="satisfy adjust timber high purchase tuition stool faith fine install that you unaware feed domain license impose boss human eager hat rent enjoy dawn",s="notice oak worry limit wrap speak medal online prefer cluster roof addict wrist behave treat actual wasp year salad speed social layer crew genius",c="quality vacuum heart guard buzz spike sight swarm shove special gym robust assume sudden deposit grid alcohol choice devote leader tilt noodle tide penalty",u="symbol force gallery make bulk round subway violin worry mixture penalty kingdom boring survey tool fringe patrol sausage hard admit remember broken alien absorb",d="bounce success option birth apple portion aunt rural episode solution hockey pencil lend session cause hedgehog slender journey system canvas decorate razor catch empty",l="second render cat sing soup reward cluster island bench diet lumber grocery repeat balcony perfect diesel stumble piano distance caught occur example ozone loyal",f="spatial forest elevator battle also spoon fun skirt flight initial nasty transfer glory palm drama gossip remove fan joke shove label dune debate quick",p="noble width taxi input there patrol clown public spell aunt wish punch moment will misery eight excess arena pen turtle minimum grain vague inmate",b="cream sport mango believe inhale text fish rely elegant below earth april wall rug ritual blossom cherry detail length blind digital proof identify ride",m="index light average senior silent limit usual local involve delay update rack cause inmate wall render magnet common feature laundry exact casual resource hundred",h="prefer forget visit mistake mixture feel eyebrow autumn shop pair address airport diesel street pass vague innocent poem method awful require hurry unhappy shoulder",g=function(e){function t(t){var n=e.call(this,{URL:"http://localhost:1317",chainID:"localxpla",isClassic:t})||this;return n.wallets={validator:n.wallet(new r.MnemonicKey({mnemonic:i})),test1:n.wallet(new r.MnemonicKey({mnemonic:s})),test2:n.wallet(new r.MnemonicKey({mnemonic:c})),test3:n.wallet(new r.MnemonicKey({mnemonic:u})),test4:n.wallet(new r.MnemonicKey({mnemonic:d})),test5:n.wallet(new r.MnemonicKey({mnemonic:l})),test6:n.wallet(new r.MnemonicKey({mnemonic:f})),test7:n.wallet(new r.MnemonicKey({mnemonic:p})),test8:n.wallet(new r.MnemonicKey({mnemonic:b})),test9:n.wallet(new r.MnemonicKey({mnemonic:m})),test10:n.wallet(new r.MnemonicKey({mnemonic:h}))},n}return a(t,e),t}(o.LCDClient);t.LocalXpla=g},45128:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0||-1===this._reconnectCount)?(-1!==this._reconnectCount&&this._reconnectCount--,this.reconnectTimeoutId&&clearTimeout(this.reconnectTimeoutId),this.reconnectTimeoutId=setTimeout((function(){e.emit("reconnect"),e.start()}),this.reconnectInterval)):this.emit("destroyed")},t.prototype.subscribe=function(e,t,n){this.queryParams=function(e){for(var t=[],n=0,a=Object.keys(e);n":case"<":case"<=":case">=":r="number"!==typeof i[1]?"".concat(o).concat(i[0]).concat(i[1].toISOString()):"".concat(o).concat(i[0]).concat(i[1]);break;case"CONTAINS":r="".concat(o," CONTAINS '").concat(u(i[1]),"'");break;case"EXISTS":r="".concat(o," EXISTS")}else switch(typeof i){case"number":r="".concat(o,"=").concat(i);break;case"string":r="".concat(o,"='").concat(u(i),"'");break;default:r="".concat(o,"=").concat(i.toISOString())}t.push(r)}return t.join(" AND ")}(o({"tm.event":e},t)),this.callback=n},t.prototype.subscribeTx=function(e,t){this.subscribe("Tx",e,(function(e){return e.value.TxResult.txhash=(0,c.hashToHex)(e.value.TxResult.tx),t(e)}))},t}(i.EventEmitter);t.WebSocketClient=d},61705:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(52836),t),o(n(85241),t),o(n(61019),t),o(n(84720),t),o(n(45128),t)},75916:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&(s=u)),d=new c.TxBody(t.msgs,t.memo||""),l=new c.AuthInfo([],new c.Fee(0,new c.Coins)),(f=new c.Tx(d,l,[])).appendEmptySignatures(e),r&&"auto"!==r&&"0"!==r?[3,2]:[4,this.estimateGas(f,{gasAdjustment:a})];case 1:r=i.sent().toString(),i.label=2;case 2:return p=s?s.mul(r).toIntCeilCoins():this.lcd.config.isClassic?"0uusd":"0axpla",[2,new c.Fee(Number.parseInt(r),p,"","")]}}))}))},t.prototype.estimateGas=function(e,t){return r(this,void 0,void 0,(function(){var n,a,o,r;return i(this,(function(i){switch(i.label){case 0:if(n=(null===t||void 0===t?void 0:t.gasAdjustment)||this.lcd.config.gasAdjustment,a=e,e.signatures.length<=0){if(!(t&&t.signers&&t.signers.length>0))throw Error("cannot append signature");o=new c.AuthInfo([],new c.Fee(0,new c.Coins)),(a=new c.Tx(e.body,o,[])).appendEmptySignatures(t.signers)}return[4,this.c.post("/cosmos/tx/v1beta1/simulate",{tx_bytes:this.encode(a)}).then((function(e){return l.fromData(e)}))];case 1:return r=i.sent(),[2,new c.Dec(n).mul(r.gas_info.gas_used).toNumber()]}}))}))},t.prototype.computeTax=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){throw new Error("Tax was removed from network")}))}))},t.prototype.encode=function(e){return a.from(e.toBytes(this.lcd.config.isClassic)).toString("base64")},t.prototype.decode=function(e){return c.Tx.fromBuffer(a.from(e,"base64"),this.lcd.config.isClassic)},t.prototype.hash=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.encode(e)];case 1:return t=n.sent(),[2,(0,u.hashToHex)(t)]}}))}))},t.prototype._broadcast=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.c.post("/cosmos/tx/v1beta1/txs",{tx_bytes:this.encode(e),mode:t})];case 1:return[2,n.sent()]}}))}))},t.prototype.broadcast=function(e,t){return void 0===t&&(t=3e4),r(this,void 0,void 0,(function(){var n,a,o,r;return i(this,(function(i){switch(i.label){case 0:return n=500,[4,this._broadcast(e,"BROADCAST_MODE_SYNC")];case 1:if(void 0!=(a=i.sent().tx_response).code&&0!=a.code)return[2,{height:Number.parseInt(a.height),txhash:a.txhash,raw_log:a.raw_log,code:a.code,codespace:a.codespace,gas_used:0,gas_wanted:0,timestamp:"",logs:[]}];r=0,i.label=2;case 2:if(!(r<=t/n))return[3,9];i.label=3;case 3:return i.trys.push([3,5,,6]),[4,this.txInfo(a.txhash)];case 4:return o=i.sent(),[3,6];case 5:return i.sent(),[3,6];case 6:return o?[3,9]:[4,new Promise((function(e){return setTimeout(e,n)}))];case 7:i.sent(),i.label=8;case 8:return r++,[3,2];case 9:if(!o)throw new Error("Transaction was not included in a block before timeout of ".concat(t,"ms"));return[2,{txhash:o.txhash,raw_log:o.raw_log,gas_wanted:o.gas_wanted,gas_used:o.gas_used,height:+o.height,logs:(o.logs||[]).map((function(e){return d.TxLog.fromData(e)})),code:o.code,codespace:o.codespace,timestamp:o.timestamp}]}}))}))},t.prototype.broadcastBlock=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._broadcast(e,"BROADCAST_MODE_BLOCK").then((function(e){var t=e.tx_response;return{txhash:t.txhash,raw_log:t.raw_log,gas_wanted:Number.parseInt(t.gas_wanted),gas_used:Number.parseInt(t.gas_used),height:+t.height,logs:t.logs.map((function(e){return d.TxLog.fromData(e)})),code:t.code,codespace:t.codespace,data:t.data,info:t.info,timestamp:t.timestamp}}))]}))}))},t.prototype.broadcastSync=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._broadcast(e,"BROADCAST_MODE_SYNC").then((function(e){var t=e.tx_response,n={height:+t.height,txhash:t.txhash,raw_log:t.raw_log};return t.code&&(n.code=t.code),t.codespace&&(n.codespace=t.codespace),n}))]}))}))},t.prototype.broadcastAsync=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._broadcast(e,"BROADCAST_MODE_ASYNC").then((function(e){var t=e.tx_response;return{height:+t.height,txhash:t.txhash}}))]}))}))},t.prototype.search=function(e){var t;return r(this,void 0,void 0,(function(){var n,a=this;return i(this,(function(o){return n=new URLSearchParams,null===(t=e.events)||void 0===t||t.forEach((function(e){return n.append("events","tx.height"===e.key?"".concat(e.key,"=").concat(e.value):"".concat(e.key,"='").concat(e.value,"'"))})),delete e.events,Object.entries(e).forEach((function(e){n.append(e[0],e[1])})),[2,this.c.getRaw("cosmos/tx/v1beta1/txs",n).then((function(e){return{txs:e.tx_responses.map((function(e){return c.TxInfo.fromData(e,a.lcd.config.isClassic)})),pagination:e.pagination}}))]}))}))},t}(s.BaseAPI);t.TxAPI=f},60033:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]Math.pow(2,32)-1)throw new Error("CompactBitArray overflow");return new e(t%8,a.alloc(n))},e.prototype.count=function(){return 0==this.extra_bits_stored?8*this.elems.length:8*(this.elems.length-1)+this.extra_bits_stored},e.prototype.getIndex=function(e){return!(e<0||e>=this.count())&&(this.elems.readUInt8(e>>3)&1<<7-e%8)>0},e.prototype.setIndex=function(e,t){return!(e<0||e>=this.count())&&(t?this.elems[e>>3]|=1<<7-e%8:this.elems[e>>3]&=~(1<<7-e%8),!0)},e.prototype.numTrueBitsBefore=function(e){var t=function(e){return e.toString(2).split("0").join("").length},n=0,a=this.count();e>a&&(e=a);for(var o=0;;o++){if(8*o+7>=e)return n+=t(this.elems[o]>>7-e%8+1);n+=t(this.elems[o])}},e.fromData=function(t){return new e(t.extra_bits_stored,a.from(t.elems,"base64"))},e.prototype.toData=function(){return{elems:this.elems.toString("base64"),extra_bits_stored:this.extra_bits_stored}},e.fromProto=function(t){return new e(t.extraBitsStored,a.from(t.elems))},e.prototype.toProto=function(){return o.CompactBitArray.fromPartial({elems:this.elems,extraBitsStored:this.extra_bits_stored})},e}();t.CompactBitArray=r},11440:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},69711:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Deposit=void 0;var s=n(74600),c=n(67423),u=n(87327),d=i(n(29600)),l=function(e){function t(t,n,a){var o=e.call(this)||this;return o.proposal_id=t,o.depositor=n,o.amount=new s.Coins(a),o}return a(t,e),t.fromAmino=function(e){var n=e.proposal_id,a=e.depositor,o=e.amount;return new t(Number.parseInt(n),a,s.Coins.fromAmino(o))},t.prototype.toAmino=function(){var e=this,t=e.proposal_id,n=e.depositor,a=e.amount;return{proposal_id:t.toString(),depositor:n,amount:a.toAmino()}},t.fromData=function(e){var n=e.proposal_id,a=e.depositor,o=e.amount;return new t(Number.parseInt(n),a,s.Coins.fromData(o))},t.prototype.toData=function(){var e=this,t=e.proposal_id,n=e.depositor,a=e.amount;return{proposal_id:t.toString(),depositor:n,amount:a.toData()}},t.fromProto=function(e){return new t(e.proposalId.toNumber(),e.depositor,s.Coins.fromProto(e.amount))},t.prototype.toProto=function(){var e=this,t=e.proposal_id,n=e.depositor,a=e.amount;return u.Deposit.fromPartial({proposalId:d.fromNumber(t),depositor:n,amount:a.toProto()})},t}(c.JSONSerializable);t.Deposit=l},75459:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Fee=void 0;var s=n(67423),c=n(74600),u=n(49368),d=n(28824),l=i(n(29600)),f=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.gas_limit=t,r.payer=a,r.granter=o,r.amount=new c.Coins(n),r}return a(t,e),t.fromAmino=function(e){var n=e.gas,a=e.amount;return new t(Number.parseInt(n),c.Coins.fromAmino(a),"","")},t.prototype.toAmino=function(){return{gas:new u.Int(this.gas_limit).toString(),amount:this.amount.toAmino()}},t.fromData=function(e){return new t(Number.parseInt(e.gas_limit),c.Coins.fromData(e.amount),e.payer,e.granter)},t.prototype.toData=function(){var e=this,t=e.amount,n=e.gas_limit,a=e.payer,o=e.granter;return{amount:t.toData(),gas_limit:n.toFixed(),granter:null!==o&&void 0!==o?o:"",payer:null!==a&&void 0!==a?a:""}},t.fromProto=function(e){return new t(e.gasLimit.toNumber(),c.Coins.fromProto(e.amount),e.payer,e.granter)},t.prototype.toProto=function(){var e=this,t=e.amount,n=e.gas_limit,a=e.payer,o=e.granter;return d.Fee.fromPartial({amount:t.toProto(),gasLimit:l.fromNumber(n),granter:o,payer:a})},t.prototype.gasPrices=function(){return this.amount.toDecCoins().div(this.gas_limit)},t}(s.JSONSerializable);t.Fee=f},63916:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Msg=void 0;var a=n(7906),o=n(76095),r=n(445),i=n(95283),s=n(40494),c=n(28487),u=n(60474),d=n(64171),l=n(44888),f=n(28626),p=n(25679),b=n(51680),m=n(95570),h=n(21358),g=n(38522),y=n(3562);!function(e){e.fromAmino=function(e,t){switch(e.type){case"bank/MsgSend":case"cosmos-sdk/MsgSend":return a.MsgSend.fromAmino(e,t);case"bank/MsgMultiSend":case"cosmos-sdk/MsgMultiSend":return a.MsgMultiSend.fromAmino(e,t);case"distribution/MsgModifyWithdrawAddress":case"cosmos-sdk/MsgModifyWithdrawAddress":return o.MsgSetWithdrawAddress.fromAmino(e,t);case"distribution/MsgWithdrawDelegationReward":case"cosmos-sdk/MsgWithdrawDelegationReward":return o.MsgWithdrawDelegatorReward.fromAmino(e,t);case"distribution/MsgWithdrawValidatorCommission":case"cosmos-sdk/MsgWithdrawValCommission":return o.MsgWithdrawValidatorCommission.fromAmino(e,t);case"distribution/MsgFundCommunityPool":case"cosmos-sdk/MsgFundCommunityPool":return o.MsgFundCommunityPool.fromAmino(e,t);case"feegrant/MsgGrantAllowance":case"cosmos-sdk/MsgGrantAllowance":return r.MsgGrantAllowance.fromAmino(e,t);case"feegrant/MsgRevokeAllowance":case"cosmos-sdk/MsgRevokeAllowance":return r.MsgRevokeAllowance.fromAmino(e,t);case"gov/MsgDeposit":case"cosmos-sdk/MsgDeposit":return i.MsgDeposit.fromAmino(e,t);case"gov/MsgSubmitProposal":case"cosmos-sdk/MsgSubmitProposal":return i.MsgSubmitProposal.fromAmino(e,t);case"gov/MsgVote":case"cosmos-sdk/MsgVote":return i.MsgVote.fromAmino(e,t);case"gov/MsgVoteWeighted":case"cosmos-sdk/MsgVoteWeighted":return i.MsgVoteWeighted.fromAmino(e,t);case"market/MsgSwap":return s.MsgSwap.fromAmino(e,t);case"market/MsgSwapSend":return s.MsgSwapSend.fromAmino(e,t);case"msgauth/MsgGrantAuthorization":case"cosmos-sdk/MsgGrant":return c.MsgGrantAuthorization.fromAmino(e,t);case"msgauth/MsgRevokeAuthorization":case"cosmos-sdk/MsgRevoke":return c.MsgRevokeAuthorization.fromAmino(e,t);case"msgauth/MsgExecAuthorized":case"cosmos-sdk/MsgExec":return c.MsgExecAuthorized.fromAmino(e,t);case"oracle/MsgDelegateFeedConsent":return u.MsgDelegateFeedConsent.fromAmino(e,t);case"oracle/MsgAggregateExchangeRatePrevote":return u.MsgAggregateExchangeRatePrevote.fromAmino(e,t);case"oracle/MsgAggregateExchangeRateVote":return u.MsgAggregateExchangeRateVote.fromAmino(e,t);case"slashing/MsgUnjail":case"cosmos-sdk/MsgUnjail":return d.MsgUnjail.fromAmino(e,t);case"staking/MsgDelegate":case"cosmos-sdk/MsgDelegate":return l.MsgDelegate.fromAmino(e,t);case"staking/MsgUndelegate":case"cosmos-sdk/MsgUndelegate":return l.MsgUndelegate.fromAmino(e,t);case"staking/MsgBeginRedelegate":case"cosmos-sdk/MsgBeginRedelegate":return l.MsgBeginRedelegate.fromAmino(e,t);case"staking/MsgCreateValidator":case"cosmos-sdk/MsgCreateValidator":return l.MsgCreateValidator.fromAmino(e,t);case"staking/MsgEditValidator":case"cosmos-sdk/MsgEditValidator":return l.MsgEditValidator.fromAmino(e,t);case"cosmos-sdk/MsgCreatePeriodicVestingAccount":return f.MsgCreatePeriodicVestingAccount.fromAmino(e,t);case"cosmos-sdk/MsgCreateVestingAccount":return f.MsgCreateVestingAccount.fromAmino(e,t);case"cosmos-sdk/MsgDonateAllVestingTokens":return f.MsgDonateAllVestingTokens.fromAmino(e,t);case"wasm/MsgStoreCode":return p.MsgStoreCode.fromAmino(e,t);case"wasm/MsgMigrateCode":return p.MsgMigrateCode.fromAmino(e,t);case"wasm/MsgInstantiateContract":return p.MsgInstantiateContract.fromAmino(e,t);case"wasm/MsgExecuteContract":return p.MsgExecuteContract.fromAmino(e,t);case"wasm/MsgMigrateContract":return p.MsgMigrateContract.fromAmino(e,t);case"wasm/MsgUpdateContractAdmin":case"wasm/MsgUpdateAdmin":return p.MsgUpdateContractAdmin.fromAmino(e,t);case"wasm/MsgClearContractAdmin":case"wasm/MsgClearAdmin":return p.MsgClearContractAdmin.fromAmino(e,t);case"cosmos-sdk/MsgTransfer":return b.MsgTransfer.fromAmino(e,t);case"crisis/MsgVerifyInvariant":case"cosmos-sdk/MsgVerifyInvariant":return y.MsgVerifyInvariant.fromAmino(e,t)}},e.fromData=function(e,t){switch(e["@type"]){case"/cosmos.bank.v1beta1.MsgSend":return a.MsgSend.fromData(e,t);case"/cosmos.bank.v1beta1.MsgMultiSend":return a.MsgMultiSend.fromData(e,t);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return o.MsgSetWithdrawAddress.fromData(e,t);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return o.MsgWithdrawDelegatorReward.fromData(e,t);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return o.MsgWithdrawValidatorCommission.fromData(e,t);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return o.MsgFundCommunityPool.fromData(e,t);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return r.MsgGrantAllowance.fromData(e,t);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return r.MsgRevokeAllowance.fromData(e,t);case"/cosmos.gov.v1beta1.MsgDeposit":return i.MsgDeposit.fromData(e,t);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return i.MsgSubmitProposal.fromData(e,t);case"/cosmos.gov.v1beta1.MsgVote":return i.MsgVote.fromData(e,t);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return i.MsgVoteWeighted.fromData(e,t);case"/terra.market.v1beta1.MsgSwap":return s.MsgSwap.fromData(e,t);case"/terra.market.v1beta1.MsgSwapSend":return s.MsgSwapSend.fromData(e,t);case"/cosmos.authz.v1beta1.MsgGrant":return c.MsgGrantAuthorization.fromData(e,t);case"/cosmos.authz.v1beta1.MsgRevoke":return c.MsgRevokeAuthorization.fromData(e,t);case"/cosmos.authz.v1beta1.MsgExec":return c.MsgExecAuthorized.fromData(e,t);case"/terra.oracle.v1beta1.MsgDelegateFeedConsent":return u.MsgDelegateFeedConsent.fromData(e,t);case"/terra.oracle.v1beta1.MsgAggregateExchangeRatePrevote":return u.MsgAggregateExchangeRatePrevote.fromData(e,t);case"/terra.oracle.v1beta1.MsgAggregateExchangeRateVote":return u.MsgAggregateExchangeRateVote.fromData(e,t);case"/cosmos.slashing.v1beta1.MsgUnjail":return d.MsgUnjail.fromData(e,t);case"/cosmos.staking.v1beta1.MsgDelegate":return l.MsgDelegate.fromData(e,t);case"/cosmos.staking.v1beta1.MsgUndelegate":return l.MsgUndelegate.fromData(e,t);case"/cosmos.staking.v1beta1.MsgBeginRedelegate":return l.MsgBeginRedelegate.fromData(e,t);case"/cosmos.staking.v1beta1.MsgCreateValidator":return l.MsgCreateValidator.fromData(e,t);case"/cosmos.staking.v1beta1.MsgEditValidator":return l.MsgEditValidator.fromData(e,t);case"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount":return f.MsgCreatePeriodicVestingAccount.fromData(e,t);case"/cosmos.vesting.v1beta1.MsgCreateVestingAccount":return f.MsgCreateVestingAccount.fromData(e,t);case"/cosmos.vesting.v1beta1.MsgDonateAllVestingTokens":return f.MsgDonateAllVestingTokens.fromData(e,t);case"/terra.wasm.v1beta1.MsgStoreCode":case"/cosmwasm.wasm.v1.MsgStoreCode":return p.MsgStoreCode.fromData(e,t);case"/terra.wasm.v1beta1.MsgMigrateCode":return p.MsgMigrateCode.fromData(e,t);case"/terra.wasm.v1beta1.MsgInstantiateContract":case"/cosmwasm.wasm.v1.MsgInstantiateContract":return p.MsgInstantiateContract.fromData(e,t);case"/terra.wasm.v1beta1.MsgExecuteContract":case"/cosmwasm.wasm.v1.MsgExecuteContract":return p.MsgExecuteContract.fromData(e,t);case"/terra.wasm.v1beta1.MsgMigrateContract":case"/cosmwasm.wasm.v1.MsgMigrateContract":return p.MsgMigrateContract.fromData(e,t);case"/terra.wasm.v1beta1.MsgUpdateContractAdmin":case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return p.MsgUpdateContractAdmin.fromData(e,t);case"/terra.wasm.v1beta1.MsgClearContractAdmin":case"/cosmwasm.wasm.v1.MsgClearAdmin":return p.MsgClearContractAdmin.fromData(e,t);case"/ibc.applications.transfer.v1.MsgTransfer":return b.MsgTransfer.fromData(e,t);case"/ibc.core.client.v1.MsgCreateClient":return m.MsgCreateClient.fromData(e,t);case"/ibc.core.client.v1.MsgUpdateClient":return m.MsgUpdateClient.fromData(e,t);case"/ibc.core.client.v1.MsgUpgradeClient":return m.MsgUpgradeClient.fromData(e,t);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return m.MsgSubmitMisbehaviour.fromData(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return h.MsgConnectionOpenInit.fromData(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return h.MsgConnectionOpenTry.fromData(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return h.MsgConnectionOpenConfirm.fromData(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return h.MsgConnectionOpenAck.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelOpenInit":return g.MsgChannelOpenInit.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelOpenTry":return g.MsgChannelOpenTry.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return g.MsgChannelOpenConfirm.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelOpenAck":return g.MsgChannelOpenAck.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelCloseInit":return g.MsgChannelCloseInit.fromData(e,t);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return g.MsgChannelCloseConfirm.fromData(e,t);case"/ibc.core.channel.v1.MsgRecvPacket":return g.MsgRecvPacket.fromData(e,t);case"/ibc.core.channel.v1.MsgAcknowledgement":return g.MsgAcknowledgement.fromData(e,t);case"/ibc.core.channel.v1.MsgTimeout":return g.MsgTimeout.fromData(e,t);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return g.MsgTimeoutOnClose.fromData(e,t);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return y.MsgVerifyInvariant.fromData(e,t);default:throw Error("not supported msg ".concat(e["@type"]))}},e.fromProto=function(e,t){switch(e.typeUrl){case"/cosmos.bank.v1beta1.MsgSend":return a.MsgSend.unpackAny(e,t);case"/cosmos.bank.v1beta1.MsgMultiSend":return a.MsgMultiSend.unpackAny(e,t);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return o.MsgSetWithdrawAddress.unpackAny(e,t);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return o.MsgWithdrawDelegatorReward.unpackAny(e,t);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return o.MsgWithdrawValidatorCommission.unpackAny(e,t);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return o.MsgFundCommunityPool.unpackAny(e,t);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return r.MsgGrantAllowance.unpackAny(e,t);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return r.MsgRevokeAllowance.unpackAny(e,t);case"/cosmos.gov.v1beta1.MsgDeposit":return i.MsgDeposit.unpackAny(e,t);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return i.MsgSubmitProposal.unpackAny(e,t);case"/cosmos.gov.v1beta1.MsgVote":return i.MsgVote.unpackAny(e,t);case"/terra.market.v1beta1.MsgSwap":return s.MsgSwap.unpackAny(e,t);case"/terra.market.v1beta1.MsgSwapSend":return s.MsgSwapSend.unpackAny(e,t);case"/cosmos.authz.v1beta1.MsgGrant":return c.MsgGrantAuthorization.unpackAny(e,t);case"/cosmos.authz.v1beta1.MsgRevoke":return c.MsgRevokeAuthorization.unpackAny(e,t);case"/cosmos.authz.v1beta1.MsgExec":return c.MsgExecAuthorized.unpackAny(e,t);case"/terra.oracle.v1beta1.MsgDelegateFeedConsent":return u.MsgDelegateFeedConsent.unpackAny(e,t);case"/terra.oracle.v1beta1.MsgAggregateExchangeRatePrevote":return u.MsgAggregateExchangeRatePrevote.unpackAny(e,t);case"/terra.oracle.v1beta1.MsgAggregateExchangeRateVote":return u.MsgAggregateExchangeRateVote.unpackAny(e,t);case"/cosmos.slashing.v1beta1.MsgUnjail":return d.MsgUnjail.unpackAny(e,t);case"/cosmos.staking.v1beta1.MsgDelegate":return l.MsgDelegate.unpackAny(e,t);case"/cosmos.staking.v1beta1.MsgUndelegate":return l.MsgUndelegate.unpackAny(e,t);case"/cosmos.staking.v1beta1.MsgBeginRedelegate":return l.MsgBeginRedelegate.unpackAny(e,t);case"/cosmos.staking.v1beta1.MsgCreateValidator":return l.MsgCreateValidator.unpackAny(e,t);case"/cosmos.staking.v1beta1.MsgEditValidator":return l.MsgEditValidator.unpackAny(e,t);case"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount":return f.MsgCreatePeriodicVestingAccount.unpackAny(e,t);case"/cosmos.vesting.v1beta1.MsgCreateVestingAccount":return f.MsgCreateVestingAccount.unpackAny(e,t);case"/cosmos.vesting.v1beta1.MsgDonateAllVestingTokens":return f.MsgDonateAllVestingTokens.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgStoreCode":case"/cosmwasm.wasm.v1.MsgStoreCode":return p.MsgStoreCode.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgMigrateCode":return p.MsgMigrateCode.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgInstantiateContract":case"/cosmwasm.wasm.v1.MsgInstantiateContract":return p.MsgInstantiateContract.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgExecuteContract":case"/cosmwasm.wasm.v1.MsgExecuteContract":return p.MsgExecuteContract.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgMigrateContract":case"/cosmwasm.wasm.v1beta1.MsgMigrateContract":return p.MsgMigrateContract.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgUpdateContractAdmin":case"/cosmwasm.wasm.v1beta1.MsgUpdateAdmin":return p.MsgUpdateContractAdmin.unpackAny(e,t);case"/terra.wasm.v1beta1.MsgClearContractAdmin":case"/cosmwasm.wasm.v1.MsgClearAdmin":return p.MsgClearContractAdmin.unpackAny(e,t);case"/ibc.applications.transfer.v1.MsgTransfer":return b.MsgTransfer.unpackAny(e,t);case"/ibc.core.client.v1.MsgCreateClient":return m.MsgCreateClient.unpackAny(e,t);case"/ibc.core.client.v1.MsgUpdateClient":return m.MsgUpdateClient.unpackAny(e,t);case"/ibc.core.client.v1.MsgUpgradeClient":return m.MsgUpgradeClient.unpackAny(e,t);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return m.MsgSubmitMisbehaviour.unpackAny(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return h.MsgConnectionOpenInit.unpackAny(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return h.MsgConnectionOpenTry.unpackAny(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return h.MsgConnectionOpenConfirm.unpackAny(e,t);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return h.MsgConnectionOpenAck.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelOpenInit":return g.MsgChannelOpenInit.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelOpenTry":return g.MsgChannelOpenTry.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return g.MsgChannelOpenConfirm.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelOpenAck":return g.MsgChannelOpenAck.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelCloseInit":return g.MsgChannelCloseInit.unpackAny(e,t);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return g.MsgChannelCloseConfirm.unpackAny(e,t);case"/ibc.core.channel.v1.MsgRecvPacket":return g.MsgRecvPacket.unpackAny(e,t);case"/ibc.core.channel.v1.MsgAcknowledgement":return g.MsgAcknowledgement.unpackAny(e,t);case"/ibc.core.channel.v1.MsgTimeout":return g.MsgTimeout.unpackAny(e,t);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return g.MsgTimeoutOnClose.unpackAny(e,t);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return y.MsgVerifyInvariant.unpackAny(e,t);default:throw Error("not supported msg ".concat(e.typeUrl))}}}(t.Msg||(t.Msg={}))},22023:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiSignature=void 0;var a=n(39076),o=n(97378),r=n(71030),i=function(){function e(e){this.multisig_pubkey=e;var t=e.pubkeys.length;this.bitarray=o.CompactBitArray.fromBits(t),this.signatures=[]}return e.prototype.appendSignature=function(e,t){var n=this.bitarray.numTrueBitsBefore(t);this.bitarray.getIndex(t)?this.signatures[n]=e:(this.bitarray.setIndex(t,!0),n!=this.signatures.length?this.signatures.splice(n,0,e):this.signatures.push(e))},e.prototype.appendSignatureFromPubKey=function(e,t){var n=this.multisig_pubkey.pubkeys.findIndex((function(e){return e.key===t.key}));if(-1==n)throw new Error("provided key doesn't exist in public_keys");this.appendSignature(e,n)},e.prototype.appendSignatureV2s=function(e){for(var t=0,n=e;t127)throw new Error("Encoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.PutUvarint implementation from the Go standard library and write some tests.");return[t]};!function(e){e.fromAmino=function(e){switch(e.type){case"tendermint/PubKeySecp256k1":return v.fromAmino(e);case"tendermint/PubKeyMultisigThreshold":return w.fromAmino(e);case"tendermint/PubKeyEd25519":return k.fromAmino(e)}},e.fromData=function(e){switch(e["@type"]){case"/ethermint.crypto.v1.ethsecp256k1.PubKey":return v.fromData(e);case"/cosmos.crypto.multisig.LegacyAminoPubKey":return w.fromData(e);case"/cosmos.crypto.ed25519.PubKey":return k.fromData(e)}},e.fromProto=function(e){var t=e.typeUrl;if("/ethermint.crypto.v1.ethsecp256k1.PubKey"===t)return v.unpackAny(e);if("/cosmos.crypto.multisig.LegacyAminoPubKey"===t)return w.unpackAny(e);if("/cosmos.crypto.ed25519.PubKey"===t)return k.unpackAny(e);throw new Error("Pubkey type ".concat(t," not recognized"))}}(t.PublicKey||(t.PublicKey={}));var v=function(e){function t(t){var n=e.call(this)||this;return n.key=t,n}return o(t,e),t.fromAmino=function(e){return new t(e.value)},t.prototype.toAmino=function(){return{type:"tendermint/PubKeySecp256k1",value:this.key}},t.fromData=function(e){return new t(e.key)},t.prototype.toData=function(){return{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey",key:this.key}},t.fromProto=function(e){return new t(a.from(e.key).toString("base64"))},t.prototype.toProto=function(){return u.PubKey.fromPartial({key:a.from(this.key,"base64")})},t.prototype.packAny=function(){return c.Any.fromPartial({typeUrl:"/ethermint.crypto.v1.ethsecp256k1.PubKey",value:u.PubKey.encode(this.toProto()).finish()})},t.unpackAny=function(e){return t.fromProto(u.PubKey.decode(e.value))},t.prototype.encodeAminoPubkey=function(){return a.from(this.key,"base64")},t.prototype.rawAddress=function(){var e=a.from(this.key,"base64"),t="0x"+new f.ec("secp256k1").keyFromPublic(e).getPublic(!1,"hex"),n=(0,p.keccak256)((0,b.hexDataSlice)(t,1)),o=(0,b.hexDataSlice)(n,12);return a.from((0,m.stripHexPrefix)(o),"hex")},t.prototype.address=function(){return l.bech32.encode("xpla",l.bech32.toWords(this.rawAddress()))},t.prototype.pubkeyAddress=function(){return l.bech32.encode("xplapub",l.bech32.toWords(this.encodeAminoPubkey()))},t}(r.JSONSerializable);t.SimplePublicKey=v;var w=function(e){function t(t,n){var a=e.call(this)||this;return a.threshold=t,a.pubkeys=n,a}return o(t,e),t.prototype.encodeAminoPubkey=function(){var e=Array.from(g);e.push(8),e.push.apply(e,y(this.threshold));for(var t=0,n=this.pubkeys.map((function(e){return e.encodeAminoPubkey()}));t0?e.toFixed():void 0,revision_height:t>0?t.toFixed():void 0}},t.fromData=function(e){var n=e.revision_number,a=e.revision_height;return new t(Number.parseInt(n),Number.parseInt(a))},t.prototype.toData=function(){var e=this.revision_number,t=this.revision_height;return{revision_number:e.toFixed(),revision_height:t.toFixed()}},t.fromProto=function(e){return new t(e.revisionNumber.toNumber(),e.revisionHeight.toNumber())},t.prototype.toProto=function(){var e=this.revision_number,t=this.revision_height;return s.Height.fromPartial({revisionNumber:c.fromNumber(e),revisionHeight:c.fromNumber(t)})},t}(n(67423).JSONSerializable);t.Height=u},2154:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.IdentifiedClientState=void 0;var o=n(39553),r=function(e){function t(t,n){var a=e.call(this)||this;return a.client_id=t,a.client_state=n,a}return a(t,e),t.fromAmino=function(e){return new t(e.client_id,e.client_state)},t.prototype.toAmino=function(){return{client_id:this.client_id,client_state:this.client_state}},t.fromData=function(e){return new t(e.client_id,e.client_state)},t.prototype.toData=function(){return{client_id:this.client_id,client_state:this.client_state}},t.fromProto=function(e){return new t(e.clientId,e.clientState)},t.prototype.toProto=function(){var e=this.client_id,t=this.client_state;return o.IdentifiedClientState.fromPartial({clientId:e,clientState:t})},t}(n(67423).JSONSerializable);t.IdentifiedClientState=r},57716:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MerklePrefix=void 0;var r=n(76557),i=function(e){function t(t){var n=e.call(this)||this;return n.key_prefix=t,n}return o(t,e),t.fromAmino=function(e){return new t(e.key_prefix)},t.prototype.toAmino=function(){return{key_prefix:this.key_prefix}},t.fromData=function(e){return new t(e.key_prefix)},t.prototype.toData=function(){return{key_prefix:this.key_prefix}},t.fromProto=function(e){return new t(a.from(e.keyPrefix).toString("base64"))},t.prototype.toProto=function(){var e=this.key_prefix;return r.MerklePrefix.fromPartial({keyPrefix:a.from(e,"base64")})},t}(n(67423).JSONSerializable);t.MerklePrefix=i},14907:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Counterparty=void 0;var o=n(97672),r=n(67423),i=n(57716),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.client_id=t,o.connection_id=n,o.prefix=a,o}return a(t,e),t.fromAmino=function(e){var n=e.client_id,a=e.connection_id,o=e.prefix;return new t(n,a,o?i.MerklePrefix.fromAmino(o):void 0)},t.prototype.toAmino=function(){var e=this;return{client_id:e.client_id,connection_id:e.connection_id,prefix:e.prefix}},t.fromData=function(e){var n=e.client_id,a=e.connection_id,o=e.prefix;return new t(n,a,o?i.MerklePrefix.fromData(o):void 0)},t.prototype.toData=function(){var e=this,t=e.client_id,n=e.connection_id,a=e.prefix;return{client_id:t,connection_id:n,prefix:a?a.toData():void 0}},t.fromProto=function(e){return new t(e.clientId,e.connectionId,e.prefix?i.MerklePrefix.fromProto(e.prefix):void 0)},t.prototype.toProto=function(){var e=this,t=e.client_id,n=e.connection_id,a=e.prefix;return o.Counterparty.fromPartial({clientId:t,connectionId:n,prefix:a?a.toProto():void 0})},t}(r.JSONSerializable);t.Counterparty=s},47635:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IdentifiedConnection=t.stateToJSON=t.stateFromJSON=t.State=void 0;var r=n(97672),i=n(67423),s=n(69424),c=n(97672);Object.defineProperty(t,"State",{enumerable:!0,get:function(){return c.State}}),Object.defineProperty(t,"stateFromJSON",{enumerable:!0,get:function(){return c.stateFromJSON}}),Object.defineProperty(t,"stateToJSON",{enumerable:!0,get:function(){return c.stateToJSON}});var u=n(14907),d=o(n(29600)),l=function(e){function t(t,n,a,o,r,i){var s=e.call(this)||this;return s.id=t,s.client_id=n,s.versions=a,s.state=o,s.counterparty=r,s.delay_period=i,s}return a(t,e),t.fromAmino=function(e){var n=e.id,a=e.client_id,o=e.versions,r=e.state,i=e.counterparty,d=e.delay_period;return new t(n,a,o.map(s.Version.fromAmino),(0,c.stateFromJSON)(r),i?u.Counterparty.fromAmino(i):void 0,Number.parseInt(d))},t.prototype.toAmino=function(){var e=this,t=e.id,n=e.client_id,a=e.versions,o=e.state,r=e.counterparty,i=e.delay_period;return{id:t,client_id:n,versions:a.map((function(e){return e.toAmino()})),state:(0,c.stateToJSON)(o),counterparty:null===r||void 0===r?void 0:r.toAmino(),delay_period:i.toFixed()}},t.fromData=function(e){var n=e.id,a=e.client_id,o=e.versions,r=e.state,i=e.counterparty,d=e.delay_period;return new t(n,a,o.map(s.Version.fromData),(0,c.stateFromJSON)(r),i?u.Counterparty.fromData(i):void 0,Number.parseInt(d))},t.prototype.toData=function(){var e=this,t=e.id,n=e.client_id,a=e.versions,o=e.state,r=e.counterparty,i=e.delay_period;return{id:t,client_id:n,versions:a.map((function(e){return e.toData()})),state:(0,c.stateToJSON)(o),counterparty:null===r||void 0===r?void 0:r.toData(),delay_period:i.toFixed()}},t.fromProto=function(e){return new t(e.id,e.clientId,e.versions.map(s.Version.fromProto),e.state,e.counterparty?u.Counterparty.fromProto(e.counterparty):void 0,e.delayPeriod.toNumber())},t.prototype.toProto=function(){var e=this,t=e.id,n=e.client_id,a=e.versions,o=e.state,i=e.counterparty,s=e.delay_period;return r.IdentifiedConnection.fromPartial({id:t,clientId:n,versions:a.map((function(e){return e.toProto()})),state:o,counterparty:null===i||void 0===i?void 0:i.toProto(),delayPeriod:d.default.fromNumber(s)})},t}(i.JSONSerializable);t.IdentifiedConnection=l},69424:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Version=void 0;var o=n(97672),r=function(e){function t(t,n){var a=e.call(this)||this;return a.identifier=t,a.features=n,a}return a(t,e),t.fromAmino=function(e){return new t(e.identifier,e.features)},t.prototype.toAmino=function(){return{identifier:this.identifier,features:this.features}},t.fromData=function(e){return new t(e.identifier,e.features)},t.prototype.toData=function(){return{identifier:this.identifier,features:this.features}},t.fromProto=function(e){return new t(e.identifier,e.features)},t.prototype.toProto=function(){var e=this.identifier,t=this.features;return o.Version.fromPartial({identifier:e,features:t})},t}(n(67423).JSONSerializable);t.Version=r},60092:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(14907),t),o(n(69424),t),o(n(47635),t)},75161:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Header=void 0;var o=n(67423),r=n(53855),i=n(59424),s=n(37863),c=n(85920),u=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.signedHeader=t,r.validatorSet=n,r.trustedHeight=a,r.trustedValidators=o,r}return a(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.signed_header,a=e.validator_set,o=e.trusted_height,r=e.trusted_validators;return new t(n?s.SignedHeader.fromData(n):void 0,a?s.ValidatorSet.fromData(a):void 0,o?i.Height.fromData(o):void 0,r?s.ValidatorSet.fromData(r):void 0)},t.prototype.toData=function(){var e=this,t=e.signedHeader,n=e.validatorSet,a=e.trustedHeight,o=e.trustedValidators;return{signed_header:(null===t||void 0===t?void 0:t.toData())||void 0,validator_set:(null===n||void 0===n?void 0:n.toData())||void 0,trusted_height:(null===a||void 0===a?void 0:a.toData())||void 0,trusted_validators:(null===o||void 0===o?void 0:o.toData())||void 0}},t.fromProto=function(e){var n=e.signedHeader,a=e.validatorSet,o=e.trustedHeight,r=e.trustedValidators;return new t(n?s.SignedHeader.fromProto(n):void 0,a?s.ValidatorSet.fromProto(a):void 0,o?i.Height.fromProto(o):void 0,r?s.ValidatorSet.fromProto(r):void 0)},t.prototype.toProto=function(){var e=this,t=e.signedHeader,n=e.validatorSet,a=e.trustedHeight,o=e.trustedValidators;return r.Header.fromPartial({signedHeader:(null===t||void 0===t?void 0:t.toProto())||void 0,validatorSet:(null===n||void 0===n?void 0:n.toProto())||void 0,trustedHeight:(null===a||void 0===a?void 0:a.toProto())||void 0,trustedValidators:(null===o||void 0===o?void 0:o.toProto())||void 0})},t.prototype.packAny=function(){return c.Any.fromPartial({typeUrl:"ibc.lightclients.tendermint.v1.Header",value:r.Header.encode(this.toProto()).finish()})},t.unpackAny=function(e){return t.fromProto(r.Header.decode(e.value))},t}(o.JSONSerializable);t.Header=u},56:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelCloseConfirm=void 0;var r=n(67423),i=n(85920),s=n(59424),c=n(99148),u=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.port_id=t,i.channel_id=n,i.proof_init=a,i.proof_height=o,i.signer=r,i}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.port_id,o=e.channel_id,r=e.proof_init,i=e.proof_height,c=e.signer;return new t(a,o,r,i?s.Height.fromData(i):void 0,c)},t.prototype.toData=function(e){var t=this,n=t.port_id,a=t.channel_id,o=t.proof_init,r=t.proof_height,i=t.signer;return{"@type":"/ibc.core.channel.v1.MsgChannelCloseConfirm",port_id:n,channel_id:a,proof_init:o,proof_height:r?r.toData():void 0,signer:i}},t.fromProto=function(e,n){return new t(e.portId,e.channelId,a.from(e.proofInit).toString("base64"),e.proofHeight?s.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,o=t.channel_id,r=t.proof_init,i=t.proof_height,s=t.signer;return c.MsgChannelCloseConfirm.fromPartial({portId:n,channelId:o,proofInit:a.from(r,"base64"),proofHeight:i?i.toProto():void 0,signer:s})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirm",value:c.MsgChannelCloseConfirm.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.MsgChannelCloseConfirm.decode(e.value))},t}(r.JSONSerializable);t.MsgChannelCloseConfirm=u},16723:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelCloseInit=void 0;var o=n(67423),r=n(85920),i=n(99148),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.port_id=t,o.channel_id=n,o.signer=a,o}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){return new t(e.port_id,e.channel_id,e.signer)},t.prototype.toData=function(e){var t=this;return{"@type":"/ibc.core.channel.v1.MsgChannelCloseInit",port_id:t.port_id,channel_id:t.channel_id,signer:t.signer}},t.fromProto=function(e,n){return new t(e.portId,e.channelId,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,a=t.channel_id,o=t.signer;return i.MsgChannelCloseInit.fromPartial({portId:n,channelId:a,signer:o})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInit",value:i.MsgChannelCloseInit.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.MsgChannelCloseInit.decode(e.value))},t}(o.JSONSerializable);t.MsgChannelCloseInit=s},16319:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelOpenAck=void 0;var r=n(67423),i=n(85920),s=n(59424),c=n(99148),u=function(e){function t(t,n,a,o,r,i,s){var c=e.call(this)||this;return c.port_id=t,c.channel_id=n,c.counterparty_channel_id=a,c.counterparty_version=o,c.proof_try=r,c.proof_height=i,c.signer=s,c}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.port_id,o=e.channel_id,r=e.counterparty_channel_id,i=e.counterparty_version,c=e.proof_try,u=e.proof_height,d=e.signer;return new t(a,o,r,i,c,u?s.Height.fromData(u):void 0,d)},t.prototype.toData=function(e){var t=this,n=t.port_id,a=t.channel_id,o=t.counterparty_channel_id,r=t.counterparty_version,i=t.proof_try,s=t.proof_height,c=t.signer;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenAck",port_id:n,channel_id:a,counterparty_channel_id:o,counterparty_version:r,proof_try:i,proof_height:s?s.toData():void 0,signer:c}},t.fromProto=function(e,n){return new t(e.portId,e.channelId,e.counterpartyChannelId,e.counterpartyVersion,a.from(e.proofTry).toString("base64"),e.proofHeight?s.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,o=t.channel_id,r=t.counterparty_channel_id,i=t.counterparty_version,s=t.proof_try,u=t.proof_height,d=t.signer;return c.MsgChannelOpenAck.fromPartial({portId:n,channelId:o,counterpartyChannelId:r,counterpartyVersion:i,proofTry:a.from(s,"base64"),proofHeight:u?u.toProto():void 0,signer:d})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAck",value:c.MsgChannelOpenAck.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.MsgChannelOpenAck.decode(e.value))},t}(r.JSONSerializable);t.MsgChannelOpenAck=u},56129:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelOpenConfirm=void 0;var r=n(67423),i=n(85920),s=n(59424),c=n(99148),u=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.port_id=t,i.channel_id=n,i.proof_ack=a,i.proof_height=o,i.signer=r,i}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.port_id,o=e.channel_id,r=e.proof_ack,i=e.proof_height,c=e.signer;return new t(a,o,r,i?s.Height.fromData(i):void 0,c)},t.prototype.toData=function(e){var t=this,n=t.port_id,a=t.channel_id,o=t.proof_ack,r=t.proof_height,i=t.signer;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenConfirm",port_id:n,channel_id:a,proof_ack:o,proof_height:r?r.toData():void 0,signer:i}},t.fromProto=function(e,n){return new t(e.portId,e.channelId,a.from(e.proofAck).toString("base64"),e.proofHeight?s.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,o=t.channel_id,r=t.proof_ack,i=t.proof_height,s=t.signer;return c.MsgChannelOpenConfirm.fromPartial({portId:n,channelId:o,proofAck:a.from(r,"base64"),proofHeight:i?i.toProto():void 0,signer:s})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirm",value:c.MsgChannelOpenConfirm.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.MsgChannelOpenConfirm.decode(e.value))},t}(r.JSONSerializable);t.MsgChannelOpenConfirm=u},96514:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelOpenInit=void 0;var o=n(67423),r=n(85920),i=n(4215),s=n(99148),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.port_id=t,o.channel=n,o.signer=a,o}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.port_id,o=e.channel,r=e.signer;return new t(a,o?i.Channel.fromData(o):void 0,r)},t.prototype.toData=function(e){var t=this,n=t.port_id,a=t.channel,o=t.signer;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenInit",port_id:n,channel:a?a.toData():void 0,signer:o}},t.fromProto=function(e,n){return new t(e.portId,e.channel?i.Channel.fromProto(e.channel):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,a=t.channel,o=t.signer;return s.MsgChannelOpenInit.fromPartial({portId:n,channel:a?a.toProto():void 0,signer:o})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInit",value:s.MsgChannelOpenInit.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgChannelOpenInit.decode(e.value))},t}(o.JSONSerializable);t.MsgChannelOpenInit=c},85325:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgChannelOpenTry=void 0;var r=n(67423),i=n(85920),s=n(4215),c=n(59424),u=n(99148),d=function(e){function t(t,n,a,o,r,i,s){var c=e.call(this)||this;return c.port_id=t,c.previous_channel_id=n,c.channel=a,c.counterparty_version=o,c.proof_init=r,c.proof_height=i,c.signer=s,c}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.port_id,o=e.previous_channel_id,r=e.channel,i=e.counterparty_version,u=e.proof_init,d=e.proof_height,l=e.signer;return new t(a,o,r?s.Channel.fromData(r):void 0,i,u,d?c.Height.fromData(d):void 0,l)},t.prototype.toData=function(e){var t=this,n=t.port_id,a=t.previous_channel_id,o=t.channel,r=t.counterparty_version,i=t.proof_init,s=t.proof_height,c=t.signer;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenTry",port_id:n,previous_channel_id:a,channel:o?o.toData():void 0,counterparty_version:r,proof_init:i,proof_height:s?s.toData():void 0,signer:c}},t.fromProto=function(e,n){return new t(e.portId,e.previousChannelId,e.channel?s.Channel.fromProto(e.channel):void 0,e.counterpartyVersion,a.from(e.proofInit).toString("base64"),e.proofHeight?c.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.port_id,o=t.previous_channel_id,r=t.channel,i=t.counterparty_version,s=t.proof_init,c=t.proof_height,d=t.signer;return u.MsgChannelOpenTry.fromPartial({portId:n,previousChannelId:o,channel:r?r.toProto():void 0,counterpartyVersion:i,proofInit:a.from(s,"base64"),proofHeight:c?c.toProto():void 0,signer:d})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTry",value:u.MsgChannelOpenTry.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(u.MsgChannelOpenTry.decode(e.value))},t}(r.JSONSerializable);t.MsgChannelOpenTry=d},27126:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgAcknowledgement=void 0;var r=n(67423),i=n(85920),s=n(59424),c=n(7098),u=n(99148),d=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.packet=t,i.acknowledgement=n,i.proof_acked=a,i.proof_height=o,i.signer=r,i}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.packet,o=e.acknowledgement,r=e.proof_acked,i=e.proof_height,u=e.signer;return new t(a?c.Packet.fromData(a):void 0,r,o,i?s.Height.fromData(i):void 0,u)},t.prototype.toData=function(e){var t=this,n=t.packet,a=t.acknowledgement,o=t.proof_acked,r=t.proof_height,i=t.signer;return{"@type":"/ibc.core.channel.v1.MsgAcknowledgement",packet:n?n.toData():void 0,acknowledgement:a,proof_acked:o,proof_height:r?r.toData():void 0,signer:i}},t.fromProto=function(e,n){return new t(e.packet?c.Packet.fromProto(e.packet):void 0,a.from(e.acknowledgement).toString("base64"),a.from(e.proofAcked).toString("base64"),e.proofHeight?s.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.packet,o=t.acknowledgement,r=t.proof_acked,i=t.proof_height,s=t.signer;return u.MsgAcknowledgement.fromPartial({packet:n?n.toProto():void 0,acknowledgement:a.from(o,"base64"),proofAcked:a.from(r,"base64"),proofHeight:i?i.toProto():void 0,signer:s})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgAcknowledgement",value:u.MsgAcknowledgement.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(u.MsgAcknowledgement.decode(e.value))},t}(r.JSONSerializable);t.MsgAcknowledgement=d},7759:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgRecvPacket=void 0;var r=n(67423),i=n(85920),s=n(59424),c=n(7098),u=n(99148),d=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.packet=t,r.proof_commitment=n,r.proof_height=a,r.signer=o,r}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.packet,o=e.proof_commitment,r=e.proof_height,i=e.signer;return new t(a?c.Packet.fromData(a):void 0,o,r?s.Height.fromData(r):void 0,i)},t.prototype.toData=function(e){var t=this,n=t.packet,a=t.proof_commitment,o=t.proof_height,r=t.signer;return{"@type":"/ibc.core.channel.v1.MsgRecvPacket",packet:n?n.toData():void 0,proof_commitment:a,proof_height:o?o.toData():void 0,signer:r}},t.fromProto=function(e,n){return new t(e.packet?c.Packet.fromProto(e.packet):void 0,a.from(e.proofCommitment).toString("base64"),e.proofHeight?s.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.packet,o=t.proof_commitment,r=t.proof_height,i=t.signer;return u.MsgRecvPacket.fromPartial({packet:n?n.toProto():void 0,proofCommitment:a.from(o,"base64"),proofHeight:r?r.toProto():void 0,signer:i})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgRecvPacket",value:u.MsgRecvPacket.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(u.MsgRecvPacket.decode(e.value))},t}(r.JSONSerializable);t.MsgRecvPacket=d},24918:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgTimeout=void 0;var i=n(67423),s=n(85920),c=n(59424),u=n(7098),d=n(99148),l=r(n(29600)),f=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.packet=t,i.proof_unreceived=n,i.proof_height=a,i.next_sequence_recv=o,i.signer=r,i}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.packet,o=e.proof_unreceived,r=e.proof_height,i=e.next_sequence_recv,s=e.signer;return new t(a?u.Packet.fromData(a):void 0,o,r?c.Height.fromData(r):void 0,Number.parseInt(i),s)},t.prototype.toData=function(e){var t=this,n=t.packet,a=t.proof_unreceived,o=t.proof_height,r=t.next_sequence_recv,i=t.signer;return{"@type":"/ibc.core.channel.v1.MsgTimeout",packet:n?n.toData():void 0,proof_unreceived:a,proof_height:o?o.toData():void 0,next_sequence_recv:r.toFixed(),signer:i}},t.fromProto=function(e,n){return new t(e.packet?u.Packet.fromProto(e.packet):void 0,a.from(e.proofUnreceived).toString("base64"),e.proofHeight?c.Height.fromProto(e.proofHeight):void 0,e.nextSequenceRecv.toNumber(),e.signer)},t.prototype.toProto=function(e){var t=this,n=t.packet,o=t.proof_unreceived,r=t.proof_height,i=t.next_sequence_recv,s=t.signer;return d.MsgTimeout.fromPartial({packet:n?n.toProto():void 0,proofUnreceived:a.from(o,"base64"),proofHeight:r?r.toProto():void 0,nextSequenceRecv:l.default.fromNumber(i),signer:s})},t.prototype.packAny=function(e){return s.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeout",value:d.MsgTimeout.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(d.MsgTimeout.decode(e.value))},t}(i.JSONSerializable);t.MsgTimeout=f},11220:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgTimeoutOnClose=void 0;var i=n(67423),s=n(85920),c=n(59424),u=n(7098),d=n(99148),l=r(n(29600)),f=function(e){function t(t,n,a,o,r,i){var s=e.call(this)||this;return s.packet=t,s.proof_unreceived=n,s.proof_close=a,s.proof_height=o,s.next_sequence_recv=r,s.signer=i,s}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.packet,o=e.proof_unreceived,r=e.proof_close,i=e.proof_height,s=e.next_sequence_recv,d=e.signer;return new t(a?u.Packet.fromData(a):void 0,r,o,i?c.Height.fromData(i):void 0,Number.parseInt(s),d)},t.prototype.toData=function(e){var t=this,n=t.packet,a=t.proof_unreceived,o=t.proof_close,r=t.proof_height,i=t.next_sequence_recv,s=t.signer;return{"@type":"/ibc.core.channel.v1.MsgTimeoutOnClose",packet:n?n.toData():void 0,proof_unreceived:a,proof_close:o,proof_height:r?r.toData():void 0,next_sequence_recv:i.toFixed(),signer:s}},t.fromProto=function(e,n){return new t(e.packet?u.Packet.fromProto(e.packet):void 0,a.from(e.proofUnreceived).toString("base64"),a.from(e.proofClose).toString("base64"),e.proofHeight?c.Height.fromProto(e.proofHeight):void 0,e.nextSequenceRecv.toNumber(),e.signer)},t.prototype.toProto=function(e){var t=this,n=t.packet,o=t.proof_unreceived,r=t.proof_close,i=t.proof_height,s=t.next_sequence_recv,c=t.signer;return d.MsgTimeoutOnClose.fromPartial({packet:n?n.toProto():void 0,proofUnreceived:a.from(o,"base64"),proofClose:a.from(r,"base64"),proofHeight:i?i.toProto():void 0,nextSequenceRecv:l.default.fromNumber(s),signer:c})},t.prototype.packAny=function(e){return s.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnClose",value:d.MsgTimeoutOnClose.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(d.MsgTimeoutOnClose.decode(e.value))},t}(i.JSONSerializable);t.MsgTimeoutOnClose=f},38522:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(96514),t),o(n(85325),t),o(n(56129),t),o(n(16319),t),o(n(16723),t),o(n(56),t),o(n(7759),t),o(n(27126),t),o(n(24918),t),o(n(11220),t)},77619:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgCreateClient=void 0;var o=n(67423),r=n(85920),i=n(26864),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.client_state=t,o.consensus_state=n,o.signer=a,o}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){return new t(e.client_state,e.consensus_state,e.signer)},t.prototype.toData=function(e){var t=this;return{"@type":"/ibc.core.client.v1.MsgCreateClient",client_state:t.client_state,consensus_state:t.consensus_state,signer:t.signer}},t.fromProto=function(e,n){return new t(e.clientState,e.consensusState,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.client_state,a=t.consensus_state,o=t.signer;return i.MsgCreateClient.fromPartial({clientState:n,consensusState:a,signer:o})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgCreateClient",value:i.MsgCreateClient.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.MsgCreateClient.decode(e.value))},t}(o.JSONSerializable);t.MsgCreateClient=s},23294:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgSubmitMisbehaviour=void 0;var o=n(67423),r=n(85920),i=n(26864),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.client_id=t,o.misbehaviour=n,o.signer=a,o}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){return new t(e.client_id,e.misbehaviour,e.signer)},t.prototype.toData=function(e){var t=this;return{"@type":"/ibc.core.client.v1.MsgSubmitMisbehaviour",client_id:t.client_id,misbehaviour:t.misbehaviour,signer:t.signer}},t.fromProto=function(e,n){return new t(e.clientId,e.misbehaviour,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.client_id,a=t.misbehaviour,o=t.signer;return i.MsgSubmitMisbehaviour.fromPartial({clientId:n,misbehaviour:a,signer:o})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviour",value:i.MsgSubmitMisbehaviour.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.MsgSubmitMisbehaviour.decode(e.value))},t}(o.JSONSerializable);t.MsgSubmitMisbehaviour=s},38800:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgUpdateClient=void 0;var o=n(67423),r=n(85920),i=n(26864),s=n(75161),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.client_id=t,o.header=n,o.signer=a,o}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.client_id,o=e.header,r=e.signer;return new t(a,o?s.Header.fromData(o):void 0,r)},t.prototype.toData=function(e){var t=this,n=t.client_id,a=t.header,o=t.signer;return{"@type":"/ibc.core.client.v1.MsgUpdateClient",client_id:n,header:(null===a||void 0===a?void 0:a.toData())||void 0,signer:o}},t.fromProto=function(e,n){return new t(e.clientId,e.header?s.Header.unpackAny(e.header):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.client_id,a=t.header,o=t.signer;return i.MsgUpdateClient.fromPartial({clientId:n,header:(null===a||void 0===a?void 0:a.packAny())||void 0,signer:o})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateClient",value:i.MsgUpdateClient.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.MsgUpdateClient.decode(e.value))},t}(o.JSONSerializable);t.MsgUpdateClient=c},31081:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgUpgradeClient=void 0;var r=n(67423),i=n(85920),s=n(26864),c=function(e){function t(t,n,a,o,r,i){var s=e.call(this)||this;return s.client_id=t,s.client_state=n,s.consensus_state=a,s.proof_upgrade_client=o,s.proof_upgrade_consensus_state=r,s.signer=i,s}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){return new t(e.client_id,e.client_state,e.consensus_state,e.proof_upgrade_client,e.proof_upgrade_consensus_state,e.signer)},t.prototype.toData=function(e){var t=this;return{"@type":"/ibc.core.client.v1.MsgUpgradeClient",client_id:t.client_id,client_state:t.client_state,consensus_state:t.consensus_state,proof_upgrade_client:t.proof_upgrade_client,proof_upgrade_consensus_state:t.proof_upgrade_consensus_state,signer:t.signer}},t.fromProto=function(e,n){return new t(e.clientId,e.clientState,e.consensusState,a.from(e.proofUpgradeClient).toString("base64"),a.from(e.proofUpgradeConsensusState).toString("base64"),e.signer)},t.prototype.toProto=function(e){var t=this,n=t.client_id,o=t.client_state,r=t.consensus_state,i=t.proof_upgrade_client,c=t.proof_upgrade_consensus_state,u=t.signer;return s.MsgUpgradeClient.fromPartial({clientId:n,clientState:o,consensusState:r,proofUpgradeClient:a.from(i,"base64"),proofUpgradeConsensusState:a.from(c,"base64"),signer:u})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpgradeClient",value:s.MsgUpgradeClient.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgUpgradeClient.decode(e.value))},t}(r.JSONSerializable);t.MsgUpgradeClient=c},95570:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(77619),t),o(n(38800),t),o(n(31081),t),o(n(23294),t)},93347:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=t.Proof=void 0;var c=n(46760),u=n(52620),d=s(n(29600)),l=n(67423),f=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.total=t,r.index=n,r.leafHash=a,r.aunts=o,r}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.total,a=e.index,o=e.leaf_hash,r=e.aunts;return new t(Number.parseInt(n),Number.parseInt(a),o,r)},t.prototype.toData=function(){var e=this,t=e.total,n=e.index,a=e.leafHash,o=e.aunts;return{total:t.toFixed(),index:n.toFixed(),leaf_hash:a,aunts:o}},t.fromProto=function(e){return new t(e.total.toNumber(),e.index.toNumber(),a.from(e.leafHash).toString("base64"),e.aunts.map((function(e){return a.from(e).toString("base64")})))},t.prototype.toProto=function(){var e=this,t=e.total,n=e.index,o=e.leafHash,r=e.aunts;return c.Proof.fromPartial({total:d.fromNumber(t),index:d.fromNumber(n),leafHash:a.from(o,"base64"),aunts:r.map((function(e){return a.from(e,"base64")}))})},t}(l.JSONSerializable);t.Proof=f;var p=function(e){function t(t,n){var a=e.call(this)||this;return a.ed25519=t,a.secp256k1=n,a}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){return new t(e.ed25519,e.secp256k1)},t.prototype.toData=function(){return{ed25519:this.ed25519,secp256k1:this.secp256k1}},t.fromProto=function(e){var n=e.ed25519,o=e.secp256k1;return new t(n?a.from(n).toString("base64"):void 0,o?a.from(o).toString("base64"):void 0)},t.prototype.toProto=function(){var e=this.ed25519,t=this.secp256k1;return u.PublicKey.fromPartial({ed25519:e?a.from(e,"base64"):void 0,secp256k1:t?a.from(t,"base64"):void 0})},t}(l.JSONSerializable);t.PublicKey=p},37863:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=t.ValidatorSet=t.CommitSig=t.Commit=t.PartSetHeader=t.BlockID=t.SignedHeader=t.Header=void 0;var c=n(78750),u=n(50262),d=s(n(29600)),l=n(67423),f=n(25363),p=n(93347),b=function(e){function t(t,n,a,o,r,i,s,c,u,d,l,f,p,b){var m=e.call(this)||this;return m.version=t,m.chainId=n,m.height=a,m.time=o,m.lastBlockId=r,m.lastCommitHash=i,m.dataHash=s,m.validatorsHash=c,m.nextValidatorsHash=u,m.consensusHash=d,m.appHash=l,m.lastResultsHash=f,m.evidenceHash=p,m.proposerAddress=b,m}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.version,a=e.chain_id,o=e.height,r=e.time,i=e.last_block_id,s=e.last_commit_hash,c=e.data_hash,u=e.validators_hash,d=e.next_validators_hash,l=e.consensus_hash,p=e.app_hash,b=e.last_results_hash,m=e.evidence_hash,g=e.proposer_address;return new t(n?f.Consensus.fromData(n):void 0,a,o,r?new Date(r):void 0,i?h.fromData(i):void 0,s,c,u,d,l,p,b,m,g)},t.prototype.toData=function(){var e=this,t=e.version,n=e.chainId,a=e.height,o=e.time,r=e.lastBlockId,i=e.lastCommitHash,s=e.dataHash,c=e.validatorsHash,u=e.nextValidatorsHash,d=e.consensusHash,l=e.appHash,f=e.lastResultsHash,p=e.evidenceHash,b=e.proposerAddress;return{version:null===t||void 0===t?void 0:t.toData(),chain_id:n,height:a,time:o?o.toISOString().replace(/\.000Z$/,"Z"):void 0,last_block_id:r?r.toData():void 0,last_commit_hash:i,data_hash:s,validators_hash:c,next_validators_hash:u,consensus_hash:d,app_hash:l,last_results_hash:f,evidence_hash:p,proposer_address:b}},t.fromProto=function(e){var n=e.version,o=e.chainId,r=e.height,i=e.time,s=e.lastBlockId,c=e.lastCommitHash,u=e.dataHash,d=e.validatorsHash,l=e.nextValidatorsHash,p=e.consensusHash,b=e.appHash,m=e.lastResultsHash,g=e.evidenceHash,y=e.proposerAddress;return new t(n?f.Consensus.fromProto(n):void 0,o,r.toString(),i,s?h.fromProto(s):void 0,a.from(c).toString("base64"),a.from(u).toString("base64"),a.from(d).toString("base64"),a.from(l).toString("base64"),a.from(p).toString("base64"),a.from(b).toString("base64"),a.from(m).toString("base64"),a.from(g).toString("base64"),y.toString())},t.prototype.toProto=function(){var e=this,t=e.version,n=e.chainId,o=e.height,r=e.time,i=e.lastBlockId,s=e.lastCommitHash,u=e.dataHash,l=e.validatorsHash,f=e.nextValidatorsHash,p=e.consensusHash,b=e.appHash,m=e.lastResultsHash,h=e.evidenceHash,g=e.proposerAddress;return c.Header.fromPartial({version:null===t||void 0===t?void 0:t.toProto(),chainId:n,height:d.fromString(o),time:r,lastBlockId:null===i||void 0===i?void 0:i.toProto(),lastCommitHash:a.from(s,"base64"),dataHash:a.from(u,"base64"),validatorsHash:a.from(l,"base64"),nextValidatorsHash:a.from(f,"base64"),consensusHash:a.from(p,"base64"),appHash:a.from(b,"base64"),lastResultsHash:a.from(m,"base64"),evidenceHash:a.from(h,"base64"),proposerAddress:a.from(g)})},t}(l.JSONSerializable);t.Header=b;var m=function(e){function t(t,n){var a=e.call(this)||this;return a.header=t,a.commit=n,a}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.header,a=e.commit;return new t(n?b.fromData(n):void 0,a?y.fromData(a):void 0)},t.prototype.toData=function(){var e=this.header,t=this.commit;return{header:null===e||void 0===e?void 0:e.toData(),commit:null===t||void 0===t?void 0:t.toData()}},t.fromProto=function(e){return new t(e.header?b.fromProto(e.header):void 0,e.commit?y.fromProto(e.commit):void 0)},t.prototype.toProto=function(){var e=this.header,t=this.commit;return c.SignedHeader.fromPartial({header:null===e||void 0===e?void 0:e.toProto(),commit:null===t||void 0===t?void 0:t.toProto()})},t}(l.JSONSerializable);t.SignedHeader=m;var h=function(e){function t(t,n){var a=e.call(this)||this;return a.hash=t,a.partSetHeader=n,a}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.hash,a=e.part_set_header;return new t(n,a?g.fromData(a):void 0)},t.prototype.toData=function(){var e=this.hash,t=this.partSetHeader;return{hash:e,part_set_header:null===t||void 0===t?void 0:t.toData()}},t.fromProto=function(e){return new t(a.from(e.hash).toString("base64"),e.partSetHeader?g.fromProto(e.partSetHeader):void 0)},t.prototype.toProto=function(){var e=this.hash,t=this.partSetHeader;return c.BlockID.fromPartial({hash:a.from(e,"base64"),partSetHeader:t?t.toProto():void 0})},t}(l.JSONSerializable);t.BlockID=h;var g=function(e){function t(t,n){var a=e.call(this)||this;return a.total=t,a.hash=n,a}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.total,a=e.hash;return new t(parseInt(n),a)},t.prototype.toData=function(){var e=this.total,t=this.hash;return{total:e.toFixed(),hash:t}},t.fromProto=function(e){return new t(e.total,a.from(e.hash).toString("base64"))},t.prototype.toProto=function(){var e=this.total,t=this.hash;return c.PartSetHeader.fromPartial({total:e,hash:a.from(t,"base64")})},t}(l.JSONSerializable);t.PartSetHeader=g;var y=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.height=t,r.round=n,r.blockId=a,r.signatures=o,r}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.height,a=e.round,o=e.block_id,r=e.signatures;return new t(d.fromString(n),Number.parseInt(a),o?h.fromData(o):void 0,r.map((function(e){return v.fromData(e)})))},t.prototype.toData=function(){var e=this,t=e.height,n=e.round,a=e.blockId,o=e.signatures;return{height:t.toString(),round:n.toFixed(),block_id:null===a||void 0===a?void 0:a.toData(),signatures:o.map((function(e){return e.toData()}))}},t.fromProto=function(e){var n=e.height,a=e.round,o=e.blockId,r=e.signatures;return new t(n,a,o?h.fromProto(o):void 0,r.map((function(e){return v.fromProto(e)})))},t.prototype.toProto=function(){var e=this,t=e.height,n=e.round,a=e.blockId,o=e.signatures;return c.Commit.fromPartial({height:t,round:n,blockId:null===a||void 0===a?void 0:a.toProto(),signatures:o.map((function(e){return e.toProto()}))})},t}(l.JSONSerializable);t.Commit=y;var v=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.blockIdFlag=t,r.validatorAddress=n,r.timestamp=a,r.signature=o,r}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.block_id_flag,a=e.validator_address,o=e.timestamp,r=e.signature;return new t((0,c.blockIDFlagFromJSON)(n),a,o?new Date(o):void 0,r)},t.prototype.toData=function(){var e=this,t=e.blockIdFlag,n=e.validatorAddress,a=e.timestamp,o=e.signature;return{block_id_flag:(0,c.blockIDFlagToJSON)(t),validator_address:n||"",timestamp:a?a.toISOString().replace(/\.000Z$/,"Z"):void 0,signature:o||""}},t.fromProto=function(e){var n=e.blockIdFlag,o=e.validatorAddress,r=e.timestamp,i=e.signature;return new t(n,a.from(o).toString("base64"),r,a.from(i).toString("base64"))},t.prototype.toProto=function(){var e=this,t=e.blockIdFlag,n=e.validatorAddress,o=e.timestamp,r=e.signature;return c.CommitSig.fromPartial({blockIdFlag:t,validatorAddress:n?a.from(n,"base64"):void 0,timestamp:o,signature:r?a.from(r,"base64"):void 0})},t}(l.JSONSerializable);t.CommitSig=v;var w=function(e){function t(t,n,a){var o=e.call(this)||this;return o.validators=t,o.proposer=n,o.totalVotingPower=a,o}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.validators,a=e.proposer,o=e.total_voting_power;return new t(n.map((function(e){return k.fromData(e)})),a?k.fromData(a):void 0,d.fromString(o))},t.prototype.toData=function(){var e=this,t=e.validators,n=e.proposer,a=e.totalVotingPower;return{validators:t.map((function(e){return e.toData()})),proposer:null===n||void 0===n?void 0:n.toData(),total_voting_power:a.toString()}},t.fromProto=function(e){var n=e.validators,a=e.proposer,o=e.totalVotingPower;return new t(n.map((function(e){return k.fromProto(e)})),a?k.fromProto(a):void 0,o)},t.prototype.toProto=function(){var e=this,t=e.validators,n=e.proposer,a=e.totalVotingPower;return u.ValidatorSet.fromPartial({validators:t.map((function(e){return e.toProto()})),proposer:(null===n||void 0===n?void 0:n.toProto())||void 0,totalVotingPower:a})},t}(l.JSONSerializable);t.ValidatorSet=w;var k=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.address=t,r.pubKey=n,r.votingPower=a,r.proposerPriority=o,r}return o(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.address,a=e.pub_key,o=e.voting_power,r=e.proposer_priority;return new t(n,a?p.PublicKey.fromData(a):void 0,d.fromString(o),d.fromString(r))},t.prototype.toData=function(){var e=this,t=e.address,n=e.pubKey,a=e.votingPower,o=e.proposerPriority;return{address:t,pub_key:null===n||void 0===n?void 0:n.toData(),voting_power:a.toString(),proposer_priority:o.toString()}},t.fromProto=function(e){var n=e.address,o=e.pubKey,r=e.votingPower,i=e.proposerPriority;return new t(a.from(n).toString("base64"),o?p.PublicKey.fromProto(o):void 0,r,i)},t.prototype.toProto=function(){var e=this,t=e.address,n=e.pubKey,o=e.votingPower,r=e.proposerPriority;return u.Validator.fromPartial({address:a.from(t,"base64"),pubKey:(null===n||void 0===n?void 0:n.toProto())||void 0,votingPower:o,proposerPriority:r})},t}(l.JSONSerializable);t.Validator=k},25363:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.App=t.Consensus=void 0;var s=n(70897),c=n(70897),u=i(n(29600)),d=n(67423),l=function(e){function t(t,n){var a=e.call(this)||this;return a.block=t,a.app=n,a}return a(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.block,a=e.app;return new t(Number.parseInt(n),Number.parseInt(a))},t.prototype.toData=function(){var e=this.block,t=this.app;return{block:e.toFixed(),app:t.toFixed()}},t.fromProto=function(e){return new t(e.block.toNumber(),e.app.toNumber())},t.prototype.toProto=function(){var e=this.block,t=this.app;return s.Consensus.fromPartial({block:u.fromNumber(e),app:u.fromNumber(t)})},t}(d.JSONSerializable);t.Consensus=l;var f=function(e){function t(t,n){var a=e.call(this)||this;return a.protocol=t,a.software=n,a}return a(t,e),t.fromAmino=function(e){throw new Error("Amino not supported")},t.prototype.toAmino=function(){throw new Error("Amino not supported")},t.fromData=function(e){var n=e.protocol,a=e.software;return new t(Number.parseInt(n),a)},t.prototype.toData=function(){var e=this.protocol,t=this.software;return{protocol:e.toFixed(),software:t}},t.fromProto=function(e){return new t(e.protocol.toNumber(),e.software)},t.prototype.toProto=function(){var e=this.protocol,t=this.software;return c.App.fromPartial({protocol:u.fromNumber(e),software:t})},t}(d.JSONSerializable);t.App=f},84554:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgConnectionOpenAck=void 0;var r=n(67423),i=n(85920),s=n(69424),c=n(91592),u=n(59424),d=function(e){function t(t,n,a,o,r,i,s,c,u,d){var l=e.call(this)||this;return l.connection_id=t,l.counterparty_connection_id=n,l.version=a,l.client_state=o,l.proof_height=r,l.proof_try=i,l.proof_client=s,l.proof_consensus=c,l.consensus_height=u,l.signer=d,l}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.connection_id,o=e.counterparty_connection_id,r=e.version,i=e.client_state,c=e.proof_height,d=e.proof_try,l=e.proof_client,f=e.proof_consensus,p=e.consensus_height,b=e.signer;return new t(a,o,r?s.Version.fromData(r):void 0,i,c?u.Height.fromData(c):void 0,d,l,f,p?u.Height.fromData(p):void 0,b)},t.prototype.toData=function(e){var t=this,n=t.connection_id,a=t.counterparty_connection_id,o=t.version,r=t.client_state,i=t.proof_height,s=t.proof_try,c=t.proof_client,u=t.proof_consensus,d=t.consensus_height,l=t.signer;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenAck",connection_id:n,counterparty_connection_id:a,version:o?o.toData():void 0,client_state:r,proof_height:i?i.toData():void 0,proof_try:s,proof_client:c,proof_consensus:u,consensus_height:d?d.toData():void 0,signer:l}},t.fromProto=function(e,n){return new t(e.connectionId,e.counterpartyConnectionId,e.version?s.Version.fromProto(e.version):void 0,e.clientState,e.proofHeight?u.Height.fromProto(e.proofHeight):void 0,a.from(e.proofTry).toString("base64"),a.from(e.proofClient).toString("base64"),a.from(e.proofConsensus).toString("base64"),e.consensusHeight?u.Height.fromProto(e.consensusHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.connection_id,o=t.counterparty_connection_id,r=t.version,i=t.client_state,s=t.proof_height,u=t.proof_try,d=t.proof_client,l=t.proof_consensus,f=t.consensus_height,p=t.signer;return c.MsgConnectionOpenAck.fromPartial({connectionId:n,counterpartyConnectionId:o,version:r?r.toProto():void 0,clientState:i,proofHeight:s?s.toProto():void 0,proofTry:a.from(u,"base64"),proofClient:a.from(d,"base64"),proofConsensus:a.from(l,"base64"),consensusHeight:f?f.toProto():void 0,signer:p})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAck",value:c.MsgConnectionOpenAck.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.MsgConnectionOpenAck.decode(e.value))},t}(r.JSONSerializable);t.MsgConnectionOpenAck=d},18300:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgConnectionOpenConfirm=void 0;var r=n(67423),i=n(85920),s=n(91592),c=n(59424),u=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.connection_id=t,r.proof_ack=n,r.proof_height=a,r.signer=o,r}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.connection_id,o=e.proof_ack,r=e.proof_height,i=e.signer;return new t(a,o,r?c.Height.fromData(r):void 0,i)},t.prototype.toData=function(e){var t=this,n=t.connection_id,a=t.proof_ack,o=t.proof_height,r=t.signer;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenConfirm",connection_id:n,proof_ack:a,proof_height:o?o.toData():void 0,signer:r}},t.fromProto=function(e,n){return new t(e.connectionId,a.from(e.proofAck).toString("base64"),e.proofHeight?c.Height.fromProto(e.proofHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.connection_id,o=t.proof_ack,r=t.proof_height,i=t.signer;return s.MsgConnectionOpenConfirm.fromPartial({connectionId:n,proofAck:a.from(o,"base64"),proofHeight:r?r.toProto():void 0,signer:i})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirm",value:s.MsgConnectionOpenConfirm.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgConnectionOpenConfirm.decode(e.value))},t}(r.JSONSerializable);t.MsgConnectionOpenConfirm=u},9066:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgConnectionOpenInit=void 0;var r=n(67423),i=n(85920),s=n(14907),c=n(69424),u=n(91592),d=o(n(29600)),l=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.client_id=t,i.delay_period=n,i.signer=a,i.counterparty=o,i.version=r,i}return a(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var a=e.client_id,o=e.counterparty,r=e.version,i=e.delay_period,u=e.signer;return new t(a,Number.parseInt(i),u,o?s.Counterparty.fromData(o):void 0,r?c.Version.fromData(r):void 0)},t.prototype.toData=function(e){var t=this,n=t.client_id,a=t.counterparty,o=t.version,r=t.delay_period,i=t.signer;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenInit",client_id:n,delay_period:r.toFixed(),signer:i,counterparty:a?a.toData():void 0,version:o?o.toData():void 0}},t.fromProto=function(e,n){return new t(e.clientId,e.delayPeriod.toNumber(),e.signer,e.counterparty?s.Counterparty.fromProto(e.counterparty):void 0,e.version?c.Version.fromProto(e.version):void 0)},t.prototype.toProto=function(e){var t=this,n=t.client_id,a=t.counterparty,o=t.version,r=t.delay_period,i=t.signer;return u.MsgConnectionOpenInit.fromPartial({clientId:n,delayPeriod:d.default.fromNumber(r),signer:i,counterparty:a?a.toProto():void 0,version:o?o.toProto():void 0})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInit",value:u.MsgConnectionOpenInit.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(u.MsgConnectionOpenInit.decode(e.value))},t}(r.JSONSerializable);t.MsgConnectionOpenInit=l},23129:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgConnectionOpenTry=void 0;var i=n(67423),s=n(85920),c=n(14907),u=n(69424),d=n(91592),l=r(n(29600)),f=n(59424),p=function(e){function t(t,n,a,o,r,i,s,c,u,d,l,f){var p=e.call(this)||this;return p.client_id=t,p.previous_connection_id=n,p.client_state=a,p.counterparty=o,p.delay_period=r,p.counterparty_versions=i,p.proof_height=s,p.proof_init=c,p.proof_client=u,p.proof_consensus=d,p.consensus_height=l,p.signer=f,p}return o(t,e),t.fromAmino=function(e,t){throw new Error("Amino not supported")},t.prototype.toAmino=function(e){throw new Error("Amino not supported")},t.fromData=function(e,n){var o=e.client_id,r=e.previous_connection_id,i=e.client_state,s=e.counterparty,d=e.delay_period,l=e.counterparty_versions,p=e.proof_height,b=e.proof_init,m=e.proof_client,h=e.proof_consensus,g=e.consensus_height,y=e.signer;return new t(o,r,i,s?c.Counterparty.fromData(s):void 0,Number.parseInt(d),l.length>0?l.map((function(e){return u.Version.fromData(e)})):[],p?f.Height.fromData(p):void 0,a.from(b).toString("base64"),a.from(m).toString("base64"),a.from(h).toString("base64"),g?f.Height.fromData(g):void 0,y)},t.prototype.toData=function(e){var t=this,n=t.client_id,a=t.previous_connection_id,o=t.client_state,r=t.counterparty,i=t.delay_period,s=t.counterparty_versions,c=t.proof_height,u=t.proof_init,d=t.proof_client,l=t.proof_consensus,f=t.consensus_height,p=t.signer;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenTry",client_id:n,previous_connection_id:a,client_state:o,counterparty:r?r.toData():void 0,delay_period:i.toFixed(),counterparty_versions:s.length>0?s.map((function(e){return e.toData()})):[],proof_height:c?c.toData():void 0,proof_init:u,proof_client:d,proof_consensus:l,consensus_height:f?f.toData():void 0,signer:p}},t.fromProto=function(e,n){return new t(e.clientId,e.previousConnectionId,e.clientState,e.counterparty?c.Counterparty.fromProto(e.counterparty):void 0,e.delayPeriod.toNumber(),e.counterpartyVersions.length>0?e.counterpartyVersions.map((function(e){return u.Version.fromProto(e)})):[],e.proofHeight?f.Height.fromProto(e.proofHeight):void 0,a.from(e.proofInit).toString("base64"),a.from(e.proofClient).toString("base64"),a.from(e.proofConsensus).toString("base64"),e.consensusHeight?f.Height.fromProto(e.consensusHeight):void 0,e.signer)},t.prototype.toProto=function(e){var t=this,n=t.client_id,o=t.previous_connection_id,r=t.client_state,i=t.counterparty,s=t.delay_period,c=t.counterparty_versions,u=t.proof_height,f=t.proof_init,p=t.proof_client,b=t.proof_consensus,m=t.consensus_height,h=t.signer;return d.MsgConnectionOpenTry.fromPartial({clientId:n,previousConnectionId:o,clientState:r.toProto(),counterparty:i?i.toProto():void 0,delayPeriod:l.default.fromNumber(s),counterpartyVersions:c.length>0?c.map((function(e){return e.toProto()})):[],proofHeight:u?u.toProto():void 0,proofInit:a.from(f,"base64"),proofClient:a.from(p,"base64"),proofConsensus:a.from(b,"base64"),consensusHeight:m?m.toProto():void 0,signer:h})},t.prototype.packAny=function(e){return s.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTry",value:d.MsgConnectionOpenTry.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(d.MsgConnectionOpenTry.decode(e.value))},t}(i.JSONSerializable);t.MsgConnectionOpenTry=p},21358:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(9066),t),o(n(23129),t),o(n(18300),t),o(n(84554),t)},73068:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ClientUpdateProposal=void 0;var o=n(67423),r=n(85920),i=n(39553),s=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.title=t,r.description=n,r.subjectClientId=a,r.substituteClientId=o,r}return a(t,e),t.fromAmino=function(e,n){var a=e.value;return new t(a.title,a.description,a.subjectClientId,a.substituteClientId)},t.prototype.toAmino=function(e){var t=this;return{type:"ibc/ClientUpdateProposal",value:{title:t.title,description:t.description,subjectClientId:t.subjectClientId,substituteClientId:t.substituteClientId}}},t.fromData=function(e,n){return new t(e.title,e.description,e.subject_client_id,e.substitute_client_id)},t.prototype.toData=function(e){var t=this;return{"@type":"/ibc.core.client.v1.ClientUpdateProposal",title:t.title,description:t.description,subject_client_id:t.subjectClientId,substitute_client_id:t.substituteClientId}},t.fromProto=function(e,n){return new t(e.title,e.description,e.subjectClientId,e.substituteClientId)},t.prototype.toProto=function(e){var t=this,n=t.title,a=t.description,o=t.subjectClientId,r=t.substituteClientId;return i.ClientUpdateProposal.fromPartial({subjectClientId:o,substituteClientId:r,description:a,title:n})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/ibc.core.client.v1.ClientUpdateProposal",value:i.ClientUpdateProposal.encode(this.toProto()).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.ClientUpdateProposal.decode(e.value))},t}(o.JSONSerializable);t.ClientUpdateProposal=s},93684:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(73068),t)},15775:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(71206),t),o(n(96533),t),o(n(74600),t),o(n(11440),t),o(n(63916),t),o(n(49368),t),o(n(39076),t),o(n(75459),t),o(n(85497),t),o(n(96765),t),o(n(38929),t),o(n(76828),t),o(n(69711),t),o(n(71030),t),o(n(22023),t),o(n(98566),t),o(n(69438),t),o(n(24299),t),o(n(95544),t),o(n(58178),t),o(n(7249),t),o(n(96899),t),o(n(7906),t),o(n(76095),t),o(n(49272),t),o(n(445),t),o(n(51732),t),o(n(95283),t),o(n(86685),t),o(n(46587),t),o(n(73871),t),o(n(40494),t),o(n(28487),t),o(n(32368),t),o(n(60474),t),o(n(77212),t),o(n(98724),t),o(n(56478),t),o(n(50743),t),o(n(64171),t),o(n(44888),t),o(n(18442),t),o(n(92997),t),o(n(84140),t),o(n(55699),t),o(n(12560),t),o(n(18176),t),o(n(56502),t),o(n(67407),t),o(n(25679),t),o(n(64726),t),o(n(38522),t),o(n(95570),t),o(n(21358),t),o(n(51680),t),o(n(8461),t)},77050:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgSwap=void 0;var o=n(67423),r=n(96533),i=n(97823),s=n(50922),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.trader=t,o.offer_coin=n,o.ask_denom=a,o}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value,o=a.trader,i=a.offer_coin,s=a.ask_denom;return new t(o,r.Coin.fromAmino(i),s)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.trader,a=t.offer_coin,o=t.ask_denom;return{type:"market/MsgSwap",value:{trader:n,offer_coin:a.toAmino(),ask_denom:o}}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.trader,r.Coin.fromProto(e.offerCoin),e.askDenom)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.trader,a=t.offer_coin,o=t.ask_denom;return i.MsgSwap.fromPartial({askDenom:o,offerCoin:a.toProto(),trader:n})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return s.Any.fromPartial({typeUrl:"/terra.market.v1beta1.MsgSwap",value:i.MsgSwap.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(i.MsgSwap.decode(e.value),n)},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.trader,o=e.offer_coin,i=e.ask_denom;return new t(a,r.Coin.fromData(o),i)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.trader,a=t.offer_coin,o=t.ask_denom;return{"@type":"/terra.market.v1beta1.MsgSwap",trader:n,offer_coin:a.toData(),ask_denom:o}},t}(o.JSONSerializable);t.MsgSwap=c},72082:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgSwapSend=void 0;var o=n(67423),r=n(96533),i=n(50922),s=n(97823),c=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.from_address=t,r.to_address=n,r.offer_coin=a,r.ask_denom=o,r}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value,o=a.from_address,i=a.to_address,s=a.offer_coin,c=a.ask_denom;return new t(o,i,r.Coin.fromAmino(s),c)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.offer_coin,r=t.ask_denom;return{type:"market/MsgSwapSend",value:{from_address:n,to_address:a,offer_coin:o.toAmino(),ask_denom:r}}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.fromAddress,e.toAddress,r.Coin.fromProto(e.offerCoin),e.askDenom)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.offer_coin,r=t.ask_denom;return s.MsgSwapSend.fromPartial({askDenom:r,fromAddress:n,offerCoin:o.toProto(),toAddress:a})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return i.Any.fromPartial({typeUrl:"/terra.market.v1beta1.MsgSwapSend",value:s.MsgSwapSend.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(s.MsgSwapSend.decode(e.value),n)},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.from_address,o=e.to_address,i=e.offer_coin,s=e.ask_denom;return new t(a,o,r.Coin.fromData(i),s)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.offer_coin,r=t.ask_denom;return{"@type":"/terra.market.v1beta1.MsgSwapSend",from_address:n,to_address:a,offer_coin:o.toData(),ask_denom:r}},t}(o.JSONSerializable);t.MsgSwapSend=c},40494:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(77050),t),o(n(72082),t)},49368:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.int=t.dec=t.Int=t.Dec=t.Numeric=t.DEC_PRECISION=void 0;var r,i=o(n(61017));t.DEC_PRECISION=18,i.default.set({precision:64,rounding:3}),function(e){e.parse=function(e){if(e instanceof s)return e;if("string"===typeof e)return e.includes(".")?new s(e):new c(e);var t=new i.default(e);return t.isInteger()?new c(t):new s(t.toString())}}(r=t.Numeric||(t.Numeric={}));var s=function(e){function n(t){return e.call(this,(null!==t&&void 0!==t?t:0).toString())||this}return a(n,e),n.prototype.toString=function(){return this.toFixed(t.DEC_PRECISION)},n.withPrec=function(e,t){return new n(new n(e).div(Math.pow(10,t)))},n.prototype.toInt=function(){return new c(this)},n.prototype.add=function(t){var a=new n(r.parse(t));return new n(e.prototype.add.call(this,a))},n.prototype.sub=function(t){var a=new n(r.parse(t));return new n(e.prototype.sub.call(this,a))},n.prototype.mul=function(t){var a=new n(r.parse(t));return new n(e.prototype.mul.call(this,a))},n.prototype.div=function(t){var a=new n(r.parse(t));return new n(e.prototype.div.call(this,a))},n.prototype.mod=function(t){var a=new n(r.parse(t));return new n(e.prototype.mod.call(this,a))},n}(i.default);t.Dec=s;var c=function(e){function t(t){var n=new i.default((null!==t&&void 0!==t?t:0).toString());return e.call(this,n.divToInt(1))||this}return a(t,e),t.prototype.toString=function(){return this.toFixed()},t.prototype.toDec=function(){return new s(this)},t.prototype.add=function(e){var n=r.parse(e);return n instanceof s?new s(this).add(n):new t(this.plus(n))},t.prototype.sub=function(e){var n=r.parse(e);return n instanceof s?new s(this).sub(n):new t(this.minus(n))},t.prototype.mul=function(e){var n=r.parse(e);return n instanceof s?new s(this).mul(n):new t(this.times(n))},t.prototype.div=function(n){var a=r.parse(n);return a instanceof s?new s(this).div(a):new t(e.prototype.div.call(this,a))},t.prototype.mod=function(n){var a=r.parse(n);return a instanceof s?new s(this).mod(a):new t(e.prototype.mod.call(this,a))},t}(i.default.clone());t.Int=c,t.dec=function(e){return new s(e[0])},t.int=function(e){return new c(e[0])}},77212:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AggregateExchangeRatePrevote=void 0;var s=n(67423),c=n(39783),u=i(n(29600)),d=function(e){function t(t,n,a){var o=e.call(this)||this;return o.hash=t,o.voter=n,o.submit_block=a,o}return a(t,e),t.fromAmino=function(e){var n=e.hash,a=e.voter,o=e.submit_block;return new t(n,a,Number.parseInt(o))},t.prototype.toAmino=function(){var e=this;return{hash:e.hash,voter:e.voter,submit_block:e.submit_block.toFixed()}},t.fromData=function(e){var n=e.hash,a=e.voter,o=e.submit_block;return new t(n,a,Number.parseInt(o))},t.prototype.toData=function(){var e=this;return{hash:e.hash,voter:e.voter,submit_block:e.submit_block.toFixed()}},t.fromProto=function(e){return new t(e.hash,e.voter,e.submitBlock.toNumber())},t.prototype.toProto=function(){var e=this,t=e.hash,n=e.voter,a=e.submit_block;return c.AggregateExchangeRatePrevote.fromPartial({hash:t,submitBlock:u.fromNumber(a),voter:n})},t}(s.JSONSerializable);t.AggregateExchangeRatePrevote=d},98724:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ExchangeRateTuple=t.AggregateExchangeRateVote=void 0;var o=n(67423),r=n(39783),i=n(49368),s=function(e){function t(t,n){var a=e.call(this)||this;return a.exchange_rate_tuples=t,a.voter=n,a}return a(t,e),t.fromAmino=function(e){var n=e.exchange_rate_tuples,a=e.voter;return new t(n.map((function(e){return c.fromAmino(e)})),a)},t.prototype.toAmino=function(){var e=this.exchange_rate_tuples,t=this.voter;return{exchange_rate_tuples:e.map((function(e){return e.toAmino()})),voter:t}},t.fromData=function(e){var n=e.exchange_rate_tuples,a=e.voter;return new t(n.map((function(e){return c.fromData(e)})),a)},t.prototype.toData=function(){var e=this.exchange_rate_tuples,t=this.voter;return{exchange_rate_tuples:e.map((function(e){return e.toData()})),voter:t}},t.fromProto=function(e){return new t(e.exchangeRateTuples.map((function(e){return c.fromProto(e)})),e.voter)},t.prototype.toProto=function(){var e=this.exchange_rate_tuples,t=this.voter;return r.AggregateExchangeRateVote.fromPartial({exchangeRateTuples:e.map((function(e){return e.toProto()})),voter:t})},t}(o.JSONSerializable);t.AggregateExchangeRateVote=s;var c=function(e){function t(t,n){var a=e.call(this)||this;return a.denom=t,a.exchange_rate=new i.Dec(n),a}return a(t,e),t.fromAmino=function(e){return new t(e.denom,e.exchange_rate)},t.prototype.toAmino=function(){return{denom:this.denom,exchange_rate:this.exchange_rate.toString()}},t.fromData=function(e){return new t(e.denom,e.exchange_rate)},t.prototype.toData=function(){return{denom:this.denom,exchange_rate:this.exchange_rate.toString()}},t.fromProto=function(e){return new t(e.denom,e.exchangeRate)},t.prototype.toProto=function(){var e=this.denom,t=this.exchange_rate;return r.ExchangeRateTuple.fromPartial({denom:e,exchangeRate:t.toString()})},t}(o.JSONSerializable);t.ExchangeRateTuple=c},76251:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgAggregateExchangeRatePrevote=void 0;var o=n(67423),r=n(50922),i=n(16974),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.hash=t,o.feeder=n,o.validator=a,o}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value;return new t(a.hash,a.feeder,a.validator)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this;return{type:"oracle/MsgAggregateExchangeRatePrevote",value:{hash:t.hash,feeder:t.feeder,validator:t.validator}}},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.hash,e.feeder,e.validator)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this;return{"@type":"/terra.oracle.v1beta1.MsgAggregateExchangeRatePrevote",hash:t.hash,feeder:t.feeder,validator:t.validator}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.hash,e.feeder,e.validator)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.hash,a=t.feeder,o=t.validator;return i.MsgAggregateExchangeRatePrevote.fromPartial({hash:n,feeder:a,validator:o})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/terra.oracle.v1beta1.MsgAggregateExchangeRatePrevote",value:i.MsgAggregateExchangeRatePrevote.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(i.MsgAggregateExchangeRatePrevote.decode(e.value),n)},t}(o.JSONSerializable);t.MsgAggregateExchangeRatePrevote=s},51414:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgAggregateExchangeRateVote=t.aggregateVoteHash=void 0;var o=n(47738),r=n(67423),i=n(76251),s=n(74600),c=n(50922),u=n(16974);function d(e,t,n){var a="".concat(t,":").concat(e.toDecCoins().toString(),":").concat(n);return o.SHA256.hash(a).toString().substring(0,40)}t.aggregateVoteHash=d;var l=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.salt=n,r.feeder=a,r.validator=o,r.exchange_rates=new s.Coins(t).toDecCoins(),r}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value,o=a.exchange_rates,r=a.salt,i=a.feeder,c=a.validator;return new t(s.Coins.fromString(o),r,i,c)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.exchange_rates,a=t.salt,o=t.feeder,r=t.validator;return{type:"oracle/MsgAggregateExchangeRateVote",value:{exchange_rates:n.toDecCoins().toString(),salt:a,feeder:o,validator:r}}},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.exchange_rates,o=e.salt,r=e.feeder,i=e.validator;return new t(s.Coins.fromString(a),o,r,i)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.exchange_rates,a=t.salt,o=t.feeder,r=t.validator;return{"@type":"/terra.oracle.v1beta1.MsgAggregateExchangeRateVote",exchange_rates:n.toDecCoins().toString(),salt:a,feeder:o,validator:r}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(s.Coins.fromString(e.exchangeRates),e.salt,e.feeder,e.validator)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.exchange_rates,a=t.salt,o=t.feeder,r=t.validator;return u.MsgAggregateExchangeRateVote.fromPartial({exchangeRates:n.toString(),feeder:o,salt:a,validator:r})},t.prototype.getAggregateVoteHash=function(){return d(this.exchange_rates,this.salt,this.validator)},t.prototype.getPrevote=function(){return new i.MsgAggregateExchangeRatePrevote(this.getAggregateVoteHash(),this.feeder,this.validator)},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return c.Any.fromPartial({typeUrl:"/terra.oracle.v1beta1.MsgAggregateExchangeRateVote",value:u.MsgAggregateExchangeRateVote.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(u.MsgAggregateExchangeRateVote.decode(e.value),n)},t}(r.JSONSerializable);t.MsgAggregateExchangeRateVote=l},74561:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgDelegateFeedConsent=void 0;var o=n(67423),r=n(85920),i=n(16974),s=function(e){function t(t,n){var a=e.call(this)||this;return a.operator=t,a.delegate=n,a}return a(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value;return new t(a.operator,a.delegate)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");return{type:"oracle/MsgDelegateFeedConsent",value:{operator:this.operator,delegate:this.delegate}}},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.operator,e.delegate)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");return{"@type":"/terra.oracle.v1beta1.MsgDelegateFeedConsent",operator:this.operator,delegate:this.delegate}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.operator,e.delegate)},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this.operator,n=this.delegate;return i.MsgDelegateFeedConsent.fromPartial({delegate:n,operator:t})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/terra.oracle.v1beta1.MsgDelegateFeedConsent",value:i.MsgDelegateFeedConsent.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(i.MsgDelegateFeedConsent.decode(e.value),n)},t}(o.JSONSerializable);t.MsgDelegateFeedConsent=s},60474:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(74561),t),o(n(51414),t),o(n(76251),t)},50743:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ParamChange=t.ParamChanges=void 0;var o=n(67423),r=n(15517),i=function(e){function t(t){var n=e.call(this)||this;return n.paramChanges=t,n}return a(t,e),t.fromAmino=function(e){return new t((null!==e&&void 0!==e?e:[]).map(s.fromAmino))},t.prototype.toAmino=function(){return this.paramChanges.map((function(e){return e.toAmino()}))},t.fromData=function(e){return new t((null!==e&&void 0!==e?e:[]).map(s.fromData))},t.prototype.toData=function(){return this.paramChanges.map((function(e){return e.toData()}))},t.fromProto=function(e){return new t((null!==e&&void 0!==e?e:[]).map(s.fromProto))},t.prototype.toProto=function(){return this.paramChanges.map((function(e){return e.toProto()}))},t}(o.JSONSerializable);t.ParamChanges=i;var s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.subspace=t,o.key=n,o.value=a,o}return a(t,e),t.fromAmino=function(e){return new t(e.subspace,e.key,e.value)},t.prototype.toAmino=function(){var e=this;return{subspace:e.subspace,key:e.key,value:e.value}},t.fromData=function(e){return new t(e.subspace,e.key,e.value)},t.prototype.toData=function(){var e=this;return{subspace:e.subspace,key:e.key,value:e.value}},t.fromProto=function(e){return new t(e.subspace,e.key,e.value)},t.prototype.toProto=function(){var e=this,t=e.subspace,n=e.key,a=e.value;return r.ParamChange.fromPartial({key:n,subspace:t,value:a})},t}(o.JSONSerializable);t.ParamChange=s},73392:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterChangeProposal=void 0;var o=n(67423),r=n(50743),i=n(85920),s=n(54265),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,Array.isArray(a)?o.changes=r.ParamChanges.fromData(a):o.changes=a,o}return a(t,e),t.fromAmino=function(e,n){var a=e.value,o=a.title,i=a.description,s=a.changes;return new t(o,i,r.ParamChanges.fromAmino(s))},t.prototype.toAmino=function(e){var t=this;return{type:e?"params/ParameterChangeProposal":"cosmos-sdk/ParameterChangeProposal",value:{title:t.title,description:t.description,changes:t.changes.toAmino()}}},t.fromData=function(e,n){var a=e.title,o=e.description,i=e.changes;return new t(a,o,r.ParamChanges.fromData(i))},t.prototype.toData=function(e){var t=this;return{"@type":"/cosmos.params.v1beta1.ParameterChangeProposal",title:t.title,description:t.description,changes:t.changes.toData()}},t.fromProto=function(e,n){return new t(e.title,e.description,r.ParamChanges.fromProto(e.changes))},t.prototype.toProto=function(e){var t=this,n=t.title,a=t.description,o=t.changes;return s.ParameterChangeProposal.fromPartial({changes:o.toProto(),description:a,title:n})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/cosmos.params.v1beta1.ParameterChangeProposal",value:s.ParameterChangeProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.ParameterChangeProposal.decode(e.value),n)},t}(o.JSONSerializable);t.ParameterChangeProposal=c},56478:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(73392),t)},59561:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgUnjail=void 0;var o=n(67423),r=n(85920),i=n(42670),s=function(e){function t(t){var n=e.call(this)||this;return n.address=t,n}return a(t,e),t.fromAmino=function(e,n){return new t(e.value.address)},t.prototype.toAmino=function(e){return{type:e?"slashing/MsgUnjail":"cosmos-sdk/MsgUnjail",value:{address:this.address}}},t.fromData=function(e,n){return new t(e.address)},t.prototype.toData=function(e){return{"@type":"/cosmos.slashing.v1beta1.MsgUnjail",address:this.address}},t.fromProto=function(e,n){return new t(e.validatorAddr)},t.prototype.toProto=function(e){var t=this.address;return i.MsgUnjail.fromPartial({validatorAddr:t})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUnjail",value:i.MsgUnjail.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.MsgUnjail.decode(e.value),n)},t}(o.JSONSerializable);t.MsgUnjail=s},64171:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(59561),t)},18442:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Delegation=void 0;var o=n(67423),r=n(49368),i=n(96533),s=n(56189),c=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.delegator_address=t,r.validator_address=n,r.shares=a,r.balance=o,r}return a(t,e),t.fromAmino=function(e){var n=e.delegation,a=n.delegator_address,o=n.validator_address,s=n.shares,c=e.balance;return new t(a,o,new r.Dec(s),i.Coin.fromAmino(c))},t.prototype.toAmino=function(){var e=this,t=e.delegator_address,n=e.validator_address,a=e.shares,o=e.balance;return{delegation:{delegator_address:t,validator_address:n,shares:a.toString()},balance:o.toAmino()}},t.fromData=function(e){var n=e.delegation,a=n.delegator_address,o=n.validator_address,s=n.shares,c=e.balance;return new t(a,o,new r.Dec(s),i.Coin.fromData(c))},t.prototype.toData=function(){var e=this,t=e.delegator_address,n=e.validator_address,a=e.shares,o=e.balance;return{delegation:{delegator_address:t,validator_address:n,shares:a.toString()},balance:o.toData()}},t.fromProto=function(e){var n=e.delegation;return new t(n.delegatorAddress,n.validatorAddress,new r.Dec(n.shares),i.Coin.fromProto(e.balance))},t.prototype.toProto=function(){var e=this,t=e.delegator_address,n=e.validator_address,a=e.shares,o=e.balance;return s.DelegationResponse.fromPartial({delegation:s.Delegation.fromPartial({delegatorAddress:t,shares:a.toString(),validatorAddress:n}),balance:o.toProto()})},t}(o.JSONSerializable);t.Delegation=c},92997:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Redelegation=void 0;var s=n(67423),c=n(49368),u=n(56189),d=i(n(29600)),l=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.delegator_address=t,r.validator_src_address=n,r.validator_dst_address=a,r.entries=o,r}return a(t,e),t.fromAmino=function(e){var n=e.redelegation;return new t(n.delegator_address,n.validator_src_address,n.validator_dst_address,e.entries.map((function(e){return t.Entry.fromAmino(e)})))},t.prototype.toAmino=function(){var e=this;return{redelegation:{delegator_address:e.delegator_address,validator_src_address:e.validator_src_address,validator_dst_address:e.validator_dst_address},entries:e.entries.map((function(e){return e.toAmino()}))}},t.fromData=function(e){var n=e.redelegation;return new t(n.delegator_address,n.validator_src_address,n.validator_dst_address,e.entries.map((function(e){return t.Entry.fromData(e)})))},t.prototype.toData=function(){var e=this;return{redelegation:{delegator_address:e.delegator_address,validator_src_address:e.validator_src_address,validator_dst_address:e.validator_dst_address},entries:e.entries.map((function(e){return e.toData()}))}},t.fromProto=function(e){var n=e.redelegation;return new t(n.delegatorAddress,n.validatorDstAddress,n.validatorDstAddress,e.entries.map((function(e){return t.Entry.fromProto(e)})))},t.prototype.toProto=function(){var e=this,t=e.delegator_address,n=e.validator_src_address,a=e.validator_dst_address,o=e.entries;return u.RedelegationResponse.fromPartial({entries:o.map((function(e){return e.toProto()})),redelegation:u.Redelegation.fromPartial({delegatorAddress:t,entries:o.map((function(e){return e.toProto().redelegationEntry})),validatorDstAddress:a,validatorSrcAddress:n})})},t}(s.JSONSerializable);t.Redelegation=l,function(e){var t=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.initial_balance=t,i.balance=n,i.shares_dst=a,i.creation_height=o,i.completion_time=r,i}return a(t,e),t.prototype.toAmino=function(){return{redelegation_entry:{initial_balance:this.initial_balance.toString(),shares_dst:this.shares_dst.toString(),creation_height:this.creation_height,completion_time:this.completion_time.toISOString()},balance:this.balance.toString()}},t.fromAmino=function(e){var n=e.redelegation_entry,a=n.initial_balance,o=n.shares_dst,r=n.creation_height,i=n.completion_time,s=e.balance;return new t(new c.Int(a),new c.Int(s),new c.Dec(o),r,new Date(i))},t.prototype.toData=function(){return{redelegation_entry:{initial_balance:this.initial_balance.toString(),shares_dst:this.shares_dst.toString(),creation_height:this.creation_height,completion_time:this.completion_time.toISOString()},balance:this.balance.toString()}},t.fromData=function(e){var n=e.redelegation_entry,a=n.initial_balance,o=n.shares_dst,r=n.creation_height,i=n.completion_time,s=e.balance;return new t(new c.Int(a),new c.Int(s),new c.Dec(o),r,new Date(i))},t.prototype.toProto=function(){var e=this,t=e.initial_balance,n=e.balance,a=e.shares_dst,o=e.creation_height,r=e.completion_time;return u.RedelegationEntryResponse.fromPartial({balance:n.toString(),redelegationEntry:u.RedelegationEntry.fromPartial({completionTime:r,creationHeight:d.fromNumber(o),initialBalance:t.toString(),sharesDst:a.toString()})})},t.fromProto=function(e){var n=e.redelegationEntry;return new t(new c.Int(n.initialBalance),new c.Int(e.balance),new c.Dec(n.sharesDst),n.creationHeight.toNumber(),n.completionTime)},t}(s.JSONSerializable);e.Entry=t}(l=t.Redelegation||(t.Redelegation={})),t.Redelegation=l},84140:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.UnbondingDelegation=void 0;var s=n(67423),c=n(49368),u=n(56189),d=i(n(29600)),l=function(e){function t(t,n,a){var o=e.call(this)||this;return o.delegator_address=t,o.validator_address=n,o.entries=a,o}return a(t,e),t.fromAmino=function(e){return new t(e.delegator_address,e.validator_address,e.entries.map((function(e){return t.Entry.fromAmino(e)})))},t.prototype.toAmino=function(){var e=this;return{delegator_address:e.delegator_address,validator_address:e.validator_address,entries:e.entries.map((function(e){return e.toAmino()}))}},t.fromData=function(e){return new t(e.delegator_address,e.validator_address,e.entries.map((function(e){return t.Entry.fromData(e)})))},t.prototype.toData=function(){var e=this;return{delegator_address:e.delegator_address,validator_address:e.validator_address,entries:e.entries.map((function(e){return e.toData()}))}},t.prototype.toProto=function(){var e=this,t=e.delegator_address,n=e.validator_address,a=e.entries;return u.UnbondingDelegation.fromPartial({delegatorAddress:t,entries:a.map((function(e){return e.toProto()})),validatorAddress:n})},t.fromProto=function(e){return new t(e.delegatorAddress,e.validatorAddress,e.entries.map((function(e){return t.Entry.fromProto(e)})))},t}(s.JSONSerializable);t.UnbondingDelegation=l,function(e){var t=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.initial_balance=t,r.balance=n,r.creation_height=a,r.completion_time=o,r}return a(t,e),t.prototype.toAmino=function(){return{initial_balance:this.initial_balance.toString(),balance:this.balance.toString(),creation_height:this.creation_height.toFixed(),completion_time:this.completion_time.toISOString()}},t.fromAmino=function(e){var n=e.initial_balance,a=e.balance,o=e.creation_height,r=e.completion_time;return new t(new c.Int(n),new c.Int(a),Number.parseInt(o),new Date(r))},t.prototype.toData=function(){return{initial_balance:this.initial_balance.toString(),balance:this.balance.toString(),creation_height:this.creation_height.toFixed(),completion_time:this.completion_time.toISOString()}},t.fromData=function(e){var n=e.initial_balance,a=e.balance,o=e.creation_height,r=e.completion_time;return new t(new c.Int(n),new c.Int(a),Number.parseInt(o),new Date(r))},t.prototype.toProto=function(){var e=this,t=e.initial_balance,n=e.balance,a=e.creation_height,o=e.completion_time;return u.UnbondingDelegationEntry.fromPartial({balance:n.toString(),completionTime:o,creationHeight:d.fromNumber(a),initialBalance:t.toString()})},t.fromProto=function(e){return new t(new c.Int(e.initialBalance),new c.Int(e.balance),e.creationHeight.toNumber(),e.completionTime)},t}(s.JSONSerializable);e.Entry=t}(l=t.UnbondingDelegation||(t.UnbondingDelegation={})),t.UnbondingDelegation=l},55699:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;var s=n(67423),c=n(49368),u=n(39076),d=n(56189),l=i(n(29600)),f=function(e){function t(t,n,a,o,r,i,s,c,u,d,l){var f=e.call(this)||this;return f.operator_address=t,f.consensus_pubkey=n,f.jailed=a,f.status=o,f.tokens=r,f.delegator_shares=i,f.description=s,f.unbonding_height=c,f.unbonding_time=u,f.commission=d,f.min_self_delegation=l,f}return a(t,e),t.prototype.toAmino=function(){return{operator_address:this.operator_address,consensus_pubkey:this.consensus_pubkey.toAmino(),jailed:this.jailed,status:this.status,tokens:this.tokens.toString(),delegator_shares:this.delegator_shares.toString(),description:this.description,unbonding_height:this.unbonding_height.toFixed(),unbonding_time:this.unbonding_time.toISOString(),commission:this.commission.toAmino(),min_self_delegation:this.min_self_delegation.toString()}},t.fromAmino=function(e){return new t(e.operator_address,u.ValConsPublicKey.fromAmino(e.consensus_pubkey),e.jailed||!1,e.status||0,new c.Int(e.tokens),new c.Dec(e.delegator_shares),t.Description.fromAmino(e.description),Number.parseInt(e.unbonding_height),new Date(e.unbonding_time),t.Commission.fromAmino(e.commission),new c.Int(e.min_self_delegation))},t.prototype.toData=function(){return{operator_address:this.operator_address,consensus_pubkey:this.consensus_pubkey.toData(),jailed:this.jailed,status:this.status,tokens:this.tokens.toString(),delegator_shares:this.delegator_shares.toString(),description:this.description,unbonding_height:this.unbonding_height.toFixed(),unbonding_time:this.unbonding_time.toISOString(),commission:this.commission.toData(),min_self_delegation:this.min_self_delegation.toString()}},t.fromData=function(e){return new t(e.operator_address,u.ValConsPublicKey.fromData(e.consensus_pubkey),e.jailed||!1,e.status||0,new c.Int(e.tokens),new c.Dec(e.delegator_shares),t.Description.fromData(e.description),Number.parseInt(e.unbonding_height),new Date(e.unbonding_time),t.Commission.fromData(e.commission),new c.Int(e.min_self_delegation))},t.prototype.toProto=function(){var e=this,t=e.operator_address,n=e.consensus_pubkey,a=e.jailed,o=e.status,r=e.tokens,i=e.delegator_shares,s=e.description,c=e.unbonding_height,u=e.unbonding_time,f=e.commission,p=e.min_self_delegation;return d.Validator.fromPartial({commission:f.toProto(),consensusPubkey:n.packAny(),delegatorShares:i.toString(),description:s.toProto(),jailed:a,minSelfDelegation:p.toString(),operatorAddress:t,status:o,tokens:r.toString(),unbondingHeight:l.fromNumber(c),unbondingTime:u})},t.fromProto=function(e){return new t(e.operatorAddress,u.ValConsPublicKey.unpackAny(e.consensusPubkey),e.jailed,e.status,new c.Int(e.tokens),new c.Dec(e.delegatorShares),t.Description.fromProto(e.description),e.unbondingHeight.toNumber(),e.unbondingTime,t.Commission.fromProto(e.commission),new c.Int(e.minSelfDelegation))},t}(s.JSONSerializable);t.Validator=f,function(e){e.Status=d.BondStatus;var t=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.moniker=t,i.identity=n,i.website=a,i.details=o,i.security_contact=r,i}return a(t,e),t.prototype.toAmino=function(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}},t.fromAmino=function(e){return new t(e.moniker,e.identity||"",e.website||"",e.details||"",e.security_contact||"")},t.prototype.toData=function(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}},t.fromData=function(e){return new t(e.moniker,e.identity||"",e.website||"",e.details||"",e.security_contact||"")},t.prototype.toProto=function(){var e=this,t=e.moniker,n=e.identity,a=e.website,o=e.details,r=e.security_contact;return d.Description.fromPartial({details:o,identity:n,moniker:t,securityContact:r,website:a})},t.fromProto=function(e){return new t(e.moniker,e.identity,e.website,e.details,e.securityContact)},t}(s.JSONSerializable);e.Description=t;var n=function(e){function t(t,n,a){var o=e.call(this)||this;return o.rate=t,o.max_rate=n,o.max_change_rate=a,o}return a(t,e),t.fromAmino=function(e){var n=e.rate,a=e.max_rate,o=e.max_change_rate;return new t(new c.Dec(n),new c.Dec(a),new c.Dec(o))},t.prototype.toAmino=function(){var e=this,t=e.rate,n=e.max_rate,a=e.max_change_rate;return{rate:t.toString(),max_rate:n.toString(),max_change_rate:a.toString()}},t.fromData=function(e){var n=e.rate,a=e.max_rate,o=e.max_change_rate;return new t(new c.Dec(n),new c.Dec(a),new c.Dec(o))},t.prototype.toData=function(){var e=this,t=e.rate,n=e.max_rate,a=e.max_change_rate;return{rate:t.toString(),max_rate:n.toString(),max_change_rate:a.toString()}},t.fromProto=function(e){return new t(new c.Dec(e.rate),new c.Dec(e.maxRate),new c.Dec(e.maxChangeRate))},t.prototype.toProto=function(){var e=this,t=e.rate,n=e.max_rate,a=e.max_change_rate;return d.CommissionRates.fromPartial({maxChangeRate:a.toString(),maxRate:n.toString(),rate:t.toString()})},t}(s.JSONSerializable);e.CommissionRates=n;var o=function(e){function t(t,n){var a=e.call(this)||this;return a.commission_rates=t,a.update_time=n,a}return a(t,e),t.prototype.toAmino=function(){return{commission_rates:this.commission_rates.toAmino(),update_time:this.update_time.toISOString()}},t.fromAmino=function(e){return new t(n.fromAmino(e.commission_rates),new Date(e.update_time))},t.prototype.toData=function(){return{commission_rates:this.commission_rates.toData(),update_time:this.update_time.toISOString()}},t.fromData=function(e){return new t(n.fromData(e.commission_rates),new Date(e.update_time))},t.prototype.toProto=function(){var e=this.commission_rates,t=this.update_time;return d.Commission.fromPartial({commissionRates:e.toProto(),updateTime:t})},t.fromProto=function(e){return new t(n.fromProto(e.commissionRates),e.updateTime)},t}(s.JSONSerializable);e.Commission=o}(f=t.Validator||(t.Validator={})),t.Validator=f},42610:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgBeginRedelegate=void 0;var o=n(67423),r=n(96533),i=n(85920),s=n(36835),c=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.delegator_address=t,r.validator_src_address=n,r.validator_dst_address=a,r.amount=o,r}return a(t,e),t.fromAmino=function(e,n){var a=e.value,o=a.delegator_address,i=a.validator_src_address,s=a.validator_dst_address,c=a.amount;return new t(o,i,s,r.Coin.fromAmino(c))},t.prototype.toAmino=function(e){var t=this;return{type:e?"staking/MsgBeginRedelegate":"cosmos-sdk/MsgBeginRedelegate",value:{delegator_address:t.delegator_address,validator_src_address:t.validator_src_address,validator_dst_address:t.validator_dst_address,amount:t.amount.toAmino()}}},t.fromData=function(e,n){var a=e.delegator_address,o=e.validator_src_address,i=e.validator_dst_address,s=e.amount;return new t(a,o,i,r.Coin.fromData(s))},t.prototype.toData=function(e){var t=this;return{"@type":"/cosmos.staking.v1beta1.MsgBeginRedelegate",delegator_address:t.delegator_address,validator_src_address:t.validator_src_address,validator_dst_address:t.validator_dst_address,amount:t.amount.toData()}},t.fromProto=function(e,n){return new t(e.delegatorAddress,e.validatorSrcAddress,e.validatorDstAddress,r.Coin.fromProto(e.amount))},t.prototype.toProto=function(e){var t=this,n=t.delegator_address,a=t.validator_src_address,o=t.validator_dst_address,r=t.amount;return s.MsgBeginRedelegate.fromPartial({amount:r.toProto(),delegatorAddress:n,validatorDstAddress:o,validatorSrcAddress:a})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/cosmos.staking.v1beta1.MsgBeginRedelegate",value:s.MsgBeginRedelegate.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgBeginRedelegate.decode(e.value),n)},t}(o.JSONSerializable);t.MsgBeginRedelegate=c},47817:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgCreateValidator=void 0;var o=n(67423),r=n(96533),i=n(49368),s=n(55699),c=n(85920),u=n(36835),d=n(39076),l=function(e){function t(t,n,a,o,r,i,s){var c=e.call(this)||this;return c.description=t,c.commission=n,c.min_self_delegation=a,c.delegator_address=o,c.validator_address=r,c.pubkey=i,c.value=s,c}return a(t,e),t.fromAmino=function(e,n){var a=e.value,o=a.description,c=a.commission,u=a.min_self_delegation,l=a.delegator_address,f=a.validator_address,p=a.pubkey,b=a.value;return new t(o,s.Validator.CommissionRates.fromAmino(c),new i.Int(u),l,f,d.ValConsPublicKey.fromAmino(p),r.Coin.fromAmino(b))},t.prototype.toAmino=function(e){var t=this,n=t.description,a=t.commission,o=t.min_self_delegation,r=t.delegator_address,i=t.validator_address,s=t.pubkey,c=t.value;return{type:e?"staking/MsgCreateValidator":"cosmos-sdk/MsgCreateValidator",value:{description:n,commission:a.toAmino(),min_self_delegation:o.toString(),delegator_address:r,validator_address:i,pubkey:s.toAmino(),value:c.toAmino()}}},t.fromData=function(e,n){var a=e.description,o=e.commission,c=e.min_self_delegation,u=e.delegator_address,l=e.validator_address,f=e.pubkey,p=e.value;return new t(a,s.Validator.CommissionRates.fromData(o),new i.Int(c),u,l,d.ValConsPublicKey.fromData(f),r.Coin.fromData(p))},t.prototype.toData=function(e){var t=this,n=t.description,a=t.commission,o=t.min_self_delegation,r=t.delegator_address,i=t.validator_address,s=t.pubkey,c=t.value;return{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator",description:n,commission:a.toData(),min_self_delegation:o.toString(),delegator_address:r,validator_address:i,pubkey:s.toData(),value:c.toData()}},t.fromProto=function(e,n){return new t(s.Validator.Description.fromProto(e.description),s.Validator.CommissionRates.fromProto(e.commission),new i.Int(e.minSelfDelegation),e.delegatorAddress,e.validatorAddress,d.PublicKey.fromProto(e.pubkey),r.Coin.fromProto(e.value))},t.prototype.toProto=function(e){var t=this,n=t.description,a=t.commission,o=t.min_self_delegation,r=t.delegator_address,i=t.validator_address,s=t.pubkey,c=t.value;return u.MsgCreateValidator.fromPartial({commission:a.toProto(),delegatorAddress:r,description:n.toProto(),minSelfDelegation:o.toString(),pubkey:s.packAny(),validatorAddress:i,value:c.toProto()})},t.prototype.packAny=function(e){return c.Any.fromPartial({typeUrl:"/cosmos.staking.v1beta1.MsgCreateValidator",value:u.MsgCreateValidator.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(u.MsgCreateValidator.decode(e.value),n)},t}(o.JSONSerializable);t.MsgCreateValidator=l},13801:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgDelegate=void 0;var o=n(96533),r=n(67423),i=n(85920),s=n(36835),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.delegator_address=t,o.validator_address=n,o.amount=a,o}return a(t,e),t.fromAmino=function(e,n){var a=e.value,r=a.delegator_address,i=a.validator_address,s=a.amount;return new t(r,i,o.Coin.fromAmino(s))},t.prototype.toAmino=function(e){var t=this;return{type:e?"staking/MsgDelegate":"cosmos-sdk/MsgDelegate",value:{delegator_address:t.delegator_address,validator_address:t.validator_address,amount:t.amount.toAmino()}}},t.fromProto=function(e,n){return new t(e.delegatorAddress,e.validatorAddress,o.Coin.fromProto(e.amount))},t.prototype.toProto=function(e){var t=this,n=t.delegator_address,a=t.validator_address,o=t.amount;return s.MsgDelegate.fromPartial({amount:o.toProto(),delegatorAddress:n,validatorAddress:a})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:s.MsgDelegate.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgDelegate.decode(e.value),n)},t.fromData=function(e,n){var a=e.delegator_address,r=e.validator_address,i=e.amount;return new t(a,r,o.Coin.fromData(i))},t.prototype.toData=function(e){var t=this;return{"@type":"/cosmos.staking.v1beta1.MsgDelegate",delegator_address:t.delegator_address,validator_address:t.validator_address,amount:t.amount.toData()}},t}(r.JSONSerializable);t.MsgDelegate=c},45589:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgEditValidator=void 0;var o=n(67423),r=n(49368),i=n(55699),s=n(85920),c=n(36835),u=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.description=t,r.validator_address=n,r.commission_rate=a,r.min_self_delegation=o,r}return a(t,e),t.fromAmino=function(e,n){var a=e.value,o=a.description,s=a.validator_address,c=a.commission_rate,u=a.min_self_delegation;return new t(i.Validator.Description.fromAmino(o),s,c?new r.Dec(c):void 0,u?new r.Int(u):void 0)},t.prototype.toAmino=function(e){var t=this,n=t.description,a=t.validator_address,o=t.commission_rate,r=t.min_self_delegation;return{type:e?"staking/MsgEditValidator":"cosmos-sdk/MsgEditValidator",value:{description:n,validator_address:a,commission_rate:o?o.toString():void 0,min_self_delegation:r?r.toString():void 0}}},t.fromProto=function(e,n){return new t(i.Validator.Description.fromProto(e.description),e.validatorAddress,""!==e.commissionRate?new r.Dec(e.commissionRate):void 0,""!==e.minSelfDelegation?new r.Int(e.minSelfDelegation):void 0)},t.prototype.toProto=function(e){var t=this,n=t.description,a=t.validator_address,o=t.commission_rate,r=t.min_self_delegation;return c.MsgEditValidator.fromPartial({description:n.toProto(),commissionRate:(null===o||void 0===o?void 0:o.toString())||"",minSelfDelegation:(null===r||void 0===r?void 0:r.toString())||"",validatorAddress:a})},t.prototype.packAny=function(e){return s.Any.fromPartial({typeUrl:"/cosmos.staking.v1beta1.MsgEditValidator",value:c.MsgEditValidator.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.MsgEditValidator.decode(e.value),n)},t.fromData=function(e,n){var a=e.description,o=e.validator_address,s=e.commission_rate,c=e.min_self_delegation;return new t(i.Validator.Description.fromData(a),o,s?new r.Dec(s):void 0,c?new r.Int(c):void 0)},t.prototype.toData=function(e){var t=this,n=t.description,a=t.validator_address,o=t.commission_rate,r=t.min_self_delegation;return{"@type":"/cosmos.staking.v1beta1.MsgEditValidator",description:n,validator_address:a,commission_rate:o?o.toString():void 0,min_self_delegation:r?r.toString():void 0}},t}(o.JSONSerializable);t.MsgEditValidator=u,function(e){e.DESC_DO_NOT_MODIFY={moniker:"[do-not-modify]",website:"[do-not-modify]",identity:"[do-not-modify]",details:"[do-not-modify]",security_contact:"[do-not-modify]"}}(u=t.MsgEditValidator||(t.MsgEditValidator={})),t.MsgEditValidator=u},46705:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgUndelegate=void 0;var o=n(96533),r=n(67423),i=n(85920),s=n(36835),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.delegator_address=t,o.validator_address=n,o.amount=a,o}return a(t,e),t.fromAmino=function(e,n){var a=e.value,r=a.delegator_address,i=a.validator_address,s=a.amount;return new t(r,i,o.Coin.fromAmino(s))},t.prototype.toAmino=function(e){var t=this;return{type:e?"staking/MsgUndelegate":"cosmos-sdk/MsgUndelegate",value:{delegator_address:t.delegator_address,validator_address:t.validator_address,amount:t.amount.toAmino()}}},t.fromProto=function(e,n){return new t(e.delegatorAddress,e.validatorAddress,o.Coin.fromProto(e.amount))},t.prototype.toProto=function(e){var t=this,n=t.delegator_address,a=t.validator_address,o=t.amount;return s.MsgUndelegate.fromPartial({amount:o.toProto(),delegatorAddress:n,validatorAddress:a})},t.prototype.packAny=function(e){return i.Any.fromPartial({typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:s.MsgUndelegate.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(s.MsgUndelegate.decode(e.value),n)},t.fromData=function(e,n){var a=e.delegator_address,r=e.validator_address,i=e.amount;return new t(a,r,o.Coin.fromData(i))},t.prototype.toData=function(e){var t=this;return{"@type":"/cosmos.staking.v1beta1.MsgUndelegate",delegator_address:t.delegator_address,validator_address:t.validator_address,amount:t.amount.toData()}},t}(r.JSONSerializable);t.MsgUndelegate=c},44888:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(13801),t),o(n(46705),t),o(n(42610),t),o(n(47817),t),o(n(45589),t)},12560:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyConstraints=void 0;var o=n(67423),r=n(96533),i=n(49368),s=n(93896),c=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.cap=a,r.rate_min=new i.Dec(t),r.rate_max=new i.Dec(n),r.change_rate_max=new i.Dec(o),r}return a(t,e),t.fromAmino=function(e){var n=e.rate_min,a=e.rate_max,o=e.cap,i=e.change_rate_max;return new t(n,a,r.Coin.fromAmino(o),i)},t.prototype.toAmino=function(){var e=this,t=e.rate_min,n=e.rate_max,a=e.cap,o=e.change_rate_max;return{rate_min:t.toString(),rate_max:n.toString(),cap:a.toAmino(),change_rate_max:o.toString()}},t.fromData=function(e){var n=e.rate_min,a=e.rate_max,o=e.cap,i=e.change_rate_max;return new t(n,a,r.Coin.fromData(o),i)},t.prototype.toData=function(){var e=this,t=e.rate_min,n=e.rate_max,a=e.cap,o=e.change_rate_max;return{rate_min:t.toString(),rate_max:n.toString(),cap:a.toData(),change_rate_max:o.toString()}},t.fromProto=function(e){return new t(e.rateMax,e.rateMin,r.Coin.fromProto(e.cap),e.changeRateMax)},t.prototype.toProto=function(){var e=this,t=e.rate_min,n=e.rate_max,a=e.cap,o=e.change_rate_max;return s.PolicyConstraints.fromPartial({cap:a.toProto(),changeRateMax:o.toString(),rateMax:n.toString(),rateMin:t.toString()})},t.prototype.clamp=function(e,t){var n=new i.Dec(e),a=new i.Dec(t);a.lt(this.rate_min)?a=this.rate_min:a.gt(this.rate_max)&&(a=this.rate_max);var o=a.sub(n);return a.gt(n)?o.gt(this.change_rate_max)&&(a=n.add(this.change_rate_max)):o.abs().gt(this.change_rate_max)&&(a=n.sub(this.change_rate_max)),a},t}(o.JSONSerializable);t.PolicyConstraints=c},73660:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Plan=void 0;var r=n(67423),i=n(36495),s=o(n(29600)),c=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.name=t,i.time=n,i.height=a,i.info=o,i.upgraded_client_state=r,i}return a(t,e),t.fromAmino=function(e){var n=e.name,a=e.time,o=e.height,r=e.info,i=e.upgraded_client_state;return new t(n,a?new Date(a):void 0,o,r,i)},t.prototype.toAmino=function(){var e=this,t=e.name,n=e.time,a=e.height,o=e.info,r=e.upgraded_client_state;return{name:t,time:n?n.toISOString().replace(/\.000Z$/,"Z"):void 0,height:a,info:o,upgraded_client_state:r}},t.fromData=function(e){var n=e.name,a=e.time,o=e.height,r=e.info,i=e.upgraded_client_state;return new t(n,a?new Date(a):void 0,o,r,i)},t.prototype.toData=function(){var e=this,t=e.name,n=e.time,a=e.height,o=e.info,r=e.upgraded_client_state;return{name:t,time:n?n.toISOString().replace(/\.000Z$/,"Z"):void 0,height:a,info:o,upgraded_client_state:r}},t.fromProto=function(e){return new t(e.name,e.time,e.height.toString(),e.info,e.upgradedClientState)},t.prototype.toProto=function(){var e=this,t=e.name,n=e.time,a=e.height,o=e.info,r=e.upgraded_client_state;return i.Plan.fromPartial({name:t,time:n,height:s.default.fromString(a),info:o,upgradedClientState:r})},t}(r.JSONSerializable);t.Plan=c},56502:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(73660),t),o(n(87368),t)},51019:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CancelSoftwareUpgradeProposal=void 0;var o=n(67423),r=n(50922),i=n(6025),s=function(e){function t(t,n){var a=e.call(this)||this;return a.title=t,a.description=n,a}return a(t,e),t.fromAmino=function(e,n){var a=e.value;return new t(a.title,a.description)},t.prototype.toAmino=function(e){return{type:e?"upgrade/CancelSoftwareUpgradeProposal":"cosmos-sdk/CancelSoftwareUpgradeProposal",value:{title:this.title,description:this.description}}},t.fromData=function(e,n){return new t(e.title,e.description)},t.prototype.toData=function(e){return{"@type":"/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal",title:this.title,description:this.description}},t.fromProto=function(e,n){return new t(e.title,e.description)},t.prototype.toProto=function(e){var t=this.title,n=this.description;return i.CancelSoftwareUpgradeProposal.fromPartial({title:t,description:n})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal",value:i.CancelSoftwareUpgradeProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.CancelSoftwareUpgradeProposal.decode(e.value),n)},t}(o.JSONSerializable);t.CancelSoftwareUpgradeProposal=s},61975:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SoftwareUpgradeProposal=void 0;var o=n(67423),r=n(50922),i=n(6025),s=n(73660),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.plan=a,o}return a(t,e),t.fromAmino=function(e,n){var a=e.value,o=a.title,r=a.description,i=a.plan;return new t(o,r,i?s.Plan.fromAmino(i):void 0)},t.prototype.toAmino=function(e){var t=this,n=t.title,a=t.description,o=t.plan;return{type:e?"upgrade/SoftwareUpgradeProposal":"cosmos-sdk/SoftwareUpgradeProposal",value:{title:n,description:a,plan:o?o.toAmino():void 0}}},t.fromData=function(e,n){var a=e.title,o=e.description,r=e.plan;return new t(a,o,r?s.Plan.fromData(r):void 0)},t.prototype.toData=function(e){var t=this,n=t.title,a=t.description,o=t.plan;return{"@type":"/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal",title:n,description:a,plan:o?o.toData():void 0}},t.fromProto=function(e,n){return new t(e.title,e.description,e.plan?s.Plan.fromProto(e.plan):void 0)},t.prototype.toProto=function(e){var t=this,n=t.title,a=t.description,o=t.plan;return i.SoftwareUpgradeProposal.fromPartial({title:n,description:a,plan:o?o.toProto():void 0})},t.prototype.packAny=function(e){return r.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal",value:i.SoftwareUpgradeProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(i.SoftwareUpgradeProposal.decode(e.value),n)},t}(o.JSONSerializable);t.SoftwareUpgradeProposal=c},87368:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(61975),t),o(n(51019),t)},441:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Period=void 0;var s=n(74600),c=n(46619),u=n(67423),d=i(n(29600)),l=function(e){function t(t,n){var a=e.call(this)||this;return a.length=t,a.amount=new s.Coins(n),a}return a(t,e),t.fromAmino=function(e,n){var a=e.length,o=e.amount;return new t(Number.parseInt(a),s.Coins.fromAmino(o))},t.prototype.toAmino=function(e){var t=this.length,n=this.amount;return{length:t.toFixed(),amount:n.toAmino()}},t.fromData=function(e,n){var a=e.length,o=e.amount;return new t(Number.parseInt(a),s.Coins.fromData(o))},t.prototype.toData=function(e){var t=this.length,n=this.amount;return{length:t.toFixed(),amount:n.toData()}},t.fromProto=function(e,n){return new t(e.length.toNumber(),s.Coins.fromProto(e.amount))},t.prototype.toProto=function(e){var t=this.length,n=this.amount;return c.Period.fromPartial({length:d.fromNumber(t),amount:n.toProto()})},t}(u.JSONSerializable);t.Period=l},18176:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(441),t),o(n(28626),t)},98470:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgCreatePeriodicVestingAccount=void 0;var r=n(441),i=n(67423),s=n(85920),c=n(60279),u=o(n(29600)),d=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.from_address=t,r.to_address=n,r.start_time=a,r.vesting_periods=o,r}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.from_address,i=a.to_address,s=a.start_time,c=a.vesting_periods;return new t(o,i,Number.parseInt(s),c.map((function(e){return r.Period.fromAmino(e,n)})))},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.start_time,r=t.vesting_periods;return{type:"cosmos-sdk/MsgCreatePeriodicVestingAccount",value:{from_address:n,to_address:a,start_time:o.toFixed(),vesting_periods:r.map((function(t){return t.toAmino(e)}))}}},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.from_address,o=e.to_address,i=e.start_time,s=e.vesting_periods;return new t(a,o,Number.parseInt(i),s.map((function(e){return r.Period.fromData(e,n)})))},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.start_time,r=t.vesting_periods;return{"@type":"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount",from_address:n,to_address:a,start_time:o.toFixed(),vesting_periods:r.map((function(t){return t.toData(e)}))}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.fromAddress,e.toAddress,e.startTime.toNumber(),e.vestingPeriods.map((function(e){return r.Period.fromProto(e,n)})))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.start_time,r=t.vesting_periods;return c.MsgCreatePeriodicVestingAccount.fromPartial({fromAddress:n,toAddress:a,startTime:u.default.fromNumber(o),vestingPeriods:r.map((function(t){return t.toProto(e)}))})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return s.Any.fromPartial({typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount",value:c.MsgCreatePeriodicVestingAccount.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(c.MsgCreatePeriodicVestingAccount.decode(e.value),n)},t}(i.JSONSerializable);t.MsgCreatePeriodicVestingAccount=d},91187:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgCreateVestingAccount=void 0;var r=n(74600),i=n(67423),s=n(85920),c=n(60279),u=o(n(29600)),d=function(e){function t(t,n,a,o,i){var s=e.call(this)||this;return s.from_address=t,s.to_address=n,s.end_time=o,s.delayed=i,s.amount=new r.Coins(a),s}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.from_address,i=a.to_address,s=a.amount,c=a.end_time,u=a.delayed;return new t(o,i,r.Coins.fromAmino(s),Number.parseInt(c),u)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.amount,r=t.end_time,i=t.delayed;return{type:"cosmos-sdk/MsgCreateVestingAccount",value:{from_address:n,to_address:a,amount:o.toAmino(),end_time:r.toFixed(),delayed:i}}},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.from_address,o=e.to_address,i=e.amount,s=e.end_time,c=e.delayed;return new t(a,o,r.Coins.fromData(i),Number.parseInt(s),c)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.amount,r=t.end_time,i=t.delayed;return{"@type":"/cosmos.vesting.v1beta1.MsgCreateVestingAccount",from_address:n,to_address:a,amount:o.toData(),end_time:r.toFixed(),delayed:i}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.fromAddress,e.toAddress,r.Coins.fromProto(e.amount),e.endTime.toNumber(),e.delayed)},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.from_address,a=t.to_address,o=t.amount,r=t.end_time,i=t.delayed;return c.MsgCreateVestingAccount.fromPartial({fromAddress:n,toAddress:a,amount:o.toProto(),endTime:u.default.fromNumber(r),delayed:i})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return s.Any.fromPartial({typeUrl:"/cosmos.vesting.v1beta1.MsgCreateVestingAccount",value:c.MsgCreateVestingAccount.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(c.MsgCreateVestingAccount.decode(e.value),n)},t}(i.JSONSerializable);t.MsgCreateVestingAccount=d},25937:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgDonateAllVestingTokens=void 0;var o=n(67423),r=n(85920),i=n(60279),s=function(e){function t(t){var n=e.call(this)||this;return n.from_address=t,n}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.value.from_address)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");return{type:"cosmos-sdk/MsgDonateAllVestingTokens",value:{from_address:this.from_address}}},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.from_address)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");return{"@type":"/cosmos.vesting.v1beta1.MsgDonateAllVestingTokens",from_address:this.from_address}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.fromAddress)},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");return i.MsgDonateAllVestingTokens.fromPartial({fromAddress:this.from_address})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/cosmos.vesting.v1beta1.MsgDonateAllVestingTokens",value:i.MsgDonateAllVestingTokens.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(i.MsgDonateAllVestingTokens.decode(e.value),n)},t}(o.JSONSerializable);t.MsgDonateAllVestingTokens=s},28626:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(98470),t),o(n(91187),t),o(n(25937),t)},68683:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AbsoluteTxPosition=void 0;var s=n(74927),c=n(67423),u=i(n(29600)),d=function(e){function t(t,n){var a=e.call(this)||this;return a.block_height=t,a.tx_index=n,a}return a(t,e),t.fromAmino=function(e){return new t(Number.parseInt(e.block_height),Number.parseInt(e.tx_index))},t.prototype.toAmino=function(){return{block_height:this.block_height.toFixed(),tx_index:this.tx_index.toFixed()}},t.fromData=function(e){return new t(Number.parseInt(e.block_height),Number.parseInt(e.tx_index))},t.prototype.toData=function(){return{block_height:this.block_height.toFixed(),tx_index:this.tx_index.toFixed()}},t.fromProto=function(e){return new t(e.blockHeight.toNumber(),e.txIndex.toNumber())},t.prototype.toProto=function(){return s.AbsoluteTxPosition.fromPartial({blockHeight:u.fromNumber(this.block_height),txIndex:u.fromNumber(this.tx_index)})},t}(c.JSONSerializable);t.AbsoluteTxPosition=d},14152:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.AccessConfig=t.AccessType=void 0;var o=n(74927);Object.defineProperty(t,"AccessType",{enumerable:!0,get:function(){return o.AccessType}});var r=n(67423),i=n(18522),s=function(e){function t(t,n){var a=e.call(this)||this;return a.permission=t,a.address=n,a}return a(t,e),t.fromAmino=function(e){return new t((0,i.convertAccessTypeFromJSON)(e.permission),e.address)},t.prototype.toAmino=function(){return{permission:(0,o.accessTypeToJSON)(this.permission),address:this.address}},t.fromData=function(e){return new t((0,i.convertAccessTypeFromJSON)(e.permission),e.address)},t.prototype.toData=function(){return{permission:(0,o.accessTypeToJSON)(this.permission),address:this.address}},t.fromProto=function(e){return new t(e.permission,e.address)},t.prototype.toProto=function(){return o.AccessConfig.fromPartial({permission:this.permission,address:this.address})},t}(r.JSONSerializable);t.AccessConfig=s},96016:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessConfigUpdate=void 0;var s=n(79985),c=n(67423),u=n(14152),d=i(n(29600)),l=function(e){function t(t,n){var a=e.call(this)||this;return a.code_id=t,a.instantiate_permission=n,a}return a(t,e),t.fromAmino=function(e){return new t(Number.parseInt(e.code_id),e.instantiate_permission?u.AccessConfig.fromAmino(e.instantiate_permission):void 0)},t.prototype.toAmino=function(){var e;return{code_id:this.code_id.toFixed(),instantiate_permission:null===(e=this.instantiate_permission)||void 0===e?void 0:e.toAmino()}},t.fromData=function(e){return new t(Number.parseInt(e.code_id),e.instantiate_permission?u.AccessConfig.fromData(e.instantiate_permission):void 0)},t.prototype.toData=function(){var e;return{code_id:this.code_id.toFixed(),instantiate_permission:null===(e=this.instantiate_permission)||void 0===e?void 0:e.toData()}},t.fromProto=function(e){return new t(e.codeId.toNumber(),e.instantiatePermission?u.AccessConfig.fromProto(e.instantiatePermission):void 0)},t.prototype.toProto=function(){var e;return s.AccessConfigUpdate.fromPartial({codeId:d.fromNumber(this.code_id),instantiatePermission:null===(e=this.instantiate_permission)||void 0===e?void 0:e.toProto()})},t}(c.JSONSerializable);t.AccessConfigUpdate=l},89399:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.AccessTypeParam=t.AccessType=void 0;var o=n(74927);Object.defineProperty(t,"AccessType",{enumerable:!0,get:function(){return o.AccessType}});var r=n(67423),i=n(18522),s=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return a(t,e),t.fromAmino=function(e){return new t((0,i.convertAccessTypeFromJSON)(e.value))},t.prototype.toAmino=function(){return{value:(0,o.accessTypeToJSON)(this.value)}},t.fromData=function(e){return new t((0,i.convertAccessTypeFromJSON)(e.value))},t.prototype.toData=function(){return{value:(0,o.accessTypeToJSON)(this.value)}},t.fromProto=function(e){return new t(e.value)},t.prototype.toProto=function(){return o.AccessTypeParam.fromPartial({value:this.value})},t}(r.JSONSerializable);t.AccessTypeParam=s},93522:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryEntry=void 0;var c=n(74927),u=n(67423),d=s(n(29600)),l=n(68683),f=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.operation=t,r.code_id=n,r.updated=a,r.msg=o,r}return o(t,e),t.fromAmino=function(e){return new t((0,c.contractCodeHistoryOperationTypeFromJSON)(e.operation),Number.parseInt(e.code_id),e.updated?l.AbsoluteTxPosition.fromAmino(e.updated):void 0,e.msg)},t.prototype.toAmino=function(){var e;return{operation:(0,c.contractCodeHistoryOperationTypeToJSON)(this.operation),code_id:this.code_id.toFixed(),updated:null===(e=this.updated)||void 0===e?void 0:e.toAmino(),msg:this.msg}},t.fromData=function(e){return new t((0,c.contractCodeHistoryOperationTypeFromJSON)(e.operation),Number.parseInt(e.code_id),e.updated?l.AbsoluteTxPosition.fromData(e.updated):void 0,e.msg)},t.prototype.toData=function(){var e;return{operation:(0,c.contractCodeHistoryOperationTypeToJSON)(this.operation),code_id:this.code_id.toFixed(),updated:null===(e=this.updated)||void 0===e?void 0:e.toData(),msg:this.msg}},t.fromProto=function(e){return new t(e.operation,e.codeId.toNumber(),e.updated?l.AbsoluteTxPosition.fromProto(e.updated):void 0,JSON.parse(a.from(e.msg).toString("utf-8")))},t.prototype.toProto=function(){var e;return c.ContractCodeHistoryEntry.fromPartial({operation:this.operation,codeId:d.fromNumber(this.code_id),updated:null===(e=this.updated)||void 0===e?void 0:e.toProto(),msg:a.from(JSON.stringify((0,u.removeNull)(this.msg)),"utf-8")})},t}(u.JSONSerializable);t.HistoryEntry=f},67407:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(89399),t),o(n(14152),t)},21280:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClearContractAdmin=void 0;var o=n(67423),r=n(85920),i=n(5427),s=n(58348),c=function(e){function t(t,n){var a=e.call(this)||this;return a.admin=t,a.contract=n,a}return a(t,e),t.fromAmino=function(e,n){if(n){var a=e.value;return new t(a.admin,a.contract)}var o=e.value;return new t(o.sender,o.contract)},t.prototype.toAmino=function(e){var t=this.admin,n=this.contract;return e?{type:"wasm/MsgClearContractAdmin",value:{admin:t,contract:n}}:{type:"wasm/MsgClearAdmin",value:{sender:t,contract:n}}},t.fromProto=function(e,n){if(n){var a=e;return new t(a.admin,a.contract)}var o=e;return new t(o.sender,o.contract)},t.prototype.toProto=function(e){return e?i.MsgClearContractAdmin.fromPartial({admin:this.admin,contract:this.contract}):s.MsgClearAdmin.fromPartial({sender:this.admin,contract:this.contract})},t.prototype.packAny=function(e){return e?r.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgClearContractAdmin",value:i.MsgClearContractAdmin.encode(this.toProto(e)).finish()}):r.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:s.MsgClearAdmin.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return n?t.fromProto(i.MsgClearContractAdmin.decode(e.value),n):t.fromProto(s.MsgClearAdmin.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e;return new t(a.admin,a.contract)}var o=e;return new t(o.sender,o.contract)},t.prototype.toData=function(e){return e?{"@type":"/terra.wasm.v1beta1.MsgClearContractAdmin",admin:this.admin,contract:this.contract}:{"@type":"/cosmwasm.wasm.v1.MsgClearAdmin",sender:this.admin,contract:this.contract}},t}(o.JSONSerializable);t.MsgClearContractAdmin=c},9875:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgExecuteContract=void 0;var r=n(67423),i=n(74600),s=n(85920),c=n(5427),u=n(58348),d=function(e){function t(t,n,a,o){void 0===o&&(o={});var r=e.call(this)||this;return r.sender=t,r.contract=n,r.execute_msg=a,r.coins=new i.Coins(o),r}return o(t,e),t.fromAmino=function(e,n){if(n){var a=e.value,o=a.sender,r=a.contract,s=a.execute_msg,c=a.coins;return new t(o,r,s,i.Coins.fromAmino(c))}var u=e.value,d=(o=u.sender,r=u.contract,u.msg),l=u.funds;return new t(o,r,d,i.Coins.fromAmino(l))},t.prototype.toAmino=function(e){var t=this,n=t.sender,a=t.contract,o=t.execute_msg,i=t.coins;return e?{type:"wasm/MsgExecuteContract",value:{sender:n,contract:a,execute_msg:(0,r.removeNull)(o),coins:i.toAmino()}}:{type:"wasm/MsgExecuteContract",value:{sender:n,contract:a,msg:(0,r.removeNull)(o),funds:i.toAmino()}}},t.fromProto=function(e,n){var o;return n?new t((o=e).sender,o.contract,JSON.parse(a.from(o.executeMsg).toString("utf-8")),i.Coins.fromProto(o.coins)):new t((o=e).sender,o.contract,JSON.parse(a.from(o.msg).toString("utf-8")),i.Coins.fromProto(o.funds))},t.prototype.toProto=function(e){var t=this,n=t.sender,o=t.contract,i=t.execute_msg,s=t.coins;return e?c.MsgExecuteContract.fromPartial({coins:s.toProto(),contract:o,sender:n,executeMsg:a.from(JSON.stringify((0,r.removeNull)(i)),"utf-8")}):u.MsgExecuteContract.fromPartial({funds:s.toProto(),contract:o,sender:n,msg:a.from(JSON.stringify((0,r.removeNull)(i)),"utf-8")})},t.prototype.packAny=function(e){return e?s.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgExecuteContract",value:c.MsgExecuteContract.encode(this.toProto(e)).finish()}):s.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:u.MsgExecuteContract.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(n?c.MsgExecuteContract.decode(e.value):u.MsgExecuteContract.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e,o=a.sender,r=a.contract,s=a.execute_msg,c=a.coins;return new t(o,r,s,i.Coins.fromData(c))}var u=e,d=(o=u.sender,r=u.contract,u.msg),l=u.funds;return new t(o,r,d,i.Coins.fromData(l))},t.prototype.toData=function(e){var t=this,n=t.sender,a=t.contract,o=t.execute_msg,r=t.coins;return e?{"@type":"/terra.wasm.v1beta1.MsgExecuteContract",sender:n,contract:a,execute_msg:o,coins:r.toData()}:{"@type":"/cosmwasm.wasm.v1.MsgExecuteContract",sender:n,contract:a,msg:o,funds:r.toData()}},t}(r.JSONSerializable);t.MsgExecuteContract=d},51351:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgInstantiateContract=void 0;var c=n(67423),u=n(74600),d=n(85920),l=n(5427),f=n(58348),p=s(n(29600)),b=function(e){function t(t,n,a,o,r,i){void 0===r&&(r={});var s=e.call(this)||this;return s.sender=t,s.admin=n,s.code_id=a,s.init_msg=o,s.label=i,s.init_coins=new u.Coins(r),s}return o(t,e),t.fromAmino=function(e,n){if(n){var a=e.value,o=a.sender,r=a.admin,i=a.code_id,s=a.init_msg,c=a.init_coins;return new t(o,r,Number.parseInt(i),s,u.Coins.fromAmino(c))}var d=e.value,l=(o=d.sender,r=d.admin,i=d.code_id,d.msg),f=d.funds,p=d.label;return new t(o,r,Number.parseInt(i),l,u.Coins.fromAmino(f),p)},t.prototype.toAmino=function(e){var t=this,n=t.sender,a=t.admin,o=t.code_id,r=t.init_msg,i=t.init_coins,s=t.label;return e?{type:"wasm/MsgInstantiateContract",value:{sender:n,admin:a,code_id:o.toFixed(),init_msg:(0,c.removeNull)(r),init_coins:i.toAmino()}}:{type:"wasm/MsgInstantiateContract",value:{sender:n,admin:a,code_id:o.toFixed(),label:s,msg:(0,c.removeNull)(r),funds:i.toAmino()}}},t.fromProto=function(e,n){var o;return n?new t((o=e).sender,""!==o.admin?o.admin:void 0,o.codeId.toNumber(),JSON.parse(a.from(o.initMsg).toString("utf-8")),u.Coins.fromProto(o.initCoins)):new t((o=e).sender,""!==o.admin?o.admin:void 0,o.codeId.toNumber(),JSON.parse(a.from(o.msg).toString("utf-8")),u.Coins.fromProto(o.funds),""!==o.label?o.label:void 0)},t.prototype.toProto=function(e){var t=this,n=t.sender,o=t.admin,r=t.code_id,i=t.init_msg,s=t.init_coins,c=t.label;return e?l.MsgInstantiateContract.fromPartial({admin:o,codeId:p.fromNumber(r),initCoins:s.toProto(),initMsg:a.from(JSON.stringify(i),"utf-8"),sender:n}):f.MsgInstantiateContract.fromPartial({admin:o,codeId:p.fromNumber(r),funds:s.toProto(),msg:a.from(JSON.stringify(i),"utf-8"),sender:n,label:c})},t.prototype.packAny=function(e){return e?d.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgInstantiateContract",value:l.MsgInstantiateContract.encode(this.toProto(e)).finish()}):d.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:f.MsgInstantiateContract.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return n?t.fromProto(l.MsgInstantiateContract.decode(e.value),n):t.fromProto(f.MsgInstantiateContract.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e,o=a.sender,r=a.admin,i=a.code_id,s=a.init_msg,c=a.init_coins;return new t(o,""!==r?r:void 0,Number.parseInt(i),s,u.Coins.fromData(c))}var d=e,l=(o=d.sender,r=d.admin,i=d.code_id,d.label),f=d.msg,p=d.funds;return new t(o,""!==r?r:void 0,Number.parseInt(i),f,u.Coins.fromData(p),l)},t.prototype.toData=function(e){var t=this,n=t.sender,a=t.admin,o=t.code_id,r=t.label,i=t.init_msg,s=t.init_coins;return e?{"@type":"/terra.wasm.v1beta1.MsgInstantiateContract",sender:n,admin:a||"",code_id:o.toFixed(),init_msg:(0,c.removeNull)(i),init_coins:s.toData()}:{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract",sender:n,admin:a||"",code_id:o.toFixed(),label:r,msg:(0,c.removeNull)(i),funds:s.toData()}},t}(c.JSONSerializable);t.MsgInstantiateContract=b},58080:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgMigrateCode=void 0;var c=n(67423),u=n(85920),d=n(5427),l=s(n(29600)),f=function(e){function t(t,n,a){var o=e.call(this)||this;return o.sender=t,o.code_id=n,o.wasm_byte_code=a,o}return o(t,e),t.fromAmino=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.value,o=a.sender,r=a.code_id,i=a.wasm_byte_code;return new t(o,Number.parseInt(r),i)},t.prototype.toAmino=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.sender,a=t.code_id,o=t.wasm_byte_code;return{type:"wasm/MsgMigrateCode",value:{sender:n,code_id:a.toFixed(),wasm_byte_code:o}}},t.fromProto=function(e,n){if(!n)throw new Error("Not supported for the network");return new t(e.sender,e.codeId.toNumber(),a.from(e.wasmByteCode).toString("base64"))},t.prototype.toProto=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.sender,o=t.code_id,r=t.wasm_byte_code;return d.MsgMigrateCode.fromPartial({codeId:l.fromNumber(o),sender:n,wasmByteCode:a.from(r,"base64")})},t.prototype.packAny=function(e){if(!e)throw new Error("Not supported for the network");return u.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgMigrateCode",value:d.MsgMigrateCode.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(!n)throw new Error("Not supported for the network");return t.fromProto(d.MsgMigrateCode.decode(e.value),n)},t.fromData=function(e,n){if(!n)throw new Error("Not supported for the network");var a=e.sender,o=e.code_id,r=e.wasm_byte_code;return new t(a,Number.parseInt(o),r)},t.prototype.toData=function(e){if(!e)throw new Error("Not supported for the network");var t=this,n=t.sender,a=t.code_id,o=t.wasm_byte_code;return{"@type":"/terra.wasm.v1beta1.MsgMigrateCode",sender:n,code_id:a.toFixed(),wasm_byte_code:o}},t}(c.JSONSerializable);t.MsgMigrateCode=f},58890:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgMigrateContract=void 0;var c=n(67423),u=n(85920),d=n(5427),l=n(58348),f=s(n(29600)),p=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.admin=t,r.contract=n,r.new_code_id=a,r.migrate_msg=o,r}return o(t,e),t.fromAmino=function(e,n){if(n){var a=e.value,o=a.admin,r=a.contract,i=a.new_code_id,s=a.migrate_msg;return new t(o,r,Number.parseInt(i),s)}var c=e.value,u=c.sender,d=(r=c.contract,c.code_id),l=c.msg;return new t(u,r,Number.parseInt(d),l)},t.prototype.toAmino=function(e){if(e){var t=this,n=t.admin,a=t.contract,o=t.new_code_id,r=t.migrate_msg;return{type:"wasm/MsgMigrateContract",value:{admin:n,contract:a,new_code_id:o.toFixed(),migrate_msg:(0,c.removeNull)(r)}}}var i=this;n=i.admin,a=i.contract,o=i.new_code_id,r=i.migrate_msg;return{type:"wasm/MsgMigrateContract",value:{sender:n,contract:a,code_id:o.toFixed(),msg:(0,c.removeNull)(r)}}},t.fromProto=function(e,n){var o;return n?new t((o=e).admin,o.contract,o.newCodeId.toNumber(),JSON.parse(a.from(o.migrateMsg).toString("utf-8"))):new t((o=e).sender,o.contract,o.codeId.toNumber(),JSON.parse(a.from(o.msg).toString("utf-8")))},t.prototype.toProto=function(e){var t=this,n=t.admin,o=t.contract,r=t.new_code_id,i=t.migrate_msg;return e?d.MsgMigrateContract.fromPartial({admin:n,contract:o,newCodeId:f.fromNumber(r),migrateMsg:a.from(JSON.stringify(i),"utf-8")}):l.MsgMigrateContract.fromPartial({sender:n,contract:o,codeId:f.fromNumber(r),msg:a.from(JSON.stringify(i),"utf-8")})},t.prototype.packAny=function(e){return e?u.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgMigrateContract",value:d.MsgMigrateContract.encode(this.toProto(e)).finish()}):u.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:l.MsgMigrateContract.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(n?d.MsgMigrateContract.decode(e.value):l.MsgMigrateContract.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e,o=a.admin,r=a.contract,i=a.new_code_id,s=a.migrate_msg;return new t(o,r,Number.parseInt(i),s)}var c=e,u=c.sender,d=(r=c.contract,c.code_id),l=c.msg;return new t(u,r,Number.parseInt(d),l)},t.prototype.toData=function(e){var t=this,n=t.admin,a=t.contract,o=t.new_code_id,r=t.migrate_msg;return e?{"@type":"/terra.wasm.v1beta1.MsgMigrateContract",admin:n,contract:a,new_code_id:o.toFixed(),migrate_msg:(0,c.removeNull)(r)}:{"@type":"/cosmwasm.wasm.v1.MsgMigrateContract",sender:n,contract:a,code_id:o.toFixed(),msg:(0,c.removeNull)(r)}},t}(c.JSONSerializable);t.MsgMigrateContract=p},10864:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgStoreCode=void 0;var r=n(67423),i=n(85920),s=n(5427),c=n(58348),u=n(14152),d=function(e){function t(t,n,a){var o=e.call(this)||this;return o.sender=t,o.wasm_byte_code=n,o.instantiate_permission=a,o}return o(t,e),t.fromAmino=function(e,n){if(n){var a=e.value;return new t(r=a.sender,i=a.wasm_byte_code)}var o=e.value,r=o.sender,i=o.wasm_byte_code,s=o.instantiate_permission;return new t(r,i,s?u.AccessConfig.fromAmino(s):void 0)},t.prototype.toAmino=function(e){var t=this,n=t.sender,a=t.wasm_byte_code,o=t.instantiate_permission;return e?{type:"wasm/MsgStoreCode",value:{sender:n,wasm_byte_code:a}}:{type:"wasm/MsgStoreCode",value:{sender:n,wasm_byte_code:a,instantiate_permission:null===o||void 0===o?void 0:o.toAmino()}}},t.fromProto=function(e,n){if(n)return new t(e.sender,a.from(e.wasmByteCode).toString("base64"));var o=e;return new t(o.sender,a.from(o.wasmByteCode).toString("base64"),o.instantiatePermission?u.AccessConfig.fromProto(o.instantiatePermission):void 0)},t.prototype.toProto=function(e){var t=this,n=t.sender,o=t.wasm_byte_code,r=t.instantiate_permission;return e?s.MsgStoreCode.fromPartial({sender:n,wasmByteCode:a.from(o,"base64")}):c.MsgStoreCode.fromPartial({sender:n,wasmByteCode:a.from(o,"base64"),instantiatePermission:null===r||void 0===r?void 0:r.toProto()})},t.prototype.packAny=function(e){var t;return t=e?"/terra.wasm.v1beta1.MsgStoreCode":"/cosmwasm.wasm.v1.MsgStoreCode",i.Any.fromPartial({typeUrl:t,value:e?s.MsgStoreCode.encode(this.toProto(e)).finish():c.MsgStoreCode.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return n?t.fromProto(s.MsgStoreCode.decode(e.value),n):t.fromProto(c.MsgStoreCode.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e;return new t(r=a.sender,i=a.wasm_byte_code)}var o=e,r=o.sender,i=o.wasm_byte_code,s=o.instantiate_permission;return new t(r,i,s?u.AccessConfig.fromData(s):void 0)},t.prototype.toData=function(e){var t=this,n=t.sender,a=t.wasm_byte_code,o=t.instantiate_permission;return e?{"@type":"/terra.wasm.v1beta1.MsgStoreCode",sender:n,wasm_byte_code:a}:{"@type":"/cosmwasm.wasm.v1.MsgStoreCode",sender:n,wasm_byte_code:a,instantiate_permission:null===o||void 0===o?void 0:o.toData()}},t}(r.JSONSerializable);t.MsgStoreCode=d},40940:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MsgUpdateContractAdmin=void 0;var o=n(67423),r=n(85920),i=n(5427),s=n(58348),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.admin=t,o.new_admin=n,o.contract=a,o}return a(t,e),t.fromAmino=function(e,n){if(n){var a=e.value;return new t(a.admin,a.new_admin,a.contract)}var o=e.value;return new t(o.sender,o.new_admin,o.contract)},t.prototype.toAmino=function(e){var t=this,n=t.admin,a=t.new_admin,o=t.contract;return e?{type:"wasm/MsgUpdateContractAdmin",value:{admin:n,new_admin:a,contract:o}}:{type:"wasm/MsgUpdateAdmin",value:{sender:n,new_admin:a,contract:o}}},t.fromProto=function(e,n){var a;return new t(n?(a=e).admin:(a=e).sender,a.newAdmin,a.contract)},t.prototype.toProto=function(e){var t=this,n=t.admin,a=t.new_admin,o=t.contract;return e?i.MsgUpdateContractAdmin.fromPartial({admin:n,contract:o,newAdmin:a}):s.MsgUpdateAdmin.fromPartial({sender:n,contract:o,newAdmin:a})},t.prototype.packAny=function(e){return e?r.Any.fromPartial({typeUrl:"/terra.wasm.v1beta1.MsgUpdateContractAdmin",value:i.MsgUpdateContractAdmin.encode(this.toProto(e)).finish()}):r.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:s.MsgUpdateAdmin.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return n?t.fromProto(i.MsgUpdateContractAdmin.decode(e.value),n):t.fromProto(s.MsgUpdateAdmin.decode(e.value),n)},t.fromData=function(e,n){if(n){var a=e;return new t(a.admin,a.new_admin,a.contract)}var o=e;return new t(o.sender,o.new_admin,o.contract)},t.prototype.toData=function(e){var t=this,n=t.admin,a=t.new_admin,o=t.contract;return e?{"@type":"/terra.wasm.v1beta1.MsgUpdateContractAdmin",admin:n,new_admin:a,contract:o}:{"@type":"/cosmwasm.wasm.v1.MsgUpdateAdmin",sender:n,new_admin:a,contract:o}},t}(o.JSONSerializable);t.MsgUpdateContractAdmin=c},25679:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(10864),t),o(n(58080),t),o(n(51351),t),o(n(9875),t),o(n(58890),t),o(n(40940),t),o(n(21280),t)},74672:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ClearAdminProposal=void 0;var o=n(67423),r=n(85920),i=n(79985),s=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.contract=a,o}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.contract)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{type:"wasm/ClearAdminProposal",value:{title:t.title,description:t.description,contract:t.contract}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.contract)},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract;return i.ClearAdminProposal.fromPartial({title:n,description:a,contract:o})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ClearAdminProposal",value:i.ClearAdminProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(i.ClearAdminProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.contract)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{"@type":"/cosmwasm.wasm.v1.ClearAdminProposal",title:t.title,description:t.description,contract:t.contract}},t}(o.JSONSerializable);t.ClearAdminProposal=s},16039:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteContractProposal=void 0;var r=n(67423),i=n(74600),s=n(85920),c=n(79985),u=function(e){function t(t,n,a,o,r,s){void 0===s&&(s={});var c=e.call(this)||this;return c.title=t,c.description=n,c.run_as=a,c.contract=o,c.execute_msg=r,c.coins=new i.Coins(s),c}return o(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.title,r=a.description,s=a.run_as,c=a.contract,u=a.msg,d=a.funds;return new t(o,r,s,c,u,i.Coins.fromAmino(d))},t.prototype.toAmino=function(e){var t=this,n=t.title,a=t.description,o=t.run_as,i=t.contract,s=t.execute_msg,c=t.coins;if(e)throw new Error("Not supported for the network");return{type:"wasm/ExecuteContractProposal",value:{title:n,description:a,run_as:o,contract:i,msg:(0,r.removeNull)(s),funds:c.toAmino()}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.runAs,e.contract,JSON.parse(a.from(e.msg).toString("utf-8")),i.Coins.fromProto(e.funds))},t.prototype.toProto=function(e){var t=this,n=t.title,o=t.description,i=t.run_as,s=t.contract,u=t.execute_msg,d=t.coins;if(e)throw new Error("Not supported for the network");return c.ExecuteContractProposal.fromPartial({title:n,description:o,funds:d.toProto(),contract:s,runAs:i,msg:a.from(JSON.stringify((0,r.removeNull)(u)),"utf-8")})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return s.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ExecuteContractProposal",value:c.ExecuteContractProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){return t.fromProto(c.ExecuteContractProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e,o=a.title,r=a.description,s=a.run_as,c=a.contract,u=a.msg,d=a.funds;return new t(o,r,s,c,u,i.Coins.fromData(d))},t.prototype.toData=function(e){var t=this,n=t.title,a=t.description,o=t.run_as,r=t.contract,i=t.execute_msg,s=t.coins;if(e)throw new Error("Not supported for the network");return{"@type":"/cosmwasm.wasm.v1.ExecuteContractProposal",title:n,description:a,run_as:o,contract:r,msg:i,funds:s.toData()}},t}(r.JSONSerializable);t.ExecuteContractProposal=u},22591:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.InstantiateContractProposal=void 0;var c=n(67423),u=n(74600),d=n(85920),l=n(79985),f=s(n(29600)),p=function(e){function t(t,n,a,o,r,i,s,c){void 0===s&&(s={});var d=e.call(this)||this;return d.title=t,d.description=n,d.run_as=a,d.admin=o,d.code_id=r,d.init_msg=i,d.label=c,d.init_coins=new u.Coins(s),d}return o(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.title,r=a.description,i=a.run_as,s=a.admin,c=a.code_id,d=a.msg,l=a.funds,f=a.label;return new t(o,r,i,s,Number.parseInt(c),d,u.Coins.fromAmino(l),f)},t.prototype.toAmino=function(e){var t=this,n=t.title,a=t.description,o=t.run_as,r=t.admin,i=t.code_id,s=t.init_msg,u=t.init_coins,d=t.label;if(e)throw new Error("Not supported for the network");return{type:"wasm/InstantiateContractProposal",value:{title:n,description:a,run_as:o,admin:r,code_id:i.toFixed(),label:d,msg:(0,c.removeNull)(s),funds:u.toAmino()}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.runAs,""!==e.admin?e.admin:void 0,e.codeId.toNumber(),JSON.parse(a.from(e.msg).toString("utf-8")),u.Coins.fromProto(e.funds),e.label)},t.prototype.toProto=function(e){var t=this,n=t.title,o=t.description,r=t.run_as,i=t.admin,s=t.code_id,c=t.init_msg,u=t.init_coins,d=t.label;if(e)throw new Error("Not supported for the network");return l.InstantiateContractProposal.fromPartial({title:n,description:o,runAs:r,admin:i,codeId:f.fromNumber(s),funds:u.toProto(),msg:a.from(JSON.stringify(c),"utf-8"),label:d})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return d.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.InstantiateContractProposal",value:l.InstantiateContractProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(l.InstantiateContractProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e,o=a.title,r=a.description,i=a.run_as,s=a.admin,c=a.code_id,d=a.label,l=a.msg,f=a.funds;return new t(o,r,i,""!==s?s:void 0,Number.parseInt(c),l,u.Coins.fromData(f),d)},t.prototype.toData=function(e){var t=this,n=t.title,a=t.description,o=t.run_as,r=t.admin,i=t.code_id,s=t.label,u=t.init_msg,d=t.init_coins;if(e)throw new Error("Not supported for the network");return{"@type":"/cosmwasm.wasm.v1.InstantiateContractProposal",title:n,description:a,run_as:o,admin:r||"",code_id:i.toFixed(),label:s,msg:(0,c.removeNull)(u),funds:d.toData()}},t}(c.JSONSerializable);t.InstantiateContractProposal=p},38595:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MigrateContractProposal=void 0;var c=n(67423),u=n(85920),d=n(79985),l=s(n(29600)),f=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.title=t,i.description=n,i.contract=a,i.new_code_id=o,i.migrate_msg=r,i}return o(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.title,r=a.description,i=a.contract,s=a.code_id,c=a.msg;return new t(o,r,i,Number.parseInt(s),c)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract,r=t.new_code_id,i=t.migrate_msg;return{type:"wasm/MigrateContractProposal",value:{title:n,description:a,contract:o,code_id:r.toFixed(),msg:(0,c.removeNull)(i)}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.contract,e.codeId.toNumber(),JSON.parse(a.from(e.msg).toString("utf-8")))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,o=t.description,r=t.contract,i=t.new_code_id,s=t.migrate_msg;return d.MigrateContractProposal.fromPartial({title:n,description:o,contract:r,codeId:l.fromNumber(i),msg:a.from(JSON.stringify(s),"utf-8")})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return u.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MigrateContractProposal",value:d.MigrateContractProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(d.MigrateContractProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e,o=a.title,r=a.description,i=a.contract,s=a.code_id,c=a.msg;return new t(o,r,i,Number.parseInt(s),c)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract,r=t.new_code_id,i=t.migrate_msg;return{"@type":"/cosmwasm.wasm.v1.MigrateContractProposal",title:n,description:a,contract:o,code_id:r.toFixed(),msg:(0,c.removeNull)(i)}},t}(c.JSONSerializable);t.MigrateContractProposal=f},22174:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PinCodesProposal=void 0;var s=n(67423),c=n(85920),u=n(79985),d=i(n(29600)),l=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.code_ids=a,o}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.code_ids.map((function(e){return Number.parseInt(e)})))},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{type:"wasm/PinCodesProposal",value:{title:t.title,description:t.description,code_ids:t.code_ids.map((function(e){return e.toFixed()}))}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.codeIds.map((function(e){return e.toNumber()})))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.code_ids;return u.PinCodesProposal.fromPartial({title:n,description:a,codeIds:o.map((function(e){return d.fromNumber(e)}))})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return c.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.PinCodesProposal",value:u.PinCodesProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(u.PinCodesProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.code_ids.map((function(e){return Number.parseInt(e)})))},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{"@type":"/cosmwasm.wasm.v1.PinCodesProposal",title:t.title,description:t.description,code_ids:t.code_ids.map((function(e){return e.toFixed()}))}},t}(s.JSONSerializable);t.PinCodesProposal=l},54261:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.StoreCodeProposal=void 0;var r=n(67423),i=n(50922),s=n(79985),c=n(14152),u=function(e){function t(t,n,a,o,r){var i=e.call(this)||this;return i.title=t,i.description=n,i.run_as=a,i.wasm_byte_code=o,i.instantiate_permission=r,i}return o(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value,o=a.title,r=a.description,i=a.run_as,s=a.wasm_byte_code,u=a.instantiate_permission;return new t(o,r,i,s,u?c.AccessConfig.fromAmino(u):void 0)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.run_as,r=t.wasm_byte_code,i=t.instantiate_permission;return{type:"wasm/StoreCodeProposal",value:{title:n,description:a,run_as:o,wasm_byte_code:r,instantiate_permission:null===i||void 0===i?void 0:i.toAmino()}}},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.title,o=e.description,r=e.run_as,i=e.wasm_byte_code,s=e.instantiate_permission;return new t(a,o,r,i,s?c.AccessConfig.fromData(s):void 0)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.run_as,r=t.wasm_byte_code,i=t.instantiate_permission;return{"@type":"/cosmwasm.wasm.v1.StoreCodeProposal",title:n,description:a,run_as:o,wasm_byte_code:r,instantiate_permission:null===i||void 0===i?void 0:i.toData()}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.runAs,a.from(e.wasmByteCode).toString("base64"),e.instantiatePermission?c.AccessConfig.fromProto(e.instantiatePermission):void 0)},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,o=t.description,r=t.run_as,i=t.wasm_byte_code,c=t.instantiate_permission;return s.StoreCodeProposal.fromPartial({title:n,description:o,runAs:r,wasmByteCode:a.from(i,"base64"),instantiatePermission:null===c||void 0===c?void 0:c.toProto()})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return i.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.StoreCodeProposal",value:s.StoreCodeProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(s.StoreCodeProposal.decode(e.value),n)},t}(r.JSONSerializable);t.StoreCodeProposal=u},10964:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SudoContractProposal=void 0;var r=n(67423),i=n(85920),s=n(79985),c=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.title=t,r.description=n,r.contract=a,r.msg=o,r}return o(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.contract,a.msg)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract,i=t.msg;return{type:"wasm/SudoContractProposal",value:{title:n,description:a,contract:o,msg:(0,r.removeNull)(i)}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.contract,JSON.parse(a.from(e.msg).toString("utf-8")))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,o=t.description,r=t.contract,i=t.msg;return s.SudoContractProposal.fromPartial({title:n,description:o,contract:r,msg:a.from(JSON.stringify(i),"utf-8")})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return i.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.SudoContractProposal",value:s.SudoContractProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(s.SudoContractProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.contract,a.msg)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract,i=t.msg;return{"@type":"/cosmwasm.wasm.v1.SudoContractProposal",title:n,description:a,contract:o,msg:(0,r.removeNull)(i)}},t}(r.JSONSerializable);t.SudoContractProposal=c},24220:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.UnpinCodesProposal=void 0;var s=n(67423),c=n(85920),u=n(79985),d=i(n(29600)),l=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.code_ids=a,o}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.code_ids.map((function(e){return Number.parseInt(e)})))},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{type:"wasm/UnpinCodesProposal",value:{title:t.title,description:t.description,code_ids:t.code_ids.map((function(e){return e.toFixed()}))}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.codeIds.map((function(e){return e.toNumber()})))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.code_ids;return u.UnpinCodesProposal.fromPartial({title:n,description:a,codeIds:o.map((function(e){return d.fromNumber(e)}))})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return c.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.UnpinCodesProposal",value:u.UnpinCodesProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(u.UnpinCodesProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.code_ids.map((function(e){return Number.parseInt(e)})))},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{"@type":"/cosmwasm.wasm.v1.UnpinCodesProposal",title:t.title,description:t.description,code_ids:t.code_ids.map((function(e){return e.toFixed()}))}},t}(s.JSONSerializable);t.UnpinCodesProposal=l},29406:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateAdminProposal=void 0;var o=n(67423),r=n(85920),i=n(79985),s=function(e){function t(t,n,a,o){var r=e.call(this)||this;return r.title=t,r.description=n,r.contract=a,r.new_admin=o,r}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.contract,a.new_admin)},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{type:"wasm/UpdateAdminProposal",value:{title:t.title,description:t.description,contract:t.contract,new_admin:t.new_admin}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.contract,e.newAdmin)},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.contract,r=t.new_admin;return i.UpdateAdminProposal.fromPartial({title:n,description:a,contract:o,newAdmin:r})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.UpdateAdminProposal",value:i.UpdateAdminProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(i.UpdateAdminProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.contract,a.new_admin)},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{"@type":"/cosmwasm.wasm.v1.UpdateAdminProposal",title:t.title,description:t.description,contract:t.contract,new_admin:t.new_admin}},t}(o.JSONSerializable);t.UpdateAdminProposal=s},41914:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateInstantiateConfigProposal=void 0;var o=n(67423),r=n(85920),i=n(79985),s=n(96016),c=function(e){function t(t,n,a){var o=e.call(this)||this;return o.title=t,o.description=n,o.access_config_updates=a,o}return a(t,e),t.fromAmino=function(e,n){if(n)throw new Error("Not supported for the network");var a=e.value;return new t(a.title,a.description,a.access_config_updates.map((function(e){return s.AccessConfigUpdate.fromAmino(e)})))},t.prototype.toAmino=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{type:"wasm/UpdateInstantiateConfigProposal",value:{title:t.title,description:t.description,access_config_updates:t.access_config_updates.map((function(e){return e.toAmino()}))}}},t.fromProto=function(e,n){if(n)throw new Error("Not supported for the network");return new t(e.title,e.description,e.accessConfigUpdates.map((function(e){return s.AccessConfigUpdate.fromProto(e)})))},t.prototype.toProto=function(e){if(e)throw new Error("Not supported for the network");var t=this,n=t.title,a=t.description,o=t.access_config_updates;return i.UpdateInstantiateConfigProposal.fromPartial({title:n,description:a,accessConfigUpdates:o.map((function(e){return e.toProto()}))})},t.prototype.packAny=function(e){if(e)throw new Error("Not supported for the network");return r.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.UpdateInstantiateConfigProposal",value:i.UpdateInstantiateConfigProposal.encode(this.toProto(e)).finish()})},t.unpackAny=function(e,n){if(n)throw new Error("Not supported for the network");return t.fromProto(i.UpdateInstantiateConfigProposal.decode(e.value),n)},t.fromData=function(e,n){if(n)throw new Error("Not supported for the network");var a=e;return new t(a.title,a.description,a.access_config_updates.map((function(e){return s.AccessConfigUpdate.fromData(e)})))},t.prototype.toData=function(e){if(e)throw new Error("Not supported for the network");var t=this;return{"@type":"/cosmwasm.wasm.v1.UpdateInstantiateConfigProposal",title:t.title,description:t.description,access_config_updates:t.access_config_updates.map((function(e){return e.toData()}))}},t}(o.JSONSerializable);t.UpdateInstantiateConfigProposal=c},64726:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(74672),t),o(n(16039),t),o(n(22591),t),o(n(38595),t),o(n(22174),t),o(n(54261),t),o(n(10964),t),o(n(24220),t),o(n(29406),t),o(n(41914),t)},18522:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertAccessTypeFromJSON=void 0;var a=n(74927);t.convertAccessTypeFromJSON=function(e){var t=e;switch(e){case"Everybody":t="ACCESS_TYPE_EVERYBODY";break;case"Nobody":t="ACCESS_TYPE_NOBODY";break;case"OnlyAddress":t="ACCESS_TYPE_ONLY_ADDRESS";break;case"Unspecified":t="ACCESS_TYPE_UNSPECIFIED"}return(0,a.accessTypeFromJSON)(t)}},48781:function(e,t,n){"use strict";var a=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(78899),r=function(){},i=function(e){function t(t){var n=t.name,a=t.target,o=t.targetWindow,i=e.call(this,{objectMode:!0})||this;return i._name=n,i._target=a,i._targetWindow=o||window,i._origin=o?"*":location.origin,i._init=!1,i._haveSyn=!1,i._onMessage=i._onMessage.bind(i),window.addEventListener("message",i._onMessage,!1),i._write("SYN",null,r),i.cork(),i}return a(t,e),t.prototype._destroy=function(){window.removeEventListener("message",this._onMessage,!1)},t.prototype._onMessage=function(e){var t=e.data;if(("*"===this._origin||e.origin===this._origin)&&e.source===this._targetWindow&&"object"===typeof t&&t.target===this._name&&t.data)if(this._init)try{this.push(t.data)}catch(n){this.emit("error",n)}else"SYN"===t.data?(this._haveSyn=!0,this._write("ACK",null,r)):"ACK"===t.data&&(this._init=!0,this._haveSyn||this._write("ACK",null,r),this.uncork())},t.prototype._read=function(){},t.prototype._write=function(e,t,n){var a={target:this._target,data:e};this._targetWindow.postMessage(a,this._origin),n(null)},t}(o.Duplex);t.default=i},19170:function(e,t,n){"use strict";var a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){d.headers[e]=o.merge(c)})),e.exports=d},28013:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},70038:function(e){e.exports={version:"0.26.1"}},68970:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),a=0;a=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},15035:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},17348:function(e,t,n){"use strict";var a=n(65218),o=n(70038).version,r={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){r[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};r.transitional=function(e,t,n){function r(e,t){return"[Axios v"+o+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,s){if(!1===e)throw new Error(r(o," has been removed"+(t?" in "+t:"")));return t&&!i[o]&&(i[o]=!0,a.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new TypeError("options must be an object");for(var a=Object.keys(e),o=a.length;o-- >0;){var r=a[o],i=t[r];if(i){var s=e[r],c=void 0===s||i(s,r,e);if(!0!==c)throw new TypeError("option "+r+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+r)}},validators:r}},30041:function(e,t,n){"use strict";var a=n(68970),o=Object.prototype.toString;function r(e){return Array.isArray(e)}function i(e){return"undefined"===typeof e}function s(e){return"[object ArrayBuffer]"===o.call(e)}function c(e){return null!==e&&"object"===typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function d(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),r(e))for(var n=0,a=e.length;n255)return!1;return!0}function o(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!a(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(n(e.length)&&a(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function r(e){return new Uint8Array(e)}function i(e,t,n,a,o){null==a&&null==o||(e=e.slice?e.slice(a,o):Array.prototype.slice.call(e,a,o)),t.set(e,n)}var s={toBytes:function(e){var t=[],n=0;for(e=encodeURI(e);n191&&a<224?(t.push(String.fromCharCode((31&a)<<6|63&e[n+1])),n+=2):(t.push(String.fromCharCode((15&a)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return t.join("")}},c=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],n=0;n>4]+e[15&o])}return n.join("")}}}(),u={16:10,24:12,32:14},d=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],l=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],f=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],p=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],b=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],h=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],y=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],v=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],k=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],x=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],I=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function T(e){for(var t=[],n=0;n>2,this._Ke[n][t%4]=r[t],this._Kd[e-n][t%4]=r[t];for(var i,s=0,c=o;c>16&255]<<24^l[i>>8&255]<<16^l[255&i]<<8^l[i>>24&255]^d[s]<<24,s+=1,8!=o)for(t=1;t>8&255]<<8^l[i>>16&255]<<16^l[i>>24&255]<<24;for(t=o/2+1;t>2,p=c%4,this._Ke[f][p]=r[t],this._Kd[e-f][p]=r[t++],c++}for(var f=1;f>24&255]^A[i>>16&255]^x[i>>8&255]^I[255&i]},S.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,n=[0,0,0,0],a=T(e),o=0;o<4;o++)a[o]^=this._Ke[0][o];for(var i=1;i>24&255]^b[a[(o+1)%4]>>16&255]^m[a[(o+2)%4]>>8&255]^h[255&a[(o+3)%4]]^this._Ke[i][o];a=n.slice()}var s,c=r(16);for(o=0;o<4;o++)s=this._Ke[t][o],c[4*o]=255&(l[a[o]>>24&255]^s>>24),c[4*o+1]=255&(l[a[(o+1)%4]>>16&255]^s>>16),c[4*o+2]=255&(l[a[(o+2)%4]>>8&255]^s>>8),c[4*o+3]=255&(l[255&a[(o+3)%4]]^s);return c},S.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,n=[0,0,0,0],a=T(e),o=0;o<4;o++)a[o]^=this._Kd[0][o];for(var i=1;i>24&255]^y[a[(o+3)%4]>>16&255]^v[a[(o+2)%4]>>8&255]^w[255&a[(o+1)%4]]^this._Kd[i][o];a=n.slice()}var s,c=r(16);for(o=0;o<4;o++)s=this._Kd[t][o],c[4*o]=255&(f[a[o]>>24&255]^s>>24),c[4*o+1]=255&(f[a[(o+3)%4]>>16&255]^s>>16),c[4*o+2]=255&(f[a[(o+2)%4]>>8&255]^s>>8),c[4*o+3]=255&(f[255&a[(o+1)%4]]^s);return c};var C=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new S(t)};C.prototype.encrypt=function(e){if((e=o(e)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=r(e.length),n=r(16),a=0;a=0;--t)this._counter[t]=e%256,e>>=8},P.prototype.setBytes=function(e){if(16!=(e=o(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},P.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var U=function e(t,n){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",n instanceof P||(n=new P(n)),this._counter=n,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new S(t)};U.prototype.encrypt=function(e){for(var t=o(e,!0),n=0;n16)throw new Error("PKCS#7 padding byte out of range");for(var n=e.length-t,a=0;a0)&&!(a=r.next()).done;)i.push(a.value)}catch(e){o={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},r=function(){for(var e=[],t=0;t=55296&&o<=56319&&a65535&&(l-=65536,i.push(l>>>10&1023|55296),l=56320|1023&l),i.push(l)}else i.push(c);i.length>=4096&&(s+=String.fromCharCode.apply(String,r(i)),i.length=0)}return i.length>0&&(s+=String.fromCharCode.apply(String,r(i))),s}var f=i?new TextDecoder:null,p="undefined"!=typeof a?200:0,b=function(e,t){this.type=e,this.data=t};function m(e,t,n){var a=Math.floor(n/4294967296),o=n;e.setUint32(t,a),e.setUint32(t+4,o)}function h(e,t){var n=e.getInt32(t),a=e.getUint32(t+4),o=nMath.floor(Number.MAX_SAFE_INTEGER/4294967296);return o||r?BigInt(n)*BigInt(4294967296)+BigInt(a):4294967296*n+a}var g=-1;function y(e){var t,n=e.sec,a=e.nsec;if(n>=0&&a>=0&&n<=17179869183){if(0===a&&n<=4294967295){var o=new Uint8Array(4);return(t=new DataView(o.buffer)).setUint32(0,n),o}var r=n/4294967296,i=4294967295&n;return o=new Uint8Array(8),(t=new DataView(o.buffer)).setUint32(0,a<<2|3&r),t.setUint32(4,i),o}return o=new Uint8Array(12),(t=new DataView(o.buffer)).setUint32(0,a),m(t,4,n),o}function v(e){var t=e.getTime(),n=Math.floor(t/1e3),a=1e6*(t-1e3*n),o=Math.floor(a/1e9);return{sec:n+o,nsec:a-1e9*o}}function w(e){return e instanceof Date?y(v(e)):null}function k(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var n=t.getUint32(0);return{sec:4294967296*(3&n)+t.getUint32(4),nsec:n>>>2};case 12:return{sec:h(t,4),nsec:t.getUint32(0)};default:throw new Error("Unrecognized data size for timestamp: "+e.length)}}function A(e){var t=k(e);return new Date(1e3*t.sec+t.nsec/1e6)}var x={type:g,encode:w,decode:A},I=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(x)}return e.prototype.register=function(e){var t=e.type,n=e.encode,a=e.decode;if(t>=0)this.encoders[t]=n,this.decoders[t]=a;else{var o=1+t;this.builtInEncoders[o]=n,this.builtInDecoders[o]=a}},e.prototype.tryToEncode=function(e,t){for(var n=0;n=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},C=function(){function e(e,t,n,a,o,r,i,s){void 0===e&&(e=I.defaultCodec),void 0===t&&(t=void 0),void 0===n&&(n=100),void 0===a&&(a=2048),void 0===o&&(o=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===s&&(s=!1),this.extensionCodec=e,this.context=t,this.maxDepth=n,this.initialBufferSize=a,this.sortKeys=o,this.forceFloat32=r,this.ignoreUndefined=i,this.forceIntegerToFloat=s,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return e.prototype.getUint8Array=function(){return this.bytes.subarray(0,this.pos)},e.prototype.reinitializeState=function(){this.pos=0},e.prototype.encode=function(e){return this.reinitializeState(),this.doEncode(e,1),this.getUint8Array()},e.prototype.doEncode=function(e,t){if(t>this.maxDepth)throw new Error("Too deep objects in depth "+t);null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):"bigint"==typeof e?this.encodebigint(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.encodebigint=function(e){e>=BigInt(0)?e=BigInt(-32)?this.writeU8(224|Number(e)+32):e>=BigInt(-128)?(this.writeU8(208),this.writeI8(Number(e))):e>=BigInt(-32768)?(this.writeU8(209),this.writeI16(Number(e))):e>=BigInt(-2147483648)?(this.writeU8(210),this.writeI32(Number(e))):(this.writeU8(211),this.writeBig64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: "+e+" bytes in UTF-8");this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){var t=e.length;if(i&&t>u){var n=s(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),d(e,this.bytes,this.pos),this.pos+=n}else n=s(e),this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),function(e,t,n){for(var a=e.length,o=n,r=0;r>6&31|192;else{if(i>=55296&&i<=56319&&r>12&15|224,t[o++]=i>>6&63|128):(t[o++]=i>>18&7|240,t[o++]=i>>12&63|128,t[o++]=i>>6&63|128)}t[o++]=63&i|128}else t[o++]=i}}(e,this.bytes,this.pos),this.pos+=n},e.prototype.encodeObject=function(e,t){var n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: "+Object.prototype.toString.apply(e));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: "+t);this.writeU8(198),this.writeU32(t)}var n=T(e);this.writeU8a(n)},e.prototype.encodeArray=function(e,t){var n,a,o=e.length;if(o<16)this.writeU8(144+o);else if(o<65536)this.writeU8(220),this.writeU16(o);else{if(!(o<4294967296))throw new Error("Too large array: "+o);this.writeU8(221),this.writeU32(o)}try{for(var r=S(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.doEncode(s,t+1)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(a=r.return)&&a.call(r)}finally{if(n)throw n.error}}},e.prototype.countWithoutUndefined=function(e,t){var n,a,o=0;try{for(var r=S(t),i=r.next();!i.done;i=r.next())void 0!==e[i.value]&&o++}catch(e){n={error:e}}finally{try{i&&!i.done&&(a=r.return)&&a.call(r)}finally{if(n)throw n.error}}return o},e.prototype.encodeMap=function(e,t){var n,a,o=Object.keys(e);this.sortKeys&&o.sort();var r=this.ignoreUndefined?this.countWithoutUndefined(e,o):o.length;if(r<16)this.writeU8(128+r);else if(r<65536)this.writeU8(222),this.writeU16(r);else{if(!(r<4294967296))throw new Error("Too large map object: "+r);this.writeU8(223),this.writeU32(r)}try{for(var i=S(o),s=i.next();!s.done;s=i.next()){var c=s.value,u=e[c];this.ignoreUndefined&&void 0===u||(this.encodeString(c),this.doEncode(u,t+1))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}},e.prototype.encodeExtension=function(e){var t=e.data.length;if(1===t)this.writeU8(212);else if(2===t)this.writeU8(213);else if(4===t)this.writeU8(214);else if(8===t)this.writeU8(215);else if(16===t)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large extension object: "+t);this.writeU8(201),this.writeU32(t)}this.writeI8(e.type),this.writeU8a(e.data)},e.prototype.writeU8=function(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++},e.prototype.writeU8a=function(e){var t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t},e.prototype.writeI8=function(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++},e.prototype.writeU16=function(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2},e.prototype.writeI16=function(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2},e.prototype.writeU32=function(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4},e.prototype.writeI32=function(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4},e.prototype.writeF32=function(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4},e.prototype.writeF64=function(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8},e.prototype.writeU64=function(e){this.ensureBufferSizeToWrite(8),function(e,t,n){var a=n/4294967296,o=n;e.setUint32(t,a),e.setUint32(t+4,o)}(this.view,this.pos,e),this.pos+=8},e.prototype.writeI64=function(e){this.ensureBufferSizeToWrite(8),m(this.view,this.pos,e),this.pos+=8},e.prototype.writeBig64=function(e){this.ensureBufferSizeToWrite(8),function(e,t,n){var a=Number(n/BigInt(4294967296)),o=Number(n%BigInt(4294967296));a<0&&0!==o&&(a-=1),e.setUint32(t,a),e.setUint32(t+4,o)}(this.view,this.pos,e),this.pos+=8},e}(),E={};function R(e,t){return void 0===t&&(t=E),new C(t.extensionCodec,t.context,t.maxDepth,t.initialBufferSize,t.sortKeys,t.forceFloat32,t.ignoreUndefined,t.forceIntegerToFloat).encode(e)}function M(e){return(e<0?"-":"")+"0x"+Math.abs(e).toString(16).padStart(2,"0")}var P=function(){function e(e,t){void 0===e&&(e=16),void 0===t&&(t=16),this.maxKeyLength=e,this.maxLengthPerKey=t,this.hit=0,this.miss=0,this.caches=[];for(var n=0;n0&&e<=this.maxKeyLength},e.prototype.get=function(e,t,n){var a=this.caches[n-1],o=a.length;e:for(var r=0;r=this.maxLengthPerKey?n[Math.random()*n.length|0]=a:n.push(a)},e.prototype.decode=function(e,t,n){var a=this.get(e,t,n);if(null!=a)return this.hit++,a;this.miss++;var o=l(e,t,n),r=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(r,o),o},e}(),U=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},_=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof D?Promise.resolve(n.value.v).then(c,u):d(r[0][2],n)}catch(e){d(r[0][3],e)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function d(e,t){e(t),r.shift(),r.length&&s(r[0][0],r[0][1])}},O=new DataView(new ArrayBuffer(0)),F=new Uint8Array(O.buffer),L=function(){try{O.getInt8(0)}catch(e){return e.constructor}throw new Error("never reached")}(),j=new L("Insufficient data"),H=new P,G=function(){function e(e,t,n,a,o,r,i,s){void 0===e&&(e=I.defaultCodec),void 0===t&&(t=void 0),void 0===n&&(n=4294967295),void 0===a&&(a=4294967295),void 0===o&&(o=4294967295),void 0===r&&(r=4294967295),void 0===i&&(i=4294967295),void 0===s&&(s=H),this.extensionCodec=e,this.context=t,this.maxStrLength=n,this.maxBinLength=a,this.maxArrayLength=o,this.maxMapLength=r,this.maxExtLength=i,this.keyDecoder=s,this.totalPos=0,this.pos=0,this.view=O,this.bytes=F,this.headByte=-1,this.stack=[]}return e.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1},e.prototype.setBuffer=function(e){this.bytes=T(e),this.view=function(e){if(e instanceof ArrayBuffer)return new DataView(e);var t=T(e);return new DataView(t.buffer,t.byteOffset,t.byteLength)}(this.bytes),this.pos=0},e.prototype.appendBuffer=function(e){if(-1!==this.headByte||this.hasRemaining()){var t=this.bytes.subarray(this.pos),n=T(e),a=new Uint8Array(t.length+n.length);a.set(t),a.set(n,t.length),this.setBuffer(a)}else this.setBuffer(e)},e.prototype.hasRemaining=function(e){return void 0===e&&(e=1),this.view.byteLength-this.pos>=e},e.prototype.createNoExtraBytesError=function(e){var t=this.view,n=this.pos;return new RangeError("Extra "+(t.byteLength-n)+" of "+t.byteLength+" byte(s) found at buffer["+e+"]")},e.prototype.decode=function(e){return this.reinitializeState(),this.setBuffer(e),this.doDecodeSingleSync()},e.prototype.doDecodeSingleSync=function(){var e=this.doDecodeSync();if(this.hasRemaining())throw this.createNoExtraBytesError(this.pos);return e},e.prototype.decodeAsync=function(e){var t,n,a,o;return U(this,void 0,void 0,(function(){var r,i,s,c,u,d,l,f;return _(this,(function(p){switch(p.label){case 0:r=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),t=B(e),p.label=2;case 2:return[4,t.next()];case 3:if((n=p.sent()).done)return[3,5];if(s=n.value,r)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(s);try{i=this.doDecodeSync(),r=!0}catch(e){if(!(e instanceof L))throw e}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=p.sent(),a={error:c},[3,12];case 7:return p.trys.push([7,,10,11]),n&&!n.done&&(o=t.return)?[4,o.call(t)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(a)throw a.error;return[7];case 11:return[7];case 12:if(r){if(this.hasRemaining())throw this.createNoExtraBytesError(this.totalPos);return[2,i]}throw d=(u=this).headByte,l=u.pos,f=u.totalPos,new RangeError("Insufficient data in parcing "+M(d)+" at "+f+" ("+l+" in the current buffer)")}}))}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return N(this,arguments,(function(){var n,a,o,r,i,s,c,u,d;return _(this,(function(l){switch(l.label){case 0:n=t,a=-1,l.label=1;case 1:l.trys.push([1,13,14,19]),o=B(e),l.label=2;case 2:return[4,D(o.next())];case 3:if((r=l.sent()).done)return[3,12];if(i=r.value,t&&0===a)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(i),n&&(a=this.readArraySize(),n=!1,this.complete()),l.label=4;case 4:l.trys.push([4,9,,10]),l.label=5;case 5:return[4,D(this.doDecodeSync())];case 6:return[4,l.sent()];case 7:return l.sent(),0==--a?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((s=l.sent())instanceof L))throw s;return[3,10];case 10:this.totalPos+=this.pos,l.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=l.sent(),u={error:c},[3,19];case 14:return l.trys.push([14,,17,18]),r&&!r.done&&(d=o.return)?[4,D(d.call(o))]:[3,16];case 15:l.sent(),l.label=16;case 16:return[3,18];case 17:if(u)throw u.error;return[7];case 18:return[7];case 19:return[2]}}))}))},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!==(a=e-128)){this.pushMapState(a),this.complete();continue e}t={}}else if(e<160){if(0!==(a=e-144)){this.pushArrayState(a),this.complete();continue e}t=[]}else{var n=e-160;t=this.decodeUtf8String(n,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)n=this.lookU8(),t=this.decodeUtf8String(n,1);else if(218===e)n=this.lookU16(),t=this.decodeUtf8String(n,2);else if(219===e)n=this.lookU32(),t=this.decodeUtf8String(n,4);else if(220===e){if(0!==(a=this.readU16())){this.pushArrayState(a),this.complete();continue e}t=[]}else if(221===e){if(0!==(a=this.readU32())){this.pushArrayState(a),this.complete();continue e}t=[]}else if(222===e){if(0!==(a=this.readU16())){this.pushMapState(a),this.complete();continue e}t={}}else if(223===e){if(0!==(a=this.readU32())){this.pushMapState(a),this.complete();continue e}t={}}else if(196===e){var a=this.lookU8();t=this.decodeBinary(a,1)}else if(197===e)a=this.lookU16(),t=this.decodeBinary(a,2);else if(198===e)a=this.lookU32(),t=this.decodeBinary(a,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)a=this.lookU8(),t=this.decodeExtension(a,1);else if(200===e)a=this.lookU16(),t=this.decodeExtension(a,2);else{if(201!==e)throw new Error("Unrecognized type byte: "+M(e));a=this.lookU32(),t=this.decodeExtension(a,4)}this.complete();for(var o=this.stack;o.length>0;){var r=o[o.length-1];if(0===r.type){if(r.array[r.position]=t,r.position++,r.position!==r.size)continue e;o.pop(),t=r.array}else{if(1===r.type){if(i=void 0,"string"!==(i=typeof t)&&"number"!==i)throw new Error("The type of key must be string or number but "+typeof t);r.key=t,r.type=2;continue e}if(r.map[r.key]=t,r.readCount++,r.readCount!==r.size){r.key=null,r.type=1;continue e}o.pop(),t=r.map}}return t}var i},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new Error("Unrecognized array type byte: "+M(e))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new Error("Max length exceeded: map length ("+e+") > maxMapLengthLength ("+this.maxMapLength+")");this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new Error("Max length exceeded: array length ("+e+") > maxArrayLength ("+this.maxArrayLength+")");this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var n;if(e>this.maxStrLength)throw new Error("Max length exceeded: UTF-8 byte length ("+e+") > maxStrLength ("+this.maxStrLength+")");if(this.bytes.byteLengthp?function(e,t,n){var a=e.subarray(t,t+n);return f.decode(a)}(this.bytes,o,e):l(this.bytes,o,e),this.pos+=t+e,a},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new Error("Max length exceeded: bin length ("+e+") > maxBinLength ("+this.maxBinLength+")");if(!this.hasRemaining(e+t))throw j;var n=this.pos+t,a=this.bytes.subarray(n,n+e);return this.pos+=t+e,a},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new Error("Max length exceeded: ext length ("+e+") > maxExtLength ("+this.maxExtLength+")");var n=this.view.getInt8(this.pos+t),a=this.decodeBinary(e,t+1);return this.extensionCodec.decode(a,n,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,n,a,o=(e=this.view,t=this.pos,n=e.getUint32(t),a=e.getUint32(t+4),n>Math.floor(Number.MAX_SAFE_INTEGER/4294967296)?BigInt(n)*BigInt(4294967296)+BigInt(a):4294967296*n+a);return this.pos+=8,o},e.prototype.readI64=function(){var e=h(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}(),z={};function K(e,t){return void 0===t&&(t=z),new G(t.extensionCodec,t.context,t.maxStrLength,t.maxBinLength,t.maxArrayLength,t.maxMapLength,t.maxExtLength).decode(e)}var W=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof Z?Promise.resolve(n.value.v).then(c,u):d(r[0][2],n)}catch(e){d(r[0][3],e)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function d(e,t){e(t),r.shift(),r.length&&s(r[0][0],r[0][1])}};function q(e){if(null==e)throw new Error("Assertion Failure: value must not be null nor undefined")}function Q(e){return null!=e[Symbol.asyncIterator]?e:function(e){return V(this,arguments,(function(){var t,n,a,o;return W(this,(function(r){switch(r.label){case 0:t=e.getReader(),r.label=1;case 1:r.trys.push([1,,9,10]),r.label=2;case 2:return[4,Z(t.read())];case 3:return n=r.sent(),a=n.done,o=n.value,a?[4,Z(void 0)]:[3,5];case 4:return[2,r.sent()];case 5:return q(o),[4,Z(o)];case 6:return[4,r.sent()];case 7:return r.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}(e)}var J=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},Y=function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]p)throw new Error("array length exceeds limit ".concat(p));var s=e.from(a[1]);return new C(s,r)}if(t.startsWith("uint")){var c=t.slice(4,t.length);if(d=c,!(0,i.Z)(d).every((function(e){return"0123456789".includes(e)})))throw new Error("malformed uint string: ".concat(c));var u=parseInt(c,10);if(u>p)throw new Error("malformed uint string: ".concat(u));return new k(u)}var d;if("byte"===t)return new T;if(t.startsWith("ufixed")){var l=t.match(v);if(3!==l.length)throw new Error("malformed ufixed type: ".concat(t));var f=parseInt(l[1],10),b=parseInt(l[2],10);return new A(f,b)}if("bool"===t)return new I;if("address"===t)return new x;if("string"===t)return new S;if(t.length>=2&&"("===t[0]&&")"===t[t.length-1]){for(var m=R.parseTupleContent(t.slice(1,t.length-1)),h=[],g=0;g512)throw new Error("unsupported uint type bitSize: ".concat(e));return a.bitSize=e,a}return(0,c.Z)(n,[{key:"toString",value:function(){return"uint".concat(this.bitSize)}},{key:"equals",value:function(e){return e instanceof n&&this.bitSize===e.bitSize}},{key:"isDynamic",value:function(){return!1}},{key:"byteLen",value:function(){return this.bitSize/8}},{key:"encode",value:function(e){if("bigint"!==typeof e&&"number"!==typeof e)throw new Error("Cannot encode value as uint".concat(this.bitSize,": ").concat(e));if(e>=BigInt(Math.pow(2,this.bitSize))||e512)throw new Error("unsupported ufixed type bitSize: ".concat(e));if(a>160||a<1)throw new Error("unsupported ufixed type precision: ".concat(a));return o.bitSize=e,o.precision=a,o}return(0,c.Z)(n,[{key:"toString",value:function(){return"ufixed".concat(this.bitSize,"x").concat(this.precision)}},{key:"equals",value:function(e){return e instanceof n&&this.bitSize===e.bitSize&&this.precision===e.precision}},{key:"isDynamic",value:function(){return!1}},{key:"byteLen",value:function(){return this.bitSize/8}},{key:"encode",value:function(e){if("bigint"!==typeof e&&"number"!==typeof e)throw new Error("Cannot encode value as ".concat(this.toString(),": ").concat(e));if(e>=BigInt(Math.pow(2,this.bitSize))||e255)throw new Error("".concat(e," cannot be encoded into a byte"));return new Uint8Array([e])}},{key:"decode",value:function(e){if(1!==e.byteLength)throw new Error("byte string must be 1 byte long");return e[0]}}]),n}(w),S=function(e){(0,o.Z)(n,e);var t=(0,r.Z)(n);function n(){return(0,s.Z)(this,n),t.apply(this,arguments)}return(0,c.Z)(n,[{key:"toString",value:function(){return"string"}},{key:"equals",value:function(e){return e instanceof n}},{key:"isDynamic",value:function(){return!0}},{key:"byteLen",value:function(){throw new Error("".concat(this.toString()," is a dynamic type"))}},{key:"encode",value:function(e){if("string"!==typeof e&&!(e instanceof Uint8Array))throw new Error("Cannot encode value as string: ".concat(e));var t=f.from(e),n=(0,d.j)(t.length,g),a=new Uint8Array(t.length+g);return a.set(n),a.set(t,g),a}},{key:"decode",value:function(e){if(e.length=p)throw new Error("tuple type child type number larger than maximum uint16 error");return a.childTypes=e,a}return(0,c.Z)(n,[{key:"toString",value:function(){for(var e=[],t=0;tp)throw new Error("length of tuple array should not exceed a uint16");for(var n=this.childTypes,a=[],o=[],r=new Map,i=0;ip)throw new Error("byte length of ".concat(k," should not exceed a uint16"));a[w]=(0,d.j)(k,g)}v+=o[w].length}return l.concatArrays.apply(void 0,a.concat(o))}},{key:"decode",value:function(e){for(var t=this.childTypes,n=[],a=[],o=0,r=0,i=f.from(e);o0&&(n[n.length-1].right=c,c>p;(e[r]&b)>0?a.push(new Uint8Array([128])):a.push(new Uint8Array([0]))}o+=l,r+=1}else{var m=s.byteLen();a.push(e.slice(r,r+m)),r+=m}if(o!==t.length-1&&r>=e.length)throw new Error("input byte not enough to decode");o+=1}if(n.length>0&&(n[n.length-1].right=e.length,r=e.length),ry.right)throw new Error("dynamic segment should display a [l, r] space with l <= r");if(h!==n.length-1&&y.right!==n[h+1].left)throw new Error("dynamic segment should be consecutive")}for(var v=0,w=0;w8)throw new Error("value list passed in should be no greater than length 8");for(var n=0;n0&&-1===n))break;a+=1}}return a}var U,_,B=n(1413),D=n(93524);function N(e){return e===U.any||e===U.pay||e===U.keyreg||e===U.acfg||e===U.axfer||e===U.afrz||e===U.appl}function O(e,t){return e===U.any||t.type&&t.type.toString()===e.toString()}function F(e){return e===_.account||e===_.application||e===_.asset}!function(e){e.any="txn",e.pay="pay",e.keyreg="keyreg",e.acfg="acfg",e.axfer="axfer",e.afrz="afrz",e.appl="appl"}(U||(U={})),function(e){e.account="account",e.application="application",e.asset="asset"}(_||(_={}));var L=function(){function e(t){if((0,s.Z)(this,e),"string"!==typeof t.name||"object"!==typeof t.returns||!Array.isArray(t.args))throw new Error("Invalid ABIMethod parameters");this.name=t.name,this.description=t.desc,this.args=t.args.map((function(e){var t=e.type,n=e.name,a=e.desc;return N(t)||F(t)?{type:t,name:n,description:a}:{type:w.from(t),name:n,description:a}})),this.returns={type:"void"===t.returns.type?t.returns.type:w.from(t.returns.type),description:t.returns.desc}}return(0,c.Z)(e,[{key:"getSignature",value:function(){var e=this.args.map((function(e){return e.type.toString()})).join(","),t=this.returns.type.toString();return"".concat(this.name,"(").concat(e,")").concat(t)}},{key:"getSelector",value:function(){var e=(0,D.genericHash)(this.getSignature());return new Uint8Array(e.slice(0,4))}},{key:"txnCount",value:function(){var e,t=1,n=(0,a.Z)(this.args);try{for(n.s();!(e=n.n()).done;){var o=e.value;"string"===typeof o.type&&N(o.type)&&(t+=1)}}catch(r){n.e(r)}finally{n.f()}return t}},{key:"toJSON",value:function(){return{name:this.name,desc:this.description,args:this.args.map((function(e){var t=e.type,n=e.name,a=e.description;return{type:t.toString(),name:n,desc:a}})),returns:{type:this.returns.type.toString(),desc:this.returns.description}}}}],[{key:"fromSignature",value:function(t){var n=function(e){var t=e.indexOf("(");if(-1===t)throw new Error("Invalid method signature: ".concat(e));for(var n=-1,a=0,o=t;o1)throw new Error("found ".concat(n.length," methods with the same name ").concat(n.map((function(e){return e.getSignature()})).join(",")));if(0===n.length)throw new Error("found 0 methods with the name ".concat(t));return n[0]}var H=function(){function e(t){if((0,s.Z)(this,e),"string"!==typeof t.name||!Array.isArray(t.methods)||t.networks&&"object"!==typeof t.networks)throw new Error("Invalid ABIContract parameters");this.name=t.name,this.description=t.desc,this.networks=t.networks?(0,B.Z)({},t.networks):{},this.methods=t.methods.map((function(e){return new L(e)}))}return(0,c.Z)(e,[{key:"toJSON",value:function(){return{name:this.name,desc:this.description,networks:this.networks,methods:this.methods.map((function(e){return e.toJSON()}))}}},{key:"getMethodByName",value:function(e){return j(this.methods,e)}}]),e}(),G=function(){function e(t){if((0,s.Z)(this,e),"string"!==typeof t.name||!Array.isArray(t.methods))throw new Error("Invalid ABIInterface parameters");this.name=t.name,this.description=t.desc,this.methods=t.methods.map((function(e){return new L(e)}))}return(0,c.Z)(e,[{key:"toJSON",value:function(){return{name:this.name,desc:this.description,methods:this.methods.map((function(e){return e.toJSON()}))}}},{key:"getMethodByName",value:function(e){return j(this.methods,e)}}]),e}()},87537:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var a=n(93524),o=n(40806);function r(){var e=a.keyPair();return{addr:o.encodeAddress(e.publicKey),sk:e.secretKey}}},99884:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var a=n(15671),o=n(43144),r=n(40806),i=n(30511),s=n(93524),c=n(54684),u=n(54659).Buffer,d=function(){function e(t){var n=t.bidderKey,o=t.bidAmount,i=t.bidID,s=t.auctionKey,c=t.auctionID,d=t.maxPrice;(0,a.Z)(this,e),this.name="Bid",this.tag=u.from([97,66]);var l=r.decodeAddress(n),f=r.decodeAddress(s);if(!Number.isSafeInteger(o)||o<0)throw Error("Bid amount must be positive and 2^53-1");if(!Number.isSafeInteger(i)||i<0)throw Error("BidID must be positive and 2^53-1");if(!Number.isSafeInteger(c)||c<0)throw Error("auctionID must be positive");Object.assign(this,{bidderKey:l,bidAmount:o,bidID:i,auctionKey:f,auctionID:c,maxPrice:d})}return(0,o.Z)(e,[{key:"get_obj_for_encoding",value:function(){return{bidder:u.from(this.bidderKey.publicKey),cur:this.bidAmount,price:this.maxPrice,id:this.bidID,auc:u.from(this.auctionKey.publicKey),aid:this.auctionID}}},{key:"signBid",value:function(e){var t=i.encode(this.get_obj_for_encoding()),n=u.from(c.concatArrays(this.tag,t)),a=s.sign(n,e),o={t:"b",b:{sig:u.from(a),bid:this.get_obj_for_encoding()}};return new Uint8Array(i.encode(o))}}]),e}()},17339:function(e,t,n){var a=n(54659).Buffer,o=n(861).default,r=n(17061).default,i=n(17156).default,s=n(67126).default,c=n(50619).setSendTransactionHeaders;e.exports={Algod:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";"string"===typeof t&&(t={"X-Algo-API-Token":t});var n=new s(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"http://r2.algorand.network",arguments.length>2&&void 0!==arguments[2]?arguments[2]:4180,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{});function u(e){return void 0!==e.noteb64&&null!==e.noteb64&&(e.note=a.from(e.noteb64,"base64")),e}this.status=i(r().mark((function e(){var t,a,o=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,n.get("/v1/status",{},t);case 3:return a=e.sent,e.abrupt("return",a.body);case 5:case"end":return e.stop()}}),e)}))),this.healthCheck=i(r().mark((function e(){var t,a,o=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,n.get("/health",{},t);case 3:if((a=e.sent).ok){e.next=6;break}throw new Error("Health response: ".concat(a.status));case 6:return e.abrupt("return",{});case 7:case"end":return e.stop()}}),e)}))),this.statusAfterBlock=function(){var e=i(r().mark((function e(t){var a,o,i=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=i.length>1&&void 0!==i[1]?i[1]:{},Number.isInteger(t)){e.next=3;break}throw Error("roundNumber should be an integer");case 3:return e.next=5,n.get("/v1/status/wait-for-block-after/".concat(t),{},a);case 5:return o=e.sent,e.abrupt("return",o.body);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.pendingTransactions=function(){var e=i(r().mark((function e(t){var a,o,i,s=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=s.length>1&&void 0!==s[1]?s[1]:{},Number.isInteger(t)){e.next=3;break}throw Error("maxTxns should be an integer");case 3:return e.next=5,n.get("/v1/transactions/pending",{max:t},a);case 5:if(200===(o=e.sent).statusCode&&void 0!==o.body.truncatedTxns.transactions)for(i=0;i0&&void 0!==o[0]?o[0]:{},e.next=3,n.get("/versions",{},t);case 3:return a=e.sent,e.abrupt("return",a.body);case 5:case"end":return e.stop()}}),e)}))),this.ledgerSupply=i(r().mark((function e(){var t,a,o=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,n.get("/v1/ledger/supply",{},t);case 3:return a=e.sent,e.abrupt("return",a.body);case 5:case"end":return e.stop()}}),e)}))),this.transactionByAddress=function(){var e=i(r().mark((function e(t){var a,o,i,s,c,d,l=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=l.length>2&&void 0!==l[2]?l[2]:null,i=l.length>3&&void 0!==l[3]?l[3]:null,s=l.length>4&&void 0!==l[4]?l[4]:{},null===(a=l.length>1&&void 0!==l[1]?l[1]:null)||Number.isInteger(a)){e.next=6;break}throw Error("first round should be an integer");case 6:if(null===o||Number.isInteger(o)){e.next=8;break}throw Error("last round should be an integer");case 8:return e.next=10,n.get("/v1/account/".concat(t,"/transactions"),{firstRound:a,lastRound:o,max:i},s);case 10:if(200===(c=e.sent).statusCode&&void 0!==c.body.transactions)for(d=0;d3&&void 0!==l[3]?l[3]:null,s=l.length>4&&void 0!==l[4]?l[4]:{},e.next=4,n.get("/v1/account/".concat(t,"/transactions"),{fromDate:a,toDate:o,max:i},s);case 4:if(200===(c=e.sent).statusCode&&void 0!==c.body.transactions)for(d=0;d1&&void 0!==i[1]?i[1]:{},e.next=3,n.get("/v1/transaction/".concat(t),{},a);case 3:return 200===(o=e.sent).statusCode&&(o.body=u(o.body)),e.abrupt("return",o.body);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.transactionInformation=function(){var e=i(r().mark((function e(t,a){var o,i,s=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},e.next=3,n.get("/v1/account/".concat(t,"/transaction/").concat(a),{},o);case 3:return 200===(i=e.sent).statusCode&&(i.body=u(i.body)),e.abrupt("return",i.body);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.pendingTransactionInformation=function(){var e=i(r().mark((function e(t){var a,o,i=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.length>1&&void 0!==i[1]?i[1]:{},e.next=3,n.get("/v1/transactions/pending/".concat(t),{},a);case 3:return 200===(o=e.sent).statusCode&&(o.body=u(o.body)),e.abrupt("return",o.body);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.accountInformation=function(){var e=i(r().mark((function e(t){var a,o,i=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.length>1&&void 0!==i[1]?i[1]:{},e.next=3,n.get("/v1/account/".concat(t),{},a);case 3:return o=e.sent,e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.assetInformation=function(){var e=i(r().mark((function e(t){var a,o,i=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.length>1&&void 0!==i[1]?i[1]:{},e.next=3,n.get("/v1/asset/".concat(t),{},a);case 3:return o=e.sent,e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.suggestedFee=i(r().mark((function e(){var t,a,o=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,n.get("/v1/transactions/fee",{},t);case 3:return a=e.sent,e.abrupt("return",a.body);case 5:case"end":return e.stop()}}),e)}))),this.sendRawTransaction=function(){var e=i(r().mark((function e(t){var o,i,s=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=c(s.length>1&&void 0!==s[1]?s[1]:{}),e.next=4,n.post("/v1/transactions",a.from(t),o);case 4:return i=e.sent,e.abrupt("return",i.body);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.sendRawTransactions=function(){var e=i(r().mark((function e(t){var i,s,u,d,l=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=c(l.length>1&&void 0!==l[1]?l[1]:{}),u=(i=Array.prototype).concat.apply(i,o(t.map((function(e){return Array.from(e)})))),e.next=5,n.post("/v1/transactions",a.from(u),s);case 5:return d=e.sent,e.abrupt("return",d.body);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.getTransactionParams=i(r().mark((function e(){var t,a,o=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,n.get("/v1/transactions/params",{},t);case 3:return a=e.sent,e.abrupt("return",a.body);case 5:case"end":return e.stop()}}),e)}))),this.suggestParams=i(r().mark((function t(){var n,a,o=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>0&&void 0!==o[0]?o[0]:{},t.next=3,e.getTransactionParams(n);case 3:return a=t.sent,t.abrupt("return",{flatFee:!1,fee:a.fee,firstRound:a.lastRound,lastRound:a.lastRound+1e3,genesisID:a.genesisID,genesisHash:a.genesishashb64});case 5:case"end":return t.stop()}}),t)}))),this.block=function(){var e=i(r().mark((function e(t){var a,o,i,s=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=s.length>1&&void 0!==s[1]?s[1]:{},Number.isInteger(t)){e.next=3;break}throw Error("roundNumber should be an integer");case 3:return e.next=5,n.get("/v1/block/".concat(t),{},a);case 5:if(200===(o=e.sent).statusCode&&void 0!==o.body.txns.transactions)for(i=0;i3&&void 0!==arguments[3]?arguments[3]:{};(0,i.Z)(this,e),this.defaultHeaders=o;var r=n.endsWith("/")?n:"".concat(n,"/"),s=new URL(r);if("undefined"!==typeof a&&(s.port=a.toString()),0===s.protocol.length)throw new Error("Invalid base server URL, protocol must be defined.");this.baseURL=s,this.tokenHeader=t}return(0,s.Z)(e,[{key:"getURL",value:function(e,t){var n;n=e.startsWith("./")?e:e.startsWith("/")?".".concat(e):"./".concat(e);var a=new URL(n,this.baseURL);if(t)for(var o=0,r=Object.entries(t);o2&&void 0!==u[2]?u[2]:{},s=(0,o.Z)((0,o.Z)((0,o.Z)({},this.tokenHeader),this.defaultHeaders),i),t.next=4,(0,p.fetch)(this.getURL(n,r),{mode:"cors",headers:s});case 4:return c=t.sent,t.abrupt("return",e.formatFetchResponse(c));case 6:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"post",value:function(){var t=(0,r.Z)((0,a.Z)().mark((function t(n,r,i){var s,c,u,d=arguments;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=d.length>3&&void 0!==d[3]?d[3]:{},c=(0,o.Z)((0,o.Z)((0,o.Z)({},this.tokenHeader),this.defaultHeaders),s),t.next=4,(0,p.fetch)(this.getURL(n,i),{method:"POST",mode:"cors",body:r,headers:c});case 4:return u=t.sent,t.abrupt("return",e.formatFetchResponse(u));case 6:case"end":return t.stop()}}),t,this)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"delete",value:function(){var t=(0,r.Z)((0,a.Z)().mark((function t(n,r,i){var s,c,u,d=arguments;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=d.length>3&&void 0!==d[3]?d[3]:{},c=(0,o.Z)((0,o.Z)((0,o.Z)({},this.tokenHeader),this.defaultHeaders),s),t.next=4,(0,p.fetch)(this.getURL(n,i),{method:"DELETE",mode:"cors",body:r,headers:c});case 4:return u=t.sent,t.abrupt("return",e.formatFetchResponse(u));case 6:case"end":return t.stop()}}),t,this)})));return function(e,n,a){return t.apply(this,arguments)}}()}],[{key:"formatFetchResponseHeaders",value:function(e){var t={};return e.forEach((function(e,n){t[e]=n})),t}},{key:"checkHttpError",value:function(){var t=(0,r.Z)((0,a.Z)().mark((function t(n){var o,r,i,s;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n.ok){t.next=2;break}return t.abrupt("return");case 2:return o=null,r=null,t.prev=4,t.t0=Uint8Array,t.next=8,n.arrayBuffer();case 8:t.t1=t.sent,o=new t.t0(t.t1),(i=JSON.parse(b.from(o).toString())).message&&(r=i.message),t.next=16;break;case 14:t.prev=14,t.t2=t.catch(4);case 16:throw s="Network request error. Received status ".concat(n.status," (").concat(n.statusText,")"),r&&(s+=": ".concat(r)),new m(s,{body:o,status:n.status,headers:e.formatFetchResponseHeaders(n.headers)});case 19:case"end":return t.stop()}}),t,null,[[4,14]])})));return function(e){return t.apply(this,arguments)}}()},{key:"formatFetchResponse",value:function(){var t=(0,r.Z)((0,a.Z)().mark((function t(n){return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.checkHttpError(n);case 2:return t.t0=Uint8Array,t.next=5,n.arrayBuffer();case 5:return t.t1=t.sent,t.t2=new t.t0(t.t1),t.t3=n.status,t.t4=e.formatFetchResponseHeaders(n.headers),t.abrupt("return",{body:t.t2,status:t.t3,headers:t.t4});case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),e}(),g=n(54659).Buffer;function y(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t]&&0!==e[t].length||delete e[t]);return e}function v(e){return Object.keys(e).reduce((function(t,n){return t[n.toLowerCase()]=e[n],t}),{})}function w(e){return void 0!==e&&Object.prototype.hasOwnProperty.call(e,"format")&&"msgpack"===e.format?"application/msgpack":"application/json"}var k=function(){function e(t,n,a){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};(0,i.Z)(this,e),this.bc=void 0!==n?new h(t,n,a,o):t}return(0,s.Z)(e,[{key:"get",value:function(){var t=(0,r.Z)((0,a.Z)().mark((function t(n,r){var i,s,c,u,d,l,f=arguments;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=f.length>2&&void 0!==f[2]?f[2]:{},s=f.length>3&&void 0!==f[3]?f[3]:{},c=!(f.length>4&&void 0!==f[4])||f[4],u=w(r),d=(0,o.Z)((0,o.Z)({},i),{},{accept:u}),t.prev=5,t.next=8,this.bc.get(n,y(r),d);case 8:return l=t.sent,t.abrupt("return",e.prepareResponse(l,u,c,s));case 12:throw t.prev=12,t.t0=t.catch(5),e.prepareResponseError(t.t0);case 15:case"end":return t.stop()}}),t,this,[[5,12]])})));return function(e,n){return t.apply(this,arguments)}}()},{key:"post",value:function(){var t=(0,r.Z)((0,a.Z)().mark((function t(n,r){var i,s,c,u,d,l=arguments;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=l.length>2&&void 0!==l[2]?l[2]:{},s=l.length>3?l[3]:void 0,c=!(l.length>4&&void 0!==l[4])||l[4],u=(0,o.Z)({"content-type":"application/json"},v(i)),t.prev=4,t.next=7,this.bc.post(n,e.serializeData(r,u),s,u);case 7:return d=t.sent,t.abrupt("return",e.prepareResponse(d,"application/json",c));case 11:throw t.prev=11,t.t0=t.catch(4),e.prepareResponseError(t.t0);case 14:case"end":return t.stop()}}),t,this,[[4,11]])})));return function(e,n){return t.apply(this,arguments)}}()},{key:"delete",value:function(){var t=(0,r.Z)((0,a.Z)().mark((function t(n,r){var i,s,c,u,d=arguments;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=d.length>2&&void 0!==d[2]?d[2]:{},s=!(d.length>3&&void 0!==d[3])||d[3],c=(0,o.Z)({"content-type":"application/json"},v(i)),t.next=5,this.bc.delete(n,e.serializeData(r,c),void 0,c);case 5:return u=t.sent,t.abrupt("return",e.prepareResponse(u,"application/json",s));case 7:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()}],[{key:"parseJSON",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{return 0===Object.keys(n).length?e&&JSON.parse(e):e&&c.parseJSON(e,n)}catch(o){var a=o;throw a.rawResponse=e||null,a.statusCode=t,a}}},{key:"serializeData",value:function(e,t){if(!e)return new Uint8Array(0);if("application/json"===t["content-type"])return new Uint8Array(g.from(JSON.stringify(e)));if("string"===typeof e)return new Uint8Array(g.from(e));if(e instanceof Uint8Array)return e;throw new Error("provided data is neither a string nor a Uint8Array and content-type is not application/json")}},{key:"prepareResponse",value:function(t,n,a){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=t.body;return"application/msgpack"!==n&&(r=s&&g.from(s).toString()||""),a&&"application/json"===n&&(s=e.parseJSON(r,t.status,i)),(0,o.Z)((0,o.Z)({},t),{},{body:s,text:r,ok:2===Math.trunc(t.status/100)})}},{key:"prepareResponseError",value:function(t){return t.response&&(t.response=e.prepareResponse(t.response,"application/json",!0),t.status=t.response.status),t}}]),e}()},96443:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var a=n(74165),o=n(15861),r=n(15671),i=n(43144),s=n(60136),c=n(29388),u=n(40233),d=n(78642),l=n(54659).Buffer,f=function(e){(0,s.Z)(n,e);var t=(0,c.Z)(n);function n(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"http://127.0.0.1",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7833,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,r.Z)(this,n),t.call(this,"X-KMD-API-Token",e,a,o,i)}return(0,i.Z)(n,[{key:"versions",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(){var t;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.c.get("/versions");case 2:return t=e.sent,e.abrupt("return",t.body);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"listWallets",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(){var t;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.c.get("/v1/wallets");case 2:return t=e.sent,e.abrupt("return",t.body);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"createWallet",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n){var o,r,i,s=arguments;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:new Uint8Array,r={wallet_name:t,wallet_driver_name:s.length>3&&void 0!==s[3]?s[3]:"sqlite",wallet_password:n,master_derivation_key:l.from(o).toString("base64")},e.next=5,this.c.post("/v1/wallet",r);case 5:return i=e.sent,e.abrupt("return",i.body);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"initWalletHandle",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n){var o,r;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={wallet_id:t,wallet_password:n},e.next=3,this.c.post("/v1/wallet/init",o);case 3:return r=e.sent,e.abrupt("return",r.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"releaseWalletHandle",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t){var n,o;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t},e.next=3,this.c.post("/v1/wallet/release",n);case 3:return o=e.sent,e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"renewWalletHandle",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t){var n,o;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t},e.next=3,this.c.post("/v1/wallet/renew",n);case 3:return o=e.sent,e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"renameWallet",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n,o){var r,i;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={wallet_id:t,wallet_password:n,wallet_name:o},e.next=3,this.c.post("/v1/wallet/rename",r);case 3:return i=e.sent,e.abrupt("return",i.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getWallet",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t){var n,o;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t},e.next=3,this.c.post("/v1/wallet/info",n);case 3:return o=e.sent,e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"exportMasterDerivationKey",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n){var o,r;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={wallet_handle_token:t,wallet_password:n},e.next=3,this.c.post("/v1/master-key/export",o);case 3:return r=e.sent,e.abrupt("return",{master_derivation_key:l.from(r.body.master_derivation_key,"base64")});case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"importKey",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n){var o,r;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={wallet_handle_token:t,private_key:l.from(n).toString("base64")},e.next=3,this.c.post("/v1/key/import",o);case 3:return r=e.sent,e.abrupt("return",r.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"exportKey",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n,o){var r,i;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={wallet_handle_token:t,address:o,wallet_password:n},e.next=3,this.c.post("/v1/key/export",r);case 3:return i=e.sent,e.abrupt("return",{private_key:l.from(i.body.private_key,"base64")});case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"generateKey",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t){var n,o;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t,display_mnemonic:!1},e.next=3,this.c.post("/v1/key",n);case 3:return o=e.sent,e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"deleteKey",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n,o){var r,i;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={wallet_handle_token:t,address:o,wallet_password:n},e.next=3,this.c.delete("/v1/key",r);case 3:return i=e.sent,e.abrupt("return",i.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"listKeys",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t){var n,o;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t},e.next=3,this.c.post("/v1/key/list",n);case 3:return o=e.sent,e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signTransaction",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n,o){var r,i,s;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.instantiateTxnIfNeeded(o),i={wallet_handle_token:t,wallet_password:n,transaction:l.from(r.toByte()).toString("base64")},e.next=4,this.c.post("/v1/transaction/sign",i);case 4:if(200!==(s=e.sent).status){e.next=7;break}return e.abrupt("return",l.from(s.body.signed_transaction,"base64"));case 7:return e.abrupt("return",s.body);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"signTransactionWithSpecificPublicKey",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n,o,r){var i,s,c;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.instantiateTxnIfNeeded(o),s={wallet_handle_token:t,wallet_password:n,transaction:l.from(i.toByte()).toString("base64"),public_key:l.from(r).toString("base64")},e.next=4,this.c.post("/v1/transaction/sign",s);case 4:if(200!==(c=e.sent).status){e.next=7;break}return e.abrupt("return",l.from(c.body.signed_transaction,"base64"));case 7:return e.abrupt("return",c.body);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"listMultisig",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t){var n,o;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t},e.next=3,this.c.post("/v1/multisig/list",n);case 3:return o=e.sent,e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"importMultisig",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n,o,r){var i,s;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={wallet_handle_token:t,multisig_version:n,threshold:o,pks:r},e.next=3,this.c.post("/v1/multisig/import",i);case 3:return s=e.sent,e.abrupt("return",s.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"exportMultisig",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n){var o,r;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={wallet_handle_token:t,address:n},e.next=3,this.c.post("/v1/multisig/export",o);case 3:return r=e.sent,e.abrupt("return",r.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"signMultisigTransaction",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n,o,r,i){var s,c,u;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=d.instantiateTxnIfNeeded(o),c={wallet_handle_token:t,transaction:l.from(s.toByte()).toString("base64"),public_key:l.from(r).toString("base64"),partial_multisig:i,wallet_password:n},e.next=4,this.c.post("/v1/multisig/sign",c);case 4:return u=e.sent,e.abrupt("return",u.body);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r){return e.apply(this,arguments)}}()},{key:"deleteMultisig",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t,n,o){var r,i;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={wallet_handle_token:t,address:o,wallet_password:n},e.next=3,this.c.delete("/v1/multisig",r);case 3:return i=e.sent,e.abrupt("return",i.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()}]),n}(u.Z)},89414:function(e,t,n){"use strict";n.d(t,{Z:function(){return z}});var a=n(15671),o=n(43144),r=n(60136),i=n(29388),s=n(40233),c=n(7002),u=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).account=r,i.account=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account)}},{key:"exclude",value:function(e){return this.query.exclude=e,this}}]),n}(c.Z),d=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r,i){var s;return(0,a.Z)(this,n),(s=t.call(this,e,o)).account=r,s.assetID=i,s.account=r,s.assetID=i,s}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/assets/").concat(this.assetID)}}]),n}(c.Z),l=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r,i){var s;return(0,a.Z)(this,n),(s=t.call(this,e,o)).account=r,s.applicationID=i,s.account=r,s.applicationID=i,s}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/applications/").concat(this.applicationID)}}]),n}(c.Z),f=n(30511),p=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;if((0,a.Z)(this,n),r=t.call(this,e),!Number.isInteger(o))throw Error("roundNumber should be an integer");return r.round=o,r.query={format:"msgpack"},r}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/blocks/".concat(this.round)}},{key:"prepare",value:function(e){if(e&&e.byteLength>0)return f.decode(e)}}]),n}(c.Z),b=n(74165),m=n(15861),h=n(1413),g=n(54659).Buffer;function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e;return Object.keys(t).every((function(e){return"content-type"!==e.toLowerCase()}))&&((t=(0,h.Z)({},e))["Content-Type"]="text/plain"),t}var v=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this,e)).source=o,r.source=o,r}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/teal/compile"}},{key:"sourcemap",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query.sourcemap=e,this}},{key:"do",value:function(){var e=(0,m.Z)((0,b.Z)().mark((function e(){var t,n,a=arguments;return(0,b.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=y(a.length>0&&void 0!==a[0]?a[0]:{}),e.next=4,this.c.post(this.path(),g.from(this.source),t,this.query);case 4:return n=e.sent,e.abrupt("return",n.body);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(c.Z),w=n(54659).Buffer,k=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this,e)).blob=f.encode(o.get_obj_for_encoding(!0)),r}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/teal/dryrun"}},{key:"do",value:function(){var e=(0,m.Z)((0,b.Z)().mark((function e(){var t,n,a=arguments;return(0,b.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=y(a.length>0&&void 0!==a[0]?a[0]:{}),e.next=4,this.c.post(this.path(),w.from(this.blob),t);case 4:return n=e.sent,e.abrupt("return",n.body);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(c.Z),A=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"path",value:function(){return"/genesis"}}]),n}(c.Z),x=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).index=r,i.index=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/assets/".concat(this.index)}}]),n}(c.Z),I=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).index=r,i.index=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.index)}}]),n}(c.Z),T=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;if((0,a.Z)(this,n),i=t.call(this,e,o),!Number.isInteger(r))throw Error("roundNumber should be an integer");return i.round=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/blocks/".concat(this.round,"/hash")}}]),n}(c.Z),S=n(84992),C=n(54659).Buffer,E=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r,i){var s;(0,a.Z)(this,n),(s=t.call(this,e,o)).index=r,s.index=r;var c=C.from(i).toString("base64");return s.query.name=encodeURI("b64:".concat(c)),s}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.index,"/box")}},{key:"prepare",value:function(e){return S.Box.from_obj_for_encoding(e)}}]),n}(c.Z),R=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).index=r,i.index=r,i.query.max=0,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.index,"/boxes")}},{key:"max",value:function(e){return this.query.max=e,this}},{key:"prepare",value:function(e){return S.BoxesResponse.from_obj_for_encoding(e)}}]),n}(c.Z),M=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"path",value:function(){return"/health"}},{key:"do",value:function(){var e=(0,m.Z)((0,b.Z)().mark((function e(){var t,n,a=arguments;return(0,b.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.c.get(this.path(),{},t);case 3:if((n=e.sent).ok){e.next=6;break}throw new Error("Health response: ".concat(n.status));case 6:return e.abrupt("return",{});case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(c.Z),P=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this,e)).txid=o,r.txid=o,r.query.format="msgpack",r}return(0,o.Z)(n,[{key:"prepare",value:function(e){if(e&&e.byteLength>0)return f.decode(e)}},{key:"path",value:function(){return"/v2/transactions/pending/".concat(this.txid)}},{key:"max",value:function(e){return this.query.max=e,this}}]),n}(c.Z),U=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o;return(0,a.Z)(this,n),(o=t.call(this,e)).query.format="msgpack",o}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/transactions/pending"}},{key:"prepare",value:function(e){if(e&&e.byteLength>0)return f.decode(e)}},{key:"max",value:function(e){return this.query.max=e,this}}]),n}(c.Z),_=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this,e)).address=o,r.address=o,r.query.format="msgpack",r}return(0,o.Z)(n,[{key:"prepare",value:function(e){if(e&&e.byteLength>0)return f.decode(e)}},{key:"path",value:function(){return"/v2/accounts/".concat(this.address,"/transactions/pending")}},{key:"max",value:function(e){return this.query.max=e,this}}]),n}(c.Z),B=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r,i){var s;return(0,a.Z)(this,n),(s=t.call(this,e,o)).round=r,s.txID=i,s.round=r,s.txID=i,s}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/blocks/".concat(this.round,"/transactions/").concat(this.txID,"/proof")}},{key:"hashType",value:function(e){return this.query.hashtype=e,this}}]),n}(c.Z),D=n(50619),N=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/status"}}]),n}(c.Z),O=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;if((0,a.Z)(this,n),(i=t.call(this,e,o)).round=r,!Number.isInteger(r))throw Error("round should be an integer");return i.round=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/status/wait-for-block-after/".concat(this.round)}}]),n}(c.Z),F=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/transactions/params"}},{key:"prepare",value:function(e){return{flatFee:!1,fee:e.fee,firstRound:e["last-round"],lastRound:e["last-round"]+1e3,genesisID:e["genesis-id"],genesisHash:e["genesis-hash"]}}}]),n}(c.Z),L=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/ledger/supply"}}]),n}(c.Z),j=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"path",value:function(){return"/versions"}}]),n}(c.Z),H=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).round=r,i.round=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/blocks/".concat(this.round,"/lightheader/proof")}}]),n}(c.Z),G=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).round=r,i.round=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/stateproofs/".concat(this.round)}}]),n}(c.Z),z=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"http://r2.algorand.network",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4180,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,a.Z)(this,n),t.call(this,"X-Algo-API-Token",e,o,r,i)}return(0,o.Z)(n,[{key:"healthCheck",value:function(){return new M(this.c)}},{key:"versionsCheck",value:function(){return new j(this.c)}},{key:"sendRawTransaction",value:function(e){return new D.default(this.c,e)}},{key:"accountInformation",value:function(e){return new u(this.c,this.intDecoding,e)}},{key:"accountAssetInformation",value:function(e,t){return new d(this.c,this.intDecoding,e,t)}},{key:"accountApplicationInformation",value:function(e,t){return new l(this.c,this.intDecoding,e,t)}},{key:"block",value:function(e){return new p(this.c,e)}},{key:"getBlockHash",value:function(e){return new T(this.c,this.intDecoding,e)}},{key:"pendingTransactionInformation",value:function(e){return new P(this.c,e)}},{key:"pendingTransactionsInformation",value:function(){return new U(this.c)}},{key:"pendingTransactionByAddress",value:function(e){return new _(this.c,e)}},{key:"status",value:function(){return new N(this.c,this.intDecoding)}},{key:"statusAfterBlock",value:function(e){return new O(this.c,this.intDecoding,e)}},{key:"getTransactionParams",value:function(){return new F(this.c)}},{key:"supply",value:function(){return new L(this.c,this.intDecoding)}},{key:"compile",value:function(e){return new v(this.c,e)}},{key:"dryrun",value:function(e){return new k(this.c,e)}},{key:"getAssetByID",value:function(e){return new x(this.c,this.intDecoding,e)}},{key:"getApplicationByID",value:function(e){return new I(this.c,this.intDecoding,e)}},{key:"getApplicationBoxByName",value:function(e,t){return new E(this.c,this.intDecoding,e,t)}},{key:"getApplicationBoxes",value:function(e){return new R(this.c,this.intDecoding,e)}},{key:"genesis",value:function(){return new A(this.c,this.intDecoding)}},{key:"getTransactionProof",value:function(e,t){return new B(this.c,this.intDecoding,e,t)}},{key:"getLightBlockHeaderProof",value:function(e){return new H(this.c,this.intDecoding,e)}},{key:"getStateProof",value:function(e){return new G(this.c,this.intDecoding,e)}}]),n}(s.Z)},84992:function(e,t,n){"use strict";n.r(t),n.d(t,{Account:function(){return u},AccountApplicationResponse:function(){return d},AccountAssetResponse:function(){return l},AccountParticipation:function(){return f},AccountStateDelta:function(){return p},Application:function(){return b},ApplicationLocalState:function(){return m},ApplicationParams:function(){return h},ApplicationStateSchema:function(){return g},Asset:function(){return y},AssetHolding:function(){return v},AssetParams:function(){return w},BlockHashResponse:function(){return k},BlockResponse:function(){return A},Box:function(){return x},BoxDescriptor:function(){return I},BoxesResponse:function(){return T},BuildVersion:function(){return S},CatchpointAbortResponse:function(){return C},CatchpointStartResponse:function(){return E},CompileResponse:function(){return R},DisassembleResponse:function(){return M},DryrunRequest:function(){return P},DryrunResponse:function(){return U},DryrunSource:function(){return _},DryrunState:function(){return B},DryrunTxnResult:function(){return D},ErrorResponse:function(){return N},EvalDelta:function(){return O},EvalDeltaKeyValue:function(){return F},LightBlockHeaderProof:function(){return L},NodeStatusResponse:function(){return j},PendingTransactionResponse:function(){return H},PendingTransactionsResponse:function(){return G},PostTransactionsResponse:function(){return z},StateProof:function(){return K},StateProofMessage:function(){return W},SupplyResponse:function(){return Z},TealKeyValue:function(){return V},TealValue:function(){return q},TransactionParametersResponse:function(){return Q},TransactionProofResponse:function(){return J},Version:function(){return Y}});var a=n(15671),o=n(43144),r=n(60136),i=n(29388),s=n(22996),c=n(54659).Buffer,u=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.address,i=e.amount,s=e.amountWithoutPendingRewards,c=e.minBalance,u=e.pendingRewards,d=e.rewards,l=e.round,f=e.status,p=e.totalAppsOptedIn,b=e.totalAssetsOptedIn,m=e.totalCreatedApps,h=e.totalCreatedAssets,g=e.appsLocalState,y=e.appsTotalExtraPages,v=e.appsTotalSchema,w=e.assets,k=e.authAddr,A=e.createdApps,x=e.createdAssets,I=e.participation,T=e.rewardBase,S=e.sigType,C=e.totalBoxBytes,E=e.totalBoxes;return(0,a.Z)(this,n),(o=t.call(this)).address=r,o.amount=i,o.amountWithoutPendingRewards=s,o.minBalance=c,o.pendingRewards=u,o.rewards=d,o.round=l,o.status=f,o.totalAppsOptedIn=p,o.totalAssetsOptedIn=b,o.totalCreatedApps=m,o.totalCreatedAssets=h,o.appsLocalState=g,o.appsTotalExtraPages=y,o.appsTotalSchema=v,o.assets=w,o.authAddr=k,o.createdApps=A,o.createdAssets=x,o.participation=I,o.rewardBase=T,o.sigType=S,o.totalBoxBytes=C,o.totalBoxes=E,o.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",minBalance:"min-balance",pendingRewards:"pending-rewards",rewards:"rewards",round:"round",status:"status",totalAppsOptedIn:"total-apps-opted-in",totalAssetsOptedIn:"total-assets-opted-in",totalCreatedApps:"total-created-apps",totalCreatedAssets:"total-created-assets",appsLocalState:"apps-local-state",appsTotalExtraPages:"apps-total-extra-pages",appsTotalSchema:"apps-total-schema",assets:"assets",authAddr:"auth-addr",createdApps:"created-apps",createdAssets:"created-assets",participation:"participation",rewardBase:"reward-base",sigType:"sig-type",totalBoxBytes:"total-box-bytes",totalBoxes:"total-boxes"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.address)throw new Error("Response is missing required field 'address': ".concat(e));if("undefined"===typeof e.amount)throw new Error("Response is missing required field 'amount': ".concat(e));if("undefined"===typeof e["amount-without-pending-rewards"])throw new Error("Response is missing required field 'amount-without-pending-rewards': ".concat(e));if("undefined"===typeof e["min-balance"])throw new Error("Response is missing required field 'min-balance': ".concat(e));if("undefined"===typeof e["pending-rewards"])throw new Error("Response is missing required field 'pending-rewards': ".concat(e));if("undefined"===typeof e.rewards)throw new Error("Response is missing required field 'rewards': ".concat(e));if("undefined"===typeof e.round)throw new Error("Response is missing required field 'round': ".concat(e));if("undefined"===typeof e.status)throw new Error("Response is missing required field 'status': ".concat(e));if("undefined"===typeof e["total-apps-opted-in"])throw new Error("Response is missing required field 'total-apps-opted-in': ".concat(e));if("undefined"===typeof e["total-assets-opted-in"])throw new Error("Response is missing required field 'total-assets-opted-in': ".concat(e));if("undefined"===typeof e["total-created-apps"])throw new Error("Response is missing required field 'total-created-apps': ".concat(e));if("undefined"===typeof e["total-created-assets"])throw new Error("Response is missing required field 'total-created-assets': ".concat(e));return new n({address:e.address,amount:e.amount,amountWithoutPendingRewards:e["amount-without-pending-rewards"],minBalance:e["min-balance"],pendingRewards:e["pending-rewards"],rewards:e.rewards,round:e.round,status:e.status,totalAppsOptedIn:e["total-apps-opted-in"],totalAssetsOptedIn:e["total-assets-opted-in"],totalCreatedApps:e["total-created-apps"],totalCreatedAssets:e["total-created-assets"],appsLocalState:"undefined"!==typeof e["apps-local-state"]?e["apps-local-state"].map(m.from_obj_for_encoding):void 0,appsTotalExtraPages:e["apps-total-extra-pages"],appsTotalSchema:"undefined"!==typeof e["apps-total-schema"]?g.from_obj_for_encoding(e["apps-total-schema"]):void 0,assets:"undefined"!==typeof e.assets?e.assets.map(v.from_obj_for_encoding):void 0,authAddr:e["auth-addr"],createdApps:"undefined"!==typeof e["created-apps"]?e["created-apps"].map(b.from_obj_for_encoding):void 0,createdAssets:"undefined"!==typeof e["created-assets"]?e["created-assets"].map(y.from_obj_for_encoding):void 0,participation:"undefined"!==typeof e.participation?f.from_obj_for_encoding(e.participation):void 0,rewardBase:e["reward-base"],sigType:e["sig-type"],totalBoxBytes:e["total-box-bytes"],totalBoxes:e["total-boxes"]})}}]),n}(s.Z),d=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this)).round=e,i.appLocalState=o,i.createdApp=r,i.attribute_map={round:"round",appLocalState:"app-local-state",createdApp:"created-app"},i}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.round)throw new Error("Response is missing required field 'round': ".concat(e));return new n(e.round,"undefined"!==typeof e["app-local-state"]?m.from_obj_for_encoding(e["app-local-state"]):void 0,"undefined"!==typeof e["created-app"]?h.from_obj_for_encoding(e["created-app"]):void 0)}}]),n}(s.Z),l=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this)).round=e,i.assetHolding=o,i.createdAsset=r,i.attribute_map={round:"round",assetHolding:"asset-holding",createdAsset:"created-asset"},i}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.round)throw new Error("Response is missing required field 'round': ".concat(e));return new n(e.round,"undefined"!==typeof e["asset-holding"]?v.from_obj_for_encoding(e["asset-holding"]):void 0,"undefined"!==typeof e["created-asset"]?w.from_obj_for_encoding(e["created-asset"]):void 0)}}]),n}(s.Z),f=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.selectionParticipationKey,i=e.voteFirstValid,s=e.voteKeyDilution,u=e.voteLastValid,d=e.voteParticipationKey,l=e.stateProofKey;return(0,a.Z)(this,n),(o=t.call(this)).selectionParticipationKey="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.voteFirstValid=i,o.voteKeyDilution=s,o.voteLastValid=u,o.voteParticipationKey="string"===typeof d?new Uint8Array(c.from(d,"base64")):d,o.stateProofKey="string"===typeof l?new Uint8Array(c.from(l,"base64")):l,o.attribute_map={selectionParticipationKey:"selection-participation-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key",stateProofKey:"state-proof-key"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["selection-participation-key"])throw new Error("Response is missing required field 'selection-participation-key': ".concat(e));if("undefined"===typeof e["vote-first-valid"])throw new Error("Response is missing required field 'vote-first-valid': ".concat(e));if("undefined"===typeof e["vote-key-dilution"])throw new Error("Response is missing required field 'vote-key-dilution': ".concat(e));if("undefined"===typeof e["vote-last-valid"])throw new Error("Response is missing required field 'vote-last-valid': ".concat(e));if("undefined"===typeof e["vote-participation-key"])throw new Error("Response is missing required field 'vote-participation-key': ".concat(e));return new n({selectionParticipationKey:e["selection-participation-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"],stateProofKey:e["state-proof-key"]})}}]),n}(s.Z),p=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this)).address=e,r.delta=o,r.attribute_map={address:"address",delta:"delta"},r}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.address)throw new Error("Response is missing required field 'address': ".concat(e));if(!Array.isArray(e.delta))throw new Error("Response is missing required array field 'delta': ".concat(e));return new n(e.address,e.delta.map(F.from_obj_for_encoding))}}]),n}(s.Z),b=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this)).id=e,r.params=o,r.attribute_map={id:"id",params:"params"},r}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.id)throw new Error("Response is missing required field 'id': ".concat(e));if("undefined"===typeof e.params)throw new Error("Response is missing required field 'params': ".concat(e));return new n(e.id,h.from_obj_for_encoding(e.params))}}]),n}(s.Z),m=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this)).id=e,i.schema=o,i.keyValue=r,i.attribute_map={id:"id",schema:"schema",keyValue:"key-value"},i}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.id)throw new Error("Response is missing required field 'id': ".concat(e));if("undefined"===typeof e.schema)throw new Error("Response is missing required field 'schema': ".concat(e));return new n(e.id,g.from_obj_for_encoding(e.schema),"undefined"!==typeof e["key-value"]?e["key-value"].map(V.from_obj_for_encoding):void 0)}}]),n}(s.Z),h=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.approvalProgram,i=e.clearStateProgram,s=e.creator,u=e.extraProgramPages,d=e.globalState,l=e.globalStateSchema,f=e.localStateSchema;return(0,a.Z)(this,n),(o=t.call(this)).approvalProgram="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.clearStateProgram="string"===typeof i?new Uint8Array(c.from(i,"base64")):i,o.creator=s,o.extraProgramPages=u,o.globalState=d,o.globalStateSchema=l,o.localStateSchema=f,o.attribute_map={approvalProgram:"approval-program",clearStateProgram:"clear-state-program",creator:"creator",extraProgramPages:"extra-program-pages",globalState:"global-state",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["approval-program"])throw new Error("Response is missing required field 'approval-program': ".concat(e));if("undefined"===typeof e["clear-state-program"])throw new Error("Response is missing required field 'clear-state-program': ".concat(e));if("undefined"===typeof e.creator)throw new Error("Response is missing required field 'creator': ".concat(e));return new n({approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],creator:e.creator,extraProgramPages:e["extra-program-pages"],globalState:"undefined"!==typeof e["global-state"]?e["global-state"].map(V.from_obj_for_encoding):void 0,globalStateSchema:"undefined"!==typeof e["global-state-schema"]?g.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:"undefined"!==typeof e["local-state-schema"]?g.from_obj_for_encoding(e["local-state-schema"]):void 0})}}]),n}(s.Z),g=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this)).numUint=e,r.numByteSlice=o,r.attribute_map={numUint:"num-uint",numByteSlice:"num-byte-slice"},r}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["num-uint"])throw new Error("Response is missing required field 'num-uint': ".concat(e));if("undefined"===typeof e["num-byte-slice"])throw new Error("Response is missing required field 'num-byte-slice': ".concat(e));return new n(e["num-uint"],e["num-byte-slice"])}}]),n}(s.Z),y=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this)).index=e,r.params=o,r.attribute_map={index:"index",params:"params"},r}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.index)throw new Error("Response is missing required field 'index': ".concat(e));if("undefined"===typeof e.params)throw new Error("Response is missing required field 'params': ".concat(e));return new n(e.index,w.from_obj_for_encoding(e.params))}}]),n}(s.Z),v=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this)).amount=e,i.assetId=o,i.isFrozen=r,i.attribute_map={amount:"amount",assetId:"asset-id",isFrozen:"is-frozen"},i}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.amount)throw new Error("Response is missing required field 'amount': ".concat(e));if("undefined"===typeof e["asset-id"])throw new Error("Response is missing required field 'asset-id': ".concat(e));if("undefined"===typeof e["is-frozen"])throw new Error("Response is missing required field 'is-frozen': ".concat(e));return new n(e.amount,e["asset-id"],e["is-frozen"])}}]),n}(s.Z),w=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.creator,i=e.decimals,s=e.total,u=e.clawback,d=e.defaultFrozen,l=e.freeze,f=e.manager,p=e.metadataHash,b=e.name,m=e.nameB64,h=e.reserve,g=e.unitName,y=e.unitNameB64,v=e.url,w=e.urlB64;return(0,a.Z)(this,n),(o=t.call(this)).creator=r,o.decimals=i,o.total=s,o.clawback=u,o.defaultFrozen=d,o.freeze=l,o.manager=f,o.metadataHash="string"===typeof p?new Uint8Array(c.from(p,"base64")):p,o.name=b,o.nameB64="string"===typeof m?new Uint8Array(c.from(m,"base64")):m,o.reserve=h,o.unitName=g,o.unitNameB64="string"===typeof y?new Uint8Array(c.from(y,"base64")):y,o.url=v,o.urlB64="string"===typeof w?new Uint8Array(c.from(w,"base64")):w,o.attribute_map={creator:"creator",decimals:"decimals",total:"total",clawback:"clawback",defaultFrozen:"default-frozen",freeze:"freeze",manager:"manager",metadataHash:"metadata-hash",name:"name",nameB64:"name-b64",reserve:"reserve",unitName:"unit-name",unitNameB64:"unit-name-b64",url:"url",urlB64:"url-b64"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.creator)throw new Error("Response is missing required field 'creator': ".concat(e));if("undefined"===typeof e.decimals)throw new Error("Response is missing required field 'decimals': ".concat(e));if("undefined"===typeof e.total)throw new Error("Response is missing required field 'total': ".concat(e));return new n({creator:e.creator,decimals:e.decimals,total:e.total,clawback:e.clawback,defaultFrozen:e["default-frozen"],freeze:e.freeze,manager:e.manager,metadataHash:e["metadata-hash"],name:e.name,nameB64:e["name-b64"],reserve:e.reserve,unitName:e["unit-name"],unitNameB64:e["unit-name-b64"],url:e.url,urlB64:e["url-b64"]})}}]),n}(s.Z),k=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o;return(0,a.Z)(this,n),(o=t.call(this)).blockhash=e,o.attribute_map={blockhash:"blockHash"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.blockHash)throw new Error("Response is missing required field 'blockHash': ".concat(e));return new n(e.blockHash)}}]),n}(s.Z),A=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this)).block=e,r.cert=o,r.attribute_map={block:"block",cert:"cert"},r}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.block)throw new Error("Response is missing required field 'block': ".concat(e));return new n(e.block,e.cert)}}]),n}(s.Z),x=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this)).name="string"===typeof e?new Uint8Array(c.from(e,"base64")):e,r.value="string"===typeof o?new Uint8Array(c.from(o,"base64")):o,r.attribute_map={name:"name",value:"value"},r}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.name)throw new Error("Response is missing required field 'name': ".concat(e));if("undefined"===typeof e.value)throw new Error("Response is missing required field 'value': ".concat(e));return new n(e.name,e.value)}}]),n}(s.Z),I=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o;return(0,a.Z)(this,n),(o=t.call(this)).name="string"===typeof e?new Uint8Array(c.from(e,"base64")):e,o.attribute_map={name:"name"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.name)throw new Error("Response is missing required field 'name': ".concat(e));return new n(e.name)}}]),n}(s.Z),T=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o;return(0,a.Z)(this,n),(o=t.call(this)).boxes=e,o.attribute_map={boxes:"boxes"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if(!Array.isArray(e.boxes))throw new Error("Response is missing required array field 'boxes': ".concat(e));return new n(e.boxes.map(I.from_obj_for_encoding))}}]),n}(s.Z),S=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.branch,i=e.buildNumber,s=e.channel,c=e.commitHash,u=e.major,d=e.minor;return(0,a.Z)(this,n),(o=t.call(this)).branch=r,o.buildNumber=i,o.channel=s,o.commitHash=c,o.major=u,o.minor=d,o.attribute_map={branch:"branch",buildNumber:"build_number",channel:"channel",commitHash:"commit_hash",major:"major",minor:"minor"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.branch)throw new Error("Response is missing required field 'branch': ".concat(e));if("undefined"===typeof e.build_number)throw new Error("Response is missing required field 'build_number': ".concat(e));if("undefined"===typeof e.channel)throw new Error("Response is missing required field 'channel': ".concat(e));if("undefined"===typeof e.commit_hash)throw new Error("Response is missing required field 'commit_hash': ".concat(e));if("undefined"===typeof e.major)throw new Error("Response is missing required field 'major': ".concat(e));if("undefined"===typeof e.minor)throw new Error("Response is missing required field 'minor': ".concat(e));return new n({branch:e.branch,buildNumber:e.build_number,channel:e.channel,commitHash:e.commit_hash,major:e.major,minor:e.minor})}}]),n}(s.Z),C=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o;return(0,a.Z)(this,n),(o=t.call(this)).catchupMessage=e,o.attribute_map={catchupMessage:"catchup-message"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["catchup-message"])throw new Error("Response is missing required field 'catchup-message': ".concat(e));return new n(e["catchup-message"])}}]),n}(s.Z),E=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o;return(0,a.Z)(this,n),(o=t.call(this)).catchupMessage=e,o.attribute_map={catchupMessage:"catchup-message"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["catchup-message"])throw new Error("Response is missing required field 'catchup-message': ".concat(e));return new n(e["catchup-message"])}}]),n}(s.Z),R=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this)).hash=e,i.result=o,i.sourcemap=r,i.attribute_map={hash:"hash",result:"result",sourcemap:"sourcemap"},i}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.hash)throw new Error("Response is missing required field 'hash': ".concat(e));if("undefined"===typeof e.result)throw new Error("Response is missing required field 'result': ".concat(e));return new n(e.hash,e.result,e.sourcemap)}}]),n}(s.Z),M=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o;return(0,a.Z)(this,n),(o=t.call(this)).result=e,o.attribute_map={result:"result"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.result)throw new Error("Response is missing required field 'result': ".concat(e));return new n(e.result)}}]),n}(s.Z),P=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.accounts,i=e.apps,s=e.latestTimestamp,c=e.protocolVersion,u=e.round,d=e.sources,l=e.txns;return(0,a.Z)(this,n),(o=t.call(this)).accounts=r,o.apps=i,o.latestTimestamp=s,o.protocolVersion=c,o.round=u,o.sources=d,o.txns=l,o.attribute_map={accounts:"accounts",apps:"apps",latestTimestamp:"latest-timestamp",protocolVersion:"protocol-version",round:"round",sources:"sources",txns:"txns"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if(!Array.isArray(e.accounts))throw new Error("Response is missing required array field 'accounts': ".concat(e));if(!Array.isArray(e.apps))throw new Error("Response is missing required array field 'apps': ".concat(e));if("undefined"===typeof e["latest-timestamp"])throw new Error("Response is missing required field 'latest-timestamp': ".concat(e));if("undefined"===typeof e["protocol-version"])throw new Error("Response is missing required field 'protocol-version': ".concat(e));if("undefined"===typeof e.round)throw new Error("Response is missing required field 'round': ".concat(e));if(!Array.isArray(e.sources))throw new Error("Response is missing required array field 'sources': ".concat(e));if(!Array.isArray(e.txns))throw new Error("Response is missing required array field 'txns': ".concat(e));return new n({accounts:e.accounts.map(u.from_obj_for_encoding),apps:e.apps.map(b.from_obj_for_encoding),latestTimestamp:e["latest-timestamp"],protocolVersion:e["protocol-version"],round:e.round,sources:e.sources.map(_.from_obj_for_encoding),txns:e.txns})}}]),n}(s.Z),U=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this)).error=e,i.protocolVersion=o,i.txns=r,i.attribute_map={error:"error",protocolVersion:"protocol-version",txns:"txns"},i}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.error)throw new Error("Response is missing required field 'error': ".concat(e));if("undefined"===typeof e["protocol-version"])throw new Error("Response is missing required field 'protocol-version': ".concat(e));if(!Array.isArray(e.txns))throw new Error("Response is missing required array field 'txns': ".concat(e));return new n(e.error,e["protocol-version"],e.txns.map(D.from_obj_for_encoding))}}]),n}(s.Z),_=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r,i){var s;return(0,a.Z)(this,n),(s=t.call(this)).fieldName=e,s.source=o,s.txnIndex=r,s.appIndex=i,s.attribute_map={fieldName:"field-name",source:"source",txnIndex:"txn-index",appIndex:"app-index"},s}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["field-name"])throw new Error("Response is missing required field 'field-name': ".concat(e));if("undefined"===typeof e.source)throw new Error("Response is missing required field 'source': ".concat(e));if("undefined"===typeof e["txn-index"])throw new Error("Response is missing required field 'txn-index': ".concat(e));if("undefined"===typeof e["app-index"])throw new Error("Response is missing required field 'app-index': ".concat(e));return new n(e["field-name"],e.source,e["txn-index"],e["app-index"])}}]),n}(s.Z),B=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.line,i=e.pc,s=e.stack,c=e.error,u=e.scratch;return(0,a.Z)(this,n),(o=t.call(this)).line=r,o.pc=i,o.stack=s,o.error=c,o.scratch=u,o.attribute_map={line:"line",pc:"pc",stack:"stack",error:"error",scratch:"scratch"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.line)throw new Error("Response is missing required field 'line': ".concat(e));if("undefined"===typeof e.pc)throw new Error("Response is missing required field 'pc': ".concat(e));if(!Array.isArray(e.stack))throw new Error("Response is missing required array field 'stack': ".concat(e));return new n({line:e.line,pc:e.pc,stack:e.stack.map(q.from_obj_for_encoding),error:e.error,scratch:"undefined"!==typeof e.scratch?e.scratch.map(q.from_obj_for_encoding):void 0})}}]),n}(s.Z),D=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.disassembly,i=e.appCallMessages,s=e.appCallTrace,c=e.budgetAdded,u=e.budgetConsumed,d=e.cost,l=e.globalDelta,f=e.localDeltas,p=e.logicSigDisassembly,b=e.logicSigMessages,m=e.logicSigTrace,h=e.logs;return(0,a.Z)(this,n),(o=t.call(this)).disassembly=r,o.appCallMessages=i,o.appCallTrace=s,o.budgetAdded=c,o.budgetConsumed=u,o.cost=d,o.globalDelta=l,o.localDeltas=f,o.logicSigDisassembly=p,o.logicSigMessages=b,o.logicSigTrace=m,o.logs=h,o.attribute_map={disassembly:"disassembly",appCallMessages:"app-call-messages",appCallTrace:"app-call-trace",budgetAdded:"budget-added",budgetConsumed:"budget-consumed",cost:"cost",globalDelta:"global-delta",localDeltas:"local-deltas",logicSigDisassembly:"logic-sig-disassembly",logicSigMessages:"logic-sig-messages",logicSigTrace:"logic-sig-trace",logs:"logs"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if(!Array.isArray(e.disassembly))throw new Error("Response is missing required array field 'disassembly': ".concat(e));return new n({disassembly:e.disassembly,appCallMessages:e["app-call-messages"],appCallTrace:"undefined"!==typeof e["app-call-trace"]?e["app-call-trace"].map(B.from_obj_for_encoding):void 0,budgetAdded:e["budget-added"],budgetConsumed:e["budget-consumed"],cost:e.cost,globalDelta:"undefined"!==typeof e["global-delta"]?e["global-delta"].map(F.from_obj_for_encoding):void 0,localDeltas:"undefined"!==typeof e["local-deltas"]?e["local-deltas"].map(p.from_obj_for_encoding):void 0,logicSigDisassembly:e["logic-sig-disassembly"],logicSigMessages:e["logic-sig-messages"],logicSigTrace:"undefined"!==typeof e["logic-sig-trace"]?e["logic-sig-trace"].map(B.from_obj_for_encoding):void 0,logs:e.logs})}}]),n}(s.Z),N=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this)).message=e,r.data=o,r.attribute_map={message:"message",data:"data"},r}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.message)throw new Error("Response is missing required field 'message': ".concat(e));return new n(e.message,e.data)}}]),n}(s.Z),O=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this)).action=e,i.bytes=o,i.uint=r,i.attribute_map={action:"action",bytes:"bytes",uint:"uint"},i}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.action)throw new Error("Response is missing required field 'action': ".concat(e));return new n(e.action,e.bytes,e.uint)}}]),n}(s.Z),F=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this)).key=e,r.value=o,r.attribute_map={key:"key",value:"value"},r}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.key)throw new Error("Response is missing required field 'key': ".concat(e));if("undefined"===typeof e.value)throw new Error("Response is missing required field 'value': ".concat(e));return new n(e.key,O.from_obj_for_encoding(e.value))}}]),n}(s.Z),L=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this)).index=e,i.proof="string"===typeof o?new Uint8Array(c.from(o,"base64")):o,i.treedepth=r,i.attribute_map={index:"index",proof:"proof",treedepth:"treedepth"},i}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.index)throw new Error("Response is missing required field 'index': ".concat(e));if("undefined"===typeof e.proof)throw new Error("Response is missing required field 'proof': ".concat(e));if("undefined"===typeof e.treedepth)throw new Error("Response is missing required field 'treedepth': ".concat(e));return new n(e.index,e.proof,e.treedepth)}}]),n}(s.Z),j=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.catchupTime,i=e.lastRound,s=e.lastVersion,c=e.nextVersion,u=e.nextVersionRound,d=e.nextVersionSupported,l=e.stoppedAtUnsupportedRound,f=e.timeSinceLastRound,p=e.catchpoint,b=e.catchpointAcquiredBlocks,m=e.catchpointProcessedAccounts,h=e.catchpointProcessedKvs,g=e.catchpointTotalAccounts,y=e.catchpointTotalBlocks,v=e.catchpointTotalKvs,w=e.catchpointVerifiedAccounts,k=e.catchpointVerifiedKvs,A=e.lastCatchpoint;return(0,a.Z)(this,n),(o=t.call(this)).catchupTime=r,o.lastRound=i,o.lastVersion=s,o.nextVersion=c,o.nextVersionRound=u,o.nextVersionSupported=d,o.stoppedAtUnsupportedRound=l,o.timeSinceLastRound=f,o.catchpoint=p,o.catchpointAcquiredBlocks=b,o.catchpointProcessedAccounts=m,o.catchpointProcessedKvs=h,o.catchpointTotalAccounts=g,o.catchpointTotalBlocks=y,o.catchpointTotalKvs=v,o.catchpointVerifiedAccounts=w,o.catchpointVerifiedKvs=k,o.lastCatchpoint=A,o.attribute_map={catchupTime:"catchup-time",lastRound:"last-round",lastVersion:"last-version",nextVersion:"next-version",nextVersionRound:"next-version-round",nextVersionSupported:"next-version-supported",stoppedAtUnsupportedRound:"stopped-at-unsupported-round",timeSinceLastRound:"time-since-last-round",catchpoint:"catchpoint",catchpointAcquiredBlocks:"catchpoint-acquired-blocks",catchpointProcessedAccounts:"catchpoint-processed-accounts",catchpointProcessedKvs:"catchpoint-processed-kvs",catchpointTotalAccounts:"catchpoint-total-accounts",catchpointTotalBlocks:"catchpoint-total-blocks",catchpointTotalKvs:"catchpoint-total-kvs",catchpointVerifiedAccounts:"catchpoint-verified-accounts",catchpointVerifiedKvs:"catchpoint-verified-kvs",lastCatchpoint:"last-catchpoint"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["catchup-time"])throw new Error("Response is missing required field 'catchup-time': ".concat(e));if("undefined"===typeof e["last-round"])throw new Error("Response is missing required field 'last-round': ".concat(e));if("undefined"===typeof e["last-version"])throw new Error("Response is missing required field 'last-version': ".concat(e));if("undefined"===typeof e["next-version"])throw new Error("Response is missing required field 'next-version': ".concat(e));if("undefined"===typeof e["next-version-round"])throw new Error("Response is missing required field 'next-version-round': ".concat(e));if("undefined"===typeof e["next-version-supported"])throw new Error("Response is missing required field 'next-version-supported': ".concat(e));if("undefined"===typeof e["stopped-at-unsupported-round"])throw new Error("Response is missing required field 'stopped-at-unsupported-round': ".concat(e));if("undefined"===typeof e["time-since-last-round"])throw new Error("Response is missing required field 'time-since-last-round': ".concat(e));return new n({catchupTime:e["catchup-time"],lastRound:e["last-round"],lastVersion:e["last-version"],nextVersion:e["next-version"],nextVersionRound:e["next-version-round"],nextVersionSupported:e["next-version-supported"],stoppedAtUnsupportedRound:e["stopped-at-unsupported-round"],timeSinceLastRound:e["time-since-last-round"],catchpoint:e.catchpoint,catchpointAcquiredBlocks:e["catchpoint-acquired-blocks"],catchpointProcessedAccounts:e["catchpoint-processed-accounts"],catchpointProcessedKvs:e["catchpoint-processed-kvs"],catchpointTotalAccounts:e["catchpoint-total-accounts"],catchpointTotalBlocks:e["catchpoint-total-blocks"],catchpointTotalKvs:e["catchpoint-total-kvs"],catchpointVerifiedAccounts:e["catchpoint-verified-accounts"],catchpointVerifiedKvs:e["catchpoint-verified-kvs"],lastCatchpoint:e["last-catchpoint"]})}}]),n}(s.Z),H=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.poolError,i=e.txn,s=e.applicationIndex,c=e.assetClosingAmount,u=e.assetIndex,d=e.closeRewards,l=e.closingAmount,f=e.confirmedRound,p=e.globalStateDelta,b=e.innerTxns,m=e.localStateDelta,h=e.logs,g=e.receiverRewards,y=e.senderRewards;return(0,a.Z)(this,n),(o=t.call(this)).poolError=r,o.txn=i,o.applicationIndex=s,o.assetClosingAmount=c,o.assetIndex=u,o.closeRewards=d,o.closingAmount=l,o.confirmedRound=f,o.globalStateDelta=p,o.innerTxns=b,o.localStateDelta=m,o.logs=h,o.receiverRewards=g,o.senderRewards=y,o.attribute_map={poolError:"pool-error",txn:"txn",applicationIndex:"application-index",assetClosingAmount:"asset-closing-amount",assetIndex:"asset-index",closeRewards:"close-rewards",closingAmount:"closing-amount",confirmedRound:"confirmed-round",globalStateDelta:"global-state-delta",innerTxns:"inner-txns",localStateDelta:"local-state-delta",logs:"logs",receiverRewards:"receiver-rewards",senderRewards:"sender-rewards"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["pool-error"])throw new Error("Response is missing required field 'pool-error': ".concat(e));if("undefined"===typeof e.txn)throw new Error("Response is missing required field 'txn': ".concat(e));return new n({poolError:e["pool-error"],txn:e.txn,applicationIndex:e["application-index"],assetClosingAmount:e["asset-closing-amount"],assetIndex:e["asset-index"],closeRewards:e["close-rewards"],closingAmount:e["closing-amount"],confirmedRound:e["confirmed-round"],globalStateDelta:"undefined"!==typeof e["global-state-delta"]?e["global-state-delta"].map(F.from_obj_for_encoding):void 0,innerTxns:"undefined"!==typeof e["inner-txns"]?e["inner-txns"].map(n.from_obj_for_encoding):void 0,localStateDelta:"undefined"!==typeof e["local-state-delta"]?e["local-state-delta"].map(p.from_obj_for_encoding):void 0,logs:e.logs,receiverRewards:e["receiver-rewards"],senderRewards:e["sender-rewards"]})}}]),n}(s.Z),G=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this)).topTransactions=e,r.totalTransactions=o,r.attribute_map={topTransactions:"top-transactions",totalTransactions:"total-transactions"},r}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if(!Array.isArray(e["top-transactions"]))throw new Error("Response is missing required array field 'top-transactions': ".concat(e));if("undefined"===typeof e["total-transactions"])throw new Error("Response is missing required field 'total-transactions': ".concat(e));return new n(e["top-transactions"],e["total-transactions"])}}]),n}(s.Z),z=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o;return(0,a.Z)(this,n),(o=t.call(this)).txid=e,o.attribute_map={txid:"txId"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.txId)throw new Error("Response is missing required field 'txId': ".concat(e));return new n(e.txId)}}]),n}(s.Z),K=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this)).message=e,r.stateproof="string"===typeof o?new Uint8Array(c.from(o,"base64")):o,r.attribute_map={message:"Message",stateproof:"StateProof"},r}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.Message)throw new Error("Response is missing required field 'Message': ".concat(e));if("undefined"===typeof e.StateProof)throw new Error("Response is missing required field 'StateProof': ".concat(e));return new n(W.from_obj_for_encoding(e.Message),e.StateProof)}}]),n}(s.Z),W=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.blockheaderscommitment,i=e.firstattestedround,s=e.lastattestedround,u=e.lnprovenweight,d=e.voterscommitment;return(0,a.Z)(this,n),(o=t.call(this)).blockheaderscommitment="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.firstattestedround=i,o.lastattestedround=s,o.lnprovenweight=u,o.voterscommitment="string"===typeof d?new Uint8Array(c.from(d,"base64")):d,o.attribute_map={blockheaderscommitment:"BlockHeadersCommitment",firstattestedround:"FirstAttestedRound",lastattestedround:"LastAttestedRound",lnprovenweight:"LnProvenWeight",voterscommitment:"VotersCommitment"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.BlockHeadersCommitment)throw new Error("Response is missing required field 'BlockHeadersCommitment': ".concat(e));if("undefined"===typeof e.FirstAttestedRound)throw new Error("Response is missing required field 'FirstAttestedRound': ".concat(e));if("undefined"===typeof e.LastAttestedRound)throw new Error("Response is missing required field 'LastAttestedRound': ".concat(e));if("undefined"===typeof e.LnProvenWeight)throw new Error("Response is missing required field 'LnProvenWeight': ".concat(e));if("undefined"===typeof e.VotersCommitment)throw new Error("Response is missing required field 'VotersCommitment': ".concat(e));return new n({blockheaderscommitment:e.BlockHeadersCommitment,firstattestedround:e.FirstAttestedRound,lastattestedround:e.LastAttestedRound,lnprovenweight:e.LnProvenWeight,voterscommitment:e.VotersCommitment})}}]),n}(s.Z),Z=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this)).currentRound=e,i.onlineMoney=o,i.totalMoney=r,i.attribute_map={currentRound:"current_round",onlineMoney:"online-money",totalMoney:"total-money"},i}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.current_round)throw new Error("Response is missing required field 'current_round': ".concat(e));if("undefined"===typeof e["online-money"])throw new Error("Response is missing required field 'online-money': ".concat(e));if("undefined"===typeof e["total-money"])throw new Error("Response is missing required field 'total-money': ".concat(e));return new n(e.current_round,e["online-money"],e["total-money"])}}]),n}(s.Z),V=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o){var r;return(0,a.Z)(this,n),(r=t.call(this)).key=e,r.value=o,r.attribute_map={key:"key",value:"value"},r}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.key)throw new Error("Response is missing required field 'key': ".concat(e));if("undefined"===typeof e.value)throw new Error("Response is missing required field 'value': ".concat(e));return new n(e.key,q.from_obj_for_encoding(e.value))}}]),n}(s.Z),q=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this)).type=e,i.bytes=o,i.uint=r,i.attribute_map={type:"type",bytes:"bytes",uint:"uint"},i}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.type)throw new Error("Response is missing required field 'type': ".concat(e));if("undefined"===typeof e.bytes)throw new Error("Response is missing required field 'bytes': ".concat(e));if("undefined"===typeof e.uint)throw new Error("Response is missing required field 'uint': ".concat(e));return new n(e.type,e.bytes,e.uint)}}]),n}(s.Z),Q=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.consensusVersion,i=e.fee,s=e.genesisHash,u=e.genesisId,d=e.lastRound,l=e.minFee;return(0,a.Z)(this,n),(o=t.call(this)).consensusVersion=r,o.fee=i,o.genesisHash="string"===typeof s?new Uint8Array(c.from(s,"base64")):s,o.genesisId=u,o.lastRound=d,o.minFee=l,o.attribute_map={consensusVersion:"consensus-version",fee:"fee",genesisHash:"genesis-hash",genesisId:"genesis-id",lastRound:"last-round",minFee:"min-fee"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["consensus-version"])throw new Error("Response is missing required field 'consensus-version': ".concat(e));if("undefined"===typeof e.fee)throw new Error("Response is missing required field 'fee': ".concat(e));if("undefined"===typeof e["genesis-hash"])throw new Error("Response is missing required field 'genesis-hash': ".concat(e));if("undefined"===typeof e["genesis-id"])throw new Error("Response is missing required field 'genesis-id': ".concat(e));if("undefined"===typeof e["last-round"])throw new Error("Response is missing required field 'last-round': ".concat(e));if("undefined"===typeof e["min-fee"])throw new Error("Response is missing required field 'min-fee': ".concat(e));return new n({consensusVersion:e["consensus-version"],fee:e.fee,genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],lastRound:e["last-round"],minFee:e["min-fee"]})}}]),n}(s.Z),J=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.idx,i=e.proof,s=e.stibhash,u=e.treedepth,d=e.hashtype;return(0,a.Z)(this,n),(o=t.call(this)).idx=r,o.proof="string"===typeof i?new Uint8Array(c.from(i,"base64")):i,o.stibhash="string"===typeof s?new Uint8Array(c.from(s,"base64")):s,o.treedepth=u,o.hashtype=d,o.attribute_map={idx:"idx",proof:"proof",stibhash:"stibhash",treedepth:"treedepth",hashtype:"hashtype"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.idx)throw new Error("Response is missing required field 'idx': ".concat(e));if("undefined"===typeof e.proof)throw new Error("Response is missing required field 'proof': ".concat(e));if("undefined"===typeof e.stibhash)throw new Error("Response is missing required field 'stibhash': ".concat(e));if("undefined"===typeof e.treedepth)throw new Error("Response is missing required field 'treedepth': ".concat(e));return new n({idx:e.idx,proof:e.proof,stibhash:e.stibhash,treedepth:e.treedepth,hashtype:e.hashtype})}}]),n}(s.Z),Y=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r,i){var s;return(0,a.Z)(this,n),(s=t.call(this)).build=e,s.genesisHashB64="string"===typeof o?new Uint8Array(c.from(o,"base64")):o,s.genesisId=r,s.versions=i,s.attribute_map={build:"build",genesisHashB64:"genesis_hash_b64",genesisId:"genesis_id",versions:"versions"},s}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.build)throw new Error("Response is missing required field 'build': ".concat(e));if("undefined"===typeof e.genesis_hash_b64)throw new Error("Response is missing required field 'genesis_hash_b64': ".concat(e));if("undefined"===typeof e.genesis_id)throw new Error("Response is missing required field 'genesis_id': ".concat(e));if(!Array.isArray(e.versions))throw new Error("Response is missing required array field 'versions': ".concat(e));return new n(S.from_obj_for_encoding(e.build),e.genesis_hash_b64,e.genesis_id,e.versions)}}]),n}(s.Z)},50619:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return h},setSendTransactionHeaders:function(){return b}});var a=n(74165),o=n(15861),r=n(93433),i=n(15671),s=n(43144),c=n(60136),u=n(29388),d=n(1413),l=n(7002),f=n(54684),p=n(54659).Buffer;function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e;return Object.keys(t).every((function(e){return"content-type"!==e.toLowerCase()}))&&((t=(0,d.Z)({},e))["Content-Type"]="application/x-binary"),t}function m(e){return e&&void 0!==e.byteLength}var h=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e,a){var o;(0,i.Z)(this,n),o=t.call(this,e);var s=a;if(Array.isArray(a)){if(!a.every(m))throw new TypeError("Array elements must be byte arrays");s=f.concatArrays.apply(void 0,(0,r.Z)(a))}else if(!m(s))throw new TypeError("Argument must be byte array");return o.txnBytesToPost=s,o}return(0,s.Z)(n,[{key:"path",value:function(){return"/v2/transactions"}},{key:"do",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(){var t,n,o=arguments;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=b(o.length>0&&void 0!==o[0]?o[0]:{}),e.next=4,this.c.post(this.path(),p.from(this.txnBytesToPost),t);case 4:return n=e.sent,e.abrupt("return",n.body);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(l.Z)},22996:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var a=n(15671),o=n(43144),r=n(37762),i=n(54659).Buffer;function s(e,t){var n;if(e instanceof Uint8Array)n=t?e:i.from(e).toString("base64");else if("function"===typeof e.get_obj_for_encoding)n=e.get_obj_for_encoding(t);else if(Array.isArray(e)){n=[];var a,o=(0,r.Z)(e);try{for(o.s();!(a=o.n()).done;){var c=a.value;n.push(s(c,t))}}catch(p){o.e(p)}finally{o.f()}}else if("object"===typeof e){for(var u={},d=0,l=Object.keys(e);d0&&void 0!==arguments[0]&&arguments[0],t={},n=0,a=Object.keys(this.attribute_map);n0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}}]),n}(c.Z),l=n(54659).Buffer;function f(e){return"string"===typeof e?e:l.from(e).toString("base64")}var p=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).account=r,i.account=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/transactions")}},{key:"notePrefix",value:function(e){return this.query["note-prefix"]=f(e),this}},{key:"txType",value:function(e){return this.query["tx-type"]=e,this}},{key:"sigType",value:function(e){return this.query["sig-type"]=e,this}},{key:"txid",value:function(e){return this.query.txid=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"minRound",value:function(e){return this.query["min-round"]=e,this}},{key:"maxRound",value:function(e){return this.query["max-round"]=e,this}},{key:"assetID",value:function(e){return this.query["asset-id"]=e,this}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"beforeTime",value:function(e){return this.query["before-time"]=e,this}},{key:"afterTime",value:function(e){return this.query["after-time"]=e,this}},{key:"currencyGreaterThan",value:function(e){return this.query["currency-greater-than"]=e,this}},{key:"currencyLessThan",value:function(e){return this.query["currency-less-than"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"rekeyTo",value:function(e){return this.query["rekey-to"]=e,this}}]),n}(c.Z),b=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).index=r,i.index=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/assets/".concat(this.index,"/transactions")}},{key:"notePrefix",value:function(e){return this.query["note-prefix"]=f(e),this}},{key:"txType",value:function(e){return this.query["tx-type"]=e,this}},{key:"sigType",value:function(e){return this.query["sig-type"]=e,this}},{key:"txid",value:function(e){return this.query.txid=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"minRound",value:function(e){return this.query["min-round"]=e,this}},{key:"maxRound",value:function(e){return this.query["max-round"]=e,this}},{key:"assetID",value:function(e){return this.query["asset-id"]=e,this}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"beforeTime",value:function(e){return this.query["before-time"]=e,this}},{key:"afterTime",value:function(e){return this.query["after-time"]=e,this}},{key:"currencyGreaterThan",value:function(e){return this.query["currency-greater-than"]=e,this}},{key:"currencyLessThan",value:function(e){return this.query["currency-less-than"]=e,this}},{key:"addressRole",value:function(e){return this.query["address-role"]=e,this}},{key:"address",value:function(e){return this.query.address=e,this}},{key:"excludeCloseTo",value:function(e){return this.query["exclude-close-to"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"rekeyTo",value:function(e){return this.query["rekey-to"]=e,this}}]),n}(c.Z),m=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).round=r,i.round=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/blocks/".concat(this.round)}},{key:"headerOnly",value:function(e){return this.query["header-only"]=e,this}}]),n}(c.Z),h=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).txID=r,i.txID=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/transactions/".concat(this.txID)}}]),n}(c.Z),g=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).account=r,i.account=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account)}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"exclude",value:function(e){return this.query.exclude=e,this}}]),n}(c.Z),y=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).account=r,i.account=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/assets")}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"assetId",value:function(e){return this.query["asset-id"]=e,this}}]),n}(c.Z),v=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).account=r,i.account=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/created-assets")}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"assetID",value:function(e){return this.query["asset-id"]=e,this}}]),n}(c.Z),w=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).account=r,i.account=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/apps-local-state")}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"applicationID",value:function(e){return this.query["application-id"]=e,this}}]),n}(c.Z),k=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).account=r,i.account=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/created-applications")}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"applicationID",value:function(e){return this.query["application-id"]=e,this}}]),n}(c.Z),A=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).index=r,i.index=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/assets/".concat(this.index)}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}}]),n}(c.Z),x=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).index=r,i.index=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.index)}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}}]),n}(c.Z),I=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).appID=r,i.appID=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.appID,"/logs")}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"minRound",value:function(e){return this.query["min-round"]=e,this}},{key:"maxRound",value:function(e){return this.query["max-round"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"sender",value:function(e){return this.query["sender-address"]=e,this}},{key:"txid",value:function(e){return this.query.txid=e,this}}]),n}(c.Z),T=n(62052),S=n(54659).Buffer,C=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r,i){var s;(0,a.Z)(this,n),(s=t.call(this,e,o)).index=r,s.index=r;var c=S.from(i).toString("base64");return s.query.name=encodeURI("b64:".concat(c)),s}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.index,"/box")}},{key:"prepare",value:function(e){return T.Box.from_obj_for_encoding(e)}}]),n}(c.Z),E=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/accounts"}},{key:"currencyGreaterThan",value:function(e){return this.query["currency-greater-than"]=e,this}},{key:"currencyLessThan",value:function(e){return this.query["currency-less-than"]=e,this}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"assetID",value:function(e){return this.query["asset-id"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"authAddr",value:function(e){return this.query["auth-addr"]=e,this}},{key:"applicationID",value:function(e){return this.query["application-id"]=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"exclude",value:function(e){return this.query.exclude=e,this}}]),n}(c.Z),R=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/transactions"}},{key:"notePrefix",value:function(e){return this.query["note-prefix"]=f(e),this}},{key:"txType",value:function(e){return this.query["tx-type"]=e,this}},{key:"sigType",value:function(e){return this.query["sig-type"]=e,this}},{key:"txid",value:function(e){return this.query.txid=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"minRound",value:function(e){return this.query["min-round"]=e,this}},{key:"maxRound",value:function(e){return this.query["max-round"]=e,this}},{key:"assetID",value:function(e){return this.query["asset-id"]=e,this}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"beforeTime",value:function(e){return this.query["before-time"]=e,this}},{key:"afterTime",value:function(e){return this.query["after-time"]=e,this}},{key:"currencyGreaterThan",value:function(e){return this.query["currency-greater-than"]=e,this}},{key:"currencyLessThan",value:function(e){return this.query["currency-less-than"]=e,this}},{key:"addressRole",value:function(e){return this.query["address-role"]=e,this}},{key:"address",value:function(e){return this.query.address=e,this}},{key:"excludeCloseTo",value:function(e){return this.query["exclude-close-to"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"rekeyTo",value:function(e){return this.query["rekey-to"]=e,this}},{key:"applicationID",value:function(e){return this.query["application-id"]=e,this}}]),n}(c.Z),M=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/assets"}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"creator",value:function(e){return this.query.creator=e,this}},{key:"name",value:function(e){return this.query.name=e,this}},{key:"unit",value:function(e){return this.query.unit=e,this}},{key:"index",value:function(e){return this.query["asset-id"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}}]),n}(c.Z),P=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/applications"}},{key:"index",value:function(e){return this.query["application-id"]=e,this}},{key:"creator",value:function(e){return this.query.creator=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}}]),n}(c.Z),U=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e,o,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e,o)).index=r,i.index=r,i}return(0,o.Z)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.index,"/boxes")}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"prepare",value:function(e){return T.BoxesResponse.from_obj_for_encoding(e)}}]),n}(c.Z),_=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"http://127.0.0.1",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8080,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,a.Z)(this,n),t.call(this,"X-Indexer-API-Token",e,o,r,i)}return(0,o.Z)(n,[{key:"makeHealthCheck",value:function(){return new u(this.c,this.intDecoding)}},{key:"lookupAssetBalances",value:function(e){return new d(this.c,this.intDecoding,e)}},{key:"lookupAssetTransactions",value:function(e){return new b(this.c,this.intDecoding,e)}},{key:"lookupAccountTransactions",value:function(e){return new p(this.c,this.intDecoding,e)}},{key:"lookupBlock",value:function(e){return new m(this.c,this.intDecoding,e)}},{key:"lookupTransactionByID",value:function(e){return new h(this.c,this.intDecoding,e)}},{key:"lookupAccountByID",value:function(e){return new g(this.c,this.intDecoding,e)}},{key:"lookupAccountAssets",value:function(e){return new y(this.c,this.intDecoding,e)}},{key:"lookupAccountCreatedAssets",value:function(e){return new v(this.c,this.intDecoding,e)}},{key:"lookupAccountAppLocalStates",value:function(e){return new w(this.c,this.intDecoding,e)}},{key:"lookupAccountCreatedApplications",value:function(e){return new k(this.c,this.intDecoding,e)}},{key:"lookupAssetByID",value:function(e){return new A(this.c,this.intDecoding,e)}},{key:"lookupApplications",value:function(e){return new x(this.c,this.intDecoding,e)}},{key:"lookupApplicationLogs",value:function(e){return new I(this.c,this.intDecoding,e)}},{key:"searchAccounts",value:function(){return new E(this.c,this.intDecoding)}},{key:"searchForTransactions",value:function(){return new R(this.c,this.intDecoding)}},{key:"searchForAssets",value:function(){return new M(this.c,this.intDecoding)}},{key:"searchForApplications",value:function(){return new P(this.c,this.intDecoding)}},{key:"searchForApplicationBoxes",value:function(e){return new U(this.c,this.intDecoding,e)}},{key:"lookupApplicationBoxByIDandName",value:function(e,t){return new C(this.c,this.intDecoding,e,t)}}]),n}(s.Z)},62052:function(e,t,n){"use strict";n.r(t),n.d(t,{Account:function(){return u},AccountParticipation:function(){return d},AccountResponse:function(){return l},AccountStateDelta:function(){return f},AccountsResponse:function(){return p},Application:function(){return b},ApplicationLocalState:function(){return m},ApplicationLocalStatesResponse:function(){return h},ApplicationLogData:function(){return g},ApplicationLogsResponse:function(){return y},ApplicationParams:function(){return v},ApplicationResponse:function(){return w},ApplicationStateSchema:function(){return k},ApplicationsResponse:function(){return A},Asset:function(){return x},AssetBalancesResponse:function(){return I},AssetHolding:function(){return T},AssetHoldingsResponse:function(){return S},AssetParams:function(){return C},AssetResponse:function(){return E},AssetsResponse:function(){return R},Block:function(){return M},BlockRewards:function(){return P},BlockUpgradeState:function(){return U},BlockUpgradeVote:function(){return _},Box:function(){return B},BoxDescriptor:function(){return D},BoxesResponse:function(){return N},ErrorResponse:function(){return O},EvalDelta:function(){return F},EvalDeltaKeyValue:function(){return L},HashFactory:function(){return j},HealthCheck:function(){return H},IndexerStateProofMessage:function(){return G},MerkleArrayProof:function(){return z},MiniAssetHolding:function(){return K},ParticipationUpdates:function(){return W},StateProofFields:function(){return Z},StateProofParticipant:function(){return V},StateProofReveal:function(){return q},StateProofSigSlot:function(){return Q},StateProofSignature:function(){return J},StateProofTracking:function(){return Y},StateProofVerifier:function(){return X},StateSchema:function(){return $},TealKeyValue:function(){return ee},TealValue:function(){return te},Transaction:function(){return ne},TransactionApplication:function(){return ae},TransactionAssetConfig:function(){return oe},TransactionAssetFreeze:function(){return re},TransactionAssetTransfer:function(){return ie},TransactionKeyreg:function(){return se},TransactionPayment:function(){return ce},TransactionResponse:function(){return ue},TransactionSignature:function(){return de},TransactionSignatureLogicsig:function(){return le},TransactionSignatureMultisig:function(){return fe},TransactionSignatureMultisigSubsignature:function(){return pe},TransactionStateProof:function(){return be},TransactionsResponse:function(){return me}});var a=n(15671),o=n(43144),r=n(60136),i=n(29388),s=n(22996),c=n(54659).Buffer,u=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.address,i=e.amount,s=e.amountWithoutPendingRewards,c=e.pendingRewards,u=e.rewards,d=e.round,l=e.status,f=e.totalAppsOptedIn,p=e.totalAssetsOptedIn,b=e.totalBoxBytes,m=e.totalBoxes,h=e.totalCreatedApps,g=e.totalCreatedAssets,y=e.appsLocalState,v=e.appsTotalExtraPages,w=e.appsTotalSchema,k=e.assets,A=e.authAddr,x=e.closedAtRound,I=e.createdApps,T=e.createdAssets,S=e.createdAtRound,C=e.deleted,E=e.participation,R=e.rewardBase,M=e.sigType;return(0,a.Z)(this,n),(o=t.call(this)).address=r,o.amount=i,o.amountWithoutPendingRewards=s,o.pendingRewards=c,o.rewards=u,o.round=d,o.status=l,o.totalAppsOptedIn=f,o.totalAssetsOptedIn=p,o.totalBoxBytes=b,o.totalBoxes=m,o.totalCreatedApps=h,o.totalCreatedAssets=g,o.appsLocalState=y,o.appsTotalExtraPages=v,o.appsTotalSchema=w,o.assets=k,o.authAddr=A,o.closedAtRound=x,o.createdApps=I,o.createdAssets=T,o.createdAtRound=S,o.deleted=C,o.participation=E,o.rewardBase=R,o.sigType=M,o.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",pendingRewards:"pending-rewards",rewards:"rewards",round:"round",status:"status",totalAppsOptedIn:"total-apps-opted-in",totalAssetsOptedIn:"total-assets-opted-in",totalBoxBytes:"total-box-bytes",totalBoxes:"total-boxes",totalCreatedApps:"total-created-apps",totalCreatedAssets:"total-created-assets",appsLocalState:"apps-local-state",appsTotalExtraPages:"apps-total-extra-pages",appsTotalSchema:"apps-total-schema",assets:"assets",authAddr:"auth-addr",closedAtRound:"closed-at-round",createdApps:"created-apps",createdAssets:"created-assets",createdAtRound:"created-at-round",deleted:"deleted",participation:"participation",rewardBase:"reward-base",sigType:"sig-type"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.address)throw new Error("Response is missing required field 'address': ".concat(e));if("undefined"===typeof e.amount)throw new Error("Response is missing required field 'amount': ".concat(e));if("undefined"===typeof e["amount-without-pending-rewards"])throw new Error("Response is missing required field 'amount-without-pending-rewards': ".concat(e));if("undefined"===typeof e["pending-rewards"])throw new Error("Response is missing required field 'pending-rewards': ".concat(e));if("undefined"===typeof e.rewards)throw new Error("Response is missing required field 'rewards': ".concat(e));if("undefined"===typeof e.round)throw new Error("Response is missing required field 'round': ".concat(e));if("undefined"===typeof e.status)throw new Error("Response is missing required field 'status': ".concat(e));if("undefined"===typeof e["total-apps-opted-in"])throw new Error("Response is missing required field 'total-apps-opted-in': ".concat(e));if("undefined"===typeof e["total-assets-opted-in"])throw new Error("Response is missing required field 'total-assets-opted-in': ".concat(e));if("undefined"===typeof e["total-box-bytes"])throw new Error("Response is missing required field 'total-box-bytes': ".concat(e));if("undefined"===typeof e["total-boxes"])throw new Error("Response is missing required field 'total-boxes': ".concat(e));if("undefined"===typeof e["total-created-apps"])throw new Error("Response is missing required field 'total-created-apps': ".concat(e));if("undefined"===typeof e["total-created-assets"])throw new Error("Response is missing required field 'total-created-assets': ".concat(e));return new n({address:e.address,amount:e.amount,amountWithoutPendingRewards:e["amount-without-pending-rewards"],pendingRewards:e["pending-rewards"],rewards:e.rewards,round:e.round,status:e.status,totalAppsOptedIn:e["total-apps-opted-in"],totalAssetsOptedIn:e["total-assets-opted-in"],totalBoxBytes:e["total-box-bytes"],totalBoxes:e["total-boxes"],totalCreatedApps:e["total-created-apps"],totalCreatedAssets:e["total-created-assets"],appsLocalState:"undefined"!==typeof e["apps-local-state"]?e["apps-local-state"].map(m.from_obj_for_encoding):void 0,appsTotalExtraPages:e["apps-total-extra-pages"],appsTotalSchema:"undefined"!==typeof e["apps-total-schema"]?k.from_obj_for_encoding(e["apps-total-schema"]):void 0,assets:"undefined"!==typeof e.assets?e.assets.map(T.from_obj_for_encoding):void 0,authAddr:e["auth-addr"],closedAtRound:e["closed-at-round"],createdApps:"undefined"!==typeof e["created-apps"]?e["created-apps"].map(b.from_obj_for_encoding):void 0,createdAssets:"undefined"!==typeof e["created-assets"]?e["created-assets"].map(x.from_obj_for_encoding):void 0,createdAtRound:e["created-at-round"],deleted:e.deleted,participation:"undefined"!==typeof e.participation?d.from_obj_for_encoding(e.participation):void 0,rewardBase:e["reward-base"],sigType:e["sig-type"]})}}]),n}(s.Z),d=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.selectionParticipationKey,i=e.voteFirstValid,s=e.voteKeyDilution,u=e.voteLastValid,d=e.voteParticipationKey,l=e.stateProofKey;return(0,a.Z)(this,n),(o=t.call(this)).selectionParticipationKey="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.voteFirstValid=i,o.voteKeyDilution=s,o.voteLastValid=u,o.voteParticipationKey="string"===typeof d?new Uint8Array(c.from(d,"base64")):d,o.stateProofKey="string"===typeof l?new Uint8Array(c.from(l,"base64")):l,o.attribute_map={selectionParticipationKey:"selection-participation-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key",stateProofKey:"state-proof-key"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["selection-participation-key"])throw new Error("Response is missing required field 'selection-participation-key': ".concat(e));if("undefined"===typeof e["vote-first-valid"])throw new Error("Response is missing required field 'vote-first-valid': ".concat(e));if("undefined"===typeof e["vote-key-dilution"])throw new Error("Response is missing required field 'vote-key-dilution': ".concat(e));if("undefined"===typeof e["vote-last-valid"])throw new Error("Response is missing required field 'vote-last-valid': ".concat(e));if("undefined"===typeof e["vote-participation-key"])throw new Error("Response is missing required field 'vote-participation-key': ".concat(e));return new n({selectionParticipationKey:e["selection-participation-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"],stateProofKey:e["state-proof-key"]})}}]),n}(s.Z),l=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.account,i=e.currentRound;return(0,a.Z)(this,n),(o=t.call(this)).account=r,o.currentRound=i,o.attribute_map={account:"account",currentRound:"current-round"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.account)throw new Error("Response is missing required field 'account': ".concat(e));if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));return new n({account:u.from_obj_for_encoding(e.account),currentRound:e["current-round"]})}}]),n}(s.Z),f=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.address,i=e.delta;return(0,a.Z)(this,n),(o=t.call(this)).address=r,o.delta=i,o.attribute_map={address:"address",delta:"delta"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.address)throw new Error("Response is missing required field 'address': ".concat(e));if(!Array.isArray(e.delta))throw new Error("Response is missing required array field 'delta': ".concat(e));return new n({address:e.address,delta:e.delta.map(L.from_obj_for_encoding)})}}]),n}(s.Z),p=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.accounts,i=e.currentRound,s=e.nextToken;return(0,a.Z)(this,n),(o=t.call(this)).accounts=r,o.currentRound=i,o.nextToken=s,o.attribute_map={accounts:"accounts",currentRound:"current-round",nextToken:"next-token"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if(!Array.isArray(e.accounts))throw new Error("Response is missing required array field 'accounts': ".concat(e));if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));return new n({accounts:e.accounts.map(u.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}]),n}(s.Z),b=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.id,i=e.params,s=e.createdAtRound,c=e.deleted,u=e.deletedAtRound;return(0,a.Z)(this,n),(o=t.call(this)).id=r,o.params=i,o.createdAtRound=s,o.deleted=c,o.deletedAtRound=u,o.attribute_map={id:"id",params:"params",createdAtRound:"created-at-round",deleted:"deleted",deletedAtRound:"deleted-at-round"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.id)throw new Error("Response is missing required field 'id': ".concat(e));if("undefined"===typeof e.params)throw new Error("Response is missing required field 'params': ".concat(e));return new n({id:e.id,params:v.from_obj_for_encoding(e.params),createdAtRound:e["created-at-round"],deleted:e.deleted,deletedAtRound:e["deleted-at-round"]})}}]),n}(s.Z),m=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.id,i=e.schema,s=e.closedOutAtRound,c=e.deleted,u=e.keyValue,d=e.optedInAtRound;return(0,a.Z)(this,n),(o=t.call(this)).id=r,o.schema=i,o.closedOutAtRound=s,o.deleted=c,o.keyValue=u,o.optedInAtRound=d,o.attribute_map={id:"id",schema:"schema",closedOutAtRound:"closed-out-at-round",deleted:"deleted",keyValue:"key-value",optedInAtRound:"opted-in-at-round"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.id)throw new Error("Response is missing required field 'id': ".concat(e));if("undefined"===typeof e.schema)throw new Error("Response is missing required field 'schema': ".concat(e));return new n({id:e.id,schema:k.from_obj_for_encoding(e.schema),closedOutAtRound:e["closed-out-at-round"],deleted:e.deleted,keyValue:"undefined"!==typeof e["key-value"]?e["key-value"].map(ee.from_obj_for_encoding):void 0,optedInAtRound:e["opted-in-at-round"]})}}]),n}(s.Z),h=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.appsLocalStates,i=e.currentRound,s=e.nextToken;return(0,a.Z)(this,n),(o=t.call(this)).appsLocalStates=r,o.currentRound=i,o.nextToken=s,o.attribute_map={appsLocalStates:"apps-local-states",currentRound:"current-round",nextToken:"next-token"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if(!Array.isArray(e["apps-local-states"]))throw new Error("Response is missing required array field 'apps-local-states': ".concat(e));if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));return new n({appsLocalStates:e["apps-local-states"].map(m.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}]),n}(s.Z),g=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.logs,i=e.txid;return(0,a.Z)(this,n),(o=t.call(this)).logs=r,o.txid=i,o.attribute_map={logs:"logs",txid:"txid"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if(!Array.isArray(e.logs))throw new Error("Response is missing required array field 'logs': ".concat(e));if("undefined"===typeof e.txid)throw new Error("Response is missing required field 'txid': ".concat(e));return new n({logs:e.logs,txid:e.txid})}}]),n}(s.Z),y=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.applicationId,i=e.currentRound,s=e.logData,c=e.nextToken;return(0,a.Z)(this,n),(o=t.call(this)).applicationId=r,o.currentRound=i,o.logData=s,o.nextToken=c,o.attribute_map={applicationId:"application-id",currentRound:"current-round",logData:"log-data",nextToken:"next-token"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["application-id"])throw new Error("Response is missing required field 'application-id': ".concat(e));if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));return new n({applicationId:e["application-id"],currentRound:e["current-round"],logData:"undefined"!==typeof e["log-data"]?e["log-data"].map(g.from_obj_for_encoding):void 0,nextToken:e["next-token"]})}}]),n}(s.Z),v=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.approvalProgram,i=e.clearStateProgram,s=e.creator,u=e.extraProgramPages,d=e.globalState,l=e.globalStateSchema,f=e.localStateSchema;return(0,a.Z)(this,n),(o=t.call(this)).approvalProgram="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.clearStateProgram="string"===typeof i?new Uint8Array(c.from(i,"base64")):i,o.creator=s,o.extraProgramPages=u,o.globalState=d,o.globalStateSchema=l,o.localStateSchema=f,o.attribute_map={approvalProgram:"approval-program",clearStateProgram:"clear-state-program",creator:"creator",extraProgramPages:"extra-program-pages",globalState:"global-state",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["approval-program"])throw new Error("Response is missing required field 'approval-program': ".concat(e));if("undefined"===typeof e["clear-state-program"])throw new Error("Response is missing required field 'clear-state-program': ".concat(e));return new n({approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],creator:e.creator,extraProgramPages:e["extra-program-pages"],globalState:"undefined"!==typeof e["global-state"]?e["global-state"].map(ee.from_obj_for_encoding):void 0,globalStateSchema:"undefined"!==typeof e["global-state-schema"]?k.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:"undefined"!==typeof e["local-state-schema"]?k.from_obj_for_encoding(e["local-state-schema"]):void 0})}}]),n}(s.Z),w=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.currentRound,i=e.application;return(0,a.Z)(this,n),(o=t.call(this)).currentRound=r,o.application=i,o.attribute_map={currentRound:"current-round",application:"application"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));return new n({currentRound:e["current-round"],application:"undefined"!==typeof e.application?b.from_obj_for_encoding(e.application):void 0})}}]),n}(s.Z),k=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.numByteSlice,i=e.numUint;return(0,a.Z)(this,n),(o=t.call(this)).numByteSlice=r,o.numUint=i,o.attribute_map={numByteSlice:"num-byte-slice",numUint:"num-uint"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["num-byte-slice"])throw new Error("Response is missing required field 'num-byte-slice': ".concat(e));if("undefined"===typeof e["num-uint"])throw new Error("Response is missing required field 'num-uint': ".concat(e));return new n({numByteSlice:e["num-byte-slice"],numUint:e["num-uint"]})}}]),n}(s.Z),A=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.applications,i=e.currentRound,s=e.nextToken;return(0,a.Z)(this,n),(o=t.call(this)).applications=r,o.currentRound=i,o.nextToken=s,o.attribute_map={applications:"applications",currentRound:"current-round",nextToken:"next-token"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if(!Array.isArray(e.applications))throw new Error("Response is missing required array field 'applications': ".concat(e));if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));return new n({applications:e.applications.map(b.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}]),n}(s.Z),x=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.index,i=e.params,s=e.createdAtRound,c=e.deleted,u=e.destroyedAtRound;return(0,a.Z)(this,n),(o=t.call(this)).index=r,o.params=i,o.createdAtRound=s,o.deleted=c,o.destroyedAtRound=u,o.attribute_map={index:"index",params:"params",createdAtRound:"created-at-round",deleted:"deleted",destroyedAtRound:"destroyed-at-round"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.index)throw new Error("Response is missing required field 'index': ".concat(e));if("undefined"===typeof e.params)throw new Error("Response is missing required field 'params': ".concat(e));return new n({index:e.index,params:C.from_obj_for_encoding(e.params),createdAtRound:e["created-at-round"],deleted:e.deleted,destroyedAtRound:e["destroyed-at-round"]})}}]),n}(s.Z),I=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.balances,i=e.currentRound,s=e.nextToken;return(0,a.Z)(this,n),(o=t.call(this)).balances=r,o.currentRound=i,o.nextToken=s,o.attribute_map={balances:"balances",currentRound:"current-round",nextToken:"next-token"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if(!Array.isArray(e.balances))throw new Error("Response is missing required array field 'balances': ".concat(e));if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));return new n({balances:e.balances.map(K.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}]),n}(s.Z),T=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.amount,i=e.assetId,s=e.isFrozen,c=e.deleted,u=e.optedInAtRound,d=e.optedOutAtRound;return(0,a.Z)(this,n),(o=t.call(this)).amount=r,o.assetId=i,o.isFrozen=s,o.deleted=c,o.optedInAtRound=u,o.optedOutAtRound=d,o.attribute_map={amount:"amount",assetId:"asset-id",isFrozen:"is-frozen",deleted:"deleted",optedInAtRound:"opted-in-at-round",optedOutAtRound:"opted-out-at-round"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.amount)throw new Error("Response is missing required field 'amount': ".concat(e));if("undefined"===typeof e["asset-id"])throw new Error("Response is missing required field 'asset-id': ".concat(e));if("undefined"===typeof e["is-frozen"])throw new Error("Response is missing required field 'is-frozen': ".concat(e));return new n({amount:e.amount,assetId:e["asset-id"],isFrozen:e["is-frozen"],deleted:e.deleted,optedInAtRound:e["opted-in-at-round"],optedOutAtRound:e["opted-out-at-round"]})}}]),n}(s.Z),S=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.assets,i=e.currentRound,s=e.nextToken;return(0,a.Z)(this,n),(o=t.call(this)).assets=r,o.currentRound=i,o.nextToken=s,o.attribute_map={assets:"assets",currentRound:"current-round",nextToken:"next-token"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if(!Array.isArray(e.assets))throw new Error("Response is missing required array field 'assets': ".concat(e));if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));return new n({assets:e.assets.map(T.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}]),n}(s.Z),C=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.creator,i=e.decimals,s=e.total,u=e.clawback,d=e.defaultFrozen,l=e.freeze,f=e.manager,p=e.metadataHash,b=e.name,m=e.nameB64,h=e.reserve,g=e.unitName,y=e.unitNameB64,v=e.url,w=e.urlB64;return(0,a.Z)(this,n),(o=t.call(this)).creator=r,o.decimals=i,o.total=s,o.clawback=u,o.defaultFrozen=d,o.freeze=l,o.manager=f,o.metadataHash="string"===typeof p?new Uint8Array(c.from(p,"base64")):p,o.name=b,o.nameB64="string"===typeof m?new Uint8Array(c.from(m,"base64")):m,o.reserve=h,o.unitName=g,o.unitNameB64="string"===typeof y?new Uint8Array(c.from(y,"base64")):y,o.url=v,o.urlB64="string"===typeof w?new Uint8Array(c.from(w,"base64")):w,o.attribute_map={creator:"creator",decimals:"decimals",total:"total",clawback:"clawback",defaultFrozen:"default-frozen",freeze:"freeze",manager:"manager",metadataHash:"metadata-hash",name:"name",nameB64:"name-b64",reserve:"reserve",unitName:"unit-name",unitNameB64:"unit-name-b64",url:"url",urlB64:"url-b64"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.creator)throw new Error("Response is missing required field 'creator': ".concat(e));if("undefined"===typeof e.decimals)throw new Error("Response is missing required field 'decimals': ".concat(e));if("undefined"===typeof e.total)throw new Error("Response is missing required field 'total': ".concat(e));return new n({creator:e.creator,decimals:e.decimals,total:e.total,clawback:e.clawback,defaultFrozen:e["default-frozen"],freeze:e.freeze,manager:e.manager,metadataHash:e["metadata-hash"],name:e.name,nameB64:e["name-b64"],reserve:e.reserve,unitName:e["unit-name"],unitNameB64:e["unit-name-b64"],url:e.url,urlB64:e["url-b64"]})}}]),n}(s.Z),E=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.asset,i=e.currentRound;return(0,a.Z)(this,n),(o=t.call(this)).asset=r,o.currentRound=i,o.attribute_map={asset:"asset",currentRound:"current-round"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.asset)throw new Error("Response is missing required field 'asset': ".concat(e));if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));return new n({asset:x.from_obj_for_encoding(e.asset),currentRound:e["current-round"]})}}]),n}(s.Z),R=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.assets,i=e.currentRound,s=e.nextToken;return(0,a.Z)(this,n),(o=t.call(this)).assets=r,o.currentRound=i,o.nextToken=s,o.attribute_map={assets:"assets",currentRound:"current-round",nextToken:"next-token"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if(!Array.isArray(e.assets))throw new Error("Response is missing required array field 'assets': ".concat(e));if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));return new n({assets:e.assets.map(x.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}]),n}(s.Z),M=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.genesisHash,i=e.genesisId,s=e.previousBlockHash,u=e.round,d=e.seed,l=e.timestamp,f=e.transactionsRoot,p=e.transactionsRootSha256,b=e.participationUpdates,m=e.rewards,h=e.stateProofTracking,g=e.transactions,y=e.txnCounter,v=e.upgradeState,w=e.upgradeVote;return(0,a.Z)(this,n),(o=t.call(this)).genesisHash="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.genesisId=i,o.previousBlockHash="string"===typeof s?new Uint8Array(c.from(s,"base64")):s,o.round=u,o.seed="string"===typeof d?new Uint8Array(c.from(d,"base64")):d,o.timestamp=l,o.transactionsRoot="string"===typeof f?new Uint8Array(c.from(f,"base64")):f,o.transactionsRootSha256="string"===typeof p?new Uint8Array(c.from(p,"base64")):p,o.participationUpdates=b,o.rewards=m,o.stateProofTracking=h,o.transactions=g,o.txnCounter=y,o.upgradeState=v,o.upgradeVote=w,o.attribute_map={genesisHash:"genesis-hash",genesisId:"genesis-id",previousBlockHash:"previous-block-hash",round:"round",seed:"seed",timestamp:"timestamp",transactionsRoot:"transactions-root",transactionsRootSha256:"transactions-root-sha256",participationUpdates:"participation-updates",rewards:"rewards",stateProofTracking:"state-proof-tracking",transactions:"transactions",txnCounter:"txn-counter",upgradeState:"upgrade-state",upgradeVote:"upgrade-vote"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["genesis-hash"])throw new Error("Response is missing required field 'genesis-hash': ".concat(e));if("undefined"===typeof e["genesis-id"])throw new Error("Response is missing required field 'genesis-id': ".concat(e));if("undefined"===typeof e["previous-block-hash"])throw new Error("Response is missing required field 'previous-block-hash': ".concat(e));if("undefined"===typeof e.round)throw new Error("Response is missing required field 'round': ".concat(e));if("undefined"===typeof e.seed)throw new Error("Response is missing required field 'seed': ".concat(e));if("undefined"===typeof e.timestamp)throw new Error("Response is missing required field 'timestamp': ".concat(e));if("undefined"===typeof e["transactions-root"])throw new Error("Response is missing required field 'transactions-root': ".concat(e));if("undefined"===typeof e["transactions-root-sha256"])throw new Error("Response is missing required field 'transactions-root-sha256': ".concat(e));return new n({genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],previousBlockHash:e["previous-block-hash"],round:e.round,seed:e.seed,timestamp:e.timestamp,transactionsRoot:e["transactions-root"],transactionsRootSha256:e["transactions-root-sha256"],participationUpdates:"undefined"!==typeof e["participation-updates"]?W.from_obj_for_encoding(e["participation-updates"]):void 0,rewards:"undefined"!==typeof e.rewards?P.from_obj_for_encoding(e.rewards):void 0,stateProofTracking:"undefined"!==typeof e["state-proof-tracking"]?e["state-proof-tracking"].map(Y.from_obj_for_encoding):void 0,transactions:"undefined"!==typeof e.transactions?e.transactions.map(ne.from_obj_for_encoding):void 0,txnCounter:e["txn-counter"],upgradeState:"undefined"!==typeof e["upgrade-state"]?U.from_obj_for_encoding(e["upgrade-state"]):void 0,upgradeVote:"undefined"!==typeof e["upgrade-vote"]?_.from_obj_for_encoding(e["upgrade-vote"]):void 0})}}]),n}(s.Z),P=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.feeSink,i=e.rewardsCalculationRound,s=e.rewardsLevel,c=e.rewardsPool,u=e.rewardsRate,d=e.rewardsResidue;return(0,a.Z)(this,n),(o=t.call(this)).feeSink=r,o.rewardsCalculationRound=i,o.rewardsLevel=s,o.rewardsPool=c,o.rewardsRate=u,o.rewardsResidue=d,o.attribute_map={feeSink:"fee-sink",rewardsCalculationRound:"rewards-calculation-round",rewardsLevel:"rewards-level",rewardsPool:"rewards-pool",rewardsRate:"rewards-rate",rewardsResidue:"rewards-residue"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["fee-sink"])throw new Error("Response is missing required field 'fee-sink': ".concat(e));if("undefined"===typeof e["rewards-calculation-round"])throw new Error("Response is missing required field 'rewards-calculation-round': ".concat(e));if("undefined"===typeof e["rewards-level"])throw new Error("Response is missing required field 'rewards-level': ".concat(e));if("undefined"===typeof e["rewards-pool"])throw new Error("Response is missing required field 'rewards-pool': ".concat(e));if("undefined"===typeof e["rewards-rate"])throw new Error("Response is missing required field 'rewards-rate': ".concat(e));if("undefined"===typeof e["rewards-residue"])throw new Error("Response is missing required field 'rewards-residue': ".concat(e));return new n({feeSink:e["fee-sink"],rewardsCalculationRound:e["rewards-calculation-round"],rewardsLevel:e["rewards-level"],rewardsPool:e["rewards-pool"],rewardsRate:e["rewards-rate"],rewardsResidue:e["rewards-residue"]})}}]),n}(s.Z),U=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.currentProtocol,i=e.nextProtocol,s=e.nextProtocolApprovals,c=e.nextProtocolSwitchOn,u=e.nextProtocolVoteBefore;return(0,a.Z)(this,n),(o=t.call(this)).currentProtocol=r,o.nextProtocol=i,o.nextProtocolApprovals=s,o.nextProtocolSwitchOn=c,o.nextProtocolVoteBefore=u,o.attribute_map={currentProtocol:"current-protocol",nextProtocol:"next-protocol",nextProtocolApprovals:"next-protocol-approvals",nextProtocolSwitchOn:"next-protocol-switch-on",nextProtocolVoteBefore:"next-protocol-vote-before"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["current-protocol"])throw new Error("Response is missing required field 'current-protocol': ".concat(e));return new n({currentProtocol:e["current-protocol"],nextProtocol:e["next-protocol"],nextProtocolApprovals:e["next-protocol-approvals"],nextProtocolSwitchOn:e["next-protocol-switch-on"],nextProtocolVoteBefore:e["next-protocol-vote-before"]})}}]),n}(s.Z),_=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.upgradeApprove,i=e.upgradeDelay,s=e.upgradePropose;return(0,a.Z)(this,n),(o=t.call(this)).upgradeApprove=r,o.upgradeDelay=i,o.upgradePropose=s,o.attribute_map={upgradeApprove:"upgrade-approve",upgradeDelay:"upgrade-delay",upgradePropose:"upgrade-propose"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({upgradeApprove:e["upgrade-approve"],upgradeDelay:e["upgrade-delay"],upgradePropose:e["upgrade-propose"]})}}]),n}(s.Z),B=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.name,i=e.value;return(0,a.Z)(this,n),(o=t.call(this)).name="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.value="string"===typeof i?new Uint8Array(c.from(i,"base64")):i,o.attribute_map={name:"name",value:"value"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.name)throw new Error("Response is missing required field 'name': ".concat(e));if("undefined"===typeof e.value)throw new Error("Response is missing required field 'value': ".concat(e));return new n({name:e.name,value:e.value})}}]),n}(s.Z),D=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.name;return(0,a.Z)(this,n),(o=t.call(this)).name="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.attribute_map={name:"name"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.name)throw new Error("Response is missing required field 'name': ".concat(e));return new n({name:e.name})}}]),n}(s.Z),N=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.applicationId,i=e.boxes,s=e.nextToken;return(0,a.Z)(this,n),(o=t.call(this)).applicationId=r,o.boxes=i,o.nextToken=s,o.attribute_map={applicationId:"application-id",boxes:"boxes",nextToken:"next-token"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["application-id"])throw new Error("Response is missing required field 'application-id': ".concat(e));if(!Array.isArray(e.boxes))throw new Error("Response is missing required array field 'boxes': ".concat(e));return new n({applicationId:e["application-id"],boxes:e.boxes.map(D.from_obj_for_encoding),nextToken:e["next-token"]})}}]),n}(s.Z),O=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.message,i=e.data;return(0,a.Z)(this,n),(o=t.call(this)).message=r,o.data=i,o.attribute_map={message:"message",data:"data"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.message)throw new Error("Response is missing required field 'message': ".concat(e));return new n({message:e.message,data:e.data})}}]),n}(s.Z),F=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.action,i=e.bytes,s=e.uint;return(0,a.Z)(this,n),(o=t.call(this)).action=r,o.bytes=i,o.uint=s,o.attribute_map={action:"action",bytes:"bytes",uint:"uint"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.action)throw new Error("Response is missing required field 'action': ".concat(e));return new n({action:e.action,bytes:e.bytes,uint:e.uint})}}]),n}(s.Z),L=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.key,i=e.value;return(0,a.Z)(this,n),(o=t.call(this)).key=r,o.value=i,o.attribute_map={key:"key",value:"value"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.key)throw new Error("Response is missing required field 'key': ".concat(e));if("undefined"===typeof e.value)throw new Error("Response is missing required field 'value': ".concat(e));return new n({key:e.key,value:F.from_obj_for_encoding(e.value)})}}]),n}(s.Z),j=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.hashType;return(0,a.Z)(this,n),(o=t.call(this)).hashType=r,o.attribute_map={hashType:"hash-type"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({hashType:e["hash-type"]})}}]),n}(s.Z),H=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.dbAvailable,i=e.isMigrating,s=e.message,c=e.round,u=e.version,d=e.data,l=e.errors;return(0,a.Z)(this,n),(o=t.call(this)).dbAvailable=r,o.isMigrating=i,o.message=s,o.round=c,o.version=u,o.data=d,o.errors=l,o.attribute_map={dbAvailable:"db-available",isMigrating:"is-migrating",message:"message",round:"round",version:"version",data:"data",errors:"errors"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["db-available"])throw new Error("Response is missing required field 'db-available': ".concat(e));if("undefined"===typeof e["is-migrating"])throw new Error("Response is missing required field 'is-migrating': ".concat(e));if("undefined"===typeof e.message)throw new Error("Response is missing required field 'message': ".concat(e));if("undefined"===typeof e.round)throw new Error("Response is missing required field 'round': ".concat(e));if("undefined"===typeof e.version)throw new Error("Response is missing required field 'version': ".concat(e));return new n({dbAvailable:e["db-available"],isMigrating:e["is-migrating"],message:e.message,round:e.round,version:e.version,data:e.data,errors:e.errors})}}]),n}(s.Z),G=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.blockHeadersCommitment,i=e.firstAttestedRound,s=e.latestAttestedRound,u=e.lnProvenWeight,d=e.votersCommitment;return(0,a.Z)(this,n),(o=t.call(this)).blockHeadersCommitment="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.firstAttestedRound=i,o.latestAttestedRound=s,o.lnProvenWeight=u,o.votersCommitment="string"===typeof d?new Uint8Array(c.from(d,"base64")):d,o.attribute_map={blockHeadersCommitment:"block-headers-commitment",firstAttestedRound:"first-attested-round",latestAttestedRound:"latest-attested-round",lnProvenWeight:"ln-proven-weight",votersCommitment:"voters-commitment"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({blockHeadersCommitment:e["block-headers-commitment"],firstAttestedRound:e["first-attested-round"],latestAttestedRound:e["latest-attested-round"],lnProvenWeight:e["ln-proven-weight"],votersCommitment:e["voters-commitment"]})}}]),n}(s.Z),z=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.hashFactory,i=e.path,s=e.treeDepth;return(0,a.Z)(this,n),(o=t.call(this)).hashFactory=r,o.path=i,o.treeDepth=s,o.attribute_map={hashFactory:"hash-factory",path:"path",treeDepth:"tree-depth"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({hashFactory:"undefined"!==typeof e["hash-factory"]?j.from_obj_for_encoding(e["hash-factory"]):void 0,path:e.path,treeDepth:e["tree-depth"]})}}]),n}(s.Z),K=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.address,i=e.amount,s=e.isFrozen,c=e.deleted,u=e.optedInAtRound,d=e.optedOutAtRound;return(0,a.Z)(this,n),(o=t.call(this)).address=r,o.amount=i,o.isFrozen=s,o.deleted=c,o.optedInAtRound=u,o.optedOutAtRound=d,o.attribute_map={address:"address",amount:"amount",isFrozen:"is-frozen",deleted:"deleted",optedInAtRound:"opted-in-at-round",optedOutAtRound:"opted-out-at-round"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.address)throw new Error("Response is missing required field 'address': ".concat(e));if("undefined"===typeof e.amount)throw new Error("Response is missing required field 'amount': ".concat(e));if("undefined"===typeof e["is-frozen"])throw new Error("Response is missing required field 'is-frozen': ".concat(e));return new n({address:e.address,amount:e.amount,isFrozen:e["is-frozen"],deleted:e.deleted,optedInAtRound:e["opted-in-at-round"],optedOutAtRound:e["opted-out-at-round"]})}}]),n}(s.Z),W=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.expiredParticipationAccounts;return(0,a.Z)(this,n),(o=t.call(this)).expiredParticipationAccounts=r,o.attribute_map={expiredParticipationAccounts:"expired-participation-accounts"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({expiredParticipationAccounts:e["expired-participation-accounts"]})}}]),n}(s.Z),Z=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.partProofs,i=e.positionsToReveal,s=e.reveals,u=e.saltVersion,d=e.sigCommit,l=e.sigProofs,f=e.signedWeight;return(0,a.Z)(this,n),(o=t.call(this)).partProofs=r,o.positionsToReveal=i,o.reveals=s,o.saltVersion=u,o.sigCommit="string"===typeof d?new Uint8Array(c.from(d,"base64")):d,o.sigProofs=l,o.signedWeight=f,o.attribute_map={partProofs:"part-proofs",positionsToReveal:"positions-to-reveal",reveals:"reveals",saltVersion:"salt-version",sigCommit:"sig-commit",sigProofs:"sig-proofs",signedWeight:"signed-weight"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({partProofs:"undefined"!==typeof e["part-proofs"]?z.from_obj_for_encoding(e["part-proofs"]):void 0,positionsToReveal:e["positions-to-reveal"],reveals:"undefined"!==typeof e.reveals?e.reveals.map(q.from_obj_for_encoding):void 0,saltVersion:e["salt-version"],sigCommit:e["sig-commit"],sigProofs:"undefined"!==typeof e["sig-proofs"]?z.from_obj_for_encoding(e["sig-proofs"]):void 0,signedWeight:e["signed-weight"]})}}]),n}(s.Z),V=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.verifier,i=e.weight;return(0,a.Z)(this,n),(o=t.call(this)).verifier=r,o.weight=i,o.attribute_map={verifier:"verifier",weight:"weight"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({verifier:"undefined"!==typeof e.verifier?X.from_obj_for_encoding(e.verifier):void 0,weight:e.weight})}}]),n}(s.Z),q=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.participant,i=e.position,s=e.sigSlot;return(0,a.Z)(this,n),(o=t.call(this)).participant=r,o.position=i,o.sigSlot=s,o.attribute_map={participant:"participant",position:"position",sigSlot:"sig-slot"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({participant:"undefined"!==typeof e.participant?V.from_obj_for_encoding(e.participant):void 0,position:e.position,sigSlot:"undefined"!==typeof e["sig-slot"]?Q.from_obj_for_encoding(e["sig-slot"]):void 0})}}]),n}(s.Z),Q=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.lowerSigWeight,i=e.signature;return(0,a.Z)(this,n),(o=t.call(this)).lowerSigWeight=r,o.signature=i,o.attribute_map={lowerSigWeight:"lower-sig-weight",signature:"signature"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({lowerSigWeight:e["lower-sig-weight"],signature:"undefined"!==typeof e.signature?J.from_obj_for_encoding(e.signature):void 0})}}]),n}(s.Z),J=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.falconSignature,i=e.merkleArrayIndex,s=e.proof,u=e.verifyingKey;return(0,a.Z)(this,n),(o=t.call(this)).falconSignature="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.merkleArrayIndex=i,o.proof=s,o.verifyingKey="string"===typeof u?new Uint8Array(c.from(u,"base64")):u,o.attribute_map={falconSignature:"falcon-signature",merkleArrayIndex:"merkle-array-index",proof:"proof",verifyingKey:"verifying-key"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({falconSignature:e["falcon-signature"],merkleArrayIndex:e["merkle-array-index"],proof:"undefined"!==typeof e.proof?z.from_obj_for_encoding(e.proof):void 0,verifyingKey:e["verifying-key"]})}}]),n}(s.Z),Y=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.nextRound,i=e.onlineTotalWeight,s=e.type,u=e.votersCommitment;return(0,a.Z)(this,n),(o=t.call(this)).nextRound=r,o.onlineTotalWeight=i,o.type=s,o.votersCommitment="string"===typeof u?new Uint8Array(c.from(u,"base64")):u,o.attribute_map={nextRound:"next-round",onlineTotalWeight:"online-total-weight",type:"type",votersCommitment:"voters-commitment"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({nextRound:e["next-round"],onlineTotalWeight:e["online-total-weight"],type:e.type,votersCommitment:e["voters-commitment"]})}}]),n}(s.Z),X=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.commitment,i=e.keyLifetime;return(0,a.Z)(this,n),(o=t.call(this)).commitment="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.keyLifetime=i,o.attribute_map={commitment:"commitment",keyLifetime:"key-lifetime"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({commitment:e.commitment,keyLifetime:e["key-lifetime"]})}}]),n}(s.Z),$=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.numByteSlice,i=e.numUint;return(0,a.Z)(this,n),(o=t.call(this)).numByteSlice=r,o.numUint=i,o.attribute_map={numByteSlice:"num-byte-slice",numUint:"num-uint"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["num-byte-slice"])throw new Error("Response is missing required field 'num-byte-slice': ".concat(e));if("undefined"===typeof e["num-uint"])throw new Error("Response is missing required field 'num-uint': ".concat(e));return new n({numByteSlice:e["num-byte-slice"],numUint:e["num-uint"]})}}]),n}(s.Z),ee=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.key,i=e.value;return(0,a.Z)(this,n),(o=t.call(this)).key=r,o.value=i,o.attribute_map={key:"key",value:"value"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.key)throw new Error("Response is missing required field 'key': ".concat(e));if("undefined"===typeof e.value)throw new Error("Response is missing required field 'value': ".concat(e));return new n({key:e.key,value:te.from_obj_for_encoding(e.value)})}}]),n}(s.Z),te=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.bytes,i=e.type,s=e.uint;return(0,a.Z)(this,n),(o=t.call(this)).bytes=r,o.type=i,o.uint=s,o.attribute_map={bytes:"bytes",type:"type",uint:"uint"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.bytes)throw new Error("Response is missing required field 'bytes': ".concat(e));if("undefined"===typeof e.type)throw new Error("Response is missing required field 'type': ".concat(e));if("undefined"===typeof e.uint)throw new Error("Response is missing required field 'uint': ".concat(e));return new n({bytes:e.bytes,type:e.type,uint:e.uint})}}]),n}(s.Z),ne=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.fee,i=e.firstValid,s=e.lastValid,u=e.sender,d=e.applicationTransaction,l=e.assetConfigTransaction,f=e.assetFreezeTransaction,p=e.assetTransferTransaction,b=e.authAddr,m=e.closeRewards,h=e.closingAmount,g=e.confirmedRound,y=e.createdApplicationIndex,v=e.createdAssetIndex,w=e.genesisHash,k=e.genesisId,A=e.globalStateDelta,x=e.group,I=e.id,T=e.innerTxns,S=e.intraRoundOffset,C=e.keyregTransaction,E=e.lease,R=e.localStateDelta,M=e.logs,P=e.note,U=e.paymentTransaction,_=e.receiverRewards,B=e.rekeyTo,D=e.roundTime,N=e.senderRewards,O=e.signature,F=e.stateProofTransaction,L=e.txType;return(0,a.Z)(this,n),(o=t.call(this)).fee=r,o.firstValid=i,o.lastValid=s,o.sender=u,o.applicationTransaction=d,o.assetConfigTransaction=l,o.assetFreezeTransaction=f,o.assetTransferTransaction=p,o.authAddr=b,o.closeRewards=m,o.closingAmount=h,o.confirmedRound=g,o.createdApplicationIndex=y,o.createdAssetIndex=v,o.genesisHash="string"===typeof w?new Uint8Array(c.from(w,"base64")):w,o.genesisId=k,o.globalStateDelta=A,o.group="string"===typeof x?new Uint8Array(c.from(x,"base64")):x,o.id=I,o.innerTxns=T,o.intraRoundOffset=S,o.keyregTransaction=C,o.lease="string"===typeof E?new Uint8Array(c.from(E,"base64")):E,o.localStateDelta=R,o.logs=M,o.note="string"===typeof P?new Uint8Array(c.from(P,"base64")):P,o.paymentTransaction=U,o.receiverRewards=_,o.rekeyTo=B,o.roundTime=D,o.senderRewards=N,o.signature=O,o.stateProofTransaction=F,o.txType=L,o.attribute_map={fee:"fee",firstValid:"first-valid",lastValid:"last-valid",sender:"sender",applicationTransaction:"application-transaction",assetConfigTransaction:"asset-config-transaction",assetFreezeTransaction:"asset-freeze-transaction",assetTransferTransaction:"asset-transfer-transaction",authAddr:"auth-addr",closeRewards:"close-rewards",closingAmount:"closing-amount",confirmedRound:"confirmed-round",createdApplicationIndex:"created-application-index",createdAssetIndex:"created-asset-index",genesisHash:"genesis-hash",genesisId:"genesis-id",globalStateDelta:"global-state-delta",group:"group",id:"id",innerTxns:"inner-txns",intraRoundOffset:"intra-round-offset",keyregTransaction:"keyreg-transaction",lease:"lease",localStateDelta:"local-state-delta",logs:"logs",note:"note",paymentTransaction:"payment-transaction",receiverRewards:"receiver-rewards",rekeyTo:"rekey-to",roundTime:"round-time",senderRewards:"sender-rewards",signature:"signature",stateProofTransaction:"state-proof-transaction",txType:"tx-type"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.fee)throw new Error("Response is missing required field 'fee': ".concat(e));if("undefined"===typeof e["first-valid"])throw new Error("Response is missing required field 'first-valid': ".concat(e));if("undefined"===typeof e["last-valid"])throw new Error("Response is missing required field 'last-valid': ".concat(e));if("undefined"===typeof e.sender)throw new Error("Response is missing required field 'sender': ".concat(e));return new n({fee:e.fee,firstValid:e["first-valid"],lastValid:e["last-valid"],sender:e.sender,applicationTransaction:"undefined"!==typeof e["application-transaction"]?ae.from_obj_for_encoding(e["application-transaction"]):void 0,assetConfigTransaction:"undefined"!==typeof e["asset-config-transaction"]?oe.from_obj_for_encoding(e["asset-config-transaction"]):void 0,assetFreezeTransaction:"undefined"!==typeof e["asset-freeze-transaction"]?re.from_obj_for_encoding(e["asset-freeze-transaction"]):void 0,assetTransferTransaction:"undefined"!==typeof e["asset-transfer-transaction"]?ie.from_obj_for_encoding(e["asset-transfer-transaction"]):void 0,authAddr:e["auth-addr"],closeRewards:e["close-rewards"],closingAmount:e["closing-amount"],confirmedRound:e["confirmed-round"],createdApplicationIndex:e["created-application-index"],createdAssetIndex:e["created-asset-index"],genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],globalStateDelta:"undefined"!==typeof e["global-state-delta"]?e["global-state-delta"].map(L.from_obj_for_encoding):void 0,group:e.group,id:e.id,innerTxns:"undefined"!==typeof e["inner-txns"]?e["inner-txns"].map(n.from_obj_for_encoding):void 0,intraRoundOffset:e["intra-round-offset"],keyregTransaction:"undefined"!==typeof e["keyreg-transaction"]?se.from_obj_for_encoding(e["keyreg-transaction"]):void 0,lease:e.lease,localStateDelta:"undefined"!==typeof e["local-state-delta"]?e["local-state-delta"].map(f.from_obj_for_encoding):void 0,logs:e.logs,note:e.note,paymentTransaction:"undefined"!==typeof e["payment-transaction"]?ce.from_obj_for_encoding(e["payment-transaction"]):void 0,receiverRewards:e["receiver-rewards"],rekeyTo:e["rekey-to"],roundTime:e["round-time"],senderRewards:e["sender-rewards"],signature:"undefined"!==typeof e.signature?de.from_obj_for_encoding(e.signature):void 0,stateProofTransaction:"undefined"!==typeof e["state-proof-transaction"]?be.from_obj_for_encoding(e["state-proof-transaction"]):void 0,txType:e["tx-type"]})}}]),n}(s.Z),ae=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.applicationId,i=e.accounts,s=e.applicationArgs,u=e.approvalProgram,d=e.clearStateProgram,l=e.extraProgramPages,f=e.foreignApps,p=e.foreignAssets,b=e.globalStateSchema,m=e.localStateSchema,h=e.onCompletion;return(0,a.Z)(this,n),(o=t.call(this)).applicationId=r,o.accounts=i,o.applicationArgs=s,o.approvalProgram="string"===typeof u?new Uint8Array(c.from(u,"base64")):u,o.clearStateProgram="string"===typeof d?new Uint8Array(c.from(d,"base64")):d,o.extraProgramPages=l,o.foreignApps=f,o.foreignAssets=p,o.globalStateSchema=b,o.localStateSchema=m,o.onCompletion=h,o.attribute_map={applicationId:"application-id",accounts:"accounts",applicationArgs:"application-args",approvalProgram:"approval-program",clearStateProgram:"clear-state-program",extraProgramPages:"extra-program-pages",foreignApps:"foreign-apps",foreignAssets:"foreign-assets",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema",onCompletion:"on-completion"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["application-id"])throw new Error("Response is missing required field 'application-id': ".concat(e));return new n({applicationId:e["application-id"],accounts:e.accounts,applicationArgs:e["application-args"],approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],extraProgramPages:e["extra-program-pages"],foreignApps:e["foreign-apps"],foreignAssets:e["foreign-assets"],globalStateSchema:"undefined"!==typeof e["global-state-schema"]?$.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:"undefined"!==typeof e["local-state-schema"]?$.from_obj_for_encoding(e["local-state-schema"]):void 0,onCompletion:e["on-completion"]})}}]),n}(s.Z),oe=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.assetId,i=e.params;return(0,a.Z)(this,n),(o=t.call(this)).assetId=r,o.params=i,o.attribute_map={assetId:"asset-id",params:"params"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({assetId:e["asset-id"],params:"undefined"!==typeof e.params?C.from_obj_for_encoding(e.params):void 0})}}]),n}(s.Z),re=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.address,i=e.assetId,s=e.newFreezeStatus;return(0,a.Z)(this,n),(o=t.call(this)).address=r,o.assetId=i,o.newFreezeStatus=s,o.attribute_map={address:"address",assetId:"asset-id",newFreezeStatus:"new-freeze-status"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.address)throw new Error("Response is missing required field 'address': ".concat(e));if("undefined"===typeof e["asset-id"])throw new Error("Response is missing required field 'asset-id': ".concat(e));if("undefined"===typeof e["new-freeze-status"])throw new Error("Response is missing required field 'new-freeze-status': ".concat(e));return new n({address:e.address,assetId:e["asset-id"],newFreezeStatus:e["new-freeze-status"]})}}]),n}(s.Z),ie=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.amount,i=e.assetId,s=e.receiver,c=e.closeAmount,u=e.closeTo,d=e.sender;return(0,a.Z)(this,n),(o=t.call(this)).amount=r,o.assetId=i,o.receiver=s,o.closeAmount=c,o.closeTo=u,o.sender=d,o.attribute_map={amount:"amount",assetId:"asset-id",receiver:"receiver",closeAmount:"close-amount",closeTo:"close-to",sender:"sender"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.amount)throw new Error("Response is missing required field 'amount': ".concat(e));if("undefined"===typeof e["asset-id"])throw new Error("Response is missing required field 'asset-id': ".concat(e));if("undefined"===typeof e.receiver)throw new Error("Response is missing required field 'receiver': ".concat(e));return new n({amount:e.amount,assetId:e["asset-id"],receiver:e.receiver,closeAmount:e["close-amount"],closeTo:e["close-to"],sender:e.sender})}}]),n}(s.Z),se=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.nonParticipation,i=e.selectionParticipationKey,s=e.stateProofKey,u=e.voteFirstValid,d=e.voteKeyDilution,l=e.voteLastValid,f=e.voteParticipationKey;return(0,a.Z)(this,n),(o=t.call(this)).nonParticipation=r,o.selectionParticipationKey="string"===typeof i?new Uint8Array(c.from(i,"base64")):i,o.stateProofKey="string"===typeof s?new Uint8Array(c.from(s,"base64")):s,o.voteFirstValid=u,o.voteKeyDilution=d,o.voteLastValid=l,o.voteParticipationKey="string"===typeof f?new Uint8Array(c.from(f,"base64")):f,o.attribute_map={nonParticipation:"non-participation",selectionParticipationKey:"selection-participation-key",stateProofKey:"state-proof-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({nonParticipation:e["non-participation"],selectionParticipationKey:e["selection-participation-key"],stateProofKey:e["state-proof-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"]})}}]),n}(s.Z),ce=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.amount,i=e.receiver,s=e.closeAmount,c=e.closeRemainderTo;return(0,a.Z)(this,n),(o=t.call(this)).amount=r,o.receiver=i,o.closeAmount=s,o.closeRemainderTo=c,o.attribute_map={amount:"amount",receiver:"receiver",closeAmount:"close-amount",closeRemainderTo:"close-remainder-to"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.amount)throw new Error("Response is missing required field 'amount': ".concat(e));if("undefined"===typeof e.receiver)throw new Error("Response is missing required field 'receiver': ".concat(e));return new n({amount:e.amount,receiver:e.receiver,closeAmount:e["close-amount"],closeRemainderTo:e["close-remainder-to"]})}}]),n}(s.Z),ue=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.currentRound,i=e.transaction;return(0,a.Z)(this,n),(o=t.call(this)).currentRound=r,o.transaction=i,o.attribute_map={currentRound:"current-round",transaction:"transaction"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));if("undefined"===typeof e.transaction)throw new Error("Response is missing required field 'transaction': ".concat(e));return new n({currentRound:e["current-round"],transaction:ne.from_obj_for_encoding(e.transaction)})}}]),n}(s.Z),de=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.logicsig,i=e.multisig,s=e.sig;return(0,a.Z)(this,n),(o=t.call(this)).logicsig=r,o.multisig=i,o.sig="string"===typeof s?new Uint8Array(c.from(s,"base64")):s,o.attribute_map={logicsig:"logicsig",multisig:"multisig",sig:"sig"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({logicsig:"undefined"!==typeof e.logicsig?le.from_obj_for_encoding(e.logicsig):void 0,multisig:"undefined"!==typeof e.multisig?fe.from_obj_for_encoding(e.multisig):void 0,sig:e.sig})}}]),n}(s.Z),le=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.logic,i=e.args,s=e.multisigSignature,u=e.signature;return(0,a.Z)(this,n),(o=t.call(this)).logic="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.args=i,o.multisigSignature=s,o.signature="string"===typeof u?new Uint8Array(c.from(u,"base64")):u,o.attribute_map={logic:"logic",args:"args",multisigSignature:"multisig-signature",signature:"signature"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e.logic)throw new Error("Response is missing required field 'logic': ".concat(e));return new n({logic:e.logic,args:e.args,multisigSignature:"undefined"!==typeof e["multisig-signature"]?fe.from_obj_for_encoding(e["multisig-signature"]):void 0,signature:e.signature})}}]),n}(s.Z),fe=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.subsignature,i=e.threshold,s=e.version;return(0,a.Z)(this,n),(o=t.call(this)).subsignature=r,o.threshold=i,o.version=s,o.attribute_map={subsignature:"subsignature",threshold:"threshold",version:"version"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({subsignature:"undefined"!==typeof e.subsignature?e.subsignature.map(pe.from_obj_for_encoding):void 0,threshold:e.threshold,version:e.version})}}]),n}(s.Z),pe=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.publicKey,i=e.signature;return(0,a.Z)(this,n),(o=t.call(this)).publicKey="string"===typeof r?new Uint8Array(c.from(r,"base64")):r,o.signature="string"===typeof i?new Uint8Array(c.from(i,"base64")):i,o.attribute_map={publicKey:"public-key",signature:"signature"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({publicKey:e["public-key"],signature:e.signature})}}]),n}(s.Z),be=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.message,i=e.stateProof,s=e.stateProofType;return(0,a.Z)(this,n),(o=t.call(this)).message=r,o.stateProof=i,o.stateProofType=s,o.attribute_map={message:"message",stateProof:"state-proof",stateProofType:"state-proof-type"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){return new n({message:"undefined"!==typeof e.message?G.from_obj_for_encoding(e.message):void 0,stateProof:"undefined"!==typeof e["state-proof"]?Z.from_obj_for_encoding(e["state-proof"]):void 0,stateProofType:e["state-proof-type"]})}}]),n}(s.Z),me=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(e){var o,r=e.currentRound,i=e.transactions,s=e.nextToken;return(0,a.Z)(this,n),(o=t.call(this)).currentRound=r,o.transactions=i,o.nextToken=s,o.attribute_map={currentRound:"current-round",transactions:"transactions",nextToken:"next-token"},o}return(0,o.Z)(n,null,[{key:"from_obj_for_encoding",value:function(e){if("undefined"===typeof e["current-round"])throw new Error("Response is missing required field 'current-round': ".concat(e));if(!Array.isArray(e.transactions))throw new Error("Response is missing required array field 'transactions': ".concat(e));return new n({currentRound:e["current-round"],transactions:e.transactions.map(ne.from_obj_for_encoding),nextToken:e["next-token"]})}}]),n}(s.Z)},7002:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var a=n(74165),o=n(15861),r=n(15671),i=n(43144),s=n(40913),c=function(){function e(t,n){(0,r.Z)(this,e),this.c=t,this.query={},this.intDecoding=n||s.Z.DEFAULT}return(0,i.Z)(e,[{key:"prepare",value:function(e){return e}},{key:"do",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(){var t,n,o,r=arguments;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},n={},"default"!==this.intDecoding&&(n.intDecoding=this.intDecoding),e.next=5,this.c.get(this.path(),this.query,t,n);case 5:return o=e.sent,e.abrupt("return",this.prepare(o.body));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"doRaw",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(){var t,n,o=arguments;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.c.get(this.path(),this.query,t,{},!1);case 3:return n=e.sent,e.abrupt("return",n.body);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setIntDecoding",value:function(e){if("default"!==e&&"safe"!==e&&"mixed"!==e&&"bigint"!==e)throw new Error("Invalid method for int decoding: ".concat(e));return this.intDecoding=e,this}}]),e}()},40233:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var a=n(15671),o=n(43144),r=n(67126),i=n(40913);var s=function(){function e(t,n,o,s){var c,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};((0,a.Z)(this,e),"function"===typeof n.get)?this.c=new r.default(n):(c="string"===typeof n?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t={};return t[arguments.length>1?arguments[1]:void 0]=e,t}(n,t):n,this.c=new r.default(c,o,s,u));this.intDecoding=i.Z.DEFAULT}return(0,o.Z)(e,[{key:"setIntEncoding",value:function(e){this.intDecoding=e}},{key:"getIntEncoding",value:function(){return this.intDecoding}}]),e}()},91365:function(e,t,n){"use strict";n.d(t,{A:function(){return k},b:function(){return a}});var a,o=n(37762),r=n(74165),i=n(29439),s=n(15861),c=n(1413),u=n(15671),d=n(43144),l=n(73206),f=n(78642),p=n(5213),b=n(27240),m=n(4403),h=n(9431),g=n(78064),y=n(54659).Buffer,v=y.from([21,31,124,117]);function w(e,t,n){if(null!=n&&e===n)return 0;for(var a=null==n?0:1,o=0;oe.MAX_GROUP_SIZE)throw new Error("Adding additional transactions exceeds the maximum atomic group size of ".concat(e.MAX_GROUP_SIZE));if(0===o){if(null==d||null==f||null==b||null==m||null==y||null==v)throw new Error("One of the following required parameters for application creation is missing: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices")}else if(u===g.hq.UpdateApplicationOC){if(null==d||null==f)throw new Error("One of the following required parameters for OnApplicationComplete.UpdateApplicationOC is missing: approvalProgram, clearProgram");if(null!=b||null!=m||null!=y||null!=v||null!=k)throw new Error("One of the following application creation parameters were set on a non-creation call: numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages")}else if(null!=d||null!=f||null!=b||null!=m||null!=y||null!=v||null!=k)throw new Error("One of the following application creation parameters were set on a non-creation call: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages");if(null==i&&(i=[]),i.length!==r.args.length)throw new Error("Incorrect number of method arguments. Expected ".concat(r.args.length,", got ").concat(i.length));for(var C=[],E=[],R=[],M=[],P=[],U=new Map,_=A||[],B=0;BNumber.MAX_SAFE_INTEGER)throw new Error("Expected safe integer for application value, got ".concat(V));K=w(Number(V),L,o);break;case l.UV.asset:var q=new l.Pu(64),Q=q.decode(q.encode(z));if(Q>Number.MAX_SAFE_INTEGER)throw new Error("Expected safe integer for asset value, got ".concat(Q));K=w(Number(Q),j);break;default:throw new Error("Unknown reference type: ".concat(G))}O.push(K)}for(var J=0;J15){var Y=C.slice(14),X=E.slice(14);C=C.slice(0,14),E=E.slice(0,14),C.push(new l.w1(Y)),E.push(X)}for(var $=[r.getSelector()],ee=0;ee1&&(0,b.assignGroupID)(this.transactions.map((function(e){return e.txn}))),this.status=a.BUILT}return this.transactions}},{key:"gatherSignatures",value:function(){var e=(0,s.Z)((0,r.Z)().mark((function e(){var t,n,o,s,c,u,d,l,p,b,m,h,g;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.status>=a.SIGNED)){e.next=2;break}return e.abrupt("return",this.signedTxns);case 2:for(t=this.buildGroup(),n=t.map((function(e){return e.txn})),o=new Map,s=0;sa.SUBMITTED)){e.next=2;break}throw new Error("Transaction group cannot be resubmitted");case 2:return e.next=4,this.gatherSignatures();case 4:return n=e.sent,e.next=7,t.sendRawTransaction(n).do();case 7:return this.status=a.SUBMITTED,e.abrupt("return",this.txIDs);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"execute",value:function(){var e=(0,s.Z)((0,r.Z)().mark((function e(t,n){var s,c,u,d,l,f,p,b,h,g,w,k,A,x,I,T,S=this;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.status!==a.COMMITTED){e.next=2;break}throw new Error("Transaction group has already been executed successfully");case 2:return e.next=4,this.submit(t);case 4:return s=e.sent,this.status=a.SUBMITTED,c=this.transactions.findIndex((function(e,t){return S.methodCalls.has(t)})),u=-1===c?0:c,e.next=10,(0,m.K)(t,s[u],n);case 10:d=e.sent,this.status=a.COMMITTED,l=d["confirmed-round"],f=[],p=(0,o.Z)(this.methodCalls),e.prev=15,p.s();case 17:if((b=p.n()).done){e.next=48;break}if(h=(0,i.Z)(b.value,2),g=h[0],w=h[1],k=s[g],A={txID:k,rawReturnValue:new Uint8Array,method:w},e.prev=21,g!==c){e.next=26;break}e.t0=d,e.next=29;break;case 26:return e.next=28,t.pendingTransactionInformation(k).do();case 28:e.t0=e.sent;case 29:if(x=e.t0,A.txInfo=x,"void"===w.returns.type){e.next=40;break}if(0!==(I=x.logs||[]).length){e.next=35;break}throw new Error("App call transaction did not log a return value");case 35:if(!((T=y.from(I[I.length-1],"base64")).byteLength<4)&&T.slice(0,4).equals(v)){e.next=38;break}throw new Error("App call transaction did not log a return value");case 38:A.rawReturnValue=new Uint8Array(T.slice(4)),A.returnValue=w.returns.type.decode(A.rawReturnValue);case 40:e.next=45;break;case 42:e.prev=42,e.t1=e.catch(21),A.decodeError=e.t1;case 45:f.push(A);case 46:e.next=17;break;case 48:e.next=53;break;case 50:e.prev=50,e.t2=e.catch(15),p.e(e.t2);case 53:return e.prev=53,p.f(),e.finish(53);case 56:return e.abrupt("return",{confirmedRound:l,txIDs:s,methodResults:f});case 57:case"end":return e.stop()}}),e,this,[[15,50,53,56],[21,42]])})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();k.MAX_GROUP_SIZE=16},22747:function(e,t,n){"use strict";n.d(t,{HN:function(){return i},_:function(){return r},rD:function(){return o}});var a=1e6,o="Microalgos should be positive and less than 2^53 - 1.";function r(e){if(e<0||!Number.isSafeInteger(e))throw new Error(o);return e/a}function i(e){var t=e*a;return Math.round(t)}},78504:function(e,t,n){"use strict";n.d(t,{P:function(){return h},x:function(){return T}});var a=n(74165),o=n(1413),r=n(93433),i=n(37762),s=n(15671),c=n(43144),u=n(15861),d=n(84992),l=n(36051),f=n(40806),p=n(54659).Buffer,b=1380011588;function m(e){return e.params["approval-program"]=p.from(e.params["approval-program"].toString(),"base64"),e.params["clear-state-program"]=p.from(e.params["clear-state-program"].toString(),"base64"),e}function h(e){return g.apply(this,arguments)}function g(){return(g=(0,u.Z)((0,a.Z)().mark((function e(t){var n,s,c,u,p,h,g,y,v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B,D,N;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.client,s=t.txns,c=t.protocolVersion,u=t.latestTimestamp,p=t.round,h=t.sources,g=[],y=[],v=[],w=[],k=[],A=(0,i.Z)(s);try{for(A.s();!(x=A.n()).done;)(I=x.value).txn.type===l.i.appl&&(k.push((0,f.encodeAddress)(I.txn.from.publicKey)),I.txn.appAccounts&&k.push.apply(k,(0,r.Z)(I.txn.appAccounts.map((function(e){return(0,f.encodeAddress)(e.publicKey)})))),I.txn.appForeignApps&&(v.push.apply(v,(0,r.Z)(I.txn.appForeignApps)),k.push.apply(k,(0,r.Z)(I.txn.appForeignApps.map((function(e){return(0,f.getApplicationAddress)(e)}))))),I.txn.appForeignAssets&&w.push.apply(w,(0,r.Z)(I.txn.appForeignAssets)),void 0===I.txn.appIndex||0===I.txn.appIndex?g.push(new d.Application(b,new d.ApplicationParams({creator:(0,f.encodeAddress)(I.txn.from.publicKey),approvalProgram:I.txn.appApprovalProgram,clearStateProgram:I.txn.appClearProgram,localStateSchema:new d.ApplicationStateSchema(I.txn.appLocalInts,I.txn.appLocalByteSlices),globalStateSchema:new d.ApplicationStateSchema(I.txn.appGlobalInts,I.txn.appGlobalByteSlices)}))):(v.push(I.txn.appIndex),k.push((0,f.getApplicationAddress)(I.txn.appIndex))))}catch(a){A.e(a)}finally{A.f()}for(T=[],S=0,C=(0,r.Z)(new Set(w));St&&t>0?"".concat(e.slice(0,t),"..."):e}function A(e,t){if(0===t.length)return"";for(var n=null,a=0;ae.length||JSON.stringify(e[a])!==JSON.stringify(t[a]))&&(n=a);if(null==n)return"";var o=t[n];return o.bytes.length>0?"".concat(n," = 0x").concat(p.from(o.bytes,"base64").toString("hex")):"".concat(n," = ").concat(o.uint.toString())}function x(e,t){var n=t?e.reverse():e;return"[".concat(n.map((function(e){switch(e.type){case 1:return"0x".concat(p.from(e.bytes,"base64").toString("hex"));case 2:return"".concat(e.uint.toString());default:return""}})).join(", "),"]")}var I=function(){function e(t){(0,s.Z)(this,e),this.disassembly=[],this.appCallMessages=[],this.localDeltas=[],this.globalDelta=[],this.cost=0,this.logicSigMessages=[],this.logicSigDisassembly=[],this.logs=[],this.appCallTrace=void 0,this.logicSigTrace=void 0,this.required=["disassembly"],this.optionals=["app-call-messages","local-deltas","global-delta","cost","logic-sig-messages","logic-sig-disassembly","logs"],this.traces=["app-call-trace","logic-sig-trace"],this.disassembly=t.disassembly,this.appCallMessages=t["app-call-messages"],this.localDeltas=t["local-deltas"],this.globalDelta=t["global-delta"],this.cost=t.cost,this.logicSigMessages=t["logic-sig-messages"],this.logicSigDisassembly=t["logic-sig-disassembly"],this.logs=t.logs,this.appCallTrace=new w(t["app-call-trace"]),this.logicSigTrace=new w(t["logic-sig-trace"])}return(0,c.Z)(e,[{key:"appCallRejected",value:function(){return void 0!==this.appCallMessages&&this.appCallMessages.includes("REJECT")}},{key:"logicSigRejected",value:function(){return void 0!==this.logicSigMessages&&this.logicSigMessages.includes("REJECT")}},{key:"appTrace",value:function(t){if(void 0===this.appCallTrace||!this.disassembly)return"";var n=t;return void 0===t&&(n={maxValueWidth:30,topOfStackFirst:!1}),e.trace(this.appCallTrace,this.disassembly,n)}},{key:"lsigTrace",value:function(t){if(void 0===this.logicSigTrace||void 0===this.logicSigDisassembly)return"";var n=t;return void 0===t&&(n={maxValueWidth:30,topOfStackFirst:!0}),e.trace(this.logicSigTrace,this.logicSigDisassembly,n)}}],[{key:"trace",value:function(e,t,n){for(var a=n.maxValueWidth||30,o=[["pc#","ln#","source","scratch","stack"]],r=0;r0&&void 0!==e.trace[r-1].scratch?e.trace[r-1].scratch:[],b=""===c?t[s]:"!! ".concat(c," !!");o.push([u.toString().padEnd(3," "),s.toString().padEnd(3," "),k(b,a),k(A(p,f),a),k(x(l,n.topOfStackFirst),a)])}var m=o.reduce((function(e,t){for(var n=new Array(o[0].length).fill(0),a=0;ae[a]?t[a].length:e[a];return n}),new Array(o[0].length).fill(0));return"".concat(o.map((function(e){return e.map((function(e,t){return e.padEnd(m[t]+1," ")})).join("|").trim()})).join("\n"),"\n")}}]),e}(),T=(0,c.Z)((function e(t){(0,s.Z)(this,e),this.error="",this.protocolVersion="",this.txns=[],this.error=t.error,this.protocolVersion=t["protocol-version"],this.txns=t.txns.map((function(e){return new I(e)}))}))},40806:function(e,t,n){"use strict";n.r(t),n.d(t,{ALGORAND_ZERO_ADDRESS_STRING:function(){return f},CHECKSUM_ADDRESS_ERROR_MSG:function(){return h},INVALID_MSIG_PK_ERROR_MSG:function(){return v},INVALID_MSIG_THRESHOLD_ERROR_MSG:function(){return y},INVALID_MSIG_VERSION_ERROR_MSG:function(){return g},MALFORMED_ADDRESS_ERROR_MSG:function(){return m},UNEXPECTED_PK_LEN_ERROR_MSG:function(){return w},decodeAddress:function(){return k},encodeAddress:function(){return x},fromMultisigPreImg:function(){return I},fromMultisigPreImgAddrs:function(){return T},getApplicationAddress:function(){return S},isValidAddress:function(){return A}});var a=n(8162),o=n.n(a),r=n(93524),i=n(54684),s=n(12082),c=n(54659).Buffer,u=36,d=4,l=58,f="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ",p=new Uint8Array([77,117,108,116,105,115,105,103,65,100,100,114]),b=c.from("appID"),m="address seems to be malformed",h="wrong checksum for address",g="invalid multisig version",y="bad multisig threshold",v="bad multisig public key - wrong length",w="nacl public key length is not 32 bytes";function k(e){if("string"!==typeof e||e.length!==l)throw new Error(m);var t=o().decode.asBytes(e.toString());if(t.length!==u)throw new Error(m);var n=new Uint8Array(t.slice(0,u-d)),a=new Uint8Array(t.slice(r.PUBLIC_KEY_LENGTH,u)),s=r.genericHash(n).slice(r.HASH_BYTES_LENGTH-d,r.HASH_BYTES_LENGTH);if(!i.arrayEqual(s,a))throw new Error(h);return{publicKey:n,checksum:a}}function A(e){try{k(e)}catch(t){return!1}return!0}function x(e){var t=r.genericHash(e).slice(r.PUBLIC_KEY_LENGTH-d,r.PUBLIC_KEY_LENGTH);return o().encode(i.concatArrays(e,t)).toString().slice(0,l)}function I(e){var t=e.version,n=e.threshold,a=e.pks;if(1!==t||t>255||t<0)throw new Error(g);if(0===n||0===a.length||n>a.length||n>255)throw new Error(y);var o=u-d;if(o!==r.PUBLIC_KEY_LENGTH)throw new Error(w);var i=new Uint8Array(p.length+2+o*a.length);i.set(p,0),i.set([t],p.length),i.set([n],p.length+1);for(var s=0;sBigInt("0xffffffffffffffff"))throw new Error("Input is not a 64-bit unsigned integer");var t=a.allocUnsafe(8);return t.writeBigUInt64BE(BigInt(e)),new Uint8Array(t)}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"safe";if("safe"!==t&&"mixed"!==t&&"bigint"!==t)throw new Error("Unknown decodingMode option: ".concat(t));if(0===e.byteLength||e.byteLength>8)throw new Error("Data has unacceptable length. Expected length is between 1 and 8, got ".concat(e.byteLength));var n=a.allocUnsafe(8-e.byteLength);n.fill(0);var o=a.concat([n,a.from(e)]).readBigUInt64BE(),r=o>Number.MAX_SAFE_INTEGER;if("safe"===t){if(r)throw new Error("Integer exceeds maximum safe integer: ".concat(o.toString(),'. Try decoding with "mixed" or "safe" decodingMode.'));return Number(o)}return"mixed"!==t||r?o:Number(o)}},27240:function(e,t,n){"use strict";n.r(t),n.d(t,{TxGroup:function(){return f},assignGroupID:function(){return b},computeGroupID:function(){return p}});var a=n(37762),o=n(15671),r=n(43144),i=n(78642),s=n(93524),c=n(30511),u=n(40806),d=n(54684),l=n(54659).Buffer,f=function(){function e(t){if((0,o.Z)(this,e),this.name="Transaction group",this.tag=l.from("TG"),t.length>16){var n="".concat(t.length.toString()," transactions grouped together but max group size is ").concat(16..toString());throw Error(n)}this.txGroupHashes=t}return(0,r.Z)(e,[{key:"get_obj_for_encoding",value:function(){return{txlist:this.txGroupHashes}}},{key:"toByte",value:function(){return c.encode(this.get_obj_for_encoding())}}],[{key:"from_obj_for_encoding",value:function(e){var t=Object.create(this.prototype);t.name="Transaction group",t.tag=l.from("TG"),t.txGroupHashes=[];var n,o=(0,a.Z)(e.txlist);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.txGroupHashes.push(l.from(r))}}catch(i){o.e(i)}finally{o.f()}return t}}]),e}();function p(e){var t,n=[],o=(0,a.Z)(e);try{for(o.s();!(t=o.n()).done;){var r=t.value,c=i.instantiateTxnIfNeeded(r);n.push(c.rawTxID())}}catch(h){o.e(h)}finally{o.f()}var u=new f(n),p=u.toByte(),b=l.from(d.concatArrays(u.tag,p)),m=s.genericHash(b);return l.from(m)}function b(e,t){var n,o=p(e),r=[],s=(0,a.Z)(e);try{for(s.s();!(n=s.n()).done;){var c=n.value,d=i.instantiateTxnIfNeeded(c);t&&u.encodeAddress(d.from.publicKey)!==t||(d.group=o,r.push(d))}}catch(l){s.e(l)}finally{s.f()}return r}t.default=f},77728:function(e,t,n){"use strict";n.r(t);var a=n(54140),o={};for(var r in a)"default"!==r&&(o[r]=function(e){return a[e]}.bind(0,r));n.d(t,o),t.default=a},26305:function(e,t,n){"use strict";n.r(t),n.d(t,{checkByteConstBlock:function(){return g},checkIntConstBlock:function(){return h},checkProgram:function(){return m},checkPushByteOp:function(){return v},checkPushIntOp:function(){return y},langspecEvalMaxVersion:function(){return w},langspecLogicSigVersion:function(){return k},parseUvarint:function(){return u},readProgram:function(){return b}});var a,o=n(37762),r=n(29439),i=JSON.parse('{"z_":6,"BV":5,"AP":[{"Opcode":0,"Name":"err","Cost":1,"Size":1,"Doc":"Fail immediately.","Groups":["Flow Control"]},{"Opcode":1,"Name":"sha256","Args":"B","Returns":"B","Cost":35,"Size":1,"Doc":"SHA256 hash of value A, yields [32]byte","Groups":["Arithmetic"]},{"Opcode":2,"Name":"keccak256","Args":"B","Returns":"B","Cost":130,"Size":1,"Doc":"Keccak256 hash of value A, yields [32]byte","Groups":["Arithmetic"]},{"Opcode":3,"Name":"sha512_256","Args":"B","Returns":"B","Cost":45,"Size":1,"Doc":"SHA512_256 hash of value A, yields [32]byte","Groups":["Arithmetic"]},{"Opcode":4,"Name":"ed25519verify","Args":"BBB","Returns":"U","Cost":1900,"Size":1,"Doc":"for (data A, signature B, pubkey C) verify the signature of (\\"ProgData\\" || program_hash || data) against the pubkey => {0 or 1}","DocExtra":"The 32 byte public key is the last element on the stack, preceded by the 64 byte signature at the second-to-last element on the stack, preceded by the data which was signed at the third-to-last element on the stack.","Groups":["Arithmetic"]},{"Opcode":5,"Name":"ecdsa_verify","Args":"BBBBB","Returns":"U","Cost":1700,"Size":2,"Doc":"for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}","DocExtra":"The 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":6,"Name":"ecdsa_pk_decompress","Args":"B","Returns":"BB","Cost":650,"Size":2,"Doc":"decompress pubkey A into components X, Y","DocExtra":"The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":7,"Name":"ecdsa_pk_recover","Args":"BUBB","Returns":"BB","Cost":2000,"Size":2,"Doc":"for (data A, recovery id B, signature C, D) recover a public key","DocExtra":"S (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":8,"Name":"+","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A plus B. Fail on overflow.","DocExtra":"Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `addw`.","Groups":["Arithmetic"]},{"Opcode":9,"Name":"-","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A minus B. Fail if B > A.","Groups":["Arithmetic"]},{"Opcode":10,"Name":"/","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A divided by B (truncated division). Fail if B == 0.","DocExtra":"`divmodw` is available to divide the two-element values produced by `mulw` and `addw`.","Groups":["Arithmetic"]},{"Opcode":11,"Name":"*","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A times B. Fail on overflow.","DocExtra":"Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `mulw`.","Groups":["Arithmetic"]},{"Opcode":12,"Name":"<","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A less than B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":13,"Name":">","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A greater than B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":14,"Name":"<=","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A less than or equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":15,"Name":">=","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A greater than or equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":16,"Name":"&&","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A is not zero and B is not zero => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":17,"Name":"||","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A is not zero or B is not zero => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":18,"Name":"==","Args":"..","Returns":"U","Cost":1,"Size":1,"Doc":"A is equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":19,"Name":"!=","Args":"..","Returns":"U","Cost":1,"Size":1,"Doc":"A is not equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":20,"Name":"!","Args":"U","Returns":"U","Cost":1,"Size":1,"Doc":"A == 0 yields 1; else 0","Groups":["Arithmetic"]},{"Opcode":21,"Name":"len","Args":"B","Returns":"U","Cost":1,"Size":1,"Doc":"yields length of byte value A","Groups":["Arithmetic"]},{"Opcode":22,"Name":"itob","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"converts uint64 A to big endian bytes","Groups":["Arithmetic"]},{"Opcode":23,"Name":"btoi","Args":"B","Returns":"U","Cost":1,"Size":1,"Doc":"converts bytes A as big endian to uint64","DocExtra":"`btoi` fails if the input is longer than 8 bytes.","Groups":["Arithmetic"]},{"Opcode":24,"Name":"%","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A modulo B. Fail if B == 0.","Groups":["Arithmetic"]},{"Opcode":25,"Name":"|","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A bitwise-or B","Groups":["Arithmetic"]},{"Opcode":26,"Name":"&","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A bitwise-and B","Groups":["Arithmetic"]},{"Opcode":27,"Name":"^","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A bitwise-xor B","Groups":["Arithmetic"]},{"Opcode":28,"Name":"~","Args":"U","Returns":"U","Cost":1,"Size":1,"Doc":"bitwise invert value A","Groups":["Arithmetic"]},{"Opcode":29,"Name":"mulw","Args":"UU","Returns":"UU","Cost":1,"Size":1,"Doc":"A times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low","Groups":["Arithmetic"]},{"Opcode":30,"Name":"addw","Args":"UU","Returns":"UU","Cost":1,"Size":1,"Doc":"A plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.","Groups":["Arithmetic"]},{"Opcode":31,"Name":"divmodw","Args":"UUUU","Returns":"UUUU","Cost":20,"Size":1,"Doc":"W,X = (A,B / C,D); Y,Z = (A,B modulo C,D)","DocExtra":"The notation J,K indicates that two uint64 values J and K are interpreted as a uint128 value, with J as the high uint64 and K the low.","Groups":["Arithmetic"]},{"Opcode":32,"Name":"intcblock","Cost":1,"Size":0,"Doc":"prepare block of uint64 constants for use by intc","DocExtra":"`intcblock` loads following program bytes into an array of integer constants in the evaluator. These integer constants can be referred to by `intc` and `intc_*` which will push the value onto the stack. Subsequent calls to `intcblock` reset and replace the integer constants available to the script.","ImmediateNote":"{varuint length} [{varuint value}, ...]","Groups":["Loading Values"]},{"Opcode":33,"Name":"intc","Returns":"U","Cost":1,"Size":2,"Doc":"Ith constant from intcblock","ImmediateNote":"{uint8 int constant index}","Groups":["Loading Values"]},{"Opcode":34,"Name":"intc_0","Returns":"U","Cost":1,"Size":1,"Doc":"constant 0 from intcblock","Groups":["Loading Values"]},{"Opcode":35,"Name":"intc_1","Returns":"U","Cost":1,"Size":1,"Doc":"constant 1 from intcblock","Groups":["Loading Values"]},{"Opcode":36,"Name":"intc_2","Returns":"U","Cost":1,"Size":1,"Doc":"constant 2 from intcblock","Groups":["Loading Values"]},{"Opcode":37,"Name":"intc_3","Returns":"U","Cost":1,"Size":1,"Doc":"constant 3 from intcblock","Groups":["Loading Values"]},{"Opcode":38,"Name":"bytecblock","Cost":1,"Size":0,"Doc":"prepare block of byte-array constants for use by bytec","DocExtra":"`bytecblock` loads the following program bytes into an array of byte-array constants in the evaluator. These constants can be referred to by `bytec` and `bytec_*` which will push the value onto the stack. Subsequent calls to `bytecblock` reset and replace the bytes constants available to the script.","ImmediateNote":"{varuint length} [({varuint value length} bytes), ...]","Groups":["Loading Values"]},{"Opcode":39,"Name":"bytec","Returns":"B","Cost":1,"Size":2,"Doc":"Ith constant from bytecblock","ImmediateNote":"{uint8 byte constant index}","Groups":["Loading Values"]},{"Opcode":40,"Name":"bytec_0","Returns":"B","Cost":1,"Size":1,"Doc":"constant 0 from bytecblock","Groups":["Loading Values"]},{"Opcode":41,"Name":"bytec_1","Returns":"B","Cost":1,"Size":1,"Doc":"constant 1 from bytecblock","Groups":["Loading Values"]},{"Opcode":42,"Name":"bytec_2","Returns":"B","Cost":1,"Size":1,"Doc":"constant 2 from bytecblock","Groups":["Loading Values"]},{"Opcode":43,"Name":"bytec_3","Returns":"B","Cost":1,"Size":1,"Doc":"constant 3 from bytecblock","Groups":["Loading Values"]},{"Opcode":44,"Name":"arg","Returns":"B","Cost":1,"Size":2,"Doc":"Nth LogicSig argument","ImmediateNote":"{uint8 arg index N}","Groups":["Loading Values"]},{"Opcode":45,"Name":"arg_0","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 0","Groups":["Loading Values"]},{"Opcode":46,"Name":"arg_1","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 1","Groups":["Loading Values"]},{"Opcode":47,"Name":"arg_2","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 2","Groups":["Loading Values"]},{"Opcode":48,"Name":"arg_3","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 3","Groups":["Loading Values"]},{"Opcode":49,"Name":"txn","Returns":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of current transaction","DocExtra":"FirstValidTime causes the program to fail. The field is reserved for future use.","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":50,"Name":"global","Returns":".","Cost":1,"Size":2,"Doc":"global field F","ImmediateNote":"{uint8 global field index}","Groups":["Loading Values"]},{"Opcode":51,"Name":"gtxn","Returns":".","Cost":1,"Size":3,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Tth transaction in the current group","DocExtra":"for notes on transaction fields available, see `txn`. If this transaction is _i_ in the group, `gtxn i field` is equivalent to `txn field`.","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":52,"Name":"load","Returns":".","Cost":1,"Size":2,"Doc":"Ith scratch space value. All scratch spaces are 0 at program start.","ImmediateNote":"{uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":53,"Name":"store","Args":".","Cost":1,"Size":2,"Doc":"store A to the Ith scratch space","ImmediateNote":"{uint8 position in scratch space to store to}","Groups":["Loading Values"]},{"Opcode":54,"Name":"txna","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F of the current transaction","ImmediateNote":"{uint8 transaction field index} {uint8 transaction field array index}","Groups":["Loading Values"]},{"Opcode":55,"Name":"gtxna","Returns":".","Cost":1,"Size":4,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Tth transaction in the current group","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index} {uint8 transaction field array index}","Groups":["Loading Values"]},{"Opcode":56,"Name":"gtxns","Args":"U","Returns":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Ath transaction in the current group","DocExtra":"for notes on transaction fields available, see `txn`. If top of stack is _i_, `gtxns field` is equivalent to `gtxn _i_ field`. gtxns exists so that _i_ can be calculated, often based on the index of the current transaction.","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":57,"Name":"gtxnsa","Args":"U","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Ath transaction in the current group","ImmediateNote":"{uint8 transaction field index} {uint8 transaction field array index}","Groups":["Loading Values"]},{"Opcode":58,"Name":"gload","Returns":".","Cost":1,"Size":3,"Doc":"Ith scratch space value of the Tth transaction in the current group","DocExtra":"`gload` fails unless the requested transaction is an ApplicationCall and T < GroupIndex.","ImmediateNote":"{uint8 transaction group index} {uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":59,"Name":"gloads","Args":"U","Returns":".","Cost":1,"Size":2,"Doc":"Ith scratch space value of the Ath transaction in the current group","DocExtra":"`gloads` fails unless the requested transaction is an ApplicationCall and A < GroupIndex.","ImmediateNote":"{uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":60,"Name":"gaid","Returns":"U","Cost":1,"Size":2,"Doc":"ID of the asset or application created in the Tth transaction of the current group","DocExtra":"`gaid` fails unless the requested transaction created an asset or application and T < GroupIndex.","ImmediateNote":"{uint8 transaction group index}","Groups":["Loading Values"]},{"Opcode":61,"Name":"gaids","Args":"U","Returns":"U","Cost":1,"Size":1,"Doc":"ID of the asset or application created in the Ath transaction of the current group","DocExtra":"`gaids` fails unless the requested transaction created an asset or application and A < GroupIndex.","Groups":["Loading Values"]},{"Opcode":62,"Name":"loads","Args":"U","Returns":".","Cost":1,"Size":1,"Doc":"Ath scratch space value. All scratch spaces are 0 at program start.","Groups":["Loading Values"]},{"Opcode":63,"Name":"stores","Args":"U.","Cost":1,"Size":1,"Doc":"store B to the Ath scratch space","Groups":["Loading Values"]},{"Opcode":64,"Name":"bnz","Args":"U","Cost":1,"Size":3,"Doc":"branch to TARGET if value A is not zero","DocExtra":"The `bnz` instruction opcode 0x40 is followed by two immediate data bytes which are a high byte first and low byte second which together form a 16 bit offset which the instruction may branch to. For a bnz instruction at `pc`, if the last element of the stack is not zero then branch to instruction at `pc + 3 + N`, else proceed to next instruction at `pc + 3`. Branch targets must be aligned instructions. (e.g. Branching to the second byte of a 2 byte op will be rejected.) Starting at v4, the offset is treated as a signed 16 bit integer allowing for backward branches and looping. In prior version (v1 to v3), branch offsets are limited to forward branches only, 0-0x7fff.\\n\\nAt v2 it became allowed to branch to the end of the program exactly after the last instruction: bnz to byte N (with 0-indexing) was illegal for a TEAL program with N bytes before v2, and is legal after it. This change eliminates the need for a last instruction of no-op as a branch target at the end. (Branching beyond the end--in other words, to a byte larger than N--is still illegal and will cause the program to fail.)","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":65,"Name":"bz","Args":"U","Cost":1,"Size":3,"Doc":"branch to TARGET if value A is zero","DocExtra":"See `bnz` for details on how branches work. `bz` inverts the behavior of `bnz`.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":66,"Name":"b","Cost":1,"Size":3,"Doc":"branch unconditionally to TARGET","DocExtra":"See `bnz` for details on how branches work. `b` always jumps to the offset.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":67,"Name":"return","Args":"U","Cost":1,"Size":1,"Doc":"use A as success value; end","Groups":["Flow Control"]},{"Opcode":68,"Name":"assert","Args":"U","Cost":1,"Size":1,"Doc":"immediately fail unless A is a non-zero number","Groups":["Flow Control"]},{"Opcode":72,"Name":"pop","Args":".","Cost":1,"Size":1,"Doc":"discard A","Groups":["Flow Control"]},{"Opcode":73,"Name":"dup","Args":".","Returns":"..","Cost":1,"Size":1,"Doc":"duplicate A","Groups":["Flow Control"]},{"Opcode":74,"Name":"dup2","Args":"..","Returns":"....","Cost":1,"Size":1,"Doc":"duplicate A and B","Groups":["Flow Control"]},{"Opcode":75,"Name":"dig","Args":".","Returns":"..","Cost":1,"Size":2,"Doc":"Nth value from the top of the stack. dig 0 is equivalent to dup","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":76,"Name":"swap","Args":"..","Returns":"..","Cost":1,"Size":1,"Doc":"swaps A and B on stack","Groups":["Flow Control"]},{"Opcode":77,"Name":"select","Args":"..U","Returns":".","Cost":1,"Size":1,"Doc":"selects one of two values based on top-of-stack: B if C != 0, else A","Groups":["Flow Control"]},{"Opcode":78,"Name":"cover","Args":".","Returns":".","Cost":1,"Size":2,"Doc":"remove top of stack, and place it deeper in the stack such that N elements are above it. Fails if stack depth <= N.","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":79,"Name":"uncover","Args":".","Returns":".","Cost":1,"Size":2,"Doc":"remove the value at depth N in the stack and shift above items down so the Nth deep value is on top of the stack. Fails if stack depth <= N.","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":80,"Name":"concat","Args":"BB","Returns":"B","Cost":1,"Size":1,"Doc":"join A and B","DocExtra":"`concat` fails if the result would be greater than 4096 bytes.","Groups":["Arithmetic"]},{"Opcode":81,"Name":"substring","Args":"B","Returns":"B","Cost":1,"Size":3,"Doc":"A range of bytes from A starting at S up to but not including E. If E < S, or either is larger than the array length, the program fails","ImmediateNote":"{uint8 start position} {uint8 end position}","Groups":["Byte Array Manipulation"]},{"Opcode":82,"Name":"substring3","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"A range of bytes from A starting at B up to but not including C. If C < B, or either is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":83,"Name":"getbit","Args":".U","Returns":"U","Cost":1,"Size":1,"Doc":"Bth bit of (byte-array or integer) A.","DocExtra":"see explanation of bit ordering in setbit","Groups":["Arithmetic"]},{"Opcode":84,"Name":"setbit","Args":".UU","Returns":".","Cost":1,"Size":1,"Doc":"Copy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C","DocExtra":"When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10.","Groups":["Arithmetic"]},{"Opcode":85,"Name":"getbyte","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"Bth byte of A, as an integer","Groups":["Arithmetic"]},{"Opcode":86,"Name":"setbyte","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"Copy of A with the Bth byte set to small integer (between 0..255) C","Groups":["Arithmetic"]},{"Opcode":87,"Name":"extract","Args":"B","Returns":"B","Cost":1,"Size":3,"Doc":"A range of bytes from A starting at S up to but not including S+L. If L is 0, then extract to the end of the string. If S or S+L is larger than the array length, the program fails","ImmediateNote":"{uint8 start position} {uint8 length}","Groups":["Byte Array Manipulation"]},{"Opcode":88,"Name":"extract3","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"A range of bytes from A starting at B up to but not including B+C. If B+C is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":89,"Name":"extract_uint16","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint16 formed from a range of big-endian bytes from A starting at B up to but not including B+2. If B+2 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":90,"Name":"extract_uint32","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint32 formed from a range of big-endian bytes from A starting at B up to but not including B+4. If B+4 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":91,"Name":"extract_uint64","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint64 formed from a range of big-endian bytes from A starting at B up to but not including B+8. If B+8 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":96,"Name":"balance","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"get balance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted.","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.","Groups":["State Access"]},{"Opcode":97,"Name":"app_opted_in","Args":".U","Returns":"U","Cost":1,"Size":1,"Doc":"1 if account A is opted in to application B, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: 1 if opted in and 0 otherwise.","Groups":["State Access"]},{"Opcode":98,"Name":"app_local_get","Args":".B","Returns":".","Cost":1,"Size":1,"Doc":"local state of the key B in the current application in account A","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key. Return: value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":99,"Name":"app_local_get_ex","Args":".UB","Returns":".U","Cost":1,"Size":1,"Doc":"X is the local state of application B, key C in account A. Y is 1 if key existed, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":100,"Name":"app_global_get","Args":"B","Returns":".","Cost":1,"Size":1,"Doc":"global state of the key A in the current application","DocExtra":"params: state key. Return: value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":101,"Name":"app_global_get_ex","Args":"UB","Returns":".U","Cost":1,"Size":1,"Doc":"X is the global state of application A, key B. Y is 1 if key existed, else 0","DocExtra":"params: Txn.ForeignApps offset (or, since v4, an _available_ application id), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":102,"Name":"app_local_put","Args":".B.","Cost":1,"Size":1,"Doc":"write C to key B in account A\'s local state of the current application","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key, value.","Groups":["State Access"]},{"Opcode":103,"Name":"app_global_put","Args":"B.","Cost":1,"Size":1,"Doc":"write B to key A in the global state of the current application","Groups":["State Access"]},{"Opcode":104,"Name":"app_local_del","Args":".B","Cost":1,"Size":1,"Doc":"delete key B from account A\'s local state of the current application","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key.\\n\\nDeleting a key which is already absent has no effect on the application local state. (In particular, it does _not_ cause the program to fail.)","Groups":["State Access"]},{"Opcode":105,"Name":"app_global_del","Args":"B","Cost":1,"Size":1,"Doc":"delete key A from the global state of the current application","DocExtra":"params: state key.\\n\\nDeleting a key which is already absent has no effect on the application global state. (In particular, it does _not_ cause the program to fail.)","Groups":["State Access"]},{"Opcode":112,"Name":"asset_holding_get","Args":".U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AssetBalance","AssetFrozen"],"ArgEnumTypes":"UU","Doc":"X is field F from account A\'s holding of asset B. Y is 1 if A is opted into B, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ address), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value.","ImmediateNote":"{uint8 asset holding field index}","Groups":["State Access"]},{"Opcode":113,"Name":"asset_params_get","Args":"U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AssetTotal","AssetDecimals","AssetDefaultFrozen","AssetUnitName","AssetName","AssetURL","AssetMetadataHash","AssetManager","AssetReserve","AssetFreeze","AssetClawback","AssetCreator"],"ArgEnumTypes":"UUUBBBBBBBBB","Doc":"X is field F from asset A. Y is 1 if A exists, else 0","DocExtra":"params: Txn.ForeignAssets offset (or, since v4, an _available_ asset id. Return: did_exist flag (1 if the asset existed and 0 otherwise), value.","ImmediateNote":"{uint8 asset params field index}","Groups":["State Access"]},{"Opcode":114,"Name":"app_params_get","Args":"U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AppApprovalProgram","AppClearStateProgram","AppGlobalNumUint","AppGlobalNumByteSlice","AppLocalNumUint","AppLocalNumByteSlice","AppExtraProgramPages","AppCreator","AppAddress"],"ArgEnumTypes":"BBUUUUUBB","Doc":"X is field F from app A. Y is 1 if A exists, else 0","DocExtra":"params: Txn.ForeignApps offset or an _available_ app id. Return: did_exist flag (1 if the application existed and 0 otherwise), value.","ImmediateNote":"{uint8 app params field index}","Groups":["State Access"]},{"Opcode":115,"Name":"acct_params_get","Args":".","Returns":".U","Cost":1,"Size":2,"Doc":"X is field F from account A. Y is 1 if A owns positive algos, else 0","ImmediateNote":"{uint8 account params field index}","Groups":["State Access"]},{"Opcode":120,"Name":"min_balance","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"get minimum required balance for account A, in microalgos. Required balance is affected by [ASA](https://developer.algorand.org/docs/features/asa/#assets-overview) and [App](https://developer.algorand.org/docs/features/asc1/stateful/#minimum-balance-requirement-for-a-smart-contract) usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes.","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.","Groups":["State Access"]},{"Opcode":128,"Name":"pushbytes","Returns":"B","Cost":1,"Size":0,"Doc":"immediate BYTES","DocExtra":"pushbytes args are not added to the bytecblock during assembly processes","ImmediateNote":"{varuint length} {bytes}","Groups":["Loading Values"]},{"Opcode":129,"Name":"pushint","Returns":"U","Cost":1,"Size":0,"Doc":"immediate UINT","DocExtra":"pushint args are not added to the intcblock during assembly processes","ImmediateNote":"{varuint int}","Groups":["Loading Values"]},{"Opcode":136,"Name":"callsub","Cost":1,"Size":3,"Doc":"branch unconditionally to TARGET, saving the next instruction on the call stack","DocExtra":"The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":137,"Name":"retsub","Cost":1,"Size":1,"Doc":"pop the top instruction from the call stack and branch to it","DocExtra":"The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.","Groups":["Flow Control"]},{"Opcode":144,"Name":"shl","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A times 2^B, modulo 2^64","Groups":["Arithmetic"]},{"Opcode":145,"Name":"shr","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A divided by 2^B","Groups":["Arithmetic"]},{"Opcode":146,"Name":"sqrt","Args":"U","Returns":"U","Cost":4,"Size":1,"Doc":"The largest integer I such that I^2 <= A","Groups":["Arithmetic"]},{"Opcode":147,"Name":"bitlen","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"The highest set bit in A. If A is a byte-array, it is interpreted as a big-endian unsigned integer. bitlen of 0 is 0, bitlen of 8 is 4","DocExtra":"bitlen interprets arrays as big-endian integers, unlike setbit/getbit","Groups":["Arithmetic"]},{"Opcode":148,"Name":"exp","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A raised to the Bth power. Fail if A == B == 0 and on overflow","Groups":["Arithmetic"]},{"Opcode":149,"Name":"expw","Args":"UU","Returns":"UU","Cost":10,"Size":1,"Doc":"A raised to the Bth power as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low. Fail if A == B == 0 or if the results exceeds 2^128-1","Groups":["Arithmetic"]},{"Opcode":150,"Name":"bsqrt","Args":"B","Returns":"B","Cost":40,"Size":1,"Doc":"The largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":151,"Name":"divw","Args":"UUU","Returns":"U","Cost":1,"Size":1,"Doc":"A,B / C. Fail if C == 0 or if result overflows.","DocExtra":"The notation A,B indicates that A and B are interpreted as a uint128 value, with A as the high uint64 and B the low.","Groups":["Arithmetic"]},{"Opcode":160,"Name":"b+","Args":"BB","Returns":"B","Cost":10,"Size":1,"Doc":"A plus B. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":161,"Name":"b-","Args":"BB","Returns":"B","Cost":10,"Size":1,"Doc":"A minus B. A and B are interpreted as big-endian unsigned integers. Fail on underflow.","Groups":["Byte Array Arithmetic"]},{"Opcode":162,"Name":"b/","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A divided by B (truncated division). A and B are interpreted as big-endian unsigned integers. Fail if B is zero.","Groups":["Byte Array Arithmetic"]},{"Opcode":163,"Name":"b*","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A times B. A and B are interpreted as big-endian unsigned integers.","Groups":["Byte Array Arithmetic"]},{"Opcode":164,"Name":"b<","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is less than B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":165,"Name":"b>","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is greater than B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":166,"Name":"b<=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is less than or equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":167,"Name":"b>=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is greater than or equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":168,"Name":"b==","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":169,"Name":"b!=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"0 if A is equal to B, else 1. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":170,"Name":"b%","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A modulo B. A and B are interpreted as big-endian unsigned integers. Fail if B is zero.","Groups":["Byte Array Arithmetic"]},{"Opcode":171,"Name":"b|","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-or B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":172,"Name":"b&","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-and B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":173,"Name":"b^","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-xor B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":174,"Name":"b~","Args":"B","Returns":"B","Cost":4,"Size":1,"Doc":"A with all bits inverted","Groups":["Byte Array Logic"]},{"Opcode":175,"Name":"bzero","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"zero filled byte-array of length A","Groups":["Loading Values"]},{"Opcode":176,"Name":"log","Args":"B","Cost":1,"Size":1,"Doc":"write A to log state of the current application","DocExtra":"`log` fails if called more than MaxLogCalls times in a program, or if the sum of logged bytes exceeds 1024 bytes.","Groups":["State Access"]},{"Opcode":177,"Name":"itxn_begin","Cost":1,"Size":1,"Doc":"begin preparation of a new inner transaction in a new transaction group","DocExtra":"`itxn_begin` initializes Sender to the application address; Fee to the minimum allowable, taking into account MinTxnFee and credit from overpaying in earlier transactions; FirstValid/LastValid to the values in the invoking transaction, and all other fields to zero or empty values.","Groups":["Inner Transactions"]},{"Opcode":178,"Name":"itxn_field","Args":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"set field F of the current inner transaction to A","DocExtra":"`itxn_field` fails if A is of the wrong type for F, including a byte array of the wrong size for use as an address when F is an address field. `itxn_field` also fails if A is an account, asset, or app that is not _available_, or an attempt is made extend an array field beyond the limit imposed by consensus parameters. (Addresses set into asset params of acfg transactions need not be _available_.)","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":179,"Name":"itxn_submit","Cost":1,"Size":1,"Doc":"execute the current inner transaction group. Fail if executing this group would exceed the inner transaction limit, or if any transaction in the group fails.","DocExtra":"`itxn_submit` resets the current transaction so that it can not be resubmitted. A new `itxn_begin` is required to prepare another inner transaction.","Groups":["Inner Transactions"]},{"Opcode":180,"Name":"itxn","Returns":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":181,"Name":"itxna","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index} {uint8 transaction field array index}","Groups":["Inner Transactions"]},{"Opcode":182,"Name":"itxn_next","Cost":1,"Size":1,"Doc":"begin preparation of a new inner transaction in the same transaction group","DocExtra":"`itxn_next` initializes the transaction exactly as `itxn_begin` does","Groups":["Inner Transactions"]},{"Opcode":183,"Name":"gitxn","Returns":".","Cost":1,"Size":3,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":184,"Name":"gitxna","Returns":".","Cost":1,"Size":4,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index} {uint8 transaction field array index}","Groups":["Inner Transactions"]},{"Opcode":192,"Name":"txnas","Args":"U","Returns":".","Cost":1,"Size":2,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ath value of the array field F of the current transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":193,"Name":"gtxnas","Args":"U","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ath value of the array field F from the Tth transaction in the current group","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":194,"Name":"gtxnsas","Args":"UU","Returns":".","Cost":1,"Size":2,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Bth value of the array field F from the Ath transaction in the current group","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":195,"Name":"args","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"Ath LogicSig argument","Groups":["Loading Values"]},{"Opcode":196,"Name":"gloadss","Args":"UU","Returns":".","Cost":1,"Size":1,"Doc":"Bth scratch space value of the Ath transaction in the current group","Groups":["Loading Values"]},{"Opcode":197,"Name":"itxnas","Args":"U","Returns":".","Cost":1,"Size":2,"Doc":"Ath value of the array field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":198,"Name":"gitxnas","Args":"U","Returns":".","Cost":1,"Size":3,"Doc":"Ath value of the array field F from the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Inner Transactions"]}]}'),s=2e4,c=1e3;function u(e){for(var t=0,n=0,a=0;a9||9===a&&o>1?[0,-(a+1)]:[t|o<i.z_)throw new Error("unsupported version");var g,y=0,v=e.length,w=(0,o.Z)(t);try{for(w.s();!(g=w.n()).done;){v+=g.value.length}}catch(H){w.e(H)}finally{w.f()}if(v>c)throw new Error("program too long");if(!a){a={};var k,A=(0,o.Z)(i.AP);try{for(A.s();!(k=A.n()).done;){var x=k.value;a[x.Opcode]=x}}catch(H){A.e(H)}finally{A.f()}}for(var I=h,T=[],S=[];Is)throw new Error("program too costly for version < 4. consider using v4.");return[T,S,!0]}function m(e,t){var n=b(e,t);return(0,r.Z)(n,3)[2]}function h(e,t){var n=d(e,t);return(0,r.Z)(n,1)[0]}function g(e,t){var n=l(e,t);return(0,r.Z)(n,1)[0]}function y(e,t){var n=f(e,t);return(0,r.Z)(n,1)[0]}function v(e,t){var n=p(e,t);return(0,r.Z)(n,1)[0]}var w=i.z_,k=i.BV},34440:function(e,t,n){"use strict";n.d(t,{Y:function(){return u}});var a=n(29439),o=n(37762),r=n(15671),i=n(43144),s={},c={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach((function(e,t){s[e]=t,c[t]=e}));var u=function(){function e(t){var n=t.version,i=t.sources,c=t.names,u=t.mappings;if((0,r.Z)(this,e),this.version=n,this.sources=i,this.names=c,this.mappings=u,3!==this.version)throw new Error("Only version 3 is supported, got ".concat(this.version));if(void 0===this.mappings)throw new Error("mapping undefined, cannot build source map without `mapping`");var d=this.mappings.split(";").map((function(e){var t=function(e){for(var t=[],n=0,a=0,o=0;o>>=1,c?t.push(0===a?-2147483648:-a):t.push(a),a=n=0}}return t}(e);if(t.length>2)return t[2]}));this.pcToLine={},this.lineToPc={};var l,f=0,p=(0,o.Z)(d.entries());try{for(p.s();!(l=p.n()).done;){var b=(0,a.Z)(l.value,2),m=b[0],h=b[1];void 0!==h&&(f+=h),f in this.lineToPc||(this.lineToPc[f]=[]),this.lineToPc[f].push(m),this.pcToLine[m]=f}}catch(g){p.e(g)}finally{p.f()}}return(0,i.Z)(e,[{key:"getLineForPc",value:function(e){return this.pcToLine[e]}},{key:"getPcsForLine",value:function(e){return this.lineToPc[e]}}]),e}()},6349:function(e,t,n){var a=n(54659).Buffer,o=n(56690).default,r=n(89728).default,i=n(40806),s=n(30511),c=n(27240),u=n(26305),d=n(79709),l=n(93524),f=n(15830),p=n(78642),b=function(){"use strict";function e(t,n,r,s,c,u){if(o(this,e),!Number.isSafeInteger(n)||n<0)throw Error("amount must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(r)||r<0)throw Error("firstValid must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(s)||s<0)throw Error("lastValid must be a positive number and smaller than 2^53-1");if("undefined"===typeof c&&(c=i.ALGORAND_ZERO_ADDRESS_STRING),"undefined"===typeof u){var p=l.randomBytes(32);u=a.from(p).toString("base64")}var b=a.from("ASAFAgEHBgUmAyD+vKC7FEpaTqe0OKRoGsgObKEFvLYH/FZTJclWlfaiEyDmmpYeby1feshmB5JlUr6YI17TM2PKiJGLuck4qRW2+SB/g7Flf/H8U7ktwYFIodZd/C1LH6PWdyhK3dIAEm2QaTIEIhIzABAjEhAzAAcxABIQMwAIMQESEDEWIxIQMRAjEhAxBygSEDEJKRIQMQgkEhAxAiUSEDEEIQQSEDEGKhIQ","base64"),m=[n,r,s,t,c,u],h=[f.valTypes.INT,f.valTypes.INT,f.valTypes.INT,f.valTypes.ADDRESS,f.valTypes.ADDRESS,f.valTypes.BASE64],g=f.inject(b,[5,6,7,11,44,76],m,h);this.programBytes=g;var y=new d.LogicSig(g,void 0);this.address=y.address()}return r(e,[{key:"getProgram",value:function(){return this.programBytes}},{key:"getAddress",value:function(){return this.address}}]),e}();e.exports={DynamicFee:b,getDynamicFeeTransactions:function(e,t,n,a){if(!t.verify(i.decodeAddress(e.from).publicKey))throw new Error("invalid signature");e.fee=a,e.feey)throw new Error("final fee of payment transaction".concat(v.fee.toString(),"greater than transaction max fee").concat(y.toString()));return u.signLogicSigTransaction(t,g)}}},37011:function(e,t,n){var a=n(6349),o=n(57090),r=n(11105),i=n(69014),s=n(75698);e.exports={DynamicFee:a.DynamicFee,getDynamicFeeTransactions:a.getDynamicFeeTransactions,signDynamicFee:a.signDynamicFee,HTLC:o.HTLC,signTransactionWithHTLCUnlock:o.signTransactionWithHTLCUnlock,LimitOrder:r.LimitOrder,getSwapAssetsTransaction:r.getSwapAssetsTransaction,Split:i.Split,getSplitFundsTransaction:i.getSplitFundsTransaction,PeriodicPayment:s.PeriodicPayment,getPeriodicPaymentWithdrawalTransaction:s.getPeriodicPaymentWithdrawalTransaction}},11105:function(e,t,n){var a=n(54659).Buffer,o=n(56690).default,r=n(89728).default,i=n(40806),s=n(5213),c=n(27240),u=n(26305),d=n(79709),l=n(93524),f=n(15830),p=n(54684),b=function(){"use strict";function e(t,n,r,i,s,c,u){if(o(this,e),!Number.isSafeInteger(n)||n<0)throw Error("assetid must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(r)||r<0)throw Error("ratn must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(i)||i<0)throw Error("ratd must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(s)||s<0)throw Error("expiryRound must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(c)||c<0)throw Error("minTrade must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(u)||u<0)throw Error("maxFee must be a positive number and smaller than 2^53-1");var l=a.from("ASAKAAEFAgYEBwgJCiYBIP68oLsUSlpOp7Q4pGgayA5soQW8tgf8VlMlyVaV9qITMRYiEjEQIxIQMQEkDhAyBCMSQABVMgQlEjEIIQQNEDEJMgMSEDMBECEFEhAzAREhBhIQMwEUKBIQMwETMgMSEDMBEiEHHTUCNQExCCEIHTUENQM0ATQDDUAAJDQBNAMSNAI0BA8QQAAWADEJKBIxAiEJDRAxBzIDEhAxCCISEBA=","base64"),p=[u,c,n,i,r,s,t],b=[f.valTypes.INT,f.valTypes.INT,f.valTypes.INT,f.valTypes.INT,f.valTypes.INT,f.valTypes.INT,f.valTypes.ADDRESS],m=f.inject(l,[5,7,9,10,11,12,16],p,b);this.programBytes=m;var h=new d.LogicSig(m,void 0);this.address=h.address(),this.owner=t,this.assetid=n}return r(e,[{key:"getProgram",value:function(){return this.programBytes}},{key:"getAddress",value:function(){return this.address}}]),e}();e.exports={LimitOrder:b,getSwapAssetsTransaction:function(e,t,n,a,o,r,f,b){var m,h=l.keyPairFromSecretKey(a),g=i.encodeAddress(h.publicKey),y=u.readProgram(e,void 0),v=y[0],w=y[1],k=v[6],A=i.encodeAddress(w[0]),x=d.makeLogicSig(e,void 0),I=x.address(),T=[s.makePaymentTxn(I,g,o,n,m,r,f,void 0,b,void 0),s.makeAssetTransferTxn(g,A,m,undefined,o,t,r,f,void 0,b,void 0,k)],S=c.assignGroupID(T),C=v[7],E=v[8];if(t*C= ").concat(n.toString(),"*").concat(E.toString()));var R=v[4];if(nM)throw new Error("final fee of payment transaction ".concat(S[0].fee.toString()," greater than transaction max fee ").concat(M.toString()));if(S[1].fee>M)throw new Error("final fee of asset transaction ".concat(S[1].fee.toString()," greater than transaction max fee ").concat(M.toString()));var P=d.signLogicSigTransactionObject(S[0],x),U=S[1].signTxn(a);return p.concatArrays(P.blob,U)}}},75698:function(e,t,n){var a=n(54659).Buffer,o=n(56690).default,r=n(89728).default,i=n(40806),s=n(5213),c=n(26305),u=n(79709),d=n(93524),l=n(15830),f=function(){"use strict";function e(t,n,r,i,s,c,l){if(o(this,e),this.receiver=t,!Number.isSafeInteger(n)||n<0)throw Error("amount must be a positive number and smaller than 2^53-1");if(this.amount=n,!Number.isSafeInteger(r)||r<0)throw Error("withdrawalWindow must be a positive number and smaller than 2^53-1");if(this.withdrawalWindow=r,!Number.isSafeInteger(i)||i<0)throw Error("period must be a positive number and smaller than 2^53-1");if(this.period=i,!Number.isSafeInteger(s)||s<0)throw Error("expiryRound must be a positive number and smaller than 2^53-1");if(this.expiryRound=s,!Number.isSafeInteger(c)||c<0)throw Error("maxFee must be a positive number and smaller than 2^53-1");if(this.maxFee=c,void 0===l){var f=d.randomBytes(32);this.lease=a.from(f).toString("base64")}else this.lease=l;this.programBytes=this.getProgram();var p=new u.LogicSig(this.programBytes,void 0);this.address=p.address()}return r(e,[{key:"getProgram",value:function(){var e=a.from("ASAHAQYFAAQDByYCIAECAwQFBgcIAQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIIJKvkYTkEzwJf2arzJOxERsSogG9nQzKPkpIoc4TzPTFMRAiEjEBIw4QMQIkGCUSEDEEIQQxAggSEDEGKBIQMQkyAxIxBykSEDEIIQUSEDEJKRIxBzIDEhAxAiEGDRAxCCUSEBEQ","base64"),t=[this.maxFee,this.period,this.withdrawalWindow,this.amount,this.expiryRound,this.lease,this.receiver],n=[l.valTypes.INT,l.valTypes.INT,l.valTypes.INT,l.valTypes.INT,l.valTypes.INT,l.valTypes.BASE64,l.valTypes.ADDRESS];return l.inject(e,[4,5,7,8,9,12,46],t,n)}},{key:"getAddress",value:function(){return this.address}}]),e}();e.exports={PeriodicPayment:f,getPeriodicPaymentWithdrawalTransaction:function(e,t,n,a){var o=c.readProgram(e,void 0),r=o[0],d=o[1],l=r[2],f=r[4],p=r[5];if(n%l!==0)throw new Error("firstValid round ".concat(n.toString()," was not a multiple of contract period ").concat(l.toString()));var b,m,h=d[1],g=i.encodeAddress(h),y=d[0],v=new Uint8Array(y),w=n+f,k=g,A=u.makeLogicSig(e,void 0),x=A.address(),I={from:x,to:k,fee:t,amount:p,closeRemainderTo:b,firstRound:n,lastRound:w,note:m,genesisHash:a,genesisID:"",type:"pay",lease:v},T=s.makePaymentTxn(x,k,t,p,b,n,w,m,a,"");if(T.fee>r[1])throw new Error("final fee of payment transaction".concat(T.fee.toString(),"greater than transaction max fee").concat(r[1].toString()));return u.signLogicSigTransaction(I,A)}}},69014:function(e,t,n){var a=n(54659).Buffer,o=n(56690).default,r=n(89728).default,i=n(40806),s=n(5213),c=n(27240),u=n(79709),d=n(26305),l=n(15830),f=n(54684),p=function(){"use strict";function e(t,n,r,i,s,c,d,f){if(o(this,e),!Number.isSafeInteger(s)||s<0)throw Error("rat2 must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(i)||i<0)throw Error("rat1 must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(c)||c<0)throw Error("expiryRound must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(d)||d<0)throw Error("minPay must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(f)||f<0)throw Error("maxFee must be a positive number and smaller than 2^53-1");var p=a.from("ASAIAQUCAAYHCAkmAyCztwQn0+DycN+vsk+vJWcsoz/b7NDS6i33HOkvTpf+YiC3qUpIgHGWE8/1LPh9SGCalSN7IaITeeWSXbfsS5wsXyC4kBQ38Z8zcwWVAym4S8vpFB/c0XC6R4mnPi9EBADsPDEQIhIxASMMEDIEJBJAABkxCSgSMQcyAxIQMQglEhAxAiEEDRAiQAAuMwAAMwEAEjEJMgMSEDMABykSEDMBByoSEDMACCEFCzMBCCEGCxIQMwAIIQcPEBA=","base64"),b=[f,c,s,i,d,t,n,r],m=[l.valTypes.INT,l.valTypes.INT,l.valTypes.INT,l.valTypes.INT,l.valTypes.INT,l.valTypes.ADDRESS,l.valTypes.ADDRESS,l.valTypes.ADDRESS],h=l.inject(p,[4,7,8,9,10,14,47,80],b,m);this.programBytes=h;var g=u.makeLogicSig(h,void 0);this.address=g.address()}return r(e,[{key:"getProgram",value:function(){return this.programBytes}},{key:"getAddress",value:function(){return this.address}}]),e}();e.exports={Split:p,getSplitFundsTransaction:function(e,t,n,a,o,r){var l,p=d.readProgram(e,void 0),b=p[0],m=p[1],h=b[6],g=b[5],y=function e(t,n){if("number"!==typeof t||"number"!==typeof n)throw new Error("gcd operates only on positive integers");return n?e(n,t%n):t}(h,g);h=Math.floor(h/y);var v=(g=Math.floor(g/y))/h,w=t-(l=Math.round(t/(1+v)));if(g*l!==h*w)throw Error("could not split funds in a way that satisfied the contract ratio");var k=u.makeLogicSig(e,void 0).address(),A=i.encodeAddress(m[1]),x=i.encodeAddress(m[2]),I=[s.makePaymentTxn(k,A,o,l,void 0,n,a,void 0,r),s.makePaymentTxn(k,x,o,w,void 0,n,a,void 0,r)],T=c.assignGroupID(I).map((function(e){return u.signLogicSigTransactionObject(e,u).blob}));return f.concatArrays(T[0],T[1])}}},15830:function(e,t,n){var a=n(54659).Buffer,o=n(40806);function r(e,t){for(var n=0;t>128;)e.push(255&t|128),t>>=7,n+=1;return e.push(255&t),n+1}var i={INT:1,ADDRESS:2,BASE64:3};e.exports={inject:function(e,t,n,s){if(t.length!==n.length||t.length!==s.length)throw new Error("Lengths do not match");var c=e;function u(e,t,n,o){var r=e.slice(0,n),i=e.slice(n+o,e.length),s=[r,a.from(t),i];return a.concat(s)}for(var d=0;d9&&void 0!==arguments[9]&&arguments[9],f=arguments.length>10&&void 0!==arguments[10]?arguments[10]:void 0,p={from:e,note:t,voteKey:n,selectionKey:o,voteFirst:i,voteLast:s,voteKeyDilution:c,suggestedParams:u,type:r.i.keyreg,reKeyTo:d,nonParticipation:l,stateProofKey:f};return new a.Transaction(p)}function d(e,t,n,a,o,r,i,s,c,d,l,f,p){return u(e,o,s,c,d,l,f,{genesisHash:r,genesisID:i,firstRound:n,lastRound:a,fee:t},p,arguments.length>13&&void 0!==arguments[13]&&arguments[13],arguments.length>14&&void 0!==arguments[14]?arguments[14]:void 0)}function l(e){return u(e.from,e.note,e.voteKey,e.selectionKey,e.voteFirst,e.voteLast,e.voteKeyDilution,e.suggestedParams,e.rekeyTo,e.nonParticipation,e.stateProofKey)}function f(e,t,n,o,i,s,c,u,d,l,f,p,b,m,h){var g={from:e,note:t,suggestedParams:m,assetTotal:n,assetDecimals:o,assetDefaultFrozen:i,assetUnitName:l,assetName:f,assetURL:p,assetMetadataHash:b,assetManager:s,assetReserve:c,assetFreeze:u,assetClawback:d,type:r.i.acfg,reKeyTo:h};return new a.Transaction(g)}function p(e,t,n,a,o,r,i,s,c,u,d,l,p,b,m,h,g,y,v){return f(e,o,s,c,u,d,l,p,b,m,h,g,y,{genesisHash:r,genesisID:i,firstRound:n,lastRound:a,fee:t},v)}function b(e){return f(e.from,e.note,e.total,e.decimals,e.defaultFrozen,e.manager,e.reserve,e.freeze,e.clawback,e.unitName,e.assetName,e.assetURL,e.assetMetadataHash,e.suggestedParams,e.rekeyTo)}function m(e,t,n,o,i,s,c,u){var d=arguments.length>9?arguments[9]:void 0;if((!(arguments.length>8&&void 0!==arguments[8])||arguments[8])&&(void 0===o||void 0===i||void 0===s||void 0===c))throw Error("strict empty address checking was turned on, but at least one empty address was provided");var l={from:e,suggestedParams:u,assetIndex:n,assetManager:o,assetReserve:i,assetFreeze:s,assetClawback:c,type:r.i.acfg,note:t,reKeyTo:d};return new a.Transaction(l)}function h(e,t,n,a,o,r,i,s,c,u,d,l){return m(e,o,s,c,u,d,l,{genesisHash:r,genesisID:i,firstRound:n,lastRound:a,fee:t},!(arguments.length>12&&void 0!==arguments[12])||arguments[12],arguments.length>13?arguments[13]:void 0)}function g(e){return m(e.from,e.note,e.assetIndex,e.manager,e.reserve,e.freeze,e.clawback,e.suggestedParams,e.strictEmptyAddressChecking,e.rekeyTo)}function y(e,t,n,o,i){var s={from:e,suggestedParams:o,assetIndex:n,type:r.i.acfg,note:t,reKeyTo:i};return new a.Transaction(s)}function v(e,t,n,a,o,r,i,s,c){return y(e,o,s,{genesisHash:r,genesisID:i,firstRound:n,lastRound:a,fee:t},c)}function w(e){return y(e.from,e.note,e.assetIndex,e.suggestedParams,e.rekeyTo)}function k(e,t,n,o,i,s,c){var u={from:e,type:r.i.afrz,freezeAccount:o,assetIndex:n,freezeState:i,note:t,suggestedParams:s,reKeyTo:c};return new a.Transaction(u)}function A(e,t,n,a,o,r,i,s,c,u,d){return k(e,o,s,c,u,{genesisHash:r,genesisID:i,firstRound:n,lastRound:a,fee:t},d)}function x(e){return k(e.from,e.note,e.assetIndex,e.freezeTarget,e.freezeState,e.suggestedParams,e.rekeyTo)}function I(e,t,n,o,i,s,c,u,d){var l={type:r.i.axfer,from:e,to:t,amount:i,suggestedParams:u,assetIndex:c,note:s,assetRevocationTarget:o,closeRemainderTo:n,reKeyTo:d};return new a.Transaction(l)}function T(e,t,n,a,o,r,i,s,c,u,d,l,f){return I(e,t,n,a,r,c,l,{genesisHash:u,genesisID:d,firstRound:i,lastRound:s,fee:o},f)}function S(e){return I(e.from,e.to,e.closeRemainderTo,e.revocationTarget,e.amount,e.note,e.assetIndex,e.suggestedParams,e.rekeyTo)}function C(e,t,n,o,i,s,c,u,d,l,f,p,b,m,h,g,y,v){var w={type:r.i.appl,from:e,suggestedParams:t,appIndex:0,appOnComplete:n,appLocalInts:s,appLocalByteSlices:c,appGlobalInts:u,appGlobalByteSlices:d,appApprovalProgram:o,appClearProgram:i,appArgs:l,appAccounts:f,appForeignApps:p,appForeignAssets:b,boxes:v,note:m,lease:h,reKeyTo:g,extraPages:y};return new a.Transaction(w)}function E(e){return C(e.from,e.suggestedParams,e.onComplete,e.approvalProgram,e.clearProgram,e.numLocalInts,e.numLocalByteSlices,e.numGlobalInts,e.numGlobalByteSlices,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.extraPages,e.boxes)}function R(e,t,n,i,s,c,u,d,l,f,p,b,m){var h={type:r.i.appl,from:e,suggestedParams:t,appIndex:n,appApprovalProgram:i,appOnComplete:o.hq.UpdateApplicationOC,appClearProgram:s,appArgs:c,appAccounts:u,appForeignApps:d,appForeignAssets:l,boxes:m,note:f,lease:p,reKeyTo:b};return new a.Transaction(h)}function M(e){return R(e.from,e.suggestedParams,e.appIndex,e.approvalProgram,e.clearProgram,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function P(e,t,n,i,s,c,u,d,l,f,p){var b={type:r.i.appl,from:e,suggestedParams:t,appIndex:n,appOnComplete:o.hq.DeleteApplicationOC,appArgs:i,appAccounts:s,appForeignApps:c,appForeignAssets:u,boxes:p,note:d,lease:l,reKeyTo:f};return new a.Transaction(b)}function U(e){return P(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function _(e,t,n,i,s,c,u,d,l,f,p){var b={type:r.i.appl,from:e,suggestedParams:t,appIndex:n,appOnComplete:o.hq.OptInOC,appArgs:i,appAccounts:s,appForeignApps:c,appForeignAssets:u,boxes:p,note:d,lease:l,reKeyTo:f};return new a.Transaction(b)}function B(e){return _(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function D(e,t,n,i,s,c,u,d,l,f,p){var b={type:r.i.appl,from:e,suggestedParams:t,appIndex:n,appOnComplete:o.hq.CloseOutOC,appArgs:i,appAccounts:s,appForeignApps:c,appForeignAssets:u,boxes:p,note:d,lease:l,reKeyTo:f};return new a.Transaction(b)}function N(e){return D(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function O(e,t,n,i,s,c,u,d,l,f,p){var b={type:r.i.appl,from:e,suggestedParams:t,appIndex:n,appOnComplete:o.hq.ClearStateOC,appArgs:i,appAccounts:s,appForeignApps:c,appForeignAssets:u,boxes:p,note:d,lease:l,reKeyTo:f};return new a.Transaction(b)}function F(e){return O(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function L(e,t,n,i,s,c,u,d,l,f,p){var b={type:r.i.appl,from:e,suggestedParams:t,appIndex:n,appOnComplete:o.hq.NoOpOC,appArgs:i,appAccounts:s,appForeignApps:c,appForeignAssets:u,boxes:p,note:d,lease:l,reKeyTo:f};return new a.Transaction(b)}function j(e){return L(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function H(e){var t={type:r.i.appl,from:e.from,suggestedParams:e.suggestedParams,appIndex:e.appIndex,appOnComplete:e.onComplete,appLocalInts:e.numLocalInts,appLocalByteSlices:e.numLocalByteSlices,appGlobalInts:e.numGlobalInts,appGlobalByteSlices:e.numGlobalByteSlices,appApprovalProgram:e.approvalProgram,appClearProgram:e.clearProgram,appArgs:e.appArgs,appAccounts:e.accounts,appForeignApps:e.foreignApps,appForeignAssets:e.foreignAssets,boxes:e.boxes,note:e.note,lease:e.lease,reKeyTo:e.rekeyTo,extraPages:e.extraPages};return new a.Transaction(t)}},3381:function(e,t,n){"use strict";n.d(t,{vC:function(){return g},w3:function(){return f},OF:function(){return h},Ch:function(){return b},QX:function(){return m},mE:function(){return p}});var a=n(37762),o=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"],r=n(93524),i=n(40806),s="failed to decode mnemonic",c="the mnemonic contains a word that is not in the wordlist";function u(e){var t=[],n=0,a=0;return e.forEach((function(e){n|=e<=11&&(t.push(2047&n),n>>=11,a-=11)})),a&&t.push(n),t}function d(e){return e.map((function(e){return o[e]}))}function l(e){return d(u(r.genericHash(e)))[0]}function f(e){if(e.length!==r.SEED_BTYES_LENGTH)throw new RangeError("Seed length must be ".concat(r.SEED_BTYES_LENGTH));var t=d(u(e)),n=l(e);return"".concat(t.join(" ")," ").concat(n)}function p(e){var t,n=e.split(" "),r=n.slice(0,24),i=(0,a.Z)(r);try{for(i.s();!(t=i.n()).done;){var u=t.value;if(-1===o.indexOf(u))throw new Error(c)}}catch(p){i.e(p)}finally{i.f()}var d=n[n.length-1],f=function(e){var t=[],n=0,a=0;return e.forEach((function(e){for(n|=e<=8;)t.push(255&n),n>>=8,a-=8})),a&&t.push(n),new Uint8Array(t)}(r.map((function(e){return o.indexOf(e)})));if(33!==f.length)throw new Error(s);if(0!==f[f.length-1])throw new Error(s);if(l(f=f.slice(0,f.length-1))===d)return f;throw new Error(s)}function b(e){var t=p(e),n=r.keyPairFromSeed(t);return{addr:i.encodeAddress(n.publicKey),sk:n.secretKey}}function m(e){return f(e.slice(0,r.SEED_BTYES_LENGTH))}function h(e){return p(e)}function g(e){return f(e)}},80571:function(e,t,n){"use strict";n.d(t,{F2:function(){return E},J6:function(){return C},PO:function(){return M},PU:function(){return R},f7:function(){return P},gJ:function(){return I},vH:function(){return U}});var a=n(37762),o=n(1413),r=n(15671),i=n(43144),s=n(88301),c=n(61120),u=n(60136),d=n(29388),l=n(93524),f=n(40806),p=n(30511),b=n(78642),m=n(54684),h=n(54659).Buffer,g="Not enough multisig transactions to merge. Need at least two",y="Cannot merge txs. txIDs differ",v="Cannot merge txs. Auth addrs differ",w="Cannot merge txs. Multisig preimages differ",k="Cannot merge txs. subsigs are mismatched.",A="Key does not exist",x="Cannot mutate a multisig field as it would invalidate all existing signatures.";function I(e,t){var n=t.version,a=t.threshold,o=t.addrs.map((function(e){return f.decodeAddress(e).publicKey})),r={v:n,thr:a,subsig:o.map((function(e){return{pk:h.from(e)}}))},i=e.get_obj_for_encoding(),s={msig:r,txn:i},c=f.fromMultisigPreImg({version:n,threshold:a,pks:o});return f.encodeAddress(i.snd)!==f.encodeAddress(c)&&(s.sgnr=h.from(c)),new Uint8Array(p.encode(s))}function T(e,t,n){var a=t.rawSig,o=t.myPk,r=n.version,i=n.threshold,s=n.pks,c=I(e,{version:r,threshold:i,addrs:s.map((function(e){return f.encodeAddress(e)}))}),u=p.decode(c),d=!1;if(u.msig.subsig.forEach((function(e,t){l.bytesEqual(e.pk,o)&&(d=!0,u.msig.subsig[t].s=a)})),!1===d)throw new Error(A);var b=f.fromMultisigPreImg({version:r,threshold:i,pks:s});return f.encodeAddress(u.txn.snd)!==f.encodeAddress(b)&&(u.sgnr=h.from(b)),new Uint8Array(p.encode(u))}var S=function(e){(0,u.Z)(n,e);var t=(0,d.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,i.Z)(n,[{key:"addLease",value:function(){throw new Error(x)}},{key:"addRekey",value:function(){throw new Error(x)}},{key:"signTxn",value:function(e){throw new Error("Cannot sign a multisig transaction using `signTxn`. Use `partialSignTxn` instead.")}},{key:"partialSignTxn",value:function(e,t){var n=e.version,a=e.threshold,o=e.pks,r=l.keyPairFromSecretKey(t).publicKey;return T(this,{rawSig:this.rawSignTxn(t),myPk:r},{version:n,threshold:a,pks:o})}},{key:"partialSignWithMultisigSignature",value:function(e,t,n){if(!l.isValidSignatureLength(n.length))throw new Error("Cannot add multisig signature. Signature is not of the correct length.");return T(this,{rawSig:n,myPk:f.decodeAddress(t).publicKey},e)}}],[{key:"from_obj_for_encoding",value:function(e){return(0,s.Z)((0,c.Z)(n),"from_obj_for_encoding",this).call(this,e)}}]),n}(b.Transaction);function C(e){if(e.length<2)throw new Error(g);for(var t=p.decode(e[0]),n=S.from_obj_for_encoding(t.txn).txID(),a=t.sgnr?f.encodeAddress(t.sgnr):void 0,r={version:t.msig.v,threshold:t.msig.thr,pks:t.msig.subsig.map((function(e){return e.pk}))},i=f.encodeAddress(f.fromMultisigPreImg(r)),s=t.msig.subsig.map((function(e){return(0,o.Z)({},e)})),c=1;c3))throw Error("extraPages must be an Integer between and including 0 to 3");if(void 0!==i.assetTotal&&(!(Number.isSafeInteger(i.assetTotal)||"bigint"===typeof i.assetTotal&&i.assetTotal<=BigInt("0xffffffffffffffff"))||i.assetTotal<0))throw Error("Total asset issuance must be a positive number and smaller than 2^64-1. If the number is larger than 2^53-1, use bigint.");if(void 0!==i.assetDecimals&&(!Number.isSafeInteger(i.assetDecimals)||i.assetDecimals<0||i.assetDecimals>19))throw Error("assetDecimals must be a positive number and smaller than ".concat(19..toString()));if(void 0!==i.assetIndex&&(!Number.isSafeInteger(i.assetIndex)||i.assetIndex<0))throw Error("Asset index must be a positive number and smaller than 2^53-1");if(void 0!==i.appIndex&&(!Number.isSafeInteger(i.appIndex)||i.appIndex<0))throw Error("Application index must be a positive number and smaller than 2^53-1");if(void 0!==i.appLocalInts&&(!Number.isSafeInteger(i.appLocalInts)||i.appLocalInts<0))throw Error("Application local ints count must be a positive number and smaller than 2^53-1");if(void 0!==i.appLocalByteSlices&&(!Number.isSafeInteger(i.appLocalByteSlices)||i.appLocalByteSlices<0))throw Error("Application local byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==i.appGlobalInts&&(!Number.isSafeInteger(i.appGlobalInts)||i.appGlobalInts<0))throw Error("Application global ints count must be a positive number and smaller than 2^53-1");if(void 0!==i.appGlobalByteSlices&&(!Number.isSafeInteger(i.appGlobalByteSlices)||i.appGlobalByteSlices<0))throw Error("Application global byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==i.appApprovalProgram&&i.appApprovalProgram.constructor!==Uint8Array)throw Error("appApprovalProgram must be a Uint8Array.");if(void 0!==i.appClearProgram&&i.appClearProgram.constructor!==Uint8Array)throw Error("appClearProgram must be a Uint8Array.");if(void 0!==i.appArgs){if(!Array.isArray(i.appArgs))throw Error("appArgs must be an Array of Uint8Array.");i.appArgs=i.appArgs.slice(),i.appArgs.forEach((function(e){if(e.constructor!==Uint8Array)throw Error("each element of AppArgs must be a Uint8Array.")}))}else i.appArgs=[];if(void 0!==i.appAccounts){if(!Array.isArray(i.appAccounts))throw Error("appAccounts must be an Array of addresses.");i.appAccounts=i.appAccounts.map((function(e){return u.decodeAddress(e)}))}if(void 0!==i.appForeignApps){if(!Array.isArray(i.appForeignApps))throw Error("appForeignApps must be an Array of integers.");i.appForeignApps=i.appForeignApps.slice(),i.appForeignApps.forEach((function(e){if(!Number.isSafeInteger(e)||e<0)throw Error("each foreign application index must be a positive number and smaller than 2^53-1")}))}if(void 0!==i.appForeignAssets){if(!Array.isArray(i.appForeignAssets))throw Error("appForeignAssets must be an Array of integers.");i.appForeignAssets=i.appForeignAssets.slice(),i.appForeignAssets.forEach((function(e){if(!Number.isSafeInteger(e)||e<0)throw Error("each foreign asset index must be a positive number and smaller than 2^53-1")}))}if(void 0!==i.boxes){if(!Array.isArray(i.boxes))throw Error("boxes must be an Array of BoxReference.");i.boxes=i.boxes.slice(),i.boxes.forEach((function(e){if(!Number.isSafeInteger(e.appIndex)||e.name.constructor!==Uint8Array)throw Error("box app index must be a number and name must be an Uint8Array.")}))}if(void 0!==i.assetMetadataHash&&0!==i.assetMetadataHash.length){if("string"===typeof i.assetMetadataHash&&(i.assetMetadataHash=new Uint8Array(m.from(i.assetMetadataHash))),i.assetMetadataHash.constructor!==Uint8Array||32!==i.assetMetadataHash.byteLength)throw Error("assetMetadataHash must be a ".concat(32," byte Uint8Array or string."));i.assetMetadataHash.every((function(e){return 0===e}))&&(i.assetMetadataHash=void 0)}else i.assetMetadataHash=void 0;if(void 0!==i.note){if(i.note.constructor!==Uint8Array)throw Error("note must be a Uint8Array.")}else i.note=new Uint8Array(0);if(void 0!==i.lease){if(i.lease.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(32!==i.lease.length)throw Error("lease must be of length ".concat(32..toString(),"."));i.lease.every((function(e){return 0===e}))&&(i.lease=new Uint8Array(0))}else i.lease=new Uint8Array(0);if(i.voteKey=y(i.voteKey,"voteKey",32),i.selectionKey=y(i.selectionKey,"selectionKey",32),i.stateProofKey=y(i.stateProofKey,"stateProofKey",64),i.nonParticipation&&(i.voteKey||i.selectionKey||i.voteFirst||i.stateProofKey||i.voteLast||i.voteKeyDilution))throw new Error("nonParticipation is true but participation params are present.");if(!i.nonParticipation&&(i.voteKey||i.selectionKey||i.stateProofKey||i.voteFirst||i.voteLast||i.voteKeyDilution)&&!(i.voteKey&&i.selectionKey&&i.voteFirst&&i.voteLast&&i.voteKeyDilution))throw new Error("online key registration missing at least one of the following fields: voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution");if(delete i.suggestedParams,Object.assign(this,f.removeUndefinedProperties(i)),i.flatFee||(this.fee*=this.estimateSize(),this.fee1&&void 0!==arguments[1]?arguments[1]:0;if(void 0!==e){if(e.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(32!==e.length)throw Error("lease must be of length ".concat(32..toString(),"."));t=new Uint8Array(e)}else t=new Uint8Array(0);this.lease=t,0!==n&&(this.fee+=37*n)}},{key:"addRekey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;void 0!==e&&(this.reKeyTo=u.decodeAddress(e)),0!==t&&(this.fee+=37*t)}},{key:"_getDictForDisplay",value:function(){var e=(0,a.Z)({},this);return e.tag=e.tag.toString(),e.from=u.encodeAddress(e.from.publicKey),void 0!==e.to&&(e.to=u.encodeAddress(e.to.publicKey)),void 0!==e.freezeAccount&&(e.freezeAccount=u.encodeAddress(e.freezeAccount.publicKey)),void 0!==e.closeRemainderTo&&(e.closeRemainderTo=u.encodeAddress(e.closeRemainderTo.publicKey)),void 0!==e.assetManager&&(e.assetManager=u.encodeAddress(e.assetManager.publicKey)),void 0!==e.assetReserve&&(e.assetReserve=u.encodeAddress(e.assetReserve.publicKey)),void 0!==e.assetFreeze&&(e.assetFreeze=u.encodeAddress(e.assetFreeze.publicKey)),void 0!==e.assetClawback&&(e.assetClawback=u.encodeAddress(e.assetClawback.publicKey)),void 0!==e.assetRevocationTarget&&(e.assetRevocationTarget=u.encodeAddress(e.assetRevocationTarget.publicKey)),void 0!==e.reKeyTo&&(e.reKeyTo=u.encodeAddress(e.reKeyTo.publicKey)),e.genesisHash=e.genesisHash.toString("base64"),e}},{key:"prettyPrint",value:function(){h.log(this._getDictForDisplay())}},{key:"toString",value:function(){return JSON.stringify(this._getDictForDisplay())}}],[{key:"from_obj_for_encoding",value:function(e){var t=Object.create(this.prototype);if(t.name="Transaction",t.tag=m.from("TX"),t.genesisID=e.gen,t.genesisHash=m.from(e.gh),!(0,b.v8)(e.type))throw new Error("Unrecognized transaction type: ".concat(e.type));return t.type=e.type,t.fee=e.fee,t.firstRound=e.fv,t.lastRound=e.lv,t.note=new Uint8Array(e.note),t.lease=new Uint8Array(e.lx),t.from=u.decodeAddress(u.encodeAddress(new Uint8Array(e.snd))),void 0!==e.grp&&(t.group=m.from(e.grp)),void 0!==e.rekey&&(t.reKeyTo=u.decodeAddress(u.encodeAddress(new Uint8Array(e.rekey)))),"pay"===e.type?(t.amount=e.amt,t.to=u.decodeAddress(u.encodeAddress(new Uint8Array(e.rcv))),void 0!==e.close&&(t.closeRemainderTo=u.decodeAddress(u.encodeAddress(e.close)))):"keyreg"===e.type?(void 0!==e.votekey&&(t.voteKey=m.from(e.votekey)),void 0!==e.selkey&&(t.selectionKey=m.from(e.selkey)),void 0!==e.sprfkey&&(t.stateProofKey=m.from(e.sprfkey)),void 0!==e.votekd&&(t.voteKeyDilution=e.votekd),void 0!==e.votefst&&(t.voteFirst=e.votefst),void 0!==e.votelst&&(t.voteLast=e.votelst),void 0!==e.nonpart&&(t.nonParticipation=e.nonpart)):"acfg"===e.type?(void 0!==e.caid&&(t.assetIndex=e.caid),void 0!==e.apar&&(t.assetTotal=e.apar.t,t.assetDefaultFrozen=e.apar.df,void 0!==e.apar.dc&&(t.assetDecimals=e.apar.dc),void 0!==e.apar.m&&(t.assetManager=u.decodeAddress(u.encodeAddress(new Uint8Array(e.apar.m)))),void 0!==e.apar.r&&(t.assetReserve=u.decodeAddress(u.encodeAddress(new Uint8Array(e.apar.r)))),void 0!==e.apar.f&&(t.assetFreeze=u.decodeAddress(u.encodeAddress(new Uint8Array(e.apar.f)))),void 0!==e.apar.c&&(t.assetClawback=u.decodeAddress(u.encodeAddress(new Uint8Array(e.apar.c)))),void 0!==e.apar.un&&(t.assetUnitName=e.apar.un),void 0!==e.apar.an&&(t.assetName=e.apar.an),void 0!==e.apar.au&&(t.assetURL=e.apar.au),void 0!==e.apar.am&&(t.assetMetadataHash=e.apar.am))):"axfer"===e.type?(void 0!==e.xaid&&(t.assetIndex=e.xaid),void 0!==e.aamt&&(t.amount=e.aamt),void 0!==e.aclose&&(t.closeRemainderTo=u.decodeAddress(u.encodeAddress(new Uint8Array(e.aclose)))),void 0!==e.asnd&&(t.assetRevocationTarget=u.decodeAddress(u.encodeAddress(new Uint8Array(e.asnd)))),t.to=u.decodeAddress(u.encodeAddress(new Uint8Array(e.arcv)))):"afrz"===e.type?(void 0!==e.afrz&&(t.freezeState=e.afrz),void 0!==e.faid&&(t.assetIndex=e.faid),t.freezeAccount=u.decodeAddress(u.encodeAddress(new Uint8Array(e.fadd)))):"appl"===e.type?(void 0!==e.apid&&(t.appIndex=e.apid),void 0!==e.apan&&(t.appOnComplete=e.apan),void 0!==e.apls&&(void 0!==e.apls.nui&&(t.appLocalInts=e.apls.nui),void 0!==e.apls.nbs&&(t.appLocalByteSlices=e.apls.nbs)),void 0!==e.apgs&&(void 0!==e.apgs.nui&&(t.appGlobalInts=e.apgs.nui),void 0!==e.apgs.nbs&&(t.appGlobalByteSlices=e.apgs.nbs)),void 0!==e.apep&&(t.extraPages=e.apep),void 0!==e.apap&&(t.appApprovalProgram=new Uint8Array(e.apap)),void 0!==e.apsu&&(t.appClearProgram=new Uint8Array(e.apsu)),void 0!==e.apaa&&(t.appArgs=e.apaa.map((function(e){return new Uint8Array(e)}))),void 0!==e.apat&&(t.appAccounts=e.apat.map((function(e){return u.decodeAddress(u.encodeAddress(new Uint8Array(e)))}))),void 0!==e.apfa&&(t.appForeignApps=e.apfa),void 0!==e.apas&&(t.appForeignAssets=e.apas),void 0!==e.apbx&&(t.boxes=e.apbx.map((function(e){return{appIndex:e.i?t.appForeignApps[e.i-1]:0,name:e.n}})))):"stpf"===e.type&&(void 0!==e.sptype&&(t.stateProofType=e.sptype),void 0!==e.sp&&(t.stateProof=e.sp),void 0!==e.spmsg&&(t.stateProofMessage=e.spmsg)),t}}]),e}();function w(e){var t=e.get_obj_for_encoding();return d.encode(t)}function k(e){var t=d.decode(e);return v.from_obj_for_encoding(t)}function A(e){var t=d.decode(e);return(0,a.Z)((0,a.Z)({},t),{},{txn:v.from_obj_for_encoding(t.txn)})}function x(e){return e instanceof v?e:new v(e)}var I=v},86250:function(e,t,n){"use strict";n.d(t,{i:function(){return a.i}});var a=n(36051)},40913:function(e,t){"use strict";var n;!function(e){e.DEFAULT="default",e.SAFE="safe",e.MIXED="mixed",e.BIGINT="bigint"}(n||(n={})),t.Z=n},78064:function(e,t,n){"use strict";var a,o;function r(e){return e===a.pay||e===a.keyreg||e===a.acfg||e===a.axfer||e===a.afrz||e===a.appl||e===a.stpf}n.d(t,{hq:function(){return o},iU:function(){return a},v8:function(){return r}}),function(e){e.pay="pay",e.keyreg="keyreg",e.acfg="acfg",e.axfer="axfer",e.afrz="afrz",e.appl="appl",e.stpf="stpf"}(a||(a={})),function(e){e[e.NoOpOC=0]="NoOpOC",e[e.OptInOC=1]="OptInOC",e[e.CloseOutOC=2]="CloseOutOC",e[e.ClearStateOC=3]="ClearStateOC",e[e.UpdateApplicationOC=4]="UpdateApplicationOC",e[e.DeleteApplicationOC=5]="DeleteApplicationOC"}(o||(o={}))},36051:function(e,t,n){"use strict";n.d(t,{i:function(){return a.iU}});var a=n(78064)},54684:function(e,t,n){"use strict";n.r(t),n.d(t,{arrayEqual:function(){return d},concatArrays:function(){return l},isNode:function(){return p},parseJSON:function(){return u},removeUndefinedProperties:function(){return f}});var a=n(1413),o=n(85896),r=n.n(o),i=n(40913),s=n(456),c=r()({useNativeBigInt:!0,strict:!0});function u(e,t){var n=t&&t.intDecoding?t.intDecoding:i.Z.DEFAULT;return c.parse(e,(function(e,t){if(null!=t&&"object"===typeof t&&null==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,Object.prototype),"bigint"===typeof t){if("safe"===n&&t>Number.MAX_SAFE_INTEGER)throw new Error("Integer exceeds maximum safe integer: ".concat(t.toString(),". Try parsing with a different intDecoding option."));return"bigint"===n||"mixed"===n&&t>Number.MAX_SAFE_INTEGER?t:Number(t)}return"number"===typeof t&&"bigint"===n&&Number.isInteger(t)?BigInt(t):t}))}function d(e,t){return e.length===t.length&&Array.from(e).every((function(e,n){return e===t[n]}))}function l(){for(var e=arguments.length,t=new Array(e),n=0;n1?void 0:a?k(t,n):t,i=e.length-1;i>=0;i--)(o=e[i])&&(r=(a?o(t,n,r):o(r))||r);return a&&r&&w(t,n,r),r},R={};T(R,{ApiError:function(){return xo},AptosAccount:function(){return Mt},AptosClient:function(){return Ao},BCS:function(){return $},CoinClient:function(){return Ro},FailedTransactionError:function(){return To},FaucetClient:function(){return Mo},HexString:function(){return H},TokenClient:function(){return jo},TokenTypes:function(){return Oo},TransactionBuilder:function(){return ho},TransactionBuilderABI:function(){return vo},TransactionBuilderEd25519:function(){return go},TransactionBuilderMultiEd25519:function(){return yo},TransactionBuilderRemoteABI:function(){return wo},TxnBuilderTypes:function(){return X},TypeTagParser:function(){return co},Types:function(){return Ut},WaitForTransactionError:function(){return Io},derivePath:function(){return L},deserializePropertyMap:function(){return Do},deserializeValueBasedOnTypeTag:function(){return No},getAddressFromAccountOrAddress:function(){return Pt},getPropertyValueRaw:function(){return Bo}}),e.exports=(a=R,S(w({},"__esModule",{value:!0}),a));var M=C(n(10616)),P=C(n(41757)),U=n(87878),_=n(44953),B=(C(n(10616)),n(95425)),D=n(25179),N=n(87878),O=/^m(\/[0-9]+')+$/,F=function(e){return e.replace("'","")},L=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2147483648;if(!function(e){return!!O.test(e)&&!e.split("/").slice(1).map(F).some(Number.isNaN)}(e))throw new Error("Invalid derivation path");var a=function(e){var t=B.hmac.create(D.sha512,"ed25519 seed").update((0,N.hexToBytes)(e)).digest();return{key:t.slice(0,32),chainCode:t.slice(32)}}(t),o=a.key,r=a.chainCode;return e.split("/").slice(1).map(F).map((function(e){return parseInt(e,10)})).reduce((function(e,t){return function(e,t){var n=e.key,a=e.chainCode,o=new ArrayBuffer(4);new DataView(o).setUint32(0,t);var r=new Uint8Array(o),i=new Uint8Array([0]),s=new Uint8Array([].concat(h(i),h(n),h(r))),c=B.hmac.create(D.sha512,a).update(s).digest();return{key:c.slice(0,32),chainCode:c.slice(32)}}(e,t+n)}),{key:o,chainCode:r})},j=n(87878),H=function(){function e(t){b(this,e),t.startsWith("0x")?this.hexString=t:this.hexString="0x".concat(t)}return m(e,[{key:"hex",value:function(){return this.hexString}},{key:"noPrefix",value:function(){return this.hexString.slice(2)}},{key:"toString",value:function(){return this.hex()}},{key:"toShortString",value:function(){var e=this.hexString.replace(/^0x0*/,"");return"0x".concat(e)}},{key:"toUint8Array",value:function(){return Uint8Array.from((0,j.hexToBytes)(this.noPrefix()))}}],[{key:"fromBuffer",value:function(t){return e.fromUint8Array(t)}},{key:"fromUint8Array",value:function(t){return new e((0,j.bytesToHex)(t))}},{key:"ensure",value:function(t){return"string"===typeof t?new e(t):t}}]),e}();function G(e){return z.apply(this,arguments)}function z(){return(z=p(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){setTimeout(e,t)})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var K="/v1";var W=2e5,Z="0x1::aptos_coin::AptosCoin";function V(e){var t,n,a;return"object"===typeof e?(t=e.hashFunction,n=e.ttlMs,a=e.tags):t=e,function(e,o,r){if(null!=r.value)r.value=Q(r.value,t,n,a);else{if(null==r.get)throw new Error("Only put a Memoize() decorator on a method or get accessor.");r.get=Q(r.get,t,n,a)}}}var q=new Map;function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3?arguments[3]:void 0,o=Symbol("__memoized_map__");return function(){var r,i=this;i.hasOwnProperty(o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!1,writable:!1,value:new Map});var s=i[o];if(Array.isArray(a)){var c,u=g(a);try{for(u.s();!(c=u.n()).done;){var d=c.value;q.has(d)?q.get(d).push(s):q.set(d,[s])}}catch(w){u.e(w)}finally{u.f()}}for(var l=arguments.length,f=new Array(l),p=0;p0||n>0){var b;b=!0===t?f.map((function(e){return e.toString()})).join("!"):t?t.apply(i,f):f[0];var m="".concat(b,"__timestamp"),h=!1;if(n>0)if(s.has(m)){var y=s.get(m);h=Date.now()-y>n}else h=!0;s.has(b)&&!h?r=s.get(b):(r=e.apply(i,f),s.set(b,r),n>0&&s.set(m,Date.now()))}else{var v=i;s.has(v)?r=s.get(v):(r=e.apply(i,f),s.set(v,r))}return r}}function J(e,t,n,a){return Y.apply(this,arguments)}function Y(){return(Y=p(c().mark((function e(t,n,a,o){var r,i,s,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=[];case 1:return e.next=4,t(H.ensure(n).hex(),null==(r=null==o?void 0:o.ledgerVersion)?void 0:r.toString(),s,a);case 4:if(u=e.sent,s=u.__headers["x-aptos-cursor"],delete u.__headers,i.push.apply(i,h(u)),null!==s&&void 0!==s){e.next=10;break}return e.abrupt("break",12);case 10:e.next=1;break;case 12:return e.abrupt("return",i);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var X={};T(X,{AccountAddress:function(){return Ie},AccountAuthenticator:function(){return _e},AccountAuthenticatorEd25519:function(){return Be},AccountAuthenticatorMultiEd25519:function(){return De},ArgumentABI:function(){return xt},AuthenticationKey:function(){return Et},ChainId:function(){return ut},ChangeSet:function(){return tt},Ed25519PublicKey:function(){return Te},Ed25519Signature:function(){return Se},EntryFunction:function(){return Xe},EntryFunctionABI:function(){return St},Identifier:function(){return Ne},Module:function(){return $e},ModuleId:function(){return et},MultiAgentRawTransaction:function(){return rt},MultiEd25519PublicKey:function(){return Ce},MultiEd25519Signature:function(){return Ee},RawTransaction:function(){return Je},RawTransactionWithData:function(){return ot},RotationProofChallenge:function(){return Rt},Script:function(){return Ye},ScriptABI:function(){return It},SignedTransaction:function(){return at},StructTag:function(){return Qe},Transaction:function(){return wt},TransactionArgument:function(){return dt},TransactionArgumentAddress:function(){return gt},TransactionArgumentBool:function(){return vt},TransactionArgumentU128:function(){return mt},TransactionArgumentU16:function(){return ft},TransactionArgumentU256:function(){return ht},TransactionArgumentU32:function(){return pt},TransactionArgumentU64:function(){return bt},TransactionArgumentU8:function(){return lt},TransactionArgumentU8Vector:function(){return yt},TransactionAuthenticator:function(){return Re},TransactionAuthenticatorEd25519:function(){return Me},TransactionAuthenticatorMultiAgent:function(){return Ue},TransactionAuthenticatorMultiEd25519:function(){return Pe},TransactionPayload:function(){return it},TransactionPayloadEntryFunction:function(){return ct},TransactionPayloadScript:function(){return st},TransactionScriptABI:function(){return Tt},TypeArgumentABI:function(){return At},TypeTag:function(){return Oe},TypeTagAddress:function(){return We},TypeTagBool:function(){return Fe},TypeTagSigner:function(){return Ze},TypeTagStruct:function(){return qe},TypeTagU128:function(){return ze},TypeTagU16:function(){return je},TypeTagU256:function(){return Ke},TypeTagU32:function(){return He},TypeTagU64:function(){return Ge},TypeTagU8:function(){return Le},TypeTagVector:function(){return Ve},UserTransaction:function(){return kt},WriteSet:function(){return nt}});var $={};T($,{Deserializer:function(){return ce},Serializer:function(){return ie},bcsSerializeBool:function(){return ye},bcsSerializeBytes:function(){return we},bcsSerializeFixedBytes:function(){return ke},bcsSerializeStr:function(){return ve},bcsSerializeU128:function(){return ge},bcsSerializeU16:function(){return me},bcsSerializeU32:function(){return he},bcsSerializeU8:function(){return be},bcsSerializeUint64:function(){return pe},bcsToBytes:function(){return fe},deserializeVector:function(){return le},serializeVector:function(){return ue},serializeVectorWithFunc:function(){return de}});var ee=Math.pow(2,8)-1,te=Math.pow(2,16)-1,ne=Math.pow(2,32)-1,ae=BigInt(Math.pow(2,64))-BigInt(1),oe=BigInt(Math.pow(2,128))-BigInt(1),re=BigInt(Math.pow(2,256))-BigInt(1),ie=function(){function e(){b(this,e),this.buffer=new ArrayBuffer(64),this.offset=0}return m(e,[{key:"ensureBufferWillHandleSize",value:function(e){for(;this.buffer.byteLength>BigInt(32);this.serializeU32(Number(t)),this.serializeU32(Number(n))}},{key:"serializeU128",value:function(e){var t=BigInt(e.toString())&ae,n=BigInt(e.toString())>>BigInt(64);this.serializeU64(t),this.serializeU64(n)}},{key:"serializeU256",value:function(e){var t=BigInt(e.toString())&oe,n=BigInt(e.toString())>>BigInt(128);this.serializeU128(t),this.serializeU128(n)}},{key:"serializeU32AsUleb128",value:function(e){for(var t=e,n=[];t>>>7!==0;)n.push(127&t|128),t>>>=7;n.push(t),this.serialize(new Uint8Array(n))}},{key:"getBytes",value:function(){return new Uint8Array(this.buffer).slice(0,this.offset)}}]),e}();function se(e,t,n){return function(a,o,r){var i=r.value;return r.value=function(a){var o=BigInt(a.toString());if(o>BigInt(t.toString())||othis.buffer.byteLength)throw new Error("Reached to the end of buffer");var t=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t}},{key:"deserializeStr",value:function(){var e=this.deserializeBytes();return(new TextDecoder).decode(e)}},{key:"deserializeBytes",value:function(){var e=this.deserializeUleb128AsU32();return new Uint8Array(this.read(e))}},{key:"deserializeFixedBytes",value:function(e){return new Uint8Array(this.read(e))}},{key:"deserializeBool",value:function(){var e=new Uint8Array(this.read(1))[0];if(1!==e&&0!==e)throw new Error("Invalid boolean value");return 1===e}},{key:"deserializeU8",value:function(){return new DataView(this.read(1)).getUint8(0)}},{key:"deserializeU16",value:function(){return new DataView(this.read(2)).getUint16(0,!0)}},{key:"deserializeU32",value:function(){return new DataView(this.read(4)).getUint32(0,!0)}},{key:"deserializeU64",value:function(){var e=this.deserializeU32(),t=this.deserializeU32();return BigInt(BigInt(t)<ne)throw new Error("Overflow while parsing uleb128-encoded uint32 value");return Number(e)}}]),e}();function ue(e,t){t.serializeU32AsUleb128(e.length),e.forEach((function(e){e.serialize(t)}))}function de(e,t){var n=new ie;n.serializeU32AsUleb128(e.length);var a=n[t];return e.forEach((function(e){a.call(n,e)})),n.getBytes()}function le(e,t){for(var n=e.deserializeUleb128AsU32(),a=[],o=0;oe.LENGTH)throw new Error("Hex string is too long. Address's length is 32 bytes.");if(a.length===e.LENGTH)return new e(a);var o=new Uint8Array(e.LENGTH);return o.set(a,e.LENGTH-a.length),new e(o)}},{key:"isValid",value:function(t){if(""===t)return!1;var n=H.ensure(t);return n.noPrefix().length%2!==0&&(n=new H("0".concat(n.noPrefix()))),n.toUint8Array().length<=e.LENGTH}},{key:"deserialize",value:function(t){return new e(t.deserializeFixedBytes(e.LENGTH))}}]),e}(),Ie=xe;Ie.LENGTH=32,Ie.CORE_CODE_ADDRESS=xe.fromHex("0x1");var Te=function(){function e(t){if(b(this,e),t.length!==e.LENGTH)throw new Error("Ed25519PublicKey length should be ".concat(e.LENGTH));this.value=t}return m(e,[{key:"toBytes",value:function(){return this.value}},{key:"serialize",value:function(e){e.serializeBytes(this.value)}}],[{key:"deserialize",value:function(t){return new e(t.deserializeBytes())}}]),e}();Te.LENGTH=32;var Se=function(){function e(t){if(b(this,e),this.value=t,t.length!==e.LENGTH)throw new Error("Ed25519Signature length should be ".concat(e.LENGTH))}return m(e,[{key:"serialize",value:function(e){e.serializeBytes(this.value)}}],[{key:"deserialize",value:function(t){return new e(t.deserializeBytes())}}]),e}();Se.LENGTH=64;var Ce=function(){function e(t,n){if(b(this,e),this.public_keys=t,this.threshold=n,n>32)throw new Error('"threshold" cannot be larger than '.concat(32))}return m(e,[{key:"toBytes",value:function(){var e=new Uint8Array(this.public_keys.length*Te.LENGTH+1);return this.public_keys.forEach((function(t,n){e.set(t.value,n*Te.LENGTH)})),e[this.public_keys.length*Te.LENGTH]=this.threshold,e}},{key:"serialize",value:function(e){e.serializeBytes(this.toBytes())}}],[{key:"deserialize",value:function(t){for(var n=t.deserializeBytes(),a=n[n.length-1],o=[],r=0;r=32)throw new Error("Invalid bit value ".concat(e,"."));if(n.has(e))throw new Error("Duplicated bits detected.");n.add(e);var a=Math.floor(e/8),o=t[a];o|=128>>e%8,t[a]=o})),t}},{key:"deserialize",value:function(t){for(var n=t.deserializeBytes(),a=n.subarray(n.length-4),o=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:new Map;b(this,e),this.jar=t}return m(e,[{key:"setCookie",value:function(t,n){var a,o=t.origin.toLowerCase();this.jar.has(o)||this.jar.set(o,[]);var r=e.parse(n);this.jar.set(o,[].concat(h((null==(a=this.jar.get(o))?void 0:a.filter((function(e){return e.name!==r.name})))||[]),[r]))}},{key:"getCookies",value:function(e){var t,n=e.origin.toLowerCase();return this.jar.get(n)&&(null==(t=this.jar.get(n))?void 0:t.filter((function(e){return!e.expires||e.expires>new Date})))||[]}}],[{key:"parse",value:function(e){if("string"!==typeof e)throw new Error("argument str must be a string");var t,n=e.split(";").map((function(e){return e.trim()}));if(!(n.length>0))throw new Error("Invalid cookie");var a=n[0].split("="),o=u(a,2),r=o[0],i=o[1];if(!r||!i)throw new Error("Invalid cookie");return t={name:r,value:i},n.slice(1).forEach((function(e){var n=e.split("="),a=u(n,2),o=a[0],r=a[1];if(!o.trim())throw new Error("Invalid cookie");var i=o.toLowerCase(),s="'"===(null==r?void 0:r.charAt(0))||'"'===(null==r?void 0:r.charAt(0))?null==r?void 0:r.slice(1,-1):r;if("expires"===i&&(t.expires=new Date(s)),"path"===i&&(t.path=s),"samesite"===i){if("Lax"!==s&&"None"!==s&&"Strict"!==s)throw new Error("Invalid cookie SameSite value");t.sameSite=s}"secure"===i&&(t.secure=!0)})),t}}]),e}(),jt=new Lt;Bt.default.interceptors.response.use((function(e){return Array.isArray(e.headers["set-cookie"])&&e.headers["set-cookie"].forEach((function(t){jt.setCookie(new URL(e.config.url),t)})),e})),Bt.default.interceptors.request.use((function(e){var t=jt.getCookies(new URL(e.url));return(null==t?void 0:t.length)>0&&e.headers&&(e.headers.cookie=t.map((function(e){return"".concat(e.name,"=").concat(e.value)})).join("; ")),e}));var Ht=function(e){return void 0!==e&&null!==e},Gt=function(e){return"string"===typeof e},zt=function(e){return Gt(e)&&""!==e},Kt=function(e){return"object"===typeof e&&"string"===typeof e.type&&"function"===typeof e.stream&&"function"===typeof e.arrayBuffer&&"function"===typeof e.constructor&&"string"===typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])},Wt=function(e){var t=[],n=function e(n,a){Ht(a)&&(Array.isArray(a)?a.forEach((function(t){e(n,t)})):"object"===typeof a?Object.entries(a).forEach((function(t){var a=u(t,2),o=a[0],r=a[1];e("".concat(n,"[").concat(o,"]"),r)})):function(e,n){t.push("".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(String(n))))}(n,a))};return Object.entries(e).forEach((function(e){var t=u(e,2),a=t[0],o=t[1];n(a,o)})),t.length>0?"?".concat(t.join("&")):""},Zt=function(e,t){var n=e.ENCODE_PATH||encodeURI,a=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(function(e,a){var o;return(null==(o=t.path)?void 0:o.hasOwnProperty(a))?n(String(t.path[a])):e})),o="".concat(e.BASE).concat(a);return t.query?"".concat(o).concat(Wt(t.query)):o},Vt=function(e){if(e.formData){var t=new Dt.default,n=function(e,n){Gt(n)||Kt(n)?t.append(e,n):t.append(e,JSON.stringify(n))};return Object.entries(e.formData).filter((function(e){var t=u(e,2),n=(t[0],t[1]);return Ht(n)})).forEach((function(e){var t=u(e,2),a=t[0],o=t[1];Array.isArray(o)?o.forEach((function(e){return n(a,e)})):n(a,o)})),t}},qt=function(){var e=p(c().mark((function e(t,n){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof n){e.next=2;break}return e.abrupt("return",n(t));case 2:return e.abrupt("return",n);case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Qt=function(){var e=p(c().mark((function e(t,n,a){var o,r,d,l,f,p,b;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qt(n,t.TOKEN);case 2:return o=e.sent,e.next=5,qt(n,t.USERNAME);case 5:return r=e.sent,e.next=8,qt(n,t.PASSWORD);case 8:return d=e.sent,e.next=11,qt(n,t.HEADERS);case 11:return l=e.sent,f="function"===typeof(null==a?void 0:a.getHeaders)&&(null==a?void 0:a.getHeaders())||{},p=Object.entries(s(s(s({Accept:"application/json"},l),n.headers),f)).filter((function(e){var t=u(e,2),n=(t[0],t[1]);return Ht(n)})).reduce((function(e,t){var n=u(t,2),a=n[0],o=n[1];return s(s({},e),{},i({},a,String(o)))}),{}),zt(o)&&(p.Authorization="Bearer ".concat(o)),zt(r)&&zt(d)&&(c="".concat(r,":").concat(d),b=btoa(c),p.Authorization="Basic ".concat(b)),n.body&&(n.mediaType?p["Content-Type"]=n.mediaType:Kt(n.body)?p["Content-Type"]=n.body.type||"application/octet-stream":Gt(n.body)?p["Content-Type"]="text/plain":n.body instanceof Dt.default||(p["Content-Type"]="application/json")),e.abrupt("return",p);case 18:case"end":return e.stop()}var c}),e)})));return function(t,n,a){return e.apply(this,arguments)}}(),Jt=function(e){if(e.body)return e.body},Yt=function(){var e=p(c().mark((function e(t,n,a,o,r,i,s){var u,d,l;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=Bt.default.CancelToken.source(),d={url:a,headers:i,data:null!=o?o:r,method:n.method,withCredentials:t.WITH_CREDENTIALS,cancelToken:u.token},Object.keys(t.HEADERS||{}).filter((function(e){return"accept"===e.toLowerCase()})).map((function(e){return t.HEADERS[e]})).includes("application/x-bcs")&&(d.responseType="arraybuffer"),s((function(){return u.cancel("The user aborted a request.")})),e.prev=5,e.next=8,Bt.default.request(d);case 8:return e.abrupt("return",e.sent);case 11:if(e.prev=11,e.t0=e.catch(5),!(l=e.t0).response){e.next=16;break}return e.abrupt("return",l.response);case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,null,[[5,11]])})));return function(t,n,a,o,r,i,s){return e.apply(this,arguments)}}(),Xt=function(e,t){if(t){var n=e.headers[t];if(Gt(n))return n}},$t=function(e){if(204!==e.status)return e.data},en=function(e,t){var n=s({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},e.errors)[t.status];if(n)throw new Nt(e,t,n);if(!t.ok)throw new Nt(e,t,"Generic Error")},tn=function(e){l(n,e);var t=f(n);function n(e){return b(this,n),t.call(this,e)}return m(n,[{key:"request",value:function(e){return function(e,t){return new Ft(function(){var n=p(c().mark((function n(a,o,r){var i,s,u,d,l,f,p,b,m;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,i=Zt(e,t),s=Vt(t),u=Jt(t),n.next=6,Qt(e,t,s);case 6:if(d=n.sent,r.isCancelled){n.next=18;break}return n.next=10,Yt(e,t,i,u,s,d,r);case 10:l=n.sent,f=$t(l),p=Xt(l,t.responseHeader),b={url:i,ok:(c=l.status,c>=200&&c<300),status:l.status,statusText:l.statusText,body:null!=p?p:f},en(t,b),m=b.body;try{m.__headers=l.headers}catch(h){}a(m);case 18:n.next=23;break;case 20:n.prev=20,n.t0=n.catch(0),o(n.t0);case 23:case"end":return n.stop()}var c}),n,null,[[0,20]])})));return function(e,t,a){return n.apply(this,arguments)}}())}(this.config,e)}}]),n}(_t),nn=function(){function e(t){b(this,e),this.httpRequest=t}return m(e,[{key:"getAccount",value:function(e,t){return this.httpRequest.request({method:"GET",url:"/accounts/{address}",path:{address:e},query:{ledger_version:t}})}},{key:"getAccountResources",value:function(e,t,n,a){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/resources",path:{address:e},query:{ledger_version:t,start:n,limit:a}})}},{key:"getAccountModules",value:function(e,t,n,a){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/modules",path:{address:e},query:{ledger_version:t,start:n,limit:a}})}},{key:"getAccountResource",value:function(e,t,n){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/resource/{resource_type}",path:{address:e,resource_type:t},query:{ledger_version:n}})}},{key:"getAccountModule",value:function(e,t,n){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/module/{module_name}",path:{address:e,module_name:t},query:{ledger_version:n}})}}]),e}(),an=function(){function e(t){b(this,e),this.httpRequest=t}return m(e,[{key:"getBlockByHeight",value:function(e,t){return this.httpRequest.request({method:"GET",url:"/blocks/by_height/{block_height}",path:{block_height:e},query:{with_transactions:t}})}},{key:"getBlockByVersion",value:function(e,t){return this.httpRequest.request({method:"GET",url:"/blocks/by_version/{version}",path:{version:e},query:{with_transactions:t}})}}]),e}(),on=function(){function e(t){b(this,e),this.httpRequest=t}return m(e,[{key:"getEventsByCreationNumber",value:function(e,t,n,a){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/events/{creation_number}",path:{address:e,creation_number:t},query:{start:n,limit:a}})}},{key:"getEventsByEventHandle",value:function(e,t,n,a,o){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/events/{event_handle}/{field_name}",path:{address:e,event_handle:t,field_name:n},query:{start:a,limit:o}})}}]),e}(),rn=function(){function e(t){b(this,e),this.httpRequest=t}return m(e,[{key:"spec",value:function(){return this.httpRequest.request({method:"GET",url:"/spec"})}},{key:"healthy",value:function(e){return this.httpRequest.request({method:"GET",url:"/-/healthy",query:{duration_secs:e}})}},{key:"getLedgerInfo",value:function(){return this.httpRequest.request({method:"GET",url:"/"})}}]),e}(),sn=function(){function e(t){b(this,e),this.httpRequest=t}return m(e,[{key:"getTableItem",value:function(e,t,n){return this.httpRequest.request({method:"POST",url:"/tables/{table_handle}/item",path:{table_handle:e},query:{ledger_version:n},body:t,mediaType:"application/json"})}},{key:"getRawTableItem",value:function(e,t,n){return this.httpRequest.request({method:"POST",url:"/tables/{table_handle}/raw_item",path:{table_handle:e},query:{ledger_version:n},body:t,mediaType:"application/json"})}}]),e}(),cn=function(){function e(t){b(this,e),this.httpRequest=t}return m(e,[{key:"getTransactions",value:function(e,t){return this.httpRequest.request({method:"GET",url:"/transactions",query:{start:e,limit:t}})}},{key:"submitTransaction",value:function(e){return this.httpRequest.request({method:"POST",url:"/transactions",body:e,mediaType:"application/json"})}},{key:"getTransactionByHash",value:function(e){return this.httpRequest.request({method:"GET",url:"/transactions/by_hash/{txn_hash}",path:{txn_hash:e}})}},{key:"getTransactionByVersion",value:function(e){return this.httpRequest.request({method:"GET",url:"/transactions/by_version/{txn_version}",path:{txn_version:e}})}},{key:"getAccountTransactions",value:function(e,t,n){return this.httpRequest.request({method:"GET",url:"/accounts/{address}/transactions",path:{address:e},query:{start:t,limit:n}})}},{key:"submitBatchTransactions",value:function(e){return this.httpRequest.request({method:"POST",url:"/transactions/batch",body:e,mediaType:"application/json"})}},{key:"simulateTransaction",value:function(e,t,n,a){return this.httpRequest.request({method:"POST",url:"/transactions/simulate",query:{estimate_max_gas_amount:t,estimate_gas_unit_price:n,estimate_prioritized_gas_unit_price:a},body:e,mediaType:"application/json"})}},{key:"encodeSubmission",value:function(e){return this.httpRequest.request({method:"POST",url:"/transactions/encode_submission",body:e,mediaType:"application/json"})}},{key:"estimateGasPrice",value:function(){return this.httpRequest.request({method:"GET",url:"/estimate_gas_price"})}}]),e}(),un=function(){function e(t){b(this,e),this.httpRequest=t}return m(e,[{key:"view",value:function(e,t){return this.httpRequest.request({method:"POST",url:"/view",query:{ledger_version:t},body:e,mediaType:"application/json"})}}]),e}(),dn=m((function e(t){var n,a,o,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tn;b(this,e),this.request=new i({BASE:null!=(n=null==t?void 0:t.BASE)?n:"/v1",VERSION:null!=(a=null==t?void 0:t.VERSION)?a:"1.2.0",WITH_CREDENTIALS:null!=(o=null==t?void 0:t.WITH_CREDENTIALS)&&o,CREDENTIALS:null!=(r=null==t?void 0:t.CREDENTIALS)?r:"include",TOKEN:null==t?void 0:t.TOKEN,USERNAME:null==t?void 0:t.USERNAME,PASSWORD:null==t?void 0:t.PASSWORD,HEADERS:null==t?void 0:t.HEADERS,ENCODE_PATH:null==t?void 0:t.ENCODE_PATH}),this.accounts=new nn(this.request),this.blocks=new an(this.request),this.events=new on(this.request),this.general=new rn(this.request),this.tables=new sn(this.request),this.transactions=new cn(this.request),this.view=new un(this.request)})),ln={BASE:"/v1",VERSION:"1.2.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0},fn=function(e){return e.ACCOUNT_NOT_FOUND="account_not_found",e.RESOURCE_NOT_FOUND="resource_not_found",e.MODULE_NOT_FOUND="module_not_found",e.STRUCT_FIELD_NOT_FOUND="struct_field_not_found",e.VERSION_NOT_FOUND="version_not_found",e.TRANSACTION_NOT_FOUND="transaction_not_found",e.TABLE_ITEM_NOT_FOUND="table_item_not_found",e.BLOCK_NOT_FOUND="block_not_found",e.VERSION_PRUNED="version_pruned",e.BLOCK_PRUNED="block_pruned",e.INVALID_INPUT="invalid_input",e.INVALID_TRANSACTION_UPDATE="invalid_transaction_update",e.SEQUENCE_NUMBER_TOO_OLD="sequence_number_too_old",e.VM_ERROR="vm_error",e.HEALTH_CHECK_FAILED="health_check_failed",e.MEMPOOL_IS_FULL="mempool_is_full",e.INTERNAL_ERROR="internal_error",e.WEB_FRAMEWORK_ERROR="web_framework_error",e.BCS_NOT_SUPPORTED="bcs_not_supported",e.API_DISABLED="api_disabled",e}(fn||{}),pn=function(e){return e.PRIVATE="private",e.PUBLIC="public",e.FRIEND="friend",e}(pn||{}),bn=function(e){return e.VALIDATOR="validator",e.FULL_NODE="full_node",e}(bn||{}),mn={description:"Account data\n\n A simplified version of the onchain Account resource",properties:{sequence_number:{type:"U64",isRequired:!0},authentication_key:{type:"HexEncodedBytes",isRequired:!0}}},hn={type:"one-of",description:"Account signature scheme\n\n The account signature scheme allows you to have two types of accounts:\n\n 1. A single Ed25519 key account, one private key\n 2. A k-of-n multi-Ed25519 key account, multiple private keys, such that k-of-n must sign a transaction.",contains:[{type:"AccountSignature_Ed25519Signature"},{type:"AccountSignature_MultiEd25519Signature"}]},gn={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"Ed25519Signature"}]},yn={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"MultiEd25519Signature"}]},vn={type:"string",description:"A hex encoded 32 byte Aptos account address.\n\n This is represented in a string as a 64 character hex string, sometimes\n shortened by stripping leading 0s, and adding a 0x.\n\n For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.\n ",format:"hex"},wn={description:"This is the generic struct we use for all API errors, it contains a string\n message and an Aptos API specific error code.",properties:{message:{type:"string",description:"A message describing the error",isRequired:!0},error_code:{type:"AptosErrorCode",isRequired:!0},vm_error_code:{type:"number",description:"A code providing VM error details when submitting transactions to the VM",format:"uint64"}}},kn={type:"Enum"},An={description:"A Block with or without transactions\n\n This contains the information about a transactions along with\n associated transactions if requested",properties:{block_height:{type:"U64",isRequired:!0},block_hash:{type:"HashValue",isRequired:!0},block_timestamp:{type:"U64",isRequired:!0},first_version:{type:"U64",isRequired:!0},last_version:{type:"U64",isRequired:!0},transactions:{type:"array",contains:{type:"Transaction"}}}},xn={description:"A block metadata transaction\n\n This signifies the beginning of a block, and contains information\n about the specific block",properties:{version:{type:"U64",isRequired:!0},hash:{type:"HashValue",isRequired:!0},state_change_hash:{type:"HashValue",isRequired:!0},event_root_hash:{type:"HashValue",isRequired:!0},state_checkpoint_hash:{type:"HashValue"},gas_used:{type:"U64",isRequired:!0},success:{type:"boolean",description:"Whether the transaction was successful",isRequired:!0},vm_status:{type:"string",description:"The VM status of the transaction, can tell useful information in a failure",isRequired:!0},accumulator_root_hash:{type:"HashValue",isRequired:!0},changes:{type:"array",contains:{type:"WriteSetChange"},isRequired:!0},id:{type:"HashValue",isRequired:!0},epoch:{type:"U64",isRequired:!0},round:{type:"U64",isRequired:!0},events:{type:"array",contains:{type:"Event"},isRequired:!0},previous_block_votes_bitvec:{type:"array",contains:{type:"number",format:"uint8"},isRequired:!0},proposer:{type:"Address",isRequired:!0},failed_proposer_indices:{type:"array",contains:{type:"number",format:"uint32"},isRequired:!0},timestamp:{type:"U64",isRequired:!0}}},In={description:"Decoded table data",properties:{key:{description:"Key of table in JSON",properties:{},isRequired:!0},key_type:{type:"string",description:"Type of key",isRequired:!0},value:{description:"Value of table in JSON",properties:{},isRequired:!0},value_type:{type:"string",description:"Type of value",isRequired:!0}}},Tn={description:"Deleted table data",properties:{key:{description:"Deleted key",properties:{},isRequired:!0},key_type:{type:"string",description:"Deleted key type",isRequired:!0}}},Sn={description:"Delete a module",properties:{address:{type:"Address",isRequired:!0},state_key_hash:{type:"string",description:"State key hash",isRequired:!0},module:{type:"MoveModuleId",isRequired:!0}}},Cn={description:"Delete a resource",properties:{address:{type:"Address",isRequired:!0},state_key_hash:{type:"string",description:"State key hash",isRequired:!0},resource:{type:"MoveStructTag",isRequired:!0}}},En={description:"Delete a table item",properties:{state_key_hash:{type:"string",isRequired:!0},handle:{type:"HexEncodedBytes",isRequired:!0},key:{type:"HexEncodedBytes",isRequired:!0},data:{type:"DeletedTableData"}}},Rn={properties:{changes:{type:"array",contains:{type:"WriteSetChange"},isRequired:!0},events:{type:"array",contains:{type:"Event"},isRequired:!0}}},Mn={description:"A single Ed25519 signature",properties:{public_key:{type:"HexEncodedBytes",isRequired:!0},signature:{type:"HexEncodedBytes",isRequired:!0}}},Pn={description:"Request to encode a submission",properties:{sender:{type:"Address",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},max_gas_amount:{type:"U64",isRequired:!0},gas_unit_price:{type:"U64",isRequired:!0},expiration_timestamp_secs:{type:"U64",isRequired:!0},payload:{type:"TransactionPayload",isRequired:!0},secondary_signers:{type:"array",contains:{type:"Address"}}}},Un={type:"string",description:"Entry function id is string representation of a entry function defined on-chain.\n\n Format: `{address}::{module name}::{function name}`\n\n Both `module name` and `function name` are case-sensitive.\n "},_n={description:"Payload which runs a single entry function",properties:{function:{type:"EntryFunctionId",isRequired:!0},type_arguments:{type:"array",contains:{type:"MoveType"},isRequired:!0},arguments:{type:"array",contains:{properties:{}},isRequired:!0}}},Bn={description:"An event from a transaction",properties:{guid:{type:"EventGuid",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},type:{type:"MoveType",isRequired:!0},data:{description:"The JSON representation of the event",properties:{},isRequired:!0}}},Dn={properties:{creation_number:{type:"U64",isRequired:!0},account_address:{type:"Address",isRequired:!0}}},Nn={description:"Struct holding the outputs of the estimate gas API",properties:{deprioritized_gas_estimate:{type:"number",description:"The deprioritized estimate for the gas unit price",format:"uint64"},gas_estimate:{type:"number",description:"The current estimate for the gas unit price",isRequired:!0,format:"uint64"},prioritized_gas_estimate:{type:"number",description:"The prioritized estimate for the gas unit price",format:"uint64"}}},On={type:"one-of",description:"The writeset payload of the Genesis transaction",contains:[{type:"GenesisPayload_WriteSetPayload"}]},Fn={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"WriteSetPayload"}]},Ln={description:"The genesis transaction\n\n This only occurs at the genesis transaction (version 0)",properties:{version:{type:"U64",isRequired:!0},hash:{type:"HashValue",isRequired:!0},state_change_hash:{type:"HashValue",isRequired:!0},event_root_hash:{type:"HashValue",isRequired:!0},state_checkpoint_hash:{type:"HashValue"},gas_used:{type:"U64",isRequired:!0},success:{type:"boolean",description:"Whether the transaction was successful",isRequired:!0},vm_status:{type:"string",description:"The VM status of the transaction, can tell useful information in a failure",isRequired:!0},accumulator_root_hash:{type:"HashValue",isRequired:!0},changes:{type:"array",contains:{type:"WriteSetChange"},isRequired:!0},payload:{type:"GenesisPayload",isRequired:!0},events:{type:"array",contains:{type:"Event"},isRequired:!0}}},jn={type:"string"},Hn={description:"Representation of a successful healthcheck",properties:{message:{type:"string",isRequired:!0}}},Gn={type:"string",description:"All bytes (Vec) data is represented as hex-encoded string prefixed with `0x` and fulfilled with\n two hex digits per byte.\n\n Unlike the `Address` type, HexEncodedBytes will not trim any zeros.\n ",format:"hex"},zn={type:"string"},Kn={description:'The struct holding all data returned to the client by the\n index endpoint (i.e., GET "/"). Only for responding in JSON',properties:{chain_id:{type:"number",description:"Chain ID of the current chain",isRequired:!0,format:"uint8"},epoch:{type:"U64",isRequired:!0},ledger_version:{type:"U64",isRequired:!0},oldest_ledger_version:{type:"U64",isRequired:!0},ledger_timestamp:{type:"U64",isRequired:!0},node_role:{type:"RoleType",isRequired:!0},oldest_block_height:{type:"U64",isRequired:!0},block_height:{type:"U64",isRequired:!0},git_hash:{type:"string",description:"Git hash of the build of the API endpoint. Can be used to determine the exact\n software version used by the API endpoint."}}},Wn={properties:{modules:{type:"array",contains:{type:"MoveModuleBytecode"},isRequired:!0}}},Zn={type:"string"},Vn={description:"Move function",properties:{name:{type:"IdentifierWrapper",isRequired:!0},visibility:{type:"MoveFunctionVisibility",isRequired:!0},is_entry:{type:"boolean",description:"Whether the function can be called as an entry function directly in a transaction",isRequired:!0},generic_type_params:{type:"array",contains:{type:"MoveFunctionGenericTypeParam"},isRequired:!0},params:{type:"array",contains:{type:"MoveType"},isRequired:!0},return:{type:"array",contains:{type:"MoveType"},isRequired:!0}}},qn={description:"Move function generic type param",properties:{constraints:{type:"array",contains:{type:"MoveAbility"},isRequired:!0}}},Qn={type:"Enum"},Jn={description:"A Move module",properties:{address:{type:"Address",isRequired:!0},name:{type:"IdentifierWrapper",isRequired:!0},friends:{type:"array",contains:{type:"MoveModuleId"},isRequired:!0},exposed_functions:{type:"array",contains:{type:"MoveFunction"},isRequired:!0},structs:{type:"array",contains:{type:"MoveStruct"},isRequired:!0}}},Yn={description:"Move module bytecode along with it's ABI",properties:{bytecode:{type:"HexEncodedBytes",isRequired:!0},abi:{type:"MoveModule"}}},Xn={type:"string",description:"Move module id is a string representation of Move module.\n\n Format: `{address}::{module name}`\n\n `address` should be hex-encoded 32 byte account address that is prefixed with `0x`.\n\n Module name is case-sensitive.\n "},$n={description:"A parsed Move resource",properties:{type:{type:"MoveStructTag",isRequired:!0},data:{type:"MoveStructValue",isRequired:!0}}},ea={description:"Move script bytecode",properties:{bytecode:{type:"HexEncodedBytes",isRequired:!0},abi:{type:"MoveFunction"}}},ta={description:"A move struct",properties:{name:{type:"IdentifierWrapper",isRequired:!0},is_native:{type:"boolean",description:"Whether the struct is a native struct of Move",isRequired:!0},abilities:{type:"array",contains:{type:"MoveAbility"},isRequired:!0},generic_type_params:{type:"array",contains:{type:"MoveStructGenericTypeParam"},isRequired:!0},fields:{type:"array",contains:{type:"MoveStructField"},isRequired:!0}}},na={description:"Move struct field",properties:{name:{type:"IdentifierWrapper",isRequired:!0},type:{type:"MoveType",isRequired:!0}}},aa={description:"Move generic type param",properties:{constraints:{type:"array",contains:{type:"MoveAbility"},isRequired:!0}}},oa={type:"string",description:"String representation of a MoveStructTag (on-chain Move struct type). This exists so you\n can specify MoveStructTags as path / query parameters, e.g. for get_events_by_event_handle.\n\n It is a combination of:\n 1. `move_module_address`, `module_name` and `struct_name`, all joined by `::`\n 2. `struct generic type parameters` joined by `, `\n\n Examples:\n * `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>`\n * `0x1::account::Account`\n\n Note:\n 1. Empty chars should be ignored when comparing 2 struct tag ids.\n 2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).\n\n See [doc](https://aptos.dev/concepts/accounts) for more details.\n ",pattern:"^0x[0-9a-zA-Z:_<>]+$"},ra={description:'This is a JSON representation of some data within an account resource. More specifically,\n it is a map of strings to arbitrary JSON values / objects, where the keys are top level\n fields within the given resource.\n\n To clarify, you might query for 0x1::account::Account and see the example data.\n\n Move `bool` type value is serialized into `boolean`.\n\n Move `u8`, `u16` and `u32` type value is serialized into `integer`.\n\n Move `u64`, `u128` and `u256` type value is serialized into `string`.\n\n Move `address` type value (32 byte Aptos account address) is serialized into a HexEncodedBytes string.\n For example:\n - `0x1`\n - `0x1668f6be25668c1a17cd8caf6b8d2f25`\n\n Move `vector` type value is serialized into `array`, except `vector` which is serialized into a\n HexEncodedBytes string with `0x` prefix.\n For example:\n - `vector{255, 255}` => `["255", "255"]`\n - `vector{255, 255}` => `0xffff`\n\n Move `struct` type value is serialized into `object` that looks like this (except some Move stdlib types, see the following section):\n ```json\n {\n field1_name: field1_value,\n field2_name: field2_value,\n ......\n }\n ```\n\n For example:\n `{ "created": "0xa550c18", "role_id": "0" }`\n\n **Special serialization for Move stdlib types**:\n - [0x1::string::String](https://github.com/aptos-labs/aptos-core/blob/main/language/move-stdlib/docs/ascii.md)\n is serialized into `string`. For example, struct value `0x1::string::String{bytes: b"Hello World!"}`\n is serialized as `"Hello World!"` in JSON.\n ',properties:{}},ia={type:"string",description:"String representation of an on-chain Move type tag that is exposed in transaction payload.\n Values:\n - bool\n - u8\n - u16\n - u32\n - u64\n - u128\n - u256\n - address\n - signer\n - vector: `vector<{non-reference MoveTypeId}>`\n - struct: `{address}::{module_name}::{struct_name}::<{generic types}>`\n\n Vector type value examples:\n - `vector`\n - `vector>`\n - `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>`\n\n Struct type value examples:\n - `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>\n - `0x1::account::Account`\n\n Note:\n 1. Empty chars should be ignored when comparing 2 struct tag ids.\n 2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).\n ",pattern:"^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$"},sa={type:"any-of",description:"An enum of the possible Move value types",contains:[{type:"number",format:"uint8"},{type:"number",format:"uint16"},{type:"number",format:"uint32"},{type:"U64"},{type:"U128"},{type:"U256"},{type:"boolean"},{type:"Address"},{type:"array",contains:{type:"MoveValue"}},{type:"HexEncodedBytes"},{type:"MoveStructValue"},{type:"string"}]},ca={description:"Multi agent signature for multi agent transactions\n\n This allows you to have transactions across multiple accounts",properties:{sender:{type:"AccountSignature",isRequired:!0},secondary_signer_addresses:{type:"array",contains:{type:"Address"},isRequired:!0},secondary_signers:{type:"array",contains:{type:"AccountSignature"},isRequired:!0}}},ua={description:"A Ed25519 multi-sig signature\n\n This allows k-of-n signing for a transaction",properties:{public_keys:{type:"array",contains:{type:"HexEncodedBytes"},isRequired:!0},signatures:{type:"array",contains:{type:"HexEncodedBytes"},isRequired:!0},threshold:{type:"number",description:"The number of signatures required for a successful transaction",isRequired:!0,format:"uint8"},bitmap:{type:"HexEncodedBytes",isRequired:!0}}},da={description:"A transaction waiting in mempool",properties:{hash:{type:"HashValue",isRequired:!0},sender:{type:"Address",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},max_gas_amount:{type:"U64",isRequired:!0},gas_unit_price:{type:"U64",isRequired:!0},expiration_timestamp_secs:{type:"U64",isRequired:!0},payload:{type:"TransactionPayload",isRequired:!0},signature:{type:"TransactionSignature"}}},la={description:"Table Item request for the GetTableItemRaw API",properties:{key:{type:"HexEncodedBytes",isRequired:!0}}},fa={type:"Enum"},pa={description:"Payload which runs a script that can run multiple functions",properties:{code:{type:"MoveScriptBytecode",isRequired:!0},type_arguments:{type:"array",contains:{type:"MoveType"},isRequired:!0},arguments:{type:"array",contains:{properties:{}},isRequired:!0}}},ba={properties:{execute_as:{type:"Address",isRequired:!0},script:{type:"ScriptPayload",isRequired:!0}}},ma={description:"A state checkpoint transaction",properties:{version:{type:"U64",isRequired:!0},hash:{type:"HashValue",isRequired:!0},state_change_hash:{type:"HashValue",isRequired:!0},event_root_hash:{type:"HashValue",isRequired:!0},state_checkpoint_hash:{type:"HashValue"},gas_used:{type:"U64",isRequired:!0},success:{type:"boolean",description:"Whether the transaction was successful",isRequired:!0},vm_status:{type:"string",description:"The VM status of the transaction, can tell useful information in a failure",isRequired:!0},accumulator_root_hash:{type:"HashValue",isRequired:!0},changes:{type:"array",contains:{type:"WriteSetChange"},isRequired:!0},timestamp:{type:"U64",isRequired:!0}}},ha={type:"string",description:"Representation of a StateKey as a hex string. This is used for cursor based pagination.\n "},ga={description:"A request to submit a transaction\n\n This requires a transaction and a signature of it",properties:{sender:{type:"Address",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},max_gas_amount:{type:"U64",isRequired:!0},gas_unit_price:{type:"U64",isRequired:!0},expiration_timestamp_secs:{type:"U64",isRequired:!0},payload:{type:"TransactionPayload",isRequired:!0},signature:{type:"TransactionSignature",isRequired:!0}}},ya={description:"Table Item request for the GetTableItem API",properties:{key_type:{type:"MoveType",isRequired:!0},value_type:{type:"MoveType",isRequired:!0},key:{description:"The value of the table item's key",properties:{},isRequired:!0}}},va={type:"one-of",description:"Enum of the different types of transactions in Aptos",contains:[{type:"Transaction_PendingTransaction"},{type:"Transaction_UserTransaction"},{type:"Transaction_GenesisTransaction"},{type:"Transaction_BlockMetadataTransaction"},{type:"Transaction_StateCheckpointTransaction"}]},wa={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"BlockMetadataTransaction"}]},ka={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"GenesisTransaction"}]},Aa={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"PendingTransaction"}]},xa={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"StateCheckpointTransaction"}]},Ia={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"UserTransaction"}]},Ta={type:"one-of",description:"An enum of the possible transaction payloads",contains:[{type:"TransactionPayload_EntryFunctionPayload"},{type:"TransactionPayload_ScriptPayload"},{type:"TransactionPayload_ModuleBundlePayload"}]},Sa={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"EntryFunctionPayload"}]},Ca={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"ModuleBundlePayload"}]},Ea={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"ScriptPayload"}]},Ra={description:"Information telling which batch submission transactions failed",properties:{error:{type:"AptosError",isRequired:!0},transaction_index:{type:"number",description:"The index of which transaction failed, same as submission order",isRequired:!0,format:"uint64"}}},Ma={description:"Batch transaction submission result\n\n Tells which transactions failed",properties:{transaction_failures:{type:"array",contains:{type:"TransactionsBatchSingleSubmissionFailure"},isRequired:!0}}},Pa={type:"one-of",description:"An enum representing the different transaction signatures available",contains:[{type:"TransactionSignature_Ed25519Signature"},{type:"TransactionSignature_MultiEd25519Signature"},{type:"TransactionSignature_MultiAgentSignature"}]},Ua={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"Ed25519Signature"}]},_a={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"MultiAgentSignature"}]},Ba={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"MultiEd25519Signature"}]},Da={type:"string",description:"A string containing a 128-bit unsigned integer.\n\n We represent u128 values as a string to ensure compatibility with languages such\n as JavaScript that do not parse u128s in JSON natively.\n ",format:"uint128"},Na={type:"string",description:"A string containing a 256-bit unsigned integer.\n\n We represent u256 values as a string to ensure compatibility with languages such\n as JavaScript that do not parse u256s in JSON natively.\n ",format:"uint256"},Oa={type:"string",description:"A string containing a 64-bit unsigned integer.\n\n We represent u64 values as a string to ensure compatibility with languages such\n as JavaScript that do not parse u64s in JSON natively.\n ",format:"uint64"},Fa={description:"A transaction submitted by a user to change the state of the blockchain",properties:{version:{type:"U64",isRequired:!0},hash:{type:"HashValue",isRequired:!0},state_change_hash:{type:"HashValue",isRequired:!0},event_root_hash:{type:"HashValue",isRequired:!0},state_checkpoint_hash:{type:"HashValue"},gas_used:{type:"U64",isRequired:!0},success:{type:"boolean",description:"Whether the transaction was successful",isRequired:!0},vm_status:{type:"string",description:"The VM status of the transaction, can tell useful information in a failure",isRequired:!0},accumulator_root_hash:{type:"HashValue",isRequired:!0},changes:{type:"array",contains:{type:"WriteSetChange"},isRequired:!0},sender:{type:"Address",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},max_gas_amount:{type:"U64",isRequired:!0},gas_unit_price:{type:"U64",isRequired:!0},expiration_timestamp_secs:{type:"U64",isRequired:!0},payload:{type:"TransactionPayload",isRequired:!0},signature:{type:"TransactionSignature"},events:{type:"array",contains:{type:"Event"},isRequired:!0},timestamp:{type:"U64",isRequired:!0}}},La={description:"An event from a transaction with a version",properties:{version:{type:"U64",isRequired:!0},guid:{type:"EventGuid",isRequired:!0},sequence_number:{type:"U64",isRequired:!0},type:{type:"MoveType",isRequired:!0},data:{description:"The JSON representation of the event",properties:{},isRequired:!0}}},ja={description:"View request for the Move View Function API",properties:{function:{type:"EntryFunctionId",isRequired:!0},type_arguments:{type:"array",contains:{type:"MoveType"},isRequired:!0},arguments:{type:"array",contains:{properties:{}},isRequired:!0}}},Ha={description:"Write a new module or update an existing one",properties:{address:{type:"Address",isRequired:!0},state_key_hash:{type:"string",description:"State key hash",isRequired:!0},data:{type:"MoveModuleBytecode",isRequired:!0}}},Ga={description:"Write a resource or update an existing one",properties:{address:{type:"Address",isRequired:!0},state_key_hash:{type:"string",description:"State key hash",isRequired:!0},data:{type:"MoveResource",isRequired:!0}}},za={type:"one-of",description:"The associated writeset with a payload",contains:[{type:"WriteSet_ScriptWriteSet"},{type:"WriteSet_DirectWriteSet"}]},Ka={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"DirectWriteSet"}]},Wa={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"ScriptWriteSet"}]},Za={type:"one-of",description:"A final state change of a transaction on a resource or module",contains:[{type:"WriteSetChange_DeleteModule"},{type:"WriteSetChange_DeleteResource"},{type:"WriteSetChange_DeleteTableItem"},{type:"WriteSetChange_WriteModule"},{type:"WriteSetChange_WriteResource"},{type:"WriteSetChange_WriteTableItem"}]},Va={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"DeleteModule"}]},qa={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"DeleteResource"}]},Qa={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"DeleteTableItem"}]},Ja={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"WriteModule"}]},Ya={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"WriteResource"}]},Xa={type:"all-of",contains:[{properties:{type:{type:"string",isRequired:!0}}},{type:"WriteTableItem"}]},$a={description:"A writeset payload, used only for genesis",properties:{write_set:{type:"WriteSet",isRequired:!0}}},eo={description:"Change set to write a table item",properties:{state_key_hash:{type:"string",isRequired:!0},handle:{type:"HexEncodedBytes",isRequired:!0},key:{type:"HexEncodedBytes",isRequired:!0},value:{type:"HexEncodedBytes",isRequired:!0},data:{type:"DecodedTableData"}}},to=n(44953),no=new Qe(Ie.fromHex("0x1"),new Ne("string"),new Ne("String"),[]);function ao(e,t,n){if(!(null==t?void 0:t.includes(typeof e)))throw new Error(n||"Invalid arg: ".concat(e," type should be ").concat(t instanceof Array?t.join(" or "):t))}function oo(e){throw new Error(e)}function ro(e){return!!e.match(/\s/)}function io(e){return!!e.match(/[_A-Za-z0-9]/g)}function so(e,t){var n=e[t];if(":"===n){if("::"===e.slice(t,t+2))return[["COLON","::"],2];oo("Unrecognized token.")}else{if("<"===n)return[["LT","<"],1];if(">"===n)return[["GT",">"],1];if(","===n)return[["COMMA",","],1];if(ro(n)){for(var a="",o=t;o0&&this.tokens[0][1]===e))&&(this.consume(","),!(this.tokens.length>0&&this.tokens[0][1]===e&&t));)this.tokens.length<=0&&oo("Invalid type tag.");return n}},{key:"parseTypeTag",value:function(){0===this.tokens.length&&oo("Invalid type tag.");var e=this.tokens.shift(),t=u(e,2),n=t[0],a=t[1];if("u8"===a)return new Le;if("u16"===a)return new je;if("u32"===a)return new He;if("u64"===a)return new Ge;if("u128"===a)return new ze;if("u256"===a)return new Ke;if("bool"===a)return new Fe;if("address"===a)return new We;if("vector"===a){this.consume("<");var o=this.parseTypeTag();return this.consume(">"),new Ve(o)}if("IDENT"===n&&(a.startsWith("0x")||a.startsWith("0X"))){var r=a;this.consume("::");var i=this.tokens.shift(),s=u(i,2),c=s[0],d=s[1];"IDENT"!==c&&oo("Invalid type tag."),this.consume("::");var l=this.tokens.shift(),f=u(l,2),p=f[0],b=f[1];"IDENT"!==p&&oo("Invalid type tag.");var m=[];this.tokens.length>0&&"<"===this.tokens[0][1]&&(this.consume("<"),m=this.parseCommaList(">",!0),this.consume(">"));var h=new Qe(Ie.fromHex(r),new Ne(d),new Ne(b),m);return new qe(h)}throw new Error("Invalid type tag.")}}]),e}();function uo(e){if(ao(e,["boolean","string"]),"boolean"===typeof e)return e;if("true"===e)return!0;if("false"===e)return!1;throw new Error("Invalid boolean string.")}function lo(e){if(ao(e,["number","string"]),"number"===typeof e)return e;var t=Number.parseInt(e,10);if(Number.isNaN(t))throw new Error("Invalid number string.");return t}function fo(e){return ao(e,["number","bigint","string"]),BigInt(e)}function po(e,t,n){if(t instanceof Fe)n.serializeBool(uo(e));else if(t instanceof Le)n.serializeU8(lo(e));else if(t instanceof je)n.serializeU16(lo(e));else if(t instanceof He)n.serializeU32(lo(e));else if(t instanceof Ge)n.serializeU64(fo(e));else if(t instanceof ze)n.serializeU128(fo(e));else if(t instanceof Ke)n.serializeU256(fo(e));else{if(!(t instanceof We)){if(t instanceof Ve){if(t.value instanceof Le){if(e instanceof Uint8Array)return void n.serializeBytes(e);if("string"===typeof e)return void n.serializeStr(e)}if(!(e instanceof Array))throw new Error("Invalid vector args.");return n.serializeU32AsUleb128(e.length),void e.forEach((function(e){return po(e,t.value,n)}))}if(t instanceof qe){var a=t.value,o=a.address,r=a.module_name,i=a.name;if("0x1::string::String"!=="".concat(H.fromUint8Array(o.address).toShortString(),"::").concat(r.value,"::").concat(i.value))throw new Error("The only supported struct arg is of type 0x1::string::String");return ao(e,["string"]),void n.serializeStr(e)}throw new Error("Unsupported arg type.")}var s;if("string"===typeof e||e instanceof H)s=Ie.fromHex(e);else{if(!(e instanceof Ie))throw new Error("Invalid account address.");s=e}s.serialize(n)}}var bo,mo,ho=function(){function e(t,n){b(this,e),this.rawTxnBuilder=n,this.signingFunction=t}return m(e,[{key:"build",value:function(e,t,n){if(!this.rawTxnBuilder)throw new Error("this.rawTxnBuilder doesn't exist.");return this.rawTxnBuilder.build(e,t,n)}}],[{key:"getSigningMessage",value:function(e){var t=to.sha3_256.create();if(e instanceof Je)t.update("APTOS::RawTransaction");else{if(!(e instanceof rt))throw new Error("Unknown transaction type.");t.update("APTOS::RawTransactionWithData")}var n=t.digest(),a=fe(e),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),o}}]),e}(),go=function(e){l(n,e);var t=f(n);function n(e,a,o){var r;return b(this,n),(r=t.call(this,e,o)).publicKey=a,r}return m(n,[{key:"rawToSigned",value:function(e){var t=ho.getSigningMessage(e),n=this.signingFunction(t),a=new Me(new Te(this.publicKey),n);return new at(e,a)}},{key:"sign",value:function(e){return fe(this.rawToSigned(e))}}]),n}(ho),yo=function(e){l(n,e);var t=f(n);function n(e,a){var o;return b(this,n),(o=t.call(this,e)).publicKey=a,o}return m(n,[{key:"rawToSigned",value:function(e){var t=ho.getSigningMessage(e),n=this.signingFunction(t),a=new Pe(this.publicKey,n);return new at(e,a)}},{key:"sign",value:function(e){return fe(this.rawToSigned(e))}}]),n}(ho),vo=function(){function e(t,n){var a=this;b(this,e),this.abiMap=new Map,t.forEach((function(e){var t,n=new ce(e),o=It.deserialize(n);if(o instanceof St){var r=o,i=r.module_name,s=i.address,c=i.name;t="".concat(H.fromUint8Array(s.address).toShortString(),"::").concat(c.value,"::").concat(r.name)}else{t=o.name}if(a.abiMap.has(t))throw new Error("Found conflicting ABI interfaces");a.abiMap.set(t,o)})),this.builderConfig=s({maxGasAmount:BigInt(W),expSecFromNow:20},n)}return m(e,[{key:"setSequenceNumber",value:function(e){this.builderConfig.sequenceNumber=BigInt(e)}},{key:"buildTransactionPayload",value:function(t,n,a){var o,r=n.map((function(e){return new co(e).parseTypeTag()}));if(!this.abiMap.has(t))throw new Error("Cannot find function: ".concat(t));var i=this.abiMap.get(t);if(i instanceof St){var s=i,c=e.toBCSArgs(s.args,a);o=new ct(new Xe(s.module_name,new Ne(s.name),r,c))}else{if(!(i instanceof Tt))throw new Error("Unknown ABI format.");var u=i,d=e.toTransactionArguments(u.args,a);o=new st(new Ye(u.code,r,d))}return o}},{key:"build",value:function(e,t,n){var a=this.builderConfig,o=a.sender,r=a.sequenceNumber,i=a.gasUnitPrice,s=a.maxGasAmount,c=a.expSecFromNow,u=a.chainId;if(!i)throw new Error("No gasUnitPrice provided.");var d=o instanceof Ie?o:Ie.fromHex(o),l=BigInt(Math.floor(Date.now()/1e3)+Number(c)),f=this.buildTransactionPayload(e,t,n);if(f)return new Je(d,BigInt(r),f,BigInt(s),BigInt(i),l,new ut(Number(u)));throw new Error("Invalid ABI.")}}],[{key:"toBCSArgs",value:function(e,t){if(e.length!==t.length)throw new Error("Wrong number of args provided.");return t.map((function(t,n){var a=new ie;return po(t,e[n].type_tag,a),a.getBytes()}))}},{key:"toTransactionArguments",value:function(e,t){if(e.length!==t.length)throw new Error("Wrong number of args provided.");return t.map((function(t,n){return function(e,t){if(t instanceof Fe)return new vt(uo(e));if(t instanceof Le)return new lt(lo(e));if(t instanceof je)return new ft(lo(e));if(t instanceof He)return new pt(lo(e));if(t instanceof Ge)return new bt(fo(e));if(t instanceof ze)return new mt(fo(e));if(t instanceof Ke)return new ht(fo(e));if(t instanceof We){var n;if("string"===typeof e||e instanceof H)n=Ie.fromHex(e);else{if(!(e instanceof Ie))throw new Error("Invalid account address.");n=e}return new gt(n)}if(t instanceof Ve&&t.value instanceof Le){if(!(e instanceof Uint8Array))throw new Error("".concat(e," should be an instance of Uint8Array"));return new yt(e)}throw new Error("Unknown type for TransactionArgument.")}(t,e[n].type_tag)}))}}]),e}(),wo=function(){function e(t,n){b(this,e),this.aptosClient=t,this.builderConfig=n}return m(e,[{key:"fetchABI",value:function(){var e=p(c().mark((function e(t){var n,a,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.aptosClient.getAccountModules(t);case 2:return n=e.sent,a=n.map((function(e){return e.abi})).flatMap((function(e){return e.exposed_functions.filter((function(e){return e.is_entry})).map((function(t){return s({fullName:"".concat(e.address,"::").concat(e.name,"::").concat(t.name)},t)}))})),o=new Map,a.forEach((function(e){o.set(e.fullName,e)})),e.abrupt("return",o);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"build",value:function(){var e=p(c().mark((function e(t,n,a){var o,i,d,l,f,p,b,m,h,g,v,w,k,A,x,I,T,S,C;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(e){return e.replace(/^0[xX]0*/g,"0x")}(t),3===t.split("::").length){e.next=5;break}throw new Error("'func' needs to be a fully qualified function name in format
::::, e.g. 0x1::coins::transfer");case 5:return o=t.split("::"),i=u(o,2),d=i[0],l=i[1],e.next=8,this.fetchABI(d);case 8:if((f=e.sent).has(t)){e.next=11;break}throw new Error("".concat(t," doesn't exist."));case 11:return p=f.get(t),b=p.params.filter((function(e){return"signer"!==e&&"&signer"!==e})),m=b.map((function(e,t){return new xt("var".concat(t),new co(e).parseTypeTag())})),h=new St(p.name,et.fromStr("".concat(d,"::").concat(l)),"",p.generic_type_params.map((function(e,t){return new At("".concat(t))})),m),g=this.builderConfig,v=g.sender,w=r(g,y),k=v instanceof Ie?H.fromUint8Array(v.address):v,e.next=19,Promise.all([(null==w?void 0:w.sequenceNumber)?Promise.resolve({sequence_number:null==w?void 0:w.sequenceNumber}):this.aptosClient.getAccount(k),(null==w?void 0:w.chainId)?Promise.resolve(null==w?void 0:w.chainId):this.aptosClient.getChainId(),(null==w?void 0:w.gasUnitPrice)?Promise.resolve({gas_estimate:null==w?void 0:w.gasUnitPrice}):this.aptosClient.estimateGasPrice()]);case 19:return A=e.sent,x=u(A,3),I=x[0].sequence_number,T=x[1],S=x[2].gas_estimate,C=new vo([fe(h)],s({sender:v,sequenceNumber:I,chainId:T,gasUnitPrice:BigInt(S)},w)),e.abrupt("return",C.build(t,n,a));case 26:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()}]),e}();E([(bo=6e5,V({ttlMs:bo,hashFunction:mo}))],wo.prototype,"fetchABI",1);var ko=function(){function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(b(this,e),!t)throw new Error("Node URL cannot be empty.");var o=void 0===n||null===n?{}:s({},n);this.nodeUrl=a?t:function(e){var t="".concat(e);return t.endsWith("/")&&(t=t.substring(0,t.length-1)),t.endsWith(K)||(t="".concat(t).concat(K)),t}(t),o.BASE=this.nodeUrl,!1===(null==n?void 0:n.WITH_CREDENTIALS)?o.WITH_CREDENTIALS=!1:o.WITH_CREDENTIALS=!0,this.client=new dn(o)}return m(e,[{key:"getAccount",value:function(){var e=p(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.accounts.getAccount(H.ensure(t).hex()));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getAccountTransactions",value:function(){var e=p(c().mark((function e(t,n){var a;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.transactions.getAccountTransactions(H.ensure(t).hex(),null==(a=null==n?void 0:n.start)?void 0:a.toString(),null==n?void 0:n.limit));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getAccountModules",value:function(){var e=p(c().mark((function e(t,n){var a,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.client.accounts.getAccountModules.bind({httpRequest:this.client.request}),e.next=3,J(a,t,1e3,n);case 3:return o=e.sent,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getAccountModule",value:function(){var e=p(c().mark((function e(t,n,a){var o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.accounts.getAccountModule(H.ensure(t).hex(),n,null==(o=null==a?void 0:a.ledgerVersion)?void 0:o.toString()));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getAccountResources",value:function(){var e=p(c().mark((function e(t,n){var a,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.client.accounts.getAccountResources.bind({httpRequest:this.client.request}),e.next=3,J(a,t,9999,n);case 3:return o=e.sent,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getAccountResource",value:function(){var e=p(c().mark((function e(t,n,a){var o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.accounts.getAccountResource(H.ensure(t).hex(),n,null==(o=null==a?void 0:a.ledgerVersion)?void 0:o.toString()));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"generateTransaction",value:function(){var e=p(c().mark((function e(t,n,a){var o,r,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={sender:t},(null==a?void 0:a.sequence_number)&&(o.sequenceNumber=a.sequence_number),(null==a?void 0:a.gas_unit_price)&&(o.gasUnitPrice=a.gas_unit_price),(null==a?void 0:a.max_gas_amount)&&(o.maxGasAmount=a.max_gas_amount),(null==a?void 0:a.expiration_timestamp_secs)&&(r=Number.parseInt(a.expiration_timestamp_secs,10),o.expSecFromNow=r-Math.floor(Date.now()/1e3)),i=new wo(this,o),e.abrupt("return",i.build(n.function,n.type_arguments,n.arguments));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"signTransaction",value:function(){var t=p(c().mark((function t(n,a){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.resolve(e.generateBCSTransaction(n,a)));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"getEventsByCreationNumber",value:function(){var e=p(c().mark((function e(t,n,a){var o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.events.getEventsByCreationNumber(H.ensure(t).hex(),n.toString(),null==(o=null==a?void 0:a.start)?void 0:o.toString(),null==a?void 0:a.limit));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getEventsByEventHandle",value:function(){var e=p(c().mark((function e(t,n,a,o){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.events.getEventsByEventHandle(H.ensure(t).hex(),n,a,null==(r=null==o?void 0:o.start)?void 0:r.toString(),null==o?void 0:o.limit));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"submitTransaction",value:function(){var e=p(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.submitSignedBCSTransaction(t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"simulateTransaction",value:function(){var t=p(c().mark((function t(n,a,o){var r,i,s;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n instanceof Mt?r=e.generateBCSSimulation(n,a):n instanceof Ce?(i=new yo((function(){for(var e=n.threshold,t=[],a=[],o=0;o=r)){e.next=7;break}return e.abrupt("break",27);case 7:return e.prev=7,e.next=10,this.client.transactions.getTransactionByHash(t);case 10:if(d=e.sent,s="pending_transaction"===d.type){e.next=14;break}return e.abrupt("break",27);case 14:e.next=22;break;case 16:if(e.prev=16,e.t0=e.catch(7),l=e.t0 instanceof Nt,f=l&&404!==e.t0.status&&e.t0.status>=400&&e.t0.status<500,l&&!f){e.next=22;break}throw e.t0;case 22:return e.next=24,G(1e3);case 24:u+=1,e.next=4;break;case 27:if(void 0!==d){e.next=29;break}throw new Error("Waiting for transaction ".concat(t," failed"));case 29:if(!s){e.next=31;break}throw new Io("Waiting for transaction ".concat(t," timed out after ").concat(r," seconds"),d);case 31:if(i){e.next=33;break}return e.abrupt("return",d);case 33:if(null==d?void 0:d.success){e.next=35;break}throw new To("Transaction ".concat(t," committed to the blockchain but execution failed"),d);case 35:return e.abrupt("return",d);case 36:case"end":return e.stop()}}),e,this,[[7,16]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"waitForTransaction",value:function(){var e=p(c().mark((function e(t,n){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.waitForTransactionWithResult(t,n);case 2:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getLedgerInfo",value:function(){var e=p(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.general.getLedgerInfo());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getChainId",value:function(){var e=p(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getLedgerInfo();case 2:return t=e.sent,e.abrupt("return",t.chain_id);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getTableItem",value:function(){var e=p(c().mark((function e(t,n,a){var o,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.tables.getTableItem(t,n,null==(o=null==a?void 0:a.ledgerVersion)?void 0:o.toString());case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"generateRawTransaction",value:function(){var e=p(c().mark((function e(t,n,a){var o,r,i,d,l,f,p,b,m;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this.getAccount(t),this.getChainId(),(null==a?void 0:a.gasUnitPrice)?Promise.resolve({gas_estimate:a.gasUnitPrice}):this.estimateGasPrice()]);case 2:return o=e.sent,r=u(o,3),i=r[0].sequence_number,d=r[1],l=r[2].gas_estimate,f=s({maxGasAmount:BigInt(W),gasUnitPrice:BigInt(l),expireTimestamp:BigInt(Math.floor(Date.now()/1e3)+20)},a),p=f.maxGasAmount,b=f.gasUnitPrice,m=f.expireTimestamp,e.abrupt("return",new X.RawTransaction(X.AccountAddress.fromHex(t),BigInt(i),n,p,b,m,new X.ChainId(d)));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"generateSignSubmitTransaction",value:function(){var t=p(c().mark((function t(n,a,o){var r,i,s;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.generateRawTransaction(n.address(),a,o);case 2:return r=t.sent,i=e.generateBCSTransaction(n,r),t.next=6,this.submitSignedBCSTransaction(i);case 6:return s=t.sent,t.abrupt("return",s.hash);case 8:case"end":return t.stop()}}),t,this)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"publishPackage",value:function(){var e=p(c().mark((function e(t,n,a,o){var r,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new ie,ue(a,r),i=new X.TransactionPayloadEntryFunction(X.EntryFunction.natural("0x1::code","publish_package_txn",[],[we(n),r.getBytes()])),e.abrupt("return",this.generateSignSubmitTransaction(t,i,o));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"generateSignSubmitWaitForTransaction",value:function(){var e=p(c().mark((function e(t,n,a){var o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.generateSignSubmitTransaction(t,n,a);case 2:return o=e.sent,e.abrupt("return",this.waitForTransactionWithResult(o,a));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"estimateGasPrice",value:function(){var e=p(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.transactions.estimateGasPrice());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"estimateMaxGasAmount",value:function(){var e=p(c().mark((function e(t){var n,a,o,r,i,s,d;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="0x1::coin::CoinStore<".concat(Z,">"),e.next=3,Promise.all([this.estimateGasPrice(),this.getAccountResources(t)]);case 3:return a=e.sent,o=u(a,2),r=o[0].gas_estimate,i=o[1],s=i.find((function(e){return e.type===n})),d=BigInt(s.data.coin.value),e.abrupt("return",d/BigInt(r));case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"rotateAuthKeyEd25519",value:function(){var t=p(c().mark((function t(n,a,o){var r,i,s,u,d,l,f,p,b,m,h;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getAccount(n.address());case 2:return r=t.sent,i=r.sequence_number,s=r.authentication_key,u=new Mt(a),d=new X.RotationProofChallenge(X.AccountAddress.CORE_CODE_ADDRESS,"account","RotationProofChallenge",BigInt(i),X.AccountAddress.fromHex(n.address()),new X.AccountAddress(new H(s).toUint8Array()),u.pubKey().toUint8Array()),l=H.fromUint8Array(fe(d)),f=n.signHexString(l),p=u.signHexString(l),b=new X.TransactionPayloadEntryFunction(X.EntryFunction.natural("0x1::account","rotate_authentication_key",[],[be(0),we(n.pubKey().toUint8Array()),be(0),we(u.pubKey().toUint8Array()),we(f.toUint8Array()),we(p.toUint8Array())])),t.next=13,this.generateRawTransaction(n.address(),b,o);case 13:return m=t.sent,h=e.generateBCSTransaction(n,m),t.abrupt("return",this.submitSignedBCSTransaction(h));case 16:case"end":return t.stop()}}),t,this)})));return function(e,n,a){return t.apply(this,arguments)}}()},{key:"lookupOriginalAddress",value:function(){var e=p(c().mark((function e(t){var n,a,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccountResource("0x1","0x1::account::OriginatingAddress");case 2:return n=e.sent,a=n.data.address_map.handle,e.next=6,this.getTableItem(a,{key_type:"address",value_type:"address",key:H.ensure(t).hex()});case 6:return o=e.sent,e.abrupt("return",new H(o));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getBlockByHeight",value:function(){var e=p(c().mark((function e(t,n){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.blocks.getBlockByHeight(t,n));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getBlockByVersion",value:function(){var e=p(c().mark((function e(t,n){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.blocks.getBlockByVersion(t,n));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"clearCache",value:function(e){!function(e){var t,n=new Set,a=g(e);try{for(a.s();!(t=a.n()).done;){var o=t.value,r=q.get(o);if(r){var i,s=g(r);try{for(s.s();!(i=s.n()).done;){var c=i.value;n.has(c)||(c.clear(),n.add(c))}}catch(u){s.e(u)}finally{s.f()}}}}catch(u){a.e(u)}finally{a.f()}n.size}(e)}}],[{key:"generateBCSTransaction",value:function(e,t){return new go((function(t){var n=e.signBuffer(t);return new X.Ed25519Signature(n.toUint8Array())}),e.pubKey().toUint8Array()).sign(t)}},{key:"generateBCSSimulation",value:function(e,t){return new go((function(e){var t=new Uint8Array(64);return new X.Ed25519Signature(t)}),e.pubKey().toUint8Array()).sign(t)}}]),e}(),Ao=ko;E([So],Ao.prototype,"getAccount",1),E([So],Ao.prototype,"getAccountTransactions",1),E([So],Ao.prototype,"getAccountModules",1),E([So],Ao.prototype,"getAccountModule",1),E([So],Ao.prototype,"getAccountResources",1),E([So],Ao.prototype,"getAccountResource",1),E([So],Ao.prototype,"getEventsByCreationNumber",1),E([So],Ao.prototype,"getEventsByEventHandle",1),E([So],Ao.prototype,"submitSignedBCSTransaction",1),E([So],Ao.prototype,"submitBCSSimulation",1),E([So],Ao.prototype,"getTransactions",1),E([So],Ao.prototype,"getTransactionByHash",1),E([So],Ao.prototype,"getTransactionByVersion",1),E([So],Ao.prototype,"getLedgerInfo",1),E([V()],Ao.prototype,"getChainId",1),E([So],Ao.prototype,"getTableItem",1),E([So,V({ttlMs:3e5,tags:["gas_estimates"]})],Ao.prototype,"estimateGasPrice",1),E([So],Ao.prototype,"estimateMaxGasAmount",1),E([So],Ao.prototype,"getBlockByHeight",1),E([So],Ao.prototype,"getBlockByVersion",1);var xo=function(e){l(n,e);var t=f(n);function n(e,a,o,r){var i;return b(this,n),(i=t.call(this,a)).status=e,i.message=a,i.errorCode=o,i.vmErrorCode=r,i}return m(n)}(d(Error)),Io=function(e){l(n,e);var t=f(n);function n(e,a){var o;return b(this,n),(o=t.call(this,e)).lastSubmittedTransaction=a,o}return m(n)}(d(Error)),To=function(e){l(n,e);var t=f(n);function n(e,a){var o;return b(this,n),(o=t.call(this,e)).transaction=a,o}return m(n)}(d(Error));function So(e,t,n){var a=n.value;return n.value=function(){var e=p(c().mark((function e(){var t,n,o,r,i,u,d=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(e.prev=0,o=d.length,r=new Array(o),i=0;i"),i=Pt(t),e.next=5,this.aptosClient.getAccountResource(i,r);case 5:return s=e.sent,e.abrupt("return",BigInt(s.data.coin.value));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),Mo=function(e){l(n,e);var t=f(n);function n(e,a,o){var r,i,s,c;if(b(this,n),r=t.call(this,e,o),!a)throw new Error("Faucet URL cannot be empty.");return r.faucetRequester=new tn({BASE:a,VERSION:null!=(i=null==o?void 0:o.VERSION)?i:"0.1.0",WITH_CREDENTIALS:null!=(s=null==o?void 0:o.WITH_CREDENTIALS)&&s,CREDENTIALS:null!=(c=null==o?void 0:o.CREDENTIALS)?c:"include",TOKEN:null==o?void 0:o.TOKEN,USERNAME:null==o?void 0:o.USERNAME,PASSWORD:null==o?void 0:o.PASSWORD,HEADERS:null==o?void 0:o.HEADERS,ENCODE_PATH:null==o?void 0:o.ENCODE_PATH}),r}return m(n,[{key:"fundAccount",value:function(){var e=p(c().mark((function e(t,n){var a,o,r,i,s,u=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=u.length>2&&void 0!==u[2]?u[2]:20,e.next=3,this.faucetRequester.request({method:"POST",url:"/mint",query:{address:H.ensure(t).noPrefix(),amount:n}});case 3:for(o=e.sent,r=[],i=0;i4&&void 0!==u[4]?u[4]:ae,i=u.length>5?u[5]:void 0,s=this.transactionBuilder.buildTransactionPayload("0x3::token::create_collection_script",[],[n,a,o,r,[!1,!1,!1]]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,s,i));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o){return e.apply(this,arguments)}}()},{key:"createToken",value:function(){var e=p(c().mark((function e(t,n,a,o,r,i){var s,u,d,l,f,p,b,m,h,g=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=g.length>6&&void 0!==g[6]?g[6]:ae,u=g.length>7&&void 0!==g[7]?g[7]:t.address(),d=g.length>8&&void 0!==g[8]?g[8]:0,l=g.length>9&&void 0!==g[9]?g[9]:0,f=g.length>10&&void 0!==g[10]?g[10]:[],p=g.length>11&&void 0!==g[11]?g[11]:[],b=g.length>12&&void 0!==g[12]?g[12]:[],m=g.length>13?g[13]:void 0,h=this.transactionBuilder.buildTransactionPayload("0x3::token::create_token_script",[],[n,a,o,r,s,i,u,d,l,[!1,!1,!1,!1,!1],f,Bo(p,b),b]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,h,m));case 10:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i){return e.apply(this,arguments)}}()},{key:"createTokenWithMutabilityConfig",value:function(){var e=p(c().mark((function e(t,n,a,o,r,i){var s,u,d,l,f,p,b,m,h,g,y=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=y.length>6&&void 0!==y[6]?y[6]:ae,u=y.length>7&&void 0!==y[7]?y[7]:t.address(),d=y.length>8&&void 0!==y[8]?y[8]:0,l=y.length>9&&void 0!==y[9]?y[9]:0,f=y.length>10&&void 0!==y[10]?y[10]:[],p=y.length>11&&void 0!==y[11]?y[11]:[],b=y.length>12&&void 0!==y[12]?y[12]:[],m=y.length>13&&void 0!==y[13]?y[13]:[!1,!1,!1,!1,!1],h=y.length>14?y[14]:void 0,g=this.transactionBuilder.buildTransactionPayload("0x3::token::create_token_script",[],[n,a,o,r,s,i,u,d,l,m,f,p,b]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,g,h));case 11:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i){return e.apply(this,arguments)}}()},{key:"offerToken",value:function(){var e=p(c().mark((function e(t,n,a,o,r,i){var s,u,d,l=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=l.length>6&&void 0!==l[6]?l[6]:0,u=l.length>7?l[7]:void 0,d=this.transactionBuilder.buildTransactionPayload("0x3::token_transfers::offer_script",[],[n,a,o,r,s,i]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,d,u));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i){return e.apply(this,arguments)}}()},{key:"claimToken",value:function(){var e=p(c().mark((function e(t,n,a,o,r){var i,s,u,d=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.length>5&&void 0!==d[5]?d[5]:0,s=d.length>6?d[6]:void 0,u=this.transactionBuilder.buildTransactionPayload("0x3::token_transfers::claim_script",[],[n,a,o,r,i]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,u,s));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r){return e.apply(this,arguments)}}()},{key:"cancelTokenOffer",value:function(){var e=p(c().mark((function e(t,n,a,o,r){var i,s,u,d=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.length>5&&void 0!==d[5]?d[5]:0,s=d.length>6?d[6]:void 0,u=this.transactionBuilder.buildTransactionPayload("0x3::token_transfers::cancel_offer_script",[],[n,a,o,r,i]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,u,s));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r){return e.apply(this,arguments)}}()},{key:"directTransferToken",value:function(){var e=p(c().mark((function e(t,n,a,o,r,i){var s,u,d,l,f,p,b,m,h,g,y,v,w=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=w.length>6&&void 0!==w[6]?w[6]:0,u=w.length>7?w[7]:void 0,d=this.transactionBuilder.buildTransactionPayload("0x3::token::direct_transfer_script",[],[a,o,r,s,i]),e.next=5,this.aptosClient.generateRawTransaction(t.address(),d,u);case 5:return l=e.sent,f=new X.MultiAgentRawTransaction(l,[X.AccountAddress.fromHex(n.address())]),p=new X.Ed25519Signature(t.signBuffer(ho.getSigningMessage(f)).toUint8Array()),b=new X.AccountAuthenticatorEd25519(new X.Ed25519PublicKey(t.signingKey.publicKey),p),m=new X.Ed25519Signature(n.signBuffer(ho.getSigningMessage(f)).toUint8Array()),h=new X.AccountAuthenticatorEd25519(new X.Ed25519PublicKey(n.signingKey.publicKey),m),g=new X.TransactionAuthenticatorMultiAgent(b,[X.AccountAddress.fromHex(n.address())],[h]),y=fe(new X.SignedTransaction(l,g)),e.next=15,this.aptosClient.submitSignedBCSTransaction(y);case 15:return v=e.sent,e.abrupt("return",v.hash);case 17:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i){return e.apply(this,arguments)}}()},{key:"optInTokenTransfer",value:function(){var e=p(c().mark((function e(t,n,a){var o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.transactionBuilder.buildTransactionPayload("0x3::token::opt_in_direct_transfer",[],[n]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,o,a));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"transferWithOptIn",value:function(){var e=p(c().mark((function e(t,n,a,o,r,i,s,u){var d;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d=new st(new Ye(new H("a11ceb0b0500000006010004020408030c0a05161d073339086c400000010100020700010307000104030100010504020007060c0508000800030503010801000405080008000304060c0801050306737472696e6705746f6b656e06537472696e6707546f6b656e4964136372656174655f746f6b656e5f69645f726177087472616e73666572000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000030000010c0b010b020b030b0411000c070b000b070b050b06110102").toUint8Array(),[],[new gt(X.AccountAddress.fromHex(n)),new yt((new TextEncoder).encode(a)),new yt((new TextEncoder).encode(o)),new bt(BigInt(r)),new gt(X.AccountAddress.fromHex(i)),new bt(BigInt(s))])),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,d,u));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i,s,c){return e.apply(this,arguments)}}()},{key:"burnByCreator",value:function(){var e=p(c().mark((function e(t,n,a,o,r,i,s){var u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=this.transactionBuilder.buildTransactionPayload("0x3::token::burn_by_creator",[],[n,a,o,r,i]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,u,s));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i,s){return e.apply(this,arguments)}}()},{key:"burnByOwner",value:function(){var e=p(c().mark((function e(t,n,a,o,r,i,s){var u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=this.transactionBuilder.buildTransactionPayload("0x3::token::burn",[],[n,a,o,r,i]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,u,s));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i,s){return e.apply(this,arguments)}}()},{key:"mutateTokenProperties",value:function(){var e=p(c().mark((function e(t,n,a,o,r,i,s,u,d,l,f){var p;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return p=this.transactionBuilder.buildTransactionPayload("0x3::token::mutate_token_properties",[],[n,a,o,r,i,s,u,d,l]),e.abrupt("return",this.aptosClient.generateSignSubmitTransaction(t,p,f));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,a,o,r,i,s,c,u,d,l){return e.apply(this,arguments)}}()},{key:"getCollectionData",value:function(){var e=p(c().mark((function e(t,n){var a,o,r,i,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.aptosClient.getAccountResources(t);case 2:return a=e.sent,o=a.find((function(e){return"0x3::token::Collections"===e.type})),r=o.data.collection_data.handle,i={key_type:"0x1::string::String",value_type:"0x3::token::CollectionData",key:n},e.next=8,this.aptosClient.getTableItem(r,i);case 8:return s=e.sent,e.abrupt("return",s);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getTokenData",value:function(){var e=p(c().mark((function e(t,n,a){var o,r,i,s,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t instanceof H?t.hex():t,e.next=3,this.aptosClient.getAccountResource(o,"0x3::token::Collections");case 3:return r=e.sent,i=r.data.token_data.handle,s={key_type:"0x3::token::TokenDataId",value_type:"0x3::token::TokenData",key:{creator:o,collection:n,name:a}},e.next=9,this.aptosClient.getTableItem(i,s);case 9:return u=e.sent,e.abrupt("return",new Fo(u.collection,u.description,u.name,u.maximum,u.supply,u.uri,u.default_properties,u.mutability_config));case 11:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getToken",value:function(){var e=p(c().mark((function e(t,n,a){var o,r,i=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=i.length>3&&void 0!==i[3]?i[3]:"0",r={creator:t instanceof H?t.hex():t,collection:n,name:a},e.abrupt("return",this.getTokenForAccount(t,{token_data_id:r,property_version:o}));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getTokenForAccount",value:function(){var e=p(c().mark((function e(t,n){var a,o,r,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.aptosClient.getAccountResource(t instanceof H?t.hex():t,"0x3::token::TokenStore");case 2:return a=e.sent,o=a.data.tokens.handle,r={key_type:"0x3::token::TokenId",value_type:"0x3::token::Token",key:n},e.prev=5,e.next=8,this.aptosClient.getTableItem(o,r);case 8:return i=e.sent,e.abrupt("return",new Lo(i.id,i.amount,i.token_properties));case 12:if(e.prev=12,e.t0=e.catch(5),404!==(null==e.t0?void 0:e.t0.status)){e.next=16;break}return e.abrupt("return",{id:n,amount:"0",token_properties:new Uo});case 16:return e.abrupt("return",e.t0);case 17:case"end":return e.stop()}}),e,this,[[5,12]])})));return function(t,n){return e.apply(this,arguments)}}()}]),e}()},50052:function(e,t){"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Wrong positive integer: ".concat(e))}function a(e){if("boolean"!==typeof e)throw new Error("Expected boolean, not ".concat(e))}function o(e){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a0&&!n.includes(e.length))throw new TypeError("Expected Uint8Array of length ".concat(n,", not of length=").concat(e.length))}function r(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function i(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function s(e,t){o(e);var n=t.outputLen;if(e.lengtha-r&&(this.process(n,0),r=0);for(var i=r;i>o&r),s=Number(n&r),c=a?4:0,u=a?0:4;e.setUint32(t+c,i,a),e.setUint32(t+u,s,a)}(n,a-8,BigInt(8*this.length),o),this.process(n,0);var s=(0,u.createView)(e);this.get().forEach((function(e,t){return s.setUint32(4*t,e,o)}))}},{key:"digest",value:function(){var e=this.buffer,t=this.outputLen;this.digestInto(e);var n=e.slice(0,t);return this.destroy(),n}},{key:"_cloneInto",value:function(e){var t;e||(e=new this.constructor),(t=e).set.apply(t,a(this.get()));var n=this.blockLen,o=this.buffer,r=this.length,i=this.finished,s=this.destroyed,c=this.pos;return e.length=r,e.pos=c,e.finished=i,e.destroyed=s,r%n&&e.buffer.set(o),e}}]),n}(u.Hash);t.SHA2=d},64359:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.toBig=t.split=t.fromBig=void 0;var n=BigInt(Math.pow(2,32)-1),a=BigInt(32);function o(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&n),l:Number(e>>a&n)}:{h:0|Number(e>>a&n),l:0|Number(e&n)}}function r(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Uint32Array(e.length),a=new Uint32Array(e.length),r=0;r>>0)<>>0)};function i(e,t,n,a){var o=(t>>>0)+(a>>>0);return{h:e+n+(o/Math.pow(2,32)|0)|0,l:0|o}}t.add=i;var s={fromBig:o,split:r,toBig:t.toBig,shrSH:function(e,t,n){return e>>>n},shrSL:function(e,t,n){return e<<32-n|t>>>n},rotrSH:function(e,t,n){return e>>>n|t<<32-n},rotrSL:function(e,t,n){return e<<32-n|t>>>n},rotrBH:function(e,t,n){return e<<64-n|t>>>n-32},rotrBL:function(e,t,n){return e>>>n-32|t<<64-n},rotr32H:function(e,t){return t},rotr32L:function(e,t){return e},rotlSH:function(e,t,n){return e<>>32-n},rotlSL:function(e,t,n){return t<>>32-n},rotlBH:function(e,t,n){return t<>>64-n},rotlBL:function(e,t,n){return e<>>64-n},add:i,add3L:function(e,t,n){return(e>>>0)+(t>>>0)+(n>>>0)},add3H:function(e,t,n,a){return t+n+a+(e/Math.pow(2,32)|0)|0},add4L:function(e,t,n,a){return(e>>>0)+(t>>>0)+(n>>>0)+(a>>>0)},add4H:function(e,t,n,a,o){return t+n+a+o+(e/Math.pow(2,32)|0)|0},add5H:function(e,t,n,a,o,r){return t+n+a+o+r+(e/Math.pow(2,32)|0)|0},add5L:function(e,t,n,a,o){return(e>>>0)+(t>>>0)+(n>>>0)+(a>>>0)+(o>>>0)}};t.default=s},57540:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto={node:void 0,web:"object"===typeof self&&"crypto"in self?self.crypto:void 0}},95425:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(61655).default,i=n(26389).default;Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;var s=n(50052),c=n(87878),u=function(e){r(n,e);var t=i(n);function n(e,o){var r;a(this,n),(r=t.call(this)).finished=!1,r.destroyed=!1,s.default.hash(e);var i=(0,c.toBytes)(o);if(r.iHash=e.create(),"function"!==typeof r.iHash.update)throw new TypeError("Expected instance of class which extends utils.Hash");r.blockLen=r.iHash.blockLen,r.outputLen=r.iHash.outputLen;var u=r.blockLen,d=new Uint8Array(u);d.set(i.length>u?e.create().update(i).digest():i);for(var l=0;l>g)*v)%y)&h&&(T^=m<<(m<32?u.default.rotlBH(e,t,n):u.default.rotlSH(e,t,n)},P=function(e,t,n){return n>32?u.default.rotlBL(e,t,n):u.default.rotlSL(e,t,n)};function U(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=new Uint32Array(10),a=24-t;a<24;a++){for(var o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(var r=0;r<10;r+=2)for(var i=(r+8)%10,s=(r+2)%10,c=n[s],u=n[s+1],d=M(c,u,1)^n[i],p=P(c,u,1)^n[i+1],b=0;b<50;b+=10)e[r+b]^=d,e[r+b+1]^=p;for(var m=e[2],h=e[3],g=0;g<24;g++){var y=f[g],v=M(m,h,y),w=P(m,h,y),k=l[g];m=e[k],h=e[k+1],e[k]=v,e[k+1]=w}for(var A=0;A<50;A+=10){for(var x=0;x<10;x++)n[x]=e[A+x];for(var I=0;I<10;I++)e[A+I]^=~n[(I+2)%10]&n[(I+4)%10]}e[0]^=E[a],e[1]^=R[a]}n.fill(0)}t.keccakP=U;var _=function(e){r(n,e);var t=i(n);function n(e,o,r){var i,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if(a(this,n),(i=t.call(this)).blockLen=e,i.suffix=o,i.outputLen=r,i.enableXOF=s,i.rounds=u,i.pos=0,i.posOut=0,i.finished=!1,i.destroyed=!1,c.default.number(r),0>=i.blockLen||i.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");return i.state=new Uint8Array(200),i.state32=(0,d.u32)(i.state),i}return o(n,[{key:"keccak",value:function(){U(this.state32,this.rounds),this.posOut=0,this.pos=0}},{key:"update",value:function(e){c.default.exists(this);for(var t=this.blockLen,n=this.state,a=(e=(0,d.toBytes)(e)).length,o=0;o=n&&this.keccak();var r=Math.min(n-this.posOut,o-a);e.set(t.subarray(this.posOut,this.posOut+r),a),this.posOut+=r,a+=r}return e}},{key:"xofInto",value:function(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}},{key:"xof",value:function(e){return c.default.number(e),this.xofInto(new Uint8Array(e))}},{key:"digestInto",value:function(e){if(c.default.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}},{key:"digest",value:function(){return this.digestInto(new Uint8Array(this.outputLen))}},{key:"destroy",value:function(){this.destroyed=!0,this.state.fill(0)}},{key:"_cloneInto",value:function(e){var t=this.blockLen,a=this.suffix,o=this.outputLen,r=this.rounds,i=this.enableXOF;return e||(e=new n(t,a,o,i,r)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=r,e.suffix=a,e.outputLen=o,e.enableXOF=i,e.destroyed=this.destroyed,e}}]),n}(d.Hash);t.Keccak=_;var B=function(e,t,n){return(0,d.wrapConstructor)((function(){return new _(t,e,n)}))};t.sha3_224=B(6,144,28),t.sha3_256=B(6,136,32),t.sha3_384=B(6,104,48),t.sha3_512=B(6,72,64),t.keccak_224=B(1,144,28),t.keccak_256=B(1,136,32),t.keccak_384=B(1,104,48),t.keccak_512=B(1,72,64);var D=function(e,t,n){return(0,d.wrapConstructorWithOpts)((function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new _(t,e,void 0===a.dkLen?n:a.dkLen,!0)}))};t.shake128=D(31,168,16),t.shake256=D(31,136,32)},25179:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(61655).default,i=n(26389).default,s=n(27424).default;Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512=t.SHA512=void 0;var c=n(68727),u=n(64359),d=n(87878),l=s(u.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((function(e){return BigInt(e)}))),2),f=l[0],p=l[1],b=new Uint32Array(80),m=new Uint32Array(80),h=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this,128,64,16,!1)).Ah=1779033703,e.Al=-205731576,e.Bh=-1150833019,e.Bl=-2067093701,e.Ch=1013904242,e.Cl=-23791573,e.Dh=-1521486534,e.Dl=1595750129,e.Eh=1359893119,e.El=-1377402159,e.Fh=-1694144372,e.Fl=725511199,e.Gh=528734635,e.Gl=-79577749,e.Hh=1541459225,e.Hl=327033209,e}return o(n,[{key:"get",value:function(){return[this.Ah,this.Al,this.Bh,this.Bl,this.Ch,this.Cl,this.Dh,this.Dl,this.Eh,this.El,this.Fh,this.Fl,this.Gh,this.Gl,this.Hh,this.Hl]}},{key:"set",value:function(e,t,n,a,o,r,i,s,c,u,d,l,f,p,b,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|a,this.Ch=0|o,this.Cl=0|r,this.Dh=0|i,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|d,this.Fl=0|l,this.Gh=0|f,this.Gl=0|p,this.Hh=0|b,this.Hl=0|m}},{key:"process",value:function(e,t){for(var n=0;n<16;n++,t+=4)b[n]=e.getUint32(t),m[n]=e.getUint32(t+=4);for(var a=16;a<80;a++){var o=0|b[a-15],r=0|m[a-15],i=u.default.rotrSH(o,r,1)^u.default.rotrSH(o,r,8)^u.default.shrSH(o,r,7),s=u.default.rotrSL(o,r,1)^u.default.rotrSL(o,r,8)^u.default.shrSL(o,r,7),c=0|b[a-2],d=0|m[a-2],l=u.default.rotrSH(c,d,19)^u.default.rotrBH(c,d,61)^u.default.shrSH(c,d,6),h=u.default.rotrSL(c,d,19)^u.default.rotrBL(c,d,61)^u.default.shrSL(c,d,6),g=u.default.add4L(s,h,m[a-7],m[a-16]),y=u.default.add4H(g,i,l,b[a-7],b[a-16]);b[a]=0|y,m[a]=0|g}for(var v=this.Ah,w=this.Al,k=this.Bh,A=this.Bl,x=this.Ch,I=this.Cl,T=this.Dh,S=this.Dl,C=this.Eh,E=this.El,R=this.Fh,M=this.Fl,P=this.Gh,U=this.Gl,_=this.Hh,B=this.Hl,D=0;D<80;D++){var N=u.default.rotrSH(C,E,14)^u.default.rotrSH(C,E,18)^u.default.rotrBH(C,E,41),O=u.default.rotrSL(C,E,14)^u.default.rotrSL(C,E,18)^u.default.rotrBL(C,E,41),F=C&R^~C&P,L=E&M^~E&U,j=u.default.add5L(B,O,L,p[D],m[D]),H=u.default.add5H(j,_,N,F,f[D],b[D]),G=0|j,z=u.default.rotrSH(v,w,28)^u.default.rotrBH(v,w,34)^u.default.rotrBH(v,w,39),K=u.default.rotrSL(v,w,28)^u.default.rotrBL(v,w,34)^u.default.rotrBL(v,w,39),W=v&k^v&x^k&x,Z=w&A^w&I^A&I;_=0|P,B=0|U,P=0|R,U=0|M,R=0|C,M=0|E;var V=u.default.add(0|T,0|S,0|H,0|G);C=V.h,E=V.l,T=0|x,S=0|I,x=0|k,I=0|A,k=0|v,A=0|w;var q=u.default.add3L(G,K,Z);v=u.default.add3H(q,H,z,W),w=0|q}var Q=u.default.add(0|this.Ah,0|this.Al,0|v,0|w);v=Q.h,w=Q.l;var J=u.default.add(0|this.Bh,0|this.Bl,0|k,0|A);k=J.h,A=J.l;var Y=u.default.add(0|this.Ch,0|this.Cl,0|x,0|I);x=Y.h,I=Y.l;var X=u.default.add(0|this.Dh,0|this.Dl,0|T,0|S);T=X.h,S=X.l;var $=u.default.add(0|this.Eh,0|this.El,0|C,0|E);C=$.h,E=$.l;var ee=u.default.add(0|this.Fh,0|this.Fl,0|R,0|M);R=ee.h,M=ee.l;var te=u.default.add(0|this.Gh,0|this.Gl,0|P,0|U);P=te.h,U=te.l;var ne=u.default.add(0|this.Hh,0|this.Hl,0|_,0|B);_=ne.h,B=ne.l,this.set(v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B)}},{key:"roundClean",value:function(){b.fill(0),m.fill(0)}},{key:"destroy",value:function(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}]),n}(c.SHA2);t.SHA512=h;var g=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this)).Ah=573645204,e.Al=-64227540,e.Bh=-1621794909,e.Bl=-934517566,e.Ch=596883563,e.Cl=1867755857,e.Dh=-1774684391,e.Dl=1497426621,e.Eh=-1775747358,e.El=-1467023389,e.Fh=-1101128155,e.Fl=1401305490,e.Gh=721525244,e.Gl=746961066,e.Hh=246885852,e.Hl=-2117784414,e.outputLen=32,e}return o(n)}(h),y=function(e){r(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this)).Ah=-876896931,e.Al=-1056596264,e.Bh=1654270250,e.Bl=914150663,e.Ch=-1856437926,e.Cl=812702999,e.Dh=355462360,e.Dl=-150054599,e.Eh=1731405415,e.El=-4191439,e.Fh=-1900787065,e.Fl=1750603025,e.Gh=-619958771,e.Gl=1694076839,e.Hh=1203062813,e.Hl=-1090891868,e.outputLen=48,e}return o(n)}(h);t.sha512=(0,d.wrapConstructor)((function(){return new h})),t.sha512_256=(0,d.wrapConstructor)((function(){return new g})),t.sha384=(0,d.wrapConstructor)((function(){return new y}))},87878:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(17061).default,i=n(17156).default;Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;var s=n(57540);t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)};t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))};t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)};if(t.rotr=function(e,t){return e<<32-t|e>>>t},t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");var c=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");for(var t="",n=0;n=0&&c0&&void 0!==arguments[0]?arguments[0]:32;if(s.crypto.web)return s.crypto.web.getRandomValues(new Uint8Array(e));if(s.crypto.node)return new Uint8Array(s.crypto.node.randomBytes(e).buffer);throw new Error("The environment doesn't have randomBytes function")}},41786:function(e,t,n){e.exports=n(1941)},65235:function(e,t,n){"use strict";var a=n(66069),o=n(41210),r=n(17667),i=n(79053),s=n(27446),c=n(98838),u=n(26421),d=n(22920),l=n(78606),f=n(16607),p=n(76351);e.exports=function(e){return new Promise((function(t,n){var b,m=e.data,h=e.headers,g=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b)}a.isFormData(m)&&a.isStandardBrowserEnv()&&delete h["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",k=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(w+":"+k)}var A=s(e.baseURL,e.url);function x(){if(v){var a="getAllResponseHeaders"in v?c(v.getAllResponseHeaders()):null,r={data:g&&"text"!==g&&"json"!==g?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:a,config:e,request:v};o((function(e){t(e),y()}),(function(e){n(e),y()}),r),v=null}}if(v.open(e.method.toUpperCase(),i(A,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=x:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(x)},v.onabort=function(){v&&(n(new l("Request aborted",l.ECONNABORTED,e,v)),v=null)},v.onerror=function(){n(new l("Network Error",l.ERR_NETWORK,e,v,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",a=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new l(t,a.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,e,v)),v=null},a.isStandardBrowserEnv()){var I=(e.withCredentials||u(A))&&e.xsrfCookieName?r.read(e.xsrfCookieName):void 0;I&&(h[e.xsrfHeaderName]=I)}"setRequestHeader"in v&&a.forEach(h,(function(e,t){"undefined"===typeof m&&"content-type"===t.toLowerCase()?delete h[t]:v.setRequestHeader(t,e)})),a.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),g&&"json"!==g&&(v.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(b=function(e){v&&(n(!e||e&&e.type?new f:e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b))),m||(m=null);var T=p(A);T&&-1===["http","https","file"].indexOf(T)?n(new l("Unsupported protocol "+T+":",l.ERR_BAD_REQUEST,e)):v.send(m)}))}},1941:function(e,t,n){"use strict";var a=n(66069),o=n(54974),r=n(76684),i=n(57184);var s=function e(t){var n=new r(t),s=o(r.prototype.request,n);return a.extend(s,r.prototype,n),a.extend(s,n),s.create=function(n){return e(i(t,n))},s}(n(93623));s.Axios=r,s.CanceledError=n(16607),s.CancelToken=n(51854),s.isCancel=n(35756),s.VERSION=n(3805).version,s.toFormData=n(93646),s.AxiosError=n(78606),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(43703),s.isAxiosError=n(19001),e.exports=s,e.exports.default=s},51854:function(e,t,n){"use strict";var a=n(16607);function o(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,a=n._listeners.length;for(t=0;t=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){l.headers[e]=o.merge(u)})),e.exports=l},22920:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},3805:function(e){e.exports={version:"0.27.2"}},54974:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),a=0;a=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},76351:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},43703:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},93646:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(66069);e.exports=function(e,t){t=t||new FormData;var n=[];function r(e){return null===e?"":o.isDate(e)?e.toISOString():o.isArrayBuffer(e)||o.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):a.from(e):e}return function e(a,i){if(o.isPlainObject(a)||o.isArray(a)){if(-1!==n.indexOf(a))throw Error("Circular reference detected in "+i);n.push(a),o.forEach(a,(function(n,a){if(!o.isUndefined(n)){var s,c=i?i+"."+a:a;if(n&&!i&&"object"===typeof n)if(o.endsWith(a,"{}"))n=JSON.stringify(n);else if(o.endsWith(a,"[]")&&(s=o.toArray(n)))return void s.forEach((function(e){!o.isUndefined(e)&&t.append(c,r(e))}));e(n,c)}})),n.pop()}else t.append(i,r(a))}(e),t}},52441:function(e,t,n){"use strict";var a=n(65218),o=n(3805).version,r=n(78606),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+o+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,c){if(!1===e)throw new r(i(o," has been removed"+(t?" in "+t:"")),r.ERR_DEPRECATED);return t&&!s[o]&&(s[o]=!0,a.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,c)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new r("options must be an object",r.ERR_BAD_OPTION_VALUE);for(var a=Object.keys(e),o=a.length;o-- >0;){var i=a[o],s=t[i];if(s){var c=e[i],u=void 0===c||s(c,i,e);if(!0!==u)throw new r("option "+i+" must be "+u,r.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new r("Unknown option "+i,r.ERR_BAD_OPTION)}},validators:i}},66069:function(e,t,n){"use strict";var a,o=n(54974),r=Object.prototype.toString,i=(a=Object.create(null),function(e){var t=r.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return i(t)===e}}function c(e){return Array.isArray(e)}function u(e){return"undefined"===typeof e}var d=s("ArrayBuffer");function l(e){return null!==e&&"object"===typeof e}function f(e){if("object"!==i(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var p=s("Date"),b=s("File"),m=s("Blob"),h=s("FileList");function g(e){return"[object Function]"===r.call(e)}var y=s("URLSearchParams");function v(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),c(e))for(var n=0,a=e.length;n0;)i[r=a[o]]||(t[r]=e[r],i[r]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var a=e.indexOf(t,n);return-1!==a&&a===n},toArray:function(e){if(!e)return null;var t=e.length;if(u(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:k,isFileList:h}},26798:function(e,t,n){"use strict";var a=t;a.bignum=n(89464),a.define=n(36318).define,a.base=n(15179),a.constants=n(96844),a.decoders=n(86111),a.encoders=n(96721)},36318:function(e,t,n){"use strict";var a=n(96721),o=n(86111),r=n(39703);function i(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new i(e,t)},i.prototype._createNamed=function(e){var t=this.name;function n(e){this._initNamed(e,t)}return r(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},i.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(o[e])),this.decoders[e]},i.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},i.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(a[e])),this.encoders[e]},i.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},33926:function(e,t,n){"use strict";var a=n(39703),o=n(22963).b,r=n(60358).Buffer;function i(e,t){o.call(this,t),r.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return s.isEncoderBuffer(e)||(e=new s(e,t)),this.length+=e.length,e}),this);else if("number"===typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"===typeof e)this.value=e,this.length=r.byteLength(e);else{if(!r.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}a(i,o),t.C=i,i.isDecoderBuffer=function(e){return e instanceof i||"object"===typeof e&&r.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"===typeof e.offset&&"number"===typeof e.length&&"function"===typeof e.save&&"function"===typeof e.restore&&"function"===typeof e.isEmpty&&"function"===typeof e.readUInt8&&"function"===typeof e.skip&&"function"===typeof e.raw},i.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},i.prototype.restore=function(e){var t=new i(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},i.prototype.isEmpty=function(){return this.offset===this.length},i.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},i.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var n=new i(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},i.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=s,s.isEncoderBuffer=function(e){return e instanceof s||"object"===typeof e&&"EncoderBuffer"===e.constructor.name&&"number"===typeof e.length&&"function"===typeof e.join},s.prototype.join=function(e,t){return e||(e=r.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"===typeof this.value?e[t]=this.value:"string"===typeof this.value?e.write(this.value,t):r.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},15179:function(e,t,n){"use strict";var a=t;a.Reporter=n(22963).b,a.DecoderBuffer=n(33926).C,a.EncoderBuffer=n(33926).R,a.Node=n(79546)},79546:function(e,t,n){"use strict";var a=n(22963).b,o=n(33926).R,r=n(33926).C,i=n(72259),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function u(e,t,n){var a={};this._baseState=a,a.name=n,a.enc=e,a.parent=t||null,a.children=null,a.tag=null,a.args=null,a.reverseArgs=null,a.choice=null,a.optional=!1,a.any=!1,a.obj=!1,a.use=null,a.useDecoder=null,a.key=null,a.default=null,a.explicit=null,a.implicit=null,a.contains=null,a.parent||(a.children=[],this._wrap())}e.exports=u;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var e=this._baseState,t={};d.forEach((function(n){t[n]=e[n]}));var n=new this.constructor(t.parent);return n._baseState=t,n},u.prototype._wrap=function(){var e=this._baseState;c.forEach((function(t){this[t]=function(){var n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},u.prototype._init=function(e){var t=this._baseState;i(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),i.equal(t.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(e){var t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(i(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(i(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);var a=e[n];t[a]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){u.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){u.prototype[e]=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return i(null===t.tag),t.tag=e,this._useArgs(n),this}})),u.prototype.use=function(e){i(e);var t=this._baseState;return i(null===t.use),t.use=e,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(e){var t=this._baseState;return i(null===t.default),t.default=e,t.optional=!0,this},u.prototype.explicit=function(e){var t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.explicit=e,this},u.prototype.implicit=function(e){var t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.implicit=e,this},u.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},u.prototype.key=function(e){var t=this._baseState;return i(null===t.key),t.key=e,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(e){var t=this._baseState;return i(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},u.prototype.contains=function(e){var t=this._baseState;return i(null===t.use),t.contains=e,this},u.prototype._decode=function(e,t){var n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var a,o=n.default,i=!0,s=null;if(null!==n.key&&(s=e.enterKey(n.key)),n.optional){var c=null;if(null!==n.explicit?c=n.explicit:null!==n.implicit?c=n.implicit:null!==n.tag&&(c=n.tag),null!==c||n.any){if(i=this._peekTag(e,c,n.any),e.isError(i))return i}else{var u=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),i=!0}catch(m){i=!1}e.restore(u)}}if(n.obj&&i&&(a=e.enterObject()),i){if(null!==n.explicit){var d=this._decodeTag(e,n.explicit);if(e.isError(d))return d;e=d}var l=e.offset;if(null===n.use&&null===n.choice){var f;n.any&&(f=e.save());var p=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(p))return p;n.any?o=e.raw(f):e=p}if(t&&t.track&&null!==n.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(o=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(o))return o;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var b=new r(o);o=this._getUse(n.contains,e._reporterState.obj)._decode(b,t)}}return n.obj&&i&&(o=e.leaveObject(a)),null===n.key||null===o&&!0!==i?null!==s&&e.exitKey(s):e.leaveKey(s,n.key,o),o},u.prototype._decodeGeneric=function(e,t,n){var a=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,a.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&a.args?this._decodeObjid(t,a.args[0],a.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,a.args&&a.args[0],n):null!==a.use?this._getUse(a.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},u.prototype._getUse=function(e,t){var n=this._baseState;return n.useDecoder=this._use(e,t),i(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},u.prototype._decodeChoice=function(e,t){var n=this._baseState,a=null,o=!1;return Object.keys(n.choice).some((function(r){var i=e.save(),s=n.choice[r];try{var c=s._decode(e,t);if(e.isError(c))return!1;a={type:r,value:c},o=!0}catch(u){return e.restore(i),!1}return!0}),this),o?a:e.error("Choice not matched")},u.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},u.prototype._encode=function(e,t,n){var a=this._baseState;if(null===a.default||a.default!==e){var o=this._encodeValue(e,t,n);if(void 0!==o&&!this._skipDefault(o,t,n))return o}},u.prototype._encodeValue=function(e,t,n){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new a);var r=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var i=null,s=!1;if(o.any)r=this._createEncoderBuffer(e);else if(o.choice)r=this._encodeChoice(e,t);else if(o.contains)i=this._getUse(o.contains,n)._encode(e,t),s=!0;else if(o.children)i=o.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");var a=t.enterKey(n._baseState.key);if("object"!==typeof e)return t.error("Child expected, but input is not object");var o=n._encode(e[n._baseState.key],t,e);return t.leaveKey(a),o}),this).filter((function(e){return e})),i=this._createEncoderBuffer(i);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,i=this._createEncoderBuffer(e.map((function(n){var a=this._baseState;return this._getUse(a.args[0],e)._encode(n,t)}),c))}else null!==o.use?r=this._getUse(o.use,n)._encode(e,t):(i=this._encodePrimitive(o.tag,e),s=!0);if(!o.any&&null===o.choice){var u=null!==o.implicit?o.implicit:o.tag,d=null===o.implicit?"universal":"context";null===u?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(r=this._encodeComposite(u,s,d,i))}return null!==o.explicit&&(r=this._encodeComposite(o.explicit,!1,"context",r)),r},u.prototype._encodeChoice=function(e,t){var n=this._baseState,a=n.choice[e.type];return a||i(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),a._encode(e.value,t)},u.prototype._encodePrimitive=function(e,t){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},u.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},u.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},22963:function(e,t,n){"use strict";var a=n(39703);function o(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function r(e,t){this.path=e,this.rethrow(t)}t.b=o,o.prototype.isError=function(e){return e instanceof r},o.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},o.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},o.prototype.enterKey=function(e){return this._reporterState.path.push(e)},o.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},o.prototype.leaveKey=function(e,t,n){var a=this._reporterState;this.exitKey(e),null!==a.obj&&(a.obj[t]=n)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},o.prototype.leaveObject=function(e){var t=this._reporterState,n=t.obj;return t.obj=e,n},o.prototype.error=function(e){var t,n=this._reporterState,a=e instanceof r;if(t=a?e:new r(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return a||n.errors.push(t),t},o.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},a(r,Error),r.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},42359:function(e,t){"use strict";function n(e){var t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);var a=e[n];t[a]=n})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n(t.tag)},96844:function(e,t,n){"use strict";var a=t;a._reverse=function(e){var t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);var a=e[n];t[a]=n})),t},a.der=n(42359)},58189:function(e,t,n){"use strict";var a=n(39703),o=n(89464),r=n(33926).C,i=n(79546),s=n(42359);function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){i.call(this,"der",e)}function d(e,t){var n=e.readUInt8(t);if(e.isError(n))return n;var a=s.tagClass[n>>6],o=0===(32&n);if(31===(31&n)){var r=n;for(n=0;128===(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:a,primitive:o,tag:n,tagStr:s.tag[n]}}function l(e,t,n){var a=e.readUInt8(n);if(e.isError(a))return a;if(!t&&128===a)return null;if(0===(128&a))return a;var o=127&a;if(o>4)return e.error("length octect is too long");a=0;for(var r=0;r=31)return a.error("Multi-octet tag encoding unsupported");t||(o|=32);return o|=i.tagClassByName[n||"universal"]<<6,o}(e,t,n,this.reporter);if(a.length<128){var s=o.alloc(2);return s[0]=r,s[1]=a.length,this._createEncoderBuffer([s,a])}for(var c=1,u=a.length;u>=256;u>>=8)c++;var d=o.alloc(2+c);d[0]=r,d[1]=128|c;for(var l=1+c,f=a.length;f>0;l--,f>>=8)d[l]=255&f;return this._createEncoderBuffer([d,a])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=o.alloc(2*e.length),a=0;a=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var i=0,s=0;s=128;c>>=7)i++}for(var u=o.alloc(i),d=u.length-1,l=e.length-1;l>=0;l--){var f=e[l];for(u[d--]=127&f;(f>>=7)>0;)u[d--]=128|127&f}return this._createEncoderBuffer(u)},c.prototype._encodeTime=function(e,t){var n,a=new Date(e);return"gentime"===t?n=[u(a.getUTCFullYear()),u(a.getUTCMonth()+1),u(a.getUTCDate()),u(a.getUTCHours()),u(a.getUTCMinutes()),u(a.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[u(a.getUTCFullYear()%100),u(a.getUTCMonth()+1),u(a.getUTCDate()),u(a.getUTCHours()),u(a.getUTCMinutes()),u(a.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"===typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!==typeof e&&!o.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=o.from(n)}if(o.isBuffer(e)){var a=e.length;0===e.length&&a++;var r=o.alloc(a);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var i=1,s=e;s>=256;s>>=8)i++;for(var c=new Array(i),u=c.length-1;u>=0;u--)c[u]=255&e,e>>=8;return 128&c[0]&&c.unshift(0),this._createEncoderBuffer(o.from(c))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,n){var a,o=this._baseState;if(null===o.default)return!1;var r=e.join();if(void 0===o.defaultBuffer&&(o.defaultBuffer=this._encodeValue(o.default,t,n).join()),r.length!==o.defaultBuffer.length)return!1;for(a=0;a=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(e,t,n){var a=s(e,n);return n-1>=t&&(a|=s(e,n-1)<<4),a}function u(e,t,n,a){for(var o=0,r=Math.min(e.length,n),i=t;i=49?s-49+10:s>=17?s-17+10:s}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"===typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=i<>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a=t;a-=2)o=c(e,t,a)<=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;else for(a=(e.length-t)%2===0?t+1:t;a=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,o=1;o<=67108863;o*=t)a++;a--,o=o/t|0;for(var r=e.length-n,i=r%a,s=Math.min(r,r-i)+n,c=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var a=e.length+t.length|0;n.length=a,a=a-1|0;var o=0|e.words[0],r=0|t.words[0],i=o*r,s=67108863&i,c=i/67108864|0;n.words[0]=s;for(var u=1;u>>26,l=67108863&c,f=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=f;p++){var b=u-p|0;d+=(i=(o=0|e.words[b])*(r=0|t.words[p])+l)/67108864|0,l=67108863&i}n.words[u]=0|l,c=0|d}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,i=0;i>>24-o&16777215)||i!==this.length-1?d[6-c.length]+c+n:c+n,(o+=2)>=26&&(o-=26,i--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=l[e],p=f[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var m=b.modn(p).toString(e);n=(b=b.idivn(p)).isZero()?m+n:d[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return a("undefined"!==typeof i),this.toArrayLike(i,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);a(o<=r,"byte array longer than desired length"),a(r>0,"Requested array length <= 0"),this.strip();var i,s,c="le"===t,u=new e(r),d=this.clone();if(c){for(s=0;!d.isZero();s++)i=d.andln(255),d.iushrn(8),u[s]=i;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;ae.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){a("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){a("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,a=e):(n=e,a=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,a,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,a=e):(n=e,a=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,p=0|i[1],b=8191&p,m=p>>>13,h=0|i[2],g=8191&h,y=h>>>13,v=0|i[3],w=8191&v,k=v>>>13,A=0|i[4],x=8191&A,I=A>>>13,T=0|i[5],S=8191&T,C=T>>>13,E=0|i[6],R=8191&E,M=E>>>13,P=0|i[7],U=8191&P,_=P>>>13,B=0|i[8],D=8191&B,N=B>>>13,O=0|i[9],F=8191&O,L=O>>>13,j=0|s[0],H=8191&j,G=j>>>13,z=0|s[1],K=8191&z,W=z>>>13,Z=0|s[2],V=8191&Z,q=Z>>>13,Q=0|s[3],J=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,ae=te>>>13,oe=0|s[6],re=8191&oe,ie=oe>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,de=0|s[8],le=8191&de,fe=de>>>13,pe=0|s[9],be=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var he=(u+(a=Math.imul(l,H))|0)+((8191&(o=(o=Math.imul(l,G))+Math.imul(f,H)|0))<<13)|0;u=((r=Math.imul(f,G))+(o>>>13)|0)+(he>>>26)|0,he&=67108863,a=Math.imul(b,H),o=(o=Math.imul(b,G))+Math.imul(m,H)|0,r=Math.imul(m,G);var ge=(u+(a=a+Math.imul(l,K)|0)|0)+((8191&(o=(o=o+Math.imul(l,W)|0)+Math.imul(f,K)|0))<<13)|0;u=((r=r+Math.imul(f,W)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,a=Math.imul(g,H),o=(o=Math.imul(g,G))+Math.imul(y,H)|0,r=Math.imul(y,G),a=a+Math.imul(b,K)|0,o=(o=o+Math.imul(b,W)|0)+Math.imul(m,K)|0,r=r+Math.imul(m,W)|0;var ye=(u+(a=a+Math.imul(l,V)|0)|0)+((8191&(o=(o=o+Math.imul(l,q)|0)+Math.imul(f,V)|0))<<13)|0;u=((r=r+Math.imul(f,q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,a=Math.imul(w,H),o=(o=Math.imul(w,G))+Math.imul(k,H)|0,r=Math.imul(k,G),a=a+Math.imul(g,K)|0,o=(o=o+Math.imul(g,W)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,W)|0,a=a+Math.imul(b,V)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(m,V)|0,r=r+Math.imul(m,q)|0;var ve=(u+(a=a+Math.imul(l,J)|0)|0)+((8191&(o=(o=o+Math.imul(l,Y)|0)+Math.imul(f,J)|0))<<13)|0;u=((r=r+Math.imul(f,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,a=Math.imul(x,H),o=(o=Math.imul(x,G))+Math.imul(I,H)|0,r=Math.imul(I,G),a=a+Math.imul(w,K)|0,o=(o=o+Math.imul(w,W)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,W)|0,a=a+Math.imul(g,V)|0,o=(o=o+Math.imul(g,q)|0)+Math.imul(y,V)|0,r=r+Math.imul(y,q)|0,a=a+Math.imul(b,J)|0,o=(o=o+Math.imul(b,Y)|0)+Math.imul(m,J)|0,r=r+Math.imul(m,Y)|0;var we=(u+(a=a+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((r=r+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,a=Math.imul(S,H),o=(o=Math.imul(S,G))+Math.imul(C,H)|0,r=Math.imul(C,G),a=a+Math.imul(x,K)|0,o=(o=o+Math.imul(x,W)|0)+Math.imul(I,K)|0,r=r+Math.imul(I,W)|0,a=a+Math.imul(w,V)|0,o=(o=o+Math.imul(w,q)|0)+Math.imul(k,V)|0,r=r+Math.imul(k,q)|0,a=a+Math.imul(g,J)|0,o=(o=o+Math.imul(g,Y)|0)+Math.imul(y,J)|0,r=r+Math.imul(y,Y)|0,a=a+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(m,$)|0,r=r+Math.imul(m,ee)|0;var ke=(u+(a=a+Math.imul(l,ne)|0)|0)+((8191&(o=(o=o+Math.imul(l,ae)|0)+Math.imul(f,ne)|0))<<13)|0;u=((r=r+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,a=Math.imul(R,H),o=(o=Math.imul(R,G))+Math.imul(M,H)|0,r=Math.imul(M,G),a=a+Math.imul(S,K)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(C,K)|0,r=r+Math.imul(C,W)|0,a=a+Math.imul(x,V)|0,o=(o=o+Math.imul(x,q)|0)+Math.imul(I,V)|0,r=r+Math.imul(I,q)|0,a=a+Math.imul(w,J)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(k,J)|0,r=r+Math.imul(k,Y)|0,a=a+Math.imul(g,$)|0,o=(o=o+Math.imul(g,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,a=a+Math.imul(b,ne)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(m,ne)|0,r=r+Math.imul(m,ae)|0;var Ae=(u+(a=a+Math.imul(l,re)|0)|0)+((8191&(o=(o=o+Math.imul(l,ie)|0)+Math.imul(f,re)|0))<<13)|0;u=((r=r+Math.imul(f,ie)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,a=Math.imul(U,H),o=(o=Math.imul(U,G))+Math.imul(_,H)|0,r=Math.imul(_,G),a=a+Math.imul(R,K)|0,o=(o=o+Math.imul(R,W)|0)+Math.imul(M,K)|0,r=r+Math.imul(M,W)|0,a=a+Math.imul(S,V)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(C,V)|0,r=r+Math.imul(C,q)|0,a=a+Math.imul(x,J)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(I,J)|0,r=r+Math.imul(I,Y)|0,a=a+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,a=a+Math.imul(g,ne)|0,o=(o=o+Math.imul(g,ae)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ae)|0,a=a+Math.imul(b,re)|0,o=(o=o+Math.imul(b,ie)|0)+Math.imul(m,re)|0,r=r+Math.imul(m,ie)|0;var xe=(u+(a=a+Math.imul(l,ce)|0)|0)+((8191&(o=(o=o+Math.imul(l,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((r=r+Math.imul(f,ue)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,a=Math.imul(D,H),o=(o=Math.imul(D,G))+Math.imul(N,H)|0,r=Math.imul(N,G),a=a+Math.imul(U,K)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(_,K)|0,r=r+Math.imul(_,W)|0,a=a+Math.imul(R,V)|0,o=(o=o+Math.imul(R,q)|0)+Math.imul(M,V)|0,r=r+Math.imul(M,q)|0,a=a+Math.imul(S,J)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(C,J)|0,r=r+Math.imul(C,Y)|0,a=a+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(I,$)|0,r=r+Math.imul(I,ee)|0,a=a+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ae)|0,a=a+Math.imul(g,re)|0,o=(o=o+Math.imul(g,ie)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,ie)|0,a=a+Math.imul(b,ce)|0,o=(o=o+Math.imul(b,ue)|0)+Math.imul(m,ce)|0,r=r+Math.imul(m,ue)|0;var Ie=(u+(a=a+Math.imul(l,le)|0)|0)+((8191&(o=(o=o+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;u=((r=r+Math.imul(f,fe)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,a=Math.imul(F,H),o=(o=Math.imul(F,G))+Math.imul(L,H)|0,r=Math.imul(L,G),a=a+Math.imul(D,K)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,W)|0,a=a+Math.imul(U,V)|0,o=(o=o+Math.imul(U,q)|0)+Math.imul(_,V)|0,r=r+Math.imul(_,q)|0,a=a+Math.imul(R,J)|0,o=(o=o+Math.imul(R,Y)|0)+Math.imul(M,J)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(C,$)|0,r=r+Math.imul(C,ee)|0,a=a+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(I,ne)|0,r=r+Math.imul(I,ae)|0,a=a+Math.imul(w,re)|0,o=(o=o+Math.imul(w,ie)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,ie)|0,a=a+Math.imul(g,ce)|0,o=(o=o+Math.imul(g,ue)|0)+Math.imul(y,ce)|0,r=r+Math.imul(y,ue)|0,a=a+Math.imul(b,le)|0,o=(o=o+Math.imul(b,fe)|0)+Math.imul(m,le)|0,r=r+Math.imul(m,fe)|0;var Te=(u+(a=a+Math.imul(l,be)|0)|0)+((8191&(o=(o=o+Math.imul(l,me)|0)+Math.imul(f,be)|0))<<13)|0;u=((r=r+Math.imul(f,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,a=Math.imul(F,K),o=(o=Math.imul(F,W))+Math.imul(L,K)|0,r=Math.imul(L,W),a=a+Math.imul(D,V)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(N,V)|0,r=r+Math.imul(N,q)|0,a=a+Math.imul(U,J)|0,o=(o=o+Math.imul(U,Y)|0)+Math.imul(_,J)|0,r=r+Math.imul(_,Y)|0,a=a+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(M,$)|0,r=r+Math.imul(M,ee)|0,a=a+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(C,ne)|0,r=r+Math.imul(C,ae)|0,a=a+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ie)|0)+Math.imul(I,re)|0,r=r+Math.imul(I,ie)|0,a=a+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(k,ce)|0,r=r+Math.imul(k,ue)|0,a=a+Math.imul(g,le)|0,o=(o=o+Math.imul(g,fe)|0)+Math.imul(y,le)|0,r=r+Math.imul(y,fe)|0;var Se=(u+(a=a+Math.imul(b,be)|0)|0)+((8191&(o=(o=o+Math.imul(b,me)|0)+Math.imul(m,be)|0))<<13)|0;u=((r=r+Math.imul(m,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,a=Math.imul(F,V),o=(o=Math.imul(F,q))+Math.imul(L,V)|0,r=Math.imul(L,q),a=a+Math.imul(D,J)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(N,J)|0,r=r+Math.imul(N,Y)|0,a=a+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(_,$)|0,r=r+Math.imul(_,ee)|0,a=a+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(M,ne)|0,r=r+Math.imul(M,ae)|0,a=a+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ie)|0)+Math.imul(C,re)|0,r=r+Math.imul(C,ie)|0,a=a+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,ue)|0)+Math.imul(I,ce)|0,r=r+Math.imul(I,ue)|0,a=a+Math.imul(w,le)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(k,le)|0,r=r+Math.imul(k,fe)|0;var Ce=(u+(a=a+Math.imul(g,be)|0)|0)+((8191&(o=(o=o+Math.imul(g,me)|0)+Math.imul(y,be)|0))<<13)|0;u=((r=r+Math.imul(y,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,a=Math.imul(F,J),o=(o=Math.imul(F,Y))+Math.imul(L,J)|0,r=Math.imul(L,Y),a=a+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,a=a+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(_,ne)|0,r=r+Math.imul(_,ae)|0,a=a+Math.imul(R,re)|0,o=(o=o+Math.imul(R,ie)|0)+Math.imul(M,re)|0,r=r+Math.imul(M,ie)|0,a=a+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(C,ce)|0,r=r+Math.imul(C,ue)|0,a=a+Math.imul(x,le)|0,o=(o=o+Math.imul(x,fe)|0)+Math.imul(I,le)|0,r=r+Math.imul(I,fe)|0;var Ee=(u+(a=a+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(k,be)|0))<<13)|0;u=((r=r+Math.imul(k,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,a=Math.imul(F,$),o=(o=Math.imul(F,ee))+Math.imul(L,$)|0,r=Math.imul(L,ee),a=a+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ae)|0,a=a+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ie)|0)+Math.imul(_,re)|0,r=r+Math.imul(_,ie)|0,a=a+Math.imul(R,ce)|0,o=(o=o+Math.imul(R,ue)|0)+Math.imul(M,ce)|0,r=r+Math.imul(M,ue)|0,a=a+Math.imul(S,le)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(C,le)|0,r=r+Math.imul(C,fe)|0;var Re=(u+(a=a+Math.imul(x,be)|0)|0)+((8191&(o=(o=o+Math.imul(x,me)|0)+Math.imul(I,be)|0))<<13)|0;u=((r=r+Math.imul(I,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,a=Math.imul(F,ne),o=(o=Math.imul(F,ae))+Math.imul(L,ne)|0,r=Math.imul(L,ae),a=a+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,ie)|0,a=a+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,ue)|0)+Math.imul(_,ce)|0,r=r+Math.imul(_,ue)|0,a=a+Math.imul(R,le)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(M,le)|0,r=r+Math.imul(M,fe)|0;var Me=(u+(a=a+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,me)|0)+Math.imul(C,be)|0))<<13)|0;u=((r=r+Math.imul(C,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,a=Math.imul(F,re),o=(o=Math.imul(F,ie))+Math.imul(L,re)|0,r=Math.imul(L,ie),a=a+Math.imul(D,ce)|0,o=(o=o+Math.imul(D,ue)|0)+Math.imul(N,ce)|0,r=r+Math.imul(N,ue)|0,a=a+Math.imul(U,le)|0,o=(o=o+Math.imul(U,fe)|0)+Math.imul(_,le)|0,r=r+Math.imul(_,fe)|0;var Pe=(u+(a=a+Math.imul(R,be)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(M,be)|0))<<13)|0;u=((r=r+Math.imul(M,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,a=Math.imul(F,ce),o=(o=Math.imul(F,ue))+Math.imul(L,ce)|0,r=Math.imul(L,ue),a=a+Math.imul(D,le)|0,o=(o=o+Math.imul(D,fe)|0)+Math.imul(N,le)|0,r=r+Math.imul(N,fe)|0;var Ue=(u+(a=a+Math.imul(U,be)|0)|0)+((8191&(o=(o=o+Math.imul(U,me)|0)+Math.imul(_,be)|0))<<13)|0;u=((r=r+Math.imul(_,me)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,a=Math.imul(F,le),o=(o=Math.imul(F,fe))+Math.imul(L,le)|0,r=Math.imul(L,fe);var _e=(u+(a=a+Math.imul(D,be)|0)|0)+((8191&(o=(o=o+Math.imul(D,me)|0)+Math.imul(N,be)|0))<<13)|0;u=((r=r+Math.imul(N,me)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863;var Be=(u+(a=Math.imul(F,be))|0)+((8191&(o=(o=Math.imul(F,me))+Math.imul(L,be)|0))<<13)|0;return u=((r=Math.imul(L,me))+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=he,c[1]=ge,c[2]=ye,c[3]=ve,c[4]=we,c[5]=ke,c[6]=Ae,c[7]=xe,c[8]=Ie,c[9]=Te,c[10]=Se,c[11]=Ce,c[12]=Ee,c[13]=Re,c[14]=Me,c[15]=Pe,c[16]=Ue,c[17]=_e,c[18]=Be,0!==u&&(c[19]=u,n.length++),n};function m(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(b=p),r.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return n=10===this.length&&10===e.length?b(this,e,t):a<63?p(this,e,t):a<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var a=0,o=0,r=0;r>>26)|0)>>>26,i&=67108863}n.words[r]=s,a=i,i=o}return 0!==a?n.words[r]=a:n.length--,n.strip()}(this,e,t):m(this,e,t),n},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,a=0;a>=1;return a},h.prototype.permute=function(e,t,n,a,o,r){for(var i=0;i>>=1)o++;return 1<>>=13,n[2*i+1]=8191&r,r>>>=13;for(i=2*t;i>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,a=0;a=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var i=0;for(t=0;t>>26-n}i&&(this.words[t]=i,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,i=Math.min((e-r)/26,this.length),s=67108863^67108863>>>r<i)for(this.length-=i,u=0;u=0&&(0!==d||u>=o);u--){var l=0|this.words[u];this.words[u]=d<<26-r|l>>>r,d=l&s}return c&&0!==d&&(c.words[c.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return a(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){a("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(a("number"===typeof e),a(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===s)return this.strip();for(a(-1===s),s=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),o=e,i=0|o.words[o.length-1];0!==(n=26-this._countBits(i))&&(o=o.ushln(n),a.iushln(n),i=0|o.words[o.length-1]);var s,c=a.length-o.length;if("mod"!==t){(s=new r(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var f=67108864*(0|a.words[o.length+l])+(0|a.words[o.length+l-1]);for(f=Math.min(f/i|0,67108863),a._ishlnsubmul(o,f,l);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(o,1,l),a.isZero()||(a.negative^=1);s&&(s.words[l]=f)}return s&&s.strip(),a.strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:s||null,mod:a}},r.prototype.divmod=function(e,t,n){return a(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:o,mod:i}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:s.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,i,s},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,a=e.ushrn(1),o=e.andln(1),r=n.cmp(a);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){a(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){a(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),i=new r(0),s=new r(0),c=new r(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var d=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;0===(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(d),i.isub(l)),o.iushrn(1),i.iushrn(1);for(var b=0,m=1;0===(n.words[0]&m)&&b<26;++b,m<<=1);if(b>0)for(n.iushrn(b);b-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(d),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),i.isub(c)):(n.isub(t),s.isub(o),c.isub(i))}return{a:s,b:c,gcd:n.iushln(u)}},r.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,i=new r(1),s=new r(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,d=1;0===(t.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(c),i.iushrn(1);for(var l=0,f=1;0===(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s)):(n.isub(t),s.isub(i))}return(o=0===t.cmpn(1)?i:s).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(a)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){a("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,s&=67108863,this.words[i]=s}return 0!==r&&(this.words[i]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),a(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var a=0|this.words[n],o=0|e.words[n];if(a!==o){ao&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new x(e)},r.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var a=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(v,y),v.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),o=0;o>>22,r=i}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=a}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},x.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){a(0===(e.negative|t.negative),"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2===1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),i=0;!o.isZero()&&0===o.andln(1);)i++,o.iushrn(1);a(!o.isZero());var s=new r(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new r(2*d*d).toRed(this);0!==this.pow(d,u).cmp(c);)d.redIAdd(c);for(var l=this.pow(d,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),b=i;0!==p.cmp(s);){for(var m=p,h=0;0!==m.cmp(s);h++)m=m.redSqr();a(h=0;a--){for(var u=t.words[a],d=c-1;d>=0;d--){var l=u>>d&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==i?(i<<=1,i|=l,(4===++s||0===a&&0===d)&&(o=this.mul(o,n[i]),s=0,i=0)):s=0}c=26}return o},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new I(e)},o(I,x),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},75979:function(e,t,n){"use strict";var a=n(456),o=n(65218);function r(e){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var i,s,c=n(37986).codes,u=c.ERR_AMBIGUOUS_ARGUMENT,d=c.ERR_INVALID_ARG_TYPE,l=c.ERR_INVALID_ARG_VALUE,f=c.ERR_INVALID_RETURN_VALUE,p=c.ERR_MISSING_ARGS,b=n(61902),m=n(4088).inspect,h=n(4088).types,g=h.isPromise,y=h.isRegExp,v=Object.assign?Object.assign:n(13375).assign,w=Object.is?Object.is:n(40372);new Map;function k(){var e=n(13906);i=e.isDeepEqual,s=e.isDeepStrictEqual}var A=!1,x=e.exports=C,I={};function T(e){if(e.message instanceof Error)throw e.message;throw new b(e)}function S(e,t,n,a){if(!n){var o=!1;if(0===t)o=!0,a="No value argument passed to `assert.ok()`";else if(a instanceof Error)throw a;var r=new b({actual:n,expected:!0,message:a,operator:"==",stackStartFn:e});throw r.generatedMessage=o,r}}function C(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;oe.length)&&(n=e.length),e.substring(n-t.length,n)===t}var h="",g="",y="",v="",w={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},k=10;function A(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function x(e){return p(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function I(e,t,n){var o="",r="",i=0,s="",c=!1,u=x(e),d=u.split("\n"),l=x(t).split("\n"),p=0,b="";if("strictEqual"===n&&"object"===f(e)&&"object"===f(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===d.length&&1===l.length&&d[0]!==l[0]){var A=d[0].length+l[0].length;if(A<=k){if(("object"!==f(e)||null===e)&&("object"!==f(t)||null===t)&&(0!==e||0!==t))return"".concat(w[n],"\n\n")+"".concat(d[0]," !== ").concat(l[0],"\n")}else if("strictEqualObject"!==n){if(A<(a.stderr&&a.stderr.isTTY?a.stderr.columns:80)){for(;d[0][p]===l[0][p];)p++;p>2&&(b="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",p),"^"),p=0)}}}for(var I=d[d.length-1],T=l[l.length-1];I===T&&(p++<2?s="\n ".concat(I).concat(s):o=I,d.pop(),l.pop(),0!==d.length&&0!==l.length);)I=d[d.length-1],T=l[l.length-1];var S=Math.max(d.length,l.length);if(0===S){var C=u.split("\n");if(C.length>30)for(C[26]="".concat(h,"...").concat(v);C.length>27;)C.pop();return"".concat(w.notIdentical,"\n\n").concat(C.join("\n"),"\n")}p>3&&(s="\n".concat(h,"...").concat(v).concat(s),c=!0),""!==o&&(s="\n ".concat(o).concat(s),o="");var E=0,R=w[n]+"\n".concat(g,"+ actual").concat(v," ").concat(y,"- expected").concat(v),M=" ".concat(h,"...").concat(v," Lines skipped");for(p=0;p1&&p>2&&(P>4?(r+="\n".concat(h,"...").concat(v),c=!0):P>3&&(r+="\n ".concat(l[p-2]),E++),r+="\n ".concat(l[p-1]),E++),i=p,o+="\n".concat(y,"-").concat(v," ").concat(l[p]),E++;else if(l.length1&&p>2&&(P>4?(r+="\n".concat(h,"...").concat(v),c=!0):P>3&&(r+="\n ".concat(d[p-2]),E++),r+="\n ".concat(d[p-1]),E++),i=p,r+="\n".concat(g,"+").concat(v," ").concat(d[p]),E++;else{var U=l[p],_=d[p],B=_!==U&&(!m(_,",")||_.slice(0,-1)!==U);B&&m(U,",")&&U.slice(0,-1)===_&&(B=!1,_+=","),B?(P>1&&p>2&&(P>4?(r+="\n".concat(h,"...").concat(v),c=!0):P>3&&(r+="\n ".concat(d[p-2]),E++),r+="\n ".concat(d[p-1]),E++),i=p,r+="\n".concat(g,"+").concat(v," ").concat(_),o+="\n".concat(y,"-").concat(v," ").concat(U),E+=2):(r+=o,o="",1!==P&&0!==p||(r+="\n ".concat(_),E++))}if(E>20&&p30)for(k[26]="".concat(h,"...").concat(v);k.length>27;)k.pop();n=1===k.length?i(this,l(t).call(this,"".concat(m," ").concat(k[0]))):i(this,l(t).call(this,"".concat(m,"\n\n").concat(k.join("\n"),"\n")))}else{var T=x(u),S="",C=w[r];"notDeepEqual"===r||"notEqual"===r?(T="".concat(w[r],"\n\n").concat(T)).length>1024&&(T="".concat(T.slice(0,1021),"...")):(S="".concat(x(d)),T.length>512&&(T="".concat(T.slice(0,509),"...")),S.length>512&&(S="".concat(S.slice(0,509),"...")),"deepEqual"===r||"equal"===r?T="".concat(C,"\n\n").concat(T,"\n\nshould equal\n\n"):S=" ".concat(r," ").concat(S)),n=i(this,l(t).call(this,"".concat(T).concat(S)))}return Error.stackTraceLimit=p,n.generatedMessage=!o,Object.defineProperty(s(n),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),n.code="ERR_ASSERTION",n.actual=u,n.expected=d,n.operator=r,Error.captureStackTrace&&Error.captureStackTrace(s(n),c),n.stack,n.name="AssertionError",i(n)}var n,c,u;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,e),n=t,c=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:p.custom,value:function(e,t){return p(this,function(e){for(var t=1;t2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}d("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),d("ERR_INVALID_ARG_TYPE",(function(e,t,o){var r,i,c,u;if(void 0===s&&(s=n(75979)),s("string"===typeof e,"'name' must be a string"),"string"===typeof t&&(i="not ",t.substr(!c||c<0?0:+c,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))u="The ".concat(e," ").concat(r," ").concat(l(t,"type"));else{var d=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";u='The "'.concat(e,'" ').concat(d," ").concat(r," ").concat(l(t,"type"))}return u+=". Received type ".concat(a(o))}),TypeError),d("ERR_INVALID_ARG_VALUE",(function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===c&&(c=n(4088));var o=c.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(a,". Received ").concat(o)}),TypeError,RangeError),d("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var o;return o=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(a(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(o,".")}),TypeError),d("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),a=0;a0,"At least one arg needs to be specified");var o="The ",r=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),r){case 1:o+="".concat(t[0]," argument");break;case 2:o+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:o+=t.slice(0,r-1).join(", "),o+=", and ".concat(t[r-1]," arguments")}return"".concat(o," must be specified")}),TypeError),e.exports.codes=u},13906:function(e,t,n){"use strict";function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],a=!0,o=!1,r=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(c){o=!0,r=c}finally{try{a||null==s.return||s.return()}finally{if(o)throw r}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var r=void 0!==/a/g.flags,i=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},s=function(e){var t=[];return e.forEach((function(e,n){return t.push([n,e])})),t},c=Object.is?Object.is:n(40372),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},d=Number.isNaN?Number.isNaN:n(80266);function l(e){return e.call.bind(e)}var f=l(Object.prototype.hasOwnProperty),p=l(Object.prototype.propertyIsEnumerable),b=l(Object.prototype.toString),m=n(4088).types,h=m.isAnyArrayBuffer,g=m.isArrayBufferView,y=m.isDate,v=m.isMap,w=m.isRegExp,k=m.isSet,A=m.isNativeError,x=m.isBoxedPrimitive,I=m.isNumberObject,T=m.isStringObject,S=m.isBooleanObject,C=m.isBigIntObject,E=m.isSymbolObject,R=m.isFloat32Array,M=m.isFloat64Array;function P(e){if(0===e.length||e.length>10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function U(e){return Object.keys(e).filter(P).concat(u(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function _(e,t){if(e===t)return 0;for(var n=e.length,a=t.length,o=0,r=Math.min(n,a);o=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){u.headers[e]=o.merge(s)})),e.exports=u},24711:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),a=0;a=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},95203:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},48484:function(e,t,n){"use strict";var a=n(65218),o=n(88593),r={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){r[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={},s=o.version.split(".");function c(e,t){for(var n=t?t.split("."):s,a=e.split("."),o=0;o<3;o++){if(n[o]>a[o])return!0;if(n[o]0;){var r=a[o],i=t[r];if(i){var s=e[r],c=void 0===s||i(s,r,e);if(!0!==c)throw new TypeError("option "+r+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+r)}},validators:r}},75737:function(e,t,n){"use strict";var a=n(24711),o=Object.prototype.toString;function r(e){return"[object Array]"===o.call(e)}function i(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function d(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),r(e))for(var n=0,a=e.length;n=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,d=new Uint8Array(i);e[n];){var l=t[e.charCodeAt(n)];if(255===l)return;for(var f=0,p=i-1;(0!==l||f>>0,d[p]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");r=f,n++}for(var b=i-r;b!==i&&0===d[b];)b++;var m=a.allocUnsafe(o+(i-b));m.fill(0,0,o);for(var h=o;b!==i;)m[h++]=d[b++];return m}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=a.from(t)),!a.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var n=0,o=0,r=0,i=t.length;r!==i&&0===t[r];)r++,n++;for(var u=(i-r)*d+1>>>0,l=new Uint8Array(u);r!==i;){for(var f=t[r],p=0,b=u-1;(0!==f||p>>0,l[b]=f%s>>>0,f=f/s>>>0;if(0!==f)throw new Error("Non-zero carry");o=p,r++}for(var m=u-o;m!==u&&0===l[m];)m++;for(var h=c.repeat(n);m0?i-4:i;for(n=0;n>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===s&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===s&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},t.fromByteArray=function(e){for(var t,a=e.length,o=a%3,r=[],i=16383,s=0,c=a-o;sc?c:s+i));1===o?(t=e[a-1],r.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[a-2]<<8)+e[a-1],r.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return r.join("")};for(var n=[],a=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=r.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,a){for(var o,r,i=[],s=t;s>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return i.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},22714:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bech32m=t.bech32=void 0;for(var n="qpzry9x8gf2tvdw0s3jn54khce6mua7l",a={},o=0;o>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function s(e){for(var t=1,n=0;n126)return"Invalid prefix ("+e+")";t=i(t)^a>>5}t=i(t);for(var o=0;o=n;)r-=n,s.push(o>>r&i);if(a)r>0&&s.push(o<=t)return"Excess padding";if(o<n)return"Exceeds length limit";var o=e.toLowerCase(),r=e.toUpperCase();if(e!==o&&e!==r)return"Mixed-case string "+e;var c=(e=o).lastIndexOf("1");if(-1===c)return"No separator character for "+e;if(0===c)return"Missing prefix for "+e;var u=e.slice(0,c),d=e.slice(c+1);if(d.length<6)return"Data too short";var l=s(u);if("string"===typeof l)return l;for(var f=[],p=0;p=d.length||f.push(m)}return l!==t?"Invalid checksum for "+e:{prefix:u,words:f}}return t="bech32"===e?1:734539939,{decodeUnsafe:function(e,t){var n=o(e,t);if("object"===typeof n)return n},decode:function(e,t){var n=o(e,t);if("object"===typeof n)return n;throw new Error(n)},encode:function(e,a,o){if(o=o||90,e.length+7+a.length>o)throw new TypeError("Exceeds length limit");var r=s(e=e.toLowerCase());if("string"===typeof r)throw new Error(r);for(var c=e+"1",u=0;u>5!==0)throw new Error("Non 5-bit word");r=i(r)^d,c+=n.charAt(d)}for(var l=0;l<6;++l)r=i(r);r^=t;for(var f=0;f<6;++f){var p=r>>5*(5-f)&31;c+=n.charAt(p)}return c},toWords:u,fromWordsUnsafe:d,fromWords:l}}t.bech32=f("bech32"),t.bech32m=f("bech32m")},21585:function(e,t,n){var a;!function(o){"use strict";var r,i=20,s=1,c=1e6,u=1e6,d=-7,l=21,f=!1,p="[big.js] ",b=p+"Invalid ",m=b+"decimal places",h=b+"rounding mode",g=p+"Division by zero",y={},v=void 0,w=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function k(e,t,n,a){var o=e.c;if(n===v&&(n=e.constructor.RM),0!==n&&1!==n&&2!==n&&3!==n)throw Error(h);if(t<1)a=3===n&&(a||!!o[0])||0===t&&(1===n&&o[0]>=5||2===n&&(o[0]>5||5===o[0]&&(a||o[1]!==v))),o.length=1,a?(e.e=e.e-t+1,o[0]=1):o[0]=e.e=0;else if(t=5||2===n&&(o[t]>5||5===o[t]&&(a||o[t+1]!==v||1&o[t-1]))||3===n&&(a||!!o[0]),o.length=t,a)for(;++o[--t]>9;)if(o[t]=0,0===t){++e.e,o.unshift(1);break}for(t=o.length;!o[--t];)o.pop()}return e}function A(e,t,n){var a=e.e,o=e.c.join(""),r=o.length;if(t)o=o.charAt(0)+(r>1?"."+o.slice(1):"")+(a<0?"e":"e+")+a;else if(a<0){for(;++a;)o="0"+o;o="0."+o}else if(a>0)if(++a>r)for(a-=r;a--;)o+="0";else a1&&(o=o.charAt(0)+"."+o.slice(1));return e.s<0&&n?"-"+o:o}y.abs=function(){var e=new this.constructor(this);return e.s=1,e},y.cmp=function(e){var t,n=this,a=n.c,o=(e=new n.constructor(e)).c,r=n.s,i=e.s,s=n.e,c=e.e;if(!a[0]||!o[0])return a[0]?r:o[0]?-i:0;if(r!=i)return r;if(t=r<0,s!=c)return s>c^t?1:-1;for(i=(s=a.length)<(c=o.length)?s:c,r=-1;++ro[r]^t?1:-1;return s==c?0:s>c^t?1:-1},y.div=function(e){var t=this,n=t.constructor,a=t.c,o=(e=new n(e)).c,r=t.s==e.s?1:-1,i=n.DP;if(i!==~~i||i<0||i>c)throw Error(m);if(!o[0])throw Error(g);if(!a[0])return e.s=r,e.c=[e.e=0],e;var s,u,d,l,f,p=o.slice(),b=s=o.length,h=a.length,y=a.slice(0,s),w=y.length,A=e,x=A.c=[],I=0,T=i+(A.e=t.e-e.e)+1;for(A.s=r,r=T<0?0:T,p.unshift(0);w++w?1:-1;else for(f=-1,l=0;++fy[f]?1:-1;break}if(!(l<0))break;for(u=w==s?o:p;w;){if(y[--w]T&&k(A,T,n.RM,y[0]!==v),A},y.eq=function(e){return 0===this.cmp(e)},y.gt=function(e){return this.cmp(e)>0},y.gte=function(e){return this.cmp(e)>-1},y.lt=function(e){return this.cmp(e)<0},y.lte=function(e){return this.cmp(e)<1},y.minus=y.sub=function(e){var t,n,a,o,r=this,i=r.constructor,s=r.s,c=(e=new i(e)).s;if(s!=c)return e.s=-c,r.plus(e);var u=r.c.slice(),d=r.e,l=e.c,f=e.e;if(!u[0]||!l[0])return l[0]?e.s=-c:u[0]?e=new i(r):e.s=1,e;if(s=d-f){for((o=s<0)?(s=-s,a=u):(f=d,a=l),a.reverse(),c=s;c--;)a.push(0);a.reverse()}else for(n=((o=u.length0)for(;c--;)u[t++]=0;for(c=t;n>s;){if(u[--n]0?(c=i,a=u):(t=-t,a=s),a.reverse();t--;)a.push(0);a.reverse()}for(s.length-u.length<0&&(a=u,u=s,s=a),t=u.length,n=0;t;s[t]%=10)n=(s[--t]=s[t]+u[t]+n)/10|0;for(n&&(s.unshift(n),++c),t=s.length;0===s[--t];)s.pop();return e.c=s,e.e=c,e},y.pow=function(e){var t=this,n=new t.constructor("1"),a=n,o=e<0;if(e!==~~e||e<-1e6||e>u)throw Error(b+"exponent");for(o&&(e=-e);1&e&&(a=a.times(t)),e>>=1;)t=t.times(t);return o?n.div(a):a},y.prec=function(e,t){if(e!==~~e||e<1||e>c)throw Error(b+"precision");return k(new this.constructor(this),e,t)},y.round=function(e,t){if(e===v)e=0;else if(e!==~~e||e<-c||e>c)throw Error(m);return k(new this.constructor(this),e+this.e+1,t)},y.sqrt=function(){var e,t,n,a=this,o=a.constructor,r=a.s,i=a.e,s=new o("0.5");if(!a.c[0])return new o(a);if(r<0)throw Error(p+"No square root");0===(r=Math.sqrt(a+""))||r===1/0?((t=a.c.join("")).length+i&1||(t+="0"),i=((i+1)/2|0)-(i<0||1&i),e=new o(((r=Math.sqrt(t))==1/0?"5e":(r=r.toExponential()).slice(0,r.indexOf("e")+1))+i)):e=new o(r+""),i=e.e+(o.DP+=4);do{n=e,e=s.times(n.plus(a.div(n)))}while(n.c.slice(0,i).join("")!==e.c.slice(0,i).join(""));return k(e,(o.DP-=4)+e.e+1,o.RM)},y.times=y.mul=function(e){var t,n=this,a=n.constructor,o=n.c,r=(e=new a(e)).c,i=o.length,s=r.length,c=n.e,u=e.e;if(e.s=n.s==e.s?1:-1,!o[0]||!r[0])return e.c=[e.e=0],e;for(e.e=c+u,ic;)s=t[u]+r[c]*o[u-c-1]+s,t[u--]=s%10,s=s/10|0;t[u]=s}for(s?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},y.toExponential=function(e,t){var n=this,a=n.c[0];if(e!==v){if(e!==~~e||e<0||e>c)throw Error(m);for(n=k(new n.constructor(n),++e,t);n.c.lengthc)throw Error(m);for(e=e+(n=k(new n.constructor(n),e+n.e+1,t)).e+1;n.c.length=t.PE,!!e.c[0])},y.toNumber=function(){var e=Number(A(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(p+"Imprecise conversion");return e},y.toPrecision=function(e,t){var n=this,a=n.constructor,o=n.c[0];if(e!==v){if(e!==~~e||e<1||e>c)throw Error(b+"precision");for(n=k(new a(n),e,t);n.c.length=a.PE,!!o)},y.valueOf=function(){var e=this,t=e.constructor;if(!0===t.strict)throw Error(p+"valueOf disallowed");return A(e,e.e<=t.NE||e.e>=t.PE,!0)},r=function e(){function t(n){var a=this;if(!(a instanceof t))return n===v?e():new t(n);if(n instanceof t)a.s=n.s,a.e=n.e,a.c=n.c.slice();else{if("string"!==typeof n){if(!0===t.strict&&"bigint"!==typeof n)throw TypeError(b+"value");n=0===n&&1/n<0?"-0":String(n)}!function(e,t){var n,a,o;if(!w.test(t))throw Error(b+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".",""));(a=t.search(/e/i))>0?(n<0&&(n=a),n+=+t.slice(a+1),t=t.substring(0,a)):n<0&&(n=t.length);for(o=t.length,a=0;a0&&"0"==t.charAt(--o););for(e.e=n-a-1,e.c=[],n=0;a<=o;)e.c[n++]=+t.charAt(a++)}}(a,n)}a.constructor=t}return t.prototype=y,t.DP=i,t.RM=s,t.NE=d,t.PE=l,t.strict=f,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}(),r.default=r.Big=r,void 0===(a=function(){return r}.call(t,n,t,e))||(e.exports=a)}()},24537:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.toBigIntLE=function(e){var t=a.from(e);t.reverse();var n=t.toString("hex");return 0===n.length?BigInt(0):BigInt("0x".concat(n))},t.toBigIntBE=function(e){var t=e.toString("hex");return 0===t.length?BigInt(0):BigInt("0x".concat(t))},t.toBufferLE=function(e,t){var n=e.toString(16),o=a.from(n.padStart(2*t,"0").slice(0,2*t),"hex");return o.reverse(),o},t.toBufferBE=function(e,t){var n=e.toString(16);return a.from(n.padStart(2*t,"0").slice(0,2*t),"hex")}},59995:function(e,t,n){var a;!function(o){"use strict";var r,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,c=Math.floor,u="[BigNumber Error] ",d=u+"Number primitive has more than 15 significant digits: ",l=1e14,f=14,p=9007199254740991,b=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,h=1e9;function g(e){var t=0|e;return e>0||e===t?t:t-1}function y(e){for(var t,n,a=1,o=e.length,r=e[0]+"";au^n?1:-1;for(s=(c=o.length)<(u=r.length)?c:u,i=0;ir[i]^n?1:-1;return c==u?0:c>u^n?1:-1}function w(e,t,n,a){if(en||e!==c(e))throw Error(u+(a||"Argument")+("number"==typeof e?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function k(e){var t=e.c.length-1;return g(e.e/f)==t&&e.c[t]%2!=0}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t,n){var a,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(++t>(a=e.length)){for(o=n,t-=a;--t;o+=n);e+=o}else tM?g.c=g.e=null:e.e=10;l/=10,u++);return void(u>M?g.c=g.e=null:(g.e=u,g.c=[e]))}h=String(e)}else{if(!i.test(h=String(e)))return o(g,h,b);g.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(u=h.indexOf("."))>-1&&(h=h.replace(".","")),(l=h.search(/e/i))>0?(u<0&&(u=l),u+=+h.slice(l+1),h=h.substring(0,l)):u<0&&(u=h.length)}else{if(w(t,2,D.length,"Base"),10==t&&N)return H(g=new O(e),T+g.e+1,S);if(h=String(e),b="number"==typeof e){if(0*e!=0)return o(g,h,b,t);if(g.s=1/e<0?(h=h.slice(1),-1):1,O.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(d+e)}else g.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(n=D.slice(0,t),u=l=0,m=h.length;lu){u=m;continue}}else if(!s&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){s=!0,l=-1,u=0;continue}return o(g,String(e),b,t)}b=!1,(u=(h=a(h,t,10,g.s)).indexOf("."))>-1?h=h.replace(".",""):u=h.length}for(l=0;48===h.charCodeAt(l);l++);for(m=h.length;48===h.charCodeAt(--m););if(h=h.slice(l,++m)){if(m-=l,b&&O.DEBUG&&m>15&&(e>p||e!==c(e)))throw Error(d+g.s*e);if((u=u-l-1)>M)g.c=g.e=null;else if(u=E)?A(c,i):x(c,i,"0");else if(r=(e=H(new O(e),t,n)).e,s=(c=y(e.c)).length,1==a||2==a&&(t<=r||r<=C)){for(;ss){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=r-s)>0)for(r+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function L(e,t){for(var n,a=1,o=new O(e[0]);a=10;o/=10,a++);return(n=a+n*f-1)>M?e.c=e.e=null:n=10;u/=10,o++);if((r=t-o)<0)r+=f,i=t,m=(d=h[p=0])/g[o-i-1]%10|0;else if((p=s((r+1)/f))>=h.length){if(!a)break e;for(;h.length<=p;h.push(0));d=m=0,o=1,i=(r%=f)-f+1}else{for(d=u=h[p],o=1;u>=10;u/=10,o++);m=(i=(r%=f)-f+o)<0?0:d/g[o-i-1]%10|0}if(a=a||t<0||null!=h[p+1]||(i<0?d:d%g[o-i-1]),a=n<4?(m||a)&&(0==n||n==(e.s<0?3:2)):m>5||5==m&&(4==n||a||6==n&&(r>0?i>0?d/g[o-i]:0:h[p-1])%10&1||n==(e.s<0?8:7)),t<1||!h[0])return h.length=0,a?(t-=e.e+1,h[0]=g[(f-t%f)%f],e.e=-t||0):h[0]=e.e=0,e;if(0==r?(h.length=p,u=1,p--):(h.length=p+1,u=g[f-r],h[p]=i>0?c(d/g[o-i]%g[i])*u:0),a)for(;;){if(0==p){for(r=1,i=h[0];i>=10;i/=10,r++);for(i=h[0]+=u,u=1;i>=10;i/=10,u++);r!=u&&(e.e++,h[0]==l&&(h[0]=1));break}if(h[p]+=u,h[p]!=l)break;h[p--]=0,u=1}for(r=h.length;0===h[--r];h.pop());}e.e>M?e.c=e.e=null:e.e=E?A(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return O.clone=e,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(n=e[t],0,h,t),T=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(n=e[t],0,8,t),S=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(w(n[0],-h,0,t),w(n[1],0,h,t),C=n[0],E=n[1]):(w(n,-h,h,t),C=-(E=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)w(n[0],-h,-1,t),w(n[1],1,h,t),R=n[0],M=n[1];else{if(w(n,-h,h,t),!n)throw Error(u+t+" cannot be zero: "+n);R=-(M=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(u+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw P=!n,Error(u+"crypto unavailable");P=n}else P=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(n=e[t],0,9,t),U=n),e.hasOwnProperty(t="POW_PRECISION")&&(w(n=e[t],0,h,t),_=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(u+t+" not an object: "+n);B=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(u+t+" invalid: "+n);N="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:T,ROUNDING_MODE:S,EXPONENTIAL_AT:[C,E],RANGE:[R,M],CRYPTO:P,MODULO_MODE:U,POW_PRECISION:_,FORMAT:B,ALPHABET:D}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,n,a=e.c,o=e.e,r=e.s;e:if("[object Array]"=={}.toString.call(a)){if((1===r||-1===r)&&o>=-h&&o<=h&&o===c(o)){if(0===a[0]){if(0===o&&1===a.length)return!0;break e}if((t=(o+1)%f)<1&&(t+=f),String(a[0]).length==t){for(t=0;t=l||n!==c(n))break e;if(0!==n)return!0}}}else if(null===a&&null===o&&(null===r||1===r||-1===r))return!0;throw Error(u+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return L(arguments,r.lt)},O.minimum=O.min=function(){return L(arguments,r.gt)},O.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return c(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var n,a,o,r,i,d=0,l=[],p=new O(I);if(null==e?e=T:w(e,0,h),r=s(e/f),P)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(r*=2));d>>11))>=9e15?(a=crypto.getRandomValues(new Uint32Array(2)),n[d]=a[0],n[d+1]=a[1]):(l.push(i%1e14),d+=2);d=r/2}else{if(!crypto.randomBytes)throw P=!1,Error(u+"crypto unavailable");for(n=crypto.randomBytes(r*=7);d=9e15?crypto.randomBytes(7).copy(n,d):(l.push(i%1e14),d+=7);d=r/7}if(!P)for(;d=10;i/=10,d++);dn-1&&(null==i[o+1]&&(i[o+1]=0),i[o+1]+=i[o]/n|0,i[o]%=n)}return i.reverse()}return function(a,o,r,i,s){var c,u,d,l,f,p,b,m,h=a.indexOf("."),g=T,v=S;for(h>=0&&(l=_,_=0,a=a.replace(".",""),p=(m=new O(o)).pow(a.length-h),_=l,m.c=t(x(y(p.c),p.e,"0"),10,r,e),m.e=m.c.length),d=l=(b=t(a,o,r,s?(c=D,e):(c=e,D))).length;0==b[--l];b.pop());if(!b[0])return c.charAt(0);if(h<0?--d:(p.c=b,p.e=d,p.s=i,b=(p=n(p,m,g,v,r)).c,f=p.r,d=p.e),h=b[u=d+g+1],l=r/2,f=f||u<0||null!=b[u+1],f=v<4?(null!=h||f)&&(0==v||v==(p.s<0?3:2)):h>l||h==l&&(4==v||f||6==v&&1&b[u-1]||v==(p.s<0?8:7)),u<1||!b[0])a=f?x(c.charAt(1),-g,c.charAt(0)):c.charAt(0);else{if(b.length=u,f)for(--r;++b[--u]>r;)b[u]=0,u||(++d,b=[1].concat(b));for(l=b.length;!b[--l];);for(h=0,a="";h<=l;a+=c.charAt(b[h++]));a=x(a,d,c.charAt(0))}return a}}(),n=function(){function e(e,t,n){var a,o,r,i,s=0,c=e.length,u=t%m,d=t/m|0;for(e=e.slice();c--;)s=((o=u*(r=e[c]%m)+(a=d*r+(i=e[c]/m|0)*u)%m*m+s)/n|0)+(a/m|0)+d*i,e[c]=o%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,a){var o,r;if(n!=a)r=n>a?1:-1;else for(o=r=0;ot[o]?1:-1;break}return r}function n(e,t,n,a){for(var o=0;n--;)e[n]-=o,o=e[n]1;e.splice(0,1));}return function(a,o,r,i,s){var u,d,p,b,m,h,y,v,w,k,A,x,I,T,S,C,E,R=a.s==o.s?1:-1,M=a.c,P=o.c;if(!M||!M[0]||!P||!P[0])return new O(a.s&&o.s&&(M?!P||M[0]!=P[0]:P)?M&&0==M[0]||!P?0*R:R/0:NaN);for(w=(v=new O(R)).c=[],R=r+(d=a.e-o.e)+1,s||(s=l,d=g(a.e/f)-g(o.e/f),R=R/f|0),p=0;P[p]==(M[p]||0);p++);if(P[p]>(M[p]||0)&&d--,R<0)w.push(1),b=!0;else{for(T=M.length,C=P.length,p=0,R+=2,(m=c(s/(P[0]+1)))>1&&(P=e(P,m,s),M=e(M,m,s),C=P.length,T=M.length),I=C,A=(k=M.slice(0,C)).length;A=s/2&&S++;do{if(m=0,(u=t(P,k,C,A))<0){if(x=k[0],C!=A&&(x=x*s+(k[1]||0)),(m=c(x/S))>1)for(m>=s&&(m=s-1),y=(h=e(P,m,s)).length,A=k.length;1==t(h,k,y,A);)m--,n(h,C=10;R/=10,p++);H(v,r+(v.e=p+d*f-1)+1,i,b)}else v.e=d,v.r=+b;return v}}(),o=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,a=/^-?(Infinity|NaN)$/,o=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(r,i,s,c){var d,l=s?i:i.replace(o,"");if(a.test(l))r.s=isNaN(l)?null:l<0?-1:1;else{if(!s&&(l=l.replace(e,(function(e,t,n){return d="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=d?e:t})),c&&(d=c,l=l.replace(t,"$1").replace(n,"0.$1")),i!=l))return new O(l,d);if(O.DEBUG)throw Error(u+"Not a"+(c?" base "+c:"")+" number: "+i);r.s=null}r.c=r.e=null}}(),r.absoluteValue=r.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},r.comparedTo=function(e,t){return v(this,new O(e,t))},r.decimalPlaces=r.dp=function(e,t){var n,a,o,r=this;if(null!=e)return w(e,0,h),null==t?t=S:w(t,0,8),H(new O(r),e+r.e+1,t);if(!(n=r.c))return null;if(a=((o=n.length-1)-g(this.e/f))*f,o=n[o])for(;o%10==0;o/=10,a--);return a<0&&(a=0),a},r.dividedBy=r.div=function(e,t){return n(this,new O(e,t),T,S)},r.dividedToIntegerBy=r.idiv=function(e,t){return n(this,new O(e,t),0,1)},r.exponentiatedBy=r.pow=function(e,t){var n,a,o,r,i,d,l,p,b=this;if((e=new O(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+G(e));if(null!=t&&(t=new O(t)),i=e.e>14,!b.c||!b.c[0]||1==b.c[0]&&!b.e&&1==b.c.length||!e.c||!e.c[0])return p=new O(Math.pow(+G(b),i?e.s*(2-k(e)):+G(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(a=!d&&b.isInteger()&&t.isInteger())&&(b=b.mod(t))}else{if(e.e>9&&(b.e>0||b.e<-1||(0==b.e?b.c[0]>1||i&&b.c[1]>=24e7:b.c[0]<8e13||i&&b.c[0]<=9999975e7)))return r=b.s<0&&k(e)?-0:0,b.e>-1&&(r=1/r),new O(d?1/r:r);_&&(r=s(_/f+2))}for(i?(n=new O(.5),d&&(e.s=1),l=k(e)):l=(o=Math.abs(+G(e)))%2,p=new O(I);;){if(l){if(!(p=p.times(b)).c)break;r?p.c.length>r&&(p.c.length=r):a&&(p=p.mod(t))}if(o){if(0===(o=c(o/2)))break;l=o%2}else if(H(e=e.times(n),e.e+1,1),e.e>14)l=k(e);else{if(0===(o=+G(e)))break;l=o%2}b=b.times(b),r?b.c&&b.c.length>r&&(b.c.length=r):a&&(b=b.mod(t))}return a?p:(d&&(p=I.div(p)),t?p.mod(t):r?H(p,_,S,undefined):p)},r.integerValue=function(e){var t=new O(this);return null==e?e=S:w(e,0,8),H(t,t.e+1,e)},r.isEqualTo=r.eq=function(e,t){return 0===v(this,new O(e,t))},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(e,t){return v(this,new O(e,t))>0},r.isGreaterThanOrEqualTo=r.gte=function(e,t){return 1===(t=v(this,new O(e,t)))||0===t},r.isInteger=function(){return!!this.c&&g(this.e/f)>this.c.length-2},r.isLessThan=r.lt=function(e,t){return v(this,new O(e,t))<0},r.isLessThanOrEqualTo=r.lte=function(e,t){return-1===(t=v(this,new O(e,t)))||0===t},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return this.s>0},r.isZero=function(){return!!this.c&&0==this.c[0]},r.minus=function(e,t){var n,a,o,r,i=this,s=i.s;if(t=(e=new O(e,t)).s,!s||!t)return new O(NaN);if(s!=t)return e.s=-t,i.plus(e);var c=i.e/f,u=e.e/f,d=i.c,p=e.c;if(!c||!u){if(!d||!p)return d?(e.s=-t,e):new O(p?i:NaN);if(!d[0]||!p[0])return p[0]?(e.s=-t,e):new O(d[0]?i:3==S?-0:0)}if(c=g(c),u=g(u),d=d.slice(),s=c-u){for((r=s<0)?(s=-s,o=d):(u=c,o=p),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(a=(r=(s=d.length)<(t=p.length))?s:t,s=t=0;t0)for(;t--;d[n++]=0);for(t=l-1;a>s;){if(d[--a]=0;){for(n=0,b=x[o]%w,h=x[o]/w|0,r=o+(i=c);r>o;)n=((u=b*(u=A[--i]%w)+(s=h*u+(d=A[i]/w|0)*b)%w*w+y[r]+n)/v|0)+(s/w|0)+h*d,y[r--]=u%v;y[r]=n}return n?++a:y.splice(0,1),j(e,y,a)},r.negated=function(){var e=new O(this);return e.s=-e.s||null,e},r.plus=function(e,t){var n,a=this,o=a.s;if(t=(e=new O(e,t)).s,!o||!t)return new O(NaN);if(o!=t)return e.s=-t,a.minus(e);var r=a.e/f,i=e.e/f,s=a.c,c=e.c;if(!r||!i){if(!s||!c)return new O(o/0);if(!s[0]||!c[0])return c[0]?e:new O(s[0]?a:0*o)}if(r=g(r),i=g(i),s=s.slice(),o=r-i){for(o>0?(i=r,n=c):(o=-o,n=s),n.reverse();o--;n.push(0));n.reverse()}for((o=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/l|0,s[t]=l===s[t]?0:s[t]%l;return o&&(s=[o].concat(s),++i),j(e,s,i)},r.precision=r.sd=function(e,t){var n,a,o,r=this;if(null!=e&&e!==!!e)return w(e,1,h),null==t?t=S:w(t,0,8),H(new O(r),e,t);if(!(n=r.c))return null;if(a=(o=n.length-1)*f+1,o=n[o]){for(;o%10==0;o/=10,a--);for(o=n[0];o>=10;o/=10,a++);}return e&&r.e+1>a&&(a=r.e+1),a},r.shiftedBy=function(e){return w(e,-p,p),this.times("1e"+e)},r.squareRoot=r.sqrt=function(){var e,t,a,o,r,i=this,s=i.c,c=i.s,u=i.e,d=T+4,l=new O("0.5");if(1!==c||!s||!s[0])return new O(!c||c<0&&(!s||s[0])?NaN:s?i:1/0);if(0==(c=Math.sqrt(+G(i)))||c==1/0?(((t=y(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=g((u+1)/2)-(u<0||u%2),a=new O(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):a=new O(c+""),a.c[0])for((c=(u=a.e)+d)<3&&(c=0);;)if(r=a,a=l.times(r.plus(n(i,r,d,1))),y(r.c).slice(0,c)===(t=y(a.c)).slice(0,c)){if(a.e0&&m>0){for(r=m%s||s,l=b.substr(0,r);r0&&(l+=d+b.slice(r)),p&&(l="-"+l)}a=f?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):f):l}return(n.prefix||"")+a+(n.suffix||"")},r.toFraction=function(e){var t,a,o,r,i,s,c,d,l,p,m,h,g=this,v=g.c;if(null!=e&&(!(c=new O(e)).isInteger()&&(c.c||1!==c.s)||c.lt(I)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+G(c));if(!v)return new O(g);for(t=new O(I),l=a=new O(I),o=d=new O(I),h=y(v),i=t.e=h.length-g.e-1,t.c[0]=b[(s=i%f)<0?f+s:s],e=!e||c.comparedTo(t)>0?i>0?t:l:c,s=M,M=1/0,c=new O(h),d.c[0]=0;p=n(c,t,0,1),1!=(r=a.plus(p.times(o))).comparedTo(e);)a=o,o=r,l=d.plus(p.times(r=l)),d=r,t=c.minus(p.times(r=t)),c=r;return r=n(e.minus(a),o,0,1),d=d.plus(r.times(l)),a=a.plus(r.times(o)),d.s=l.s=g.s,m=n(l,o,i*=2,S).minus(g).abs().comparedTo(n(d,a,i,S).minus(g).abs())<1?[l,o]:[d,a],M=s,m},r.toNumber=function(){return+G(this)},r.toPrecision=function(e,t){return null!=e&&w(e,1,h),F(this,e,t,2)},r.toString=function(e){var t,n=this,o=n.s,r=n.e;return null===r?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=r<=C||r>=E?A(y(n.c),r):x(y(n.c),r,"0"):10===e&&N?t=x(y((n=H(new O(n),T+r+1,S)).c),n.e,"0"):(w(e,2,D.length,"Base"),t=a(x(y(n.c),r,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},r.valueOf=r.toJSON=function(){return G(this)},r._isBigNumber=!0,null!=t&&O.set(t),O}(),r.default=r.BigNumber=r,void 0===(a=function(){return r}.call(t,n,t,e))||(e.exports=a)}()},39707:function(e,t,n){"use strict";var a=n(27424).default,o=n(861).default,r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var s=function(){function e(t,n){r(this,e),this.code="",this.scopes=[["vars"]],this.bitFields=[],this.tmpVariableCount=0,this.references=new Map,this.imports=[],this.reverseImports=new Map,this.useContextVariables=!1,this.importPath=t,this.useContextVariables=n}return i(e,[{key:"generateVariable",value:function(e){var t=o(this.scopes[this.scopes.length-1]);return e&&t.push(e),t.join(".")}},{key:"generateOption",value:function(e){switch(typeof e){case"number":return e.toString();case"string":return this.generateVariable(e);case"function":return"".concat(this.addImport(e),".call(").concat(this.generateVariable(),", vars)")}}},{key:"generateError",value:function(e){this.pushCode("throw new Error(".concat(e,");"))}},{key:"generateTmpVariable",value:function(){return"$tmp"+this.tmpVariableCount++}},{key:"pushCode",value:function(e){this.code+=e+"\n"}},{key:"pushPath",value:function(e){e&&this.scopes[this.scopes.length-1].push(e)}},{key:"popPath",value:function(e){e&&this.scopes[this.scopes.length-1].pop()}},{key:"pushScope",value:function(e){this.scopes.push([e])}},{key:"popScope",value:function(){this.scopes.pop()}},{key:"addImport",value:function(e){if(!this.importPath)return"(".concat(e,")");var t=this.reverseImports.get(e);return t||(t=this.imports.push(e)-1,this.reverseImports.set(e,t)),"".concat(this.importPath,"[").concat(t,"]")}},{key:"addReference",value:function(e){this.references.has(e)||this.references.set(e,{resolved:!1,requested:!1})}},{key:"markResolved",value:function(e){var t=this.references.get(e);t&&(t.resolved=!0)}},{key:"markRequested",value:function(e){var t=this;e.forEach((function(e){var n=t.references.get(e);n&&(n.requested=!0)}))}},{key:"getUnresolvedReferences",value:function(){return Array.from(this.references).filter((function(e){var t=a(e,2),n=(t[0],t[1]);return!n.resolved&&!n.requested})).map((function(e){var t=a(e,2),n=t[0];t[1];return n}))}}]),e}(),c=new Map,u="___parser_",d={uint8:1,uint16le:2,uint16be:2,uint32le:4,uint32be:4,int8:1,int16le:2,int16be:2,int32le:4,int32be:4,int64be:8,int64le:8,uint64be:8,uint64le:8,floatle:4,floatbe:4,doublele:8,doublebe:8},l={uint8:"Uint8",uint16le:"Uint16",uint16be:"Uint16",uint32le:"Uint32",uint32be:"Uint32",int8:"Int8",int16le:"Int16",int16be:"Int16",int32le:"Int32",int32be:"Int32",int64be:"BigInt64",int64le:"BigInt64",uint64be:"BigUint64",uint64le:"BigUint64",floatle:"Float32",floatbe:"Float32",doublele:"Float64",doublebe:"Float64"},f={uint8:!1,uint16le:!0,uint16be:!1,uint32le:!0,uint32be:!1,int8:!1,int16le:!0,int16be:!1,int32le:!0,int32be:!1,int64be:!1,int64le:!0,uint64be:!1,uint64le:!0,floatle:!0,floatbe:!1,doublele:!0,doublebe:!1},p=function(){function e(){r(this,e),this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}return i(e,[{key:"primitiveGenerateN",value:function(e,t){var n=l[e],a=f[e];t.pushCode("".concat(t.generateVariable(this.varName)," = dataView.get").concat(n,"(offset, ").concat(a,");")),t.pushCode("offset += ".concat(d[e],";"))}},{key:"primitiveN",value:function(e,t,n){return this.setNextParser(e,t,n)}},{key:"useThisEndian",value:function(e){return e+this.endian.toLowerCase()}},{key:"uint8",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("uint8",e,t)}},{key:"uint16",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN(this.useThisEndian("uint16"),e,t)}},{key:"uint16le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("uint16le",e,t)}},{key:"uint16be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("uint16be",e,t)}},{key:"uint32",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN(this.useThisEndian("uint32"),e,t)}},{key:"uint32le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("uint32le",e,t)}},{key:"uint32be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("uint32be",e,t)}},{key:"int8",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("int8",e,t)}},{key:"int16",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN(this.useThisEndian("int16"),e,t)}},{key:"int16le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("int16le",e,t)}},{key:"int16be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("int16be",e,t)}},{key:"int32",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN(this.useThisEndian("int32"),e,t)}},{key:"int32le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("int32le",e,t)}},{key:"int32be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("int32be",e,t)}},{key:"bigIntVersionCheck",value:function(){if(!DataView.prototype.getBigInt64)throw new Error("BigInt64 is unsupported on this runtime")}},{key:"int64",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("int64"),e,t)}},{key:"int64be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN("int64be",e,t)}},{key:"int64le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN("int64le",e,t)}},{key:"uint64",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("uint64"),e,t)}},{key:"uint64be",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN("uint64be",e,t)}},{key:"uint64le",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bigIntVersionCheck(),this.primitiveN("uint64le",e,t)}},{key:"floatle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("floatle",e,t)}},{key:"floatbe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("floatbe",e,t)}},{key:"doublele",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("doublele",e,t)}},{key:"doublebe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.primitiveN("doublebe",e,t)}},{key:"bitN",value:function(e,t,n){return n.length=e,this.setNextParser("bit",t,n)}},{key:"bit1",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(1,e,t)}},{key:"bit2",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(2,e,t)}},{key:"bit3",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(3,e,t)}},{key:"bit4",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(4,e,t)}},{key:"bit5",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(5,e,t)}},{key:"bit6",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(6,e,t)}},{key:"bit7",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(7,e,t)}},{key:"bit8",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(8,e,t)}},{key:"bit9",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(9,e,t)}},{key:"bit10",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(10,e,t)}},{key:"bit11",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(11,e,t)}},{key:"bit12",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(12,e,t)}},{key:"bit13",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(13,e,t)}},{key:"bit14",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(14,e,t)}},{key:"bit15",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(15,e,t)}},{key:"bit16",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(16,e,t)}},{key:"bit17",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(17,e,t)}},{key:"bit18",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(18,e,t)}},{key:"bit19",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(19,e,t)}},{key:"bit20",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(20,e,t)}},{key:"bit21",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(21,e,t)}},{key:"bit22",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(22,e,t)}},{key:"bit23",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(23,e,t)}},{key:"bit24",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(24,e,t)}},{key:"bit25",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(25,e,t)}},{key:"bit26",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(26,e,t)}},{key:"bit27",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(27,e,t)}},{key:"bit28",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(28,e,t)}},{key:"bit29",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(29,e,t)}},{key:"bit30",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(30,e,t)}},{key:"bit31",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(31,e,t)}},{key:"bit32",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.bitN(32,e,t)}},{key:"namely",value:function(e){return c.set(e,this),this.alias=e,this}},{key:"skip",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.seek(e,t)}},{key:"seek",value:function(e){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).assert)throw new Error("assert option on seek is not allowed.");return this.setNextParser("seek","",{length:e})}},{key:"string",value:function(e,t){if(!t.zeroTerminated&&!t.length&&!t.greedy)throw new Error("One of length, zeroTerminated, or greedy must be defined for string.");if((t.zeroTerminated||t.length)&&t.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(t.stripNull&&!t.length&&!t.greedy)throw new Error("length or greedy must be defined if stripNull is enabled.");return t.encoding=t.encoding||"utf8",this.setNextParser("string",e,t)}},{key:"buffer",value:function(e,t){if(!t.length&&!t.readUntil)throw new Error("length or readUntil must be defined for buffer.");return this.setNextParser("buffer",e,t)}},{key:"wrapped",value:function(e,t){if("object"!==typeof t&&"object"===typeof e&&(t=e,e=""),!t||!t.wrapper||!t.type)throw new Error("Both wrapper and type must be defined for wrapped.");if(!t.length&&!t.readUntil)throw new Error("length or readUntil must be defined for wrapped.");return this.setNextParser("wrapper",e,t)}},{key:"array",value:function(e,t){if(!t.readUntil&&!t.length&&!t.lengthInBytes)throw new Error("One of readUntil, length and lengthInBytes must be defined for array.");if(!t.type)throw new Error("type is required for array.");if("string"===typeof t.type&&!c.has(t.type)&&!(t.type in d))throw new Error('Array element type "'.concat(t.type,'" is unkown.'));return this.setNextParser("array",e,t)}},{key:"choice",value:function(e,t){if("object"!==typeof t&&"object"===typeof e&&(t=e,e=""),!t)throw new Error("tag and choices are are required for choice.");if(!t.tag)throw new Error("tag is requird for choice.");if(!t.choices)throw new Error("choices is required for choice.");for(var n in t.choices){var a=parseInt(n,10),o=t.choices[a];if(isNaN(a))throw new Error('Choice key "'.concat(n,'" is not a number.'));if("string"===typeof o&&!c.has(o)&&!(o in d))throw new Error('Choice type "'.concat(o,'" is unkown.'))}return this.setNextParser("choice",e,t)}},{key:"nest",value:function(t,n){if("object"!==typeof n&&"object"===typeof t&&(n=t,t=""),!n||!n.type)throw new Error("type is required for nest.");if(!(n.type instanceof e)&&!c.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof e)&&!t)throw new Error("type must be a Parser object if the variable name is omitted.");return this.setNextParser("nest",t,n)}},{key:"pointer",value:function(e,t){if(!t.offset)throw new Error("offset is required for pointer.");if(!t.type)throw new Error("type is required for pointer.");if("string"===typeof t.type&&!(t.type in d)&&!c.has(t.type))throw new Error('Pointer type "'.concat(t.type,'" is unkown.'));return this.setNextParser("pointer",e,t)}},{key:"saveOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.setNextParser("saveOffset",e,t)}},{key:"endianness",value:function(e){switch(e.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error('endianness must be one of "little" or "big"')}return this}},{key:"endianess",value:function(e){return this.endianness(e)}},{key:"useContextVars",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.useContextVariables=e,this}},{key:"create",value:function(e){if(!(e instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=e,this}},{key:"getContext",value:function(e){var t=new s(e,this.useContextVariables);return t.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(t),t.pushCode("return ".concat(u+this.alias,"(0).result;"))):this.addRawCode(t),t}},{key:"getCode",value:function(){return this.getContext("imports").code}},{key:"addRawCode",value:function(e){e.pushCode("var offset = 0;"),e.pushCode("var vars = ".concat(this.constructorFn?"new constructorFn()":"{}",";")),e.pushCode("vars.$parent = null;"),e.pushCode("vars.$root = vars;"),this.generate(e),this.resolveReferences(e),e.pushCode("delete vars.$parent;"),e.pushCode("delete vars.$root;"),e.pushCode("return vars;")}},{key:"addAliasedCode",value:function(e){return e.pushCode("function ".concat(u+this.alias,"(offset, context) {")),e.pushCode("var vars = ".concat(this.constructorFn?"new constructorFn()":"{}",";")),e.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"),e.pushCode("vars = Object.assign(vars, ctx);"),this.generate(e),e.markResolved(this.alias),this.resolveReferences(e),e.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"),e.pushCode("return { offset: offset, result: vars };"),e.pushCode("}"),e}},{key:"resolveReferences",value:function(e){var t=e.getUnresolvedReferences();e.markRequested(t),t.forEach((function(t){var n;null===(n=c.get(t))||void 0===n||n.addAliasedCode(e)}))}},{key:"compile",value:function(){var e="imports",t=this.getContext(e);this.compiled=new Function(e,"TextDecoder","return function (buffer, constructorFn) { ".concat(t.code," };"))(t.imports,TextDecoder)}},{key:"sizeOf",value:function(){var t=NaN;if(Object.keys(d).indexOf(this.type)>=0)t=d[this.type];else if("string"===this.type&&"number"===typeof this.options.length)t=this.options.length;else if("buffer"===this.type&&"number"===typeof this.options.length)t=this.options.length;else if("array"===this.type&&"number"===typeof this.options.length){var n=NaN;"string"===typeof this.options.type?n=d[this.options.type]:this.options.type instanceof e&&(n=this.options.type.sizeOf()),t=this.options.length*n}else"seek"===this.type?t=this.options.length:"nest"===this.type?t=this.options.type.sizeOf():this.type||(t=0);return this.next&&(t+=this.next.sizeOf()),t}},{key:"parse",value:function(e){return this.compiled||this.compile(),this.compiled(e,this.constructorFn)}},{key:"setNextParser",value:function(t,n,a){var o=new e;return o.type=t,o.varName=n,o.options=a,o.endian=this.endian,this.head?this.head.next=o:this.next=o,this.head=o,this}},{key:"generate",value:function(e){if(this.type){switch(this.type){case"uint8":case"uint16le":case"uint16be":case"uint32le":case"uint32be":case"int8":case"int16le":case"int16be":case"int32le":case"int32be":case"int64be":case"int64le":case"uint64be":case"uint64le":case"floatle":case"floatbe":case"doublele":case"doublebe":this.primitiveGenerateN(this.type,e);break;case"bit":this.generateBit(e);break;case"string":this.generateString(e);break;case"buffer":this.generateBuffer(e);break;case"seek":this.generateSeek(e);break;case"nest":this.generateNest(e);break;case"array":this.generateArray(e);break;case"choice":this.generateChoice(e);break;case"pointer":this.generatePointer(e);break;case"saveOffset":this.generateSaveOffset(e);break;case"wrapper":this.generateWrapper(e)}"bit"!==this.type&&this.generateAssert(e)}var t=e.generateVariable(this.varName);return this.options.formatter&&"bit"!==this.type&&this.generateFormatter(e,t,this.options.formatter),this.generateNext(e)}},{key:"generateAssert",value:function(e){if(this.options.assert){var t=e.generateVariable(this.varName);switch(typeof this.options.assert){case"function":var n=e.addImport(this.options.assert);e.pushCode("if (!".concat(n,".call(vars, ").concat(t,")) {"));break;case"number":e.pushCode("if (".concat(this.options.assert," !== ").concat(t,") {"));break;case"string":e.pushCode("if (".concat(JSON.stringify(this.options.assert)," !== ").concat(t,") {"));break;default:throw new Error("assert option must be a string, number or a function.")}e.generateError('"Assertion error: '.concat(t,' is " + ').concat(JSON.stringify(this.options.assert.toString()))),e.pushCode("}")}}},{key:"generateNext",value:function(e){return this.next&&(e=this.next.generate(e)),e}},{key:"generateBit",value:function(e){var t=JSON.parse(JSON.stringify(this));if(t.options=this.options,t.generateAssert=this.generateAssert.bind(this),t.generateFormatter=this.generateFormatter.bind(this),t.varName=e.generateVariable(t.varName),e.bitFields.push(t),!this.next||this.next&&["bit","nest"].indexOf(this.next.type)<0){var n=e.generateTmpVariable();e.pushCode("var ".concat(n," = 0;"));var a=0,o="be"===this.endian,r=0,i=0;e.bitFields.forEach((function(t,s){var c=t.options.length;if(c>i){if(i){var u=-1>>>32-i;e.pushCode("".concat(t.varName," = (").concat(n," & 0x").concat(u.toString(16),") << ").concat(c-i,";")),c-=i}a=0,i=r=function(t){return t<=8?(e.pushCode("".concat(n," = dataView.getUint8(offset);")),t=8):t<=16?(e.pushCode("".concat(n," = dataView.getUint16(offset);")),t=16):t<=24?(e.pushCode("".concat(n," = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);")),t=24):(e.pushCode("".concat(n," = dataView.getUint32(offset);")),t=32),e.pushCode("offset += ".concat(t/8,";")),t}(function(){for(var t=0,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;n32)break;t+=a}return t}(s)-i)}var d=o?r-a-c:a,l=-1>>>32-c;e.pushCode("".concat(t.varName," ").concat(c> ").concat(d," & 0x").concat(l.toString(16),";")),32===t.options.length&&e.pushCode("".concat(t.varName," >>>= 0")),t.options.assert&&t.generateAssert(e),t.options.formatter&&t.generateFormatter(e,t.varName,t.options.formatter),a+=c,i-=c})),e.bitFields=[]}}},{key:"generateSeek",value:function(e){var t=e.generateOption(this.options.length);e.pushCode("offset += ".concat(t,";"))}},{key:"generateString",value:function(e){var t=e.generateVariable(this.varName),n=e.generateTmpVariable(),a=this.options.encoding,o="hex"===a.toLowerCase(),r='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){var i=this.options.length;e.pushCode("var ".concat(n," = offset;")),e.pushCode("while(dataView.getUint8(offset++) !== 0 && offset - ".concat(n," < ").concat(i,");"));var s="offset - ".concat(n," < ").concat(i," ? offset - 1 : offset");e.pushCode(o?"".concat(t," = Array.from(buffer.subarray(").concat(n,", ").concat(s,"), ").concat(r,").join('');"):"".concat(t," = new TextDecoder('").concat(a,"').decode(buffer.subarray(").concat(n,", ").concat(s,"));"))}else if(this.options.length){var c=e.generateOption(this.options.length);e.pushCode(o?"".concat(t," = Array.from(buffer.subarray(offset, offset + ").concat(c,"), ").concat(r,").join('');"):"".concat(t," = new TextDecoder('").concat(a,"').decode(buffer.subarray(offset, offset + ").concat(c,"));")),e.pushCode("offset += ".concat(c,";"))}else this.options.zeroTerminated?(e.pushCode("var ".concat(n," = offset;")),e.pushCode("while(dataView.getUint8(offset++) !== 0);"),e.pushCode(o?"".concat(t," = Array.from(buffer.subarray(").concat(n,", offset - 1), ").concat(r,").join('');"):"".concat(t," = new TextDecoder('").concat(a,"').decode(buffer.subarray(").concat(n,", offset - 1));"))):this.options.greedy&&(e.pushCode("var ".concat(n," = offset;")),e.pushCode("while(buffer.length > offset++);"),e.pushCode(o?"".concat(t," = Array.from(buffer.subarray(").concat(n,", offset), ").concat(r,").join('');"):"".concat(t," = new TextDecoder('").concat(a,"').decode(buffer.subarray(").concat(n,", offset));")));this.options.stripNull&&e.pushCode("".concat(t," = ").concat(t,".replace(/\\x00+$/g, '')"))}},{key:"generateBuffer",value:function(e){var t=e.generateVariable(this.varName);if("function"===typeof this.options.readUntil){var n=this.options.readUntil,a=e.generateTmpVariable(),o=e.generateTmpVariable();e.pushCode("var ".concat(a," = offset;")),e.pushCode("var ".concat(o," = 0;")),e.pushCode("while (offset < buffer.length) {"),e.pushCode("".concat(o," = dataView.getUint8(offset);"));var r=e.addImport(n);e.pushCode("if (".concat(r,".call(").concat(e.generateVariable(),", ").concat(o,", buffer.subarray(offset))) break;")),e.pushCode("offset += 1;"),e.pushCode("}"),e.pushCode("".concat(t," = buffer.subarray(").concat(a,", offset);"))}else if("eof"===this.options.readUntil)e.pushCode("".concat(t," = buffer.subarray(offset);"));else{var i=e.generateOption(this.options.length);e.pushCode("".concat(t," = buffer.subarray(offset, offset + ").concat(i,");")),e.pushCode("offset += ".concat(i,";"))}this.options.clone&&e.pushCode("".concat(t," = buffer.constructor.from(").concat(t,");"))}},{key:"generateArray",value:function(t){var n=t.generateOption(this.options.length),a=t.generateOption(this.options.lengthInBytes),o=this.options.type,r=t.generateTmpVariable(),i=t.generateVariable(this.varName),s=t.generateTmpVariable(),p=this.options.key,b="string"===typeof p;if(b?t.pushCode("".concat(i," = {};")):t.pushCode("".concat(i," = [];")),"function"===typeof this.options.readUntil?t.pushCode("do {"):"eof"===this.options.readUntil?t.pushCode("for (var ".concat(r," = 0; offset < buffer.length; ").concat(r,"++) {")):void 0!==a?t.pushCode("for (var ".concat(r," = offset + ").concat(a,"; offset < ").concat(r,"; ) {")):t.pushCode("for (var ".concat(r," = ").concat(n,"; ").concat(r," > 0; ").concat(r,"--) {")),"string"===typeof o)if(c.get(o)){var m=t.generateTmpVariable();if(t.pushCode("var ".concat(m," = ").concat(u+o,"(offset, {")),t.useContextVariables){var h=t.generateVariable();t.pushCode("$parent: ".concat(h,",")),t.pushCode("$root: ".concat(h,".$root,")),this.options.readUntil||void 0!==a||t.pushCode("$index: ".concat(n," - ").concat(r,","))}t.pushCode("});"),t.pushCode("var ".concat(s," = ").concat(m,".result; offset = ").concat(m,".offset;")),o!==this.alias&&t.addReference(o)}else{var g=l[o],y=f[o];t.pushCode("var ".concat(s," = dataView.get").concat(g,"(offset, ").concat(y,");")),t.pushCode("offset += ".concat(d[o],";"))}else if(o instanceof e){t.pushCode("var ".concat(s," = {};"));var v=t.generateVariable();t.pushScope(s),t.useContextVariables&&(t.pushCode("".concat(s,".$parent = ").concat(v,";")),t.pushCode("".concat(s,".$root = ").concat(v,".$root;")),this.options.readUntil||void 0!==a||t.pushCode("".concat(s,".$index = ").concat(n," - ").concat(r,";"))),o.generate(t),t.useContextVariables&&(t.pushCode("delete ".concat(s,".$parent;")),t.pushCode("delete ".concat(s,".$root;")),t.pushCode("delete ".concat(s,".$index;"))),t.popScope()}if(b?t.pushCode("".concat(i,"[").concat(s,".").concat(p,"] = ").concat(s,";")):t.pushCode("".concat(i,".push(").concat(s,");")),t.pushCode("}"),"function"===typeof this.options.readUntil){var w=this.options.readUntil,k=t.addImport(w);t.pushCode("while (!".concat(k,".call(").concat(t.generateVariable(),", ").concat(s,", buffer.subarray(offset)));"))}}},{key:"generateChoiceCase",value:function(t,n,a){if("string"===typeof a){var o=t.generateVariable(this.varName);if(c.has(a)){var r=t.generateTmpVariable();t.pushCode("var ".concat(r," = ").concat(u+a,"(offset, {")),t.useContextVariables&&(t.pushCode("$parent: ".concat(o,".$parent,")),t.pushCode("$root: ".concat(o,".$root,"))),t.pushCode("});"),t.pushCode("".concat(o," = ").concat(r,".result; offset = ").concat(r,".offset;")),a!==this.alias&&t.addReference(a)}else{var i=l[a],s=f[a];t.pushCode("".concat(o," = dataView.get").concat(i,"(offset, ").concat(s,");")),t.pushCode("offset += ".concat(d[a]))}}else a instanceof e&&(t.pushPath(n),a.generate(t),t.popPath(n))}},{key:"generateChoice",value:function(e){var t=e.generateOption(this.options.tag),n=e.generateVariable(this.varName);if(this.varName&&(e.pushCode("".concat(n," = {};")),e.useContextVariables)){var a=e.generateVariable();e.pushCode("".concat(n,".$parent = ").concat(a,";")),e.pushCode("".concat(n,".$root = ").concat(a,".$root;"))}for(var o in e.pushCode("switch(".concat(t,") {")),this.options.choices){var r=parseInt(o,10),i=this.options.choices[r];e.pushCode("case ".concat(r,":")),this.generateChoiceCase(e,this.varName,i),e.pushCode("break;")}e.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(e,this.varName,this.options.defaultChoice):e.generateError('"Met undefined tag value " + '.concat(t,' + " at choice"')),e.pushCode("}"),this.varName&&e.useContextVariables&&(e.pushCode("delete ".concat(n,".$parent;")),e.pushCode("delete ".concat(n,".$root;")))}},{key:"generateNest",value:function(t){var n=t.generateVariable(this.varName);if(this.options.type instanceof e){if(this.varName&&(t.pushCode("".concat(n," = {};")),t.useContextVariables)){var a=t.generateVariable();t.pushCode("".concat(n,".$parent = ").concat(a,";")),t.pushCode("".concat(n,".$root = ").concat(a,".$root;"))}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),this.varName&&t.useContextVariables&&t.useContextVariables&&(t.pushCode("delete ".concat(n,".$parent;")),t.pushCode("delete ".concat(n,".$root;")))}else if(c.has(this.options.type)){var o=t.generateTmpVariable();if(t.pushCode("var ".concat(o," = ").concat(u+this.options.type,"(offset, {")),t.useContextVariables){var r=t.generateVariable();t.pushCode("$parent: ".concat(r,",")),t.pushCode("$root: ".concat(r,".$root,"))}t.pushCode("});"),t.pushCode("".concat(n," = ").concat(o,".result; offset = ").concat(o,".offset;")),this.options.type!==this.alias&&t.addReference(this.options.type)}}},{key:"generateWrapper",value:function(t){var n=t.generateVariable(this.varName),a=t.generateTmpVariable();if("function"===typeof this.options.readUntil){var o=this.options.readUntil,r=t.generateTmpVariable(),i=t.generateTmpVariable();t.pushCode("var ".concat(r," = offset;")),t.pushCode("var ".concat(i," = 0;")),t.pushCode("while (offset < buffer.length) {"),t.pushCode("".concat(i," = dataView.getUint8(offset);"));var s=t.addImport(o);t.pushCode("if (".concat(s,".call(").concat(t.generateVariable(),", ").concat(i,", buffer.subarray(offset))) break;")),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode("".concat(a," = buffer.subarray(").concat(r,", offset);"))}else if("eof"===this.options.readUntil)t.pushCode("".concat(a," = buffer.subarray(offset);"));else{var d=t.generateOption(this.options.length);t.pushCode("".concat(a," = buffer.subarray(offset, offset + ").concat(d,");")),t.pushCode("offset += ".concat(d,";"))}this.options.clone&&t.pushCode("".concat(a," = buffer.constructor.from(").concat(a,");"));var l=t.generateTmpVariable(),f=t.generateTmpVariable(),p=t.generateTmpVariable(),b=t.addImport(this.options.wrapper);if(t.pushCode("".concat(a," = ").concat(b,".call(this, ").concat(a,").subarray(0);")),t.pushCode("var ".concat(l," = buffer;")),t.pushCode("var ".concat(f," = offset;")),t.pushCode("var ".concat(p," = dataView;")),t.pushCode("buffer = ".concat(a,";")),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof e)this.varName&&t.pushCode("".concat(n," = {};")),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(c.has(this.options.type)){var m=t.generateTmpVariable();t.pushCode("var ".concat(m," = ").concat(u+this.options.type,"(0);")),t.pushCode("".concat(n," = ").concat(m,".result;")),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode("buffer = ".concat(l,";")),t.pushCode("dataView = ".concat(p,";")),t.pushCode("offset = ".concat(f,";"))}},{key:"generateFormatter",value:function(e,t,n){if("function"===typeof n){var a=e.addImport(n);e.pushCode("".concat(t," = ").concat(a,".call(").concat(e.generateVariable(),", ").concat(t,");"))}}},{key:"generatePointer",value:function(t){var n=this.options.type,a=t.generateOption(this.options.offset),o=t.generateTmpVariable(),r=t.generateVariable(this.varName);if(t.pushCode("var ".concat(o," = offset;")),t.pushCode("offset = ".concat(a,";")),this.options.type instanceof e){if(t.pushCode("".concat(r," = {};")),t.useContextVariables){var i=t.generateVariable();t.pushCode("".concat(r,".$parent = ").concat(i,";")),t.pushCode("".concat(r,".$root = ").concat(i,".$root;"))}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode("delete ".concat(r,".$parent;")),t.pushCode("delete ".concat(r,".$root;")))}else if(c.has(this.options.type)){var s=t.generateTmpVariable();if(t.pushCode("var ".concat(s," = ").concat(u+this.options.type,"(offset, {")),t.useContextVariables){var p=t.generateVariable();t.pushCode("$parent: ".concat(p,",")),t.pushCode("$root: ".concat(p,".$root,"))}t.pushCode("});"),t.pushCode("".concat(r," = ").concat(s,".result; offset = ").concat(s,".offset;")),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(d).indexOf(this.options.type)>=0){var b=l[n],m=f[n];t.pushCode("".concat(r," = dataView.get").concat(b,"(offset, ").concat(m,");")),t.pushCode("offset += ".concat(d[n],";"))}t.pushCode("offset = ".concat(o,";"))}},{key:"generateSaveOffset",value:function(e){var t=e.generateVariable(this.varName);e.pushCode("".concat(t," = offset"))}}],[{key:"start",value:function(){return new e}}]),e}();t.Parser=p},12525:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(56690).default,r=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(48997),s=n(73708),c=n(28513),u=n(12295),d=n(67514),l=u.BufferN(32),f=u.compile({wif:u.UInt8,bip32:{public:u.UInt32,private:u.UInt32}}),p={messagePrefix:"\x18Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},b=2147483648,m=Math.pow(2,31)-1;function h(e){return u.String(e)&&null!==e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}function g(e){return u.UInt32(e)&&e<=m}var y=function(){function e(t,n,a,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;o(this,e),this.__D=t,this.__Q=n,this.chainCode=a,this.network=r,this.__DEPTH=i,this.__INDEX=s,this.__PARENT_FINGERPRINT=c,u(f,r),this.lowR=!1}return r(e,[{key:"depth",get:function(){return this.__DEPTH}},{key:"index",get:function(){return this.__INDEX}},{key:"parentFingerprint",get:function(){return this.__PARENT_FINGERPRINT}},{key:"publicKey",get:function(){return void 0===this.__Q&&(this.__Q=c.pointFromScalar(this.__D,!0)),this.__Q}},{key:"privateKey",get:function(){return this.__D}},{key:"identifier",get:function(){return i.hash160(this.publicKey)}},{key:"fingerprint",get:function(){return this.identifier.slice(0,4)}},{key:"compressed",get:function(){return!0}},{key:"isNeutered",value:function(){return void 0===this.__D}},{key:"neutered",value:function(){return k(this.publicKey,this.chainCode,this.network,this.depth,this.index,this.parentFingerprint)}},{key:"toBase58",value:function(){var e=this.network,t=this.isNeutered()?e.bip32.public:e.bip32.private,n=a.allocUnsafe(78);return n.writeUInt32BE(t,0),n.writeUInt8(this.depth,4),n.writeUInt32BE(this.parentFingerprint,5),n.writeUInt32BE(this.index,9),this.chainCode.copy(n,13),this.isNeutered()?this.publicKey.copy(n,45):(n.writeUInt8(0,45),this.privateKey.copy(n,46)),s.encode(n)}},{key:"toWIF",value:function(){if(!this.privateKey)throw new TypeError("Missing private key");return d.encode(this.network.wif,this.privateKey,!0)}},{key:"derive",value:function(e){u(u.UInt32,e);var t=e>=b,n=a.allocUnsafe(37);if(t){if(this.isNeutered())throw new TypeError("Missing private key for hardened child key");n[0]=0,this.privateKey.copy(n,1),n.writeUInt32BE(e,33)}else this.publicKey.copy(n,0),n.writeUInt32BE(e,33);var o,r=i.hmacSHA512(this.chainCode,n),s=r.slice(0,32),d=r.slice(32);if(!c.isPrivate(s))return this.derive(e+1);if(this.isNeutered()){var l=c.pointAddScalar(this.publicKey,s,!0);if(null===l)return this.derive(e+1);o=k(l,d,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}else{var f=c.privateAdd(this.privateKey,s);if(null==f)return this.derive(e+1);o=w(f,d,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}return o}},{key:"deriveHardened",value:function(e){return u(g,e),this.derive(e+b)}},{key:"derivePath",value:function(e){u(h,e);var t=e.split("/");if("m"===t[0]){if(this.parentFingerprint)throw new TypeError("Expected master, got child");t=t.slice(1)}return t.reduce((function(e,t){var n;return"'"===t.slice(-1)?(n=parseInt(t.slice(0,-1),10),e.deriveHardened(n)):(n=parseInt(t,10),e.derive(n))}),this)}},{key:"sign",value:function(e,t){if(!this.privateKey)throw new Error("Missing private key");if(void 0===t&&(t=this.lowR),!1===t)return c.sign(e,this.privateKey);for(var n=c.sign(e,this.privateKey),o=a.alloc(32,0),r=0;n[0]>127;)r++,o.writeUIntLE(r,0,6),n=c.signWithEntropy(e,this.privateKey,o);return n}},{key:"verify",value:function(e,t){return c.verify(e,this.publicKey,t)}}]),e}();function v(e,t,n){return w(e,t,n)}function w(e,t,n,a,o,r){if(u({privateKey:l,chainCode:l},{privateKey:e,chainCode:t}),n=n||p,!c.isPrivate(e))throw new TypeError("Private key not in range [1, n)");return new y(e,void 0,t,n,a,o,r)}function k(e,t,n,a,o,r){if(u({publicKey:u.BufferN(33),chainCode:l},{publicKey:e,chainCode:t}),n=n||p,!c.isPoint(e))throw new TypeError("Point is not on the curve");return new y(void 0,e,t,n,a,o,r)}t.fromBase58=function(e,t){var n=s.decode(e);if(78!==n.length)throw new TypeError("Invalid buffer length");t=t||p;var a=n.readUInt32BE(0);if(a!==t.bip32.private&&a!==t.bip32.public)throw new TypeError("Invalid network version");var o=n[4],r=n.readUInt32BE(5);if(0===o&&0!==r)throw new TypeError("Invalid parent fingerprint");var i=n.readUInt32BE(9);if(0===o&&0!==i)throw new TypeError("Invalid index");var c,u=n.slice(13,45);if(a===t.bip32.private){if(0!==n.readUInt8(45))throw new TypeError("Invalid private key");c=w(n.slice(46,78),u,t,o,i,r)}else{c=k(n.slice(45,78),u,t,o,i,r)}return c},t.fromPrivateKey=v,t.fromPublicKey=function(e,t,n){return k(e,t,n)},t.fromSeed=function(e,t){if(u(u.Buffer,e),e.length<16)throw new TypeError("Seed should be at least 128 bits");if(e.length>64)throw new TypeError("Seed should be at most 512 bits");t=t||p;var n=i.hmacSHA512(a.from("Bitcoin seed","utf8"),e);return v(n.slice(0,32),n.slice(32),t)}},48997:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(40222),o=n(17817);t.hash160=function(e){var t=a("sha256").update(e).digest();try{return a("rmd160").update(t).digest()}catch(n){return a("ripemd160").update(t).digest()}},t.hmacSHA512=function(e,t){return o("sha512",e).update(t).digest()}},35652:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(12525);t.fromSeed=a.fromSeed,t.fromBase58=a.fromBase58,t.fromPublicKey=a.fromPublicKey,t.fromPrivateKey=a.fromPrivateKey},56997:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o={};t.wordlists=o,t._default=a;try{t._default=a=n(40032),o.czech=a}catch(r){}try{t._default=a=n(46996),o.chinese_simplified=a}catch(r){}try{t._default=a=n(4262),o.chinese_traditional=a}catch(r){}try{t._default=a=n(8013),o.korean=a}catch(r){}try{t._default=a=n(11848),o.french=a}catch(r){}try{t._default=a=n(72841),o.italian=a}catch(r){}try{t._default=a=n(80659),o.spanish=a}catch(r){}try{t._default=a=n(94472),o.japanese=a,o.JA=a}catch(r){}try{t._default=a=n(71945),o.portuguese=a}catch(r){}try{t._default=a=n(24573),o.english=a,o.EN=a}catch(r){}},58308:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var o=n(83977),r=n(36833),i=n(37792),s=n(69108),c=n(56997),u=c._default,d="Invalid mnemonic",l="Invalid entropy",f="Invalid mnemonic checksum",p="A wordlist is required but a default could not be found.\nPlease pass a 2048 word array explicitly.";function b(e){return(e||"").normalize("NFKD")}function m(e,t,n){for(;e.length32)throw new Error(l);if(c.length%4!==0)throw new Error(l);var g=a.from(c);if(y(g)!==s)throw new Error(f);return g.toString("hex")}function k(e,t){if(a.isBuffer(e)||(e=a.from(e,"hex")),!(t=t||u))throw new Error(p);if(e.length<16)throw new TypeError(l);if(e.length>32)throw new TypeError(l);if(e.length%4!==0)throw new TypeError(l);var n=(g(Array.from(e))+y(e)).match(/(.{1,11})/g).map((function(e){var n=h(e);return t[n]}));return"\u3042\u3044\u3053\u304f\u3057\u3093"===t[0]?n.join("\u3000"):n.join(" ")}t.mnemonicToSeedSync=function(e,t){var n=Uint8Array.from(a.from(b(e),"utf8")),o=Uint8Array.from(a.from(v(b(t)),"utf8")),s=i.pbkdf2(r.sha512,n,o,{c:2048,dkLen:64});return a.from(s)},t.mnemonicToSeed=function(e,t){var n=Uint8Array.from(a.from(b(e),"utf8")),o=Uint8Array.from(a.from(v(b(t)),"utf8"));return i.pbkdf2Async(r.sha512,n,o,{c:2048,dkLen:64}).then((function(e){return a.from(e)}))},t.mnemonicToEntropy=w,t.entropyToMnemonic=k,t.generateMnemonic=function(e,t,n){if((e=e||128)%32!==0)throw new TypeError(l);return k((t=t||function(e){return a.from(s.randomBytes(e))})(e/8),n)},t.validateMnemonic=function(e,t){try{w(e,t)}catch(n){return!1}return!0},t.setDefaultWordlist=function(e){var t=c.wordlists[e];if(!t)throw new Error('Could not find wordlist for language "'+e+'"');u=t},t.getDefaultWordlist=function(){if(!u)throw new Error("No Default Wordlist set");return Object.keys(c.wordlists).filter((function(e){return"JA"!==e&&"EN"!==e&&c.wordlists[e].every((function(e,t){return e===u[t]}))}))[0]};var A=n(56997);t.wordlists=A.wordlists},43811:function(e,t,n){!function(e,t){"use strict";function a(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function r(e,t,n){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var i;"object"===typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{i="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(46601).Buffer}catch(E){}function s(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void a(!1,"Invalid character in "+e)}function c(e,t,n){var a=s(e,n);return n-1>=t&&(a|=s(e,n-1)<<4),a}function u(e,t,n,o){for(var r=0,i=0,s=Math.min(e.length,n),c=t;c=49?u-49+10:u>=17?u-17+10:u,a(u>=0&&i0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=i<>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this._strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a=t;a-=2)o=c(e,t,a)<=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;else for(a=(e.length-t)%2===0?t+1:t;a=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;this._strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,o=1;o<=67108863;o*=t)a++;a--,o=o/t|0;for(var r=e.length-n,i=r%a,s=Math.min(r,r-i)+n,c=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(E){r.prototype.inspect=l}else r.prototype.inspect=l;function l(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,i=0;i>>24-o&16777215,(o+=2)>=26&&(o-=26,i--),n=0!==r||i!==this.length-1?f[6-c.length]+c+n:c+n}for(0!==r&&(n=r.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=p[e],d=b[e];n="";var l=this.clone();for(l.negative=0;!l.isZero();){var m=l.modrn(d).toString(e);n=(l=l.idivn(d)).isZero()?m+n:f[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16,2)},i&&(r.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,n){n.negative=t.negative^e.negative;var a=e.length+t.length|0;n.length=a,a=a-1|0;var o=0|e.words[0],r=0|t.words[0],i=o*r,s=67108863&i,c=i/67108864|0;n.words[0]=s;for(var u=1;u>>26,l=67108863&c,f=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=f;p++){var b=u-p|0;d+=(i=(o=0|e.words[b])*(r=0|t.words[p])+l)/67108864|0,l=67108863&i}n.words[u]=0|l,c=0|d}return 0!==c?n.words[u]=0|c:n.length--,n._strip()}r.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),r=n||Math.max(1,o);a(o<=r,"byte array longer than desired length"),a(r>0,"Requested array length <= 0");var i=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,r);return this["_toArrayLike"+("le"===t?"LE":"BE")](i,o),i},r.prototype._toArrayLikeLE=function(e,t){for(var n=0,a=0,o=0,r=0;o>8&255),n>16&255),6===r?(n>24&255),a=0,r=0):(a=i>>>24,r+=2)}if(n=0&&(e[n--]=i>>8&255),n>=0&&(e[n--]=i>>16&255),6===r?(n>=0&&(e[n--]=i>>24&255),a=0,r=0):(a=i>>>24,r+=2)}if(n>=0)for(e[n--]=a;n>=0;)e[n--]=0},Math.clz32?r.prototype._countBits=function(e){return 32-Math.clz32(e)}:r.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;ae.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){a("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this._strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){a("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,a=e):(n=e,a=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,a,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,a=e):(n=e,a=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,p=0|i[1],b=8191&p,m=p>>>13,h=0|i[2],g=8191&h,y=h>>>13,v=0|i[3],w=8191&v,k=v>>>13,A=0|i[4],x=8191&A,I=A>>>13,T=0|i[5],S=8191&T,C=T>>>13,E=0|i[6],R=8191&E,M=E>>>13,P=0|i[7],U=8191&P,_=P>>>13,B=0|i[8],D=8191&B,N=B>>>13,O=0|i[9],F=8191&O,L=O>>>13,j=0|s[0],H=8191&j,G=j>>>13,z=0|s[1],K=8191&z,W=z>>>13,Z=0|s[2],V=8191&Z,q=Z>>>13,Q=0|s[3],J=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,ae=te>>>13,oe=0|s[6],re=8191&oe,ie=oe>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,de=0|s[8],le=8191&de,fe=de>>>13,pe=0|s[9],be=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var he=(u+(a=Math.imul(l,H))|0)+((8191&(o=(o=Math.imul(l,G))+Math.imul(f,H)|0))<<13)|0;u=((r=Math.imul(f,G))+(o>>>13)|0)+(he>>>26)|0,he&=67108863,a=Math.imul(b,H),o=(o=Math.imul(b,G))+Math.imul(m,H)|0,r=Math.imul(m,G);var ge=(u+(a=a+Math.imul(l,K)|0)|0)+((8191&(o=(o=o+Math.imul(l,W)|0)+Math.imul(f,K)|0))<<13)|0;u=((r=r+Math.imul(f,W)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,a=Math.imul(g,H),o=(o=Math.imul(g,G))+Math.imul(y,H)|0,r=Math.imul(y,G),a=a+Math.imul(b,K)|0,o=(o=o+Math.imul(b,W)|0)+Math.imul(m,K)|0,r=r+Math.imul(m,W)|0;var ye=(u+(a=a+Math.imul(l,V)|0)|0)+((8191&(o=(o=o+Math.imul(l,q)|0)+Math.imul(f,V)|0))<<13)|0;u=((r=r+Math.imul(f,q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,a=Math.imul(w,H),o=(o=Math.imul(w,G))+Math.imul(k,H)|0,r=Math.imul(k,G),a=a+Math.imul(g,K)|0,o=(o=o+Math.imul(g,W)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,W)|0,a=a+Math.imul(b,V)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(m,V)|0,r=r+Math.imul(m,q)|0;var ve=(u+(a=a+Math.imul(l,J)|0)|0)+((8191&(o=(o=o+Math.imul(l,Y)|0)+Math.imul(f,J)|0))<<13)|0;u=((r=r+Math.imul(f,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,a=Math.imul(x,H),o=(o=Math.imul(x,G))+Math.imul(I,H)|0,r=Math.imul(I,G),a=a+Math.imul(w,K)|0,o=(o=o+Math.imul(w,W)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,W)|0,a=a+Math.imul(g,V)|0,o=(o=o+Math.imul(g,q)|0)+Math.imul(y,V)|0,r=r+Math.imul(y,q)|0,a=a+Math.imul(b,J)|0,o=(o=o+Math.imul(b,Y)|0)+Math.imul(m,J)|0,r=r+Math.imul(m,Y)|0;var we=(u+(a=a+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((r=r+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,a=Math.imul(S,H),o=(o=Math.imul(S,G))+Math.imul(C,H)|0,r=Math.imul(C,G),a=a+Math.imul(x,K)|0,o=(o=o+Math.imul(x,W)|0)+Math.imul(I,K)|0,r=r+Math.imul(I,W)|0,a=a+Math.imul(w,V)|0,o=(o=o+Math.imul(w,q)|0)+Math.imul(k,V)|0,r=r+Math.imul(k,q)|0,a=a+Math.imul(g,J)|0,o=(o=o+Math.imul(g,Y)|0)+Math.imul(y,J)|0,r=r+Math.imul(y,Y)|0,a=a+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(m,$)|0,r=r+Math.imul(m,ee)|0;var ke=(u+(a=a+Math.imul(l,ne)|0)|0)+((8191&(o=(o=o+Math.imul(l,ae)|0)+Math.imul(f,ne)|0))<<13)|0;u=((r=r+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,a=Math.imul(R,H),o=(o=Math.imul(R,G))+Math.imul(M,H)|0,r=Math.imul(M,G),a=a+Math.imul(S,K)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(C,K)|0,r=r+Math.imul(C,W)|0,a=a+Math.imul(x,V)|0,o=(o=o+Math.imul(x,q)|0)+Math.imul(I,V)|0,r=r+Math.imul(I,q)|0,a=a+Math.imul(w,J)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(k,J)|0,r=r+Math.imul(k,Y)|0,a=a+Math.imul(g,$)|0,o=(o=o+Math.imul(g,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,a=a+Math.imul(b,ne)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(m,ne)|0,r=r+Math.imul(m,ae)|0;var Ae=(u+(a=a+Math.imul(l,re)|0)|0)+((8191&(o=(o=o+Math.imul(l,ie)|0)+Math.imul(f,re)|0))<<13)|0;u=((r=r+Math.imul(f,ie)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,a=Math.imul(U,H),o=(o=Math.imul(U,G))+Math.imul(_,H)|0,r=Math.imul(_,G),a=a+Math.imul(R,K)|0,o=(o=o+Math.imul(R,W)|0)+Math.imul(M,K)|0,r=r+Math.imul(M,W)|0,a=a+Math.imul(S,V)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(C,V)|0,r=r+Math.imul(C,q)|0,a=a+Math.imul(x,J)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(I,J)|0,r=r+Math.imul(I,Y)|0,a=a+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,a=a+Math.imul(g,ne)|0,o=(o=o+Math.imul(g,ae)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ae)|0,a=a+Math.imul(b,re)|0,o=(o=o+Math.imul(b,ie)|0)+Math.imul(m,re)|0,r=r+Math.imul(m,ie)|0;var xe=(u+(a=a+Math.imul(l,ce)|0)|0)+((8191&(o=(o=o+Math.imul(l,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((r=r+Math.imul(f,ue)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,a=Math.imul(D,H),o=(o=Math.imul(D,G))+Math.imul(N,H)|0,r=Math.imul(N,G),a=a+Math.imul(U,K)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(_,K)|0,r=r+Math.imul(_,W)|0,a=a+Math.imul(R,V)|0,o=(o=o+Math.imul(R,q)|0)+Math.imul(M,V)|0,r=r+Math.imul(M,q)|0,a=a+Math.imul(S,J)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(C,J)|0,r=r+Math.imul(C,Y)|0,a=a+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(I,$)|0,r=r+Math.imul(I,ee)|0,a=a+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ae)|0,a=a+Math.imul(g,re)|0,o=(o=o+Math.imul(g,ie)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,ie)|0,a=a+Math.imul(b,ce)|0,o=(o=o+Math.imul(b,ue)|0)+Math.imul(m,ce)|0,r=r+Math.imul(m,ue)|0;var Ie=(u+(a=a+Math.imul(l,le)|0)|0)+((8191&(o=(o=o+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;u=((r=r+Math.imul(f,fe)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,a=Math.imul(F,H),o=(o=Math.imul(F,G))+Math.imul(L,H)|0,r=Math.imul(L,G),a=a+Math.imul(D,K)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,W)|0,a=a+Math.imul(U,V)|0,o=(o=o+Math.imul(U,q)|0)+Math.imul(_,V)|0,r=r+Math.imul(_,q)|0,a=a+Math.imul(R,J)|0,o=(o=o+Math.imul(R,Y)|0)+Math.imul(M,J)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(C,$)|0,r=r+Math.imul(C,ee)|0,a=a+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(I,ne)|0,r=r+Math.imul(I,ae)|0,a=a+Math.imul(w,re)|0,o=(o=o+Math.imul(w,ie)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,ie)|0,a=a+Math.imul(g,ce)|0,o=(o=o+Math.imul(g,ue)|0)+Math.imul(y,ce)|0,r=r+Math.imul(y,ue)|0,a=a+Math.imul(b,le)|0,o=(o=o+Math.imul(b,fe)|0)+Math.imul(m,le)|0,r=r+Math.imul(m,fe)|0;var Te=(u+(a=a+Math.imul(l,be)|0)|0)+((8191&(o=(o=o+Math.imul(l,me)|0)+Math.imul(f,be)|0))<<13)|0;u=((r=r+Math.imul(f,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,a=Math.imul(F,K),o=(o=Math.imul(F,W))+Math.imul(L,K)|0,r=Math.imul(L,W),a=a+Math.imul(D,V)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(N,V)|0,r=r+Math.imul(N,q)|0,a=a+Math.imul(U,J)|0,o=(o=o+Math.imul(U,Y)|0)+Math.imul(_,J)|0,r=r+Math.imul(_,Y)|0,a=a+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(M,$)|0,r=r+Math.imul(M,ee)|0,a=a+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(C,ne)|0,r=r+Math.imul(C,ae)|0,a=a+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ie)|0)+Math.imul(I,re)|0,r=r+Math.imul(I,ie)|0,a=a+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(k,ce)|0,r=r+Math.imul(k,ue)|0,a=a+Math.imul(g,le)|0,o=(o=o+Math.imul(g,fe)|0)+Math.imul(y,le)|0,r=r+Math.imul(y,fe)|0;var Se=(u+(a=a+Math.imul(b,be)|0)|0)+((8191&(o=(o=o+Math.imul(b,me)|0)+Math.imul(m,be)|0))<<13)|0;u=((r=r+Math.imul(m,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,a=Math.imul(F,V),o=(o=Math.imul(F,q))+Math.imul(L,V)|0,r=Math.imul(L,q),a=a+Math.imul(D,J)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(N,J)|0,r=r+Math.imul(N,Y)|0,a=a+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(_,$)|0,r=r+Math.imul(_,ee)|0,a=a+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(M,ne)|0,r=r+Math.imul(M,ae)|0,a=a+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ie)|0)+Math.imul(C,re)|0,r=r+Math.imul(C,ie)|0,a=a+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,ue)|0)+Math.imul(I,ce)|0,r=r+Math.imul(I,ue)|0,a=a+Math.imul(w,le)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(k,le)|0,r=r+Math.imul(k,fe)|0;var Ce=(u+(a=a+Math.imul(g,be)|0)|0)+((8191&(o=(o=o+Math.imul(g,me)|0)+Math.imul(y,be)|0))<<13)|0;u=((r=r+Math.imul(y,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,a=Math.imul(F,J),o=(o=Math.imul(F,Y))+Math.imul(L,J)|0,r=Math.imul(L,Y),a=a+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,a=a+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(_,ne)|0,r=r+Math.imul(_,ae)|0,a=a+Math.imul(R,re)|0,o=(o=o+Math.imul(R,ie)|0)+Math.imul(M,re)|0,r=r+Math.imul(M,ie)|0,a=a+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(C,ce)|0,r=r+Math.imul(C,ue)|0,a=a+Math.imul(x,le)|0,o=(o=o+Math.imul(x,fe)|0)+Math.imul(I,le)|0,r=r+Math.imul(I,fe)|0;var Ee=(u+(a=a+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(k,be)|0))<<13)|0;u=((r=r+Math.imul(k,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,a=Math.imul(F,$),o=(o=Math.imul(F,ee))+Math.imul(L,$)|0,r=Math.imul(L,ee),a=a+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ae)|0,a=a+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ie)|0)+Math.imul(_,re)|0,r=r+Math.imul(_,ie)|0,a=a+Math.imul(R,ce)|0,o=(o=o+Math.imul(R,ue)|0)+Math.imul(M,ce)|0,r=r+Math.imul(M,ue)|0,a=a+Math.imul(S,le)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(C,le)|0,r=r+Math.imul(C,fe)|0;var Re=(u+(a=a+Math.imul(x,be)|0)|0)+((8191&(o=(o=o+Math.imul(x,me)|0)+Math.imul(I,be)|0))<<13)|0;u=((r=r+Math.imul(I,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,a=Math.imul(F,ne),o=(o=Math.imul(F,ae))+Math.imul(L,ne)|0,r=Math.imul(L,ae),a=a+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,ie)|0,a=a+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,ue)|0)+Math.imul(_,ce)|0,r=r+Math.imul(_,ue)|0,a=a+Math.imul(R,le)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(M,le)|0,r=r+Math.imul(M,fe)|0;var Me=(u+(a=a+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,me)|0)+Math.imul(C,be)|0))<<13)|0;u=((r=r+Math.imul(C,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,a=Math.imul(F,re),o=(o=Math.imul(F,ie))+Math.imul(L,re)|0,r=Math.imul(L,ie),a=a+Math.imul(D,ce)|0,o=(o=o+Math.imul(D,ue)|0)+Math.imul(N,ce)|0,r=r+Math.imul(N,ue)|0,a=a+Math.imul(U,le)|0,o=(o=o+Math.imul(U,fe)|0)+Math.imul(_,le)|0,r=r+Math.imul(_,fe)|0;var Pe=(u+(a=a+Math.imul(R,be)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(M,be)|0))<<13)|0;u=((r=r+Math.imul(M,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,a=Math.imul(F,ce),o=(o=Math.imul(F,ue))+Math.imul(L,ce)|0,r=Math.imul(L,ue),a=a+Math.imul(D,le)|0,o=(o=o+Math.imul(D,fe)|0)+Math.imul(N,le)|0,r=r+Math.imul(N,fe)|0;var Ue=(u+(a=a+Math.imul(U,be)|0)|0)+((8191&(o=(o=o+Math.imul(U,me)|0)+Math.imul(_,be)|0))<<13)|0;u=((r=r+Math.imul(_,me)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,a=Math.imul(F,le),o=(o=Math.imul(F,fe))+Math.imul(L,le)|0,r=Math.imul(L,fe);var _e=(u+(a=a+Math.imul(D,be)|0)|0)+((8191&(o=(o=o+Math.imul(D,me)|0)+Math.imul(N,be)|0))<<13)|0;u=((r=r+Math.imul(N,me)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863;var Be=(u+(a=Math.imul(F,be))|0)+((8191&(o=(o=Math.imul(F,me))+Math.imul(L,be)|0))<<13)|0;return u=((r=Math.imul(L,me))+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=he,c[1]=ge,c[2]=ye,c[3]=ve,c[4]=we,c[5]=ke,c[6]=Ae,c[7]=xe,c[8]=Ie,c[9]=Te,c[10]=Se,c[11]=Ce,c[12]=Ee,c[13]=Re,c[14]=Me,c[15]=Pe,c[16]=Ue,c[17]=_e,c[18]=Be,0!==u&&(c[19]=u,n.length++),n};function g(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var a=0,o=0,r=0;r>>26)|0)>>>26,i&=67108863}n.words[r]=s,a=i,i=o}return 0!==a?n.words[r]=a:n.length--,n._strip()}function y(e,t,n){return g(e,t,n)}function v(e,t){this.x=e,this.y=t}Math.imul||(h=m),r.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):n<63?m(this,e,t):n<1024?g(this,e,t):y(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,a=0;a>=1;return a},v.prototype.permute=function(e,t,n,a,o,r){for(var i=0;i>>=1)o++;return 1<>>=13,n[2*i+1]=8191&r,r>>>=13;for(i=2*t;i>=26,n+=r/67108864|0,n+=i>>>26,this.words[o]=67108863&i}return 0!==n&&(this.words[o]=n,this.length++),t?this.ineg():this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o&1}return t}(e);if(0===t.length)return new r(1);for(var n=this,a=0;a=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var i=0;for(t=0;t>>26-n}i&&(this.words[t]=i,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,i=Math.min((e-r)/26,this.length),s=67108863^67108863>>>r<i)for(this.length-=i,u=0;u=0&&(0!==d||u>=o);u--){var l=0|this.words[u];this.words[u]=d<<26-r|l>>>r,d=l&s}return c&&0!==d&&(c.words[c.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(e,t,n){return a(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){a("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(a("number"===typeof e),a(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===s)return this._strip();for(a(-1===s),s=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this._strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),o=e,i=0|o.words[o.length-1];0!==(n=26-this._countBits(i))&&(o=o.ushln(n),a.iushln(n),i=0|o.words[o.length-1]);var s,c=a.length-o.length;if("mod"!==t){(s=new r(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var f=67108864*(0|a.words[o.length+l])+(0|a.words[o.length+l-1]);for(f=Math.min(f/i|0,67108863),a._ishlnsubmul(o,f,l);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(o,1,l),a.isZero()||(a.negative^=1);s&&(s.words[l]=f)}return s&&s._strip(),a._strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:s||null,mod:a}},r.prototype.divmod=function(e,t,n){return a(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:o,mod:i}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:s.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,i,s},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,a=e.ushrn(1),o=e.andln(1),r=n.cmp(a);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modrn=function(e){var t=e<0;t&&(e=-e),a(e<=67108863);for(var n=(1<<26)%e,o=0,r=this.length-1;r>=0;r--)o=(n*o+(0|this.words[r]))%e;return t?-o:o},r.prototype.modn=function(e){return this.modrn(e)},r.prototype.idivn=function(e){var t=e<0;t&&(e=-e),a(e<=67108863);for(var n=0,o=this.length-1;o>=0;o--){var r=(0|this.words[o])+67108864*n;this.words[o]=r/e|0,n=r%e}return this._strip(),t?this.ineg():this},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),i=new r(0),s=new r(0),c=new r(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var d=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;0===(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(d),i.isub(l)),o.iushrn(1),i.iushrn(1);for(var b=0,m=1;0===(n.words[0]&m)&&b<26;++b,m<<=1);if(b>0)for(n.iushrn(b);b-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(d),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),i.isub(c)):(n.isub(t),s.isub(o),c.isub(i))}return{a:s,b:c,gcd:n.iushln(u)}},r.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,i=new r(1),s=new r(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,d=1;0===(t.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(c),i.iushrn(1);for(var l=0,f=1;0===(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s)):(n.isub(t),s.isub(i))}return(o=0===t.cmpn(1)?i:s).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(a)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){a("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,s&=67108863,this.words[i]=s}return 0!==r&&(this.words[i]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),a(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var a=0|this.words[n],o=0|e.words[n];if(a!==o){ao&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new S(e)},r.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function k(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}k.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var a=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},k.prototype.split=function(e,t){e.iushrn(this.n,0,t)},k.prototype.imulK=function(e){return e.imul(this.k)},o(A,k),A.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),o=0;o>>22,r=i}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},A.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=a}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new A;else if("p224"===e)t=new x;else if("p192"===e)t=new I;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return w[e]=t,t},S.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){a(0===(e.negative|t.negative),"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(d(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2===1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),i=0;!o.isZero()&&0===o.andln(1);)i++,o.iushrn(1);a(!o.isZero());var s=new r(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new r(2*d*d).toRed(this);0!==this.pow(d,u).cmp(c);)d.redIAdd(c);for(var l=this.pow(d,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),b=i;0!==p.cmp(s);){for(var m=p,h=0;0!==m.cmp(s);h++)m=m.redSqr();a(h=0;a--){for(var u=t.words[a],d=c-1;d>=0;d--){var l=u>>d&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==i?(i<<=1,i|=l,(4===++s||0===a&&0===d)&&(o=this.mul(o,n[i]),s=0,i=0)):s=0}c=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new C(e)},o(C,S),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},6323:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(38416).default,r=n(27424).default,i=n(74704).default,s=n(56690).default,c=n(89728).default,u=n(61655).default,d=n(26389).default,l=n(33496).default,f=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),p=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),b=this&&this.__decorate||function(e,t,n,a){var o,r=arguments.length,i=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,n,a);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r<3?o(i):r>3?o(t,n,i):o(t,n))||i);return r>3&&i&&Object.defineProperty(t,n,i),i},m=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&f(t,e,n);return p(t,e),t},h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeUnchecked=t.deserialize=t.serialize=t.BinaryReader=t.BinaryWriter=t.BorshError=t.baseDecode=t.baseEncode=void 0;var g=h(n(43811)),y=h(n(70285)),v=m(n(47246)),w=new("function"!==typeof TextDecoder?v.TextDecoder:TextDecoder)("utf-8",{fatal:!0});t.baseEncode=function(e){return"string"===typeof e&&(e=a.from(e,"utf8")),y.default.encode(a.from(e))},t.baseDecode=function(e){return a.from(y.default.decode(e))};var k=1024,A=function(e){u(n,e);var t=d(n);function n(e){var a;return s(this,n),(a=t.call(this,e)).fieldPath=[],a.originalMessage=e,a}return c(n,[{key:"addToFieldPath",value:function(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}]),n}(l(Error));t.BorshError=A;var x=function(){function e(){s(this,e),this.buf=a.alloc(k),this.length=0}return c(e,[{key:"maybeResize",value:function(){this.buf.length<16+this.length&&(this.buf=a.concat([this.buf,a.alloc(k)]))}},{key:"writeU8",value:function(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}},{key:"writeU16",value:function(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}},{key:"writeU32",value:function(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}},{key:"writeU64",value:function(e){this.maybeResize(),this.writeBuffer(a.from(new g.default(e).toArray("le",8)))}},{key:"writeU128",value:function(e){this.maybeResize(),this.writeBuffer(a.from(new g.default(e).toArray("le",16)))}},{key:"writeU256",value:function(e){this.maybeResize(),this.writeBuffer(a.from(new g.default(e).toArray("le",32)))}},{key:"writeU512",value:function(e){this.maybeResize(),this.writeBuffer(a.from(new g.default(e).toArray("le",64)))}},{key:"writeBuffer",value:function(e){this.buf=a.concat([a.from(this.buf.subarray(0,this.length)),e,a.alloc(k)]),this.length+=e.length}},{key:"writeString",value:function(e){this.maybeResize();var t=a.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}},{key:"writeFixedArray",value:function(e){this.writeBuffer(a.from(e))}},{key:"writeArray",value:function(e,t){this.maybeResize(),this.writeU32(e.length);var n,a=i(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;this.maybeResize(),t(o)}}catch(r){a.e(r)}finally{a.f()}}},{key:"toArray",value:function(){return this.buf.subarray(0,this.length)}}]),e}();function I(e,t,n){var a=n.value;n.value=function(){try{for(var e=arguments.length,t=new Array(e),n=0;n=0)throw new A("Reached the end of buffer when deserializing")}throw r}}}t.BinaryWriter=x;var T=function(){function e(t){s(this,e),this.buf=t,this.offset=0}return c(e,[{key:"readU8",value:function(){var e=this.buf.readUInt8(this.offset);return this.offset+=1,e}},{key:"readU16",value:function(){var e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}},{key:"readU32",value:function(){var e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}},{key:"readU64",value:function(){var e=this.readBuffer(8);return new g.default(e,"le")}},{key:"readU128",value:function(){var e=this.readBuffer(16);return new g.default(e,"le")}},{key:"readU256",value:function(){var e=this.readBuffer(32);return new g.default(e,"le")}},{key:"readU512",value:function(){var e=this.readBuffer(64);return new g.default(e,"le")}},{key:"readBuffer",value:function(e){if(this.offset+e>this.buf.length)throw new A("Expected buffer length ".concat(e," isn't within bounds"));var t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}},{key:"readString",value:function(){var e=this.readU32(),t=this.readBuffer(e);try{return w.decode(t)}catch(n){throw new A("Error decoding UTF-8 string: ".concat(n))}}},{key:"readFixedArray",value:function(e){return new Uint8Array(this.readBuffer(e))}},{key:"readArray",value:function(e){for(var t=this.readU32(),n=Array(),a=0;a=a.values.length)throw new A("Enum index: ".concat(p," is out of range"));var b=r(a.values[p],2),m=b[0],h=R(e,m,b[1],n);return new t(o({},m,h))}throw new A("Unexpected schema kind: ".concat(a.kind," for ").concat(t.constructor.name))}b([I],T.prototype,"readU8",null),b([I],T.prototype,"readU16",null),b([I],T.prototype,"readU32",null),b([I],T.prototype,"readU64",null),b([I],T.prototype,"readU128",null),b([I],T.prototype,"readU256",null),b([I],T.prototype,"readU512",null),b([I],T.prototype,"readString",null),b([I],T.prototype,"readFixedArray",null),b([I],T.prototype,"readArray",null),t.BinaryReader=T,t.serialize=function(e,t){var n=new(arguments.length>2&&void 0!==arguments[2]?arguments[2]:x);return E(e,t,n),n.toArray()},t.deserialize=function(e,t,n){var a=new(arguments.length>3&&void 0!==arguments[3]?arguments[3]:T)(n),o=M(e,t,a);if(a.offset3&&void 0!==arguments[3]?arguments[3]:T)(n))}},58692:function(e,t,n){var a;function o(e){this.rand=e}if(e.exports=function(e){return a||(a=new o(null)),a.generate(e)},e.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n0){var r=a.substring(0,o).trim(),i=a.substring(o+1).trim();this.append(r,i)}}},e.prototype.delete=function(e,t){var n=a.normalizeName(e);if(void 0===t)delete this.headersMap[n];else{var o=this.headersMap[n];if(o){var r=o.indexOf(t);r>=0&&o.splice(r,1),0===o.length&&delete this.headersMap[n]}}},e.prototype.append=function(e,t){var n=this,o=a.normalizeName(e);Array.isArray(this.headersMap[o])||(this.headersMap[o]=[]),Array.isArray(t)?t.forEach((function(e){n.headersMap[o].push(a.normalizeValue(e))})):this.headersMap[o].push(a.normalizeValue(t))},e.prototype.set=function(e,t){var n=a.normalizeName(e);if(Array.isArray(t)){var o=[];t.forEach((function(e){o.push(a.normalizeValue(e))})),this.headersMap[n]=o}else this.headersMap[n]=[a.normalizeValue(t)]},e.prototype.has=function(e,t){var n=this.headersMap[a.normalizeName(e)];if(!Array.isArray(n))return!1;if(void 0!==t){var o=a.normalizeValue(t);return n.indexOf(o)>=0}return!0},e.prototype.get=function(e){var t=this.headersMap[a.normalizeName(e)];return void 0!==t?t.concat():[]},e.prototype.forEach=function(e){var t=this;Object.getOwnPropertyNames(this.headersMap).forEach((function(n){e(n,t.headersMap[n])}),this)},e.prototype.toHeaders=function(){if("undefined"!==typeof Headers){var e=new Headers;return this.forEach((function(t,n){n.forEach((function(n){e.append(t,n)}))})),e}throw new Error("Headers class is not defined")},e}();t.BrowserHeaders=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0);t.BrowserHeaders=a.BrowserHeaders},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterateHeaders=function(e,t){for(var n=e[Symbol.iterator](),a=n.next();!a.done;)t(a.value[0]),a=n.next()},t.iterateHeadersKeys=function(e,t){for(var n=e.keys(),a=n.next();!a.done;)t(a.value),a=n.next()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(2);t.normalizeName=function(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()},t.normalizeValue=function(e){return"string"!==typeof e&&(e=String(e)),e},t.getHeaderValues=function(e,t){var n=e;if(n instanceof Headers&&n.getAll)return n.getAll(t);var a=n.get(t);return a&&"string"===typeof a?[a]:a},t.getHeaderKeys=function(e){var t=e,n={},o=[];return t.keys?a.iterateHeadersKeys(t,(function(e){n[e]||(n[e]=!0,o.push(e))})):t.forEach?t.forEach((function(e,t){n[t]||(n[t]=!0,o.push(t))})):a.iterateHeaders(t,(function(e){var t=e[0];n[t]||(n[t]=!0,o.push(t))})),o},t.splitHeaderValue=function(e){var t=[];return e.split(", ").forEach((function(e){e.split(",").forEach((function(e){t.push(e)}))})),t}}])},e.exports=t()},49587:function(e,t,n){var a=n(88284).Buffer;function o(e){a.isBuffer(e)||(e=a.from(e));for(var t=e.length/4|0,n=new Array(t),o=0;o>>24]^d[b>>>16&255]^l[m>>>8&255]^f[255&h]^t[g++],i=u[b>>>24]^d[m>>>16&255]^l[h>>>8&255]^f[255&p]^t[g++],s=u[m>>>24]^d[h>>>16&255]^l[p>>>8&255]^f[255&b]^t[g++],c=u[h>>>24]^d[p>>>16&255]^l[b>>>8&255]^f[255&m]^t[g++],p=r,b=i,m=s,h=c;return r=(a[p>>>24]<<24|a[b>>>16&255]<<16|a[m>>>8&255]<<8|a[255&h])^t[g++],i=(a[b>>>24]<<24|a[m>>>16&255]<<16|a[h>>>8&255]<<8|a[255&p])^t[g++],s=(a[m>>>24]<<24|a[h>>>16&255]<<16|a[p>>>8&255]<<8|a[255&b])^t[g++],c=(a[h>>>24]<<24|a[p>>>16&255]<<16|a[b>>>8&255]<<8|a[255&m])^t[g++],[r>>>=0,i>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],a=[],o=[[],[],[],[]],r=[[],[],[],[]],i=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,n[i]=u,a[u]=i;var d=e[i],l=e[d],f=e[l],p=257*e[u]^16843008*u;o[0][i]=p<<24|p>>>8,o[1][i]=p<<16|p>>>16,o[2][i]=p<<8|p>>>24,o[3][i]=p,p=16843009*f^65537*l^257*d^16843008*i,r[0][u]=p<<24|p>>>8,r[1][u]=p<<16|p>>>16,r[2][u]=p<<8|p>>>24,r[3][u]=p,0===i?i=s=1:(i=d^e[e[e[f^d]]],s^=e[e[s]])}return{SBOX:n,INV_SBOX:a,SUB_MIX:o,INV_SUB_MIX:r}}();function u(e){this._key=o(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,a=4*(n+1),o=[],r=0;r>>24,i=c.SBOX[i>>>24]<<24|c.SBOX[i>>>16&255]<<16|c.SBOX[i>>>8&255]<<8|c.SBOX[255&i],i^=s[r/t|0]<<24):t>6&&r%t===4&&(i=c.SBOX[i>>>24]<<24|c.SBOX[i>>>16&255]<<16|c.SBOX[i>>>8&255]<<8|c.SBOX[255&i]),o[r]=o[r-t]^i}for(var u=[],d=0;d>>24]]^c.INV_SUB_MIX[1][c.SBOX[f>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[f>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&f]]}this._nRounds=n,this._keySchedule=o,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return i(e=o(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=a.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},u.prototype.decryptBlock=function(e){var t=(e=o(e))[1];e[1]=e[3],e[3]=t;var n=i(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),r=a.allocUnsafe(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[3],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[1],12),r},u.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},e.exports.AES=u},64422:function(e,t,n){var a=n(49587),o=n(88284).Buffer,r=n(18840),i=n(39703),s=n(47877),c=n(56526),u=n(98198);function d(e,t,n,i){r.call(this);var c=o.alloc(4,0);this._cipher=new a.AES(t);var d=this._cipher.encryptBlock(c);this._ghash=new s(d),n=function(e,t,n){if(12===t.length)return e._finID=o.concat([t,o.from([0,0,0,1])]),o.concat([t,o.from([0,0,0,2])]);var a=new s(n),r=t.length,i=r%16;a.update(t),i&&(i=16-i,a.update(o.alloc(i,0))),a.update(o.alloc(8,0));var c=8*r,d=o.alloc(8);d.writeUIntBE(c,0,8),a.update(d),e._finID=a.state;var l=o.from(e._finID);return u(l),l}(this,n,d),this._prev=o.from(n),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}i(d,r),d.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=o.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},d.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var a=Math.min(e.length,t.length),o=0;o16)throw new Error("unable to decrypt data");var n=-1;for(;++n16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var a=u(t,!1,n.key,n.iv);return f(e,a.key,a.iv)},t.createDecipheriv=f},12242:function(e,t,n){var a=n(72051),o=n(64422),r=n(88284).Buffer,i=n(68461),s=n(18840),c=n(49587),u=n(37965);function d(e,t,n){s.call(this),this._cache=new f,this._cipher=new c.AES(t),this._prev=r.from(n),this._mode=e,this._autopadding=!0}n(39703)(d,s),d.prototype._update=function(e){var t,n;this._cache.add(e);for(var a=[];t=this._cache.get();)n=this._mode.encrypt(this,t),a.push(n);return r.concat(a)};var l=r.alloc(16,16);function f(){this.cache=r.allocUnsafe(0)}function p(e,t,n){var s=a[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof t&&(t=r.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"===typeof n&&(n=r.from(n)),"GCM"!==s.mode&&n.length!==s.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===s.type?new i(s.module,t,n):"auth"===s.type?new o(s.module,t,n):new d(s.module,t,n)}d.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=r.concat([this.cache,e])},f.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},f.prototype.flush=function(){for(var e=16-this.cache.length,t=r.allocUnsafe(e),n=-1;++n>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function i(e){this.h=e,this.state=a.alloc(16,0),this.cache=a.allocUnsafe(0)}i.prototype.ghash=function(e){for(var t=-1;++t0;t--)a[t]=a[t]>>>1|(1&a[t-1])<<31;a[0]=a[0]>>>1,n&&(a[0]=a[0]^225<<24)}this.state=r(o)},i.prototype.update=function(e){var t;for(this.cache=a.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},i.prototype.final=function(e,t){return this.cache.length&&this.ghash(a.concat([this.cache,o],16)),this.ghash(r([0,e,0,t])),this.state},e.exports=i},98198:function(e){e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},41023:function(e,t,n){var a=n(56526);t.encrypt=function(e,t){var n=a(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var o=e._cipher.decryptBlock(t);return a(o,n)}},22836:function(e,t,n){var a=n(88284).Buffer,o=n(56526);function r(e,t,n){var r=t.length,i=o(t,e._cache);return e._cache=e._cache.slice(r),e._prev=a.concat([e._prev,n?t:i]),i}t.encrypt=function(e,t,n){for(var o,i=a.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=a.allocUnsafe(0)),!(e._cache.length<=t.length)){i=a.concat([i,r(e,t,n)]);break}o=e._cache.length,i=a.concat([i,r(e,t.slice(0,o),n)]),t=t.slice(o)}return i}},16555:function(e,t,n){var a=n(88284).Buffer;function o(e,t,n){for(var a,o,i=-1,s=0;++i<8;)a=t&1<<7-i?128:0,s+=(128&(o=e._cipher.encryptBlock(e._prev)[0]^a))>>i%8,e._prev=r(e._prev,n?a:o);return s}function r(e,t){var n=e.length,o=-1,r=a.allocUnsafe(e.length);for(e=a.concat([e,a.from([t])]);++o>7;return r}t.encrypt=function(e,t,n){for(var r=t.length,i=a.allocUnsafe(r),s=-1;++s=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var n=function(e){var t=i(e);return{blinder:t.toRed(o.mont(e.modulus)).redPow(new o(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),r=t.modulus.byteLength(),s=new o(e).mul(n.blinder).umod(t.modulus),c=s.toRed(o.mont(t.prime1)),u=s.toRed(o.mont(t.prime2)),d=t.coefficient,l=t.prime1,f=t.prime2,p=c.redPow(t.exponent1).fromRed(),b=u.redPow(t.exponent2).fromRed(),m=p.isub(b).imul(d).umod(l).imul(f);return b.iadd(m).imul(n.unblinder).umod(t.modulus).toArrayLike(a,"be",r)}s.getr=i,e.exports=s},81392:function(e,t,n){e.exports=n(75207)},9289:function(e,t,n){var a=n(88284).Buffer,o=n(40222),r=n(78899),i=n(39703),s=n(72231),c=n(70734),u=n(75207);function d(e){r.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=o(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){r.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hash=o(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){return new d(e)}function p(e){return new l(e)}Object.keys(u).forEach((function(e){u[e].id=a.from(u[e].id,"hex"),u[e.toLowerCase()]=u[e]})),i(d,r.Writable),d.prototype._write=function(e,t,n){this._hash.update(e),n()},d.prototype.update=function(e,t){return"string"===typeof e&&(e=a.from(e,t)),this._hash.update(e),this},d.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),a=s(n,e,this._hashType,this._signType,this._tag);return t?a.toString(t):a},i(l,r.Writable),l.prototype._write=function(e,t,n){this._hash.update(e),n()},l.prototype.update=function(e,t){return"string"===typeof e&&(e=a.from(e,t)),this._hash.update(e),this},l.prototype.verify=function(e,t,n){"string"===typeof t&&(t=a.from(t,n)),this.end();var o=this._hash.digest();return c(t,o,e,this._signType,this._tag)},e.exports={Sign:f,Verify:p,createSign:f,createVerify:p}},72231:function(e,t,n){var a=n(88284).Buffer,o=n(17817),r=n(50150),i=n(69205).ec,s=n(43811),c=n(25873),u=n(1308);function d(e,t,n,r){if((e=a.from(e.toArray())).length0&&n.ishrn(a),n}function f(e,t,n){var r,i;do{for(r=a.alloc(0);8*r.length=t)throw new Error("invalid sig")}e.exports=function(e,t,n,u,d){var l=i(n);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,n){var a=s[n.data.algorithm.curve.join(".")];if(!a)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var o=new r(a),i=n.data.subjectPrivateKey.data;return o.verify(t,e,i)}(e,t,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,n){var a=n.data.p,r=n.data.q,s=n.data.g,u=n.data.pub_key,d=i.signature.decode(e,"der"),l=d.s,f=d.r;c(l,r),c(f,r);var p=o.mont(a),b=l.invm(r),m=s.toRed(p).redPow(new o(t).mul(b).mod(r)).fromRed().mul(u.toRed(p).redPow(f.mul(b).mod(r)).fromRed()).mod(a).mod(r);return 0===m.cmp(f)}(e,t,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");t=a.concat([d,t]);for(var f=l.modulus.byteLength(),p=[1],b=0;t.length+p.length+2this.span)throw new RangeError("indeterminate span");return this.span}},{key:"replicate",value:function(e){var t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}},{key:"fromArray",value:function(e){}}]),e}();function l(e,t){return t.property?e+"["+t.property+"]":e}t.Layout=d,t.nameWithProperty=l,t.bindConstructorLayout=function(e,t){if("function"!==typeof e)throw new TypeError("Class must be constructor");if(e.hasOwnProperty("layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof d))throw new TypeError("layout must be a Layout");if(t.hasOwnProperty("boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=function(){return new e},Object.defineProperty(e.prototype,"encode",{value:function(e,n){return t.encode(this,e,n)},writable:!0}),Object.defineProperty(e,"decode",{value:function(e,n){return t.decode(e,n)},writable:!0})};var f=function(e){i(n,e);var t=s(n);function n(){return c(this,n),t.apply(this,arguments)}return u(n,[{key:"isCount",value:function(){throw new Error("ExternalLayout is abstract")}}]),n}(d),p=function(e){i(n,e);var t=s(n);function n(e,a){var o;if(c(this,n),void 0===e&&(e=1),!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");return(o=t.call(this,-1,a)).elementSpan=e,o}return u(n,[{key:"isCount",value:function(){return!0}},{key:"decode",value:function(e,t){void 0===t&&(t=0);var n=e.length-t;return Math.floor(n/this.elementSpan)}},{key:"encode",value:function(e,t,n){return 0}}]),n}(f),b=function(e){i(n,e);var t=s(n);function n(e,a,o){var r;if(c(this,n),!(e instanceof d))throw new TypeError("layout must be a Layout");if(void 0===a)a=0;else if(!Number.isInteger(a))throw new TypeError("offset must be integer or undefined");return(r=t.call(this,e.span,o||e.property)).layout=e,r.offset=a,r}return u(n,[{key:"isCount",value:function(){return this.layout instanceof m||this.layout instanceof h}},{key:"decode",value:function(e,t){return void 0===t&&(t=0),this.layout.decode(e,t+this.offset)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),this.layout.encode(e,t,n+this.offset)}}]),n}(f),m=function(e){i(n,e);var t=s(n);function n(e,a){var o;if(c(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return o}return u(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readUIntLE(t,this.span)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeUIntLE(e,n,this.span),this.span}}]),n}(d),h=function(e){i(n,e);var t=s(n);function n(e,a){var o;if(c(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return o}return u(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readUIntBE(t,this.span)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeUIntBE(e,n,this.span),this.span}}]),n}(d),g=function(e){i(n,e);var t=s(n);function n(e,a){var o;if(c(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return o}return u(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readIntLE(t,this.span)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeIntLE(e,n,this.span),this.span}}]),n}(d),y=function(e){i(n,e);var t=s(n);function n(e,a){var o;if(c(this,n),6<(o=t.call(this,e,a)).span)throw new RangeError("span must not exceed 6 bytes");return o}return u(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readIntBE(t,this.span)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeIntBE(e,n,this.span),this.span}}]),n}(d),v=Math.pow(2,32);function w(e){var t=Math.floor(e/v);return{hi32:t,lo32:e-t*v}}function k(e,t){return e*v+t}var A=function(e){i(n,e);var t=s(n);function n(e){return c(this,n),t.call(this,8,e)}return u(n,[{key:"decode",value:function(e,t){void 0===t&&(t=0);var n=e.readUInt32LE(t);return k(e.readUInt32LE(t+4),n)}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=w(e);return t.writeUInt32LE(a.lo32,n),t.writeUInt32LE(a.hi32,n+4),8}}]),n}(d),x=function(e){i(n,e);var t=s(n);function n(e){return c(this,n),t.call(this,8,e)}return u(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),k(e.readUInt32BE(t),e.readUInt32BE(t+4))}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=w(e);return t.writeUInt32BE(a.hi32,n),t.writeUInt32BE(a.lo32,n+4),8}}]),n}(d),I=function(e){i(n,e);var t=s(n);function n(e){return c(this,n),t.call(this,8,e)}return u(n,[{key:"decode",value:function(e,t){void 0===t&&(t=0);var n=e.readUInt32LE(t);return k(e.readInt32LE(t+4),n)}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=w(e);return t.writeUInt32LE(a.lo32,n),t.writeInt32LE(a.hi32,n+4),8}}]),n}(d),T=function(e){i(n,e);var t=s(n);function n(e){return c(this,n),t.call(this,8,e)}return u(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),k(e.readInt32BE(t),e.readUInt32BE(t+4))}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=w(e);return t.writeInt32BE(a.hi32,n),t.writeUInt32BE(a.lo32,n+4),8}}]),n}(d),S=function(e){i(n,e);var t=s(n);function n(e){return c(this,n),t.call(this,4,e)}return u(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readFloatLE(t)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeFloatLE(e,n),4}}]),n}(d),C=function(e){i(n,e);var t=s(n);function n(e){return c(this,n),t.call(this,4,e)}return u(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readFloatBE(t)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeFloatBE(e,n),4}}]),n}(d),E=function(e){i(n,e);var t=s(n);function n(e){return c(this,n),t.call(this,8,e)}return u(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readDoubleLE(t)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeDoubleLE(e,n),8}}]),n}(d),R=function(e){i(n,e);var t=s(n);function n(e){return c(this,n),t.call(this,8,e)}return u(n,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readDoubleBE(t)}},{key:"encode",value:function(e,t,n){return void 0===n&&(n=0),t.writeDoubleBE(e,n),8}}]),n}(d),M=function(e){i(n,e);var t=s(n);function n(e,a,o){var r;if(c(this,n),!(e instanceof d))throw new TypeError("elementLayout must be a Layout");if(!(a instanceof f&&a.isCount()||Number.isInteger(a)&&0<=a))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");var i=-1;return!(a instanceof f)&&0l.span&&void 0===l.property)throw new Error("fields cannot contain unnamed variable-length layout")}}catch(p){u.e(p)}finally{u.f()}var f=-1;try{f=e.reduce((function(e,t){return e+t.getSpan()}),0)}catch(b){}return(i=t.call(this,f,a)).fields=e,i.decodePrefixes=!!o,i}return u(n,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var n=0;try{n=this.fields.reduce((function(n,a){var o=a.getSpan(e,t);return t+=o,n+o}),0)}catch(a){throw new RangeError("indeterminate span")}return n}},{key:"decode",value:function(e,t){void 0===t&&(t=0);var n,a=this.makeDestinationObject(),o=r(this.fields);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(void 0!==i.property&&(a[i.property]=i.decode(e,t)),t+=i.getSpan(e,t),this.decodePrefixes&&e.length===t)break}}catch(s){o.e(s)}finally{o.f()}return a}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a,o=n,i=0,s=0,c=r(this.fields);try{for(c.s();!(a=c.n()).done;){var u=a.value,d=u.span;if(s=0d&&(d=u.getSpan(t,n)))}i=n,n+=d}}catch(f){c.e(f)}finally{c.f()}return i+s-o}},{key:"fromArray",value:function(e){var t,n=this.makeDestinationObject(),a=r(this.fields);try{for(a.s();!(t=a.n()).done;){var o=t.value;void 0!==o.property&&0o.span?n=-1:0<=n&&(n+=o.span)}}catch(i){a.e(i)}finally{a.f()}}}]),n}(d),U=function(){function e(t){c(this,e),this.property=t}return u(e,[{key:"decode",value:function(){throw new Error("UnionDiscriminator is abstract")}},{key:"encode",value:function(){throw new Error("UnionDiscriminator is abstract")}}]),e}(),_=function(e){i(n,e);var t=s(n);function n(e,a){var o;if(c(this,n),!(e instanceof f&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");return(o=t.call(this,a||e.property||"variant")).layout=e,o}return u(n,[{key:"decode",value:function(e,t){return this.layout.decode(e,t)}},{key:"encode",value:function(e,t,n){return this.layout.encode(e,t,n)}}]),n}(U),B=function(e){i(n,e);var t=s(n);function n(e,a,r){var i;c(this,n);var s=e instanceof m||e instanceof h;if(s)e=new _(new b(e));else if(e instanceof f&&e.isCount())e=new _(e);else if(!(e instanceof U))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===a&&(a=null),!(null===a||a instanceof d))throw new TypeError("defaultLayout must be null or a Layout");if(null!==a){if(0>a.span)throw new Error("defaultLayout must have constant span");void 0===a.property&&(a=a.replicate("content"))}var u=-1;a&&0<=(u=a.span)&&s&&(u+=e.layout.span),(i=t.call(this,u,r)).discriminator=e,i.usesPrefixDiscriminator=s,i.defaultLayout=a,i.registry={};var l=i.defaultGetSourceVariant.bind(o(i));return i.getSourceVariant=function(e){return l(e)},i.configGetSourceVariant=function(e){l=e.bind(this)},i}return u(n,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}},{key:"defaultGetSourceVariant",value:function(e){if(e.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&e.hasOwnProperty(this.defaultLayout.property))return;var t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||e.hasOwnProperty(t.property)))return t}else for(var n in this.registry){var a=this.registry[n];if(e.hasOwnProperty(a.property))return a}throw new Error("unable to infer src variant")}},{key:"decode",value:function(e,t){var n;void 0===t&&(t=0);var a=this.discriminator,o=a.decode(e,t),r=this.registry[o];if(void 0===r){var i=0;r=this.defaultLayout,this.usesPrefixDiscriminator&&(i=a.layout.span),(n=this.makeDestinationObject())[a.property]=o,n[r.property]=this.defaultLayout.decode(e,t+i)}else n=r.decode(e,t);return n}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=this.getSourceVariant(e);if(void 0===a){var o=this.discriminator,r=this.defaultLayout,i=0;return this.usesPrefixDiscriminator&&(i=o.layout.span),o.encode(e[o.property],t,n),i+r.encode(e[r.property],t,n+i)}return a.encode(e,t,n)}},{key:"addVariant",value:function(e,t,n){var a=new D(this,e,t,n);return this.registry[e]=a,a}},{key:"getVariant",value:function(e,t){var n=e;return a.isBuffer(e)&&(void 0===t&&(t=0),n=this.discriminator.decode(e,t)),this.registry[n]}}]),n}(d),D=function(e){i(n,e);var t=s(n);function n(e,a,o,r){var i;if(c(this,n),!(e instanceof B))throw new TypeError("union must be a Union");if(!Number.isInteger(a)||0>a)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof o&&void 0===r&&(r=o,o=null),o){if(!(o instanceof d))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=o.span&&o.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof r)throw new TypeError("variant must have a String property")}var s=e.span;return 0>e.span&&0<=(s=o?o.span:0)&&e.usesPrefixDiscriminator&&(s+=e.discriminator.layout.span),(i=t.call(this,s,r)).union=e,i.variant=a,i.layout=o||null,i}return u(n,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),n+this.layout.getSpan(e,t+n)}},{key:"decode",value:function(e,t){var n=this.makeDestinationObject();if(void 0===t&&(t=0),this!==this.union.getVariant(e,t))throw new Error("variant mismatch");var a=0;return this.union.usesPrefixDiscriminator&&(a=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+a):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}},{key:"encode",value:function(e,t,n){void 0===n&&(n=0);var a=0;if(this.union.usesPrefixDiscriminator&&(a=this.union.discriminator.layout.span),this.layout&&!e.hasOwnProperty(this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);var o=a;if(this.layout&&(this.layout.encode(e[this.property],t,n+a),o+=this.layout.getSpan(t,n+a),0<=this.union.span&&o>this.union.span))throw new Error("encoded variant overruns containing union");return o}},{key:"fromArray",value:function(e){if(this.layout)return this.layout.fromArray(e)}}]),n}(d);function N(e){return 0>e&&(e+=4294967296),e}var O=function(e){i(n,e);var t=s(n);function n(e,a,o){var r;if(c(this,n),!(e instanceof m||e instanceof h))throw new TypeError("word must be a UInt or UIntBE layout");if("string"===typeof a&&void 0===o&&(o=a,a=void 0),4=n)throw new TypeError("bits must be positive integer");var o=8*t.span,r=t.fields.reduce((function(e,t){return e+t.bits}),0);if(n+r>o)throw new Error("bits too long for span remainder ("+(o-r)+" of "+o+" remain)");this.container=t,this.bits=n,this.valueMask=(1<>>this.start}},{key:"encode",value:function(e){if(!Number.isInteger(e)||e!==N(e&this.valueMask))throw new TypeError(l("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);var t=this.container._packedGetValue(),n=N(e<n&&(n=this.length.decode(e,t)),n}},{key:"decode",value:function(e,t){void 0===t&&(t=0);var n=this.span;return 0>n&&(n=this.length.decode(e,t)),e.slice(t,t+n)}},{key:"encode",value:function(e,t,n){var o=this.length;if(this.length instanceof f&&(o=e.length),!a.isBuffer(e)||o!==e.length)throw new TypeError(l("Blob.encode",this)+" requires (length "+o+") Buffer as src");if(n+o>t.length)throw new RangeError("encoding overruns Buffer");return t.write(e.toString("hex"),n,o,"hex"),this.length instanceof f&&this.length.encode(o,t,n),o}}]),n}(d),H=function(e){i(n,e);var t=s(n);function n(e){return c(this,n),t.call(this,-1,e)}return u(n,[{key:"getSpan",value:function(e,t){if(!a.isBuffer(e))throw new TypeError("b must be a Buffer");void 0===t&&(t=0);for(var n=t;nt.length)throw new RangeError("encoding overruns Buffer");return o.copy(t,n),t[n+r]=0,r+1}}]),n}(d),G=function(e){i(n,e);var t=s(n);function n(e,a){var o;if(c(this,n),"string"===typeof e&&void 0===a&&(a=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");return(o=t.call(this,-1,a)).maxSpan=e,o}return u(n,[{key:"getSpan",value:function(e,t){if(!a.isBuffer(e))throw new TypeError("b must be a Buffer");return void 0===t&&(t=0),e.length-t}},{key:"decode",value:function(e,t,n){void 0===t&&(t=0);var a=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpant.length)throw new RangeError("encoding overruns Buffer");return o.copy(t,n),r}}]),n}(d),z=function(e){i(n,e);var t=s(n);function n(e,a){var o;return c(this,n),(o=t.call(this,0,a)).value=e,o}return u(n,[{key:"decode",value:function(e,t,n){return this.value}},{key:"encode",value:function(e,t,n){return 0}}]),n}(d);t.ExternalLayout=f,t.GreedyCount=p,t.OffsetLayout=b,t.UInt=m,t.UIntBE=h,t.Int=g,t.IntBE=y,t.Float=S,t.FloatBE=C,t.Double=E,t.DoubleBE=R,t.Sequence=M,t.Structure=P,t.UnionDiscriminator=U,t.UnionLayoutDiscriminator=_,t.Union=B,t.VariantLayout=D,t.BitStructure=O,t.BitField=F,t.Boolean=L,t.Blob=j,t.CString=H,t.UTF8=G,t.Constant=z,t.greedy=function(e,t){return new p(e,t)},t.offset=function(e,t,n){return new b(e,t,n)},t.u8=function(e){return new m(1,e)},t.u16=function(e){return new m(2,e)},t.u24=function(e){return new m(3,e)},t.u32=function(e){return new m(4,e)},t.u40=function(e){return new m(5,e)},t.u48=function(e){return new m(6,e)},t.nu64=function(e){return new A(e)},t.u16be=function(e){return new h(2,e)},t.u24be=function(e){return new h(3,e)},t.u32be=function(e){return new h(4,e)},t.u40be=function(e){return new h(5,e)},t.u48be=function(e){return new h(6,e)},t.nu64be=function(e){return new x(e)},t.s8=function(e){return new g(1,e)},t.s16=function(e){return new g(2,e)},t.s24=function(e){return new g(3,e)},t.s32=function(e){return new g(4,e)},t.s40=function(e){return new g(5,e)},t.s48=function(e){return new g(6,e)},t.ns64=function(e){return new I(e)},t.s16be=function(e){return new y(2,e)},t.s24be=function(e){return new y(3,e)},t.s32be=function(e){return new y(4,e)},t.s40be=function(e){return new y(5,e)},t.s48be=function(e){return new y(6,e)},t.ns64be=function(e){return new T(e)},t.f32=function(e){return new S(e)},t.f32be=function(e){return new C(e)},t.f64=function(e){return new E(e)},t.f64be=function(e){return new R(e)},t.struct=function(e,t,n){return new P(e,t,n)},t.bits=function(e,t,n){return new O(e,t,n)},t.seq=function(e,t,n){return new M(e,t,n)},t.union=function(e,t,n){return new B(e,t,n)},t.unionLayoutDiscriminator=function(e,t){return new _(e,t)},t.blob=function(e,t){return new j(e,t)},t.cstr=function(e){return new H(e)},t.utf8=function(e,t){return new G(e,t)},t.const=function(e,t){return new z(e,t)}},56526:function(e,t,n){var a=n(54659).Buffer;e.exports=function(e,t){for(var n=Math.min(e.length,t.length),o=new a(n),r=0;rf)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,b.prototype),t}function b(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return g(e)}return m(e,t,n)}function m(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!b.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|k(e,t),a=p(n),o=a.write(e,t);o!==n&&(a=a.slice(0,o));return a}(e,t);if(ArrayBuffer.isView(e))return function(e){if(te(e,Uint8Array)){var t=new Uint8Array(e);return v(t.buffer,t.byteOffset,t.byteLength)}return y(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(te(e,ArrayBuffer)||e&&te(e.buffer,ArrayBuffer))return v(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(te(e,SharedArrayBuffer)||e&&te(e.buffer,SharedArrayBuffer)))return v(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var a=e.valueOf&&e.valueOf();if(null!=a&&a!==e)return b.from(a,t,n);var o=function(e){if(b.isBuffer(e)){var t=0|w(e.length),n=p(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||ne(e.length)?p(0):y(e);if("Buffer"===e.type&&Array.isArray(e.data))return y(e.data)}(e);if(o)return o;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return b.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function g(e){return h(e),p(e<0?0:0|w(e))}function y(e){for(var t=e.length<0?0:0|w(e.length),n=p(t),a=0;a=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|e}function k(e,t){if(b.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||te(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(o)return a?-1:X(e).length;t=(""+t).toLowerCase(),o=!0}}function A(e,t,n){var a=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return U(this,t,n);case"ascii":return B(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return P(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function x(e,t,n){var a=e[t];e[t]=e[n],e[n]=a}function I(e,t,n,a,o){if(0===e.length)return-1;if("string"===typeof n?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),ne(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=b.from(t,a)),b.isBuffer(t))return 0===t.length?-1:T(e,t,n,a,o);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):T(e,[t],n,a,o);throw new TypeError("val must be string, number or Buffer")}function T(e,t,n,a,o){var r,i=1,s=e.length,c=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;i=2,s/=2,c/=2,n/=2}function u(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var d=-1;for(r=n;rs&&(n=s-c),r=n;r>=0;r--){for(var l=!0,f=0;fo&&(a=o):a=o;var r,i=t.length;for(a>i/2&&(a=i/2),r=0;r>8,o=n%256,r.push(o),r.push(a);return r}(t,e.length-n),e,n,a)}function P(e,t,n){return 0===t&&n===e.length?u.fromByteArray(e):u.fromByteArray(e.slice(t,n))}function U(e,t,n){n=Math.min(e.length,n);for(var a=[],o=t;o239?4:r>223?3:r>191?2:1;if(o+s<=n){var c=void 0,u=void 0,d=void 0,l=void 0;switch(s){case 1:r<128&&(i=r);break;case 2:128===(192&(c=e[o+1]))&&(l=(31&r)<<6|63&c)>127&&(i=l);break;case 3:c=e[o+1],u=e[o+2],128===(192&c)&&128===(192&u)&&(l=(15&r)<<12|(63&c)<<6|63&u)>2047&&(l<55296||l>57343)&&(i=l);break;case 4:c=e[o+1],u=e[o+2],d=e[o+3],128===(192&c)&&128===(192&u)&&128===(192&d)&&(l=(15&r)<<18|(63&c)<<12|(63&u)<<6|63&d)>65535&&l<1114112&&(i=l)}}null===i?(i=65533,s=1):i>65535&&(i-=65536,a.push(i>>>10&1023|55296),i=56320|1023&i),a.push(i),o+=s}return function(e){var t=e.length;if(t<=_)return String.fromCharCode.apply(String,e);var n="",a=0;for(;aa.length?(b.isBuffer(r)||(r=b.from(r)),r.copy(a,o)):Uint8Array.prototype.set.call(a,r,o);else{if(!b.isBuffer(r))throw new TypeError('"list" argument must be an Array of Buffers');r.copy(a,o)}o+=r.length}return a},b.byteLength=k,b.prototype._isBuffer=!0,b.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},l&&(b.prototype[l]=b.prototype.inspect),b.prototype.compare=function(e,t,n,a,o){if(te(e,Uint8Array)&&(e=b.from(e,e.offset,e.byteLength)),!b.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===o&&(o=this.length),t<0||n>e.length||a<0||o>this.length)throw new RangeError("out of range index");if(a>=o&&t>=n)return 0;if(a>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var r=(o>>>=0)-(a>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(r,i),c=this.slice(a,o),u=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===a&&(a="utf8")):(a=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var r=!1;;)switch(a){case"hex":return S(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return R(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,t,n);default:if(r)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),r=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function B(e,t,n){var a="";n=Math.min(e.length,n);for(var o=t;oa)&&(n=a);for(var o="",r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,a,o,r){if(!b.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function j(e,t,n,a,o){q(t,a,o,e,n,7);var r=Number(t&BigInt(4294967295));e[n++]=r,r>>=8,e[n++]=r,r>>=8,e[n++]=r,r>>=8,e[n++]=r;var i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,n}function H(e,t,n,a,o){q(t,a,o,e,n,7);var r=Number(t&BigInt(4294967295));e[n+7]=r,r>>=8,e[n+6]=r,r>>=8,e[n+5]=r,r>>=8,e[n+4]=r;var i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=i,i>>=8,e[n+2]=i,i>>=8,e[n+1]=i,i>>=8,e[n]=i,n+8}function G(e,t,n,a,o,r){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,a,o){return t=+t,n>>>=0,o||G(e,0,n,4),d.write(e,t,n,a,23,4),n+4}function K(e,t,n,a,o){return t=+t,n>>>=0,o||G(e,0,n,8),d.write(e,t,n,a,52,8),n+8}b.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||F(e,t,this.length);for(var a=this[e],o=1,r=0;++r>>=0,t>>>=0,n||F(e,t,this.length);for(var a=this[e+--t],o=1;t>0&&(o*=256);)a+=this[e+--t]*o;return a},b.prototype.readUint8=b.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},b.prototype.readUint16LE=b.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},b.prototype.readUint16BE=b.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},b.prototype.readUint32LE=b.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},b.prototype.readUint32BE=b.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},b.prototype.readBigUInt64LE=oe((function(e){Q(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var a=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),o=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(a)+(BigInt(o)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var a=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],o=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n;return(BigInt(a)<>>=0,t>>>=0,n||F(e,t,this.length);for(var a=this[e],o=1,r=0;++r=(o*=128)&&(a-=Math.pow(2,8*t)),a},b.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);for(var a=t,o=1,r=this[e+--a];a>0&&(o*=256);)r+=this[e+--a]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},b.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},b.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},b.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},b.prototype.readBigInt64LE=oe((function(e){Q(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var a=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(n<<24);return(BigInt(a)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var a=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(a)<>>=0,t||F(e,4,this.length),d.read(this,e,!0,23,4)},b.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),d.read(this,e,!1,23,4)},b.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),d.read(this,e,!0,52,8)},b.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),d.read(this,e,!1,52,8)},b.prototype.writeUintLE=b.prototype.writeUIntLE=function(e,t,n,a){(e=+e,t>>>=0,n>>>=0,a)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,r=0;for(this[t]=255&e;++r>>=0,n>>>=0,a)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,r=1;for(this[t+o]=255&e;--o>=0&&(r*=256);)this[t+o]=e/r&255;return t+n},b.prototype.writeUint8=b.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,255,0),this[t]=255&e,t+1},b.prototype.writeUint16LE=b.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},b.prototype.writeUint16BE=b.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},b.prototype.writeUint32LE=b.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},b.prototype.writeUint32BE=b.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},b.prototype.writeBigUInt64LE=oe((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),b.prototype.writeBigUInt64BE=oe((function(e){return H(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),b.prototype.writeIntLE=function(e,t,n,a){if(e=+e,t>>>=0,!a){var o=Math.pow(2,8*n-1);L(this,e,t,n,o-1,-o)}var r=0,i=1,s=0;for(this[t]=255&e;++r>0)-s&255;return t+n},b.prototype.writeIntBE=function(e,t,n,a){if(e=+e,t>>>=0,!a){var o=Math.pow(2,8*n-1);L(this,e,t,n,o-1,-o)}var r=n-1,i=1,s=0;for(this[t+r]=255&e;--r>=0&&(i*=256);)e<0&&0===s&&0!==this[t+r+1]&&(s=1),this[t+r]=(e/i>>0)-s&255;return t+n},b.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},b.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},b.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},b.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},b.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},b.prototype.writeBigInt64LE=oe((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),b.prototype.writeBigInt64BE=oe((function(e){return H(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),b.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},b.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},b.prototype.writeDoubleLE=function(e,t,n){return K(this,e,t,!0,n)},b.prototype.writeDoubleBE=function(e,t,n){return K(this,e,t,!1,n)},b.prototype.copy=function(e,t,n,a){if(!b.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),a||0===a||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(r=t;r=a+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function q(e,t,n,a,o,r){if(e>n||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(r+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(r+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(r+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(n).concat(s),new W.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||J(t,e.length-(n+1))}(a,o,r)}function Q(e,t){if("number"!==typeof e)throw new W.ERR_INVALID_ARG_TYPE(t,"number",e)}function J(e,t,n){if(Math.floor(e)!==e)throw Q(e,n),new W.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}Z("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),Z("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),Z("ERR_OUT_OF_RANGE",(function(e,t,n){var a='The value of "'.concat(e,'" is out of range.'),o=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?o=V(String(n)):"bigint"===typeof n&&(o=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(o=V(o)),o+="n"),a+=" It must be ".concat(t,". Received ").concat(o)}),RangeError);var Y=/[^+/0-9A-Za-z-_]/g;function X(e,t){var n;t=t||1/0;for(var a=e.length,o=null,r=[],i=0;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(i+1===a){(t-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;r.push(n)}else if(n<2048){if((t-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function $(e){return u.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function ee(e,t,n,a){var o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function te(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function ne(e){return e!==e}var ae=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var a=16*n,o=0;o<16;++o)t[a+o]=e[n]+e[o];return t}();function oe(e){return"undefined"===typeof BigInt?re:e}function re(){throw new Error("BigInt not supported")}},91196:function(e){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},28570:function(e,t,n){"use strict";var a=n(78476),o=n(40748),r=o(a("String.prototype.indexOf"));e.exports=function(e,t){var n=a(e,!!t);return"function"===typeof n&&r(e,".prototype.")>-1?o(n):n}},40748:function(e,t,n){"use strict";var a=n(46312),o=n(78476),r=o("%Function.prototype.apply%"),i=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||a.call(i,r),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),d=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(f){u=null}e.exports=function(e){var t=s(a,i,arguments);c&&u&&(c(t,"length").configurable&&u(t,"length",{value:1+d(0,e.length-(arguments.length-1))}));return t};var l=function(){return s(a,r,arguments)};u?u(e.exports,"apply",{value:l}):e.exports.apply=l},95444:function(e,t,n){"use strict";var a=n(42122).default,o=/(?:[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2F\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uA7BA\uA7BC\uA7BE\uA7C0\uA7C2\uA7C4-\uA7C7\uA7C9\uA7D0\uA7D6\uA7D8\uA7F5\uFF21-\uFF3A]|\uD801[\uDC00-\uDC27\uDCB0-\uDCD3\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21])/,r=/(?:[a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5F\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7BB\uA7BD\uA7BF\uA7C1\uA7C3\uA7C8\uA7CA\uA7D1\uA7D3\uA7D5\uA7D7\uA7D9\uA7F6\uA7FA\uAB30-\uAB5A\uAB60-\uAB68\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]|\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E\uDF25-\uDF2A]|\uD83A[\uDD22-\uDD43])/,i=/^(?:[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2F\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uA7BA\uA7BC\uA7BE\uA7C0\uA7C2\uA7C4-\uA7C7\uA7C9\uA7D0\uA7D6\uA7D8\uA7F5\uFF21-\uFF3A]|\uD801[\uDC00-\uDC27\uDCB0-\uDCD3\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21])(?!(?:[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2F\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uA7BA\uA7BC\uA7BE\uA7C0\uA7C2\uA7C4-\uA7C7\uA7C9\uA7D0\uA7D6\uA7D8\uA7F5\uFF21-\uFF3A]|\uD801[\uDC00-\uDC27\uDCB0-\uDCD3\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]))/g,s=/((?:[0-9A-Z_a-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0345\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05B0-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0657\u0659-\u0669\u066E-\u06D3\u06D5-\u06DC\u06E1-\u06E8\u06ED-\u06FC\u06FF\u0710-\u073F\u074D-\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0817\u081A-\u082C\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u08D4-\u08DF\u08E3-\u08E9\u08F0-\u093B\u093D-\u094C\u094E-\u0950\u0955-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C4\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A42\u0A47\u0A48\u0A4B\u0A4C\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC5\u0AC7-\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFC\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D-\u0B44\u0B47\u0B48\u0B4B\u0B4C\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4C\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCC\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D54-\u0D63\u0D66-\u0D78\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E46\u0E4D\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F71-\u0F83\u0F88-\u0F97\u0F99-\u0FBC\u1000-\u1036\u1038\u103B-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1713\u171F-\u1733\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17B3\u17B6-\u17C8\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A61-\u1A74\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1ABF\u1AC0\u1ACC-\u1ACE\u1B00-\u1B33\u1B35-\u1B43\u1B45-\u1B4C\u1B50-\u1B59\u1B80-\u1BA9\u1BAC-\u1BE5\u1BE7-\u1BF1\u1C00-\u1C36\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1DE7-\u1DF4\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2189\u2150-\u2182\u2460-\u249B\u24B6-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA674-\uA67B\uA67F-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA805\uA807-\uA827\uA830-\uA835\uA840-\uA873\uA880-\uA8C3\uA8C5\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD-\uA92A\uA930-\uA952\uA960-\uA97C\uA980-\uA9B2\uA9B4-\uA9BF\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAABE\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD27\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC45\uDC52-\uDC6F\uDC71-\uDC75\uDC80-\uDCB8\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD32\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD72\uDD76\uDD80-\uDDBF\uDDC1-\uDDC4\uDDCE-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE34\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEE8\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D-\uDF44\uDF47\uDF48\uDF4B\uDF4C\uDF50\uDF57\uDF5D-\uDF63]|\uD805[\uDC00-\uDC41\uDC43-\uDC45\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCC1\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDBE\uDDD8-\uDDDD\uDE00-\uDE3E\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB5\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC38\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B\uDD3C\uDD3F-\uDD42\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDDF\uDDE1\uDDE3\uDDE4\uDE00-\uDE32\uDE35-\uDE3E\uDE50-\uDE97\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC3E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD41\uDD43\uDD46\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD96\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF40\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9E]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD47\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])|$)/,c=/[_.\- ]+/,u=new RegExp("^"+c.source),d=new RegExp(c.source+s.source,"gu"),l=new RegExp("\\d+"+s.source,"gu"),f=function(e,t){if("string"!==typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(t=a({pascalCase:!1,preserveConsecutiveUppercase:!1},t),0===(e=Array.isArray(e)?e.map((function(e){return e.trim()})).filter((function(e){return e.length})).join("-"):e.trim()).length)return"";var n=!1===t.locale?function(e){return e.toLowerCase()}:function(e){return e.toLocaleLowerCase(t.locale)},s=!1===t.locale?function(e){return e.toUpperCase()}:function(e){return e.toLocaleUpperCase(t.locale)};return 1===e.length?t.pascalCase?s(e):n(e):(e!==n(e)&&(e=function(e,t,n){for(var a=!1,i=!1,s=!1,c=0;c1&&void 0!==arguments[1]?arguments[1]:c.Writer.create(),r=a(e.sendEnabled);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.SendEnabled.encode(i,o.uint32(10).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return!0===e.defaultSendEnabled&&o.uint32(16).bool(e.defaultSendEnabled),o},decode:function(e,n){for(var a=e instanceof c.Reader?e:new c.Reader(e),o=void 0===n?a.len:a.pos+n,r={sendEnabled:[],defaultSendEnabled:!1};a.pos>>3){case 1:r.sendEnabled.push(t.SendEnabled.decode(a,a.uint32()));break;case 2:r.defaultSendEnabled=a.bool();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{sendEnabled:Array.isArray(null===e||void 0===e?void 0:e.sendEnabled)?e.sendEnabled.map((function(e){return t.SendEnabled.fromJSON(e)})):[],defaultSendEnabled:!!(0,u.isSet)(e.defaultSendEnabled)&&Boolean(e.defaultSendEnabled)}},toJSON:function(e){var n={};return e.sendEnabled?n.sendEnabled=e.sendEnabled.map((function(e){return e?t.SendEnabled.toJSON(e):void 0})):n.sendEnabled=[],void 0!==e.defaultSendEnabled&&(n.defaultSendEnabled=e.defaultSendEnabled),n},fromPartial:function(e){var n,a,o={sendEnabled:[],defaultSendEnabled:!1};return o.sendEnabled=(null===(n=e.sendEnabled)||void 0===n?void 0:n.map((function(e){return t.SendEnabled.fromPartial(e)})))||[],o.defaultSendEnabled=null!==(a=e.defaultSendEnabled)&&void 0!==a&&a,o}},t.SendEnabled={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),!0===e.enabled&&t.uint32(16).bool(e.enabled),t},decode:function(e,t){for(var n=e instanceof c.Reader?e:new c.Reader(e),a=void 0===t?n.len:n.pos+t,o={denom:"",enabled:!1};n.pos>>3){case 1:o.denom=n.string();break;case 2:o.enabled=n.bool();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{denom:(0,u.isSet)(e.denom)?String(e.denom):"",enabled:!!(0,u.isSet)(e.enabled)&&Boolean(e.enabled)}},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.enabled&&(t.enabled=e.enabled),t},fromPartial:function(e){var t,n,a={denom:"",enabled:!1};return a.denom=null!==(t=e.denom)&&void 0!==t?t:"",a.enabled=null!==(n=e.enabled)&&void 0!==n&&n,a}},t.Input={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.Writer.create();""!==e.address&&t.uint32(10).string(e.address);var n,o=a(e.coins);try{for(o.s();!(n=o.n()).done;){var r=n.value;s.Coin.encode(r,t.uint32(18).fork()).ldelim()}}catch(i){o.e(i)}finally{o.f()}return t},decode:function(e,t){for(var n=e instanceof c.Reader?e:new c.Reader(e),a=void 0===t?n.len:n.pos+t,o={address:"",coins:[]};n.pos>>3){case 1:o.address=n.string();break;case 2:o.coins.push(s.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{address:(0,u.isSet)(e.address)?String(e.address):"",coins:Array.isArray(null===e||void 0===e?void 0:e.coins)?e.coins.map((function(e){return s.Coin.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.coins=[],t},fromPartial:function(e){var t,n,a={address:"",coins:[]};return a.address=null!==(t=e.address)&&void 0!==t?t:"",a.coins=(null===(n=e.coins)||void 0===n?void 0:n.map((function(e){return s.Coin.fromPartial(e)})))||[],a}},t.Output={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.Writer.create();""!==e.address&&t.uint32(10).string(e.address);var n,o=a(e.coins);try{for(o.s();!(n=o.n()).done;){var r=n.value;s.Coin.encode(r,t.uint32(18).fork()).ldelim()}}catch(i){o.e(i)}finally{o.f()}return t},decode:function(e,t){for(var n=e instanceof c.Reader?e:new c.Reader(e),a=void 0===t?n.len:n.pos+t,o={address:"",coins:[]};n.pos>>3){case 1:o.address=n.string();break;case 2:o.coins.push(s.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{address:(0,u.isSet)(e.address)?String(e.address):"",coins:Array.isArray(null===e||void 0===e?void 0:e.coins)?e.coins.map((function(e){return s.Coin.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.coins=[],t},fromPartial:function(e){var t,n,a={address:"",coins:[]};return a.address=null!==(t=e.address)&&void 0!==t?t:"",a.coins=(null===(n=e.coins)||void 0===n?void 0:n.map((function(e){return s.Coin.fromPartial(e)})))||[],a}},t.Supply={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.Writer.create(),o=a(e.total);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(i){o.e(i)}finally{o.f()}return n},decode:function(e,t){for(var n=e instanceof c.Reader?e:new c.Reader(e),a=void 0===t?n.len:n.pos+t,o={total:[]};n.pos>>3===1)o.total.push(s.Coin.decode(n,n.uint32()));else n.skipType(7&r)}return o},fromJSON:function(e){return{total:Array.isArray(null===e||void 0===e?void 0:e.total)?e.total.map((function(e){return s.Coin.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.total?t.total=e.total.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.total=[],t},fromPartial:function(e){var t,n={total:[]};return n.total=(null===(t=e.total)||void 0===t?void 0:t.map((function(e){return s.Coin.fromPartial(e)})))||[],n}},t.DenomUnit={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.Writer.create();""!==e.denom&&t.uint32(10).string(e.denom),0!==e.exponent&&t.uint32(16).uint32(e.exponent);var n,o=a(e.aliases);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(26).string(r)}}catch(i){o.e(i)}finally{o.f()}return t},decode:function(e,t){for(var n=e instanceof c.Reader?e:new c.Reader(e),a=void 0===t?n.len:n.pos+t,o={denom:"",exponent:0,aliases:[]};n.pos>>3){case 1:o.denom=n.string();break;case 2:o.exponent=n.uint32();break;case 3:o.aliases.push(n.string());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{denom:(0,u.isSet)(e.denom)?String(e.denom):"",exponent:(0,u.isSet)(e.exponent)?Number(e.exponent):0,aliases:Array.isArray(null===e||void 0===e?void 0:e.aliases)?e.aliases.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.exponent&&(t.exponent=Math.round(e.exponent)),e.aliases?t.aliases=e.aliases.map((function(e){return e})):t.aliases=[],t},fromPartial:function(e){var t,n,a,o={denom:"",exponent:0,aliases:[]};return o.denom=null!==(t=e.denom)&&void 0!==t?t:"",o.exponent=null!==(n=e.exponent)&&void 0!==n?n:0,o.aliases=(null===(a=e.aliases)||void 0===a?void 0:a.map((function(e){return e})))||[],o}},t.Metadata={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.Writer.create();""!==e.description&&n.uint32(10).string(e.description);var o,r=a(e.denomUnits);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.DenomUnit.encode(i,n.uint32(18).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return""!==e.base&&n.uint32(26).string(e.base),""!==e.display&&n.uint32(34).string(e.display),""!==e.name&&n.uint32(42).string(e.name),""!==e.symbol&&n.uint32(50).string(e.symbol),n},decode:function(e,n){for(var a=e instanceof c.Reader?e:new c.Reader(e),o=void 0===n?a.len:a.pos+n,r={description:"",denomUnits:[],base:"",display:"",name:"",symbol:""};a.pos>>3){case 1:r.description=a.string();break;case 2:r.denomUnits.push(t.DenomUnit.decode(a,a.uint32()));break;case 3:r.base=a.string();break;case 4:r.display=a.string();break;case 5:r.name=a.string();break;case 6:r.symbol=a.string();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{description:(0,u.isSet)(e.description)?String(e.description):"",denomUnits:Array.isArray(null===e||void 0===e?void 0:e.denomUnits)?e.denomUnits.map((function(e){return t.DenomUnit.fromJSON(e)})):[],base:(0,u.isSet)(e.base)?String(e.base):"",display:(0,u.isSet)(e.display)?String(e.display):"",name:(0,u.isSet)(e.name)?String(e.name):"",symbol:(0,u.isSet)(e.symbol)?String(e.symbol):""}},toJSON:function(e){var n={};return void 0!==e.description&&(n.description=e.description),e.denomUnits?n.denomUnits=e.denomUnits.map((function(e){return e?t.DenomUnit.toJSON(e):void 0})):n.denomUnits=[],void 0!==e.base&&(n.base=e.base),void 0!==e.display&&(n.display=e.display),void 0!==e.name&&(n.name=e.name),void 0!==e.symbol&&(n.symbol=e.symbol),n},fromPartial:function(e){var n,a,o,r,i,s,c={description:"",denomUnits:[],base:"",display:"",name:"",symbol:""};return c.description=null!==(n=e.description)&&void 0!==n?n:"",c.denomUnits=(null===(a=e.denomUnits)||void 0===a?void 0:a.map((function(e){return t.DenomUnit.fromPartial(e)})))||[],c.base=null!==(o=e.base)&&void 0!==o?o:"",c.display=null!==(r=e.display)&&void 0!==r?r:"",c.name=null!==(i=e.name)&&void 0!==i?i:"",c.symbol=null!==(s=e.symbol)&&void 0!==s?s:"",c}}},38516:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(74704).default,i=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgMultiSendResponse=t.MsgMultiSend=t.MsgSendResponse=t.MsgSend=t.protobufPackage=void 0;var u=n(88298),d=n(38147),l=c(n(80121)),f=n(91421);t.protobufPackage="cosmos.bank.v1beta1",t.MsgSend={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create();""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress);var n,a=r(e.amount);try{for(a.s();!(n=a.n()).done;){var o=n.value;u.Coin.encode(o,t.uint32(26).fork()).ldelim()}}catch(i){a.e(i)}finally{a.f()}return t},decode:function(e,t){for(var n=e instanceof l.Reader?e:new l.Reader(e),a=void 0===t?n.len:n.pos+t,o={fromAddress:"",toAddress:"",amount:[]};n.pos>>3){case 1:o.fromAddress=n.string();break;case 2:o.toAddress=n.string();break;case 3:o.amount.push(u.Coin.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{fromAddress:(0,f.isSet)(e.fromAddress)?String(e.fromAddress):"",toAddress:(0,f.isSet)(e.toAddress)?String(e.toAddress):"",amount:Array.isArray(null===e||void 0===e?void 0:e.amount)?e.amount.map((function(e){return u.Coin.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map((function(e){return e?u.Coin.toJSON(e):void 0})):t.amount=[],t},fromPartial:function(e){var t,n,a,o={fromAddress:"",toAddress:"",amount:[]};return o.fromAddress=null!==(t=e.fromAddress)&&void 0!==t?t:"",o.toAddress=null!==(n=e.toAddress)&&void 0!==n?n:"",o.amount=(null===(a=e.amount)||void 0===a?void 0:a.map((function(e){return u.Coin.fromPartial(e)})))||[],o}},t.MsgSendResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create()},decode:function(e,t){for(var n=e instanceof l.Reader?e:new l.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:l.Writer.create(),a=r(e.inputs);try{for(a.s();!(t=a.n()).done;){var o=t.value;d.Input.encode(o,n.uint32(10).fork()).ldelim()}}catch(u){a.e(u)}finally{a.f()}var i,s=r(e.outputs);try{for(s.s();!(i=s.n()).done;){var c=i.value;d.Output.encode(c,n.uint32(18).fork()).ldelim()}}catch(u){s.e(u)}finally{s.f()}return n},decode:function(e,t){for(var n=e instanceof l.Reader?e:new l.Reader(e),a=void 0===t?n.len:n.pos+t,o={inputs:[],outputs:[]};n.pos>>3){case 1:o.inputs.push(d.Input.decode(n,n.uint32()));break;case 2:o.outputs.push(d.Output.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{inputs:Array.isArray(null===e||void 0===e?void 0:e.inputs)?e.inputs.map((function(e){return d.Input.fromJSON(e)})):[],outputs:Array.isArray(null===e||void 0===e?void 0:e.outputs)?e.outputs.map((function(e){return d.Output.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.inputs?t.inputs=e.inputs.map((function(e){return e?d.Input.toJSON(e):void 0})):t.inputs=[],e.outputs?t.outputs=e.outputs.map((function(e){return e?d.Output.toJSON(e):void 0})):t.outputs=[],t},fromPartial:function(e){var t,n,a={inputs:[],outputs:[]};return a.inputs=(null===(t=e.inputs)||void 0===t?void 0:t.map((function(e){return d.Input.fromPartial(e)})))||[],a.outputs=(null===(n=e.outputs)||void 0===n?void 0:n.map((function(e){return d.Output.fromPartial(e)})))||[],a}},t.MsgMultiSendResponse={encode:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create()},decode:function(e,t){for(var n=e instanceof l.Reader?e:new l.Reader(e),a=void 0===t?n.len:n.pos+t,o={};n.pos1&&void 0!==arguments[1]?arguments[1]:i.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode:function(e,t){for(var n=e instanceof i.Reader?e:new i.Reader(e),a=void 0===t?n.len:n.pos+t,o={denom:"",amount:""};n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{denom:(0,s.isSet)(e.denom)?String(e.denom):"",amount:(0,s.isSet)(e.amount)?String(e.amount):""}},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial:function(e){var t,n,a={denom:"",amount:""};return a.denom=null!==(t=e.denom)&&void 0!==t?t:"",a.amount=null!==(n=e.amount)&&void 0!==n?n:"",a}},t.DecCoin={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode:function(e,t){for(var n=e instanceof i.Reader?e:new i.Reader(e),a=void 0===t?n.len:n.pos+t,o={denom:"",amount:""};n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{denom:(0,s.isSet)(e.denom)?String(e.denom):"",amount:(0,s.isSet)(e.amount)?String(e.amount):""}},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial:function(e){var t,n,a={denom:"",amount:""};return a.denom=null!==(t=e.denom)&&void 0!==t?t:"",a.amount=null!==(n=e.amount)&&void 0!==n?n:"",a}},t.IntProto={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Writer.create();return""!==e.int&&t.uint32(10).string(e.int),t},decode:function(e,t){for(var n=e instanceof i.Reader?e:new i.Reader(e),a=void 0===t?n.len:n.pos+t,o={int:""};n.pos>>3===1)o.int=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{int:(0,s.isSet)(e.int)?String(e.int):""}},toJSON:function(e){var t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial:function(e){var t,n={int:""};return n.int=null!==(t=e.int)&&void 0!==t?t:"",n}},t.DecProto={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Writer.create();return""!==e.dec&&t.uint32(10).string(e.dec),t},decode:function(e,t){for(var n=e instanceof i.Reader?e:new i.Reader(e),a=void 0===t?n.len:n.pos+t,o={dec:""};n.pos>>3===1)o.dec=n.string();else n.skipType(7&r)}return o},fromJSON:function(e){return{dec:(0,s.isSet)(e.dec)?String(e.dec):""}},toJSON:function(e){var t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial:function(e){var t,n={dec:""};return n.dec=null!==(t=e.dec)&&void 0!==t?t:"",n}}},45753:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PrivKey=t.PubKey=t.protobufPackage=void 0;var i=r(n(80121)),s=n(91421);function c(){return{key:new Uint8Array}}function u(){return{key:new Uint8Array}}t.protobufPackage="cosmos.crypto.ed25519",t.PubKey={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode:function(e,t){for(var n=e instanceof i.Reader?e:new i.Reader(e),a=void 0===t?n.len:n.pos+t,o=c();n.pos>>3===1)o.key=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){return{key:(0,s.isSet)(e.key)?(0,s.bytesFromBase64)(e.key):new Uint8Array}},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=(0,s.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial:function(e){var t,n=c();return n.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,n}},t.PrivKey={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode:function(e,t){for(var n=e instanceof i.Reader?e:new i.Reader(e),a=void 0===t?n.len:n.pos+t,o=u();n.pos>>3===1)o.key=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){return{key:(0,s.isSet)(e.key)?(0,s.bytesFromBase64)(e.key):new Uint8Array}},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=(0,s.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial:function(e){var t,n=u();return n.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,n}}},56859:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LegacyAminoPubKey=t.protobufPackage=void 0;var s=n(90605),c=i(n(80121)),u=n(91421);t.protobufPackage="cosmos.crypto.multisig",t.LegacyAminoPubKey={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.Writer.create();0!==e.threshold&&t.uint32(8).uint32(e.threshold);var n,o=a(e.publicKeys);try{for(o.s();!(n=o.n()).done;){var r=n.value;s.Any.encode(r,t.uint32(18).fork()).ldelim()}}catch(i){o.e(i)}finally{o.f()}return t},decode:function(e,t){for(var n=e instanceof c.Reader?e:new c.Reader(e),a=void 0===t?n.len:n.pos+t,o={threshold:0,publicKeys:[]};n.pos>>3){case 1:o.threshold=n.uint32();break;case 2:o.publicKeys.push(s.Any.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{threshold:(0,u.isSet)(e.threshold)?Number(e.threshold):0,publicKeys:Array.isArray(null===e||void 0===e?void 0:e.publicKeys)?e.publicKeys.map((function(e){return s.Any.fromJSON(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.threshold&&(t.threshold=Math.round(e.threshold)),e.publicKeys?t.publicKeys=e.publicKeys.map((function(e){return e?s.Any.toJSON(e):void 0})):t.publicKeys=[],t},fromPartial:function(e){var t,n,a={threshold:0,publicKeys:[]};return a.threshold=null!==(t=e.threshold)&&void 0!==t?t:0,a.publicKeys=(null===(n=e.publicKeys)||void 0===n?void 0:n.map((function(e){return s.Any.fromPartial(e)})))||[],a}}},87538:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CompactBitArray=t.MultiSignature=t.protobufPackage=void 0;var s=i(n(80121)),c=n(91421);function u(){return{extraBitsStored:0,elems:new Uint8Array}}t.protobufPackage="cosmos.crypto.multisig.v1beta1",t.MultiSignature={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.Writer.create(),o=a(e.signatures);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).bytes(r)}}catch(i){o.e(i)}finally{o.f()}return n},decode:function(e,t){for(var n=e instanceof s.Reader?e:new s.Reader(e),a=void 0===t?n.len:n.pos+t,o={signatures:[]};n.pos>>3===1)o.signatures.push(n.bytes());else n.skipType(7&r)}return o},fromJSON:function(e){return{signatures:Array.isArray(null===e||void 0===e?void 0:e.signatures)?e.signatures.map((function(e){return(0,c.bytesFromBase64)(e)})):[]}},toJSON:function(e){var t={};return e.signatures?t.signatures=e.signatures.map((function(e){return(0,c.base64FromBytes)(void 0!==e?e:new Uint8Array)})):t.signatures=[],t},fromPartial:function(e){var t,n={signatures:[]};return n.signatures=(null===(t=e.signatures)||void 0===t?void 0:t.map((function(e){return e})))||[],n}},t.CompactBitArray={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.Writer.create();return 0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t},decode:function(e,t){for(var n=e instanceof s.Reader?e:new s.Reader(e),a=void 0===t?n.len:n.pos+t,o=u();n.pos>>3){case 1:o.extraBitsStored=n.uint32();break;case 2:o.elems=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{extraBitsStored:(0,c.isSet)(e.extraBitsStored)?Number(e.extraBitsStored):0,elems:(0,c.isSet)(e.elems)?(0,c.bytesFromBase64)(e.elems):new Uint8Array}},toJSON:function(e){var t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=Math.round(e.extraBitsStored)),void 0!==e.elems&&(t.elems=(0,c.base64FromBytes)(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial:function(e){var t,n,a=u();return a.extraBitsStored=null!==(t=e.extraBitsStored)&&void 0!==t?t:0,a.elems=null!==(n=e.elems)&&void 0!==n?n:new Uint8Array,a}}},91323:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PrivKey=t.PubKey=t.protobufPackage=void 0;var i=r(n(80121)),s=n(91421);function c(){return{key:new Uint8Array}}function u(){return{key:new Uint8Array}}t.protobufPackage="cosmos.crypto.secp256k1",t.PubKey={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode:function(e,t){for(var n=e instanceof i.Reader?e:new i.Reader(e),a=void 0===t?n.len:n.pos+t,o=c();n.pos>>3===1)o.key=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){return{key:(0,s.isSet)(e.key)?(0,s.bytesFromBase64)(e.key):new Uint8Array}},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=(0,s.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial:function(e){var t,n=c();return n.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,n}},t.PrivKey={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode:function(e,t){for(var n=e instanceof i.Reader?e:new i.Reader(e),a=void 0===t?n.len:n.pos+t,o=u();n.pos>>3===1)o.key=n.bytes();else n.skipType(7&r)}return o},fromJSON:function(e){return{key:(0,s.isSet)(e.key)?(0,s.bytesFromBase64)(e.key):new Uint8Array}},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=(0,s.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial:function(e){var t,n=u();return n.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,n}}},74015:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureDescriptor_Data_Multi=t.SignatureDescriptor_Data_Single=t.SignatureDescriptor_Data=t.SignatureDescriptor=t.SignatureDescriptors=t.signModeToJSON=t.signModeFromJSON=t.SignMode=t.protobufPackage=void 0;var s,c=n(87538),u=n(90605),d=i(n(80121)),l=n(91421);function f(e){switch(e){case 0:case"SIGN_MODE_UNSPECIFIED":return s.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return s.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return s.SIGN_MODE_TEXTUAL;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return s.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case"SIGN_MODE_EIP_191":return s.SIGN_MODE_EIP_191;default:return s.UNRECOGNIZED}}function p(e){switch(e){case s.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case s.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case s.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case s.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";case s.SIGN_MODE_EIP_191:return"SIGN_MODE_EIP_191";case s.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function b(){return{publicKey:void 0,data:void 0,sequence:l.Long.UZERO}}function m(){return{mode:0,signature:new Uint8Array}}t.protobufPackage="cosmos.tx.signing.v1beta1",function(e){e[e.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",e[e.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",e[e.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",e[e.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(s=t.SignMode||(t.SignMode={})),t.signModeFromJSON=f,t.signModeToJSON=p,t.SignatureDescriptors={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.Writer.create(),r=a(e.signatures);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.SignatureDescriptor.encode(i,o.uint32(10).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return o},decode:function(e,n){for(var a=e instanceof d.Reader?e:new d.Reader(e),o=void 0===n?a.len:a.pos+n,r={signatures:[]};a.pos>>3===1)r.signatures.push(t.SignatureDescriptor.decode(a,a.uint32()));else a.skipType(7&i)}return r},fromJSON:function(e){return{signatures:Array.isArray(null===e||void 0===e?void 0:e.signatures)?e.signatures.map((function(e){return t.SignatureDescriptor.fromJSON(e)})):[]}},toJSON:function(e){var n={};return e.signatures?n.signatures=e.signatures.map((function(e){return e?t.SignatureDescriptor.toJSON(e):void 0})):n.signatures=[],n},fromPartial:function(e){var n,a={signatures:[]};return a.signatures=(null===(n=e.signatures)||void 0===n?void 0:n.map((function(e){return t.SignatureDescriptor.fromPartial(e)})))||[],a}},t.SignatureDescriptor={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.Writer.create();return void 0!==e.publicKey&&u.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.data&&t.SignatureDescriptor_Data.encode(e.data,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n},decode:function(e,n){for(var a=e instanceof d.Reader?e:new d.Reader(e),o=void 0===n?a.len:a.pos+n,r=b();a.pos>>3){case 1:r.publicKey=u.Any.decode(a,a.uint32());break;case 2:r.data=t.SignatureDescriptor_Data.decode(a,a.uint32());break;case 3:r.sequence=a.uint64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{publicKey:(0,l.isSet)(e.publicKey)?u.Any.fromJSON(e.publicKey):void 0,data:(0,l.isSet)(e.data)?t.SignatureDescriptor_Data.fromJSON(e.data):void 0,sequence:(0,l.isSet)(e.sequence)?l.Long.fromValue(e.sequence):l.Long.UZERO}},toJSON:function(e){var n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?u.Any.toJSON(e.publicKey):void 0),void 0!==e.data&&(n.data=e.data?t.SignatureDescriptor_Data.toJSON(e.data):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||l.Long.UZERO).toString()),n},fromPartial:function(e){var n=b();return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?u.Any.fromPartial(e.publicKey):void 0,n.data=void 0!==e.data&&null!==e.data?t.SignatureDescriptor_Data.fromPartial(e.data):void 0,n.sequence=void 0!==e.sequence&&null!==e.sequence?l.Long.fromValue(e.sequence):l.Long.UZERO,n}},t.SignatureDescriptor_Data={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.Writer.create();return void 0!==e.single&&t.SignatureDescriptor_Data_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.SignatureDescriptor_Data_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof d.Reader?e:new d.Reader(e),o=void 0===n?a.len:a.pos+n,r={single:void 0,multi:void 0};a.pos>>3){case 1:r.single=t.SignatureDescriptor_Data_Single.decode(a,a.uint32());break;case 2:r.multi=t.SignatureDescriptor_Data_Multi.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{single:(0,l.isSet)(e.single)?t.SignatureDescriptor_Data_Single.fromJSON(e.single):void 0,multi:(0,l.isSet)(e.multi)?t.SignatureDescriptor_Data_Multi.fromJSON(e.multi):void 0}},toJSON:function(e){var n={};return void 0!==e.single&&(n.single=e.single?t.SignatureDescriptor_Data_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.SignatureDescriptor_Data_Multi.toJSON(e.multi):void 0),n},fromPartial:function(e){var n={single:void 0,multi:void 0};return n.single=void 0!==e.single&&null!==e.single?t.SignatureDescriptor_Data_Single.fromPartial(e.single):void 0,n.multi=void 0!==e.multi&&null!==e.multi?t.SignatureDescriptor_Data_Multi.fromPartial(e.multi):void 0,n}},t.SignatureDescriptor_Data_Single={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),0!==e.signature.length&&t.uint32(18).bytes(e.signature),t},decode:function(e,t){for(var n=e instanceof d.Reader?e:new d.Reader(e),a=void 0===t?n.len:n.pos+t,o=m();n.pos>>3){case 1:o.mode=n.int32();break;case 2:o.signature=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{mode:(0,l.isSet)(e.mode)?f(e.mode):0,signature:(0,l.isSet)(e.signature)?(0,l.bytesFromBase64)(e.signature):new Uint8Array}},toJSON:function(e){var t={};return void 0!==e.mode&&(t.mode=p(e.mode)),void 0!==e.signature&&(t.signature=(0,l.base64FromBytes)(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial:function(e){var t,n,a=m();return a.mode=null!==(t=e.mode)&&void 0!==t?t:0,a.signature=null!==(n=e.signature)&&void 0!==n?n:new Uint8Array,a}},t.SignatureDescriptor_Data_Multi={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.Writer.create();void 0!==e.bitarray&&c.CompactBitArray.encode(e.bitarray,n.uint32(10).fork()).ldelim();var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.SignatureDescriptor_Data.encode(i,n.uint32(18).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return n},decode:function(e,n){for(var a=e instanceof d.Reader?e:new d.Reader(e),o=void 0===n?a.len:a.pos+n,r={bitarray:void 0,signatures:[]};a.pos>>3){case 1:r.bitarray=c.CompactBitArray.decode(a,a.uint32());break;case 2:r.signatures.push(t.SignatureDescriptor_Data.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{bitarray:(0,l.isSet)(e.bitarray)?c.CompactBitArray.fromJSON(e.bitarray):void 0,signatures:Array.isArray(null===e||void 0===e?void 0:e.signatures)?e.signatures.map((function(e){return t.SignatureDescriptor_Data.fromJSON(e)})):[]}},toJSON:function(e){var n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?c.CompactBitArray.toJSON(e.bitarray):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return e?t.SignatureDescriptor_Data.toJSON(e):void 0})):n.signatures=[],n},fromPartial:function(e){var n,a={bitarray:void 0,signatures:[]};return a.bitarray=void 0!==e.bitarray&&null!==e.bitarray?c.CompactBitArray.fromPartial(e.bitarray):void 0,a.signatures=(null===(n=e.signatures)||void 0===n?void 0:n.map((function(e){return t.SignatureDescriptor_Data.fromPartial(e)})))||[],a}}},26995:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Fee=t.ModeInfo_Multi=t.ModeInfo_Single=t.ModeInfo=t.SignerInfo=t.AuthInfo=t.TxBody=t.SignDoc=t.TxRaw=t.Tx=t.protobufPackage=void 0;var s=n(90605),c=n(74015),u=n(87538),d=n(88298),l=i(n(80121)),f=n(91421);function p(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}function b(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:"",accountNumber:f.Long.UZERO}}function m(){return{messages:[],memo:"",timeoutHeight:f.Long.UZERO,extensionOptions:[],nonCriticalExtensionOptions:[]}}function h(){return{publicKey:void 0,modeInfo:void 0,sequence:f.Long.UZERO}}function g(){return{amount:[],gasLimit:f.Long.UZERO,payer:"",granter:""}}t.protobufPackage="cosmos.tx.v1beta1",t.Tx={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create();void 0!==e.body&&t.TxBody.encode(e.body,n.uint32(10).fork()).ldelim(),void 0!==e.authInfo&&t.AuthInfo.encode(e.authInfo,n.uint32(18).fork()).ldelim();var o,r=a(e.signatures);try{for(r.s();!(o=r.n()).done;){var i=o.value;n.uint32(26).bytes(i)}}catch(s){r.e(s)}finally{r.f()}return n},decode:function(e,n){for(var a=e instanceof l.Reader?e:new l.Reader(e),o=void 0===n?a.len:a.pos+n,r={body:void 0,authInfo:void 0,signatures:[]};a.pos>>3){case 1:r.body=t.TxBody.decode(a,a.uint32());break;case 2:r.authInfo=t.AuthInfo.decode(a,a.uint32());break;case 3:r.signatures.push(a.bytes());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{body:(0,f.isSet)(e.body)?t.TxBody.fromJSON(e.body):void 0,authInfo:(0,f.isSet)(e.authInfo)?t.AuthInfo.fromJSON(e.authInfo):void 0,signatures:Array.isArray(null===e||void 0===e?void 0:e.signatures)?e.signatures.map((function(e){return(0,f.bytesFromBase64)(e)})):[]}},toJSON:function(e){var n={};return void 0!==e.body&&(n.body=e.body?t.TxBody.toJSON(e.body):void 0),void 0!==e.authInfo&&(n.authInfo=e.authInfo?t.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return(0,f.base64FromBytes)(void 0!==e?e:new Uint8Array)})):n.signatures=[],n},fromPartial:function(e){var n,a={body:void 0,authInfo:void 0,signatures:[]};return a.body=void 0!==e.body&&null!==e.body?t.TxBody.fromPartial(e.body):void 0,a.authInfo=void 0!==e.authInfo&&null!==e.authInfo?t.AuthInfo.fromPartial(e.authInfo):void 0,a.signatures=(null===(n=e.signatures)||void 0===n?void 0:n.map((function(e){return e})))||[],a}},t.TxRaw={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create();0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes);var n,o=a(e.signatures);try{for(o.s();!(n=o.n()).done;){var r=n.value;t.uint32(26).bytes(r)}}catch(i){o.e(i)}finally{o.f()}return t},decode:function(e,t){for(var n=e instanceof l.Reader?e:new l.Reader(e),a=void 0===t?n.len:n.pos+t,o=p();n.pos>>3){case 1:o.bodyBytes=n.bytes();break;case 2:o.authInfoBytes=n.bytes();break;case 3:o.signatures.push(n.bytes());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{bodyBytes:(0,f.isSet)(e.bodyBytes)?(0,f.bytesFromBase64)(e.bodyBytes):new Uint8Array,authInfoBytes:(0,f.isSet)(e.authInfoBytes)?(0,f.bytesFromBase64)(e.authInfoBytes):new Uint8Array,signatures:Array.isArray(null===e||void 0===e?void 0:e.signatures)?e.signatures.map((function(e){return(0,f.bytesFromBase64)(e)})):[]}},toJSON:function(e){var t={};return void 0!==e.bodyBytes&&(t.bodyBytes=(0,f.base64FromBytes)(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=(0,f.base64FromBytes)(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map((function(e){return(0,f.base64FromBytes)(void 0!==e?e:new Uint8Array)})):t.signatures=[],t},fromPartial:function(e){var t,n,a,o=p();return o.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,o.authInfoBytes=null!==(n=e.authInfoBytes)&&void 0!==n?n:new Uint8Array,o.signatures=(null===(a=e.signatures)||void 0===a?void 0:a.map((function(e){return e})))||[],o}},t.SignDoc={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create();return 0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),""!==e.chainId&&t.uint32(26).string(e.chainId),e.accountNumber.isZero()||t.uint32(32).uint64(e.accountNumber),t},decode:function(e,t){for(var n=e instanceof l.Reader?e:new l.Reader(e),a=void 0===t?n.len:n.pos+t,o=b();n.pos>>3){case 1:o.bodyBytes=n.bytes();break;case 2:o.authInfoBytes=n.bytes();break;case 3:o.chainId=n.string();break;case 4:o.accountNumber=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{bodyBytes:(0,f.isSet)(e.bodyBytes)?(0,f.bytesFromBase64)(e.bodyBytes):new Uint8Array,authInfoBytes:(0,f.isSet)(e.authInfoBytes)?(0,f.bytesFromBase64)(e.authInfoBytes):new Uint8Array,chainId:(0,f.isSet)(e.chainId)?String(e.chainId):"",accountNumber:(0,f.isSet)(e.accountNumber)?f.Long.fromValue(e.accountNumber):f.Long.UZERO}},toJSON:function(e){var t={};return void 0!==e.bodyBytes&&(t.bodyBytes=(0,f.base64FromBytes)(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=(0,f.base64FromBytes)(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||f.Long.UZERO).toString()),t},fromPartial:function(e){var t,n,a,o=b();return o.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,o.authInfoBytes=null!==(n=e.authInfoBytes)&&void 0!==n?n:new Uint8Array,o.chainId=null!==(a=e.chainId)&&void 0!==a?a:"",o.accountNumber=void 0!==e.accountNumber&&null!==e.accountNumber?f.Long.fromValue(e.accountNumber):f.Long.UZERO,o}},t.TxBody={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create(),o=a(e.messages);try{for(o.s();!(t=o.n()).done;){var r=t.value;s.Any.encode(r,n.uint32(10).fork()).ldelim()}}catch(b){o.e(b)}finally{o.f()}""!==e.memo&&n.uint32(18).string(e.memo),e.timeoutHeight.isZero()||n.uint32(24).uint64(e.timeoutHeight);var i,c=a(e.extensionOptions);try{for(c.s();!(i=c.n()).done;){var u=i.value;s.Any.encode(u,n.uint32(8186).fork()).ldelim()}}catch(b){c.e(b)}finally{c.f()}var d,f=a(e.nonCriticalExtensionOptions);try{for(f.s();!(d=f.n()).done;){var p=d.value;s.Any.encode(p,n.uint32(16378).fork()).ldelim()}}catch(b){f.e(b)}finally{f.f()}return n},decode:function(e,t){for(var n=e instanceof l.Reader?e:new l.Reader(e),a=void 0===t?n.len:n.pos+t,o=m();n.pos>>3){case 1:o.messages.push(s.Any.decode(n,n.uint32()));break;case 2:o.memo=n.string();break;case 3:o.timeoutHeight=n.uint64();break;case 1023:o.extensionOptions.push(s.Any.decode(n,n.uint32()));break;case 2047:o.nonCriticalExtensionOptions.push(s.Any.decode(n,n.uint32()));break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{messages:Array.isArray(null===e||void 0===e?void 0:e.messages)?e.messages.map((function(e){return s.Any.fromJSON(e)})):[],memo:(0,f.isSet)(e.memo)?String(e.memo):"",timeoutHeight:(0,f.isSet)(e.timeoutHeight)?f.Long.fromValue(e.timeoutHeight):f.Long.UZERO,extensionOptions:Array.isArray(null===e||void 0===e?void 0:e.extensionOptions)?e.extensionOptions.map((function(e){return s.Any.fromJSON(e)})):[],nonCriticalExtensionOptions:Array.isArray(null===e||void 0===e?void 0:e.nonCriticalExtensionOptions)?e.nonCriticalExtensionOptions.map((function(e){return s.Any.fromJSON(e)})):[]}},toJSON:function(e){var t={};return e.messages?t.messages=e.messages.map((function(e){return e?s.Any.toJSON(e):void 0})):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=(e.timeoutHeight||f.Long.UZERO).toString()),e.extensionOptions?t.extensionOptions=e.extensionOptions.map((function(e){return e?s.Any.toJSON(e):void 0})):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map((function(e){return e?s.Any.toJSON(e):void 0})):t.nonCriticalExtensionOptions=[],t},fromPartial:function(e){var t,n,a,o,r=m();return r.messages=(null===(t=e.messages)||void 0===t?void 0:t.map((function(e){return s.Any.fromPartial(e)})))||[],r.memo=null!==(n=e.memo)&&void 0!==n?n:"",r.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?f.Long.fromValue(e.timeoutHeight):f.Long.UZERO,r.extensionOptions=(null===(a=e.extensionOptions)||void 0===a?void 0:a.map((function(e){return s.Any.fromPartial(e)})))||[],r.nonCriticalExtensionOptions=(null===(o=e.nonCriticalExtensionOptions)||void 0===o?void 0:o.map((function(e){return s.Any.fromPartial(e)})))||[],r}},t.AuthInfo={encode:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create(),r=a(e.signerInfos);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.SignerInfo.encode(i,o.uint32(10).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return void 0!==e.fee&&t.Fee.encode(e.fee,o.uint32(18).fork()).ldelim(),o},decode:function(e,n){for(var a=e instanceof l.Reader?e:new l.Reader(e),o=void 0===n?a.len:a.pos+n,r={signerInfos:[],fee:void 0};a.pos>>3){case 1:r.signerInfos.push(t.SignerInfo.decode(a,a.uint32()));break;case 2:r.fee=t.Fee.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{signerInfos:Array.isArray(null===e||void 0===e?void 0:e.signerInfos)?e.signerInfos.map((function(e){return t.SignerInfo.fromJSON(e)})):[],fee:(0,f.isSet)(e.fee)?t.Fee.fromJSON(e.fee):void 0}},toJSON:function(e){var n={};return e.signerInfos?n.signerInfos=e.signerInfos.map((function(e){return e?t.SignerInfo.toJSON(e):void 0})):n.signerInfos=[],void 0!==e.fee&&(n.fee=e.fee?t.Fee.toJSON(e.fee):void 0),n},fromPartial:function(e){var n,a={signerInfos:[],fee:void 0};return a.signerInfos=(null===(n=e.signerInfos)||void 0===n?void 0:n.map((function(e){return t.SignerInfo.fromPartial(e)})))||[],a.fee=void 0!==e.fee&&null!==e.fee?t.Fee.fromPartial(e.fee):void 0,a}},t.SignerInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create();return void 0!==e.publicKey&&s.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&t.ModeInfo.encode(e.modeInfo,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n},decode:function(e,n){for(var a=e instanceof l.Reader?e:new l.Reader(e),o=void 0===n?a.len:a.pos+n,r=h();a.pos>>3){case 1:r.publicKey=s.Any.decode(a,a.uint32());break;case 2:r.modeInfo=t.ModeInfo.decode(a,a.uint32());break;case 3:r.sequence=a.uint64();break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{publicKey:(0,f.isSet)(e.publicKey)?s.Any.fromJSON(e.publicKey):void 0,modeInfo:(0,f.isSet)(e.modeInfo)?t.ModeInfo.fromJSON(e.modeInfo):void 0,sequence:(0,f.isSet)(e.sequence)?f.Long.fromValue(e.sequence):f.Long.UZERO}},toJSON:function(e){var n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?s.Any.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(n.modeInfo=e.modeInfo?t.ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||f.Long.UZERO).toString()),n},fromPartial:function(e){var n=h();return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?s.Any.fromPartial(e.publicKey):void 0,n.modeInfo=void 0!==e.modeInfo&&null!==e.modeInfo?t.ModeInfo.fromPartial(e.modeInfo):void 0,n.sequence=void 0!==e.sequence&&null!==e.sequence?f.Long.fromValue(e.sequence):f.Long.UZERO,n}},t.ModeInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create();return void 0!==e.single&&t.ModeInfo_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.ModeInfo_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof l.Reader?e:new l.Reader(e),o=void 0===n?a.len:a.pos+n,r={single:void 0,multi:void 0};a.pos>>3){case 1:r.single=t.ModeInfo_Single.decode(a,a.uint32());break;case 2:r.multi=t.ModeInfo_Multi.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{single:(0,f.isSet)(e.single)?t.ModeInfo_Single.fromJSON(e.single):void 0,multi:(0,f.isSet)(e.multi)?t.ModeInfo_Multi.fromJSON(e.multi):void 0}},toJSON:function(e){var n={};return void 0!==e.single&&(n.single=e.single?t.ModeInfo_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.ModeInfo_Multi.toJSON(e.multi):void 0),n},fromPartial:function(e){var n={single:void 0,multi:void 0};return n.single=void 0!==e.single&&null!==e.single?t.ModeInfo_Single.fromPartial(e.single):void 0,n.multi=void 0!==e.multi&&null!==e.multi?t.ModeInfo_Multi.fromPartial(e.multi):void 0,n}},t.ModeInfo_Single={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),t},decode:function(e,t){for(var n=e instanceof l.Reader?e:new l.Reader(e),a=void 0===t?n.len:n.pos+t,o={mode:0};n.pos>>3===1)o.mode=n.int32();else n.skipType(7&r)}return o},fromJSON:function(e){return{mode:(0,f.isSet)(e.mode)?(0,c.signModeFromJSON)(e.mode):0}},toJSON:function(e){var t={};return void 0!==e.mode&&(t.mode=(0,c.signModeToJSON)(e.mode)),t},fromPartial:function(e){var t,n={mode:0};return n.mode=null!==(t=e.mode)&&void 0!==t?t:0,n}},t.ModeInfo_Multi={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create();void 0!==e.bitarray&&u.CompactBitArray.encode(e.bitarray,n.uint32(10).fork()).ldelim();var o,r=a(e.modeInfos);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.ModeInfo.encode(i,n.uint32(18).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return n},decode:function(e,n){for(var a=e instanceof l.Reader?e:new l.Reader(e),o=void 0===n?a.len:a.pos+n,r={bitarray:void 0,modeInfos:[]};a.pos>>3){case 1:r.bitarray=u.CompactBitArray.decode(a,a.uint32());break;case 2:r.modeInfos.push(t.ModeInfo.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{bitarray:(0,f.isSet)(e.bitarray)?u.CompactBitArray.fromJSON(e.bitarray):void 0,modeInfos:Array.isArray(null===e||void 0===e?void 0:e.modeInfos)?e.modeInfos.map((function(e){return t.ModeInfo.fromJSON(e)})):[]}},toJSON:function(e){var n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?u.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?n.modeInfos=e.modeInfos.map((function(e){return e?t.ModeInfo.toJSON(e):void 0})):n.modeInfos=[],n},fromPartial:function(e){var n,a={bitarray:void 0,modeInfos:[]};return a.bitarray=void 0!==e.bitarray&&null!==e.bitarray?u.CompactBitArray.fromPartial(e.bitarray):void 0,a.modeInfos=(null===(n=e.modeInfos)||void 0===n?void 0:n.map((function(e){return t.ModeInfo.fromPartial(e)})))||[],a}},t.Fee={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create(),o=a(e.amount);try{for(o.s();!(t=o.n()).done;){var r=t.value;d.Coin.encode(r,n.uint32(10).fork()).ldelim()}}catch(i){o.e(i)}finally{o.f()}return e.gasLimit.isZero()||n.uint32(16).uint64(e.gasLimit),""!==e.payer&&n.uint32(26).string(e.payer),""!==e.granter&&n.uint32(34).string(e.granter),n},decode:function(e,t){for(var n=e instanceof l.Reader?e:new l.Reader(e),a=void 0===t?n.len:n.pos+t,o=g();n.pos>>3){case 1:o.amount.push(d.Coin.decode(n,n.uint32()));break;case 2:o.gasLimit=n.uint64();break;case 3:o.payer=n.string();break;case 4:o.granter=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{amount:Array.isArray(null===e||void 0===e?void 0:e.amount)?e.amount.map((function(e){return d.Coin.fromJSON(e)})):[],gasLimit:(0,f.isSet)(e.gasLimit)?f.Long.fromValue(e.gasLimit):f.Long.UZERO,payer:(0,f.isSet)(e.payer)?String(e.payer):"",granter:(0,f.isSet)(e.granter)?String(e.granter):""}},toJSON:function(e){var t={};return e.amount?t.amount=e.amount.map((function(e){return e?d.Coin.toJSON(e):void 0})):t.amount=[],void 0!==e.gasLimit&&(t.gasLimit=(e.gasLimit||f.Long.UZERO).toString()),void 0!==e.payer&&(t.payer=e.payer),void 0!==e.granter&&(t.granter=e.granter),t},fromPartial:function(e){var t,n,a,o=g();return o.amount=(null===(t=e.amount)||void 0===t?void 0:t.map((function(e){return d.Coin.fromPartial(e)})))||[],o.gasLimit=void 0!==e.gasLimit&&null!==e.gasLimit?f.Long.fromValue(e.gasLimit):f.Long.UZERO,o.payer=null!==(n=e.payer)&&void 0!==n?n:"",o.granter=null!==(a=e.granter)&&void 0!==a?a:"",o}}},72210:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleVersion=t.CancelSoftwareUpgradeProposal=t.SoftwareUpgradeProposal=t.Plan=t.protobufPackage=void 0;var i=n(61406),s=n(90605),c=n(91421),u=r(n(80121));function d(){return{name:"",time:void 0,height:c.Long.ZERO,info:"",upgradedClientState:void 0}}function l(){return{name:"",version:c.Long.UZERO}}t.protobufPackage="cosmos.upgrade.v1beta1",t.Plan={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),void 0!==e.time&&i.Timestamp.encode(e.time,t.uint32(18).fork()).ldelim(),e.height.isZero()||t.uint32(24).int64(e.height),""!==e.info&&t.uint32(34).string(e.info),void 0!==e.upgradedClientState&&s.Any.encode(e.upgradedClientState,t.uint32(42).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof u.Reader?e:new u.Reader(e),a=void 0===t?n.len:n.pos+t,o=d();n.pos>>3){case 1:o.name=n.string();break;case 2:o.time=i.Timestamp.decode(n,n.uint32());break;case 3:o.height=n.int64();break;case 4:o.info=n.string();break;case 5:o.upgradedClientState=s.Any.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{name:(0,c.isSet)(e.name)?String(e.name):"",time:(0,c.isSet)(e.time)?(0,c.fromJsonTimestamp)(e.time):void 0,height:(0,c.isSet)(e.height)?c.Long.fromValue(e.height):c.Long.ZERO,info:(0,c.isSet)(e.info)?String(e.info):"",upgradedClientState:(0,c.isSet)(e.upgradedClientState)?s.Any.fromJSON(e.upgradedClientState):void 0}},toJSON:function(e){var t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.time&&(t.time=(0,c.fromTimestamp)(e.time).toISOString()),void 0!==e.height&&(t.height=(e.height||c.Long.ZERO).toString()),void 0!==e.info&&(t.info=e.info),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?s.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial:function(e){var t,n,a=d();return a.name=null!==(t=e.name)&&void 0!==t?t:"",a.time=void 0!==e.time&&null!==e.time?i.Timestamp.fromPartial(e.time):void 0,a.height=void 0!==e.height&&null!==e.height?c.Long.fromValue(e.height):c.Long.ZERO,a.info=null!==(n=e.info)&&void 0!==n?n:"",a.upgradedClientState=void 0!==e.upgradedClientState&&null!==e.upgradedClientState?s.Any.fromPartial(e.upgradedClientState):void 0,a}},t.SoftwareUpgradeProposal={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Writer.create();return""!==e.title&&n.uint32(10).string(e.title),""!==e.description&&n.uint32(18).string(e.description),void 0!==e.plan&&t.Plan.encode(e.plan,n.uint32(26).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof u.Reader?e:new u.Reader(e),o=void 0===n?a.len:a.pos+n,r={title:"",description:"",plan:void 0};a.pos>>3){case 1:r.title=a.string();break;case 2:r.description=a.string();break;case 3:r.plan=t.Plan.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{title:(0,c.isSet)(e.title)?String(e.title):"",description:(0,c.isSet)(e.description)?String(e.description):"",plan:(0,c.isSet)(e.plan)?t.Plan.fromJSON(e.plan):void 0}},toJSON:function(e){var n={};return void 0!==e.title&&(n.title=e.title),void 0!==e.description&&(n.description=e.description),void 0!==e.plan&&(n.plan=e.plan?t.Plan.toJSON(e.plan):void 0),n},fromPartial:function(e){var n,a,o={title:"",description:"",plan:void 0};return o.title=null!==(n=e.title)&&void 0!==n?n:"",o.description=null!==(a=e.description)&&void 0!==a?a:"",o.plan=void 0!==e.plan&&null!==e.plan?t.Plan.fromPartial(e.plan):void 0,o}},t.CancelSoftwareUpgradeProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode:function(e,t){for(var n=e instanceof u.Reader?e:new u.Reader(e),a=void 0===t?n.len:n.pos+t,o={title:"",description:""};n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{title:(0,c.isSet)(e.title)?String(e.title):"",description:(0,c.isSet)(e.description)?String(e.description):""}},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial:function(e){var t,n,a={title:"",description:""};return a.title=null!==(t=e.title)&&void 0!==t?t:"",a.description=null!==(n=e.description)&&void 0!==n?n:"",a}},t.ModuleVersion={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),e.version.isZero()||t.uint32(16).uint64(e.version),t},decode:function(e,t){for(var n=e instanceof u.Reader?e:new u.Reader(e),a=void 0===t?n.len:n.pos+t,o=l();n.pos>>3){case 1:o.name=n.string();break;case 2:o.version=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{name:(0,c.isSet)(e.name)?String(e.name):"",version:(0,c.isSet)(e.version)?c.Long.fromValue(e.version):c.Long.UZERO}},toJSON:function(e){var t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.version&&(t.version=(e.version||c.Long.UZERO).toString()),t},fromPartial:function(e){var t,n=l();return n.name=null!==(t=e.name)&&void 0!==t?t:"",n.version=void 0!==e.version&&null!==e.version?c.Long.fromValue(e.version):c.Long.UZERO,n}}},90605:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Any=t.protobufPackage=void 0;var i=r(n(80121)),s=n(91421);function c(){return{typeUrl:"",value:new Uint8Array}}t.protobufPackage="google.protobuf",t.Any={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Writer.create();return""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode:function(e,t){for(var n=e instanceof i.Reader?e:new i.Reader(e),a=void 0===t?n.len:n.pos+t,o=c();n.pos>>3){case 1:o.typeUrl=n.string();break;case 2:o.value=n.bytes();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{typeUrl:(0,s.isSet)(e.typeUrl)?String(e.typeUrl):"",value:(0,s.isSet)(e.value)?(0,s.bytesFromBase64)(e.value):new Uint8Array}},toJSON:function(e){var t={};return void 0!==e.typeUrl&&(t.typeUrl=e.typeUrl),void 0!==e.value&&(t.value=(0,s.base64FromBytes)(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial:function(e){var t,n,a=c();return a.typeUrl=null!==(t=e.typeUrl)&&void 0!==t?t:"",a.value=null!==(n=e.value)&&void 0!==n?n:new Uint8Array,a}}},61406:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=t.protobufPackage=void 0;var i=n(91421),s=r(n(80121));function c(){return{seconds:i.Long.ZERO,nanos:0}}t.protobufPackage="google.protobuf",t.Timestamp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.Writer.create();return e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode:function(e,t){for(var n=e instanceof s.Reader?e:new s.Reader(e),a=void 0===t?n.len:n.pos+t,o=c();n.pos>>3){case 1:o.seconds=n.int64();break;case 2:o.nanos=n.int32();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{seconds:(0,i.isSet)(e.seconds)?i.Long.fromValue(e.seconds):i.Long.ZERO,nanos:(0,i.isSet)(e.nanos)?Number(e.nanos):0}},toJSON:function(e){var t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||i.Long.ZERO).toString()),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial:function(e){var t,n=c();return n.seconds=void 0!==e.seconds&&null!==e.seconds?i.Long.fromValue(e.seconds):i.Long.ZERO,n.nanos=null!==(t=e.nanos)&&void 0!==t?t:0,n}}},91421:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.fromJsonTimestamp=t.fromTimestamp=t.toTimestamp=t.setPaginationParams=t.isObject=t.isSet=t.fromDuration=t.toDuration=t.omitDefault=t.base64FromBytes=t.bytesFromBase64=t.Long=void 0;var c=i(n(80121)),u=s(n(29600));t.Long=u.default,c.util.Long!==u.default&&(c.util.Long=u.default,c.configure());var d=function(){if("undefined"!==typeof d)return d;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw"Unable to locate global object"}(),l=d.atob||function(e){return d.Buffer.from(e,"base64").toString("binary")};t.bytesFromBase64=function(e){for(var t=l(e),n=new Uint8Array(t.length),a=0;a1&&void 0!==arguments[1]?arguments[1]:l.Writer.create();return""!==e.sourcePort&&t.uint32(10).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(18).string(e.sourceChannel),void 0!==e.token&&c.Coin.encode(e.token,t.uint32(26).fork()).ldelim(),""!==e.sender&&t.uint32(34).string(e.sender),""!==e.receiver&&t.uint32(42).string(e.receiver),void 0!==e.timeoutHeight&&u.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),e.timeoutTimestamp.isZero()||t.uint32(56).uint64(e.timeoutTimestamp),""!==e.memo&&t.uint32(66).string(e.memo),t},decode:function(e,t){for(var n=e instanceof l.Reader?e:new l.Reader(e),a=void 0===t?n.len:n.pos+t,o=f();n.pos>>3){case 1:o.sourcePort=n.string();break;case 2:o.sourceChannel=n.string();break;case 3:o.token=c.Coin.decode(n,n.uint32());break;case 4:o.sender=n.string();break;case 5:o.receiver=n.string();break;case 6:o.timeoutHeight=u.Height.decode(n,n.uint32());break;case 7:o.timeoutTimestamp=n.uint64();break;case 8:o.memo=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{sourcePort:(0,d.isSet)(e.sourcePort)?String(e.sourcePort):"",sourceChannel:(0,d.isSet)(e.sourceChannel)?String(e.sourceChannel):"",token:(0,d.isSet)(e.token)?c.Coin.fromJSON(e.token):void 0,sender:(0,d.isSet)(e.sender)?String(e.sender):"",receiver:(0,d.isSet)(e.receiver)?String(e.receiver):"",timeoutHeight:(0,d.isSet)(e.timeoutHeight)?u.Height.fromJSON(e.timeoutHeight):void 0,timeoutTimestamp:(0,d.isSet)(e.timeoutTimestamp)?d.Long.fromValue(e.timeoutTimestamp):d.Long.UZERO,memo:(0,d.isSet)(e.memo)?String(e.memo):""}},toJSON:function(e){var t={};return void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.token&&(t.token=e.token?c.Coin.toJSON(e.token):void 0),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.receiver&&(t.receiver=e.receiver),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?u.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||d.Long.UZERO).toString()),void 0!==e.memo&&(t.memo=e.memo),t},fromPartial:function(e){var t,n,a,o,r,i=f();return i.sourcePort=null!==(t=e.sourcePort)&&void 0!==t?t:"",i.sourceChannel=null!==(n=e.sourceChannel)&&void 0!==n?n:"",i.token=void 0!==e.token&&null!==e.token?c.Coin.fromPartial(e.token):void 0,i.sender=null!==(a=e.sender)&&void 0!==a?a:"",i.receiver=null!==(o=e.receiver)&&void 0!==o?o:"",i.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?u.Height.fromPartial(e.timeoutHeight):void 0,i.timeoutTimestamp=void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?d.Long.fromValue(e.timeoutTimestamp):d.Long.UZERO,i.memo=null!==(r=e.memo)&&void 0!==r?r:"",i}},t.MsgTransferResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.Writer.create();return e.sequence.isZero()||t.uint32(8).uint64(e.sequence),t},decode:function(e,t){for(var n=e instanceof l.Reader?e:new l.Reader(e),a=void 0===t?n.len:n.pos+t,o=p();n.pos>>3===1)o.sequence=n.uint64();else n.skipType(7&r)}return o},fromJSON:function(e){return{sequence:(0,d.isSet)(e.sequence)?d.Long.fromValue(e.sequence):d.Long.UZERO}},toJSON:function(e){var t={};return void 0!==e.sequence&&(t.sequence=(e.sequence||d.Long.UZERO).toString()),t},fromPartial:function(e){var t=p();return t.sequence=void 0!==e.sequence&&null!==e.sequence?d.Long.fromValue(e.sequence):d.Long.UZERO,t}};var b=function(){function e(t){a(this,e),this.rpc=t,this.Transfer=this.Transfer.bind(this)}return o(e,[{key:"Transfer",value:function(e){var n=t.MsgTransfer.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Msg","Transfer",n).then((function(e){return t.MsgTransferResponse.decode(new l.Reader(e))}))}}]),e}();t.MsgClientImpl=b},43385:function(e,t,n){"use strict";var a=n(74704).default,o=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Height=t.UpgradeProposal=t.ClientUpdateProposal=t.ClientConsensusStates=t.ConsensusStateWithHeight=t.IdentifiedClientState=t.protobufPackage=void 0;var s=n(90605),c=n(72210),u=i(n(80121)),d=n(91421);function l(){return{revisionNumber:d.Long.UZERO,revisionHeight:d.Long.UZERO}}t.protobufPackage="ibc.core.client.v1",t.IdentifiedClientState={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Writer.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&s.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof u.Reader?e:new u.Reader(e),a=void 0===t?n.len:n.pos+t,o={clientId:"",clientState:void 0};n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.clientState=s.Any.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{clientId:(0,d.isSet)(e.clientId)?String(e.clientId):"",clientState:(0,d.isSet)(e.clientState)?s.Any.fromJSON(e.clientState):void 0}},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?s.Any.toJSON(e.clientState):void 0),t},fromPartial:function(e){var t,n={clientId:"",clientState:void 0};return n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n.clientState=void 0!==e.clientState&&null!==e.clientState?s.Any.fromPartial(e.clientState):void 0,n}},t.ConsensusStateWithHeight={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Writer.create();return void 0!==e.height&&t.Height.encode(e.height,n.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&s.Any.encode(e.consensusState,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var a=e instanceof u.Reader?e:new u.Reader(e),o=void 0===n?a.len:a.pos+n,r={height:void 0,consensusState:void 0};a.pos>>3){case 1:r.height=t.Height.decode(a,a.uint32());break;case 2:r.consensusState=s.Any.decode(a,a.uint32());break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{height:(0,d.isSet)(e.height)?t.Height.fromJSON(e.height):void 0,consensusState:(0,d.isSet)(e.consensusState)?s.Any.fromJSON(e.consensusState):void 0}},toJSON:function(e){var n={};return void 0!==e.height&&(n.height=e.height?t.Height.toJSON(e.height):void 0),void 0!==e.consensusState&&(n.consensusState=e.consensusState?s.Any.toJSON(e.consensusState):void 0),n},fromPartial:function(e){var n={height:void 0,consensusState:void 0};return n.height=void 0!==e.height&&null!==e.height?t.Height.fromPartial(e.height):void 0,n.consensusState=void 0!==e.consensusState&&null!==e.consensusState?s.Any.fromPartial(e.consensusState):void 0,n}},t.ClientConsensusStates={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Writer.create();""!==e.clientId&&n.uint32(10).string(e.clientId);var o,r=a(e.consensusStates);try{for(r.s();!(o=r.n()).done;){var i=o.value;t.ConsensusStateWithHeight.encode(i,n.uint32(18).fork()).ldelim()}}catch(s){r.e(s)}finally{r.f()}return n},decode:function(e,n){for(var a=e instanceof u.Reader?e:new u.Reader(e),o=void 0===n?a.len:a.pos+n,r={clientId:"",consensusStates:[]};a.pos>>3){case 1:r.clientId=a.string();break;case 2:r.consensusStates.push(t.ConsensusStateWithHeight.decode(a,a.uint32()));break;default:a.skipType(7&i)}}return r},fromJSON:function(e){return{clientId:(0,d.isSet)(e.clientId)?String(e.clientId):"",consensusStates:Array.isArray(null===e||void 0===e?void 0:e.consensusStates)?e.consensusStates.map((function(e){return t.ConsensusStateWithHeight.fromJSON(e)})):[]}},toJSON:function(e){var n={};return void 0!==e.clientId&&(n.clientId=e.clientId),e.consensusStates?n.consensusStates=e.consensusStates.map((function(e){return e?t.ConsensusStateWithHeight.toJSON(e):void 0})):n.consensusStates=[],n},fromPartial:function(e){var n,a,o={clientId:"",consensusStates:[]};return o.clientId=null!==(n=e.clientId)&&void 0!==n?n:"",o.consensusStates=(null===(a=e.consensusStates)||void 0===a?void 0:a.map((function(e){return t.ConsensusStateWithHeight.fromPartial(e)})))||[],o}},t.ClientUpdateProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.subjectClientId&&t.uint32(26).string(e.subjectClientId),""!==e.substituteClientId&&t.uint32(34).string(e.substituteClientId),t},decode:function(e,t){for(var n=e instanceof u.Reader?e:new u.Reader(e),a=void 0===t?n.len:n.pos+t,o={title:"",description:"",subjectClientId:"",substituteClientId:""};n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.subjectClientId=n.string();break;case 4:o.substituteClientId=n.string();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{title:(0,d.isSet)(e.title)?String(e.title):"",description:(0,d.isSet)(e.description)?String(e.description):"",subjectClientId:(0,d.isSet)(e.subjectClientId)?String(e.subjectClientId):"",substituteClientId:(0,d.isSet)(e.substituteClientId)?String(e.substituteClientId):""}},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.subjectClientId&&(t.subjectClientId=e.subjectClientId),void 0!==e.substituteClientId&&(t.substituteClientId=e.substituteClientId),t},fromPartial:function(e){var t,n,a,o,r={title:"",description:"",subjectClientId:"",substituteClientId:""};return r.title=null!==(t=e.title)&&void 0!==t?t:"",r.description=null!==(n=e.description)&&void 0!==n?n:"",r.subjectClientId=null!==(a=e.subjectClientId)&&void 0!==a?a:"",r.substituteClientId=null!==(o=e.substituteClientId)&&void 0!==o?o:"",r}},t.UpgradeProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),void 0!==e.plan&&c.Plan.encode(e.plan,t.uint32(26).fork()).ldelim(),void 0!==e.upgradedClientState&&s.Any.encode(e.upgradedClientState,t.uint32(34).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof u.Reader?e:new u.Reader(e),a=void 0===t?n.len:n.pos+t,o={title:"",description:"",plan:void 0,upgradedClientState:void 0};n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.plan=c.Plan.decode(n,n.uint32());break;case 4:o.upgradedClientState=s.Any.decode(n,n.uint32());break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{title:(0,d.isSet)(e.title)?String(e.title):"",description:(0,d.isSet)(e.description)?String(e.description):"",plan:(0,d.isSet)(e.plan)?c.Plan.fromJSON(e.plan):void 0,upgradedClientState:(0,d.isSet)(e.upgradedClientState)?s.Any.fromJSON(e.upgradedClientState):void 0}},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.plan&&(t.plan=e.plan?c.Plan.toJSON(e.plan):void 0),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?s.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial:function(e){var t,n,a={title:"",description:"",plan:void 0,upgradedClientState:void 0};return a.title=null!==(t=e.title)&&void 0!==t?t:"",a.description=null!==(n=e.description)&&void 0!==n?n:"",a.plan=void 0!==e.plan&&null!==e.plan?c.Plan.fromPartial(e.plan):void 0,a.upgradedClientState=void 0!==e.upgradedClientState&&null!==e.upgradedClientState?s.Any.fromPartial(e.upgradedClientState):void 0,a}},t.Height={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Writer.create();return e.revisionNumber.isZero()||t.uint32(8).uint64(e.revisionNumber),e.revisionHeight.isZero()||t.uint32(16).uint64(e.revisionHeight),t},decode:function(e,t){for(var n=e instanceof u.Reader?e:new u.Reader(e),a=void 0===t?n.len:n.pos+t,o=l();n.pos>>3){case 1:o.revisionNumber=n.uint64();break;case 2:o.revisionHeight=n.uint64();break;default:n.skipType(7&r)}}return o},fromJSON:function(e){return{revisionNumber:(0,d.isSet)(e.revisionNumber)?d.Long.fromValue(e.revisionNumber):d.Long.UZERO,revisionHeight:(0,d.isSet)(e.revisionHeight)?d.Long.fromValue(e.revisionHeight):d.Long.UZERO}},toJSON:function(e){var t={};return void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||d.Long.UZERO).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||d.Long.UZERO).toString()),t},fromPartial:function(e){var t=l();return t.revisionNumber=void 0!==e.revisionNumber&&null!==e.revisionNumber?d.Long.fromValue(e.revisionNumber):d.Long.UZERO,t.revisionHeight=void 0!==e.revisionHeight&&null!==e.revisionHeight?d.Long.fromValue(e.revisionHeight):d.Long.UZERO,t}},t.Params={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Writer.create(),o=a(e.allowedClients);try{for(o.s();!(t=o.n()).done;){var r=t.value;n.uint32(10).string(r)}}catch(i){o.e(i)}finally{o.f()}return n},decode:function(e,t){for(var n=e instanceof u.Reader?e:new u.Reader(e),a=void 0===t?n.len:n.pos+t,o={allowedClients:[]};n.pos>>3===1)o.allowedClients.push(n.string());else n.skipType(7&r)}return o},fromJSON:function(e){return{allowedClients:Array.isArray(null===e||void 0===e?void 0:e.allowedClients)?e.allowedClients.map((function(e){return String(e)})):[]}},toJSON:function(e){var t={};return e.allowedClients?t.allowedClients=e.allowedClients.map((function(e){return e})):t.allowedClients=[],t},fromPartial:function(e){var t,n={allowedClients:[]};return n.allowedClients=(null===(t=e.allowedClients)||void 0===t?void 0:t.map((function(e){return e})))||[],n}}},3856:function(e,t){var n;n=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!==typeof Int32Array?new Int32Array(t):t}(),n=function(e){var t=0,n=0,a=0,o="undefined"!==typeof Int32Array?new Int32Array(4096):new Array(4096);for(a=0;256!=a;++a)o[a]=e[a];for(a=0;256!=a;++a)for(n=e[a],t=256+a;t<4096;t+=256)n=o[t]=n>>>8^e[255&n];var r=[];for(a=1;16!=a;++a)r[a-1]="undefined"!==typeof Int32Array?o.subarray(256*a,256*a+256):o.slice(256*a,256*a+256);return r}(t),a=n[0],o=n[1],r=n[2],i=n[3],s=n[4],c=n[5],u=n[6],d=n[7],l=n[8],f=n[9],p=n[10],b=n[11],m=n[12],h=n[13],g=n[14];e.table=t,e.bstr=function(e,n){for(var a=-1^n,o=0,r=e.length;o>>8^t[255&(a^e.charCodeAt(o++))];return~a},e.buf=function(e,n){for(var y=-1^n,v=e.length-15,w=0;w>8&255]^m[e[w++]^y>>16&255]^b[e[w++]^y>>>24]^p[e[w++]]^f[e[w++]]^l[e[w++]]^d[e[w++]]^u[e[w++]]^c[e[w++]]^s[e[w++]]^i[e[w++]]^r[e[w++]]^o[e[w++]]^a[e[w++]]^t[e[w++]];for(v+=15;w>>8^t[255&(y^e[w++])];return~y},e.str=function(e,n){for(var a=-1^n,o=0,r=e.length,i=0,s=0;o>>8^t[255&(a^i)]:i<2048?a=(a=a>>>8^t[255&(a^(192|i>>6&31))])>>>8^t[255&(a^(128|63&i))]:i>=55296&&i<57344?(i=64+(1023&i),s=1023&e.charCodeAt(o++),a=(a=(a=(a=a>>>8^t[255&(a^(240|i>>8&7))])>>>8^t[255&(a^(128|i>>2&63))])>>>8^t[255&(a^(128|s>>6&15|(3&i)<<4))])>>>8^t[255&(a^(128|63&s))]):a=(a=(a=a>>>8^t[255&(a^(224|i>>12&15))])>>>8^t[255&(a^(128|i>>6&63))])>>>8^t[255&(a^(128|63&i))];return~a}},"undefined"===typeof DO_NOT_EXPORT_CRC?n(t):n({})},94365:function(e,t,n){var a=n(54659).Buffer,o=n(69205),r=n(58791);e.exports=function(e){return new s(e)};var i={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=i[e],this.curveType||(this.curveType={name:e}),this.curve=new o.ec(this.curveType.name),this.keys=void 0}function c(e,t,n){Array.isArray(e)||(e=e.toArray());var o=new a(e);if(n&&o.length=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(e,t,n){var a=s(e,n);return n-1>=t&&(a|=s(e,n-1)<<4),a}function u(e,t,n,a){for(var o=0,r=Math.min(e.length,n),i=t;i=49?s-49+10:s>=17?s-17+10:s}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"===typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=i<>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a=t;a-=2)o=c(e,t,a)<=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;else for(a=(e.length-t)%2===0?t+1:t;a=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,o=1;o<=67108863;o*=t)a++;a--,o=o/t|0;for(var r=e.length-n,i=r%a,s=Math.min(r,r-i)+n,c=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var a=e.length+t.length|0;n.length=a,a=a-1|0;var o=0|e.words[0],r=0|t.words[0],i=o*r,s=67108863&i,c=i/67108864|0;n.words[0]=s;for(var u=1;u>>26,l=67108863&c,f=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=f;p++){var b=u-p|0;d+=(i=(o=0|e.words[b])*(r=0|t.words[p])+l)/67108864|0,l=67108863&i}n.words[u]=0|l,c=0|d}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,i=0;i>>24-o&16777215)||i!==this.length-1?d[6-c.length]+c+n:c+n,(o+=2)>=26&&(o-=26,i--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=l[e],p=f[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var m=b.modn(p).toString(e);n=(b=b.idivn(p)).isZero()?m+n:d[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return a("undefined"!==typeof i),this.toArrayLike(i,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);a(o<=r,"byte array longer than desired length"),a(r>0,"Requested array length <= 0"),this.strip();var i,s,c="le"===t,u=new e(r),d=this.clone();if(c){for(s=0;!d.isZero();s++)i=d.andln(255),d.iushrn(8),u[s]=i;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;ae.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){a("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){a("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,a=e):(n=e,a=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,a,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,a=e):(n=e,a=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,p=0|i[1],b=8191&p,m=p>>>13,h=0|i[2],g=8191&h,y=h>>>13,v=0|i[3],w=8191&v,k=v>>>13,A=0|i[4],x=8191&A,I=A>>>13,T=0|i[5],S=8191&T,C=T>>>13,E=0|i[6],R=8191&E,M=E>>>13,P=0|i[7],U=8191&P,_=P>>>13,B=0|i[8],D=8191&B,N=B>>>13,O=0|i[9],F=8191&O,L=O>>>13,j=0|s[0],H=8191&j,G=j>>>13,z=0|s[1],K=8191&z,W=z>>>13,Z=0|s[2],V=8191&Z,q=Z>>>13,Q=0|s[3],J=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,ae=te>>>13,oe=0|s[6],re=8191&oe,ie=oe>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,de=0|s[8],le=8191&de,fe=de>>>13,pe=0|s[9],be=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var he=(u+(a=Math.imul(l,H))|0)+((8191&(o=(o=Math.imul(l,G))+Math.imul(f,H)|0))<<13)|0;u=((r=Math.imul(f,G))+(o>>>13)|0)+(he>>>26)|0,he&=67108863,a=Math.imul(b,H),o=(o=Math.imul(b,G))+Math.imul(m,H)|0,r=Math.imul(m,G);var ge=(u+(a=a+Math.imul(l,K)|0)|0)+((8191&(o=(o=o+Math.imul(l,W)|0)+Math.imul(f,K)|0))<<13)|0;u=((r=r+Math.imul(f,W)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,a=Math.imul(g,H),o=(o=Math.imul(g,G))+Math.imul(y,H)|0,r=Math.imul(y,G),a=a+Math.imul(b,K)|0,o=(o=o+Math.imul(b,W)|0)+Math.imul(m,K)|0,r=r+Math.imul(m,W)|0;var ye=(u+(a=a+Math.imul(l,V)|0)|0)+((8191&(o=(o=o+Math.imul(l,q)|0)+Math.imul(f,V)|0))<<13)|0;u=((r=r+Math.imul(f,q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,a=Math.imul(w,H),o=(o=Math.imul(w,G))+Math.imul(k,H)|0,r=Math.imul(k,G),a=a+Math.imul(g,K)|0,o=(o=o+Math.imul(g,W)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,W)|0,a=a+Math.imul(b,V)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(m,V)|0,r=r+Math.imul(m,q)|0;var ve=(u+(a=a+Math.imul(l,J)|0)|0)+((8191&(o=(o=o+Math.imul(l,Y)|0)+Math.imul(f,J)|0))<<13)|0;u=((r=r+Math.imul(f,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,a=Math.imul(x,H),o=(o=Math.imul(x,G))+Math.imul(I,H)|0,r=Math.imul(I,G),a=a+Math.imul(w,K)|0,o=(o=o+Math.imul(w,W)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,W)|0,a=a+Math.imul(g,V)|0,o=(o=o+Math.imul(g,q)|0)+Math.imul(y,V)|0,r=r+Math.imul(y,q)|0,a=a+Math.imul(b,J)|0,o=(o=o+Math.imul(b,Y)|0)+Math.imul(m,J)|0,r=r+Math.imul(m,Y)|0;var we=(u+(a=a+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((r=r+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,a=Math.imul(S,H),o=(o=Math.imul(S,G))+Math.imul(C,H)|0,r=Math.imul(C,G),a=a+Math.imul(x,K)|0,o=(o=o+Math.imul(x,W)|0)+Math.imul(I,K)|0,r=r+Math.imul(I,W)|0,a=a+Math.imul(w,V)|0,o=(o=o+Math.imul(w,q)|0)+Math.imul(k,V)|0,r=r+Math.imul(k,q)|0,a=a+Math.imul(g,J)|0,o=(o=o+Math.imul(g,Y)|0)+Math.imul(y,J)|0,r=r+Math.imul(y,Y)|0,a=a+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(m,$)|0,r=r+Math.imul(m,ee)|0;var ke=(u+(a=a+Math.imul(l,ne)|0)|0)+((8191&(o=(o=o+Math.imul(l,ae)|0)+Math.imul(f,ne)|0))<<13)|0;u=((r=r+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,a=Math.imul(R,H),o=(o=Math.imul(R,G))+Math.imul(M,H)|0,r=Math.imul(M,G),a=a+Math.imul(S,K)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(C,K)|0,r=r+Math.imul(C,W)|0,a=a+Math.imul(x,V)|0,o=(o=o+Math.imul(x,q)|0)+Math.imul(I,V)|0,r=r+Math.imul(I,q)|0,a=a+Math.imul(w,J)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(k,J)|0,r=r+Math.imul(k,Y)|0,a=a+Math.imul(g,$)|0,o=(o=o+Math.imul(g,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,a=a+Math.imul(b,ne)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(m,ne)|0,r=r+Math.imul(m,ae)|0;var Ae=(u+(a=a+Math.imul(l,re)|0)|0)+((8191&(o=(o=o+Math.imul(l,ie)|0)+Math.imul(f,re)|0))<<13)|0;u=((r=r+Math.imul(f,ie)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,a=Math.imul(U,H),o=(o=Math.imul(U,G))+Math.imul(_,H)|0,r=Math.imul(_,G),a=a+Math.imul(R,K)|0,o=(o=o+Math.imul(R,W)|0)+Math.imul(M,K)|0,r=r+Math.imul(M,W)|0,a=a+Math.imul(S,V)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(C,V)|0,r=r+Math.imul(C,q)|0,a=a+Math.imul(x,J)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(I,J)|0,r=r+Math.imul(I,Y)|0,a=a+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,a=a+Math.imul(g,ne)|0,o=(o=o+Math.imul(g,ae)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ae)|0,a=a+Math.imul(b,re)|0,o=(o=o+Math.imul(b,ie)|0)+Math.imul(m,re)|0,r=r+Math.imul(m,ie)|0;var xe=(u+(a=a+Math.imul(l,ce)|0)|0)+((8191&(o=(o=o+Math.imul(l,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((r=r+Math.imul(f,ue)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,a=Math.imul(D,H),o=(o=Math.imul(D,G))+Math.imul(N,H)|0,r=Math.imul(N,G),a=a+Math.imul(U,K)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(_,K)|0,r=r+Math.imul(_,W)|0,a=a+Math.imul(R,V)|0,o=(o=o+Math.imul(R,q)|0)+Math.imul(M,V)|0,r=r+Math.imul(M,q)|0,a=a+Math.imul(S,J)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(C,J)|0,r=r+Math.imul(C,Y)|0,a=a+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(I,$)|0,r=r+Math.imul(I,ee)|0,a=a+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ae)|0,a=a+Math.imul(g,re)|0,o=(o=o+Math.imul(g,ie)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,ie)|0,a=a+Math.imul(b,ce)|0,o=(o=o+Math.imul(b,ue)|0)+Math.imul(m,ce)|0,r=r+Math.imul(m,ue)|0;var Ie=(u+(a=a+Math.imul(l,le)|0)|0)+((8191&(o=(o=o+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;u=((r=r+Math.imul(f,fe)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,a=Math.imul(F,H),o=(o=Math.imul(F,G))+Math.imul(L,H)|0,r=Math.imul(L,G),a=a+Math.imul(D,K)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,W)|0,a=a+Math.imul(U,V)|0,o=(o=o+Math.imul(U,q)|0)+Math.imul(_,V)|0,r=r+Math.imul(_,q)|0,a=a+Math.imul(R,J)|0,o=(o=o+Math.imul(R,Y)|0)+Math.imul(M,J)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(C,$)|0,r=r+Math.imul(C,ee)|0,a=a+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(I,ne)|0,r=r+Math.imul(I,ae)|0,a=a+Math.imul(w,re)|0,o=(o=o+Math.imul(w,ie)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,ie)|0,a=a+Math.imul(g,ce)|0,o=(o=o+Math.imul(g,ue)|0)+Math.imul(y,ce)|0,r=r+Math.imul(y,ue)|0,a=a+Math.imul(b,le)|0,o=(o=o+Math.imul(b,fe)|0)+Math.imul(m,le)|0,r=r+Math.imul(m,fe)|0;var Te=(u+(a=a+Math.imul(l,be)|0)|0)+((8191&(o=(o=o+Math.imul(l,me)|0)+Math.imul(f,be)|0))<<13)|0;u=((r=r+Math.imul(f,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,a=Math.imul(F,K),o=(o=Math.imul(F,W))+Math.imul(L,K)|0,r=Math.imul(L,W),a=a+Math.imul(D,V)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(N,V)|0,r=r+Math.imul(N,q)|0,a=a+Math.imul(U,J)|0,o=(o=o+Math.imul(U,Y)|0)+Math.imul(_,J)|0,r=r+Math.imul(_,Y)|0,a=a+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(M,$)|0,r=r+Math.imul(M,ee)|0,a=a+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(C,ne)|0,r=r+Math.imul(C,ae)|0,a=a+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ie)|0)+Math.imul(I,re)|0,r=r+Math.imul(I,ie)|0,a=a+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(k,ce)|0,r=r+Math.imul(k,ue)|0,a=a+Math.imul(g,le)|0,o=(o=o+Math.imul(g,fe)|0)+Math.imul(y,le)|0,r=r+Math.imul(y,fe)|0;var Se=(u+(a=a+Math.imul(b,be)|0)|0)+((8191&(o=(o=o+Math.imul(b,me)|0)+Math.imul(m,be)|0))<<13)|0;u=((r=r+Math.imul(m,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,a=Math.imul(F,V),o=(o=Math.imul(F,q))+Math.imul(L,V)|0,r=Math.imul(L,q),a=a+Math.imul(D,J)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(N,J)|0,r=r+Math.imul(N,Y)|0,a=a+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(_,$)|0,r=r+Math.imul(_,ee)|0,a=a+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(M,ne)|0,r=r+Math.imul(M,ae)|0,a=a+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ie)|0)+Math.imul(C,re)|0,r=r+Math.imul(C,ie)|0,a=a+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,ue)|0)+Math.imul(I,ce)|0,r=r+Math.imul(I,ue)|0,a=a+Math.imul(w,le)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(k,le)|0,r=r+Math.imul(k,fe)|0;var Ce=(u+(a=a+Math.imul(g,be)|0)|0)+((8191&(o=(o=o+Math.imul(g,me)|0)+Math.imul(y,be)|0))<<13)|0;u=((r=r+Math.imul(y,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,a=Math.imul(F,J),o=(o=Math.imul(F,Y))+Math.imul(L,J)|0,r=Math.imul(L,Y),a=a+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,a=a+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(_,ne)|0,r=r+Math.imul(_,ae)|0,a=a+Math.imul(R,re)|0,o=(o=o+Math.imul(R,ie)|0)+Math.imul(M,re)|0,r=r+Math.imul(M,ie)|0,a=a+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(C,ce)|0,r=r+Math.imul(C,ue)|0,a=a+Math.imul(x,le)|0,o=(o=o+Math.imul(x,fe)|0)+Math.imul(I,le)|0,r=r+Math.imul(I,fe)|0;var Ee=(u+(a=a+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(k,be)|0))<<13)|0;u=((r=r+Math.imul(k,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,a=Math.imul(F,$),o=(o=Math.imul(F,ee))+Math.imul(L,$)|0,r=Math.imul(L,ee),a=a+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ae)|0,a=a+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ie)|0)+Math.imul(_,re)|0,r=r+Math.imul(_,ie)|0,a=a+Math.imul(R,ce)|0,o=(o=o+Math.imul(R,ue)|0)+Math.imul(M,ce)|0,r=r+Math.imul(M,ue)|0,a=a+Math.imul(S,le)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(C,le)|0,r=r+Math.imul(C,fe)|0;var Re=(u+(a=a+Math.imul(x,be)|0)|0)+((8191&(o=(o=o+Math.imul(x,me)|0)+Math.imul(I,be)|0))<<13)|0;u=((r=r+Math.imul(I,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,a=Math.imul(F,ne),o=(o=Math.imul(F,ae))+Math.imul(L,ne)|0,r=Math.imul(L,ae),a=a+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,ie)|0,a=a+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,ue)|0)+Math.imul(_,ce)|0,r=r+Math.imul(_,ue)|0,a=a+Math.imul(R,le)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(M,le)|0,r=r+Math.imul(M,fe)|0;var Me=(u+(a=a+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,me)|0)+Math.imul(C,be)|0))<<13)|0;u=((r=r+Math.imul(C,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,a=Math.imul(F,re),o=(o=Math.imul(F,ie))+Math.imul(L,re)|0,r=Math.imul(L,ie),a=a+Math.imul(D,ce)|0,o=(o=o+Math.imul(D,ue)|0)+Math.imul(N,ce)|0,r=r+Math.imul(N,ue)|0,a=a+Math.imul(U,le)|0,o=(o=o+Math.imul(U,fe)|0)+Math.imul(_,le)|0,r=r+Math.imul(_,fe)|0;var Pe=(u+(a=a+Math.imul(R,be)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(M,be)|0))<<13)|0;u=((r=r+Math.imul(M,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,a=Math.imul(F,ce),o=(o=Math.imul(F,ue))+Math.imul(L,ce)|0,r=Math.imul(L,ue),a=a+Math.imul(D,le)|0,o=(o=o+Math.imul(D,fe)|0)+Math.imul(N,le)|0,r=r+Math.imul(N,fe)|0;var Ue=(u+(a=a+Math.imul(U,be)|0)|0)+((8191&(o=(o=o+Math.imul(U,me)|0)+Math.imul(_,be)|0))<<13)|0;u=((r=r+Math.imul(_,me)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,a=Math.imul(F,le),o=(o=Math.imul(F,fe))+Math.imul(L,le)|0,r=Math.imul(L,fe);var _e=(u+(a=a+Math.imul(D,be)|0)|0)+((8191&(o=(o=o+Math.imul(D,me)|0)+Math.imul(N,be)|0))<<13)|0;u=((r=r+Math.imul(N,me)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863;var Be=(u+(a=Math.imul(F,be))|0)+((8191&(o=(o=Math.imul(F,me))+Math.imul(L,be)|0))<<13)|0;return u=((r=Math.imul(L,me))+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=he,c[1]=ge,c[2]=ye,c[3]=ve,c[4]=we,c[5]=ke,c[6]=Ae,c[7]=xe,c[8]=Ie,c[9]=Te,c[10]=Se,c[11]=Ce,c[12]=Ee,c[13]=Re,c[14]=Me,c[15]=Pe,c[16]=Ue,c[17]=_e,c[18]=Be,0!==u&&(c[19]=u,n.length++),n};function m(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(b=p),r.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return n=10===this.length&&10===e.length?b(this,e,t):a<63?p(this,e,t):a<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var a=0,o=0,r=0;r>>26)|0)>>>26,i&=67108863}n.words[r]=s,a=i,i=o}return 0!==a?n.words[r]=a:n.length--,n.strip()}(this,e,t):m(this,e,t),n},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,a=0;a>=1;return a},h.prototype.permute=function(e,t,n,a,o,r){for(var i=0;i>>=1)o++;return 1<>>=13,n[2*i+1]=8191&r,r>>>=13;for(i=2*t;i>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,a=0;a=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var i=0;for(t=0;t>>26-n}i&&(this.words[t]=i,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,i=Math.min((e-r)/26,this.length),s=67108863^67108863>>>r<i)for(this.length-=i,u=0;u=0&&(0!==d||u>=o);u--){var l=0|this.words[u];this.words[u]=d<<26-r|l>>>r,d=l&s}return c&&0!==d&&(c.words[c.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return a(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){a("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(a("number"===typeof e),a(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===s)return this.strip();for(a(-1===s),s=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),o=e,i=0|o.words[o.length-1];0!==(n=26-this._countBits(i))&&(o=o.ushln(n),a.iushln(n),i=0|o.words[o.length-1]);var s,c=a.length-o.length;if("mod"!==t){(s=new r(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var f=67108864*(0|a.words[o.length+l])+(0|a.words[o.length+l-1]);for(f=Math.min(f/i|0,67108863),a._ishlnsubmul(o,f,l);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(o,1,l),a.isZero()||(a.negative^=1);s&&(s.words[l]=f)}return s&&s.strip(),a.strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:s||null,mod:a}},r.prototype.divmod=function(e,t,n){return a(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:o,mod:i}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:s.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,i,s},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,a=e.ushrn(1),o=e.andln(1),r=n.cmp(a);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){a(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){a(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),i=new r(0),s=new r(0),c=new r(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var d=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;0===(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(d),i.isub(l)),o.iushrn(1),i.iushrn(1);for(var b=0,m=1;0===(n.words[0]&m)&&b<26;++b,m<<=1);if(b>0)for(n.iushrn(b);b-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(d),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),i.isub(c)):(n.isub(t),s.isub(o),c.isub(i))}return{a:s,b:c,gcd:n.iushln(u)}},r.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,i=new r(1),s=new r(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,d=1;0===(t.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(c),i.iushrn(1);for(var l=0,f=1;0===(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s)):(n.isub(t),s.isub(i))}return(o=0===t.cmpn(1)?i:s).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(a)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){a("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,s&=67108863,this.words[i]=s}return 0!==r&&(this.words[i]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),a(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var a=0|this.words[n],o=0|e.words[n];if(a!==o){ao&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new x(e)},r.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var a=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(v,y),v.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),o=0;o>>22,r=i}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=a}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},x.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){a(0===(e.negative|t.negative),"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2===1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),i=0;!o.isZero()&&0===o.andln(1);)i++,o.iushrn(1);a(!o.isZero());var s=new r(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new r(2*d*d).toRed(this);0!==this.pow(d,u).cmp(c);)d.redIAdd(c);for(var l=this.pow(d,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),b=i;0!==p.cmp(s);){for(var m=p,h=0;0!==m.cmp(s);h++)m=m.redSqr();a(h=0;a--){for(var u=t.words[a],d=c-1;d>=0;d--){var l=u>>d&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==i?(i<<=1,i|=l,(4===++s||0===a&&0===d)&&(o=this.mul(o,n[i]),s=0,i=0)):s=0}c=26}return o},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new I(e)},o(I,x),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},40222:function(e,t,n){"use strict";var a=n(39703),o=n(66958),r=n(6701),i=n(41561),s=n(18840);function c(e){s.call(this,"digest"),this._hash=e}a(c,s),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new o:"rmd160"===e||"ripemd160"===e?new r:new c(i(e))}},70083:function(e,t,n){var a=n(66958);e.exports=function(e){return(new a).update(e).digest()}},17817:function(e,t,n){"use strict";var a=n(39703),o=n(24032),r=n(18840),i=n(88284).Buffer,s=n(70083),c=n(6701),u=n(41561),d=i.alloc(128);function l(e,t){r.call(this,"digest"),"string"===typeof t&&(t=i.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new c:u(e)).update(t).digest():t.lengths?t=e(t):t.length-1};function r(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function i(e){return"string"!==typeof e&&(e=String(e)),e}function s(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function d(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function l(e){var t=new FileReader,n=d(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:n.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:n.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():n.arrayBuffer&&n.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(l)}),this.text=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=d(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),a=0;a-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),a=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(o))}})),t}function g(e){var t=new c;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),a=n.shift().trim();if(a){var o=n.join(":").trim();t.append(a,o)}})),t}function y(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},p.call(m.prototype),p.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];y.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(k){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function w(e,a){return new Promise((function(o,r){var i=new m(e,a);if(i.signal&&i.signal.aborted)return r(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:g(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;o(new y(t,e))},s.onerror=function(){r(new TypeError("Network request failed"))},s.ontimeout=function(){r(new TypeError("Network request failed"))},s.onabort=function(){r(new t.DOMException("Aborted","AbortError"))},s.open(i.method,i.url,!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&n.blob&&(s.responseType="blob"),i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",c)}),s.send("undefined"===typeof i._bodyInit?null:i._bodyInit)}))}w.polyfill=!0,e.fetch||(e.fetch=w,e.Headers=c,e.Request=m,e.Response=y),t.Headers=c,t.Request=m,t.Response=y,t.fetch=w,Object.defineProperty(t,"__esModule",{value:!0})}({})}(a),a.fetch.ponyfill=!0,delete a.fetch.polyfill;var o=a;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},21921:function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(97924),t.createHash=t.Hash=n(40222),t.createHmac=t.Hmac=n(17817);var a=n(81392),o=Object.keys(a),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(o);t.getHashes=function(){return r};var i=n(70721);t.pbkdf2=i.pbkdf2,t.pbkdf2Sync=i.pbkdf2Sync;var s=n(33722);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var c=n(36531);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var u=n(9289);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=n(94365);var d=n(19787);t.publicEncrypt=d.publicEncrypt,t.privateEncrypt=d.privateEncrypt,t.publicDecrypt=d.publicDecrypt,t.privateDecrypt=d.privateDecrypt;var l=n(14273);t.randomFill=l.randomFill,t.randomFillSync=l.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},33331:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,a="millisecond",o="second",r="minute",i="hour",s="day",c="week",u="month",d="quarter",l="year",f="date",p="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var a=String(e);return!a||a.length>=t?e:""+Array(t+1-a.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),a=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(a,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var s=t.name;w[s]=t,o=s}return!a&&o&&(v=o),o||!a&&v},x=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new T(n)},I=y;I.l=A,I.i=k,I.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var T=function(){function h(e){this.$L=A(e.locale,null,!0),this.parse(e)}var g=h.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(I.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var a=t.match(b);if(a){var o=a[2]-1||0,r=(a[7]||"0").substring(0,3);return n?new Date(Date.UTC(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,r)):new Date(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,r)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return I},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return x(e)=1.5*n;return Math.round(e/n)+" "+a+(o?"s":"")}e.exports=function(e,c){c=c||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*r;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*a;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&isFinite(e))return c.long?function(e){var r=Math.abs(e);if(r>=o)return s(e,r,o,"day");if(r>=a)return s(e,r,a,"hour");if(r>=n)return s(e,r,n,"minute");if(r>=t)return s(e,r,t,"second");return e+" ms"}(e):function(e){var r=Math.abs(e);if(r>=o)return Math.round(e/o)+"d";if(r>=a)return Math.round(e/a)+"h";if(r>=n)return Math.round(e/n)+"m";if(r>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},93420:function(e,t,n){var a=n(65218),o=n(456);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var a=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(a++,"%c"===e&&(o=a))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!==typeof o&&"env"in o&&(e={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.DEBUG);return e},t.useColors=function(){if("undefined"!==typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=function(){var e=!1;return function(){e||(e=!0,a.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=a.debug||a.log||function(){},e.exports=n(41770)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},41770:function(e,t,n){var a=n(65218),o=n(861).default;e.exports=function(e){function t(e){var n,a,o,i=null;function s(){for(var e=arguments.length,a=new Array(e),o=0;o0){for(r+=i,t=1;tn)throw Error(h+e)}function _(e,t,n,a){var o,r,i,s;for(r=e[0];r>=10;r/=10)--t;return--t<0?(t+=C,o=0):(o=Math.ceil((t+1)/C),t%=C),r=k(10,C-t),s=e[o]%r|0,null==a?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),i=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):i=(n<4&&s+1==r||n>3&&s+1==r/2)&&(e[o+1]/r/100|0)==k(10,t-2)-1||(s==r/2||0==s)&&0==(e[o+1]/r/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),i=(a||n<4)&&9999==s||!a&&n>3&&4999==s):i=((a||n<4)&&s+1==r||!a&&n>3&&s+1==r/2)&&(e[o+1]/r/1e3|0)==k(10,t-3)-1,i}function B(e,t,n){for(var a,o,r=[0],i=0,s=e.length;in-1&&(void 0===r[a+1]&&(r[a+1]=0),r[a+1]+=r[a]/n|0,r[a]%=n)}return r.reverse()}M.absoluteValue=M.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),N(e)},M.ceil=function(){return N(new this.constructor(this),this.e+1,2)},M.clampedTo=M.clamp=function(e,t){var n=this,a=n.constructor;if(e=new a(e),t=new a(t),!e.s||!t.s)return new a(NaN);if(e.gt(t))throw Error(h+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new a(n)},M.comparedTo=M.cmp=function(e){var t,n,a,o,r=this,i=r.d,s=(e=new r.constructor(e)).d,c=r.s,u=e.s;if(!i||!s)return c&&u?c!==u?c:i===s?0:!i^c<0?1:-1:NaN;if(!i[0]||!s[0])return i[0]?c:s[0]?-u:0;if(c!==u)return c;if(r.e!==e.e)return r.e>e.e^c<0?1:-1;for(t=0,n=(a=i.length)<(o=s.length)?a:o;ts[t]^c<0?1:-1;return a===o?0:a>o^c<0?1:-1},M.cosine=M.cos=function(){var e,t,n=this,a=n.constructor;return n.d?n.d[0]?(e=a.precision,t=a.rounding,a.precision=e+Math.max(n.e,n.sd())+C,a.rounding=1,n=function(e,t){var n,a,o;if(t.isZero())return t;a=t.d.length,a<32?o=(1/X(4,n=Math.ceil(a/3))).toString():(n=16,o="2.3283064365386962890625e-10");e.precision+=n,t=Y(e,1,t.times(o),new e(1));for(var r=n;r--;){var i=t.times(t);t=i.times(i).minus(i).times(8).plus(1)}return e.precision-=n,t}(a,$(a,n)),a.precision=e,a.rounding=t,N(2==s||3==s?n.neg():n,e,t,!0)):new a(1):new a(NaN)},M.cubeRoot=M.cbrt=function(){var e,t,n,a,o,r,i,s,c,u,d=this,l=d.constructor;if(!d.isFinite()||d.isZero())return new l(d);for(b=!1,(r=d.s*k(d.s*d,1/3))&&Math.abs(r)!=1/0?a=new l(r.toString()):(n=P(d.d),(r=((e=d.e)-n.length+1)%3)&&(n+=1==r||-2==r?"0":"00"),r=k(n,1/3),e=w((e+1)/3)-(e%3==(e<0?-1:2)),(a=new l(n=r==1/0?"5e"+e:(n=r.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=d.s),i=(e=l.precision)+3;;)if(u=(c=(s=a).times(s).times(s)).plus(d),a=D(u.plus(d).times(s),u.plus(c),i+2,1),P(s.d).slice(0,i)===(n=P(a.d)).slice(0,i)){if("9999"!=(n=n.slice(i-3,i+1))&&(o||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(N(a,e+1,1),t=!a.times(a).times(a).eq(d));break}if(!o&&(N(s,e+1,0),s.times(s).times(s).eq(d))){a=s;break}i+=4,o=1}return b=!0,N(a,e,l.rounding,t)},M.decimalPlaces=M.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-w(this.e/C))*C,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},M.dividedBy=M.div=function(e){return D(this,new this.constructor(e))},M.dividedToIntegerBy=M.divToInt=function(e){var t=this.constructor;return N(D(this,new t(e),0,1,1),t.precision,t.rounding)},M.equals=M.eq=function(e){return 0===this.cmp(e)},M.floor=function(){return N(new this.constructor(this),this.e+1,3)},M.greaterThan=M.gt=function(e){return this.cmp(e)>0},M.greaterThanOrEqualTo=M.gte=function(e){var t=this.cmp(e);return 1==t||0===t},M.hyperbolicCosine=M.cosh=function(){var e,t,n,a,o,r=this,i=r.constructor,s=new i(1);if(!r.isFinite())return new i(r.s?1/0:NaN);if(r.isZero())return s;n=i.precision,a=i.rounding,i.precision=n+Math.max(r.e,r.sd())+4,i.rounding=1,(o=r.d.length)<32?t=(1/X(4,e=Math.ceil(o/3))).toString():(e=16,t="2.3283064365386962890625e-10"),r=Y(i,1,r.times(t),new i(1),!0);for(var c,u=e,d=new i(8);u--;)c=r.times(r),r=s.minus(c.times(d.minus(c.times(d))));return N(r,i.precision=n,i.rounding=a,!0)},M.hyperbolicSine=M.sinh=function(){var e,t,n,a,o=this,r=o.constructor;if(!o.isFinite()||o.isZero())return new r(o);if(t=r.precision,n=r.rounding,r.precision=t+Math.max(o.e,o.sd())+4,r.rounding=1,(a=o.d.length)<3)o=Y(r,2,o,o,!0);else{e=(e=1.4*Math.sqrt(a))>16?16:0|e,o=Y(r,2,o=o.times(1/X(5,e)),o,!0);for(var i,s=new r(5),c=new r(16),u=new r(20);e--;)i=o.times(o),o=o.times(s.plus(i.times(c.times(i).plus(u))))}return r.precision=t,r.rounding=n,N(o,t,n,!0)},M.hyperbolicTangent=M.tanh=function(){var e,t,n=this,a=n.constructor;return n.isFinite()?n.isZero()?new a(n):(e=a.precision,t=a.rounding,a.precision=e+7,a.rounding=1,D(n.sinh(),n.cosh(),a.precision=e,a.rounding=t)):new a(n.s)},M.inverseCosine=M.acos=function(){var e,t=this,n=t.constructor,a=t.abs().cmp(1),o=n.precision,r=n.rounding;return-1!==a?0===a?t.isNeg()?j(n,o,r):new n(0):new n(NaN):t.isZero()?j(n,o+4,r).times(.5):(n.precision=o+6,n.rounding=1,t=t.asin(),e=j(n,o+4,r).times(.5),n.precision=o,n.rounding=r,e.minus(t))},M.inverseHyperbolicCosine=M.acosh=function(){var e,t,n=this,a=n.constructor;return n.lte(1)?new a(n.eq(1)?0:NaN):n.isFinite()?(e=a.precision,t=a.rounding,a.precision=e+Math.max(Math.abs(n.e),n.sd())+4,a.rounding=1,b=!1,n=n.times(n).minus(1).sqrt().plus(n),b=!0,a.precision=e,a.rounding=t,n.ln()):new a(n)},M.inverseHyperbolicSine=M.asinh=function(){var e,t,n=this,a=n.constructor;return!n.isFinite()||n.isZero()?new a(n):(e=a.precision,t=a.rounding,a.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,a.rounding=1,b=!1,n=n.times(n).plus(1).sqrt().plus(n),b=!0,a.precision=e,a.rounding=t,n.ln())},M.inverseHyperbolicTangent=M.atanh=function(){var e,t,n,a,o=this,r=o.constructor;return o.isFinite()?o.e>=0?new r(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(e=r.precision,t=r.rounding,a=o.sd(),Math.max(a,e)<2*-o.e-1?N(new r(o),e,t,!0):(r.precision=n=a-o.e,o=D(o.plus(1),new r(1).minus(o),n+e,1),r.precision=e+4,r.rounding=1,o=o.ln(),r.precision=e,r.rounding=t,o.times(.5))):new r(NaN)},M.inverseSine=M.asin=function(){var e,t,n,a,o=this,r=o.constructor;return o.isZero()?new r(o):(t=o.abs().cmp(1),n=r.precision,a=r.rounding,-1!==t?0===t?((e=j(r,n+4,a).times(.5)).s=o.s,e):new r(NaN):(r.precision=n+6,r.rounding=1,o=o.div(new r(1).minus(o.times(o)).sqrt().plus(1)).atan(),r.precision=n,r.rounding=a,o.times(2)))},M.inverseTangent=M.atan=function(){var e,t,n,a,o,r,i,s,c,u=this,d=u.constructor,l=d.precision,f=d.rounding;if(u.isFinite()){if(u.isZero())return new d(u);if(u.abs().eq(1)&&l+4<=R)return(i=j(d,l+4,f).times(.25)).s=u.s,i}else{if(!u.s)return new d(NaN);if(l+4<=R)return(i=j(d,l+4,f).times(.5)).s=u.s,i}for(d.precision=s=l+10,d.rounding=1,e=n=Math.min(28,s/C+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(b=!1,t=Math.ceil(s/C),a=1,c=u.times(u),i=new d(u),o=u;-1!==e;)if(o=o.times(c),r=i.minus(o.div(a+=2)),o=o.times(c),void 0!==(i=r.plus(o.div(a+=2))).d[t])for(e=t;i.d[e]===r.d[e]&&e--;);return n&&(i=i.times(2<this.d.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isPositive=M.isPos=function(){return this.s>0},M.isZero=function(){return!!this.d&&0===this.d[0]},M.lessThan=M.lt=function(e){return this.cmp(e)<0},M.lessThanOrEqualTo=M.lte=function(e){return this.cmp(e)<1},M.logarithm=M.log=function(e){var t,n,a,o,r,i,s,c,u=this,d=u.constructor,l=d.precision,f=d.rounding;if(null==e)e=new d(10),t=!0;else{if(n=(e=new d(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new d(NaN);t=e.eq(10)}if(n=u.d,u.s<0||!n||!n[0]||u.eq(1))return new d(n&&!n[0]?-1/0:1!=u.s?NaN:n?0:1/0);if(t)if(n.length>1)r=!0;else{for(o=n[0];o%10===0;)o/=10;r=1!==o}if(b=!1,i=V(u,s=l+5),a=t?L(d,s+10):V(e,s),_((c=D(i,a,s,1)).d,o=l,f))do{if(i=V(u,s+=10),a=t?L(d,s+10):V(e,s),c=D(i,a,s,1),!r){+P(c.d).slice(o+1,o+15)+1==1e14&&(c=N(c,l+1,0));break}}while(_(c.d,o+=10,f));return b=!0,N(c,l,f)},M.minus=M.sub=function(e){var t,n,a,o,r,i,s,c,u,d,l,f,p=this,m=p.constructor;if(e=new m(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new m(e.d||p.s!==e.s?p:NaN):e=new m(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(u=p.d,f=e.d,s=m.precision,c=m.rounding,!u[0]||!f[0]){if(f[0])e.s=-e.s;else{if(!u[0])return new m(3===c?-0:0);e=new m(p)}return b?N(e,s,c):e}if(n=w(e.e/C),d=w(p.e/C),u=u.slice(),r=d-n){for((l=r<0)?(t=u,r=-r,i=f.length):(t=f,n=d,i=u.length),r>(a=Math.max(Math.ceil(s/C),i)+2)&&(r=a,t.length=1),t.reverse(),a=r;a--;)t.push(0);t.reverse()}else{for((l=(a=u.length)<(i=f.length))&&(i=a),a=0;a0;--a)u[i++]=0;for(a=f.length;a>r;){if(u[--a](i=(r=Math.ceil(s/C))>i?r+1:i+1)&&(o=i,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for((i=u.length)-(o=d.length)<0&&(o=i,n=d,d=u,u=n),t=0;o;)t=(u[--o]=u[o]+d[o]+t)/S|0,u[o]%=S;for(t&&(u.unshift(t),++a),i=u.length;0==u[--i];)u.pop();return e.d=u,e.e=F(u,a),b?N(e,s,c):e},M.precision=M.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(h+e);return n.d?(t=H(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},M.round=function(){var e=this,t=e.constructor;return N(new t(e),e.e+1,t.rounding)},M.sine=M.sin=function(){var e,t,n=this,a=n.constructor;return n.isFinite()?n.isZero()?new a(n):(e=a.precision,t=a.rounding,a.precision=e+Math.max(n.e,n.sd())+C,a.rounding=1,n=function(e,t){var n,a=t.d.length;if(a<3)return t.isZero()?t:Y(e,2,t,t);n=(n=1.4*Math.sqrt(a))>16?16:0|n,t=t.times(1/X(5,n)),t=Y(e,2,t,t);for(var o,r=new e(5),i=new e(16),s=new e(20);n--;)o=t.times(t),t=t.times(r.plus(o.times(i.times(o).minus(s))));return t}(a,$(a,n)),a.precision=e,a.rounding=t,N(s>2?n.neg():n,e,t,!0)):new a(NaN)},M.squareRoot=M.sqrt=function(){var e,t,n,a,o,r,i=this,s=i.d,c=i.e,u=i.s,d=i.constructor;if(1!==u||!s||!s[0])return new d(!u||u<0&&(!s||s[0])?NaN:s?i:1/0);for(b=!1,0==(u=Math.sqrt(+i))||u==1/0?(((t=P(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(t),c=w((c+1)/2)-(c<0||c%2),a=new d(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):a=new d(u.toString()),n=(c=d.precision)+3;;)if(a=(r=a).plus(D(i,r,n+2,1)).times(.5),P(r.d).slice(0,n)===(t=P(a.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(N(a,c+1,1),e=!a.times(a).eq(i));break}if(!o&&(N(r,c+1,0),r.times(r).eq(i))){a=r;break}n+=4,o=1}return b=!0,N(a,c,d.rounding,e)},M.tangent=M.tan=function(){var e,t,n=this,a=n.constructor;return n.isFinite()?n.isZero()?new a(n):(e=a.precision,t=a.rounding,a.precision=e+10,a.rounding=1,(n=n.sin()).s=1,n=D(n,new a(1).minus(n.times(n)).sqrt(),e+10,0),a.precision=e,a.rounding=t,N(2==s||4==s?n.neg():n,e,t,!0)):new a(NaN)},M.times=M.mul=function(e){var t,n,a,o,r,i,s,c,u,d=this,l=d.constructor,f=d.d,p=(e=new l(e)).d;if(e.s*=d.s,!f||!f[0]||!p||!p[0])return new l(!e.s||f&&!f[0]&&!p||p&&!p[0]&&!f?NaN:f&&p?0*e.s:e.s/0);for(n=w(d.e/C)+w(e.e/C),(c=f.length)<(u=p.length)&&(r=f,f=p,p=r,i=c,c=u,u=i),r=[],a=i=c+u;a--;)r.push(0);for(a=u;--a>=0;){for(t=0,o=c+a;o>a;)s=r[o]+p[a]*f[o-a-1]+t,r[o--]=s%S|0,t=s/S|0;r[o]=(r[o]+t)%S|0}for(;!r[--i];)r.pop();return t?++n:r.shift(),e.d=r,e.e=F(r,n),b?N(e,l.precision,l.rounding):e},M.toBinary=function(e,t){return ee(this,2,e,t)},M.toDecimalPlaces=M.toDP=function(e,t){var n=this,a=n.constructor;return n=new a(n),void 0===e?n:(U(e,0,u),void 0===t?t=a.rounding:U(t,0,8),N(n,e+n.e+1,t))},M.toExponential=function(e,t){var n,a=this,o=a.constructor;return void 0===e?n=O(a,!0):(U(e,0,u),void 0===t?t=o.rounding:U(t,0,8),n=O(a=N(new o(a),e+1,t),!0,e+1)),a.isNeg()&&!a.isZero()?"-"+n:n},M.toFixed=function(e,t){var n,a,o=this,r=o.constructor;return void 0===e?n=O(o):(U(e,0,u),void 0===t?t=r.rounding:U(t,0,8),n=O(a=N(new r(o),e+o.e+1,t),!1,e+a.e+1)),o.isNeg()&&!o.isZero()?"-"+n:n},M.toFraction=function(e){var t,n,a,o,r,i,s,c,u,d,l,f,p=this,m=p.d,g=p.constructor;if(!m)return new g(p);if(u=n=new g(1),a=c=new g(0),i=(r=(t=new g(a)).e=H(m)-p.e-1)%C,t.d[0]=k(10,i<0?C+i:i),null==e)e=r>0?t:u;else{if(!(s=new g(e)).isInt()||s.lt(u))throw Error(h+s);e=s.gt(t)?r>0?t:u:s}for(b=!1,s=new g(P(m)),d=g.precision,g.precision=r=m.length*C*2;l=D(s,t,0,1,1),1!=(o=n.plus(l.times(a))).cmp(e);)n=a,a=o,o=u,u=c.plus(l.times(o)),c=o,o=t,t=s.minus(l.times(o)),s=o;return o=D(e.minus(n),a,0,1,1),c=c.plus(o.times(u)),n=n.plus(o.times(a)),c.s=u.s=p.s,f=D(u,a,r,1).minus(p).abs().cmp(D(c,n,r,1).minus(p).abs())<1?[u,a]:[c,n],g.precision=d,b=!0,f},M.toHexadecimal=M.toHex=function(e,t){return ee(this,16,e,t)},M.toNearest=function(e,t){var n=this,a=n.constructor;if(n=new a(n),null==e){if(!n.d)return n;e=new a(1),t=a.rounding}else{if(e=new a(e),void 0===t?t=a.rounding:U(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(b=!1,n=D(n,e,0,t,1).times(e),b=!0,N(n)):(e.s=n.s,n=e),n},M.toNumber=function(){return+this},M.toOctal=function(e,t){return ee(this,8,e,t)},M.toPower=M.pow=function(e){var t,n,a,o,r,i,s=this,c=s.constructor,u=+(e=new c(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new c(k(+s,u));if((s=new c(s)).eq(1))return s;if(a=c.precision,r=c.rounding,e.eq(1))return N(s,a,r);if((t=w(e.e/C))>=e.d.length-1&&(n=u<0?-u:u)<=9007199254740991)return o=z(c,s,n,a),e.s<0?new c(1).div(o):N(o,a,r);if((i=s.s)<0){if(tc.maxE+1||t0?i/0:0):(b=!1,c.rounding=s.s=1,n=Math.min(12,(t+"").length),(o=Z(e.times(V(s,a+n)),a)).d&&_((o=N(o,a+5,1)).d,a,r)&&(t=a+10,+P((o=N(Z(e.times(V(s,t+n)),t),t+5,1)).d).slice(a+1,a+15)+1==1e14&&(o=N(o,a+1,0))),o.s=i,b=!0,c.rounding=r,N(o,a,r))},M.toPrecision=function(e,t){var n,a=this,o=a.constructor;return void 0===e?n=O(a,a.e<=o.toExpNeg||a.e>=o.toExpPos):(U(e,1,u),void 0===t?t=o.rounding:U(t,0,8),n=O(a=N(new o(a),e,t),e<=a.e||a.e<=o.toExpNeg,e)),a.isNeg()&&!a.isZero()?"-"+n:n},M.toSignificantDigits=M.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(U(e,1,u),void 0===t?t=n.rounding:U(t,0,8)),N(new n(this),e,t)},M.toString=function(){var e=this,t=e.constructor,n=O(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},M.truncated=M.trunc=function(){return N(new this.constructor(this),this.e+1,1)},M.valueOf=M.toJSON=function(){var e=this,t=e.constructor,n=O(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var D=function(){function e(e,t,n){var a,o=0,r=e.length;for(e=e.slice();r--;)a=e[r]*t+o,e[r]=a%n|0,o=a/n|0;return o&&e.unshift(o),e}function t(e,t,n,a){var o,r;if(n!=a)r=n>a?1:-1;else for(o=r=0;ot[o]?1:-1;break}return r}function n(e,t,n,a){for(var o=0;n--;)e[n]-=o,o=e[n]1;)e.shift()}return function(a,o,r,s,c,u){var d,l,f,p,b,m,h,g,y,v,k,A,x,I,T,E,R,M,P,U,_=a.constructor,B=a.s==o.s?1:-1,D=a.d,O=o.d;if(!D||!D[0]||!O||!O[0])return new _(a.s&&o.s&&(D?!O||D[0]!=O[0]:O)?D&&0==D[0]||!O?0*B:B/0:NaN);for(u?(b=1,l=a.e-o.e):(u=S,b=C,l=w(a.e/b)-w(o.e/b)),P=O.length,R=D.length,v=(y=new _(B)).d=[],f=0;O[f]==(D[f]||0);f++);if(O[f]>(D[f]||0)&&l--,null==r?(I=r=_.precision,s=_.rounding):I=c?r+(a.e-o.e)+1:r,I<0)v.push(1),m=!0;else{if(I=I/b+2|0,f=0,1==P){for(p=0,O=O[0],I++;(f1&&(O=e(O,p,u),D=e(D,p,u),P=O.length,R=D.length),E=P,A=(k=D.slice(0,P)).length;A=u/2&&++M;do{p=0,(d=t(O,k,P,A))<0?(x=k[0],P!=A&&(x=x*u+(k[1]||0)),(p=x/M|0)>1?(p>=u&&(p=u-1),1==(d=t(h=e(O,p,u),k,g=h.length,A=k.length))&&(p--,n(h,P=10;p/=10)f++;y.e=f+l*b-1,N(y,c?r+y.e+1:r,s,m)}return y}}();function N(e,t,n,a){var o,r,i,s,c,u,d,l,f,p=e.constructor;e:if(null!=t){if(!(l=e.d))return e;for(o=1,s=l[0];s>=10;s/=10)o++;if((r=t-o)<0)r+=C,i=t,c=(d=l[f=0])/k(10,o-i-1)%10|0;else if((f=Math.ceil((r+1)/C))>=(s=l.length)){if(!a)break e;for(;s++<=f;)l.push(0);d=c=0,o=1,i=(r%=C)-C+1}else{for(d=s=l[f],o=1;s>=10;s/=10)o++;c=(i=(r%=C)-C+o)<0?0:d/k(10,o-i-1)%10|0}if(a=a||t<0||void 0!==l[f+1]||(i<0?d:d%k(10,o-i-1)),u=n<4?(c||a)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||a||6==n&&(r>0?i>0?d/k(10,o-i):0:l[f-1])%10&1||n==(e.s<0?8:7)),t<1||!l[0])return l.length=0,u?(t-=e.e+1,l[0]=k(10,(C-t%C)%C),e.e=-t||0):l[0]=e.e=0,e;if(0==r?(l.length=f,s=1,f--):(l.length=f+1,s=k(10,C-r),l[f]=i>0?(d/k(10,o-i)%k(10,i)|0)*s:0),u)for(;;){if(0==f){for(r=1,i=l[0];i>=10;i/=10)r++;for(i=l[0]+=s,s=1;i>=10;i/=10)s++;r!=s&&(e.e++,l[0]==S&&(l[0]=1));break}if(l[f]+=s,l[f]!=S)break;l[f--]=0,s=1}for(r=l.length;0===l[--r];)l.pop()}return b&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e0?r=r.charAt(0)+"."+r.slice(1)+G(a):i>1&&(r=r.charAt(0)+"."+r.slice(1)),r=r+(e.e<0?"e":"e+")+e.e):o<0?(r="0."+G(-o-1)+r,n&&(a=n-i)>0&&(r+=G(a))):o>=i?(r+=G(o+1-i),n&&(a=n-o-1)>0&&(r=r+"."+G(a))):((a=o+1)0&&(o+1===i&&(r+="."),r+=G(a))),r}function F(e,t){var n=e[0];for(t*=C;n>=10;n/=10)t++;return t}function L(e,t,n){if(t>E)throw b=!0,n&&(e.precision=n),Error(g);return N(new e(l),t,1,!0)}function j(e,t,n){if(t>R)throw Error(g);return N(new e(f),t,n,!0)}function H(e){var t=e.length-1,n=t*C+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function G(e){for(var t="";e--;)t+="0";return t}function z(e,t,n,a){var o,r=new e(1),i=Math.ceil(a/C+4);for(b=!1;;){if(n%2&&te((r=r.times(t)).d,i)&&(o=!0),0===(n=w(n/2))){n=r.d.length-1,o&&0===r.d[n]&&++r.d[n];break}te((t=t.times(t)).d,i)}return b=!0,r}function K(e){return 1&e.d[e.d.length-1]}function W(e,t,n){for(var a,o=new e(t[0]),r=0;++r17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(b=!1,c=m):c=t,s=new f(.03125);e.e>-2;)e=e.times(s),l+=5;for(c+=a=Math.log(k(2,l))/Math.LN10*2+5|0,n=r=i=new f(1),f.precision=c;;){if(r=N(r.times(e),c,1),n=n.times(++d),P((s=i.plus(D(r,n,c,1))).d).slice(0,c)===P(i.d).slice(0,c)){for(o=l;o--;)i=N(i.times(i),c,1);if(null!=t)return f.precision=m,i;if(!(u<3&&_(i.d,c-a,p,u)))return N(i,f.precision=m,p,b=!0);f.precision=c+=10,n=r=s=new f(1),d=0,u++}i=s}}function V(e,t){var n,a,o,r,i,s,c,u,d,l,f,p=1,m=e,h=m.d,g=m.constructor,y=g.rounding,v=g.precision;if(m.s<0||!h||!h[0]||!m.e&&1==h[0]&&1==h.length)return new g(h&&!h[0]?-1/0:1!=m.s?NaN:h?0:m);if(null==t?(b=!1,d=v):d=t,g.precision=d+=10,a=(n=P(h)).charAt(0),!(Math.abs(r=m.e)<15e14))return u=L(g,d+2,v).times(r+""),m=V(new g(a+"."+n.slice(1)),d-10).plus(u),g.precision=v,null==t?N(m,v,y,b=!0):m;for(;a<7&&1!=a||1==a&&n.charAt(1)>3;)a=(n=P((m=m.times(e)).d)).charAt(0),p++;for(r=m.e,a>1?(m=new g("0."+n),r++):m=new g(a+"."+n.slice(1)),l=m,c=i=m=D(m.minus(1),m.plus(1),d,1),f=N(m.times(m),d,1),o=3;;){if(i=N(i.times(f),d,1),P((u=c.plus(D(i,new g(o),d,1))).d).slice(0,d)===P(c.d).slice(0,d)){if(c=c.times(2),0!==r&&(c=c.plus(L(g,d+2,v).times(r+""))),c=D(c,new g(p),d,1),null!=t)return g.precision=v,c;if(!_(c.d,d-10,y,s))return N(c,g.precision=v,y,b=!0);g.precision=d+=10,u=i=m=D(l.minus(1),l.plus(1),d,1),f=N(m.times(m),d,1),o=s=1}c=u,o+=2}}function q(e){return String(e.s*e.s/0)}function Q(e,t){var n,a,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(a=t.search(/e/i))>0?(n<0&&(n=a),n+=+t.slice(a+1),t=t.substring(0,a)):n<0&&(n=t.length),a=0;48===t.charCodeAt(a);a++);for(o=t.length;48===t.charCodeAt(o-1);--o);if(t=t.slice(a,o)){if(o-=a,e.e=n=n-a-1,e.d=[],a=(n+1)%C,n<0&&(a+=C),ae.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),T.test(t))return Q(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(x.test(t))n=16,t=t.toLowerCase();else if(A.test(t))n=2;else{if(!I.test(t))throw Error(h+t);n=8}for((i=t.search(/p/i))>0?(u=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),s=(i=t.indexOf("."))>=0,a=e.constructor,s&&(i=(c=(t=t.replace(".","")).length)-i,o=z(a,new a(n),i,2*i)),i=l=(d=B(t,n,S)).length-1;0===d[i];--i)d.pop();return i<0?new a(0*e.s):(e.e=F(d,l),e.d=d,b=!1,s&&(e=D(e,o,4*c)),u&&(e=e.times(Math.abs(u)<54?k(2,u):r.pow(2,u))),b=!0,e)}function Y(e,t,n,a,o){var r,i,s,c,u=e.precision,d=Math.ceil(u/C);for(b=!1,c=n.times(n),s=new e(a);;){if(i=D(s.times(c),new e(t++*t++),u,1),s=o?a.plus(i):a.minus(i),a=D(i.times(c),new e(t++*t++),u,1),void 0!==(i=s.plus(a)).d[d]){for(r=d;i.d[r]===s.d[r]&&r--;);if(-1==r)break}r=s,s=a,a=i,i=r}return b=!0,i.d.length=d+1,i}function X(e,t){for(var n=e;--t;)n*=e;return n}function $(e,t){var n,a=t.s<0,o=j(e,e.precision,1),r=o.times(.5);if((t=t.abs()).lte(r))return s=a?4:1,t;if((n=t.divToInt(o)).isZero())s=a?3:2;else{if((t=t.minus(n.times(o))).lte(r))return s=K(n)?a?2:3:a?4:1,t;s=K(n)?a?1:4:a?3:2}return t.minus(o).abs()}function ee(e,t,n,a){var o,r,s,c,l,f,p,b,m,h=e.constructor,g=void 0!==n;if(g?(U(n,1,u),void 0===a?a=h.rounding:U(a,0,8)):(n=h.precision,a=h.rounding),e.isFinite()){for(g?(o=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):o=t,(s=(p=O(e)).indexOf("."))>=0&&(p=p.replace(".",""),(m=new h(1)).e=p.length-s,m.d=B(O(m),10,o),m.e=m.d.length),r=l=(b=B(p,10,o)).length;0==b[--l];)b.pop();if(b[0]){if(s<0?r--:((e=new h(e)).d=b,e.e=r,b=(e=D(e,m,n,a,0,o)).d,r=e.e,f=i),s=b[n],c=o/2,f=f||void 0!==b[n+1],f=a<4?(void 0!==s||f)&&(0===a||a===(e.s<0?3:2)):s>c||s===c&&(4===a||f||6===a&&1&b[n-1]||a===(e.s<0?8:7)),b.length=n,f)for(;++b[--n]>o-1;)b[n]=0,n||(++r,b.unshift(1));for(l=b.length;!b[l-1];--l);for(s=0,p="";s1)if(16==t||8==t){for(s=16==t?4:3,--l;l%s;l++)p+="0";for(l=(b=B(p,o,t)).length;!b[l-1];--l);for(s=1,p="1.";sl)for(r-=l;r--;)p+="0";else rt)return e.length=t,!0}function ne(e){return new this(e).abs()}function ae(e){return new this(e).acos()}function oe(e){return new this(e).acosh()}function re(e,t){return new this(e).plus(t)}function ie(e){return new this(e).asin()}function se(e){return new this(e).asinh()}function ce(e){return new this(e).atan()}function ue(e){return new this(e).atanh()}function de(e,t){e=new this(e),t=new this(t);var n,a=this.precision,o=this.rounding,r=a+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?j(this,a,o):new this(0)).s=e.s:!e.d||t.isZero()?(n=j(this,r,1).times(.5)).s=e.s:t.s<0?(this.precision=r,this.rounding=1,n=this.atan(D(e,t,r,1)),t=j(this,r,1),this.precision=a,this.rounding=o,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(D(e,t,r,1)):(n=j(this,r,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function le(e){return new this(e).cbrt()}function fe(e){return N(e=new this(e),e.e+1,2)}function pe(e,t,n){return new this(e).clamp(t,n)}function be(e){if(!e||"object"!==typeof e)throw Error(m+"Object expected");var t,n,a,o=!0===e.defaults,r=["precision",1,u,"rounding",0,8,"toExpNeg",-c,0,"toExpPos",0,c,"maxE",0,c,"minE",-c,0,"modulo",0,9];for(t=0;t=r[t+1]&&a<=r[t+2]))throw Error(h+n+": "+a);this[n]=a}if(n="crypto",o&&(this[n]=p[n]),void 0!==(a=e[n])){if(!0!==a&&!1!==a&&0!==a&&1!==a)throw Error(h+n+": "+a);if(a){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(y);this[n]=!0}else this[n]=!1}return this}function me(e){return new this(e).cos()}function he(e){return new this(e).cosh()}function ge(e,t){return new this(e).div(t)}function ye(e){return new this(e).exp()}function ve(e){return N(e=new this(e),e.e+1,3)}function we(){var e,t,n=new this(0);for(b=!1,e=0;e=429e7?t[r]=crypto.getRandomValues(new Uint32Array(1))[0]:s[r++]=o%1e7;else{if(!crypto.randomBytes)throw Error(y);for(t=crypto.randomBytes(a*=4);r=214e7?crypto.randomBytes(4).copy(t,r):(s.push(o%1e7),r+=4);r=a/4}else for(;r=10;o/=10)a++;ar.maxE?(o.e=NaN,o.d=null):e.e=10;n/=10)t++;return void(b?t>r.maxE?(o.e=NaN,o.d=null):t2?arguments[2]:{},r=a(t);o&&(r=i.call(r,Object.getOwnPropertySymbols(t)));for(var s=0;s0;a--)t+=this._buffer(e,t),n+=this._flushBuffer(o,n);return t+=this._buffer(e,t),o},o.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},o.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];n=r.r28shl(n,s),o=r.r28shl(o,s),r.pc2(n,o,e.keys,i)}},c.prototype._update=function(e,t,n,a){var o=this._desState,i=r.readUInt32BE(e,t),s=r.readUInt32BE(e,t+4);r.ip(i,s,o.tmp,0),i=o.tmp[0],s=o.tmp[1],"encrypt"===this.type?this._encrypt(o,i,s,o.tmp,0):this._decrypt(o,i,s,o.tmp,0),i=o.tmp[0],s=o.tmp[1],r.writeUInt32BE(n,i,a),r.writeUInt32BE(n,s,a+4)},c.prototype._pad=function(e,t){for(var n=e.length-t,a=t;a>>0,i=f}r.rip(s,i,a,o)},c.prototype._decrypt=function(e,t,n,a,o){for(var i=n,s=t,c=e.keys.length-2;c>=0;c-=2){var u=e.keys[c],d=e.keys[c+1];r.expand(i,e.tmp,0),u^=e.tmp[0],d^=e.tmp[1];var l=r.substitute(u,d),f=i;i=(s^r.permute(l))>>>0,s=f}r.rip(i,s,a,o)}},49209:function(e,t,n){"use strict";var a=n(72259),o=n(39703),r=n(45751),i=n(24655);function s(e,t){a.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),o=t.slice(8,16),r=t.slice(16,24);this.ciphers="encrypt"===e?[i.create({type:"encrypt",key:n}),i.create({type:"decrypt",key:o}),i.create({type:"encrypt",key:r})]:[i.create({type:"decrypt",key:r}),i.create({type:"encrypt",key:o}),i.create({type:"decrypt",key:n})]}function c(e){r.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}o(c,r),e.exports=c,c.create=function(e){return new c(e)},c.prototype._update=function(e,t,n,a){var o=this._edeState;o.ciphers[0]._update(e,t,n,a),o.ciphers[1]._update(n,a,n,a),o.ciphers[2]._update(n,a,n,a)},c.prototype._pad=i.prototype._pad,c.prototype._unpad=i.prototype._unpad},5207:function(e,t){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,a){for(var o=0,r=0,i=6;i>=0;i-=2){for(var s=0;s<=24;s+=8)o<<=1,o|=t>>>s+i&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>>s+i&1}for(i=6;i>=0;i-=2){for(s=1;s<=25;s+=8)r<<=1,r|=t>>>s+i&1;for(s=1;s<=25;s+=8)r<<=1,r|=e>>>s+i&1}n[a+0]=o>>>0,n[a+1]=r>>>0},t.rip=function(e,t,n,a){for(var o=0,r=0,i=0;i<4;i++)for(var s=24;s>=0;s-=8)o<<=1,o|=t>>>s+i&1,o<<=1,o|=e>>>s+i&1;for(i=4;i<8;i++)for(s=24;s>=0;s-=8)r<<=1,r|=t>>>s+i&1,r<<=1,r|=e>>>s+i&1;n[a+0]=o>>>0,n[a+1]=r>>>0},t.pc1=function(e,t,n,a){for(var o=0,r=0,i=7;i>=5;i--){for(var s=0;s<=24;s+=8)o<<=1,o|=t>>s+i&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+i&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+i&1;for(i=1;i<=3;i++){for(s=0;s<=24;s+=8)r<<=1,r|=t>>s+i&1;for(s=0;s<=24;s+=8)r<<=1,r|=e>>s+i&1}for(s=0;s<=24;s+=8)r<<=1,r|=e>>s+i&1;n[a+0]=o>>>0,n[a+1]=r>>>0},t.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,a,o){for(var r=0,i=0,s=n.length>>>1,c=0;c>>n[c]&1;for(c=s;c>>n[c]&1;a[o+0]=r>>>0,a[o+1]=i>>>0},t.expand=function(e,t,n){var a=0,o=0;a=(1&e)<<5|e>>>27;for(var r=23;r>=15;r-=4)a<<=6,a|=e>>>r&63;for(r=11;r>=3;r-=4)o|=e>>>r&63,o<<=6;o|=(31&e)<<1|e>>>31,t[n+0]=a>>>0,t[n+1]=o>>>0};var a=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,o=0;o<4;o++){n<<=4,n|=a[64*o+(e>>>18-6*o&63)]}for(o=0;o<4;o++){n<<=4,n|=a[256+64*o+(t>>>18-6*o&63)]}return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n>>o[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var a=e.toString(2);a.lengthe;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(c),t.cmp(c)){if(!t.cmp(u))for(;n.mod(d).cmp(l);)n.iadd(p)}else for(;n.mod(r).cmp(f);)n.iadd(p);if(h(b=n.shrn(1))&&h(n)&&g(b)&&g(n)&&i.test(b)&&i.test(n))return n}}},94298:function(e,t,n){!function(e,t){"use strict";function a(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function r(e,t,n){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var i;"object"===typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{i="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(7748).Buffer}catch(T){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(e,t,n){var a=s(e,n);return n-1>=t&&(a|=s(e,n-1)<<4),a}function u(e,t,n,a){for(var o=0,r=Math.min(e.length,n),i=t;i=49?s-49+10:s>=17?s-17+10:s}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"===typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=i<>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a=t;a-=2)o=c(e,t,a)<=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;else for(a=(e.length-t)%2===0?t+1:t;a=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,o=1;o<=67108863;o*=t)a++;a--,o=o/t|0;for(var r=e.length-n,i=r%a,s=Math.min(r,r-i)+n,c=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var a=e.length+t.length|0;n.length=a,a=a-1|0;var o=0|e.words[0],r=0|t.words[0],i=o*r,s=67108863&i,c=i/67108864|0;n.words[0]=s;for(var u=1;u>>26,l=67108863&c,f=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=f;p++){var b=u-p|0;d+=(i=(o=0|e.words[b])*(r=0|t.words[p])+l)/67108864|0,l=67108863&i}n.words[u]=0|l,c=0|d}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,i=0;i>>24-o&16777215)||i!==this.length-1?d[6-c.length]+c+n:c+n,(o+=2)>=26&&(o-=26,i--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=l[e],p=f[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var m=b.modn(p).toString(e);n=(b=b.idivn(p)).isZero()?m+n:d[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return a("undefined"!==typeof i),this.toArrayLike(i,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);a(o<=r,"byte array longer than desired length"),a(r>0,"Requested array length <= 0"),this.strip();var i,s,c="le"===t,u=new e(r),d=this.clone();if(c){for(s=0;!d.isZero();s++)i=d.andln(255),d.iushrn(8),u[s]=i;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;ae.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){a("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){a("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,a=e):(n=e,a=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,a,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,a=e):(n=e,a=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,p=0|i[1],b=8191&p,m=p>>>13,h=0|i[2],g=8191&h,y=h>>>13,v=0|i[3],w=8191&v,k=v>>>13,A=0|i[4],x=8191&A,I=A>>>13,T=0|i[5],S=8191&T,C=T>>>13,E=0|i[6],R=8191&E,M=E>>>13,P=0|i[7],U=8191&P,_=P>>>13,B=0|i[8],D=8191&B,N=B>>>13,O=0|i[9],F=8191&O,L=O>>>13,j=0|s[0],H=8191&j,G=j>>>13,z=0|s[1],K=8191&z,W=z>>>13,Z=0|s[2],V=8191&Z,q=Z>>>13,Q=0|s[3],J=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,ae=te>>>13,oe=0|s[6],re=8191&oe,ie=oe>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,de=0|s[8],le=8191&de,fe=de>>>13,pe=0|s[9],be=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var he=(u+(a=Math.imul(l,H))|0)+((8191&(o=(o=Math.imul(l,G))+Math.imul(f,H)|0))<<13)|0;u=((r=Math.imul(f,G))+(o>>>13)|0)+(he>>>26)|0,he&=67108863,a=Math.imul(b,H),o=(o=Math.imul(b,G))+Math.imul(m,H)|0,r=Math.imul(m,G);var ge=(u+(a=a+Math.imul(l,K)|0)|0)+((8191&(o=(o=o+Math.imul(l,W)|0)+Math.imul(f,K)|0))<<13)|0;u=((r=r+Math.imul(f,W)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,a=Math.imul(g,H),o=(o=Math.imul(g,G))+Math.imul(y,H)|0,r=Math.imul(y,G),a=a+Math.imul(b,K)|0,o=(o=o+Math.imul(b,W)|0)+Math.imul(m,K)|0,r=r+Math.imul(m,W)|0;var ye=(u+(a=a+Math.imul(l,V)|0)|0)+((8191&(o=(o=o+Math.imul(l,q)|0)+Math.imul(f,V)|0))<<13)|0;u=((r=r+Math.imul(f,q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,a=Math.imul(w,H),o=(o=Math.imul(w,G))+Math.imul(k,H)|0,r=Math.imul(k,G),a=a+Math.imul(g,K)|0,o=(o=o+Math.imul(g,W)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,W)|0,a=a+Math.imul(b,V)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(m,V)|0,r=r+Math.imul(m,q)|0;var ve=(u+(a=a+Math.imul(l,J)|0)|0)+((8191&(o=(o=o+Math.imul(l,Y)|0)+Math.imul(f,J)|0))<<13)|0;u=((r=r+Math.imul(f,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,a=Math.imul(x,H),o=(o=Math.imul(x,G))+Math.imul(I,H)|0,r=Math.imul(I,G),a=a+Math.imul(w,K)|0,o=(o=o+Math.imul(w,W)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,W)|0,a=a+Math.imul(g,V)|0,o=(o=o+Math.imul(g,q)|0)+Math.imul(y,V)|0,r=r+Math.imul(y,q)|0,a=a+Math.imul(b,J)|0,o=(o=o+Math.imul(b,Y)|0)+Math.imul(m,J)|0,r=r+Math.imul(m,Y)|0;var we=(u+(a=a+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((r=r+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,a=Math.imul(S,H),o=(o=Math.imul(S,G))+Math.imul(C,H)|0,r=Math.imul(C,G),a=a+Math.imul(x,K)|0,o=(o=o+Math.imul(x,W)|0)+Math.imul(I,K)|0,r=r+Math.imul(I,W)|0,a=a+Math.imul(w,V)|0,o=(o=o+Math.imul(w,q)|0)+Math.imul(k,V)|0,r=r+Math.imul(k,q)|0,a=a+Math.imul(g,J)|0,o=(o=o+Math.imul(g,Y)|0)+Math.imul(y,J)|0,r=r+Math.imul(y,Y)|0,a=a+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(m,$)|0,r=r+Math.imul(m,ee)|0;var ke=(u+(a=a+Math.imul(l,ne)|0)|0)+((8191&(o=(o=o+Math.imul(l,ae)|0)+Math.imul(f,ne)|0))<<13)|0;u=((r=r+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,a=Math.imul(R,H),o=(o=Math.imul(R,G))+Math.imul(M,H)|0,r=Math.imul(M,G),a=a+Math.imul(S,K)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(C,K)|0,r=r+Math.imul(C,W)|0,a=a+Math.imul(x,V)|0,o=(o=o+Math.imul(x,q)|0)+Math.imul(I,V)|0,r=r+Math.imul(I,q)|0,a=a+Math.imul(w,J)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(k,J)|0,r=r+Math.imul(k,Y)|0,a=a+Math.imul(g,$)|0,o=(o=o+Math.imul(g,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,a=a+Math.imul(b,ne)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(m,ne)|0,r=r+Math.imul(m,ae)|0;var Ae=(u+(a=a+Math.imul(l,re)|0)|0)+((8191&(o=(o=o+Math.imul(l,ie)|0)+Math.imul(f,re)|0))<<13)|0;u=((r=r+Math.imul(f,ie)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,a=Math.imul(U,H),o=(o=Math.imul(U,G))+Math.imul(_,H)|0,r=Math.imul(_,G),a=a+Math.imul(R,K)|0,o=(o=o+Math.imul(R,W)|0)+Math.imul(M,K)|0,r=r+Math.imul(M,W)|0,a=a+Math.imul(S,V)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(C,V)|0,r=r+Math.imul(C,q)|0,a=a+Math.imul(x,J)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(I,J)|0,r=r+Math.imul(I,Y)|0,a=a+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,a=a+Math.imul(g,ne)|0,o=(o=o+Math.imul(g,ae)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ae)|0,a=a+Math.imul(b,re)|0,o=(o=o+Math.imul(b,ie)|0)+Math.imul(m,re)|0,r=r+Math.imul(m,ie)|0;var xe=(u+(a=a+Math.imul(l,ce)|0)|0)+((8191&(o=(o=o+Math.imul(l,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((r=r+Math.imul(f,ue)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,a=Math.imul(D,H),o=(o=Math.imul(D,G))+Math.imul(N,H)|0,r=Math.imul(N,G),a=a+Math.imul(U,K)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(_,K)|0,r=r+Math.imul(_,W)|0,a=a+Math.imul(R,V)|0,o=(o=o+Math.imul(R,q)|0)+Math.imul(M,V)|0,r=r+Math.imul(M,q)|0,a=a+Math.imul(S,J)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(C,J)|0,r=r+Math.imul(C,Y)|0,a=a+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(I,$)|0,r=r+Math.imul(I,ee)|0,a=a+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ae)|0,a=a+Math.imul(g,re)|0,o=(o=o+Math.imul(g,ie)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,ie)|0,a=a+Math.imul(b,ce)|0,o=(o=o+Math.imul(b,ue)|0)+Math.imul(m,ce)|0,r=r+Math.imul(m,ue)|0;var Ie=(u+(a=a+Math.imul(l,le)|0)|0)+((8191&(o=(o=o+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;u=((r=r+Math.imul(f,fe)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,a=Math.imul(F,H),o=(o=Math.imul(F,G))+Math.imul(L,H)|0,r=Math.imul(L,G),a=a+Math.imul(D,K)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,W)|0,a=a+Math.imul(U,V)|0,o=(o=o+Math.imul(U,q)|0)+Math.imul(_,V)|0,r=r+Math.imul(_,q)|0,a=a+Math.imul(R,J)|0,o=(o=o+Math.imul(R,Y)|0)+Math.imul(M,J)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(C,$)|0,r=r+Math.imul(C,ee)|0,a=a+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(I,ne)|0,r=r+Math.imul(I,ae)|0,a=a+Math.imul(w,re)|0,o=(o=o+Math.imul(w,ie)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,ie)|0,a=a+Math.imul(g,ce)|0,o=(o=o+Math.imul(g,ue)|0)+Math.imul(y,ce)|0,r=r+Math.imul(y,ue)|0,a=a+Math.imul(b,le)|0,o=(o=o+Math.imul(b,fe)|0)+Math.imul(m,le)|0,r=r+Math.imul(m,fe)|0;var Te=(u+(a=a+Math.imul(l,be)|0)|0)+((8191&(o=(o=o+Math.imul(l,me)|0)+Math.imul(f,be)|0))<<13)|0;u=((r=r+Math.imul(f,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,a=Math.imul(F,K),o=(o=Math.imul(F,W))+Math.imul(L,K)|0,r=Math.imul(L,W),a=a+Math.imul(D,V)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(N,V)|0,r=r+Math.imul(N,q)|0,a=a+Math.imul(U,J)|0,o=(o=o+Math.imul(U,Y)|0)+Math.imul(_,J)|0,r=r+Math.imul(_,Y)|0,a=a+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(M,$)|0,r=r+Math.imul(M,ee)|0,a=a+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(C,ne)|0,r=r+Math.imul(C,ae)|0,a=a+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ie)|0)+Math.imul(I,re)|0,r=r+Math.imul(I,ie)|0,a=a+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(k,ce)|0,r=r+Math.imul(k,ue)|0,a=a+Math.imul(g,le)|0,o=(o=o+Math.imul(g,fe)|0)+Math.imul(y,le)|0,r=r+Math.imul(y,fe)|0;var Se=(u+(a=a+Math.imul(b,be)|0)|0)+((8191&(o=(o=o+Math.imul(b,me)|0)+Math.imul(m,be)|0))<<13)|0;u=((r=r+Math.imul(m,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,a=Math.imul(F,V),o=(o=Math.imul(F,q))+Math.imul(L,V)|0,r=Math.imul(L,q),a=a+Math.imul(D,J)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(N,J)|0,r=r+Math.imul(N,Y)|0,a=a+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(_,$)|0,r=r+Math.imul(_,ee)|0,a=a+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(M,ne)|0,r=r+Math.imul(M,ae)|0,a=a+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ie)|0)+Math.imul(C,re)|0,r=r+Math.imul(C,ie)|0,a=a+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,ue)|0)+Math.imul(I,ce)|0,r=r+Math.imul(I,ue)|0,a=a+Math.imul(w,le)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(k,le)|0,r=r+Math.imul(k,fe)|0;var Ce=(u+(a=a+Math.imul(g,be)|0)|0)+((8191&(o=(o=o+Math.imul(g,me)|0)+Math.imul(y,be)|0))<<13)|0;u=((r=r+Math.imul(y,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,a=Math.imul(F,J),o=(o=Math.imul(F,Y))+Math.imul(L,J)|0,r=Math.imul(L,Y),a=a+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,a=a+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(_,ne)|0,r=r+Math.imul(_,ae)|0,a=a+Math.imul(R,re)|0,o=(o=o+Math.imul(R,ie)|0)+Math.imul(M,re)|0,r=r+Math.imul(M,ie)|0,a=a+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(C,ce)|0,r=r+Math.imul(C,ue)|0,a=a+Math.imul(x,le)|0,o=(o=o+Math.imul(x,fe)|0)+Math.imul(I,le)|0,r=r+Math.imul(I,fe)|0;var Ee=(u+(a=a+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(k,be)|0))<<13)|0;u=((r=r+Math.imul(k,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,a=Math.imul(F,$),o=(o=Math.imul(F,ee))+Math.imul(L,$)|0,r=Math.imul(L,ee),a=a+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ae)|0,a=a+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ie)|0)+Math.imul(_,re)|0,r=r+Math.imul(_,ie)|0,a=a+Math.imul(R,ce)|0,o=(o=o+Math.imul(R,ue)|0)+Math.imul(M,ce)|0,r=r+Math.imul(M,ue)|0,a=a+Math.imul(S,le)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(C,le)|0,r=r+Math.imul(C,fe)|0;var Re=(u+(a=a+Math.imul(x,be)|0)|0)+((8191&(o=(o=o+Math.imul(x,me)|0)+Math.imul(I,be)|0))<<13)|0;u=((r=r+Math.imul(I,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,a=Math.imul(F,ne),o=(o=Math.imul(F,ae))+Math.imul(L,ne)|0,r=Math.imul(L,ae),a=a+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,ie)|0,a=a+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,ue)|0)+Math.imul(_,ce)|0,r=r+Math.imul(_,ue)|0,a=a+Math.imul(R,le)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(M,le)|0,r=r+Math.imul(M,fe)|0;var Me=(u+(a=a+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,me)|0)+Math.imul(C,be)|0))<<13)|0;u=((r=r+Math.imul(C,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,a=Math.imul(F,re),o=(o=Math.imul(F,ie))+Math.imul(L,re)|0,r=Math.imul(L,ie),a=a+Math.imul(D,ce)|0,o=(o=o+Math.imul(D,ue)|0)+Math.imul(N,ce)|0,r=r+Math.imul(N,ue)|0,a=a+Math.imul(U,le)|0,o=(o=o+Math.imul(U,fe)|0)+Math.imul(_,le)|0,r=r+Math.imul(_,fe)|0;var Pe=(u+(a=a+Math.imul(R,be)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(M,be)|0))<<13)|0;u=((r=r+Math.imul(M,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,a=Math.imul(F,ce),o=(o=Math.imul(F,ue))+Math.imul(L,ce)|0,r=Math.imul(L,ue),a=a+Math.imul(D,le)|0,o=(o=o+Math.imul(D,fe)|0)+Math.imul(N,le)|0,r=r+Math.imul(N,fe)|0;var Ue=(u+(a=a+Math.imul(U,be)|0)|0)+((8191&(o=(o=o+Math.imul(U,me)|0)+Math.imul(_,be)|0))<<13)|0;u=((r=r+Math.imul(_,me)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,a=Math.imul(F,le),o=(o=Math.imul(F,fe))+Math.imul(L,le)|0,r=Math.imul(L,fe);var _e=(u+(a=a+Math.imul(D,be)|0)|0)+((8191&(o=(o=o+Math.imul(D,me)|0)+Math.imul(N,be)|0))<<13)|0;u=((r=r+Math.imul(N,me)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863;var Be=(u+(a=Math.imul(F,be))|0)+((8191&(o=(o=Math.imul(F,me))+Math.imul(L,be)|0))<<13)|0;return u=((r=Math.imul(L,me))+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=he,c[1]=ge,c[2]=ye,c[3]=ve,c[4]=we,c[5]=ke,c[6]=Ae,c[7]=xe,c[8]=Ie,c[9]=Te,c[10]=Se,c[11]=Ce,c[12]=Ee,c[13]=Re,c[14]=Me,c[15]=Pe,c[16]=Ue,c[17]=_e,c[18]=Be,0!==u&&(c[19]=u,n.length++),n};function m(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(b=p),r.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return n=10===this.length&&10===e.length?b(this,e,t):a<63?p(this,e,t):a<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var a=0,o=0,r=0;r>>26)|0)>>>26,i&=67108863}n.words[r]=s,a=i,i=o}return 0!==a?n.words[r]=a:n.length--,n.strip()}(this,e,t):m(this,e,t),n},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,a=0;a>=1;return a},h.prototype.permute=function(e,t,n,a,o,r){for(var i=0;i>>=1)o++;return 1<>>=13,n[2*i+1]=8191&r,r>>>=13;for(i=2*t;i>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,a=0;a=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var i=0;for(t=0;t>>26-n}i&&(this.words[t]=i,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,i=Math.min((e-r)/26,this.length),s=67108863^67108863>>>r<i)for(this.length-=i,u=0;u=0&&(0!==d||u>=o);u--){var l=0|this.words[u];this.words[u]=d<<26-r|l>>>r,d=l&s}return c&&0!==d&&(c.words[c.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return a(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){a("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(a("number"===typeof e),a(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===s)return this.strip();for(a(-1===s),s=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),o=e,i=0|o.words[o.length-1];0!==(n=26-this._countBits(i))&&(o=o.ushln(n),a.iushln(n),i=0|o.words[o.length-1]);var s,c=a.length-o.length;if("mod"!==t){(s=new r(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var f=67108864*(0|a.words[o.length+l])+(0|a.words[o.length+l-1]);for(f=Math.min(f/i|0,67108863),a._ishlnsubmul(o,f,l);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(o,1,l),a.isZero()||(a.negative^=1);s&&(s.words[l]=f)}return s&&s.strip(),a.strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:s||null,mod:a}},r.prototype.divmod=function(e,t,n){return a(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:o,mod:i}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:s.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,i,s},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,a=e.ushrn(1),o=e.andln(1),r=n.cmp(a);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){a(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){a(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),i=new r(0),s=new r(0),c=new r(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var d=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;0===(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(d),i.isub(l)),o.iushrn(1),i.iushrn(1);for(var b=0,m=1;0===(n.words[0]&m)&&b<26;++b,m<<=1);if(b>0)for(n.iushrn(b);b-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(d),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),i.isub(c)):(n.isub(t),s.isub(o),c.isub(i))}return{a:s,b:c,gcd:n.iushln(u)}},r.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,i=new r(1),s=new r(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,d=1;0===(t.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(c),i.iushrn(1);for(var l=0,f=1;0===(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s)):(n.isub(t),s.isub(i))}return(o=0===t.cmpn(1)?i:s).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(a)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){a("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,s&=67108863,this.words[i]=s}return 0!==r&&(this.words[i]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),a(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var a=0|this.words[n],o=0|e.words[n];if(a!==o){ao&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new x(e)},r.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var a=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(v,y),v.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),o=0;o>>22,r=i}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=a}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},x.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){a(0===(e.negative|t.negative),"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2===1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),i=0;!o.isZero()&&0===o.andln(1);)i++,o.iushrn(1);a(!o.isZero());var s=new r(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new r(2*d*d).toRed(this);0!==this.pow(d,u).cmp(c);)d.redIAdd(c);for(var l=this.pow(d,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),b=i;0!==p.cmp(s);){for(var m=p,h=0;0!==m.cmp(s);h++)m=m.redSqr();a(h=0;a--){for(var u=t.words[a],d=c-1;d>=0;d--){var l=u>>d&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==i?(i<<=1,i|=l,(4===++s||0===a&&0===d)&&(o=this.mul(o,n[i]),s=0,i=0)):s=0}c=26}return o},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new I(e)},o(I,x),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},94366:function(e,t,n){"use strict";var a=n(54659).Buffer,o=new(0,n(69205).ec)("secp256k1"),r=n.g.crypto||n.g.msCrypto||{},i=r.subtle||r.webkitSubtle,s=n(21921),c=a.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),u=a.alloc(32,0);function d(e,t){if(!e)throw new Error(t||"Assertion failed")}function l(e){return t=e,!(!a.isBuffer(t)||32!==t.length)&&(e.compare(u)>0&&e.compare(c)<0);var t}function f(e){var t=new Uint8Array(e);return"undefined"===typeof r.getRandomValues?a.from(s.randomBytes(e)):(r.getRandomValues(t),a.from(t))}function p(e){return new Promise((function(t){var n=s.createHash("sha512").update(e).digest();t(new Uint8Array(n))}))}function b(e){return function(t,n,o){return new Promise((function(r){if(i){return i.importKey("raw",n,{name:"AES-CBC"},!1,[e]).then((function(n){var a={name:"AES-CBC",iv:t};return i[e](a,n,o)})).then((function(e){r(a.from(new Uint8Array(e)))}))}if("encrypt"===e){var c=s.createCipheriv("aes-256-cbc",n,t),u=c.update(o),d=c.final();r(a.concat([u,d]))}else if("decrypt"===e){var l=s.createDecipheriv("aes-256-cbc",n,t),f=l.update(o),p=l.final();r(a.concat([f,p]))}}))}}var m=b("encrypt"),h=b("decrypt");var g=function(e){return d(32===e.length,"Bad private key"),d(l(e),"Bad private key"),a.from(o.keyFromPrivate(e).getPublic("arr"))};var y=function(e,t){return new Promise((function(n){d(a.isBuffer(e),"Bad private key"),d(a.isBuffer(t),"Bad public key"),d(32===e.length,"Bad private key"),d(l(e),"Bad private key"),d(65===t.length||33===t.length,"Bad public key"),65===t.length&&d(4===t[0],"Bad public key"),33===t.length&&d(2===t[0]||3===t[0],"Bad public key");var r=o.keyFromPrivate(e),i=o.keyFromPublic(t),s=r.derive(i.getPublic());n(a.from(s.toArray()))}))};t.HI=function(e,t,n){var o,r,i,c;return n=n||{},new Promise((function(t){for(var a=n.ephemPrivateKey||f(32);!l(a);)a=n.ephemPrivateKey||f(32);r=g(a),t(y(a,e))})).then((function(e){return p(e)})).then((function(e){o=n.iv||f(16);var a=e.slice(0,32);return c=e.slice(32),m(o,a,t)})).then((function(e){i=e;var t=a.concat([o,r,i]);return function(e,t){return new Promise((function(n){var o=s.createHmac("sha256",a.from(e));o.update(t),n(o.digest())}))}(c,t)})).then((function(e){return{iv:o,ephemPublicKey:r,ciphertext:i,mac:e}}))},t.pe=function(e,t){var n;return y(e,t.ephemPublicKey).then((function(e){return p(e)})).then((function(e){n=e.slice(0,32);var o,r,i,c=e.slice(32),u=a.concat([t.iv,t.ephemPublicKey,t.ciphertext]);return o=c,r=u,i=t.mac,new Promise((function(e){var t=s.createHmac("sha256",a.from(o));t.update(r),e(function(e,t){if(e.length!==t.length)return!1;for(var n=0,a=0;a0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var n=e._getDoubles(),a=r(t,1,this._bitLength),o=(1<=i;d--)c=(c<<1)+a[d];u.push(c)}for(var l=this.jpoint(null,null,null),f=this.jpoint(null,null,null),p=o;p>0;p--){for(i=0;i=0;u--){for(var d=0;u>=0&&0===i[u];u--)d++;if(u>=0&&d++,c=c.dblp(d),u<0)break;var l=i[u];s(0!==l),c="affine"===e.type?l>0?c.mixedAdd(o[l-1>>1]):c.mixedAdd(o[-l-1>>1].neg()):l>0?c.add(o[l-1>>1]):c.add(o[-l-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,n,a,o){var s,c,u,d=this._wnafT1,l=this._wnafT2,f=this._wnafT3,p=0;for(s=0;s=1;s-=2){var m=s-1,h=s;if(1===d[m]&&1===d[h]){var g=[t[m],null,null,t[h]];0===t[m].y.cmp(t[h].y)?(g[1]=t[m].add(t[h]),g[2]=t[m].toJ().mixedAdd(t[h].neg())):0===t[m].y.cmp(t[h].y.redNeg())?(g[1]=t[m].toJ().mixedAdd(t[h]),g[2]=t[m].add(t[h].neg())):(g[1]=t[m].toJ().mixedAdd(t[h]),g[2]=t[m].toJ().mixedAdd(t[h].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],v=i(n[m],n[h]);for(p=Math.max(v[0].length,p),f[m]=new Array(p),f[h]=new Array(p),c=0;c=0;s--){for(var I=0;s>=0;){var T=!0;for(c=0;c=0&&I++,A=A.dblp(I),s<0)break;for(c=0;c0?u=l[c][S-1>>1]:S<0&&(u=l[c][-S-1>>1].neg()),A="affine"===u.type?A.mixedAdd(u):A.add(u))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],a=this,o=0;o":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var a=this.curve._mulA(e),o=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),r=a.redAdd(t),i=r.redSub(n),s=a.redSub(t),c=o.redMul(i),u=r.redMul(s),d=o.redMul(s),l=i.redMul(r);return this.curve.point(c,u,l,d)},u.prototype._projDbl=function(){var e,t,n,a,o,r,i=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(a=this.curve._mulA(s)).redAdd(c);this.zOne?(e=i.redSub(s).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(a.redSub(c)),n=u.redSqr().redSub(u).redSub(u)):(o=this.z.redSqr(),r=u.redSub(o).redISub(o),e=i.redSub(s).redISub(c).redMul(r),t=u.redMul(a.redSub(c)),n=u.redMul(r))}else a=s.redAdd(c),o=this.curve._mulC(this.z).redSqr(),r=a.redSub(o).redSub(o),e=this.curve._mulC(i.redISub(a)).redMul(r),t=this.curve._mulC(a).redMul(s.redISub(c)),n=a.redMul(r);return this.curve.point(e,t,n)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),a=this.t.redMul(this.curve.dd).redMul(e.t),o=this.z.redMul(e.z.redAdd(e.z)),r=n.redSub(t),i=o.redSub(a),s=o.redAdd(a),c=n.redAdd(t),u=r.redMul(i),d=s.redMul(c),l=r.redMul(c),f=i.redMul(s);return this.curve.point(u,d,f,l)},u.prototype._projAdd=function(e){var t,n,a=this.z.redMul(e.z),o=a.redSqr(),r=this.x.redMul(e.x),i=this.y.redMul(e.y),s=this.curve.d.redMul(r).redMul(i),c=o.redSub(s),u=o.redAdd(s),d=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(r).redISub(i),l=a.redMul(c).redMul(d);return this.curve.twisted?(t=a.redMul(u).redMul(i.redSub(this.curve._mulA(r))),n=c.redMul(u)):(t=a.redMul(u).redMul(i.redSub(r)),n=this.curve._mulC(c).redMul(u)),this.curve.point(l,t,n)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},u.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),a=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(a),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},23132:function(e,t,n){"use strict";var a=t;a.base=n(99116),a.short=n(89050),a.mont=n(26759),a.edwards=n(65807)},26759:function(e,t,n){"use strict";var a=n(26749),o=n(39703),r=n(99116),i=n(12162);function s(e){r.call(this,"mont",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.i4=new a(4).toRed(this.red).redInvm(),this.two=new a(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,n){r.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new a(t,16),this.z=new a(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(s,r),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),a=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===a.redSqrt().redSqr().cmp(a)},o(c,r.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(i.toArray(e,t),1)},s.prototype.point=function(e,t){return new c(this,e,t)},s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),a=e.redMul(t),o=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(a,o)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),a=this.x.redSub(this.z),o=e.x.redAdd(e.z),r=e.x.redSub(e.z).redMul(n),i=o.redMul(a),s=t.z.redMul(r.redAdd(i).redSqr()),c=t.x.redMul(r.redISub(i).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(e){for(var t=e.clone(),n=this,a=this.curve.point(null,null),o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var r=o.length-1;r>=0;r--)0===o[r]?(n=n.diffAdd(a,this),a=a.dbl()):(a=n.diffAdd(a,this),n=n.dbl());return a},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},89050:function(e,t,n){"use strict";var a=n(12162),o=n(26749),r=n(39703),i=n(99116),s=a.assert;function c(e){i.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,n,a){i.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(n,16),a&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function d(e,t,n,a){i.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===a?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(n,16),this.z=new o(a,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}r(c,i),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new o(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);t=(t=a[0].cmp(a[1])<0?a[0]:a[1]).toRed(this.red)}if(e.lambda)n=new o(e.lambda,16);else{var r=this._getEndoRoots(this.n);0===this.g.mul(r[0]).x.cmp(this.g.x.redMul(t))?n=r[0]:(n=r[1],s(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new o(e.a,16),b:new o(e.b,16)}})):this._getEndoBasis(n)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:o.mont(e),n=new o(2).toRed(t).redInvm(),a=n.redNeg(),r=new o(3).toRed(t).redNeg().redSqrt().redMul(n);return[a.redAdd(r).fromRed(),a.redSub(r).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,n,a,r,i,s,c,u,d,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,p=this.n.clone(),b=new o(1),m=new o(0),h=new o(0),g=new o(1),y=0;0!==f.cmpn(0);){var v=p.div(f);u=p.sub(v.mul(f)),d=h.sub(v.mul(b));var w=g.sub(v.mul(m));if(!a&&u.cmp(l)<0)t=c.neg(),n=b,a=u.neg(),r=d;else if(a&&2===++y)break;c=u,p=f,f=u,h=b,b=d,g=m,m=w}i=u.neg(),s=d;var k=a.sqr().add(r.sqr());return i.sqr().add(s.sqr()).cmp(k)>=0&&(i=t,s=n),a.negative&&(a=a.neg(),r=r.neg()),i.negative&&(i=i.neg(),s=s.neg()),[{a:a,b:r},{a:i,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],a=t[1],o=a.b.mul(e).divRound(this.n),r=n.b.neg().mul(e).divRound(this.n),i=o.mul(n.a),s=r.mul(a.a),c=o.mul(n.b),u=r.mul(a.b);return{k1:e.sub(i).sub(s),k2:c.add(u).neg()}},c.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=n.redSqrt();if(0!==a.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var r=a.fromRed().isOdd();return(t&&!r||!t&&r)&&(a=a.redNeg()),this.point(e,a)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,a=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(a).redIAdd(this.b);return 0===n.redSqr().redISub(o).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,n){for(var a=this._endoWnafT1,o=this._endoWnafT2,r=0;r":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),a=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,a)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),a=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(a),r=o.redSqr().redISub(this.x.redAdd(this.x)),i=o.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new o(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,n){var a=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(a,o):this.curve._wnafMulAdd(1,a,o,2)},u.prototype.jmulAdd=function(e,t,n){var a=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(a,o,!0):this.curve._wnafMulAdd(1,a,o,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,a=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(a)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(a)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},r(d,i.BasePoint),c.prototype.jpoint=function(e,t,n){return new d(this,e,t,n)},d.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),a=this.y.redMul(t).redMul(e);return this.curve.point(n,a)},d.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},d.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),a=this.x.redMul(t),o=e.x.redMul(n),r=this.y.redMul(t.redMul(e.z)),i=e.y.redMul(n.redMul(this.z)),s=a.redSub(o),c=r.redSub(i);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),d=u.redMul(s),l=a.redMul(u),f=c.redSqr().redIAdd(d).redISub(l).redISub(l),p=c.redMul(l.redISub(f)).redISub(r.redMul(d)),b=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,p,b)},d.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,a=e.x.redMul(t),o=this.y,r=e.y.redMul(t).redMul(this.z),i=n.redSub(a),s=o.redSub(r);if(0===i.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=i.redSqr(),u=c.redMul(i),d=n.redMul(c),l=s.redSqr().redIAdd(u).redISub(d).redISub(d),f=s.redMul(d.redISub(l)).redISub(o.redMul(u)),p=this.z.redMul(i);return this.curve.jpoint(l,f,p)},d.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(o),0===this.x.cmp(n))return!0}},d.prototype.inspect=function(){return this.isInfinity()?"":""},d.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},92926:function(e,t,n){"use strict";var a,o=t,r=n(46419),i=n(23132),s=n(12162).assert;function c(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var n=new c(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:n}),n}})}o.PresetCurve=c,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{a=n(73804)}catch(d){a=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",a]})},91439:function(e,t,n){"use strict";var a=n(26749),o=n(58918),r=n(12162),i=n(92926),s=n(58692),c=r.assert,u=n(80392),d=n(34990);function l(e){if(!(this instanceof l))return new l(e);"string"===typeof e&&(c(Object.prototype.hasOwnProperty.call(i,e),"Unknown curve "+e),e=i[e]),e instanceof i.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=l,l.prototype.keyPair=function(e){return new u(this,e)},l.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new a(2));;){var i=new a(t.generate(n));if(!(i.cmp(r)>0))return i.iaddn(1),this.keyFromPrivate(i)}},l.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,n,r){"object"===typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new a(e,16));for(var i=this.n.byteLength(),s=t.getPrivate().toArray("be",i),c=e.toArray("be",i),u=new o({hash:this.hash,entropy:s,nonce:c,pers:r.pers,persEnc:r.persEnc||"utf8"}),l=this.n.sub(new a(1)),f=0;;f++){var p=r.k?r.k(f):new a(u.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(l)>=0)){var b=this.g.mul(p);if(!b.isInfinity()){var m=b.getX(),h=m.umod(this.n);if(0!==h.cmpn(0)){var g=p.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var y=(b.getY().isOdd()?1:0)|(0!==m.cmp(h)?2:0);return r.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),y^=1),new d({r:h,s:g,recoveryParam:y})}}}}}},l.prototype.verify=function(e,t,n,o){e=this._truncateToN(new a(e,16)),n=this.keyFromPublic(n,o);var r=(t=new d(t,"hex")).r,i=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var s,c=i.invm(this.n),u=c.mul(e).umod(this.n),l=c.mul(r).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,n.getPublic(),l)).isInfinity()&&s.eqXToP(r):!(s=this.g.mulAdd(u,n.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(r)},l.prototype.recoverPubKey=function(e,t,n,o){c((3&n)===n,"The recovery param is more than two bits"),t=new d(t,o);var r=this.n,i=new a(e),s=t.r,u=t.s,l=1&n,f=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var p=t.r.invm(r),b=r.sub(i).mul(p).umod(r),m=u.mul(p).umod(r);return this.g.mulAdd(b,s,m)},l.prototype.getKeyRecoveryParam=function(e,t,n,a){if(null!==(t=new d(t,a)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var r;try{r=this.recoverPubKey(e,t,o)}catch(e){continue}if(r.eq(n))return o}throw new Error("Unable to find valid recovery factor")}},80392:function(e,t,n){"use strict";var a=n(26749),o=n(12162).assert;function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=r,r.fromPublic=function(e,t,n){return t instanceof r?t:new r(e,{pub:t,pubEnc:n})},r.fromPrivate=function(e,t,n){return t instanceof r?t:new r(e,{priv:t,privEnc:n})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new a(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?o(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||o(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},r.prototype.derive=function(e){return e.validate()||o(e.validate(),"public point not validated"),e.mul(this.priv).getX()},r.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},r.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},r.prototype.inspect=function(){return""}},34990:function(e,t,n){"use strict";var a=n(26749),o=n(12162),r=o.assert;function i(e,t){if(e instanceof i)return e;this._importDER(e,t)||(r(e.r&&e.s,"Signature without r or s"),this.r=new a(e.r,16),this.s=new a(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var n=e[t.place++];if(!(128&n))return n;var a=15&n;if(0===a||a>4)return!1;for(var o=0,r=0,i=t.place;r>>=0;return!(o<=127)&&(t.place=i,o)}function u(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=i,i.prototype._importDER=function(e,t){e=o.toArray(e,t);var n=new s;if(48!==e[n.place++])return!1;var r=c(e,n);if(!1===r)return!1;if(r+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var i=c(e,n);if(!1===i)return!1;var u=e.slice(n.place,i+n.place);if(n.place+=i,2!==e[n.place++])return!1;var d=c(e,n);if(!1===d)return!1;if(e.length!==d+n.place)return!1;var l=e.slice(n.place,d+n.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new a(u),this.s=new a(l),this.recoveryParam=null,!0},i.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=u(t),n=u(n);!n[0]&&!(128&n[1]);)n=n.slice(1);var a=[2];d(a,t.length),(a=a.concat(t)).push(2),d(a,n.length);var r=a.concat(n),i=[48];return d(i,r.length),i=i.concat(r),o.encode(i,e)}},62202:function(e,t,n){"use strict";var a=n(46419),o=n(92926),r=n(12162),i=r.assert,s=r.parseBytes,c=n(25347),u=n(49349);function d(e){if(i("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof d))return new d(e);e=o[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=a.sha512}e.exports=d,d.prototype.sign=function(e,t){e=s(e);var n=this.keyFromSecret(t),a=this.hashInt(n.messagePrefix(),e),o=this.g.mul(a),r=this.encodePoint(o),i=this.hashInt(r,n.pubBytes(),e).mul(n.priv()),c=a.add(i).umod(this.curve.n);return this.makeSignature({R:o,S:c,Rencoded:r})},d.prototype.verify=function(e,t,n){e=s(e),t=this.makeSignature(t);var a=this.keyFromPublic(n),o=this.hashInt(t.Rencoded(),a.pubBytes(),e),r=this.g.mul(t.S());return t.R().add(a.pub().mul(o)).eq(r)},d.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(o>>1)-1?(o>>1)-c:c,r.isubn(s)):s=0,a[i]=s,r.iushrn(1)}return a},a.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var a,o=0,r=0;e.cmpn(-o)>0||t.cmpn(-r)>0;){var i,s,c=e.andln(3)+o&3,u=t.andln(3)+r&3;3===c&&(c=-1),3===u&&(u=-1),i=0===(1&c)?0:3!==(a=e.andln(7)+o&7)&&5!==a||2!==u?c:-c,n[0].push(i),s=0===(1&u)?0:3!==(a=t.andln(7)+r&7)&&5!==a||2!==c?u:-u,n[1].push(s),2*o===i+1&&(o=1-o),2*r===s+1&&(r=1-r),e.iushrn(1),t.iushrn(1)}return n},a.cachedProperty=function(e,t,n){var a="_"+t;e.prototype[t]=function(){return void 0!==this[a]?this[a]:this[a]=n.call(this)}},a.parseBytes=function(e){return"string"===typeof e?a.toArray(e,"hex"):e},a.intFromLE=function(e){return new o(e,"hex","le")}},26749:function(e,t,n){!function(e,t){"use strict";function a(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function r(e,t,n){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var i;"object"===typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{i="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(85568).Buffer}catch(T){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(e,t,n){var a=s(e,n);return n-1>=t&&(a|=s(e,n-1)<<4),a}function u(e,t,n,a){for(var o=0,r=Math.min(e.length,n),i=t;i=49?s-49+10:s>=17?s-17+10:s}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"===typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=i<>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a=t;a-=2)o=c(e,t,a)<=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;else for(a=(e.length-t)%2===0?t+1:t;a=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,o=1;o<=67108863;o*=t)a++;a--,o=o/t|0;for(var r=e.length-n,i=r%a,s=Math.min(r,r-i)+n,c=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var a=e.length+t.length|0;n.length=a,a=a-1|0;var o=0|e.words[0],r=0|t.words[0],i=o*r,s=67108863&i,c=i/67108864|0;n.words[0]=s;for(var u=1;u>>26,l=67108863&c,f=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=f;p++){var b=u-p|0;d+=(i=(o=0|e.words[b])*(r=0|t.words[p])+l)/67108864|0,l=67108863&i}n.words[u]=0|l,c=0|d}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,i=0;i>>24-o&16777215)||i!==this.length-1?d[6-c.length]+c+n:c+n,(o+=2)>=26&&(o-=26,i--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=l[e],p=f[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var m=b.modn(p).toString(e);n=(b=b.idivn(p)).isZero()?m+n:d[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return a("undefined"!==typeof i),this.toArrayLike(i,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);a(o<=r,"byte array longer than desired length"),a(r>0,"Requested array length <= 0"),this.strip();var i,s,c="le"===t,u=new e(r),d=this.clone();if(c){for(s=0;!d.isZero();s++)i=d.andln(255),d.iushrn(8),u[s]=i;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;ae.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){a("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){a("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,a=e):(n=e,a=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,a,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,a=e):(n=e,a=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,p=0|i[1],b=8191&p,m=p>>>13,h=0|i[2],g=8191&h,y=h>>>13,v=0|i[3],w=8191&v,k=v>>>13,A=0|i[4],x=8191&A,I=A>>>13,T=0|i[5],S=8191&T,C=T>>>13,E=0|i[6],R=8191&E,M=E>>>13,P=0|i[7],U=8191&P,_=P>>>13,B=0|i[8],D=8191&B,N=B>>>13,O=0|i[9],F=8191&O,L=O>>>13,j=0|s[0],H=8191&j,G=j>>>13,z=0|s[1],K=8191&z,W=z>>>13,Z=0|s[2],V=8191&Z,q=Z>>>13,Q=0|s[3],J=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,ae=te>>>13,oe=0|s[6],re=8191&oe,ie=oe>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,de=0|s[8],le=8191&de,fe=de>>>13,pe=0|s[9],be=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var he=(u+(a=Math.imul(l,H))|0)+((8191&(o=(o=Math.imul(l,G))+Math.imul(f,H)|0))<<13)|0;u=((r=Math.imul(f,G))+(o>>>13)|0)+(he>>>26)|0,he&=67108863,a=Math.imul(b,H),o=(o=Math.imul(b,G))+Math.imul(m,H)|0,r=Math.imul(m,G);var ge=(u+(a=a+Math.imul(l,K)|0)|0)+((8191&(o=(o=o+Math.imul(l,W)|0)+Math.imul(f,K)|0))<<13)|0;u=((r=r+Math.imul(f,W)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,a=Math.imul(g,H),o=(o=Math.imul(g,G))+Math.imul(y,H)|0,r=Math.imul(y,G),a=a+Math.imul(b,K)|0,o=(o=o+Math.imul(b,W)|0)+Math.imul(m,K)|0,r=r+Math.imul(m,W)|0;var ye=(u+(a=a+Math.imul(l,V)|0)|0)+((8191&(o=(o=o+Math.imul(l,q)|0)+Math.imul(f,V)|0))<<13)|0;u=((r=r+Math.imul(f,q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,a=Math.imul(w,H),o=(o=Math.imul(w,G))+Math.imul(k,H)|0,r=Math.imul(k,G),a=a+Math.imul(g,K)|0,o=(o=o+Math.imul(g,W)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,W)|0,a=a+Math.imul(b,V)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(m,V)|0,r=r+Math.imul(m,q)|0;var ve=(u+(a=a+Math.imul(l,J)|0)|0)+((8191&(o=(o=o+Math.imul(l,Y)|0)+Math.imul(f,J)|0))<<13)|0;u=((r=r+Math.imul(f,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,a=Math.imul(x,H),o=(o=Math.imul(x,G))+Math.imul(I,H)|0,r=Math.imul(I,G),a=a+Math.imul(w,K)|0,o=(o=o+Math.imul(w,W)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,W)|0,a=a+Math.imul(g,V)|0,o=(o=o+Math.imul(g,q)|0)+Math.imul(y,V)|0,r=r+Math.imul(y,q)|0,a=a+Math.imul(b,J)|0,o=(o=o+Math.imul(b,Y)|0)+Math.imul(m,J)|0,r=r+Math.imul(m,Y)|0;var we=(u+(a=a+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((r=r+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,a=Math.imul(S,H),o=(o=Math.imul(S,G))+Math.imul(C,H)|0,r=Math.imul(C,G),a=a+Math.imul(x,K)|0,o=(o=o+Math.imul(x,W)|0)+Math.imul(I,K)|0,r=r+Math.imul(I,W)|0,a=a+Math.imul(w,V)|0,o=(o=o+Math.imul(w,q)|0)+Math.imul(k,V)|0,r=r+Math.imul(k,q)|0,a=a+Math.imul(g,J)|0,o=(o=o+Math.imul(g,Y)|0)+Math.imul(y,J)|0,r=r+Math.imul(y,Y)|0,a=a+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(m,$)|0,r=r+Math.imul(m,ee)|0;var ke=(u+(a=a+Math.imul(l,ne)|0)|0)+((8191&(o=(o=o+Math.imul(l,ae)|0)+Math.imul(f,ne)|0))<<13)|0;u=((r=r+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,a=Math.imul(R,H),o=(o=Math.imul(R,G))+Math.imul(M,H)|0,r=Math.imul(M,G),a=a+Math.imul(S,K)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(C,K)|0,r=r+Math.imul(C,W)|0,a=a+Math.imul(x,V)|0,o=(o=o+Math.imul(x,q)|0)+Math.imul(I,V)|0,r=r+Math.imul(I,q)|0,a=a+Math.imul(w,J)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(k,J)|0,r=r+Math.imul(k,Y)|0,a=a+Math.imul(g,$)|0,o=(o=o+Math.imul(g,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,a=a+Math.imul(b,ne)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(m,ne)|0,r=r+Math.imul(m,ae)|0;var Ae=(u+(a=a+Math.imul(l,re)|0)|0)+((8191&(o=(o=o+Math.imul(l,ie)|0)+Math.imul(f,re)|0))<<13)|0;u=((r=r+Math.imul(f,ie)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,a=Math.imul(U,H),o=(o=Math.imul(U,G))+Math.imul(_,H)|0,r=Math.imul(_,G),a=a+Math.imul(R,K)|0,o=(o=o+Math.imul(R,W)|0)+Math.imul(M,K)|0,r=r+Math.imul(M,W)|0,a=a+Math.imul(S,V)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(C,V)|0,r=r+Math.imul(C,q)|0,a=a+Math.imul(x,J)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(I,J)|0,r=r+Math.imul(I,Y)|0,a=a+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,a=a+Math.imul(g,ne)|0,o=(o=o+Math.imul(g,ae)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ae)|0,a=a+Math.imul(b,re)|0,o=(o=o+Math.imul(b,ie)|0)+Math.imul(m,re)|0,r=r+Math.imul(m,ie)|0;var xe=(u+(a=a+Math.imul(l,ce)|0)|0)+((8191&(o=(o=o+Math.imul(l,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((r=r+Math.imul(f,ue)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,a=Math.imul(D,H),o=(o=Math.imul(D,G))+Math.imul(N,H)|0,r=Math.imul(N,G),a=a+Math.imul(U,K)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(_,K)|0,r=r+Math.imul(_,W)|0,a=a+Math.imul(R,V)|0,o=(o=o+Math.imul(R,q)|0)+Math.imul(M,V)|0,r=r+Math.imul(M,q)|0,a=a+Math.imul(S,J)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(C,J)|0,r=r+Math.imul(C,Y)|0,a=a+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(I,$)|0,r=r+Math.imul(I,ee)|0,a=a+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ae)|0,a=a+Math.imul(g,re)|0,o=(o=o+Math.imul(g,ie)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,ie)|0,a=a+Math.imul(b,ce)|0,o=(o=o+Math.imul(b,ue)|0)+Math.imul(m,ce)|0,r=r+Math.imul(m,ue)|0;var Ie=(u+(a=a+Math.imul(l,le)|0)|0)+((8191&(o=(o=o+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;u=((r=r+Math.imul(f,fe)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,a=Math.imul(F,H),o=(o=Math.imul(F,G))+Math.imul(L,H)|0,r=Math.imul(L,G),a=a+Math.imul(D,K)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,W)|0,a=a+Math.imul(U,V)|0,o=(o=o+Math.imul(U,q)|0)+Math.imul(_,V)|0,r=r+Math.imul(_,q)|0,a=a+Math.imul(R,J)|0,o=(o=o+Math.imul(R,Y)|0)+Math.imul(M,J)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(C,$)|0,r=r+Math.imul(C,ee)|0,a=a+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(I,ne)|0,r=r+Math.imul(I,ae)|0,a=a+Math.imul(w,re)|0,o=(o=o+Math.imul(w,ie)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,ie)|0,a=a+Math.imul(g,ce)|0,o=(o=o+Math.imul(g,ue)|0)+Math.imul(y,ce)|0,r=r+Math.imul(y,ue)|0,a=a+Math.imul(b,le)|0,o=(o=o+Math.imul(b,fe)|0)+Math.imul(m,le)|0,r=r+Math.imul(m,fe)|0;var Te=(u+(a=a+Math.imul(l,be)|0)|0)+((8191&(o=(o=o+Math.imul(l,me)|0)+Math.imul(f,be)|0))<<13)|0;u=((r=r+Math.imul(f,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,a=Math.imul(F,K),o=(o=Math.imul(F,W))+Math.imul(L,K)|0,r=Math.imul(L,W),a=a+Math.imul(D,V)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(N,V)|0,r=r+Math.imul(N,q)|0,a=a+Math.imul(U,J)|0,o=(o=o+Math.imul(U,Y)|0)+Math.imul(_,J)|0,r=r+Math.imul(_,Y)|0,a=a+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(M,$)|0,r=r+Math.imul(M,ee)|0,a=a+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(C,ne)|0,r=r+Math.imul(C,ae)|0,a=a+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ie)|0)+Math.imul(I,re)|0,r=r+Math.imul(I,ie)|0,a=a+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(k,ce)|0,r=r+Math.imul(k,ue)|0,a=a+Math.imul(g,le)|0,o=(o=o+Math.imul(g,fe)|0)+Math.imul(y,le)|0,r=r+Math.imul(y,fe)|0;var Se=(u+(a=a+Math.imul(b,be)|0)|0)+((8191&(o=(o=o+Math.imul(b,me)|0)+Math.imul(m,be)|0))<<13)|0;u=((r=r+Math.imul(m,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,a=Math.imul(F,V),o=(o=Math.imul(F,q))+Math.imul(L,V)|0,r=Math.imul(L,q),a=a+Math.imul(D,J)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(N,J)|0,r=r+Math.imul(N,Y)|0,a=a+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(_,$)|0,r=r+Math.imul(_,ee)|0,a=a+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(M,ne)|0,r=r+Math.imul(M,ae)|0,a=a+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ie)|0)+Math.imul(C,re)|0,r=r+Math.imul(C,ie)|0,a=a+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,ue)|0)+Math.imul(I,ce)|0,r=r+Math.imul(I,ue)|0,a=a+Math.imul(w,le)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(k,le)|0,r=r+Math.imul(k,fe)|0;var Ce=(u+(a=a+Math.imul(g,be)|0)|0)+((8191&(o=(o=o+Math.imul(g,me)|0)+Math.imul(y,be)|0))<<13)|0;u=((r=r+Math.imul(y,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,a=Math.imul(F,J),o=(o=Math.imul(F,Y))+Math.imul(L,J)|0,r=Math.imul(L,Y),a=a+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,a=a+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(_,ne)|0,r=r+Math.imul(_,ae)|0,a=a+Math.imul(R,re)|0,o=(o=o+Math.imul(R,ie)|0)+Math.imul(M,re)|0,r=r+Math.imul(M,ie)|0,a=a+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(C,ce)|0,r=r+Math.imul(C,ue)|0,a=a+Math.imul(x,le)|0,o=(o=o+Math.imul(x,fe)|0)+Math.imul(I,le)|0,r=r+Math.imul(I,fe)|0;var Ee=(u+(a=a+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(k,be)|0))<<13)|0;u=((r=r+Math.imul(k,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,a=Math.imul(F,$),o=(o=Math.imul(F,ee))+Math.imul(L,$)|0,r=Math.imul(L,ee),a=a+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ae)|0,a=a+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ie)|0)+Math.imul(_,re)|0,r=r+Math.imul(_,ie)|0,a=a+Math.imul(R,ce)|0,o=(o=o+Math.imul(R,ue)|0)+Math.imul(M,ce)|0,r=r+Math.imul(M,ue)|0,a=a+Math.imul(S,le)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(C,le)|0,r=r+Math.imul(C,fe)|0;var Re=(u+(a=a+Math.imul(x,be)|0)|0)+((8191&(o=(o=o+Math.imul(x,me)|0)+Math.imul(I,be)|0))<<13)|0;u=((r=r+Math.imul(I,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,a=Math.imul(F,ne),o=(o=Math.imul(F,ae))+Math.imul(L,ne)|0,r=Math.imul(L,ae),a=a+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,ie)|0,a=a+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,ue)|0)+Math.imul(_,ce)|0,r=r+Math.imul(_,ue)|0,a=a+Math.imul(R,le)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(M,le)|0,r=r+Math.imul(M,fe)|0;var Me=(u+(a=a+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,me)|0)+Math.imul(C,be)|0))<<13)|0;u=((r=r+Math.imul(C,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,a=Math.imul(F,re),o=(o=Math.imul(F,ie))+Math.imul(L,re)|0,r=Math.imul(L,ie),a=a+Math.imul(D,ce)|0,o=(o=o+Math.imul(D,ue)|0)+Math.imul(N,ce)|0,r=r+Math.imul(N,ue)|0,a=a+Math.imul(U,le)|0,o=(o=o+Math.imul(U,fe)|0)+Math.imul(_,le)|0,r=r+Math.imul(_,fe)|0;var Pe=(u+(a=a+Math.imul(R,be)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(M,be)|0))<<13)|0;u=((r=r+Math.imul(M,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,a=Math.imul(F,ce),o=(o=Math.imul(F,ue))+Math.imul(L,ce)|0,r=Math.imul(L,ue),a=a+Math.imul(D,le)|0,o=(o=o+Math.imul(D,fe)|0)+Math.imul(N,le)|0,r=r+Math.imul(N,fe)|0;var Ue=(u+(a=a+Math.imul(U,be)|0)|0)+((8191&(o=(o=o+Math.imul(U,me)|0)+Math.imul(_,be)|0))<<13)|0;u=((r=r+Math.imul(_,me)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,a=Math.imul(F,le),o=(o=Math.imul(F,fe))+Math.imul(L,le)|0,r=Math.imul(L,fe);var _e=(u+(a=a+Math.imul(D,be)|0)|0)+((8191&(o=(o=o+Math.imul(D,me)|0)+Math.imul(N,be)|0))<<13)|0;u=((r=r+Math.imul(N,me)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863;var Be=(u+(a=Math.imul(F,be))|0)+((8191&(o=(o=Math.imul(F,me))+Math.imul(L,be)|0))<<13)|0;return u=((r=Math.imul(L,me))+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=he,c[1]=ge,c[2]=ye,c[3]=ve,c[4]=we,c[5]=ke,c[6]=Ae,c[7]=xe,c[8]=Ie,c[9]=Te,c[10]=Se,c[11]=Ce,c[12]=Ee,c[13]=Re,c[14]=Me,c[15]=Pe,c[16]=Ue,c[17]=_e,c[18]=Be,0!==u&&(c[19]=u,n.length++),n};function m(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(b=p),r.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return n=10===this.length&&10===e.length?b(this,e,t):a<63?p(this,e,t):a<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var a=0,o=0,r=0;r>>26)|0)>>>26,i&=67108863}n.words[r]=s,a=i,i=o}return 0!==a?n.words[r]=a:n.length--,n.strip()}(this,e,t):m(this,e,t),n},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,a=0;a>=1;return a},h.prototype.permute=function(e,t,n,a,o,r){for(var i=0;i>>=1)o++;return 1<>>=13,n[2*i+1]=8191&r,r>>>=13;for(i=2*t;i>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,a=0;a=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var i=0;for(t=0;t>>26-n}i&&(this.words[t]=i,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,i=Math.min((e-r)/26,this.length),s=67108863^67108863>>>r<i)for(this.length-=i,u=0;u=0&&(0!==d||u>=o);u--){var l=0|this.words[u];this.words[u]=d<<26-r|l>>>r,d=l&s}return c&&0!==d&&(c.words[c.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return a(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){a("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(a("number"===typeof e),a(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===s)return this.strip();for(a(-1===s),s=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),o=e,i=0|o.words[o.length-1];0!==(n=26-this._countBits(i))&&(o=o.ushln(n),a.iushln(n),i=0|o.words[o.length-1]);var s,c=a.length-o.length;if("mod"!==t){(s=new r(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var f=67108864*(0|a.words[o.length+l])+(0|a.words[o.length+l-1]);for(f=Math.min(f/i|0,67108863),a._ishlnsubmul(o,f,l);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(o,1,l),a.isZero()||(a.negative^=1);s&&(s.words[l]=f)}return s&&s.strip(),a.strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:s||null,mod:a}},r.prototype.divmod=function(e,t,n){return a(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:o,mod:i}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:s.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,i,s},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,a=e.ushrn(1),o=e.andln(1),r=n.cmp(a);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){a(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){a(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),i=new r(0),s=new r(0),c=new r(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var d=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;0===(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(d),i.isub(l)),o.iushrn(1),i.iushrn(1);for(var b=0,m=1;0===(n.words[0]&m)&&b<26;++b,m<<=1);if(b>0)for(n.iushrn(b);b-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(d),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),i.isub(c)):(n.isub(t),s.isub(o),c.isub(i))}return{a:s,b:c,gcd:n.iushln(u)}},r.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,i=new r(1),s=new r(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,d=1;0===(t.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(c),i.iushrn(1);for(var l=0,f=1;0===(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s)):(n.isub(t),s.isub(i))}return(o=0===t.cmpn(1)?i:s).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(a)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){a("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,s&=67108863,this.words[i]=s}return 0!==r&&(this.words[i]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),a(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var a=0|this.words[n],o=0|e.words[n];if(a!==o){ao&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new x(e)},r.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var a=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(v,y),v.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),o=0;o>>22,r=i}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=a}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},x.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){a(0===(e.negative|t.negative),"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2===1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),i=0;!o.isZero()&&0===o.andln(1);)i++,o.iushrn(1);a(!o.isZero());var s=new r(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new r(2*d*d).toRed(this);0!==this.pow(d,u).cmp(c);)d.redIAdd(c);for(var l=this.pow(d,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),b=i;0!==p.cmp(s);){for(var m=p,h=0;0!==m.cmp(s);h++)m=m.redSqr();a(h=0;a--){for(var u=t.words[a],d=c-1;d>=0;d--){var l=u>>d&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==i?(i<<=1,i|=l,(4===++s||0===a&&0===d)&&(o=this.mul(o,n[i]),s=0,i=0)):s=0}c=26}return o},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new I(e)},o(I,x),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},26925:function(e){"use strict";function t(e,t){for(var n in t)Object.defineProperty(e,n,{value:t[n],enumerable:!0,configurable:!0});return e}e.exports=function(e,n,a){if(!e||"string"===typeof e)throw new TypeError("Please pass an Error to err-code");a||(a={}),"object"===typeof n&&(a=n,n=void 0),null!=n&&(a.code=n);try{return t(e,a)}catch(r){a.message=e.message,a.stack=e.stack;var o=function(){};return o.prototype=Object.create(Object.getPrototypeOf(e)),t(new o,a)}}},56575:function(e,t,n){e.exports=n(77364)},77364:function(e,t,n){n(94421);var a,o=n(92403);a=o("Error.captureStackTrace")?n(84471):o("Error.prototype.stack")?n(6764):n(75252),e.exports=a()},77313:function(e,t,n){var a=n(60398).Class,o=n(60398).abstractMethod,r=a(Object,{prototype:{init:a.prototype.merge,frameString:void 0,toString:function(){return this.frameString},functionValue:void 0,getThis:o,getTypeName:o,getFunction:function(){return this.functionValue},getFunctionName:o,getMethodName:o,getFileName:o,getLineNumber:o,getColumnNumber:o,getEvalOrigin:o,isTopLevel:o,isEval:o,isNative:o,isConstructor:o}});e.exports=r},71651:function(e,t,n){var a=n(60398).Class,o=n(77313),r=n(39224).cache,i=a(Object,{prototype:{stackParser:null,frameParser:null,locationParsers:null,constructor:function(e){a.prototype.merge.call(this,e)},getFrames:function(e,t){for(var n=[],a=0,o=e.length;a=0)return null;var i=(n=n.toRed(o.red)).redSqr().redIMul(n).redIAdd(o.b).redSqrt();return 3===e!==i.isOdd()&&(i=i.redNeg()),a.keyPair({pub:{x:n,y:i}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,n){var i=new r(t),s=new r(n);if(i.cmp(o.p)>=0||s.cmp(o.p)>=0)return null;if(i=i.toRed(o.red),s=s.toRed(o.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var c=i.redSqr().redIMul(i);return s.redSqr().redISub(c.redIAdd(o.b)).isZero()?a.keyPair({pub:{x:i,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var n=t.encode(null,33===e.length),a=0;a=0)return 1;if(n.iadd(new r(e)),n.cmp(o.n)>=0&&n.isub(o.n),n.isZero())return 1;var a=n.toArrayLike(Uint8Array,"be",32);return e.set(a),0},privateKeyTweakMul:function(e,t){var n=new r(t);if(n.cmp(o.n)>=0||n.isZero())return 1;n.imul(new r(e)),n.cmp(o.n)>=0&&(n=n.umod(o.n));var a=n.toArrayLike(Uint8Array,"be",32);return e.set(a),0},publicKeyVerify:function(e){return null===i(e)?1:0},publicKeyCreate:function(e,t){var n=new r(t);return n.cmp(o.n)>=0||n.isZero()?1:(s(e,a.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var n=i(t);return null===n?1:(s(e,n.getPublic()),0)},publicKeyNegate:function(e,t){var n=i(t);if(null===n)return 1;var a=n.getPublic();return a.y=a.y.redNeg(),s(e,a),0},publicKeyCombine:function(e,t){for(var n=new Array(t.length),a=0;a=0)return 2;var c=a.getPublic().add(o.g.mul(n));return c.isInfinity()?2:(s(e,c),0)},publicKeyTweakMul:function(e,t,n){var a=i(t);return null===a?1:(n=new r(n)).cmp(o.n)>=0||n.isZero()?2:(s(e,a.getPublic().mul(n)),0)},signatureNormalize:function(e){var t=new r(e.subarray(0,32)),n=new r(e.subarray(32,64));return t.cmp(o.n)>=0||n.cmp(o.n)>=0?1:(1===n.cmp(a.nh)&&e.set(o.n.sub(n).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var n=t.subarray(0,32),a=t.subarray(32,64);if(new r(n).cmp(o.n)>=0)return 1;if(new r(a).cmp(o.n)>=0)return 1;var i=e.output,s=i.subarray(4,37);s[0]=0,s.set(n,1);for(var c=33,u=0;c>1&&0===s[u]&&!(128&s[u+1]);--c,++u);if(128&(s=s.subarray(u))[0])return 1;if(c>1&&0===s[0]&&!(128&s[1]))return 1;var d=i.subarray(39,72);d[0]=0,d.set(a,1);for(var l=33,f=0;l>1&&0===d[f]&&!(128&d[f+1]);--l,++f);return 128&(d=d.subarray(f))[0]||l>1&&0===d[0]&&!(128&d[1])?1:(e.outputlen=6+c+l,i[0]=48,i[1]=e.outputlen-2,i[2]=2,i[3]=s.length,i.set(s,4),i[4+c]=2,i[5+c]=d.length,i.set(d,6+c),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var n=t[3];if(0===n)return 1;if(5+n>=t.length)return 1;if(2!==t[4+n])return 1;var a=t[5+n];if(0===a)return 1;if(6+n+a!==t.length)return 1;if(128&t[4])return 1;if(n>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[n+6])return 1;if(a>1&&0===t[n+6]&&!(128&t[n+7]))return 1;var i=t.subarray(4,4+n);if(33===i.length&&0===i[0]&&(i=i.subarray(1)),i.length>32)return 1;var s=t.subarray(6+n);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var c=new r(i);c.cmp(o.n)>=0&&(c=new r(0));var u=new r(t.subarray(6+n));return u.cmp(o.n)>=0&&(u=new r(0)),e.set(c.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,n,i,s){if(s){var c=s;s=function(e){var a=c(t,n,null,i,e);if(!(a instanceof Uint8Array&&32===a.length))throw new Error("This is the way");return new r(a)}}var u,d=new r(n);if(d.cmp(o.n)>=0||d.isZero())return 1;try{u=a.sign(t,n,{canonical:!0,k:s,pers:i})}catch(l){return 1}return e.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),e.recid=u.recoveryParam,0},ecdsaVerify:function(e,t,n){var s={r:e.subarray(0,32),s:e.subarray(32,64)},c=new r(s.r),u=new r(s.s);if(c.cmp(o.n)>=0||u.cmp(o.n)>=0)return 1;if(1===u.cmp(a.nh)||c.isZero()||u.isZero())return 3;var d=i(n);if(null===d)return 2;var l=d.getPublic();return a.verify(t,s,l)?0:3},ecdsaRecover:function(e,t,n,i){var c,u={r:t.slice(0,32),s:t.slice(32,64)},d=new r(u.r),l=new r(u.s);if(d.cmp(o.n)>=0||l.cmp(o.n)>=0)return 1;if(d.isZero()||l.isZero())return 2;try{c=a.recoverPubKey(i,u,n)}catch(f){return 2}return s(e,c),0},ecdh:function(e,t,n,s,c,u,d){var l=i(t);if(null===l)return 1;var f=new r(n);if(f.cmp(o.n)>=0||f.isZero())return 2;var p=l.getPublic().mul(f);if(void 0===c)for(var b=p.encode(null,!0),m=a.hash().update(b).digest(),h=0;h<32;++h)e[h]=m[h];else{u||(u=new Uint8Array(32));for(var g=p.getX().toArray("be",32),y=0;y<32;++y)u[y]=g[y];d||(d=new Uint8Array(32));for(var v=p.getY().toArray("be",32),w=0;w<32;++w)d[w]=v[w];var k=c(u,d,s);if(!(k instanceof Uint8Array&&k.length===e.length))return 2;e.set(k)}return 0}}},94276:function(e,t,n){var a=n(74704).default,o="Impossible case. Please create issue.",r="The tweak was out of range or the resulted private key is invalid",i="The tweak was out of range or equal to zero",s="Unknow error on context randomization",c="Private Key is invalid",u="Public Key could not be parsed",d="Public Key serialization error",l="The sum of the public keys is not valid",f="Signature could not be parsed",p="The nonce generation function failed, or the private key was invalid",b="Public key could not be recover",m="Scalar was invalid (zero or overflow)";function h(e,t){if(!e)throw new Error(t)}function g(e,t,n){if(h(t instanceof Uint8Array,"Expected ".concat(e," to be an Uint8Array")),void 0!==n)if(Array.isArray(n)){var a=n.join(", "),o="Expected ".concat(e," to be an Uint8Array with length [").concat(a,"]");h(n.includes(t.length),o)}else{var r="Expected ".concat(e," to be an Uint8Array with length ").concat(n);h(t.length===n,r)}}function y(e){h("Boolean"===w(e),"Expected compressed to be a Boolean")}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"===typeof e&&(e=e(t)),g("output",e,t),e}function w(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){if(h(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&g("seed",t,32),1===e.contextRandomize(t))throw new Error(s)},privateKeyVerify:function(t){return g("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(g("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(o)}},privateKeyTweakAdd:function(t,n){switch(g("private key",t,32),g("tweak",n,32),e.privateKeyTweakAdd(t,n)){case 0:return t;case 1:throw new Error(r)}},privateKeyTweakMul:function(t,n){switch(g("private key",t,32),g("tweak",n,32),e.privateKeyTweakMul(t,n)){case 0:return t;case 1:throw new Error(i)}},publicKeyVerify:function(t){return g("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2?arguments[2]:void 0;switch(g("private key",t,32),y(n),a=v(a,n?33:65),e.publicKeyCreate(a,t)){case 0:return a;case 1:throw new Error(c);case 2:throw new Error(d)}},publicKeyConvert:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2?arguments[2]:void 0;switch(g("public key",t,[33,65]),y(n),a=v(a,n?33:65),e.publicKeyConvert(a,t)){case 0:return a;case 1:throw new Error(u);case 2:throw new Error(d)}},publicKeyNegate:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2?arguments[2]:void 0;switch(g("public key",t,[33,65]),y(n),a=v(a,n?33:65),e.publicKeyNegate(a,t)){case 0:return a;case 1:throw new Error(u);case 2:throw new Error(o);case 3:throw new Error(d)}},publicKeyCombine:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2?arguments[2]:void 0;h(Array.isArray(t),"Expected public keys to be an Array"),h(t.length>0,"Expected public keys array will have more than zero items");var r,i=a(t);try{for(i.s();!(r=i.n()).done;){g("public key",r.value,[33,65])}}catch(s){i.e(s)}finally{i.f()}switch(y(n),o=v(o,n?33:65),e.publicKeyCombine(o,t)){case 0:return o;case 1:throw new Error(u);case 2:throw new Error(l);case 3:throw new Error(d)}},publicKeyTweakAdd:function(t,n){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3?arguments[3]:void 0;switch(g("public key",t,[33,65]),g("tweak",n,32),y(a),o=v(o,a?33:65),e.publicKeyTweakAdd(o,t,n)){case 0:return o;case 1:throw new Error(u);case 2:throw new Error(r)}},publicKeyTweakMul:function(t,n){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3?arguments[3]:void 0;switch(g("public key",t,[33,65]),g("tweak",n,32),y(a),o=v(o,a?33:65),e.publicKeyTweakMul(o,t,n)){case 0:return o;case 1:throw new Error(u);case 2:throw new Error(i)}},signatureNormalize:function(t){switch(g("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(f)}},signatureExport:function(t,n){g("signature",t,64);var a={output:n=v(n,72),outputlen:72};switch(e.signatureExport(a,t)){case 0:return n.slice(0,a.outputlen);case 1:throw new Error(f);case 2:throw new Error(o)}},signatureImport:function(t,n){switch(g("signature",t),n=v(n,64),e.signatureImport(n,t)){case 0:return n;case 1:throw new Error(f);case 2:throw new Error(o)}},ecdsaSign:function(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;g("message",t,32),g("private key",n,32),h("Object"===w(a),"Expected options to be an Object"),void 0!==a.data&&g("options.data",a.data),void 0!==a.noncefn&&h("Function"===w(a.noncefn),"Expected options.noncefn to be a Function");var i={signature:r=v(r,64),recid:null};switch(e.ecdsaSign(i,t,n,a.data,a.noncefn)){case 0:return i;case 1:throw new Error(p);case 2:throw new Error(o)}},ecdsaVerify:function(t,n,a){switch(g("signature",t,64),g("message",n,32),g("public key",a,[33,65]),e.ecdsaVerify(t,n,a)){case 0:return!0;case 3:return!1;case 1:throw new Error(f);case 2:throw new Error(u)}},ecdsaRecover:function(t,n,a){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4?arguments[4]:void 0;switch(g("signature",t,64),h("Number"===w(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),g("message",a,32),y(r),i=v(i,r?33:65),e.ecdsaRecover(i,t,n,a)){case 0:return i;case 1:throw new Error(f);case 2:throw new Error(b);case 3:throw new Error(o)}},ecdh:function(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;switch(g("public key",t,[33,65]),g("private key",n,32),h("Object"===w(a),"Expected options to be an Object"),void 0!==a.data&&g("options.data",a.data),void 0!==a.hashfn?(h("Function"===w(a.hashfn),"Expected options.hashfn to be a Function"),void 0!==a.xbuf&&g("options.xbuf",a.xbuf,32),void 0!==a.ybuf&&g("options.ybuf",a.ybuf,32),g("output",o)):o=v(o,32),e.ecdh(o,t,n,a.data,a.hashfn,a.xbuf,a.ybuf)){case 0:return o;case 1:throw new Error(u);case 2:throw new Error(m)}}}}},62107:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createHashFunction=function(e){return function(t){var n=e();return n.update(t),a.from(n.digest())}}},17818:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(62107),o=n(52486);t.keccak224=a.createHashFunction((function(){return o("keccak224")})),t.keccak256=a.createHashFunction((function(){return o("keccak256")})),t.keccak384=a.createHashFunction((function(){return o("keccak384")})),t.keccak512=a.createHashFunction((function(){return o("keccak512")}))},80297:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(97924);t.getRandomBytes=function(e){return new Promise((function(t,n){a(e,(function(e,a){e?n(e):t(a)}))}))},t.getRandomBytesSync=function(e){return a(e)}},65074:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,a=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]n)throw new Error("Elements exceed array size: "+n);for(f in s=[],e=e.slice(0,e.lastIndexOf("[")),"string"===typeof t&&(t=JSON.parse(t)),t)s.push(p(e,t[f]));if("dynamic"===n){var b=p("uint256",t.length);s.unshift(b)}return a.concat(s)}if("bytes"===e)return t=a.from(t),s=a.concat([p("uint256",t.length),t]),t.length%32!==0&&(s=a.concat([s,o.zeros(32-t.length%32)])),s;if(e.startsWith("bytes")){if((n=c(e))<1||n>32)throw new Error("Invalid bytes width: "+n);return o.setLengthRight(t,32)}if(e.startsWith("uint")){if((n=c(e))%8||n<8||n>256)throw new Error("Invalid uint width: "+n);if((i=l(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+i.bitLength());if(i<0)throw new Error("Supplied uint is negative");return i.toArrayLike(a,"be",32)}if(e.startsWith("int")){if((n=c(e))%8||n<8||n>256)throw new Error("Invalid int width: "+n);if((i=l(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+i.bitLength());return i.toTwos(256).toArrayLike(a,"be",32)}if(e.startsWith("ufixed")){if(n=u(e),(i=l(t))<0)throw new Error("Supplied ufixed is negative");return p("uint256",i.mul(new r(2).pow(new r(n[1]))))}if(e.startsWith("fixed"))return n=u(e),p("int256",l(t).mul(new r(2).pow(new r(n[1]))));throw new Error("Unsupported or invalid type: "+e)}function b(e,t,n){var o,i,s,c;if("string"===typeof e&&(e=m(e)),"address"===e.name)return b(e.rawType,t,n).toArrayLike(a,"be",20).toString("hex");if("bool"===e.name)return b(e.rawType,t,n).toString()===new r(1).toString();if("string"===e.name){var u=b(e.rawType,t,n);return a.from(u,"utf8").toString()}if(e.isArray){for(s=[],o=e.size,"dynamic"===e.size&&(n=b("uint256",t,n).toNumber(),o=b("uint256",t,n).toNumber(),n+=32),c=0;ce.size)throw new Error("Decoded int exceeds width: "+e.size+" vs "+i.bitLength());return i}if(e.name.startsWith("int")){if((i=new r(t.slice(n,n+32),16,"be").fromTwos(256)).bitLength()>e.size)throw new Error("Decoded uint exceeds width: "+e.size+" vs "+i.bitLength());return i}if(e.name.startsWith("ufixed")){if(o=new r(2).pow(new r(e.size[1])),!(i=b("uint256",t,n)).mod(o).isZero())throw new Error("Decimals not supported yet");return i.div(o)}if(e.name.startsWith("fixed")){if(o=new r(2).pow(new r(e.size[1])),!(i=b("int256",t,n)).mod(o).isZero())throw new Error("Decimals not supported yet");return i.div(o)}throw new Error("Unsupported or invalid type: "+e.name)}function m(e){var t,n,a;if(g(e)){t=d(e);var o=e.slice(0,e.lastIndexOf("["));return o=m(o),n={isArray:!0,name:e,size:t,memoryUsage:"dynamic"===t?32:o.memoryUsage*t,subArray:o}}switch(e){case"address":a="uint160";break;case"bool":a="uint8";break;case"string":a="bytes"}if(n={rawType:a,name:e,memoryUsage:32},e.startsWith("bytes")&&"bytes"!==e||e.startsWith("uint")||e.startsWith("int")?n.size=c(e):(e.startsWith("ufixed")||e.startsWith("fixed"))&&(n.size=u(e)),e.startsWith("bytes")&&"bytes"!==e&&(n.size<1||n.size>32))throw new Error("Invalid bytes width: "+n.size);if((e.startsWith("uint")||e.startsWith("int"))&&(n.size%8||n.size<8||n.size>256))throw new Error("Invalid int/uint width: "+n.size);return n}function h(e){return"string"===e||"bytes"===e||"dynamic"===d(e)}function g(e){return e.lastIndexOf("]")===e.length-1}function y(e,t){return e.startsWith("address")||e.startsWith("bytes")?"0x"+t.toString("hex"):t.toString()}i.eventID=function(e,t){var n=e+"("+t.map(s).join(",")+")";return o.keccak256(a.from(n))},i.methodID=function(e,t){return i.eventID(e,t).slice(0,4)},i.rawEncode=function(e,t){var n=[],o=[],r=0;e.forEach((function(e){if(g(e)){var t=d(e);r+="dynamic"!==t?32*t:32}else r+=32}));for(var i=0;if)throw new Error("Elements exceed array size: "+f)}var p=t.map((function(e){return i.solidityHexValue(u,e,256)}));return a.concat(p)}if("bytes"===e)return t;if("string"===e)return a.from(t,"utf8");if("bool"===e){n=n||8;var b=Array(n/4).join("0");return a.from(t?b+"1":b+"0","hex")}if("address"===e){var m=20;return n&&(m=n/8),o.setLengthLeft(t,m)}if(e.startsWith("bytes")){if((r=c(e))<1||r>32)throw new Error("Invalid bytes width: "+r);return o.setLengthRight(t,r)}if(e.startsWith("uint")){if((r=c(e))%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if((s=l(t)).bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+s.bitLength());return n=n||r,s.toArrayLike(a,"be",n/8)}if(e.startsWith("int")){if((r=c(e))%8||r<8||r>256)throw new Error("Invalid int width: "+r);if((s=l(t)).bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+s.bitLength());return n=n||r,s.toTwos(r).toArrayLike(a,"be",n/8)}throw new Error("Unsupported or invalid type: "+e)},i.solidityPack=function(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var n=[],o=0;o="0"&&t<="9");)r+=e[i]-"0",i++;a=i-1,n.push(r)}else if("i"===o)n.push("int256");else{if("a"!==o)throw new Error("Unsupported or invalid type: "+o);n.push("int256[]")}}return n},i.toSerpent=function(e){for(var t=[],n=0;n=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(e,t,n){var a=s(e,n);return n-1>=t&&(a|=s(e,n-1)<<4),a}function u(e,t,n,a){for(var o=0,r=Math.min(e.length,n),i=t;i=49?s-49+10:s>=17?s-17+10:s}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"===typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=i<>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a=t;a-=2)o=c(e,t,a)<=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;else for(a=(e.length-t)%2===0?t+1:t;a=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,o=1;o<=67108863;o*=t)a++;a--,o=o/t|0;for(var r=e.length-n,i=r%a,s=Math.min(r,r-i)+n,c=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var a=e.length+t.length|0;n.length=a,a=a-1|0;var o=0|e.words[0],r=0|t.words[0],i=o*r,s=67108863&i,c=i/67108864|0;n.words[0]=s;for(var u=1;u>>26,l=67108863&c,f=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=f;p++){var b=u-p|0;d+=(i=(o=0|e.words[b])*(r=0|t.words[p])+l)/67108864|0,l=67108863&i}n.words[u]=0|l,c=0|d}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,i=0;i>>24-o&16777215)||i!==this.length-1?d[6-c.length]+c+n:c+n,(o+=2)>=26&&(o-=26,i--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=l[e],p=f[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var m=b.modn(p).toString(e);n=(b=b.idivn(p)).isZero()?m+n:d[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return a("undefined"!==typeof i),this.toArrayLike(i,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);a(o<=r,"byte array longer than desired length"),a(r>0,"Requested array length <= 0"),this.strip();var i,s,c="le"===t,u=new e(r),d=this.clone();if(c){for(s=0;!d.isZero();s++)i=d.andln(255),d.iushrn(8),u[s]=i;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;ae.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){a("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){a("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,a=e):(n=e,a=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,a,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,a=e):(n=e,a=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,p=0|i[1],b=8191&p,m=p>>>13,h=0|i[2],g=8191&h,y=h>>>13,v=0|i[3],w=8191&v,k=v>>>13,A=0|i[4],x=8191&A,I=A>>>13,T=0|i[5],S=8191&T,C=T>>>13,E=0|i[6],R=8191&E,M=E>>>13,P=0|i[7],U=8191&P,_=P>>>13,B=0|i[8],D=8191&B,N=B>>>13,O=0|i[9],F=8191&O,L=O>>>13,j=0|s[0],H=8191&j,G=j>>>13,z=0|s[1],K=8191&z,W=z>>>13,Z=0|s[2],V=8191&Z,q=Z>>>13,Q=0|s[3],J=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,ae=te>>>13,oe=0|s[6],re=8191&oe,ie=oe>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,de=0|s[8],le=8191&de,fe=de>>>13,pe=0|s[9],be=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var he=(u+(a=Math.imul(l,H))|0)+((8191&(o=(o=Math.imul(l,G))+Math.imul(f,H)|0))<<13)|0;u=((r=Math.imul(f,G))+(o>>>13)|0)+(he>>>26)|0,he&=67108863,a=Math.imul(b,H),o=(o=Math.imul(b,G))+Math.imul(m,H)|0,r=Math.imul(m,G);var ge=(u+(a=a+Math.imul(l,K)|0)|0)+((8191&(o=(o=o+Math.imul(l,W)|0)+Math.imul(f,K)|0))<<13)|0;u=((r=r+Math.imul(f,W)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,a=Math.imul(g,H),o=(o=Math.imul(g,G))+Math.imul(y,H)|0,r=Math.imul(y,G),a=a+Math.imul(b,K)|0,o=(o=o+Math.imul(b,W)|0)+Math.imul(m,K)|0,r=r+Math.imul(m,W)|0;var ye=(u+(a=a+Math.imul(l,V)|0)|0)+((8191&(o=(o=o+Math.imul(l,q)|0)+Math.imul(f,V)|0))<<13)|0;u=((r=r+Math.imul(f,q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,a=Math.imul(w,H),o=(o=Math.imul(w,G))+Math.imul(k,H)|0,r=Math.imul(k,G),a=a+Math.imul(g,K)|0,o=(o=o+Math.imul(g,W)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,W)|0,a=a+Math.imul(b,V)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(m,V)|0,r=r+Math.imul(m,q)|0;var ve=(u+(a=a+Math.imul(l,J)|0)|0)+((8191&(o=(o=o+Math.imul(l,Y)|0)+Math.imul(f,J)|0))<<13)|0;u=((r=r+Math.imul(f,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,a=Math.imul(x,H),o=(o=Math.imul(x,G))+Math.imul(I,H)|0,r=Math.imul(I,G),a=a+Math.imul(w,K)|0,o=(o=o+Math.imul(w,W)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,W)|0,a=a+Math.imul(g,V)|0,o=(o=o+Math.imul(g,q)|0)+Math.imul(y,V)|0,r=r+Math.imul(y,q)|0,a=a+Math.imul(b,J)|0,o=(o=o+Math.imul(b,Y)|0)+Math.imul(m,J)|0,r=r+Math.imul(m,Y)|0;var we=(u+(a=a+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((r=r+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,a=Math.imul(S,H),o=(o=Math.imul(S,G))+Math.imul(C,H)|0,r=Math.imul(C,G),a=a+Math.imul(x,K)|0,o=(o=o+Math.imul(x,W)|0)+Math.imul(I,K)|0,r=r+Math.imul(I,W)|0,a=a+Math.imul(w,V)|0,o=(o=o+Math.imul(w,q)|0)+Math.imul(k,V)|0,r=r+Math.imul(k,q)|0,a=a+Math.imul(g,J)|0,o=(o=o+Math.imul(g,Y)|0)+Math.imul(y,J)|0,r=r+Math.imul(y,Y)|0,a=a+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(m,$)|0,r=r+Math.imul(m,ee)|0;var ke=(u+(a=a+Math.imul(l,ne)|0)|0)+((8191&(o=(o=o+Math.imul(l,ae)|0)+Math.imul(f,ne)|0))<<13)|0;u=((r=r+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,a=Math.imul(R,H),o=(o=Math.imul(R,G))+Math.imul(M,H)|0,r=Math.imul(M,G),a=a+Math.imul(S,K)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(C,K)|0,r=r+Math.imul(C,W)|0,a=a+Math.imul(x,V)|0,o=(o=o+Math.imul(x,q)|0)+Math.imul(I,V)|0,r=r+Math.imul(I,q)|0,a=a+Math.imul(w,J)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(k,J)|0,r=r+Math.imul(k,Y)|0,a=a+Math.imul(g,$)|0,o=(o=o+Math.imul(g,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,a=a+Math.imul(b,ne)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(m,ne)|0,r=r+Math.imul(m,ae)|0;var Ae=(u+(a=a+Math.imul(l,re)|0)|0)+((8191&(o=(o=o+Math.imul(l,ie)|0)+Math.imul(f,re)|0))<<13)|0;u=((r=r+Math.imul(f,ie)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,a=Math.imul(U,H),o=(o=Math.imul(U,G))+Math.imul(_,H)|0,r=Math.imul(_,G),a=a+Math.imul(R,K)|0,o=(o=o+Math.imul(R,W)|0)+Math.imul(M,K)|0,r=r+Math.imul(M,W)|0,a=a+Math.imul(S,V)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(C,V)|0,r=r+Math.imul(C,q)|0,a=a+Math.imul(x,J)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(I,J)|0,r=r+Math.imul(I,Y)|0,a=a+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,a=a+Math.imul(g,ne)|0,o=(o=o+Math.imul(g,ae)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ae)|0,a=a+Math.imul(b,re)|0,o=(o=o+Math.imul(b,ie)|0)+Math.imul(m,re)|0,r=r+Math.imul(m,ie)|0;var xe=(u+(a=a+Math.imul(l,ce)|0)|0)+((8191&(o=(o=o+Math.imul(l,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((r=r+Math.imul(f,ue)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,a=Math.imul(D,H),o=(o=Math.imul(D,G))+Math.imul(N,H)|0,r=Math.imul(N,G),a=a+Math.imul(U,K)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(_,K)|0,r=r+Math.imul(_,W)|0,a=a+Math.imul(R,V)|0,o=(o=o+Math.imul(R,q)|0)+Math.imul(M,V)|0,r=r+Math.imul(M,q)|0,a=a+Math.imul(S,J)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(C,J)|0,r=r+Math.imul(C,Y)|0,a=a+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(I,$)|0,r=r+Math.imul(I,ee)|0,a=a+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ae)|0,a=a+Math.imul(g,re)|0,o=(o=o+Math.imul(g,ie)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,ie)|0,a=a+Math.imul(b,ce)|0,o=(o=o+Math.imul(b,ue)|0)+Math.imul(m,ce)|0,r=r+Math.imul(m,ue)|0;var Ie=(u+(a=a+Math.imul(l,le)|0)|0)+((8191&(o=(o=o+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;u=((r=r+Math.imul(f,fe)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,a=Math.imul(F,H),o=(o=Math.imul(F,G))+Math.imul(L,H)|0,r=Math.imul(L,G),a=a+Math.imul(D,K)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,W)|0,a=a+Math.imul(U,V)|0,o=(o=o+Math.imul(U,q)|0)+Math.imul(_,V)|0,r=r+Math.imul(_,q)|0,a=a+Math.imul(R,J)|0,o=(o=o+Math.imul(R,Y)|0)+Math.imul(M,J)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(C,$)|0,r=r+Math.imul(C,ee)|0,a=a+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(I,ne)|0,r=r+Math.imul(I,ae)|0,a=a+Math.imul(w,re)|0,o=(o=o+Math.imul(w,ie)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,ie)|0,a=a+Math.imul(g,ce)|0,o=(o=o+Math.imul(g,ue)|0)+Math.imul(y,ce)|0,r=r+Math.imul(y,ue)|0,a=a+Math.imul(b,le)|0,o=(o=o+Math.imul(b,fe)|0)+Math.imul(m,le)|0,r=r+Math.imul(m,fe)|0;var Te=(u+(a=a+Math.imul(l,be)|0)|0)+((8191&(o=(o=o+Math.imul(l,me)|0)+Math.imul(f,be)|0))<<13)|0;u=((r=r+Math.imul(f,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,a=Math.imul(F,K),o=(o=Math.imul(F,W))+Math.imul(L,K)|0,r=Math.imul(L,W),a=a+Math.imul(D,V)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(N,V)|0,r=r+Math.imul(N,q)|0,a=a+Math.imul(U,J)|0,o=(o=o+Math.imul(U,Y)|0)+Math.imul(_,J)|0,r=r+Math.imul(_,Y)|0,a=a+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(M,$)|0,r=r+Math.imul(M,ee)|0,a=a+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(C,ne)|0,r=r+Math.imul(C,ae)|0,a=a+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ie)|0)+Math.imul(I,re)|0,r=r+Math.imul(I,ie)|0,a=a+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(k,ce)|0,r=r+Math.imul(k,ue)|0,a=a+Math.imul(g,le)|0,o=(o=o+Math.imul(g,fe)|0)+Math.imul(y,le)|0,r=r+Math.imul(y,fe)|0;var Se=(u+(a=a+Math.imul(b,be)|0)|0)+((8191&(o=(o=o+Math.imul(b,me)|0)+Math.imul(m,be)|0))<<13)|0;u=((r=r+Math.imul(m,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,a=Math.imul(F,V),o=(o=Math.imul(F,q))+Math.imul(L,V)|0,r=Math.imul(L,q),a=a+Math.imul(D,J)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(N,J)|0,r=r+Math.imul(N,Y)|0,a=a+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(_,$)|0,r=r+Math.imul(_,ee)|0,a=a+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(M,ne)|0,r=r+Math.imul(M,ae)|0,a=a+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ie)|0)+Math.imul(C,re)|0,r=r+Math.imul(C,ie)|0,a=a+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,ue)|0)+Math.imul(I,ce)|0,r=r+Math.imul(I,ue)|0,a=a+Math.imul(w,le)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(k,le)|0,r=r+Math.imul(k,fe)|0;var Ce=(u+(a=a+Math.imul(g,be)|0)|0)+((8191&(o=(o=o+Math.imul(g,me)|0)+Math.imul(y,be)|0))<<13)|0;u=((r=r+Math.imul(y,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,a=Math.imul(F,J),o=(o=Math.imul(F,Y))+Math.imul(L,J)|0,r=Math.imul(L,Y),a=a+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,a=a+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(_,ne)|0,r=r+Math.imul(_,ae)|0,a=a+Math.imul(R,re)|0,o=(o=o+Math.imul(R,ie)|0)+Math.imul(M,re)|0,r=r+Math.imul(M,ie)|0,a=a+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(C,ce)|0,r=r+Math.imul(C,ue)|0,a=a+Math.imul(x,le)|0,o=(o=o+Math.imul(x,fe)|0)+Math.imul(I,le)|0,r=r+Math.imul(I,fe)|0;var Ee=(u+(a=a+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(k,be)|0))<<13)|0;u=((r=r+Math.imul(k,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,a=Math.imul(F,$),o=(o=Math.imul(F,ee))+Math.imul(L,$)|0,r=Math.imul(L,ee),a=a+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ae)|0,a=a+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ie)|0)+Math.imul(_,re)|0,r=r+Math.imul(_,ie)|0,a=a+Math.imul(R,ce)|0,o=(o=o+Math.imul(R,ue)|0)+Math.imul(M,ce)|0,r=r+Math.imul(M,ue)|0,a=a+Math.imul(S,le)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(C,le)|0,r=r+Math.imul(C,fe)|0;var Re=(u+(a=a+Math.imul(x,be)|0)|0)+((8191&(o=(o=o+Math.imul(x,me)|0)+Math.imul(I,be)|0))<<13)|0;u=((r=r+Math.imul(I,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,a=Math.imul(F,ne),o=(o=Math.imul(F,ae))+Math.imul(L,ne)|0,r=Math.imul(L,ae),a=a+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,ie)|0,a=a+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,ue)|0)+Math.imul(_,ce)|0,r=r+Math.imul(_,ue)|0,a=a+Math.imul(R,le)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(M,le)|0,r=r+Math.imul(M,fe)|0;var Me=(u+(a=a+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,me)|0)+Math.imul(C,be)|0))<<13)|0;u=((r=r+Math.imul(C,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,a=Math.imul(F,re),o=(o=Math.imul(F,ie))+Math.imul(L,re)|0,r=Math.imul(L,ie),a=a+Math.imul(D,ce)|0,o=(o=o+Math.imul(D,ue)|0)+Math.imul(N,ce)|0,r=r+Math.imul(N,ue)|0,a=a+Math.imul(U,le)|0,o=(o=o+Math.imul(U,fe)|0)+Math.imul(_,le)|0,r=r+Math.imul(_,fe)|0;var Pe=(u+(a=a+Math.imul(R,be)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(M,be)|0))<<13)|0;u=((r=r+Math.imul(M,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,a=Math.imul(F,ce),o=(o=Math.imul(F,ue))+Math.imul(L,ce)|0,r=Math.imul(L,ue),a=a+Math.imul(D,le)|0,o=(o=o+Math.imul(D,fe)|0)+Math.imul(N,le)|0,r=r+Math.imul(N,fe)|0;var Ue=(u+(a=a+Math.imul(U,be)|0)|0)+((8191&(o=(o=o+Math.imul(U,me)|0)+Math.imul(_,be)|0))<<13)|0;u=((r=r+Math.imul(_,me)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,a=Math.imul(F,le),o=(o=Math.imul(F,fe))+Math.imul(L,le)|0,r=Math.imul(L,fe);var _e=(u+(a=a+Math.imul(D,be)|0)|0)+((8191&(o=(o=o+Math.imul(D,me)|0)+Math.imul(N,be)|0))<<13)|0;u=((r=r+Math.imul(N,me)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863;var Be=(u+(a=Math.imul(F,be))|0)+((8191&(o=(o=Math.imul(F,me))+Math.imul(L,be)|0))<<13)|0;return u=((r=Math.imul(L,me))+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=he,c[1]=ge,c[2]=ye,c[3]=ve,c[4]=we,c[5]=ke,c[6]=Ae,c[7]=xe,c[8]=Ie,c[9]=Te,c[10]=Se,c[11]=Ce,c[12]=Ee,c[13]=Re,c[14]=Me,c[15]=Pe,c[16]=Ue,c[17]=_e,c[18]=Be,0!==u&&(c[19]=u,n.length++),n};function m(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(b=p),r.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return n=10===this.length&&10===e.length?b(this,e,t):a<63?p(this,e,t):a<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var a=0,o=0,r=0;r>>26)|0)>>>26,i&=67108863}n.words[r]=s,a=i,i=o}return 0!==a?n.words[r]=a:n.length--,n.strip()}(this,e,t):m(this,e,t),n},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,a=0;a>=1;return a},h.prototype.permute=function(e,t,n,a,o,r){for(var i=0;i>>=1)o++;return 1<>>=13,n[2*i+1]=8191&r,r>>>=13;for(i=2*t;i>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,a=0;a=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var i=0;for(t=0;t>>26-n}i&&(this.words[t]=i,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,i=Math.min((e-r)/26,this.length),s=67108863^67108863>>>r<i)for(this.length-=i,u=0;u=0&&(0!==d||u>=o);u--){var l=0|this.words[u];this.words[u]=d<<26-r|l>>>r,d=l&s}return c&&0!==d&&(c.words[c.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return a(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){a("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(a("number"===typeof e),a(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===s)return this.strip();for(a(-1===s),s=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),o=e,i=0|o.words[o.length-1];0!==(n=26-this._countBits(i))&&(o=o.ushln(n),a.iushln(n),i=0|o.words[o.length-1]);var s,c=a.length-o.length;if("mod"!==t){(s=new r(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var f=67108864*(0|a.words[o.length+l])+(0|a.words[o.length+l-1]);for(f=Math.min(f/i|0,67108863),a._ishlnsubmul(o,f,l);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(o,1,l),a.isZero()||(a.negative^=1);s&&(s.words[l]=f)}return s&&s.strip(),a.strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:s||null,mod:a}},r.prototype.divmod=function(e,t,n){return a(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:o,mod:i}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:s.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,i,s},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,a=e.ushrn(1),o=e.andln(1),r=n.cmp(a);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){a(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){a(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),i=new r(0),s=new r(0),c=new r(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var d=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;0===(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(d),i.isub(l)),o.iushrn(1),i.iushrn(1);for(var b=0,m=1;0===(n.words[0]&m)&&b<26;++b,m<<=1);if(b>0)for(n.iushrn(b);b-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(d),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),i.isub(c)):(n.isub(t),s.isub(o),c.isub(i))}return{a:s,b:c,gcd:n.iushln(u)}},r.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,i=new r(1),s=new r(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,d=1;0===(t.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(c),i.iushrn(1);for(var l=0,f=1;0===(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s)):(n.isub(t),s.isub(i))}return(o=0===t.cmpn(1)?i:s).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(a)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){a("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,s&=67108863,this.words[i]=s}return 0!==r&&(this.words[i]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),a(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var a=0|this.words[n],o=0|e.words[n];if(a!==o){ao&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new x(e)},r.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var a=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(v,y),v.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),o=0;o>>22,r=i}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=a}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},x.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){a(0===(e.negative|t.negative),"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2===1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),i=0;!o.isZero()&&0===o.andln(1);)i++,o.iushrn(1);a(!o.isZero());var s=new r(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new r(2*d*d).toRed(this);0!==this.pow(d,u).cmp(c);)d.redIAdd(c);for(var l=this.pow(d,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),b=i;0!==p.cmp(s);){for(var m=p,h=0;0!==m.cmp(s);h++)m=m.redSqr();a(h=0;a--){for(var u=t.words[a],d=c-1;d>=0;d--){var l=u>>d&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==i?(i<<=1,i|=l,(4===++s||0===a&&0===d)&&(o=this.mul(o,n[i]),s=0,i=0)):s=0}c=26}return o},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new I(e)},o(I,x),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},33172:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.importPublic=t.privateToPublic=t.privateToAddress=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.isPrecompiled=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isZeroAddress=t.isValidAddress=t.zeroAddress=void 0;var o=n(75979),r=n(90455),i=n(3837),s=n(65571),c=n(74229),u=n(69386);t.zeroAddress=function(){var e=c.zeros(20);return c.bufferToHex(e)},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===c.addHexPrefix(e)},t.toChecksumAddress=function(e,t){e=r.stripHexPrefix(e).toLowerCase();for(var n=void 0!==t?t.toString()+"0x":"",a=u.keccak(n+e).toString("hex"),o="0x",i=0;i=8?o+=e[i].toUpperCase():o+=e[i];return o},t.isValidChecksumAddress=function(e,n){return t.isValidAddress(e)&&t.toChecksumAddress(e,n)===e},t.generateAddress=function(e,t){e=c.toBuffer(e);var n=new s(t);return n.isZero()?u.rlphash([e,null]).slice(-20):u.rlphash([e,a.from(n.toArray())]).slice(-20)},t.generateAddress2=function(e,t,n){var r=c.toBuffer(e),i=c.toBuffer(t),s=c.toBuffer(n);return o(20===r.length),o(32===i.length),u.keccak256(a.concat([a.from("ff","hex"),r,i,u.keccak256(s)])).slice(-20)},t.isPrecompiled=function(e){var t=c.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},t.isValidPrivate=function(e){return i.privateKeyVerify(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),64===e.length?i.publicKeyVerify(a.concat([a.from([4]),e])):!!t&&i.publicKeyVerify(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),e=c.toBuffer(e),t&&64!==e.length&&(e=i.publicKeyConvert(e,!1).slice(1)),o(64===e.length),u.keccak(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToAddress=function(e){return t.publicToAddress(t.privateToPublic(e))},t.privateToPublic=function(e){return e=c.toBuffer(e),i.publicKeyCreate(e,!1).slice(1)},t.importPublic=function(e){return 64!==(e=c.toBuffer(e)).length&&(e=i.publicKeyConvert(e,!1).slice(1)),e}},74229:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.baToJSON=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.stripZeros=t.unpad=t.setLengthRight=t.setLength=t.setLengthLeft=t.zeros=void 0;var o=n(90455),r=n(65571);t.zeros=function(e){return a.allocUnsafe(e).fill(0)},t.setLengthLeft=function(e,n,a){void 0===a&&(a=!1);var o=t.zeros(n);return e=t.toBuffer(e),a?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},t.stripZeros=t.unpad,t.toBuffer=function(e){if(!a.isBuffer(e))if(Array.isArray(e))e=a.from(e);else if("string"===typeof e){if(!o.isHexString(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+e);e=a.from(o.padToEven(o.stripHexPrefix(e)),"hex")}else if("number"===typeof e)e=o.intToBuffer(e);else if(null===e||void 0===e)e=a.allocUnsafe(0);else if(r.isBN(e))e=e.toArrayLike(a);else{if(!e.toArray)throw new Error("invalid type");e=a.from(e.toArray())}return e},t.bufferToInt=function(e){return new r(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new r(e).fromTwos(256)},t.toUnsigned=function(e){return a.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!==typeof e||o.isHexPrefixed(e)?e:"0x"+e},t.baToJSON=function(e){if(a.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var n=[],o=0;o=r.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===r.length||!t.length||o(t.length===r.length,"The field "+t.name+" must have byte length of "+t.length),e.raw[n]=r}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:r,set:i}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:i,get:r})})),n)if("string"===typeof n&&(n=a.from(r.stripHexPrefix(n),"hex")),a.isBuffer(n)&&(n=i.decode(n)),Array.isArray(n)){if(n.length>e._fields.length)throw new Error("wrong number of fields in data");n.forEach((function(t,n){e[e._fields[n]]=s.toBuffer(t)}))}else{if("object"!==typeof n)throw new Error("invalid data");var c=Object.keys(n);t.forEach((function(t){-1!==c.indexOf(t.name)&&(e[t.name]=n[t.name]),-1!==c.indexOf(t.alias)&&(e[t.alias]=n[t.alias])}))}}},3837:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.ecdhUnsafe=t.ecdh=t.recover=t.verify=t.sign=t.signatureImportLax=t.signatureImport=t.signatureExport=t.signatureNormalize=t.publicKeyCombine=t.publicKeyTweakMul=t.publicKeyTweakAdd=t.publicKeyVerify=t.publicKeyConvert=t.publicKeyCreate=t.privateKeyTweakMul=t.privateKeyTweakAdd=t.privateKeyModInverse=t.privateKeyNegate=t.privateKeyImport=t.privateKeyExport=t.privateKeyVerify=void 0;var o=n(65074),r=n(64784),i=n(12449);t.privateKeyVerify=function(e){return 32===e.length&&o.privateKeyVerify(Uint8Array.from(e))},t.privateKeyExport=function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var n=r.privateKeyExport(e,t);return i.privateKeyExport(e,n,t)},t.privateKeyImport=function(e){if(null!==(e=i.privateKeyImport(e))&&32===e.length&&t.privateKeyVerify(e))return e;throw new Error("couldn't import from DER format")},t.privateKeyNegate=function(e){return a.from(o.privateKeyNegate(Uint8Array.from(e)))},t.privateKeyModInverse=function(e){if(32!==e.length)throw new Error("private key length is invalid");return a.from(r.privateKeyModInverse(Uint8Array.from(e)))},t.privateKeyTweakAdd=function(e,t){return a.from(o.privateKeyTweakAdd(Uint8Array.from(e),t))},t.privateKeyTweakMul=function(e,t){return a.from(o.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},t.publicKeyCreate=function(e,t){return a.from(o.publicKeyCreate(Uint8Array.from(e),t))},t.publicKeyConvert=function(e,t){return a.from(o.publicKeyConvert(Uint8Array.from(e),t))},t.publicKeyVerify=function(e){return(33===e.length||65===e.length)&&o.publicKeyVerify(Uint8Array.from(e))},t.publicKeyTweakAdd=function(e,t,n){return a.from(o.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),n))},t.publicKeyTweakMul=function(e,t,n){return a.from(o.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),n))},t.publicKeyCombine=function(e,t){var n=[];return e.forEach((function(e){n.push(Uint8Array.from(e))})),a.from(o.publicKeyCombine(n,t))},t.signatureNormalize=function(e){return a.from(o.signatureNormalize(Uint8Array.from(e)))},t.signatureExport=function(e){return a.from(o.signatureExport(Uint8Array.from(e)))},t.signatureImport=function(e){return a.from(o.signatureImport(Uint8Array.from(e)))},t.signatureImportLax=function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=i.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return r.signatureImport(t)},t.sign=function(e,t,n){if(null===n)throw new TypeError("options should be an Object");var r=void 0;if(n){if(r={},null===n.data)throw new TypeError("options.data should be a Buffer");if(n.data){if(32!=n.data.length)throw new RangeError("options.data length is invalid");r.data=new Uint8Array(n.data)}if(null===n.noncefn)throw new TypeError("options.noncefn should be a Function");n.noncefn&&(r.noncefn=function(e,t,o,r,i){var s=null!=o?a.from(o):null,c=null!=r?a.from(r):null,u=a.from("");return n.noncefn&&(u=n.noncefn(a.from(e),a.from(t),s,c,i)),new Uint8Array(u)})}var i=o.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),r);return{signature:a.from(i.signature),recovery:i.recid}},t.verify=function(e,t,n){return o.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),n)},t.recover=function(e,t,n,r){return a.from(o.ecdsaRecover(Uint8Array.from(t),n,Uint8Array.from(e),r))},t.ecdh=function(e,t){return a.from(o.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},t.ecdhUnsafe=function(e,t,n){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return a.from(r.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),n))}},12449:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var o=a.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),r=a.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(e,t,n){void 0===n&&(n=!0);var i=a.from(n?o:r);return e.copy(i,n?8:9),t.copy(i,n?181:214),i},t.privateKeyImport=function(e){var t=e.length,n=0;if(t2)return null;if(t<(n+=1)+a)return null;var o=e[n+a-1]|(a>1?e[n+a-2]<<8:0);return t<(n+=a)+o||t32||to)return null;if(2!==e[r++])return null;var s=e[r++];if(128&s){if(r+(i=s-128)>o)return null;for(;i>0&&0===e[r];r+=1,i-=1);for(s=0;i>0;r+=1,i-=1)s=(s<<8)+e[r]}if(s>o-r)return null;var c=r;if(r+=s,2!==e[r++])return null;var u=e[r++];if(128&u){if(r+(i=u-128)>o)return null;for(;i>0&&0===e[r];r+=1,i-=1);for(u=0;i>0;r+=1,i-=1)u=(u<<8)+e[r]}if(u>o-r)return null;var d=r;for(r+=u;s>0&&0===e[c];s-=1,c+=1);if(s>32)return null;var l=e.slice(c,c+s);for(l.copy(t,32-l.length);u>0&&0===e[d];u-=1,d+=1);if(u>32)return null;var f=e.slice(d,d+u);return f.copy(n,32-f.length),{r:t,s:n}}},64784:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var o=n(65571),r=new(0,n(69205).ec)("secp256k1"),i=r.curve;t.privateKeyExport=function(e,t){void 0===t&&(t=!0);var n=new o(e);if(n.ucmp(i.n)>=0)throw new Error("couldn't export to DER format");var a=r.g.mul(n);return s(a.getX(),a.getY(),t)},t.privateKeyModInverse=function(e){var t=new o(e);if(t.ucmp(i.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(i.n).toArrayLike(a,"be",32)},t.signatureImport=function(e){var t=new o(e.r);t.ucmp(i.n)>=0&&(t=new o(0));var n=new o(e.s);return n.ucmp(i.n)>=0&&(n=new o(0)),a.concat([t.toArrayLike(a,"be",32),n.toArrayLike(a,"be",32)])},t.ecdhUnsafe=function(e,t,n){void 0===n&&(n=!0);var a=r.keyFromPublic(e),c=new o(t);if(c.ucmp(i.n)>=0||c.isZero())throw new Error("scalar was invalid (zero or overflow)");var u=a.pub.mul(c);return s(u.getX(),u.getY(),n)};var s=function(e,t,n){var o;return n?((o=a.alloc(33))[0]=t.isOdd()?3:2,e.toArrayLike(a,"be",32).copy(o,1)):((o=a.alloc(65))[0]=4,e.toArrayLike(a,"be",32).copy(o,1),t.toArrayLike(a,"be",32).copy(o,33)),o}},81850:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var o=n(3837),r=n(65571),i=n(74229),s=n(69386);function c(e,t){return t?e-(2*t+35):e-27}function u(e){return 0===e||1===e}t.ecsign=function(e,t,n){var a=o.sign(e,t),r=a.recovery;return{r:a.signature.slice(0,32),s:a.signature.slice(32,64),v:n?r+(2*n+35):r+27}},t.ecrecover=function(e,t,n,r,s){var d=a.concat([i.setLength(n,32),i.setLength(r,32)],64),l=c(t,s);if(!u(l))throw new Error("Invalid signature v value");var f=o.recover(e,d,l);return o.publicKeyConvert(f,!1).slice(1)},t.toRpcSig=function(e,t,n,o){if(!u(c(e,o)))throw new Error("Invalid signature v value");return i.bufferToHex(a.concat([i.setLengthLeft(t,32),i.setLengthLeft(n,32),i.toBuffer(e)]))},t.fromRpcSig=function(e){var t=i.toBuffer(e);if(65!==t.length)throw new Error("Invalid signature length");var n=t[64];return n<27&&(n+=27),{v:n,r:t.slice(0,32),s:t.slice(32,64)}},t.isValidSignature=function(e,t,n,a,o){void 0===a&&(a=!0);var i=new r("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new r("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==n.length)return!1;if(!u(c(e,o)))return!1;var d=new r(t),l=new r(n);return!(d.isZero()||d.gt(s)||l.isZero()||l.gt(s))&&(!a||1!==l.cmp(i))},t.hashPersonalMessage=function(e){var t=a.from("\x19Ethereum Signed Message:\n"+e.length.toString(),"utf-8");return s.keccak(a.concat([t,e]))}},32280:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,o,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var i=r(n(75979)),s=n(62332),c=n(65074),u=n(11307),d=n(13784),l=n(14347),f=n(10023),p=n(40091),b=n(31936),m=function(){function e(e,t,n,a){void 0===e&&(e=new s.BN(0)),void 0===t&&(t=new s.BN(0)),void 0===n&&(n=d.KECCAK256_RLP),void 0===a&&(a=d.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=n,this.codeHash=a,this._validate()}return e.fromAccountData=function(t){var n=t.nonce,a=t.balance,o=t.stateRoot,r=t.codeHash;return new e(n?new s.BN((0,l.toBuffer)(n)):void 0,a?new s.BN((0,l.toBuffer)(a)):void 0,o?(0,l.toBuffer)(o):void 0,r?(0,l.toBuffer)(r):void 0)},e.fromRlpSerializedAccount=function(e){var t=s.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var n=o(t,4),a=n[0],r=n[1],i=n[2],c=n[3];return new e(new s.BN(a),new s.BN(r),i,c)},e.prototype._validate=function(){if(this.nonce.lt(new s.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new s.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,b.bnToUnpaddedBuffer)(this.nonce),(0,b.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return s.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(d.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(d.KECCAK256_NULL)},e}();t.Account=m;t.isValidAddress=function(e){try{(0,p.assertIsString)(e)}catch(t){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};t.toChecksumAddress=function(e,t){(0,p.assertIsHexString)(e);var n=(0,u.stripHexPrefix)(e).toLowerCase(),a="";t&&(a=(0,b.toType)(t,b.TypeOutput.BN).toString()+"0x");for(var o=(0,f.keccakFromString)(a+n).toString("hex"),r="0x",i=0;i=8?r+=n[i].toUpperCase():r+=n[i];return r};t.isValidChecksumAddress=function(e,n){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,n)===e};t.generateAddress=function(e,t){(0,p.assertIsBuffer)(e),(0,p.assertIsBuffer)(t);var n=new s.BN(t);return n.isZero()?(0,f.rlphash)([e,null]).slice(-20):(0,f.rlphash)([e,a.from(n.toArray())]).slice(-20)};t.generateAddress2=function(e,t,n){return(0,p.assertIsBuffer)(e),(0,p.assertIsBuffer)(t),(0,p.assertIsBuffer)(n),(0,i.default)(20===e.length),(0,i.default)(32===t.length),(0,f.keccak256)(a.concat([a.from("ff","hex"),e,t,(0,f.keccak256)(n)])).slice(-20)};t.isValidPrivate=function(e){return(0,c.privateKeyVerify)(e)};t.isValidPublic=function(e,t){return void 0===t&&(t=!1),(0,p.assertIsBuffer)(e),64===e.length?(0,c.publicKeyVerify)(a.concat([a.from([4]),e])):!!t&&(0,c.publicKeyVerify)(e)};t.pubToAddress=function(e,t){return void 0===t&&(t=!1),(0,p.assertIsBuffer)(e),t&&64!==e.length&&(e=a.from((0,c.publicKeyConvert)(e,!1).slice(1))),(0,i.default)(64===e.length),(0,f.keccak)(e).slice(-20)},t.publicToAddress=t.pubToAddress;t.privateToPublic=function(e){return(0,p.assertIsBuffer)(e),a.from((0,c.publicKeyCreate)(e,!1)).slice(1)};t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))};t.importPublic=function(e){return(0,p.assertIsBuffer)(e),64!==e.length&&(e=a.from((0,c.publicKeyConvert)(e,!1).slice(1))),e};t.zeroAddress=function(){var e=(0,l.zeros)(20);return(0,l.bufferToHex)(e)};t.isZeroAddress=function(e){try{(0,p.assertIsString)(e)}catch(n){return!1}return(0,t.zeroAddress)()===e}},43674:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var r=o(n(75979)),i=n(62332),s=n(14347),c=n(32280),u=function(){function e(e){(0,r.default)(20===e.length,"Invalid address length"),this.buf=e}return e.zero=function(){return new e((0,s.zeros)(20))},e.fromString=function(t){return(0,r.default)((0,c.isValidAddress)(t),"Invalid address"),new e((0,s.toBuffer)(t))},e.fromPublicKey=function(t){return(0,r.default)(a.isBuffer(t),"Public key should be Buffer"),new e((0,c.pubToAddress)(t))},e.fromPrivateKey=function(t){return(0,r.default)(a.isBuffer(t),"Private key should be Buffer"),new e((0,c.privateToAddress)(t))},e.generate=function(t,n){return(0,r.default)(i.BN.isBN(n)),new e((0,c.generateAddress)(t.buf,n.toArrayLike(a)))},e.generate2=function(t,n,o){return(0,r.default)(a.isBuffer(n)),(0,r.default)(a.isBuffer(o)),new e((0,c.generateAddress2)(t.buf,n,o))},e.prototype.equals=function(e){return this.buf.equals(e.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var e=new i.BN(this.buf),t=new i.BN(0),n=new i.BN("ffff","hex");return e.gte(t)&&e.lte(n)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return a.from(this.buf)},e}();t.Address=u},14347:function(e,t,n){"use strict";var a=n(54659).Buffer,o=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],a=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,o,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var i=n(62332),s=n(11307),c=n(40091);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))};t.intToBuffer=function(e){var n=(0,t.intToHex)(e);return a.from((0,s.padToEven)(n.slice(2)),"hex")};t.zeros=function(e){return a.allocUnsafe(e).fill(0)};var u=function(e,n,a){var o=(0,t.zeros)(n);return a?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,c.assertIsBuffer)(e),d(e)};t.unpadArray=function(e){return(0,c.assertIsArray)(e),d(e)};t.unpadHexString=function(e){return(0,c.assertIsHexString)(e),e=(0,s.stripHexPrefix)(e),d(e)};t.toBuffer=function(e){if(null===e||void 0===e)return a.allocUnsafe(0);if(a.isBuffer(e))return a.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return a.from(e);if("string"===typeof e){if(!(0,s.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return a.from((0,s.padToEven)((0,s.stripHexPrefix)(e)),"hex")}if("number"===typeof e)return(0,t.intToBuffer)(e);if(i.BN.isBN(e)){if(e.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(e));return e.toArrayLike(a)}if(e.toArray)return a.from(e.toArray());if(e.toBuffer)return a.from(e.toBuffer());throw new Error("invalid type")};t.bufferToInt=function(e){return new i.BN((0,t.toBuffer)(e)).toNumber()};t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")};t.fromSigned=function(e){return new i.BN(e).fromTwos(256)};t.toUnsigned=function(e){return a.from(e.toTwos(256).toArray())};t.addHexPrefix=function(e){return"string"!==typeof e||(0,s.isHexPrefixed)(e)?e:"0x"+e};t.toUtf8=function(e){if((e=(0,s.stripHexPrefix)(e)).length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return a.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};t.baToJSON=function(e){if(a.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var n=[],o=0;o0&&0===u[0])throw new Error("".concat(c," cannot have leading zeroes, received: ").concat(u.toString("hex")))}}catch(d){t={error:d}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):a.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!==t&&void 0!==t?t:[])}},13784:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var a=n(54659),o=n(62332);t.MAX_UINT64=new o.BN("ffffffffffffffff",16),t.MAX_INTEGER=new o.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new o.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=a.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=a.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=a.Buffer.from(t.KECCAK256_RLP_S,"hex")},62332:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var s=i(n(43811));t.BN=s.default;var c=r(n(85684));t.rlp=c},10023:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var o=n(17818),r=n(40222),i=n(62332),s=n(14347),c=n(40091);t.keccak=function(e,t){switch(void 0===t&&(t=256),(0,c.assertIsBuffer)(e),t){case 224:return(0,o.keccak224)(e);case 256:return(0,o.keccak256)(e);case 384:return(0,o.keccak384)(e);case 512:return(0,o.keccak512)(e);default:throw new Error("Invald algorithm: keccak".concat(t))}};t.keccak256=function(e){return(0,t.keccak)(e)};t.keccakFromString=function(e,n){void 0===n&&(n=256),(0,c.assertIsString)(e);var o=a.from(e,"utf8");return(0,t.keccak)(o,n)};t.keccakFromHexString=function(e,n){return void 0===n&&(n=256),(0,c.assertIsHexString)(e),(0,t.keccak)((0,s.toBuffer)(e),n)};t.keccakFromArray=function(e,n){return void 0===n&&(n=256),(0,c.assertIsArray)(e),(0,t.keccak)((0,s.toBuffer)(e),n)};var u=function(e){return e=(0,s.toBuffer)(e),r("sha256").update(e).digest()};t.sha256=function(e){return(0,c.assertIsBuffer)(e),u(e)};t.sha256FromString=function(e){return(0,c.assertIsString)(e),u(e)};t.sha256FromArray=function(e){return(0,c.assertIsArray)(e),u(e)};var d=function(e,t){e=(0,s.toBuffer)(e);var n=r("rmd160").update(e).digest();return!0===t?(0,s.setLengthLeft)(n,32):n};t.ripemd160=function(e,t){return(0,c.assertIsBuffer)(e),d(e,t)};t.ripemd160FromString=function(e,t){return(0,c.assertIsString)(e),d(e,t)};t.ripemd160FromArray=function(e,t){return(0,c.assertIsArray)(e),d(e,t)};t.rlphash=function(e){return(0,t.keccak)(i.rlp.encode(e))}},40091:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var o=n(11307);t.assertIsHexString=function(e){if(!(0,o.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}};t.assertIsBuffer=function(e){if(!a.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}};t.assertIsArray=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}};t.assertIsString=function(e){if("string"!==typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}}},47772:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,o(n(13784),t),o(n(32280),t),o(n(43674),t),o(n(10023),t),o(n(40175),t),o(n(14347),t),o(n(43701),t),o(n(62332),t),o(n(31936),t);var r=n(11307);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return r.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return r.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return r.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return r.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return r.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return r.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return r.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return r.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return r.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return r.isHexString}})},11307:function(e,t,n){"use strict";var a=n(54659).Buffer;function o(e){if("string"!==typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat(typeof e));return"0"===e[0]&&"x"===e[1]}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=o;function r(e){var t=e;if("string"!==typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat(typeof t));return t.length%2&&(t="0".concat(t)),t}t.stripHexPrefix=function(e){if("string"!==typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat(typeof e));return o(e)?e.slice(2):e},t.padToEven=r,t.getBinarySize=function(e){if("string"!==typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat(typeof e));return a.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,n){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat(typeof e,"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat(typeof t,"'"));return t[n?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",n=0,a=e.length;for("0x"===e.substring(0,2)&&(n=2);n=o.length,"The field ".concat(t.name," must not have more ").concat(t.length," bytes"))):t.allowZero&&0===o.length||!t.length||(0,r.default)(t.length===o.length,"The field ".concat(t.name," must have byte length of ").concat(t.length)),e.raw[n]=o}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:o,set:i}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:i,get:o})})),n)if("string"===typeof n&&(n=a.from((0,i.stripHexPrefix)(n),"hex")),a.isBuffer(n)&&(n=s.rlp.decode(n)),Array.isArray(n)){if(n.length>e._fields.length)throw new Error("wrong number of fields in data");n.forEach((function(t,n){e[e._fields[n]]=(0,c.toBuffer)(t)}))}else{if("object"!==typeof n)throw new Error("invalid data");var o=Object.keys(n);t.forEach((function(t){-1!==o.indexOf(t.name)&&(e[t.name]=n[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=n[t.alias])}))}}},40175:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var o=n(65074),r=n(62332),i=n(14347),s=n(10023),c=n(40091),u=n(31936);function d(e,t){var n=(0,u.toType)(e,u.TypeOutput.BN);if(n.eqn(0)||n.eqn(1))return(0,u.toType)(e,u.TypeOutput.BN);if(!t)return n.subn(27);var a=(0,u.toType)(t,u.TypeOutput.BN);return n.sub(a.muln(2).addn(35))}function l(e){var t=new r.BN(e);return t.eqn(0)||t.eqn(1)}t.ecsign=function(e,t,n){var r=(0,o.ecdsaSign)(e,t),i=r.signature,s=r.recid,c=a.from(i.slice(0,32)),d=a.from(i.slice(32,64));if(!n||"number"===typeof n){if(n&&!Number.isSafeInteger(n))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:c,s:d,v:n?s+(2*n+35):s+27}}return{r:c,s:d,v:(0,u.toType)(n,u.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(a)}};t.ecrecover=function(e,t,n,r,s){var c=a.concat([(0,i.setLengthLeft)(n,32),(0,i.setLengthLeft)(r,32)],64),u=d(t,s);if(!l(u))throw new Error("Invalid signature v value");var f=(0,o.ecdsaRecover)(c,u.toNumber(),e);return a.from((0,o.publicKeyConvert)(f,!1).slice(1))};t.toRpcSig=function(e,t,n,o){if(!l(d(e,o)))throw new Error("Invalid signature v value");return(0,i.bufferToHex)(a.concat([(0,i.setLengthLeft)(t,32),(0,i.setLengthLeft)(n,32),(0,i.toBuffer)(e)]))};t.toCompactSig=function(e,t,n,o){if(!l(d(e,o)))throw new Error("Invalid signature v value");var r=(0,u.toType)(e,u.TypeOutput.Number),s=n;return(r>28&&r%2===1||1===r||28===r)&&((s=a.from(n))[0]|=128),(0,i.bufferToHex)(a.concat([(0,i.setLengthLeft)(t,32),(0,i.setLengthLeft)(s,32)]))};t.fromRpcSig=function(e){var t,n,a,o=(0,i.toBuffer)(e);if(o.length>=65)t=o.slice(0,32),n=o.slice(32,64),a=(0,i.bufferToInt)(o.slice(64));else{if(64!==o.length)throw new Error("Invalid signature length");t=o.slice(0,32),n=o.slice(32,64),a=(0,i.bufferToInt)(o.slice(32,33))>>7,n[0]&=127}return a<27&&(a+=27),{v:a,r:t,s:n}};t.isValidSignature=function(e,t,n,a,o){void 0===a&&(a=!0);var i=new r.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new r.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==n.length)return!1;if(!l(d(e,o)))return!1;var c=new r.BN(t),u=new r.BN(n);return!(c.isZero()||c.gt(s)||u.isZero()||u.gt(s))&&(!a||1!==u.cmp(i))};t.hashPersonalMessage=function(e){(0,c.assertIsBuffer)(e);var t=a.from("\x19Ethereum Signed Message:\n".concat(e.length),"utf-8");return(0,s.keccak)(a.concat([t,e]))}},31936:function(e,t,n){"use strict";var a=n(54659).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var o,r=n(62332),i=n(11307),s=n(14347);function c(e){return(0,s.unpadBuffer)(e.toArrayLike(a))}t.bnToHex=function(e){return"0x".concat(e.toString(16))},t.bnToUnpaddedBuffer=c,t.bnToRlp=function(e){return c(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(o=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"===typeof e&&!(0,i.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"===typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var n=(0,s.toBuffer)(e);if(t===o.Buffer)return n;if(t===o.BN)return new r.BN(n);if(t===o.Number){var a=new r.BN(n),c=new r.BN(Number.MAX_SAFE_INTEGER.toString());if(a.gt(c))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return a.toNumber()}return"0x".concat(n.toString("hex"))}}},93519:function(e,t,n){"use strict";n.r(t),n.d(t,{BaseContract:function(){return s.VZ},BigNumber:function(){return c.O$},Contract:function(){return s.CH},ContractFactory:function(){return s.lV},FixedNumber:function(){return u.xs},Signer:function(){return d.E},VoidSigner:function(){return d.b},Wallet:function(){return l.Wallet},Wordlist:function(){return Qt.D},constants:function(){return a},errors:function(){return g.ErrorCode},ethers:function(){return i},getDefaultProvider:function(){return Vt},logger:function(){return hn},providers:function(){return o},utils:function(){return r},version:function(){return mn},wordlists:function(){return qt.E}});var a={};n.r(a),n.d(a,{AddressZero:function(){return f},EtherSymbol:function(){return m},HashZero:function(){return b.R},MaxInt256:function(){return p.PS},MaxUint256:function(){return p.Bz},MinInt256:function(){return p.$B},NegativeOne:function(){return p.tL},One:function(){return p.fh},Two:function(){return p.Py},WeiPerEther:function(){return p.Ce},Zero:function(){return p._Y}});var o={};n.r(o),n.d(o,{AlchemyProvider:function(){return $e},AlchemyWebSocketProvider:function(){return Xe},AnkrProvider:function(){return at},BaseProvider:function(){return ke},CloudflareProvider:function(){return it},EtherscanProvider:function(){return bt},FallbackProvider:function(){return Mt},Formatter:function(){return V},InfuraProvider:function(){return Dt},InfuraWebSocketProvider:function(){return Bt},IpcProvider:function(){return Pt},JsonRpcBatchProvider:function(){return Nt},JsonRpcProvider:function(){return Fe},JsonRpcSigner:function(){return De},NodesmithProvider:function(){return Ft},PocketProvider:function(){return Ht},Provider:function(){return h.zt},Resolver:function(){return ye},StaticJsonRpcProvider:function(){return qe},UrlJsonRpcProvider:function(){return Qe},Web3Provider:function(){return Wt},WebSocketProvider:function(){return We},getDefaultProvider:function(){return Vt},getNetwork:function(){return T},isCommunityResourcable:function(){return q},isCommunityResource:function(){return Q},showThrottleMessage:function(){return Y}});var r={};n.r(r),n.d(r,{AbiCoder:function(){return Jt.R},ConstructorFragment:function(){return Yt.Xg},ErrorFragment:function(){return Yt.IC},EventFragment:function(){return Yt.QV},FormatTypes:function(){return Yt.pc},Fragment:function(){return Yt.HY},FunctionFragment:function(){return Yt.YW},HDNode:function(){return an.HDNode},Indexed:function(){return $t.Hk},Interface:function(){return $t.vU},LogDescription:function(){return $t.CC},Logger:function(){return g.Logger},ParamType:function(){return Yt._R},RLP:function(){return un},SigningKey:function(){return dn.SigningKey},SupportedAlgorithm:function(){return bn.p},TransactionDescription:function(){return $t.vk},TransactionTypes:function(){return K.TransactionTypes},UnicodeNormalizationForm:function(){return F.Uj},Utf8ErrorFuncs:function(){return F.te},Utf8ErrorReason:function(){return F.Uw},_TypedDataEncoder:function(){return Te.E},_fetchData:function(){return L._fetchData},_toEscapedUtf8String:function(){return F.U$},accessListify:function(){return K.accessListify},arrayify:function(){return B.arrayify},base58:function(){return _.Base58},base64:function(){return en},checkProperties:function(){return N.checkProperties},checkResultErrors:function(){return Xt.BR},commify:function(){return pn.commify},computeAddress:function(){return K.computeAddress},computeHmac:function(){return O.Gy},computePublicKey:function(){return dn.computePublicKey},concat:function(){return B.concat},deepCopy:function(){return N.deepCopy},defaultAbiCoder:function(){return Jt.$},defaultPath:function(){return an.defaultPath},defineReadOnly:function(){return N.defineReadOnly},dnsEncode:function(){return D.Kn},entropyToMnemonic:function(){return an.entropyToMnemonic},fetchJson:function(){return L.fetchJson},formatBytes32String:function(){return fn.s},formatEther:function(){return pn.formatEther},formatUnits:function(){return pn.formatUnits},getAccountPath:function(){return an.getAccountPath},getAddress:function(){return z.getAddress},getContractAddress:function(){return z.getContractAddress},getCreate2Address:function(){return z.getCreate2Address},getIcapAddress:function(){return z.getIcapAddress},getJsonWalletAddress:function(){return on.Rb},getStatic:function(){return N.getStatic},hashMessage:function(){return tn.r},hexConcat:function(){return B.hexConcat},hexDataLength:function(){return B.hexDataLength},hexDataSlice:function(){return B.hexDataSlice},hexStripZeros:function(){return B.hexStripZeros},hexValue:function(){return B.hexValue},hexZeroPad:function(){return B.hexZeroPad},hexlify:function(){return B.hexlify},id:function(){return nn.id},isAddress:function(){return z.isAddress},isBytes:function(){return B.isBytes},isBytesLike:function(){return B.isBytesLike},isHexString:function(){return B.isHexString},isValidMnemonic:function(){return an.isValidMnemonic},isValidName:function(){return D.r1},joinSignature:function(){return B.joinSignature},keccak256:function(){return rn.keccak256},mnemonicToEntropy:function(){return an.mnemonicToEntropy},mnemonicToSeed:function(){return an.mnemonicToSeed},namehash:function(){return D.VM},nameprep:function(){return ln.Ll},parseBytes32String:function(){return fn.F},parseEther:function(){return pn.parseEther},parseTransaction:function(){return K.parse},parseUnits:function(){return pn.parseUnits},poll:function(){return L.poll},randomBytes:function(){return cn.O},recoverAddress:function(){return K.recoverAddress},recoverPublicKey:function(){return dn.recoverPublicKey},resolveProperties:function(){return N.resolveProperties},ripemd160:function(){return O.bP},serializeTransaction:function(){return K.serialize},sha256:function(){return O.JQ},sha512:function(){return O.o},shallowCopy:function(){return N.shallowCopy},shuffled:function(){return mt.y},solidityKeccak256:function(){return sn.keccak256},solidityPack:function(){return sn.pack},soliditySha256:function(){return sn.sha256},splitSignature:function(){return B.splitSignature},stripZeros:function(){return B.stripZeros},toUtf8Bytes:function(){return F.Y0},toUtf8CodePoints:function(){return F.XL},toUtf8String:function(){return F.ZN},verifyMessage:function(){return l.verifyMessage},verifyTypedData:function(){return l.verifyTypedData},zeroPad:function(){return B.zeroPad}});var i={};n.r(i),n.d(i,{BaseContract:function(){return s.VZ},BigNumber:function(){return c.O$},Contract:function(){return s.CH},ContractFactory:function(){return s.lV},FixedNumber:function(){return u.xs},Signer:function(){return d.E},VoidSigner:function(){return d.b},Wallet:function(){return l.Wallet},Wordlist:function(){return Qt.D},constants:function(){return a},errors:function(){return g.ErrorCode},getDefaultProvider:function(){return Vt},logger:function(){return hn},providers:function(){return o},utils:function(){return r},version:function(){return mn},wordlists:function(){return qt.E}});var s=n(72696),c=n(60492),u=n(88065),d=n(21477),l=n(13084),f="0x0000000000000000000000000000000000000000",p=n(96772),b=n(73570),m="\u039e",h=n(34407),g=n(93830),y=new g.Logger("networks/5.7.1");function v(e){var t=function(t,n){null==n&&(n={});var a=[];if(t.InfuraProvider&&"-"!==n.infura)try{a.push(new t.InfuraProvider(e,n.infura))}catch(s){}if(t.EtherscanProvider&&"-"!==n.etherscan)try{a.push(new t.EtherscanProvider(e,n.etherscan))}catch(s){}if(t.AlchemyProvider&&"-"!==n.alchemy)try{a.push(new t.AlchemyProvider(e,n.alchemy))}catch(s){}if(t.PocketProvider&&"-"!==n.pocket){try{var o=new t.PocketProvider(e,n.pocket);o.network&&-1===["goerli","ropsten","rinkeby","sepolia"].indexOf(o.network.name)&&a.push(o)}catch(s){}}if(t.CloudflareProvider&&"-"!==n.cloudflare)try{a.push(new t.CloudflareProvider(e))}catch(s){}if(t.AnkrProvider&&"-"!==n.ankr)try{var r=new t.AnkrProvider(e,n.ankr);r.network&&-1===["ropsten"].indexOf(r.network.name)&&a.push(r)}catch(s){}if(0===a.length)return null;if(t.FallbackProvider){var i=1;return null!=n.quorum?i=n.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(a,i)}return a[0]};return t.renetwork=function(e){return v(e)},t}function w(e,t){var n=function(n,a){return n.JsonRpcProvider?new n.JsonRpcProvider(e,t):null};return n.renetwork=function(t){return w(e,t)},n}var k={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:v("homestead")},A={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:v("ropsten")},x={chainId:63,name:"classicMordor",_defaultProvider:w("https://www.ethercluster.com/mordor","classicMordor")},I={unspecified:{chainId:0,name:"unspecified"},homestead:k,mainnet:k,morden:{chainId:2,name:"morden"},ropsten:A,testnet:A,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:v("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:v("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:v("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:v("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:w("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:x,classicTestnet:x,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:w("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:v("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:v("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function T(e){if(null==e)return null;if("number"===typeof e){for(var t in I){var n=I[t];if(n.chainId===e)return{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress||null,_defaultProvider:n._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"===typeof e){var a=I[e];return null==a?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}var o=I[e.name];if(!o)return"number"!==typeof e.chainId&&y.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==o.chainId&&y.throwArgumentError("network chainId mismatch","network",e);var r,i=e._defaultProvider||null;return null==i&&o._defaultProvider&&(i=(r=o._defaultProvider)&&"function"===typeof r.renetwork?o._defaultProvider.renetwork(e):o._defaultProvider),{name:e.name,chainId:o.chainId,ensAddress:e.ensAddress||o.ensAddress||null,_defaultProvider:i}}var S=n(97326),C=n(60136),E=n(29388),R=n(74165),M=n(15671),P=n(43144),U=n(58224),_=n(69851),B=n(7965),D=n(20956),N=n(62734),O=n(11577),F=n(41705),L=n(75858),j=n(48810),H=n.n(j),G="providers/5.7.2",z=n(56602),K=n(59632),W=n(65218),Z=new g.Logger(G),V=function(){function e(){(0,M.Z)(this,e),this.formats=this.getDefaultFormats()}return(0,P.Z)(e,[{key:"getDefaultFormats",value:function(){var t=this,n={},a=this.address.bind(this),o=this.bigNumber.bind(this),r=this.blockTag.bind(this),i=this.data.bind(this),s=this.hash.bind(this),c=this.hex.bind(this),u=this.number.bind(this),d=this.type.bind(this);return n.transaction={hash:s,type:d,accessList:e.allowNull(this.accessList.bind(this),null),blockHash:e.allowNull(s,null),blockNumber:e.allowNull(u,null),transactionIndex:e.allowNull(u,null),confirmations:e.allowNull(u,null),from:a,gasPrice:e.allowNull(o),maxPriorityFeePerGas:e.allowNull(o),maxFeePerGas:e.allowNull(o),gasLimit:o,to:e.allowNull(a,null),value:o,nonce:u,data:i,r:e.allowNull(this.uint256),s:e.allowNull(this.uint256),v:e.allowNull(u),creates:e.allowNull(a,null),raw:e.allowNull(i)},n.transactionRequest={from:e.allowNull(a),nonce:e.allowNull(u),gasLimit:e.allowNull(o),gasPrice:e.allowNull(o),maxPriorityFeePerGas:e.allowNull(o),maxFeePerGas:e.allowNull(o),to:e.allowNull(a),value:e.allowNull(o),data:e.allowNull((function(e){return t.data(e,!0)})),type:e.allowNull(u),accessList:e.allowNull(this.accessList.bind(this),null)},n.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:s,address:a,topics:e.arrayOf(s),data:i,logIndex:u,blockHash:s},n.receipt={to:e.allowNull(this.address,null),from:e.allowNull(this.address,null),contractAddress:e.allowNull(a,null),transactionIndex:u,root:e.allowNull(c),gasUsed:o,logsBloom:e.allowNull(i),blockHash:s,transactionHash:s,logs:e.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:e.allowNull(u,null),cumulativeGasUsed:o,effectiveGasPrice:e.allowNull(o),status:e.allowNull(u),type:d},n.block={hash:e.allowNull(s),parentHash:s,number:u,timestamp:u,nonce:e.allowNull(c),difficulty:this.difficulty.bind(this),gasLimit:o,gasUsed:o,miner:e.allowNull(a),extraData:i,transactions:e.allowNull(e.arrayOf(s)),baseFeePerGas:e.allowNull(o)},n.blockWithTransactions=(0,N.shallowCopy)(n.block),n.blockWithTransactions.transactions=e.allowNull(e.arrayOf(this.transactionResponse.bind(this))),n.filter={fromBlock:e.allowNull(r,void 0),toBlock:e.allowNull(r,void 0),blockHash:e.allowNull(s,void 0),address:e.allowNull(a,void 0),topics:e.allowNull(this.topics.bind(this),void 0)},n.filterLog={blockNumber:e.allowNull(u),blockHash:e.allowNull(s),transactionIndex:u,removed:e.allowNull(this.boolean.bind(this)),address:a,data:e.allowFalsish(i,"0x"),topics:e.arrayOf(s),transactionHash:s,logIndex:u},n}},{key:"accessList",value:function(e){return(0,K.accessListify)(e||[])}},{key:"number",value:function(e){return"0x"===e?0:c.O$.from(e).toNumber()}},{key:"type",value:function(e){return"0x"===e||null==e?0:c.O$.from(e).toNumber()}},{key:"bigNumber",value:function(e){return c.O$.from(e)}},{key:"boolean",value:function(e){if("boolean"===typeof e)return e;if("string"===typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}},{key:"hex",value:function(e,t){return"string"===typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,B.isHexString)(e))?e.toLowerCase():Z.throwArgumentError("invalid hash","value",e)}},{key:"data",value:function(e,t){var n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}},{key:"address",value:function(e){return(0,z.getAddress)(e)}},{key:"callAddress",value:function(e){if(!(0,B.isHexString)(e,32))return null;var t=(0,z.getAddress)((0,B.hexDataSlice)(e,12));return t===f?null:t}},{key:"contractAddress",value:function(e){return(0,z.getContractAddress)(e)}},{key:"blockTag",value:function(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"===typeof e||(0,B.isHexString)(e))return(0,B.hexValue)(e);throw new Error("invalid blockTag")}},{key:"hash",value:function(e,t){var n=this.hex(e,t);return 32!==(0,B.hexDataLength)(n)?Z.throwArgumentError("invalid hash","value",e):n}},{key:"difficulty",value:function(e){if(null==e)return null;var t=c.O$.from(e);try{return t.toNumber()}catch(n){}return null}},{key:"uint256",value:function(e){if(!(0,B.isHexString)(e))throw new Error("invalid uint256");return(0,B.hexZeroPad)(e,32)}},{key:"_block",value:function(t,n){null!=t.author&&null==t.miner&&(t.miner=t.author);var a=null!=t._difficulty?t._difficulty:t.difficulty,o=e.check(n,t);return o._difficulty=null==a?null:c.O$.from(a),o}},{key:"block",value:function(e){return this._block(e,this.formats.block)}},{key:"blockWithTransactions",value:function(e){return this._block(e,this.formats.blockWithTransactions)}},{key:"transactionRequest",value:function(t){return e.check(this.formats.transactionRequest,t)}},{key:"transactionResponse",value:function(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&c.O$.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1!==t.type&&2!==t.type||null!=t.accessList||(t.accessList=[]);var n=e.check(this.formats.transaction,t);if(null!=t.chainId){var a=t.chainId;(0,B.isHexString)(a)&&(a=c.O$.from(a).toNumber()),n.chainId=a}else{var o=t.networkId;null==o&&null==n.v&&(o=t.chainId),(0,B.isHexString)(o)&&(o=c.O$.from(o).toNumber()),"number"!==typeof o&&null!=n.v&&((o=(n.v-35)/2)<0&&(o=0),o=parseInt(o)),"number"!==typeof o&&(o=0),n.chainId=o}return n.blockHash&&"x"===n.blockHash.replace(/0/g,"")&&(n.blockHash=null),n}},{key:"transaction",value:function(e){return(0,K.parse)(e)}},{key:"receiptLog",value:function(t){return e.check(this.formats.receiptLog,t)}},{key:"receipt",value:function(t){var n=e.check(this.formats.receipt,t);if(null!=n.root)if(n.root.length<=4){var a=c.O$.from(n.root).toNumber();0===a||1===a?(null!=n.status&&n.status!==a&&Z.throwArgumentError("alt-root-status/status mismatch","value",{root:n.root,status:n.status}),n.status=a,delete n.root):Z.throwArgumentError("invalid alt-root-status","value.root",n.root)}else 66!==n.root.length&&Z.throwArgumentError("invalid root hash","value.root",n.root);return null!=n.status&&(n.byzantium=!0),n}},{key:"topics",value:function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.topics(e)})):null!=e?this.hash(e,!0):null}},{key:"filter",value:function(t){return e.check(this.formats.filter,t)}},{key:"filterLog",value:function(t){return e.check(this.formats.filterLog,t)}}],[{key:"check",value:function(e,t){var n={};for(var a in e)try{var o=e[a](t[a]);void 0!==o&&(n[a]=o)}catch(r){throw r.checkKey=a,r.checkValue=t[a],r}return n}},{key:"allowNull",value:function(e,t){return function(n){return null==n?t:e(n)}}},{key:"allowFalsish",value:function(e,t){return function(n){return n?e(n):t}}},{key:"arrayOf",value:function(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");var n=[];return t.forEach((function(t){n.push(e(t))})),n}}}]),e}();function q(e){return e&&"function"===typeof e.isCommunityResource}function Q(e){return q(e)&&e.isCommunityResource()}var J=!1;function Y(){J||(J=!0,W.log("========= NOTICE ========="),W.log("Request-Rate Exceeded (this message will not be repeated)"),W.log(""),W.log("The default API keys for each service are provided as a highly-throttled,"),W.log("community resource for low-traffic projects and early prototyping."),W.log(""),W.log("While your application will continue to function, we highly recommended"),W.log("signing up for your own API keys to improve performance, increase your"),W.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),W.log(""),W.log("For more details: https://docs.ethers.io/api-keys/"),W.log("=========================="))}var X=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},$=new g.Logger(G);function ee(e){return null==e?"null":(32!==(0,B.hexDataLength)(e)&&$.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function te(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((function(e){if(Array.isArray(e)){var t={};e.forEach((function(e){t[ee(e)]=!0}));var n=Object.keys(t);return n.sort(),n.join("|")}return ee(e)})).join("&")}function ne(e){if("string"===typeof e){if(e=e.toLowerCase(),32===(0,B.hexDataLength)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+te(e);if(h.Sg.isForkEvent(e))throw $.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+te(e.topics||[])}throw new Error("invalid event - "+e)}function ae(){return(new Date).getTime()}function oe(e){return new Promise((function(t){setTimeout(t,e)}))}var re=["block","network","pending","poll"],ie=function(){function e(t,n,a){(0,M.Z)(this,e),(0,N.defineReadOnly)(this,"tag",t),(0,N.defineReadOnly)(this,"listener",n),(0,N.defineReadOnly)(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}return(0,P.Z)(e,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}},{key:"filter",get:function(){var e=this.tag.split(":");if("filter"!==e[0])return null;var t,n=e[1],a=""===(t=e[2])?[]:t.split(/&/g).map((function(e){if(""===e)return[];var t=e.split("|").map((function(e){return"null"===e?null:e}));return 1===t.length?t[0]:t})),o={};return a.length>0&&(o.topics=a),n&&"*"!==n&&(o.address=n),o}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||re.indexOf(this.tag)>=0}}]),e}(),se={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function ce(e){return(0,B.hexZeroPad)(c.O$.from(e).toHexString(),32)}function ue(e){return _.Base58.encode((0,B.concat)([e,(0,B.hexDataSlice)((0,O.JQ)((0,O.JQ)(e)),0,4)]))}var de=new RegExp("^(ipfs)://(.*)$","i"),le=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),de,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function fe(e,t){try{return(0,F.ZN)(pe(e,t))}catch(n){}return null}function pe(e,t){if("0x"===e)return null;var n=c.O$.from((0,B.hexDataSlice)(e,t,t+32)).toNumber(),a=c.O$.from((0,B.hexDataSlice)(e,n,n+32)).toNumber();return(0,B.hexDataSlice)(e,n+32,n+32+a)}function be(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):$.throwArgumentError("unsupported IPFS format","link",e),"https://gateway.ipfs.io/ipfs/".concat(e)}function me(e){var t=(0,B.arrayify)(e);if(t.length>32)throw new Error("internal; should not happen");var n=new Uint8Array(32);return n.set(t,32-t.length),n}function he(e){if(e.length%32===0)return e;var t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function ge(e){for(var t=[],n=0,a=0;a=1&&r<=75)return ue((0,B.concat)([[n.p2pkh],"0x"+o[2]]))}}if(null!=n.p2sh){var i=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(i){var s=parseInt(i[1],16);if(i[2].length===2*s&&s>=1&&s<=75)return ue((0,B.concat)([[n.p2sh],"0x"+i[2]]))}}if(null!=n.prefix){var c=a[1],u=a[0];if(0===u?20!==c&&32!==c&&(u=-1):u=-1,u>=0&&a.length===2+c&&c>=1&&c<=75){var d=H().toWords(a.slice(2));return d.unshift(u),H().encode(n.prefix,d)}}return null}},{key:"getAddress",value:function(e){return X(this,void 0,void 0,(0,R.Z)().mark((function t(){var n,a,o;return(0,R.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e&&(e=60),60!==e){t.next=16;break}return t.prev=2,t.next=5,this._fetch("0x3b3b57de");case 5:if("0x"!==(n=t.sent)&&n!==b.R){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",this.provider.formatter.callAddress(n));case 11:if(t.prev=11,t.t0=t.catch(2),t.t0.code!==g.Logger.errors.CALL_EXCEPTION){t.next=15;break}return t.abrupt("return",null);case 15:throw t.t0;case 16:return t.next=18,this._fetchBytes("0xf1cb7e06",ce(e));case 18:if(null!=(a=t.sent)&&"0x"!==a){t.next=21;break}return t.abrupt("return",null);case 21:return null==(o=this._getAddress(e,a))&&$.throwError("invalid or unsupported coin data",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")"),coinType:e,data:a}),t.abrupt("return",o);case 24:case"end":return t.stop()}}),t,this,[[2,11]])})))}},{key:"getAvatar",value:function(){return X(this,void 0,void 0,(0,R.Z)().mark((function e(){var t,n,a,o,r,i,s,u,d,l,f,p,b,m,h,g;return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[{type:"name",content:this.name}],e.prev=1,e.next=4,this.getText("avatar");case 4:if(null!=(n=e.sent)){e.next=7;break}return e.abrupt("return",null);case 7:a=0;case 8:if(!(a=0?null:JSON.stringify({data:r,sender:o}),a.next=12,(0,L.fetchJson)({url:u,errorPassThrough:!0},d,(function(e,t){return e.status=t.statusCode,e}));case 12:if(!(l=a.sent).data){a.next=15;break}return a.abrupt("return",l.data);case 15:if(f=l.message||"unknown error",!(l.status>=400&&l.status<500)){a.next=18;break}return a.abrupt("return",$.throwError("response not found during CCIP fetch: ".concat(f),g.Logger.errors.SERVER_ERROR,{url:c,errorMessage:f}));case 18:i.push(f);case 19:s++,a.next=6;break;case 22:return a.abrupt("return",$.throwError("error encountered during CCIP fetch: ".concat(i.map((function(e){return JSON.stringify(e)})).join(", ")),g.Logger.errors.SERVER_ERROR,{urls:n,errorMessages:i}));case 23:case"end":return a.stop()}}),a,this)})))}},{key:"_getInternalBlockNumber",value:function(e){return X(this,void 0,void 0,(0,R.Z)().mark((function t(){var n,a,o,r,i=this;return(0,R.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:if(!(e>0)){t.next=20;break}case 3:if(!this._internalBlockNumber){t.next=20;break}return n=this._internalBlockNumber,t.prev=5,t.next=8,n;case 8:if(a=t.sent,!(ae()-a.respTime<=e)){t.next=11;break}return t.abrupt("return",a.blockNumber);case 11:return t.abrupt("break",20);case 14:if(t.prev=14,t.t0=t.catch(5),this._internalBlockNumber!==n){t.next=18;break}return t.abrupt("break",20);case 18:t.next=3;break;case 20:return o=ae(),r=(0,N.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(e){return null}),(function(e){return e}))}).then((function(e){var t=e.blockNumber,n=e.networkError;if(n)throw i._internalBlockNumber===r&&(i._internalBlockNumber=null),n;var a=ae();return(t=c.O$.from(t).toNumber())1e3)$.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(a,")")),this.emit("error",$.makeError("network block skew detected",g.Logger.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(o=this._emitted.block+1;o<=a;o++)this.emit("block",o);return this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach((function(e){if("block"!==e){var t=r._emitted[e];"pending"!==t&&a-t>12&&delete r._emitted[e]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=a-1),this._events.forEach((function(e){switch(e.type){case"tx":var t=e.hash,o=r.getTransactionReceipt(t).then((function(e){return e&&null!=e.blockNumber?(r._emitted["t:"+t]=e.blockNumber,r.emit(t,e),null):null})).catch((function(e){r.emit("error",e)}));n.push(o);break;case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=a-1);var i=e.filter;i.fromBlock=e._lastBlockNumber+1,i.toBlock=a;var s=i.toBlock-r._maxFilterBlockRange;s>i.fromBlock&&(i.fromBlock=s),i.fromBlock<0&&(i.fromBlock=0);var c=r.getLogs(i).then((function(t){e._inflight=!1,0!==t.length&&t.forEach((function(t){t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),r._emitted["b:"+t.blockHash]=t.blockNumber,r._emitted["t:"+t.transactionHash]=t.blockNumber,r.emit(i,t)}))})).catch((function(t){r.emit("error",t),e._inflight=!1}));n.push(c)}}})),this._lastBlockNumber=a,Promise.all(n).then((function(){r.emit("didPoll",t)})).catch((function(e){r.emit("error",e)})),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return X(this,void 0,void 0,(0,R.Z)().mark((function e(){return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$.throwError("provider does not support network detection",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return e.stop()}}),e)})))}},{key:"getNetwork",value:function(){return X(this,void 0,void 0,(0,R.Z)().mark((function e(){var t,n,a;return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:return t=e.sent,e.next=5,this.detectNetwork();case 5:if(n=e.sent,t.chainId===n.chainId){e.next=23;break}if(!this.anyNetwork){e.next=20;break}return this._network=n,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",n,t),e.next=19,oe(0);case 19:return e.abrupt("return",this._network);case 20:throw a=$.makeError("underlying network changed",g.Logger.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:n}),this.emit("error",a),a;case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"blockNumber",get:function(){var e=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(t){e._setFastBlockNumber(t)}),(function(e){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(e){var t=this;e&&!this._poller?(this._poller=setInterval((function(){t.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){t.poll(),t._bootstrapPoll=setTimeout((function(){t._poller||t.poll(),t._bootstrapPoll=null}),t.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(e){var t=this;if("number"!==typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){t.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var e=this,t=ae();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}},{key:"waitForTransaction",value:function(e,t,n){return X(this,void 0,void 0,(0,R.Z)().mark((function a(){return(0,R.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",this._waitForTransaction(e,null==t?1:t,n||0,null));case 1:case"end":return a.stop()}}),a,this)})))}},{key:"_waitForTransaction",value:function(e,t,n,a){return X(this,void 0,void 0,(0,R.Z)().mark((function o(){var r,i=this;return(0,R.Z)().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.getTransactionReceipt(e);case 2:if(!(((r=o.sent)?r.confirmations:0)>=t)){o.next=5;break}return o.abrupt("return",r);case 5:return o.abrupt("return",new Promise((function(o,r){var s=[],c=!1,u=function(){return!!c||(c=!0,s.forEach((function(e){e()})),!1)},d=function(e){e.confirmations0){var b=setTimeout((function(){u()||r($.makeError("timeout exceeded",g.Logger.errors.TIMEOUT,{timeout:n}))}),n);b.unref&&b.unref(),s.push((function(){clearTimeout(b)}))}})));case 6:case"end":return o.stop()}}),o,this)})))}},{key:"getBlockNumber",value:function(){return X(this,void 0,void 0,(0,R.Z)().mark((function e(){return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return X(this,void 0,void 0,(0,R.Z)().mark((function e(){var t;return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,this.perform("getGasPrice",{});case 4:return t=e.sent,e.prev=5,e.abrupt("return",c.O$.from(t));case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",$.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e.t0}));case 12:case"end":return e.stop()}}),e,this,[[5,9]])})))}},{key:"getBalance",value:function(e,t){return X(this,void 0,void 0,(0,R.Z)().mark((function n(){var a,o;return(0,R.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,(0,N.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return a=n.sent,n.next=7,this.perform("getBalance",a);case 7:return o=n.sent,n.prev=8,n.abrupt("return",c.O$.from(o));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",$.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getBalance",params:a,result:o,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(e,t){return X(this,void 0,void 0,(0,R.Z)().mark((function n(){var a,o;return(0,R.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,(0,N.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return a=n.sent,n.next=7,this.perform("getTransactionCount",a);case 7:return o=n.sent,n.prev=8,n.abrupt("return",c.O$.from(o).toNumber());case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",$.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:o,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getCode",value:function(e,t){return X(this,void 0,void 0,(0,R.Z)().mark((function n(){var a,o;return(0,R.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,(0,N.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return a=n.sent,n.next=7,this.perform("getCode",a);case 7:return o=n.sent,n.prev=8,n.abrupt("return",(0,B.hexlify)(o));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",$.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getCode",params:a,result:o,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getStorageAt",value:function(e,t,n){return X(this,void 0,void 0,(0,R.Z)().mark((function a(){var o,r;return(0,R.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.getNetwork();case 2:return a.next=4,(0,N.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then((function(e){return(0,B.hexValue)(e)}))});case 4:return o=a.sent,a.next=7,this.perform("getStorageAt",o);case 7:return r=a.sent,a.prev=8,a.abrupt("return",(0,B.hexlify)(r));case 12:return a.prev=12,a.t0=a.catch(8),a.abrupt("return",$.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:o,result:r,error:a.t0}));case 15:case"end":return a.stop()}}),a,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(e,t,n){var a=this;if(null!=t&&32!==(0,B.hexDataLength)(t))throw new Error("invalid response - sendTransaction");var o=e;return null!=t&&e.hash!==t&&$.throwError("Transaction hash mismatch from Provider.sendTransaction.",g.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),o.wait=function(t,o){return X(a,void 0,void 0,(0,R.Z)().mark((function a(){var r,i;return(0,R.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return null==t&&(t=1),null==o&&(o=0),r=void 0,0!==t&&null!=n&&(r={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n}),a.next=6,this._waitForTransaction(e.hash,t,o,r);case 6:if(null!=(i=a.sent)||0!==t){a.next=9;break}return a.abrupt("return",null);case 9:return this._emitted["t:"+e.hash]=i.blockNumber,0===i.status&&$.throwError("transaction failed",g.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:i}),a.abrupt("return",i);case 12:case"end":return a.stop()}}),a,this)})))},o}},{key:"sendTransaction",value:function(e){return X(this,void 0,void 0,(0,R.Z)().mark((function t(){var n,a,o,r;return(0,R.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,Promise.resolve(e).then((function(e){return(0,B.hexlify)(e)}));case 4:return n=t.sent,null==(a=this.formatter.transaction(e)).confirmations&&(a.confirmations=0),t.next=9,this._getInternalBlockNumber(100+2*this.pollingInterval);case 9:return o=t.sent,t.prev=10,t.next=13,this.perform("sendTransaction",{signedTransaction:n});case 13:return r=t.sent,t.abrupt("return",this._wrapTransaction(a,r,o));case 17:throw t.prev=17,t.t0=t.catch(10),t.t0.transaction=a,t.t0.transactionHash=a.hash,t.t0;case 22:case"end":return t.stop()}}),t,this,[[10,17]])})))}},{key:"_getTransactionRequest",value:function(e){return X(this,void 0,void 0,(0,R.Z)().mark((function t(){var n,a,o=this;return(0,R.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return n=t.sent,a={},["from","to"].forEach((function(e){null!=n[e]&&(a[e]=Promise.resolve(n[e]).then((function(e){return e?o._getAddress(e):null})))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((function(e){null!=n[e]&&(a[e]=Promise.resolve(n[e]).then((function(e){return e?c.O$.from(e):null})))})),["type"].forEach((function(e){null!=n[e]&&(a[e]=Promise.resolve(n[e]).then((function(e){return null!=e?e:null})))})),n.accessList&&(a.accessList=this.formatter.accessList(n.accessList)),["data"].forEach((function(e){null!=n[e]&&(a[e]=Promise.resolve(n[e]).then((function(e){return e?(0,B.hexlify)(e):null})))})),t.t0=this.formatter,t.next=12,(0,N.resolveProperties)(a);case 12:return t.t1=t.sent,t.abrupt("return",t.t0.transactionRequest.call(t.t0,t.t1));case 14:case"end":return t.stop()}}),t,this)})))}},{key:"_getFilter",value:function(e){return X(this,void 0,void 0,(0,R.Z)().mark((function t(){var n,a=this;return(0,R.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,n={},null!=e.address&&(n.address=this._getAddress(e.address)),["blockHash","topics"].forEach((function(t){null!=e[t]&&(n[t]=e[t])})),["fromBlock","toBlock"].forEach((function(t){null!=e[t]&&(n[t]=a._getBlockTag(e[t]))})),t.t0=this.formatter,t.next=10,(0,N.resolveProperties)(n);case 10:return t.t1=t.sent,t.abrupt("return",t.t0.filter.call(t.t0,t.t1));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"_call",value:function(e,t,n){return X(this,void 0,void 0,(0,R.Z)().mark((function a(){var o,r,i,s,u,d,l,f,p,b,m,h,y,v,w;return(0,R.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n>=10&&$.throwError("CCIP read exceeded maximum redirections",g.Logger.errors.SERVER_ERROR,{redirects:n,transaction:e}),o=e.to,a.next=4,this.perform("call",{transaction:e,blockTag:t});case 4:if(r=a.sent,!(n>=0&&"latest"===t&&null!=o&&"0x556f1830"===r.substring(0,10)&&(0,B.hexDataLength)(r)%32===4)){a.next=31;break}for(a.prev=6,i=(0,B.hexDataSlice)(r,4),s=(0,B.hexDataSlice)(i,0,32),c.O$.from(s).eq(o)||$.throwError("CCIP Read sender did not match",g.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r}),u=[],d=c.O$.from((0,B.hexDataSlice)(i,32,64)).toNumber(),l=c.O$.from((0,B.hexDataSlice)(i,d,d+32)).toNumber(),f=(0,B.hexDataSlice)(i,d+32),p=0;pthis._emitted.block)){e.next=10;break}return e.abrupt("return",null);case 10:return e.abrupt("return",void 0);case 11:if(!t){e.next=34;break}r=null,i=0;case 14:if(!(i0}},{key:"_stopEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_addEventListener",value:function(e,t,n){var a=new ie(ne(e),t,n);return this._events.push(a),this._startEvent(a),this}},{key:"on",value:function(e,t){return this._addEventListener(e,t,!1)}},{key:"once",value:function(e,t){return this._addEventListener(e,t,!0)}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,a=new Array(n>1?n-1:0),o=1;o=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Ce.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",g.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:a}),t}function Pe(e){return new Promise((function(t){setTimeout(t,e)}))}function Ue(e){if(e.error){var t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function _e(e){return e?e.toLowerCase():e}var Be={},De=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(e,a,o){var r;if((0,M.Z)(this,n),r=t.call(this),e!==Be)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return(0,N.defineReadOnly)((0,S.Z)(r),"provider",a),null==o&&(o=0),"string"===typeof o?((0,N.defineReadOnly)((0,S.Z)(r),"_address",r.provider.formatter.address(o)),(0,N.defineReadOnly)((0,S.Z)(r),"_index",null)):"number"===typeof o?((0,N.defineReadOnly)((0,S.Z)(r),"_index",o),(0,N.defineReadOnly)((0,S.Z)(r),"_address",null)):Ce.throwArgumentError("invalid address or index","addressOrIndex",o),r}return(0,P.Z)(n,[{key:"connect",value:function(e){return Ce.throwError("cannot alter JSON-RPC Signer connection",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}},{key:"connectUnchecked",value:function(){return new Ne(Be,this.provider,this._address||this._index)}},{key:"getAddress",value:function(){var e=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(t){return t.length<=e._index&&Ce.throwError("unknown account #"+e._index,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),e.provider.formatter.address(t[e._index])}))}},{key:"sendUncheckedTransaction",value:function(e){var t=this;e=(0,N.shallowCopy)(e);var n=this.getAddress().then((function(e){return e&&(e=e.toLowerCase()),e}));if(null==e.gasLimit){var a=(0,N.shallowCopy)(e);a.from=n,e.gasLimit=this.provider.estimateGas(a)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((function(e){return Se(t,void 0,void 0,(0,R.Z)().mark((function t(){var n;return(0,R.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=e){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this.provider.resolveName(e);case 4:return null==(n=t.sent)&&Ce.throwArgumentError("provided ENS name resolves to null","tx.to",e),t.abrupt("return",n);case 7:case"end":return t.stop()}}),t,this)})))}))),(0,N.resolveProperties)({tx:(0,N.resolveProperties)(e),sender:n}).then((function(n){var a=n.tx,o=n.sender;null!=a.from?a.from.toLowerCase()!==o&&Ce.throwArgumentError("from address mismatch","transaction",e):a.from=o;var r=t.provider.constructor.hexlifyTransaction(a,{from:!0});return t.provider.send("eth_sendTransaction",[r]).then((function(e){return e}),(function(e){return"string"===typeof e.message&&e.message.match(/user denied/i)&&Ce.throwError("user rejected transaction",g.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),Me("sendTransaction",e,r)}))}))}},{key:"signTransaction",value:function(e){return Ce.throwError("signing transactions is unsupported",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}},{key:"sendTransaction",value:function(e){return Se(this,void 0,void 0,(0,R.Z)().mark((function t(){var n,a,o=this;return(0,R.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval);case 2:return n=t.sent,t.next=5,this.sendUncheckedTransaction(e);case 5:return a=t.sent,t.prev=6,t.next=9,(0,L.poll)((function(){return Se(o,void 0,void 0,(0,R.Z)().mark((function e(){var t;return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.getTransaction(a);case 2:if(null!==(t=e.sent)){e.next=5;break}return e.abrupt("return",void 0);case 5:return e.abrupt("return",this.provider._wrapTransaction(t,a,n));case 6:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this.provider});case 9:return t.abrupt("return",t.sent);case 12:throw t.prev=12,t.t0=t.catch(6),t.t0.transactionHash=a,t.t0;case 16:case"end":return t.stop()}}),t,this,[[6,12]])})))}},{key:"signMessage",value:function(e){return Se(this,void 0,void 0,(0,R.Z)().mark((function t(){var n,a;return(0,R.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="string"===typeof e?(0,F.Y0)(e):e,t.next=3,this.getAddress();case 3:return a=t.sent,t.prev=4,t.next=7,this.provider.send("personal_sign",[(0,B.hexlify)(n),a.toLowerCase()]);case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),"string"===typeof t.t0.message&&t.t0.message.match(/user denied/i)&&Ce.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),t.t0;case 14:case"end":return t.stop()}}),t,this,[[4,10]])})))}},{key:"_legacySignMessage",value:function(e){return Se(this,void 0,void 0,(0,R.Z)().mark((function t(){var n,a;return(0,R.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="string"===typeof e?(0,F.Y0)(e):e,t.next=3,this.getAddress();case 3:return a=t.sent,t.prev=4,t.next=7,this.provider.send("eth_sign",[a.toLowerCase(),(0,B.hexlify)(n)]);case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),"string"===typeof t.t0.message&&t.t0.message.match(/user denied/i)&&Ce.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),t.t0;case 14:case"end":return t.stop()}}),t,this,[[4,10]])})))}},{key:"_signTypedData",value:function(e,t,n){return Se(this,void 0,void 0,(0,R.Z)().mark((function a(){var o,r,i=this;return(0,R.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Te.E.resolveNames(e,t,n,(function(e){return i.provider.resolveName(e)}));case 2:return o=a.sent,a.next=5,this.getAddress();case 5:return r=a.sent,a.prev=6,a.next=9,this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(Te.E.getPayload(o.domain,t,o.value))]);case 9:return a.abrupt("return",a.sent);case 12:throw a.prev=12,a.t0=a.catch(6),"string"===typeof a.t0.message&&a.t0.message.match(/user denied/i)&&Ce.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:o.domain,types:t,value:o.value}}),a.t0;case 16:case"end":return a.stop()}}),a,this,[[6,12]])})))}},{key:"unlock",value:function(e){return Se(this,void 0,void 0,(0,R.Z)().mark((function t(){var n,a;return(0,R.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.provider,t.next=3,this.getAddress();case 3:return a=t.sent,t.abrupt("return",n.send("personal_unlockAccount",[a.toLowerCase(),e,null]));case 5:case"end":return t.stop()}}),t,this)})))}}]),n}(d.E),Ne=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(){return(0,M.Z)(this,n),t.apply(this,arguments)}return(0,P.Z)(n,[{key:"sendTransaction",value:function(e){var t=this;return this.sendUncheckedTransaction(e).then((function(e){return{hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(n){return t.provider.waitForTransaction(e,n)}}}))}}]),n}(De),Oe={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Fe=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(e,a){var o;(0,M.Z)(this,n);var r=a;return null==r&&(r=new Promise((function(e,t){setTimeout((function(){o.detectNetwork().then((function(t){e(t)}),(function(e){t(e)}))}),0)}))),o=t.call(this,r),e||(e=(0,N.getStatic)(o.constructor,"defaultUrl")()),"string"===typeof e?(0,N.defineReadOnly)((0,S.Z)(o),"connection",Object.freeze({url:e})):(0,N.defineReadOnly)((0,S.Z)(o),"connection",Object.freeze((0,N.shallowCopy)(e))),o._nextId=42,o}return(0,P.Z)(n,[{key:"_cache",get:function(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}},{key:"detectNetwork",value:function(){var e=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((function(){e._cache.detectNetwork=null}),0)),this._cache.detectNetwork}},{key:"_uncachedDetectNetwork",value:function(){return Se(this,void 0,void 0,(0,R.Z)().mark((function e(){var t,n;return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe(0);case 2:return t=null,e.prev=3,e.next=6,this.send("eth_chainId",[]);case 6:t=e.sent,e.next=19;break;case 9:return e.prev=9,e.t0=e.catch(3),e.prev=11,e.next=14,this.send("net_version",[]);case 14:t=e.sent,e.next=19;break;case 17:e.prev=17,e.t1=e.catch(11);case 19:if(null==t){e.next=28;break}return n=(0,N.getStatic)(this.constructor,"getNetwork"),e.prev=21,e.abrupt("return",n(c.O$.from(t).toNumber()));case 25:return e.prev=25,e.t2=e.catch(21),e.abrupt("return",Ce.throwError("could not detect network",g.Logger.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e.t2}));case 28:return e.abrupt("return",Ce.throwError("could not detect network",g.Logger.errors.NETWORK_ERROR,{event:"noNetwork"}));case 29:case"end":return e.stop()}}),e,this,[[3,9],[11,17],[21,25]])})))}},{key:"getSigner",value:function(e){return new De(Be,this,e)}},{key:"getUncheckedSigner",value:function(e){return this.getSigner(e).connectUnchecked()}},{key:"listAccounts",value:function(){var e=this;return this.send("eth_accounts",[]).then((function(t){return t.map((function(t){return e.formatter.address(t)}))}))}},{key:"send",value:function(e,t){var n=this,a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,N.deepCopy)(a),provider:this});var o=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(o&&this._cache[e])return this._cache[e];var r=(0,L.fetchJson)(this.connection,JSON.stringify(a),Ue).then((function(e){return n.emit("debug",{action:"response",request:a,response:e,provider:n}),e}),(function(e){throw n.emit("debug",{action:"response",error:e,request:a,provider:n}),e}));return o&&(this._cache[e]=r,setTimeout((function(){n._cache[e]=null}),0)),r}},{key:"prepareRequest",value:function(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[_e(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[_e(t.address),t.blockTag]];case"getCode":return["eth_getCode",[_e(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[_e(t.address),(0,B.hexZeroPad)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[(0,N.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,N.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=_e(t.filter.address)),["eth_getLogs",[t.filter]]}return null}},{key:"perform",value:function(e,t){return Se(this,void 0,void 0,(0,R.Z)().mark((function n(){var a,o,r;return(0,R.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("call"!==e&&"estimateGas"!==e){n.next=8;break}if(!(a=t.transaction)||null==a.type||!c.O$.from(a.type).isZero()){n.next=8;break}if(null!=a.maxFeePerGas||null!=a.maxPriorityFeePerGas){n.next=8;break}return n.next=6,this.getFeeData();case 6:null==(o=n.sent).maxFeePerGas&&null==o.maxPriorityFeePerGas&&((t=(0,N.shallowCopy)(t)).transaction=(0,N.shallowCopy)(a),delete t.transaction.type);case 8:return null==(r=this.prepareRequest(e,t))&&Ce.throwError(e+" not implemented",g.Logger.errors.NOT_IMPLEMENTED,{operation:e}),n.prev=10,n.next=13,this.send(r[0],r[1]);case 13:return n.abrupt("return",n.sent);case 16:return n.prev=16,n.t0=n.catch(10),n.abrupt("return",Me(e,n.t0,t));case 19:case"end":return n.stop()}}),n,this,[[10,16]])})))}},{key:"_startEvent",value:function(e){"pending"===e.tag&&this._startPending(),(0,xe.Z)((0,Ie.Z)(n.prototype),"_startEvent",this).call(this,e)}},{key:"_startPending",value:function(){if(null==this._pendingFilter){var e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(n){return function a(){e.send("eth_getFilterChanges",[n]).then((function(n){if(e._pendingFilter!=t)return null;var a=Promise.resolve();return n.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",a=a.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),a.then((function(){return Pe(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){a()}),0),null;e.send("eth_uninstallFilter",[n])})).catch((function(e){}))}(),n})).catch((function(e){}))}}},{key:"_stopEvent",value:function(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),(0,xe.Z)((0,Ie.Z)(n.prototype),"_stopEvent",this).call(this,e)}}],[{key:"defaultUrl",value:function(){return"http://localhost:8545"}},{key:"hexlifyTransaction",value:function(e,t){var n=(0,N.shallowCopy)(Oe);if(t)for(var a in t)t[a]&&(n[a]=!0);(0,N.checkProperties)(e,n);var o={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null!=e[t]){var n=(0,B.hexValue)(c.O$.from(e[t]));"gasLimit"===t&&(t="gas"),o[t]=n}})),["from","to","data"].forEach((function(t){null!=e[t]&&(o[t]=(0,B.hexlify)(e[t]))})),e.accessList&&(o.accessList=(0,K.accessListify)(e.accessList)),o}}]),n}(ke),Le=null;try{if(null==(Le=WebSocket))throw new Error("inject please")}catch(yn){var je=new g.Logger(G);Le=function(){je.throwError("WebSockets not supported in this environment",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var He=n(65218),Ge=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},ze=new g.Logger(G),Ke=1,We=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(e,a){var o,r;(0,M.Z)(this,n),"any"===a&&ze.throwError("WebSocketProvider does not support 'any' network yet",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),(r="string"===typeof e?t.call(this,e,a):t.call(this,"_websocket",a))._pollingInterval=-1,r._wsReady=!1,"string"===typeof e?(0,N.defineReadOnly)((0,S.Z)(r),"_websocket",new Le(r.connection.url)):(0,N.defineReadOnly)((0,S.Z)(r),"_websocket",e),(0,N.defineReadOnly)((0,S.Z)(r),"_requests",{}),(0,N.defineReadOnly)((0,S.Z)(r),"_subs",{}),(0,N.defineReadOnly)((0,S.Z)(r),"_subIds",{}),(0,N.defineReadOnly)((0,S.Z)(r),"_detectNetwork",(0,xe.Z)((o=(0,S.Z)(r),(0,Ie.Z)(n.prototype)),"detectNetwork",o).call(o)),r.websocket.onopen=function(){r._wsReady=!0,Object.keys(r._requests).forEach((function(e){r.websocket.send(r._requests[e].payload)}))},r.websocket.onmessage=function(e){var t=e.data,n=JSON.parse(t);if(null!=n.id){var a=String(n.id),o=r._requests[a];if(delete r._requests[a],void 0!==n.result)o.callback(null,n.result),r.emit("debug",{action:"response",request:JSON.parse(o.payload),response:n.result,provider:(0,S.Z)(r)});else{var i=null;n.error?(i=new Error(n.error.message||"unknown error"),(0,N.defineReadOnly)(i,"code",n.error.code||null),(0,N.defineReadOnly)(i,"response",t)):i=new Error("unknown error"),o.callback(i,void 0),r.emit("debug",{action:"response",error:i,request:JSON.parse(o.payload),provider:(0,S.Z)(r)})}}else if("eth_subscription"===n.method){var s=r._subs[n.params.subscription];s&&s.processFunc(n.params.result)}else He.warn("this should not happen")};var i=setInterval((function(){r.emit("poll")}),1e3);return i.unref&&i.unref(),(0,Ae.Z)(r)}return(0,P.Z)(n,[{key:"websocket",get:function(){return this._websocket}},{key:"detectNetwork",value:function(){return this._detectNetwork}},{key:"pollingInterval",get:function(){return 0},set:function(e){ze.throwError("cannot set polling interval on WebSocketProvider",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}},{key:"resetEventsBlock",value:function(e){ze.throwError("cannot reset events block on WebSocketProvider",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}},{key:"poll",value:function(){return Ge(this,void 0,void 0,(0,R.Z)().mark((function e(){return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}}),e)})))}},{key:"polling",set:function(e){e&&ze.throwError("cannot set polling on WebSocketProvider",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}},{key:"send",value:function(e,t){var n=this,a=Ke++;return new Promise((function(o,r){var i=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});n.emit("debug",{action:"request",request:JSON.parse(i),provider:n}),n._requests[String(a)]={callback:function(e,t){return e?r(e):o(t)},payload:i},n._wsReady&&n.websocket.send(i)}))}},{key:"_subscribe",value:function(e,t,n){return Ge(this,void 0,void 0,(0,R.Z)().mark((function a(){var o,r,i=this;return(0,R.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return null==(o=this._subIds[e])&&(o=Promise.all(t).then((function(e){return i.send("eth_subscribe",e)})),this._subIds[e]=o),a.next=4,o;case 4:r=a.sent,this._subs[r]={tag:e,processFunc:n};case 6:case"end":return a.stop()}}),a,this)})))}},{key:"_startEvent",value:function(e){var t=this;switch(e.type){case"block":this._subscribe("block",["newHeads"],(function(e){var n=c.O$.from(e.number).toNumber();t._emitted.block=n,t.emit("block",n)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(function(e){t.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(function(n){null==n.removed&&(n.removed=!1),t.emit(e.filter,t.formatter.filterLog(n))}));break;case"tx":var n=function(e){var n=e.hash;t.getTransactionReceipt(n).then((function(e){e&&t.emit(n,e)}))};n(e),this._subscribe("tx",["newHeads"],(function(e){t._events.filter((function(e){return"tx"===e.type})).forEach(n)}));break;case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:He.log("unhandled:",e)}}},{key:"_stopEvent",value:function(e){var t=this,n=e.tag;if("tx"===e.type){if(this._events.filter((function(e){return"tx"===e.type})).length)return;n="tx"}else if(this.listenerCount(e.event))return;var a=this._subIds[n];a&&(delete this._subIds[n],a.then((function(e){t._subs[e]&&(delete t._subs[e],t.send("eth_unsubscribe",[e]))})))}},{key:"destroy",value:function(){return Ge(this,void 0,void 0,(0,R.Z)().mark((function e(){var t=this;return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.websocket.readyState!==Le.CONNECTING){e.next=3;break}return e.next=3,new Promise((function(e){t.websocket.onopen=function(){e(!0)},t.websocket.onerror=function(){e(!1)}}));case 3:this.websocket.close(1e3);case 4:case"end":return e.stop()}}),e,this)})))}}],[{key:"defaultUrl",value:function(){return"ws://localhost:8546"}}]),n}(Fe),Ze=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},Ve=new g.Logger(G),qe=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(){return(0,M.Z)(this,n),t.apply(this,arguments)}return(0,P.Z)(n,[{key:"detectNetwork",value:function(){var e=this,t=Object.create(null,{detectNetwork:{get:function(){return(0,xe.Z)((0,Ie.Z)(n.prototype),"detectNetwork",e)}}});return Ze(this,void 0,void 0,(0,R.Z)().mark((function e(){var n;return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(n=this.network)){e.next=7;break}return e.next=4,t.detectNetwork.call(this);case 4:(n=e.sent)||Ve.throwError("no network detected",g.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,N.defineReadOnly)(this,"_network",n),this.emit("network",n,null));case 7:return e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)})))}}]),n}(Fe),Qe=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(e,a){var o;(0,M.Z)(this,n),Ve.checkAbstract(this instanceof n?this.constructor:void 0,n),e=(0,N.getStatic)(this instanceof n?this.constructor:void 0,"getNetwork")(e),a=(0,N.getStatic)(this instanceof n?this.constructor:void 0,"getApiKey")(a);var r=(0,N.getStatic)(this instanceof n?this.constructor:void 0,"getUrl")(e,a);return o=t.call(this,r,e),"string"===typeof a?(0,N.defineReadOnly)((0,S.Z)(o),"apiKey",a):null!=a&&Object.keys(a).forEach((function(e){(0,N.defineReadOnly)((0,S.Z)(o),e,a[e])})),o}return(0,P.Z)(n,[{key:"_startPending",value:function(){Ve.warn("WARNING: API provider does not support pending filters")}},{key:"isCommunityResource",value:function(){return!1}},{key:"getSigner",value:function(e){return Ve.throwError("API provider does not support signing",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}},{key:"listAccounts",value:function(){return Promise.resolve([])}}],[{key:"getApiKey",value:function(e){return e}},{key:"getUrl",value:function(e,t){return Ve.throwError("not implemented; sub-classes must override getUrl",g.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}]),n}(qe),Je=new g.Logger(G),Ye="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",Xe=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(e,a){var o;(0,M.Z)(this,n);var r=new $e(e,a),i=r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");return o=t.call(this,i,r.network),(0,N.defineReadOnly)((0,S.Z)(o),"apiKey",r.apiKey),o}return(0,P.Z)(n,[{key:"isCommunityResource",value:function(){return this.apiKey===Ye}}]),n}(We),$e=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(){return(0,M.Z)(this,n),t.apply(this,arguments)}return(0,P.Z)(n,[{key:"isCommunityResource",value:function(){return this.apiKey===Ye}}],[{key:"getWebSocketProvider",value:function(e,t){return new Xe(e,t)}},{key:"getApiKey",value:function(e){return null==e?Ye:(e&&"string"!==typeof e&&Je.throwArgumentError("invalid apiKey","apiKey",e),e)}},{key:"getUrl",value:function(e,t){var n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:Je.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:function(e,n){return t===Ye&&Y(),Promise.resolve(!0)}}}}]),n}(Qe),et=new g.Logger(G),tt="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function nt(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return et.throwArgumentError("unsupported network","name",e)}var at=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(){return(0,M.Z)(this,n),t.apply(this,arguments)}return(0,P.Z)(n,[{key:"isCommunityResource",value:function(){return this.apiKey===tt}}],[{key:"getApiKey",value:function(e){return null==e?tt:e}},{key:"getUrl",value:function(e,t){null==t&&(t=tt);var n={allowGzip:!0,url:"https://"+nt(e.name)+t,throttleCallback:function(e,n){return t.apiKey===tt&&Y(),Promise.resolve(!0)}};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}}]),n}(Qe),ot=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},rt=new g.Logger(G),it=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(){return(0,M.Z)(this,n),t.apply(this,arguments)}return(0,P.Z)(n,[{key:"perform",value:function(e,t){var a=this,o=Object.create(null,{perform:{get:function(){return(0,xe.Z)((0,Ie.Z)(n.prototype),"perform",a)}}});return ot(this,void 0,void 0,(0,R.Z)().mark((function n(){var a;return(0,R.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("getBlockNumber"!==e){n.next=5;break}return n.next=3,o.perform.call(this,"getBlock",{blockTag:"latest"});case 3:return a=n.sent,n.abrupt("return",a.number);case 5:return n.abrupt("return",o.perform.call(this,e,t));case 6:case"end":return n.stop()}}),n,this)})))}}],[{key:"getApiKey",value:function(e){return null!=e&&rt.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}},{key:"getUrl",value:function(e,t){var n=null;if("homestead"===e.name)n="https://cloudflare-eth.com/";else rt.throwArgumentError("unsupported network","network",arguments[0]);return n}}]),n}(Qe),st=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},ct=new g.Logger(G);function ut(e){var t={};for(var n in e)if(null!=e[n]){var a=e[n];"type"===n&&0===a||(a={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[n]?(0,B.hexValue)((0,B.hexlify)(a)):"accessList"===n?"["+(0,K.accessListify)(a).map((function(e){return'{address:"'.concat(e.address,'",storageKeys:["').concat(e.storageKeys.join('","'),'"]}')})).join(",")+"]":(0,B.hexlify)(a),t[n]=a)}return t}function dt(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!==typeof e.message||!e.message.match(/^OK/)){var t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function lt(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){var t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){var n=new Error("invalid response");throw n.result=JSON.stringify(e),n}if(e.error){var a=new Error(e.error.message||"unknown error");throw e.error.code&&(a.code=e.error.code),e.error.data&&(a.data=e.error.data),a}return e.result}function ft(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function pt(e,t,n){if("call"===e&&t.code===g.Logger.errors.SERVER_ERROR){var a=t.error;if(a&&(a.message.match(/reverted/i)||a.message.match(/VM execution error/i))){var o=a.data;if(o&&(o="0x"+o.replace(/^.*0x/i,"")),(0,B.isHexString)(o))return o;ct.throwError("missing revert data in call exception",g.Logger.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}var r=t.message;throw t.code===g.Logger.errors.SERVER_ERROR&&(t.error&&"string"===typeof t.error.message?r=t.error.message:"string"===typeof t.body?r=t.body:"string"===typeof t.responseText&&(r=t.responseText)),(r=(r||"").toLowerCase()).match(/insufficient funds/)&&ct.throwError("insufficient funds for intrinsic transaction cost",g.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),r.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&ct.throwError("nonce has already been used",g.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),r.match(/another transaction with same nonce/)&&ct.throwError("replacement fee too low",g.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),r.match(/execution failed due to an exception|execution reverted/)&&ct.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",g.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}var bt=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(e,a){var o;return(0,M.Z)(this,n),o=t.call(this,e),(0,N.defineReadOnly)((0,S.Z)(o),"baseUrl",o.getBaseUrl()),(0,N.defineReadOnly)((0,S.Z)(o),"apiKey",a||null),o}return(0,P.Z)(n,[{key:"getBaseUrl",value:function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return ct.throwArgumentError("unsupported network","network",this.network.name)}},{key:"getUrl",value:function(e,t){var n=Object.keys(t).reduce((function(e,n){var a=t[n];return null!=a&&(e+="&".concat(n,"=").concat(a)),e}),""),a=this.apiKey?"&apikey=".concat(this.apiKey):"";return"".concat(this.baseUrl,"/api?module=").concat(e).concat(n).concat(a)}},{key:"getPostUrl",value:function(){return"".concat(this.baseUrl,"/api")}},{key:"getPostData",value:function(e,t){return t.module=e,t.apikey=this.apiKey,t}},{key:"fetch",value:function(e,t,n){return st(this,void 0,void 0,(0,R.Z)().mark((function a(){var o,r,i,s,c,u,d=this;return(0,R.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return o=n?this.getPostUrl():this.getUrl(e,t),r=n?this.getPostData(e,t):null,i="proxy"===e?lt:dt,this.emit("debug",{action:"request",request:o,provider:this}),s={url:o,throttleSlotInterval:1e3,throttleCallback:function(e,t){return d.isCommunityResource()&&Y(),Promise.resolve(!0)}},c=null,r&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},c=Object.keys(r).map((function(e){return"".concat(e,"=").concat(r[e])})).join("&")),a.next=9,(0,L.fetchJson)(s,c,i||lt);case 9:return u=a.sent,this.emit("debug",{action:"response",request:o,response:(0,N.deepCopy)(u),provider:this}),a.abrupt("return",u);case 12:case"end":return a.stop()}}),a,this)})))}},{key:"detectNetwork",value:function(){return st(this,void 0,void 0,(0,R.Z)().mark((function e(){return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.network);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){var a=this,o=Object.create(null,{perform:{get:function(){return(0,xe.Z)((0,Ie.Z)(n.prototype),"perform",a)}}});return st(this,void 0,void 0,(0,R.Z)().mark((function n(){var a,r,i,s,c,u,d,l,f;return(0,R.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=e,n.next="getBlockNumber"===n.t0?3:"getGasPrice"===n.t0?4:"getBalance"===n.t0?5:"getTransactionCount"===n.t0?6:"getCode"===n.t0?7:"getStorageAt"===n.t0?8:"sendTransaction"===n.t0?9:"getBlock"===n.t0?10:"getTransaction"===n.t0?13:"getTransactionReceipt"===n.t0?14:"call"===n.t0?15:"estimateGas"===n.t0?29:"getLogs"===n.t0?41:"getEtherPrice"===n.t0?65:72;break;case 3:return n.abrupt("return",this.fetch("proxy",{action:"eth_blockNumber"}));case 4:return n.abrupt("return",this.fetch("proxy",{action:"eth_gasPrice"}));case 5:return n.abrupt("return",this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag}));case 6:return n.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag}));case 7:return n.abrupt("return",this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag}));case 8:return n.abrupt("return",this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag}));case 9:return n.abrupt("return",this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((function(e){return pt("sendTransaction",e,t.signedTransaction)})));case 10:if(!t.blockTag){n.next=12;break}return n.abrupt("return",this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"}));case 12:throw new Error("getBlock by blockHash not implemented");case 13:return n.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash}));case 14:return n.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash}));case 15:if("latest"===t.blockTag){n.next=17;break}throw new Error("EtherscanProvider does not support blockTag for call");case 17:return(a=ut(t.transaction)).module="proxy",a.action="eth_call",n.prev=20,n.next=23,this.fetch("proxy",a,!0);case 23:return n.abrupt("return",n.sent);case 26:return n.prev=26,n.t1=n.catch(20),n.abrupt("return",pt("call",n.t1,t.transaction));case 29:return(r=ut(t.transaction)).module="proxy",r.action="eth_estimateGas",n.prev=32,n.next=35,this.fetch("proxy",r,!0);case 35:return n.abrupt("return",n.sent);case 38:return n.prev=38,n.t2=n.catch(32),n.abrupt("return",pt("estimateGas",n.t2,t.transaction));case 41:return i={action:"getLogs"},t.filter.fromBlock&&(i.fromBlock=ft(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=ft(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&ct.throwError("unsupported topic count",g.Logger.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length&&("string"===typeof(s=t.filter.topics[0])&&66===s.length||ct.throwError("unsupported topic format",g.Logger.errors.UNSUPPORTED_OPERATION,{topic0:s}),i.topic0=s)),n.next=48,this.fetch("logs",i);case 48:c=n.sent,u={},d=0;case 51:if(!(dt?null:(a+o)/2}function kt(e){if(null===e)return"null";if("number"===typeof e||"boolean"===typeof e)return JSON.stringify(e);if("string"===typeof e)return e;if(c.O$.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((function(e){return kt(e)})));if("object"===typeof e){var t=Object.keys(e);return t.sort(),"{"+t.map((function(t){var n=e[t];return n="function"===typeof n?"[function]":kt(n),JSON.stringify(t)+":"+n})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}var At=1;function xt(e){var t=null,n=null,a=new Promise((function(a){t=function(){n&&(clearTimeout(n),n=null),a()},n=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return a},wait:function(e){return a=a.then(e)}}}var It=[g.Logger.errors.CALL_EXCEPTION,g.Logger.errors.INSUFFICIENT_FUNDS,g.Logger.errors.NONCE_EXPIRED,g.Logger.errors.REPLACEMENT_UNDERPRICED,g.Logger.errors.UNPREDICTABLE_GAS_LIMIT],Tt=["address","args","errorArgs","errorSignature","method","transaction"];function St(e,t){var n={weight:e.weight};return Object.defineProperty(n,"provider",{get:function(){return e.provider}}),e.start&&(n.start=e.start),t&&(n.duration=t-e.start),e.done&&(e.error?n.error=e.error:n.result=e.result||null),n}function Ct(e,t,n){var a=kt;switch(t){case"getBlockNumber":return function(t){var n=t.map((function(e){return e.result})),a=wt(t.map((function(e){return e.result})),2);if(null!=a)return a=Math.ceil(a),n.indexOf(a+1)>=0&&a++,a>=e._highestBlockNumber&&(e._highestBlockNumber=a),e._highestBlockNumber};case"getGasPrice":return function(e){var t=e.map((function(e){return e.result}));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return wt(e.map((function(e){return e.result})))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(e){return null==e?null:((e=(0,N.shallowCopy)(e)).confirmations=-1,kt(e))};break;case"getBlock":a=n.includeTransactions?function(e){return null==e?null:((e=(0,N.shallowCopy)(e)).transactions=e.transactions.map((function(e){return(e=(0,N.shallowCopy)(e)).confirmations=-1,e})),kt(e))}:function(e){return null==e?null:kt(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(n){var a={};n.forEach((function(t){var n=e(t.result);a[n]||(a[n]={count:0,result:t.result}),a[n].count++}));for(var o=Object.keys(a),r=0;r=t)return i.result}}}(a,e.quorum)}function Et(e,t){return ht(this,void 0,void 0,(0,R.Z)().mark((function n(){var a;return(0,R.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(null!=(a=e.provider).blockNumber&&a.blockNumber>=t||-1===t)){n.next=3;break}return n.abrupt("return",a);case 3:return n.abrupt("return",(0,L.poll)((function(){return new Promise((function(n,o){setTimeout((function(){return a.blockNumber>=t?n(a):e.cancelled?n(null):n(void 0)}),0)}))}),{oncePoll:a}));case 4:case"end":return n.stop()}}),n)})))}function Rt(e,t,n,a){return ht(this,void 0,void 0,(0,R.Z)().mark((function o(){var r,i;return(0,R.Z)().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:r=e.provider,o.t0=n,o.next="getBlockNumber"===o.t0||"getGasPrice"===o.t0?4:"getEtherPrice"===o.t0?5:"getBalance"===o.t0||"getTransactionCount"===o.t0||"getCode"===o.t0?8:"getStorageAt"===o.t0?13:"getBlock"===o.t0?18:"call"===o.t0||"estimateGas"===o.t0?23:"getTransaction"===o.t0||"getTransactionReceipt"===o.t0?30:"getLogs"===o.t0?31:37;break;case 4:return o.abrupt("return",r[n]());case 5:if(!r.getEtherPrice){o.next=7;break}return o.abrupt("return",r.getEtherPrice());case 7:return o.abrupt("break",37);case 8:if(!a.blockTag||!(0,B.isHexString)(a.blockTag)){o.next=12;break}return o.next=11,Et(e,t);case 11:r=o.sent;case 12:return o.abrupt("return",r[n](a.address,a.blockTag||"latest"));case 13:if(!a.blockTag||!(0,B.isHexString)(a.blockTag)){o.next=17;break}return o.next=16,Et(e,t);case 16:r=o.sent;case 17:return o.abrupt("return",r.getStorageAt(a.address,a.position,a.blockTag||"latest"));case 18:if(!a.blockTag||!(0,B.isHexString)(a.blockTag)){o.next=22;break}return o.next=21,Et(e,t);case 21:r=o.sent;case 22:return o.abrupt("return",r[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash));case 23:if(!a.blockTag||!(0,B.isHexString)(a.blockTag)){o.next=27;break}return o.next=26,Et(e,t);case 26:r=o.sent;case 27:if("call"!==n||!a.blockTag){o.next=29;break}return o.abrupt("return",r[n](a.transaction,a.blockTag));case 29:return o.abrupt("return",r[n](a.transaction));case 30:return o.abrupt("return",r[n](a.transactionHash));case 31:if(!((i=a.filter).fromBlock&&(0,B.isHexString)(i.fromBlock)||i.toBlock&&(0,B.isHexString)(i.toBlock))){o.next=36;break}return o.next=35,Et(e,t);case 35:r=o.sent;case 36:return o.abrupt("return",r.getLogs(i));case 37:return o.abrupt("return",gt.throwError("unknown method error",g.Logger.errors.UNKNOWN_ERROR,{method:n,params:a}));case 38:case"end":return o.stop()}}),o)})))}var Mt=function(e){(0,C.Z)(n,e);var t=(0,E.Z)(n);function n(e,a){var o;(0,M.Z)(this,n),0===e.length&>.throwArgumentError("missing providers","providers",e);var r=e.map((function(e,t){if(h.zt.isProvider(e)){var n=Q(e)?2e3:750;return Object.freeze({provider:e,weight:1,stallTimeout:n,priority:1})}var a=(0,N.shallowCopy)(e);null==a.priority&&(a.priority=1),null==a.stallTimeout&&(a.stallTimeout=Q(e)?2e3:750),null==a.weight&&(a.weight=1);var o=a.weight;return(o%1||o>512||o<1)&>.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(t,"].weight"),o),Object.freeze(a)})),i=r.reduce((function(e,t){return e+t.weight}),0);null==a?a=i/2:a>i&>.throwArgumentError("quorum will always fail; larger than total weight","quorum",a);var s=vt(r.map((function(e){return e.provider.network})));return null==s&&(s=new Promise((function(e,t){setTimeout((function(){o.detectNetwork().then(e,t)}),0)}))),o=t.call(this,s),(0,N.defineReadOnly)((0,S.Z)(o),"providerConfigs",Object.freeze(r)),(0,N.defineReadOnly)((0,S.Z)(o),"quorum",a),o._highestBlockNumber=-1,o}return(0,P.Z)(n,[{key:"detectNetwork",value:function(){return ht(this,void 0,void 0,(0,R.Z)().mark((function e(){var t;return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.providerConfigs.map((function(e){return e.provider.getNetwork()})));case 2:return t=e.sent,e.abrupt("return",vt(t));case 4:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){return ht(this,void 0,void 0,(0,R.Z)().mark((function n(){var a,o,r,i,s,c,u,d,l,f,p=this;return(0,R.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("sendTransaction"!==e){n.next=13;break}return n.next=3,Promise.all(this.providerConfigs.map((function(e){return e.provider.sendTransaction(t.signedTransaction).then((function(e){return e.hash}),(function(e){return e}))})));case 3:a=n.sent,o=0;case 5:if(!(o=p.quorum)){n.next=22;break}if(void 0===(b=i(f))){n.next=18;break}return s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0})),n.abrupt("return",{v:b});case 18:if(d){n.next=21;break}return n.next=21,xt(100).getPromise();case 21:d=!1;case 22:if(m=s.reduce((function(e,t){if(!t.done||null==t.error)return e;var n=t.error.code;return It.indexOf(n)>=0&&(e[n]||(e[n]={error:t.error,weight:0}),e[n].weight+=t.weight),e}),{}),Object.keys(m).forEach((function(e){var t=m[e];if(!(t.weight=0}))},intToBuffer:function(e){var t=s(e);return new a(i(t.slice(2)),"hex")},getBinarySize:function(e){if("string"!==typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return a.byteLength(e,"utf8")},isHexPrefixed:o,stripHexPrefix:r,padToEven:i,intToHex:s,fromAscii:function(e){for(var t="",n=0;n0&&s.length>r&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,function(e){o&&o.warn&&o.warn(e)}(c)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(e,t,n){var a={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=p.bind(a);return o.listener=n,a.wrapFn=o,o}function m(e,t,n){var a=e._events;if(void 0===a)return[];var o=a[t];return void 0===o?[]:"function"===typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(r=t[0]),r instanceof Error)throw r;var s=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw s.context=r,s}var c=o[e];if(void 0===c)return!1;if("function"===typeof c)i(c,this,t);else{var u=c.length,d=g(c,u);for(n=0;n=0;r--)if(n[r]===t||n[r].listener===t){i=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;a--)this.removeListener(e,t[a]);return this},c.prototype.listeners=function(e){return m(this,e,!0)},c.prototype.rawListeners=function(e){return m(this,e,!1)},c.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},c.prototype.listenerCount=h,c.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]}},37965:function(e,t,n){var a=n(88284).Buffer,o=n(66958);e.exports=function(e,t,n,r){if(a.isBuffer(e)||(e=a.from(e,"binary")),t&&(a.isBuffer(t)||(t=a.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=n/8,s=a.alloc(i),c=a.alloc(r||0),u=a.alloc(0);i>0||r>0;){var d=new o;d.update(u),d.update(e),t&&d.update(t),u=d.digest();var l=0;if(i>0){var f=s.length-i;l=Math.min(i,u.length),u.copy(s,f,0,l),i-=l}if(l0){var p=c.length-r,b=Math.min(r,u.length-l);u.copy(c,p,l,l+b),r-=b}}return u.fill(0),{key:s,iv:c}}},91010:function(e,t,n){"use strict";var a=n(58063),o=Object.prototype.toString,r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!a(t))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),"[object Array]"===o.call(e)?function(e,t,n){for(var a=0,o=e.length;a1&&"boolean"!==typeof t)throw new i('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=I(e,0,1),n=I(e,-1);if("%"===t&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var a=[];return x(e,S,(function(e,t,n,o){a[a.length]=n?x(o,C,"$1"):t||e})),a}(e),a=n.length>0?n[0]:"",r=E("%"+a+"%",t),s=r.name,u=r.value,d=!1,l=r.alias;l&&(a=l[0],A(n,k([0,1],l)));for(var f=1,p=!0;f=n.length){var y=c(u,b);u=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:u[b]}else p=w(u,b),u=u[b];p&&!d&&(m[s]=u)}}return u}},5410:function(e,t,n){"use strict";n.r(t),n.d(t,{getUserLocale:function(){return s},getUserLocales:function(){return i}});var a=n(78940),o=n.n(a);function r(e){return JSON.stringify(e)}var i=o()((function(e){var t,n=void 0===e?{}:e,a=n.useFallbackLocale,o=void 0===a||a,r=n.fallbackLocale,i=void 0===r?"en-US":r,s=[];if("undefined"!==typeof window){var c=window.navigator;s=s.concat(c.languages,c.language,c.userLanguage,c.browserLanguage,c.systemLanguage)}return o&&s.push(i),function(e){return e.map((function(e){if(!e||-1===e.indexOf("-")||e.toLowerCase()!==e)return e;var t=e.split("-");return t[0]+"-"+t[1].toUpperCase()}))}((t=s).filter((function(e,n){return e&&t.indexOf(e)===n})))}),r);var s=o()((function(e){return i(e)[0]||null}),r);t.default=s},20690:function(e,t,n){"use strict";var a=n(78476)("%Object.getOwnPropertyDescriptor%",!0);if(a)try{a([],"length")}catch(o){a=null}e.exports=a},3748:function(e,t,n){"use strict";var a=n(78476)("%Object.defineProperty%",!0),o=function(){if(a)try{return a({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==a([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},80333:function(e,t,n){"use strict";var a="undefined"!==typeof Symbol&&Symbol,o=n(45844);e.exports=function(){return"function"===typeof a&&("function"===typeof Symbol&&("symbol"===typeof a("foo")&&("symbol"===typeof Symbol("bar")&&o())))}},45844:function(e){"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var a=Object.getOwnPropertySymbols(e);if(1!==a.length||a[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},64686:function(e,t,n){"use strict";var a=n(45844);e.exports=function(){return a()&&!!Symbol.toStringTag}},19465:function(e,t,n){"use strict";var a=n(46312);e.exports=a.call(Function.call,Object.prototype.hasOwnProperty)},52:function(e,t,n){"use strict";var a=n(88284).Buffer,o=n(78899).Transform;function r(e){o.call(this),this._block=a.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(39703)(r,o),r.prototype._transform=function(e,t,n){var a=null;try{this.update(e,t)}catch(o){a=o}n(a)},r.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(n){t=n}e(t)},r.prototype.update=function(e,t){if(function(e,t){if(!a.isBuffer(e)&&"string"!==typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");a.isBuffer(e)||(e=a.from(e,t));for(var n=this._block,o=0;this._blockOffset+e.length-o>=this._blockSize;){for(var r=this._blockOffset;r0;++i)this._length[i]+=s,(s=this._length[i]/4294967296|0)>0&&(this._length[i]-=4294967296*s);return this},r.prototype._update=function(){throw new Error("_update is not implemented")},r.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},r.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=r},46419:function(e,t,n){var a=t;a.utils=n(23489),a.common=n(77376),a.sha=n(83961),a.ripemd=n(39168),a.hmac=n(29981),a.sha1=a.sha.sha1,a.sha256=a.sha.sha256,a.sha224=a.sha.sha224,a.sha384=a.sha.sha384,a.sha512=a.sha.sha512,a.ripemd160=a.ripemd.ripemd160},77376:function(e,t,n){"use strict";var a=n(23489),o=n(72259);function r(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=r,r.prototype.update=function(e,t){if(e=a.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=a.join32(e,0,e.length-n,this.endian);for(var o=0;o>>24&255,a[o++]=e>>>16&255,a[o++]=e>>>8&255,a[o++]=255&e}else for(a[o++]=255&e,a[o++]=e>>>8&255,a[o++]=e>>>16&255,a[o++]=e>>>24&255,a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0,r=8;rthis.blockSize&&(e=(new this.Hash).update(e).digest()),o(e.length<=this.blockSize);for(var t=e.length;t>>3},t.g1_256=function(e){return a(e,17)^a(e,19)^e>>>10}},23489:function(e,t,n){"use strict";var a=n(72259),o=n(39703);function r(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),o=0;o>6|192,n[a++]=63&i|128):r(e,o)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++o)),n[a++]=i>>18|240,n[a++]=i>>12&63|128,n[a++]=i>>6&63|128,n[a++]=63&i|128):(n[a++]=i>>12|224,n[a++]=i>>6&63|128,n[a++]=63&i|128)}else for(o=0;o>>0}return i},t.split32=function(e,t){for(var n=new Array(4*e.length),a=0,o=0;a>>24,n[o+1]=r>>>16&255,n[o+2]=r>>>8&255,n[o+3]=255&r):(n[o+3]=r>>>24,n[o+2]=r>>>16&255,n[o+1]=r>>>8&255,n[o]=255&r)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,a){return e+t+n+a>>>0},t.sum32_5=function(e,t,n,a,o){return e+t+n+a+o>>>0},t.sum64=function(e,t,n,a){var o=e[t],r=a+e[t+1]>>>0,i=(r>>0,e[t+1]=r},t.sum64_hi=function(e,t,n,a){return(t+a>>>0>>0},t.sum64_lo=function(e,t,n,a){return t+a>>>0},t.sum64_4_hi=function(e,t,n,a,o,r,i,s){var c=0,u=t;return c+=(u=u+a>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,a,o,r,i,s){return t+a+r+s>>>0},t.sum64_5_hi=function(e,t,n,a,o,r,i,s,c,u){var d=0,l=t;return d+=(l=l+a>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,a,o,r,i,s,c,u){return t+a+r+s+u>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},8162:function(e,t,n){var a,o=n(456);!function(){"use strict";var t="object"===typeof window?window:{};!t.HI_BASE32_NO_NODE_JS&&"object"===typeof o&&o.versions&&o.versions.node&&(t=n.g);var r=!t.HI_BASE32_NO_COMMON_JS&&e.exports,i=n.amdO,s="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),c={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},u=[0,0,0,0,0,0,0,0],d=function(e,t){t.length>10&&(t="..."+t.substr(-10));var n=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+e+" bytes: "+t+" <-");throw n.position=e,n},l=function(e){if(""===e)return[];if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");for(var t,n,a,o,r,i,s,u,d=[],l=0,f=(e=e.replace(/=/g,"")).length,p=0,b=f>>3<<3;p>>2),d[l++]=255&(n<<6|a<<1|o>>>4),d[l++]=255&(o<<4|r>>>1),d[l++]=255&(r<<7|i<<2|s>>>3),d[l++]=255&(s<<5|u);var m=f-b;return 2===m?(t=c[e.charAt(p++)],n=c[e.charAt(p++)],d[l++]=255&(t<<3|n>>>2)):4===m?(t=c[e.charAt(p++)],n=c[e.charAt(p++)],a=c[e.charAt(p++)],o=c[e.charAt(p++)],d[l++]=255&(t<<3|n>>>2),d[l++]=255&(n<<6|a<<1|o>>>4)):5===m?(t=c[e.charAt(p++)],n=c[e.charAt(p++)],a=c[e.charAt(p++)],o=c[e.charAt(p++)],r=c[e.charAt(p++)],d[l++]=255&(t<<3|n>>>2),d[l++]=255&(n<<6|a<<1|o>>>4),d[l++]=255&(o<<4|r>>>1)):7===m&&(t=c[e.charAt(p++)],n=c[e.charAt(p++)],a=c[e.charAt(p++)],o=c[e.charAt(p++)],r=c[e.charAt(p++)],i=c[e.charAt(p++)],s=c[e.charAt(p++)],d[l++]=255&(t<<3|n>>>2),d[l++]=255&(n<<6|a<<1|o>>>4),d[l++]=255&(o<<4|r>>>1),d[l++]=255&(r<<7|i<<2|s>>>3)),d},f=function(e,t){if(!t)return function(e){for(var t,n,a="",o=e.length,r=0,i=0;r191&&t<=223?(n=31&t,i=1):t<=239?(n=15&t,i=2):t<=247?(n=7&t,i=3):d(r,a);for(var s=0;s191)&&d(r,a),n<<=6,n+=63&t;n>=55296&&n<=57343&&d(r,a),n>1114111&&d(r,a),n<=65535?a+=String.fromCharCode(n):(n-=65536,a+=String.fromCharCode(55296+(n>>10)),a+=String.fromCharCode(56320+(1023&n)))}return a}(l(e));if(""===e)return"";if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");var n,a,o,r,i,s,u,f,p="",b=e.indexOf("=");-1===b&&(b=e.length);for(var m=0,h=b>>3<<3;m>>2))+String.fromCharCode(255&(a<<6|o<<1|r>>>4))+String.fromCharCode(255&(r<<4|i>>>1))+String.fromCharCode(255&(i<<7|s<<2|u>>>3))+String.fromCharCode(255&(u<<5|f));var g=b-h;return 2===g?(n=c[e.charAt(m++)],a=c[e.charAt(m++)],p+=String.fromCharCode(255&(n<<3|a>>>2))):4===g?(n=c[e.charAt(m++)],a=c[e.charAt(m++)],o=c[e.charAt(m++)],r=c[e.charAt(m++)],p+=String.fromCharCode(255&(n<<3|a>>>2))+String.fromCharCode(255&(a<<6|o<<1|r>>>4))):5===g?(n=c[e.charAt(m++)],a=c[e.charAt(m++)],o=c[e.charAt(m++)],r=c[e.charAt(m++)],i=c[e.charAt(m++)],p+=String.fromCharCode(255&(n<<3|a>>>2))+String.fromCharCode(255&(a<<6|o<<1|r>>>4))+String.fromCharCode(255&(r<<4|i>>>1))):7===g&&(n=c[e.charAt(m++)],a=c[e.charAt(m++)],o=c[e.charAt(m++)],r=c[e.charAt(m++)],i=c[e.charAt(m++)],s=c[e.charAt(m++)],u=c[e.charAt(m++)],p+=String.fromCharCode(255&(n<<3|a>>>2))+String.fromCharCode(255&(a<<6|o<<1|r>>>4))+String.fromCharCode(255&(r<<4|i>>>1))+String.fromCharCode(255&(i<<7|s<<2|u>>>3))),p},p={encode:function(e,t){var n="string"!==typeof e;return n&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),n?function(e){for(var t,n,a,o,r,i="",c=e.length,u=0,d=5*parseInt(c/5);u>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[31&(n<<4|a>>>4)]+s[31&(a<<1|o>>>7)]+s[o>>>2&31]+s[31&(o<<3|r>>>5)]+s[31&r];var l=c-d;return 1===l?(t=e[u],i+=s[t>>>3]+s[t<<2&31]+"======"):2===l?(t=e[u++],n=e[u],i+=s[t>>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[n<<4&31]+"===="):3===l?(t=e[u++],n=e[u++],a=e[u],i+=s[t>>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[31&(n<<4|a>>>4)]+s[a<<1&31]+"==="):4===l&&(t=e[u++],n=e[u++],a=e[u++],o=e[u],i+=s[t>>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[31&(n<<4|a>>>4)]+s[31&(a<<1|o>>>7)]+s[o>>>2&31]+s[o<<3&31]+"="),i}(e):t?function(e){for(var t,n,a,o,r,i="",c=e.length,u=0,d=5*parseInt(c/5);u>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[31&(n<<4|a>>>4)]+s[31&(a<<1|o>>>7)]+s[o>>>2&31]+s[31&(o<<3|r>>>5)]+s[31&r];var l=c-d;return 1===l?(t=e.charCodeAt(u),i+=s[t>>>3]+s[t<<2&31]+"======"):2===l?(t=e.charCodeAt(u++),n=e.charCodeAt(u),i+=s[t>>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[n<<4&31]+"===="):3===l?(t=e.charCodeAt(u++),n=e.charCodeAt(u++),a=e.charCodeAt(u),i+=s[t>>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[31&(n<<4|a>>>4)]+s[a<<1&31]+"==="):4===l&&(t=e.charCodeAt(u++),n=e.charCodeAt(u++),a=e.charCodeAt(u++),o=e.charCodeAt(u),i+=s[t>>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[31&(n<<4|a>>>4)]+s[31&(a<<1|o>>>7)]+s[o>>>2&31]+s[o<<3&31]+"="),i}(e):function(e){var t,n,a,o,r,i,c,d=!1,l="",f=0,p=0,b=e.length;if(""===e)return l;do{for(u[0]=u[5],u[1]=u[6],u[2]=u[7],c=p;f>6,u[c++]=128|63&i):i<55296||i>=57344?(u[c++]=224|i>>12,u[c++]=128|i>>6&63,u[c++]=128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++f)),u[c++]=240|i>>18,u[c++]=128|i>>12&63,u[c++]=128|i>>6&63,u[c++]=128|63&i);p=c-5,f===b&&++f,f>b&&c<6&&(d=!0),t=u[0],c>4?(n=u[1],a=u[2],o=u[3],r=u[4],l+=s[t>>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[31&(n<<4|a>>>4)]+s[31&(a<<1|o>>>7)]+s[o>>>2&31]+s[31&(o<<3|r>>>5)]+s[31&r]):1===c?l+=s[t>>>3]+s[t<<2&31]+"======":2===c?(n=u[1],l+=s[t>>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[n<<4&31]+"===="):3===c?(n=u[1],a=u[2],l+=s[t>>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[31&(n<<4|a>>>4)]+s[a<<1&31]+"==="):(n=u[1],a=u[2],o=u[3],l+=s[t>>>3]+s[31&(t<<2|n>>>6)]+s[n>>>1&31]+s[31&(n<<4|a>>>4)]+s[31&(a<<1|o>>>7)]+s[o>>>2&31]+s[o<<3&31]+"=")}while(!d);return l}(e)},decode:f};f.asBytes=l,r?e.exports=p:(t.base32=p,i&&(void 0===(a=function(){return p}.call(p,n,p,e))||(e.exports=a)))}()},58918:function(e,t,n){"use strict";var a=n(46419),o=n(27142),r=n(72259);function i(e){if(!(this instanceof i))return new i(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),n=o.toArray(e.nonce,e.nonceEnc||"hex"),a=o.toArray(e.pers,e.persEnc||"hex");r(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,a)}e.exports=i,i.prototype._init=function(e,t,n){var a=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},i.prototype.generate=function(e,t,n,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(a=n,n=t,t=null),n&&(n=o.toArray(n,a||"hex"),this._update(n));for(var r=[];r.length>1,d=-7,l=n?o-1:0,f=n?-1:1,p=e[t+l];for(l+=f,r=p&(1<<-d)-1,p>>=-d,d+=s;d>0;r=256*r+e[t+l],l+=f,d-=8);for(i=r&(1<<-d)-1,r>>=-d,d+=a;d>0;i=256*i+e[t+l],l+=f,d-=8);if(0===r)r=1-u;else{if(r===c)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,a),r-=u}return(p?-1:1)*i*Math.pow(2,r-a)},t.write=function(e,t,n,a,o,r){var i,s,c,u=8*r-o-1,d=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=a?0:r-1,b=a?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=d):(i=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-i))<1&&(i--,c*=2),(t+=i+l>=1?f/c:f*Math.pow(2,1-l))*c>=2&&(i++,c/=2),i+l>=d?(s=0,i=d):i+l>=1?(s=(t*c-1)*Math.pow(2,o),i+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),i=0));o>=8;e[n+p]=255&s,p+=b,s/=256,o-=8);for(i=i<0;e[n+p]=255&i,p+=b,i/=256,u-=8);e[n+p-b]|=128*m}},39703:function(e){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},95125:function(e,t,n){"use strict";var a=n(64686)(),o=n(28570)("Object.prototype.toString"),r=function(e){return!(a&&e&&"object"===typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},i=function(e){return!!r(e)||null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},s=function(){return r(arguments)}();r.isLegacyArguments=i,e.exports=s?r:i},58063:function(e){"use strict";var t,n,a=Function.prototype.toString,o="object"===typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"===typeof o&&"function"===typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(p){p!==n&&(o=null)}else o=null;var r=/^\s*class\b/,i=function(e){try{var t=a.call(e);return r.test(t)}catch(n){return!1}},s=function(e){try{return!i(e)&&(a.call(e),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"===typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),l=function(){return!1};if("object"===typeof document){var f=document.all;c.call(f)===c.call(document.all)&&(l=function(e){if((d||!e)&&("undefined"===typeof e||"object"===typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(n){}return!1})}e.exports=o?function(e){if(l(e))return!0;if(!e)return!1;if("function"!==typeof e&&"object"!==typeof e)return!1;try{o(e,null,t)}catch(a){if(a!==n)return!1}return!i(e)&&s(e)}:function(e){if(l(e))return!0;if(!e)return!1;if("function"!==typeof e&&"object"!==typeof e)return!1;if(u)return s(e);if(i(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},84653:function(e,t,n){"use strict";var a,o=Object.prototype.toString,r=Function.prototype.toString,i=/^\s*(?:function)?\*/,s=n(64686)(),c=Object.getPrototypeOf;e.exports=function(e){if("function"!==typeof e)return!1;if(i.test(r.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===o.call(e);if(!c)return!1;if("undefined"===typeof a){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();a=!!t&&c(t)}return c(e)===a}},12822:function(e){e.exports=function(e){if("string"!==typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},99012:function(e){"use strict";e.exports=function(e){return e!==e}},80266:function(e,t,n){"use strict";var a=n(40748),o=n(12175),r=n(99012),i=n(1748),s=n(67102),c=a(i(),Number);o(c,{getPolyfill:i,implementation:r,shim:s}),e.exports=c},1748:function(e,t,n){"use strict";var a=n(99012);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:a}},67102:function(e,t,n){"use strict";var a=n(12175),o=n(1748);e.exports=function(){var e=o();return a(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},38322:function(e,t,n){"use strict";var a=n(91010),o=n(93106),r=n(28570),i=r("Object.prototype.toString"),s=n(64686)(),c=n(20690),u="undefined"===typeof globalThis?n.g:globalThis,d=o(),l=r("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n-1}return!!c&&function(e){var t=!1;return a(p,(function(n,a){if(!t)try{t=n.call(e)===a}catch(o){}})),t}(e)}},28118:function(e,t,n){"use strict";var a=n(81559).v4,o=n(71242),r=function e(t,n){if(!(this instanceof e))return new e(t,n);n||(n={}),this.options={reviver:"undefined"!==typeof n.reviver?n.reviver:null,replacer:"undefined"!==typeof n.replacer?n.replacer:null,generator:"undefined"!==typeof n.generator?n.generator:function(){return a()},version:"undefined"!==typeof n.version?n.version:2,notificationIdNull:"boolean"===typeof n.notificationIdNull&&n.notificationIdNull},this.callServer=t};e.exports=r,r.prototype.request=function(e,t,n,a){var r,i=this,s=null,c=Array.isArray(e)&&"function"===typeof t;if(1===this.options.version&&c)throw new TypeError("JSON-RPC 1.0 does not support batching");if(c||!c&&e&&"object"===typeof e&&"function"===typeof t)a=t,s=e;else{"function"===typeof n&&(a=n,n=void 0);var u="function"===typeof a;try{s=o(e,t,n,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(d){if(u)return a(d);throw d}if(!u)return s}try{r=JSON.stringify(s,this.options.replacer)}catch(d){return a(d)}return this.callServer(r,(function(e,t){i._parseResponse(e,t,a)})),s},r.prototype._parseResponse=function(e,t,n){if(e)n(e);else{if(!t)return n();var a;try{a=JSON.parse(t,this.options.reviver)}catch(e){return n(e)}if(3===n.length){if(Array.isArray(a)){var o=function(e){return"undefined"!==typeof e.error};return n(null,a.filter(o),a.filter((function(e){return!o(e)})))}return n(null,a.error,a.result)}n(null,a)}}},71242:function(e,t,n){"use strict";var a=n(81559).v4;e.exports=function(e,t,n,o){if("string"!==typeof e)throw new TypeError(e+" must be a string");var r="number"===typeof(o=o||{}).version?o.version:2;if(1!==r&&2!==r)throw new TypeError(r+" must be 1 or 2");var i={method:e};if(2===r&&(i.jsonrpc="2.0"),t){if("object"!==typeof t&&!Array.isArray(t))throw new TypeError(t+" must be an object, array or omitted");i.params=t}if("undefined"===typeof n){var s="function"===typeof o.generator?o.generator:function(){return a()};i.id=s(i,o)}else 2===r&&null===n?o.notificationIdNull&&(i.id=null):i.id=n;return i}},30477:function(module,exports,__webpack_require__){var process=__webpack_require__(456),__WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"===typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"===typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"===typeof process&&process.versions&&process.versions.node;NODE_JS?root=__webpack_require__.g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(n){return new Sha256(t,!0).update(n)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n>6,i[c++]=128|63&r):r<55296||r>=57344?(i[c++]=224|r>>12,i[c++]=128|r>>6&63,i[c++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++a)),i[c++]=240|r>>18,i[c++]=128|r>>12&63,i[c++]=128|r>>6&63,i[c++]=128|63&r);e=i}else{if("object"!==o)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}e.length>64&&(e=new Sha256(t,!0).update(e).array());var u=[],d=[];for(a=0;a<64;++a){var l=e[a]||0;u[a]=92^l,d[a]=54^l}Sha256.call(this,t,n),this.update(d),this.oKeyPad=u,this.inner=!0,this.sharedMemory=n}Sha256.prototype.update=function(e){if(!this.finalized){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR);t=!0}for(var a,o,r=0,i=e.length,s=this.blocks;r>2]|=e[r]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(s[o>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=64?(this.block=s[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e,t,n,a,o,r,i,s,c,u=this.h0,d=this.h1,l=this.h2,f=this.h3,p=this.h4,b=this.h5,m=this.h6,h=this.h7,g=this.blocks;for(e=16;e<64;++e)t=((o=g[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,n=((o=g[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,g[e]=g[e-16]+t+g[e-7]+n<<0;for(c=d&l,e=0;e<64;e+=4)this.first?(this.is224?(r=300032,h=(o=g[0]-1413257819)-150054599<<0,f=o+24177077<<0):(r=704751109,h=(o=g[0]-210244248)-1521486534<<0,f=o+143694565<<0),this.first=!1):(t=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),a=(r=u&d)^u&l^c,h=f+(o=h+(n=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&b^~p&m)+K[e]+g[e])<<0,f=o+(t+a)<<0),t=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),a=(i=f&u)^f&d^r,m=l+(o=m+(n=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&p^~h&b)+K[e+1]+g[e+1])<<0,t=((l=o+(t+a)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),a=(s=l&f)^l&u^i,b=d+(o=b+(n=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(m&h^~m&p)+K[e+2]+g[e+2])<<0,t=((d=o+(t+a)<<0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),a=(c=d&l)^d&f^s,p=u+(o=p+(n=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&m^~b&h)+K[e+3]+g[e+3])<<0,u=o+(t+a)<<0;this.h0=this.h0+u<<0,this.h1=this.h1+d<<0,this.h2=this.h2+l<<0,this.h3=this.h3+f<<0,this.h4=this.h4+p<<0,this.h5=this.h5+b<<0,this.h6=this.h6+m<<0,this.h7=this.h7+h<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,a=this.h3,o=this.h4,r=this.h5,i=this.h6,s=this.h7,c=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i];return this.is224||(c+=HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]),c},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,a=this.h3,o=this.h4,r=this.h5,i=this.h6,s=this.h7,c=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,a>>24&255,a>>16&255,a>>8&255,255&a,o>>24&255,o>>16&255,o>>8&255,255&o,r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i];return this.is224||c.push(s>>24&255,s>>16&255,s>>8&255,255&s),c},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},61117:function(e,t,n){var a,o=n(456);!function(){"use strict";var r="input is invalid type",i="object"===typeof window,s=i?window:{};s.JS_SHA3_NO_WINDOW&&(i=!1);var c=!i&&"object"===typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"===typeof o&&o.versions&&o.versions.node?s=n.g:c&&(s=self);var u=!s.JS_SHA3_NO_COMMON_JS&&e.exports,d=n.amdO,l=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,f="0123456789abcdef".split(""),p=[4,1024,262144,67108864],b=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],h=[224,256,384,512],g=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,n){return function(a){return new D(e,t,e).update(a)[n]()}},k=function(e,t,n){return function(a,o){return new D(e,t,o).update(a)[n]()}},A=function(e,t,n){return function(t,a,o,r){return C["cshake"+e].update(t,a,o,r)[n]()}},x=function(e,t,n){return function(t,a,o,r){return C["kmac"+e].update(t,a,o,r)[n]()}},I=function(e,t,n,a){for(var o=0;o>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var a=0;a<50;++a)this.s[a]=0}function N(e,t,n){D.call(this,e,t,n)}D.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(r);if(null===e)throw new Error(r);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw new Error(r);t=!0}for(var a,o,i=this.blocks,s=this.byteCount,c=e.length,u=this.blockCount,d=0,f=this.s;d>2]|=e[d]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(i[a>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=s){for(this.start=a-s,this.block=i[u],a=0;a>=8);n>0;)o.unshift(n),n=255&(e>>=8),++a;return t?o.push(a):o.unshift(a),this.update(o),o.length},D.prototype.encodeString=function(e){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(r);if(null===e)throw new Error(r);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw new Error(r);t=!0}var a=0,o=e.length;if(t)a=o;else for(var i=0;i=57344?a+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++i)),a+=4)}return a+=this.encode(8*a),this.update(e),a},D.prototype.bytepad=function(e,t){for(var n=this.encode(t),a=0;a>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t>4&15]+f[15&e]+f[e>>12&15]+f[e>>8&15]+f[e>>20&15]+f[e>>16&15]+f[e>>28&15]+f[e>>24&15];i%t===0&&(O(n),r=0)}return o&&(e=n[r],s+=f[e>>4&15]+f[15&e],o>1&&(s+=f[e>>12&15]+f[e>>8&15]),o>2&&(s+=f[e>>20&15]+f[e>>16&15])),s},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,a=this.outputBlocks,o=this.extraBytes,r=0,i=0,s=this.outputBits>>3;e=o?new ArrayBuffer(a+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);i>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%n===0&&O(a)}return r&&(e=s<<2,t=a[i],c[e]=255&t,r>1&&(c[e+1]=t>>8&255),r>2&&(c[e+2]=t>>16&255)),c},N.prototype=new D,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var O=function(e){var t,n,a,o,r,i,s,c,u,d,l,f,p,b,h,g,y,v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B,D,N,O,F,L,j,H,G,z,K,W,Z,V,q,Q,J,Y,X,$,ee,te,ne,ae,oe,re,ie,se,ce,ue,de;for(a=0;a<48;a+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],r=e[1]^e[11]^e[21]^e[31]^e[41],i=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(f=e[8]^e[18]^e[28]^e[38]^e[48])^(i<<1|s>>>31),n=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|i>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=o^(c<<1|u>>>31),n=r^(u<<1|c>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=i^(d<<1|l>>>31),n=s^(l<<1|d>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=c^(f<<1|p>>>31),n=u^(p<<1|f>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=d^(o<<1|r>>>31),n=l^(r<<1|o>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,b=e[0],h=e[1],V=e[11]<<4|e[10]>>>28,q=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,y=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,P=e[33]<<13|e[32]>>>19,U=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,de=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,O=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,_=e[45]<<29|e[44]>>>3,B=e[44]<<29|e[45]>>>3,T=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ae=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,j=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,A=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,W=e[8]<<27|e[9]>>>5,Z=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,E=e[19]<<20|e[18]>>>12,re=e[29]<<7|e[28]>>>25,ie=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,G=e[39]<<8|e[38]>>>24,x=e[48]<<14|e[49]>>>18,I=e[49]<<14|e[48]>>>18,e[0]=b^~g&v,e[1]=h^~y&w,e[10]=T^~C&R,e[11]=S^~E&M,e[20]=D^~O&L,e[21]=N^~F&j,e[30]=W^~V&Q,e[31]=Z^~q&J,e[40]=te^~ae&re,e[41]=ne^~oe&ie,e[2]=g^~v&k,e[3]=y^~w&A,e[12]=C^~R&P,e[13]=E^~M&U,e[22]=O^~L&H,e[23]=F^~j&G,e[32]=V^~Q&Y,e[33]=q^~J&X,e[42]=ae^~re&se,e[43]=oe^~ie&ce,e[4]=v^~k&x,e[5]=w^~A&I,e[14]=R^~P&_,e[15]=M^~U&B,e[24]=L^~H&z,e[25]=j^~G&K,e[34]=Q^~Y&$,e[35]=J^~X&ee,e[44]=re^~se&ue,e[45]=ie^~ce&de,e[6]=k^~x&b,e[7]=A^~I&h,e[16]=P^~_&T,e[17]=U^~B&S,e[26]=H^~z&D,e[27]=G^~K&N,e[36]=Y^~$&W,e[37]=X^~ee&Z,e[46]=se^~ue&te,e[47]=ce^~de&ne,e[8]=x^~b&g,e[9]=I^~h&y,e[18]=_^~T&C,e[19]=B^~S&E,e[28]=z^~D&O,e[29]=K^~N&F,e[38]=$^~W&V,e[39]=ee^~Z&q,e[48]=ue^~te&ae,e[49]=de^~ne&oe,e[0]^=m[a],e[1]^=m[a+1]};if(u)e.exports=C;else{for(R=0;R>6,c[u++]=128|63&s):s<55296||s>=57344?(c[u++]=224|s>>12,c[u++]=128|s>>6&63,c[u++]=128|63&s):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++l)),c[u++]=240|s>>18,c[u++]=128|s>>12&63,c[u++]=128|s>>6&63,c[u++]=128|63&s);e=c}e.length>128&&(e=new k(n,!0).update(e).array());var f=[],p=[];for(l=0;l<128;++l){var b=e[l]||0;f[l]=92^b,p[l]=54^b}k.call(this,n,a),this.update(p),this.oKeyPad=f,this.inner=!0,this.sharedMemory=a}k.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var n,a=typeof e;if("string"!==a){if("object"!==a)throw new Error(t);if(null===e)throw new Error(t);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw new Error(t);n=!0}for(var o,r,i=0,s=e.length,c=this.blocks;i>2]|=e[i]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(c[r>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=128?(this.block=c[32],this.start=r-128,this.hash(),this.hashed=!0):this.start=r}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},k.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[32]=this.block,e[t>>2]|=f[3&t],this.block=e[32],t>=112&&(this.hashed||this.hash(),e[0]=this.block,e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=e[16]=e[17]=e[18]=e[19]=e[20]=e[21]=e[22]=e[23]=e[24]=e[25]=e[26]=e[27]=e[28]=e[29]=e[30]=e[31]=e[32]=0),e[30]=this.hBytes<<3|this.bytes>>>29,e[31]=this.bytes<<3,this.hash()}},k.prototype.hash=function(){var e,t,n,a,o,r,i,s,c,u,d,l,f,p,m,h,g,y,v,w,k,A,x,I,T,S=this.h0h,C=this.h0l,E=this.h1h,R=this.h1l,M=this.h2h,P=this.h2l,U=this.h3h,_=this.h3l,B=this.h4h,D=this.h4l,N=this.h5h,O=this.h5l,F=this.h6h,L=this.h6l,j=this.h7h,H=this.h7l,G=this.blocks;for(e=32;e<160;e+=2)t=((w=G[e-30])>>>1|(k=G[e-29])<<31)^(w>>>8|k<<24)^w>>>7,n=(k>>>1|w<<31)^(k>>>8|w<<24)^(k>>>7|w<<25),a=((w=G[e-4])>>>19|(k=G[e-3])<<13)^(k>>>29|w<<3)^w>>>6,o=(k>>>19|w<<13)^(w>>>29|k<<3)^(k>>>6|w<<26),w=G[e-32],k=G[e-31],c=((A=G[e-14])>>>16)+(w>>>16)+(t>>>16)+(a>>>16)+((s=(65535&A)+(65535&w)+(65535&t)+(65535&a)+((i=((x=G[e-13])>>>16)+(k>>>16)+(n>>>16)+(o>>>16)+((r=(65535&x)+(65535&k)+(65535&n)+(65535&o))>>>16))>>>16))>>>16),G[e]=c<<16|65535&s,G[e+1]=i<<16|65535&r;var z=S,K=C,W=E,Z=R,V=M,q=P,Q=U,J=_,Y=B,X=D,$=N,ee=O,te=F,ne=L,ae=j,oe=H;for(h=W&V,g=Z&q,e=0;e<160;e+=8)t=(z>>>28|K<<4)^(K>>>2|z<<30)^(K>>>7|z<<25),n=(K>>>28|z<<4)^(z>>>2|K<<30)^(z>>>7|K<<25),a=(Y>>>14|X<<18)^(Y>>>18|X<<14)^(X>>>9|Y<<23),o=(X>>>14|Y<<18)^(X>>>18|Y<<14)^(Y>>>9|X<<23),y=(u=z&W)^z&V^h,v=(d=K&Z)^K&q^g,I=Y&$^~Y&te,T=X&ee^~X&ne,w=G[e],k=G[e+1],w=(c=((A=b[e])>>>16)+(w>>>16)+(I>>>16)+(a>>>16)+(ae>>>16)+((s=(65535&A)+(65535&w)+(65535&I)+(65535&a)+(65535&ae)+((i=((x=b[e+1])>>>16)+(k>>>16)+(T>>>16)+(o>>>16)+(oe>>>16)+((r=(65535&x)+(65535&k)+(65535&T)+(65535&o)+(65535&oe))>>>16))>>>16))>>>16))<<16|65535&s,k=i<<16|65535&r,A=(c=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((i=(v>>>16)+(n>>>16)+((r=(65535&v)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,x=i<<16|65535&r,ae=(c=(Q>>>16)+(w>>>16)+((s=(65535&Q)+(65535&w)+((i=(J>>>16)+(k>>>16)+((r=(65535&J)+(65535&k))>>>16))>>>16))>>>16))<<16|65535&s,oe=i<<16|65535&r,t=((Q=(c=(A>>>16)+(w>>>16)+((s=(65535&A)+(65535&w)+((i=(x>>>16)+(k>>>16)+((r=(65535&x)+(65535&k))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|(J=i<<16|65535&r)<<4)^(J>>>2|Q<<30)^(J>>>7|Q<<25),n=(J>>>28|Q<<4)^(Q>>>2|J<<30)^(Q>>>7|J<<25),a=(ae>>>14|oe<<18)^(ae>>>18|oe<<14)^(oe>>>9|ae<<23),o=(oe>>>14|ae<<18)^(oe>>>18|ae<<14)^(ae>>>9|oe<<23),y=(l=Q&z)^Q&W^u,v=(f=J&K)^J&Z^d,I=ae&Y^~ae&$,T=oe&X^~oe&ee,w=G[e+2],k=G[e+3],w=(c=((A=b[e+2])>>>16)+(w>>>16)+(I>>>16)+(a>>>16)+(te>>>16)+((s=(65535&A)+(65535&w)+(65535&I)+(65535&a)+(65535&te)+((i=((x=b[e+3])>>>16)+(k>>>16)+(T>>>16)+(o>>>16)+(ne>>>16)+((r=(65535&x)+(65535&k)+(65535&T)+(65535&o)+(65535&ne))>>>16))>>>16))>>>16))<<16|65535&s,k=i<<16|65535&r,A=(c=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((i=(v>>>16)+(n>>>16)+((r=(65535&v)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,x=i<<16|65535&r,te=(c=(V>>>16)+(w>>>16)+((s=(65535&V)+(65535&w)+((i=(q>>>16)+(k>>>16)+((r=(65535&q)+(65535&k))>>>16))>>>16))>>>16))<<16|65535&s,ne=i<<16|65535&r,t=((V=(c=(A>>>16)+(w>>>16)+((s=(65535&A)+(65535&w)+((i=(x>>>16)+(k>>>16)+((r=(65535&x)+(65535&k))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|(q=i<<16|65535&r)<<4)^(q>>>2|V<<30)^(q>>>7|V<<25),n=(q>>>28|V<<4)^(V>>>2|q<<30)^(V>>>7|q<<25),a=(te>>>14|ne<<18)^(te>>>18|ne<<14)^(ne>>>9|te<<23),o=(ne>>>14|te<<18)^(ne>>>18|te<<14)^(te>>>9|ne<<23),y=(p=V&Q)^V&z^l,v=(m=q&J)^q&K^f,I=te&ae^~te&Y,T=ne&oe^~ne&X,w=G[e+4],k=G[e+5],w=(c=((A=b[e+4])>>>16)+(w>>>16)+(I>>>16)+(a>>>16)+($>>>16)+((s=(65535&A)+(65535&w)+(65535&I)+(65535&a)+(65535&$)+((i=((x=b[e+5])>>>16)+(k>>>16)+(T>>>16)+(o>>>16)+(ee>>>16)+((r=(65535&x)+(65535&k)+(65535&T)+(65535&o)+(65535&ee))>>>16))>>>16))>>>16))<<16|65535&s,k=i<<16|65535&r,A=(c=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((i=(v>>>16)+(n>>>16)+((r=(65535&v)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,x=i<<16|65535&r,$=(c=(W>>>16)+(w>>>16)+((s=(65535&W)+(65535&w)+((i=(Z>>>16)+(k>>>16)+((r=(65535&Z)+(65535&k))>>>16))>>>16))>>>16))<<16|65535&s,ee=i<<16|65535&r,t=((W=(c=(A>>>16)+(w>>>16)+((s=(65535&A)+(65535&w)+((i=(x>>>16)+(k>>>16)+((r=(65535&x)+(65535&k))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|(Z=i<<16|65535&r)<<4)^(Z>>>2|W<<30)^(Z>>>7|W<<25),n=(Z>>>28|W<<4)^(W>>>2|Z<<30)^(W>>>7|Z<<25),a=($>>>14|ee<<18)^($>>>18|ee<<14)^(ee>>>9|$<<23),o=(ee>>>14|$<<18)^(ee>>>18|$<<14)^($>>>9|ee<<23),y=(h=W&V)^W&Q^p,v=(g=Z&q)^Z&J^m,I=$&te^~$&ae,T=ee&ne^~ee&oe,w=G[e+6],k=G[e+7],w=(c=((A=b[e+6])>>>16)+(w>>>16)+(I>>>16)+(a>>>16)+(Y>>>16)+((s=(65535&A)+(65535&w)+(65535&I)+(65535&a)+(65535&Y)+((i=((x=b[e+7])>>>16)+(k>>>16)+(T>>>16)+(o>>>16)+(X>>>16)+((r=(65535&x)+(65535&k)+(65535&T)+(65535&o)+(65535&X))>>>16))>>>16))>>>16))<<16|65535&s,k=i<<16|65535&r,A=(c=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((i=(v>>>16)+(n>>>16)+((r=(65535&v)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,x=i<<16|65535&r,Y=(c=(z>>>16)+(w>>>16)+((s=(65535&z)+(65535&w)+((i=(K>>>16)+(k>>>16)+((r=(65535&K)+(65535&k))>>>16))>>>16))>>>16))<<16|65535&s,X=i<<16|65535&r,z=(c=(A>>>16)+(w>>>16)+((s=(65535&A)+(65535&w)+((i=(x>>>16)+(k>>>16)+((r=(65535&x)+(65535&k))>>>16))>>>16))>>>16))<<16|65535&s,K=i<<16|65535&r;c=(S>>>16)+(z>>>16)+((s=(65535&S)+(65535&z)+((i=(C>>>16)+(K>>>16)+((r=(65535&C)+(65535&K))>>>16))>>>16))>>>16),this.h0h=c<<16|65535&s,this.h0l=i<<16|65535&r,c=(E>>>16)+(W>>>16)+((s=(65535&E)+(65535&W)+((i=(R>>>16)+(Z>>>16)+((r=(65535&R)+(65535&Z))>>>16))>>>16))>>>16),this.h1h=c<<16|65535&s,this.h1l=i<<16|65535&r,c=(M>>>16)+(V>>>16)+((s=(65535&M)+(65535&V)+((i=(P>>>16)+(q>>>16)+((r=(65535&P)+(65535&q))>>>16))>>>16))>>>16),this.h2h=c<<16|65535&s,this.h2l=i<<16|65535&r,c=(U>>>16)+(Q>>>16)+((s=(65535&U)+(65535&Q)+((i=(_>>>16)+(J>>>16)+((r=(65535&_)+(65535&J))>>>16))>>>16))>>>16),this.h3h=c<<16|65535&s,this.h3l=i<<16|65535&r,c=(B>>>16)+(Y>>>16)+((s=(65535&B)+(65535&Y)+((i=(D>>>16)+(X>>>16)+((r=(65535&D)+(65535&X))>>>16))>>>16))>>>16),this.h4h=c<<16|65535&s,this.h4l=i<<16|65535&r,c=(N>>>16)+($>>>16)+((s=(65535&N)+(65535&$)+((i=(O>>>16)+(ee>>>16)+((r=(65535&O)+(65535&ee))>>>16))>>>16))>>>16),this.h5h=c<<16|65535&s,this.h5l=i<<16|65535&r,c=(F>>>16)+(te>>>16)+((s=(65535&F)+(65535&te)+((i=(L>>>16)+(ne>>>16)+((r=(65535&L)+(65535&ne))>>>16))>>>16))>>>16),this.h6h=c<<16|65535&s,this.h6l=i<<16|65535&r,c=(j>>>16)+(ae>>>16)+((s=(65535&j)+(65535&ae)+((i=(H>>>16)+(oe>>>16)+((r=(65535&H)+(65535&oe))>>>16))>>>16))>>>16),this.h7h=c<<16|65535&s,this.h7l=i<<16|65535&r},k.prototype.hex=function(){this.finalize();var e=this.h0h,t=this.h0l,n=this.h1h,a=this.h1l,o=this.h2h,r=this.h2l,i=this.h3h,s=this.h3l,c=this.h4h,u=this.h4l,d=this.h5h,f=this.h5l,p=this.h6h,b=this.h6l,m=this.h7h,h=this.h7l,g=this.bits,y=l[e>>28&15]+l[e>>24&15]+l[e>>20&15]+l[e>>16&15]+l[e>>12&15]+l[e>>8&15]+l[e>>4&15]+l[15&e]+l[t>>28&15]+l[t>>24&15]+l[t>>20&15]+l[t>>16&15]+l[t>>12&15]+l[t>>8&15]+l[t>>4&15]+l[15&t]+l[n>>28&15]+l[n>>24&15]+l[n>>20&15]+l[n>>16&15]+l[n>>12&15]+l[n>>8&15]+l[n>>4&15]+l[15&n]+l[a>>28&15]+l[a>>24&15]+l[a>>20&15]+l[a>>16&15]+l[a>>12&15]+l[a>>8&15]+l[a>>4&15]+l[15&a]+l[o>>28&15]+l[o>>24&15]+l[o>>20&15]+l[o>>16&15]+l[o>>12&15]+l[o>>8&15]+l[o>>4&15]+l[15&o]+l[r>>28&15]+l[r>>24&15]+l[r>>20&15]+l[r>>16&15]+l[r>>12&15]+l[r>>8&15]+l[r>>4&15]+l[15&r]+l[i>>28&15]+l[i>>24&15]+l[i>>20&15]+l[i>>16&15]+l[i>>12&15]+l[i>>8&15]+l[i>>4&15]+l[15&i];return g>=256&&(y+=l[s>>28&15]+l[s>>24&15]+l[s>>20&15]+l[s>>16&15]+l[s>>12&15]+l[s>>8&15]+l[s>>4&15]+l[15&s]),g>=384&&(y+=l[c>>28&15]+l[c>>24&15]+l[c>>20&15]+l[c>>16&15]+l[c>>12&15]+l[c>>8&15]+l[c>>4&15]+l[15&c]+l[u>>28&15]+l[u>>24&15]+l[u>>20&15]+l[u>>16&15]+l[u>>12&15]+l[u>>8&15]+l[u>>4&15]+l[15&u]+l[d>>28&15]+l[d>>24&15]+l[d>>20&15]+l[d>>16&15]+l[d>>12&15]+l[d>>8&15]+l[d>>4&15]+l[15&d]+l[f>>28&15]+l[f>>24&15]+l[f>>20&15]+l[f>>16&15]+l[f>>12&15]+l[f>>8&15]+l[f>>4&15]+l[15&f]),512==g&&(y+=l[p>>28&15]+l[p>>24&15]+l[p>>20&15]+l[p>>16&15]+l[p>>12&15]+l[p>>8&15]+l[p>>4&15]+l[15&p]+l[b>>28&15]+l[b>>24&15]+l[b>>20&15]+l[b>>16&15]+l[b>>12&15]+l[b>>8&15]+l[b>>4&15]+l[15&b]+l[m>>28&15]+l[m>>24&15]+l[m>>20&15]+l[m>>16&15]+l[m>>12&15]+l[m>>8&15]+l[m>>4&15]+l[15&m]+l[h>>28&15]+l[h>>24&15]+l[h>>20&15]+l[h>>16&15]+l[h>>12&15]+l[h>>8&15]+l[h>>4&15]+l[15&h]),y},k.prototype.toString=k.prototype.hex,k.prototype.digest=function(){this.finalize();var e=this.h0h,t=this.h0l,n=this.h1h,a=this.h1l,o=this.h2h,r=this.h2l,i=this.h3h,s=this.h3l,c=this.h4h,u=this.h4l,d=this.h5h,l=this.h5l,f=this.h6h,p=this.h6l,b=this.h7h,m=this.h7l,h=this.bits,g=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,a>>24&255,a>>16&255,a>>8&255,255&a,o>>24&255,o>>16&255,o>>8&255,255&o,r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i];return h>=256&&g.push(s>>24&255,s>>16&255,s>>8&255,255&s),h>=384&&g.push(c>>24&255,c>>16&255,c>>8&255,255&c,u>>24&255,u>>16&255,u>>8&255,255&u,d>>24&255,d>>16&255,d>>8&255,255&d,l>>24&255,l>>16&255,l>>8&255,255&l),512==h&&g.push(f>>24&255,f>>16&255,f>>8&255,255&f,p>>24&255,p>>16&255,p>>8&255,255&p,b>>24&255,b>>16&255,b>>8&255,255&b,m>>24&255,m>>16&255,m>>8&255,255&m),g},k.prototype.array=k.prototype.digest,k.prototype.arrayBuffer=function(){this.finalize();var e=this.bits,t=new ArrayBuffer(e/8),n=new DataView(t);return n.setUint32(0,this.h0h),n.setUint32(4,this.h0l),n.setUint32(8,this.h1h),n.setUint32(12,this.h1l),n.setUint32(16,this.h2h),n.setUint32(20,this.h2l),n.setUint32(24,this.h3h),e>=256&&n.setUint32(28,this.h3l),e>=384&&(n.setUint32(32,this.h4h),n.setUint32(36,this.h4l),n.setUint32(40,this.h5h),n.setUint32(44,this.h5l)),512==e&&(n.setUint32(48,this.h6h),n.setUint32(52,this.h6l),n.setUint32(56,this.h7h),n.setUint32(60,this.h7l)),t},k.prototype.clone=function(){var e=new k(this.bits,!1);return this.copyTo(e),e},k.prototype.copyTo=function(e){var t=0,n=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(t=0;t>>2]>>>24-o%4*8&255;a.push((r>>>4).toString(16)),a.push((15&r).toString(16))}return a.join("")},i="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",s=(o=parseInt((/msie (\d+)/.exec(i)||[])[1],10),isNaN(o)?(o=parseInt((/trident\/.*; rv:(\d+)/.exec(i)||[])[1],10),!isNaN(o)&&o):o),c=function(){if("undefined"!=typeof window){var t=window.crypto||window.msCrypto;if(!t){if(function(e,t){return!1!==s&&(!t||("<"===e?s"===e?s>t:">="===e?s>=t:s===t))}("<",11))return a.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return t.getRandomValues(new Uint32Array(1))[0]}}return void 0!==e.g&&e.g.crypto?function(){return e.g.crypto.randomBytes(4).readInt32LE()}:function(){return n(34845).randomBytes(4).readInt32LE()}}(),u=function(){function e(t,n){if(Array.isArray(t)||!t)return this.i=Array.isArray(t)?t:[],void(this.u="number"==typeof n?n:4*this.i.length);if(t instanceof e)return this.i=t.words.slice(),void(this.u=t.nSigBytes);var a;try{t instanceof ArrayBuffer?a=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(a=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(e){throw new Error("Invalid argument")}if(!a)throw new Error("Invalid argument");for(var o=a.byteLength,r=[],i=0;i>>2]|=a[i]<<24-i%4*8;this.i=r,this.u=o}return Object.defineProperty(e.prototype,"nSigBytes",{get:function(){return this.u},set:function(e){this.u=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"words",{get:function(){return this.i},enumerable:!1,configurable:!0}),e.prototype.toString=function(e){return e?e.stringify(this):r(this)},e.prototype.toUint8Array=function(){for(var e=this.i,t=this.u,n=new Uint8Array(t),a=0;a>>2]>>>24-a%4*8&255;return n},e.prototype.concat=function(e){var t=e.words.slice(),n=e.nSigBytes;if(this.clamp(),this.u%4)for(var a=0;a>>2]>>>24-a%4*8&255;this.i[this.u+a>>>2]|=o<<24-(this.u+a)%4*8}else for(a=0;a>>2]=t[a>>>2];return this.u+=n,this},e.prototype.clamp=function(){var e=this.u;this.i[e>>>2]&=4294967295<<32-e%4*8,this.i.length=Math.ceil(e/4)},e.prototype.clone=function(){return new e(this.i.slice(),this.u)},e.random=function(t){for(var n=[],a=0;a>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,i=0;i<4&&o+.75*i>>6*(3-i)&63));var s=d.charAt(64);if(s)for(;a.length%4;)a.push(s);return a.join("")},parse:function(e){var t=e.length,n=d.charAt(64);if(n){var a=e.indexOf(n);-1!==a&&(t=a)}for(var o=[],r=0,i=0;i>>6-i%4*2;o[r>>>2]|=s<<24-r%4*8,r++}return new u(o,r)}};return t}()},71409:function(e,t,n){var a=n(65218);e.exports=function(){"use strict";var e={3354:function(e,t,n){n.d(t,{e:function(){return r}});var a=n(5720),o=n(9054),r=function(){function e(t,n){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof n?n:4*this.t.length);if(t instanceof e)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var a;try{t instanceof ArrayBuffer?a=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(a=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(e){throw new Error("Invalid argument")}if(!a)throw new Error("Invalid argument");for(var o=a.byteLength,r=[],i=0;i>>2]|=a[i]<<24-i%4*8;this.t=r,this.i=o}return Object.defineProperty(e.prototype,"nSigBytes",{get:function(){return this.i},set:function(e){this.i=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),e.prototype.toString=function(e){return e?e.stringify(this):a.p.stringify(this)},e.prototype.toUint8Array=function(){for(var e=this.t,t=this.i,n=new Uint8Array(t),a=0;a>>2]>>>24-a%4*8&255;return n},e.prototype.concat=function(e){var t=e.words.slice(),n=e.nSigBytes;if(this.clamp(),this.i%4)for(var a=0;a>>2]>>>24-a%4*8&255;this.t[this.i+a>>>2]|=o<<24-(this.i+a)%4*8}else for(a=0;a>>2]=t[a>>>2];return this.i+=n,this},e.prototype.clamp=function(){var e=this.i;this.t[e>>>2]&=4294967295<<32-e%4*8,this.t.length=Math.ceil(e/4)},e.prototype.clone=function(){return new e(this.t.slice(),this.i)},e.random=function(t){for(var n=[],a=0;a"===e?r>t:">="===e?r>=t:r===t))}},5720:function(e,t,n){n.d(t,{p:function(){return o}});var a=n(3354),o={stringify:function(e){for(var t=e.nSigBytes,n=e.words,a=[],o=0;o>>2]>>>24-o%4*8&255;a.push((r>>>4).toString(16)),a.push((15&r).toString(16))}return a.join("")},parse:function(e){var t=e.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(e))throw new Error("Invalid Hex string: "+e);for(var n=[],o=0;o>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new a.e(n,t/2)}}},8702:function(e,t,n){n.d(t,{m:function(){return o}});var a=n(3354),o={stringify:function(e){for(var t=e.nSigBytes,n=e.words,a=[],o=0;o>>2]>>>24-o%4*8&255;a.push(String.fromCharCode(r))}return a.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new a.e(n,t)}}},4768:function(e,t,n){n.d(t,{d:function(){return o}});var a=n(8702),o={stringify:function(e){try{return decodeURIComponent(escape(a.m.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return a.m.parse(unescape(encodeURIComponent(e)))}}},9054:function(e,t,o){o.d(t,{M:function(){return i}});var r=o(1756),i=function(){if("undefined"!=typeof window){var e=window.crypto||window.msCrypto;if(!e){if((0,r.w)("<",11))return a.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return e.getRandomValues(new Uint32Array(1))[0]}}return void 0!==o.g&&o.g.crypto?function(){return o.g.crypto.randomBytes(4).readInt32LE()}:function(){return n(34845).randomBytes(4).readInt32LE()}}()}},t={};function o(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"S",{value:!0})};var r={};return function(){o.r(r),o.d(r,{RIPEMD160:function(){return y}});var e,t=o(1868),n=o(3354),a=(e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)},function(t,n){function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}),i=new n.e([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=new n.e([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=new n.e([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=new n.e([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=new n.e([0,1518500249,1859775393,2400959708,2840853838]),l=new n.e([1352829926,1548603684,1836072691,2053994217,0]);function f(e,t,n){return e^t^n}function p(e,t,n){return e&t|~e&n}function b(e,t,n){return(e|~t)^n}function m(e,t,n){return e&n|t&~n}function h(e,t,n){return e^(t|~n)}function g(e,t){return e<>>32-t}var y=function(e){function t(t){var a=e.call(this,t)||this;return a.N=new n.e([1732584193,4023233417,2562383102,271733878,3285377520]),a.v=t,t&&void 0!==t.hash&&(a.N=t.hash.clone()),a}return a(t,e),t.prototype.U=function(){this.N=new n.e([1732584193,4023233417,2562383102,271733878,3285377520])},t.prototype.O=function(e,t){for(var n=0;n<16;n++){var a=t+n,o=e[a];e[a]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var r,y,v,w,k,A,x,I,T,S,C,E=this.N.words,R=d.words,M=l.words,P=i.words,U=s.words,_=c.words,B=u.words;for(A=r=E[0],x=y=E[1],I=v=E[2],T=w=E[3],S=k=E[4],n=0;n<80;n+=1)C=r+e[t+P[n]]|0,C+=n<16?f(y,v,w)+R[0]:n<32?p(y,v,w)+R[1]:n<48?b(y,v,w)+R[2]:n<64?m(y,v,w)+R[3]:h(y,v,w)+R[4],C=(C=g(C|=0,_[n]))+k|0,r=k,k=w,w=g(v,10),v=y,y=C,C=A+e[t+U[n]]|0,C+=n<16?h(x,I,T)+M[0]:n<32?m(x,I,T)+M[1]:n<48?b(x,I,T)+M[2]:n<64?p(x,I,T)+M[3]:f(x,I,T)+M[4],C=(C=g(C|=0,B[n]))+S|0,A=S,S=T,T=g(I,10),I=x,x=C;C=E[1]+v+T|0,E[1]=E[2]+w+S|0,E[2]=E[3]+k+A|0,E[3]=E[4]+r+x|0,E[4]=E[0]+y+I|0,E[0]=C},t.prototype._=function(){var e=this.l,t=e.words,n=8*this.j,a=8*e.nSigBytes;t[a>>>5]|=128<<24-a%32,t[14+(a+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.nSigBytes=4*(t.length+1),this.I();for(var o=this.N,r=o.words,i=0;i<5;i++){var s=r[i];r[i]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},t.prototype.clone=function(){return new t({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.j})},t.hash=function(e,n){return new t(n).finalize(e)},t}(t.P)}(),r}()},47738:function(e,t,n){var a=n(65218);e.exports=function(){"use strict";var e={3354:function(e,t,n){n.d(t,{e:function(){return r}});var a=n(5720),o=n(9054),r=function(){function e(t,n){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof n?n:4*this.t.length);if(t instanceof e)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var a;try{t instanceof ArrayBuffer?a=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(a=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(e){throw new Error("Invalid argument")}if(!a)throw new Error("Invalid argument");for(var o=a.byteLength,r=[],i=0;i>>2]|=a[i]<<24-i%4*8;this.t=r,this.i=o}return Object.defineProperty(e.prototype,"nSigBytes",{get:function(){return this.i},set:function(e){this.i=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),e.prototype.toString=function(e){return e?e.stringify(this):a.p.stringify(this)},e.prototype.toUint8Array=function(){for(var e=this.t,t=this.i,n=new Uint8Array(t),a=0;a>>2]>>>24-a%4*8&255;return n},e.prototype.concat=function(e){var t=e.words.slice(),n=e.nSigBytes;if(this.clamp(),this.i%4)for(var a=0;a>>2]>>>24-a%4*8&255;this.t[this.i+a>>>2]|=o<<24-(this.i+a)%4*8}else for(a=0;a>>2]=t[a>>>2];return this.i+=n,this},e.prototype.clamp=function(){var e=this.i;this.t[e>>>2]&=4294967295<<32-e%4*8,this.t.length=Math.ceil(e/4)},e.prototype.clone=function(){return new e(this.t.slice(),this.i)},e.random=function(t){for(var n=[],a=0;a"===e?r>t:">="===e?r>=t:r===t))}},5720:function(e,t,n){n.d(t,{p:function(){return o}});var a=n(3354),o={stringify:function(e){for(var t=e.nSigBytes,n=e.words,a=[],o=0;o>>2]>>>24-o%4*8&255;a.push((r>>>4).toString(16)),a.push((15&r).toString(16))}return a.join("")},parse:function(e){var t=e.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(e))throw new Error("Invalid Hex string: "+e);for(var n=[],o=0;o>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new a.e(n,t/2)}}},8702:function(e,t,n){n.d(t,{m:function(){return o}});var a=n(3354),o={stringify:function(e){for(var t=e.nSigBytes,n=e.words,a=[],o=0;o>>2]>>>24-o%4*8&255;a.push(String.fromCharCode(r))}return a.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new a.e(n,t)}}},4768:function(e,t,n){n.d(t,{d:function(){return o}});var a=n(8702),o={stringify:function(e){try{return decodeURIComponent(escape(a.m.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return a.m.parse(unescape(encodeURIComponent(e)))}}},9054:function(e,t,o){o.d(t,{M:function(){return i}});var r=o(1756),i=function(){if("undefined"!=typeof window){var e=window.crypto||window.msCrypto;if(!e){if((0,r.w)("<",11))return a.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return e.getRandomValues(new Uint32Array(1))[0]}}return void 0!==o.g&&o.g.crypto?function(){return o.g.crypto.randomBytes(4).readInt32LE()}:function(){return n(34845).randomBytes(4).readInt32LE()}}()}},t={};function o(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"S",{value:!0})};var r={};return function(){o.r(r),o.d(r,{SHA256:function(){return l}});var e,t=o(1868),n=o(3354),a=(e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)},function(t,n){function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}),i=[],s=[];function c(e){for(var t=Math.sqrt(e),n=2;n<=t;n++)if(!(e%n))return!1;return!0}function u(e){return 4294967296*(e-(0|e))|0}!function(){for(var e=2,t=0;t<64;)c(e)&&(t<8&&(i[t]=u(Math.pow(e,.5))),s[t]=u(Math.pow(e,1/3)),t++),e++}();var d=[],l=function(e){function t(t){var a=e.call(this,t)||this;return a.N=new n.e(i.slice(0)),a.v=t,t&&void 0!==t.hash&&(a.N=t.hash.clone()),a}return a(t,e),t.prototype.U=function(){this.N=new n.e(i.slice(0))},t.prototype.I=function(e,t){for(var n=this.N.words,a=n[0],o=n[1],r=n[2],i=n[3],c=n[4],u=n[5],l=n[6],f=n[7],p=0;p<64;p++){if(p<16)d[p]=0|e[t+p];else{var b=d[p-15],m=(b<<25|b>>>7)^(b<<14|b>>>18)^b>>>3,h=d[p-2],g=(h<<15|h>>>17)^(h<<13|h>>>19)^h>>>10;d[p]=m+d[p-7]+g+d[p-16]}var y=a&o^a&r^o&r,v=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),w=f+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&u^~c&l)+s[p]+d[p];f=l,l=u,u=c,c=i+w|0,i=r,r=o,o=a,a=w+(v+y)|0}n[0]=n[0]+a|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+i|0,n[4]=n[4]+c|0,n[5]=n[5]+u|0,n[6]=n[6]+l|0,n[7]=n[7]+f|0},t.prototype._=function(){var e=this.l.words,t=8*this.A,n=8*this.l.nSigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(t/4294967296),e[15+(n+64>>>9<<4)]=t,this.l.nSigBytes=4*e.length,this.O(),this.N},t.prototype.clone=function(){return new t({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.A})},t.hash=function(e,n){return new t(n).finalize(e)},t}(t.P)}(),r}()},33638:function(e,t,n){var a=n(65218);e.exports=function(){"use strict";var e={9691:function(e,t,n){n.d(t,{AES:function(){return k}});var a,o=n(9456),r=n(787),i=n(5693),s=n(9109),c=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(){return(u=Object.assign||function(e){for(var t,n=1,a=arguments.length;n>>8^255&o^99,d[n]=o,l[o]=n;var r=e[n],i=e[r],s=e[i],c=257*e[o]^16843008*o;f[n]=c<<24|c>>>8,p[n]=c<<16|c>>>16,b[n]=c<<8|c>>>24,m[n]=c,c=16843009*s^65537*i^257*r^16843008*n,h[o]=c<<24|c>>>8,g[o]=c<<16|c>>>16,y[o]=c<<8|c>>>24,v[o]=c,n?(n=r^e[e[e[s^r]]],a^=e[e[a]]):n=a=1}}();var w=[0,1,2,4,8,16,32,64,128,27,54],k=function(e){function t(t){var n=e.call(this,t)||this;return n.u=0,n.h=[],n.v=[],n.O=t,n.A(),n}return c(t,e),t.prototype.A=function(){var e;if(!this.u||this.k!==this.H){for(var t=this.k=this.H,n=t.words,a=t.nSigBytes/4,o=4*((this.u=a+6)+1),r=this.h=[],i=0;i6&&i%a==4&&(e=d[e>>>24]<<24|d[e>>>16&255]<<16|d[e>>>8&255]<<8|d[255&e]):(e=d[(e=e<<8|e>>>24)>>>24]<<24|d[e>>>16&255]<<16|d[e>>>8&255]<<8|d[255&e],e^=w[i/a|0]<<24),r[i]=r[i-a]^e);this.v=[];for(var s=0;s>>24]]^g[d[e>>>16&255]]^y[d[e>>>8&255]]^v[d[255&e]]}},t.prototype.encryptBlock=function(e,t){this.B(e,t,this.h,f,p,b,m,d)},t.prototype.decryptBlock=function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this.B(e,t,this.v,h,g,y,v,l),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},t.prototype.B=function(e,t,n,a,o,r,i,s){for(var c=this.u,u=e[t]^n[0],d=e[t+1]^n[1],l=e[t+2]^n[2],f=e[t+3]^n[3],p=4,b=1;b>>24]^o[d>>>16&255]^r[l>>>8&255]^i[255&f]^n[p++],h=a[d>>>24]^o[l>>>16&255]^r[f>>>8&255]^i[255&u]^n[p++],g=a[l>>>24]^o[f>>>16&255]^r[u>>>8&255]^i[255&d]^n[p++],y=a[f>>>24]^o[u>>>16&255]^r[d>>>8&255]^i[255&l]^n[p++];u=m,d=h,l=g,f=y}var v=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^n[p++],w=(s[d>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&u])^n[p++],k=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^n[p++],A=(s[f>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&l])^n[p++];e[t]=v,e[t+1]=w,e[t+2]=k,e[t+3]=A},t.createEncryptor=function(e,n){return new t(u(u({},n=void 0===n?{}:n),{key:e,transformMode:o.t.ENC_TRANSFORM_MODE}))},t.createDecryptor=function(e,n){return new t(u(u({},n=void 0===n?{}:n),{key:e,transformMode:o.t.DEC_TRANSFORM_MODE}))},t.encrypt=function(e,n,a){if("string"==typeof n)return i.E.encrypt(t,e,n,a);if(n.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return s.D.encrypt(t,e,n,a)},t.decrypt=function(e,n,a){if("string"==typeof n)return i.E.decrypt(t,e,n,a);if(n.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return s.D.decrypt(t,e,n,a)},t.keySize=8,t}(r.G)},3967:function(e,t,n){n.d(t,{CBCMAC:function(){return s}});var a=n(4768),o=n(3354),r=n(9691),i=n(3664);function s(e,t,n,s,c,u){var d=u&&u.Cipher?u.Cipher:r.AES,l="string"==typeof n?a.d.parse(n):n,f=s||new o.e([0,0]),p="string"==typeof t?a.d.parse(t):t,b="string"==typeof e?a.d.parse(e):e,m=c||16;return i.K.mac(d,l,f,p,b,m)}},9910:function(e,t,n){n.d(t,{DES:function(){return m}});var a,o=n(787),r=n(9456),i=n(5693),s=n(9109),c=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(){return(u=Object.assign||function(e){for(var t,n=1,a=arguments.length;n>>5]>>>31-a%32&1}for(var o=this.I=[],r=0;r<16;r++){var i=o[r]=[],s=f[r];for(n=0;n<24;n++)i[n/6|0]|=t[(l[n]-1+s)%28]<<31-n%6,i[4+(n/6|0)]|=t[28+(l[n+24]-1+s)%28]<<31-n%6;for(i[0]=i[0]<<1|i[0]>>>31,n=1;n<7;n++)i[n]=i[n]>>>4*(n-1)+3;i[7]=i[7]<<5|i[7]>>>27}for(this.U=[],n=0;n<16;n++)this.U[n]=o[15-n]},t.prototype.encryptBlock=function(e,t){this.R(e,t,this.I)},t.prototype.decryptBlock=function(e,t){this.R(e,t,this.U)},t.prototype.R=function(e,t,n){this.L=e[t],this.F=e[t+1],this.X(4,252645135),this.X(16,65535),this.Z(2,858993459),this.Z(8,16711935),this.X(1,1431655765);for(var a=0;a<16;a++){for(var o=n[a],r=this.L,i=this.F,s=0,c=0;c<8;c++){var u=(i^o[c])&b[c];s|=p[c][u>>>0]}this.L=i,this.F=r^s}var d=this.L;this.L=this.F,this.F=d,this.X(1,1431655765),this.Z(8,16711935),this.Z(2,858993459),this.X(16,65535),this.X(4,252645135),e[t]=this.L,e[t+1]=this.F},t.prototype.X=function(e,t){var n=(this.L>>>e^this.F)&t;this.F^=n,this.L^=n<>>e^this.L)&t;this.L^=n,this.F^=n<192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),a=e.length<6?e.slice(0,2):e.slice(4,6);return[s.DES.createEncryptor(new c.e(t)),s.DES.createEncryptor(new c.e(n)),s.DES.createEncryptor(new c.e(a))]},t.prototype.A=function(){var e=this.J();this.Y=e[0],this.$=e[1],this.nn=e[2]},t.prototype.encryptBlock=function(e,t){this.Y.encryptBlock(e,t),this.$.decryptBlock(e,t),this.nn.encryptBlock(e,t)},t.prototype.decryptBlock=function(e,t){this.nn.decryptBlock(e,t),this.$.encryptBlock(e,t),this.Y.decryptBlock(e,t)},t.createEncryptor=function(e,n){return new t(l(l({},n=void 0===n?{}:n),{key:e,transformMode:i.t.ENC_TRANSFORM_MODE}))},t.createDecryptor=function(e,n){return new t(l(l({},n=void 0===n?{}:n),{key:e,transformMode:i.t.DEC_TRANSFORM_MODE}))},t.encrypt=function(e,n,a){return"string"==typeof n?u.E.encrypt(t,e,n,a):o.D.encrypt(t,e,n,a)},t.decrypt=function(e,n,a){return"string"==typeof n?u.E.decrypt(t,e,n,a):o.D.decrypt(t,e,n,a)},t.keySize=6,t.ivSize=2,t}(r.G)},7753:function(e,t,n){n.d(t,{GMAC:function(){return s}});var a=n(4768),o=n(3354),r=n(9691),i=n(5607);function s(e,t,n,s,c){var u="string"==typeof e?a.d.parse(e):e,d=n||new o.e([0,0,0,0]),l=c&&c.Cipher?c.Cipher:r.AES,f="string"==typeof t?a.d.parse(t):t,p=s||16;return i.V.mac(l,f,d,u,void 0,p)}},6367:function(e,t,n){n.d(t,{Hmac:function(){return o}});var a=n(4768),o=function(){function e(e,t){this.tn=e,"string"==typeof t&&(t=a.d.parse(t));var n=e.blockSize,o=4*n;t.nSigBytes>o&&(t=e.finalize(t)),t.clamp();for(var r=this.rn=t.clone(),i=this.en=t.clone(),s=r.words,c=i.words,u=0;u>>32-r)+t}function u(e,t,n,a,o,r,i){var s=e+(t&a|n&~a)+o+i;return(s<>>32-r)+t}function d(e,t,n,a,o,r,i){var s=e+(t^n^a)+o+i;return(s<>>32-r)+t}function l(e,t,n,a,o,r,i){var s=e+(n^(t|~a))+o+i;return(s<>>32-r)+t}!function(){for(var e=0;e<64;e++)s[e]=4294967296*Math.abs(Math.sin(e+1))|0}();var f=function(e){function t(t){var n=e.call(this,t)||this;return n.on=new o.e([1732584193,4023233417,2562383102,271733878]),t&&void 0!==t.hash&&(n.on=t.hash.clone()),n}return i(t,e),t.prototype.A=function(){this.on=new o.e([1732584193,4023233417,2562383102,271733878])},t.prototype.un=function(e,t){for(var n=0;n<16;n++){var a=t+n,o=e[a];e[a]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var r=this.on.words,i=e[t],f=e[t+1],p=e[t+2],b=e[t+3],m=e[t+4],h=e[t+5],g=e[t+6],y=e[t+7],v=e[t+8],w=e[t+9],k=e[t+10],A=e[t+11],x=e[t+12],I=e[t+13],T=e[t+14],S=e[t+15],C=r[0],E=r[1],R=r[2],M=r[3];C=c(C,E,R,M,i,7,s[0]),M=c(M,C,E,R,f,12,s[1]),R=c(R,M,C,E,p,17,s[2]),E=c(E,R,M,C,b,22,s[3]),C=c(C,E,R,M,m,7,s[4]),M=c(M,C,E,R,h,12,s[5]),R=c(R,M,C,E,g,17,s[6]),E=c(E,R,M,C,y,22,s[7]),C=c(C,E,R,M,v,7,s[8]),M=c(M,C,E,R,w,12,s[9]),R=c(R,M,C,E,k,17,s[10]),E=c(E,R,M,C,A,22,s[11]),C=c(C,E,R,M,x,7,s[12]),M=c(M,C,E,R,I,12,s[13]),R=c(R,M,C,E,T,17,s[14]),C=u(C,E=c(E,R,M,C,S,22,s[15]),R,M,f,5,s[16]),M=u(M,C,E,R,g,9,s[17]),R=u(R,M,C,E,A,14,s[18]),E=u(E,R,M,C,i,20,s[19]),C=u(C,E,R,M,h,5,s[20]),M=u(M,C,E,R,k,9,s[21]),R=u(R,M,C,E,S,14,s[22]),E=u(E,R,M,C,m,20,s[23]),C=u(C,E,R,M,w,5,s[24]),M=u(M,C,E,R,T,9,s[25]),R=u(R,M,C,E,b,14,s[26]),E=u(E,R,M,C,v,20,s[27]),C=u(C,E,R,M,I,5,s[28]),M=u(M,C,E,R,p,9,s[29]),R=u(R,M,C,E,y,14,s[30]),C=d(C,E=u(E,R,M,C,x,20,s[31]),R,M,h,4,s[32]),M=d(M,C,E,R,v,11,s[33]),R=d(R,M,C,E,A,16,s[34]),E=d(E,R,M,C,T,23,s[35]),C=d(C,E,R,M,f,4,s[36]),M=d(M,C,E,R,m,11,s[37]),R=d(R,M,C,E,y,16,s[38]),E=d(E,R,M,C,k,23,s[39]),C=d(C,E,R,M,I,4,s[40]),M=d(M,C,E,R,i,11,s[41]),R=d(R,M,C,E,b,16,s[42]),E=d(E,R,M,C,g,23,s[43]),C=d(C,E,R,M,w,4,s[44]),M=d(M,C,E,R,x,11,s[45]),R=d(R,M,C,E,S,16,s[46]),C=l(C,E=d(E,R,M,C,p,23,s[47]),R,M,i,6,s[48]),M=l(M,C,E,R,y,10,s[49]),R=l(R,M,C,E,T,15,s[50]),E=l(E,R,M,C,h,21,s[51]),C=l(C,E,R,M,x,6,s[52]),M=l(M,C,E,R,b,10,s[53]),R=l(R,M,C,E,k,15,s[54]),E=l(E,R,M,C,f,21,s[55]),C=l(C,E,R,M,v,6,s[56]),M=l(M,C,E,R,S,10,s[57]),R=l(R,M,C,E,g,15,s[58]),E=l(E,R,M,C,I,21,s[59]),C=l(C,E,R,M,m,6,s[60]),M=l(M,C,E,R,A,10,s[61]),R=l(R,M,C,E,p,15,s[62]),E=l(E,R,M,C,w,21,s[63]),r[0]=r[0]+C|0,r[1]=r[1]+E|0,r[2]=r[2]+R|0,r[3]=r[3]+M|0},t.prototype.fn=function(){var e=this.cn,t=e.words,n=8*this.sn,a=8*e.nSigBytes;t[a>>>5]|=128<<24-a%32;var o=Math.floor(n/4294967296),r=n;t[15+(a+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t[14+(a+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.nSigBytes=4*(t.length+1),this.an();for(var i=this.on,s=i.words,c=0;c<4;c++){var u=s[c];s[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return i},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(e){return(new t).finalize(e)},t}(r.P)},4615:function(e,t,n){n.d(t,{RC4:function(){return u}});var a,o=n(30),r=n(5693),i=n(9109),s=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(){return(c=Object.assign||function(e){for(var t,n=1,a=arguments.length;n>>2]>>>24-r%4*8&255;o=(o+this.S[a]+i)%256;var s=this.S[a];this.S[a]=this.S[o],this.S[o]=s}this.i=this.j=0},t.prototype.un=function(e,t){e[t]^=this.generateKeyStreamWord()},t.prototype.generateKeyStreamWord=function(){for(var e=this.S,t=this.i,n=this.j,a=0,o=0;o<4;o++){n=(n+e[t=(t+1)%256])%256;var r=e[t];e[t]=e[n],e[n]=r,a|=e[(e[t]+e[n])%256]<<24-8*o}return this.i=t,this.j=n,a},t.createEncryptor=function(e,n){return new t(c(c({},n=void 0===n?{}:n),{key:e}))},t.createDecryptor=function(e,n){return new t(c(c({},n=void 0===n?{}:n),{key:e}))},t.encrypt=function(e,n,a){return"string"==typeof n?r.E.encrypt(t,e,n,a):i.D.encrypt(t,e,n,a)},t.decrypt=function(e,n,a){return"string"==typeof n?r.E.decrypt(t,e,n,a):i.D.decrypt(t,e,n,a)},t.ivSize=0,t.keySize=8,t}(o.q)},9639:function(e,t,n){n.d(t,{RC4Drop:function(){return u}});var a,o=n(5693),r=n(9109),i=n(4615),s=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(){return(c=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0;t--)this.generateKeyStreamWord()},t.createEncryptor=function(e,n){return new t(c(c({},n=void 0===n?{}:n),{key:e}))},t.createDecryptor=function(e,n){return new t(c(c({},n=void 0===n?{}:n),{key:e}))},t.encrypt=function(e,n,a){return"string"==typeof n?o.E.encrypt(t,e,n,a):r.D.encrypt(t,e,n,a)},t.decrypt=function(e,n,a){return"string"==typeof n?o.E.decrypt(t,e,n,a):r.D.decrypt(t,e,n,a)},t}(i.RC4)},7104:function(e,t,n){n.d(t,{RIPEMD160:function(){return v}});var a,o=n(1868),r=n(3354),i=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=new r.e([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=new r.e([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=new r.e([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=new r.e([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),l=new r.e([0,1518500249,1859775393,2400959708,2840853838]),f=new r.e([1352829926,1548603684,1836072691,2053994217,0]);function p(e,t,n){return e^t^n}function b(e,t,n){return e&t|~e&n}function m(e,t,n){return(e|~t)^n}function h(e,t,n){return e&n|t&~n}function g(e,t,n){return e^(t|~n)}function y(e,t){return e<>>32-t}var v=function(e){function t(t){var n=e.call(this,t)||this;return n.on=new r.e([1732584193,4023233417,2562383102,271733878,3285377520]),n.O=t,t&&void 0!==t.hash&&(n.on=t.hash.clone()),n}return i(t,e),t.prototype.A=function(){this.on=new r.e([1732584193,4023233417,2562383102,271733878,3285377520])},t.prototype.un=function(e,t){for(var n=0;n<16;n++){var a=t+n,o=e[a];e[a]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var r,i,v,w,k,A,x,I,T,S,C,E=this.on.words,R=l.words,M=f.words,P=s.words,U=c.words,_=u.words,B=d.words;for(A=r=E[0],x=i=E[1],I=v=E[2],T=w=E[3],S=k=E[4],n=0;n<80;n+=1)C=r+e[t+P[n]]|0,C+=n<16?p(i,v,w)+R[0]:n<32?b(i,v,w)+R[1]:n<48?m(i,v,w)+R[2]:n<64?h(i,v,w)+R[3]:g(i,v,w)+R[4],C=(C=y(C|=0,_[n]))+k|0,r=k,k=w,w=y(v,10),v=i,i=C,C=A+e[t+U[n]]|0,C+=n<16?g(x,I,T)+M[0]:n<32?h(x,I,T)+M[1]:n<48?m(x,I,T)+M[2]:n<64?b(x,I,T)+M[3]:p(x,I,T)+M[4],C=(C=y(C|=0,B[n]))+S|0,A=S,S=T,T=y(I,10),I=x,x=C;C=E[1]+v+T|0,E[1]=E[2]+w+S|0,E[2]=E[3]+k+A|0,E[3]=E[4]+r+x|0,E[4]=E[0]+i+I|0,E[0]=C},t.prototype.fn=function(){var e=this.cn,t=e.words,n=8*this.sn,a=8*e.nSigBytes;t[a>>>5]|=128<<24-a%32,t[14+(a+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.nSigBytes=4*(t.length+1),this.an();for(var o=this.on,r=o.words,i=0;i<5;i++){var s=r[i];r[i]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(e,n){return new t(n).finalize(e)},t}(o.P)},5187:function(e,t,n){n.d(t,{Rabbit:function(){return u}});var a,o=n(30),r=n(5693),i=n(9109),s=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(){return(c=Object.assign||function(e){for(var t,n=1,a=arguments.length;n>>24)|4278255360&(e[n]<<24|e[n]>>>8);var a=this.hn=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this.vn=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this.wn=0,n=0;n<4;n++)this.nextState();for(n=0;n<8;n++)o[n]^=a[n+4&7];if(t){var r=t.words,i=r[0],s=r[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=c>>>16|4294901760&u,l=u<<16|65535&c;for(o[0]^=c,o[1]^=d,o[2]^=u,o[3]^=l,o[4]^=c,o[5]^=d,o[6]^=u,o[7]^=l,n=0;n<4;n++)this.nextState()}},t.prototype.un=function(e,t){var n=this.hn;this.nextState(),this.S[0]=n[0]^n[5]>>>16^n[3]<<16,this.S[1]=n[2]^n[7]>>>16^n[5]<<16,this.S[2]=n[4]^n[1]>>>16^n[7]<<16,this.S[3]=n[6]^n[3]>>>16^n[1]<<16;for(var a=0;a<4;a++)this.S[a]=16711935&(this.S[a]<<8|this.S[a]>>>24)|4278255360&(this.S[a]<<24|this.S[a]>>>8),e[t+a]^=this.S[a]},t.prototype.nextState=function(){for(var e=this.hn,t=this.vn,n=0;n<8;n++)this.C[n]=t[n];for(t[0]=t[0]+1295307597+this.wn|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this.wn=t[7]>>>0>>0?1:0,n=0;n<8;n++){var a=e[n]+t[n],o=65535&a,r=a>>>16,i=((o*o>>>17)+o*r>>>15)+r*r,s=((4294901760&a)*a|0)+((65535&a)*a|0);this.G[n]=i^s}var c=this.G;e[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,e[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,e[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,e[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,e[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,e[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,e[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,e[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0},t.createEncryptor=function(e,n){return new t(c(c({},n=void 0===n?{}:n),{key:e}))},t.createDecryptor=function(e,n){return new t(c(c({},n=void 0===n?{}:n),{key:e}))},t.encrypt=function(e,n,a){return"string"==typeof n?r.E.encrypt(t,e,n,a):i.D.encrypt(t,e,n,a)},t.decrypt=function(e,n,a){return"string"==typeof n?r.E.decrypt(t,e,n,a):i.D.decrypt(t,e,n,a)},t.ivSize=4,t}(o.q)},3173:function(e,t,n){n.d(t,{SHA1:function(){return c}});var a,o=n(1868),r=n(3354),i=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=[],c=function(e){function t(t){var n=e.call(this,t)||this;return n.on=new r.e([1732584193,4023233417,2562383102,271733878,3285377520]),n.O=t,t&&void 0!==t.hash&&(n.on=t.hash.clone()),n}return i(t,e),t.prototype.A=function(){this.on=new r.e([1732584193,4023233417,2562383102,271733878,3285377520])},t.prototype.un=function(e,t){for(var n=this.on.words,a=n[0],o=n[1],r=n[2],i=n[3],c=n[4],u=0;u<80;u++){if(u<16)s[u]=0|e[t+u];else{var d=s[u-3]^s[u-8]^s[u-14]^s[u-16];s[u]=d<<1|d>>>31}var l=(a<<5|a>>>27)+c+s[u];l+=u<20?1518500249+(o&r|~o&i):u<40?1859775393+(o^r^i):u<60?(o&r|o&i|r&i)-1894007588:(o^r^i)-899497514,c=i,i=r,r=o<<30|o>>>2,o=a,a=l}n[0]=n[0]+a|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+i|0,n[4]=n[4]+c|0},t.prototype.fn=function(){var e=this.cn.words,t=8*this.sn,n=8*this.cn.nSigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(t/4294967296),e[15+(n+64>>>9<<4)]=t,this.cn.nSigBytes=4*e.length,this.an(),this.on},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(e,n){return new t(n).finalize(e)},t}(o.P)},766:function(e,t,n){n.d(t,{SHA224:function(){return s}});var a,o=n(3354),r=n(5561),i=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e){function t(t){var n=e.call(this,t)||this;return n.on=new o.e([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),n.O=t,t&&void 0!==t.hash&&(n.on=t.hash.clone()),n}return i(t,e),t.prototype.A=function(){this.on=new o.e([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},t.prototype.fn=function(){var t=e.prototype.fn.call(this);return t.nSigBytes-=4,t},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(e,n){return new t(n).finalize(e)},t}(r.SHA256)},5561:function(e,t,n){n.d(t,{SHA256:function(){return f}});var a,o=n(1868),r=n(3354),i=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=[],c=[];function u(e){for(var t=Math.sqrt(e),n=2;n<=t;n++)if(!(e%n))return!1;return!0}function d(e){return 4294967296*(e-(0|e))|0}!function(){for(var e=2,t=0;t<64;)u(e)&&(t<8&&(s[t]=d(Math.pow(e,.5))),c[t]=d(Math.pow(e,1/3)),t++),e++}();var l=[],f=function(e){function t(t){var n=e.call(this,t)||this;return n.on=new r.e(s.slice(0)),n.O=t,t&&void 0!==t.hash&&(n.on=t.hash.clone()),n}return i(t,e),t.prototype.A=function(){this.on=new r.e(s.slice(0))},t.prototype.un=function(e,t){for(var n=this.on.words,a=n[0],o=n[1],r=n[2],i=n[3],s=n[4],u=n[5],d=n[6],f=n[7],p=0;p<64;p++){if(p<16)l[p]=0|e[t+p];else{var b=l[p-15],m=(b<<25|b>>>7)^(b<<14|b>>>18)^b>>>3,h=l[p-2],g=(h<<15|h>>>17)^(h<<13|h>>>19)^h>>>10;l[p]=m+l[p-7]+g+l[p-16]}var y=a&o^a&r^o&r,v=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),w=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&d)+c[p]+l[p];f=d,d=u,u=s,s=i+w|0,i=r,r=o,o=a,a=w+(v+y)|0}n[0]=n[0]+a|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0},t.prototype.fn=function(){var e=this.cn.words,t=8*this.sn,n=8*this.cn.nSigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(t/4294967296),e[15+(n+64>>>9<<4)]=t,this.cn.nSigBytes=4*e.length,this.an(),this.on},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(e,n){return new t(n).finalize(e)},t}(o.P)},3408:function(e,t,n){n.d(t,{SHA3:function(){return f}});var a,o=n(6957),r=n(1868),i=n(3354),s=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=[],u=[],d=[];!function(){for(var e=1,t=0,n=0;n<24;n++){c[e+5*t]=(n+1)*(n+2)/2%64;var a=(2*e+3*t)%5;e=t%5,t=a}for(var r=0;r<5;r++)for(var i=0;i<5;i++)u[r+5*i]=i+(2*r+3*i)%5*5;for(var s=1,l=0;l<24;l++){for(var f=0,p=0,b=0;b<7;b++){if(1&s){var m=(1<>>24)|4278255360&(r<<24|r>>>8),i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),n[o].high^=i,n[o].low^=r}for(var s=0;s<24;s++){for(var f=0;f<5;f++){for(var p=0,b=0,m=0;m<5;m++)p^=(E=n[f+5*m]).high,b^=E.low;var h=l[f];h.high=p,h.low=b}for(f=0;f<5;f++){var g=l[(f+4)%5],y=l[(f+1)%5],v=y.high,w=y.low;for(p=g.high^(v<<1|w>>>31),b=g.low^(w<<1|v>>>31),m=0;m<5;m++)(E=n[f+5*m]).high^=p,E.low^=b}for(var k=1;k<25;k++){p=void 0,b=void 0;var A=n[k].high,x=n[k].low,I=c[k];I<32?(p=A<>>32-I,b=x<>>32-I):(p=x<>>64-I,b=A<>>64-I);var T=l[u[k]];T.high=p,T.low=b}var S=l[0],C=n[0];for(S.high=C.high,S.low=C.low,f=0;f<5;f++)for(m=0;m<5;m++){var E=n[k=f+5*m],R=l[k],M=l[(f+1)%5+5*m],P=l[(f+2)%5+5*m];E.high=R.high^~M.high&P.high,E.low=R.low^~M.low&P.low}var U=n[0],_=d[s];U.high^=_.high,U.low^=_.low}},t.prototype.fn=function(){var e=this.cn,t=e.words,n=8*e.nSigBytes,a=32*this.blockSize;t[n>>>5]|=1<<24-n%32,t[(Math.ceil((n+1)/a)*a>>>5)-1]|=128,e.nSigBytes=4*t.length,this.an();for(var o=this.bn,r=this.dn/8,s=r/8,c=[],u=0;u>>24)|4278255360&(l<<24|l>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(l)}return new i.e(c,r)},t.prototype.clone=function(){return new t({outputLength:this.dn,state:this.bn,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(e,n){return new t(n).finalize(e)},t}(r.P)},6324:function(e,t,n){n.d(t,{SHA384:function(){return s}});var a,o=n(6957),r=n(7491),i=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e){function t(t){var n=e.call(this,t)||this;return n.on=new o.m([new o.r(3418070365,3238371032),new o.r(1654270250,914150663),new o.r(2438529370,812702999),new o.r(355462360,4144912697),new o.r(1731405415,4290775857),new o.r(2394180231,1750603025),new o.r(3675008525,1694076839),new o.r(1203062813,3204075428)]),n.O=t,t&&void 0!==t.hash&&(n.on=t.hash.clone()),n}return i(t,e),t.prototype.A=function(){this.on=new o.m([new o.r(3418070365,3238371032),new o.r(1654270250,914150663),new o.r(2438529370,812702999),new o.r(355462360,4144912697),new o.r(1731405415,4290775857),new o.r(2394180231,1750603025),new o.r(3675008525,1694076839),new o.r(1203062813,3204075428)])},t.prototype.fn=function(){var t=e.prototype.fn.call(this);return t.nSigBytes-=16,t},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(e,n){return new t(n).finalize(e)},t}(r.SHA512)},7491:function(e,t,n){n.d(t,{SHA512:function(){return u}});var a,o=n(1868),r=n(6957),i=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=[new r.r(1116352408,3609767458),new r.r(1899447441,602891725),new r.r(3049323471,3964484399),new r.r(3921009573,2173295548),new r.r(961987163,4081628472),new r.r(1508970993,3053834265),new r.r(2453635748,2937671579),new r.r(2870763221,3664609560),new r.r(3624381080,2734883394),new r.r(310598401,1164996542),new r.r(607225278,1323610764),new r.r(1426881987,3590304994),new r.r(1925078388,4068182383),new r.r(2162078206,991336113),new r.r(2614888103,633803317),new r.r(3248222580,3479774868),new r.r(3835390401,2666613458),new r.r(4022224774,944711139),new r.r(264347078,2341262773),new r.r(604807628,2007800933),new r.r(770255983,1495990901),new r.r(1249150122,1856431235),new r.r(1555081692,3175218132),new r.r(1996064986,2198950837),new r.r(2554220882,3999719339),new r.r(2821834349,766784016),new r.r(2952996808,2566594879),new r.r(3210313671,3203337956),new r.r(3336571891,1034457026),new r.r(3584528711,2466948901),new r.r(113926993,3758326383),new r.r(338241895,168717936),new r.r(666307205,1188179964),new r.r(773529912,1546045734),new r.r(1294757372,1522805485),new r.r(1396182291,2643833823),new r.r(1695183700,2343527390),new r.r(1986661051,1014477480),new r.r(2177026350,1206759142),new r.r(2456956037,344077627),new r.r(2730485921,1290863460),new r.r(2820302411,3158454273),new r.r(3259730800,3505952657),new r.r(3345764771,106217008),new r.r(3516065817,3606008344),new r.r(3600352804,1432725776),new r.r(4094571909,1467031594),new r.r(275423344,851169720),new r.r(430227734,3100823752),new r.r(506948616,1363258195),new r.r(659060556,3750685593),new r.r(883997877,3785050280),new r.r(958139571,3318307427),new r.r(1322822218,3812723403),new r.r(1537002063,2003034995),new r.r(1747873779,3602036899),new r.r(1955562222,1575990012),new r.r(2024104815,1125592928),new r.r(2227730452,2716904306),new r.r(2361852424,442776044),new r.r(2428436474,593698344),new r.r(2756734187,3733110249),new r.r(3204031479,2999351573),new r.r(3329325298,3815920427),new r.r(3391569614,3928383900),new r.r(3515267271,566280711),new r.r(3940187606,3454069534),new r.r(4118630271,4000239992),new r.r(116418474,1914138554),new r.r(174292421,2731055270),new r.r(289380356,3203993006),new r.r(460393269,320620315),new r.r(685471733,587496836),new r.r(852142971,1086792851),new r.r(1017036298,365543100),new r.r(1126000580,2618297676),new r.r(1288033470,3409855158),new r.r(1501505948,4234509866),new r.r(1607167915,987167468),new r.r(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=new r.r(0,0)}();var u=function(e){function t(t){var n=e.call(this,t)||this;return n.N=32,n.on=new r.m([new r.r(1779033703,4089235720),new r.r(3144134277,2227873595),new r.r(1013904242,4271175723),new r.r(2773480762,1595750129),new r.r(1359893119,2917565137),new r.r(2600822924,725511199),new r.r(528734635,4215389547),new r.r(1541459225,327033209)]),n.O=t,t&&void 0!==t.hash&&(n.on=t.hash.clone()),n}return i(t,e),t.prototype.A=function(){this.on=new r.m([new r.r(1779033703,4089235720),new r.r(3144134277,2227873595),new r.r(1013904242,4271175723),new r.r(2773480762,1595750129),new r.r(1359893119,2917565137),new r.r(2600822924,725511199),new r.r(528734635,4215389547),new r.r(1541459225,327033209)])},t.prototype.un=function(e,t){for(var n=this.on.words,a=n[0],o=n[1],r=n[2],i=n[3],u=n[4],d=n[5],l=n[6],f=n[7],p=a.high,b=a.low,m=o.high,h=o.low,g=r.high,y=r.low,v=i.high,w=i.low,k=u.high,A=u.low,x=d.high,I=d.low,T=l.high,S=l.low,C=f.high,E=f.low,R=p,M=b,P=m,U=h,_=g,B=y,D=v,N=w,O=k,F=A,L=x,j=I,H=T,G=S,z=C,K=E,W=0;W<80;W++){var Z=void 0,V=void 0,q=c[W];if(W<16)V=q.high=0|e[t+2*W],Z=q.low=0|e[t+2*W+1];else{var Q=c[W-15],J=Q.high,Y=Q.low,X=(J>>>1|Y<<31)^(J>>>8|Y<<24)^J>>>7,$=(Y>>>1|J<<31)^(Y>>>8|J<<24)^(Y>>>7|J<<25),ee=c[W-2],te=ee.high,ne=ee.low,ae=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,oe=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),re=c[W-7],ie=re.high,se=re.low,ce=c[W-16],ue=ce.high,de=ce.low;V=(V=(V=X+ie+((Z=$+se)>>>0<$>>>0?1:0))+ae+((Z+=oe)>>>0>>0?1:0))+ue+((Z+=de)>>>0>>0?1:0),q.high=V,q.low=Z}var le=O&L^~O&H,fe=F&j^~F&G,pe=R&P^R&_^P&_,be=M&U^M&B^U&B,me=(R>>>28|M<<4)^(R<<30|M>>>2)^(R<<25|M>>>7),he=(M>>>28|R<<4)^(M<<30|R>>>2)^(M<<25|R>>>7),ge=(O>>>14|F<<18)^(O>>>18|F<<14)^(O<<23|F>>>9),ye=(F>>>14|O<<18)^(F>>>18|O<<14)^(F<<23|O>>>9),ve=s[W],we=ve.high,ke=ve.low,Ae=K+ye,xe=z+ge+(Ae>>>0>>0?1:0),Ie=he+be;z=H,K=G,H=L,G=j,L=O,j=F,O=D+(xe=(xe=(xe=xe+le+((Ae+=fe)>>>0>>0?1:0))+we+((Ae+=ke)>>>0>>0?1:0))+V+((Ae+=Z)>>>0>>0?1:0))+((F=N+Ae|0)>>>0>>0?1:0)|0,D=_,N=B,_=P,B=U,P=R,U=M,R=xe+(me+pe+(Ie>>>0>>0?1:0))+((M=Ae+Ie|0)>>>0>>0?1:0)|0}b=a.low=b+M,a.high=p+R+(b>>>0>>0?1:0),h=o.low=h+U,o.high=m+P+(h>>>0>>0?1:0),y=r.low=y+B,r.high=g+_+(y>>>0>>0?1:0),w=i.low=w+N,i.high=v+D+(w>>>0>>0?1:0),A=u.low=A+F,u.high=k+O+(A>>>0>>0?1:0),I=d.low=I+j,d.high=x+L+(I>>>0>>0?1:0),S=l.low=S+G,l.high=T+H+(S>>>0>>0?1:0),E=f.low=E+K,f.high=C+z+(E>>>0>>0?1:0)},t.prototype.fn=function(){var e=this.cn,t=e.words,n=8*this.sn,a=8*e.nSigBytes;return t[a>>>5]|=128<<24-a%32,t[30+(a+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(a+128>>>10<<5)]=n,e.nSigBytes=4*t.length,this.an(),this.on.to32()},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(e,n){return new t(n).finalize(e)},t}(o.P)},3354:function(e,t,n){n.d(t,{e:function(){return r}});var a=n(5720),o=n(9054),r=function(){function e(t,n){if(Array.isArray(t)||!t)return this.yn=Array.isArray(t)?t:[],void(this.pn="number"==typeof n?n:4*this.yn.length);if(t instanceof e)return this.yn=t.words.slice(),void(this.pn=t.nSigBytes);var a;try{t instanceof ArrayBuffer?a=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(a=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(e){throw new Error("Invalid argument")}if(!a)throw new Error("Invalid argument");for(var o=a.byteLength,r=[],i=0;i>>2]|=a[i]<<24-i%4*8;this.yn=r,this.pn=o}return Object.defineProperty(e.prototype,"nSigBytes",{get:function(){return this.pn},set:function(e){this.pn=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"words",{get:function(){return this.yn},enumerable:!1,configurable:!0}),e.prototype.toString=function(e){return e?e.stringify(this):a.p.stringify(this)},e.prototype.toUint8Array=function(){for(var e=this.yn,t=this.pn,n=new Uint8Array(t),a=0;a>>2]>>>24-a%4*8&255;return n},e.prototype.concat=function(e){var t=e.words.slice(),n=e.nSigBytes;if(this.clamp(),this.pn%4)for(var a=0;a>>2]>>>24-a%4*8&255;this.yn[this.pn+a>>>2]|=o<<24-(this.pn+a)%4*8}else for(a=0;a>>2]=t[a>>>2];return this.pn+=n,this},e.prototype.clamp=function(){var e=this.pn;this.yn[e>>>2]&=4294967295<<32-e%4*8,this.yn.length=Math.ceil(e/4)},e.prototype.clone=function(){return new e(this.yn.slice(),this.pn)},e.random=function(t){for(var n=[],a=0;a0&&o.push(0),e.concat(new a.e(o,n))}}function r(e,t){return new a.e(e.words.slice(),t)}function i(e,t){for(var n=e.nSigBytes-t,o=[],r=0;r>>2,s=n+r,c=s>>>2,u=e.words[c]>>>24-s%4*8&255;o[i]=0|o[i]|u<<24-r%4*8}var d=new a.e(o,t);return d.clamp(),d}},7919:function(e,t,n){n.d(t,{l:function(){return o}});var a=n(3354),o={pad:function(e,t){for(var n=4*t,o=n-e.nSigBytes%n,r=o<<24|o<<16|o<<8|o,i=[],s=0;s>>2];e.nSigBytes-=t}}},1756:function(e,t,n){n.d(t,{w:function(){return i}});var a,o="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",r=(a=parseInt((/msie (\d+)/.exec(o)||[])[1],10),isNaN(a)?(a=parseInt((/trident\/.*; rv:(\d+)/.exec(o)||[])[1],10),!isNaN(a)&&a):a);function i(e,t){return!1!==r&&(!t||("<"===e?r"===e?r>t:">="===e?r>=t:r===t))}},1773:function(e,t,n){n.d(t,{D:function(){return s}});for(var a=n(3354),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=[],i=0;i>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,s=0;s<4&&r+.75*s>>6*(3-s)&63));var c=o.charAt(64);if(c)for(;a.length%4;)a.push(c);return a.join("")},parse:function(e){var t=e.length,n=o.charAt(64);if(n){var i=e.indexOf(n);-1!==i&&(t=i)}for(var s=[],c=0,u=0;u>>6-u%4*2;s[c>>>2]|=d<<24-c%4*8,c++}return new a.e(s,c)}}},5720:function(e,t,n){n.d(t,{p:function(){return o}});var a=n(3354),o={stringify:function(e){for(var t=e.nSigBytes,n=e.words,a=[],o=0;o>>2]>>>24-o%4*8&255;a.push((r>>>4).toString(16)),a.push((15&r).toString(16))}return a.join("")},parse:function(e){var t=e.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(e))throw new Error("Invalid Hex string: "+e);for(var n=[],o=0;o>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new a.e(n,t/2)}}},8702:function(e,t,n){n.d(t,{m:function(){return o}});var a=n(3354),o={stringify:function(e){for(var t=e.nSigBytes,n=e.words,a=[],o=0;o>>2]>>>24-o%4*8&255;a.push(String.fromCharCode(r))}return a.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new a.e(n,t)}}},4768:function(e,t,n){n.d(t,{d:function(){return o}});var a=n(8702),o={stringify:function(e){try{return decodeURIComponent(escape(a.m.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return a.m.parse(unescape(encodeURIComponent(e)))}}},2688:function(e,t,n){n.d(t,{Base64:function(){return r.D},EvpKDF:function(){return v},Hex:function(){return c.p},Latin1:function(){return s.m},OpenSSLKDF:function(){return b.s},PBKDF2:function(){return m.E},Utf16:function(){return p},Utf16BE:function(){return u},Utf16LE:function(){return f},Utf8:function(){return i.d},Word32Array:function(){return a.e},Word64:function(){return o.r},Word64Array:function(){return o.m}}),n(9054);var a=n(3354),o=n(6957),r=(n(1756),n(1773)),i=n(4768),s=n(8702),c=n(5720),u={stringify:function(e){for(var t=e.words,n=e.nSigBytes,a=[],o=0;o>>2]>>>16-o%4*8&65535;a.push(String.fromCharCode(r))}return a.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>1]|=e.charCodeAt(o)<<16-o%2*16;return new a.e(n,2*t)}};function d(e){return e<<8&4278255360|e>>>8&16711935}var l,f={stringify:function(e){for(var t=e.words,n=e.nSigBytes,a=[],o=0;o>>2]>>>16-o%4*8&65535);a.push(String.fromCharCode(r))}return a.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>1]|=d(e.charCodeAt(o)<<16-o%2*16);return new a.e(n,2*t)}},p=u,b=n(2214),m=n(7008),h=n(670),g=n(9541),y=(l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),v=function(e){function t(t){var n=e.call(this,t)||this;return n.Sn=4,n.Mn=h.MD5,n.kn=1,t&&(n.Sn=void 0!==t.keySize?t.keySize:n.Sn,n.Mn=void 0!==t.Hasher?t.Hasher:n.Mn,n.kn=void 0!==t.iterations?t.iterations:n.kn),n}return y(t,e),t.prototype.compute=function(e,t){for(var n,o=new this.Mn,r=new a.e,i=r.words,s=this.Sn,c=this.kn;i.length13||o.nSigBytes<7))throw new Error("Byte size of iv must be between 7 and 13");return n.Nn=o||new r.e([0,0],8),n.In=15-n.Nn.nSigBytes,n}return s(t,e),t.getB0=function(e,t,n,a){if(n.nSigBytes+a.nSigBytes!==15)throw new Error("LEN(Q)+LEN(N) must be 15");var o=255&(0|(e?1:0)<<6|(t-2)/2<<3|n.nSigBytes-1),i=a.clone().concat(n);return new r.e([o<<24],1).concat(i)},t.formatAssociatedDataAndPayload=function(e,t){var n,a=e.nSigBytes;if(0===a)n=new r.e([0],0);else if(a4?(o.concat(new r.e([0],e%4)),o.concat(new r.e([n],4))):o.concat(new r.e([n<<32-8*e],e)):o.concat(new r.e([n],4)),a.concat(t).concat(o)},t.mac=function(e,n,a,o,s,c){var u=new e({key:n,iv:a});if(4!==u.blockSize)throw new Error("In CCM, cipher block size must be 128bit");if(a&&(a.nSigBytes>13||a.nSigBytes<7))throw new Error("Byte size of iv must be between 7 and 13");var d=a||new r.e([0,0],8),l=(null==o?void 0:o.clone())||new r.e,f=l.nSigBytes,p=(null==s?void 0:s.clone())||new r.e,b=p.nSigBytes;if(b>>>0>4294967295)throw new Error("Byte length of Payload(plainText) larger than 2^32-1 (4,294,967,295byte) is not supported at this time.");var m=15-d.nSigBytes,h=(0,i.ur)(new r.e([0,b],8),m),g=c||16,y=t.getB0(Boolean(f),g,h,d),v=t.formatAssociatedDataAndPayload(l,p),w=y.words.slice();u.encryptBlock(w,0);for(var k=v.nSigBytes/16,A=v.words,x=w,I=0;I0?4-n.length%4:0,r=n.slice(),i=0;i>>0,a=n+1>>>0>>0,r=o+1>>>0>>5]>>>31-r%32&1)>0&&(a[0]=a[0]^o[0],a[1]=a[1]^o[1],a[2]=a[2]^o[2],a[3]=a[3]^o[3]);var i=(1&o[3])>>>0,s=(1&o[0])>>>0,c=(1&o[1])>>>0,u=(1&o[2])>>>0;o[0]=o[0]>>>1,o[1]=o[1]>>>1|(s?2147483648:0),o[2]=o[2]>>>1|(c?2147483648:0),o[3]=o[3]>>>1|(u?2147483648:0),i>0&&(o[0]^=n[0],o[1]^=n[1],o[2]^=n[2],o[3]^=n[3])}return a},t.GHASH=function(e,n){if(e.length%4!=0)throw new Error("Length of 32bit word array 'H' must be multiple of 4(128bit)");if(n.length%4!=0)throw new Error("Length of 32bit word array 'X' must be multiple of 4(128bit)");for(var a=n.length,o=[0,0,0,0],r=0;r0){var x=o[4*c+v]<<32-8*A^s[c][v];g.push(x),y+=A}var I=new r.e(g,y);d.concat(I)}}return d.nSigBytes=a.nSigBytes,d.clamp(),d},t.mac=function(e,n,a,o,s,c){var u=new e({key:n,iv:a}),d=[0,0,0,0];u.encryptBlock(d,0);var l=t.getJ0(d,a.words),f=(null==o?void 0:o.clone())||new r.e,p=[0,8*f.nSigBytes],b=(null==s?void 0:s.clone())||new r.e,m=[0,8*b.nSigBytes],h=c||16;(0,i.I4)(f),(0,i.I4)(b);var g=f.words.concat(b.words).concat(p).concat(m),y=t.GHASH(d,g),v=t.GCTR(u,l,new r.e(y));return(0,i.z6)(v,h)},t.createEncryptor=function(e){return new t.Encryptor(e)},t.createDecryptor=function(e){return new t.Decryptor(e)},t.Encryptor=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return s(n,e),n.prototype.processBlock=function(e,n){var a=this.Hn.blockSize;this.Un=t.inc32(this.Un);for(var o=new r.e(e.slice(n,n+a)),i=t.GCTR(this.Hn,this.Un,o),s=0;s>>2]|=o<<24-r%4*8,e.nSigBytes+=o},unpad:function(e){var t=255&e.words[e.nSigBytes-1>>>2];e.nSigBytes-=t}},z=o(3354),K={pad:function(e,t){var n=4*t,a=n-e.nSigBytes%n;e.concat(z.e.random(a-1)).concat(new z.e([a<<24],1))},unpad:function(e){var t=255&e.words[e.nSigBytes-1>>>2];e.nSigBytes-=t}},W={pad:function(e,t){var n=4*t;e.clamp(),e.nSigBytes+=n-(e.nSigBytes%n||n)},unpad:function(e){for(var t=e.words,n=e.nSigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.nSigBytes=n+1;break}}},Z={pad:function(e,t){e.concat(new z.e([2147483648],1)),W.pad(e,t)},unpad:function(e){W.unpad(e),e.nSigBytes-=1}},V=o(7919),q={pad:function(e,t){},unpad:function(e){}},Q=o(1232),J={CBC:M.n,CFB:_,CTR:D,ECB:O,OFB:L,GCM:j.V,CCM:H.K},Y={AnsiX923:G,ISO10126:K,ISO97971:Z,Pkcs7:V.l,NoPadding:q,Zero:W},X={OpenSSLFormatter:Q.w}}(),r}()},85896:function(e,t,n){var a=n(7475).stringify,o=n(69221);e.exports=function(e){return{parse:o(e),stringify:a}},e.exports.parse=o(),e.exports.stringify=a},69221:function(e,t,n){var a=null,o=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,r=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(void 0!==e&&null!==e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,"undefined"!==typeof e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error('Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed '.concat(e.constructorAction));t.constructorAction=e.constructorAction}if("undefined"!==typeof e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error('Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed '.concat(e.protoAction));t.protoAction=e.protoAction}}var i,s,c,u,d={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},l=function(e){throw{name:"SyntaxError",message:e,at:i,text:c}},f=function(e){return e&&e!==s&&l("Expected '"+e+"' instead of '"+s+"'"),s=c.charAt(i),i+=1,s},p=function(){var e,o="";for("-"===s&&(o="-",f("-"));s>="0"&&s<="9";)o+=s,f();if("."===s)for(o+=".";f()&&s>="0"&&s<="9";)o+=s;if("e"===s||"E"===s)for(o+=s,f(),"-"!==s&&"+"!==s||(o+=s,f());s>="0"&&s<="9";)o+=s,f();if(e=+o,isFinite(e))return null==a&&(a=n(59995)),o.length>15?t.storeAsString?o:t.useNativeBigInt?BigInt(o):new a(o):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new a(e):e;l("Bad number")},b=function(){var e,t,n,a="";if('"'===s)for(var o=i;f();){if('"'===s)return i-1>o&&(a+=c.substring(o,i-1)),f(),a;if("\\"===s){if(i-1>o&&(a+=c.substring(o,i-1)),f(),"u"===s){for(n=0,t=0;t<4&&(e=parseInt(f(),16),isFinite(e));t+=1)n=16*n+e;a+=String.fromCharCode(n)}else{if("string"!==typeof d[s])break;a+=d[s]}o=i}}l("Bad string")},m=function(){for(;s&&s<=" ";)f()},h=function(){var e=[];if("["===s){if(f("["),m(),"]"===s)return f("]"),e;for(;s;){if(e.push(u()),m(),"]"===s)return f("]"),e;f(","),m()}}l("Bad array")},g=function(){var e,n=Object.create(null);if("{"===s){if(f("{"),m(),"}"===s)return f("}"),n;for(;s;){if(e=b(),m(),f(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&l('Duplicate key "'+e+'"'),!0===o.test(e)?"error"===t.protoAction?l("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===r.test(e)?"error"===t.constructorAction?l("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),m(),"}"===s)return f("}"),n;f(","),m()}}l("Bad object")};return u=function(){switch(m(),s){case"{":return g();case"[":return h();case'"':return b();case"-":return p();default:return s>="0"&&s<="9"?p():function(){switch(s){case"t":return f("t"),f("r"),f("u"),f("e"),!0;case"f":return f("f"),f("a"),f("l"),f("s"),f("e"),!1;case"n":return f("n"),f("u"),f("l"),f("l"),null}l("Unexpected '"+s+"'")}()}},function(e,t){var n;return c=e+"",i=0,s=" ",n=u(),m(),s&&l("Syntax error"),"function"===typeof t?function e(n,a){var o,r=n[a];return r&&"object"===typeof r&&Object.keys(r).forEach((function(t){void 0!==(o=e(r,t))?r[t]=o:delete r[t]})),t.call(n,a,r)}({"":n},""):n}}},7475:function(e,t,n){var a=n(59995),o=e.exports;!function(){"use strict";var e,t,n,r=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(e){return r.lastIndex=0,r.test(e)?'"'+e.replace(r,(function(e){var t=i[e];return"string"===typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(o,r){var i,u,d,l,f,p=e,b=r[o],m=null!=b&&(b instanceof a||a.isBigNumber(b));switch(b&&"object"===typeof b&&"function"===typeof b.toJSON&&(b=b.toJSON(o)),"function"===typeof n&&(b=n.call(r,o,b)),typeof b){case"string":return m?b:s(b);case"number":return isFinite(b)?String(b):"null";case"boolean":case"null":case"bigint":return String(b);case"object":if(!b)return"null";if(e+=t,f=[],"[object Array]"===Object.prototype.toString.apply(b)){for(l=b.length,i=0;i>>31),b=f^(i<<1|r>>>31),m=e[0]^p,h=e[1]^b,g=e[10]^p,y=e[11]^b,v=e[20]^p,w=e[21]^b,k=e[30]^p,A=e[31]^b,x=e[40]^p,I=e[41]^b;p=a^(s<<1|c>>>31),b=o^(c<<1|s>>>31);var T=e[2]^p,S=e[3]^b,C=e[12]^p,E=e[13]^b,R=e[22]^p,M=e[23]^b,P=e[32]^p,U=e[33]^b,_=e[42]^p,B=e[43]^b;p=r^(u<<1|d>>>31),b=i^(d<<1|u>>>31);var D=e[4]^p,N=e[5]^b,O=e[14]^p,F=e[15]^b,L=e[24]^p,j=e[25]^b,H=e[34]^p,G=e[35]^b,z=e[44]^p,K=e[45]^b;p=s^(l<<1|f>>>31),b=c^(f<<1|l>>>31);var W=e[6]^p,Z=e[7]^b,V=e[16]^p,q=e[17]^b,Q=e[26]^p,J=e[27]^b,Y=e[36]^p,X=e[37]^b,$=e[46]^p,ee=e[47]^b;p=u^(a<<1|o>>>31),b=d^(o<<1|a>>>31);var te=e[8]^p,ne=e[9]^b,ae=e[18]^p,oe=e[19]^b,re=e[28]^p,ie=e[29]^b,se=e[38]^p,ce=e[39]^b,ue=e[48]^p,de=e[49]^b,le=m,fe=h,pe=y<<4|g>>>28,be=g<<4|y>>>28,me=v<<3|w>>>29,he=w<<3|v>>>29,ge=A<<9|k>>>23,ye=k<<9|A>>>23,ve=x<<18|I>>>14,we=I<<18|x>>>14,ke=T<<1|S>>>31,Ae=S<<1|T>>>31,xe=E<<12|C>>>20,Ie=C<<12|E>>>20,Te=R<<10|M>>>22,Se=M<<10|R>>>22,Ce=U<<13|P>>>19,Ee=P<<13|U>>>19,Re=_<<2|B>>>30,Me=B<<2|_>>>30,Pe=N<<30|D>>>2,Ue=D<<30|N>>>2,_e=O<<6|F>>>26,Be=F<<6|O>>>26,De=j<<11|L>>>21,Ne=L<<11|j>>>21,Oe=H<<15|G>>>17,Fe=G<<15|H>>>17,Le=K<<29|z>>>3,je=z<<29|K>>>3,He=W<<28|Z>>>4,Ge=Z<<28|W>>>4,ze=q<<23|V>>>9,Ke=V<<23|q>>>9,We=Q<<25|J>>>7,Ze=J<<25|Q>>>7,Ve=Y<<21|X>>>11,qe=X<<21|Y>>>11,Qe=ee<<24|$>>>8,Je=$<<24|ee>>>8,Ye=te<<27|ne>>>5,Xe=ne<<27|te>>>5,$e=ae<<20|oe>>>12,et=oe<<20|ae>>>12,tt=ie<<7|re>>>25,nt=re<<7|ie>>>25,at=se<<8|ce>>>24,ot=ce<<8|se>>>24,rt=ue<<14|de>>>18,it=de<<14|ue>>>18;e[0]=le^~xe&De,e[1]=fe^~Ie&Ne,e[10]=He^~$e&me,e[11]=Ge^~et&he,e[20]=ke^~_e&We,e[21]=Ae^~Be&Ze,e[30]=Ye^~pe&Te,e[31]=Xe^~be&Se,e[40]=Pe^~ze&tt,e[41]=Ue^~Ke&nt,e[2]=xe^~De&Ve,e[3]=Ie^~Ne&qe,e[12]=$e^~me&Ce,e[13]=et^~he&Ee,e[22]=_e^~We&at,e[23]=Be^~Ze&ot,e[32]=pe^~Te&Oe,e[33]=be^~Se&Fe,e[42]=ze^~tt&ge,e[43]=Ke^~nt&ye,e[4]=De^~Ve&rt,e[5]=Ne^~qe&it,e[14]=me^~Ce&Le,e[15]=he^~Ee&je,e[24]=We^~at&ve,e[25]=Ze^~ot&we,e[34]=Te^~Oe&Qe,e[35]=Se^~Fe&Je,e[44]=tt^~ge&Re,e[45]=nt^~ye&Me,e[6]=Ve^~rt&le,e[7]=qe^~it&fe,e[16]=Ce^~Le&He,e[17]=Ee^~je&Ge,e[26]=at^~ve&ke,e[27]=ot^~we&Ae,e[36]=Oe^~Qe&Ye,e[37]=Fe^~Je&Xe,e[46]=ge^~Re&Pe,e[47]=ye^~Me&Ue,e[8]=rt^~le&xe,e[9]=it^~fe&Ie,e[18]=Le^~He&$e,e[19]=je^~Ge&et,e[28]=ve^~ke&_e,e[29]=we^~Ae&Be,e[38]=Qe^~Ye&pe,e[39]=Je^~Xe&be,e[48]=Re^~Pe&ze,e[49]=Me^~Ue&Ke,e[0]^=n[2*t],e[1]^=n[2*t+1]}}},12348:function(e,t,n){var a=n(54659).Buffer,o=n(93349);function r(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}r.prototype.initialize=function(e,t){for(var n=0;n<50;++n)this.state[n]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},r.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(o.p1600(this.state),this.count=0);return t},r.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=r},19868:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=a(n(43811)),r=a(n(54659)),i=a(n(52486)),s=r.default.Buffer;function c(e){return e=function(e){if(!s.isBuffer(e))if(Array.isArray(e))e=s.from(e);else if("string"===typeof e)e=function(e,t){if("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))return!1;if(t&&e.length!==2+2*t)return!1;return!0}(e)?s.from(u(function(e){if("string"!==typeof e)return e;return function(e){if("string"!==typeof e)throw new Error("value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}(e)?e.slice(2):e}(e)),"hex"):s.from(e);else if("number"===typeof e)e=function(e){var t=function(e){var t=e.toString(16);return"0x".concat(t)}(e);return s.from(u(t.slice(2)),"hex")}(e);else if(null===e||void 0===e)e=s.allocUnsafe(0);else if(o.default.isBN(e))e=e.toArrayLike(s);else{if(!e.toArray)throw new Error("invalid type");e=s.from(e.toArray())}return e}(e),(0,i.default)("keccak256").update(e).digest()}function u(e){if("string"!==typeof e)throw new Error("while padding to even, value must be string, is currently ".concat(typeof e,", while padToEven."));return e.length%2&&(e="0".concat(e)),e}"undefined"!==typeof window&&(window.keccak256=c),e.exports=c},69522:function(e,t,n){var a,o,r;!function(i){var s="object"==typeof i.sodium&&"function"==typeof i.sodium.onload?i.sodium.onload:null;o=[t,n(12759)],a=function(e,t){"use strict";var n,a="uint8array",o=t.ready.then((function(){function a(){if(0!==n._sodium_init())throw new Error("libsodium was not correctly initialized.");for(var t=["crypto_aead_chacha20poly1305_decrypt","crypto_aead_chacha20poly1305_decrypt_detached","crypto_aead_chacha20poly1305_encrypt","crypto_aead_chacha20poly1305_encrypt_detached","crypto_aead_chacha20poly1305_ietf_decrypt","crypto_aead_chacha20poly1305_ietf_decrypt_detached","crypto_aead_chacha20poly1305_ietf_encrypt","crypto_aead_chacha20poly1305_ietf_encrypt_detached","crypto_aead_chacha20poly1305_ietf_keygen","crypto_aead_chacha20poly1305_keygen","crypto_aead_xchacha20poly1305_ietf_decrypt","crypto_aead_xchacha20poly1305_ietf_decrypt_detached","crypto_aead_xchacha20poly1305_ietf_encrypt","crypto_aead_xchacha20poly1305_ietf_encrypt_detached","crypto_aead_xchacha20poly1305_ietf_keygen","crypto_auth","crypto_auth_hmacsha256","crypto_auth_hmacsha256_final","crypto_auth_hmacsha256_init","crypto_auth_hmacsha256_keygen","crypto_auth_hmacsha256_update","crypto_auth_hmacsha256_verify","crypto_auth_hmacsha512","crypto_auth_hmacsha512_final","crypto_auth_hmacsha512_init","crypto_auth_hmacsha512_keygen","crypto_auth_hmacsha512_update","crypto_auth_hmacsha512_verify","crypto_auth_keygen","crypto_auth_verify","crypto_box_beforenm","crypto_box_curve25519xchacha20poly1305_keypair","crypto_box_curve25519xchacha20poly1305_seal","crypto_box_curve25519xchacha20poly1305_seal_open","crypto_box_detached","crypto_box_easy","crypto_box_easy_afternm","crypto_box_keypair","crypto_box_open_detached","crypto_box_open_easy","crypto_box_open_easy_afternm","crypto_box_seal","crypto_box_seal_open","crypto_box_seed_keypair","crypto_core_ed25519_add","crypto_core_ed25519_from_hash","crypto_core_ed25519_from_uniform","crypto_core_ed25519_is_valid_point","crypto_core_ed25519_random","crypto_core_ed25519_scalar_add","crypto_core_ed25519_scalar_complement","crypto_core_ed25519_scalar_invert","crypto_core_ed25519_scalar_mul","crypto_core_ed25519_scalar_negate","crypto_core_ed25519_scalar_random","crypto_core_ed25519_scalar_reduce","crypto_core_ed25519_scalar_sub","crypto_core_ed25519_sub","crypto_core_hchacha20","crypto_core_hsalsa20","crypto_core_ristretto255_add","crypto_core_ristretto255_from_hash","crypto_core_ristretto255_is_valid_point","crypto_core_ristretto255_random","crypto_core_ristretto255_scalar_add","crypto_core_ristretto255_scalar_complement","crypto_core_ristretto255_scalar_invert","crypto_core_ristretto255_scalar_mul","crypto_core_ristretto255_scalar_negate","crypto_core_ristretto255_scalar_random","crypto_core_ristretto255_scalar_reduce","crypto_core_ristretto255_scalar_sub","crypto_core_ristretto255_sub","crypto_generichash","crypto_generichash_blake2b_salt_personal","crypto_generichash_final","crypto_generichash_init","crypto_generichash_keygen","crypto_generichash_update","crypto_hash","crypto_hash_sha256","crypto_hash_sha256_final","crypto_hash_sha256_init","crypto_hash_sha256_update","crypto_hash_sha512","crypto_hash_sha512_final","crypto_hash_sha512_init","crypto_hash_sha512_update","crypto_kdf_derive_from_key","crypto_kdf_keygen","crypto_kx_client_session_keys","crypto_kx_keypair","crypto_kx_seed_keypair","crypto_kx_server_session_keys","crypto_onetimeauth","crypto_onetimeauth_final","crypto_onetimeauth_init","crypto_onetimeauth_keygen","crypto_onetimeauth_update","crypto_onetimeauth_verify","crypto_pwhash","crypto_pwhash_scryptsalsa208sha256","crypto_pwhash_scryptsalsa208sha256_ll","crypto_pwhash_scryptsalsa208sha256_str","crypto_pwhash_scryptsalsa208sha256_str_verify","crypto_pwhash_str","crypto_pwhash_str_needs_rehash","crypto_pwhash_str_verify","crypto_scalarmult","crypto_scalarmult_base","crypto_scalarmult_ed25519","crypto_scalarmult_ed25519_base","crypto_scalarmult_ed25519_base_noclamp","crypto_scalarmult_ed25519_noclamp","crypto_scalarmult_ristretto255","crypto_scalarmult_ristretto255_base","crypto_secretbox_detached","crypto_secretbox_easy","crypto_secretbox_keygen","crypto_secretbox_open_detached","crypto_secretbox_open_easy","crypto_secretstream_xchacha20poly1305_init_pull","crypto_secretstream_xchacha20poly1305_init_push","crypto_secretstream_xchacha20poly1305_keygen","crypto_secretstream_xchacha20poly1305_pull","crypto_secretstream_xchacha20poly1305_push","crypto_secretstream_xchacha20poly1305_rekey","crypto_shorthash","crypto_shorthash_keygen","crypto_shorthash_siphashx24","crypto_sign","crypto_sign_detached","crypto_sign_ed25519_pk_to_curve25519","crypto_sign_ed25519_sk_to_curve25519","crypto_sign_ed25519_sk_to_pk","crypto_sign_ed25519_sk_to_seed","crypto_sign_final_create","crypto_sign_final_verify","crypto_sign_init","crypto_sign_keypair","crypto_sign_open","crypto_sign_seed_keypair","crypto_sign_update","crypto_sign_verify_detached","crypto_stream_chacha20","crypto_stream_chacha20_ietf_xor","crypto_stream_chacha20_ietf_xor_ic","crypto_stream_chacha20_keygen","crypto_stream_chacha20_xor","crypto_stream_chacha20_xor_ic","crypto_stream_keygen","crypto_stream_xchacha20_keygen","crypto_stream_xchacha20_xor","crypto_stream_xchacha20_xor_ic","randombytes_buf","randombytes_buf_deterministic","randombytes_close","randombytes_random","randombytes_set_implementation","randombytes_stir","randombytes_uniform","sodium_version_string"],a=[A,x,I,T,S,C,E,R,M,P,U,_,B,D,N,O,F,L,j,H,G,z,K,W,Z,V,q,Q,J,Y,X,$,ee,te,ne,ae,oe,re,ie,se,ce,ue,de,le,fe,pe,be,me,he,ge,ye,ve,we,ke,Ae,xe,Ie,Te,Se,Ce,Ee,Re,Me,Pe,Ue,_e,Be,De,Ne,Oe,Fe,Le,je,He,Ge,ze,Ke,We,Ze,Ve,qe,Qe,Je,Ye,Xe,$e,et,tt,nt,at,ot,rt,it,st,ct,ut,dt,lt,ft,pt,bt,mt,ht,gt,yt,vt,wt,kt,At,xt,It,Tt,St,Ct,Et,Rt,Mt,Pt,Ut,_t,Bt,Dt,Nt,Ot,Ft,Lt,jt,Ht,Gt,zt,Kt,Wt,Zt,Vt,qt,Qt,Jt,Yt,Xt,$t,en,tn,nn,an,on,rn,sn,cn,un,dn,ln,fn,pn,bn,mn,hn,gn,yn,vn,wn,kn,An],o=0;o=240?(d=4,c=!0):l>=224?(d=3,c=!0):l>=192?(d=2,c=!0):l<128&&(d=1,c=!0)}while(!c);for(var f=d-(s.length-u),p=0;p>8&-39)<<8|87+(t=e[r]>>>4)+(t-10>>8&-39),o+=String.fromCharCode(255&a)+String.fromCharCode(a>>>8);return o}var c={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function u(e){if(null==e)return c.URLSAFE_NO_PADDING;if(e!==c.ORIGINAL&&e!==c.ORIGINAL_NO_PADDING&&e!==c.URLSAFE&&e!=c.URLSAFE_NO_PADDING)throw new Error("unsupported base64 variant");return e}function d(e,t){t=u(t),e=k(o,e,"input");var a,o=[],r=0|Math.floor(e.length/3),s=e.length-3*r,c=4*r+(0!==s?0==(2&t)?4:2+(s>>>1):0),d=new b(c+1),l=m(e);return o.push(l),o.push(d.address),0===n._sodium_bin2base64(d.address,d.length,l,e.length,t)&&y(o,"conversion failed"),d.length=c,a=i(d.to_Uint8Array()),g(o),a}function l(e,t){var n=t||a;if(!f(n))throw new Error(n+" output format is not available");if(e instanceof b){if("uint8array"===n)return e.to_Uint8Array();if("text"===n)return i(e.to_Uint8Array());if("hex"===n)return s(e.to_Uint8Array());if("base64"===n)return d(e.to_Uint8Array(),c.URLSAFE_NO_PADDING);throw new Error('What is output format "'+n+'"?')}if("object"==typeof e){for(var o=Object.keys(e),r={},u=0;u>>24>>>8,c,d);var A=l(h,i);return g(s),A}function at(e){var t=[];p(e);var a=new b(0|n._crypto_kdf_keybytes()),o=a.address;t.push(o),n._crypto_kdf_keygen(o);var r=l(a,e);return g(t),r}function ot(e,t,a,o){var r=[];p(o),e=k(r,e,"clientPublicKey");var i,s=0|n._crypto_kx_publickeybytes();e.length!==s&&v(r,"invalid clientPublicKey length"),i=m(e),r.push(i),t=k(r,t,"clientSecretKey");var c,u=0|n._crypto_kx_secretkeybytes();t.length!==u&&v(r,"invalid clientSecretKey length"),c=m(t),r.push(c),a=k(r,a,"serverPublicKey");var d,f=0|n._crypto_kx_publickeybytes();a.length!==f&&v(r,"invalid serverPublicKey length"),d=m(a),r.push(d);var h=new b(0|n._crypto_kx_sessionkeybytes()),w=h.address;r.push(w);var A=new b(0|n._crypto_kx_sessionkeybytes()),x=A.address;if(r.push(x),0==(0|n._crypto_kx_client_session_keys(w,x,i,c,d))){var I=l({sharedRx:h,sharedTx:A},o);return g(r),I}y(r,"invalid usage")}function rt(e){var t=[];p(e);var a=new b(0|n._crypto_kx_publickeybytes()),o=a.address;t.push(o);var r=new b(0|n._crypto_kx_secretkeybytes()),i=r.address;if(t.push(i),0==(0|n._crypto_kx_keypair(o,i))){var s={publicKey:l(a,e),privateKey:l(r,e),keyType:"x25519"};return g(t),s}y(t,"internal error")}function it(e,t){var a=[];p(t),e=k(a,e,"seed");var o,r=0|n._crypto_kx_seedbytes();e.length!==r&&v(a,"invalid seed length"),o=m(e),a.push(o);var i=new b(0|n._crypto_kx_publickeybytes()),s=i.address;a.push(s);var c=new b(0|n._crypto_kx_secretkeybytes()),u=c.address;if(a.push(u),0==(0|n._crypto_kx_seed_keypair(s,u,o))){var d={publicKey:l(i,t),privateKey:l(c,t),keyType:"x25519"};return g(a),d}y(a,"internal error")}function st(e,t,a,o){var r=[];p(o),e=k(r,e,"serverPublicKey");var i,s=0|n._crypto_kx_publickeybytes();e.length!==s&&v(r,"invalid serverPublicKey length"),i=m(e),r.push(i),t=k(r,t,"serverSecretKey");var c,u=0|n._crypto_kx_secretkeybytes();t.length!==u&&v(r,"invalid serverSecretKey length"),c=m(t),r.push(c),a=k(r,a,"clientPublicKey");var d,f=0|n._crypto_kx_publickeybytes();a.length!==f&&v(r,"invalid clientPublicKey length"),d=m(a),r.push(d);var h=new b(0|n._crypto_kx_sessionkeybytes()),w=h.address;r.push(w);var A=new b(0|n._crypto_kx_sessionkeybytes()),x=A.address;if(r.push(x),0==(0|n._crypto_kx_server_session_keys(w,x,i,c,d))){var I=l({sharedRx:h,sharedTx:A},o);return g(r),I}y(r,"invalid usage")}function ct(e,t,a){var o=[];p(a);var r=m(e=k(o,e,"message")),i=e.length;o.push(r),t=k(o,t,"key");var s,c=0|n._crypto_onetimeauth_keybytes();t.length!==c&&v(o,"invalid key length"),s=m(t),o.push(s);var u=new b(0|n._crypto_onetimeauth_bytes()),d=u.address;if(o.push(d),0==(0|n._crypto_onetimeauth(d,r,i,0,s))){var f=l(u,a);return g(o),f}y(o,"invalid usage")}function ut(e,t){var a=[];p(t),w(a,e,"state_address");var o=new b(0|n._crypto_onetimeauth_bytes()),r=o.address;if(a.push(r),0==(0|n._crypto_onetimeauth_final(e,r))){var i=(n._free(e),l(o,t));return g(a),i}y(a,"invalid usage")}function dt(e,t){var a=[];p(t);var o=null;null!=e&&(o=m(e=k(a,e,"key")),e.length,a.push(o));var r=new b(144).address;if(0==(0|n._crypto_onetimeauth_init(r,o))){var i=r;return g(a),i}y(a,"invalid usage")}function lt(e){var t=[];p(e);var a=new b(0|n._crypto_onetimeauth_keybytes()),o=a.address;t.push(o),n._crypto_onetimeauth_keygen(o);var r=l(a,e);return g(t),r}function ft(e,t,a){var o=[];p(a),w(o,e,"state_address");var r=m(t=k(o,t,"message_chunk")),i=t.length;o.push(r),0!=(0|n._crypto_onetimeauth_update(e,r,i))&&y(o,"invalid usage"),g(o)}function pt(e,t,a){var o=[];e=k(o,e,"hash");var r,i=0|n._crypto_onetimeauth_bytes();e.length!==i&&v(o,"invalid hash length"),r=m(e),o.push(r);var s=m(t=k(o,t,"message")),c=t.length;o.push(s),a=k(o,a,"key");var u,d=0|n._crypto_onetimeauth_keybytes();a.length!==d&&v(o,"invalid key length"),u=m(a),o.push(u);var l=0==(0|n._crypto_onetimeauth_verify(r,s,c,0,u));return g(o),l}function bt(e,t,a,o,r,i,s){var c=[];p(s),w(c,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&v(c,"keyLength must be an unsigned integer");var u=m(t=k(c,t,"password")),d=t.length;c.push(u),a=k(c,a,"salt");var f,h=0|n._crypto_pwhash_saltbytes();a.length!==h&&v(c,"invalid salt length"),f=m(a),c.push(f),w(c,o,"opsLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&v(c,"opsLimit must be an unsigned integer"),w(c,r,"memLimit"),("number"!=typeof r||(0|r)!==r||r<0)&&v(c,"memLimit must be an unsigned integer"),w(c,i,"algorithm"),("number"!=typeof i||(0|i)!==i||i<0)&&v(c,"algorithm must be an unsigned integer");var A=new b(0|e),x=A.address;if(c.push(x),0==(0|n._crypto_pwhash(x,e,0,u,d,0,f,o,0,r,i))){var I=l(A,s);return g(c),I}y(c,"invalid usage")}function mt(e,t,a,o,r,i){var s=[];p(i),w(s,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&v(s,"keyLength must be an unsigned integer");var c=m(t=k(s,t,"password")),u=t.length;s.push(c),a=k(s,a,"salt");var d,f=0|n._crypto_pwhash_scryptsalsa208sha256_saltbytes();a.length!==f&&v(s,"invalid salt length"),d=m(a),s.push(d),w(s,o,"opsLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&v(s,"opsLimit must be an unsigned integer"),w(s,r,"memLimit"),("number"!=typeof r||(0|r)!==r||r<0)&&v(s,"memLimit must be an unsigned integer");var h=new b(0|e),A=h.address;if(s.push(A),0==(0|n._crypto_pwhash_scryptsalsa208sha256(A,e,0,c,u,0,d,o,0,r))){var x=l(h,i);return g(s),x}y(s,"invalid usage")}function ht(e,t,a,o,r,i,s){var c=[];p(s);var u=m(e=k(c,e,"password")),d=e.length;c.push(u);var f=m(t=k(c,t,"salt")),h=t.length;c.push(f),w(c,a,"opsLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&v(c,"opsLimit must be an unsigned integer"),w(c,o,"r"),("number"!=typeof o||(0|o)!==o||o<0)&&v(c,"r must be an unsigned integer"),w(c,r,"p"),("number"!=typeof r||(0|r)!==r||r<0)&&v(c,"p must be an unsigned integer"),w(c,i,"keyLength"),("number"!=typeof i||(0|i)!==i||i<0)&&v(c,"keyLength must be an unsigned integer");var A=new b(0|i),x=A.address;if(c.push(x),0==(0|n._crypto_pwhash_scryptsalsa208sha256_ll(u,d,f,h,a,0,o,r,x,i))){var I=l(A,s);return g(c),I}y(c,"invalid usage")}function gt(e,t,a,o){var r=[];p(o);var i=m(e=k(r,e,"password")),s=e.length;r.push(i),w(r,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(r,"opsLimit must be an unsigned integer"),w(r,a,"memLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&v(r,"memLimit must be an unsigned integer");var c=new b(0|n._crypto_pwhash_scryptsalsa208sha256_strbytes()).address;if(r.push(c),0==(0|n._crypto_pwhash_scryptsalsa208sha256_str(c,i,s,0,t,0,a))){var u=n.UTF8ToString(c);return g(r),u}y(r,"invalid usage")}function yt(e,t,a){var o=[];p(a),"string"!=typeof e&&v(o,"hashed_password must be a string"),e=r(e+"\0"),null!=s&&e.length-1!==s&&v(o,"invalid hashed_password length");var i=m(e),s=e.length-1;o.push(i);var c=m(t=k(o,t,"password")),u=t.length;o.push(c);var d=0==(0|n._crypto_pwhash_scryptsalsa208sha256_str_verify(i,c,u,0));return g(o),d}function vt(e,t,a,o){var r=[];p(o);var i=m(e=k(r,e,"password")),s=e.length;r.push(i),w(r,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(r,"opsLimit must be an unsigned integer"),w(r,a,"memLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&v(r,"memLimit must be an unsigned integer");var c=new b(0|n._crypto_pwhash_strbytes()).address;if(r.push(c),0==(0|n._crypto_pwhash_str(c,i,s,0,t,0,a))){var u=n.UTF8ToString(c);return g(r),u}y(r,"invalid usage")}function wt(e,t,a,o){var i=[];p(o),"string"!=typeof e&&v(i,"hashed_password must be a string"),e=r(e+"\0"),null!=c&&e.length-1!==c&&v(i,"invalid hashed_password length");var s=m(e),c=e.length-1;i.push(s),w(i,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(i,"opsLimit must be an unsigned integer"),w(i,a,"memLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&v(i,"memLimit must be an unsigned integer");var u=0!=(0|n._crypto_pwhash_str_needs_rehash(s,t,0,a));return g(i),u}function kt(e,t,a){var o=[];p(a),"string"!=typeof e&&v(o,"hashed_password must be a string"),e=r(e+"\0"),null!=s&&e.length-1!==s&&v(o,"invalid hashed_password length");var i=m(e),s=e.length-1;o.push(i);var c=m(t=k(o,t,"password")),u=t.length;o.push(c);var d=0==(0|n._crypto_pwhash_str_verify(i,c,u,0));return g(o),d}function At(e,t,a){var o=[];p(a),e=k(o,e,"privateKey");var r,i=0|n._crypto_scalarmult_scalarbytes();e.length!==i&&v(o,"invalid privateKey length"),r=m(e),o.push(r),t=k(o,t,"publicKey");var s,c=0|n._crypto_scalarmult_bytes();t.length!==c&&v(o,"invalid publicKey length"),s=m(t),o.push(s);var u=new b(0|n._crypto_scalarmult_bytes()),d=u.address;if(o.push(d),0==(0|n._crypto_scalarmult(d,r,s))){var f=l(u,a);return g(o),f}y(o,"weak public key")}function xt(e,t){var a=[];p(t),e=k(a,e,"privateKey");var o,r=0|n._crypto_scalarmult_scalarbytes();e.length!==r&&v(a,"invalid privateKey length"),o=m(e),a.push(o);var i=new b(0|n._crypto_scalarmult_bytes()),s=i.address;if(a.push(s),0==(0|n._crypto_scalarmult_base(s,o))){var c=l(i,t);return g(a),c}y(a,"unknown error")}function It(e,t,a){var o=[];p(a),e=k(o,e,"n");var r,i=0|n._crypto_scalarmult_ed25519_scalarbytes();e.length!==i&&v(o,"invalid n length"),r=m(e),o.push(r),t=k(o,t,"p");var s,c=0|n._crypto_scalarmult_ed25519_bytes();t.length!==c&&v(o,"invalid p length"),s=m(t),o.push(s);var u=new b(0|n._crypto_scalarmult_ed25519_bytes()),d=u.address;if(o.push(d),0==(0|n._crypto_scalarmult_ed25519(d,r,s))){var f=l(u,a);return g(o),f}y(o,"invalid point or scalar is 0")}function Tt(e,t){var a=[];p(t),e=k(a,e,"scalar");var o,r=0|n._crypto_scalarmult_ed25519_scalarbytes();e.length!==r&&v(a,"invalid scalar length"),o=m(e),a.push(o);var i=new b(0|n._crypto_scalarmult_ed25519_bytes()),s=i.address;if(a.push(s),0==(0|n._crypto_scalarmult_ed25519_base(s,o))){var c=l(i,t);return g(a),c}y(a,"scalar is 0")}function St(e,t){var a=[];p(t),e=k(a,e,"scalar");var o,r=0|n._crypto_scalarmult_ed25519_scalarbytes();e.length!==r&&v(a,"invalid scalar length"),o=m(e),a.push(o);var i=new b(0|n._crypto_scalarmult_ed25519_bytes()),s=i.address;if(a.push(s),0==(0|n._crypto_scalarmult_ed25519_base_noclamp(s,o))){var c=l(i,t);return g(a),c}y(a,"scalar is 0")}function Ct(e,t,a){var o=[];p(a),e=k(o,e,"n");var r,i=0|n._crypto_scalarmult_ed25519_scalarbytes();e.length!==i&&v(o,"invalid n length"),r=m(e),o.push(r),t=k(o,t,"p");var s,c=0|n._crypto_scalarmult_ed25519_bytes();t.length!==c&&v(o,"invalid p length"),s=m(t),o.push(s);var u=new b(0|n._crypto_scalarmult_ed25519_bytes()),d=u.address;if(o.push(d),0==(0|n._crypto_scalarmult_ed25519_noclamp(d,r,s))){var f=l(u,a);return g(o),f}y(o,"invalid point or scalar is 0")}function Et(e,t,a){var o=[];p(a),e=k(o,e,"scalar");var r,i=0|n._crypto_scalarmult_ristretto255_scalarbytes();e.length!==i&&v(o,"invalid scalar length"),r=m(e),o.push(r),t=k(o,t,"element");var s,c=0|n._crypto_scalarmult_ristretto255_bytes();t.length!==c&&v(o,"invalid element length"),s=m(t),o.push(s);var u=new b(0|n._crypto_scalarmult_ristretto255_bytes()),d=u.address;if(o.push(d),0==(0|n._crypto_scalarmult_ristretto255(d,r,s))){var f=l(u,a);return g(o),f}y(o,"result is identity element")}function Rt(e,t){var a=[];p(t),e=k(a,e,"scalar");var o,r=0|n._crypto_core_ristretto255_scalarbytes();e.length!==r&&v(a,"invalid scalar length"),o=m(e),a.push(o);var i=new b(0|n._crypto_core_ristretto255_bytes()),s=i.address;if(a.push(s),0==(0|n._crypto_scalarmult_ristretto255_base(s,o))){var c=l(i,t);return g(a),c}y(a,"scalar is 0")}function Mt(e,t,a,o){var r=[];p(o);var i=m(e=k(r,e,"message")),s=e.length;r.push(i),t=k(r,t,"nonce");var c,u=0|n._crypto_secretbox_noncebytes();t.length!==u&&v(r,"invalid nonce length"),c=m(t),r.push(c),a=k(r,a,"key");var d,f=0|n._crypto_secretbox_keybytes();a.length!==f&&v(r,"invalid key length"),d=m(a),r.push(d);var h=new b(0|s),w=h.address;r.push(w);var A=new b(0|n._crypto_secretbox_macbytes()),x=A.address;if(r.push(x),0==(0|n._crypto_secretbox_detached(w,x,i,s,0,c,d))){var I=l({mac:A,cipher:h},o);return g(r),I}y(r,"invalid usage")}function Pt(e,t,a,o){var r=[];p(o);var i=m(e=k(r,e,"message")),s=e.length;r.push(i),t=k(r,t,"nonce");var c,u=0|n._crypto_secretbox_noncebytes();t.length!==u&&v(r,"invalid nonce length"),c=m(t),r.push(c),a=k(r,a,"key");var d,f=0|n._crypto_secretbox_keybytes();a.length!==f&&v(r,"invalid key length"),d=m(a),r.push(d);var h=new b(s+n._crypto_secretbox_macbytes()|0),w=h.address;if(r.push(w),0==(0|n._crypto_secretbox_easy(w,i,s,0,c,d))){var A=l(h,o);return g(r),A}y(r,"invalid usage")}function Ut(e){var t=[];p(e);var a=new b(0|n._crypto_secretbox_keybytes()),o=a.address;t.push(o),n._crypto_secretbox_keygen(o);var r=l(a,e);return g(t),r}function _t(e,t,a,o,r){var i=[];p(r);var s=m(e=k(i,e,"ciphertext")),c=e.length;i.push(s),t=k(i,t,"mac");var u,d=0|n._crypto_secretbox_macbytes();t.length!==d&&v(i,"invalid mac length"),u=m(t),i.push(u),a=k(i,a,"nonce");var f,h=0|n._crypto_secretbox_noncebytes();a.length!==h&&v(i,"invalid nonce length"),f=m(a),i.push(f),o=k(i,o,"key");var w,A=0|n._crypto_secretbox_keybytes();o.length!==A&&v(i,"invalid key length"),w=m(o),i.push(w);var x=new b(0|c),I=x.address;if(i.push(I),0==(0|n._crypto_secretbox_open_detached(I,s,u,c,0,f,w))){var T=l(x,r);return g(i),T}y(i,"wrong secret key for the given ciphertext")}function Bt(e,t,a,o){var r=[];p(o),e=k(r,e,"ciphertext");var i,s=n._crypto_secretbox_macbytes(),c=e.length;c>>0;return g([]),t}function vn(e,t){var a=[];p(t);for(var o=n._malloc(24),r=0;r<6;r++)n.setValue(o+4*r,n.Runtime.addFunction(e[["implementation_name","random","stir","uniform","buf","close"][r]]),"i32");0!=(0|n._randombytes_set_implementation(o))&&y(a,"unsupported implementation"),g(a)}function wn(e){p(e),n._randombytes_stir()}function kn(e,t){var a=[];p(t),w(a,e,"upper_bound"),("number"!=typeof e||(0|e)!==e||e<0)&&v(a,"upper_bound must be an unsigned integer");var o=n._randombytes_uniform(e)>>>0;return g(a),o}function An(){var e=n._sodium_version_string(),t=n.UTF8ToString(e);return g([]),t}return b.prototype.to_Uint8Array=function(){var e=new Uint8Array(this.length);return e.set(n.HEAPU8.subarray(this.address,this.address+this.length)),e},e.add=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can added");var n=e.length,a=0,o=0;if(t.length!=e.length)throw new TypeError("Arguments must have the same length");for(o=0;o>=8,a+=e[o]+t[o],e[o]=255&a},e.base64_variants=c,e.compare=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(e.length!==t.length)throw new TypeError("Only instances of identical length can be compared");for(var n=0,a=1,o=e.length;o-- >0;)n|=t[o]-e[o]>>8&a,a&=(t[o]^e[o])-1>>8;return n+n+a-1},e.from_base64=function(e,t){t=u(t);var a,o=[],r=new b(3*(e=k(o,e,"input")).length/4),i=m(e),s=h(4),c=h(4);return o.push(i),o.push(r.address),o.push(r.result_bin_len_p),o.push(r.b64_end_p),0!==n._sodium_base642bin(r.address,r.length,i,e.length,0,s,c,t)&&y(o,"invalid input"),n.getValue(c,"i32")-i!==e.length&&y(o,"incomplete input"),r.length=n.getValue(s,"i32"),a=r.to_Uint8Array(),g(o),a},e.from_hex=function(e){var t,a=[],o=new b((e=k(a,e,"input")).length/2),r=m(e),i=h(4);return a.push(r),a.push(o.address),a.push(o.hex_end_p),0!==n._sodium_hex2bin(o.address,o.length,r,e.length,0,0,i)&&y(a,"invalid input"),n.getValue(i,"i32")-r!==e.length&&y(a,"incomplete input"),t=o.to_Uint8Array(),g(a),t},e.from_string=r,e.increment=function(e){if(!(e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be incremented");for(var t=256,n=0,a=e.length;n>=8,t+=e[n],e[n]=255&t},e.is_zero=function(e){if(!(e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be checked");for(var t=0,n=0,a=e.length;n 0");var a,o=[],r=h(4),i=1,s=0,c=0|e.length,u=new b(c+t);o.push(r),o.push(u.address);for(var d=u.address,l=u.address+c+t;d>>48|c>>>32|c>>>16|c))-1>>16);return 0!==n._sodium_pad(r,u.address,e.length,t,u.length)&&y(o,"internal error"),u.length=n.getValue(r,"i32"),a=u.to_Uint8Array(),g(o),a},e.unpad=function(e,t){if(!(e instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((t|=0)<=0)throw new Error("block size must be > 0");var a=[],o=m(e),r=h(4);return a.push(o),a.push(r),0!==n._sodium_unpad(r,o,e.length,t)&&y(a,"unsupported/invalid padding"),e=(e=new Uint8Array(e)).subarray(0,n.getValue(r,"i32")),g(a),e},e.ready=o,e.symbols=function(){return Object.keys(e).sort()},e.to_base64=d,e.to_hex=s,e.to_string=i,e},void 0!==(r="function"===typeof a?a.apply(t,o):a)&&(e.exports=r),s&&i.sodium.ready.then((function(){s(i.sodium)}))}(this)},12759:function(e,t,n){var a,o,r,i=n(456),s=n(54659).Buffer;o=[t],a=function(t){"use strict";var a;void 0===(a=t)&&(a={});var o=a;"object"!=typeof o.sodium&&("object"==typeof n.g?o=n.g:"object"==typeof window&&(o=window));var r=a;return a.ready=new Promise((function(t,a){(d=r).onAbort=a,d.print=function(e){},d.printErr=function(e){},d.onRuntimeInitialized=function(){try{d._crypto_secretbox_keybytes(),t()}catch(t){a(t)}},d.useBackupModule=function(){return new Promise((function(t,a){(d={}).onAbort=a,d.onRuntimeInitialized=function(){Object.keys(r).forEach((function(e){"getRandomValue"!==e&&delete r[e]})),Object.keys(d).forEach((function(e){r[e]=d[e]})),t()};var o,c,u,d=void 0!==d?d:{},l=Object.assign({},d),f="object"==typeof window,p="function"==typeof importScripts,b="object"==typeof i&&"object"==typeof i.versions&&"string"==typeof i.versions.node,m="";if(b){var h=n(75992),g=n(78110);m=p?g.dirname(m)+"/":"//",o=function(e,t){var n=ee(e);return n?t?n:n.toString():(e=V(e)?new URL(e):g.normalize(e),h.readFileSync(e,t?void 0:"utf8"))},u=function(e){var t=o(e,!0);return t.buffer||(t=new Uint8Array(t)),t},c=function(e,t,n){var a=ee(e);a&&t(a),e=V(e)?new URL(e):g.normalize(e),h.readFile(e,(function(e,a){e?n(e):t(a.buffer)}))},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),i.argv.slice(2),e.exports=d,d.inspect=function(){return"[Emscripten Module object]"}}else(f||p)&&(p?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),m=0!==m.indexOf("blob:")?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText}catch(t){var n=ee(e);if(n)return function(e){for(var t=[],n=0;n255&&(a&=255),t.push(String.fromCharCode(a))}return t.join("")}(n);throw t}},p&&(u=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}catch(t){var n=ee(e);if(n)return n;throw t}}),c=function(e,t,n){var a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="arraybuffer",a.onload=function(){if(200==a.status||0==a.status&&a.response)t(a.response);else{var o=ee(e);o?t(o.buffer):n()}},a.onerror=n,a.send(null)});d.print;var y,v=d.printErr||void 0;Object.assign(d,l),l=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit,d.wasmBinary&&(y=d.wasmBinary),d.noExitRuntime;var w,k={Memory:function(e){this.buffer=new ArrayBuffer(65536*e.initial)},Module:function(e){},Instance:function(e,t){this.exports=function(e){for(var t,n=new Uint8Array(123),a=25;a>=0;--a)n[48+a]=52+a,n[65+a]=a,n[97+a]=26+a;function o(e,t,a){for(var o,r,i=0,s=t,c=a.length,u=t+(3*c>>2)-("="==a[c-2])-("="==a[c-1]);i>4,s>2),s>>0>z>>>0?c+1|0:c)|0,c=(re=(d=z)>>>0>(z=z+re|0)>>>0?c+1|0:c)+he|0,ie=me=z+be|0,me=c=me>>>0>>0?c+1|0:c,z=de(z^(u[e+80|0]|u[e+81|0]<<8|u[e+82|0]<<16|u[e+83|0]<<24)^-79577749,re^(u[e+84|0]|u[e+85|0]<<8|u[e+86|0]<<16|u[e+87|0]<<24)^528734635,32),Ie=c=y,c=c+1013904242|0,re=z,J=c=(z=z-23791573|0)>>>0<4271175723?c+1|0:c,le=de(z^ue,c^le,40),c=(c=me)+(me=y)|0,ue=de(re^(g=ue=le+ie|0),Ie^(v=g>>>0>>0?c+1|0:c),48),c=J+(H=y)|0,x=c=(ue=z+(w=ue)|0)>>>0>>0?c+1|0:c,ue=c=de(le^(A=ue),me^c,1),J=z=y,me=u[t+24|0]|u[t+25|0]<<8|u[t+26|0]<<16|u[t+27|0]<<24,Ie=c=u[t+28|0]|u[t+29|0]<<8|u[t+30|0]<<16|u[t+31|0]<<24,pe=u[e+8|0]|u[e+9|0]<<8|u[e+10|0]<<16|u[e+11|0]<<24,z=(le=u[t+16|0]|u[t+17|0]<<8|u[t+18|0]<<16|u[t+19|0]<<24)+(re=u[e+40|0]|u[e+41|0]<<8|u[e+42|0]<<16|u[e+43|0]<<24)|0,c=(Ee=u[t+20|0]|u[t+21|0]<<8|u[t+22|0]<<16|u[t+23|0]<<24)+(Me=u[e+44|0]|u[e+45|0]<<8|u[e+46|0]<<16|u[e+47|0]<<24)|0,c=(u[e+12|0]|u[e+13|0]<<8|u[e+14|0]<<16|u[e+15|0]<<24)+(z>>>0>>0?c+1|0:c)|0,c=Ie+(ie=(d=z)>>>0>(z=z+pe|0)>>>0?c+1|0:c)|0,c=(pe=z+me|0)>>>0>>0?c+1|0:c,d=de(z^(u[e+72|0]|u[e+73|0]<<8|u[e+74|0]<<16|u[e+75|0]<<24)^725511199,ie^(u[e+76|0]|u[e+77|0]<<8|u[e+78|0]<<16|u[e+79|0]<<24)^-1694144372,32),b=de(re^(l=d-2067093701|0),Me^(L=(B=z=y)-((d>>>0<2067093701)+1150833018|0)|0),40),c=(G=y)+c|0,c=(_=(I=z=b+pe|0)>>>0>>0?c+1|0:c)+J|0,c=(I>>>0>(z=I+ue|0)>>>0?c+1|0:c)+V|0,c=(re=(f=z)>>>0>(z=z+se|0)>>>0?c+1|0:c)+W|0,O=W=z+n|0,h=c=W>>>0>>0?c+1|0:c,k=ue,Ae=J,J=z,ie=re,ue=u[t+8|0]|u[t+9|0]<<8|u[t+10|0]<<16|u[t+11|0]<<24,z=c=u[t+12|0]|u[t+13|0]<<8|u[t+14|0]<<16|u[t+15|0]<<24,Me=c=u[0|e]|u[e+1|0]<<8|u[e+2|0]<<16|u[e+3|0]<<24,r=re=u[e+4|0]|u[e+5|0]<<8|u[e+6|0]<<16|u[e+7|0]<<24,V=c,c=(Te=u[t+4|0]|u[t+5|0]<<8|u[t+6|0]<<16|u[t+7|0]<<24)+(p=u[e+36|0]|u[e+37|0]<<8|u[e+38|0]<<16|u[e+39|0]<<24)|0,c=r+((W=u[e+32|0]|u[e+33|0]<<8|u[e+34|0]<<16|u[e+35|0]<<24)>>>0>(f=W+(re=u[0|t]|u[t+1|0]<<8|u[t+2|0]<<16|u[t+3|0]<<24)|0)>>>0?c+1|0:c)|0,c=(pe=(V=f+V|0)>>>0>>0?c+1|0:c)+z|0,we=f=V+ue|0,f=c=f>>>0>>0?c+1|0:c,m=W,W=de(V^(u[0|(c=e- -64|0)]|u[c+1|0]<<8|u[c+2|0]<<16|u[c+3|0]<<24)^-1377402159,pe^(u[c+4|0]|u[c+5|0]<<8|u[c+6|0]<<16|u[c+7|0]<<24)^1359893119,32),pe=c=y,c=c+1779033703|0,V=W,M=c=(W=W-205731576|0)>>>0<4089235720?c+1|0:c,p=de(m^(T=W),c^p,40),c=(N=y)+f|0,m=de(V^(f=W=p+we|0),pe^(C=p>>>0>f>>>0?c+1|0:c),48),c=de(m^J,(X=y)^ie,32),Q=W=y,F=c,a=c=u[t+60|0]|u[t+61|0]<<8|u[t+62|0]<<16|u[t+63|0]<<24,pe=we=u[t+56|0]|u[t+57|0]<<8|u[t+58|0]<<16|u[t+59|0]<<24,R=u[e+24|0]|u[e+25|0]<<8|u[e+26|0]<<16|u[e+27|0]<<24,W=(ie=u[t+48|0]|u[t+49|0]<<8|u[t+50|0]<<16|u[t+51|0]<<24)+(V=u[e+56|0]|u[e+57|0]<<8|u[e+58|0]<<16|u[e+59|0]<<24)|0,c=(Se=u[t+52|0]|u[t+53|0]<<8|u[t+54|0]<<16|u[t+55|0]<<24)+(D=u[e+60|0]|u[e+61|0]<<8|u[e+62|0]<<16|u[e+63|0]<<24)|0,c=(u[e+28|0]|u[e+29|0]<<8|u[e+30|0]<<16|u[e+31|0]<<24)+(W>>>0>>0?c+1|0:c)|0,c=a+(J=(E=W)>>>0>(W=R+W|0)>>>0?c+1|0:c)|0,c=(R=W+pe|0)>>>0>>0?c+1|0:c,J=de(W^(u[e+88|0]|u[e+89|0]<<8|u[e+90|0]<<16|u[e+91|0]<<24)^327033209,J^(u[e+92|0]|u[e+93|0]<<8|u[e+94|0]<<16|u[e+95|0]<<24)^1541459225,32),V=de(V^(pe=J+1595750129|0),(E=D)^(D=(P=W=y)-((J>>>0<2699217167)+1521486533|0)|0),40),c=(te=y)+c|0,W=de((R=W=V+R|0)^J,P^(E=R>>>0>>0?c+1|0:c),48),c=D+($=y)|0,U=c=(W=pe+(D=W)|0)>>>0>>0?c+1|0:c,c=Q+c|0,q=k^(J=F+(P=W)|0),k=c=J>>>0

>>0?c+1|0:c,pe=de(q,c^Ae,40),c=(Ae=y)+h|0,W=de(O=F^(h=W=pe+O|0),Q^(F=h>>>0>>0?c+1|0:c),48),c=k+(ae=y)|0,Q=c=(k=J+(O=W)|0)>>>0>>0?c+1|0:c,W=(j=de(k^pe,Ae^c,1))+(J=u[t+72|0]|u[t+73|0]<<8|u[t+74|0]<<16|u[t+75|0]<<24)|0,c=(ye=y)+(Ae=u[t+76|0]|u[t+77|0]<<8|u[t+78|0]<<16|u[t+79|0]<<24)|0,xe=W,K=W>>>0>>0?c+1|0:c,Y=ge,W=u[t+96|0]|u[t+97|0]<<8|u[t+98|0]<<16|u[t+99|0]<<24,pe=c=u[t+100|0]|u[t+101|0]<<8|u[t+102|0]<<16|u[t+103|0]<<24,V=(c=g)+(g=de(P^V,U^te,1))|0,c=(P=y)+v|0,c=(g>>>0>V>>>0?c+1|0:c)+pe|0,c=(v=(v=V)>>>0>(V=W+V|0)>>>0?c+1|0:c)+Y|0,q=U=V+ne|0,U=c=U>>>0>>0?c+1|0:c,I=de(d^I,_^B,48),_=c=de(I^V,(B=y)^v,32),c=M+X|0,c=(te=V=y)+(T=(V=m+T|0)>>>0>>0?c+1|0:c)|0,M=c=(v=V)>>>0>(m=v+_|0)>>>0?c+1|0:c,g=de(m^g,P^c,40),c=(X=y)+U|0,c=(P=g>>>0>(U=V=g+q|0)>>>0?c+1|0:c)+K|0,c=(d=U>>>0>(V=U+xe|0)>>>0?c+1|0:c)+ke|0,xe=K=V+ce|0,K=c=K>>>0>>0?c+1|0:c,q=V,Y=d,V=u[t+116|0]|u[t+117|0]<<8|u[t+118|0]<<16|u[t+119|0]<<24,t=u[t+112|0]|u[t+113|0]<<8|u[t+114|0]<<16|u[t+115|0]<<24,p=de(p^v,T^N,1),c=(N=y)+E|0,c=((d=p+R|0)>>>0

>>0?c+1|0:c)+V|0,c=(v=(T=d)>>>0>(d=t+d|0)>>>0?c+1|0:c)+ke|0,Re=T=d+ce|0,T=c=T>>>0>>0?c+1|0:c,c=de(d^w,v^H,32),ee=d=y,w=c,v=d,c=B+L|0,I=d=l+I|0,R=c=d>>>0>>0?c+1|0:c,c=c+v|0,E=d=d+w|0,H=c=I>>>0>d>>>0?c+1|0:c,v=de(d^p,N^c,40),c=(N=y)+T|0,w=de((d=v+Re|0)^w,ee^(l=d>>>0>>0?c+1|0:c),48),c=de(w^q,(Re=y)^Y,32),ee=p=y,T=c,q=p,b=de(b^I,R^G,1),c=C+(I=y)|0,c=((p=f)>>>0>(f=f+b|0)>>>0?c+1|0:c)+oe|0,c=(f=(p=f+Z|0)>>>0>>0?c+1|0:c)+Ae|0,Y=C=p+J|0,C=c=C>>>0

>>0?c+1|0:c,R=b,p=de(p^D,f^$,32),c=(D=y)+x|0,A=de(R^(f=b=p+A|0),(x=p>>>0>f>>>0?c+1|0:c)^I,40),c=($=y)+C|0,I=b=A+Y|0,b=de(p^b,D^(C=b>>>0>>0?c+1|0:c),48),c=x+(i=y)|0,x=b,D=c=(b=f+b|0)>>>0>>0?c+1|0:c,c=c+q|0,c=(R=b)>>>0>(b=b+T|0)>>>0?c+1|0:c,q=b,b^=j,j=c,p=de(b,ye^c,40),c=(ye=y)+K|0,K=b=p+xe|0,c=o+(Y=p>>>0>b>>>0?c+1|0:c)|0,xe=b=b+n|0,B=c=b>>>0>>0?c+1|0:c,b=d,L=ne,G=ge,d=de(_^U,P^te,48),c=M+(te=y)|0,_=d,M=c=(f=m+d|0)>>>0>>0?c+1|0:c,d=de(f^g,X^c,1),c=(m=y)+G|0,c=((g=d+L|0)>>>0>>0?c+1|0:c)+l|0,c=Se+(b=(l=b+g|0)>>>0>>0?c+1|0:c)|0,U=g=l+ie|0,g=c=g>>>0>>0?c+1|0:c,l=de(l^x,b^i,32),c=Q+(P=y)|0,x=l,k=c=(l=k+l|0)>>>0>>0?c+1|0:c,b=de(d^l,c^m,40),c=(c=g)+(g=y)|0,m=d=b+U|0,d=de(d^x,P^(U=d>>>0>>0?c+1|0:c),48),c=k+(X=y)|0,P=d,Q=c=(k=l+d|0)>>>0>>0?c+1|0:c,d=de(b^k,g^c,1),c=(g=y)+B|0,c=a+(b=(l=d+xe|0)>>>0>>0?c+1|0:c)|0,xe=x=l+we|0,x=c=x>>>0>>0?c+1|0:c,B=d,L=g,c=H+Re|0,c=(d=w+E|0)>>>0>>0?c+1|0:c,w=d,E=c,c=de(d^v,N^c,1),v=g=y,d=c,c=C+V|0,c=((I=t+I|0)>>>0>>0?c+1|0:c)+g|0,c=ve+(I=(g=d+I|0)>>>0>>0?c+1|0:c)|0,H=C=g+se|0,C=c=C>>>0>>0?c+1|0:c,g=de(g^O,I^ae,32),c=M+(O=y)|0,I=g,M=c=(M=f)>>>0>(f=f+g|0)>>>0?c+1|0:c,g=de(d^f,c^v,40),c=(N=y)+C|0,v=d=g+H|0,d=de(C=d^I,O^(I=d>>>0>>0?c+1|0:c),48),c=M+(ae=y)|0,M=d,C=d=f+d|0,O=c=d>>>0>>0?c+1|0:c,H=l,G=b,d=de(A^R,D^$,1),c=(f=y)+S|0,c=F+((l=d+fe|0)>>>0>>0?c+1|0:c)|0,c=oe+(b=(l=l+h|0)>>>0>>0?c+1|0:c)|0,F=h=l+Z|0,h=c=h>>>0>>0?c+1|0:c,A=d,d=(l=de(l^_,b^te,32))+w|0,c=(w=y)+E|0,b=d,f=de(d^A,(_=d>>>0>>0?c+1|0:c)^f,40),c=(te=y)+h|0,h=d=f+F|0,R=de(d^l,w^(F=d>>>0>>0?c+1|0:c),48),l=de(R^H,(c=G)^(G=y),32),c=(H=y)+O|0,w=d=l+C|0,A=de(d^B,(E=d>>>0>>0?c+1|0:c)^L,40),c=(B=y)+x|0,x=d=A+xe|0,d=de(d^l,H^(D=d>>>0>>0?c+1|0:c),48),c=E+($=y)|0,E=d,H=c=(l=w)>>>0>(w=w+d|0)>>>0?c+1|0:c,d=de(w^A,B^c,1),c=ke+(xe=y)|0,B=d,Re=d=ce+d|0,A=c=d>>>0>>0?c+1|0:c,l=be,d=de(g^C,N^O,1),c=U+(g=y)|0,c=((C=m)>>>0>(m=d+m|0)>>>0?c+1|0:c)+he|0,c=(C=(l=l+m|0)>>>0>>0?c+1|0:c)+Ie|0,L=m=l+me|0,U=c=m>>>0>>0?c+1|0:c,O=d,m=de(T^K,Y^ee,48),c=de(m^l,(N=y)^C,32),ee=d=y,T=c,l=d,c=_+G|0,c=(d=b+R|0)>>>0>>0?c+1|0:c,b=d,_=c,c=c+l|0,C=d=d+T|0,R=c=b>>>0>d>>>0?c+1|0:c,l=de(d^O,c^g,40),c=(c=U)+(U=y)|0,O=d=l+L|0,K=c=d>>>0>>0?c+1|0:c,c=c+A|0,Y=c=(g=d+Re|0)>>>0>>0?c+1|0:c,A=c,d=de(f^b,_^te,1),c=z+(f=y)|0,c=I+((b=d+ue|0)>>>0>>0?c+1|0:c)|0,c=pe+(v=(b=b+v|0)>>>0>>0?c+1|0:c)|0,L=I=b+W|0,I=c=I>>>0>>0?c+1|0:c,_=d,c=de(b^P,v^X,32),G=d=y,b=c,v=d,c=N+j|0,P=d=m+q|0,j=c=d>>>0>>0?c+1|0:c,c=c+v|0,c=(m=d+b|0)>>>0>>0?c+1|0:c,d=m^_,_=c,v=de(d,c^f,40),c=(X=y)+I|0,f=d=v+L|0,q=de(d^b,G^(I=d>>>0>>0?c+1|0:c),48),c=de(q^g,(te=y)^A,32),Re=d=y,L=c,A=d,d=de(p^P,j^ye,1),c=F+(p=y)|0,c=Te+((b=d+h|0)>>>0>>0?c+1|0:c)|0,c=(h=(b=b+re|0)>>>0>>0?c+1|0:c)+Ee|0,P=F=b+le|0,F=c=F>>>0>>0?c+1|0:c,b=de(b^M,h^ae,32),c=Q+(j=y)|0,M=b,h=p,p=c=(b=k+b|0)>>>0>>0?c+1|0:c,h=de(d^b,h^c,40),c=(ae=y)+F|0,k=d=h+P|0,d=de(P=d^M,j^(M=d>>>0>>0?c+1|0:c),48),c=p+(N=y)|0,p=d,F=d=b+d|0,P=c=d>>>0>>0?c+1|0:c,c=c+A|0,Q=c=(A=d+L|0)>>>0>>0?c+1|0:c,b=de(A^B,xe^c,40),c=Y+(j=y)|0,c=((d=b+g|0)>>>0>>0?c+1|0:c)+ge|0,g=d,Y=d=d+ne|0,B=c=g>>>0>d>>>0?c+1|0:c,G=oe,g=de(T^O,K^ee,48),c=(ye=y)+R|0,T=d=g+C|0,c=de(d^l,(C=d>>>0>>0?c+1|0:c)^U,1),U=l=y,d=c,c=I+o|0,c=((f=f+n|0)>>>0>>0?c+1|0:c)+l|0,c=(f=(l=d+f|0)>>>0>>0?c+1|0:c)+G|0,R=I=l+Z|0,I=c=I>>>0>>0?c+1|0:c,l=de(l^p,f^N,32),c=H+(O=y)|0,w=c=(p=l+w|0)>>>0>>0?c+1|0:c,f=de(d^p,c^U,40),c=(K=y)+I|0,I=d=f+R|0,l=de(d^l,O^(U=d>>>0>>0?c+1|0:c),48),c=w+(R=y)|0,O=c=(w=l+p|0)>>>0

>>0?c+1|0:c,d=de(f^w,K^c,1),c=(K=y)+B|0,c=Ae+((p=d+Y|0)>>>0>>0?c+1|0:c)|0,c=(f=(p=p+J|0)>>>0>>0?c+1|0:c)+S|0,xe=S=p+fe|0,S=c=S>>>0

>>0?c+1|0:c,H=d,G=p,N=f,p=be,d=de(h^F,P^ae,1),c=D+(h=y)|0,c=((f=x)>>>0>(x=d+x|0)>>>0?c+1|0:c)+he|0,c=Ee+(f=(p=p+x|0)>>>0>>0?c+1|0:c)|0,D=x=p+le|0,F=c=x>>>0>>0?c+1|0:c,x=d,f=c=de(p^g,f^ye,32),c=_+te|0,c=(P=d=y)+(m=(d=m+q|0)>>>0>>0?c+1|0:c)|0,_=c=(g=d+f|0)>>>0>>0?c+1|0:c,x=de(g^x,c^h,40),c=(te=y)+F|0,F=de(D=(p=x+D|0)^f,P^(f=p>>>0>>0?c+1|0:c),48),c=de(F^G,(ae=y)^N,32),ye=h=y,D=c,P=h,d=de(d^v,m^X,1),c=pe+(h=y)|0,c=M+((m=d+W|0)>>>0>>0?c+1|0:c)|0,c=Te+(k=(m=m+k|0)>>>0>>0?c+1|0:c)|0,G=v=m+re|0,v=c=v>>>0>>0?c+1|0:c,M=d,q=h,m=de(m^E,k^$,32),c=(E=y)+C|0,h=d=m+T|0,k=de(d^M,(T=d>>>0>>0?c+1|0:c)^q,40),c=(X=y)+v|0,M=d=k+G|0,d=de(d^m,E^(C=d>>>0>>0?c+1|0:c),48),c=T+(G=y)|0,v=d,T=d=h+d|0,E=c=d>>>0>>0?c+1|0:c,c=c+P|0,P=d=d+D|0,m=K,K=c=T>>>0>d>>>0?c+1|0:c,m=de(d^H,m^c,40),c=(c=S)+(S=y)|0,q=d=m+xe|0,H=c=d>>>0>>0?c+1|0:c,h=f,d=de(L^Y,B^Re,48),c=Q+($=y)|0,Q=d,f=(d=A+d|0)^b,b=c=d>>>0>>0?c+1|0:c,f=de(f,c^j,1),c=(j=y)+h|0,c=a+((p=f+p|0)>>>0>>0?c+1|0:c)|0,c=(h=(p=p+we|0)>>>0>>0?c+1|0:c)+z|0,Y=A=p+ue|0,A=c=A>>>0

>>0?c+1|0:c,p=de(p^v,h^G,32),c=O+(B=y)|0,O=p,w=c=(h=w+p|0)>>>0>>0?c+1|0:c,f=de(f^h,j^c,40),c=(c=A)+(A=y)|0,v=p=f+Y|0,p=de(L=p^O,B^(O=p>>>0>>0?c+1|0:c),48),c=w+(xe=y)|0,j=p,Y=c=(w=h+p|0)>>>0>>0?c+1|0:c,p=de(f^w,A^c,1),c=(A=y)+H|0,c=o+((f=p+q|0)>>>0

>>0?c+1|0:c)|0,c=V+(h=(f=f+n|0)>>>0>>0?c+1|0:c)|0,Re=B=t+f|0,B=c=B>>>0>>0?c+1|0:c,L=p,G=A,A=f,N=h,p=de(k^T,E^X,1),c=(h=y)+U|0,c=ve+((f=p+I|0)>>>0

>>0?c+1|0:c)|0,c=(k=(f=f+se|0)>>>0>>0?c+1|0:c)+V|0,U=I=t+f|0,I=c=I>>>0>>0?c+1|0:c,T=p,f=c=de(f^Q,k^$,32),k=p=y,c=_+ae|0,_=c=(p=g+F|0)>>>0>>0?c+1|0:c,c=c+k|0,c=(g=p)>>>0>(p=p+f|0)>>>0?c+1|0:c,F=p,p^=T,T=c,h=de(p,c^h,40),c=(X=y)+I|0,k=de(I=(p=h+U|0)^f,k^(f=p>>>0>>0?c+1|0:c),48),c=de(k^A,(c=N)^(N=y),32),$=A=y,I=c,U=b,b=l,c=de(g^x,_^te,1),E=l=y,g=c,c=C+Ie|0,c=((x=M+me|0)>>>0>>0?c+1|0:c)+l|0,x=c=(l=g+x|0)>>>0>>0?c+1|0:c,b=de(l^b,c^R,32),c=(c=U)+(U=y)|0,g=de((d=b+d|0)^g,E^(_=d>>>0>>0?c+1|0:c),40),c=x+(te=y)|0,M=g,c=Se+((C=l)>>>0>(l=l+g|0)>>>0?c+1|0:c)|0,C=c=(g=l+ie|0)>>>0>>0?c+1|0:c,l=de(b^g,U^c,48),c=_+(ae=y)|0,R=d,b=l,_=d=d+l|0,U=c=R>>>0>d>>>0?c+1|0:c,c=c+A|0,R=c=(A=d+I|0)>>>0>>0?c+1|0:c,d=(x=de(A^L,c^G,40))+Re|0,c=(Re=y)+B|0,E=d,Q=d>>>0>>0?c+1|0:c,d=de(D^q,H^ye,48),c=(D=y)+K|0,P=l=d+P|0,L=S,S=c=l>>>0>>0?c+1|0:c,c=de(l^m,L^c,1),q=l=y,m=c,c=f+a|0,c=((p=p+we|0)>>>0>>0?c+1|0:c)+l|0,c=Ae+(p=(l=p+m|0)>>>0

>>0?c+1|0:c)|0,H=f=l+J|0,f=c=f>>>0>>0?c+1|0:c,l=de(l^b,p^ae,32),c=Y+(B=y)|0,K=l,l=(b=w+l|0)^m,m=c=b>>>0>>0?c+1|0:c,p=de(l,q^c,40),c=(c=f)+(f=y)|0,q=l=p+H|0,l=de(w=l^K,B^(K=l>>>0

>>0?c+1|0:c),48),c=m+(ae=y)|0,Y=l,b=c=(l=b+l|0)>>>0>>0?c+1|0:c,p=de(l^p,f^c,1),c=(w=y)+Q|0,c=ke+((f=p+E|0)>>>0

>>0?c+1|0:c)|0,c=(m=(f=f+ce|0)>>>0>>0?c+1|0:c)+oe|0,ee=H=f+Z|0,H=c=H>>>0>>0?c+1|0:c,B=p,L=f,G=m,p=de(M^_,U^te,1),c=(U=y)+ge|0,c=O+(p>>>0>(f=p+ne|0)>>>0?c+1|0:c)|0,m=c=(f=f+v|0)>>>0>>0?c+1|0:c,c=de(d^f,c^D,32),D=d=y,v=c,c=T+N|0,c=(d=k+F|0)>>>0>>0?c+1|0:c,k=d,_=c,c=D+c|0,T=d=d+v|0,M=c=k>>>0>d>>>0?c+1|0:c,d=de(d^p,U^c,40),c=m+(N=y)|0,F=d,c=pe+((d=f+d|0)>>>0>>0?c+1|0:c)|0,c=(d=d+W|0)>>>0>>0?c+1|0:c,U=d,d^=v,v=c,m=de(d,D^c,48),c=de(m^L,(c=G)^(G=y),32),te=d=y,D=c,O=d,d=de(h^k,_^X,1),c=Ie+(f=y)|0,c=C+((p=d+me|0)>>>0>>0?c+1|0:c)|0,c=(h=(p=p+g|0)>>>0>>0?c+1|0:c)+z|0,C=k=p+ue|0,k=c=k>>>0

>>0?c+1|0:c,g=d,_=f,d=(p=de(p^j,h^xe,32))+P|0,c=(P=y)+S|0,f=d,h=de(h=d^g,(g=d>>>0

>>0?c+1|0:c)^_,40),c=(X=y)+k|0,k=d=h+C|0,p=de(d^p,P^(S=d>>>0>>0?c+1|0:c),48),c=g+(_=y)|0,C=d=p+f|0,P=c=d>>>0>>0?c+1|0:c,c=c+O|0,O=c=(g=d+D|0)>>>0>>0?c+1|0:c,f=de(g^B,c^w,40),c=(j=y)+H|0,H=d=f+ee|0,B=c=d>>>0>>0?c+1|0:c,d=l,w=b,b=p,l=de(I^E,Q^$,48),c=R+(ee=y)|0,I=l,A=c=(p=A+l|0)>>>0>>0?c+1|0:c,c=de(p^x,Re^c,1),R=l=y,x=c,c=v+Ce|0,c=((v=U+fe|0)>>>0>>0?c+1|0:c)+l|0,v=c=(l=v+x|0)>>>0>>0?c+1|0:c,b=de(l^b,c^_,32),c=(U=y)+w|0,x=de((d=b+d|0)^x,R^(w=d>>>0>>0?c+1|0:c),40),c=v+(E=y)|0,c=Te+((v=l)>>>0>(l=l+x|0)>>>0?c+1|0:c)|0,_=c=(v=l+re|0)>>>0>>0?c+1|0:c,l=de(b^v,U^c,48),c=w+($=y)|0,U=l,R=c=(w=d+l|0)>>>0>>0?c+1|0:c,d=de(w^x,E^c,1),c=(x=y)+B|0,c=ve+((l=d+H|0)>>>0>>0?c+1|0:c)|0,c=ke+(b=(l=l+se|0)>>>0>>0?c+1|0:c)|0,ye=E=l+ce|0,E=c=E>>>0>>0?c+1|0:c,Q=d,L=l,d=de(h^C,P^X,1),c=(h=y)+K|0,c=Ee+((l=d+q|0)>>>0>>0?c+1|0:c)|0,c=Se+(C=(l=l+le|0)>>>0>>0?c+1|0:c)|0,q=P=l+ie|0,P=c=P>>>0>>0?c+1|0:c,K=d,c=de(l^I,C^ee,32),ee=d=y,l=c,c=M+G|0,T=d=m+T|0,I=c=d>>>0>>0?c+1|0:c,c=ee+c|0,M=c=(m=d+l|0)>>>0>>0?c+1|0:c,h=de(m^K,c^h,40),c=(G=y)+P|0,C=d=h+q|0,K=de(d^l,ee^(P=d>>>0>>0?c+1|0:c),48),c=de(K^L,(ee=y)^b,32),X=d=y,q=c,b=d,l=be,d=de(T^F,I^N,1),c=S+(I=y)|0,c=((T=k)>>>0>(k=d+k|0)>>>0?c+1|0:c)+he|0,c=ve+(k=(l=l+k|0)>>>0>>0?c+1|0:c)|0,T=S=l+se|0,S=c=S>>>0>>0?c+1|0:c,l=de(l^Y,k^ae,32),c=A+(F=y)|0,A=l,c=(l=p+l|0)>>>0

>>0?c+1|0:c,p=I,I=c,p=de(d^l,p^c,40),c=(N=y)+S|0,k=d=p+T|0,d=de(d^A,F^(S=d>>>0

>>0?c+1|0:c),48),c=I+(L=y)|0,I=d,T=d=l+d|0,F=c=d>>>0>>0?c+1|0:c,c=c+b|0,c=(A=d+q|0)>>>0>>0?c+1|0:c,d=A^Q,Q=c,x=de(d,c^x,40),c=(ae=y)+E|0,E=d=x+ye|0,Y=d>>>0>>0?c+1|0:c,d=de(D^H,B^te,48),c=O+(te=y)|0,D=d,c=(d=g+d|0)>>>0>>0?c+1|0:c,g=d,O=c,c=de(d^f,c^j,1),j=d=y,b=c,c=P+Ae|0,c=((l=C+J|0)>>>0>>0?c+1|0:c)+d|0,c=Te+(l=(d=l+b|0)>>>0>>0?c+1|0:c)|0,C=f=d+re|0,f=c=f>>>0>>0?c+1|0:c,d=de(d^I,l^L,32),c=R+(P=y)|0,I=d,w=c=(l=w+d|0)>>>0>>0?c+1|0:c,b=de(l^b,j^c,40),c=(j=y)+f|0,C=d=b+C|0,d=de(f=d^I,P^(I=d>>>0>>0?c+1|0:c),48),c=w+(ye=y)|0,w=d,R=c=(f=l+d|0)>>>0>>0?c+1|0:c,d=de(f^b,j^c,1),c=(P=y)+Y|0,c=Ie+((l=d+E|0)>>>0>>0?c+1|0:c)|0,c=(b=(l=l+me|0)>>>0>>0?c+1|0:c)+ge|0,xe=j=l+ne|0,j=c=j>>>0>>0?c+1|0:c,H=d,B=l,L=b,d=de(p^T,N^F,1),c=Ee+(b=y)|0,c=_+((l=d+le|0)>>>0>>0?c+1|0:c)|0,c=Ce+(p=(l=l+v|0)>>>0>>0?c+1|0:c)|0,F=v=l+fe|0,v=c=v>>>0>>0?c+1|0:c,_=d,T=b,c=de(l^D,p^te,32),D=d=y,p=c,l=d,c=M+ee|0,c=(d=m+K|0)>>>0>>0?c+1|0:c,m=d,M=c,c=c+l|0,c=(b=d+p|0)>>>0>>0?c+1|0:c,d=b^_,_=c,d=de(d,c^T,40),c=(c=v)+(v=y)|0,T=l=d+F|0,F=c=l>>>0>>0?c+1|0:c,D=de(l^p,D^c,48),c=de(D^B,(c=L)^(L=y),32),N=l=y,K=c,l=de(m^h,M^G,1),c=(m=y)+he|0,c=S+((p=l+be|0)>>>0>>0?c+1|0:c)|0,c=a+(h=(p=p+k|0)>>>0>>0?c+1|0:c)|0,G=k=p+we|0,k=c=k>>>0>>0?c+1|0:c,S=l,M=m,p=de(p^U,h^$,32),c=(U=y)+O|0,m=l=p+g|0,l=(h=de(l^S,(g=l>>>0

>>0?c+1|0:c)^M,40))+G|0,c=(G=y)+k|0,S=l,l=de(l^p,U^(M=l>>>0>>0?c+1|0:c),48),c=g+(ee=y)|0,U=l,O=l=m+l|0,B=c=l>>>0>>0?c+1|0:c,c=N+c|0,c=(p=l+K|0)>>>0>>0?c+1|0:c,l=P,P=c,m=de(p^H,l^c,40),c=(te=y)+j|0,k=l=m+xe|0,c=de(l^K,N^(j=l>>>0>>0?c+1|0:c),48),N=l=y,K=c,l=d,c=_+L|0,_=d=b+D|0,D=c=d>>>0>>0?c+1|0:c,c=de(d^l,c^v,1),b=l=y,d=c,c=M+o|0,c=((g=S+n|0)>>>0>>0?c+1|0:c)+l|0,c=pe+(g=(l=d+g|0)>>>0>>0?c+1|0:c)|0,L=v=l+W|0,v=c=v>>>0>>0?c+1|0:c,S=d,M=b,d=de(E^q,Y^X,48),c=Q+(X=y)|0,E=d,c=(d=A+d|0)>>>0>>0?c+1|0:c,A=d,l=de(l^w,g^ye,32),Q=c,c=c+(q=y)|0,b=d=l+d|0,g=de(d^S,(w=d>>>0>>0?c+1|0:c)^M,40),c=(Y=y)+v|0,v=d=g+L|0,d=de(d^l,q^(S=d>>>0>>0?c+1|0:c),48),c=w+($=y)|0,M=d,q=c=(w=b+d|0)>>>0>>0?c+1|0:c,d=de(g^w,Y^c,1),c=Te+(L=y)|0,Y=d,ye=d=re+d|0,b=c=d>>>0>>0?c+1|0:c,d=de(x^A,Q^ae,1),c=(g=y)+F|0,c=Se+((l=d+T|0)>>>0>>0?c+1|0:c)|0,c=oe+(A=(l=l+ie|0)>>>0>>0?c+1|0:c)|0,Q=x=l+Z|0,x=c=x>>>0>>0?c+1|0:c,T=g,l=de(l^U,A^ee,32),c=R+(ee=y)|0,F=l,c=(g=f+l|0)>>>0>>0?c+1|0:c,f=T,T=c,A=de(d^g,f^c,40),c=(ae=y)+x|0,U=d=A+Q|0,c=(R=d>>>0>>0?c+1|0:c)+b|0,x=c=(b=d+ye|0)>>>0>>0?c+1|0:c,Q=c=de(b^K,c^N,32),H=d=y,d=de(h^O,B^G,1),c=(f=y)+I|0,c=V+((l=d+C|0)>>>0>>0?c+1|0:c)|0,c=(h=(l=t+l|0)>>>0>>0?c+1|0:c)+z|0,B=I=l+ue|0,I=c=I>>>0>>0?c+1|0:c,C=d,O=f,l=de(l^E,h^X,32),c=(E=y)+D|0,f=d=l+_|0,d=(h=de(d^C,(_=d>>>0>>0?c+1|0:c)^O,40))+B|0,c=(B=y)+I|0,I=d,d=de(d^l,E^(C=d>>>0>>0?c+1|0:c),48),c=_+(X=y)|0,_=d,E=c=(d=f+d|0)>>>0>>0?c+1|0:c,c=c+H|0,D=c=(f=d)>>>0>(d=d+Q|0)>>>0?c+1|0:c,l=de(d^Y,L^c,40),c=x+(L=y)|0,O=l,c=o+((l=b+l|0)>>>0>>0?c+1|0:c)|0,Y=l=l+n|0,b=l^Q,Q=c=l>>>0>>0?c+1|0:c,l=de(b,H^c,48),c=D+(H=y)|0,D=c=(x=d+l|0)>>>0>>0?c+1|0:c,d=c=de(x^O,L^c,1),O=b=y,b=de(f^h,E^B,1),c=S+(h=y)|0,c=Se+((f=b+v|0)>>>0>>0?c+1|0:c)|0,c=ve+(v=(f=f+ie|0)>>>0>>0?c+1|0:c)|0,L=S=f+se|0,S=c=S>>>0>>0?c+1|0:c,E=b,B=h,c=P+N|0,c=(b=p+K|0)>>>0

>>0?c+1|0:c,P=b,F=de(U^F,R^ee,48),h=de(f^F,v^(ee=y),32),U=c,c=c+(ye=y)|0,v=b=h+b|0,b=de(b^E,(R=b>>>0>>0?c+1|0:c)^B,40),c=(E=y)+S|0,B=c=(p=b+L|0)>>>0>>0?c+1|0:c,c=c+O|0,c=a+((K=p)>>>0>(p=d+p|0)>>>0?c+1|0:c)|0,c=(f=(p=p+we|0)>>>0>>0?c+1|0:c)+he|0,xe=S=p+be|0,L=c=S>>>0

>>0?c+1|0:c,G=d,N=p,c=de(m^P,U^te,1),m=p=y,d=c,c=C+Ee|0,c=((S=I+le|0)>>>0>>0?c+1|0:c)+p|0,c=pe+(S=(p=d+S|0)>>>0>>0?c+1|0:c)|0,U=I=p+W|0,I=c=I>>>0>>0?c+1|0:c,C=d,c=de(p^M,S^$,32),P=d=y,p=c,S=d,c=T+ee|0,T=d=g+F|0,M=c=d>>>0>>0?c+1|0:c,c=c+S|0,c=(g=d+p|0)>>>0>>0?c+1|0:c;d=g^C,C=c,S=de(d,c^m,40),c=(ee=y)+I|0,F=de(I=(d=S+U|0)^p,P^(p=d>>>0>>0?c+1|0:c),48),c=de(c=F^N,(N=y)^f,32),te=f=y,U=c,I=f,f=de(A^T,M^ae,1),c=oe+(A=y)|0,c=j+((m=f+Z|0)>>>0>>0?c+1|0:c)|0,c=Ie+(k=(m=m+k|0)>>>0>>0?c+1|0:c)|0,M=T=m+me|0,T=c=T>>>0>>0?c+1|0:c,m=de(m^_,k^X,32),c=q+(P=y)|0,_=m,w=c=(m=w+m|0)>>>0>>0?c+1|0:c,k=de(f^m,c^A,40),c=(X=y)+T|0,A=f=k+M|0,f=de(T=f^_,P^(_=f>>>0>>0?c+1|0:c),48),c=w+($=y)|0,T=f,M=f=m+f|0,P=c=f>>>0>>0?c+1|0:c,c=c+I|0,c=(m=f+U|0)>>>0>>0?c+1|0:c,f=O,O=c,w=de(m^G,f^c,40),c=(j=y)+L|0,I=f=w+xe|0,f=de(L=f^U,te^(U=f>>>0>>0?c+1|0:c),48),c=O+(te=y)|0,O=f,m=c=(f=m+f|0)>>>0>>0?c+1|0:c,j=c=de(f^w,j^c,1),ae=c,q=w=y,w=p,p=b,b=de(h^K,B^ye,48),c=R+(ye=y)|0,R=b,c=(b=v+b|0)>>>0>>0?c+1|0:c,v=d,d=p^b,p=c,d=de(d,c^E,1),c=(E=y)+w|0,c=Ce+(d>>>0>(h=v+d|0)>>>0?c+1|0:c)|0,c=ge+(v=(h=h+fe|0)>>>0>>0?c+1|0:c)|0,K=w=h+ne|0,w=c=w>>>0>>0?c+1|0:c,h=de(h^T,v^$,32),c=D+(B=y)|0,T=c=(v=h+x|0)>>>0>>0?c+1|0:c,x=de(d^v,E^c,40),c=($=y)+w|0,E=d=x+K|0,h=de(d^h,B^(D=d>>>0>>0?c+1|0:c),48),c=T+(K=y)|0,B=d=h+v|0,T=d,L=c=d>>>0>>0?c+1|0:c,v=b,w=p,c=C+N|0,c=(d=g+F|0)>>>0>>0?c+1|0:c,g=d,d^=S,S=c,c=de(d,ee^c,1),G=d=y,C=c,p=c,c=_+z|0,c=((b=A+ue|0)>>>0>>0?c+1|0:c)+d|0,A=c=(d=b)>>>0>(b=p+b|0)>>>0?c+1|0:c,p=de(l^b,c^H,32),c=(c=w)+(w=y)|0,F=d=p+v|0,l=de(l=d^C,G^(C=d>>>0

>>0?c+1|0:c),40),c=A+(H=y)|0,c=Ae+((d=l+b|0)>>>0>>0?c+1|0:c)|0,G=c=(v=d+J|0)>>>0>>0?c+1|0:c,w=de(p^v,w^c,48),xe=c=y,d=de(k^M,P^X,1),c=(p=y)+Q|0,c=ke+((b=d+Y|0)>>>0>>0?c+1|0:c)|0,c=V+(k=(b=b+ce|0)>>>0>>0?c+1|0:c)|0,Q=A=t+b|0,M=c=A>>>0>>0?c+1|0:c,P=d,A=de(b^R,k^ye,32),c=(X=y)+S|0,S=d=A+g|0,b=de(d^P,(R=d>>>0>>0?c+1|0:c)^p,40),c=(c=M)+(M=y)|0,P=d=b+Q|0,Q=c=d>>>0>>0?c+1|0:c,p=c,c=V+q|0,c=((k=t+j|0)>>>0>>0?c+1|0:c)+p|0,_=c=(p=d+k|0)>>>0>>0?c+1|0:c,d=de(p^w,xe^c,32),c=(j=y)+L|0,g=de((k=d+T|0)^ae,(c=k>>>0>>0?c+1|0:c)^q,40),q=c,c=ge+(T=y)|0,c=_+((Y=g+ne|0)>>>0>>0?c+1|0:c)|0,c=(_=p+Y|0)>>>0

>>0?c+1|0:c,p=j,j=c,p=de(d^_,p^c,48),c=(c=q)+(q=y)|0,d=g^(k=p+k|0),g=c=k>>>0

>>0?c+1|0:c,Y=c=de(d,c^T,1),ae=c,N=d=y,T=f,ee=m,f=b,b=de(A^P,Q^X,48),c=R+(P=y)|0,A=d=b+S|0,S=c=d>>>0>>0?c+1|0:c,f=de(d^f,c^M,1),c=(Q=y)+Ce|0,c=G+((d=f+fe|0)>>>0>>0?c+1|0:c)|0,v=c=(m=d+v|0)>>>0>>0?c+1|0:c,d=de(m^h,c^K,32),c=(M=y)+ee|0,T=h=d+T|0,R=c=h>>>0>>0?c+1|0:c,f=de(f^h,c^Q,40),c=ve+(ye=y)|0,Q=f,c=v+((f=se+f|0)>>>0>>0?c+1|0:c)|0,m=c=(f=f+m|0)>>>0>>0?c+1|0:c,h=de(d^f,c^M,48),c=(c=R)+(R=y)|0,K=d=h+T|0,M=d,G=c=d>>>0>>0?c+1|0:c,c=C+xe|0,T=(d=w+F|0)^l,l=c=d>>>0>>0?c+1|0:c,c=de(T,c^H,1),H=v=y,T=c,c=D+pe|0,c=((w=E+W|0)>>>0>>0?c+1|0:c)+v|0,C=c=(C=w)>>>0>(w=w+T|0)>>>0?c+1|0:c,F=v=de(w^O,te^c,32),E=c=y,c=c+S|0,D=v=v+A|0,O=c=F>>>0>v>>>0?c+1|0:c,v=de(v^T,H^c,40),c=he+(H=y)|0,c=C+((A=v+be|0)>>>0>>0?c+1|0:c)|0,A=c=(T=w)>>>0>(w=w+A|0)>>>0?c+1|0:c,T=de(w^F,c^E,48),te=c=y,S=c,x=de(x^B,L^$,1),C=c=y,F=b,c=c+z|0,c=U+((b=x+ue|0)>>>0>>0?c+1|0:c)|0,c=(b=b+I|0)>>>0>>0?c+1|0:c,I=b^F,F=c,I=de(I,c^P,32),c=($=y)+l|0,U=d=I+d|0,l=de(d^x,(l=C)^(C=d>>>0>>0?c+1|0:c),40),c=ke+(E=y)|0,c=F+((d=l+ce|0)>>>0>>0?c+1|0:c)|0,F=d=d+b|0,P=c=d>>>0>>0?c+1|0:c,b=c,c=N+Se|0,c=((x=Y+ie|0)>>>0>>0?c+1|0:c)+b|0,Y=c=(b=d+x|0)>>>0>>0?c+1|0:c,d=de(b^T,c^S,32),c=(B=y)+G|0,S=de((x=d+M|0)^ae,(c=x>>>0>>0?c+1|0:c)^N,40),L=M=y,N=c,c=M+Ie|0,c=Y+((M=S+me|0)>>>0>>0?c+1|0:c)|0,Y=c=(M=b+M|0)>>>0>>0?c+1|0:c,b=de(d^M,c^B,48),c=(B=y)+N|0,d=(x=b+x|0)^S,S=c=x>>>0>>0?c+1|0:c,L=c=de(d,c^L,1),N=d=y,ee=k,X=h,h=l,l=de(I^F,P^$,48),c=(I=y)+C|0,C=d=l+U|0,F=c=d>>>0>>0?c+1|0:c,h=de(d^h,c^E,1),c=(E=y)+Te|0,c=((d=h+re|0)>>>0>>0?c+1|0:c)+A|0,w=c=(k=d+w|0)>>>0>>0?c+1|0:c,d=de(k^X,c^R,32),c=(A=y)+g|0,U=g=d+ee|0,R=c=g>>>0>>0?c+1|0:c,h=de(h^g,c^E,40),c=a+(X=y)|0,E=h,c=w+((h=we+h|0)>>>0>>0?c+1|0:c)|0,P=c=(g=h+k|0)>>>0>>0?c+1|0:c,h=de(d^g,c^A,48),c=(c=R)+(R=y)|0,U=d=h+U|0,ee=c=d>>>0>>0?c+1|0:c,w=p,k=f,c=O+te|0,p=c=(d=T+D|0)>>>0>>0?c+1|0:c,f=de(d^v,c^H,1),c=(v=y)+oe|0,c=((A=f+Z|0)>>>0>>0?c+1|0:c)+m|0,m=de(w^(k=k+A|0),(c=k>>>0>>0?c+1|0:c)^q,32),A=c,T=f,c=(w=y)+F|0,c=(f=m+C|0)>>>0>>0?c+1|0:c,C=f,f^=T,T=c,f=de(f,c^v,40),c=o+(F=y)|0,c=((v=f+n|0)>>>0>>0?c+1|0:c)+A|0,D=c=(A=v)>>>0>(v=v+k|0)>>>0?c+1|0:c,w=de(m^v,c^w,48),te=c=y,k=c,m=de(K^Q,G^ye,1),O=c=y,Q=p,c=c+Ae|0,c=j+((p=m+J|0)>>>0>>0?c+1|0:c)|0,A=I,I=c=(p=p+_|0)>>>0<_>>>0?c+1|0:c,A=de(l^p,A^c,32),c=($=y)+Q|0,_=d=A+d|0,l=de(d^m,(l=O)^(O=d>>>0>>0?c+1|0:c),40),c=Ee+(Q=y)|0,c=I+((d=l+le|0)>>>0>>0?c+1|0:c)|0,j=d=d+p|0,K=c=d>>>0

>>0?c+1|0:c,p=c,c=N+pe|0,c=((m=W+L|0)>>>0>>0?c+1|0:c)+p|0,I=c=(p=d+m|0)>>>0>>0?c+1|0:c,d=de(p^w,c^k,32),c=(q=y)+ee|0,k=de((m=d+U|0)^L,(c=m>>>0>>0?c+1|0:c)^N,40),L=c,c=z+(H=y)|0,c=I+((G=k+ue|0)>>>0>>0?c+1|0:c)|0,c=(I=p+G|0)>>>0

>>0?c+1|0:c,p=q,q=c,p=de(d^I,p^c,48),c=(c=L)+(L=y)|0,d=(m=p+m|0)^k,k=c=m>>>0

>>0?c+1|0:c,H=c=de(d,c^H,1),G=d=y,N=h,h=l,l=de(A^j,K^$,48),c=(c=O)+(O=y)|0,_=d=l+_|0,A=Q,Q=c=d>>>0>>0?c+1|0:c,h=de(d^h,A^c,1),c=(j=y)+Ie|0,c=D+((d=h+me|0)>>>0>>0?c+1|0:c)|0,A=v,v=d+v|0,d=R,R=c=A>>>0>v>>>0?c+1|0:c,d=de(v^N,d^c,32),c=(c=S)+(S=y)|0,D=c=(A=d+x|0)>>>0>>0?c+1|0:c,x=A,h=de(h^A,c^j,40),c=Ae+($=y)|0,j=h,c=R+((h=J+h|0)>>>0>>0?c+1|0:c)|0,R=c=(A=h+v|0)>>>0>>0?c+1|0:c,h=de(d^A,c^S,48),c=(c=D)+(D=y)|0,K=d=h+x|0,N=c=d>>>0>>0?c+1|0:c,x=b,c=T+te|0,b=c=(d=w+C|0)>>>0>>0?c+1|0:c,f=de(d^f,c^F,1),c=ge+(w=y)|0,c=P+((v=f+ne|0)>>>0>>0?c+1|0:c)|0,T=(v=g+v|0)^x,x=c=v>>>0>>0?c+1|0:c,g=de(T,c^B,32),S=c=y,T=f,c=c+Q|0,c=(f=g+_|0)>>>0>>0?c+1|0:c,C=f,f^=T,T=c,f=de(f,c^w,40),c=o+(F=y)|0,c=x+((w=f+n|0)>>>0>>0?c+1|0:c)|0,P=c=(w=v+w|0)>>>0>>0?c+1|0:c,x=de(g^w,c^S,48),te=c=y,v=c,g=de(E^U,X^ee,1),_=c=y,U=b,c=c+a|0,c=Y+((b=g+we|0)>>>0>>0?c+1|0:c)|0,M=c=(b=b+M|0)>>>0>>0?c+1|0:c,S=de(l^b,c^O,32),c=(ae=y)+U|0,U=d=S+d|0,l=de(d^g,(E=d>>>0>>0?c+1|0:c)^_,40),c=V+(O=y)|0,c=M+((d=t+l|0)>>>0>>0?c+1|0:c)|0,M=d=d+b|0,Q=c=d>>>0>>0?c+1|0:c,b=c,c=G+ke|0,c=((g=H+ce|0)>>>0>>0?c+1|0:c)+b|0,_=c=(b=d+g|0)>>>0>>0?c+1|0:c,d=de(b^x,c^v,32),c=(Y=y)+N|0,v=de((g=d+K|0)^H,(c=g>>>0>>0?c+1|0:c)^G,40),B=c,c=Ce+(H=y)|0,c=_+((G=v+fe|0)>>>0>>0?c+1|0:c)|0,c=(_=b+G|0)>>>0>>0?c+1|0:c,b=Y,Y=c,b=de(d^_,b^c,48),c=(c=B)+(B=y)|0,d=(g=b+g|0)^v,v=c=g>>>0>>0?c+1|0:c,H=c=de(d,c^H,1),ye=c,G=d=y,ee=m,X=h,m=l,l=de(S^M,Q^ae,48),c=(S=y)+E|0,M=d=l+U|0,U=c=d>>>0>>0?c+1|0:c,m=de(d^m,c^O,1),c=(O=y)+he|0,c=P+((d=m+be|0)>>>0>>0?c+1|0:c)|0,w=c=(h=d+w|0)>>>0>>0?c+1|0:c,d=de(h^X,c^D,32),c=(E=y)+k|0,D=c=(k=d+ee|0)>>>0>>0?c+1|0:c,m=de(m^k,c^O,40),c=Te+(ae=y)|0,P=m,c=w+((m=re+m|0)>>>0>>0?c+1|0:c)|0,w=m+h|0,m=E,E=c=w>>>0>>0?c+1|0:c,m=de(d^w,m^c,48),c=(c=D)+(D=y)|0,O=d=m+k|0,Q=c=d>>>0>>0?c+1|0:c,h=p,c=T+te|0,p=c=(d=x+C|0)>>>0>>0?c+1|0:c,f=de(d^f,c^F,1),c=(x=y)+Ee|0,c=R+((k=f+le|0)>>>0>>0?c+1|0:c)|0,h=de(h^(k=k+A|0),(c=k>>>0>>0?c+1|0:c)^L,32),T=A=y,A=c,C=f,c=T+U|0,c=(f=h+M|0)>>>0>>0?c+1|0:c,M=f,f^=C,C=c,f=de(f,c^x,40),c=ve+(F=y)|0,c=((x=f+se|0)>>>0>>0?c+1|0:c)+A|0,R=T,T=c=(A=k+x|0)>>>0>>0?c+1|0:c,x=de(h^A,R^c,48),te=c=y,k=c,h=de(K^j,N^$,1),U=c=y,R=p,c=c+oe|0,c=q+((p=h+Z|0)>>>0>>0?c+1|0:c)|0,I=c=(p=p+I|0)>>>0>>0?c+1|0:c,S=de(l^p,c^S,32),c=($=y)+R|0,R=d=S+d|0,l=de(d^h,(l=U)^(U=d>>>0>>0?c+1|0:c),40),c=Se+(j=y)|0,c=I+((d=l+ie|0)>>>0>>0?c+1|0:c)|0,K=d=d+p|0,q=c=d>>>0

>>0?c+1|0:c,p=c,c=G+o|0,c=((h=H+n|0)>>>0>>0?c+1|0:c)+p|0,I=c=(p=d+h|0)>>>0>>0?c+1|0:c,d=de(p^x,c^k,32),c=(H=y)+Q|0,k=de((h=d+O|0)^ye,(c=h>>>0>>0?c+1|0:c)^G,40),G=c,c=Ie+(L=y)|0,c=I+((N=k+me|0)>>>0>>0?c+1|0:c)|0,c=(I=p+N|0)>>>0

>>0?c+1|0:c,p=H,H=c,p=de(d^I,p^c,48),c=(c=G)+(G=y)|0,d=(h=p+h|0)^k,k=c=h>>>0

>>0?c+1|0:c,L=c=de(d,c^L,1),N=d=y,ee=g,X=m,m=l,l=de(S^K,q^$,48),c=(S=y)+U|0,U=d=l+R|0,R=c=d>>>0>>0?c+1|0:c,m=de(d^m,c^j,1),c=(j=y)+Te|0,c=T+((d=m+re|0)>>>0>>0?c+1|0:c)|0,A=c=(g=d+A|0)>>>0>>0?c+1|0:c,d=de(g^X,c^D,32),c=(T=y)+v|0,D=c=(v=d+ee|0)>>>0>>0?c+1|0:c,m=de(m^v,c^j,40),c=oe+($=y)|0,j=m,c=A+((m=Z+m|0)>>>0>>0?c+1|0:c)|0,A=m+g|0,m=T,T=c=A>>>0>>0?c+1|0:c,m=de(d^A,m^c,48),c=(c=D)+(D=y)|0,K=d=m+v|0,q=c=d>>>0>>0?c+1|0:c,g=b,c=C+te|0,b=c=(d=x+M|0)>>>0>>0?c+1|0:c,f=de(d^f,c^F,1),c=Se+(x=y)|0,c=E+((v=f+ie|0)>>>0>>0?c+1|0:c)|0,w=c=(v=v+w|0)>>>0>>0?c+1|0:c,g=de(g^v,c^B,32),M=c=y,C=f,c=c+R|0,c=(f=g+U|0)>>>0>>0?c+1|0:c,F=f,f^=C,C=c,f=de(f,c^x,40),c=ke+(U=y)|0,c=w+((x=f+ce|0)>>>0>>0?c+1|0:c)|0,c=(w=v+x|0)>>>0>>0?c+1|0:c,v=M,M=c,x=de(g^w,v^c,48),te=c=y,v=c,g=de(P^O,Q^ae,1),R=c=y,E=b,c=c+V|0,c=Y+((b=t+g|0)>>>0>>0?c+1|0:c)|0,_=c=(b=b+_|0)>>>0<_>>>0?c+1|0:c,S=de(l^b,c^S,32),c=(ae=y)+E|0,E=d=S+d|0,l=de(d^g,(l=R)^(R=d>>>0>>0?c+1|0:c),40),c=Ae+(P=y)|0,c=_+((d=l+J|0)>>>0>>0?c+1|0:c)|0,O=d=d+b|0,Q=c=d>>>0>>0?c+1|0:c,b=c,c=N+ge|0,c=((g=L+ne|0)>>>0>>0?c+1|0:c)+b|0,_=c=(b=d+g|0)>>>0>>0?c+1|0:c,d=de(b^x,c^v,32),c=(Y=y)+q|0,v=de((g=d+K|0)^L,(c=g>>>0>>0?c+1|0:c)^N,40),L=c,c=a+(B=y)|0,c=_+((N=v+we|0)>>>0>>0?c+1|0:c)|0,c=(_=b+N|0)>>>0>>0?c+1|0:c,b=Y,Y=c,b=de(d^_,b^c,48),c=(c=L)+(L=y)|0,d=(g=b+g|0)^v,v=c=g>>>0>>0?c+1|0:c,B=c=de(d,c^B,1),N=d=y,ee=h,X=m,m=l,l=de(S^O,Q^ae,48),c=(S=y)+R|0,R=d=l+E|0,E=c=d>>>0>>0?c+1|0:c,m=de(d^m,c^P,1),c=(P=y)+pe|0,c=M+((d=m+W|0)>>>0>>0?c+1|0:c)|0,w=c=(h=d+w|0)>>>0>>0?c+1|0:c,d=de(h^X,c^D,32),c=(M=y)+k|0,D=c=(k=d+ee|0)>>>0>>0?c+1|0:c,m=de(m^k,c^P,40),c=Ee+(ae=y)|0,P=m,c=w+((m=le+m|0)>>>0>>0?c+1|0:c)|0,w=m+h|0,m=M,M=c=w>>>0>>0?c+1|0:c,m=de(d^w,m^c,48),c=(c=D)+(D=y)|0,O=d=m+k|0,Q=c=d>>>0>>0?c+1|0:c,h=p,c=C+te|0,p=c=(d=x+F|0)>>>0>>0?c+1|0:c,f=de(d^f,c^U,1),c=(x=y)+ve|0,c=T+((k=f+se|0)>>>0>>0?c+1|0:c)|0,A=c=(k=k+A|0)>>>0>>0?c+1|0:c,h=de(h^k,c^G,32),T=c=y,C=f,c=c+E|0,c=(f=h+R|0)>>>0>>0?c+1|0:c,F=f,f^=C,C=c,f=de(f,c^x,40),c=he+(U=y)|0,c=A+((x=f+be|0)>>>0>>0?c+1|0:c)|0,R=T,T=c=(A=k+x|0)>>>0>>0?c+1|0:c,x=de(h^A,R^c,48),te=c=y,k=c,h=de(K^j,q^$,1),R=c=y,E=p,c=c+z|0,c=H+((p=h+ue|0)>>>0>>0?c+1|0:c)|0,I=c=(p=p+I|0)>>>0>>0?c+1|0:c,S=de(l^p,c^S,32),c=($=y)+E|0,E=d=S+d|0,l=de(d^h,(l=R)^(R=d>>>0>>0?c+1|0:c),40),c=Ce+(j=y)|0,c=I+((d=l+fe|0)>>>0>>0?c+1|0:c)|0,K=d=d+p|0,q=c=d>>>0

>>0?c+1|0:c,p=c,c=N+a|0,c=((h=B+we|0)>>>0>>0?c+1|0:c)+p|0,I=c=(p=d+h|0)>>>0>>0?c+1|0:c,d=de(p^x,c^k,32),c=(H=y)+Q|0,k=de((h=d+O|0)^B,(c=h>>>0>>0?c+1|0:c)^N,40),G=c,c=Se+(B=y)|0,c=I+((N=k+ie|0)>>>0>>0?c+1|0:c)|0,c=(I=p+N|0)>>>0

>>0?c+1|0:c,p=H,H=c,p=de(d^I,p^c,48),c=(c=G)+(G=y)|0,d=(h=p+h|0)^k,k=c=h>>>0

>>0?c+1|0:c,B=c=de(d,c^B,1),N=d=y,ee=g,X=m,m=l,l=de(S^K,q^$,48),c=(S=y)+R|0,R=d=l+E|0,E=c=d>>>0>>0?c+1|0:c,m=de(d^m,c^j,1),c=(j=y)+z|0,c=T+((d=m+ue|0)>>>0>>0?c+1|0:c)|0,A=c=(g=d+A|0)>>>0>>0?c+1|0:c,d=de(g^X,c^D,32),c=(T=y)+v|0,D=c=(v=d+ee|0)>>>0>>0?c+1|0:c,m=de(m^v,c^j,40),c=he+($=y)|0,j=m,c=A+((m=be+m|0)>>>0>>0?c+1|0:c)|0,A=m+g|0,m=T,T=c=A>>>0>>0?c+1|0:c,m=de(d^A,m^c,48),c=(c=D)+(D=y)|0,K=d=m+v|0,q=c=d>>>0>>0?c+1|0:c,g=b,c=C+te|0,b=c=(d=x+F|0)>>>0>>0?c+1|0:c,f=de(d^f,c^U,1),c=ve+(x=y)|0,c=M+((v=f+se|0)>>>0>>0?c+1|0:c)|0,w=c=(v=v+w|0)>>>0>>0?c+1|0:c,g=de(g^v,c^L,32),M=c=y,C=f,c=c+E|0,c=(f=g+R|0)>>>0>>0?c+1|0:c,F=f,f^=C,C=c,f=de(f,c^x,40),c=Ee+(U=y)|0,c=w+((x=f+le|0)>>>0>>0?c+1|0:c)|0,c=(w=v+x|0)>>>0>>0?c+1|0:c,v=M,M=c,x=de(g^w,v^c,48),te=c=y,v=c,g=de(P^O,Q^ae,1),R=c=y,E=b,c=c+oe|0,c=Y+((b=g+Z|0)>>>0>>0?c+1|0:c)|0,_=c=(b=b+_|0)>>>0<_>>>0?c+1|0:c,S=de(l^b,c^S,32),c=(ae=y)+E|0,E=d=S+d|0,l=de(d^g,(l=R)^(R=d>>>0>>0?c+1|0:c),40),c=Ce+(P=y)|0,c=_+((d=l+fe|0)>>>0>>0?c+1|0:c)|0,O=d=d+b|0,Q=c=d>>>0>>0?c+1|0:c,b=c,c=N+Ae|0,c=((g=B+J|0)>>>0>>0?c+1|0:c)+b|0,_=c=(b=d+g|0)>>>0>>0?c+1|0:c,d=de(b^x,c^v,32),c=(Y=y)+q|0,v=de((g=d+K|0)^B,(c=g>>>0>>0?c+1|0:c)^N,40),L=c,c=V+(B=y)|0,c=_+((N=t+v|0)>>>0>>0?c+1|0:c)|0,c=(_=b+N|0)>>>0>>0?c+1|0:c,b=Y,Y=c,b=de(d^_,b^c,48),c=(c=L)+(L=y)|0,d=(g=b+g|0)^v,v=c=g>>>0>>0?c+1|0:c,B=c=de(d,c^B,1),N=d=y,ee=h,X=m,m=l,l=de(S^O,Q^ae,48),c=(S=y)+R|0,R=d=l+E|0,E=c=d>>>0>>0?c+1|0:c,m=de(d^m,c^P,1),c=(P=y)+ke|0,c=M+((d=m+ce|0)>>>0>>0?c+1|0:c)|0,w=c=(h=d+w|0)>>>0>>0?c+1|0:c,d=de(h^X,c^D,32),c=(M=y)+k|0,D=c=(k=d+ee|0)>>>0>>0?c+1|0:c,m=de(m^k,c^P,40),c=o+(ae=y)|0,P=m,c=w+((m=n+m|0)>>>0>>0?c+1|0:c)|0,w=m+h|0,m=M,M=c=w>>>0>>0?c+1|0:c,m=de(d^w,m^c,48),c=(c=D)+(D=y)|0,O=d=m+k|0,Q=c=d>>>0>>0?c+1|0:c,h=p,c=C+te|0,p=c=(d=x+F|0)>>>0>>0?c+1|0:c,f=de(d^f,c^U,1),c=(x=y)+ge|0,c=T+((k=f+ne|0)>>>0>>0?c+1|0:c)|0,A=c=(k=k+A|0)>>>0>>0?c+1|0:c,h=de(h^k,c^G,32),T=c=y,C=f,c=c+E|0,c=(f=h+R|0)>>>0>>0?c+1|0:c,F=f,f^=C,C=c,f=de(f,c^x,40),c=Te+(U=y)|0,c=A+((x=f+re|0)>>>0>>0?c+1|0:c)|0,R=T,T=c=(A=k+x|0)>>>0>>0?c+1|0:c,x=de(h^A,R^c,48),te=c=y,k=c,h=de(K^j,q^$,1),R=c=y,E=p,c=c+Ie|0,c=H+((p=h+me|0)>>>0>>0?c+1|0:c)|0,I=c=(p=p+I|0)>>>0>>0?c+1|0:c,S=de(l^p,c^S,32),c=($=y)+E|0,E=d=S+d|0,l=de(d^h,(l=R)^(R=d>>>0>>0?c+1|0:c),40),c=pe+(j=y)|0,c=I+((d=l+W|0)>>>0>>0?c+1|0:c)|0,K=d=d+p|0,q=c=d>>>0

>>0?c+1|0:c,p=c,c=N+Ce|0,c=((h=B+fe|0)>>>0>>0?c+1|0:c)+p|0,I=c=(p=d+h|0)>>>0>>0?c+1|0:c,d=de(p^x,c^k,32),c=(H=y)+Q|0,k=de((h=d+O|0)^B,(c=h>>>0>>0?c+1|0:c)^N,40),G=c,c=he+(B=y)|0,c=I+((N=k+be|0)>>>0>>0?c+1|0:c)|0,c=(I=p+N|0)>>>0

>>0?c+1|0:c,p=H,H=c,p=de(d^I,p^c,48),c=(c=G)+(G=y)|0,d=(h=p+h|0)^k,k=c=h>>>0

>>0?c+1|0:c,B=c=de(d,c^B,1),N=d=y,ee=g,X=m,m=l,l=de(S^K,q^$,48),c=(S=y)+R|0,R=d=l+E|0,E=c=d>>>0>>0?c+1|0:c,m=de(d^m,c^j,1),c=(j=y)+Se|0,c=T+((d=m+ie|0)>>>0>>0?c+1|0:c)|0,A=c=(g=d+A|0)>>>0>>0?c+1|0:c,d=de(g^X,c^D,32),c=(T=y)+v|0,D=c=(v=d+ee|0)>>>0>>0?c+1|0:c,m=de(m^v,c^j,40),c=a+($=y)|0,j=m,c=A+((m=we+m|0)>>>0>>0?c+1|0:c)|0,A=m+g|0,m=T,T=c=A>>>0>>0?c+1|0:c,m=de(d^A,m^c,48),c=(c=D)+(D=y)|0,K=d=m+v|0,q=c=d>>>0>>0?c+1|0:c,g=b,c=C+te|0,b=c=(d=x+F|0)>>>0>>0?c+1|0:c,f=de(d^f,c^U,1),c=Te+(x=y)|0,c=M+((v=f+re|0)>>>0>>0?c+1|0:c)|0,w=c=(v=v+w|0)>>>0>>0?c+1|0:c,g=de(g^v,c^L,32),M=c=y,C=f,c=c+E|0,c=(f=g+R|0)>>>0>>0?c+1|0:c,F=f,f^=C,C=c,f=de(f,c^x,40),c=z+(U=y)|0,c=w+((x=f+ue|0)>>>0>>0?c+1|0:c)|0,c=(w=v+x|0)>>>0>>0?c+1|0:c,v=M,M=c,x=de(g^w,v^c,48),te=c=y,v=c,g=de(P^O,Q^ae,1),R=c=y,E=b,c=c+Ee|0,c=Y+((b=g+le|0)>>>0>>0?c+1|0:c)|0,_=c=(b=b+_|0)>>>0<_>>>0?c+1|0:c,S=de(l^b,c^S,32),c=(ae=y)+E|0,E=d=S+d|0,l=de(d^g,(l=R)^(R=d>>>0>>0?c+1|0:c),40),c=Ie+(P=y)|0,c=_+((d=l+me|0)>>>0>>0?c+1|0:c)|0,O=d=d+b|0,Q=c=d>>>0>>0?c+1|0:c,b=c,c=N+ve|0,c=((g=B+se|0)>>>0>>0?c+1|0:c)+b|0,_=c=(b=d+g|0)>>>0>>0?c+1|0:c,d=de(b^x,c^v,32),c=(Y=y)+q|0,v=de((g=d+K|0)^B,(c=g>>>0>>0?c+1|0:c)^N,40),L=c,c=o+(B=y)|0,c=_+((N=v+n|0)>>>0>>0?c+1|0:c)|0,c=(_=b+N|0)>>>0>>0?c+1|0:c,b=Y,Y=c,b=de(d^_,b^c,48),c=(c=L)+(L=y)|0,d=(g=b+g|0)^v,v=c=g>>>0>>0?c+1|0:c,B=c=de(d,c^B,1),N=d=y,ee=h,X=m,m=l,l=de(S^O,Q^ae,48),c=(S=y)+R|0,R=d=l+E|0,E=c=d>>>0>>0?c+1|0:c,m=de(d^m,c^P,1),c=(O=y)+oe|0,c=M+((d=m+Z|0)>>>0>>0?c+1|0:c)|0,w=c=(h=d+w|0)>>>0>>0?c+1|0:c,d=de(h^X,c^D,32),c=(M=y)+k|0,D=k=d+ee|0,P=c=k>>>0>>0?c+1|0:c,m=de(m^k,c^O,40),c=Ae+(ee=y)|0,O=m,c=w+((m=J+m|0)>>>0>>0?c+1|0:c)|0,k=m+h|0,m=M,M=c=k>>>0>>0?c+1|0:c,m=de(d^k,m^c,48),c=(c=P)+(P=y)|0,D=d=m+D|0,Q=c=d>>>0>>0?c+1|0:c,h=p,c=C+te|0,p=c=(d=x+F|0)>>>0>>0?c+1|0:c,f=de(d^f,c^U,1),c=(x=y)+V|0,c=T+((w=t+f|0)>>>0>>0?c+1|0:c)|0,A=c=(w=w+A|0)>>>0>>0?c+1|0:c,T=h=de(h^w,c^G,32),C=c=y,F=f,c=c+E|0,c=(f=h+R|0)>>>0>>0?c+1|0:c,U=f,f^=F,F=c,f=de(f,c^x,40),c=ke+(R=y)|0,c=A+((h=f+ce|0)>>>0>>0?c+1|0:c)|0,E=(h=h+w|0)^T,T=c=h>>>0>>0?c+1|0:c,w=de(E,c^C,48),G=c=y,x=c,C=A=de(K^j,q^$,1),E=c=y,j=p,c=c+pe|0,c=H+((p=A+W|0)>>>0>>0?c+1|0:c)|0,c=(p=p+I|0)>>>0>>0?c+1|0:c,I=S,S=c,A=de(l^p,I^c,32),c=(X=y)+j|0,I=d=A+d|0,l=de(l=d^C,(C=d>>>0>>0?c+1|0:c)^E,40),c=ge+(E=y)|0,c=S+((d=l+ne|0)>>>0>>0?c+1|0:c)|0,S=d=d+p|0,j=c=d>>>0

>>0?c+1|0:c,p=c,c=N+Ae|0,c=((H=J)>>>0>(J=B+J|0)>>>0?c+1|0:c)+p|0,Ae=c=(d=d+J|0)>>>0>>0?c+1|0:c,J=de(d^w,c^x,32),c=(K=y)+Q|0,x=de((p=D+J|0)^B,(c=p>>>0>>0?c+1|0:c)^N,40),H=c,c=ke+(q=y)|0,c=Ae+((B=ce)>>>0>(ce=x+ce|0)>>>0?c+1|0:c)|0,c=(ce=d+ce|0)>>>0>>0?c+1|0:c,d=J^ce,J=c;ke=de(d,c^K,48),c=(Ae=y)+H|0,p=c=(d=p+ke|0)>>>0>>0?c+1|0:c,c=de(d^x,c^q,1),x=y,K=c,q=g,g=ne,H=ge,ge=de(A^S,j^X,48),c=(A=y)+C|0,C=g,I=c=(ne=I+ge|0)>>>0>>0?c+1|0:c,g=de(l^(S=ne),c^E,1),c=(E=y)+H|0,c=T+(g>>>0>(ne=C+g|0)>>>0?c+1|0:c)|0,l=c=(ne=h+ne|0)>>>0>>0?c+1|0:c,m=de(m^ne,c^P,32),c=(c=v)+(v=y)|0,T=h=m+q|0,C=c=h>>>0>>0?c+1|0:c,h=de(h^g,c^E,40),c=(E=y)+Se|0,c=(h>>>0>(ie=h+ie|0)>>>0?c+1|0:c)+l|0,l=c=(l=ie)>>>0>(ie=ne+ie|0)>>>0?c+1|0:c,m=de(m^ie,c^v,48),c=(g=y)+C|0,v=ne=m+T|0,Se=c=ne>>>0>>0?c+1|0:c,T=t,C=V,c=F+G|0,ne=c=(t=w+U|0)>>>0>>0?c+1|0:c,V=de(t^f,c^R,1),c=(w=y)+C|0,c=M+((f=T+V|0)>>>0>>0?c+1|0:c)|0,b=de((f=f+k|0)^b,(c=f>>>0>>0?c+1|0:c)^L,32),T=c,M=se,se=V,c=(k=y)+I|0,I=w,w=c=(V=b+S|0)>>>0>>0?c+1|0:c,se=de(V^se,I^c,40),c=(S=y)+ve|0,c=((ve=M+se|0)>>>0>>0?c+1|0:c)+T|0,T=ve,f=b^(ve=f+ve|0),b=c=T>>>0>ve>>>0?c+1|0:c,c=de(f,c^k,48),F=f=y,k=c,I=Z,T=oe,Z=de(D^O,Q^ee,1),C=c=y,c=c+Ce|0,c=Y+((Z=(M=Z)+fe|0)>>>0>>0?c+1|0:c)|0,fe=c=(Z=_+Z|0)>>>0<_>>>0?c+1|0:c,oe=de(Z^ge,c^A,32),c=(_=y)+ne|0,ne=t=oe+t|0,ge=de(t^M,(A=t>>>0>>0?c+1|0:c)^C,40),c=(c=T)+(T=y)|0,c=fe+((t=ge+I|0)>>>0>>0?c+1|0:c)|0,fe=t=t+Z|0,Ce=c=t>>>0>>0?c+1|0:c,Z=c,c=x+Te|0,c=((M=re)>>>0>(re=K+re|0)>>>0?c+1|0:c)+Z|0,Te=c=(Z=t+re|0)>>>0>>0?c+1|0:c,re=de(k^Z,c^f,32),c=(M=y)+Se|0,f=t=re+v|0,t=de(t^K,(I=x)^(x=t>>>0>>0?c+1|0:c),40),c=Ee+(C=y)|0,Ee=t,c=Te+((t=le+t|0)>>>0>>0?c+1|0:c)|0,c=(t=t+Z|0)>>>0>>0?c+1|0:c,Te=t,U=(u[e+8|0]|u[e+9|0]<<8|u[e+10|0]<<16|u[e+11|0]<<24)^t,I=c,R=c^(u[e+12|0]|u[e+13|0]<<8|u[e+14|0]<<16|u[e+15|0]<<24),Z=de(oe^fe,_^Ce,48),c=(fe=y)+A|0,A=t=Z+ne|0,Ce=c=t>>>0>>0?c+1|0:c,oe=be,c=w+F|0,be=c=(t=k+V|0)>>>0>>0?c+1|0:c,se=de(t^se,c^S,1),c=(k=y)+he|0,c=((oe=se+oe|0)>>>0>>0?c+1|0:c)+l|0,oe=c=(he=oe+ie|0)>>>0>>0?c+1|0:c,ne=de(he^ke,c^Ae,32),c=(V=y)+Ce|0,ie=c=(le=ne+A|0)>>>0>>0?c+1|0:c,ke=ne,ne=de(se^le,c^k,40),c=(l=y)+Ie|0,c=(ne>>>0>(se=ne+me|0)>>>0?c+1|0:c)+oe|0,w=V,V=c=(he=se+he|0)>>>0>>0?c+1|0:c,se=de(ke^(me=he),w^c,48),c=(k=y)+ie|0,c=(oe=se+le|0)>>>0>>0?c+1|0:c,le=oe,oe^=U,s[e+8|0]=oe,s[e+9|0]=oe>>>8,s[e+10|0]=oe>>>16,s[e+11|0]=oe>>>24,ie=c,c^=R,s[e+12|0]=c,s[e+13|0]=c>>>8,s[e+14|0]=c>>>16,s[e+15|0]=c>>>24,he=t,oe=be,t=Z,Z=de(h^v,E^Se,1),c=(Ie=y)+o|0,c=(Z>>>0>(be=Z+n|0)>>>0?c+1|0:c)+J|0,ce=c=(v=be)>>>0>(be=ce+be|0)>>>0?c+1|0:c,t=de(t^be,c^fe,32),c=(c=oe)+(oe=y)|0,fe=c=(he=t+he|0)>>>0>>0?c+1|0:c,ke=t,he=de(Z^(J=he),c^Ie,40),c=(h=y)+a|0,c=ce+((t=he+we|0)>>>0>>0?c+1|0:c)|0,c=(t=t+be|0)>>>0>>0?c+1|0:c,ce=t,t^=ke,ke=c,be=de(t,c^oe,48),c=(v=y)+fe|0,J=t=be+J|0,fe=t>>>0>>0?c+1|0:c,ge=t=de(A^ge,T^Ce,1),Ie=c=y,c=c+z|0,c=b+((t=t+ue|0)>>>0>>0?c+1|0:c)|0,z=c=(Z=t+ve|0)>>>0>>0?c+1|0:c,t=(oe=de(m^Z,c^g,32))+d|0,c=(d=y)+p|0,ve=t,t=(ue=de(b=t^ge,(ge=t>>>0>>0?c+1|0:c)^Ie,40))+W|0,c=(W=y)+pe|0,c=z+(t>>>0>>0?c+1|0:c)|0,c=(z=t+Z|0)>>>0>>0?c+1|0:c,Z=z^Me^J,s[0|(t=e)]=Z,s[t+1|0]=Z>>>8,s[t+2|0]=Z>>>16,s[t+3|0]=Z>>>24,Z=c^r^fe,s[t+4|0]=Z,s[t+5|0]=Z>>>8,s[t+6|0]=Z>>>16,s[t+7|0]=Z>>>24,Z=(oe=de(z^oe,c^d,48))+ve|0,c=(ve=y)+ge|0,c=(ge=Z>>>0>>0?c+1|0:c)^(u[t+20|0]|u[t+21|0]<<8|u[t+22|0]<<16|u[t+23|0]<<24)^ke,z=(u[t+16|0]|u[t+17|0]<<8|u[t+18|0]<<16|u[t+19|0]<<24)^ce^Z,s[t+16|0]=z,s[t+17|0]=z>>>8,s[t+18|0]=z>>>16,s[t+19|0]=z>>>24,s[t+20|0]=c,s[t+21|0]=c>>>8,s[t+22|0]=c>>>16,s[t+23|0]=c>>>24,t=de(re^Te,I^M,48),z=y,ce=u[e+36|0]|u[e+37|0]<<8|u[e+38|0]<<16|u[e+39|0]<<24,c=(u[e+32|0]|u[e+33|0]<<8|u[e+34|0]<<16|u[e+35|0]<<24)^de(ne^le,l^ie,1)^t,s[e+32|0]=c,s[e+33|0]=c>>>8,s[e+34|0]=c>>>16,s[e+35|0]=c>>>24,c=y^ce^z,s[e+36|0]=c,s[e+37|0]=c>>>8,s[e+38|0]=c>>>16,s[e+39|0]=c>>>24,c=x+z|0,c=(ce=t+f|0)>>>0>>0?c+1|0:c,ne=(u[(t=e)+28|0]|u[t+29|0]<<8|u[t+30|0]<<16|u[t+31|0]<<24)^V^c,z=(u[t+24|0]|u[t+25|0]<<8|u[t+26|0]<<16|u[t+27|0]<<24)^me^ce,s[t+24|0]=z,s[t+25|0]=z>>>8,s[t+26|0]=z>>>16,s[t+27|0]=z>>>24,s[t+28|0]=ne,s[t+29|0]=ne>>>8,s[t+30|0]=ne>>>16,s[t+31|0]=ne>>>24,ne=u[t+44|0]|u[t+45|0]<<8|u[t+46|0]<<16|u[t+47|0]<<24,t=be^(u[t+40|0]|u[t+41|0]<<8|u[t+42|0]<<16|u[t+43|0]<<24)^de(Z^ue,W^ge,1),s[e+40|0]=t,s[e+41|0]=t>>>8,s[e+42|0]=t>>>16,s[e+43|0]=t>>>24,t=v^y^ne,s[e+44|0]=t,s[e+45|0]=t>>>8,s[e+46|0]=t>>>16,s[e+47|0]=t>>>24,Z=u[e+60|0]|u[e+61|0]<<8|u[e+62|0]<<16|u[e+63|0]<<24,t=oe^(u[e+56|0]|u[e+57|0]<<8|u[e+58|0]<<16|u[e+59|0]<<24)^de(J^he,h^fe,1),s[e+56|0]=t,s[e+57|0]=t>>>8,s[e+58|0]=t>>>16,s[e+59|0]=t>>>24,t=ve^y^Z,s[e+60|0]=t,s[e+61|0]=t>>>8,s[e+62|0]=t>>>16,s[e+63|0]=t>>>24,Z=u[e+52|0]|u[e+53|0]<<8|u[e+54|0]<<16|u[e+55|0]<<24,t=se^(u[e+48|0]|u[e+49|0]<<8|u[e+50|0]<<16|u[e+51|0]<<24)^de(ce^Ee,c^C,1),s[e+48|0]=t,s[e+49|0]=t>>>8,s[e+50|0]=t>>>16,s[e+51|0]=t>>>24,t=k^y^Z,s[e+52|0]=t,s[e+53|0]=t>>>8,s[e+54|0]=t>>>16,s[e+55|0]=t>>>24}function w(e,t,n,a,o,r,i){var d,l,f,p,b,m,h,v,w,k,x,I,T,S,C,R,M,P,U,_,B,D,N,O,j,H,G,z,K,W,Z,V,q,Q,J,Y,X,$,ee,te,ne,ae,oe,ie,ce,ue,de,le,fe=0,pe=0,be=0,me=0,he=0,ye=0,ve=0,we=0,ke=0,xe=0,Ie=0,Te=0,Se=0,Ce=0,Ee=0,Re=0,Me=0,Pe=0,Ue=0,_e=0,Be=0,De=0,Ne=0,Oe=0,Fe=0,Le=0,je=0,He=0,Ge=0,ze=0,Ke=0,We=0,Ze=0,Ve=0,qe=0,Qe=0,Je=0,Ye=0,Xe=0,et=0,tt=0,nt=0,at=0,ot=0,rt=0,it=0;return g=f=g-560|0,se(f+352|0),i&&L(f+352|0,34768,34,0),re(f+288|0,r,32,0),L(ye=f+352|0,f+320|0,32,0),L(ye,n,a,o),E(ye,we=f+224|0),ke=u[(pe=r)+32|0]|u[pe+33|0]<<8|u[pe+34|0]<<16|u[pe+35|0]<<24,Ie=u[pe+36|0]|u[pe+37|0]<<8|u[pe+38|0]<<16|u[pe+39|0]<<24,me=u[pe+40|0]|u[pe+41|0]<<8|u[pe+42|0]<<16|u[pe+43|0]<<24,fe=u[pe+44|0]|u[pe+45|0]<<8|u[pe+46|0]<<16|u[pe+47|0]<<24,be=u[pe+48|0]|u[pe+49|0]<<8|u[pe+50|0]<<16|u[pe+51|0]<<24,r=u[pe+52|0]|u[pe+53|0]<<8|u[pe+54|0]<<16|u[pe+55|0]<<24,he=u[pe+60|0]|u[pe+61|0]<<8|u[pe+62|0]<<16|u[pe+63|0]<<24,pe=u[pe+56|0]|u[pe+57|0]<<8|u[pe+58|0]<<16|u[pe+59|0]<<24,s[e+56|0]=pe,s[e+57|0]=pe>>>8,s[e+58|0]=pe>>>16,s[e+59|0]=pe>>>24,s[e+60|0]=he,s[e+61|0]=he>>>8,s[e+62|0]=he>>>16,s[e+63|0]=he>>>24,s[e+48|0]=be,s[e+49|0]=be>>>8,s[e+50|0]=be>>>16,s[e+51|0]=be>>>24,s[e+52|0]=r,s[e+53|0]=r>>>8,s[e+54|0]=r>>>16,s[e+55|0]=r>>>24,s[e+40|0]=me,s[e+41|0]=me>>>8,s[e+42|0]=me>>>16,s[e+43|0]=me>>>24,s[e+44|0]=fe,s[e+45|0]=fe>>>8,s[e+46|0]=fe>>>16,s[e+47|0]=fe>>>24,s[0|(r=e+32|0)]=ke,s[r+1|0]=ke>>>8,s[r+2|0]=ke>>>16,s[r+3|0]=ke>>>24,s[r+4|0]=Ie,s[r+5|0]=Ie>>>8,s[r+6|0]=Ie>>>16,s[r+7|0]=Ie>>>24,A(we),F(f,we),Ae(e,f),se(ye),i&&L(f+352|0,34768,34,0),L(i=f+352|0,e,64,0),L(i,n,a,o),E(i,ve=f+160|0),A(ve),s[f+288|0]=248&u[f+288|0],s[f+319|0]=63&u[f+319|0]|64,n=u[23+(e=l=f+288|0)|0],me=ge(p=u[e+21|0]|u[e+22|0]<<8|n<<16&2031616,0,b=(u[ve+28|0]|u[ve+29|0]<<8|u[ve+30|0]<<16|u[ve+31|0]<<24)>>>7|0,0),be=y,n=(e=u[ve+27|0])>>>24|0,o=e<<8|(fe=u[ve+23|0]|u[ve+24|0]<<8|u[ve+25|0]<<16|u[ve+26|0]<<24)>>>24,e=ge(m=2097151&((3&(Ie=(e=(a=u[ve+28|0])>>>16|0)|n))<<30|(n=(a<<=16)|o)>>>2),0,h=(i=u[l+23|0]|u[l+24|0]<<8|u[l+25|0]<<16|u[l+26|0]<<24)>>>5&2097151,0),n=y+be|0,a=e>>>0>(o=e+me|0)>>>0?n+1|0:n,e=ge(v=(n=u[ve+23|0])<<16&2031616|u[ve+21|0]|u[ve+22|0]<<8,0,w=(u[l+28|0]|u[l+29|0]<<8|u[l+30|0]<<16|u[l+31|0]<<24)>>>7|0,0),a=y+a|0,be=n=e+o|0,o=e>>>0>n>>>0?a+1|0:a,a=(e=u[l+27|0])>>>24|0,i=e<<8|i>>>24,e=ge(k=2097151&((3&(a|=n=(e=u[l+28|0])>>>16|0))<<30|(n=(e<<=16)|i)>>>2),0,x=fe>>>5&2097151,0),n=y+o|0,pe=a=e+be|0,o=e>>>0>a>>>0?n+1|0:n,fe=ge(h,0,x,0),be=y,n=(e=u[l+19|0])>>>24|0,i=e<<8|(Me=u[l+15|0]|u[l+16|0]<<8|u[l+17|0]<<16|u[l+18|0]<<24)>>>24,a=n,n=ge(I=(7&(a|=n=(e=u[l+20|0])>>>16|0))<<29|(n=(e<<=16)|i)>>>3,Ie=a>>>3|0,b,0),e=y+be|0,e=n>>>0>(a=n+fe|0)>>>0?e+1|0:e,i=(n=ge(p,0,m,0))+a|0,a=y+e|0,n=n>>>0>(fe=i)>>>0?a+1|0:a,a=(e=u[ve+19|0])>>>24|0,be=e<<8|(Re=u[ve+15|0]|u[ve+16|0]<<8|u[ve+17|0]<<16|u[ve+18|0]<<24)>>>24,e=ge(T=(7&(me=(e=(i=u[ve+20|0])>>>16|0)|a))<<29|(a=(i<<=16)|be)>>>3,S=me>>>3|0,w,0),n=y+n|0,n=e>>>0>(a=e+fe|0)>>>0?n+1|0:n,e=ge(v,0,k,0),n=y+n|0,ke=n=e>>>0>(we=e+a|0)>>>0?n+1|0:n,Te=e=n-((we>>>0<4293918720)-1|0)|0,a=(n=e>>>21|0)+o|0,fe=a=(e=(2097151&e)<<11|(me=we- -1048576|0)>>>21)>>>0>(pe=e+pe|0)>>>0?a+1|0:a,Ce=e=a-((pe>>>0<4293918720)-1|0)|0,ye=(2097151&e)<<11|(be=pe- -1048576|0)>>>21,i=e>>>21|0,e=ge(w,0,x,0),n=y,a=e,e=ge(b,0,h,0),n=y+n|0,n=e>>>0>(a=a+e|0)>>>0?n+1|0:n,Se=(e=a)+(a=ge(m,0,k,0))|0,e=y+n|0,e=a>>>0>Se>>>0?e+1|0:e,he=Se-(n=-2097152&(a=Se- -1048576|0))|0,n=(e-((131071&(o=e-((Se>>>0<4293918720)-1|0)|0))+(n>>>0>Se>>>0)|0)|0)+i|0,K=n=(e=he+ye|0)>>>0>>0?n+1|0:n,W=e,he=ge(e,n,470296,0),ye=y,n=ge(b,0,k,0),e=y,i=n,n=ge(m,0,w,0),e=y+e|0,n=n>>>0>(i=i+n|0)>>>0?e+1|0:e,e=o>>>21|0,o=(2097151&o)<<11|a>>>21,a=e+n|0,De=o=(a=o>>>0>(i=o+i|0)>>>0?a+1|0:a)-((i>>>0<4293918720)-1|0)|0,e=i-(n=-2097152&(Be=i- -1048576|0))|0,Z=i=a-((131071&o)+(n>>>0>i>>>0)|0)|0,V=n=pe-(a=-2097152&be)|0,q=o=fe-((a>>>0>pe>>>0)+Ce|0)|0,Q=e,a=ge(e,i,666643,0),e=y+ye|0,e=a>>>0>(i=a+he|0)>>>0?e+1|0:e,a=ge(n,o,654183,0),n=y+e|0,xe=o=a+i|0,be=a>>>0>o>>>0?n+1|0:n,Se=we-(e=-2097152&me)|0,Te=ke-((e>>>0>we>>>0)+Te|0)|0,n=ge(m,0,I,Ie),a=y,o=(e=n)+(n=ge(C=Me>>>6&2097151,0,b,0))|0,e=y+a|0,e=n>>>0>o>>>0?e+1|0:e,n=ge(h,0,v,0),a=y+e|0,a=n>>>0>(o=n+o|0)>>>0?a+1|0:a,e=ge(p,0,x,0),n=y+a|0,n=e>>>0>(o=e+o|0)>>>0?n+1|0:n,a=ge(w,0,R=Re>>>6&2097151,0),e=y+n|0,e=a>>>0>(o=a+o|0)>>>0?e+1|0:e,a=ge(k,0,T,S),n=y+e|0,we=o=a+o|0,i=a>>>0>o>>>0?n+1|0:n,n=(e=u[l+14|0])>>>24|0,o=e<<8|(ke=u[l+10|0]|u[l+11|0]<<8|u[l+12|0]<<16|u[l+13|0]<<24)>>>24,n=ge(M=2097151&((1&(n|=e=(a=u[l+15|0])>>>16|0))<<31|(e=(a<<=16)|o)>>>1),0,b,0),e=y,a=n,n=ge(m,0,C,0),e=y+e|0,e=n>>>0>(a=a+n|0)>>>0?e+1|0:e,o=(n=ge(x,0,I,Ie))+a|0,a=y+e|0,a=n>>>0>o>>>0?a+1|0:a,e=ge(h,0,T,S),n=y+a|0,n=e>>>0>(o=e+o|0)>>>0?n+1|0:n,e=ge(p,0,v,0),n=y+n|0,me=a=e+o|0,o=e>>>0>a>>>0?n+1|0:n,n=(e=u[ve+14|0])>>>24|0,fe=e<<8|(pe=u[ve+10|0]|u[ve+11|0]<<8|u[ve+12|0]<<16|u[ve+13|0]<<24)>>>24,a=n,n=(e=u[ve+15|0])>>>16|0,n=ge(P=2097151&((1&(n|=a))<<31|(e=e<<16|fe)>>>1),0,w,0),e=y+o|0,e=n>>>0>(a=n+me|0)>>>0?e+1|0:e,n=ge(k,0,R,0),e=y+e|0,fe=e=n>>>0>(me=n+a|0)>>>0?e+1|0:e,Ne=n=e-((me>>>0<4293918720)-1|0)|0,a=(e=n>>>21|0)+i|0,ye=a=(n=(2097151&n)<<11|(he=me- -1048576|0)>>>21)>>>0>(Ce=n+we|0)>>>0?a+1|0:a,Ue=n=a-((Ce>>>0<4293918720)-1|0)|0,e=(e=n>>>21|0)+Te|0,J=e=(n=(a=(2097151&n)<<11|(we=Ce- -1048576|0)>>>21)+Se|0)>>>0>>0?e+1|0:e,Y=n,e=ge(n,e,-997805,-1),n=y+be|0,xe=a=e+xe|0,be=e>>>0>a>>>0?n+1|0:n,Se=(Le=u[23+(d=f+224|0)|0]|u[d+24|0]<<8|u[d+25|0]<<16|u[d+26|0]<<24)>>>5&2097151,a=ge(U=(e=u[l+2|0])<<16&2031616|u[0|l]|u[l+1|0]<<8,0,x,0),n=y,o=(e=ge(v,0,_=(i=u[l+2|0]|u[l+3|0]<<8|u[l+4|0]<<16|u[l+5|0]<<24)>>>5&2097151,0))+a|0,a=y+n|0,a=e>>>0>o>>>0?a+1|0:a,e=ge(B=(u[l+7|0]|u[l+8|0]<<8|u[l+9|0]<<16|u[l+10|0]<<24)>>>7&2097151,0,R,0),n=y+a|0,n=e>>>0>(o=e+o|0)>>>0?n+1|0:n,a=ge(P,0,D=ke>>>4&2097151,0),e=y+n|0,ke=o=a+o|0,o=a>>>0>o>>>0?e+1|0:e,i=(n=u[l+6|0])<<8|i>>>24,a=e=n>>>24|0,n=(e=u[l+7|0])>>>16|0,n=ge(N=2097151&((3&(n|=a))<<30|(e=e<<16|i)>>>2),0,T,S),e=y+o|0,e=n>>>0>(a=n+ke|0)>>>0?e+1|0:e,o=(n=ge(C,0,O=(u[ve+7|0]|u[ve+8|0]<<8|u[ve+9|0]<<16|u[ve+10|0]<<24)>>>7&2097151,0))+a|0,a=y+e|0,a=n>>>0>o>>>0?a+1|0:a,n=ge(M,0,_e=pe>>>4&2097151,0),e=y+a|0,i=n>>>0>(o=n+o|0)>>>0?e+1|0:e,e=(n=u[ve+6|0])>>>24|0,ke=n<<8|(pe=u[ve+2|0]|u[ve+3|0]<<8|u[ve+4|0]<<16|u[ve+5|0]<<24)>>>24,n=e,e=ge(I,Ie,j=2097151&((3&(n|=a=(e=u[ve+7|0])>>>16|0))<<30|(e=e<<16|ke)>>>2),0),n=y+i|0,n=e>>>0>(a=e+o|0)>>>0?n+1|0:n,o=a,a=ge(H=(e=u[ve+2|0])<<16&2031616|u[0|ve]|u[ve+1|0]<<8,0,h,0),e=y+n|0,e=a>>>0>(o=o+a|0)>>>0?e+1|0:e,n=ge(p,0,G=pe>>>5&2097151,0),e=y+e|0,n=n>>>0>(a=n+o|0)>>>0?e+1|0:e,ke=e=a+Se|0,i=n=e>>>0>>0?n+1|0:n,o=u[d+21|0]|u[d+22|0]<<8,e=ge(v,0,U,0),n=y,pe=(a=e)+(e=ge(T,S,_,0))|0,a=y+n|0,a=e>>>0>pe>>>0?a+1|0:a,e=ge(P,0,B,0),n=y+a|0,n=e>>>0>(pe=e+pe|0)>>>0?n+1|0:n,e=ge(D,0,_e,0),n=y+n|0,n=e>>>0>(a=e+pe|0)>>>0?n+1|0:n,pe=(e=a)+(a=ge(R,0,N,0))|0,e=y+n|0,e=a>>>0>pe>>>0?e+1|0:e,n=ge(C,0,j,0),e=y+e|0,e=n>>>0>(a=n+pe|0)>>>0?e+1|0:e,pe=(n=ge(M,0,O,0))+a|0,a=y+e|0,a=n>>>0>pe>>>0?a+1|0:a,e=ge(I,Ie,G,0),n=y+a|0,n=e>>>0>(pe=e+pe|0)>>>0?n+1|0:n,e=ge(p,0,H,0),n=y+n|0,e=e>>>0>(a=e+pe|0)>>>0?n+1|0:n,n=(n=a)>>>0>(a=a+o|0)>>>0?e+1|0:e,o=a,a=(e=u[d+23|0])<<16&2031616,e=n,a=e=a>>>0>(o=o+a|0)>>>0?e+1|0:e,ve=e=e-((o>>>0<4293918720)-1|0)|0,n=(n=e>>>21|0)+i|0,e=(n=(i=ke=(e=(2097151&e)<<11|(pe=o- -1048576|0)>>>21)+ke|0)>>>0>>0?n+1|0:n)+be|0,e=(be=i+xe|0)>>>0>>0?e+1|0:e,Me=i- -1048576|0,Ee=i=n-((i>>>0<4293918720)-1|0)|0,Pe=be-(n=-2097152&Me)|0,Oe=e-((n>>>0>be>>>0)+i|0)|0,ke=o,be=a,e=ge(V,q,470296,0),n=y,a=e,e=ge(W,K,666643,0),n=y+n|0,n=e>>>0>(a=a+e|0)>>>0?n+1|0:n,o=(e=a)+(a=ge(Y,J,654183,0))|0,e=y+n|0,Re=o,i=a>>>0>o>>>0?e+1|0:e,n=ge(T,S,U,0),e=y,a=n,n=ge(R,0,_,0),e=y+e|0,e=n>>>0>(a=a+n|0)>>>0?e+1|0:e,o=(n=a)+(a=ge(B,0,_e,0))|0,n=y+e|0,n=a>>>0>o>>>0?n+1|0:n,e=ge(D,0,O,0),a=y+n|0,a=e>>>0>(o=e+o|0)>>>0?a+1|0:a,e=ge(P,0,N,0),n=y+a|0,n=e>>>0>(o=e+o|0)>>>0?n+1|0:n,a=ge(C,0,G,0),e=y+n|0,e=a>>>0>(o=a+o|0)>>>0?e+1|0:e,n=ge(M,0,j,0),e=y+e|0,e=n>>>0>(a=n+o|0)>>>0?e+1|0:e,o=(n=a)+(a=ge(I,Ie,H,0))|0,n=y+e|0,Se=o,a=a>>>0>o>>>0?n+1|0:n,n=(e=u[d+19|0])>>>24|0,Te=e<<8|(xe=u[d+15|0]|u[d+16|0]<<8|u[d+17|0]<<16|u[d+18|0]<<24)>>>24,a=((Fe=(e=(o=u[d+20|0])>>>16|0)|n)>>>3|0)+a|0,Se=o=(n=(7&Fe)<<29|(n=(o<<=16)|Te)>>>3)+Se|0,o=n>>>0>o>>>0?a+1|0:a,Te=xe>>>6&2097151,e=ge(R,0,U,0),n=y,a=e,e=ge(P,0,_,0),n=y+n|0,n=e>>>0>(a=a+e|0)>>>0?n+1|0:n,xe=(e=a)+(a=ge(B,0,O,0))|0,e=y+n|0,e=a>>>0>xe>>>0?e+1|0:e,a=ge(D,0,j,0),n=y+e|0,n=a>>>0>(xe=a+xe|0)>>>0?n+1|0:n,a=ge(N,0,_e,0),e=y+n|0,e=a>>>0>(xe=a+xe|0)>>>0?e+1|0:e,n=ge(C,0,H,0),a=y+e|0,a=n>>>0>(xe=n+xe|0)>>>0?a+1|0:a,e=ge(M,0,G,0),n=y+a|0,e=e>>>0>(xe=e+xe|0)>>>0?n+1|0:n,qe=e=(He=xe+Te|0)>>>0>>0?e+1|0:e,nt=e=e-((He>>>0<4293918720)-1|0)|0,a=(2097151&e)<<11|(Ze=He- -1048576|0)>>>21,e=(e>>>21|0)+o|0,Je=e=a>>>0>(Qe=a+Se|0)>>>0?e+1|0:e,at=e=e-((Qe>>>0<4293918720)-1|0)|0,a=(2097151&e)<<11|(ze=Qe- -1048576|0)>>>21,e=(e>>>21|0)+i|0,n=(a>>>0>(o=a+Re|0)>>>0?e+1|0:e)+be|0,be=(a=o+ke|0)-(e=-2097152&pe)|0,ve=e=(n=a>>>0>>0?n+1|0:n)-((e>>>0>a>>>0)+ve|0)|0,ot=e=e-((be>>>0<4293918720)-1|0)|0,a=(2097151&e)<<11|(Ke=be- -1048576|0)>>>21,e=(e>>21)+Oe|0,o=e=a>>>0>(i=a+Pe|0)>>>0?e+1|0:e,tt=e=e-((i>>>0<4293918720)-1|0)|0,We=(2097151&e)<<11|(Re=i- -1048576|0)>>>21,ke=e>>21,Fe=Ce-(e=-2097152&we)|0,Ue=ye-((e>>>0>Ce>>>0)+Ue|0)|0,e=ge(b,0,w,0),Ve=n=y,Pe=e,xe=e- -1048576|0,Ge=n=n-((e>>>0<4293918720)-1|0)|0,X=e=n>>>21|0,e=ge(z=(2097151&n)<<11|xe>>>21,e,-683901,-1),n=y+fe|0,n=e>>>0>(a=e+me|0)>>>0?n+1|0:n,we=a-(e=-2097152&he)|0,pe=n-((e>>>0>a>>>0)+Ne|0)|0,n=ge(x,0,C,0),e=y,a=n,n=ge(b,0,D,0),e=y+e|0,e=n>>>0>(a=a+n|0)>>>0?e+1|0:e,n=ge(m,0,M,0),e=y+e|0,e=n>>>0>(a=n+a|0)>>>0?e+1|0:e,fe=(n=a)+(a=ge(v,0,I,Ie))|0,n=y+e|0,n=a>>>0>fe>>>0?n+1|0:n,e=ge(h,0,R,0),a=y+n|0,a=e>>>0>(fe=e+fe|0)>>>0?a+1|0:a,e=ge(p,0,T,S),n=y+a|0,n=e>>>0>(fe=e+fe|0)>>>0?n+1|0:n,a=ge(w,0,_e,0),e=y+n|0,e=a>>>0>(fe=a+fe|0)>>>0?e+1|0:e,n=ge(k,0,P,0),e=y+e|0,me=a=n+fe|0,fe=n>>>0>a>>>0?e+1|0:e,e=ge(m,0,D,0),n=y,a=e,e=ge(b,0,B,0),n=y+n|0,n=e>>>0>(a=a+e|0)>>>0?n+1|0:n,ye=(e=ge(v,0,C,0))+a|0,a=y+n|0,a=e>>>0>ye>>>0?a+1|0:a,e=ge(x,0,M,0),n=y+a|0,n=e>>>0>(ye=e+ye|0)>>>0?n+1|0:n,a=ge(I,Ie,T,S),e=y+n|0,e=a>>>0>(ye=a+ye|0)>>>0?e+1|0:e,n=ge(h,0,P,0),e=y+e|0,e=n>>>0>(a=n+ye|0)>>>0?e+1|0:e,ye=(n=a)+(a=ge(p,0,R,0))|0,n=y+e|0,n=a>>>0>ye>>>0?n+1|0:n,e=ge(w,0,O,0),a=y+n|0,a=e>>>0>(ye=e+ye|0)>>>0?a+1|0:a,e=ge(k,0,_e,0),n=y+a|0,Te=n=e>>>0>(Se=e+ye|0)>>>0?n+1|0:n,Xe=e=n-((Se>>>0<4293918720)-1|0)|0,n=(2097151&e)<<11|(Ce=Se- -1048576|0)>>>21,e=(e>>>21|0)+fe|0,he=e=n>>>0>(Ne=n+me|0)>>>0?e+1|0:e,je=e=e-((Ne>>>0<4293918720)-1|0)|0,n=(a=e>>>21|0)+pe|0,we=n=(e=(2097151&e)<<11|(ye=Ne- -1048576|0)>>>21)>>>0>(Oe=e+we|0)>>>0?n+1|0:n,Ye=e=n-((Oe>>>0<4293918720)-1|0)|0,fe=(2097151&e)<<11|(pe=Oe- -1048576|0)>>>21,e=(e>>21)+Ue|0,$=e=(n=fe+Fe|0)>>>0>>0?e+1|0:e,ee=n,e=ge(n,e,-683901,-1),n=y+ke|0,We=a=e+We|0,ke=e>>>0>a>>>0?n+1|0:n,e=ge(m,0,U,0),n=y,a=e,e=ge(x,0,_,0),n=y+n|0,n=e>>>0>(a=a+e|0)>>>0?n+1|0:n,fe=(e=a)+(a=ge(T,S,B,0))|0,e=y+n|0,e=a>>>0>fe>>>0?e+1|0:e,n=ge(R,0,D,0),a=y+e|0,a=n>>>0>(fe=n+fe|0)>>>0?a+1|0:a,n=ge(v,0,N,0),e=y+a|0,e=n>>>0>(fe=n+fe|0)>>>0?e+1|0:e,a=ge(C,0,_e,0),n=y+e|0,n=a>>>0>(fe=a+fe|0)>>>0?n+1|0:n,e=ge(M,0,P,0),n=y+n|0,n=e>>>0>(a=e+fe|0)>>>0?n+1|0:n,fe=(e=a)+(a=ge(I,Ie,O,0))|0,e=y+n|0,e=a>>>0>fe>>>0?e+1|0:e,n=ge(h,0,G,0),a=y+e|0,a=n>>>0>(fe=n+fe|0)>>>0?a+1|0:a,n=ge(p,0,j,0),e=y+a|0,e=n>>>0>(fe=n+fe|0)>>>0?e+1|0:e,a=ge(k,0,H,0),n=y+e|0,Ue=fe=a+fe|0,a=a>>>0>fe>>>0?n+1|0:n,n=(e=u[d+27|0])>>>24|0,me=e<<8|Le>>>24,fe=2097151&((3&(n|=e=(fe=u[d+28|0])>>>16|0))<<30|(e=(fe<<=16)|me)>>>2),n=a,me=e=fe+Ue|0,fe=e>>>0>>0?n+1|0:n,Fe=ge(Q,Z,470296,0),Ue=y,e=(a=(2097151&De)<<11|Be>>>21)+(Pe-(n=-2097152&xe)|0)|0,n=Ve-((524287&Ge)+(n>>>0>Pe>>>0)|0)+(De>>>21)|0,te=n=e>>>0>>0?n+1|0:n,ne=e,n=ge(e,n,666643,0),e=y+Ue|0,e=n>>>0>(a=n+Fe|0)>>>0?e+1|0:e,xe=(n=ge(W,K,654183,0))+a|0,a=y+e|0,a=n>>>0>xe>>>0?a+1|0:a,n=ge(V,q,-997805,-1),e=y+a|0,e=n>>>0>(xe=n+xe|0)>>>0?e+1|0:e,a=ge(Y,J,136657,0),n=y+e|0,Me=(e=(2097151&Ee)<<11|Me>>>21)+(xe=a+xe|0)|0,n=(Ee>>>21|0)+(a>>>0>xe>>>0?n+1|0:n)|0,Ge=xe=fe-((me>>>0<4293918720)-1|0)|0,e=(e>>>0>Me>>>0?n+1|0:n)+fe|0,n=(fe=me+Me|0)-(a=-2097152&(Ve=me- -1048576|0))|0,a=(e=(e=fe>>>0>>0?e+1|0:e)-((a>>>0>fe>>>0)+xe|0)|0)+ke|0,Fe=fe=e-((n>>>0<4293918720)-1|0)|0,Pe=(a=(me=n+We|0)>>>0>>0?a+1|0:a)-(((n=-2097152&(Ue=n- -1048576|0))>>>0>me>>>0)+fe|0)|0,Le=e=me-n|0,fe=i,i=o,et=Oe-(e=-2097152&pe)|0,xe=we-((e>>>0>Oe>>>0)+Ye|0)|0,e=ge(ne,te,-683901,-1),n=y,o=(a=e)+(e=ge(z,X,136657,0))|0,a=y+n|0,n=he+(e>>>0>o>>>0?a+1|0:a)|0,ye=(a=o+Ne|0)-(e=-2097152&ye)|0,we=(n=a>>>0>>0?n+1|0:n)-((e>>>0>a>>>0)+je|0)|0,n=ge(z,X,-997805,-1),e=y+Te|0,e=n>>>0>(a=n+Se|0)>>>0?e+1|0:e,o=(n=ge(ne,te,136657,0))+a|0,a=y+e|0,a=n>>>0>o>>>0?a+1|0:a,e=ge(Q,Z,-683901,-1),n=y+a|0,n=e>>>0>(o=e+o|0)>>>0?n+1|0:n,pe=o-(e=-2097152&Ce)|0,ke=n-((e>>>0>o>>>0)+Xe|0)|0,n=ge(x,0,D,0),e=y,a=n,n=ge(m,0,B,0),e=y+e|0,e=n>>>0>(a=a+n|0)>>>0?e+1|0:e,o=(n=ge(b,0,N,0))+a|0,a=y+e|0,a=n>>>0>o>>>0?a+1|0:a,e=ge(T,S,C,0),n=y+a|0,n=e>>>0>(o=e+o|0)>>>0?n+1|0:n,a=ge(v,0,M,0),e=y+n|0,e=a>>>0>(o=a+o|0)>>>0?e+1|0:e,a=ge(I,Ie,R,0),n=y+e|0,n=a>>>0>(o=a+o|0)>>>0?n+1|0:n,a=ge(h,0,_e,0),e=y+n|0,e=a>>>0>(o=a+o|0)>>>0?e+1|0:e,n=ge(p,0,P,0),a=y+e|0,a=n>>>0>(o=n+o|0)>>>0?a+1|0:a,e=ge(w,0,j,0),n=y+a|0,n=e>>>0>(o=e+o|0)>>>0?n+1|0:n,a=ge(k,0,O,0),e=y+n|0,me=o=a+o|0,o=a>>>0>o>>>0?e+1|0:e,e=ge(x,0,B,0),n=y,a=e,e=ge(b,0,_,0),n=y+n|0,n=e>>>0>(a=a+e|0)>>>0?n+1|0:n,he=(e=a)+(a=ge(v,0,D,0))|0,e=y+n|0,e=a>>>0>he>>>0?e+1|0:e,n=ge(m,0,N,0),a=y+e|0,a=n>>>0>(he=n+he|0)>>>0?a+1|0:a,e=ge(C,0,R,0),n=y+a|0,n=e>>>0>(he=e+he|0)>>>0?n+1|0:n,a=ge(T,S,M,0),e=y+n|0,e=a>>>0>(he=a+he|0)>>>0?e+1|0:e,a=ge(I,Ie,P,0),n=y+e|0,n=a>>>0>(he=a+he|0)>>>0?n+1|0:n,a=ge(h,0,O,0),e=y+n|0,e=a>>>0>(he=a+he|0)>>>0?e+1|0:e,n=ge(p,0,_e,0),a=y+e|0,a=n>>>0>(he=n+he|0)>>>0?a+1|0:a,he=(e=ge(w,0,G,0))+he|0,n=y+a|0,a=ge(k,0,j,0),e=y+(e>>>0>he>>>0?n+1|0:n)|0,Oe=e=a>>>0>(Ye=a+he|0)>>>0?e+1|0:e,oe=e=e-((Ye>>>0<4293918720)-1|0)|0,a=(2097151&e)<<11|(De=Ye- -1048576|0)>>>21,e=(e>>>21|0)+o|0,Be=e=a>>>0>(We=a+me|0)>>>0?e+1|0:e,ie=e=e-((We>>>0<4293918720)-1|0)|0,a=(2097151&e)<<11|(Ee=We- -1048576|0)>>>21,e=(e>>>21|0)+ke|0,Me=e=a>>>0>(Ne=a+pe|0)>>>0?e+1|0:e,ce=e=e-((Ne>>>0<4293918720)-1|0)|0,a=(2097151&e)<<11|(Te=Ne- -1048576|0)>>>21,e=(e>>21)+we|0,o=e=a>>>0>(pe=a+ye|0)>>>0?e+1|0:e,we=e=e-((pe>>>0<4293918720)-1|0)|0,ke=(2097151&e)<<11|(a=pe- -1048576|0)>>>21,e=(e>>21)+xe|0,Xe=e=(me=ke+et|0)>>>0>>0?e+1|0:e,je=me,e=ge(me,e,-683901,-1),n=y,me=e,e=ge(ee,$,136657,0),n=y+n|0,e=(e>>>0>(me=me+e|0)>>>0?n+1|0:n)+i|0,rt=(i=fe+me|0)-(n=-2097152&Re)|0,it=(e=i>>>0>>0?e+1|0:e)-((n>>>0>i>>>0)+tt|0)|0,ke=be,me=ve,be=ge(je,Xe,136657,0),i=y,et=e=pe-(n=-2097152&a)|0,ae=o=o-((n>>>0>pe>>>0)+we|0)|0,a=ge(ee,$,-997805,-1),n=y+i|0,n=a>>>0>(be=a+be|0)>>>0?n+1|0:n,a=ge(e,o,-683901,-1),e=y+n|0,tt=o=a+be|0,fe=a>>>0>o>>>0?e+1|0:e,e=ge(Y,J,470296,0),n=y,o=(a=e)+(e=ge(V,q,666643,0))|0,a=y+n|0,n=Je+(e>>>0>o>>>0?a+1|0:a)|0,xe=e=o+Qe|0,i=n=e>>>0>>0?n+1|0:n,n=ge(Y,J,666643,0),e=y+qe|0,e=n>>>0>(a=n+He|0)>>>0?e+1|0:e,ye=a-(n=-2097152&Ze)|0,Se=e-((n>>>0>a>>>0)+nt|0)|0,n=ge(P,0,U,0),e=y,a=n,n=ge(_,0,_e,0),e=y+e|0,e=n>>>0>(a=a+n|0)>>>0?e+1|0:e,o=(n=a)+(a=ge(B,0,j,0))|0,n=y+e|0,n=a>>>0>o>>>0?n+1|0:n,a=ge(D,0,G,0),e=y+n|0,e=a>>>0>(o=a+o|0)>>>0?e+1|0:e,n=ge(N,0,O,0),a=y+e|0,a=n>>>0>(o=n+o|0)>>>0?a+1|0:a,e=ge(M,0,H,0),n=y+a|0,pe=o=e+o|0,o=e>>>0>o>>>0?n+1|0:n,n=(e=u[d+14|0])>>>24|0,be=e<<8|(we=u[d+10|0]|u[d+11|0]<<8|u[d+12|0]<<16|u[d+13|0]<<24)>>>24,n=2097151&((1&(n|=a=(e=u[d+15|0])>>>16|0))<<31|(e=be|e<<16)>>>1),e=o,pe=a=n+pe|0,o=n>>>0>a>>>0?e+1|0:e,be=we>>>4&2097151,e=ge(U,0,_e,0),n=y,a=e,e=ge(_,0,O,0),n=y+n|0,n=e>>>0>(a=a+e|0)>>>0?n+1|0:n,e=ge(B,0,G,0),n=y+n|0,n=e>>>0>(a=e+a|0)>>>0?n+1|0:n,we=(e=a)+(a=ge(D,0,H,0))|0,e=y+n|0,e=a>>>0>we>>>0?e+1|0:e,n=ge(N,0,j,0),a=y+e|0,e=n>>>0>(we=n+we|0)>>>0?a+1|0:a,ve=e=(Ze=be+we|0)>>>0>>0?e+1|0:e,ue=e=e-((Ze>>>0<4293918720)-1|0)|0,n=(a=e>>>21|0)+o|0,Ce=n=(e=(2097151&e)<<11|(Re=Ze- -1048576|0)>>>21)>>>0>(Je=e+pe|0)>>>0?n+1|0:n,de=e=n-((Je>>>0<4293918720)-1|0)|0,n=(2097151&e)<<11|(he=Je- -1048576|0)>>>21,e=(e>>>21|0)+Se|0,we=e=n>>>0>(ye=n+ye|0)>>>0?e+1|0:e,le=e=e-((ye>>>0<4293918720)-1|0)|0,n=(a=e>>21)+i|0,nt=n=(n=(e=(2097151&e)<<11|(pe=ye- -1048576|0)>>>21)>>>0>(o=e+xe|0)>>>0?n+1|0:n)-(((a=-2097152&ze)>>>0>o>>>0)+at|0)|0,ze=e=o-a|0,be=e- -1048576|0,at=e=n-((e>>>0<4293918720)-1|0)|0,a=(n=e>>21)+fe|0,n=((e=(2097151&e)<<11|be>>>21)>>>0>(o=e+tt|0)>>>0?a+1|0:a)+me|0,He=n=(n=(e=o)>>>0>(o=o+ke|0)>>>0?n+1|0:n)-(((a=-2097152&Ke)>>>0>o>>>0)+ot|0)|0,me=e=o-a|0,i=e- -1048576|0,qe=e=n-((e>>>0<4293918720)-1|0)|0,a=(n=e>>21)+it|0,Ke=e=(a=(e=(2097151&e)<<11|i>>>21)>>>0>(fe=e+rt|0)>>>0?a+1|0:a)-((fe>>>0<4293918720)-1|0)|0,xe=Le- -1048576|0,Se=Pe-((Le>>>0<4293918720)-1|0)|0,ke=(2097151&e)<<11|(o=fe- -1048576|0)>>>21,e=(e>>21)+Pe|0,ot=(Le=ke+Le|0)-(n=-2097152&xe)|0,rt=(ke>>>0>Le>>>0?e+1|0:e)-((n>>>0>Le>>>0)+Se|0)|0,it=fe-(e=-2097152&o)|0,tt=a-((e>>>0>fe>>>0)+Ke|0)|0,Qe=me-(e=-2097152&i)|0,Le=He-((e>>>0>me>>>0)+qe|0)|0,e=ge(je,Xe,-997805,-1),n=y,a=e,e=ge(ee,$,654183,0),n=y+n|0,n=e>>>0>(a=a+e|0)>>>0?n+1|0:n,o=(e=a)+(a=ge(et,ae,136657,0))|0,e=y+n|0,n=nt+(a>>>0>o>>>0?e+1|0:e)|0,He=(a=o+ze|0)-(e=-2097152&be)|0,qe=(n=a>>>0>>0?n+1|0:n)-((e>>>0>a>>>0)+at|0)|0,ze=Ne-(e=-2097152&Te)|0,Pe=Me-((e>>>0>Ne>>>0)+ce|0)|0,n=ge(ne,te,-997805,-1),e=y,a=n,n=ge(z,X,654183,0),e=y+e|0,e=n>>>0>(a=a+n|0)>>>0?e+1|0:e,o=(n=a)+(a=ge(Q,Z,136657,0))|0,n=y+e|0,n=a>>>0>o>>>0?n+1|0:n,e=ge(W,K,-683901,-1),a=y+n|0,n=Be+(e>>>0>(o=e+o|0)>>>0?a+1|0:a)|0,Te=(a=o+We|0)-(e=-2097152&Ee)|0,Me=(n=a>>>0>>0?n+1|0:n)-((e>>>0>a>>>0)+ie|0)|0,n=ge(ne,te,654183,0),e=y,a=n,n=ge(z,X,470296,0),e=y+e|0,e=n>>>0>(a=a+n|0)>>>0?e+1|0:e,o=(n=ge(Q,Z,-997805,-1))+a|0,a=y+e|0,n=Oe+(n>>>0>o>>>0?a+1|0:a)|0,n=(e=o+Ye|0)>>>0>>0?n+1|0:n,a=e,e=ge(W,K,136657,0),n=y+n|0,n=e>>>0>(a=a+e|0)>>>0?n+1|0:n,o=(e=a)+(a=ge(V,q,-683901,-1))|0,e=y+n|0,be=o-(n=-2097152&De)|0,i=(a>>>0>o>>>0?e+1|0:e)-((n>>>0>o>>>0)+oe|0)|0,o=(u[d+28|0]|u[d+29|0]<<8|u[d+30|0]<<16|u[d+31|0]<<24)>>>7|0,e=ge(b,0,U,0),n=y,fe=(a=e)+(e=ge(m,0,_,0))|0,a=y+n|0,a=e>>>0>fe>>>0?a+1|0:a,e=ge(v,0,B,0),n=y+a|0,n=e>>>0>(fe=e+fe|0)>>>0?n+1|0:n,a=ge(T,S,D,0),e=y+n|0,e=a>>>0>(fe=a+fe|0)>>>0?e+1|0:e,a=ge(x,0,N,0),n=y+e|0,n=a>>>0>(fe=a+fe|0)>>>0?n+1|0:n,a=ge(C,0,P,0),e=y+n|0,e=a>>>0>(fe=a+fe|0)>>>0?e+1|0:e,n=ge(R,0,M,0),a=y+e|0,a=n>>>0>(fe=n+fe|0)>>>0?a+1|0:a,e=ge(I,Ie,_e,0),n=y+a|0,n=e>>>0>(fe=e+fe|0)>>>0?n+1|0:n,a=ge(h,0,j,0),e=y+n|0,e=a>>>0>(fe=a+fe|0)>>>0?e+1|0:e,a=ge(p,0,O,0),n=y+e|0,n=a>>>0>(fe=a+fe|0)>>>0?n+1|0:n,a=ge(w,0,H,0),e=y+n|0,e=a>>>0>(fe=a+fe|0)>>>0?e+1|0:e,n=ge(k,0,G,0),a=y+e|0,n=n>>>0>(fe=n+fe|0)>>>0?a+1|0:a,Be=(a=(2097151&Ge)<<11|Ve>>>21)+(e=o+fe|0)|0,e=(Ge>>>21|0)+(n=e>>>0>>0?n+1|0:n)|0,ke=e=a>>>0>Be>>>0?e+1|0:e,Ke=n=e-((Be>>>0<4293918720)-1|0)|0,a=(e=n>>>21|0)+i|0,me=a=(n=(2097151&n)<<11|(Ie=Be- -1048576|0)>>>21)>>>0>(Ee=n+be|0)>>>0?a+1|0:a,Ve=n=a-((Ee>>>0<4293918720)-1|0)|0,e=(e=n>>21)+Me|0,be=e=(n=(2097151&n)<<11|(fe=Ee- -1048576|0)>>>21)>>>0>(Te=n+Te|0)>>>0?e+1|0:e,De=n=e-((Te>>>0<4293918720)-1|0)|0,a=(e=n>>21)+Pe|0,Ge=a=(n=(o=(2097151&n)<<11|(i=Te- -1048576|0)>>>21)+ze|0)>>>0>>0?a+1|0:a,Pe=n,e=ge(n,a,-683901,-1),n=y+qe|0,Me=a=e+He|0,o=e>>>0>a>>>0?n+1|0:n,n=ge(ee,$,470296,0),e=y+we|0,e=n>>>0>(ye=n+ye|0)>>>0?e+1|0:e,n=ge(je,Xe,654183,0),e=y+(e-(((a=-2097152&pe)>>>0>ye>>>0)+le|0)|0)|0,e=n>>>0>(pe=n+(ye-a|0)|0)>>>0?e+1|0:e,a=ge(et,ae,-997805,-1),n=y+e|0,n=a>>>0>(pe=a+pe|0)>>>0?n+1|0:n,Oe=a=Te-(e=-2097152&i)|0,_e=be=be-((e>>>0>Te>>>0)+De|0)|0,pe=(i=ge(Pe,Ge,136657,0))+pe|0,e=y+n|0,a=ge(a,be,-683901,-1),n=y+(i>>>0>pe>>>0?e+1|0:e)|0,be=n=a>>>0>(we=a+pe|0)>>>0?n+1|0:n,De=e=n-((we>>>0<4293918720)-1|0)|0,n=(2097151&e)<<11|(i=we- -1048576|0)>>>21,e=(e>>21)+o|0,Te=n=(e=n>>>0>(pe=n+Me|0)>>>0?e+1|0:e)-((pe>>>0<4293918720)-1|0)|0,ye=(2097151&n)<<11|(o=pe- -1048576|0)>>>21,n=(n>>21)+Le|0,Qe=Me=ye+Qe|0,Me=ye>>>0>Me>>>0?n+1|0:n,Le=pe-(n=-2097152&o)|0,Ye=e-((n>>>0>pe>>>0)+Te|0)|0,He=we-(e=-2097152&i)|0,qe=be-((e>>>0>we>>>0)+De|0)|0,e=ge(ee,$,666643,0),a=Ce+y|0,a=(i=e+Je|0)>>>0>>0?a+1|0:a,o=(e=ge(je,Xe,470296,0))+(i-(n=-2097152&he)|0)|0,n=y+(a-((n>>>0>i>>>0)+de|0)|0)|0,n=e>>>0>o>>>0?n+1|0:n,a=ge(et,ae,654183,0),e=y+n|0,pe=o=a+o|0,o=a>>>0>o>>>0?e+1|0:e,i=Ee-(e=-2097152&fe)|0,be=me-((e>>>0>Ee>>>0)+Ve|0)|0,e=ge(ne,te,470296,0),n=y,a=e,e=ge(z,X,666643,0),n=y+n|0,n=e>>>0>(a=a+e|0)>>>0?n+1|0:n,e=ge(Q,Z,654183,0),n=y+n|0,n=e>>>0>(a=e+a|0)>>>0?n+1|0:n,fe=(e=a)+(a=ge(W,K,-997805,-1))|0,e=y+n|0,e=a>>>0>fe>>>0?e+1|0:e,n=ge(V,q,136657,0),e=y+e|0,e=n>>>0>(a=n+fe|0)>>>0?e+1|0:e,fe=(n=ge(Y,J,-683901,-1))+a|0,a=y+e|0,n=ke+(n>>>0>fe>>>0?a+1|0:a)|0,Ee=(a=(2097151&Fe)<<11|Ue>>>21)+((fe=fe+Be|0)-(e=-2097152&Ie)|0)|0,e=((n=fe>>>0>>0?n+1|0:n)-((e>>>0>fe>>>0)+Ke|0)|0)+(Fe>>21)|0,Te=e=a>>>0>Ee>>>0?e+1|0:e,ze=e=e-((Ee>>>0<4293918720)-1|0)|0,n=i,i=(2097151&e)<<11|(he=Ee- -1048576|0)>>>21,e=(e>>21)+be|0,De=e=(a=n+i|0)>>>0>>0?e+1|0:e,Be=a,e=ge(a,e,-683901,-1),n=y+o|0,n=e>>>0>(a=e+pe|0)>>>0?n+1|0:n,o=(e=a)+(a=ge(Pe,Ge,-997805,-1))|0,e=y+n|0,e=a>>>0>o>>>0?e+1|0:e,n=ge(Oe,_e,136657,0),a=y+e|0,Ue=o=n+o|0,me=n>>>0>o>>>0?a+1|0:a,pe=Ze-(e=-2097152&Re)|0,ke=ve-((e>>>0>Ze>>>0)+ue|0)|0,n=ge(U,0,O,0),e=y,a=n,n=ge(_,0,j,0),e=y+e|0,e=n>>>0>(a=a+n|0)>>>0?e+1|0:e,n=ge(B,0,H,0),e=y+e|0,e=n>>>0>(a=n+a|0)>>>0?e+1|0:e,o=(n=ge(N,0,G,0))+a|0,a=y+e|0,n=n>>>0>o>>>0?a+1|0:a,Ie=a=(e=(u[d+7|0]|u[d+8|0]<<8|u[d+9|0]<<16|u[d+10|0]<<24)>>>7&2097151)+o|0,fe=e>>>0>a>>>0?n+1|0:n,e=ge(U,0,j,0),n=y,a=e,e=ge(_,0,G,0),n=y+n|0,n=e>>>0>(a=a+e|0)>>>0?n+1|0:n,o=(e=a)+(a=ge(N,0,H,0))|0,e=y+n|0,be=o,o=a>>>0>o>>>0?e+1|0:e,e=(n=u[d+6|0])>>>24|0,i=n<<8|(Ke=u[d+2|0]|u[d+3|0]<<8|u[d+4|0]<<16|u[d+5|0]<<24)>>>24,a=e,n=(e=u[d+7|0])>>>16|0,n|=a,a=o,i=a=(e=2097151&((3&n)<<30|(e=e<<16|i)>>>2))>>>0>(be=e+be|0)>>>0?a+1|0:a,We=e=a-((be>>>0<4293918720)-1|0)|0,a=(2097151&e)<<11|(Ce=be- -1048576|0)>>>21,e=(e>>>21|0)+fe|0,ye=e=a>>>0>(ve=a+Ie|0)>>>0?e+1|0:e,Ve=e=e-((ve>>>0<4293918720)-1|0)|0,a=(n=e>>>21|0)+ke|0,a=(e=(2097151&e)<<11|(we=ve- -1048576|0)>>>21)>>>0>(o=e+pe|0)>>>0?a+1|0:a,n=ge(je,Xe,666643,0),e=y+a|0,e=n>>>0>(o=n+o|0)>>>0?e+1|0:e,n=ge(et,ae,470296,0),e=y+e|0,e=n>>>0>(a=n+o|0)>>>0?e+1|0:e,o=(n=a)+(a=ge(Be,De,136657,0))|0,n=y+e|0,n=a>>>0>o>>>0?n+1|0:n,e=ge(Pe,Ge,654183,0),n=y+n|0,n=e>>>0>(a=e+o|0)>>>0?n+1|0:n,pe=(e=ge(Oe,_e,-997805,-1))+a|0,a=y+n|0,ke=a=e>>>0>pe>>>0?a+1|0:a,Fe=e=a-((pe>>>0<4293918720)-1|0)|0,a=(2097151&e)<<11|(Ie=pe- -1048576|0)>>>21,e=(e>>21)+me|0,Ue=a=(e=a>>>0>(o=a+Ue|0)>>>0?e+1|0:e)-((o>>>0<4293918720)-1|0)|0,fe=(2097151&a)<<11|(me=o- -1048576|0)>>>21,a=(a>>21)+qe|0,Ne=Re=fe+He|0,Re=fe>>>0>Re>>>0?a+1|0:a,fe=o,n=e,o=(Ee-(e=-2097152&he)|0)+(he=(2097151&Se)<<11|xe>>>21)|0,e=(Te-((e>>>0>Ee>>>0)+ze|0)|0)+(Se>>21)|0,xe=e=o>>>0>>0?e+1|0:e,He=e=e-((o>>>0<4293918720)-1|0)|0,Ee=a=e>>21,e=ge(je=(2097151&e)<<11|(Se=o- -1048576|0)>>>21,a,-683901,-1),n=y+n|0,n=e>>>0>(a=e+fe|0)>>>0?n+1|0:n,qe=a-(e=-2097152&me)|0,Ze=n-((e>>>0>a>>>0)+Ue|0)|0,n=ge(je,Ee,136657,0),e=y+ke|0,e=n>>>0>(a=n+pe|0)>>>0?e+1|0:e,Je=a-(n=-2097152&Ie)|0,Fe=e-((n>>>0>a>>>0)+Fe|0)|0,n=ge(et,ae,666643,0),e=y+(ye-(((a=-2097152&we)>>>0>ve>>>0)+Ve|0)|0)|0,e=n>>>0>(fe=n+(ve-a|0)|0)>>>0?e+1|0:e,a=ge(Be,De,-997805,-1),n=y+e|0,n=a>>>0>(fe=a+fe|0)>>>0?n+1|0:n,e=ge(Pe,Ge,470296,0),a=y+n|0,a=e>>>0>(fe=e+fe|0)>>>0?a+1|0:a,n=ge(Oe,_e,654183,0),e=y+a|0,Ue=fe=n+fe|0,ke=n>>>0>fe>>>0?e+1|0:e,a=Ke>>>5&2097151,e=ge(U,0,G,0),n=y,me=e,e=ge(_,0,H,0),n=y+n|0,e=e>>>0>(fe=me+e|0)>>>0?n+1|0:n,me=n=a+fe|0,a=e=n>>>0>>0?e+1|0:e,ve=(n=ge(U,0,H,0))+(e=(e=u[d+2|0])<<16&2031616|u[0|d]|u[d+1|0]<<8)|0,n=y,he=n=e>>>0>ve>>>0?n+1|0:n,ze=n=n-((ve>>>0<4293918720)-1|0)|0,e=(e=n>>>21|0)+a|0,we=e=(n=(2097151&n)<<11|(ye=ve- -1048576|0)>>>21)>>>0>(Te=n+me|0)>>>0?e+1|0:e,Ke=n=e-((Te>>>0<4293918720)-1|0)|0,a=(2097151&n)<<11|(pe=Te- -1048576|0)>>>21,n=(n>>>21|0)+i|0,n=a>>>0>(fe=a+be|0)>>>0?n+1|0:n,a=ge(Be,De,654183,0),e=y+(n-(((i=-2097152&Ce)>>>0>fe>>>0)+We|0)|0)|0,e=a>>>0>(be=a+(fe-i|0)|0)>>>0?e+1|0:e,n=ge(Pe,Ge,666643,0),e=y+e|0,e=n>>>0>(a=n+be|0)>>>0?e+1|0:e,Ie=(n=a)+(a=ge(Oe,_e,470296,0))|0,n=y+e|0,me=n=a>>>0>Ie>>>0?n+1|0:n,Ve=n=n-((Ie>>>0<4293918720)-1|0)|0,a=(e=n>>21)+ke|0,Ce=n=(a=(n=(2097151&n)<<11|(fe=Ie- -1048576|0)>>>21)>>>0>(be=n+Ue|0)>>>0?a+1|0:a)-((be>>>0<4293918720)-1|0)|0,ke=(2097151&n)<<11|(i=be- -1048576|0)>>>21,n=(n>>21)+Fe|0,Ge=Pe=ke+Je|0,ke=ke>>>0>Pe>>>0?n+1|0:n,e=ge(je,Ee,-997805,-1),n=y+a|0,n=e>>>0>(be=e+be|0)>>>0?n+1|0:n,Fe=be-(e=-2097152&i)|0,Ue=n-((e>>>0>be>>>0)+Ce|0)|0,n=ge(je,Ee,654183,0),e=y+me|0,e=n>>>0>(a=n+Ie|0)>>>0?e+1|0:e,Pe=a-(n=-2097152&fe)|0,Ce=e-((n>>>0>a>>>0)+Ve|0)|0,e=ge(Be,De,470296,0),a=y+(we-(((n=-2097152&pe)>>>0>Te>>>0)+Ke|0)|0)|0,a=e>>>0>(i=e+(Te-n|0)|0)>>>0?a+1|0:a,n=ge(Oe,_e,666643,0),e=y+a|0,be=i=n+i|0,a=n>>>0>i>>>0?e+1|0:e,n=ge(Be,De,666643,0),e=y+(he-((4095&ze)+((i=-2097152&ye)>>>0>ve>>>0)|0)|0)|0,Ie=e=n>>>0>(pe=n+(ve-i|0)|0)>>>0?e+1|0:e,he=e=e-((pe>>>0<4293918720)-1|0)|0,i=(2097151&e)<<11|(me=pe- -1048576|0)>>>21,e=(e>>21)+a|0,a=e=i>>>0>(fe=i+be|0)>>>0?e+1|0:e,ye=e=e-((fe>>>0<4293918720)-1|0)|0,i=(2097151&e)<<11|(be=fe- -1048576|0)>>>21,e=(e>>21)+Ce|0,i=i>>>0>(we=i+Pe|0)>>>0?e+1|0:e,e=ge(je,Ee,470296,0),a=y+a|0,a=e>>>0>(n=e+fe|0)>>>0?a+1|0:a,fe=n-(e=-2097152&be)|0,be=a-((e>>>0>n>>>0)+ye|0)|0,n=ge(je,Ee,666643,0),e=y+(Ie-(((a=-2097152&me)>>>0>pe>>>0)+he|0)|0)|0,n=(a=(e=n>>>0>(Te=n+(pe-a|0)|0)>>>0?e+1|0:e)>>21)+be|0,e=(e=(n=(e=(2097151&e)<<11|Te>>>21)>>>0>(Ce=e+fe|0)>>>0?n+1|0:n)>>21)+i|0,n=(n=(e=(n=(2097151&n)<<11|Ce>>>21)>>>0>(he=n+we|0)>>>0?e+1|0:e)>>21)+Ue|0,a=(e=(n=(e=(2097151&e)<<11|he>>>21)>>>0>(i=e+Fe|0)>>>0?n+1|0:n)>>21)+ke|0,e=(n=(a=(n=(2097151&n)<<11|i>>>21)>>>0>(ye=n+Ge|0)>>>0?a+1|0:a)>>21)+Ze|0,n=(a=(e=(a=(2097151&a)<<11|ye>>>21)>>>0>(we=a+qe|0)>>>0?e+1|0:e)>>21)+Re|0,e=(e=(n=(e=(2097151&e)<<11|we>>>21)>>>0>(pe=e+Ne|0)>>>0?n+1|0:n)>>21)+Ye|0,n=(n=(e=(n=(2097151&n)<<11|pe>>>21)>>>0>(ke=n+Le|0)>>>0?e+1|0:e)>>21)+Me|0,a=(e=(n=(e=(2097151&e)<<11|ke>>>21)>>>0>(Ie=e+Qe|0)>>>0?n+1|0:n)>>21)+tt|0,e=(n=(a=(n=(2097151&n)<<11|Ie>>>21)>>>0>(me=n+it|0)>>>0?a+1|0:a)>>21)+rt|0,be=(Se=o-(n=-2097152&Se)|0)+((2097151&(e=(a=(2097151&a)<<11|me>>>21)>>>0>(fe=a+ot|0)>>>0?e+1|0:e))<<11|fe>>>21)|0,e=(xe-((n>>>0>o>>>0)+He|0)|0)+(e>>21)|0,Se=n=(e=be>>>0>>0?e+1|0:e)>>21,Te=(e=ge(Re=(2097151&e)<<11|be>>>21,n,666643,0))+(n=2097151&Te)|0,e=y,o=e=n>>>0>Te>>>0?e+1|0:e,s[0|r]=Te,s[r+1|0]=(255&e)<<24|Te>>>8,e=2097151&Ce,n=ge(Re,Se,470296,0)+e|0,a=y,e=(o>>21)+(e>>>0>n>>>0?a+1|0:a)|0,e=(xe=(2097151&o)<<11|Te>>>21)>>>0>(Ce=xe+n|0)>>>0?e+1|0:e,s[r+4|0]=(2047&e)<<21|Ce>>>11,n=e,a=Ce,s[r+3|0]=(7&e)<<29|a>>>3,s[r+2|0]=31&((65535&o)<<16|Te>>>16)|a<<5,o=2097151&he,he=ge(Re,Se,654183,0)+o|0,e=y,Ce=(2097151&n)<<11|a>>>21,n=(n>>21)+(o=o>>>0>he>>>0?e+1|0:e)|0,e=n=(he=Ce+he|0)>>>0>>0?n+1|0:n,s[r+6|0]=(63&e)<<26|he>>>6,o=he,he=0,s[r+5|0]=he<<13|(1572864&a)>>>19|o<<2,a=2097151&i,i=ge(Re,Se,-997805,-1)+a|0,n=y,n=a>>>0>i>>>0?n+1|0:n,he=(2097151&(a=e))<<11|o>>>21,a=(e>>=21)+n|0,a=(i=he+i|0)>>>0>>0?a+1|0:a,s[r+9|0]=(511&a)<<23|i>>>9,s[r+8|0]=(1&a)<<31|i>>>1,n=0,s[r+7|0]=n<<18|(2080768&o)>>>14|i<<7,n=2097151&ye,o=ge(Re,Se,136657,0)+n|0,e=y,e=n>>>0>o>>>0?e+1|0:e,ye=(2097151&(n=a))<<11|i>>>21,n=e+(a=n>>21)|0,n=(o=ye+o|0)>>>0>>0?n+1|0:n,s[r+12|0]=(4095&n)<<20|o>>>12,a=o,s[r+11|0]=(15&n)<<28|a>>>4,o=0,s[r+10|0]=o<<15|(1966080&i)>>>17|a<<4,o=2097151&we,i=ge(Re,Se,-683901,-1)+o|0,e=y,e=o>>>0>i>>>0?e+1|0:e,o=n,n=e+(n>>=21)|0,n=(o=(we=i)+(i=(2097151&o)<<11|a>>>21)|0)>>>0>>0?n+1|0:n,s[r+14|0]=(127&n)<<25|o>>>7,i=0,s[r+13|0]=i<<12|(1048576&a)>>>20|o<<1,e=n>>21,a=(n=(2097151&n)<<11|o>>>21)>>>0>(i=n+(2097151&pe)|0)>>>0?e+1|0:e,s[r+17|0]=(1023&a)<<22|i>>>10,s[r+16|0]=(3&a)<<30|i>>>2,n=0,s[r+15|0]=n<<17|(2064384&o)>>>15|i<<6,e=a>>21,e=(n=(2097151&a)<<11|i>>>21)>>>0>(a=n+(2097151&ke)|0)>>>0?e+1|0:e,s[r+20|0]=(8191&e)<<19|a>>>13,s[r+19|0]=(31&e)<<27|a>>>5,o=(n=2097151&Ie)+(Ie=(2097151&e)<<11|a>>>21)|0,n=e>>21,n=o>>>0>>0?n+1|0:n,Ie=o,s[r+21|0]=o,ke=0,s[r+18|0]=ke<<14|(1835008&i)>>>18|a<<3,s[r+22|0]=(255&n)<<24|o>>>8,a=n>>21,a=(o=(i=(2097151&n)<<11|o>>>21)+(2097151&me)|0)>>>0>>0?a+1|0:a,s[r+25|0]=(2047&a)<<21|o>>>11,s[r+24|0]=(7&a)<<29|o>>>3,s[r+23|0]=31&((65535&n)<<16|Ie>>>16)|o<<5,e=a>>21,e=(n=(2097151&a)<<11|o>>>21)>>>0>(a=n+(2097151&fe)|0)>>>0?e+1|0:e,s[r+27|0]=(63&e)<<26|a>>>6,i=0,s[r+26|0]=i<<13|(1572864&o)>>>19|a<<2,n=e>>21,n=(e=(o=(2097151&e)<<11|a>>>21)+(2097151&be)|0)>>>0>>0?n+1|0:n,s[r+31|0]=(131071&n)<<15|e>>>17,s[r+30|0]=(511&n)<<23|e>>>9,s[r+29|0]=(1&n)<<31|e>>>1,o=0,s[r+28|0]=o<<18|(2080768&a)>>>14|e<<7,$e(l,64),$e(d,64),t&&(c[t>>2]=64,c[t+4>>2]=0),g=f+560|0,0}function k(e,t,n,a){for(var o=0,r=0,i=0,s=0,d=0,l=0,f=0,p=0,b=0,m=0,h=0,g=0,v=0,w=0,k=0,A=0,x=0,I=0,T=0,S=0,C=0,E=0,R=0,M=0,P=0,U=0,_=0,B=0,D=0,N=0,O=0,F=0,L=0,j=0,H=0,G=0,z=0;i=(o=f<<3)+n|0,r=u[0|(o=t+o|0)]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,C=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,d=r<<24|(65280&r)<<8,b=(l=16711680&r)<<24,l=l>>>8|0,o=(p=-16777216&r)>>>24|0,c[i>>2]=b|p<<8|-16777216&((255&C)<<24|r>>>8)|16711680&((16777215&C)<<8|r>>>24)|C>>>8&65280|C>>>24,r=o|l|d,o=0,c[i+4>>2]=r|o|o,16!=(0|(f=f+1|0)););for(t=c[e+4>>2],c[a>>2]=c[e>>2],c[a+4>>2]=t,t=c[e+60>>2],c[a+56>>2]=c[e+56>>2],c[a+60>>2]=t,t=c[e+52>>2],c[a+48>>2]=c[e+48>>2],c[a+52>>2]=t,t=c[e+44>>2],c[a+40>>2]=c[e+40>>2],c[a+44>>2]=t,t=c[e+36>>2],c[a+32>>2]=c[e+32>>2],c[a+36>>2]=t,t=c[e+28>>2],c[a+24>>2]=c[e+24>>2],c[a+28>>2]=t,t=c[e+20>>2],c[a+16>>2]=c[e+16>>2],c[a+20>>2]=t,t=c[e+12>>2],c[a+8>>2]=c[e+8>>2],c[a+12>>2]=t;p=c[a+56>>2],d=c[a+60>>2],o=c[(t=C=(E=z<<3)+n|0)>>2],t=c[t+4>>2],x=r=c[a+36>>2],r=de(f=c[a+32>>2],r,50),i=y,r=de(f,x,46)^r,i^=y,r=de(f,x,23)^r,t=(y^i)+t|0,t=(o=r+o|0)>>>0>>0?t+1|0:t,o=(i=c[(r=E+34e3|0)>>2])+o|0,t=c[r+4>>2]+t|0,t=o>>>0>>0?t+1|0:t,r=(b=((i=c[a+48>>2])^(l=c[a+40>>2]))&f^i)+o|0,o=(((A=c[a+52>>2])^(m=c[a+44>>2]))&x^A)+t|0,t=(r>>>0>>0?o+1|0:o)+d|0,t=(o=r)>>>0>(r=r+p|0)>>>0?t+1|0:t,p=(d=c[a+24>>2])+r|0,o=c[a+28>>2]+t|0,h=o=d>>>0>p>>>0?o+1|0:o,c[a+24>>2]=p,c[a+28>>2]=o,T=o=c[a+4>>2],o=de(v=c[a>>2],o,36),d=y,o=de(v,T,30)^o,b=y^d,d=r+(de(v,T,25)^o)|0,o=t+(y^b)|0,o=r>>>0>d>>>0?o+1|0:o,b=(t=d)+(d=v&((r=c[a+16>>2])|(w=c[a+8>>2]))|r&w)|0,t=(t=o)+(T&((o=c[a+20>>2])|(I=c[a+12>>2]))|o&I)|0,d=t=d>>>0>b>>>0?t+1|0:t,c[a+56>>2]=b,c[a+60>>2]=t,s=r,g=o,S=c[(t=O=(k=8|E)+n|0)>>2],N=c[t+4>>2],o=((m^x)&h^m)+A|0,o=(t=(r=(l^f)&p^l)+i|0)>>>0>>0?o+1|0:o,r=de(p,h,50),i=y,r=de(p,h,46)^r,i^=y,r=(A=de(p,h,23)^r)+t|0,t=(y^i)+o|0,t=(r>>>0>>0?t+1|0:t)+N|0,t=(o=r+S|0)>>>0>>0?t+1|0:t,r=(r=o)+(i=c[(o=k+34e3|0)>>2])|0,o=c[o+4>>2]+t|0,o=(t=r>>>0>>0?o+1|0:o)+g|0,k=o=(s=r+s|0)>>>0>>0?o+1|0:o,c[a+16>>2]=s,c[a+20>>2]=o,t=t+((I|T)&d|I&T)|0,t=(o=r+((v|w)&b|v&w)|0)>>>0>>0?t+1|0:t,r=de(b,d,36),i=y,r=de(b,d,30)^r,g=y^i,i=o,o=de(b,d,25)^r,t=(y^g)+t|0,g=t=o>>>0>(i=i+o|0)>>>0?t+1|0:t,c[a+48>>2]=i,c[a+52>>2]=t,t=(t=l)+(l=c[(o=N=(r=16|E)+n|0)>>2])|0,o=c[o+4>>2]+m|0,o=t>>>0>>0?o+1|0:o,r=(m=t)+(l=c[(t=r+34e3|0)>>2])|0,t=c[t+4>>2]+o|0,t=((h^x)&k^x)+(t=r>>>0>>0?t+1|0:t)|0,t=(o=(o=r)+(r=(p^f)&s^f)|0)>>>0>>0?t+1|0:t,r=de(s,k,50),l=y,r=de(s,k,46)^r,l^=y,r=(m=de(s,k,23)^r)+o|0,o=(y^l)+t|0,A=o=r>>>0>>0?o+1|0:o,t=o,o=de(i,g,36),l=y,o=de(i,g,30)^o,m=y^l,S=de(i,g,25)^o,o=((d|T)&g|d&T)+(y^m)|0,t=((l=S+((b|v)&i|b&v)|0)>>>0>>0?o+1|0:o)+t|0,m=t=(o=l)>>>0>(l=r+l|0)>>>0?t+1|0:t,c[a+40>>2]=l,c[a+44>>2]=t,o=A+I|0,I=o=(w=r+w|0)>>>0>>0?o+1|0:o,c[a+8>>2]=w,c[a+12>>2]=o,o=(o=f)+(f=c[(t=U=(r=24|E)+n|0)>>2])|0,t=c[t+4>>2]+x|0,t=o>>>0>>0?t+1|0:t,r=(x=o)+(f=c[(o=r+34e3|0)>>2])|0,o=c[o+4>>2]+t|0,o=(h^(h^k)&I)+(o=r>>>0>>0?o+1|0:o)|0,o=(t=(t=r)+(r=p^(p^s)&w)|0)>>>0>>0?o+1|0:o,r=de(w,I,50),f=y,r=de(w,I,46)^r,f^=y,r=(A=de(w,I,23)^r)+t|0,t=(y^f)+o|0,t=r>>>0>>0?t+1|0:t,o=de(l,m,36),f=y,o=de(l,m,30)^o,A=y^f,x=de(l,m,25)^o,o=((d|g)&m|d&g)+(y^A)|0,o=((f=x+((i|b)&l|i&b)|0)>>>0>>0?o+1|0:o)+t|0,A=o=(x=f)>>>0>(f=r+f|0)>>>0?o+1|0:o,c[a+32>>2]=f,c[a+36>>2]=o,t=t+T|0,T=t=(v=r+v|0)>>>0>>0?t+1|0:t,c[a>>2]=v,c[a+4>>2]=t,r=c[(o=F=(t=32|E)+n|0)>>2],o=h+c[o+4>>2]|0,o=(r=r+p|0)>>>0

>>0?o+1|0:o,r=(p=c[(t=t+34e3|0)>>2])+r|0,t=c[t+4>>2]+o|0,t=(k^(k^I)&T)+(t=r>>>0

>>0?t+1|0:t)|0,t=(o=(o=r)+(r=s^(s^w)&v)|0)>>>0>>0?t+1|0:t,r=de(v,T,50),p=y,r=de(v,T,46)^r,p^=y,r=(h=de(v,T,23)^r)+o|0,o=(y^p)+t|0,x=o=r>>>0>>0?o+1|0:o,t=o,o=de(f,A,36),p=y,o=de(f,A,30)^o,h=y^p,S=de(f,A,25)^o,o=((m|g)&A|m&g)+(y^h)|0,t=((p=S+((i|l)&f|i&l)|0)>>>0>>0?o+1|0:o)+t|0,p=t=(h=r+p|0)>>>0

>>0?t+1|0:t,c[a+24>>2]=h,c[a+28>>2]=t,o=d+x|0,x=o=(d=r+b|0)>>>0>>0?o+1|0:o,c[a+56>>2]=d,c[a+60>>2]=o,r=c[(t=B=(o=40|E)+n|0)>>2],t=k+c[t+4>>2]|0,t=(r=r+s|0)>>>0>>0?t+1|0:t,r=(b=c[(o=o+34e3|0)>>2])+r|0,o=c[o+4>>2]+t|0,o=(I^(I^T)&x)+(o=r>>>0>>0?o+1|0:o)|0,o=(t=(t=r)+(r=w^(v^w)&d)|0)>>>0>>0?o+1|0:o,r=de(d,x,50),b=y,r=de(d,x,46)^r,b^=y,r=(s=de(d,x,23)^r)+t|0,t=(y^b)+o|0,t=r>>>0>>0?t+1|0:t,o=de(h,p,36),b=y,o=de(h,p,30)^o,s=y^b,k=de(h,p,25)^o,o=((m|A)&p|m&A)+(y^s)|0,o=((b=k+((l|f)&h|l&f)|0)>>>0>>0?o+1|0:o)+t|0,b=o=(s=r+b|0)>>>0>>0?o+1|0:o,c[a+16>>2]=s,c[a+20>>2]=o,t=t+g|0,k=t=(g=r+i|0)>>>0>>0?t+1|0:t,c[a+48>>2]=g,c[a+52>>2]=t,r=c[(o=D=(t=48|E)+n|0)>>2],o=I+c[o+4>>2]|0,o=(r=r+w|0)>>>0>>0?o+1|0:o,r=(i=c[(t=t+34e3|0)>>2])+r|0,t=c[t+4>>2]+o|0,t=(T^(x^T)&k)+(t=r>>>0>>0?t+1|0:t)|0,t=(o=(o=r)+(r=v^(d^v)&g)|0)>>>0>>0?t+1|0:t,r=de(g,k,50),i=y,r=de(g,k,46)^r,i^=y,r=(w=de(g,k,23)^r)+o|0,o=(y^i)+t|0,I=o=r>>>0>>0?o+1|0:o,t=o,o=de(s,b,36),i=y,o=de(s,b,30)^o,w=y^i,S=de(s,b,25)^o,o=((p|A)&b|p&A)+(y^w)|0,t=((i=S+((f|h)&s|f&h)|0)>>>0>>0?o+1|0:o)+t|0,w=t=(o=i)>>>0>(i=r+i|0)>>>0?t+1|0:t,c[a+8>>2]=i,c[a+12>>2]=t,o=m+I|0,I=o=(S=r+l|0)>>>0>>0?o+1|0:o,c[a+40>>2]=S,c[a+44>>2]=o,r=c[(t=_=(o=56|E)+n|0)>>2],t=T+c[t+4>>2]|0,t=(r=r+v|0)>>>0>>0?t+1|0:t,r=(l=c[(o=o+34e3|0)>>2])+r|0,o=c[o+4>>2]+t|0,o=(x^(k^x)&I)+(o=r>>>0>>0?o+1|0:o)|0,o=(t=(t=r)+(r=d^(d^g)&S)|0)>>>0>>0?o+1|0:o,r=de(S,I,50),l=y,r=de(S,I,46)^r,l^=y,r=(m=de(S,I,23)^r)+t|0,t=(y^l)+o|0,t=r>>>0>>0?t+1|0:t,o=de(i,w,36),l=y,o=de(i,w,30)^o,m=y^l,v=de(i,w,25)^o,o=((p|b)&w|p&b)+(y^m)|0,o=((l=v+((s|h)&i|s&h)|0)>>>0>>0?o+1|0:o)+t|0,m=o=(m=l)>>>0>(l=r+l|0)>>>0?o+1|0:o,c[a>>2]=l,c[a+4>>2]=o,t=t+A|0,T=t=(o=f)>>>0>(f=r+f|0)>>>0?t+1|0:t,c[a+32>>2]=f,c[a+36>>2]=t,r=c[(o=L=(t=64|E)+n|0)>>2],o=x+c[o+4>>2]|0,o=(r=r+d|0)>>>0>>0?o+1|0:o,r=(d=c[(t=t+34e3|0)>>2])+r|0,t=c[t+4>>2]+o|0,t=(k^(k^I)&T)+(t=r>>>0>>0?t+1|0:t)|0,t=(o=(o=r)+(r=g^(g^S)&f)|0)>>>0>>0?t+1|0:t,r=de(f,T,50),d=y,r=de(f,T,46)^r,d^=y,r=(A=de(f,T,23)^r)+o|0,o=(y^d)+t|0,v=o=r>>>0>>0?o+1|0:o,t=o,o=de(l,m,36),d=y,o=de(l,m,30)^o,A=y^d,x=de(l,m,25)^o,o=((b|w)&m|b&w)+(y^A)|0,t=((d=x+((i|s)&l|i&s)|0)>>>0>>0?o+1|0:o)+t|0,d=t=(A=r+d|0)>>>0>>0?t+1|0:t,c[a+56>>2]=A,c[a+60>>2]=t,o=p+v|0,x=o=(p=r+h|0)>>>0>>0?o+1|0:o,c[a+24>>2]=p,c[a+28>>2]=o,r=c[(t=R=(o=72|E)+n|0)>>2],t=k+c[t+4>>2]|0,t=(r=r+g|0)>>>0>>0?t+1|0:t,r=(g=c[(o=o+34e3|0)>>2])+r|0,o=c[o+4>>2]+t|0,o=(I^(I^T)&x)+(o=r>>>0>>0?o+1|0:o)|0,o=(t=(t=r)+(r=S^(f^S)&p)|0)>>>0>>0?o+1|0:o,r=de(p,x,50),g=y,r=de(p,x,46)^r,g^=y,r=(v=de(p,x,23)^r)+t|0,t=(y^g)+o|0,t=r>>>0>>0?t+1|0:t,o=de(A,d,36),g=y,o=de(A,d,30)^o,v=y^g,h=de(A,d,25)^o,o=((m|w)&d|m&w)+(y^v)|0,o=((g=h+((i|l)&A|i&l)|0)>>>0>>0?o+1|0:o)+t|0,g=o=(v=r+g|0)>>>0>>0?o+1|0:o,c[a+48>>2]=v,c[a+52>>2]=o,t=t+b|0,k=t=(b=r+s|0)>>>0>>0?t+1|0:t,c[a+16>>2]=b,c[a+20>>2]=t,t=(s=c[(o=P=(r=80|E)+n|0)>>2])+S|0,o=c[o+4>>2]+I|0,o=t>>>0>>0?o+1|0:o,r=(h=t)+(s=c[(t=r+34e3|0)>>2])|0,t=c[t+4>>2]+o|0,t=(T^(x^T)&k)+(t=r>>>0>>0?t+1|0:t)|0,t=(o=(o=r)+(r=f^(p^f)&b)|0)>>>0>>0?t+1|0:t,r=de(b,k,50),s=y,r=de(b,k,46)^r,s^=y,r=(h=de(b,k,23)^r)+o|0,o=(y^s)+t|0,I=o=r>>>0>>0?o+1|0:o,t=o,o=de(v,g,36),s=y,o=de(v,g,30)^o,h=y^s,S=de(v,g,25)^o,o=((d|m)&g|d&m)+(y^h)|0,t=((s=S+((l|A)&v|l&A)|0)>>>0>>0?o+1|0:o)+t|0,s=t=(h=r+s|0)>>>0>>0?t+1|0:t,c[a+40>>2]=h,c[a+44>>2]=t,o=w+I|0,I=o=(w=r+i|0)>>>0>>0?o+1|0:o,c[a+8>>2]=w,c[a+12>>2]=o,o=34e3+(t=88|E)|0,i=c[(t=M=t+n|0)>>2],r=c[o>>2]+i|0,t=c[o+4>>2]+c[t+4>>2]|0,o=T+(r>>>0>>0?t+1|0:t)|0,o=(x^(k^x)&I)+(o=(t=r+f|0)>>>0>>0?o+1|0:o)|0,o=(t=(r=p^(p^b)&w)+t|0)>>>0>>0?o+1|0:o,r=de(w,I,50),i=y,r=de(w,I,46)^r,i^=y,r=(f=de(w,I,23)^r)+t|0,t=(y^i)+o|0,t=r>>>0>>0?t+1|0:t,o=de(h,s,36),i=y,o=de(h,s,30)^o,f=y^i,T=de(h,s,25)^o,o=((d|g)&s|d&g)+(y^f)|0,o=((i=T+((v|A)&h|v&A)|0)>>>0>>0?o+1|0:o)+t|0,f=o=(f=i)>>>0>(i=r+i|0)>>>0?o+1|0:o,c[a+32>>2]=i,c[a+36>>2]=o,t=t+m|0,m=t=(o=l)>>>0>(l=r+l|0)>>>0?t+1|0:t,c[a>>2]=l,c[a+4>>2]=t,o=34e3+(t=96|E)|0,T=c[(t=j=t+n|0)>>2],r=c[o>>2]+T|0,o=c[o+4>>2]+c[t+4>>2]|0,t=x+(r>>>0>>0?o+1|0:o)|0,t=(o=r+p|0)>>>0

>>0?t+1|0:t,r=(p=b^(b^w)&l)+o|0,o=(k^(k^I)&m)+t|0,o=r>>>0

>>0?o+1|0:o,t=de(l,m,50),p=y,t=de(l,m,46)^t,p^=y,x=r,r=de(l,m,23)^t,o=(y^p)+o|0,x=o=(t=x+r|0)>>>0>>0?o+1|0:o,r=t,t=de(i,f,36),p=y,t=de(i,f,30)^t,T=y^p,S=de(i,f,25)^t,t=((s|g)&f|s&g)+(y^T)|0,o=((p=S+((v|h)&i|v&h)|0)>>>0>>0?t+1|0:t)+o|0,p=o=(T=r+p|0)>>>0

>>0?o+1|0:o,c[a+24>>2]=T,c[a+28>>2]=o,o=d+x|0,d=o=(A=r+A|0)>>>0>>0?o+1|0:o,c[a+56>>2]=A,c[a+60>>2]=o,o=34e3+(t=104|E)|0,x=c[(t=G=t+n|0)>>2],r=c[o>>2]+x|0,t=c[o+4>>2]+c[t+4>>2]|0,o=k+(r>>>0>>0?t+1|0:t)|0,o=(t=r+b|0)>>>0>>0?o+1|0:o,r=(b=w^(l^w)&A)+t|0,t=(I^(m^I)&d)+o|0,t=r>>>0>>0?t+1|0:t,o=de(A,d,50),b=y,o=de(A,d,46)^o,b^=y,k=de(A,d,23)^o,o=(y^b)+t|0,x=o=(r=k+r|0)>>>0>>0?o+1|0:o,t=o,o=de(T,p,36),b=y,o=de(T,p,30)^o,k=y^b,S=de(T,p,25)^o,o=((s|f)&p|s&f)+(y^k)|0,t=((b=S+((i|h)&T|i&h)|0)>>>0>>0?o+1|0:o)+t|0,b=t=(k=r+b|0)>>>0>>0?t+1|0:t,c[a+16>>2]=k,c[a+20>>2]=t,t=g+x|0,g=t=(v=r+v|0)>>>0>>0?t+1|0:t,c[a+48>>2]=v,c[a+52>>2]=t,o=34e3+(t=112|E)|0,x=c[(r=S=t+n|0)>>2],t=c[o>>2]+x|0,o=c[o+4>>2]+c[r+4>>2]|0,o=I+(t>>>0>>0?o+1|0:o)|0,o=(m^(d^m)&g)+(o=(t=t+w|0)>>>0>>0?o+1|0:o)|0,o=(t=(r=l^(l^A)&v)+t|0)>>>0>>0?o+1|0:o,r=de(v,g,50),w=y,r=de(v,g,46)^r,w^=y,r=(I=de(v,g,23)^r)+t|0,t=(y^w)+o|0,x=t=r>>>0>>0?t+1|0:t,o=t,t=de(k,b,36),w=y,t=de(k,b,30)^t,I=y^w,H=de(k,b,25)^t,t=((p|f)&b|p&f)+(y^I)|0,o=((w=H+((i|T)&k|i&T)|0)>>>0>>0?t+1|0:t)+o|0,w=o=(I=r+w|0)>>>0>>0?o+1|0:o,c[a+8>>2]=I,c[a+12>>2]=o,o=s+x|0,r=o=(s=r+h|0)>>>0>>0?o+1|0:o,c[a+40>>2]=s,c[a+44>>2]=o,o=34e3+(t=120|E)|0,E=c[(t=h=t+n|0)>>2],x=c[o>>2]+E|0,o=c[o+4>>2]+c[t+4>>2]|0,t=m+(x>>>0>>0?o+1|0:o)|0,t=(d^(d^g)&r)+(t=(o=l+x|0)>>>0>>0?t+1|0:t)|0,t=(o=(l=A^(v^A)&s)+o|0)>>>0>>0?t+1|0:t,l=de(s,r,50),d=y,l=de(s,r,46)^l,d^=y,r=(l=de(s,r,23)^l)+o|0,o=(y^d)+t|0,o=r>>>0>>0?o+1|0:o,l=r,d=o,t=o,o=de(I,w,36),s=y,o=de(I,w,30)^o,g=y^s,m=de(I,w,25)^o,o=((p|b)&w|p&b)+(y^g)|0,t=((s=m+((k|T)&I|k&T)|0)>>>0>>0?o+1|0:o)+t|0,t=(r=r+s|0)>>>0>>0?t+1|0:t,c[a>>2]=r,c[a+4>>2]=t,o=d+f|0,o=(f=i)>>>0>(i=i+l|0)>>>0?o+1|0:o,c[a+32>>2]=i,c[a+36>>2]=o,64!=(0|z);)d=((z=z+16|0)<<3)+n|0,l=c[C>>2],f=c[C+4>>2],H=c[R>>2],p=t=c[R+4>>2],o=t,r=t=c[S+4>>2],t=de(I=c[S>>2],t,45),i=y,s=((63&r)<<26|I>>>6)^(t=de(I,r,3)^t),t=(r>>>6^(b=y^i))+o|0,o=((i=s+H|0)>>>0>>0?t+1|0:t)+f|0,o=(t=i+l|0)>>>0>>0?o+1|0:o,l=i=c[O+4>>2],i=de(f=c[O>>2],i,63),b=y,i=((127&l)<<25|f>>>7)^de(f,l,56)^i,o=(y^b^l>>>7)+o|0,i=o=i>>>0>(T=i+t|0)>>>0?o+1|0:o,c[d>>2]=T,c[d+4>>2]=o,f=(S=c[P>>2])+f|0,t=(d=c[P+4>>2])+l|0,o=f>>>0>>0?t+1|0:t,l=t=c[h+4>>2],t=de(x=c[h>>2],t,45),b=y,s=f,f=((63&l)<<26|x>>>6)^de(x,l,3)^t,o=(y^b^l>>>6)+o|0,f=(s=s+f|0)>>>0>>0?o+1|0:o,o=de(b=c[N>>2],t=c[N+4>>2],63),g=y,h=s,s=((127&t)<<25|b>>>7)^de(b,t,56)^o,o=(y^g^t>>>7)+f|0,f=o=s>>>0>(k=h+s|0)>>>0?o+1|0:o,c[C+136>>2]=k,c[C+140>>2]=o,o=(E=c[M>>2])+b|0,t=(b=c[M+4>>2])+t|0,s=de(T,i,45),g=y,s=(m=((63&i)<<26|T>>>6)^de(T,i,3)^s)+o|0,o=(y^g^i>>>6)+(o>>>0>>0?t+1|0:t)|0,o=s>>>0>>0?o+1|0:o,g=t=c[U+4>>2],t=de(m=c[U>>2],t,63),w=y,h=s,s=((127&g)<<25|m>>>7)^de(m,g,56)^t,o=(y^w^g>>>7)+o|0,s=o=s>>>0>(O=h+s|0)>>>0?o+1|0:o,c[C+144>>2]=O,c[C+148>>2]=o,m=(N=c[j>>2])+m|0,t=(t=g)+(g=c[j+4>>2])|0,o=m>>>0>>0?t+1|0:t,t=de(k,f,45),w=y,A=((63&f)<<26|k>>>6)^de(k,f,3)^t,o=(y^w^f>>>6)+o|0,o=(m=A+m|0)>>>0>>0?o+1|0:o,w=t=c[F+4>>2],t=de(A=c[F>>2],t,63),v=y,h=m,m=((127&w)<<25|A>>>7)^de(A,w,56)^t,o=(y^v^w>>>7)+o|0,m=o=m>>>0>(U=h+m|0)>>>0?o+1|0:o,c[C+152>>2]=U,c[C+156>>2]=o,t=(F=c[G>>2])+A|0,o=(o=w)+(w=c[G+4>>2])|0,A=de(O,s,45),v=y,A=((63&s)<<26|O>>>6)^de(O,s,3)^A,o=(y^v^s>>>6)+(t>>>0>>0?o+1|0:o)|0,A=(h=A+t|0)>>>0>>0?o+1|0:o,o=de(v=c[B>>2],t=c[B+4>>2],63),B=y,M=h,h=((127&t)<<25|v>>>7)^(o=de(v,t,56)^o),o=(t>>>7^(R=y^B))+A|0,A=o=h>>>0>(B=M+h|0)>>>0?o+1|0:o,c[C+160>>2]=B,c[C+164>>2]=o,t=t+r|0,t=(o=v+I|0)>>>0>>0?t+1|0:t,v=de(U,m,45),h=y,v=(R=((63&m)<<26|U>>>6)^de(U,m,3)^v)+o|0,o=(y^h^m>>>6)+t|0,o=v>>>0>>0?o+1|0:o,R=t=c[D+4>>2],t=de(h=c[D>>2],t,63),D=y,t=de(h,R,56)^t,M=v,o=(R>>>7^(P=y^D))+o|0,v=o=(v=((127&R)<<25|h>>>7)^t)>>>0>(D=M+v|0)>>>0?o+1|0:o,c[C+168>>2]=D,c[C+172>>2]=o,t=l+R|0,t=(o=h+x|0)>>>0>>0?t+1|0:t,M=h=c[_+4>>2],h=de(P=c[_>>2],h,63),R=y,h=(_=((127&M)<<25|P>>>7)^de(P,M,56)^h)+o|0,o=(y^R^M>>>7)+t|0,t=h>>>0<_>>>0?o+1|0:o,o=de(B,A,45),R=y,o=de(B,A,3)^o,_=y^R,R=h,t=(A>>>6^_)+t|0,h=t=(h=((63&A)<<26|B>>>6)^o)>>>0>(R=R+h|0)>>>0?t+1|0:t,c[C+176>>2]=R,c[C+180>>2]=t,j=c[L>>2],L=t=c[L+4>>2],_=t,t=de(H,p,63),o=y,G=((127&p)<<25|H>>>7)^de(H,p,56)^t,t=(y^o^p>>>7)+f|0,o=((k=G+k|0)>>>0>>0?t+1|0:t)+_|0,o=(t=k+j|0)>>>0>>0?o+1|0:o,f=de(R,h,45),k=y,_=(f=((63&h)<<26|R>>>6)^de(R,h,3)^f)+t|0,t=(y^k^h>>>6)+o|0,f=t=f>>>0>_>>>0?t+1|0:t,c[C+192>>2]=_,c[C+196>>2]=t,o=i+M|0,o=(t=T+P|0)>>>0

>>0?o+1|0:o,k=de(j,L,63),P=y,M=((127&L)<<25|j>>>7)^de(j,L,56)^k,o=(y^P^L>>>7)+o|0,t=(k=M+t|0)>>>0>>0?o+1|0:o,o=de(D,v,45),P=y,o=de(D,v,3)^o,L=k,t=(v>>>6^(M=y^P))+t|0,k=t=(k=((63&v)<<26|D>>>6)^o)>>>0>(P=L+k|0)>>>0?t+1|0:t,c[C+184>>2]=P,c[C+188>>2]=t,t=de(E,b,63),o=y,t=((127&b)<<25|E>>>7)^de(E,b,56)^t,o=(y^o^b>>>7)+d|0,t=m+(t>>>0>(M=t+S|0)>>>0?o+1|0:o)|0,t=(o=U+M|0)>>>0>>0?t+1|0:t,m=de(_,f,45),U=y,m=de(_,f,3)^m,M=y^U,U=(m^=(63&f)<<26|_>>>6)+o|0,o=(f>>>6^M)+t|0,m=o=m>>>0>U>>>0?o+1|0:o,c[C+208>>2]=U,c[C+212>>2]=o,t=de(S,d,63),o=y,M=de(S,d,56)^t,o=((t=d>>>7|0)^y^o)+p|0,t=s+((d=(S=M^((127&d)<<25|S>>>7))+H|0)>>>0>>0?o+1|0:o)|0,t=(o=d+O|0)>>>0>>0?t+1|0:t,p=de(P,k,45),d=y,s=(p=((63&k)<<26|P>>>6)^de(P,k,3)^p)+o|0,o=(y^d^k>>>6)+t|0,p=o=p>>>0>s>>>0?o+1|0:o,c[C+200>>2]=s,c[C+204>>2]=o,t=de(F,w,63),o=y,S=((127&w)<<25|F>>>7)^de(F,w,56)^t,t=(y^o^w>>>7)+g|0,o=v+((d=S+N|0)>>>0>>0?t+1|0:t)|0,o=(t=d+D|0)>>>0>>0?o+1|0:o,d=de(U,m,45),v=y,M=t,t=m>>>6|0,d=((63&m)<<26|U>>>6)^de(U,m,3)^d,o=(t^y^v)+o|0,d=o=d>>>0>(m=M+d|0)>>>0?o+1|0:o,c[C+224>>2]=m,c[C+228>>2]=o,t=de(N,g,63),o=y,t=de(N,g,56)^t,v=y^o,S=((127&g)<<25|N>>>7)^t,t=((o=g>>>7|0)^v)+b|0,o=A+((g=S+E|0)>>>0>>0?t+1|0:t)|0,o=(t=g+B|0)>>>0>>0?o+1|0:o,b=de(s,p,45),g=y,v=t,t=p>>>6|0,p=((63&p)<<26|s>>>6)^de(s,p,3)^b,t=(t^y^g)+o|0,p=t=p>>>0>(b=v+p|0)>>>0?t+1|0:t,c[C+216>>2]=b,c[C+220>>2]=t,t=de(x,l,63),o=y,g=((127&l)<<25|x>>>7)^de(x,l,56)^t,o=(y^o^l>>>7)+r|0,o=k+((t=g+I|0)>>>0>>0?o+1|0:o)|0,t=(s=t+P|0)>>>0

>>0?o+1|0:o,o=de(m,d,45),g=y,k=s,s=de(m,d,3)^o,o=d>>>6|0,d=k+(s^=(63&d)<<26|m>>>6)|0,t=(o^y^g)+t|0,c[C+240>>2]=d,c[C+244>>2]=d>>>0>>0?t+1|0:t,t=de(I,r,63),o=y,t=de(I,r,56)^t,d=y^o,o=((o=r>>>7|0)^d)+w|0,t=h+((t^=(127&r)<<25|I>>>7)>>>0>(r=t+F|0)>>>0?o+1|0:o)|0,t=(o=r+R|0)>>>0>>0?t+1|0:t,r=de(b,p,45),d=y,s=o,o=p>>>6|0,r=((63&p)<<26|b>>>6)^de(b,p,3)^r,o=(o^y^d)+t|0,r=o=r>>>0>(p=s+r|0)>>>0?o+1|0:o,c[C+232>>2]=p,c[C+236>>2]=o,t=de(T,i,63),o=y,s=de(T,i,56)^t,o=((t=i>>>7|0)^y^o)+l|0,t=f+((i=(d=s^((127&i)<<25|T>>>7))+x|0)>>>0>>0?o+1|0:o)|0,t=(o=i+_|0)>>>0<_>>>0?t+1|0:t,i=de(p,r,45),l=y,f=o,o=r>>>6|0,r=f+(i=((63&r)<<26|p>>>6)^de(p,r,3)^i)|0,o=(o^y^l)+t|0,c[C+248>>2]=r,c[C+252>>2]=r>>>0>>0?o+1|0:o;t=t+c[e+4>>2]|0,t=(n=r+c[e>>2]|0)>>>0>>0?t+1|0:t,c[e>>2]=n,c[e+4>>2]=t,o=c[e+12>>2]+c[a+12>>2]|0,t=(n=c[a+8>>2])+c[e+8>>2]|0,c[e+8>>2]=t,c[e+12>>2]=t>>>0>>0?o+1|0:o,o=c[e+20>>2]+c[a+20>>2]|0,t=(n=c[a+16>>2])+c[e+16>>2]|0,c[e+16>>2]=t,c[e+20>>2]=t>>>0>>0?o+1|0:o,t=c[e+28>>2]+c[a+28>>2]|0,n=(o=c[a+24>>2])+c[e+24>>2]|0,c[e+24>>2]=n,c[e+28>>2]=n>>>0>>0?t+1|0:t,o=c[e+36>>2]+c[a+36>>2]|0,t=(n=c[a+32>>2])+c[e+32>>2]|0,c[e+32>>2]=t,c[e+36>>2]=t>>>0>>0?o+1|0:o,t=c[e+44>>2]+c[a+44>>2]|0,n=(o=c[a+40>>2])+c[e+40>>2]|0,c[e+40>>2]=n,c[e+44>>2]=n>>>0>>0?t+1|0:t,o=c[e+52>>2]+c[a+52>>2]|0,t=(n=c[a+48>>2])+c[e+48>>2]|0,c[e+48>>2]=t,c[e+52>>2]=t>>>0>>0?o+1|0:o,o=c[e+60>>2]+c[a+60>>2]|0,t=(n=c[a+56>>2])+c[e+56>>2]|0,c[e+56>>2]=t,c[e+60>>2]=t>>>0>>0?o+1|0:o}function A(e){var t,n,a,o,r,i,c,d,l,f,p=0,b=0,m=0,h=0,g=0,v=0,w=0,k=0,A=0,x=0,I=0,T=0,S=0,C=0,E=0,R=0,M=0,P=0,U=0,_=0,B=0,D=0,N=0,O=0,F=0,L=0,j=0,H=0,G=0,z=0,K=0,W=0,Z=0,V=0,q=0,Q=0,J=0,Y=0;h=(T=u[e+44|0]|u[e+45|0]<<8|u[e+46|0]<<16|u[e+47|0]<<24)>>>5&2097151,m=ge(D=(u[e+60|0]|u[e+61|0]<<8|u[e+62|0]<<16|u[e+63|0]<<24)>>>3|0,0,-683901,-1),b=(p=u[e+44|0])<<16&2031616|u[e+42|0]|u[e+43|0]<<8,p=y,k=p=b>>>0>(A=m+b|0)>>>0?p+1|0:p,R=p=p-((A>>>0<4293918720)-1|0)|0,m=p>>21,p=(b=h)+(h=(2097151&p)<<11|(v=A- -1048576|0)>>>21)|0,b=m,z=b=p>>>0>>0?b+1|0:b,K=p,U=ge(p,b,-683901,-1),x=y,w=ge(t=(u[e+49|0]|u[e+50|0]<<8|u[e+51|0]<<16|u[e+52|0]<<24)>>>7&2097151,0,-997805,-1),m=(p=u[e+27|0])>>>24|0,h=p<<8|(S=u[e+23|0]|u[e+24|0]<<8|u[e+25|0]<<16|u[e+26|0]<<24)>>>24,b=(p=u[e+28|0])>>>16|0,b=2097151&((3&(b|=m))<<30|(p=h|p<<16)>>>2),p=y,p=b>>>0>(m=b+w|0)>>>0?p+1|0:p,b=ge(j=(C=u[e+52|0]|u[e+53|0]<<8|u[e+54|0]<<16|u[e+55|0]<<24)>>>4&2097151,0,654183,0),p=y+p|0,w=m=b+m|0,m=b>>>0>m>>>0?p+1|0:p,g=(b=u[e+48|0])<<8|T>>>24,b=p=b>>>24|0,p=ge(n=2097151&((3&(T=(p=(h=u[e+49|0])>>>16|0)|b))<<30|(b=(h<<=16)|g)>>>2),0,136657,0),m=y+m|0,m=p>>>0>(b=p+w|0)>>>0?m+1|0:m,h=(p=ge(a=(u[e+57|0]|u[e+58|0]<<8|u[e+59|0]<<16|u[e+60|0]<<24)>>>6&2097151,0,666643,0))+b|0,b=y+m|0,w=h,m=p>>>0>h>>>0?b+1|0:b,b=(p=u[e+56|0])>>>24|0,g=p<<8|C>>>24,b=ge(o=2097151&((1&(C=(p=(h=u[e+57|0])>>>16|0)|b))<<31|(b=(h<<=16)|g)>>>1),0,470296,0),p=y+m|0,b=(p=(m=h=b+w|0)>>>0>>0?p+1|0:p)+x|0,b=m>>>0>(h=m+U|0)>>>0?b+1|0:b,M=m- -1048576|0,P=m=p-((m>>>0<4293918720)-1|0)|0,x=h-(p=-2097152&M)|0,U=b-((p>>>0>h>>>0)+m|0)|0,b=ge(t,0,654183,0),p=y,p=b>>>0>(m=b+(S>>>5&2097151)|0)>>>0?p+1|0:p,h=(b=m)+(m=ge(j,0,470296,0))|0,b=y+p|0,b=m>>>0>h>>>0?b+1|0:b,p=ge(n,Z,-997805,-1),b=y+b|0,b=p>>>0>(m=p+h|0)>>>0?b+1|0:b,h=(p=m)+(m=ge(o,V,666643,0))|0,p=y+b|0,g=h,h=m>>>0>h>>>0?p+1|0:p,w=(m=ge(t,0,470296,0))+(p=(p=u[e+23|0])<<16&2031616|u[e+21|0]|u[e+22|0]<<8)|0,m=y,m=p>>>0>w>>>0?m+1|0:m,w=(b=ge(j,0,666643,0))+w|0,p=y+m|0,m=ge(n,Z,654183,0),b=y+(b>>>0>w>>>0?p+1|0:p)|0,C=b=m>>>0>(S=m+w|0)>>>0?b+1|0:b,L=b=b-((S>>>0<4293918720)-1|0)|0,p=(p=b>>>21|0)+h|0,m=p=(b=(2097151&b)<<11|(w=S- -1048576|0)>>>21)>>>0>(g=b+g|0)>>>0?p+1|0:p,I=b=p-((g>>>0<4293918720)-1|0)|0,p=x,x=(2097151&b)<<11|(h=g- -1048576|0)>>>21,b=(b>>21)+U|0,T=x=(b=x>>>0>(E=p+x|0)>>>0?b+1|0:b)-((E>>>0<4293918720)-1|0)|0,H=E-(p=-2097152&(U=E- -1048576|0))|0,q=b-((p>>>0>E>>>0)+x|0)|0,p=ge(K,z,136657,0),m=y+m|0,m=p>>>0>(b=p+g|0)>>>0?m+1|0:m,B=b-(p=-2097152&h)|0,G=m-((p>>>0>b>>>0)+I|0)|0,E=A-(p=-2097152&v)|0,R=k-((p>>>0>A>>>0)+R|0)|0,k=ge(D,0,136657,0),b=(p=u[e+40|0])>>>24|0,h=p<<8|(v=u[e+36|0]|u[e+37|0]<<8|u[e+38|0]<<16|u[e+39|0]<<24)>>>24,m=(p=u[e+41|0])>>>16|0,b=(m|=b)>>>3|0,m=(7&m)<<29|(p=h|p<<16)>>>3,p=b+y|0,p=m>>>0>(h=m+k|0)>>>0?p+1|0:p,b=ge(a,0,-683901,-1),p=y+p|0,p=b>>>0>(m=b+h|0)>>>0?p+1|0:p,g=m,b=ge(D,0,-997805,-1),m=y,m=b>>>0>(h=b+(v>>>6&2097151)|0)>>>0?m+1|0:m,v=(b=h)+(h=ge(a,0,136657,0))|0,b=y+m|0,m=ge(o,V,-683901,-1),b=y+(h>>>0>v>>>0?b+1|0:b)|0,x=b=m>>>0>(N=m+v|0)>>>0?b+1|0:b,Q=m=b-((N>>>0<4293918720)-1|0)|0,p=p+(b=m>>21)|0,v=p=(m=(2097151&m)<<11|(A=N- -1048576|0)>>>21)>>>0>(I=m+g|0)>>>0?p+1|0:p,O=p=p-((I>>>0<4293918720)-1|0)|0,b=(b=p>>21)+R|0,W=b=(p=(m=(2097151&p)<<11|(g=I- -1048576|0)>>>21)+E|0)>>>0>>0?b+1|0:b,F=p,b=ge(p,b,-683901,-1),p=y+G|0,_=m=b+B|0,h=b>>>0>m>>>0?p+1|0:p,G=S-(p=-2097152&w)|0,R=C-((4095&L)+(p>>>0>S>>>0)|0)|0,S=ge(t,0,666643,0),p=(b=u[e+19|0])>>>24|0,w=b<<8|(C=u[e+15|0]|u[e+16|0]<<8|u[e+17|0]<<16|u[e+18|0]<<24)>>>24,m=p,b=(7&(m|=b=(p=u[e+20|0])>>>16|0))<<29|(b=(p<<=16)|w)>>>3,m=y+(m>>>3|0)|0,m=b>>>0>(w=b+S|0)>>>0?m+1|0:m,p=ge(n,Z,470296,0),b=y+m|0,p=p>>>0>(w=p+w|0)>>>0?b+1|0:b,m=ge(n,Z,666643,0),b=y,S=b=m>>>0>(B=m+(C>>>6&2097151)|0)>>>0?b+1|0:b,J=m=b-((B>>>0<4293918720)-1|0)|0,p=p+(b=m>>>21|0)|0,C=p=(m=(2097151&m)<<11|(k=B- -1048576|0)>>>21)>>>0>(E=m+w|0)>>>0?p+1|0:p,Y=p=p-((E>>>0<4293918720)-1|0)|0,b=(b=p>>>21|0)+R|0,b=(p=(2097151&p)<<11|(w=E- -1048576|0)>>>21)>>>0>(m=p+G|0)>>>0?b+1|0:b,R=(p=m)+(m=ge(K,z,-997805,-1))|0,p=y+b|0,p=m>>>0>R>>>0?p+1|0:p,L=b=I-(m=-2097152&g)|0,r=g=v-((m>>>0>I>>>0)+O|0)|0,m=ge(F,W,136657,0),p=y+p|0,p=m>>>0>(v=m+R|0)>>>0?p+1|0:p,m=ge(b,g,-683901,-1),b=y+p|0,v=b=m>>>0>(R=m+v|0)>>>0?b+1|0:b,O=p=b-((R>>>0<4293918720)-1|0)|0,b=(2097151&p)<<11|(g=R- -1048576|0)>>>21,p=(p>>21)+h|0,_=b=(p=b>>>0>(I=b+_|0)>>>0?p+1|0:p)-((I>>>0<4293918720)-1|0)|0,G=(2097151&b)<<11|(h=I- -1048576|0)>>>21,b=(b>>21)+q|0,c=H=G+H|0,G=H>>>0>>0?b+1|0:b,d=I-(b=-2097152&h)|0,l=p-((b>>>0>I>>>0)+_|0)|0,H=R-(p=-2097152&g)|0,q=v-((p>>>0>R>>>0)+O|0)|0,m=(p=ge(K,z,654183,0))+(E-(b=-2097152&w)|0)|0,b=y+(C-((b>>>0>E>>>0)+Y|0)|0)|0,b=p>>>0>m>>>0?b+1|0:b,p=ge(F,W,-997805,-1),b=y+b|0,b=p>>>0>(m=p+m|0)>>>0?b+1|0:b,h=(p=m)+(m=ge(L,r,136657,0))|0,p=y+b|0,_=h,v=m>>>0>h>>>0?p+1|0:p,E=N-(p=-2097152&A)|0,I=x-((p>>>0>N>>>0)+Q|0)|0,C=ge(j,0,-683901,-1),p=(b=u[e+35|0])>>>24|0,h=b<<8|(w=u[e+31|0]|u[e+32|0]<<8|u[e+33|0]<<16|u[e+34|0]<<24)>>>24,m=p,b=(p=u[e+36|0])>>>16|0,b|=m,m=y,m=(p=2097151&((1&b)<<31|(p=p<<16|h)>>>1))>>>0>(b=p+C|0)>>>0?m+1|0:m,h=(p=ge(D,0,654183,0))+b|0,b=y+m|0,b=p>>>0>h>>>0?b+1|0:b,m=ge(a,0,-997805,-1),p=y+b|0,p=m>>>0>(h=m+h|0)>>>0?p+1|0:p,b=ge(o,V,136657,0),p=y+p|0,g=m=b+h|0,h=b>>>0>m>>>0?p+1|0:p,p=ge(t,0,-683901,-1),b=y,b=p>>>0>(m=p+(w>>>4&2097151)|0)>>>0?b+1|0:b,w=(p=ge(j,0,136657,0))+m|0,m=y+b|0,m=p>>>0>w>>>0?m+1|0:m,p=ge(D,0,470296,0),b=y+m|0,b=p>>>0>(w=p+w|0)>>>0?b+1|0:b,w=(m=ge(a,0,654183,0))+w|0,p=y+b|0,b=ge(o,V,-997805,-1),p=y+(m>>>0>w>>>0?p+1|0:p)|0,C=p=b>>>0>(x=b+w|0)>>>0?p+1|0:p,f=b=p-((x>>>0<4293918720)-1|0)|0,m=(p=b>>21)+h|0,R=b=(m=(b=(2097151&b)<<11|(w=x- -1048576|0)>>>21)>>>0>(A=b+g|0)>>>0?m+1|0:m)-((A>>>0<4293918720)-1|0)|0,p=(p=b>>21)+I|0,O=p=(b=(h=(2097151&b)<<11|(g=A- -1048576|0)>>>21)+E|0)>>>0>>0?p+1|0:p,h=_,_=b,p=ge(b,p,-683901,-1),b=y+v|0,I=h=h+p|0,h=p>>>0>h>>>0?b+1|0:b,v=(p=ge(K,z,470296,0))+(B-(b=-2097152&k)|0)|0,b=y+(S-((2047&J)+(b>>>0>B>>>0)|0)|0)|0,b=p>>>0>v>>>0?b+1|0:b,k=(p=v)+(v=ge(F,W,654183,0))|0,p=y+b|0,p=v>>>0>k>>>0?p+1|0:p,v=ge(L,r,-997805,-1),b=y+p|0,b=v>>>0>(k=v+k|0)>>>0?b+1|0:b,N=g=A-(p=-2097152&g)|0,i=v=m-((p>>>0>A>>>0)+R|0)|0,m=ge(_,O,136657,0),p=y+b|0,p=m>>>0>(k=m+k|0)>>>0?p+1|0:p,m=ge(g,v,-683901,-1),b=y+p|0,v=b=m>>>0>(S=m+k|0)>>>0?b+1|0:b,R=p=b-((S>>>0<4293918720)-1|0)|0,b=(2097151&p)<<11|(g=S- -1048576|0)>>>21,p=(p>>21)+h|0,I=b=(p=b>>>0>(k=b+I|0)>>>0?p+1|0:p)-((k>>>0<4293918720)-1|0)|0,A=(2097151&b)<<11|(h=k- -1048576|0)>>>21,b=(b>>21)+q|0,Q=E=A+H|0,E=A>>>0>E>>>0?b+1|0:b,J=k-(b=-2097152&h)|0,Y=p-((b>>>0>k>>>0)+I|0)|0,H=S-(p=-2097152&g)|0,q=v-((p>>>0>S>>>0)+R|0)|0,v=ge(K,z,666643,0),p=(b=u[e+14|0])>>>24|0,h=b<<8|(R=u[e+10|0]|u[e+11|0]<<8|u[e+12|0]<<16|u[e+13|0]<<24)>>>24,m=p,b=(p=u[e+15|0])>>>16|0,b|=m,m=y,m=(p=2097151&((1&b)<<31|(p=p<<16|h)>>>1))>>>0>(b=p+v|0)>>>0?m+1|0:m,h=(p=b)+(b=ge(F,W,470296,0))|0,p=y+m|0,p=b>>>0>h>>>0?p+1|0:p,b=ge(L,r,654183,0),p=y+p|0,p=b>>>0>(m=b+h|0)>>>0?p+1|0:p,h=(b=m)+(m=ge(_,O,-997805,-1))|0,b=y+p|0,b=m>>>0>h>>>0?b+1|0:b,p=ge(N,i,136657,0),b=y+b|0,S=m=p+h|0,h=p>>>0>m>>>0?b+1|0:b,w=x-(p=-2097152&w)|0,v=C-((p>>>0>x>>>0)+f|0)|0,m=ge(t,0,136657,0),p=y,p=(b=(u[e+28|0]|u[e+29|0]<<8|u[e+30|0]<<16|u[e+31|0]<<24)>>>7&2097151)>>>0>(m=b+m|0)>>>0?p+1|0:p,g=(b=m)+(m=ge(j,0,-997805,-1))|0,b=y+p|0,b=m>>>0>g>>>0?b+1|0:b,p=ge(n,Z,-683901,-1),b=y+b|0,b=p>>>0>(m=p+g|0)>>>0?b+1|0:b,g=(p=ge(D,0,666643,0))+m|0,m=y+b|0,m=p>>>0>g>>>0?m+1|0:m,b=ge(a,0,470296,0),p=y+m|0,p=b>>>0>(g=b+g|0)>>>0?p+1|0:p,b=ge(o,V,654183,0),p=y+p|0,b=(P>>21)+(b>>>0>(m=b+g|0)>>>0?p+1|0:p)|0,A=b=(g=(2097151&P)<<11|M>>>21)>>>0>(M=g+m|0)>>>0?b+1|0:b,I=p=b-((M>>>0<4293918720)-1|0)|0,g=(2097151&p)<<11|(k=M- -1048576|0)>>>21,p=(p>>21)+v|0,B=p=(b=g+w|0)>>>0>>0?p+1|0:p,P=b,b=ge(b,p,-683901,-1),p=y+h|0,g=m=b+S|0,h=b>>>0>m>>>0?p+1|0:p,p=ge(F,W,666643,0),b=y,b=p>>>0>(m=p+(R>>>4&2097151)|0)>>>0?b+1|0:b,p=ge(L,r,470296,0),b=y+b|0,b=p>>>0>(m=p+m|0)>>>0?b+1|0:b,v=(p=ge(_,O,654183,0))+m|0,m=y+b|0,m=p>>>0>v>>>0?m+1|0:m,b=ge(N,i,-997805,-1),p=y+m|0,p=b>>>0>(v=b+v|0)>>>0?p+1|0:p,b=ge(P,B,136657,0),p=y+p|0,C=p=b>>>0>(x=b+v|0)>>>0?p+1|0:p,z=b=p-((x>>>0<4293918720)-1|0)|0,p=g,g=(2097151&b)<<11|(w=x- -1048576|0)>>>21,b=(b>>21)+h|0,F=h=(b=(m=p+g|0)>>>0>>0?b+1|0:b)-((m>>>0<4293918720)-1|0)|0,p=(p=h>>21)+q|0,K=g=(h=(2097151&h)<<11|(v=m- -1048576|0)>>>21)+H|0,S=h>>>0>g>>>0?p+1|0:p,g=m,m=b,h=(M-(b=-2097152&k)|0)+(k=(2097151&T)<<11|U>>>21)|0,b=(A-((b>>>0>M>>>0)+I|0)|0)+(T>>21)|0,R=b=h>>>0>>0?b+1|0:b,j=b=b-((h>>>0<4293918720)-1|0)|0,U=p=b>>21,p=ge(D=(2097151&b)<<11|(I=h- -1048576|0)>>>21,p,-683901,-1),m=y+m|0,m=p>>>0>(b=p+g|0)>>>0?m+1|0:m,Z=b-(p=-2097152&v)|0,V=m-((p>>>0>b>>>0)+F|0)|0,p=ge(D,U,136657,0),b=C+y|0,W=(m=p+x|0)-(p=-2097152&w)|0,F=(b=m>>>0>>0?b+1|0:b)-((p>>>0>m>>>0)+z|0)|0,b=ge(L,r,666643,0),m=y,m=(p=(u[e+7|0]|u[e+8|0]<<8|u[e+9|0]<<16|u[e+10|0]<<24)>>>7&2097151)>>>0>(b=p+b|0)>>>0?m+1|0:m,g=(p=ge(_,O,470296,0))+b|0,b=y+m|0,b=p>>>0>g>>>0?b+1|0:b,p=ge(N,i,654183,0),b=y+b|0,b=p>>>0>(m=p+g|0)>>>0?b+1|0:b,g=(p=m)+(m=ge(P,B,-997805,-1))|0,p=y+b|0,k=g,g=m>>>0>g>>>0?p+1|0:p,C=ge(_,O,666643,0),p=(b=u[e+6|0])>>>24|0,v=b<<8|(M=u[e+2|0]|u[e+3|0]<<8|u[e+4|0]<<16|u[e+5|0]<<24)>>>24,m=p,b=(p=u[e+7|0])>>>16|0,b=2097151&((3&(b|=m))<<30|(p=p<<16|v)>>>2),p=y,p=b>>>0>(m=b+C|0)>>>0?p+1|0:p,v=(b=ge(N,i,470296,0))+m|0,m=y+p|0,m=b>>>0>v>>>0?m+1|0:m,b=ge(P,B,654183,0),p=y+m|0,C=p=b>>>0>(A=b+v|0)>>>0?p+1|0:p,T=p=p-((A>>>0<4293918720)-1|0)|0,b=(m=p>>21)+g|0,x=p=(b=(p=(2097151&p)<<11|(w=A- -1048576|0)>>>21)>>>0>(v=p+k|0)>>>0?b+1|0:b)-((v>>>0<4293918720)-1|0)|0,k=(2097151&p)<<11|(g=v- -1048576|0)>>>21,p=(p>>21)+F|0,F=_=k+W|0,k=k>>>0>_>>>0?p+1|0:p,p=ge(D,U,-997805,-1),b=y+b|0,b=p>>>0>(m=p+v|0)>>>0?b+1|0:b,L=m-(p=-2097152&g)|0,O=b-((p>>>0>m>>>0)+x|0)|0,b=ge(D,U,654183,0),p=C+y|0,_=(m=b+A|0)-(b=-2097152&w)|0,T=(p=m>>>0>>0?p+1|0:p)-((b>>>0>m>>>0)+T|0)|0,p=ge(N,i,666643,0),b=y,b=p>>>0>(m=p+(M>>>5&2097151)|0)>>>0?b+1|0:b,p=ge(P,B,470296,0),b=y+b|0,v=m=p+m|0,m=p>>>0>m>>>0?b+1|0:b,g=ge(P,B,666643,0),b=(p=u[e+2|0])<<16&2031616|u[0|e]|u[e+1|0]<<8,p=y,C=p=b>>>0>(x=g+b|0)>>>0?p+1|0:p,B=p=p-((x>>>0<4293918720)-1|0)|0,g=(2097151&p)<<11|(w=x- -1048576|0)>>>21,p=(p>>21)+m|0,m=p=g>>>0>(A=g+v|0)>>>0?p+1|0:p,M=p=p-((A>>>0<4293918720)-1|0)|0,g=(2097151&p)<<11|(v=A- -1048576|0)>>>21,p=(p>>21)+T|0,g=g>>>0>(T=P=g+_|0)>>>0?p+1|0:p,p=ge(D,U,470296,0),m=m+y|0,m=(b=p+A|0)>>>0>>0?m+1|0:m,A=b-(p=-2097152&v)|0,v=m-((p>>>0>b>>>0)+M|0)|0,b=ge(D,U,666643,0),p=y+(C-(((m=-2097152&w)>>>0>x>>>0)+B|0)|0)|0,b=(m=(p=b>>>0>(P=b+(x-m|0)|0)>>>0?p+1|0:p)>>21)+v|0,p=(p=(b=(p=(2097151&p)<<11|P>>>21)>>>0>(M=p+A|0)>>>0?b+1|0:b)>>21)+g|0,b=(b=(p=(b=(2097151&b)<<11|M>>>21)>>>0>(T=b+T|0)>>>0?p+1|0:p)>>21)+O|0,m=(p=(b=(p=(2097151&p)<<11|T>>>21)>>>0>(g=p+L|0)>>>0?b+1|0:b)>>21)+k|0,p=(b=(m=(b=(2097151&b)<<11|g>>>21)>>>0>(U=b+F|0)>>>0?m+1|0:m)>>21)+V|0,b=(m=(p=(m=(2097151&m)<<11|U>>>21)>>>0>(x=m+Z|0)>>>0?p+1|0:p)>>21)+S|0,p=(p=(b=(p=(2097151&p)<<11|x>>>21)>>>0>(A=p+K|0)>>>0?b+1|0:b)>>21)+Y|0,b=(b=(p=(b=(2097151&b)<<11|A>>>21)>>>0>(S=b+J|0)>>>0?p+1|0:p)>>21)+E|0,m=(p=(b=(p=(2097151&p)<<11|S>>>21)>>>0>(k=p+Q|0)>>>0?b+1|0:b)>>21)+l|0,p=(b=(m=(b=(2097151&b)<<11|k>>>21)>>>0>(C=b+d|0)>>>0?m+1|0:m)>>21)+G|0,v=(I=h-(b=-2097152&I)|0)+((2097151&(p=(m=(2097151&m)<<11|C>>>21)>>>0>(w=m+c|0)>>>0?p+1|0:p))<<11|w>>>21)|0,p=(R-((b>>>0>h>>>0)+j|0)|0)+(p>>21)|0,I=b=(p=v>>>0>>0?p+1|0:p)>>21,P=(p=ge(E=(2097151&p)<<11|v>>>21,b,666643,0))+(b=2097151&P)|0,p=y,h=p=b>>>0>P>>>0?p+1|0:p,s[0|e]=P,s[e+1|0]=(255&p)<<24|P>>>8,p=2097151&M,b=ge(E,I,470296,0)+p|0,m=y,p=(h>>21)+(p>>>0>b>>>0?m+1|0:m)|0,p=(R=(2097151&h)<<11|P>>>21)>>>0>(M=R+b|0)>>>0?p+1|0:p,s[e+4|0]=(2047&p)<<21|M>>>11,b=p,m=M,s[e+3|0]=(7&p)<<29|m>>>3,s[e+2|0]=31&((65535&h)<<16|P>>>16)|m<<5,h=2097151&T,T=ge(E,I,654183,0)+h|0,p=y,M=(2097151&b)<<11|m>>>21,b=(b>>21)+(h=h>>>0>T>>>0?p+1|0:p)|0,p=b=(T=M+T|0)>>>0>>0?b+1|0:b,s[e+6|0]=(63&p)<<26|T>>>6,h=T,T=0,s[e+5|0]=T<<13|(1572864&m)>>>19|h<<2,m=2097151&g,g=ge(E,I,-997805,-1)+m|0,b=y,b=m>>>0>g>>>0?b+1|0:b,T=(2097151&(m=p))<<11|h>>>21,m=(p>>=21)+b|0,m=(g=T+g|0)>>>0>>0?m+1|0:m,s[e+9|0]=(511&m)<<23|g>>>9,s[e+8|0]=(1&m)<<31|g>>>1,b=0,s[e+7|0]=b<<18|(2080768&h)>>>14|g<<7,b=2097151&U,h=ge(E,I,136657,0)+b|0,p=y,p=b>>>0>h>>>0?p+1|0:p,U=(2097151&(b=m))<<11|g>>>21,b=p+(m=b>>21)|0,b=(h=U+h|0)>>>0>>0?b+1|0:b,s[e+12|0]=(4095&b)<<20|h>>>12,m=h,s[e+11|0]=(15&b)<<28|m>>>4,h=0,s[e+10|0]=h<<15|(1966080&g)>>>17|m<<4,h=2097151&x,g=ge(E,I,-683901,-1)+h|0,p=y,p=h>>>0>g>>>0?p+1|0:p,h=b,b=p+(b>>=21)|0,b=(h=(_=g)+(g=(2097151&h)<<11|m>>>21)|0)>>>0>>0?b+1|0:b,s[e+14|0]=(127&b)<<25|h>>>7,g=0,s[e+13|0]=g<<12|(1048576&m)>>>20|h<<1,p=b>>21,m=(b=(2097151&b)<<11|h>>>21)>>>0>(g=b+(2097151&A)|0)>>>0?p+1|0:p,s[e+17|0]=(1023&m)<<22|g>>>10,s[e+16|0]=(3&m)<<30|g>>>2,b=0,s[e+15|0]=b<<17|(2064384&h)>>>15|g<<6,p=m>>21,p=(b=(2097151&m)<<11|g>>>21)>>>0>(m=b+(2097151&S)|0)>>>0?p+1|0:p,s[e+20|0]=(8191&p)<<19|m>>>13,s[e+19|0]=(31&p)<<27|m>>>5,h=(b=2097151&k)+(k=(2097151&p)<<11|m>>>21)|0,b=p>>21,b=h>>>0>>0?b+1|0:b,k=h,s[e+21|0]=h,S=0,s[e+18|0]=S<<14|(1835008&g)>>>18|m<<3,s[e+22|0]=(255&b)<<24|h>>>8,m=b>>21,m=(h=(g=(2097151&b)<<11|h>>>21)+(2097151&C)|0)>>>0>>0?m+1|0:m,s[e+25|0]=(2047&m)<<21|h>>>11,s[e+24|0]=(7&m)<<29|h>>>3,s[e+23|0]=31&((65535&b)<<16|k>>>16)|h<<5,p=m>>21,p=(b=(2097151&m)<<11|h>>>21)>>>0>(m=b+(2097151&w)|0)>>>0?p+1|0:p,s[e+27|0]=(63&p)<<26|m>>>6,g=0,s[e+26|0]=g<<13|(1572864&h)>>>19|m<<2,b=p>>21,b=(p=(h=(2097151&p)<<11|m>>>21)+(2097151&v)|0)>>>0>>0?b+1|0:b,s[e+31|0]=(131071&b)<<15|p>>>17,s[e+30|0]=(511&b)<<23|p>>>9,s[e+29|0]=(1&b)<<31|p>>>1,h=0,s[e+28|0]=h<<18|(2080768&m)>>>14|p<<7}function x(e,t,n,a,o,r){var i,d=0,f=0,p=0,b=0,m=0,h=0,y=0,v=0,w=0,k=0,x=0,S=0,C=0,R=0,P=0,U=0,_=0,O=0,F=0,j=0,H=0,G=0,z=0,K=0,W=0,Z=0,V=0,Q=0,J=0,Y=0,X=0,$=0,ee=0,te=0,ne=0,ae=0,oe=0,re=0;for(g=i=g-592|0,S=-1,C=e+32|0,x=32,R=1;k=u[2672+(f=x-1|0)|0],p=(f=((b=u[f+C|0])^k)-1>>8&R)&(h=u[C+(x=x-2|0)|0])-(m=u[x+2672|0])>>8|255&(b-k>>>8&R|p),R=f&(m^h)-1>>8,x;);if(255&p&&!(ue(e)|!(((127&(-1^u[o+31|0])|u[o+1|0]&u[o+2|0]&u[o+3|0]&u[o+4|0]&u[o+5|0]&u[o+6|0]&u[o+7|0]&u[o+8|0]&u[o+9|0]&u[o+10|0]&u[o+11|0]&u[o+12|0]&u[o+13|0]&u[o+14|0]&u[o+15|0]&u[o+16|0]&u[o+17|0]&u[o+18|0]&u[o+19|0]&u[o+20|0]&u[o+21|0]&u[o+22|0]&u[o+23|0]&u[o+24|0]&u[o+25|0]&u[o+26|0]&u[o+27|0]&u[o+28|0]&u[o+30|0]&u[o+29|0]^255)-1&236-u[0|o]^-1)>>>8&1)||ue(o)||M(i+128|0,o))){for(se(f=i+384|0),r&&L(f,34768,34,0),L(f,e,32,0),L(f,o,32,0),L(f,t,n,a),E(f,n=i+320|0),A(n),r=i+8|0,a=i+128|0,o=0,t=0,g=d=g-2272|0;b=n+(o>>>3|0)|0,s[(f=d+2016|0)+o|0]=u[0|b]>>>(6&o)&1,s[(p=f)+(f=1|o)|0]=u[0|b]>>>(7&f)&1,256!=(0|(o=o+2|0)););for(;;){t=(n=t)+1|0;e:if(!(!u[0|(p=n+(d+2016|0)|0)]|n>>>0>254)){t:if(o=s[0|(m=(d+2016|0)+t|0)])if((0|(o=(b=o<<1)+(f=s[0|p])|0))<=15)s[0|p]=o,s[0|m]=0;else{if((0|(o=f-b|0))<-15)break e;for(s[0|p]=o,o=t;;){if(!u[0|(f=(d+2016|0)+o|0)]){s[0|f]=1;break t}if(s[0|f]=0,f=o>>>0<255,o=o+1|0,!f)break}}if(!(n>>>0>253)){t:if(f=s[0|(h=(o=n+2|0)+(d+2016|0)|0)])if((0|(f=(m=f<<2)+(b=s[0|p])|0))>=16){if((0|(f=b-m|0))<-15)break e;for(s[0|p]=f;;){if(u[0|(f=(d+2016|0)+o|0)]){if(s[0|f]=0,f=o>>>0<255,o=o+1|0,f)continue;break t}break}s[0|f]=1}else s[0|p]=f,s[0|h]=0;if(!(n>>>0>252)){t:if(f=s[0|(h=(o=n+3|0)+(d+2016|0)|0)])if((0|(f=(m=f<<3)+(b=s[0|p])|0))>=16){if((0|(f=b-m|0))<-15)break e;for(s[0|p]=f;;){if(u[0|(f=(d+2016|0)+o|0)]){if(s[0|f]=0,f=o>>>0<255,o=o+1|0,f)continue;break t}break}s[0|f]=1}else s[0|p]=f,s[0|h]=0;if(!(n>>>0>251)){t:if(f=s[0|(h=(o=n+4|0)+(d+2016|0)|0)])if((0|(f=(m=f<<4)+(b=s[0|p])|0))>=16){if((0|(f=b-m|0))<-15)break e;for(s[0|p]=f;;){if(u[0|(f=(d+2016|0)+o|0)]){if(s[0|f]=0,f=o>>>0<255,o=o+1|0,f)continue;break t}break}s[0|f]=1}else s[0|p]=f,s[0|h]=0;if(!(n>>>0>250)){t:if(f=s[0|(h=(o=n+5|0)+(d+2016|0)|0)])if((0|(f=(m=f<<5)+(b=s[0|p])|0))>=16){if((0|(f=b-m|0))<-15)break e;for(s[0|p]=f;;){if(u[0|(f=(d+2016|0)+o|0)]){if(s[0|f]=0,f=o>>>0<255,o=o+1|0,f)continue;break t}break}s[0|f]=1}else s[0|p]=f,s[0|h]=0;if(!(n>>>0>249)&&(n=s[0|(m=(o=n+6|0)+(d+2016|0)|0)]))if((0|(n=(b=n<<6)+(f=s[0|p])|0))>=16){if((0|(n=f-b|0))<-15)break e;for(s[0|p]=n;;){if(u[0|(n=(d+2016|0)+o|0)]){if(s[0|n]=0,n=o>>>0<255,o=o+1|0,n)continue;break e}break}s[0|n]=1}else s[0|p]=n,s[0|m]=0}}}}}if(256==(0|t))break}for(o=0;n=C+(o>>>3|0)|0,s[(t=d+1760|0)+o|0]=u[0|n]>>>(6&o)&1,s[(f=t)+(t=1|o)|0]=u[0|n]>>>(7&t)&1,256!=(0|(o=o+2|0)););for(t=0;;){t=(n=t)+1|0;e:if(!(!u[0|(p=n+(d+1760|0)|0)]|n>>>0>254)){t:if(o=s[0|(m=(d+1760|0)+t|0)])if((0|(o=(b=o<<1)+(f=s[0|p])|0))<=15)s[0|p]=o,s[0|m]=0;else{if((0|(o=f-b|0))<-15)break e;for(s[0|p]=o,o=t;;){if(!u[0|(f=(d+1760|0)+o|0)]){s[0|f]=1;break t}if(s[0|f]=0,f=o>>>0<255,o=o+1|0,!f)break}}if(!(n>>>0>253)){t:if(f=s[0|(h=(o=n+2|0)+(d+1760|0)|0)])if((0|(f=(m=f<<2)+(b=s[0|p])|0))>=16){if((0|(f=b-m|0))<-15)break e;for(s[0|p]=f;;){if(u[0|(f=(d+1760|0)+o|0)]){if(s[0|f]=0,f=o>>>0<255,o=o+1|0,f)continue;break t}break}s[0|f]=1}else s[0|p]=f,s[0|h]=0;if(!(n>>>0>252)){t:if(f=s[0|(h=(o=n+3|0)+(d+1760|0)|0)])if((0|(f=(m=f<<3)+(b=s[0|p])|0))>=16){if((0|(f=b-m|0))<-15)break e;for(s[0|p]=f;;){if(u[0|(f=(d+1760|0)+o|0)]){if(s[0|f]=0,f=o>>>0<255,o=o+1|0,f)continue;break t}break}s[0|f]=1}else s[0|p]=f,s[0|h]=0;if(!(n>>>0>251)){t:if(f=s[0|(h=(o=n+4|0)+(d+1760|0)|0)])if((0|(f=(m=f<<4)+(b=s[0|p])|0))>=16){if((0|(f=b-m|0))<-15)break e;for(s[0|p]=f;;){if(u[0|(f=(d+1760|0)+o|0)]){if(s[0|f]=0,f=o>>>0<255,o=o+1|0,f)continue;break t}break}s[0|f]=1}else s[0|p]=f,s[0|h]=0;if(!(n>>>0>250)){t:if(f=s[0|(h=(o=n+5|0)+(d+1760|0)|0)])if((0|(f=(m=f<<5)+(b=s[0|p])|0))>=16){if((0|(f=b-m|0))<-15)break e;for(s[0|p]=f;;){if(u[0|(f=(d+1760|0)+o|0)]){if(s[0|f]=0,f=o>>>0<255,o=o+1|0,f)continue;break t}break}s[0|f]=1}else s[0|p]=f,s[0|h]=0;if(!(n>>>0>249)&&(n=s[0|(m=(o=n+6|0)+(d+1760|0)|0)]))if((0|(n=(b=n<<6)+(f=s[0|p])|0))>=16){if((0|(n=f-b|0))<-15)break e;for(s[0|p]=n;;){if(u[0|(n=(d+1760|0)+o|0)]){if(s[0|n]=0,n=o>>>0<255,o=o+1|0,n)continue;break e}break}s[0|n]=1}else s[0|p]=n,s[0|m]=0}}}}}if(256==(0|t))break}for(q(S=d+480|0,a),k=c[a+8>>2],p=c[a+12>>2],h=c[a+16>>2],m=c[a+20>>2],b=c[a+24>>2],f=c[a+28>>2],o=c[a>>2],n=c[a+4>>2],t=c[a+36>>2],c[d+192>>2]=c[a+32>>2],c[d+196>>2]=t,c[d+184>>2]=b,c[d+188>>2]=f,c[d+176>>2]=h,c[d+180>>2]=m,c[d+168>>2]=k,c[d+172>>2]=p,c[d+160>>2]=o,c[d+164>>2]=n,k=c[a+40>>2],p=c[a+44>>2],h=c[a+48>>2],m=c[a+52>>2],b=c[a+56>>2],f=c[a+60>>2],o=c[(t=a- -64|0)>>2],n=c[t+4>>2],t=c[a+76>>2],c[d+232>>2]=c[a+72>>2],c[d+236>>2]=t,c[d+224>>2]=o,c[d+228>>2]=n,c[d+216>>2]=b,c[d+220>>2]=f,c[d+208>>2]=h,c[d+212>>2]=m,c[d+200>>2]=k,c[d+204>>2]=p,k=c[a+80>>2],p=c[a+84>>2],h=c[a+88>>2],m=c[a+92>>2],b=c[a+96>>2],f=c[a+100>>2],o=c[a+104>>2],n=c[a+108>>2],t=c[a+116>>2],c[d+272>>2]=c[a+112>>2],c[d+276>>2]=t,c[d+264>>2]=o,c[d+268>>2]=n,c[d+256>>2]=b,c[d+260>>2]=f,c[d+248>>2]=h,c[d+252>>2]=m,c[d+240>>2]=k,c[d+244>>2]=p,T(a=d+320|0,n=d+160|0),I(d,a,y=d+440|0),I(d+40|0,v=d+360|0,w=d+400|0),I(d+80|0,w,y),I(d+120|0,a,v),D(a,d,S),I(n,a,y),I(U=d+200|0,v,w),I(_=d+240|0,w,y),I(P=d+280|0,a,v),q(t=d+640|0,n),D(a,d,t),I(n,a,y),I(U,v,w),I(_,w,y),I(P,a,v),q(t=d+800|0,n),D(a,d,t),I(n,a,y),I(U,v,w),I(_,w,y),I(P,a,v),q(t=d+960|0,n),D(a,d,t),I(n,a,y),I(U,v,w),I(_,w,y),I(P,a,v),q(t=d+1120|0,n),D(a,d,t),I(n,a,y),I(U,v,w),I(_,w,y),I(P,a,v),q(t=d+1280|0,n),D(a,d,t),I(n,a,y),I(U,v,w),I(_,w,y),I(P,a,v),q(t=d+1440|0,n),D(a,d,t),I(n,a,y),I(U,v,w),I(_,w,y),I(P,a,v),q(d+1600|0,n),c[r+32>>2]=0,c[r+36>>2]=0,c[r+24>>2]=0,c[r+28>>2]=0,c[r+16>>2]=0,c[r+20>>2]=0,c[r+8>>2]=0,c[r+12>>2]=0,c[r>>2]=0,c[r+4>>2]=0,c[r+44>>2]=0,c[r+48>>2]=0,c[(V=r+40|0)>>2]=1,c[r+52>>2]=0,c[r+56>>2]=0,c[r+60>>2]=0,c[r+64>>2]=0,c[r+68>>2]=0,c[r+72>>2]=0,c[r+84>>2]=0,c[r+88>>2]=0,c[r+76>>2]=0,c[r+80>>2]=1,c[r+92>>2]=0,c[r+96>>2]=0,c[r+100>>2]=0,c[r+104>>2]=0,c[r+108>>2]=0,c[r+112>>2]=0,c[r+116>>2]=0,te=r+80|0,t=255;;){e:{t:{if(!(u[(d+2016|0)+t|0]|u[(d+1760|0)+t|0])){if(!(u[(n=t-1|0)+(d+2016|0)|0]|u[n+(d+1760|0)|0]))break t;t=n}if((0|t)<0)break e;for(;T(d+320|0,r),(0|(o=s[(n=t)+(d+2016|0)|0]))>0?(I(t=d+160|0,a=d+320|0,y),I(U,v,w),I(_,w,y),I(P,a,v),D(a,t,(d+480|0)+l((254&o)>>>1|0,160)|0)):(0|o)>=0||(I(t=d+160|0,a=d+320|0,y),I(U,v,w),I(_,w,y),I(P,a,v),B(a,t,(d+480|0)+l((0-o&254)>>>1|0,160)|0)),(0|(W=s[n+(d+1760|0)|0]))>0?(I(t=d+160|0,a=d+320|0,y),I(U,v,w),I(_,w,y),I(P,a,v),N(a,t,l((254&W)>>>1|0,120)+1488|0)):(0|W)>=0||(I(d+160|0,Z=d+320|0,y),I(U,v,w),I(_,w,y),I(P,Z,v),O=c[d+160>>2],F=c[d+200>>2],j=c[d+164>>2],H=c[d+204>>2],G=c[d+168>>2],z=c[d+208>>2],K=c[d+172>>2],x=c[d+212>>2],C=c[d+176>>2],R=c[d+216>>2],S=c[d+180>>2],k=c[d+220>>2],p=c[d+184>>2],h=c[d+224>>2],m=c[d+188>>2],b=c[d+228>>2],f=c[d+192>>2],o=c[d+232>>2],a=c[d+236>>2],t=c[d+196>>2],c[d+396>>2]=a-t,c[d+392>>2]=o-f,c[d+388>>2]=b-m,c[d+384>>2]=h-p,c[d+380>>2]=k-S,c[d+376>>2]=R-C,c[d+372>>2]=x-K,c[d+368>>2]=z-G,c[d+364>>2]=H-j,c[d+360>>2]=F-O,c[d+356>>2]=t+a,c[d+352>>2]=o+f,c[d+348>>2]=b+m,c[d+344>>2]=p+h,c[d+340>>2]=k+S,c[d+336>>2]=C+R,c[d+332>>2]=x+K,c[d+328>>2]=G+z,c[d+324>>2]=j+H,c[d+320>>2]=O+F,I(w,Z,40+(t=l((0-W&254)>>>1|0,120)+1488|0)|0),I(v,v,t),I(y,t+80|0,P),ne=c[d+276>>2],ae=c[d+272>>2],W=c[d+268>>2],Z=c[d+264>>2],p=c[d+260>>2],h=c[d+256>>2],m=c[d+252>>2],b=c[d+248>>2],f=c[d+244>>2],o=c[d+240>>2],Q=c[d+360>>2],J=c[d+400>>2],Y=c[d+364>>2],X=c[d+404>>2],$=c[d+368>>2],ee=c[d+408>>2],O=c[d+372>>2],F=c[d+412>>2],j=c[d+376>>2],H=c[d+416>>2],G=c[d+380>>2],z=c[d+420>>2],K=c[d+384>>2],x=c[d+424>>2],C=c[d+388>>2],R=c[d+428>>2],S=c[d+392>>2],k=c[d+432>>2],a=c[d+396>>2],t=c[d+436>>2],c[d+396>>2]=a+t,c[d+392>>2]=k+S,c[d+388>>2]=C+R,c[d+384>>2]=x+K,c[d+380>>2]=G+z,c[d+376>>2]=j+H,c[d+372>>2]=O+F,c[d+368>>2]=$+ee,c[d+364>>2]=Y+X,c[d+360>>2]=Q+J,c[d+356>>2]=t-a,c[d+352>>2]=k-S,c[d+348>>2]=R-C,c[d+344>>2]=x-K,c[d+340>>2]=z-G,c[d+336>>2]=H-j,c[d+332>>2]=F-O,c[d+328>>2]=ee-$,c[d+324>>2]=X-Y,c[d+320>>2]=J-Q,O=o<<1,F=c[d+440>>2],c[d+400>>2]=O-F,j=f<<1,H=c[d+444>>2],c[d+404>>2]=j-H,G=b<<1,z=c[d+448>>2],c[d+408>>2]=G-z,K=m<<1,x=c[d+452>>2],c[d+412>>2]=K-x,C=h<<1,R=c[d+456>>2],c[d+416>>2]=C-R,S=p<<1,k=c[d+460>>2],c[d+420>>2]=S-k,p=Z<<1,h=c[d+464>>2],c[d+424>>2]=p-h,m=W<<1,b=c[d+468>>2],c[d+428>>2]=m-b,f=ae<<1,o=c[d+472>>2],c[d+432>>2]=f-o,a=ne<<1,t=c[d+476>>2],c[d+436>>2]=a-t,c[d+440>>2]=O+F,c[d+444>>2]=j+H,c[d+448>>2]=G+z,c[d+452>>2]=x+K,c[d+456>>2]=C+R,c[d+460>>2]=k+S,c[d+464>>2]=p+h,c[d+468>>2]=b+m,c[d+472>>2]=o+f,c[d+476>>2]=t+a),I(r,d+320|0,y),I(V,v,w),I(te,w,y),t=n-1|0,(0|n)>0;);break e}if(t=t-2|0,n)continue}break}g=d+2272|0,Ae(t=i+288|0,r),oe=-1,re=me(t,e),S=((0|e)==(0|t)?oe:re)|ce(e,t,32)}return g=i+592|0,S}function I(e,t,n){var a,o,r,i,s,u,d,f,p,b,m,h,g,v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B,D,N,O,F,L,j,H,G,z,K,W,Z,V,q,Q,J,Y,X,$,ee,te,ne,ae,oe,re,ie=0,se=0,ce=0,ue=0,de=0,le=0,fe=0,pe=0,be=0,me=0,he=0,ye=0,ve=0,we=0,ke=0,Ae=0,xe=0,Ie=0,Te=0,Se=0,Ce=0,Ee=0,Re=0,Me=0;ie=ge(a=c[n+4>>2],b=a>>31,xe=(k=c[t+20>>2])<<1,N=xe>>31),ce=y,se=(ve=ge(ke=c[n>>2],r=ke>>31,o=c[t+24>>2],i=o>>31))+ie|0,ie=y+ce|0,ie=se>>>0>>0?ie+1|0:ie,be=ge(s=c[n+8>>2],g=s>>31,ve=c[t+16>>2],u=ve>>31),ce=y+ie|0,ce=(se=be+se|0)>>>0>>0?ce+1|0:ce,ie=(be=ge(m=c[n+12>>2],A=m>>31,R=(x=c[t+12>>2])<<1,O=R>>31))+se|0,se=y+ce|0,se=ie>>>0>>0?se+1|0:se,ce=(we=ge(v=c[n+16>>2],M=v>>31,be=c[t+8>>2],d=be>>31))+ie|0,ie=y+se|0,ie=ce>>>0>>0?ie+1|0:ie,se=ce,ce=ge(I=c[n+20>>2],F=I>>31,P=(T=c[t+4>>2])<<1,L=P>>31),ie=y+ie|0,ie=(se=se+ce|0)>>>0>>0?ie+1|0:ie,Y=pe=c[n+24>>2],ce=(me=ge(pe,Q=pe>>31,we=c[t>>2],f=we>>31))+se|0,se=y+ie|0,se=ce>>>0>>0?se+1|0:se,j=c[n+28>>2],ie=(me=ge(ye=l(j,19),S=ye>>31,U=(C=c[t+36>>2])<<1,H=U>>31))+ce|0,ce=y+se|0,ce=ie>>>0>>0?ce+1|0:ce,$=c[n+32>>2],se=(fe=ge(ue=l($,19),w=ue>>31,me=c[t+32>>2],p=me>>31))+ie|0,ie=y+ce|0,ie=se>>>0>>0?ie+1|0:ie,X=c[n+36>>2],n=ge(fe=l(X,19),h=fe>>31,_=(E=c[t+28>>2])<<1,G=_>>31),ie=y+ie|0,de=t=n+se|0,n=t>>>0>>0?ie+1|0:ie,t=ge(ve,u,a,b),ie=y,se=ge(ke,r,k,z=k>>31),ce=y+ie|0,ce=(t=se+t|0)>>>0>>0?ce+1|0:ce,ie=ge(s,g,x,K=x>>31),se=y+ce|0,se=(t=ie+t|0)>>>0>>0?se+1|0:se,ce=ge(be,d,m,A),ie=y+se|0,ie=(t=ce+t|0)>>>0>>0?ie+1|0:ie,se=ge(v,M,T,W=T>>31),ie=y+ie|0,ie=(t=se+t|0)>>>0>>0?ie+1|0:ie,se=ge(we,f,I,F),ie=y+ie|0,ie=(t=se+t|0)>>>0>>0?ie+1|0:ie,se=ge(pe=l(pe,19),B=pe>>31,C,Z=C>>31),ce=y+ie|0,ce=(t=se+t|0)>>>0>>0?ce+1|0:ce,ie=ge(me,p,ye,S),se=y+ce|0,se=(t=ie+t|0)>>>0>>0?se+1|0:se,ce=ge(ue,w,E,V=E>>31),ie=y+se|0,ie=(t=ce+t|0)>>>0>>0?ie+1|0:ie,se=ge(fe,h,o,i),ie=y+ie|0,Ee=t=se+t|0,Te=t>>>0>>0?ie+1|0:ie,t=ge(a,b,R,O),ie=y,se=ge(ke,r,ve,u),ie=y+ie|0,ie=(t=se+t|0)>>>0>>0?ie+1|0:ie,se=ge(be,d,s,g),ce=y+ie|0,ce=(t=se+t|0)>>>0>>0?ce+1|0:ce,ie=ge(m,A,P,L),se=y+ce|0,se=(t=ie+t|0)>>>0>>0?se+1|0:se,ce=ge(we,f,v,M),ie=y+se|0,ie=(t=ce+t|0)>>>0>>0?ie+1|0:ie,se=ge(D=l(I,19),q=D>>31,U,H),ie=y+ie|0,ie=(t=se+t|0)>>>0>>0?ie+1|0:ie,se=ge(me,p,pe,B),ie=y+ie|0,ie=(t=se+t|0)>>>0>>0?ie+1|0:ie,se=ge(ye,S,_,G),ce=y+ie|0,ce=(t=se+t|0)>>>0>>0?ce+1|0:ce,ie=ge(ue,w,o,i),se=y+ce|0,se=(t=ie+t|0)>>>0>>0?se+1|0:se,ce=ge(fe,h,xe,N),ie=y+se|0,ee=t=ce+t|0,te=ie=t>>>0>>0?ie+1|0:ie,ne=t=t+33554432|0,ae=ie=t>>>0<33554432?ie+1|0:ie,ce=(67108863&ie)<<6|t>>>26,ie=(ie>>26)+Te|0,Ee=t=ce+Ee|0,ie=t>>>0>>0?ie+1|0:ie,oe=t=t+16777216|0,ie=n+(se=(ce=t>>>0<16777216?ie+1|0:ie)>>25)|0,ie=(t=(ce=(33554431&ce)<<7|t>>>25)+de|0)>>>0>>0?ie+1|0:ie,Ie=n=(se=t)+33554432|0,t=ie=n>>>0<33554432?ie+1|0:ie,c[e+24>>2]=se-(-67108864&n),n=ge(a,b,P,L),ie=y,se=ge(ke,r,be,d),ce=y+ie|0,ce=(n=se+n|0)>>>0>>0?ce+1|0:ce,se=(ie=n)+(n=ge(we,f,s,g))|0,ie=y+ce|0,ie=n>>>0>se>>>0?ie+1|0:ie,ce=ge(n=l(m,19),Se=n>>31,U,H),ie=y+ie|0,ie=(se=ce+se|0)>>>0>>0?ie+1|0:ie,ce=(de=ge(me,p,Te=l(v,19),J=Te>>31))+se|0,se=y+ie|0,se=ce>>>0>>0?se+1|0:se,de=ge(_,G,D,q),ie=y+se|0,ie=(ce=de+ce|0)>>>0>>0?ie+1|0:ie,se=(de=ge(o,i,pe,B))+ce|0,ce=y+ie|0,ce=se>>>0>>0?ce+1|0:ce,de=ge(ye,S,xe,N),ie=y+ce|0,ie=(se=de+se|0)>>>0>>0?ie+1|0:ie,ce=ge(ue,w,ve,u),ie=y+ie|0,ie=(se=ce+se|0)>>>0>>0?ie+1|0:ie,ce=(de=ge(fe,h,R,O))+se|0,se=y+ie|0,he=ce,Re=ce>>>0>>0?se+1|0:se,ie=ge(we,f,a,b),se=y,ce=(de=ge(ke,r,T,W))+ie|0,ie=y+se|0,ie=ce>>>0>>0?ie+1|0:ie,de=se=l(s,19),se=(le=ge(se,Ce=se>>31,C,Z))+ce|0,ce=y+ie|0,ce=se>>>0>>0?ce+1|0:ce,le=ge(me,p,n,Se),ie=y+ce|0,ie=(se=le+se|0)>>>0>>0?ie+1|0:ie,ce=ge(Te,J,E,V),ie=y+ie|0,ie=(se=ce+se|0)>>>0>>0?ie+1|0:ie,ce=(le=ge(o,i,D,q))+se|0,se=y+ie|0,se=ce>>>0>>0?se+1|0:se,le=ge(pe,B,k,z),ie=y+se|0,ie=(ce=le+ce|0)>>>0>>0?ie+1|0:ie,se=(le=ge(ve,u,ye,S))+ce|0,ce=y+ie|0,ce=se>>>0>>0?ce+1|0:ce,le=ge(ue,w,x,K),ie=y+ce|0,ie=(se=le+se|0)>>>0>>0?ie+1|0:ie,ce=ge(fe,h,be,d),ie=y+ie|0,Me=se=ce+se|0,le=se>>>0>>0?ie+1|0:ie,ie=ge(ie=l(a,19),ie>>31,U,H),se=y,ce=ge(ke,r,we,f),se=y+se|0,se=(ie=ce+ie|0)>>>0>>0?se+1|0:se,ce=(de=ge(me,p,de,Ce))+ie|0,ie=y+se|0,n=(se=ge(n,Se,_,G))+ce|0,ce=y+(ce>>>0>>0?ie+1|0:ie)|0,ce=n>>>0>>0?ce+1|0:ce,se=ge(o,i,Te,J),ie=y+ce|0,ie=(n=se+n|0)>>>0>>0?ie+1|0:ie,se=ge(xe,N,D,q),ie=y+ie|0,ie=(n=se+n|0)>>>0>>0?ie+1|0:ie,ce=ge(ve,u,pe,B),se=y+ie|0,se=(n=ce+n|0)>>>0>>0?se+1|0:se,ce=ge(ye,S,R,O),ie=y+se|0,ie=(n=ce+n|0)>>>0>>0?ie+1|0:ie,se=ge(ue,w,be,d),ce=y+ie|0,ce=(n=se+n|0)>>>0>>0?ce+1|0:ce,se=ge(fe,h,P,L),ie=y+ce|0,de=n=se+n|0,Se=ie=n>>>0>>0?ie+1|0:ie,Ce=n=n+33554432|0,re=ie=n>>>0<33554432?ie+1|0:ie,se=(ce=ie>>26)+le|0,le=n=(ie=(67108863&ie)<<6|n>>>26)+Me|0,ie=se=n>>>0>>0?se+1|0:se,Me=n=n+16777216|0,se=(33554431&(ie=n>>>0<16777216?ie+1|0:ie))<<7|n>>>25,ie=(ie>>25)+Re|0,ie=(n=se+he|0)>>>0>>0?ie+1|0:ie,Re=se=(ce=n)+33554432|0,n=ie=se>>>0<33554432?ie+1|0:ie,c[e+8>>2]=ce-(-67108864&se),ie=ge(o,i,a,b),ce=y,se=(he=ge(ke,r,E,V))+ie|0,ie=y+ce|0,ie=se>>>0>>0?ie+1|0:ie,ce=ge(s,g,k,z),ie=y+ie|0,ie=(se=ce+se|0)>>>0>>0?ie+1|0:ie,ce=ge(ve,u,m,A),ie=y+ie|0,ie=(se=ce+se|0)>>>0>>0?ie+1|0:ie,he=ge(v,M,x,K),ce=y+ie|0,ce=(se=he+se|0)>>>0>>0?ce+1|0:ce,ie=(he=ge(be,d,I,F))+se|0,se=y+ce|0,se=ie>>>0>>0?se+1|0:se,ce=(he=ge(T,W,Y,Q))+ie|0,ie=y+se|0,ie=ce>>>0>>0?ie+1|0:ie,se=ce,ce=ge(we,f,j,he=j>>31),ie=y+ie|0,ie=(se=se+ce|0)>>>0>>0?ie+1|0:ie,ce=ge(ue,w,C,Z),ie=y+ie|0,ie=(se=ce+se|0)>>>0>>0?ie+1|0:ie,Ae=ge(fe,h,me,p),ce=y+ie|0,ie=t>>26,t=(Ie=(67108863&t)<<6|Ie>>>26)+(se=Ae+se|0)|0,se=ie+(se>>>0>>0?ce+1|0:ce)|0,ie=(ce=t)>>>0>>0?se+1|0:se,Ie=se=ce+16777216|0,t=ie=se>>>0<16777216?ie+1|0:ie,c[e+28>>2]=ce-(-33554432&se),ie=ge(be,d,a,b),se=y,Ae=ge(ke,r,x,K),ce=y+se|0,ce=(ie=Ae+ie|0)>>>0>>0?ce+1|0:ce,Ae=ge(s,g,T,W),se=y+ce|0,se=(ie=Ae+ie|0)>>>0>>0?se+1|0:se,ce=(Ae=ge(we,f,m,A))+ie|0,ie=y+se|0,ie=ce>>>0>>0?ie+1|0:ie,se=ce,ce=ge(Te,J,C,Z),ie=y+ie|0,ie=(se=se+ce|0)>>>0>>0?ie+1|0:ie,ce=ge(me,p,D,q),ie=y+ie|0,ie=(se=ce+se|0)>>>0>>0?ie+1|0:ie,se=(pe=ge(pe,B,E,V))+se|0,ce=y+ie|0,ie=(ye=ge(o,i,ye,S))+se|0,se=y+(se>>>0>>0?ce+1|0:ce)|0,ce=(ue=ge(ue,w,k,z))+ie|0,ie=y+(ie>>>0>>0?se+1|0:se)|0,ie=ce>>>0>>0?ie+1|0:ie,se=ce,ce=ge(fe,h,ve,u),ie=y+ie|0,ue=se=se+ce|0,ie=(ie=se>>>0>>0?ie+1|0:ie)+(se=n>>26)|0,ce=(se=n=ue+(ce=(67108863&n)<<6|Re>>>26)|0)>>>0>>0?ie+1|0:ie,ye=ie=se+16777216|0,n=ce=ie>>>0<16777216?ce+1|0:ce,c[e+12>>2]=se-(-33554432&ie),ie=ge(a,b,_,G),ce=y,se=(ue=ge(ke,r,me,p))+ie|0,ie=y+ce|0,ie=se>>>0>>0?ie+1|0:ie,ce=ge(o,i,s,g),ie=y+ie|0,ie=(se=ce+se|0)>>>0>>0?ie+1|0:ie,ue=ge(m,A,xe,N),ce=y+ie|0,ce=(se=ue+se|0)>>>0>>0?ce+1|0:ce,ie=(ue=ge(ve,u,v,M))+se|0,se=y+ce|0,se=ie>>>0>>0?se+1|0:se,ce=(ue=ge(R,O,I,F))+ie|0,ie=y+se|0,ie=ce>>>0>>0?ie+1|0:ie,se=ce,ce=ge(be,d,Y,Q),ie=y+ie|0,ie=(se=se+ce|0)>>>0>>0?ie+1|0:ie,ce=ge(j,he,P,L),ie=y+ie|0,ie=(se=ce+se|0)>>>0>>0?ie+1|0:ie,se=(xe=ge(we,f,ue=$,pe=ue>>31))+se|0,ce=y+ie|0,ie=(fe=ge(fe,h,U,H))+se|0,se=y+(se>>>0>>0?ce+1|0:ce)|0,se=ie>>>0>>0?se+1|0:se,fe=ie,ie=(ie=t>>25)+se|0,ie=(t=fe+(ce=(33554431&t)<<7|Ie>>>25)|0)>>>0>>0?ie+1|0:ie,fe=se=(ce=t)+33554432|0,t=ie=se>>>0<33554432?ie+1|0:ie,c[e+32>>2]=ce-(-67108864&se),se=n>>25,n=(ye=(33554431&n)<<7|ye>>>25)+(ee-(ie=-67108864&ne)|0)|0,ie=se+(te-((ie>>>0>ee>>>0)+ae|0)|0)|0,ie=n>>>0>>0?ie+1|0:ie,Ie=ie=(67108863&(ie=(n=(se=n)+33554432|0)>>>0<33554432?ie+1|0:ie))<<6|n>>>26,ie=ie+(ce=Ee-(-33554432&oe)|0)|0,c[e+20>>2]=ie,c[e+16>>2]=se-(-67108864&n),n=ge(me,p,a,b),ie=y,se=ge(ke,r,C,Z),ie=y+ie|0,ie=(n=se+n|0)>>>0>>0?ie+1|0:ie,ce=ge(s,g,E,V),se=y+ie|0,se=(n=ce+n|0)>>>0>>0?se+1|0:se,ie=ge(o,i,m,A),ce=y+se|0,ce=(n=ie+n|0)>>>0>>0?ce+1|0:ce,se=ge(v,M,k,z),ie=y+ce|0,ie=(n=se+n|0)>>>0>>0?ie+1|0:ie,se=ge(ve,u,I,F),ie=y+ie|0,ie=(n=se+n|0)>>>0>>0?ie+1|0:ie,se=ge(x,K,Y,Q),ie=y+ie|0,ie=(n=se+n|0)>>>0>>0?ie+1|0:ie,ce=ge(be,d,j,he),se=y+ie|0,se=(n=ce+n|0)>>>0>>0?se+1|0:se,ie=ge(ue,pe,T,W),ce=y+se|0,ce=(n=ie+n|0)>>>0>>0?ce+1|0:ce,se=ge(we,f,X,X>>31),ie=y+ce|0,ie=(ie=(n=se+n|0)>>>0>>0?ie+1|0:ie)+(se=t>>26)|0,ie=(t=(ce=n)+(n=(67108863&t)<<6|fe>>>26)|0)>>>0>>0?ie+1|0:ie,ie=(t=(n=t)+16777216|0)>>>0<16777216?ie+1|0:ie,c[e+36>>2]=n-(-33554432&t),ce=le-(-33554432&Me)|0,se=de-(n=-67108864&Ce)|0,ke=Se-((n>>>0>de>>>0)+re|0)|0,t=(n=ge((33554431&(n=ie))<<7|t>>>25,ie>>=25,19,0))+se|0,se=y+ke|0,ie=t>>>0>>0?se+1|0:se,se=ie=(67108863&(ie=(t=(n=t)+33554432|0)>>>0<33554432?ie+1|0:ie))<<6|t>>>26,ie=ie+ce|0,c[e+4>>2]=ie,c[e>>2]=n-(-67108864&t)}function T(e,t){var n,a,o,r,i,s,u,d,f,p,b,m,h,v,w,k,A,x,I,T,C,E,R,M,P=0,U=0,_=0,B=0,D=0,N=0,O=0,F=0,L=0,j=0,H=0,G=0,z=0,K=0,W=0,Z=0,V=0,q=0,Q=0,J=0,Y=0,X=0,$=0,ee=0,te=0,ne=0,ae=0,oe=0,re=0,ie=0,se=0,ce=0,ue=0,de=0,le=0;g=n=g-48|0,S(e,t),S(e+80|0,t+40|0),P=ge(z=(Y=c[t+92>>2])<<1,i=z>>31,G=(B=c[t+84>>2])<<1,a=G>>31),_=y,oe=K=c[t+88>>2],U=(H=ge(K,Z=K>>31,K,Z))+P|0,P=y+_|0,P=U>>>0>>0?P+1|0:P,_=(L=ge(O=c[t+96>>2],s=O>>31,H=(D=c[t+80>>2])<<1,o=H>>31))+U|0,U=y+P|0,U=_>>>0>>0?U+1|0:U,te=c[t+108>>2],L=ge(j=l(te,38),b=j>>31,te,v=te>>31),P=y+U|0,P=(_=L+_|0)>>>0>>0?P+1|0:P,F=_,X=c[t+112>>2],_=ge(N=l(X,19),u=N>>31,U=(V=c[t+104>>2])<<1,U>>31),P=y+P|0,P=(U=F+_|0)>>>0<_>>>0?P+1|0:P,ie=c[t+116>>2],_=($=ge(L=l(ie,38),r=L>>31,W=(q=c[t+100>>2])<<1,f=W>>31))+U|0,U=y+P|0,se=P=(_>>>0<$>>>0?U+1|0:U)<<1|_>>>31,ce=_=33554432+(w=_<<1)|0,ue=P=_>>>0<33554432?P+1|0:P,ne=(67108863&P)<<6|_>>>26,Q=P>>26,P=ge(G,a,O,s),U=y,_=ge(K<<=1,p=K>>31,Y,k=Y>>31),U=y+U|0,U=(P=_+P|0)>>>0<_>>>0?U+1|0:U,_=($=ge(q,m=q>>31,H,o))+P|0,P=y+U|0,P=_>>>0<$>>>0?P+1|0:P,U=_,_=ge(N,u,$=te<<1,A=$>>31),P=y+P|0,P=(U=U+_|0)>>>0<_>>>0?P+1|0:P,_=ge(L,r,V,d=V>>31),P=y+P|0,P=(U=_+U|0)>>>0<_>>>0?P+1|0:P,_=ne,ne=U<<1,U=(P<<1|U>>>31)+Q|0,U=(_=_+ne|0)>>>0>>0?U+1|0:U,ne=_,de=_=_+16777216|0,F=(33554431&(U=_>>>0<16777216?U+1|0:U))<<7|_>>>25,Q=U>>25,P=ge(z,i,Y,k),_=y,U=(J=ge(O,s,K,p))+P|0,P=y+_|0,P=U>>>0>>0?P+1|0:P,_=ge(G,a,W,f),P=y+P|0,P=(U=_+U|0)>>>0<_>>>0?P+1|0:P,_=(J=ge(H,o,V,d))+U|0,U=y+P|0,U=_>>>0>>0?U+1|0:U,P=_,_=ge(N,u,X,h=X>>31),U=y+U|0,U=(P=P+_|0)>>>0<_>>>0?U+1|0:U,_=(J=ge(L,r,$,A))+P|0,P=y+U|0,U=(_>>>0>>0?P+1|0:P)<<1|_>>>31,_=(P=F)+(F=_<<1)|0,P=U+Q|0,P=_>>>0>>0?P+1|0:P,Q=_,J=U=_+33554432|0,_=P=U>>>0<33554432?P+1|0:P,c[e+144>>2]=Q-(-67108864&U),Q=ge(P=l(q,38),P>>31,q,m),F=y,D=ge(P=D,U=P>>31,P,U),P=y+F|0,P=(U=D+Q|0)>>>0>>0?P+1|0:P,F=ge(D=l(V,19),x=D>>31,Q=O<<1,I=Q>>31),P=y+P|0,P=(U=F+U|0)>>>0>>0?P+1|0:P,F=ge(z,i,j,b),P=y+P|0,P=(U=F+U|0)>>>0>>0?P+1|0:P,F=(le=ge(N,u,K,p))+U|0,U=y+P|0,U=F>>>0>>0?U+1|0:U,P=F,F=ge(G,a,L,r),U=y+U|0,U=((P=P+F|0)>>>0>>0?U+1|0:U)<<1,F=P,le=P=U|P>>>31,E=F=33554432+(T=F<<1)|0,R=P=F>>>0<33554432?P+1|0:P,ee=(67108863&P)<<6|F>>>26,F=P>>26,P=ge(D,x,W,f),ae=y,re=B,U=(B=ge(H,o,B,C=B>>31))+P|0,P=y+ae|0,P=U>>>0>>0?P+1|0:P,B=(ae=ge(O,s,j,b))+U|0,U=y+P|0,U=B>>>0>>0?U+1|0:U,ae=ge(N,u,z,i),P=y+U|0,P=(B=ae+B|0)>>>0>>0?P+1|0:P,U=B,B=ge(L,r,oe,Z),P=y+P|0,P=((U=U+B|0)>>>0>>0?P+1|0:P)<<1,B=U,U=(U=P|U>>>31)+F|0,F=B=(P=B<<1)+ee|0,P=U=P>>>0>B>>>0?U+1|0:U,ae=B=B+16777216|0,M=(33554431&(P=B>>>0<16777216?P+1|0:P))<<7|B>>>25,ee=P>>25,P=ge(H,o,oe,Z),B=y,U=(re=ge(G,a,re,C))+P|0,P=y+B|0,P=U>>>0>>0?P+1|0:P,B=ge(D,x,V,d),P=y+P|0,P=(U=B+U|0)>>>0>>0?P+1|0:P,B=(D=ge(W,f,j,b))+U|0,U=y+P|0,U=B>>>0>>0?U+1|0:U,D=ge(N,u,Q,I),P=y+U|0,P=(B=D+B|0)>>>0>>0?P+1|0:P,D=ge(L,r,z,i),U=y+P|0,P=(U=((B=D+B|0)>>>0>>0?U+1|0:U)<<1|B>>>31)+ee|0,P=(B=(D=B<<1)+M|0)>>>0>>0?P+1|0:P,D=B,re=U=B+33554432|0,B=P=U>>>0<33554432?P+1|0:P,c[e+128>>2]=D-(-67108864&U),P=ge(K,p,q,m),U=y,D=ge(O,s,z,i),U=y+U|0,U=(P=D+P|0)>>>0>>0?U+1|0:U,D=(ee=ge(G,a,V,d))+P|0,P=y+U|0,P=D>>>0>>0?P+1|0:P,U=D,D=ge(H,o,te,v),P=y+P|0,P=(U=U+D|0)>>>0>>0?P+1|0:P,D=(ee=ge(L,r,X,h))+U|0,U=y+P|0,U=P=(D>>>0>>0?U+1|0:U)<<1|D>>>31,P=(P=_>>26)+U|0,P=(_=(ee=D<<=1)+(D=(67108863&_)<<6|J>>>26)|0)>>>0>>0?P+1|0:P,D=_,U=P,J=P=_+16777216|0,_=U=P>>>0<16777216?U+1|0:U,c[e+148>>2]=D-(-33554432&P),P=ge(H,o,Y,k),Y=y,U=(Z=ge(G,a,oe,Z))+P|0,P=y+Y|0,P=U>>>0>>0?P+1|0:P,j=ge(V,d,j,b),P=y+P|0,P=(U=j+U|0)>>>0>>0?P+1|0:P,N=(j=ge(N,u,W,f))+U|0,U=y+P|0,U=N>>>0>>0?U+1|0:U,j=ge(L,r,O,s),P=y+U|0,U=(P=((N=j+N|0)>>>0>>0?P+1|0:P)<<1|N>>>31)+(U=B>>26)|0,U=(B=(D=N<<1)+(N=(67108863&B)<<6|re>>>26)|0)>>>0>>0?U+1|0:U,N=B,P=U,j=U=B+16777216|0,B=P=U>>>0<16777216?P+1|0:P,c[e+132>>2]=N-(-33554432&U),P=ge(V,d,K,p),N=y,U=(O=ge(O,s,O,s))+P|0,P=y+N|0,P=U>>>0>>0?P+1|0:P,O=(N=ge(z,i,W,f))+U|0,U=y+P|0,U=O>>>0>>0?U+1|0:U,N=ge(G,a,$,A),P=y+U|0,P=(O=N+O|0)>>>0>>0?P+1|0:P,N=ge(H,o,X,h),U=y+P|0,U=(O=N+O|0)>>>0>>0?U+1|0:U,N=ge(P=L,r,L=ie,W=L>>31),P=y+U|0,P=(P=((O=N+O|0)>>>0>>0?P+1|0:P)<<1|O>>>31)+(U=_>>25)|0,P=(_=(D=O<<1)+(O=(33554431&_)<<7|J>>>25)|0)>>>0>>0?P+1|0:P,O=_,U=P,N=P=_+33554432|0,_=U=P>>>0<33554432?U+1|0:U,c[e+152>>2]=O-(-67108864&P),U=w-(P=-67108864&ce)|0,Z=se-((P>>>0>w>>>0)+ue|0)|0,P=B>>25,B=(j=(33554431&B)<<7|j>>>25)+U|0,U=P+Z|0,U=B>>>0>>0?U+1|0:U,D=U=(67108863&(U=(P=B+33554432|0)>>>0<33554432?U+1|0:U))<<6|P>>>26,U=U+(O=ne-(-33554432&de)|0)|0,c[e+140>>2]=U,c[e+136>>2]=B-(-67108864&P),P=ge(z,i,V,d),U=y,B=ge(q,m,Q,I),U=y+U|0,U=(P=B+P|0)>>>0>>0?U+1|0:U,B=(z=ge(K,p,te,v))+P|0,P=y+U|0,P=B>>>0>>0?P+1|0:P,U=B,B=ge(G,a,X,h),P=y+P|0,P=(U=U+B|0)>>>0>>0?P+1|0:P,B=(G=ge(H,o,L,W))+U|0,U=y+P|0,U=P=(B>>>0>>0?U+1|0:U)<<1|B>>>31,P=(P=_>>26)+U|0,U=(_=(D=B<<=1)+(B=(67108863&_)<<6|N>>>26)|0)>>>0>>0?P+1|0:P,U=(P=_+16777216|0)>>>0<16777216?U+1|0:U,c[e+156>>2]=_-(-33554432&P),B=F-(-33554432&ae)|0,G=T-(_=-67108864&E)|0,H=le-((_>>>0>T>>>0)+R|0)|0,U=ge((33554431&U)<<7|P>>>25,U>>25,19,0),P=y+H|0,U=U>>>0>(_=U+G|0)>>>0?P+1|0:P,D=U=(67108863&(U=(P=_+33554432|0)>>>0<33554432?U+1|0:U))<<6|P>>>26,U=U+B|0,c[e+124>>2]=U,c[e+120>>2]=_-(-67108864&P),P=c[t+40>>2],U=c[t+44>>2],_=c[t+4>>2],B=c[t+48>>2],G=c[t+8>>2],H=c[t+52>>2],L=c[t+12>>2],z=c[t+56>>2],O=c[t+16>>2],N=c[t+60>>2],V=c[t+20>>2],W=c[t- -64>>2],K=c[t+24>>2],j=c[t+68>>2],Z=c[t+28>>2],q=c[t+72>>2],X=c[t+32>>2],oe=c[t>>2],c[e+76>>2]=c[t+76>>2]+c[t+36>>2],c[e+72>>2]=q+X,c[e+68>>2]=j+Z,c[(te=e- -64|0)>>2]=K+W,c[e+60>>2]=N+V,c[e+56>>2]=O+z,c[e+52>>2]=L+H,c[e+48>>2]=B+G,c[e+44>>2]=U+_,c[(t=e+40|0)>>2]=P+oe,S(n,t),P=c[e+80>>2],U=c[e+4>>2],_=c[e+84>>2],B=c[e+8>>2],G=c[e+88>>2],H=c[e+12>>2],L=c[e+92>>2],z=c[e+16>>2],O=c[e+96>>2],N=c[e+20>>2],V=c[e+100>>2],W=c[e+24>>2],K=c[e+104>>2],j=c[e+28>>2],Z=c[e+108>>2],q=c[e+32>>2],X=c[e+112>>2],oe=c[e>>2],D=(Y=c[e+116>>2])-($=c[e+36>>2])|0,c[e+116>>2]=D,Q=X-q|0,c[e+112>>2]=Q,ne=Z-j|0,c[e+108>>2]=ne,F=K-W|0,c[e+104>>2]=F,ie=V-N|0,c[e+100>>2]=ie,se=O-z|0,c[e+96>>2]=se,ce=L-H|0,c[e+92>>2]=ce,ue=G-B|0,c[e+88>>2]=ue,J=_-U|0,c[e+84>>2]=J,de=P-oe|0,c[e+80>>2]=de,Y=Y+$|0,c[e+76>>2]=Y,q=q+X|0,c[e+72>>2]=q,j=j+Z|0,c[e+68>>2]=j,W=K+W|0,c[te>>2]=W,N=N+V|0,c[e+60>>2]=N,z=O+z|0,c[e+56>>2]=z,H=L+H|0,c[e+52>>2]=H,B=B+G|0,c[e+48>>2]=B,U=U+_|0,c[e+44>>2]=U,_=t,t=P+oe|0,c[_>>2]=t,P=c[n>>2],_=c[n+4>>2],G=c[n+8>>2],L=c[n+12>>2],O=c[n+16>>2],V=c[n+20>>2],K=c[n+24>>2],Z=c[n+28>>2],X=c[n+32>>2],c[e+36>>2]=c[n+36>>2]-Y,c[e+32>>2]=X-q,c[e+28>>2]=Z-j,c[e+24>>2]=K-W,c[e+20>>2]=V-N,c[e+16>>2]=O-z,c[e+12>>2]=L-H,c[e+8>>2]=G-B,c[e+4>>2]=_-U,c[e>>2]=P-t,t=c[e+120>>2],P=c[e+124>>2],U=c[e+128>>2],_=c[e+132>>2],B=c[e+136>>2],G=c[e+140>>2],H=c[e+144>>2],L=c[e+148>>2],z=c[e+152>>2],c[e+156>>2]=c[e+156>>2]-D,c[e+152>>2]=z-Q,c[e+148>>2]=L-ne,c[e+144>>2]=H-F,c[e+140>>2]=G-ie,c[e+136>>2]=B-se,c[e+132>>2]=_-ce,c[e+128>>2]=U-ue,c[e+124>>2]=P-J,c[e+120>>2]=t-de,g=n+48|0}function S(e,t){var n,a,o,r,i,s,u,d,f,p,b,m,h,g,v,w,k,A,x,I,T,S,C,E,R,M,P,U,_,B,D,N,O,F=0,L=0,j=0,H=0,G=0,z=0,K=0,W=0,Z=0,V=0,q=0,Q=0,J=0,Y=0,X=0,$=0,ee=0,te=0,ne=0,ae=0,oe=0,re=0;F=ge(a=(w=c[t+12>>2])<<1,s=a>>31,w,T=w>>31),j=y,L=(Z=ge(G=c[t+16>>2],u=G>>31,d=(H=c[t+8>>2])<<1,m=d>>31))+F|0,F=y+j|0,F=L>>>0>>0?F+1|0:F,j=(V=ge(J=(f=c[t+20>>2])<<1,h=J>>31,Z=(z=c[t+4>>2])<<1,o=Z>>31))+L|0,L=y+F|0,L=j>>>0>>0?L+1|0:L,K=ge(n=c[t+24>>2],p=n>>31,V=($=c[t>>2])<<1,r=V>>31),F=y+L|0,F=(j=K+j|0)>>>0>>0?F+1|0:F,L=j,g=c[t+32>>2],j=ge(q=l(g,19),b=q>>31,g,A=g>>31),F=y+F|0,F=(L=L+j|0)>>>0>>0?F+1|0:F,M=c[t+36>>2],j=ge(K=l(M,38),i=K>>31,x=(v=c[t+28>>2])<<1,S=x>>31),t=y+F|0,X=L=j+L|0,j=L>>>0>>0?t+1|0:t,t=ge(Z,o,G,u),F=y,L=ge(d,m,w,T),F=y+F|0,F=(t=L+t|0)>>>0>>0?F+1|0:F,W=ge(f,I=f>>31,V,r),L=y+F|0,L=(t=W+t|0)>>>0>>0?L+1|0:L,W=ge(q,b,x,S),F=y+L|0,F=(t=W+t|0)>>>0>>0?F+1|0:F,L=ge(K,i,n,p),F=y+F|0,oe=t=L+t|0,Q=t>>>0>>0?F+1|0:F,F=ge(Z,o,a,s),L=y,C=t=H,H=ge(t,Y=t>>31,t,Y),t=y+L|0,t=(F=H+F|0)>>>0>>0?t+1|0:t,L=(H=ge(V,r,G,u))+F|0,F=y+t|0,F=L>>>0>>0?F+1|0:F,t=(H=ge(W=l(v,38),k=W>>31,v,E=v>>31))+L|0,L=y+F|0,L=t>>>0>>0?L+1|0:L,t=(F=t)+(H=ge(q,b,t=n<<1,t>>31))|0,F=y+L|0,F=t>>>0>>0?F+1|0:F,L=t,t=ge(K,i,J,h),F=y+F|0,P=L=L+t|0,U=F=t>>>0>L>>>0?F+1|0:F,t=F,_=L=L+33554432|0,B=t=L>>>0<33554432?t+1|0:t,F=(F=t>>26)+Q|0,oe=t=(L=(67108863&t)<<6|L>>>26)+oe|0,F=t>>>0>>0?F+1|0:F,D=t=t+16777216|0,F=(F=(L=t>>>0<16777216?F+1|0:F)>>25)+j|0,t=(t=(33554431&L)<<7|t>>>25)>>>0>(L=t+X|0)>>>0?F+1|0:F,X=F=L+33554432|0,H=t=F>>>0<33554432?t+1|0:t,c[e+24>>2]=L-(-67108864&F),t=ge(V,r,C,Y),F=y,j=ge(Z,o,z,ae=z>>31),L=y+F|0,L=(t=j+t|0)>>>0>>0?L+1|0:L,Q=ge(j=l(n,19),ne=j>>31,n,p),F=y+L|0,F=(t=Q+t|0)>>>0>>0?F+1|0:F,L=(Q=ge(J,h,W,k))+t|0,t=y+F|0,t=L>>>0>>0?t+1|0:t,ee=ge(q,b,Q=G<<1,R=Q>>31),F=y+t|0,F=(L=ee+L|0)>>>0>>0?F+1|0:F,t=L,L=ge(K,i,a,s),F=y+F|0,te=t=t+L|0,ee=t>>>0>>0?F+1|0:F,t=ge(J,h,j,ne),F=y,z=ge(V,r,z,ae),L=y+F|0,L=(t=z+t|0)>>>0>>0?L+1|0:L,z=ge(G,u,W,k),F=y+L|0,F=(t=z+t|0)>>>0>>0?F+1|0:F,L=(z=ge(q,b,a,s))+t|0,t=y+F|0,t=L>>>0>>0?t+1|0:t,z=ge(K,i,C,Y),F=y+t|0,re=L=z+L|0,ae=L>>>0>>0?F+1|0:F,L=ge(t=l(f,38),t>>31,f,I),z=y,t=$,$=L,L=ge(t,F=t>>31,t,F),F=y+z|0,F=(t=$+L|0)>>>0>>0?F+1|0:F,j=ge(j,ne,Q,R),L=y+F|0,L=(t=j+t|0)>>>0>>0?L+1|0:L,j=ge(a,s,W,k),F=y+L|0,F=(t=j+t|0)>>>0>>0?F+1|0:F,L=(j=ge(q,b,d,m))+t|0,t=y+F|0,t=L>>>0>>0?t+1|0:t,j=ge(Z,o,K,i),F=y+t|0,z=L=j+L|0,ne=F=L>>>0>>0?F+1|0:F,N=L=L+33554432|0,O=F=L>>>0<33554432?F+1|0:F,t=F>>26,F=(67108863&F)<<6|L>>>26,L=t+ae|0,$=j=F+re|0,F=L=F>>>0>j>>>0?L+1|0:L,re=L=j+16777216|0,j=(33554431&(F=L>>>0<16777216?F+1|0:F))<<7|L>>>25,F=(F>>25)+ee|0,F=(L=j+te|0)>>>0>>0?F+1|0:F,ee=t=L+33554432|0,j=F=t>>>0<33554432?F+1|0:F,c[e+8>>2]=L-(-67108864&t),t=ge(d,m,f,I),F=y,L=ge(G,u,a,s),F=y+F|0,F=(t=L+t|0)>>>0>>0?F+1|0:F,L=ge(Z,o,n,p),F=y+F|0,F=(t=L+t|0)>>>0>>0?F+1|0:F,L=ge(V,r,v,E),F=y+F|0,F=(t=L+t|0)>>>0>>0?F+1|0:F,te=(L=ge(K,i,g,A))+t|0,t=y+F|0,L=(F=H>>26)+(L=L>>>0>te>>>0?t+1|0:t)|0,X=t=(H=(67108863&H)<<6|X>>>26)+te|0,F=t>>>0>>0?L+1|0:L,te=t=t+16777216|0,H=F=t>>>0<16777216?F+1|0:F,c[e+28>>2]=X-(-33554432&t),t=ge(V,r,w,T),L=y,F=(Y=ge(Z,o,C,Y))+t|0,t=y+L|0,t=F>>>0>>0?t+1|0:t,F=(W=ge(n,p,W,k))+F|0,L=y+t|0,t=(q=ge(q,b,J,h))+F|0,F=y+(F>>>0>>0?L+1|0:L)|0,F=t>>>0>>0?F+1|0:F,L=ge(K,i,G,u),F=y+F|0,F=(F=(t=L+t|0)>>>0>>0?F+1|0:F)+(L=j>>26)|0,t=(L=j=(X=t)+(t=(67108863&j)<<6|ee>>>26)|0)>>>0>>0?F+1|0:F,q=F=L+16777216|0,j=t=F>>>0<16777216?t+1|0:t,c[e+12>>2]=L-(-33554432&F),t=ge(n,p,d,m),F=y,L=ge(G,u,G,u),F=y+F|0,F=(t=L+t|0)>>>0>>0?F+1|0:F,L=ge(a,s,J,h),F=y+F|0,F=(t=L+t|0)>>>0>>0?F+1|0:F,L=(G=ge(Z,o,x,S))+t|0,t=y+F|0,t=L>>>0>>0?t+1|0:t,F=(G=ge(V,r,g,A))+L|0,L=y+t|0,L=F>>>0>>0?L+1|0:L,t=(G=ge(t=K,i,K=M,J=K>>31))+F|0,F=y+L|0,F=t>>>0>>0?F+1|0:F,L=t,F=(t=H>>25)+F|0,F=(L=L+(H=(33554431&H)<<7|te>>>25)|0)>>>0>>0?F+1|0:F,G=t=L+33554432|0,H=F=t>>>0<33554432?F+1|0:F,c[e+32>>2]=L-(-67108864&t),F=j>>25,L=(j=(33554431&j)<<7|q>>>25)+(P-(t=-67108864&_)|0)|0,t=F+(U-((t>>>0>P>>>0)+B|0)|0)|0,F=L>>>0>>0?t+1|0:t,j=F=(67108863&(F=(t=L+33554432|0)>>>0<33554432?F+1|0:F))<<6|t>>>26,F=F+(W=oe-(-33554432&D)|0)|0,c[e+20>>2]=F,c[e+16>>2]=L-(-67108864&t),t=ge(a,s,n,p),L=y,F=(j=ge(f,I,Q,R))+t|0,t=y+L|0,t=F>>>0>>0?t+1|0:t,L=(j=ge(d,m,v,E))+F|0,F=y+t|0,F=L>>>0>>0?F+1|0:F,t=(j=ge(Z,o,g,A))+L|0,L=y+F|0,L=t>>>0>>0?L+1|0:L,j=(F=t)+(t=ge(V,r,K,J))|0,F=y+L|0,F=(t=t>>>0>j>>>0?F+1|0:F)+(F=H>>26)|0,t=(L=(H=(67108863&H)<<6|G>>>26)+j|0)>>>0>>0?F+1|0:F,t=(F=L+16777216|0)>>>0<16777216?t+1|0:t,c[e+36>>2]=L-(-33554432&F),H=$-(-33554432&re)|0,j=z-(L=-67108864&N)|0,Z=ne-((L>>>0>z>>>0)+O|0)|0,t=ge((33554431&t)<<7|F>>>25,t>>25,19,0),F=y+Z|0,t=t>>>0>(L=t+j|0)>>>0?F+1|0:F,j=t=(67108863&(t=(F=L+33554432|0)>>>0<33554432?t+1|0:t))<<6|F>>>26,t=t+H|0,c[e+4>>2]=t,c[e>>2]=L-(-67108864&F)}function C(e,t,n,a,o){var r,i,d,l,f,p,b,m,h,y,v,w,k,A,x,I=0,T=0,S=0,C=0,E=0,R=0,M=0,P=0,U=0,_=0,B=0,D=0,N=0,O=0,F=0,L=0,j=0,H=0,G=0,z=0,K=0,W=0,Z=0,V=0,q=0,Q=0,J=0,Y=0,X=0,$=0,ee=0,te=0,ne=0,ae=0;for(r=g+-64|0,i=c[e+60>>2],d=c[e+56>>2],z=c[e+52>>2],G=c[e+48>>2],l=c[e+44>>2],f=c[e+40>>2],p=c[e+36>>2],b=c[e+32>>2],m=c[e+28>>2],h=c[e+24>>2],y=c[e+20>>2],v=c[e+16>>2],w=c[e+12>>2],k=c[e+8>>2],A=c[e+4>>2],x=c[e>>2];;){if(!o&a>>>0>63|o)I=n;else{if(c[r+56>>2]=0,c[r+60>>2]=0,c[r+48>>2]=0,c[r+52>>2]=0,c[r+40>>2]=0,c[r+44>>2]=0,c[r+32>>2]=0,c[r+36>>2]=0,c[r+24>>2]=0,c[r+28>>2]=0,c[r+16>>2]=0,c[r+20>>2]=0,c[r+8>>2]=0,c[r+12>>2]=0,c[r>>2]=0,c[r+4>>2]=0,S=0,a|o)for(;s[S+r|0]=u[t+S|0],!o&(S=S+1|0)>>>0>>0|o;);t=I=r,q=n}for(K=20,T=x,_=A,B=k,O=w,S=v,n=y,E=h,R=m,M=b,L=p,D=f,C=i,j=d,F=z,N=G,P=l;U=S,T=_e((S=T+S|0)^N,16),U=N=_e(U^(M=T+M|0),12),N=_e((H=S+N|0)^T,8),S=_e(U^(M=N+M|0),7),C=_e((T=R+O|0)^C,16),R=_e((P=C+P|0)^R,12),O=_e((B=E+B|0)^j,16),E=_e((D=O+D|0)^E,12),j=(W=T+R|0)+S|0,Z=_e((B=E+B|0)^O,8),T=_e(j^Z,16),O=_e((_=n+_|0)^F,16),n=_e((L=O+L|0)^n,12),U=S,F=_e((_=n+_|0)^O,8),U=_e(U^(S=(V=F+L|0)+T|0),12),j=_e(T^(O=U+j|0),8),S=_e((L=j+S|0)^U,7),U=M,M=B,T=_e(C^W,8),B=_e((C=T+P|0)^R,7),F=_e((M=M+B|0)^F,16),P=_e((R=U+F|0)^B,12),F=_e(F^(B=P+M|0),8),R=_e((M=R+F|0)^P,7),P=C,C=_,_=_e((D=D+Z|0)^E,7),E=P+(N=_e((C=C+_|0)^N,16))|0,P=C,C=_e(E^_,12),N=_e(N^(_=P+C|0),8),E=_e((P=E+N|0)^C,7),U=D,C=T,T=_e(n^V,7),C=_e(C^(D=T+H|0),16),H=_e((n=U+C|0)^T,12),C=_e(C^(T=H+D|0),8),n=_e((D=n+C|0)^H,7),K=K-2|0;);if(K=u[t+4|0]|u[t+5|0]<<8|u[t+6|0]<<16|u[t+7|0]<<24,H=u[t+8|0]|u[t+9|0]<<8|u[t+10|0]<<16|u[t+11|0]<<24,W=u[t+12|0]|u[t+13|0]<<8|u[t+14|0]<<16|u[t+15|0]<<24,Z=u[t+16|0]|u[t+17|0]<<8|u[t+18|0]<<16|u[t+19|0]<<24,V=u[t+20|0]|u[t+21|0]<<8|u[t+22|0]<<16|u[t+23|0]<<24,U=u[t+24|0]|u[t+25|0]<<8|u[t+26|0]<<16|u[t+27|0]<<24,Q=u[t+28|0]|u[t+29|0]<<8|u[t+30|0]<<16|u[t+31|0]<<24,J=u[t+32|0]|u[t+33|0]<<8|u[t+34|0]<<16|u[t+35|0]<<24,Y=u[t+36|0]|u[t+37|0]<<8|u[t+38|0]<<16|u[t+39|0]<<24,X=u[t+40|0]|u[t+41|0]<<8|u[t+42|0]<<16|u[t+43|0]<<24,$=u[t+44|0]|u[t+45|0]<<8|u[t+46|0]<<16|u[t+47|0]<<24,ee=u[t+48|0]|u[t+49|0]<<8|u[t+50|0]<<16|u[t+51|0]<<24,te=u[t+52|0]|u[t+53|0]<<8|u[t+54|0]<<16|u[t+55|0]<<24,ne=u[t+56|0]|u[t+57|0]<<8|u[t+58|0]<<16|u[t+59|0]<<24,ae=u[t+60|0]|u[t+61|0]<<8|u[t+62|0]<<16|u[t+63|0]<<24,T=T+x^(u[0|t]|u[t+1|0]<<8|u[t+2|0]<<16|u[t+3|0]<<24),s[0|I]=T,s[I+1|0]=T>>>8,s[I+2|0]=T>>>16,s[I+3|0]=T>>>24,T=C+i^ae,s[I+60|0]=T,s[I+61|0]=T>>>8,s[I+62|0]=T>>>16,s[I+63|0]=T>>>24,T=j+d^ne,s[I+56|0]=T,s[I+57|0]=T>>>8,s[I+58|0]=T>>>16,s[I+59|0]=T>>>24,T=F+z^te,s[I+52|0]=T,s[I+53|0]=T>>>8,s[I+54|0]=T>>>16,s[I+55|0]=T>>>24,T=N+G^ee,s[I+48|0]=T,s[I+49|0]=T>>>8,s[I+50|0]=T>>>16,s[I+51|0]=T>>>24,T=P+l^$,s[I+44|0]=T,s[I+45|0]=T>>>8,s[I+46|0]=T>>>16,s[I+47|0]=T>>>24,T=D+f^X,s[I+40|0]=T,s[I+41|0]=T>>>8,s[I+42|0]=T>>>16,s[I+43|0]=T>>>24,T=L+p^Y,s[I+36|0]=T,s[I+37|0]=T>>>8,s[I+38|0]=T>>>16,s[I+39|0]=T>>>24,T=M+b^J,s[I+32|0]=T,s[I+33|0]=T>>>8,s[I+34|0]=T>>>16,s[I+35|0]=T>>>24,R=R+m^Q,s[I+28|0]=R,s[I+29|0]=R>>>8,s[I+30|0]=R>>>16,s[I+31|0]=R>>>24,E=U^E+h,s[I+24|0]=E,s[I+25|0]=E>>>8,s[I+26|0]=E>>>16,s[I+27|0]=E>>>24,n=V^n+y,s[I+20|0]=n,s[I+21|0]=n>>>8,s[I+22|0]=n>>>16,s[I+23|0]=n>>>24,n=Z^S+v,s[I+16|0]=n,s[I+17|0]=n>>>8,s[I+18|0]=n>>>16,s[I+19|0]=n>>>24,n=W^O+w,s[I+12|0]=n,s[I+13|0]=n>>>8,s[I+14|0]=n>>>16,s[I+15|0]=n>>>24,n=H^B+k,s[I+8|0]=n,s[I+9|0]=n>>>8,s[I+10|0]=n>>>16,s[I+11|0]=n>>>24,n=K^_+A,s[I+4|0]=n,s[I+5|0]=n>>>8,s[I+6|0]=n>>>16,s[I+7|0]=n>>>24,z=!(G=G+1|0)+z|0,!o&a>>>0<=64){if(!(!a|!o&a>>>0>63|0!=(0|o)))for(S=0;s[S+q|0]=u[I+S|0],a>>>0>(S=S+1|0)>>>0;);c[e+52>>2]=z,c[e+48>>2]=G;break}t=t- -64|0,n=I- -64|0,o=o-1|0,o=(a=a+-64|0)>>>0<4294967232?o+1|0:o}}function E(e,t){var n,a=0,o=0,r=0,i=0,u=0,d=0,l=0;g=n=g-704|0,a=80+((o=c[e+72>>2]>>>3&127)+e|0)|0,o>>>0<=111?Ce(a,34640,112-o|0):(Ce(a,34640,128-o|0),k(e,o=e+80|0,n,n+640|0),Ee(o,0,112)),d=(r=c[e+64>>2])<<24|(65280&r)<<8,o=(i=16711680&r)>>>8|0,l=i<<24,i=(u=-16777216&r)>>>24|0,a=l|u<<8|-16777216&((255&(a=c[e+68>>2]))<<24|r>>>8)|16711680&((16777215&a)<<8|r>>>24)|a>>>8&65280|a>>>24,s[e+192|0]=a,s[e+193|0]=a>>>8,s[e+194|0]=a>>>16,s[e+195|0]=a>>>24,o=(a=o|i|d)|(o=0)|o|0,s[e+196|0]=o,s[e+197|0]=o>>>8,s[e+198|0]=o>>>16,s[e+199|0]=o>>>24,d=(r=c[e+72>>2])<<24|(65280&r)<<8,o=(i=16711680&r)>>>8|0,l=i<<24,i=(u=-16777216&r)>>>24|0,a=l|u<<8|-16777216&((255&(a=c[e+76>>2]))<<24|r>>>8)|16711680&((16777215&a)<<8|r>>>24)|a>>>8&65280|a>>>24,s[e+200|0]=a,s[e+201|0]=a>>>8,s[e+202|0]=a>>>16,s[e+203|0]=a>>>24,o=(a=o|i|d)|(o=0)|o|0,s[e+204|0]=o,s[e+205|0]=o>>>8,s[e+206|0]=o>>>16,s[e+207|0]=o>>>24,k(e,e+80|0,n,n+640|0),d=(r=c[e>>2])<<24|(65280&r)<<8,o=(i=16711680&r)>>>8|0,l=i<<24,i=(u=-16777216&r)>>>24|0,a=l|u<<8|-16777216&((255&(a=c[e+4>>2]))<<24|r>>>8)|16711680&((16777215&a)<<8|r>>>24)|a>>>8&65280|a>>>24,s[0|t]=a,s[t+1|0]=a>>>8,s[t+2|0]=a>>>16,s[t+3|0]=a>>>24,o=(a=o|i|d)|(o=0)|o|0,s[t+4|0]=o,s[t+5|0]=o>>>8,s[t+6|0]=o>>>16,s[t+7|0]=o>>>24,d=(r=c[e+8>>2])<<24|(65280&r)<<8,o=(i=16711680&r)>>>8|0,l=i<<24,i=(u=-16777216&r)>>>24|0,a=l|u<<8|-16777216&((255&(a=c[e+12>>2]))<<24|r>>>8)|16711680&((16777215&a)<<8|r>>>24)|a>>>8&65280|a>>>24,s[t+8|0]=a,s[t+9|0]=a>>>8,s[t+10|0]=a>>>16,s[t+11|0]=a>>>24,o=(a=o|i|d)|(o=0)|o|0,s[t+12|0]=o,s[t+13|0]=o>>>8,s[t+14|0]=o>>>16,s[t+15|0]=o>>>24,d=(r=c[e+16>>2])<<24|(65280&r)<<8,o=(i=16711680&r)>>>8|0,l=i<<24,i=(u=-16777216&r)>>>24|0,a=l|u<<8|-16777216&((255&(a=c[e+20>>2]))<<24|r>>>8)|16711680&((16777215&a)<<8|r>>>24)|a>>>8&65280|a>>>24,s[t+16|0]=a,s[t+17|0]=a>>>8,s[t+18|0]=a>>>16,s[t+19|0]=a>>>24,o=(a=o|i|d)|(o=0)|o|0,s[t+20|0]=o,s[t+21|0]=o>>>8,s[t+22|0]=o>>>16,s[t+23|0]=o>>>24,d=(r=c[e+24>>2])<<24|(65280&r)<<8,o=(i=16711680&r)>>>8|0,l=i<<24,i=(u=-16777216&r)>>>24|0,a=l|u<<8|-16777216&((255&(a=c[e+28>>2]))<<24|r>>>8)|16711680&((16777215&a)<<8|r>>>24)|a>>>8&65280|a>>>24,s[t+24|0]=a,s[t+25|0]=a>>>8,s[t+26|0]=a>>>16,s[t+27|0]=a>>>24,o=(a=o|i|d)|(o=0)|o|0,s[t+28|0]=o,s[t+29|0]=o>>>8,s[t+30|0]=o>>>16,s[t+31|0]=o>>>24,d=(r=c[e+32>>2])<<24|(65280&r)<<8,o=(i=16711680&r)>>>8|0,l=i<<24,i=(u=-16777216&r)>>>24|0,a=l|u<<8|-16777216&((255&(a=c[e+36>>2]))<<24|r>>>8)|16711680&((16777215&a)<<8|r>>>24)|a>>>8&65280|a>>>24,s[t+32|0]=a,s[t+33|0]=a>>>8,s[t+34|0]=a>>>16,s[t+35|0]=a>>>24,o=(a=o|i|d)|(o=0)|o|0,s[t+36|0]=o,s[t+37|0]=o>>>8,s[t+38|0]=o>>>16,s[t+39|0]=o>>>24,d=(r=c[e+40>>2])<<24|(65280&r)<<8,o=(i=16711680&r)>>>8|0,l=i<<24,i=(u=-16777216&r)>>>24|0,a=l|u<<8|-16777216&((255&(a=c[e+44>>2]))<<24|r>>>8)|16711680&((16777215&a)<<8|r>>>24)|a>>>8&65280|a>>>24,s[t+40|0]=a,s[t+41|0]=a>>>8,s[t+42|0]=a>>>16,s[t+43|0]=a>>>24,o=(a=o|i|d)|(o=0)|o|0,s[t+44|0]=o,s[t+45|0]=o>>>8,s[t+46|0]=o>>>16,s[t+47|0]=o>>>24,d=(r=c[e+48>>2])<<24|(65280&r)<<8,o=(i=16711680&r)>>>8|0,l=i<<24,i=(u=-16777216&r)>>>24|0,a=l|u<<8|-16777216&((255&(a=c[e+52>>2]))<<24|r>>>8)|16711680&((16777215&a)<<8|r>>>24)|a>>>8&65280|a>>>24,s[t+48|0]=a,s[t+49|0]=a>>>8,s[t+50|0]=a>>>16,s[t+51|0]=a>>>24,o=(a=o|i|d)|(o=0)|o|0,s[t+52|0]=o,s[t+53|0]=o>>>8,s[t+54|0]=o>>>16,s[t+55|0]=o>>>24,d=(r=c[e+56>>2])<<24|(65280&r)<<8,o=(i=16711680&r)>>>8|0,a=t,l=i<<24,i=(u=-16777216&r)>>>24|0,t=l|u<<8|-16777216&((255&(t=c[e+60>>2]))<<24|r>>>8)|16711680&((16777215&t)<<8|r>>>24)|t>>>8&65280|t>>>24,s[a+56|0]=t,s[a+57|0]=t>>>8,s[a+58|0]=t>>>16,s[a+59|0]=t>>>24,t=(t=o|i|d)|(o=0)|o|0,s[a+60|0]=t,s[a+61|0]=t>>>8,s[a+62|0]=t>>>16,s[a+63|0]=t>>>24,$e(n,704),$e(e,208),g=n+704|0}function R(e,t,n){var a,o=0,i=0,d=0,l=0,f=0,p=0;g=a=g+-64|0;e:{if((n-65&255)>>>0>191){if(o=-1,!(u[e+80|0]|u[e+81|0]<<8|u[e+82|0]<<16|u[e+83|0]<<24|u[e+84|0]|u[e+85|0]<<8|u[e+86|0]<<16|u[e+87|0]<<24)){if((l=u[e+352|0]|u[e+353|0]<<8|u[e+354|0]<<16|u[e+355|0]<<24)>>>0>=129){if(d=u[0|(o=e- -64|0)]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,f=i=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,i=(l=d+128|0)>>>0<128?i+1|0:i,s[0|o]=l,s[o+1|0]=l>>>8,s[o+2|0]=l>>>16,s[o+3|0]=l>>>24,s[o+4|0]=i,s[o+5|0]=i>>>8,s[o+6|0]=i>>>16,s[o+7|0]=i>>>24,i=u[e+76|0]|u[e+77|0]<<8|u[e+78|0]<<16|u[e+79|0]<<24,i=(o=-1==(0|f)&d>>>0>4294967167)>>>0>(d=o+(u[e+72|0]|u[e+73|0]<<8|u[e+74|0]<<16|u[e+75|0]<<24)|0)>>>0?i+1|0:i,s[e+72|0]=d,s[e+73|0]=d>>>8,s[e+74|0]=d>>>16,s[e+75|0]=d>>>24,s[e+76|0]=i,s[e+77|0]=i>>>8,s[e+78|0]=i>>>16,s[e+79|0]=i>>>24,v(e,i=e+96|0),o=(u[e+352|0]|u[e+353|0]<<8|u[e+354|0]<<16|u[e+355|0]<<24)-128|0,s[e+352|0]=o,s[e+353|0]=o>>>8,s[e+354|0]=o>>>16,s[e+355|0]=o>>>24,o>>>0>=129)break e;Ce(i,e+224|0,o),l=u[e+352|0]|u[e+353|0]<<8|u[e+354|0]<<16|u[e+355|0]<<24}i=u[0|(o=e- -64|0)]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,d=p=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,d=(f=i+l|0)>>>0>>0?d+1|0:d,s[0|o]=f,s[o+1|0]=f>>>8,s[o+2|0]=f>>>16,s[o+3|0]=f>>>24,s[o+4|0]=d,s[o+5|0]=d>>>8,s[o+6|0]=d>>>16,s[o+7|0]=d>>>24,o=(0|d)==(0|p)&i>>>0>f>>>0|d>>>0

>>0,i=u[e+76|0]|u[e+77|0]<<8|u[e+78|0]<<16|u[e+79|0]<<24,i=(d=o+(u[e+72|0]|u[e+73|0]<<8|u[e+74|0]<<16|u[e+75|0]<<24)|0)>>>0>>0?i+1|0:i,s[e+72|0]=d,s[e+73|0]=d>>>8,s[e+74|0]=d>>>16,s[e+75|0]=d>>>24,s[e+76|0]=i,s[e+77|0]=i>>>8,s[e+78|0]=i>>>16,s[e+79|0]=i>>>24,u[e+356|0]&&(s[e+88|0]=255,s[e+89|0]=255,s[e+90|0]=255,s[e+91|0]=255,s[e+92|0]=255,s[e+93|0]=255,s[e+94|0]=255,s[e+95|0]=255),s[e+80|0]=255,s[e+81|0]=255,s[e+82|0]=255,s[e+83|0]=255,s[e+84|0]=255,s[e+85|0]=255,s[e+86|0]=255,s[e+87|0]=255,Ee((o=e+96|0)+l|0,0,256-l|0),v(e,o),i=u[e+4|0]|u[e+5|0]<<8|u[e+6|0]<<16|u[e+7|0]<<24,c[a>>2]=u[0|e]|u[e+1|0]<<8|u[e+2|0]<<16|u[e+3|0]<<24,c[a+4>>2]=i,i=u[e+12|0]|u[e+13|0]<<8|u[e+14|0]<<16|u[e+15|0]<<24,c[a+8>>2]=u[e+8|0]|u[e+9|0]<<8|u[e+10|0]<<16|u[e+11|0]<<24,c[a+12>>2]=i,i=u[e+20|0]|u[e+21|0]<<8|u[e+22|0]<<16|u[e+23|0]<<24,c[a+16>>2]=u[e+16|0]|u[e+17|0]<<8|u[e+18|0]<<16|u[e+19|0]<<24,c[a+20>>2]=i,i=u[e+28|0]|u[e+29|0]<<8|u[e+30|0]<<16|u[e+31|0]<<24,c[a+24>>2]=u[e+24|0]|u[e+25|0]<<8|u[e+26|0]<<16|u[e+27|0]<<24,c[a+28>>2]=i,i=u[e+36|0]|u[e+37|0]<<8|u[e+38|0]<<16|u[e+39|0]<<24,c[a+32>>2]=u[e+32|0]|u[e+33|0]<<8|u[e+34|0]<<16|u[e+35|0]<<24,c[a+36>>2]=i,i=u[e+44|0]|u[e+45|0]<<8|u[e+46|0]<<16|u[e+47|0]<<24,c[a+40>>2]=u[e+40|0]|u[e+41|0]<<8|u[e+42|0]<<16|u[e+43|0]<<24,c[a+44>>2]=i,i=u[e+52|0]|u[e+53|0]<<8|u[e+54|0]<<16|u[e+55|0]<<24,c[a+48>>2]=u[e+48|0]|u[e+49|0]<<8|u[e+50|0]<<16|u[e+51|0]<<24,c[a+52>>2]=i,i=u[e+60|0]|u[e+61|0]<<8|u[e+62|0]<<16|u[e+63|0]<<24,c[a+56>>2]=u[e+56|0]|u[e+57|0]<<8|u[e+58|0]<<16|u[e+59|0]<<24,c[a+60>>2]=i,Ce(t,a,n),$e(e,64),$e(o,256),o=0}return g=a- -64|0,o}Le(),r()}b(1280,1142,306,1086),r()}function M(e,t){var n,a,o,r,i,d,l,f,p,b,m,h,y,v,w,k,A=0,x=0,T=0,C=0,E=0,R=0,M=0;for(g=n=g-320|0,O(a=e+40|0,t),c[e+84>>2]=0,c[e+88>>2]=0,c[e+80>>2]=1,c[e+92>>2]=0,c[e+96>>2]=0,c[e+100>>2]=0,c[e+104>>2]=0,c[e+108>>2]=0,c[e+112>>2]=0,c[e+116>>2]=0,S(R=n+240|0,a),I(C=n+192|0,R,1344),M=-1,o=c[n+240>>2]-1|0,c[n+240>>2]=o,c[n+192>>2]=c[n+192>>2]+1,r=c[n+244>>2],i=c[n+248>>2],d=c[n+252>>2],l=c[n+256>>2],f=c[n+260>>2],p=c[n+264>>2],b=c[n+268>>2],m=c[n+272>>2],h=c[n+276>>2],S(E=n+144|0,C),I(E,E,C),S(e,E),I(e,e,C),I(e,e,R),g=x=g-144|0,S(T=x+96|0,e),S(A=x+48|0,T),S(A,A),I(A,e,A),I(T,T,A),S(T,T),I(T,A,T),S(A,T),S(A,A),S(A,A),S(A,A),S(A,A),I(T,A,T),S(A,T),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),I(A,A,T),S(x,A),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),S(x,x),I(A,x,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),I(T,A,T),S(A,T),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),I(A,A,T),S(x,A),A=1;S(x,x),100!=(0|(A=A+1|0)););I(A=x+48|0,x,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),S(A,A),I(T=x+96|0,A,T),S(T,T),S(T,T),I(e,T,e),g=x+144|0,I(e,e,E),I(e,e,R),S(A=n+96|0,e),I(A,A,C),A=c[n+132>>2],c[n+84>>2]=A-h,x=c[n+128>>2],c[n+80>>2]=x-m,T=c[n+124>>2],c[n+76>>2]=T-b,C=c[n+120>>2],c[n+72>>2]=C-p,E=c[n+116>>2],c[n+68>>2]=E-f,R=c[n+112>>2],c[n+64>>2]=R-l,y=c[n+108>>2],c[n+60>>2]=y-d,v=c[n+104>>2],c[n+56>>2]=v-i,w=c[n+100>>2],c[n+52>>2]=w-r,k=c[n+96>>2],c[n+48>>2]=k-o,Y(n,n+48|0);e:{if(!ie(n,32)){if(c[n+36>>2]=A+h,c[n+32>>2]=x+m,c[n+28>>2]=T+b,c[n+24>>2]=C+p,c[n+20>>2]=E+f,c[n+16>>2]=R+l,c[n+12>>2]=d+y,c[n+8>>2]=i+v,c[n+4>>2]=r+w,c[n>>2]=o+k,Y(A=n+288|0,n),!ie(A,32))break e;I(e,e,1392)}Y(n+288|0,e),(1&s[n+288|0])==(u[t+31|0]>>>7|0)&&(c[e>>2]=0-c[e>>2],c[e+36>>2]=0-c[e+36>>2],c[e+32>>2]=0-c[e+32>>2],c[e+28>>2]=0-c[e+28>>2],c[e+24>>2]=0-c[e+24>>2],c[e+20>>2]=0-c[e+20>>2],c[e+16>>2]=0-c[e+16>>2],c[e+12>>2]=0-c[e+12>>2],c[e+8>>2]=0-c[e+8>>2],c[e+4>>2]=0-c[e+4>>2]),I(e+120|0,e,a),M=0}return g=n+320|0,M}function P(e,t,n){var a,o,r,i,c,d,l,f,p,b,m,h,g=0,y=0,v=0,w=0,k=0,A=0,x=0,I=0,T=0,S=0,C=0,E=0,R=0,M=0,P=0,U=0,_=0,B=0,D=0,N=0;for(k=1634760805,y=a=u[0|n]|u[n+1|0]<<8|u[n+2|0]<<16|u[n+3|0]<<24,A=o=u[n+4|0]|u[n+5|0]<<8|u[n+6|0]<<16|u[n+7|0]<<24,x=r=u[n+8|0]|u[n+9|0]<<8|u[n+10|0]<<16|u[n+11|0]<<24,I=i=u[n+12|0]|u[n+13|0]<<8|u[n+14|0]<<16|u[n+15|0]<<24,E=857760878,T=c=u[0|t]|u[t+1|0]<<8|u[t+2|0]<<16|u[t+3|0]<<24,v=d=u[t+4|0]|u[t+5|0]<<8|u[t+6|0]<<16|u[t+7|0]<<24,C=l=u[t+8|0]|u[t+9|0]<<8|u[t+10|0]<<16|u[t+11|0]<<24,M=f=u[t+12|0]|u[t+13|0]<<8|u[t+14|0]<<16|u[t+15|0]<<24,t=2036477234,w=p=u[n+16|0]|u[n+17|0]<<8|u[n+18|0]<<16|u[n+19|0]<<24,g=1797285236,P=b=u[n+28|0]|u[n+29|0]<<8|u[n+30|0]<<16|u[n+31|0]<<24,R=m=u[n+24|0]|u[n+25|0]<<8|u[n+26|0]<<16|u[n+27|0]<<24,n=h=u[n+20|0]|u[n+21|0]<<8|u[n+22|0]<<16|u[n+23|0]<<24;S=_e(y+E|0,7)^M,U=_e(S+E|0,9)^R,I=_e(n+k|0,7)^I,_=_e(I+k|0,9)^C,D=_e(_+I|0,13)^n,x=_e(g+w|0,7)^x,B=_e(x+g|0,9)^v,C=_e(x+B|0,13)^w,w=_e(B+C|0,18)^g,v=_e(t+T|0,7)^P,n=D^_e(w+v|0,7),R=U^_e(n+w|0,9),P=_e(n+R|0,13)^v,g=_e(R+P|0,18)^w,A=_e(t+v|0,9)^A,T=_e(A+v|0,13)^T,t=_e(T+A|0,18)^t,w=_e(t+S|0,7)^C,C=_e(w+t|0,9)^_,M=_e(w+C|0,13)^S,t=_e(C+M|0,18)^t,S=_e(S+U|0,13)^y,y=_e(S+U|0,18)^E,T=_e(y+I|0,7)^T,v=_e(T+y|0,9)^B,I=_e(v+T|0,13)^I,E=_e(v+I|0,18)^y,k=_e(_+D|0,18)^k,y=_e(k+x|0,7)^S,A=_e(y+k|0,9)^A,x=_e(y+A|0,13)^x,k=_e(A+x|0,18)^k,S=N>>>0<18,N=N+2|0,S;);g=g+1797285236|0,s[e+60|0]=g,s[e+61|0]=g>>>8,s[e+62|0]=g>>>16,s[e+63|0]=g>>>24,g=P+b|0,s[e+56|0]=g,s[e+57|0]=g>>>8,s[e+58|0]=g>>>16,s[e+59|0]=g>>>24,g=R+m|0,s[e+52|0]=g,s[e+53|0]=g>>>8,s[e+54|0]=g>>>16,s[e+55|0]=g>>>24,n=n+h|0,s[e+48|0]=n,s[e+49|0]=n>>>8,s[e+50|0]=n>>>16,s[e+51|0]=n>>>24,n=w+p|0,s[e+44|0]=n,s[e+45|0]=n>>>8,s[e+46|0]=n>>>16,s[e+47|0]=n>>>24,t=t+2036477234|0,s[e+40|0]=t,s[e+41|0]=t>>>8,s[e+42|0]=t>>>16,s[e+43|0]=t>>>24,t=M+f|0,s[e+36|0]=t,s[e+37|0]=t>>>8,s[e+38|0]=t>>>16,s[e+39|0]=t>>>24,t=C+l|0,s[e+32|0]=t,s[e+33|0]=t>>>8,s[e+34|0]=t>>>16,s[e+35|0]=t>>>24,t=v+d|0,s[e+28|0]=t,s[e+29|0]=t>>>8,s[e+30|0]=t>>>16,s[e+31|0]=t>>>24,t=T+c|0,s[e+24|0]=t,s[e+25|0]=t>>>8,s[e+26|0]=t>>>16,s[e+27|0]=t>>>24,t=E+857760878|0,s[e+20|0]=t,s[e+21|0]=t>>>8,s[e+22|0]=t>>>16,s[e+23|0]=t>>>24,t=I+i|0,s[e+16|0]=t,s[e+17|0]=t>>>8,s[e+18|0]=t>>>16,s[e+19|0]=t>>>24,t=x+r|0,s[e+12|0]=t,s[e+13|0]=t>>>8,s[e+14|0]=t>>>16,s[e+15|0]=t>>>24,t=A+o|0,s[e+8|0]=t,s[e+9|0]=t>>>8,s[e+10|0]=t>>>16,s[e+11|0]=t>>>24,t=y+a|0,s[e+4|0]=t,s[e+5|0]=t>>>8,s[e+6|0]=t>>>16,s[e+7|0]=t>>>24,t=k+1634760805|0,s[0|e]=t,s[e+1|0]=t>>>8,s[e+2|0]=t>>>16,s[e+3|0]=t>>>24}function U(e,t,n,a){var o=0,r=0,i=0,s=0,d=0,f=0,p=0,b=0,m=0,h=0,g=0,v=0,w=0,k=0,A=0,x=0,I=0,T=0,S=0,C=0,E=0,R=0,M=0,P=0,U=0;if(g=c[e+36>>2],m=c[e+32>>2],h=c[e+28>>2],p=c[e+24>>2],b=c[e+20>>2],!a&n>>>0>=16|a)for(E=!u[e+80|0]<<24,w=c[e+4>>2],R=l(w,5),A=c[e+8>>2],S=l(A,5),I=c[e+12>>2],T=l(I,5),C=c[e+16>>2],x=l(C,5),k=c[e>>2];o=ge(i=((u[t+3|0]|u[t+4|0]<<8|u[t+5|0]<<16|u[t+6|0]<<24)>>>2&67108863)+p|0,0,I,0),d=y,b=(s=ge(p=(67108863&(u[0|t]|u[t+1|0]<<8|u[t+2|0]<<16|u[t+3|0]<<24))+b|0,0,C,0))+o|0,o=y+d|0,o=s>>>0>b>>>0?o+1|0:o,d=ge(h=((u[t+6|0]|u[t+7|0]<<8|u[t+8|0]<<16|u[t+9|0]<<24)>>>4&67108863)+h|0,0,A,0),o=y+o|0,o=d>>>0>(b=d+b|0)>>>0?o+1|0:o,d=ge(m=((u[t+9|0]|u[t+10|0]<<8|u[t+11|0]<<16|u[t+12|0]<<24)>>>6|0)+m|0,0,w,0),o=y+o|0,o=d>>>0>(b=d+b|0)>>>0?o+1|0:o,d=ge(g=g+E+((u[t+12|0]|u[t+13|0]<<8|u[t+14|0]<<16|u[t+15|0]<<24)>>>8)|0,0,k,0),o=y+o|0,M=b=d+b|0,b=d>>>0>b>>>0?o+1|0:o,o=ge(i,0,A,0),d=y,s=ge(p,0,I,0),r=y+d|0,r=(o=s+o|0)>>>0>>0?r+1|0:r,d=(s=ge(h,0,w,0))+o|0,o=y+r|0,o=s>>>0>d>>>0?o+1|0:o,s=ge(m,0,k,0),o=y+o|0,o=s>>>0>(d=s+d|0)>>>0?o+1|0:o,s=ge(g,0,x,0),o=y+o|0,P=d=s+d|0,d=s>>>0>d>>>0?o+1|0:o,o=ge(i,0,w,0),f=y,s=(r=ge(p,0,A,0))+o|0,o=y+f|0,o=r>>>0>s>>>0?o+1|0:o,f=ge(h,0,k,0),r=y+o|0,r=(s=f+s|0)>>>0>>0?r+1|0:r,f=ge(m,0,x,0),o=y+r|0,o=(s=f+s|0)>>>0>>0?o+1|0:o,f=ge(g,0,T,0),o=y+o|0,U=s=f+s|0,s=s>>>0>>0?o+1|0:o,o=ge(i,0,k,0),r=y,f=(v=ge(p,0,w,0))+o|0,o=y+r|0,o=f>>>0>>0?o+1|0:o,r=ge(h,0,x,0),o=y+o|0,o=r>>>0>(f=r+f|0)>>>0?o+1|0:o,v=ge(m,0,T,0),r=y+o|0,r=(f=v+f|0)>>>0>>0?r+1|0:r,v=ge(g,0,S,0),o=y+r|0,o=(f=v+f|0)>>>0>>0?o+1|0:o,v=f,f=o,o=ge(i,0,x,0),r=y,i=(p=ge(p,0,k,0))+o|0,o=y+r|0,o=i>>>0

>>0?o+1|0:o,p=ge(h,0,T,0),o=y+o|0,o=(i=p+i|0)>>>0

>>0?o+1|0:o,p=ge(m,0,S,0),o=y+o|0,o=(i=p+i|0)>>>0

>>0?o+1|0:o,p=ge(g,0,R,0),r=y+o|0,r=(i=p+i|0)>>>0

>>0?r+1|0:r,p=i,o=f,o=(i=(h=(67108863&r)<<6|i>>>26)+v|0)>>>0>>0?o+1|0:o,h=i,m=(67108863&o)<<6|i>>>26,o=s,o=(i=m+U|0)>>>0>>0?o+1|0:o,m=i,r=d,g=o=(i=(67108863&o)<<6|i>>>26)+P|0,d=(67108863&(r=o>>>0>>0?r+1|0:r))<<6|o>>>26,o=b,p=(67108863&h)+((o=l((67108863&((i=d+M|0)>>>0>>0?o+1|0:o))<<6|i>>>26,5)+(67108863&p)|0)>>>26|0)|0,h=67108863&m,m=67108863&g,g=67108863&i,b=67108863&o,t=t+16|0,!(a=a-(n>>>0<16)|0)&(n=n-16|0)>>>0>15|a;);c[e+20>>2]=b,c[e+36>>2]=g,c[e+32>>2]=m,c[e+28>>2]=h,c[e+24>>2]=p}function _(e,t,n,a){e|=0,t|=0;var o=0;return o=-1,(a|=0)-65>>>0<4294967232|(n|=0)>>>0>64||(n&&t?(g=o=g-128|0,!t|((a&=255)-65&255)>>>0<=191|((n&=255)-65&255)>>>0<=191?(Le(),r()):(Ee(e- -64|0,0,293),s[e+56|0]=121,s[e+57|0]=33,s[e+58|0]=126,s[e+59|0]=19,s[e+60|0]=25,s[e+61|0]=205,s[e+62|0]=224,s[e+63|0]=91,s[e+48|0]=107,s[e+49|0]=189,s[e+50|0]=65,s[e+51|0]=251,s[e+52|0]=171,s[e+53|0]=217,s[e+54|0]=131,s[e+55|0]=31,s[e+40|0]=31,s[e+41|0]=108,s[e+42|0]=62,s[e+43|0]=43,s[e+44|0]=140,s[e+45|0]=104,s[e+46|0]=5,s[e+47|0]=155,s[e+32|0]=209,s[e+33|0]=130,s[e+34|0]=230,s[e+35|0]=173,s[e+36|0]=127,s[e+37|0]=82,s[e+38|0]=14,s[e+39|0]=81,s[e+24|0]=241,s[e+25|0]=54,s[e+26|0]=29,s[e+27|0]=95,s[e+28|0]=58,s[e+29|0]=245,s[e+30|0]=79,s[e+31|0]=165,s[e+16|0]=43,s[e+17|0]=248,s[e+18|0]=148,s[e+19|0]=254,s[e+20|0]=114,s[e+21|0]=243,s[e+22|0]=110,s[e+23|0]=60,s[e+8|0]=59,s[e+9|0]=167,s[e+10|0]=202,s[e+11|0]=132,s[e+12|0]=133,s[e+13|0]=174,s[e+14|0]=103,s[e+15|0]=187,a=-222443256^(n<<8|a),s[0|e]=a,s[e+1|0]=a>>>8,s[e+2|0]=a>>>16,s[e+3|0]=a>>>24,a=n>>>24^1779033703,s[e+4|0]=a,s[e+5|0]=a>>>8,s[e+6|0]=a>>>16,s[e+7|0]=a>>>24,Ee(n+o|0,0,n<<24>>24>=0?128-n|0:0),n=Ce(o,t,n),Ce(e+96|0,n,128),t=128+(u[e+352|0]|u[e+353|0]<<8|u[e+354|0]<<16|u[e+355|0]<<24)|0,s[e+352|0]=t,s[e+353|0]=t>>>8,s[e+354|0]=t>>>16,s[e+355|0]=t>>>24,$e(n,128),g=n+128|0)):(((t=255&a)-65&255)>>>0<=191&&(Le(),r()),Ee(e- -64|0,0,293),s[e+56|0]=121,s[e+57|0]=33,s[e+58|0]=126,s[e+59|0]=19,s[e+60|0]=25,s[e+61|0]=205,s[e+62|0]=224,s[e+63|0]=91,s[e+48|0]=107,s[e+49|0]=189,s[e+50|0]=65,s[e+51|0]=251,s[e+52|0]=171,s[e+53|0]=217,s[e+54|0]=131,s[e+55|0]=31,s[e+40|0]=31,s[e+41|0]=108,s[e+42|0]=62,s[e+43|0]=43,s[e+44|0]=140,s[e+45|0]=104,s[e+46|0]=5,s[e+47|0]=155,s[e+32|0]=209,s[e+33|0]=130,s[e+34|0]=230,s[e+35|0]=173,s[e+36|0]=127,s[e+37|0]=82,s[e+38|0]=14,s[e+39|0]=81,s[e+24|0]=241,s[e+25|0]=54,s[e+26|0]=29,s[e+27|0]=95,s[e+28|0]=58,s[e+29|0]=245,s[e+30|0]=79,s[e+31|0]=165,s[e+16|0]=43,s[e+17|0]=248,s[e+18|0]=148,s[e+19|0]=254,s[e+20|0]=114,s[e+21|0]=243,s[e+22|0]=110,s[e+23|0]=60,s[e+8|0]=59,s[e+9|0]=167,s[e+10|0]=202,s[e+11|0]=132,s[e+12|0]=133,s[e+13|0]=174,s[e+14|0]=103,s[e+15|0]=187,t^=-222443256,s[0|e]=t,s[e+1|0]=t>>>8,s[e+2|0]=t>>>16,s[e+3|0]=t>>>24,s[e+4|0]=103,s[e+5|0]=230,s[e+6|0]=9,s[e+7|0]=106),o=0),0|o}function B(e,t,n){var a,o,r,i,s,u,d,l,f,p,b,m=0,h=0,g=0,y=0,v=0,w=0,k=0,A=0,x=0,T=0,S=0,C=0,E=0,R=0,M=0,P=0,U=0,_=0,B=0;m=c[t+40>>2],h=c[t+4>>2],y=c[t+44>>2],v=c[t+8>>2],w=c[t+48>>2],k=c[t+12>>2],A=c[t+52>>2],x=c[t+16>>2],T=c[t+56>>2],S=c[t+20>>2],C=c[t+60>>2],E=c[t+24>>2],R=c[(g=t- -64|0)>>2],M=c[t+28>>2],P=c[t+68>>2],U=c[t+32>>2],_=c[t+72>>2],B=c[t>>2],c[e+36>>2]=c[t+36>>2]+c[t+76>>2],c[e+32>>2]=U+_,c[e+28>>2]=M+P,c[e+24>>2]=E+R,c[e+20>>2]=S+C,c[e+16>>2]=x+T,c[e+12>>2]=k+A,c[e+8>>2]=v+w,c[e+4>>2]=h+y,c[e>>2]=m+B,y=c[t+40>>2],m=c[t+4>>2],v=c[t+44>>2],w=c[t+8>>2],k=c[t+48>>2],A=c[t+12>>2],x=c[t+52>>2],T=c[t+16>>2],S=c[t+56>>2],C=c[t+20>>2],E=c[t+60>>2],R=c[t+24>>2],g=c[g>>2],h=c[t+28>>2],M=c[t+68>>2],P=c[t+32>>2],U=c[t+72>>2],_=c[t>>2],c[e+76>>2]=c[t+76>>2]-c[t+36>>2],c[e+72>>2]=U-P,c[e+68>>2]=M-h,c[(h=e- -64|0)>>2]=g-R,c[e+60>>2]=E-C,c[e+56>>2]=S-T,c[e+52>>2]=x-A,c[e+48>>2]=k-w,c[e+44>>2]=v-m,c[(m=e+40|0)>>2]=y-_,I(e+80|0,e,n+40|0),I(m,m,n),I(e+120|0,n+120|0,t+120|0),I(e,t+80|0,n+80|0),B=c[e+4>>2],r=c[e+8>>2],i=c[e+12>>2],s=c[e+16>>2],u=c[e+20>>2],d=c[e+24>>2],l=c[e+28>>2],f=c[e+32>>2],p=c[e+36>>2],t=c[m>>2],n=c[e+80>>2],y=c[e+44>>2],v=c[e+84>>2],w=c[e+48>>2],k=c[e+88>>2],A=c[e+52>>2],x=c[e+92>>2],T=c[e+56>>2],S=c[e+96>>2],C=c[e+60>>2],E=c[e+100>>2],g=c[h>>2],R=c[e+104>>2],M=c[e+68>>2],P=c[e+108>>2],U=c[e+72>>2],_=c[e+112>>2],b=c[e>>2],a=c[e+76>>2],o=c[e+116>>2],c[e+76>>2]=a+o,c[e+72>>2]=U+_,c[e+68>>2]=M+P,c[h>>2]=g+R,c[e+60>>2]=C+E,c[e+56>>2]=T+S,c[e+52>>2]=A+x,c[e+48>>2]=w+k,c[e+44>>2]=y+v,c[m>>2]=t+n,c[e+36>>2]=o-a,c[e+32>>2]=_-U,c[e+28>>2]=P-M,c[e+24>>2]=R-g,c[e+20>>2]=E-C,c[e+16>>2]=S-T,c[e+12>>2]=x-A,c[e+8>>2]=k-w,c[e+4>>2]=v-y,c[e>>2]=n-t,t=c[e+156>>2],n=p<<1,c[e+156>>2]=t+n,m=c[e+152>>2],h=f<<1,c[e+152>>2]=m+h,y=c[e+148>>2],v=l<<1,c[e+148>>2]=y+v,w=c[e+144>>2],k=d<<1,c[e+144>>2]=w+k,A=c[e+140>>2],x=u<<1,c[e+140>>2]=A+x,T=c[e+136>>2],S=s<<1,c[e+136>>2]=T+S,C=c[e+132>>2],E=i<<1,c[e+132>>2]=C+E,g=c[e+128>>2],R=r<<1,c[e+128>>2]=g+R,M=c[e+124>>2],P=B<<1,c[e+124>>2]=M+P,U=c[e+120>>2],_=b<<1,c[e+120>>2]=U+_,c[e+112>>2]=h-m,c[e+108>>2]=v-y,c[e+104>>2]=k-w,c[e+100>>2]=x-A,c[e+96>>2]=S-T,c[e+92>>2]=E-C,c[e+88>>2]=R-g,c[e+84>>2]=P-M,c[e+80>>2]=_-U,c[e+116>>2]=n-t}function D(e,t,n){var a,o,r,i,s,u,d,l,f,p,b,m=0,h=0,g=0,y=0,v=0,w=0,k=0,A=0,x=0,T=0,S=0,C=0,E=0,R=0,M=0,P=0,U=0,_=0,B=0;m=c[t+40>>2],h=c[t+4>>2],y=c[t+44>>2],v=c[t+8>>2],w=c[t+48>>2],k=c[t+12>>2],A=c[t+52>>2],x=c[t+16>>2],T=c[t+56>>2],S=c[t+20>>2],C=c[t+60>>2],E=c[t+24>>2],R=c[(g=t- -64|0)>>2],M=c[t+28>>2],P=c[t+68>>2],U=c[t+32>>2],_=c[t+72>>2],B=c[t>>2],c[e+36>>2]=c[t+36>>2]+c[t+76>>2],c[e+32>>2]=U+_,c[e+28>>2]=M+P,c[e+24>>2]=E+R,c[e+20>>2]=S+C,c[e+16>>2]=x+T,c[e+12>>2]=k+A,c[e+8>>2]=v+w,c[e+4>>2]=h+y,c[e>>2]=m+B,y=c[t+40>>2],m=c[t+4>>2],v=c[t+44>>2],w=c[t+8>>2],k=c[t+48>>2],A=c[t+12>>2],x=c[t+52>>2],T=c[t+16>>2],S=c[t+56>>2],C=c[t+20>>2],E=c[t+60>>2],R=c[t+24>>2],g=c[g>>2],h=c[t+28>>2],M=c[t+68>>2],P=c[t+32>>2],U=c[t+72>>2],_=c[t>>2],c[e+76>>2]=c[t+76>>2]-c[t+36>>2],c[e+72>>2]=U-P,c[e+68>>2]=M-h,c[(h=e- -64|0)>>2]=g-R,c[e+60>>2]=E-C,c[e+56>>2]=S-T,c[e+52>>2]=x-A,c[e+48>>2]=k-w,c[e+44>>2]=v-m,c[(m=e+40|0)>>2]=y-_,I(e+80|0,e,n),I(m,m,n+40|0),I(e+120|0,n+120|0,t+120|0),I(e,t+80|0,n+80|0),B=c[e+4>>2],r=c[e+8>>2],i=c[e+12>>2],s=c[e+16>>2],u=c[e+20>>2],d=c[e+24>>2],l=c[e+28>>2],f=c[e+32>>2],p=c[e+36>>2],t=c[m>>2],n=c[e+80>>2],y=c[e+44>>2],v=c[e+84>>2],w=c[e+48>>2],k=c[e+88>>2],A=c[e+52>>2],x=c[e+92>>2],T=c[e+56>>2],S=c[e+96>>2],C=c[e+60>>2],E=c[e+100>>2],g=c[h>>2],R=c[e+104>>2],M=c[e+68>>2],P=c[e+108>>2],U=c[e+72>>2],_=c[e+112>>2],b=c[e>>2],a=c[e+76>>2],o=c[e+116>>2],c[e+76>>2]=a+o,c[e+72>>2]=U+_,c[e+68>>2]=M+P,c[h>>2]=g+R,c[e+60>>2]=C+E,c[e+56>>2]=T+S,c[e+52>>2]=A+x,c[e+48>>2]=w+k,c[e+44>>2]=y+v,c[m>>2]=t+n,c[e+36>>2]=o-a,c[e+32>>2]=_-U,c[e+28>>2]=P-M,c[e+24>>2]=R-g,c[e+20>>2]=E-C,c[e+16>>2]=S-T,c[e+12>>2]=x-A,c[e+8>>2]=k-w,c[e+4>>2]=v-y,c[e>>2]=n-t,t=p<<1,n=c[e+156>>2],c[e+156>>2]=t-n,m=f<<1,h=c[e+152>>2],c[e+152>>2]=m-h,y=l<<1,v=c[e+148>>2],c[e+148>>2]=y-v,w=d<<1,k=c[e+144>>2],c[e+144>>2]=w-k,A=u<<1,x=c[e+140>>2],c[e+140>>2]=A-x,T=s<<1,S=c[e+136>>2],c[e+136>>2]=T-S,C=i<<1,E=c[e+132>>2],c[e+132>>2]=C-E,g=r<<1,R=c[e+128>>2],c[e+128>>2]=g-R,M=B<<1,P=c[e+124>>2],c[e+124>>2]=M-P,U=b<<1,_=c[e+120>>2],c[e+120>>2]=U-_,c[e+112>>2]=m+h,c[e+108>>2]=y+v,c[e+104>>2]=w+k,c[e+100>>2]=A+x,c[e+96>>2]=T+S,c[e+92>>2]=C+E,c[e+88>>2]=g+R,c[e+84>>2]=M+P,c[e+80>>2]=U+_,c[e+116>>2]=t+n}function N(e,t,n){var a,o,r,i,s,u,d,l,f,p,b,m=0,h=0,g=0,y=0,v=0,w=0,k=0,A=0,x=0,T=0,S=0,C=0,E=0,R=0,M=0,P=0,U=0,_=0,B=0;m=c[t+40>>2],h=c[t+4>>2],y=c[t+44>>2],v=c[t+8>>2],w=c[t+48>>2],k=c[t+12>>2],A=c[t+52>>2],x=c[t+16>>2],T=c[t+56>>2],S=c[t+20>>2],C=c[t+60>>2],E=c[t+24>>2],R=c[(g=t- -64|0)>>2],M=c[t+28>>2],P=c[t+68>>2],U=c[t+32>>2],_=c[t+72>>2],B=c[t>>2],c[e+36>>2]=c[t+36>>2]+c[t+76>>2],c[e+32>>2]=U+_,c[e+28>>2]=M+P,c[e+24>>2]=E+R,c[e+20>>2]=S+C,c[e+16>>2]=x+T,c[e+12>>2]=k+A,c[e+8>>2]=v+w,c[e+4>>2]=h+y,c[e>>2]=m+B,y=c[t+40>>2],m=c[t+4>>2],v=c[t+44>>2],w=c[t+8>>2],k=c[t+48>>2],A=c[t+12>>2],x=c[t+52>>2],T=c[t+16>>2],S=c[t+56>>2],C=c[t+20>>2],E=c[t+60>>2],R=c[t+24>>2],g=c[g>>2],h=c[t+28>>2],M=c[t+68>>2],P=c[t+32>>2],U=c[t+72>>2],_=c[t>>2],c[e+76>>2]=c[t+76>>2]-c[t+36>>2],c[e+72>>2]=U-P,c[e+68>>2]=M-h,c[(h=e- -64|0)>>2]=g-R,c[e+60>>2]=E-C,c[e+56>>2]=S-T,c[e+52>>2]=x-A,c[e+48>>2]=k-w,c[e+44>>2]=v-m,c[(m=e+40|0)>>2]=y-_,I(e+80|0,e,n),I(m,m,n+40|0),I(e+120|0,n+80|0,t+120|0),B=c[t+80>>2],r=c[t+84>>2],i=c[t+88>>2],s=c[t+92>>2],u=c[t+96>>2],d=c[t+100>>2],l=c[t+104>>2],f=c[t+108>>2],p=c[t+112>>2],b=c[t+116>>2],t=c[m>>2],n=c[e+80>>2],y=c[e+44>>2],v=c[e+84>>2],w=c[e+48>>2],k=c[e+88>>2],A=c[e+52>>2],x=c[e+92>>2],T=c[e+56>>2],S=c[e+96>>2],C=c[e+60>>2],E=c[e+100>>2],g=c[h>>2],R=c[e+104>>2],M=c[e+68>>2],P=c[e+108>>2],U=c[e+72>>2],_=c[e+112>>2],a=c[e+76>>2],o=c[e+116>>2],c[e+76>>2]=a+o,c[e+72>>2]=U+_,c[e+68>>2]=M+P,c[h>>2]=g+R,c[e+60>>2]=C+E,c[e+56>>2]=T+S,c[e+52>>2]=A+x,c[e+48>>2]=w+k,c[e+44>>2]=y+v,c[m>>2]=t+n,c[e+36>>2]=o-a,c[e+32>>2]=_-U,c[e+28>>2]=P-M,c[e+24>>2]=R-g,c[e+20>>2]=E-C,c[e+16>>2]=S-T,c[e+12>>2]=x-A,c[e+8>>2]=k-w,c[e+4>>2]=v-y,c[e>>2]=n-t,t=b<<1,n=c[e+156>>2],c[e+156>>2]=t-n,m=p<<1,h=c[e+152>>2],c[e+152>>2]=m-h,y=f<<1,v=c[e+148>>2],c[e+148>>2]=y-v,w=l<<1,k=c[e+144>>2],c[e+144>>2]=w-k,A=d<<1,x=c[e+140>>2],c[e+140>>2]=A-x,T=u<<1,S=c[e+136>>2],c[e+136>>2]=T-S,C=s<<1,E=c[e+132>>2],c[e+132>>2]=C-E,g=i<<1,R=c[e+128>>2],c[e+128>>2]=g-R,M=r<<1,P=c[e+124>>2],c[e+124>>2]=M-P,U=B<<1,_=c[e+120>>2],c[e+120>>2]=U-_,c[e+112>>2]=m+h,c[e+108>>2]=y+v,c[e+104>>2]=w+k,c[e+100>>2]=A+x,c[e+96>>2]=T+S,c[e+92>>2]=C+E,c[e+88>>2]=g+R,c[e+84>>2]=M+P,c[e+80>>2]=U+_,c[e+116>>2]=t+n}function O(e,t){var n,a,o,r,i,s,d,l,f,p,b,m,h,g=0,v=0,w=0,k=0,A=0,x=0,I=0,T=0,S=0,C=0,E=0,R=0,M=0,P=0;m=u[t+31|0],n=u[t+30|0],a=u[t+29|0],o=u[t+6|0],r=u[t+5|0],i=u[t+4|0],s=u[t+9|0],d=u[t+8|0],l=u[t+7|0],C=u[t+12|0],E=u[t+11|0],f=u[t+10|0],p=u[t+15|0],R=u[t+14|0],b=u[t+13|0],I=u[t+28|0],S=u[t+27|0],T=u[t+26|0],x=u[t+25|0],k=u[t+24|0],w=u[t+23|0],h=u[0|t]|u[t+1|0]<<8|u[t+2|0]<<16|u[t+3|0]<<24,A=(g=u[t+21|0])<<15,g=v=g>>>17|0,P=A,v=(A=u[t+20|0])>>>25|0,A=P|A<<7,M=g|v,g=(v=u[t+22|0])>>>9|0,A|=v<<23,g|=M,v=u[t+16|0]|u[t+17|0]<<8|u[t+18|0]<<16|u[t+19|0]<<24,t=0,P=v,v=(33554431&(t=(M=v+16777216|0)>>>0<16777216?1:t))<<7|M>>>25,t=(t>>>25|0)+g|0,v=(g=A=v+A|0)>>>0>>0?t+1|0:t,t=(A=g+33554432|0)>>>0<33554432?v+1|0:v,c[e+24>>2]=g-(-67108864&A),v=(g=w>>>27|0)|k>>>19|x>>>11,g=w=(k=x<<21|(w=k<<13|w<<5))+(g=(67108863&(g=t))<<6|A>>>26)|0,t=v,v=(w=k+16777216|0)>>>0<16777216?t+1|0:t,c[e+28>>2]=g-(1040187392&w),g=(g=S>>>20|T>>>28|I>>>12)+(v=(t=v)>>>25|0)|0,t=(v=w=(t=(33554431&t)<<7|w>>>25)+(S<<12|T<<4|I<<20)|0)>>>0>>0?g+1|0:g,w=(I=v+33554432|0)>>>0<33554432?t+1|0:t,c[e+32>>2]=v-(-67108864&I),g=(t=C>>>13|0)|(v=E>>>21|f>>>29),t=(g=(S=16777216+(C=E<<11|f<<3|C<<19)|0)>>>0<16777216?g+1|0:g)>>>25|0,g=(v=k=R<<10|b<<2|p<<18)+(k=(33554431&g)<<7|S>>>25)|0,v=t+(x=R>>>22|b>>>30|p>>>14)|0,t=g>>>0>>0?v+1|0:v,k=t=(67108863&(t=(v=g+33554432|0)>>>0<33554432?t+1|0:t))<<6|v>>>26,t=t+(T=P-(-33554432&M)|0)|0,c[e+20>>2]=t,c[e+16>>2]=g-(-67108864&v),v=r>>>18|i>>>26|o>>>10,g=(v=(T=16777216+(E=r<<14|i<<6|o<<22)|0)>>>0<16777216?v+1|0:v)>>>25|0,v=(t=k=d<<13|l<<5|s<<21)+(k=(33554431&v)<<7|T>>>25)|0,t=g+(x=d>>>19|l>>>27|s>>>11)|0,t=v>>>0>>0?t+1|0:t,g=(x=v+33554432|0)>>>0<33554432?t+1|0:t,c[e+8>>2]=v-(-67108864&x),I=(w=(67108863&w)<<6|I>>>26)+(R=m<<18&33292288|n<<10|a<<2)|0,t=v=n>>>22|a>>>30,v=(w=R+16777216|0)>>>0<16777216?t+1|0:t,c[e+36>>2]=I-(33554432&w),g=C+((67108863&g)<<6|x>>>26)|0,c[e+12>>2]=g-(234881024&S),k=E-(2113929216&T)|0,g=ge((33554431&(t=v))<<7|w>>>25,v=t>>>25|0,19,0),t=y,g=g>>>0>(v=g+h|0)>>>0?t+1|0:t,w=g=(67108863&(g=(t=v+33554432|0)>>>0<33554432?g+1|0:g))<<6|t>>>26,g=g+k|0,c[e+4>>2]=g,c[e>>2]=v-(-67108864&t)}function F(e,t){var n,a,o,r=0,i=0,d=0,l=0,f=0,p=0,b=0,m=0,h=0,y=0,v=0,w=0;for(g=n=g-480|0;i=(d=n+288|0)+(r<<1)|0,m=u[t+r|0],s[i+1|0]=m>>>4,s[0|i]=15&m,d=d+((i=1|r)<<1)|0,i=u[t+i|0],s[d+1|0]=i>>>4,s[0|d]=15&i,32!=(0|(r=r+2|0)););for(t=0;r=8+(d=(r=t)+u[0|(t=(n+288|0)+l|0)]|0)|0,s[0|t]=d-(240&r),r=8+(d=u[t+1|0]+(r<<24>>24>>4)|0)|0,s[t+1|0]=d-(240&r),r=8+(d=u[t+2|0]+(r<<24>>24>>4)|0)|0,s[t+2|0]=d-(240&r),t=r<<24>>24>>4,63!=(0|(l=l+3|0)););for(s[n+351|0]=u[n+351|0]+t,c[e+32>>2]=0,c[e+36>>2]=0,c[e+24>>2]=0,c[e+28>>2]=0,c[e+16>>2]=0,c[e+20>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[e>>2]=0,c[e+4>>2]=0,c[e+44>>2]=0,c[e+48>>2]=0,c[(m=e+40|0)>>2]=1,c[e+52>>2]=0,c[e+56>>2]=0,c[e+60>>2]=0,c[e+64>>2]=0,c[e+68>>2]=0,c[e+72>>2]=0,c[e+76>>2]=0,c[e+80>>2]=1,Ee(e+84|0,0,76),a=e+120|0,o=e+80|0,t=n+208|0,d=n+168|0,l=n+248|0,r=1;Z(f=n+8|0,r>>>1|0,s[(n+288|0)+r|0]),N(i=n+128|0,e,f),I(e,i,l),I(m,d,t),I(o,t,l),I(a,i,d),i=r>>>0<62,r=r+2|0,i;);for(r=c[e+8>>2],i=c[e+12>>2],f=c[e+16>>2],p=c[e+20>>2],h=c[e+24>>2],y=c[e+28>>2],b=c[e>>2],v=c[e+4>>2],w=c[e+36>>2],c[n+392>>2]=c[e+32>>2],c[n+396>>2]=w,c[n+384>>2]=h,c[n+388>>2]=y,c[n+376>>2]=f,c[n+380>>2]=p,c[n+368>>2]=r,c[n+372>>2]=i,c[n+360>>2]=b,c[n+364>>2]=v,r=c[e+40>>2],i=c[e+44>>2],f=c[e+48>>2],p=c[e+52>>2],h=c[e+56>>2],y=c[e+60>>2],v=c[(b=e- -64|0)>>2],b=c[b+4>>2],w=c[e+76>>2],c[n+432>>2]=c[e+72>>2],c[n+436>>2]=w,c[n+424>>2]=v,c[n+428>>2]=b,c[n+416>>2]=h,c[n+420>>2]=y,c[n+408>>2]=f,c[n+412>>2]=p,c[n+400>>2]=r,c[n+404>>2]=i,r=c[e+80>>2],i=c[e+84>>2],f=c[e+88>>2],p=c[e+92>>2],h=c[e+96>>2],y=c[e+100>>2],b=c[e+104>>2],v=c[e+108>>2],w=c[e+116>>2],c[n+472>>2]=c[e+112>>2],c[n+476>>2]=w,c[n+464>>2]=b,c[n+468>>2]=v,c[n+456>>2]=h,c[n+460>>2]=y,c[n+448>>2]=f,c[n+452>>2]=p,c[n+440>>2]=r,c[n+444>>2]=i,T(r=n+128|0,i=n+360|0),I(i,r,l),I(f=n+400|0,d,t),I(p=n+440|0,t,l),T(r,i),I(i,r,l),I(f,d,t),I(p,t,l),T(r,i),I(i,r,l),I(f,d,t),I(p,t,l),T(r,i),I(e,r,l),I(m,d,t),I(o,t,l),I(a,r,d),r=0;Z(f=n+8|0,r>>>1|0,s[(n+288|0)+r|0]),N(i=n+128|0,e,f),I(e,i,l),I(m,d,t),I(o,t,l),I(a,i,d),i=r>>>0<62,r=r+2|0,i;);g=n+480|0}function L(e,t,n,a){var o,r=0,i=0,d=0,l=0,f=0,p=0,b=0,m=0,h=0,y=0,v=0,w=0;if(g=o=g-704|0,n|a)if(r=(a<<3|n>>>29)+(i=d=c[e+76>>2])|0,f=(p=c[e+72>>2])+(l=n<<3)|0,c[e+72>>2]=f,r=l>>>0>f>>>0?r+1|0:r,c[e+76>>2]=r,d=c[4+(l=e- -64|0)>>2],d=(b=r=(0|r)==(0|i)&f>>>0

>>0|r>>>0>>0)>>>0>(r=r+c[l>>2]|0)>>>0?d+1|0:d,f=(b=a>>>29|0)+r|0,r=d,c[l>>2]=f,c[l+4>>2]=f>>>0>>0?r+1|0:r,(0|(d=b=0-((r=0)+((l=127&((7&i)<<29|p>>>3))>>>0>128)|0)|0))==(0|a)&n>>>0>=(f=128-l|0)>>>0|a>>>0>d>>>0){if(i=0,d=0,!r&(127^l)>>>0>=3|r)for(w=252&f,p=e+80|0;s[(r=i+l|0)+p|0]=u[t+i|0],s[p+(l+(r=1|i)|0)|0]=u[t+r|0],s[p+(l+(r=2|i)|0)|0]=u[t+r|0],s[p+(l+(r=3|i)|0)|0]=u[t+r|0],r=d,d=(i=i+4|0)>>>0<4?r+1|0:r,r=h,h=r=(y=y+4|0)>>>0<4?r+1|0:r,(0|y)!=(0|w)|(0|v)!=(0|r););if(p=r=0,r|(h=3&f))for(;s[80+(e+(r=i+l|0)|0)|0]=u[t+i|0],r=d,d=(i=i+1|0)?r:r+1|0,r=v,v=r=(m=m+1|0)?r:r+1|0,(0|h)!=(0|m)|(0|p)!=(0|r););if(k(e,e+80|0,o,i=o+640|0),t=t+f|0,!(a=a-((n>>>0>>0)+b|0)|0)&(n=n-f|0)>>>0>127|a)for(;k(e,t,o,i),t=t+128|0,!(a=a-(n>>>0<128)|0)&(n=n-128|0)>>>0>127|a;);if(n|a){if(y=3&n,f=0,m=0,v=0,i=0,d=0,!a&n>>>0>=4|a)for(l=-4&n,p=a,h=e+80|0,n=0,a=0;s[i+h|0]=u[t+i|0],s[(r=1|i)+h|0]=u[t+r|0],s[(r=2|i)+h|0]=u[t+r|0],s[(r=3|i)+h|0]=u[t+r|0],r=d,d=(i=i+4|0)>>>0<4?r+1|0:r,r=a,a=r=(n=n+4|0)>>>0<4?r+1|0:r,(0|n)!=(0|l)|(0|p)!=(0|r););if(f|y)for(;s[80+(e+i|0)|0]=u[t+i|0],d=(i=i+1|0)?d:d+1|0,r=v,v=r=(m=m+1|0)?r:r+1|0,(0|m)!=(0|y)|(0|f)!=(0|r););}$e(o,704)}else{if(i=0,d=0,!a&n>>>0>=4|a)for(f=-4&n,p=a,a=e+80|0;s[a+(r=i+l|0)|0]=u[t+i|0],s[a+(b=l+(r=1|i)|0)|0]=u[t+r|0],s[a+(b=l+(r=2|i)|0)|0]=u[t+r|0],s[a+(b=l+(r=3|i)|0)|0]=u[t+r|0],r=d,d=(i=i+4|0)>>>0<4?r+1|0:r,r=h,h=r=(y=y+4|0)>>>0<4?r+1|0:r,(0|f)!=(0|y)|(0|p)!=(0|r););if((n&=3)|(a=0))for(;s[80+(e+(r=i+l|0)|0)|0]=u[t+i|0],d=(i=i+1|0)?d:d+1|0,r=v,v=r=(m=m+1|0)?r:r+1|0,(0|n)!=(0|m)|(0|a)!=(0|r););}return g=o+704|0,0}function j(e,t,n){var a=0,o=0,r=0,i=0,c=0,d=0,l=0,f=0,p=0,b=0,m=0,h=0,g=0,y=0,v=0,w=0,k=0,A=0,x=0,I=0;for(o=2036477234,i=857760878,a=1634760805,d=1797285236,r=u[t+12|0]|u[t+13|0]<<8|u[t+14|0]<<16|u[t+15|0]<<24,p=u[t+8|0]|u[t+9|0]<<8|u[t+10|0]<<16|u[t+11|0]<<24,c=u[t+4|0]|u[t+5|0]<<8|u[t+6|0]<<16|u[t+7|0]<<24,b=u[n+28|0]|u[n+29|0]<<8|u[n+30|0]<<16|u[n+31|0]<<24,l=u[n+24|0]|u[n+25|0]<<8|u[n+26|0]<<16|u[n+27|0]<<24,k=u[n+20|0]|u[n+21|0]<<8|u[n+22|0]<<16|u[n+23|0]<<24,m=u[n+16|0]|u[n+17|0]<<8|u[n+18|0]<<16|u[n+19|0]<<24,h=u[n+12|0]|u[n+13|0]<<8|u[n+14|0]<<16|u[n+15|0]<<24,g=u[n+8|0]|u[n+9|0]<<8|u[n+10|0]<<16|u[n+11|0]<<24,y=u[n+4|0]|u[n+5|0]<<8|u[n+6|0]<<16|u[n+7|0]<<24,t=u[0|t]|u[t+1|0]<<8|u[t+2|0]<<16|u[t+3|0]<<24,n=u[0|n]|u[n+1|0]<<8|u[n+2|0]<<16|u[n+3|0]<<24;f=n,n=_e((v=t)^(t=n+a|0),16),f=m=_e(f^(a=n+m|0),12),A=_e((v=t+m|0)^n,8),t=_e(f^(m=A+a|0),7),a=h,h=_e((n=d+h|0)^r,16),a=_e(a^(b=h+b|0),12),r=g,d=_e((o=o+g|0)^p,16),r=_e(r^(g=d+l|0),12),l=_e((o=r+o|0)^d,8),n=_e(l^(d=t+(w=n+a|0)|0),16),p=_e((i=i+y|0)^c,16),y=_e((c=p+k|0)^y,12),f=t,t=_e((i=i+y|0)^p,8),f=_e(f^(c=n+(x=t+c|0)|0),12),p=_e(n^(d=f+d|0),8),n=_e((k=p+c|0)^f,7),f=o,o=a,w=_e(h^w,8),o=_e(o^(a=w+b|0),7),h=_e((c=f+o|0)^t,16),b=_e((t=h+m|0)^o,12),c=_e(h^(o=b+c|0),8),h=_e((m=t+c|0)^b,7),t=_e((t=r)^(r=l+g|0),7),g=_e((i=t+i|0)^A,16),l=_e(t^(a=g+a|0),12),t=_e(g^(i=l+i|0),8),g=_e((b=a+t|0)^l,7),f=r,a=_e(y^x,7),l=_e((r=a+v|0)^w,16),v=_e(a^(y=f+l|0),12),r=_e(l^(a=v+r|0),8),y=_e((l=y+r|0)^v,7),10!=(0|(I=I+1|0)););s[0|e]=a,s[e+1|0]=a>>>8,s[e+2|0]=a>>>16,s[e+3|0]=a>>>24,s[e+28|0]=r,s[e+29|0]=r>>>8,s[e+30|0]=r>>>16,s[e+31|0]=r>>>24,s[e+24|0]=p,s[e+25|0]=p>>>8,s[e+26|0]=p>>>16,s[e+27|0]=p>>>24,s[e+20|0]=c,s[e+21|0]=c>>>8,s[e+22|0]=c>>>16,s[e+23|0]=c>>>24,s[e+16|0]=t,s[e+17|0]=t>>>8,s[e+18|0]=t>>>16,s[e+19|0]=t>>>24,s[e+12|0]=d,s[e+13|0]=d>>>8,s[e+14|0]=d>>>16,s[e+15|0]=d>>>24,s[e+8|0]=o,s[e+9|0]=o>>>8,s[e+10|0]=o>>>16,s[e+11|0]=o>>>24,s[e+4|0]=i,s[e+5|0]=i>>>8,s[e+6|0]=i>>>16,s[e+7|0]=i>>>24}function H(e,t,n){var a=0,o=0,r=0,i=0,c=0,d=0,l=0,f=0,p=0,b=0,m=0,h=0,g=0,y=0,v=0,w=0,k=0,A=0,x=0,I=0;for(a=1797285236,l=2036477234,f=857760878,o=1634760805,r=u[t+12|0]|u[t+13|0]<<8|u[t+14|0]<<16|u[t+15|0]<<24,c=u[t+8|0]|u[t+9|0]<<8|u[t+10|0]<<16|u[t+11|0]<<24,i=u[t+4|0]|u[t+5|0]<<8|u[t+6|0]<<16|u[t+7|0]<<24,v=u[n+28|0]|u[n+29|0]<<8|u[n+30|0]<<16|u[n+31|0]<<24,y=u[n+24|0]|u[n+25|0]<<8|u[n+26|0]<<16|u[n+27|0]<<24,w=20,h=u[n+20|0]|u[n+21|0]<<8|u[n+22|0]<<16|u[n+23|0]<<24,g=u[n+16|0]|u[n+17|0]<<8|u[n+18|0]<<16|u[n+19|0]<<24,p=u[n+12|0]|u[n+13|0]<<8|u[n+14|0]<<16|u[n+15|0]<<24,b=u[n+8|0]|u[n+9|0]<<8|u[n+10|0]<<16|u[n+11|0]<<24,m=u[n+4|0]|u[n+5|0]<<8|u[n+6|0]<<16|u[n+7|0]<<24,t=u[0|t]|u[t+1|0]<<8|u[t+2|0]<<16|u[t+3|0]<<24,n=u[0|n]|u[n+1|0]<<8|u[n+2|0]<<16|u[n+3|0]<<24;d=_e(n+f|0,7)^r,k=_e(d+f|0,9)^y,p=_e(o+h|0,7)^p,A=_e(p+o|0,9)^c,x=_e(A+p|0,13)^h,b=_e(a+g|0,7)^b,i=_e(b+a|0,9)^i,c=_e(i+b|0,13)^g,a=_e(i+c|0,18)^a,r=_e(t+l|0,7)^v,h=x^_e(a+r|0,7),y=k^_e(h+a|0,9),v=_e(h+y|0,13)^r,a=_e(y+v|0,18)^a,m=_e(r+l|0,9)^m,I=_e(m+r|0,13)^t,t=_e(I+m|0,18)^l,g=_e(t+d|0,7)^c,c=_e(g+t|0,9)^A,r=_e(c+g|0,13)^d,l=_e(r+c|0,18)^t,d=_e(d+k|0,13)^n,n=_e(d+k|0,18)^f,t=_e(n+p|0,7)^I,i=_e(t+n|0,9)^i,p=_e(t+i|0,13)^p,f=_e(i+p|0,18)^n,o=_e(A+x|0,18)^o,n=_e(o+b|0,7)^d,m=_e(n+o|0,9)^m,b=_e(n+m|0,13)^b,o=_e(m+b|0,18)^o,d=w>>>0>2,w=w-2|0,d;);return s[0|e]=o,s[e+1|0]=o>>>8,s[e+2|0]=o>>>16,s[e+3|0]=o>>>24,s[e+28|0]=r,s[e+29|0]=r>>>8,s[e+30|0]=r>>>16,s[e+31|0]=r>>>24,s[e+24|0]=c,s[e+25|0]=c>>>8,s[e+26|0]=c>>>16,s[e+27|0]=c>>>24,s[e+20|0]=i,s[e+21|0]=i>>>8,s[e+22|0]=i>>>16,s[e+23|0]=i>>>24,s[e+16|0]=t,s[e+17|0]=t>>>8,s[e+18|0]=t>>>16,s[e+19|0]=t>>>24,s[e+12|0]=a,s[e+13|0]=a>>>8,s[e+14|0]=a>>>16,s[e+15|0]=a>>>24,s[e+8|0]=l,s[e+9|0]=l>>>8,s[e+10|0]=l>>>16,s[e+11|0]=l>>>24,s[e+4|0]=f,s[e+5|0]=f>>>8,s[e+6|0]=f>>>16,s[e+7|0]=f>>>24,0}function G(e,t,n,a,o,i,s){var u=0,d=0,l=0,f=0,p=0,b=0,m=0;if(t-65>>>0<4294967232|s>>>0>64)e=-1;else{b=u=g,g=u=u-512&-64;e:{t:if(!(!(!(a|o)|n)|!e|((d=255&t)-65&255)>>>0<=191|!(!(t=255&s)||i)|t>>>0>=65)){if(t){if(!i)break t;Ee(u- -64|0,0,293),c[u+56>>2]=327033209,c[u+60>>2]=1541459225,c[u+48>>2]=-79577749,c[u+52>>2]=528734635,c[u+40>>2]=725511199,c[u+44>>2]=-1694144372,c[u+32>>2]=-1377402159,c[u+36>>2]=1359893119,c[u+24>>2]=1595750129,c[u+28>>2]=-1521486534,c[u+16>>2]=-23791573,c[u+20>>2]=1013904242,c[u+8>>2]=-2067093701,c[u+12>>2]=-1150833019,c[u>>2]=-222443256^(t<<8|d),c[u+4>>2]=t>>>24^1779033703,Ee((s=u+384|0)+t|0,0,128-t|0),Ce(s,i,t),Ce(u+96|0,s,128),c[u+352>>2]=128,$e(s,128),t=128}else Ee(u- -64|0,0,293),c[u+56>>2]=327033209,c[u+60>>2]=1541459225,c[u+48>>2]=-79577749,c[u+52>>2]=528734635,c[u+40>>2]=725511199,c[u+44>>2]=-1694144372,c[u+32>>2]=-1377402159,c[u+36>>2]=1359893119,c[u+24>>2]=1595750129,c[u+28>>2]=-1521486534,c[u+16>>2]=-23791573,c[u+20>>2]=1013904242,c[u+8>>2]=-2067093701,c[u+12>>2]=-1150833019,c[u>>2]=-222443256^d,c[u+4>>2]=1779033703,t=0;n:if(a|o)for(m=u+224|0,l=u+96|0;;){if(s=t+l|0,!o&a>>>0<=(i=256-t|0)>>>0){Ce(s,n,a),c[u+352>>2]=a+c[u+352>>2];break n}if(Ce(s,n,i),c[u+352>>2]=i+c[u+352>>2],f=t=c[u+68>>2],t=(p=(s=c[u+64>>2])+128|0)>>>0<128?t+1|0:t,c[u+64>>2]=p,c[u+68>>2]=t,t=c[u+76>>2],t=(f=s=-1==(0|f)&s>>>0>4294967167)>>>0>(s=s+c[u+72>>2]|0)>>>0?t+1|0:t,c[u+72>>2]=s,c[u+76>>2]=t,v(u,l),Ce(l,m,128),t=c[u+352>>2]-128|0,c[u+352>>2]=t,n=n+i|0,!((o=o-(a>>>0>>0)|0)|(a=a-i|0)))break}R(u,e,d),g=b;break e}Le(),r()}e=0}return e}function z(e,t,n,a){var o=0,r=0,i=0,d=0,l=0,f=0,p=0,b=0,m=0,h=0,g=0,y=0;e:{if((i=c[e+56>>2])|(o=c[e+60>>2])){if(m=r=16-i|0,l=(r=(0|(d=0-((i>>>0>16)+o|0)|0))==(0|a)&n>>>0>r>>>0|a>>>0>d>>>0)?m:n,m=r=r?d:a,r|l){if(r=0,i=0,!m&l>>>0>=4|m)for(f=-4&l,d=e- -64|0;o=r+c[e+56>>2]|0,s[o+d|0]=u[t+r|0],o=(h=1|r)+c[e+56>>2]|0,s[o+d|0]=u[t+h|0],o=(h=2|r)+c[e+56>>2]|0,s[o+d|0]=u[t+h|0],o=(h=3|r)+c[e+56>>2]|0,s[o+d|0]=u[t+h|0],o=i,i=(r=r+4|0)>>>0<4?o+1|0:o,o=p,p=o=(b=b+4|0)>>>0<4?o+1|0:o,(0|b)!=(0|f)|(0|m)!=(0|o););if(d=o=0,o|(p=3&l))for(;b=r+c[e+56>>2]|0,s[(e+b|0)- -64|0]=u[t+r|0],i=(r=r+1|0)?i:i+1|0,o=y,y=o=(g=g+1|0)?o:o+1|0,(0|p)!=(0|g)|(0|d)!=(0|o););i=c[e+56>>2],o=c[e+60>>2]}if(o=o+m|0,o=(i=i+l|0)>>>0>>0?o+1|0:o,c[e+56>>2]=i,c[e+60>>2]=o,!o&i>>>0<16)break e;U(e,e- -64|0,16,0),c[e+56>>2]=0,c[e+60>>2]=0,n=(i=n)-l|0,a=a-((i>>>0>>0)+m|0)|0,t=t+l|0}if(!a&n>>>0>=16|a&&(U(e,t,i=-16&n,a),n&=15,a=0,t=t+i|0),n|a){if(g=0,y=0,r=0,i=0,!a&n>>>0>=4|a)for(l=12&n,m=0,d=e- -64|0,b=0,p=0;o=r+c[e+56>>2]|0,s[o+d|0]=u[t+r|0],o=(f=1|r)+c[e+56>>2]|0,s[o+d|0]=u[t+f|0],o=(f=2|r)+c[e+56>>2]|0,s[o+d|0]=u[t+f|0],o=(f=3|r)+c[e+56>>2]|0,s[o+d|0]=u[t+f|0],i=(r=r+4|0)>>>0<4?i+1|0:i,o=p,p=o=(b=b+4|0)>>>0<4?o+1|0:o,(0|l)!=(0|b)|(0|m)!=(0|o););if(d=o=0,o|(p=3&n))for(;o=r+c[e+56>>2]|0,s[(e+o|0)- -64|0]=u[t+r|0],i=(r=r+1|0)?i:i+1|0,o=y,y=o=(g=g+1|0)?o:o+1|0,(0|p)!=(0|g)|(0|d)!=(0|o););i=a+c[e+60>>2]|0,i=(t=n+c[e+56>>2]|0)>>>0>>0?i+1|0:i,c[e+56>>2]=t,c[e+60>>2]=i}}}function K(e,t,n){var a,o=0,r=0,i=0,s=0,u=0,d=0,l=0,f=0,p=0,b=0,m=0,h=0,g=0,y=0,v=0,w=0,k=0,A=0,x=0;h=c[t+4>>2],o=c[e+4>>2],g=c[t+8>>2],r=c[e+8>>2],y=c[t+12>>2],i=c[e+12>>2],v=c[t+16>>2],s=c[e+16>>2],w=c[t+20>>2],u=c[e+20>>2],k=c[t+24>>2],d=c[e+24>>2],b=c[t+28>>2],l=c[e+28>>2],A=c[t+32>>2],f=c[e+32>>2],x=c[t+36>>2],p=c[e+36>>2],n=0-n|0,m=c[e>>2],c[e>>2]=n&(m^c[t>>2])^m,c[e+36>>2]=p^n&(p^x),c[e+32>>2]=f^n&(f^A),c[e+28>>2]=l^n&(l^b),c[e+24>>2]=d^n&(d^k),c[e+20>>2]=u^n&(u^w),c[e+16>>2]=s^n&(s^v),c[e+12>>2]=i^n&(i^y),c[e+8>>2]=r^n&(r^g),c[e+4>>2]=o^n&(o^h),o=c[e+40>>2],h=c[t+40>>2],r=c[e+44>>2],g=c[t+44>>2],i=c[e+48>>2],y=c[t+48>>2],s=c[e+52>>2],v=c[t+52>>2],u=c[e+56>>2],w=c[t+56>>2],d=c[e+60>>2],k=c[t+60>>2],l=c[(b=e- -64|0)>>2],A=c[t- -64>>2],f=c[e+68>>2],x=c[t+68>>2],p=c[e+72>>2],m=c[t+72>>2],a=c[e+76>>2],c[e+76>>2]=a^n&(c[t+76>>2]^a),c[e+72>>2]=p^n&(p^m),c[e+68>>2]=f^n&(f^x),c[b>>2]=l^n&(l^A),c[e+60>>2]=d^n&(d^k),c[e+56>>2]=u^n&(u^w),c[e+52>>2]=s^n&(s^v),c[e+48>>2]=i^n&(i^y),c[e+44>>2]=r^n&(r^g),c[e+40>>2]=o^n&(o^h),o=c[e+80>>2],h=c[t+80>>2],r=c[e+84>>2],g=c[t+84>>2],i=c[e+88>>2],y=c[t+88>>2],s=c[e+92>>2],v=c[t+92>>2],u=c[e+96>>2],w=c[t+96>>2],d=c[e+100>>2],k=c[t+100>>2],l=c[e+104>>2],b=c[t+104>>2],f=c[e+108>>2],A=c[t+108>>2],p=c[e+112>>2],x=c[t+112>>2],m=c[t+116>>2],t=c[e+116>>2],c[e+116>>2]=n&(m^t)^t,c[e+112>>2]=p^n&(p^x),c[e+108>>2]=f^n&(f^A),c[e+104>>2]=l^n&(l^b),c[e+100>>2]=d^n&(d^k),c[e+96>>2]=u^n&(u^w),c[e+92>>2]=s^n&(s^v),c[e+88>>2]=i^n&(i^y),c[e+84>>2]=r^n&(r^g),c[e+80>>2]=o^n&(o^h)}function W(e,t){var n,a,o=0;for(g=n=g-192|0,S(a=n+144|0,t),S(o=n+96|0,a),S(o,o),I(o,t,o),I(a,a,o),S(t=n+48|0,a),I(o,o,t),S(t,o),S(t,t),S(t,t),S(t,t),S(t,t),I(o,t,o),S(t,o),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),I(t,t,o),S(n,t),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),S(n,n),I(t,n,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),I(o,t,o),S(t,o),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),I(t,t,o),S(n,t),t=1;S(n,n),100!=(0|(t=t+1|0)););I(t=n+48|0,n,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),S(t,t),I(o=n+96|0,t,o),S(o,o),S(o,o),S(o,o),S(o,o),S(o,o),I(e,o,n+144|0),g=n+192|0}function Z(e,t,n){var a,o=0,r=0,i=0,s=0,u=0,d=0,f=0,p=0;g=a=g-128|0,c[e>>2]=1,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[e+16>>2]=0,c[e+20>>2]=0,c[e+24>>2]=0,c[e+28>>2]=0,c[e+32>>2]=0,c[e+36>>2]=0,c[e+40>>2]=1,Ee(e+44|0,0,76),K(e,o=l(t,960)+2704|0,(255&(1^(t=n-((n>>31&n)<<1)|0)))-1>>>31|0),K(e,o+120|0,(255&(2^t))-1>>>31|0),K(e,o+240|0,(255&(3^t))-1>>>31|0),K(e,o+360|0,(255&(4^t))-1>>>31|0),K(e,o+480|0,(255&(5^t))-1>>>31|0),K(e,o+600|0,(255&(6^t))-1>>>31|0),K(e,o+720|0,(255&(7^t))-1>>>31|0),K(e,o+840|0,(255&(8^t))-1>>>31|0),r=c[e+40>>2],i=c[e+44>>2],s=c[e+48>>2],u=c[e+52>>2],d=c[e+56>>2],f=c[e+60>>2],p=c[(t=e- -64|0)>>2],o=c[t+4>>2],t=c[e+76>>2],c[a+40>>2]=c[e+72>>2],c[a+44>>2]=t,c[a+32>>2]=p,c[a+36>>2]=o,c[a+24>>2]=d,c[a+28>>2]=f,c[a+16>>2]=s,c[a+20>>2]=u,c[a+8>>2]=r,c[a+12>>2]=i,r=c[e+8>>2],i=c[e+12>>2],s=c[e+16>>2],u=c[e+20>>2],d=c[e+24>>2],f=c[e+28>>2],p=c[e>>2],o=c[e+4>>2],t=c[e+36>>2],c[a+80>>2]=c[e+32>>2],c[a+84>>2]=t,c[a+72>>2]=d,c[a+76>>2]=f,c[(t=a- -64|0)>>2]=s,c[t+4>>2]=u,c[a+56>>2]=r,c[a+60>>2]=i,c[a+48>>2]=p,c[a+52>>2]=o,r=c[e+80>>2],i=c[e+84>>2],s=c[e+88>>2],u=c[e+92>>2],d=c[e+96>>2],f=c[e+100>>2],p=c[e+104>>2],o=c[e+108>>2],t=c[e+112>>2],c[a+124>>2]=0-c[e+116>>2],c[a+120>>2]=0-t,c[a+116>>2]=0-o,c[a+112>>2]=0-p,c[a+108>>2]=0-f,c[a+104>>2]=0-d,c[a+100>>2]=0-u,c[a+96>>2]=0-s,c[a+92>>2]=0-i,c[a+88>>2]=0-r,K(e,a+8|0,(128&n)>>>7|0),g=a+128|0}function V(e,t,n,a){var o=0,r=0,i=0,c=0,d=0,l=0,f=0;if(n|a)e:for(f=e+224|0,d=e+96|0,r=u[e+352|0]|u[e+353|0]<<8|u[e+354|0]<<16|u[e+355|0]<<24;;){if(o=r+d|0,!a&n>>>0<=(i=256-r|0)>>>0){Ce(o,t,n),t=(u[e+352|0]|u[e+353|0]<<8|u[e+354|0]<<16|u[e+355|0]<<24)+n|0,s[e+352|0]=t,s[e+353|0]=t>>>8,s[e+354|0]=t>>>16,s[e+355|0]=t>>>24;break e}if(Ce(o,t,i),o=(u[e+352|0]|u[e+353|0]<<8|u[e+354|0]<<16|u[e+355|0]<<24)+i|0,s[e+352|0]=o,s[e+353|0]=o>>>8,s[e+354|0]=o>>>16,s[e+355|0]=o>>>24,l=r=u[e+68|0]|u[e+69|0]<<8|u[e+70|0]<<16|u[e+71|0]<<24,r=(c=128+(o=u[e+64|0]|u[e+65|0]<<8|u[e+66|0]<<16|u[e+67|0]<<24)|0)>>>0<128?r+1|0:r,s[e+64|0]=c,s[e+65|0]=c>>>8,s[e+66|0]=c>>>16,s[e+67|0]=c>>>24,s[e+68|0]=r,s[e+69|0]=r>>>8,s[e+70|0]=r>>>16,s[e+71|0]=r>>>24,r=u[e+76|0]|u[e+77|0]<<8|u[e+78|0]<<16|u[e+79|0]<<24,r=(l=o=-1==(0|l)&o>>>0>4294967167)>>>0>(o=o+(u[e+72|0]|u[e+73|0]<<8|u[e+74|0]<<16|u[e+75|0]<<24)|0)>>>0?r+1|0:r,s[e+72|0]=o,s[e+73|0]=o>>>8,s[e+74|0]=o>>>16,s[e+75|0]=o>>>24,s[e+76|0]=r,s[e+77|0]=r>>>8,s[e+78|0]=r>>>16,s[e+79|0]=r>>>24,v(e,d),Ce(d,f,128),o=r=(u[e+352|0]|u[e+353|0]<<8|u[e+354|0]<<16|u[e+355|0]<<24)-128|0,s[e+352|0]=o,s[e+353|0]=o>>>8,s[e+354|0]=o>>>16,s[e+355|0]=o>>>24,t=t+i|0,!((a=a-(n>>>0>>0)|0)|(n=n-i|0)))break}return 0}function q(e,t){var n,a=0,o=0,r=0,i=0,s=0,u=0,d=0,l=0,f=0,p=0,b=0,m=0,h=0,g=0,y=0,v=0,w=0,k=0;a=c[t+40>>2],o=c[t+4>>2],r=c[t+44>>2],i=c[t+8>>2],s=c[t+48>>2],u=c[t+12>>2],d=c[t+52>>2],l=c[t+16>>2],f=c[t+56>>2],b=c[t+20>>2],m=c[t+60>>2],h=c[t+24>>2],g=c[(p=t- -64|0)>>2],y=c[t+28>>2],v=c[t+68>>2],w=c[t+32>>2],k=c[t+72>>2],n=c[t>>2],c[e+36>>2]=c[t+36>>2]+c[t+76>>2],c[e+32>>2]=w+k,c[e+28>>2]=y+v,c[e+24>>2]=h+g,c[e+20>>2]=b+m,c[e+16>>2]=l+f,c[e+12>>2]=u+d,c[e+8>>2]=i+s,c[e+4>>2]=o+r,c[e>>2]=a+n,a=c[t+40>>2],o=c[t+4>>2],r=c[t+44>>2],i=c[t+8>>2],s=c[t+48>>2],u=c[t+12>>2],d=c[t+52>>2],l=c[t+16>>2],f=c[t+56>>2],b=c[t+20>>2],m=c[t+60>>2],h=c[t+24>>2],p=c[p>>2],g=c[t+28>>2],y=c[t+68>>2],v=c[t+32>>2],w=c[t+72>>2],k=c[t>>2],c[e+76>>2]=c[t+76>>2]-c[t+36>>2],c[e+72>>2]=w-v,c[e+68>>2]=y-g,c[e- -64>>2]=p-h,c[e+60>>2]=m-b,c[e+56>>2]=f-l,c[e+52>>2]=d-u,c[e+48>>2]=s-i,c[e+44>>2]=r-o,c[e+40>>2]=a-k,a=c[t+80>>2],o=c[t+84>>2],r=c[t+88>>2],i=c[t+92>>2],s=c[t+96>>2],u=c[t+100>>2],d=c[t+104>>2],l=c[t+108>>2],f=c[t+116>>2],c[e+112>>2]=c[t+112>>2],c[e+116>>2]=f,c[e+104>>2]=d,c[e+108>>2]=l,c[e+96>>2]=s,c[e+100>>2]=u,c[e+88>>2]=r,c[e+92>>2]=i,c[e+80>>2]=a,c[e+84>>2]=o,I(e+120|0,t+120|0,1440)}function Q(e,t){var n,a,o,r,i,u=0,d=0,f=0,p=0,b=0,m=0,h=0,g=0,y=0,v=0;(f=c[e+56>>2])|(u=c[e+60>>2])&&(s[f+(d=e- -64|0)|0]=1,!((v=f+1|0)?u:u+1|0)&v>>>0<=15&&Ee(65+(e+f|0)|0,0,15-f|0),s[e+80|0]=1,U(e,d,16,0)),v=c[e+52>>2],g=c[e+48>>2],d=c[e+44>>2],f=c[e+24>>2],b=c[e+28>>2]+(f>>>26|0)|0,p=c[e+32>>2]+(b>>>26|0)|0,n=c[e+36>>2]+(p>>>26|0)|0,u=(h=(f=(f=(67108863&f)+((m=c[e+20>>2]+l(n>>>26|0,5)|0)>>>26|0)|0)&(b=(p=(i=(67108863&n)+((r=(a=67108863&p)+((o=(y=67108863&b)+((m=f+((u=5+(h=67108863&m)|0)>>>26|0)|0)>>>26|0)|0)>>>26|0)|0)>>>26|0)|0)-67108864|0)>>31)|m&(p=67108863&(m=(p>>>31|0)-1|0)))<<26|u&p|b&h)+c[e+40>>2]|0,s[0|t]=u,s[t+1|0]=u>>>8,s[t+2|0]=u>>>16,s[t+3|0]=u>>>24,h=u>>>0>>0,u=(y=b&y|p&o)<<20|f>>>6,f=0,u=(d=u+d|0)>>>0>>0?1:f,u=(f=d+h|0)>>>0>>0?u+1|0:u,s[(d=t)+4|0]=f,s[d+5|0]=f>>>8,s[d+6|0]=f>>>16,s[d+7|0]=f>>>24,f=0,d=(d=(p=b&a|p&r)<<14|y>>>12)>>>0>(g=d+g|0)>>>0?1:f,f=g,g=u,f=(u=f+u|0)>>>0>>0?d+1|0:d,s[(d=t)+8|0]=u,s[d+9|0]=u>>>8,s[d+10|0]=u>>>16,s[d+11|0]=u>>>24,u=d=(m&i|b&n)<<8|p>>>18,u=(u=f)+(d=d+v|0)|0,s[t+12|0]=u,s[t+13|0]=u>>>8,s[t+14|0]=u>>>16,s[t+15|0]=u>>>24,$e(e,88)}function J(e,t,n){var a,o=0;return g=a=g-16|0,s[a+15|0]=0,o=-1,0|dt[c[8722]](e,t,n)||(s[a+15|0]=u[0|e]|u[a+15|0],s[a+15|0]=u[e+1|0]|u[a+15|0],s[a+15|0]=u[e+2|0]|u[a+15|0],s[a+15|0]=u[e+3|0]|u[a+15|0],s[a+15|0]=u[e+4|0]|u[a+15|0],s[a+15|0]=u[e+5|0]|u[a+15|0],s[a+15|0]=u[e+6|0]|u[a+15|0],s[a+15|0]=u[e+7|0]|u[a+15|0],s[a+15|0]=u[e+8|0]|u[a+15|0],s[a+15|0]=u[e+9|0]|u[a+15|0],s[a+15|0]=u[e+10|0]|u[a+15|0],s[a+15|0]=u[e+11|0]|u[a+15|0],s[a+15|0]=u[e+12|0]|u[a+15|0],s[a+15|0]=u[e+13|0]|u[a+15|0],s[a+15|0]=u[e+14|0]|u[a+15|0],s[a+15|0]=u[e+15|0]|u[a+15|0],s[a+15|0]=u[e+16|0]|u[a+15|0],s[a+15|0]=u[e+17|0]|u[a+15|0],s[a+15|0]=u[e+18|0]|u[a+15|0],s[a+15|0]=u[e+19|0]|u[a+15|0],s[a+15|0]=u[e+20|0]|u[a+15|0],s[a+15|0]=u[e+21|0]|u[a+15|0],s[a+15|0]=u[e+22|0]|u[a+15|0],s[a+15|0]=u[e+23|0]|u[a+15|0],s[a+15|0]=u[e+24|0]|u[a+15|0],s[a+15|0]=u[e+25|0]|u[a+15|0],s[a+15|0]=u[e+26|0]|u[a+15|0],s[a+15|0]=u[e+27|0]|u[a+15|0],s[a+15|0]=u[e+28|0]|u[a+15|0],s[a+15|0]=u[e+29|0]|u[a+15|0],s[a+15|0]=u[e+30|0]|u[a+15|0],s[a+15|0]=u[e+31|0]|u[a+15|0],o=(u[a+15|0]<<23)-8388608>>31),g=a+16|0,o}function Y(e,t){var n,a,o,r,i,u,d,f=0,p=0;a=c[t+32>>2],o=c[t+28>>2],r=c[t+24>>2],i=c[t+20>>2],u=c[t+16>>2],d=c[t+12>>2],f=c[t+4>>2],p=c[t>>2],n=c[t+36>>2],t=c[t+8>>2],p=l((a+(o+(r+(i+(u+(d+((f+(p+(l(n,19)+16777216>>>25|0)>>26)>>25)+t>>26)>>25)>>26)>>25)>>26)>>25)>>26)+n>>25,19)+p|0,s[0|e]=p,s[e+2|0]=p>>>16,s[e+1|0]=p>>>8,f=f+(p>>26)|0,s[e+5|0]=f>>>14,s[e+4|0]=f>>>6,s[e+3|0]=p>>>24&3|f<<2,t=t+(f>>25)|0,s[e+8|0]=t>>>13,s[e+7|0]=t>>>5,s[e+6|0]=t<<3|(29360128&f)>>>22,p=(t>>26)+d|0,s[e+11|0]=p>>>11,s[e+10|0]=p>>>3,s[e+9|0]=p<<5|(65011712&t)>>>21,f=(p>>25)+u|0,s[e+15|0]=f>>>18,s[e+14|0]=f>>>10,s[e+13|0]=f>>>2,t=(f>>26)+i|0,s[e+16|0]=t,s[e+12|0]=f<<6|(33030144&p)>>>19,s[e+18|0]=t>>>16,s[e+17|0]=t>>>8,f=(t>>25)+r|0,s[e+21|0]=f>>>15,s[e+20|0]=f>>>7,s[e+19|0]=t>>>24&1|f<<1,t=(f>>26)+o|0,s[e+24|0]=t>>>13,s[e+23|0]=t>>>5,s[e+22|0]=t<<3|(58720256&f)>>>23,f=(t>>25)+a|0,s[e+27|0]=f>>>12,s[e+26|0]=f>>>4,s[e+25|0]=f<<4|(31457280&t)>>>21,t=n+(f>>26)|0,s[e+30|0]=t>>>10,s[e+29|0]=t>>>2,s[e+31|0]=(33292288&t)>>>18,s[e+28|0]=t<<6|(66060288&f)>>>20}function X(e,t){var n;return c[12+(n=g-16|0)>>2]=e,c[n+8>>2]=t,c[n+4>>2]=0,c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]]^u[c[n+8>>2]],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+1|0]^u[c[n+8>>2]+1|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+2|0]^u[c[n+8>>2]+2|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+3|0]^u[c[n+8>>2]+3|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+4|0]^u[c[n+8>>2]+4|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+5|0]^u[c[n+8>>2]+5|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+6|0]^u[c[n+8>>2]+6|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+7|0]^u[c[n+8>>2]+7|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+8|0]^u[c[n+8>>2]+8|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+9|0]^u[c[n+8>>2]+9|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+10|0]^u[c[n+8>>2]+10|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+11|0]^u[c[n+8>>2]+11|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+12|0]^u[c[n+8>>2]+12|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+13|0]^u[c[n+8>>2]+13|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+14|0]^u[c[n+8>>2]+14|0],c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+15|0]^u[c[n+8>>2]+15|0],(c[n+4>>2]-1>>>8&1)-1|0}function $(e,t){var n,a=0,o=0;n=t;e:if(a=255&t){if(3&e)for(;;){if(!(t=u[0|e])|(0|t)==(255&n))break e;if(!(3&(e=e+1|0)))break}t:if(!((-1^(t=c[e>>2]))&t-16843009&-2139062144))for(a=l(a,16843009);;){if((-1^(t^=a))&t-16843009&-2139062144)break t;if(t=c[e+4>>2],e=e+4|0,t-16843009&(-1^t)&-2139062144)break}for(;t=e,(a=u[0|e])&&(e=t+1|0,(0|a)!=(255&n)););e=t}else{a=e;t:{if(3&e)for(;;){if(!u[0|e])break t;if(!(3&(e=e+1|0)))break}for(;t=e,e=e+4|0,!((-1^(o=c[t>>2]))&o-16843009&-2139062144););for(;t=(e=t)+1|0,u[0|e];);}e=a+(e-a|0)|0}return u[0|e]==(255&n)?e:0}function ee(e,t){var n,a=0,o=0,r=0,i=0,c=0;for(g=n=g-192|0,se(e),Ee(n- -64|0,54,128);s[0|(a=(i=n- -64|0)+o|0)]=u[0|a]^u[t+o|0],s[0|(r=(a=1|o)+i|0)]=u[0|r]^u[t+a|0],s[0|(r=(a=2|o)+i|0)]=u[0|r]^u[t+a|0],s[0|(a=(a=i)+(i=3|o)|0)]=u[0|a]^u[t+i|0],o=o+4|0,32!=(0|(c=c+4|0)););for(L(e,o=n- -64|0,128,0),se(i=e+208|0),Ee(o,92,128),o=0,c=0;s[0|(a=(e=n- -64|0)+o|0)]=u[0|a]^u[t+o|0],s[0|(r=(a=1|o)+e|0)]=u[0|r]^u[t+a|0],s[0|(r=(a=2|o)+e|0)]=u[0|r]^u[t+a|0],s[0|(a=(a=e)+(e=3|o)|0)]=u[0|a]^u[e+t|0],o=o+4|0,32!=(0|(c=c+4|0)););L(i,e=n- -64|0,128,0),$e(e,128),$e(n,64),g=n+192|0}function te(e,t,n,a,o,r,i){var s,u,d,l,f,p=0;return g=s=g-352|0,H(s,r,i),!((!o&a>>>0>e-n>>>0|0!=(0|o))&e>>>0>n>>>0)&(!o&a>>>0<=n-e>>>0|e>>>0>=n>>>0)||(n=xe(e,n,a)),c[s+56>>2]=0,c[s+60>>2]=0,c[s+48>>2]=0,c[s+52>>2]=0,c[s+40>>2]=0,c[s+44>>2]=0,c[s+32>>2]=0,c[s+36>>2]=0,i=(p=!o&a>>>0>=32|0!=(0|o))?32:a,f=p=p?0:o,(d=!(i|p))||Ce(s- -64|0,n,i),He(u=s+32|0,u,l=i+32|0,p=l>>>0<32?p+1|0:p,r=r+16|0,s),Qe(s+96|0,u),d||Ce(e,s- -64|0,i),$e(s+32|0,64),!o&a>>>0>=33|o&&Fe(e+i|0,n+i|0,a-i|0,o-(f+(a>>>0>>0)|0)|0,r,s),$e(s,32),Ve(n=s+96|0,e,a,o),Je(n,t),$e(n,256),g=s+352|0,0}function ne(e,t,n,a,o,r,i){var s,u,d=0,l=0;g=s=g-96|0,H(s,r,i),i=s+32|0,u=r+16|0,dt[c[8724]](i,32,0,u,s),r=-1;e:{if(!(0|dt[c[8718]](n,t,a,o,i))){if(r=0,!e)break e;!((!o&a>>>0>t-e>>>0|0!=(0|o))&e>>>0>>0)&(!o&a>>>0<=e-t>>>0|e>>>0<=t>>>0)||(t=xe(e,t,a)),(i=(n=!o&a>>>0>=32|0!=(0|o))?32:a)|(n=n?0:o)?(l=Ce(s- -64|0,t,i),He(r=s+32|0,r,d=i+32|0,d>>>0<32?n+1|0:n,u,s),Ce(e,l,i)):He(r=s+32|0,r,d=i+32|0,d>>>0<32?n+1|0:n,u,s),$e(s+32|0,64),r=0,!o&a>>>0<33||Fe(e+i|0,t+i|0,a-i|0,o-(n+(a>>>0>>0)|0)|0,u,s)}$e(s,32)}return g=s+96|0,r}function ae(e,t,n,a,o,r,i,s,d,l){var f,p;return g=f=g-400|0,c[f+4>>2]=0,j(p=f+16|0,d,l),l=u[d+20|0]|u[d+21|0]<<8|u[d+22|0]<<16|u[d+23|0]<<24,c[f+8>>2]=u[d+16|0]|u[d+17|0]<<8|u[d+18|0]<<16|u[d+19|0]<<24,c[f+12>>2]=l,We(l=f+80|0,64,f+4|0,p),Qe(d=f+144|0,l),$e(l,64),Ve(d,r,i,s),Ve(d,34816,0-i&15,0),Ve(d,t,n,a),Ve(d,34816,0-n&15,0),c[f+72>>2]=i,c[f+76>>2]=s,Ve(d,r=f+72|0,8,0),c[f+72>>2]=n,c[f+76>>2]=a,Ve(d,r,8,0),Je(d,r=f+48|0),$e(d,256),d=X(r,o),$e(r,16),e&&(d?(Ee(e,0,n),d=-1):(De(e,t,n,a,f+4|0,f+16|0),d=0)),$e(f+16|0,32),g=f+400|0,d}function oe(e,t,n,a,o,r,i,s,d,l,f){var p,b,m;return g=p=g-384|0,c[p+4>>2]=0,j(b=p+16|0,l,f),f=u[l+20|0]|u[l+21|0]<<8|u[l+22|0]<<16|u[l+23|0]<<24,c[p+8>>2]=u[l+16|0]|u[l+17|0]<<8|u[l+18|0]<<16|u[l+19|0]<<24,c[p+12>>2]=f,We(f=p- -64|0,64,m=p+4|0,b),Qe(l=p+128|0,f),$e(f,64),Ve(l,i,s,d),Ve(l,34816,0-s&15,0),De(e,a,o,r,m,b),Ve(l,e,o,r),Ve(l,34816,0-o&15,0),c[p+56>>2]=s,c[p+60>>2]=d,Ve(l,e=p+56|0,8,0),c[p+56>>2]=o,c[p+60>>2]=r,Ve(l,e,8,0),Je(l,t),$e(l,256),n&&(c[n>>2]=16,c[n+4>>2]=0),$e(p+16|0,32),g=p+384|0,0}function re(e,t,n,a){var o,r=0;return g=o=g-208|0,c[o+72>>2]=0,c[o+76>>2]=0,r=c[8487],c[o+8>>2]=c[8486],c[o+12>>2]=r,r=c[8489],c[o+16>>2]=c[8488],c[o+20>>2]=r,r=c[8491],c[o+24>>2]=c[8490],c[o+28>>2]=r,r=c[8493],c[o+32>>2]=c[8492],c[o+36>>2]=r,r=c[8495],c[o+40>>2]=c[8494],c[o+44>>2]=r,r=c[8497],c[o+48>>2]=c[8496],c[o+52>>2]=r,r=c[8499],c[o+56>>2]=c[8498],c[o+60>>2]=r,c[o+64>>2]=0,c[o+68>>2]=0,r=c[8485],c[o>>2]=c[8484],c[o+4>>2]=r,L(o,t,n,a),E(o,e),g=o+208|0,0}function ie(e,t){var n,a=0,o=0,r=0;if(s[15+(n=g-16|0)|0]=0,t){if(o=3&t,t>>>0>=4)for(r=-4&t,t=0;s[n+15|0]=u[e+a|0]|u[n+15|0],s[n+15|0]=u[(1|a)+e|0]|u[n+15|0],s[n+15|0]=u[(2|a)+e|0]|u[n+15|0],s[n+15|0]=u[(3|a)+e|0]|u[n+15|0],a=a+4|0,(0|r)!=(0|(t=t+4|0)););if(o)for(t=0;s[n+15|0]=u[e+a|0]|u[n+15|0],a=a+1|0,(0|o)!=(0|(t=t+1|0)););}return u[n+15|0]-1>>>8&1}function se(e){var t=0;c[e+64>>2]=0,c[e+68>>2]=0,c[e+72>>2]=0,c[e+76>>2]=0,t=c[8485],c[e>>2]=c[8484],c[e+4>>2]=t,t=c[8487],c[e+8>>2]=c[8486],c[e+12>>2]=t,t=c[8489],c[e+16>>2]=c[8488],c[e+20>>2]=t,t=c[8491],c[e+24>>2]=c[8490],c[e+28>>2]=t,t=c[8493],c[e+32>>2]=c[8492],c[e+36>>2]=t,t=c[8495],c[e+40>>2]=c[8494],c[e+44>>2]=t,t=c[8497],c[e+48>>2]=c[8496],c[e+52>>2]=t,t=c[8499],c[e+56>>2]=c[8498],c[e+60>>2]=t}function ce(e,t,n){var a,o=0,r=0;if(c[12+(a=g-16|0)>>2]=e,c[a+8>>2]=t,e=0,s[a+7|0]=0,n){if(t=1&n,1!=(0|n))for(r=-2&n,n=0;s[a+7|0]=u[a+7|0]|u[c[a+12>>2]+e|0]^u[c[a+8>>2]+e|0],o=1|e,s[a+7|0]=u[a+7|0]|u[o+c[a+12>>2]|0]^u[c[a+8>>2]+o|0],e=e+2|0,(0|r)!=(0|(n=n+2|0)););t&&(s[a+7|0]=u[a+7|0]|u[c[a+12>>2]+e|0]^u[c[a+8>>2]+e|0])}return(u[a+7|0]-1>>>8&1)-1|0}function ue(e){for(var t=0,n=0,a=0,o=0,r=0,i=0,s=0,c=0,d=0,l=0;o=(n=u[e+a|0])^u[0|(t=a+2448|0)]|o,r=n^u[t+192|0]|r,i=n^u[t+160|0]|i,s=n^u[t+128|0]|s,c=n^u[t+96|0]|c,d=n^u[t- -64|0]|d,l=n^u[t+32|0]|l,31!=(0|(a=a+1|0)););return((255&((t=127^(e=127&u[e+31|0]))|r))-1|(255&(t|i))-1|(255&(t|s))-1|(255&(122^e|c))-1|(255&(5^e|d))-1|(255&(e|l))-1|(255&(e|o))-1)>>>8&1}function de(e,t,n){var a=0,o=0,r=0,i=0;return o=31&(r=i=63&n),r=r>>>0>=32?-1>>>o|0:(a=-1>>>o|0)|(1<>>0>=32?(a=r<>>32-o|a<>>0>=32?(a=-1<>>32-a,e&=n,t&=a,a=31&o,o>>>0>=32?(n=0,e=t>>>a|0):(n=t>>>a|0,e=((1<>>a),y=n|r,e|i}function le(e,t,n,a,o,r,i,s,u,d){var l,f,p;return g=l=g-352|0,We(p=l+32|0,64,u,d),Qe(f=l+96|0,p),$e(p,64),Ve(f,r,i,s),Ve(f,33920,0-i&15,0),Ve(f,t,n,a),Ve(f,33920,0-n&15,0),c[l+24>>2]=i,c[l+28>>2]=s,Ve(f,r=l+24|0,8,0),c[l+24>>2]=n,c[l+28>>2]=a,Ve(f,r,8,0),Je(f,l),$e(f,256),r=X(l,o),$e(l,16),e&&(r?(Ee(e,0,n),r=-1):(ye(e,t,n,a,u,1,d),r=0)),g=l+352|0,r}function fe(e,t,n,a,o,r,i,s,u,d,l){var f,p,b;return g=f=g-336|0,We(b=f+16|0,64,d,l),Qe(p=f+80|0,b),$e(b,64),Ve(p,i,s,u),Ve(p,33920,0-s&15,0),ye(e,a,o,r,d,1,l),Ve(p,e,o,r),Ve(p,33920,0-o&15,0),c[f+8>>2]=s,c[f+12>>2]=u,Ve(p,e=f+8|0,8,0),c[f+8>>2]=o,c[f+12>>2]=r,Ve(p,e,8,0),Je(p,t),$e(p,256),n&&(c[n>>2]=16,c[n+4>>2]=0),g=f+336|0,0}function pe(e,t,n,a,o,r,i,s,u,d){var l,f,p;return g=l=g-352|0,Ze(p=l+32|0,u,d),Qe(f=l+96|0,p),$e(p,64),Ve(f,r,i,s),c[l+24>>2]=i,c[l+28>>2]=s,Ve(f,r=l+24|0,8,0),Ve(f,t,n,a),c[l+24>>2]=n,c[l+28>>2]=a,Ve(f,r,8,0),Je(f,l),$e(f,256),r=X(l,o),$e(l,16),e&&(r?(Ee(e,0,n),r=-1):(Be(e,t,n,a,u,d),r=0)),g=l+352|0,r}function be(e,t,n,a,o,r,i,s,u,d,l){var f,p,b;return g=f=g-336|0,Ze(b=f+16|0,d,l),Qe(p=f+80|0,b),$e(b,64),Ve(p,i,s,u),c[f+8>>2]=s,c[f+12>>2]=u,Ve(p,i=f+8|0,8,0),Be(e,a,o,r,d,l),Ve(p,e,o,r),c[f+8>>2]=o,c[f+12>>2]=r,Ve(p,i,8,0),Je(p,t),$e(p,256),n&&(c[n>>2]=16,c[n+4>>2]=0),g=f+336|0,0}function me(e,t){var n;for(c[12+(n=g-16|0)>>2]=e,c[n+8>>2]=t,e=0,c[n+4>>2]=0;c[n+4>>2]=c[n+4>>2]|u[c[n+12>>2]+e|0]^u[c[n+8>>2]+e|0],t=1|e,c[n+4>>2]=c[n+4>>2]|u[t+c[n+12>>2]|0]^u[t+c[n+8>>2]|0],32!=(0|(e=e+2|0)););return(c[n+4>>2]-1>>>8&1)-1|0}function he(e){var t=0,n=0,a=0,o=0;for(t=1;t=u[0|(n=e+a|0)]+t|0,s[0|n]=t,t=u[0|(n=(1|a)+e|0)]+(t>>>8|0)|0,s[0|n]=t,t=u[0|(n=(2|a)+e|0)]+(t>>>8|0)|0,s[0|n]=t,t=u[0|(n=(3|a)+e|0)]+(t>>>8|0)|0,s[0|n]=t,t=t>>>8|0,a=a+4|0,4!=(0|(o=o+4|0)););}function ge(e,t,n,a){var o,r,i,s,c=0,u=0;return s=l(c=n>>>16|0,u=e>>>16|0),c=(65535&(u=((i=l(o=65535&n,r=65535&e))>>>16|0)+l(u,o)|0))+l(c,r)|0,y=(l(t,n)+s|0)+l(e,a)+(u>>>16)+(c>>>16)|0,65535&i|c<<16}function ye(e,t,n,a,o,i,s){var u=0,d=0;u=a,1==(((u=(d=n+63|0)>>>0<63?u+1|0:u)>>>6|0)+(0!=(0|(u=(63&u)<<26|d>>>6)))|0)&i>>>0>(d=0-u|0)>>>0|1==(0|a)|a>>>0>1?(Le(),r()):dt[c[8716]](e,t,n,a,o,i,s)}function ve(e,t){e|=0;var n,a=0,o=0,r=0;if(g=n=g-16|0,t|=0)for(;s[n+15|0]=0,o=e+a|0,r=0|p(34904,n+15|0,0),s[0|o]=r,(0|(a=a+1|0))!=(0|t););g=n+16|0}function we(e,t,n,a,o,r,i){var s,c=0;return g=s=g-32|0,c=-1,!a&n>>>0<16||Se(s,r,i)||(c=ne(e,t+16|0,t,n-16|0,a-(n>>>0<16)|0,o,s),$e(s,32)),g=s+32|0,c}function ke(e){var t,n;return(e=(t=c[8712])+(n=e+7&-8)|0)>>>0<=t>>>0&&n||e>>>0>lt()<<16>>>0&&!(0|h(0|e))?(c[8916]=48,-1):(c[8712]=e,t)}function Ae(e,t){var n,a,o;g=n=g-176|0,W(a=n+96|0,t+80|0),I(o=n+48|0,t,a),I(n,t+40|0,a),Y(e,n),Y(n+144|0,o),s[e+31|0]=u[e+31|0]^u[n+144|0]<<7,g=n+176|0}function xe(e,t,n){var a=0;if(e>>>0>>0)return Ce(e,t,n);if(n)for(a=e+n|0,t=t+n|0;t=t-1|0,s[0|(a=a-1|0)]=u[0|t],n=n-1|0;);return e}function Ie(e,t,n,a,o,i,s){var c,u=0;if(g=c=g-32|0,!a&n>>>0<4294967280)return u=-1,Se(c,i,s)||(u=te(e+16|0,e,t,n,a,o,c),$e(c,32)),g=c+32|0,u;Le(),r()}function Te(e,t,n,a,o,r){return t|=0,0|(!(a|=0)&(n|=0)>>>0>=16|a?ne(e|=0,t+16|0,t,n-16|0,a-(n>>>0<16)|0,o|=0,r|=0):-1)}function Se(e,t,n){e|=0;var a,o=0;return g=a=g-32|0,o=-1,J(a,n|=0,t|=0)||(o=H(e,34832,a)),g=a+32|0,0|o}function Ce(e,t,n){var a=0;if(n)for(a=e;s[0|a]=u[0|t],a=a+1|0,t=t+1|0,n=n-1|0;);return e}function Ee(e,t,n){var a=0;if(n)for(a=e;s[0|a]=t,a=a+1|0,n=n-1|0;);return e}function Re(e,t,n){return e|=0,t|=0,(n|=0)>>>0>=256&&(b(1260,1187,107,1067),r()),0|R(e,t,255&n)}function Me(e,t){var n;g=n=g+-64|0,E(e,n),L(e=e+208|0,n,64,0),E(e,t),$e(n,64),g=n- -64|0}function Pe(e,t,n,a,o,r,i){return 0|te(e|=0,t|=0,n|=0,a|=0,o|=0,r|=0,i|=0)}function Ue(e,t,n,a,o,r,i){return 0|ne(e|=0,t|=0,n|=0,a|=0,o|=0,r|=0,i|=0)}function _e(e,t){var n=0;return(-1>>>(n=31&t)&e)<>>e}function Be(e,t,n,a,o,i){1==(0|a)|a>>>0>1&&(Le(),r()),dt[c[8715]](e,t,n,a,o,1,0,i)}function De(e,t,n,a,o,i){1==(0|a)|a>>>0>1&&(Le(),r()),dt[c[8716]](e,t,n,a,o,1,i)}function Ne(){var e;g=e=g-16|0,s[e+15|0]=0,p(34940,e+15|0,0),g=e+16|0}function Oe(e,t,n){return 0|J(e|=0,t|=0,n|=0)}function Fe(e,t,n,a,o,r){dt[c[8725]](e,t,n,a,o,1,0,r)}function Le(){var e;(e=c[9050])&&dt[0|e](),m(),r()}function je(e,t){return e|=0,ve(t|=0,32),0|qe(e,t)}function He(e,t,n,a,o,r){dt[c[8725]](e,t,n,a,o,0,0,r)}function Ge(e){return e?31-f(e-1^e)|0:32}function ze(e,t,n,a){dt[c[8716]](e,t,40,0,n,0,a)}function Ke(e,t){return 0|qe(e|=0,t|=0)}function We(e,t,n,a){dt[c[8714]](e,t,0,n,a)}function Ze(e,t,n){dt[c[8713]](e,64,0,t,n)}function Ve(e,t,n,a){dt[c[8720]](e,t,n,a)}function qe(e,t){return 0|dt[c[8723]](e,t)}function Qe(e,t){dt[c[8719]](e,t)}function Je(e,t){dt[c[8721]](e,t)}function Ye(e,t,n,a){L(e,t,n,a)}function Xe(e){ve(e|=0,32)}function $e(e,t){Ee(e,0,t)}function et(){return 16}function tt(){return 32}function nt(){return 24}function at(){return-17}function ot(){return 64}function rt(){return 1}function it(){return 3}function st(){return 8}function ct(){return 0}o(t=u,1024,"TGlic29kaXVtRFJHcmFuZG9tYnl0ZXMAYjY0X3BvcyA8PSBiNjRfbGVuAGNyeXB0b19nZW5lcmljaGFzaF9ibGFrZTJiX2ZpbmFsAHJhbmRvbWJ5dGVzL3JhbmRvbWJ5dGVzLmMAc29kaXVtL2NvZGVjcy5jAGNyeXB0b19nZW5lcmljaGFzaC9ibGFrZTJiL3JlZi9ibGFrZTJiLXJlZi5jAGNyeXB0b19nZW5lcmljaGFzaC9ibGFrZTJiL3JlZi9nZW5lcmljaGFzaF9ibGFrZTJiLmMAYnVmX2xlbiA8PSBTSVpFX01BWABvdXRsZW4gPD0gVUlOVDhfTUFYAFMtPmJ1ZmxlbiA8PSBCTEFLRTJCX0JMT0NLQllURVMAMS4wLjE4AHNvZGl1bV9iaW4yYmFzZTY0AAAAAAAAAAC2eFn/hXLTAL1uFf8PCmoAKcABAJjoef+8PKD/mXHO/wC34v60DUj/AAAAAAAAAACwoA7+08mG/54YjwB/aTUAYAy9AKfX+/+fTID+amXh/x78BACSDK4="),o(t,1440,"WfGy/grlpv973Sr+HhTUAFKAAwAw0fMAd3lA/zLjnP8AbsUBZxuQ"),o(t,1488,"hTuMAb3xJP/4JcMBYNw3ALdMPv/DQj0AMkykAeGkTP9MPaP/dT4fAFGRQP92QQ4AonPW/waKLgB85vT/CoqPADQawgC49EwAgY8pAb70E/97qnr/YoFEAHnVkwBWZR7/oWebAIxZQ//v5b4BQwu1AMbwif7uRbz/Q5fuABMqbP/lVXEBMkSH/xFqCQAyZwH/UAGoASOYHv8QqLkBOFno/2XS/AAp+kcAzKpP/w4u7/9QTe8AvdZL/xGN+QAmUEz/vlV1AFbkqgCc2NABw8+k/5ZCTP+v4RD/jVBiAUzb8gDGonIALtqYAJsr8f6boGj/M7ulAAIRrwBCVKAB9zoeACNBNf5F7L8ALYb1AaN73QAgbhT/NBelALrWRwDpsGAA8u82ATlZigBTAFT/iKBkAFyOeP5ofL4AtbE+//opVQCYgioBYPz2AJeXP/7vhT4AIDicAC2nvf+OhbMBg1bTALuzlv76qg7/0qNOACU0lwBjTRoA7pzV/9XA0QFJLlQAFEEpATbOTwDJg5L+qm8Y/7EhMv6rJsv/Tvd0ANHdmQCFgLIBOiwZAMknOwG9E/wAMeXSAXW7dQC1s7gBAHLbADBekwD1KTgAfQ3M/vStdwAs3SD+VOoUAPmgxgHsfur/L2Oo/qrimf9ms9gA4o16/3pCmf629YYA4+QZAdY56//YrTj/tefSAHeAnf+BX4j/bn4zAAKpt/8HgmL+RbBe/3QE4wHZ8pH/yq0fAWkBJ/8ur0UA5C86/9fgRf7POEX/EP6L/xfP1P/KFH7/X9Vg/wmwIQDIBc//8SqA/iMhwP/45cQBgRF4APtnl/8HNHD/jDhC/yji9f/ZRiX+rNYJ/0hDhgGSwNb/LCZwAES4S//OWvsAleuNALWqOgB09O8AXJ0CAGatYgDpiWABfzHLAAWblAAXlAn/03oMACKGGv/bzIgAhggp/+BTK/5VGfcAbX8A/qmIMADud9v/563VAM4S/v4Iugf/fgkHAW8qSABvNOz+YD+NAJO/f/7NTsD/DmrtAbvbTACv87v+aVmtAFUZWQGi85QAAnbR/iGeCQCLoy7/XUYoAGwqjv5v/I7/m9+QADPlp/9J/Jv/XnQM/5ig2v+c7iX/s+rP/8UAs/+apI0A4cRoAAojGf7R1PL/Yf3e/rhl5QDeEn8BpIiH/x7PjP6SYfMAgcAa/slUIf9vCk7/k1Gy/wQEGACh7tf/Bo0hADXXDv8ptdD/54udALPL3f//uXEAveKs/3FC1v/KPi3/ZkAI/06uEP6FdUT/"),o(t,2480,"AQ=="),o(t,2512,"JuiVj8KyJ7BFw/SJ8u+Y8NXfrAXTxjM5sTgCiG1T/AXHF2pwPU3YT7o8C3YNEGcPKiBT+iw5zMZOx/13kqwDeuz///////////////////////////////////////9/7f///////////////////////////////////////3/u////////////////////////////////////////f+3T9VwaYxJY1pz3ot753hQ="),o(t,2703,"EIU7jAG98ST/+CXDAWDcNwC3TD7/w0I9ADJMpAHhpEz/TD2j/3U+HwBRkUD/dkEOAKJz1v8Gii4AfOb0/wqKjwA0GsIAuPRMAIGPKQG+9BP/e6p6/2KBRAB51ZMAVmUe/6FnmwCMWUP/7+W+AUMLtQDG8In+7kW8/+pxPP8l/zn/RbK2/oDQswB2Gn3+AwfW//EyTf9Vy8X/04f6/xkwZP+71bT+EVhpAFPRngEFc2IABK48/qs3bv/ZtRH/FLyqAJKcZv5X1q7/cnqbAeksqgB/CO8B1uzqAK8F2wAxaj3/BkLQ/wJqbv9R6hP/12vA/0OX7gATKmz/5VVxATJEh/8RagkAMmcB/1ABqAEjmB7/EKi5AThZ6P9l0vwAKfpHAMyqT/8OLu//UE3vAL3WS/8RjfkAJlBM/75VdQBW5KoAnNjQAcPPpP+WQkz/r+EQ/41QYgFM2/IAxqJyAC7amACbK/H+m6Bo/7IJ/P5kbtQADgWnAOnvo/8cl50BZZIK//6eRv5H+eQAWB4yAEQ6oP+/GGgBgUKB/8AyVf8Is4r/JvrJAHNQoACD5nEAfViTAFpExwD9TJ4AHP92AHH6/gBCSy4A5torAOV4ugGURCsAiHzuAbtrxf9UNfb/M3T+/zO7pQACEa8AQlSgAfc6HgAjQTX+Rey/AC2G9QGje90AIG4U/zQXpQC61kcA6bBgAPLvNgE5WYoAUwBU/4igZABcjnj+aHy+ALWxPv/6KVUAmIIqAWD89gCXlz/+74U+ACA4nAAtp73/joWzAYNW0wC7s5b++qoO/0RxFf/eujv/QgfxAUUGSABWnGz+N6dZAG002/4NsBf/xCxq/++VR/+kjH3/n60BADMp5wCRPiEAim9dAblTRQCQcy4AYZcQ/xjkGgAx2eIAcUvq/sGZDP+2MGD/Dg0aAIDD+f5FwTsAhCVR/n1qPADW8KkBpONCANKjTgAlNJcAY00aAO6c1f/VwNEBSS5UABRBKQE2zk8AyYOS/qpvGP+xITL+qybL/073dADR3ZkAhYCyATosGQDJJzsBvRP8ADHl0gF1u3UAtbO4AQBy2wAwXpMA9Sk4AH0NzP70rXcALN0g/lTqFAD5oMYB7H7q/48+3QCBWdb/N4sF/kQUv/8OzLIBI8PZAC8zzgEm9qUAzhsG/p5XJADZNJL/fXvX/1U8H/+rDQcA2vVY/vwjPAA31qD/hWU4AOAgE/6TQOoAGpGiAXJ2fQD4/PoAZV7E/8aN4v4zKrYAhwwJ/m2s0v/F7MIB8UGaADCcL/+ZQzf/2qUi/kq0swDaQkcBWHpjANS12/9cKuf/7wCaAPVNt/9eUaoBEtXYAKtdRwA0XvgAEpeh/sXRQv+u9A/+ojC3ADE98P62XcMAx+QGAcgFEf+JLe3/bJQEAFpP7f8nP03/NVLPAY4Wdv9l6BIBXBpDAAXIWP8hqIr/leFIAALRG/8s9agB3O0R/x7Taf6N7t0AgFD1/m/+DgDeX74B3wnxAJJM1P9szWj/P3WZAJBFMAAj5G8AwCHB/3DWvv5zmJcAF2ZYADNK+ADix4/+zKJl/9BhvQH1aBIA5vYe/xeURQBuWDT+4rVZ/9AvWv5yoVD/IXT4ALOYV/9FkLEBWO4a/zogcQEBTUUAO3k0/5juUwA0CMEA5yfp/8ciigDeRK0AWzny/tzSf//AB/b+lyO7AMPspQBvXc4A1PeFAZqF0f+b5woAQE4mAHr5ZAEeE2H/Plv5AfiFTQDFP6j+dApSALjscf7Uy8L/PWT8/iQFyv93W5n/gU8dAGdnq/7t12//2DVFAO/wFwDCld3/JuHeAOj/tP52UoX/OdGxAYvohQCesC7+wnMuAFj35QEcZ78A3d6v/pXrLACX5Bn+2mlnAI5V0gCVgb7/1UFe/nWG4P9SxnUAnd3cAKNlJADFciUAaKym/gu2AABRSLz/YbwQ/0UGCgDHk5H/CAlzAUHWr//ZrdEAUH+mAPflBP6nt3z/WhzM/q878P8LKfgBbCgz/5Cxw/6W+n4AiltBAXg83v/1we8AHda9/4ACGQBQmqIATdxrAerNSv82pmf/dEgJAOReL/8eyBn/I9ZZ/z2wjP9T4qP/S4KsAIAmEQBfiZj/13yfAU9dAACUUp3+w4L7/yjKTP/7fuAAnWM+/s8H4f9gRMMAjLqd/4MT5/8qgP4ANNs9/mbLSACNBwv/uqTVAB96dwCF8pEA0Pzo/1vVtv+PBPr++ddKAKUebwGrCd8A5XsiAVyCGv9Nmy0Bw4sc/zvgTgCIEfcAbHkgAE/6vf9g4/z+JvE+AD6uff+bb13/CubOAWHFKP8AMTn+QfoNABL7lv/cbdL/Ba6m/iyBvQDrI5P/JfeN/0iNBP9na/8A91oEADUsKgACHvAABDs/AFhOJABxp7QAvkfB/8eepP86CKwATSEMAEE/AwCZTSH/rP5mAeTdBP9XHv4BkilW/4rM7/5sjRH/u/KHANLQfwBELQ7+SWA+AFE8GP+qBiT/A/kaACPVbQAWgTb/FSPh/+o9OP862QYAj3xYAOx+QgDRJrf/Iu4G/66RZgBfFtMAxA+Z/i5U6P91IpIB5/pK/xuGZAFcu8P/qsZwAHgcKgDRRkMAHVEfAB2oZAGpraAAayN1AD5gO/9RDEUBh+++/9z8EgCj3Dr/iYm8/1NmbQBgBkwA6t7S/7muzQE8ntX/DfHWAKyBjABdaPIAwJz7ACt1HgDhUZ4Af+jaAOIcywDpG5f/dSsF//IOL/8hFAYAifss/hsf9f+31n3+KHmVALqe1f9ZCOMARVgA/suH4QDJrssAk0e4ABJ5Kf5eBU4A4Nbw/iQFtAD7h+cBo4rUANL5dP5YgbsAEwgx/j4OkP+fTNMA1jNSAG115P5n38v/S/wPAZpH3P8XDVsBjahg/7W2hQD6MzcA6urU/q8/ngAn8DQBnr0k/9UoVQEgtPf/E2YaAVQYYf9FFd4AlIt6/9zV6wHoy/8AeTmTAOMHmgA1FpMBSAHhAFKGMP5TPJ3/kUipACJn7wDG6S8AdBME/7hqCf+3gVMAJLDmASJnSADbooYA9SqeACCVYP6lLJAAyu9I/teWBQAqQiQBhNevAFauVv8axZz/MeiH/me2UgD9gLABmbJ6APX6CgDsGLIAiWqEACgdKQAyHpj/fGkmAOa/SwCPK6oALIMU/ywNF//t/5sBn21k/3C1GP9o3GwAN9ODAGMM1f+Yl5H/7gWfAGGbCAAhbFEAAQNnAD5tIv/6m7QAIEfD/yZGkQGfX/UAReVlAYgc8ABP4BkATm55//iofAC7gPcAApPr/k8LhABGOgwBtQij/0+Jhf8lqgv/jfNV/7Dn1//MlqT/79cn/y5XnP4Io1j/rCLoAEIsZv8bNin+7GNX/yl7qQE0cisAdYYoAJuGGgDnz1v+I4Qm/xNmff4k44X/dgNx/x0NfACYYEoBWJLO/6e/3P6iElj/tmQXAB91NABRLmoBDAIHAEVQyQHR9qwADDCNAeDTWAB04p8AemKCAEHs6gHh4gn/z+J7AVnWOwBwh1gBWvTL/zELJgGBbLoAWXAPAWUuzP9/zC3+T//d/zNJEv9/KmX/8RXKAKDjBwBpMuwATzTF/2jK0AG0DxAAZcVO/2JNywApufEBI8F8ACObF//PNcAAC32jAfmeuf8EgzAAFV1v/z155wFFyCT/uTC5/2/uFf8nMhn/Y9ej/1fUHv+kkwX/gAYjAWzfbv/CTLIASmW0APMvMACuGSv/Uq39ATZywP8oN1sA12yw/ws4BwDg6UwA0WLK/vIZfQAswV3+ywixAIewEwBwR9X/zjuwAQRDGgAOj9X+KjfQ/zxDeADBFaMAY6RzAAoUdgCc1N7+oAfZ/3L1TAF1O3sAsMJW/tUPsABOzs/+1YE7AOn7FgFgN5j/7P8P/8VZVP9dlYUArqBxAOpjqf+YdFgAkKRT/18dxv8iLw//Y3iG/wXswQD5937/k7seADLmdf9s2dv/o1Gm/0gZqf6beU//HJtZ/gd+EQCTQSEBL+r9ABozEgBpU8f/o8TmAHH4pADi/toAvdHL/6T33v7/I6UABLzzAX+zRwAl7f7/ZLrwAAU5R/5nSEn/9BJR/uXShP/uBrT/C+Wu/+PdwAERMRwAo9fE/gl2BP8z8EcAcYFt/0zw5wC8sX8AfUcsARqv8wBeqRn+G+YdAA+LdwGoqrr/rMVM//xLvACJfMQASBZg/y2X+QHckWQAQMCf/3jv4gCBspIAAMB9AOuK6gC3nZIAU8fA/7isSP9J4YAATQb6/7pBQwBo9s8AvCCK/9oY8gBDilH+7YF5/xTPlgEpxxD/BhSAAJ92BQC1EI//3CYPABdAk/5JGg0AV+Q5Acx8gAArGN8A22PHABZLFP8TG34AnT7XAG4d5gCzp/8BNvy+AN3Mtv6znkH/UZ0DAMLanwCq3wAA4Asg/ybFYgCopCUAF1gHAaS6bgBgJIYA6vLlAPp5EwDy/nD/Ay9eAQnvBv9Rhpn+1v2o/0N84AD1X0oAHB4s/gFt3P+yWVkA/CRMABjGLv9MTW8AhuqI/ydeHQC5SOr/RkSH/+dmB/5N54wApy86AZRhdv8QG+EBps6P/26y1v+0g6IAj43hAQ3aTv9ymSEBYmjMAK9ydQGnzksAysRTATpAQwCKL28BxPeA/4ng4P6ecM8AmmT/AYYlawDGgE//f9Gb/6P+uf48DvMAH9tw/h3ZQQDIDXT+ezzE/+A7uP7yWcQAexBL/pUQzgBF/jAB53Tf/9GgQQHIUGIAJcK4/pQ/IgCL8EH/2ZCE/zgmLf7HeNIAbLGm/6DeBADcfnf+pWug/1Lc+AHxr4gAkI0X/6mKVACgiU7/4nZQ/zQbhP8/YIv/mPonALybDwDoM5b+KA/o//DlCf+Jrxv/S0lhAdrUCwCHBaIBa7nVAAL5a/8o8kYA28gZABmdDQBDUlD/xPkX/5EUlQAySJIAXkyUARj7QQAfwBcAuNTJ/3vpogH3rUgAolfb/n6GWQCfCwz+pmkdAEkb5AFxeLf/QqNtAdSPC/+f56gB/4BaADkOOv5ZNAr//QijAQCR0v8KgVUBLrUbAGeIoP5+vNH/IiNvANfbGP/UC9b+ZQV2AOjFhf/fp23/7VBW/0aLXgCewb8Bmw8z/w++cwBOh8//+QobAbV96QBfrA3+qtWh/yfsiv9fXVf/voBfAH0PzgCmlp8A4w+e/86eeP8qjYAAZbJ4AZxtgwDaDiz+96jO/9RwHABwEeT/WhAlAcXebAD+z1P/CVrz//P0rAAaWHP/zXR6AL/mwQC0ZAsB2SVg/5pOnADr6h//zrKy/5XA+wC2+ocA9hZpAHzBbf8C0pX/qRGqAABgbv91CQgBMnso/8G9YwAi46AAMFBG/tMz7AAtevX+LK4IAK0l6f+eQasAekXX/1pQAv+DamD+43KHAM0xd/6wPkD/UjMR//EU8/+CDQj+gNnz/6IbAf5advEA9sb2/zcQdv/In50AoxEBAIxreQBVoXb/JgCVAJwv7gAJpqYBS2K1/zJKGQBCDy8Ai+GfAEwDjv8O7rgAC881/7fAugGrIK7/v0zdAfeq2wAZrDL+2QnpAMt+RP+3XDAAf6e3AUEx/gAQP38B/hWq/zvgf/4WMD//G06C/ijDHQD6hHD+I8uQAGipqADP/R7/aCgm/l7kWADOEID/1Dd6/98W6gDfxX8A/bW1AZFmdgDsmST/1NlI/xQmGP6KPj4AmIwEAObcY/8BFdT/lMnnAPR7Cf4Aq9IAMzol/wH/Dv/0t5H+APKmABZKhAB52CkAX8Ny/oUYl/+c4uf/9wVN//aUc/7hXFH/3lD2/qp7Wf9Kx40AHRQI/4qIRv9dS1wA3ZMx/jR+4gDlfBcALgm1AM1ANAGD/hwAl57UAINATgDOGasAAOaLAL/9bv5n96cAQCgoASql8f87S+T+fPO9/8Rcsv+CjFb/jVk4AZPGBf/L+J7+kKKNAAus4gCCKhX/AaeP/5AkJP8wWKT+qKrcAGJH1gBb0E8An0zJAaYq1v9F/wD/BoB9/74BjACSU9r/1+5IAXp/NQC9dKX/VAhC/9YD0P/VboUAw6gsAZ7nRQCiQMj+WzpoALY6u/755IgAy4ZM/mPd6QBL/tb+UEWaAECY+P7siMr/nWmZ/pWvFAAWIxP/fHnpALr6xv6E5YsAiVCu/6V9RACQypT+6+/4AIe4dgBlXhH/ekhG/kWCkgB/3vgBRX92/x5S1/68ShP/5afC/nUZQv9B6jj+1RacAJc7Xf4tHBv/un6k/yAG7wB/cmMB2zQC/2Ngpv4+vn7/bN6oAUvirgDm4scAPHXa//z4FAHWvMwAH8KG/ntFwP+prST+N2JbAN8qZv6JAWYAnVoZAO96QP/8BukABzYU/1J0rgCHJTb/D7p9AONwr/9ktOH/Ku30//St4v74EiEAq2OW/0rrMv91UiD+aqjtAM9t0AHkCboAhzyp/rNcjwD0qmj/6y18/0ZjugB1ibcA4B/XACgJZAAaEF8BRNlXAAiXFP8aZDr/sKXLATR2RgAHIP7+9P71/6eQwv99cRf/sHm1AIhU0QCKBh7/WTAcACGbDv8Z8JoAjc1tAUZzPv8UKGv+iprH/17f4v+dqyYAo7EZ/i12A/8O3hcB0b5R/3Z76AEN1WX/ezd7/hv2pQAyY0z/jNYg/2FBQ/8YDBwArlZOAUD3YACgh0MAQjfz/5PMYP8aBiH/YjNTAZnV0P8CuDb/GdoLADFD9v4SlUj/DRlIACpP1gAqBCYBG4uQ/5W7FwASpIQA9VS4/njGaP9+2mAAOHXq/w0d1v5ELwr/p5qE/pgmxgBCsln/yC6r/w1jU//Su/3/qi0qAYrRfADWoo0ADOacAGYkcP4Dk0MANNd7/+mrNv9iiT4A99on/+fa7AD3v38Aw5JUAKWwXP8T1F7/EUrjAFgomQHGkwH/zkP1/vAD2v89jdX/YbdqAMPo6/5fVpoA0TDN/nbR8f/weN8B1R2fAKN/k/8N2l0AVRhE/kYUUP+9BYwBUmH+/2Njv/+EVIX/a9p0/3B6LgBpESAAwqA//0TeJwHY/VwAsWnN/5XJwwAq4Qv/KKJzAAkHUQCl2tsAtBYA/h2S/P+Sz+EBtIdgAB+jcACxC9v/hQzB/itOMgBBcXkBO9kG/25eGAFwrG8ABw9gACRVewBHlhX/0Em8AMALpwHV9SIACeZcAKKOJ//XWhsAYmFZAF5P0wBanfAAX9x+AWaw4gAkHuD+Ix9/AOfocwFVU4IA0kn1/y+Pcv9EQcUAO0g+/7eFrf5deXb/O7FR/+pFrf/NgLEA3PQzABr00QFJ3k3/owhg/paV0wCe/ssBNn+LAKHgOwAEbRb/3iot/9CSZv/sjrsAMs31/wpKWf4wT44A3kyC/x6mPwDsDA3/Mbj0ALtxZgDaZf0AmTm2/iCWKgAZxpIB7fE4AIxEBQBbpKz/TpG6/kM0zQDbz4EBbXMRADaPOgEV+Hj/s/8eAMHsQv8B/wf//cAw/xNF2QED1gD/QGWSAd99I//rSbP/+afiAOGvCgFhojoAanCrAVSsBf+FjLL/hvWOAGFaff+6y7n/300X/8BcagAPxnP/2Zj4AKuyeP/khjUAsDbBAfr7NQDVCmQBIsdqAJcf9P6s4Ff/Du0X//1VGv9/J3T/rGhkAPsORv/U0Ir//dP6ALAxpQAPTHv/Jdqg/1yHEAEKfnL/RgXg//f5jQBEFDwB8dK9/8PZuwGXA3EAl1yuAOc+sv/bt+EAFxch/821UAA5uPj/Q7QB/1p7Xf8nAKL/YPg0/1RCjAAif+T/wooHAaZuvAAVEZsBmr7G/9ZQO/8SB48ASB3iAcfZ+QDooUcBlb7JANmvX/5xk0P/io/H/3/MAQAdtlMBzuab/7rMPAAKfVX/6GAZ//9Z9//V/q8B6MFRABwrnP4MRQgAkxj4ABLGMQCGPCMAdvYS/zFY/v7kFbr/tkFwAdsWAf8WfjT/vTUx/3AZjwAmfzf/4mWj/tCFPf+JRa4BvnaR/zxi2//ZDfX/+ogKAFT+4gDJH30B8DP7/x+Dgv8CijL/19exAd8M7v/8lTj/fFtE/0h+qv53/2QAgofo/w5PsgD6g8UAisbQAHnYi/53EiT/HcF6ABAqLf/V8OsB5r6p/8Yj5P5urUgA1t3x/ziUhwDAdU7+jV3P/49BlQAVEmL/Xyz0AWq/TQD+VQj+1m6w/0mtE/6gxMf/7VqQAMGscf/Im4j+5FrdAIkxSgGk3df/0b0F/2nsN/8qH4EBwf/sAC7ZPACKWLv/4lLs/1FFl/+OvhABDYYIAH96MP9RQJwAq/OLAO0j9gB6j8H+1HqSAF8p/wFXhE0ABNQfABEfTgAnLa3+GI7Z/18JBv/jUwYAYjuC/j4eIQAIc9MBomGA/we4F/50HKj/+IqX/2L08AC6doIAcvjr/2mtyAGgfEf/XiSkAa9Bkv/u8ar+ysbFAORHiv4t9m3/wjSeAIW7sABT/Jr+Wb3d/6pJ/ACUOn0AJEQz/ipFsf+oTFb/JmTM/yY1IwCvE2EA4e79/1FRhwDSG//+60lrAAjPcwBSf4gAVGMV/s8TiABkpGUAUNBN/4TP7f8PAw//IaZuAJxfVf8luW8Blmoj/6aXTAByV4f/n8JAAAx6H//oB2X+rXdiAJpH3P6/OTX/qOig/+AgY//anKUAl5mjANkNlAHFcVkAlRyh/s8XHgBphOP/NuZe/4WtzP9ct53/WJD8/mYhWgCfYQMAtdqb//BydwBq1jX/pb5zAZhb4f9Yaiz/0D1xAJc0fAC/G5z/bjbsAQ4epv8nf88B5cccALzkvP5knesA9tq3AWsWwf/OoF8ATO+TAM+hdQAzpgL/NHUK/kk44/+YweEAhF6I/2W/0QAga+X/xiu0AWTSdgByQ5n/F1ga/1maXAHceIz/kHLP//xz+v8izkgAioV//wiyfAFXS2EAD+Vc/vBDg/92e+P+knho/5HV/wGBu0b/23c2AAETrQAtlpQB+FNIAMvpqQGOazgA9/kmAS3yUP8e6WcAYFJGABfJbwBRJx7/obdO/8LqIf9E44z+2M50AEYb6/9okE8ApOZd/taHnACau/L+vBSD/yRtrgCfcPEABW6VASSl2gCmHRMBsi5JAF0rIP74ve0AZpuNAMldw//xi/3/D29i/2xBo/6bT77/Sa7B/vYoMP9rWAv+ymFV//3MEv9x8kIAbqDC/tASugBRFTwAvGin/3ymYf7ShY4AOPKJ/ilvggBvlzoBb9WN/7es8f8mBsT/uQd7/y4L9gD1aXcBDwKh/wjOLf8Sykr/U3xzAdSNnQBTCNH+iw/o/6w2rf4y94QA1r3VAJC4aQDf/vgA/5Pw/xe8SAAHMzYAvBm0/ty0AP9ToBQAo73z/zrRwv9XSTwAahgxAPX53AAWracAdgvD/xN+7QBunyX/O1IvALS7VgC8lNABZCWF/wdwwQCBvJz/VGqB/4XhygAO7G//KBRlAKysMf4zNkr/+7m4/12b4P+0+eAB5rKSAEg5Nv6yPrgAd81IALnv/f89D9oAxEM4/+ogqwEu2+QA0Gzq/xQ/6P+lNccBheQF/zTNawBK7oz/lpzb/u+ssv/7vd/+II7T/9oPigHxxFAAHCRi/hbqxwA97dz/9jklAI4Rjv+dPhoAK+5f/gPZBv/VGfABJ9yu/5rNMP4TDcD/9CI2/owQmwDwtQX+m8E8AKaABP8kkTj/lvDbAHgzkQBSmSoBjOySAGtc+AG9CgMAP4jyANMnGAATyqEBrRu6/9LM7/4p0aL/tv6f/6x0NADDZ97+zUU7ADUWKQHaMMIAUNLyANK8zwC7oaH+2BEBAIjhcQD6uD8A3x5i/k2oogA7Na8AE8kK/4vgwgCTwZr/1L0M/gHIrv8yhXEBXrNaAK22hwBesXEAK1nX/4j8av97hlP+BfVC/1IxJwHcAuAAYYGxAE07WQA9HZsBy6vc/1xOiwCRIbX/qRiNATeWswCLPFD/2idhAAKTa/88+EgAreYvAQZTtv8QaaL+idRR/7S4hgEn3qT/3Wn7Ae9wfQA/B2EAP2jj/5Q6DABaPOD/VNT8AE/XqAD43ccBc3kBACSseAAgorv/OWsx/5MqFQBqxisBOUpXAH7LUf+Bh8MAjB+xAN2LwgAD3tcAg0TnALFWsv58l7QAuHwmAUajEQD5+7UBKjfjAOKhLAAX7G4AM5WOAV0F7ADat2r+QxhNACj10f/eeZkApTkeAFN9PABGJlIB5Qa8AG3enf83dj//zZe6AOMhlf/+sPYB47HjACJqo/6wK08Aal9OAbnxev+5Dj0AJAHKAA2yov/3C4QAoeZcAUEBuf/UMqUBjZJA/57y2gAVpH0A1Yt6AUNHVwDLnrIBl1wrAJhvBf8nA+//2f/6/7A/R/9K9U0B+q4S/yIx4//2Lvv/miMwAX2dPf9qJE7/YeyZAIi7eP9xhqv/E9XZ/the0f/8BT0AXgPKAAMat/9Avyv/HhcVAIGNTf9meAcBwkyMALyvNP8RUZQA6FY3AeEwrACGKir/7jIvAKkS/gAUk1f/DsPv/0X3FwDu5YD/sTFwAKhi+/95R/gA8wiR/vbjmf/bqbH++4ul/wyjuf+kKKv/mZ8b/vNtW//eGHABEtbnAGudtf7DkwD/wmNo/1mMvv+xQn7+arlCADHaHwD8rp4AvE/mAe4p4ADU6ggBiAu1AKZ1U/9Ew14ALoTJAPCYWACkOUX+oOAq/zvXQ/93w43/JLR5/s8vCP+u0t8AZcVE//9SjQH6iekAYVaFARBQRQCEg58AdF1kAC2NiwCYrJ3/WitbAEeZLgAnEHD/2Yhh/9zGGf6xNTEA3liG/4APPADPwKn/wHTR/2pO0wHI1bf/Bwx6/t7LPP8hbsf++2p1AOThBAF4Ogf/3cFU/nCFGwC9yMn/i4eWAOo3sP89MkEAmGyp/9xVAf9wh+MAohq6AM9guf70iGsAXZkyAcZhlwBuC1b/j3Wu/3PUyAAFyrcA7aQK/rnvPgDseBL+Yntj/6jJwv4u6tYAv4Ux/2OpdwC+uyMBcxUt//mDSABwBnv/1jG1/qbpIgBcxWb+/eTN/wM7yQEqYi4A2yUj/6nDJgBefMEBnCvfAF9Ihf54zr8AesXv/7G7T//+LgIB+qe+AFSBEwDLcab/+R+9/kidyv/QR0n/zxhIAAoQEgHSUUz/WNDA/37za//ujXj/x3nq/4kMO/8k3Hv/lLM8/vAMHQBCAGEBJB4m/3MBXf9gZ+f/xZ47AcCk8ADKyjn/GK4wAFlNmwEqTNcA9JfpABcwUQDvfzT+44Il//h0XQF8hHYArf7AAQbrU/9ur+cB+xy2AIH5Xf5UuIAATLU+AK+AugBkNYj+bR3iAN3pOgEUY0oAABagAIYNFQAJNDf/EVmMAK8iOwBUpXf/4OLq/wdIpv97c/8BEtb2APoHRwHZ3LkA1CNM/yZ9rwC9YdIAcu4s/ym8qf4tupoAUVwWAISgwQB50GL/DVEs/8ucUgBHOhX/0HK//jImkwCa2MMAZRkSADz61//phOv/Z6+OARAOXACNH27+7vEt/5nZ7wFhqC//+VUQARyvPv85/jYA3ud+AKYtdf4SvWD/5EwyAMj0XgDGmHgBRCJF/wxBoP5lE1oAp8V4/0Q2uf8p2rwAcagwAFhpvQEaUiD/uV2kAeTw7f9CtjUAq8Vc/2sJ6QHHeJD/TjEK/22qaf9aBB//HPRx/0o6CwA+3Pb/eZrI/pDSsv9+OYEBK/oO/2VvHAEvVvH/PUaW/zVJBf8eGp4A0RpWAIrtSgCkX7wAjjwd/qJ0+P+7r6AAlxIQANFvQf7Lhif/WGwx/4MaR//dG9f+aGld/x/sH/6HANP/j39uAdRJ5QDpQ6f+wwHQ/4QR3f8z2VoAQ+sy/9/SjwCzNYIB6WrGANmt3P9w5Rj/r5pd/kfL9v8wQoX/A4jm/xfdcf7rb9UAqnhf/vvdAgAtgp7+aV7Z//I0tP7VRC3/aCYcAPSeTAChyGD/zzUN/7tDlACqNvgAd6Ky/1MUCwAqKsABkp+j/7fobwBN5RX/RzWPABtMIgD2iC//2ye2/1zgyQETjg7/Rbbx/6N29QAJbWoBqrX3/04v7v9U0rD/1WuLACcmCwBIFZYASIJFAM1Nm/6OhRUAR2+s/uIqO/+zANcBIYDxAOr8DQG4TwgAbh5J//aNvQCqz9oBSppF/4r2Mf+bIGQAfUpp/1pVPf8j5bH/Pn3B/5lWvAFJeNQA0Xv2/ofRJv+XOiwBXEXW/w4MWP/8mab//c9w/zxOU//jfG4AtGD8/zV1If6k3FL/KQEb/yakpv+kY6n+PZBG/8CmEgBr+kIAxUEyAAGzEv//aAH/K5kj/1BvqABur6gAKWkt/9sOzf+k6Yz+KwF2AOlDwwCyUp//ild6/9TuWv+QI3z+GYykAPvXLP6FRmv/ZeNQ/lypNwDXKjEAcrRV/yHoGwGs1RkAPrB7/iCFGP/hvz4AXUaZALUqaAEWv+D/yMiM//nqJQCVOY0AwzjQ//6CRv8grfD/HdzHAG5kc/+E5fkA5Onf/yXY0f6ysdH/ty2l/uBhcgCJYaj/4d6sAKUNMQHS68z//AQc/kaglwDovjT+U/hd/z7XTQGvr7P/oDJCAHkw0AA/qdH/ANLIAOC7LAFJolIACbCP/xNMwf8dO6cBGCuaABy+vgCNvIEA6OvL/+oAbf82QZ8APFjo/3n9lv786YP/xm4pAVNNR//IFjv+av3y/xUMz//tQr0AWsbKAeGsfwA1FsoAOOaEAAFWtwBtvioA80SuAW3kmgDIsXoBI6C3/7EwVf9a2qn/+JhOAMr+bgAGNCsAjmJB/z+RFgBGal0A6IprAW6zPf/TgdoB8tFcACNa2QG2j2r/dGXZ/3L63f+tzAYAPJajAEmsLP/vblD/7UyZ/qGM+QCV6OUAhR8o/66kdwBxM9YAgeQC/kAi8wBr4/T/rmrI/1SZRgEyIxAA+krY/uy9Qv+Z+Q0A5rIE/90p7gB243n/XleM/v53XABJ7/b+dVeAABPTkf+xLvwA5Vv2AUWA9//KTTYBCAsJ/5lgpgDZ1q3/hsACAQDPAAC9rmsBjIZkAJ7B8wG2ZqsA65ozAI4Fe/88qFkB2Q5c/xPWBQHTp/4ALAbK/ngS7P8Pcbj/uN+LACixd/62e1r/sKWwAPdNwgAb6ngA5wDW/zsnHgB9Y5H/lkREAY3e+ACZe9L/bn+Y/+Uh1gGH3cUAiWECAAyPzP9RKbwAc0+C/14DhACYr7v/fI0K/37As/8LZ8YAlQYtANtVuwHmErL/SLaYAAPGuP+AcOABYaHmAP5jJv86n8UAl0LbADtFj/+5cPkAd4gv/3uChACoR1//cbAoAei5rQDPXXUBRJ1s/2YFk/4xYSEAWUFv/vceo/982d0BZvrYAMauS/45NxIA4wXsAeXVrQDJbdoBMenvAB43ngEZsmoAm2+8AV5+jADXH+4BTfAQANXyGQEmR6gAzbpd/jHTjP/bALT/hnalAKCThv9uuiP/xvMqAPOSdwCG66MBBPGH/8Euwf5ntE//4QS4/vJ2ggCSh7AB6m8eAEVC1f4pYHsAeV4q/7K/w/8ugioAdVQI/+kx1v7uem0ABkdZAezTewD0DTD+d5QOAHIcVv9L7Rn/keUQ/oFkNf+Glnj+qJ0yABdIaP/gMQ4A/3sW/5e5l/+qULgBhrYUAClkZQGZIRAATJpvAVbO6v/AoKT+pXtd/wHYpP5DEa//qQs7/54pPf9JvA7/wwaJ/xaTHf8UZwP/9oLj/3oogADiLxj+IyQgAJi6t/9FyhQAw4XDAN4z9wCpq14BtwCg/0DNEgGcUw//xTr5/vtZbv8yClj+MyvYAGLyxgH1l3EAq+zCAcUfx//lUSYBKTsUAP1o5gCYXQ7/9vKS/tap8P/wZmz+oKfsAJravACW6cr/GxP6AQJHhf+vDD8BkbfGAGh4c/+C+/cAEdSn/z57hP/3ZL0Am9+YAI/FIQCbOyz/ll3wAX8DV/9fR88Bp1UB/7yYdP8KFxcAicNdATZiYQDwAKj/lLx/AIZrlwBM/asAWoTAAJIWNgDgQjb+5rrl/ye2xACU+4L/QYNs/oABoACpMaf+x/6U//sGgwC7/oH/VVI+ALIXOv/+hAUApNUnAIb8kv4lNVH/m4ZSAM2n7v9eLbT/hCihAP5vcAE2S9kAs+bdAetev/8X8zABypHL/yd2Kv91jf0A/gDeACv7MgA2qeoBUETQAJTL8/6RB4cABv4AAPy5fwBiCIH/JiNI/9Mk3AEoGlkAqEDF/gPe7/8CU9f+tJ9pADpzwgC6dGr/5ffb/4F2wQDKrrcBpqFIAMlrk/7tiEoA6eZqAWlvqABA4B4BAeUDAGaXr//C7uT//vrUALvteQBD+2ABxR4LALdfzADNWYoAQN0lAf/fHv+yMNP/8cha/6fRYP85gt0ALnLI/z24QgA3thj+brYhAKu+6P9yXh8AEt0IAC/n/gD/cFMAdg/X/60ZKP7AwR//7hWS/6vBdv9l6jX+g9RwAFnAawEI0BsAtdkP/+eV6ACM7H4AkAnH/wxPtf6Ttsr/E222/zHU4QBKo8sAr+mUABpwMwDBwQn/D4f5AJbjggDMANsBGPLNAO7Qdf8W9HAAGuUiACVQvP8mLc7+8Frh/x0DL/8q4EwAuvOnACCED/8FM30Ai4cYAAbx2wCs5YX/9tYyAOcLz/+/flMBtKOq//U4GAGypNP/AxDKAWI5dv+Ng1n+ITMYAPOVW//9NA4AI6lD/jEeWP+zGyT/pYy3ADq9lwBYHwAAS6lCAEJlx/8Y2McBecQa/w5Py/7w4lH/XhwK/1PB8P/MwYP/Xg9WANoonQAzwdEAAPKxAGa59wCebXQAJodbAN+vlQDcQgH/VjzoABlgJf/heqIB17uo/56dLgA4q6IA6PBlAXoWCQAzCRX/NRnu/9ke6P59qZQADehmAJQJJQClYY0B5IMpAN4P8//+EhEABjztAWoDcQA7hL0AXHAeAGnQ1QAwVLP/u3nn/hvYbf+i3Wv+Se/D//ofOf+Vh1n/uRdzAQOjnf8ScPoAGTm7/6FgpAAvEPMADI37/kPquP8pEqEArwZg/6CsNP4YsLf/xsFVAXx5if+XMnL/3Ms8/8/vBQEAJmv/N+5e/kaYXgDV3E0BeBFF/1Wkvv/L6lEAJjEl/j2QfACJTjH+qPcwAF+k/ABpqYcA/eSGAECmSwBRSRT/z9IKAOpqlv9eIlr//p85/tyFYwCLk7T+GBe5ACk5Hv+9YUwAQbvf/+CsJf8iPl8B55DwAE1qfv5AmFsAHWKbAOL7Nf/q0wX/kMve/6Sw3f4F5xgAs3rNACQBhv99Rpf+YeT8AKyBF/4wWtH/luBSAVSGHgDxxC4AZ3Hq/y5lef4ofPr/hy3y/gn5qP+MbIP/j6OrADKtx/9Y3o7/yF+eAI7Ao/8HdYcAb3wWAOwMQf5EJkH/467+APT1JgDwMtD/oT/6ADzR7wB6IxMADiHm/gKfcQBqFH//5M1gAInSrv601JD/WWKaASJYiwCnonABQW7FAPElqQBCOIP/CslT/oX9u/+xcC3+xPsAAMT6l//u6Nb/ltHNABzwdgBHTFMB7GNbACr6gwFgEkD/dt4jAHHWy/96d7j/QhMkAMxA+QCSWYsAhj6HAWjpZQC8VBoAMfmBANDWS//Pgk3/c6/rAKsCif+vkboBN/WH/5pWtQFkOvb/bcc8/1LMhv/XMeYBjOXA/97B+/9RiA//s5Wi/xcnHf8HX0v+v1HeAPFRWv9rMcn/9NOdAN6Mlf9B2zj+vfZa/7I7nQEw2zQAYiLXABwRu/+vqRgAXE+h/+zIwgGTj+oA5eEHAcWoDgDrMzUB/XiuAMUGqP/KdasAoxXOAHJVWv8PKQr/whNjAEE32P6iknQAMs7U/0CSHf+enoMBZKWC/6wXgf99NQn/D8ESARoxC/+1rskBh8kO/2QTlQDbYk8AKmOP/mAAMP/F+VP+aJVP/+tuiP5SgCz/QSkk/ljTCgC7ebsAYobHAKu8s/7SC+7/QnuC/jTqPQAwcRf+BlZ4/3ey9QBXgckA8o3RAMpyVQCUFqEAZ8MwABkxq/+KQ4IAtkl6/pQYggDT5ZoAIJueAFRpPQCxwgn/pllWATZTuwD5KHX/bQPX/zWSLAE/L7MAwtgD/g5UiACIsQ3/SPO6/3URff/TOtP/XU/fAFpY9f+L0W//Rt4vAAr2T//G2bIA4+ELAU5+s/8+K34AZ5QjAIEIpf718JQAPTOOAFHQhgAPiXP/03fs/5/1+P8Choj/5os6AaCk/gByVY3/Maa2/5BGVAFVtgcALjVdAAmmof83orL/Lbi8AJIcLP6pWjEAeLLxAQ57f/8H8ccBvUIy/8aPZf6984f/jRgY/kthVwB2+5oB7TacAKuSz/+DxPb/iEBxAZfoOQDw2nMAMT0b/0CBSQH8qRv/KIQKAVrJwf/8efABus4pACvGYQCRZLcAzNhQ/qyWQQD55cT+aHtJ/01oYP6CtAgAaHs5ANzK5f9m+dMAVg7o/7ZO0QDv4aQAag0g/3hJEf+GQ+kAU/61ALfscAEwQIP/8djz/0HB4gDO8WT+ZIam/+3KxQA3DVEAIHxm/yjksQB2tR8B56CG/3e7ygAAjjz/gCa9/6bJlgDPeBoBNrisAAzyzP6FQuYAIiYfAbhwUAAgM6X+v/M3ADpJkv6bp83/ZGiY/8X+z/+tE/cA7grKAO+X8gBeOyf/8B1m/wpcmv/lVNv/oYFQANBazAHw267/nmaRATWyTP80bKgBU95rANMkbQB2OjgACB0WAO2gxwCq0Z0AiUcvAI9WIADG8gIA1DCIAVysugDml2kBYL/lAIpQv/7w2IL/YisG/qjEMQD9ElsBkEl5AD2SJwE/aBj/uKVw/n7rYgBQ1WL/ezxX/1KM9QHfeK3/D8aGAc487wDn6lz/Ie4T/6VxjgGwdyYAoCum/u9baQBrPcIBGQREAA+LMwCkhGr/InQu/qhfxQCJ1BcASJw6AIlwRf6WaZr/7MmdABfUmv+IUuP+4jvd/1+VwABRdjT/ISvXAQ6TS/9ZnHn+DhJPAJPQiwGX2j7/nFgIAdK4Yv8Ur3v/ZlPlANxBdAGW+gT/XI7c/yL3Qv/M4bP+l1GXAEco7P+KPz4ABk/w/7e5tQB2MhsAP+PAAHtjOgEy4Jv/EeHf/tzgTf8OLHsBjYCvAPjUyACWO7f/k2EdAJbMtQD9JUcAkVV3AJrIugACgPn/Uxh8AA5XjwCoM/UBfJfn/9DwxQF8vrkAMDr2ABTp6AB9EmL/Df4f//Wxgv9sjiMAq33y/owMIv+loaIAzs1lAPcZIgFkkTkAJ0Y5AHbMy//yAKIApfQeAMZ04gCAb5n/jDa2ATx6D/+bOjkBNjLGAKvTHf9riqf/rWvH/22hwQBZSPL/znNZ//r+jv6xyl7/UVkyAAdpQv8Z/v/+y0AX/0/ebP8n+UsA8XwyAO+YhQDd8WkAk5diANWhef7yMYkA6SX5/iq3GwC4d+b/2SCj/9D75AGJPoP/T0AJ/l4wcQARijL+wf8WAPcSxQFDN2gAEM1f/zAlQgA3nD8BQFJK/8g1R/7vQ30AGuDeAN+JXf8e4Mr/CdyEAMYm6wFmjVYAPCtRAYgcGgDpJAj+z/KUAKSiPwAzLuD/cjBP/wmv4gDeA8H/L6Do//9daf4OKuYAGopSAdAr9AAbJyb/YtB//0CVtv8F+tEAuzwc/jEZ2v+pdM3/dxJ4AJx0k/+ENW3/DQrKAG5TpwCd24n/BgOC/zKnHv88ny//gYCd/l4DvQADpkQAU9/XAJZawgEPqEEA41Mz/82rQv82uzwBmGYt/3ea4QDw94gAZMWy/4tH3//MUhABKc4q/5zA3f/Ye/T/2tq5/7u67//8rKD/wzQWAJCutf67ZHP/006w/xsHwQCT1Wj/WskK/1B7QgEWIboAAQdj/h7OCgDl6gUANR7SAIoI3P5HN6cASOFWAXa+vAD+wWUBq/ms/16et/5dAmz/sF1M/0ljT/9KQIH+9i5BAGPxf/72l2b/LDXQ/jtm6gCar6T/WPIgAG8mAQD/tr7/c7AP/qk8gQB67fEAWkw/AD5KeP96w24AdwSyAN7y0gCCIS7+nCgpAKeScAExo2//ebDrAEzPDv8DGcYBKevVAFUk1gExXG3/yBge/qjswwCRJ3wB7MOVAFokuP9DVar/JiMa/oN8RP/vmyP/NsmkAMQWdf8xD80AGOAdAX5xkAB1FbYAy5+NAN+HTQCw5rD/vuXX/2Mltf8zFYr/Gb1Z/zEwpf6YLfcAqmzeAFDKBQAbRWf+zBaB/7T8Pv7SAVv/km7+/9uiHADf/NUBOwghAM4Q9ACB0zAAa6DQAHA70QBtTdj+IhW5//ZjOP+zixP/uR0y/1RZEwBK+mL/4SrI/8DZzf/SEKcAY4RfASvmOQD+C8v/Y7w//3fB+/5QaTYA6LW9AbdFcP/Qq6X/L220/3tTpQCSojT/mgsE/5fjWv+SiWH+Pekp/14qN/9spOwAmET+AAqMg/8Kak/+856JAEOyQv6xe8b/Dz4iAMVYKv+VX7H/mADG/5X+cf/hWqP/fdn3ABIR4ACAQnj+wBkJ/zLdzQAx1EYA6f+kAALRCQDdNNv+rOD0/144zgHyswL/H1ukAeYuiv+95twAOS89/28LnQCxW5gAHOZiAGFXfgDGWZH/p09rAPlNoAEd6eb/lhVW/jwLwQCXJST+uZbz/+TUUwGsl7QAyambAPQ86gCO6wQBQ9o8AMBxSwF088//QaybAFEenP9QSCH+Eudt/45rFf59GoT/sBA7/5bJOgDOqckA0HniACisDv+WPV7/ODmc/408kf8tbJX/7pGb/9FVH/7ADNIAY2Jd/pgQlwDhudwAjess/6CsFf5HGh//DUBd/hw4xgCxPvgBtgjxAKZllP9OUYX/gd7XAbypgf/oB2EAMXA8/9nl+wB3bIoAJxN7/oMx6wCEVJEAguaU/xlKuwAF9Tb/udvxARLC5P/xymYAaXHKAJvrTwAVCbL/nAHvAMiUPQBz99L/Md2HADq9CAEjLgkAUUEF/zSeuf99dC7/SowN/9JcrP6TF0cA2eD9/nNstP+ROjD+27EY/5z/PAGak/IA/YZXADVL5QAww97/H68y/5zSeP/QI97/EvizAQIKZf+dwvj/nsxl/2j+xf9PPgQAsqxlAWCS+/9BCpwAAoml/3QE5wDy1wEAEyMd/yuhTwA7lfYB+0KwAMghA/9Qbo7/w6ERAeQ4Qv97L5H+hASkAEOurAAZ/XIAV2FXAfrcVABgW8j/JX07ABNBdgChNPH/7awG/7C///8BQYL+377mAGX95/+SI20A+h1NATEAEwB7WpsBFlYg/9rVQQBvXX8APF2p/wh/tgARug7+/Yn2/9UZMP5M7gD/+FxG/2PgiwC4Cf8BB6TQAM2DxgFX1scAgtZfAN2V3gAXJqv+xW7VACtzjP7XsXYAYDRCAXWe7QAOQLb/Lj+u/55fvv/hzbH/KwWO/6xj1P/0u5MAHTOZ/+R0GP4eZc8AE/aW/4bnBQB9huIBTUFiAOyCIf8Fbj4ARWx//wdxFgCRFFP+wqHn/4O1PADZ0bH/5ZTU/gODuAB1sbsBHA4f/7BmUAAyVJf/fR82/xWdhf8Ts4sB4OgaACJ1qv+n/Kv/SY3O/oH6IwBIT+wB3OUU/ynKrf9jTO7/xhbg/2zGw/8kjWAB7J47/2pkVwBu4gIA4+reAJpdd/9KcKT/Q1sC/xWRIf9m1on/r+Zn/qP2pgBd93T+p+Ac/9wCOQGrzlQAe+QR/xt4dwB3C5MBtC/h/2jIuf6lAnIATU7UAC2asf8YxHn+Up22AFoQvgEMk8UAX++Y/wvrRwBWknf/rIbWADyDxACh4YEAH4J4/l/IMwBp59L/OgmU/yuo3f987Y4AxtMy/i71ZwCk+FQAmEbQ/7R1sQBGT7kA80ogAJWczwDFxKEB9TXvAA9d9v6L8DH/xFgk/6ImewCAyJ0Brkxn/62pIv7YAav/cjMRAIjkwgBuljj+avafABO4T/+WTfD/m1CiAAA1qf8dl1YARF4QAFwHbv5idZX/+U3m//0KjADWfFz+I3brAFkwOQEWNaYAuJA9/7P/wgDW+D3+O272AHkVUf6mA+QAakAa/0Xohv/y3DX+LtxVAHGV9/9hs2f/vn8LAIfRtgBfNIEBqpDO/3rIzP+oZJIAPJCV/kY8KAB6NLH/9tNl/67tCAAHM3gAEx+tAH7vnP+PvcsAxIBY/+mF4v8efa3/yWwyAHtkO//+owMB3ZS1/9aIOf7etIn/z1g2/xwh+/9D1jQB0tBkAFGqXgCRKDUA4G/n/iMc9P/ix8P+7hHmANnZpP6pnd0A2i6iAcfPo/9sc6IBDmC7/3Y8TAC4n5gA0edH/iqkuv+6mTP+3au2/6KOrQDrL8EAB4sQAV+kQP8Q3aYA28UQAIQdLP9kRXX/POtY/ihRrQBHvj3/u1idAOcLFwDtdaQA4ajf/5pydP+jmPIBGCCqAH1icf6oE0wAEZ3c/ps0BQATb6H/R1r8/61u8AAKxnn//f/w/0J70gDdwtf+eaMR/+EHYwC+MbYAcwmFAegaiv/VRIQALHd6/7NiMwCVWmoARzLm/wqZdv+xRhkApVfNADeK6gDuHmEAcZvPAGKZfwAia9v+dXKs/0y0//7yObP/3SKs/jiiMf9TA///cd29/7wZ5P4QWFn/RxzG/hYRlf/zef7/a8pj/wnODgHcL5kAa4knAWExwv+VM8X+ujoL/2sr6AHIBg7/tYVB/t3kq/97PucB4+qz/yK91P70u/kAvg1QAYJZAQDfha0ACd7G/0J/SgCn2F3/m6jGAUKRAABEZi4BrFqaANiAS/+gKDMAnhEbAXzwMQDsyrD/l3zA/ybBvgBftj0Ao5N8//+lM/8cKBH+12BOAFaR2v4fJMr/VgkFAG8pyP/tbGEAOT4sAHW4DwEt8XQAmAHc/52lvAD6D4MBPCx9/0Hc+/9LMrgANVqA/+dQwv+IgX8BFRK7/y06of9HkyIArvkL/iONHQDvRLH/c246AO6+sQFX9ab/vjH3/5JTuP+tDif/ktdoAI7feACVyJv/1M+RARC12QCtIFf//yO1AHffoQHI317/Rga6/8BDVf8yqZgAkBp7/zjzs/4URIgAJ4y8/v3QBf/Ic4cBK6zl/5xouwCX+6cANIcXAJeZSACTxWv+lJ4F/+6PzgB+mYn/WJjF/gdEpwD8n6X/7042/xg/N/8m3l4A7bcM/87M0gATJ/b+HkrnAIdsHQGzcwAAdXZ0AYQG/P+RgaEBaUONAFIl4v/u4uT/zNaB/qJ7ZP+5eeoALWznAEIIOP+EiIAArOBC/q+dvADm3+L+8ttFALgOdwFSojgAcnsUAKJnVf8x72P+nIfXAG//p/4nxNYAkCZPAfmofQCbYZz/FzTb/5YWkAAslaX/KH+3AMRN6f92gdL/qofm/9Z3xgDp8CMA/TQH/3VmMP8VzJr/s4ix/xcCAwGVgln//BGfAUY8GgCQaxEAtL48/zi2O/9uRzb/xhKB/5XgV//fFZj/iha2//qczQDsLdD/T5TyAWVG0QBnTq4AZZCs/5iI7QG/wogAcVB9AZgEjQCbljX/xHT1AO9ySf4TUhH/fH3q/yg0vwAq0p7/m4SlALIFKgFAXCj/JFVN/7LkdgCJQmD+c+JCAG7wRf6Xb1AAp67s/+Nsa/+88kH/t1H/ADnOtf8vIrX/1fCeAUdLXwCcKBj/ZtJRAKvH5P+aIikA469LABXvwwCK5V8BTMAxAHV7VwHj4YIAfT4//wLGqwD+JA3+kbrOAJT/9P8jAKYAHpbbAVzk1ABcxjz+PoXI/8kpOwB97m3/tKPuAYx6UgAJFlj/xZ0v/5leOQBYHrYAVKFVALKSfACmpgf/FdDfAJy28gCbebkAU5yu/poQdv+6U+gB3zp5/x0XWAAjfX//qgWV/qQMgv+bxB0AoWCIAAcjHQGiJfsAAy7y/wDZvAA5ruIBzukCADm7iP57vQn/yXV//7okzADnGdgAUE5pABOGgf+Uy0QAjVF9/vilyP/WkIcAlzem/ybrWwAVLpoA3/6W/yOZtP99sB0BK2Ie/9h65v/poAwAObkM/vBxB/8FCRD+GltsAG3GywAIkygAgYbk/3y6KP9yYoT+poQXAGNFLAAJ8u7/uDU7AISBZv80IPP+k9/I/3tTs/6HkMn/jSU4AZc84/9aSZwBy6y7AFCXL/9eief/JL87/+HRtf9K19X+Bnaz/5k2wQEyAOcAaJ1IAYzjmv+24hD+YOFc/3MUqv4G+k4A+Eut/zVZBv8AtHYASK0BAEAIzgGuhd8AuT6F/9YLYgDFH9AAq6f0/xbntQGW2rkA96lhAaWL9/8veJUBZ/gzADxFHP4Zs8QAfAfa/jprUQC46Zz//EokAHa8QwCNXzX/3l6l/i49NQDOO3P/L+z6/0oFIAGBmu7/aiDiAHm7Pf8DpvH+Q6qs/x3Ysv8XyfwA/W7zAMh9OQBtwGD/NHPuACZ58//JOCEAwnaCAEtgGf+qHub+Jz/9ACQt+v/7Ae8AoNRcAS3R7QDzIVf+7VTJ/9QSnf7UY3//2WIQ/ous7wCoyYL/j8Gp/+6XwQHXaCkA7z2l/gID8gAWy7H+scwWAJWB1f4fCyn/AJ95/qAZcv+iUMgAnZcLAJqGTgHYNvwAMGeFAGncxQD9qE3+NbMXABh58AH/LmD/azyH/mLN+f8/+Xf/eDvT/3K0N/5bVe0AldRNAThJMQBWxpYAXdGgAEXNtv/0WisAFCSwAHp03QAzpycB5wE//w3FhgAD0SL/hzvKAKdkTgAv30wAuTw+ALKmewGEDKH/Pa4rAMNFkAB/L78BIixOADnqNAH/Fij/9l6SAFPkgAA8TuD/AGDS/5mv7ACfFUkAtHPE/oPhagD/p4YAnwhw/3hEwv+wxMb/djCo/12pAQBwyGYBShj+ABONBP6OPj8Ag7O7/02cm/93VqQAqtCS/9CFmv+Umzr/onjo/vzVmwDxDSoAXjKDALOqcACMU5f/N3dUAYwj7/+ZLUMB7K8nADaXZ/+eKkH/xO+H/lY1ywCVYS/+2CMR/0YDRgFnJFr/KBqtALgwDQCj29n/UQYB/92qbP7p0F0AZMn5/lYkI//Rmh4B48n7/wK9p/5kOQMADYApAMVkSwCWzOv/ka47AHj4lf9VN+EActI1/sfMdwAO90oBP/uBAENolwGHglAAT1k3/3Xmnf8ZYI8A1ZEFAEXxeAGV81//cioUAINIAgCaNRT/ST5tAMRmmAApDMz/eiYLAfoKkQDPfZQA9vTe/ykgVQFw1X4AovlWAUfGf/9RCRUBYicE/8xHLQFLb4kA6jvnACAwX//MH3IBHcS1/zPxp/5dbY4AaJAtAOsMtf80cKQATP7K/64OogA965P/K0C5/ul92QDzWKf+SjEIAJzMQgB81nsAJt12AZJw7AByYrEAl1nHAFfFcAC5laEALGClAPizFP+829j+KD4NAPOOjQDl487/rMoj/3Ww4f9SbiYBKvUO/xRTYQAxqwoA8nd4ABnoPQDU8JP/BHM4/5ER7/7KEfv/+RL1/2N17wC4BLP/9u0z/yXvif+mcKb/Ubwh/7n6jv82u60A0HDJAPYr5AFouFj/1DTE/zN1bP/+dZsALlsP/1cOkP9X48wAUxpTAZ9M4wCfG9UBGJdsAHWQs/6J0VIAJp8KAHOFyQDftpwBbsRd/zk86QAFp2n/msWkAGAiuv+ThSUB3GO+AAGnVP8UkasAwsX7/l9Ohf/8+PP/4V2D/7uGxP/YmaoAFHae/owBdgBWng8BLdMp/5MBZP5xdEz/039sAWcPMADBEGYBRTNf/2uAnQCJq+kAWnyQAWqhtgCvTOwByI2s/6M6aADptDT/8P0O/6Jx/v8m74r+NC6mAPFlIf6DupwAb9A+/3xeoP8frP4AcK44/7xjG/9DivsAfTqAAZyYrv+yDPf//FSeAFLFDv6syFP/JScuAWrPpwAYvSIAg7KQAM7VBACh4tIASDNp/2Etu/9OuN//sB37AE+gVv90JbIAUk3VAVJUjf/iZdQBr1jH//Ve9wGsdm3/prm+AIO1eABX/l3/hvBJ/yD1j/+Lomf/s2IS/tnMcACT33j/NQrzAKaMlgB9UMj/Dm3b/1vaAf/8/C/+bZx0/3MxfwHMV9P/lMrZ/xpV+f8O9YYBTFmp//It5gA7Yqz/ckmE/k6bMf+eflQAMa8r/xC2VP+dZyMAaMFt/0PdmgDJrAH+CKJYAKUBHf99m+X/HprcAWfvXADcAW3/ysYBAF4CjgEkNiwA6+Ke/6r71v+5TQkAYUryANujlf/wI3b/33JY/sDHAwBqJRj/yaF2/2FZYwHgOmf/ZceT/t48YwDqGTsBNIcbAGYDW/6o2OsA5eiIAGg8gQAuqO4AJ79DAEujLwCPYWL/ONioAajp/P8jbxb/XFQrABrIVwFb/ZgAyjhGAI4ITQBQCq8B/MdMABZuUv+BAcIAC4A9AVcOkf/93r4BD0iuAFWjVv46Yyz/LRi8/hrNDwAT5dL++EPDAGNHuACaxyX/l/N5/yYzS//JVYL+LEH6ADmT8/6SKzv/WRw1ACFUGP+zMxL+vUZTAAucswFihncAnm9vAHeaSf/IP4z+LQ0N/5rAAv5RSCoALqC5/ixwBgCS15UBGrBoAEQcVwHsMpn/s4D6/s7Bv/+mXIn+NSjvANIBzP6orSMAjfMtASQybf8P8sL/4596/7Cvyv5GOUgAKN84ANCiOv+3Yl0AD28MAB4ITP+Ef/b/LfJnAEW1D/8K0R4AA7N5APHo2gF7x1j/AtLKAbyCUf9eZdABZyQtAEzBGAFfGvH/paK7ACRyjADKQgX/JTiTAJgL8wF/Vej/+ofUAbmxcQBa3Ev/RfiSADJvMgBcFlAA9CRz/qNkUv8ZwQYBfz0kAP1DHv5B7Kr/oRHX/j+vjAA3fwQAT3DpAG2gKACPUwf/QRru/9mpjP9OXr3/AJO+/5NHuv5qTX//6Z3pAYdX7f/QDewBm20k/7Rk2gC0oxIAvm4JARE/e/+ziLT/pXt7/5C8Uf5H8Gz/GXAL/+PaM/+nMur/ck9s/x8Tc/+38GMA41eP/0jZ+P9mqV8BgZWVAO6FDAHjzCMA0HMaAWYI6gBwWI8BkPkOAPCerP5kcHcAwo2Z/ig4U/95sC4AKjVM/56/mgBb0VwArQ0QAQVI4v/M/pUAULjPAGQJev52Zav//MsA/qDPNgA4SPkBOIwN/wpAa/5bZTT/4bX4AYv/hADmkREA6TgXAHcB8f/VqZf/Y2MJ/rkPv/+tZ20Brg37/7JYB/4bO0T/CiEC//hhOwAaHpIBsJMKAF95zwG8WBgAuV7+/nM3yQAYMkYAeDUGAI5CkgDk4vn/aMDeAa1E2wCiuCT/j2aJ/50LFwB9LWIA613h/jhwoP9GdPMBmfk3/4EnEQHxUPQAV0UVAV7kSf9OQkH/wuPnAD2SV/+tmxf/cHTb/tgmC/+DuoUAXtS7AGQvWwDM/q//3hLX/q1EbP/j5E//Jt3VAKPjlv4fvhIAoLMLAQpaXv/crlgAo9Pl/8eINACCX93/jLzn/otxgP91q+z+MdwU/zsUq//kbbwAFOEg/sMQrgDj/ogBhydpAJZNzv/S7uIAN9SE/u85fACqwl3/+RD3/xiXPv8KlwoAT4uy/3jyygAa29UAPn0j/5ACbP/mIVP/US3YAeA+EQDW2X0AYpmZ/7Owav6DXYr/bT4k/7J5IP94/EYA3PglAMxYZwGA3Pv/7OMHAWoxxv88OGsAY3LuANzMXgFJuwEAWZoiAE7Zpf8Ow/n/Ceb9/82H9QAa/Af/VM0bAYYCcAAlniAA51vt/7+qzP+YB94AbcAxAMGmkv/oE7X/aY40/2cQGwH9yKUAw9kE/zS9kP97m6D+V4I2/054Pf8OOCkAGSl9/1eo9QDWpUYA1KkG/9vTwv5IXaT/xSFn/yuOjQCD4awA9GkcAERE4QCIVA3/gjko/otNOABUljUANl+dAJANsf5fc7oAdRd2//Sm8f8LuocAsmrL/2HaXQAr/S0ApJgEAIt27wBgARj+65nT/6huFP8y77AAcinoAMH6NQD+oG/+iHop/2FsQwDXmBf/jNHUACq9owDKKjL/amq9/75E2f/pOnUA5dzzAcUDBAAleDb+BJyG/yQ9q/6liGT/1OgOAFquCgDYxkH/DANAAHRxc//4ZwgA530S/6AcxQAeuCMB30n5/3sULv6HOCX/rQ3lAXehIv/1PUkAzX1wAIlohgDZ9h7/7Y6PAEGfZv9spL4A23Wt/yIleP7IRVAAH3za/koboP+6msf/R8f8AGhRnwERyCcA0z3AARruWwCU2QwAO1vV/wtRt/+B5nr/csuRAXe0Qv9IirQA4JVqAHdSaP/QjCsAYgm2/81lhv8SZSYAX8Wm/8vxkwA+0JH/hfb7AAKpDgAN97gAjgf+ACTIF/9Yzd8AW4E0/xW6HgCP5NIB9+r4/+ZFH/6wuof/7s00AYtPKwARsNn+IPNDAPJv6QAsIwn/43JRAQRHDP8mab8AB3Uy/1FPEAA/REH/nSRu/03xA//iLfsBjhnOAHh70QEc/u7/BYB+/1ve1/+iD78AVvBJAIe5Uf4s8aMA1NvS/3CimwDPZXYAqEg4/8QFNABIrPL/fhad/5JgO/+ieZj+jBBfAMP+yP5SlqIAdyuR/sysTv+m4J8AaBPt//V+0P/iO9UAddnFAJhI7QDcHxf+Dlrn/7zUQAE8Zfb/VRhWAAGxbQCSUyABS7bAAHfx4AC57Rv/uGVSAeslTf/9hhMA6PZ6ADxqswDDCwwAbULrAX1xOwA9KKQAr2jwAAIvu/8yDI0Awou1/4f6aABhXN7/2ZXJ/8vxdv9Pl0MAeo7a/5X17wCKKsj+UCVh/3xwp/8kilf/gh2T//FXTv/MYRMBsdEW//fjf/5jd1P/1BnGARCzswCRTaz+WZkO/9q9pwBr6Tv/IyHz/ixwcP+hf08BzK8KACgViv5odOQAx1+J/4W+qP+SpeoBt2MnALfcNv7/3oUAott5/j/vBgDhZjb/+xL2AAQigQGHJIMAzjI7AQ9htwCr2If/ZZgr/5b7WwAmkV8AIswm/rKMU/8ZgfP/TJAlAGokGv52kKz/RLrl/2uh1f8uo0T/lar9ALsRDwDaoKX/qyP2AWANEwCly3UA1mvA//R7sQFkA2gAsvJh//tMgv/TTSoB+k9G/z/0UAFpZfYAPYg6Ae5b1QAOO2L/p1RNABGELv45r8X/uT64AExAzwCsr9D+r0olAIob0/6UfcIACllRAKjLZf8r1dEB6/U2AB4j4v8JfkYA4n1e/px1FP85+HAB5jBA/6RcpgHg1ub/JHiPADcIK//7AfUBamKlAEprav41BDb/WrKWAQN4e//0BVkBcvo9//6ZUgFNDxEAOe5aAV/f5gDsNC/+Z5Sk/3nPJAESELn/SxRKALsLZQAuMIH/Fu/S/03sgf9vTcz/PUhh/8fZ+/8q18wAhZHJ/znmkgHrZMYAkkkj/mzGFP+2T9L/UmeIAPZssAAiETz/E0py/qiqTv+d7xT/lSmoADp5HABPs4b/53mH/67RYv/zer4Aq6bNANR0MAAdbEL/ot62AQ53FQDVJ/n//t/k/7elxgCFvjAAfNBt/3evVf8J0XkBMKu9/8NHhgGI2zP/tluN/jGfSAAjdvX/cLrj/zuJHwCJLKMAcmc8/gjVlgCiCnH/wmhIANyDdP+yT1wAy/rV/l3Bvf+C/yL+1LyXAIgRFP8UZVP/1M6mAOXuSf+XSgP/qFfXAJu8hf+mgUkA8E+F/7LTUf/LSKP+wailAA6kx/4e/8wAQUhbAaZKZv/IKgD/wnHj/0IX0ADl2GT/GO8aAArpPv97CrIBGiSu/3fbxwEto74AEKgqAKY5xv8cGhoAfqXnAPtsZP895Xn/OnaKAEzPEQANInD+WRCoACXQaf8jydf/KGpl/gbvcgAoZ+L+9n9u/z+nOgCE8I4ABZ5Y/4FJnv9eWZIA5jaSAAgtrQBPqQEAc7r3AFRAgwBD4P3/z71AAJocUQEtuDb/V9Tg/wBgSf+BIesBNEJQ//uum/8EsyUA6qRd/l2v/QDGRVf/4GouAGMd0gA+vHL/LOoIAKmv9/8XbYn/5bYnAMClXv71ZdkAv1hgAMReY/9q7gv+NX7zAF4BZf8ukwIAyXx8/40M2gANpp0BMPvt/5v6fP9qlJL/tg3KABw9pwDZmAj+3IIt/8jm/wE3QVf/Xb9h/nL7DgAgaVwBGs+NABjPDf4VMjD/upR0/9Mr4QAlIqL+pNIq/0QXYP+21gj/9XWJ/0LDMgBLDFP+UIykAAmlJAHkbuMA8RFaARk01AAG3wz/i/M5AAxxSwH2t7//1b9F/+YPjgABw8T/iqsv/0A/agEQqdb/z644AVhJhf+2hYwAsQ4Z/5O4Nf8K46H/eNj0/0lN6QCd7osBO0HpAEb72AEpuJn/IMtwAJKT/QBXZW0BLFKF//SWNf9emOj/O10n/1iT3P9OUQ0BIC/8/6ATcv9dayf/dhDTAbl30f/j23/+WGns/6JuF/8kpm7/W+zd/0LqdABvE/T+CukaACC3Bv4Cv/IA2pw1/ik8Rv+o7G8Aebl+/+6Oz/83fjQA3IHQ/lDMpP9DF5D+2ihs/3/KpADLIQP/Ap4AACVgvP/AMUoAbQQAAG+nCv5b2of/y0Kt/5bC4gDJ/Qb/rmZ5AM2/bgA1wgQAUSgt/iNmj/8MbMb/EBvo//xHugGwbnIAjgN1AXFNjgATnMUBXC/8ADXoFgE2EusALiO9/+zUgQACYND+yO7H/zuvpP+SK+cAwtk0/wPfDACKNrL+VevPAOjPIgAxNDL/pnFZ/wot2P8+rRwAb6X2AHZzW/+AVDwAp5DLAFcN8wAWHuQBsXGS/4Gq5v78mYH/keErAEbnBf96aX7+VvaU/24lmv7RA1sARJE+AOQQpf833fn+stJbAFOS4v5FkroAXdJo/hAZrQDnuiYAvXqM//sNcP9pbl0A+0iqAMAX3/8YA8oB4V3kAJmTx/5tqhYA+GX2/7J8DP+y/mb+NwRBAH3WtAC3YJMALXUX/oS/+QCPsMv+iLc2/5LqsQCSZVb/LHuPASHRmADAWin+Uw99/9WsUgDXqZAAEA0iACDRZP9UEvkBxRHs/9m65gAxoLD/b3Zh/+1o6wBPO1z+RfkL/yOsSgETdkQA3nyl/7RCI/9WrvYAK0pv/36QVv/k6lsA8tUY/kUs6//ctCMACPgH/2YvXP/wzWb/cearAR+5yf/C9kb/ehG7AIZGx/+VA5b/dT9nAEFoe//UNhMBBo1YAFOG8/+INWcAqRu0ALExGABvNqcAwz3X/x8BbAE8KkYAuQOi/8KVKP/2fyb+vncm/z13CAFgodv/KsvdAbHypP/1nwoAdMQAAAVdzf6Af7MAfe32/5Wi2f9XJRT+jO7AAAkJwQBhAeIAHSYKAACIP//lSNL+JoZc/07a0AFoJFT/DAXB//KvPf+/qS4Bs5OT/3G+i/59rB8AA0v8/tckDwDBGxgB/0WV/26BdgDLXfkAiolA/iZGBgCZdN4AoUp7AMFjT/92O17/PQwrAZKxnQAuk78AEP8mAAszHwE8OmL/b8JNAZpb9ACMKJABrQr7AMvRMv5sgk4A5LRaAK4H+gAfrjwAKaseAHRjUv92wYv/u63G/tpvOAC5e9gA+Z40ADS0Xf/JCVv/OC2m/oSby/866G4ANNNZ//0AogEJV7cAkYgsAV569QBVvKsBk1zGAAAIaAAeX64A3eY0Aff36/+JrjX/IxXM/0fj1gHoUsIACzDj/6pJuP/G+/z+LHAiAINlg/9IqLsAhId9/4poYf/uuKj/82hU/4fY4v+LkO0AvImWAVA4jP9Wqaf/wk4Z/9wRtP8RDcEAdYnU/43glwAx9K8AwWOv/xNjmgH/QT7/nNI3//L0A//6DpUAnljZ/53Phv776BwALpz7/6s4uP/vM+oAjoqD/xn+8wEKycIAP2FLANLvogDAyB8BddbzABhH3v42KOj/TLdv/pAOV//WT4j/2MTUAIQbjP6DBf0AfGwT/xzXSwBM3jf+6bY/AESrv/40b97/CmlN/1Cq6wCPGFj/Led5AJSB4AE99lQA/S7b/+9MIQAxlBL+5iVFAEOGFv6Om14AH53T/tUqHv8E5Pf+/LAN/ycAH/7x9P//qi0K/v3e+QDecoQA/y8G/7SjswFUXpf/WdFS/uU0qf/V7AAB1jjk/4d3l/9wycEAU6A1/gaXQgASohEA6WFbAIMFTgG1eDX/dV8//+11uQC/foj/kHfpALc5YQEvybv/p6V3AS1kfgAVYgb+kZZf/3g2mADRYmgAj28e/riU+QDr2C4A+MqU/zlfFgDy4aMA6ffo/0erE/9n9DH/VGdd/0R59AFS4A0AKU8r//nOp//XNBX+wCAW//dvPABlSib/FltU/h0cDf/G59f+9JrIAN+J7QDThA4AX0DO/xE+9//pg3kBXRdNAM3MNP5RvYgAtNuKAY8SXgDMK4z+vK/bAG9ij/+XP6L/0zJH/hOSNQCSLVP+slLu/xCFVP/ixl3/yWEU/3h2I/9yMuf/ouWc/9MaDAByJ3P/ztSGAMXZoP90gV7+x9fb/0vf+QH9dLX/6Ndo/+SC9v+5dVYADgUIAO8dPQHtV4X/fZKJ/syo3wAuqPUAmmkWANzUof9rRRj/idq1//FUxv+CetP/jQiZ/76xdgBgWbIA/xAw/npgaf91Nuj/In5p/8xDpgDoNIr/05MMABk2BwAsD9f+M+wtAL5EgQFqk+EAHF0t/uyND/8RPaEA3HPAAOyRGP5vqKkA4Do//3+kvABS6ksB4J6GANFEbgHZptkARuGmAbvBj/8QB1j/Cs2MAHXAnAEROCYAG3xsAavXN/9f/dQAm4eo//aymf6aREoA6D1g/mmEOwAhTMcBvbCC/wloGf5Lxmb/6QFwAGzcFP9y5kYAjMKF/zmepP6SBlD/qcRhAVW3ggBGnt4BO+3q/2AZGv/or2H/C3n4/lgjwgDbtPz+SgjjAMPjSQG4bqH/MemkAYA1LwBSDnn/wb46ADCudf+EFyAAKAqGARYzGf/wC7D/bjmSAHWP7wGdZXb/NlRMAM24Ev8vBEj/TnBV/8EyQgFdEDT/CGmGAAxtSP86nPsAkCPMACygdf4ya8IAAUSl/29uogCeUyj+TNbqADrYzf+rYJP/KONyAbDj8QBG+bcBiFSL/zx69/6PCXX/sa6J/kn3jwDsuX7/Phn3/y1AOP+h9AYAIjk4AWnKUwCAk9AABmcK/0qKQf9hUGT/1q4h/zKGSv9ul4L+b1SsAFTHS/74O3D/CNiyAQm3XwDuGwj+qs3cAMPlhwBiTO3/4lsaAVLbJ//hvscB2ch5/1GzCP+MQc4Ass9X/vr8Lv9oWW4B/b2e/5DWnv+g9Tb/NbdcARXIwv+SIXEB0QH/AOtqK/+nNOgAneXdADMeGQD63RsBQZNX/097xABBxN//TCwRAVXxRADKt/n/QdTU/wkhmgFHO1AAr8I7/41ICQBkoPQA5tA4ADsZS/5QwsIAEgPI/qCfcwCEj/cBb105/zrtCwGG3of/eqNsAXsrvv/7vc7+ULZI/9D24AERPAkAoc8mAI1tWwDYD9P/iE5uAGKjaP8VUHn/rbK3AX+PBABoPFL+1hAN/2DuIQGelOb/f4E+/zP/0v8+jez+nTfg/3In9ADAvPr/5Ew1AGJUUf+tyz3+kzI3/8zrvwA0xfQAWCvT/hu/dwC855oAQlGhAFzBoAH643gAezfiALgRSACFqAr+Foec/ykZZ/8wyjoAupVR/7yG7wDrtb3+2Yu8/0owUgAu2uUAvf37ADLlDP/Tjb8BgPQZ/6nnev5WL73/hLcX/yWylv8zif0AyE4fABZpMgCCPAAAhKNb/hfnuwDAT+8AnWak/8BSFAEYtWf/8AnqAAF7pP+F6QD/yvLyADy69QDxEMf/4HSe/r99W//gVs8AeSXn/+MJxv8Pme//eejZ/ktwUgBfDDn+M9Zp/5TcYQHHYiQAnNEM/grUNADZtDf+1Kro/9gUVP+d+ocAnWN//gHOKQCVJEYBNsTJ/1d0AP7rq5YAG6PqAMqHtADQXwD+e5xdALc+SwCJ67YAzOH//9aL0v8Ccwj/HQxvADScAQD9Ffv/JaUf/gyC0wBqEjX+KmOaAA7ZPf7YC1z/yMVw/pMmxwAk/Hj+a6lNAAF7n//PS2YAo6/EACwB8AB4urD+DWJM/+188f/okrz/yGDgAMwfKQDQyA0AFeFg/6+cxAD30H4APrj0/gKrUQBVc54ANkAt/xOKcgCHR80A4y+TAdrnQgD90RwA9A+t/wYPdv4QltD/uRYy/1Zwz/9LcdcBP5Ir/wThE/7jFz7/Dv/W/i0Izf9XxZf+0lLX//X49/+A+EYA4fdXAFp4RgDV9VwADYXiAC+1BQFco2n/Bh6F/uiyPf/mlRj/EjGeAORkPf508/v/TUtcAVHbk/9Mo/7+jdX2AOglmP5hLGQAySUyAdT0OQCuq7f/+UpwAKacHgDe3WH/811J/vtlZP/Y2V3//oq7/46+NP87y7H/yF40AHNynv+lmGgBfmPi/3ad9AFryBAAwVrlAHkGWACcIF3+ffHT/w7tnf+lmhX/uOAW//oYmP9xTR8A96sX/+2xzP80iZH/wrZyAODqlQAKb2cByYEEAO6OTgA0Bij/btWl/jzP/QA+10UAYGEA/zEtygB4eRb/64swAcYtIv+2MhsBg9Jb/y42gACve2n/xo1O/kP07//1Nmf+Tiby/wJc+f77rlf/iz+QABhsG/8iZhIBIhaYAELldv4yj2MAkKmVAXYemACyCHkBCJ8SAFpl5v+BHXcARCQLAei3NwAX/2D/oSnB/z+L3gAPs/MA/2QP/1I1hwCJOZUBY/Cq/xbm5P4xtFL/PVIrAG712QDHfT0ALv00AI3F2wDTn8EAN3lp/rcUgQCpd6r/y7KL/4cotv+sDcr/QbKUAAjPKwB6NX8BSqEwAOPWgP5WC/P/ZFYHAfVEhv89KxUBmFRe/748+v7vduj/1oglAXFMa/9daGQBkM4X/26WmgHkZ7kA2jEy/odNi/+5AU4AAKGU/2Ed6f/PlJX/oKgAAFuAq/8GHBP+C2/3ACe7lv+K6JUAdT5E/z/YvP/r6iD+HTmg/xkM8QGpPL8AIION/+2fe/9exV7+dP4D/1yzYf55YVz/qnAOABWV+AD44wMAUGBtAEvASgEMWuL/oWpEAdByf/9yKv/+ShpK//ezlv55jDwAk0bI/9Yoof+hvMn/jUGH//Jz/AA+L8oAtJX//oI37QClEbr/CqnCAJxt2v9wjHv/aIDf/rGObP95Jdv/gE0S/29sFwFbwEsArvUW/wTsPv8rQJkB463+AO16hAF/Wbr/jlKA/vxUrgBas7EB89ZX/2c8ov/Qgg7/C4KLAM6B2/9e2Z3/7+bm/3Rzn/6ka18AM9oCAdh9xv+MyoD+C19E/zcJXf6umQb/zKxgAEWgbgDVJjH+G1DVAHZ9cgBGRkP/D45J/4N6uf/zFDL+gu0oANKfjAHFl0H/VJlCAMN+WgAQ7uwBdrtm/wMYhf+7ReYAOMVcAdVFXv9QiuUBzgfmAN5v5gFb6Xf/CVkHAQJiAQCUSoX/M/a0/+SxcAE6vWz/wsvt/hXRwwCTCiMBVp3iAB+ji/44B0v/Plp0ALU8qQCKotT+UacfAM1acP8hcOMAU5d1AbHgSf+ukNn/5sxP/xZN6P9yTuoA4Dl+/gkxjQDyk6UBaLaM/6eEDAF7RH8A4VcnAftsCADGwY8BeYfP/6wWRgAyRHT/Za8o//hp6QCmywcAbsXaANf+Gv6o4v0AH49gAAtnKQC3gcv+ZPdK/9V+hADSkywAx+obAZQvtQCbW54BNmmv/wJOkf5mml8AgM9//jR87P+CVEcA3fPTAJiqzwDeascAt1Re/lzIOP+KtnMBjmCSAIWI5ABhEpYAN/tCAIxmBADKZ5cAHhP4/zO4zwDKxlkAN8Xh/qlf+f9CQUT/vOp+AKbfZAFw7/QAkBfCADontgD0LBj+r0Sz/5h2mgGwooIA2XLM/q1+Tv8h3h7/JAJb/wKP8wAJ69cAA6uXARjX9f+oL6T+8ZLPAEWBtABE83EAkDVI/vstDgAXbqgARERP/25GX/6uW5D/Ic5f/4kpB/8Tu5n+I/9w/wmRuf4ynSUAC3AxAWYIvv/q86kBPFUXAEonvQB0Me8ArdXSAC6hbP+fliUAxHi5/yJiBv+Zwz7/YeZH/2Y9TAAa1Oz/pGEQAMY7kgCjF8QAOBg9ALViwQD7k+X/Yr0Y/y42zv/qUvYAt2cmAW0+zAAK8OAAkhZ1/46aeABF1CMA0GN2AXn/A/9IBsIAdRHF/30PFwCaT5kA1l7F/7k3k/8+/k7+f1KZAG5mP/9sUqH/abvUAVCKJwA8/13/SAy6ANL7HwG+p5D/5CwT/oBD6ADW+Wv+iJFW/4QusAC9u+P/0BaMANnTdAAyUbr+i/ofAB5AxgGHm2QAoM4X/rui0/8QvD8A/tAxAFVUvwDxwPL/mX6RAeqiov/mYdgBQId+AL6U3wE0ACv/HCe9AUCI7gCvxLkAYuLV/3+f9AHirzwAoOmOAbTzz/9FmFkBH2UVAJAZpP6Lv9EAWxl5ACCTBQAnunv/P3Pm/12nxv+P1dz/s5wT/xlCegDWoNn/Ai0+/2pPkv4ziWP/V2Tn/6+R6P9luAH/rgl9AFIloQEkco3/MN6O//W6mgAFrt3+P3Kb/4c3oAFQH4cAfvqzAezaLQAUHJEBEJNJAPm9hAERvcD/347G/0gUD//6Ne3+DwsSABvTcf7Vazj/rpOS/2B+MAAXwW0BJaJeAMed+f4YgLv/zTGy/l2kKv8rd+sBWLft/9rSAf9r/ioA5gpj/6IA4gDb7VsAgbLLANAyX/7O0F//979Z/m7qT/+lPfMAFHpw//b2uf5nBHsA6WPmAdtb/P/H3hb/s/Xp/9Px6gBv+sD/VVSIAGU6Mv+DrZz+dy0z/3bpEP7yWtYAXp/bAQMD6v9iTFz+UDbmAAXk5/41GN//cTh2ARSEAf+r0uwAOPGe/7pzE/8I5a4AMCwAAXJypv8GSeL/zVn0AInjSwH4rTgASnj2/ncDC/9ReMb/iHpi/5Lx3QFtwk7/3/FGAdbIqf9hvi//L2eu/2NcSP526bT/wSPp/hrlIP/e/MYAzCtH/8dUrACGZr4Ab+5h/uYo5gDjzUD+yAzhAKYZ3gBxRTP/j58YAKe4SgAd4HT+ntDpAMF0fv/UC4X/FjqMAcwkM//oHisA60a1/0A4kv6pElT/4gEN/8gysP801fX+qNFhAL9HNwAiTpwA6JA6AblKvQC6jpX+QEV//6HLk/+wl78AiOfL/qO2iQChfvv+6SBCAETPQgAeHCUAXXJgAf5c9/8sq0UAyncL/7x2MgH/U4j/R1IaAEbjAgAg63kBtSmaAEeG5f7K/yQAKZgFAJo/Sf8itnwAed2W/xrM1QEprFcAWp2S/22CFABHa8j/82a9AAHDkf4uWHUACM7jAL9u/f9tgBT+hlUz/4mxcAHYIhb/gxDQ/3mVqgByExcBplAf/3HwegDos/oARG60/tKqdwDfbKT/z0/p/xvl4v7RYlH/T0QHAIO5ZACqHaL/EaJr/zkVCwFkyLX/f0GmAaWGzABop6gAAaRPAJKHOwFGMoD/ZncN/uMGhwCijrP/oGTeABvg2wGeXcP/6o2JABAYff/uzi//YRFi/3RuDP9gc00AW+Po//j+T/9c5Qb+WMaLAM5LgQD6Tc7/jfR7AYpF3AAglwYBg6cW/+1Ep/7HvZYAo6uK/zO8Bv9fHYn+lOKzALVr0P+GH1L/l2Ut/4HK4QDgSJMAMIqX/8NAzv7t2p4Aah2J/v296f9nDxH/wmH/ALItqf7G4ZsAJzB1/4dqcwBhJrUAli9B/1OC5f72JoEAXO+a/ltjfwChbyH/7tny/4O5w//Vv57/KZbaAISpgwBZVPwBq0aA/6P4y/4BMrT/fExVAftvUABjQu//mu22/91+hf5KzGP/QZN3/2M4p/9P+JX/dJvk/+0rDv5FiQv/FvrxAVt6j//N+fMA1Bo8/zC2sAEwF7//y3mY/i1K1f8+WhL+9aPm/7lqdP9TI58ADCEC/1AiPgAQV67/rWVVAMokUf6gRcz/QOG7ADrOXgBWkC8A5Vb1AD+RvgElBScAbfsaAImT6gCieZH/kHTO/8Xouf+3voz/SQz+/4sU8v+qWu//YUK7//W1h/7eiDQA9QUz/ssvTgCYZdgASRd9AP5gIQHr0kn/K9FYAQeBbQB6aOT+qvLLAPLMh//KHOn/QQZ/AJ+QRwBkjF8ATpYNAPtrdgG2On3/ASZs/4290f8Im30BcaNb/3lPvv+G72z/TC/4AKPk7wARbwoAWJVL/9fr7wCnnxj/L5ds/2vRvADp52P+HMqU/64jiv9uGET/AkW1AGtmUgBm7QcAXCTt/92iUwE3ygb/h+qH/xj63gBBXqj+9fjS/6dsyf7/oW8AzQj+AIgNdABksIT/K9d+/7GFgv+eT5QAQ+AlAQzOFf8+Im4B7Wiv/1CEb/+OrkgAVOW0/mmzjABA+A//6YoQAPVDe/7aedT/P1/aAdWFif+PtlL/MBwLAPRyjQHRr0z/nbWW/7rlA/+knW8B572LAHfKvv/aakD/ROs//mAarP+7LwsB1xL7/1FUWQBEOoAAXnEFAVyB0P9hD1P+CRy8AO8JpAA8zZgAwKNi/7gSPADZtosAbTt4/wTA+wCp0vD/Jaxc/pTT9f+zQTQA/Q1zALmuzgFyvJX/7VqtACvHwP9YbHEANCNMAEIZlP/dBAf/l/Fy/77R6ABiMscAl5bV/xJKJAE1KAcAE4dB/xqsRQCu7VUAY18pAAM4EAAnoLH/yGra/rlEVP9buj3+Q4+N/w30pv9jcsYAx26j/8ESugB87/YBbkQWAALrLgHUPGsAaSppAQ7mmAAHBYMAjWia/9UDBgCD5KL/s2QcAed7Vf/ODt8B/WDmACaYlQFiiXoA1s0D/+KYs/8GhYkAnkWM/3Gimv+086z/G71z/48u3P/VhuH/fh1FALwriQHyRgkAWsz//+eqkwAXOBP+OH2d/zCz2v9Ptv3/JtS/ASnrfABglxwAh5S+AM35J/40YIj/1CyI/0PRg//8ghf/24AU/8aBdgBsZQsAsgWSAT4HZP+17F7+HBqkAEwWcP94Zk8AysDlAciw1wApQPT/zrhOAKctPwGgIwD/OwyO/8wJkP/bXuUBehtwAL1pbf9A0Er/+383AQLixgAsTNEAl5hN/9IXLgHJq0X/LNPnAL4l4P/1xD7/qbXe/yLTEQB38cX/5SOYARVFKP+y4qEAlLPBANvC/gEozjP/51z6AUOZqgAVlPEAqkVS/3kS5/9ccgMAuD7mAOHJV/+SYKL/tfLcAK273QHiPqr/OH7ZAXUN4/+zLO8AnY2b/5DdUwDr0dAAKhGlAftRhQB89cn+YdMY/1PWpgCaJAn/+C9/AFrbjP+h2Sb+1JM//0JUlAHPAwEA5oZZAX9Oev/gmwH/UohKALKc0P+6GTH/3gPSAeWWvv9VojT/KVSN/0l7VP5dEZYAdxMcASAW1/8cF8z/jvE0/+Q0fQAdTM8A16f6/q+k5gA3z2kBbbv1/6Es3AEpZYD/pxBeAF3Wa/92SAD+UD3q/3mvfQCLqfsAYSeT/vrEMf+ls27+30a7/xaOfQGas4r/drAqAQqumQCcXGYAqA2h/48QIAD6xbT/y6MsAVcgJAChmRT/e/wPABnjUAA8WI4AERbJAZrNTf8nPy8ACHqNAIAXtv7MJxP/BHAd/xckjP/S6nT+NTI//3mraP+g214AV1IO/ucqBQCli3/+Vk4mAII8Qv7LHi3/LsR6Afk1ov+Ij2f+19JyAOcHoP6pmCr/by32AI6Dh/+DR8z/JOILAAAc8v/hitX/9y7Y/vUDtwBs/EoBzhow/8029v/TxiT/eSMyADTYyv8mi4H+8kmUAEPnjf8qL8wATnQZAQThv/8Gk+QAOlixAHql5f/8U8n/4KdgAbG4nv/yabMB+MbwAIVCywH+JC8ALRhz/3c+/gDE4br+e42sABpVKf/ib7cA1eeXAAQ7B//uipQAQpMh/x/2jf/RjXT/aHAfAFihrABT1+b+L2+XAC0mNAGELcwAioBt/ul1hv/zvq3+8ezwAFJ/7P4o36H/brbh/3uu7wCH8pEBM9GaAJYDc/7ZpPz/N5xFAVRe///oSS0BFBPU/2DFO/5g+yEAJsdJAUCs9/91dDj/5BESAD6KZwH25aT/9HbJ/lYgn/9tIokBVdO6AArBwf56wrEAeu5m/6LaqwBs2aEBnqoiALAvmwG15Av/CJwAABBLXQDOYv8BOpojAAzzuP5DdUL/5uV7AMkqbgCG5LL+umx2/zoTmv9SqT7/co9zAe/EMv+tMMH/kwJU/5aGk/5f6EkAbeM0/r+JCgAozB7+TDRh/6TrfgD+fLwASrYVAXkdI//xHgf+VdrW/wdUlv5RG3X/oJ+Y/kIY3f/jCjwBjYdmANC9lgF1s1wAhBaI/3jHHAAVgU/+tglBANqjqQD2k8b/ayaQAU6vzf/WBfr+L1gd/6QvzP8rNwb/g4bP/nRk1gBgjEsBatyQAMMgHAGsUQX/x7M0/yVUywCqcK4ACwRbAEX0GwF1g1wAIZiv/4yZa//7hyv+V4oE/8bqk/55mFT/zWWbAZ0JGQBIahH+bJkA/73lugDBCLD/rpXRAO6CHQDp1n4BPeJmADmjBAHGbzP/LU9OAXPSCv/aCRn/novG/9NSu/5QhVMAnYHmAfOFhv8oiBAATWtP/7dVXAGxzMoAo0eT/5hFvgCsM7wB+tKs/9PycQFZWRr/QEJv/nSYKgChJxv/NlD+AGrRcwFnfGEA3eZi/x/nBgCywHj+D9nL/3yeTwBwkfcAXPowAaO1wf8lL47+kL2l/y6S8AAGS4AAKZ3I/ld51QABcewABS36AJAMUgAfbOcA4e93/6cHvf+75IT/br0iAF4szAGiNMUATrzx/jkUjQD0ki8BzmQzAH1rlP4bw00AmP1aAQePkP8zJR8AIncm/wfFdgCZvNMAlxR0/vVBNP+0/W4BL7HRAKFjEf923soAfbP8AXs2fv+ROb8AN7p5AArzigDN0+X/fZzx/pScuf/jE7z/fCkg/x8izv4ROVMAzBYl/ypgYgB3ZrgBA74cAG5S2v/IzMD/yZF2AHXMkgCEIGIBwMJ5AGqh+AHtWHwAF9QaAM2rWv/4MNgBjSXm/3zLAP6eqB7/1vgVAHC7B/9Lhe//SuPz//qTRgDWeKIApwmz/xaeEgDaTdEBYW1R//Qhs/85NDn/QazS//lH0f+Oqe4Anr2Z/67+Z/5iIQ4AjUzm/3GLNP8POtQAqNfJ//jM1wHfRKD/OZq3/i/neQBqpokAUYiKAKUrMwDniz0AOV87/nZiGf+XP+wBXr76/6m5cgEF+jr/S2lhAdffhgBxY6MBgD5wAGNqkwCjwwoAIc22ANYOrv+BJuf/NbbfAGIqn//3DSgAvNKxAQYVAP//PZT+iS2B/1kadP5+JnIA+zLy/nmGgP/M+af+pevXAMqx8wCFjT4A8IK+AW6v/wAAFJIBJdJ5/wcnggCO+lT/jcjPAAlfaP8L9K4Ahuh+AKcBe/4QwZX/6OnvAdVGcP/8dKD+8t7c/81V4wAHuToAdvc/AXRNsf8+9cj+PxIl/2s16P4y3dMAotsH/gJeKwC2Prb+oE7I/4eMqgDruOQArzWK/lA6Tf+YyQIBP8QiAAUeuACrsJoAeTvOACZjJwCsUE3+AIaXALoh8f5e/d//LHL8AGx+Of/JKA3/J+Ub/yfvFwGXeTP/mZb4AArqrv929gT+yPUmAEWh8gEQspYAcTiCAKsfaQAaWGz/MSpqAPupQgBFXZUAFDn+AKQZbwBavFr/zATFACjVMgHUYIT/WIq0/uSSfP+49vcAQXVW//1m0v7+eSQAiXMD/zwY2ACGEh0AO+JhALCORwAH0aEAvVQz/pv6SADVVOv/Ld7gAO6Uj/+qKjX/Tqd1ALoAKP99sWf/ReFCAOMHWAFLrAYAqS3jARAkRv8yAgn/i8EWAI+35/7aRTIA7DihAdWDKgCKkSz+iOUo/zE/I/89kfX/ZcAC/uincQCYaCYBebnaAHmL0/538CMAQb3Z/ruzov+gu+YAPvgO/zxOYQD/96P/4Ttb/2tHOv/xLyEBMnXsANuxP/70WrMAI8LX/71DMv8Xh4EAaL0l/7k5wgAjPuf/3PhsAAznsgCPUFsBg11l/5AnAgH/+rIABRHs/osgLgDMvCb+9XM0/79xSf6/bEX/FkX1ARfLsgCqY6oAQfhvACVsmf9AJUUAAFg+/lmUkP+/ROAB8Sc1ACnL7f+RfsL/3Sr9/xljlwBh/d8BSnMx/wavSP87sMsAfLf5AeTkYwCBDM/+qMDD/8ywEP6Y6qsATSVV/yF4h/+OwuMBH9Y6ANW7ff/oLjz/vnQq/peyE/8zPu3+zOzBAMLoPACsIp3/vRC4/mcDX/+N6ST+KRkL/xXDpgB29S0AQ9WV/58MEv+7pOMBoBkFAAxOwwErxeEAMI4p/sSbPP/fxxIBkYicAPx1qf6R4u4A7xdrAG21vP/mcDH+Sart/+e34/9Q3BQAwmt/AX/NZQAuNMUB0qsk/1gDWv84l40AYLv//ypOyAD+RkYB9H2oAMxEigF810YAZkLI/hE05AB13I/+y/h7ADgSrv+6l6T/M+jQAaDkK//5HRkBRL4/AA0AAAAA/wAAAAD1AAAAAAAA+wAAAAAAAP0AAAAA8wAAAAAHAAAAAAADAAAAAPMAAAAABQAAAAAAAAAACwAAAAAACwAAAADzAAAAAAAA/QAAAAAA/wAAAAADAAAAAPUAAAAAAAAADwAAAAAA/wAAAAD/AAAAAAcAAAAABQ=="),o(t,33676,"AQ=="),o(t,33712,"AQ=="),o(t,33744,"4Ot6fDtBuK4WVuP68Z/EatoJjeucMrH9hmIFFl9JuABfnJW8o1CMJLHQsVWcg+9bBERcxFgcjobYIk7d0J8RV+z///////////////////////////////////////9/7f///////////////////////////////////////3/u////////////////////////////////////////fw=="),o(t,33936,"CMm882fmCWo7p8qEha5nuyv4lP5y82488TYdXzr1T6XRguatf1IOUR9sPiuMaAWba71B+6vZgx95IX4TGc3gWyKuKNeYL4pCzWXvI5FEN3EvO03sz/vAtbzbiYGl27XpOLVI81vCVjkZ0AW28RHxWZtPGa+kgj+SGIFt2tVeHKtCAgOjmKoH2L5vcEUBW4MSjLLkTr6FMSTitP/Vw30MVW+Je/J0Xb5ysZYWO/6x3oA1Esclpwbcm5Qmac908ZvB0krxnsFpm+TjJU84hke+77XVjIvGncEPZZysd8yhDCR1AitZbyzpLYPkpm6qhHRK1PtBvdypsFy1UxGD2oj5dqvfZu5SUT6YEDK0LW3GMag/IfuYyCcDsOQO777Hf1m/wo+oPfML4MYlpwqTR5Gn1W+CA+BRY8oGcG4OCmcpKRT8L9JGhQq3JybJJlw4IRsu7SrEWvxtLE3fs5WdEw04U95jr4tUcwplqLJ3PLsKanbmru1HLsnCgTs1ghSFLHKSZAPxTKHov6IBMEK8S2YaqJGX+NBwi0vCML5UBqNRbMcYUu/WGeiS0RCpZVUkBpnWKiBxV4U1DvS40bsycKBqEMjQ0rgWwaQZU6tBUQhsNx6Z647fTHdIJ6hIm+G1vLA0Y1rJxbMMHDnLikHjSqrYTnPjY3dPypxbo7iy1vNvLmj8su9d7oKPdGAvF0NvY6V4cqvwoRR4yITsOWQaCALHjCgeYyP6/76Q6b2C3utsUKQVecay96P5vitTcuPyeHHGnGEm6s4+J8oHwsAhx7iG0R7r4M3WfdrqeNFu7n9PffW6bxdyqmfwBqaYyKLFfWMKrg35vgSYPxEbRxwTNQtxG4R9BCP1d9sokyTHQHuryjK8vskVCr6ePEwNEJzEZx1DtkI+y77UxUwqfmX8nCl/Wez61jqrb8tfF1hHSowZRGyA"),o(t,34768,"U2lnRWQyNTUxOSBubyBFZDI1NTE5IGNvbGxpc2lvbnMB"),o(t,34848,"cI0BAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0=");var ut,dt=(ut=[null,function(e,t,n,a,o){var r;return e|=0,a|=0,o|=0,g=r=g+-64|0,(t|=0)|(n|=0)&&(c[r+8>>2]=2036477234,c[r+12>>2]=1797285236,c[r>>2]=1634760805,c[r+4>>2]=857760878,c[r+16>>2]=u[0|o]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,c[r+20>>2]=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,c[r+24>>2]=u[o+8|0]|u[o+9|0]<<8|u[o+10|0]<<16|u[o+11|0]<<24,c[r+28>>2]=u[o+12|0]|u[o+13|0]<<8|u[o+14|0]<<16|u[o+15|0]<<24,c[r+32>>2]=u[o+16|0]|u[o+17|0]<<8|u[o+18|0]<<16|u[o+19|0]<<24,c[r+36>>2]=u[o+20|0]|u[o+21|0]<<8|u[o+22|0]<<16|u[o+23|0]<<24,c[r+40>>2]=u[o+24|0]|u[o+25|0]<<8|u[o+26|0]<<16|u[o+27|0]<<24,o=u[o+28|0]|u[o+29|0]<<8|u[o+30|0]<<16|u[o+31|0]<<24,c[r+48>>2]=0,c[r+52>>2]=0,c[r+44>>2]=o,c[r+56>>2]=u[0|a]|u[a+1|0]<<8|u[a+2|0]<<16|u[a+3|0]<<24,c[r+60>>2]=u[a+4|0]|u[a+5|0]<<8|u[a+6|0]<<16|u[a+7|0]<<24,C(r,e=Ee(e,0,t),e,t,n),$e(r,64)),g=r- -64|0,0},function(e,t,n,a,o){var r;return e|=0,a|=0,o|=0,g=r=g+-64|0,(t|=0)|(n|=0)&&(c[r+8>>2]=2036477234,c[r+12>>2]=1797285236,c[r>>2]=1634760805,c[r+4>>2]=857760878,c[r+16>>2]=u[0|o]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,c[r+20>>2]=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,c[r+24>>2]=u[o+8|0]|u[o+9|0]<<8|u[o+10|0]<<16|u[o+11|0]<<24,c[r+28>>2]=u[o+12|0]|u[o+13|0]<<8|u[o+14|0]<<16|u[o+15|0]<<24,c[r+32>>2]=u[o+16|0]|u[o+17|0]<<8|u[o+18|0]<<16|u[o+19|0]<<24,c[r+36>>2]=u[o+20|0]|u[o+21|0]<<8|u[o+22|0]<<16|u[o+23|0]<<24,c[r+40>>2]=u[o+24|0]|u[o+25|0]<<8|u[o+26|0]<<16|u[o+27|0]<<24,o=u[o+28|0]|u[o+29|0]<<8|u[o+30|0]<<16|u[o+31|0]<<24,c[r+48>>2]=0,c[r+44>>2]=o,c[r+52>>2]=u[0|a]|u[a+1|0]<<8|u[a+2|0]<<16|u[a+3|0]<<24,c[r+56>>2]=u[a+4|0]|u[a+5|0]<<8|u[a+6|0]<<16|u[a+7|0]<<24,c[r+60>>2]=u[a+8|0]|u[a+9|0]<<8|u[a+10|0]<<16|u[a+11|0]<<24,C(r,e=Ee(e,0,t),e,t,n),$e(r,64)),g=r- -64|0,0},function(e,t,n,a,o,r,i,s){var d;return e|=0,t|=0,o|=0,r|=0,i|=0,s|=0,g=d=g+-64|0,(n|=0)|(a|=0)&&(c[d+8>>2]=2036477234,c[d+12>>2]=1797285236,c[d>>2]=1634760805,c[d+4>>2]=857760878,c[d+16>>2]=u[0|s]|u[s+1|0]<<8|u[s+2|0]<<16|u[s+3|0]<<24,c[d+20>>2]=u[s+4|0]|u[s+5|0]<<8|u[s+6|0]<<16|u[s+7|0]<<24,c[d+24>>2]=u[s+8|0]|u[s+9|0]<<8|u[s+10|0]<<16|u[s+11|0]<<24,c[d+28>>2]=u[s+12|0]|u[s+13|0]<<8|u[s+14|0]<<16|u[s+15|0]<<24,c[d+32>>2]=u[s+16|0]|u[s+17|0]<<8|u[s+18|0]<<16|u[s+19|0]<<24,c[d+36>>2]=u[s+20|0]|u[s+21|0]<<8|u[s+22|0]<<16|u[s+23|0]<<24,c[d+40>>2]=u[s+24|0]|u[s+25|0]<<8|u[s+26|0]<<16|u[s+27|0]<<24,c[d+44>>2]=u[s+28|0]|u[s+29|0]<<8|u[s+30|0]<<16|u[s+31|0]<<24,c[d+48>>2]=r,c[d+52>>2]=i,c[d+56>>2]=u[0|o]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,c[d+60>>2]=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,C(d,t,e,n,a),$e(d,64)),g=d- -64|0,0},function(e,t,n,a,o,r,i){var s;return e|=0,t|=0,o|=0,r|=0,i|=0,g=s=g+-64|0,(n|=0)|(a|=0)&&(c[s+8>>2]=2036477234,c[s+12>>2]=1797285236,c[s>>2]=1634760805,c[s+4>>2]=857760878,c[s+16>>2]=u[0|i]|u[i+1|0]<<8|u[i+2|0]<<16|u[i+3|0]<<24,c[s+20>>2]=u[i+4|0]|u[i+5|0]<<8|u[i+6|0]<<16|u[i+7|0]<<24,c[s+24>>2]=u[i+8|0]|u[i+9|0]<<8|u[i+10|0]<<16|u[i+11|0]<<24,c[s+28>>2]=u[i+12|0]|u[i+13|0]<<8|u[i+14|0]<<16|u[i+15|0]<<24,c[s+32>>2]=u[i+16|0]|u[i+17|0]<<8|u[i+18|0]<<16|u[i+19|0]<<24,c[s+36>>2]=u[i+20|0]|u[i+21|0]<<8|u[i+22|0]<<16|u[i+23|0]<<24,c[s+40>>2]=u[i+24|0]|u[i+25|0]<<8|u[i+26|0]<<16|u[i+27|0]<<24,i=u[i+28|0]|u[i+29|0]<<8|u[i+30|0]<<16|u[i+31|0]<<24,c[s+48>>2]=r,c[s+44>>2]=i,c[s+52>>2]=u[0|o]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,c[s+56>>2]=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,c[s+60>>2]=u[o+8|0]|u[o+9|0]<<8|u[o+10|0]<<16|u[o+11|0]<<24,C(s,t,e,n,a),$e(s,64)),g=s- -64|0,0},function(e,t,n,a,o){var r,i,d;return e|=0,t|=0,n|=0,a|=0,o|=0,g=r=(i=g)-128&-64,c[r>>2]=67108863&(u[0|o]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24),c[r+4>>2]=(u[o+3|0]|u[o+4|0]<<8|u[o+5|0]<<16|u[o+6|0]<<24)>>>2&67108611,c[r+8>>2]=(u[o+6|0]|u[o+7|0]<<8|u[o+8|0]<<16|u[o+9|0]<<24)>>>4&67092735,c[r+12>>2]=(u[o+9|0]|u[o+10|0]<<8|u[o+11|0]<<16|u[o+12|0]<<24)>>>6&66076671,d=u[o+12|0]|u[o+13|0]<<8|u[o+14|0]<<16|u[o+15|0]<<24,c[r+20>>2]=0,c[r+24>>2]=0,c[r+28>>2]=0,c[r+32>>2]=0,c[r+36>>2]=0,c[r+16>>2]=d>>>8&1048575,c[r+40>>2]=u[o+16|0]|u[o+17|0]<<8|u[o+18|0]<<16|u[o+19|0]<<24,c[r+44>>2]=u[o+20|0]|u[o+21|0]<<8|u[o+22|0]<<16|u[o+23|0]<<24,c[r+48>>2]=u[o+24|0]|u[o+25|0]<<8|u[o+26|0]<<16|u[o+27|0]<<24,o=u[o+28|0]|u[o+29|0]<<8|u[o+30|0]<<16|u[o+31|0]<<24,s[r+80|0]=0,c[r+56>>2]=0,c[r+60>>2]=0,c[r+52>>2]=o,z(r,t,n,a),Q(r,e),g=i,0},function(e,t,n,a,o){var r,i,d;return e|=0,t|=0,n|=0,a|=0,o|=0,g=r=(i=g)-192&-64,c[r+64>>2]=67108863&(u[0|o]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24),c[r+68>>2]=(u[o+3|0]|u[o+4|0]<<8|u[o+5|0]<<16|u[o+6|0]<<24)>>>2&67108611,c[r+72>>2]=(u[o+6|0]|u[o+7|0]<<8|u[o+8|0]<<16|u[o+9|0]<<24)>>>4&67092735,c[r+76>>2]=(u[o+9|0]|u[o+10|0]<<8|u[o+11|0]<<16|u[o+12|0]<<24)>>>6&66076671,d=u[o+12|0]|u[o+13|0]<<8|u[o+14|0]<<16|u[o+15|0]<<24,c[r+84>>2]=0,c[r+88>>2]=0,c[r+92>>2]=0,c[r+96>>2]=0,c[r+100>>2]=0,c[r+80>>2]=d>>>8&1048575,c[r+104>>2]=u[o+16|0]|u[o+17|0]<<8|u[o+18|0]<<16|u[o+19|0]<<24,c[r+108>>2]=u[o+20|0]|u[o+21|0]<<8|u[o+22|0]<<16|u[o+23|0]<<24,c[r+112>>2]=u[o+24|0]|u[o+25|0]<<8|u[o+26|0]<<16|u[o+27|0]<<24,o=u[o+28|0]|u[o+29|0]<<8|u[o+30|0]<<16|u[o+31|0]<<24,s[r+144|0]=0,c[r+120>>2]=0,c[r+124>>2]=0,c[r+116>>2]=o,z(o=r- -64|0,t,n,a),Q(o,t=r+48|0),e=X(e,t),g=i,0|e},function(e,t){var n;return t|=0,c[(e|=0)>>2]=67108863&(u[0|t]|u[t+1|0]<<8|u[t+2|0]<<16|u[t+3|0]<<24),c[e+4>>2]=(u[t+3|0]|u[t+4|0]<<8|u[t+5|0]<<16|u[t+6|0]<<24)>>>2&67108611,c[e+8>>2]=(u[t+6|0]|u[t+7|0]<<8|u[t+8|0]<<16|u[t+9|0]<<24)>>>4&67092735,c[e+12>>2]=(u[t+9|0]|u[t+10|0]<<8|u[t+11|0]<<16|u[t+12|0]<<24)>>>6&66076671,n=u[t+12|0]|u[t+13|0]<<8|u[t+14|0]<<16|u[t+15|0]<<24,c[e+20>>2]=0,c[e+24>>2]=0,c[e+28>>2]=0,c[e+32>>2]=0,c[e+36>>2]=0,c[e+16>>2]=n>>>8&1048575,c[e+40>>2]=u[t+16|0]|u[t+17|0]<<8|u[t+18|0]<<16|u[t+19|0]<<24,c[e+44>>2]=u[t+20|0]|u[t+21|0]<<8|u[t+22|0]<<16|u[t+23|0]<<24,c[e+48>>2]=u[t+24|0]|u[t+25|0]<<8|u[t+26|0]<<16|u[t+27|0]<<24,t=u[t+28|0]|u[t+29|0]<<8|u[t+30|0]<<16|u[t+31|0]<<24,s[e+80|0]=0,c[e+56>>2]=0,c[e+60>>2]=0,c[e+52>>2]=t,0},function(e,t,n,a){return z(e|=0,t|=0,n|=0,a|=0),0},function(e,t){return Q(e|=0,t|=0),0},function(e,t,n){e|=0,t|=0,n|=0;var a,o=0,r=0,i=0,d=0,l=0,f=0,p=0,b=0,m=0,h=0,v=0,w=0,k=0,A=0,x=0,T=0,C=0,E=0,R=0,M=0,P=0,U=0,_=0,B=0,D=0,N=0,F=0,L=0,j=0,H=0,G=0,z=0,K=0,Z=0,V=0,q=0,Q=0,J=0,X=0,$=0,ee=0,te=0,ne=0,ae=0,oe=0,re=0,ie=0,se=0,ce=0,ue=0,de=0,le=0,fe=0,pe=0,be=0,me=0,he=0,ye=0,ve=0,we=0,ke=0,Ae=0,xe=0,Ie=0,Te=0;for(g=a=g-368|0;v=(i=u[n+o|0])^u[0|(l=o+33680|0)]|v,m=i^u[l+192|0]|m,h=i^u[l+160|0]|h,b=i^u[l+128|0]|b,d=i^u[l+96|0]|d,f=i^u[l- -64|0]|f,r=i^u[l+32|0]|r,31!=(0|(o=o+1|0)););if(o=-1,!(256&((255&((i=127^(l=127&u[n+31|0]))|m))-1|(255&(i|h))-1|(255&(i|b))-1|(255&(87^l|d))-1|(255&(f|l))-1|(255&(r|l))-1|(255&(l|v))-1))){for(o=t,t=u[t+28|0]|u[t+29|0]<<8|u[t+30|0]<<16|u[t+31|0]<<24,c[a+360>>2]=u[o+24|0]|u[o+25|0]<<8|u[o+26|0]<<16|u[o+27|0]<<24,c[a+364>>2]=t,t=u[o+20|0]|u[o+21|0]<<8|u[o+22|0]<<16|u[o+23|0]<<24,c[a+352>>2]=u[o+16|0]|u[o+17|0]<<8|u[o+18|0]<<16|u[o+19|0]<<24,c[a+356>>2]=t,r=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,t=u[0|o]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,c[a+336>>2]=t,c[a+340>>2]=r,r=u[o+12|0]|u[o+13|0]<<8|u[o+14|0]<<16|u[o+15|0]<<24,c[a+344>>2]=u[o+8|0]|u[o+9|0]<<8|u[o+10|0]<<16|u[o+11|0]<<24,c[a+348>>2]=r,s[a+336|0]=248&t,s[a+367|0]=63&u[a+367|0]|64,O(a+288|0,n),c[a+260>>2]=0,c[a+264>>2]=0,c[a+268>>2]=0,c[a+272>>2]=0,c[a+276>>2]=0,c[a+208>>2]=0,c[a+212>>2]=0,c[a+216>>2]=0,c[a+220>>2]=0,c[a+224>>2]=0,c[a+228>>2]=0,c[a+244>>2]=0,c[a+248>>2]=0,c[a+240>>2]=1,c[a+252>>2]=0,c[a+256>>2]=0,c[a+192>>2]=0,c[a+196>>2]=0,c[a+200>>2]=0,c[a+204>>2]=0,t=c[a+316>>2],c[a+168>>2]=c[a+312>>2],c[a+172>>2]=t,t=c[a+308>>2],c[a+160>>2]=c[a+304>>2],c[a+164>>2]=t,t=c[a+300>>2],c[a+152>>2]=c[a+296>>2],c[a+156>>2]=t,t=c[a+292>>2],c[a+144>>2]=c[a+288>>2],c[a+148>>2]=t,t=c[a+324>>2],c[a+176>>2]=c[a+320>>2],c[a+180>>2]=t,c[a+116>>2]=0,c[a+120>>2]=0,c[a+124>>2]=0,c[a+128>>2]=0,c[a+132>>2]=0,c[a+100>>2]=0,c[a+104>>2]=0,c[a+96>>2]=1,c[a+108>>2]=0,c[a+112>>2]=0,n=254;X=c[a+276>>2],i=c[a+180>>2],$=c[a+96>>2],ee=c[a+192>>2],te=c[a+144>>2],ne=c[a+240>>2],ae=c[a+100>>2],oe=c[a+196>>2],re=c[a+148>>2],ie=c[a+244>>2],P=c[a+104>>2],se=c[a+200>>2],U=c[a+152>>2],ce=c[a+248>>2],N=c[a+108>>2],ue=c[a+204>>2],_=c[a+156>>2],de=c[a+252>>2],B=c[a+112>>2],le=c[a+208>>2],R=c[a+160>>2],fe=c[a+256>>2],v=c[a+116>>2],pe=c[a+212>>2],p=c[a+164>>2],be=c[a+260>>2],m=c[a+120>>2],me=c[a+216>>2],h=c[a+168>>2],he=c[a+264>>2],b=c[a+124>>2],ye=c[a+220>>2],d=c[a+172>>2],ve=c[a+268>>2],f=c[a+128>>2],we=c[a+224>>2],r=c[a+176>>2],ke=c[a+272>>2],Ae=n,M=(C=(t=0-((t=J)^(J=u[a+336+(n>>>3)|0]>>>(7&n)&1))|0)&((o=c[a+132>>2])^(Z=c[a+228>>2])))^o,c[a+132>>2]=M,V=i^(k=t&(i^X)),c[a+84>>2]=V-M,D=f^(A=t&(f^we)),c[a+128>>2]=D,q=(E=t&(r^ke))^r,c[a+80>>2]=q-D,L=b^(x=t&(b^ye)),c[a+124>>2]=L,xe=d^(T=t&(d^ve)),c[a+76>>2]=xe-L,j=m^(w=t&(m^me)),c[a+120>>2]=j,Ie=h^(l=t&(h^he)),c[a+72>>2]=Ie-j,H=v^(i=t&(v^pe)),c[a+116>>2]=H,Te=p^(v=t&(p^be)),c[a+68>>2]=Te-H,G=B^(m=t&(B^le)),c[a+112>>2]=G,F=R^(h=t&(R^fe)),c[a+64>>2]=F-G,z=N^(b=t&(N^ue)),c[a+108>>2]=z,Q=_^(d=t&(_^de)),c[a+60>>2]=Q-z,K=P^(f=t&(P^se)),c[a+104>>2]=K,N=U^(r=t&(U^ce)),c[a+56>>2]=N-K,P=ae^(o=t&(ae^oe)),c[a+100>>2]=P,_=re^(n=t&(re^ie)),c[a+52>>2]=_-P,U=$^(B=t&($^ee)),c[a+96>>2]=U,R=(t&=te^ne)^te,c[a+48>>2]=R-U,p=k^X,C^=Z,c[a+36>>2]=p-C,k=E^ke,A^=we,c[a+32>>2]=k-A,E=T^ve,x^=ye,c[a+28>>2]=E-x,T=l^he,w^=me,c[a+24>>2]=T-w,l=v^be,i^=pe,c[a+20>>2]=l-i,v=h^fe,m^=le,c[a+16>>2]=v-m,h=d^de,b^=ue,c[a+12>>2]=h-b,d=r^ce,f^=se,c[a+8>>2]=d-f,r=n^ie,o^=oe,c[a+4>>2]=r-o,n=t^ne,t=B^ee,c[a>>2]=n-t,c[a+276>>2]=p+C,c[a+272>>2]=k+A,c[a+268>>2]=x+E,c[a+264>>2]=w+T,c[a+260>>2]=i+l,c[a+256>>2]=m+v,c[a+248>>2]=d+f,c[a+244>>2]=o+r,c[a+240>>2]=t+n,c[a+252>>2]=b+h,c[a+228>>2]=M+V,c[a+224>>2]=D+q,c[a+220>>2]=L+xe,c[a+216>>2]=j+Ie,c[a+212>>2]=H+Te,c[a+208>>2]=F+G,c[a+204>>2]=z+Q,c[a+200>>2]=N+K,c[a+196>>2]=P+_,c[a+192>>2]=R+U,I(V=a+96|0,D=a+48|0,R=a+240|0),I(M=a+192|0,M,a),S(D,a),S(a,R),p=c[a+192>>2],C=c[a+96>>2],k=c[a+196>>2],A=c[a+100>>2],E=c[a+200>>2],x=c[a+104>>2],T=c[a+204>>2],w=c[a+108>>2],l=c[a+208>>2],i=c[a+112>>2],v=c[a+212>>2],m=c[a+116>>2],h=c[a+216>>2],b=c[a+120>>2],d=c[a+220>>2],f=c[a+124>>2],r=c[a+224>>2],o=c[a+128>>2],n=c[a+228>>2],t=c[a+132>>2],c[a+180>>2]=n+t,c[a+176>>2]=o+r,c[a+172>>2]=d+f,c[a+168>>2]=b+h,c[a+164>>2]=m+v,c[a+160>>2]=i+l,c[a+156>>2]=w+T,c[a+152>>2]=x+E,c[a+148>>2]=k+A,c[a+144>>2]=p+C,c[a+228>>2]=t-n,c[a+224>>2]=o-r,c[a+220>>2]=f-d,c[a+216>>2]=b-h,c[a+212>>2]=m-v,c[a+208>>2]=i-l,c[a+204>>2]=w-T,c[a+200>>2]=x-E,c[a+196>>2]=A-k,c[a+192>>2]=C-p,I(R,a,D),L=c[a+52>>2],w=c[a+4>>2],j=c[a+56>>2],l=c[a+8>>2],H=c[a+64>>2],i=c[a+16>>2],G=c[a+60>>2],b=c[a+12>>2],z=c[a+72>>2],d=c[a+24>>2],K=c[a+68>>2],f=c[a+20>>2],P=c[a+80>>2],o=c[a+32>>2],U=c[a+76>>2],n=c[a+28>>2],Z=c[a+84>>2],t=c[a+36>>2],q=c[a+48>>2],r=c[a>>2]-q|0,c[a>>2]=r,t=t-Z|0,c[a+36>>2]=t,B=n-U|0,c[a+28>>2]=B,R=o-P|0,c[a+32>>2]=R,v=f-K|0,c[a+20>>2]=v,m=d-z|0,c[a+24>>2]=m,h=b-G|0,c[a+12>>2]=h,b=i-H|0,c[a+16>>2]=b,d=l-j|0,c[a+8>>2]=d,o=w-L|0,c[a+4>>2]=o,S(M,M),t=ge(t,t>>31,121666,0),n=y,Q=t,t=ge((33554431&(n=(p=t+16777216|0)>>>0<16777216?n+1|0:n))<<7|p>>>25,n>>25,19,0),f=y,n=t,t=ge(r,r>>31,121666,0),F=y+f|0,t=t>>>0>(n=n+t|0)>>>0?F+1|0:F,t=(f=n+33554432|0)>>>0<33554432?t+1|0:t,C=n-(-67108864&f)|0,c[a+96>>2]=C,r=ge(o,o>>31,121666,0),n=y,n=(o=r+16777216|0)>>>0<16777216?n+1|0:n,k=(t=(67108863&t)<<6|f>>>26)+(r-(-33554432&o)|0)|0,c[a+100>>2]=k,F=n>>25,o=(33554431&n)<<7|o>>>25,n=ge(d,d>>31,121666,0)+o|0,t=F+y|0,t=n>>>0>>0?t+1|0:t,f=(A=n+33554432|0)>>>0<33554432?t+1|0:t,E=n-(-67108864&A)|0,c[a+104>>2]=E,o=ge(b,b>>31,121666,0),r=y,n=ge(h,h>>31,121666,0),t=y,_=o,N=n,o=(33554431&(t=(x=n+16777216|0)>>>0<16777216?t+1|0:t))<<7|x>>>25,t=(t>>25)+r|0,t=(n=_+o|0)>>>0>>0?t+1|0:t,r=(T=n+33554432|0)>>>0<33554432?t+1|0:t,w=n-(-67108864&T)|0,c[a+112>>2]=w,o=ge(m,m>>31,121666,0),d=y,n=ge(v,v>>31,121666,0),t=y,_=n,n=(33554431&(t=(l=n+16777216|0)>>>0<16777216?t+1|0:t))<<7|l>>>25,t=(t>>25)+d|0,t=n>>>0>(o=n+o|0)>>>0?t+1|0:t,n=(i=o+33554432|0)>>>0<33554432?t+1|0:t,v=o-(-67108864&i)|0,c[a+120>>2]=v,d=ge(R,R>>31,121666,0),b=y,o=ge(B,B>>31,121666,0),t=y,R=o,o=(33554431&(t=(m=o+16777216|0)>>>0<16777216?t+1|0:t))<<7|m>>>25,t=(t>>25)+b|0,t=o>>>0>(d=o+d|0)>>>0?t+1|0:t,o=(h=d+33554432|0)>>>0<33554432?t+1|0:t,b=d-(-67108864&h)|0,c[a+128>>2]=b,d=(f=N+((67108863&f)<<6|A>>>26)|0)-(-33554432&x)|0,c[a+108>>2]=d,f=(r=_+((67108863&r)<<6|T>>>26)|0)-(-33554432&l)|0,c[a+116>>2]=f,r=(t=R+((67108863&n)<<6|i>>>26)|0)-(-33554432&m)|0,c[a+124>>2]=r,n=(o=Q+((67108863&o)<<6|h>>>26)|0)-(-33554432&p)|0,c[a+132>>2]=n,S(t=a+144|0,t),c[a+84>>2]=n+Z,c[a+80>>2]=b+P,c[a+76>>2]=r+U,c[a+72>>2]=v+z,c[a+68>>2]=f+K,c[a+64>>2]=w+H,c[a+60>>2]=d+G,c[a+56>>2]=E+j,c[a+52>>2]=k+L,c[a+48>>2]=C+q,n=Ae-1|0,I(V,a+288|0,M),I(M,a,D),Ae;);v=c[a+144>>2],C=c[a+240>>2],m=c[a+148>>2],k=c[a+244>>2],h=c[a+152>>2],A=c[a+248>>2],b=c[a+156>>2],E=c[a+252>>2],d=c[a+160>>2],x=c[a+256>>2],f=c[a+164>>2],T=c[a+260>>2],r=c[a+168>>2],w=c[a+264>>2],o=c[a+172>>2],l=c[a+268>>2],n=c[a+176>>2],i=c[a+272>>2],p=0-J|0,t=c[a+276>>2],c[a+276>>2]=p&(t^c[a+180>>2])^t,c[a+272>>2]=i^p&(n^i),c[a+268>>2]=l^p&(o^l),c[a+264>>2]=w^p&(r^w),c[a+260>>2]=T^p&(f^T),c[a+256>>2]=x^p&(d^x),c[a+252>>2]=E^p&(b^E),c[a+248>>2]=A^p&(h^A),c[a+244>>2]=k^p&(m^k),c[a+240>>2]=C^p&(v^C),C=c[a+192>>2],v=c[a+96>>2],k=c[a+196>>2],m=c[a+100>>2],A=c[a+200>>2],h=c[a+104>>2],E=c[a+204>>2],b=c[a+108>>2],x=c[a+208>>2],d=c[a+112>>2],T=c[a+212>>2],f=c[a+116>>2],w=c[a+216>>2],r=c[a+120>>2],l=c[a+220>>2],o=c[a+124>>2],i=c[a+224>>2],n=c[a+128>>2],t=c[a+228>>2],c[a+228>>2]=p&(t^c[a+132>>2])^t,c[a+224>>2]=i^p&(n^i),c[a+220>>2]=l^p&(o^l),c[a+216>>2]=w^p&(r^w),c[a+212>>2]=T^p&(f^T),c[a+208>>2]=x^p&(d^x),c[a+204>>2]=E^p&(b^E),c[a+200>>2]=A^p&(h^A),c[a+196>>2]=k^p&(m^k),c[a+192>>2]=C^p&(v^C),W(n=a+192|0,n),I(t=a+240|0,t,n),Y(e,t),$e(a+336|0,32),o=0}return g=a+368|0,0|o},function(e,t){var n,a,o,r,i,d,l,f,p,b,m,h,y,v,w,k,A,x,T,S;return t|=0,g=n=g-304|0,s[0|(e|=0)]=u[0|t],s[e+1|0]=u[t+1|0],s[e+2|0]=u[t+2|0],s[e+3|0]=u[t+3|0],s[e+4|0]=u[t+4|0],s[e+5|0]=u[t+5|0],s[e+6|0]=u[t+6|0],s[e+7|0]=u[t+7|0],s[e+8|0]=u[t+8|0],s[e+9|0]=u[t+9|0],s[e+10|0]=u[t+10|0],s[e+11|0]=u[t+11|0],s[e+12|0]=u[t+12|0],s[e+13|0]=u[t+13|0],s[e+14|0]=u[t+14|0],s[e+15|0]=u[t+15|0],s[e+16|0]=u[t+16|0],s[e+17|0]=u[t+17|0],s[e+18|0]=u[t+18|0],s[e+19|0]=u[t+19|0],s[e+20|0]=u[t+20|0],s[e+21|0]=u[t+21|0],s[e+22|0]=u[t+22|0],s[e+23|0]=u[t+23|0],s[e+24|0]=u[t+24|0],s[e+25|0]=u[t+25|0],s[e+26|0]=u[t+26|0],s[e+27|0]=u[t+27|0],s[e+28|0]=u[t+28|0],s[e+29|0]=u[t+29|0],s[e+30|0]=u[t+30|0],t=u[t+31|0],s[0|e]=248&u[0|e],s[e+31|0]=63&t|64,F(n+48|0,e),t=c[n+132>>2],a=c[n+92>>2],o=c[n+136>>2],r=c[n+96>>2],i=c[n+140>>2],d=c[n+100>>2],l=c[n+144>>2],f=c[n+104>>2],p=c[n+148>>2],b=c[n+108>>2],m=c[n+152>>2],h=c[n+112>>2],y=c[n+156>>2],v=c[n+116>>2],w=c[n+160>>2],k=c[n+120>>2],A=c[n+128>>2],x=c[n+88>>2],T=c[n+124>>2],S=c[n+164>>2],c[n+292>>2]=T+S,c[n+288>>2]=w+k,c[n+284>>2]=y+v,c[n+280>>2]=m+h,c[n+276>>2]=p+b,c[n+272>>2]=l+f,c[n+268>>2]=i+d,c[n+264>>2]=o+r,c[n+260>>2]=t+a,c[n+256>>2]=A+x,c[n+244>>2]=S-T,c[n+240>>2]=w-k,c[n+236>>2]=y-v,c[n+232>>2]=m-h,c[n+228>>2]=p-b,c[n+224>>2]=l-f,c[n+220>>2]=i-d,c[n+216>>2]=o-r,c[n+212>>2]=t-a,c[n+208>>2]=A-x,W(t=n+208|0,t),I(n,n+256|0,t),Y(e,n),g=n+304|0,0},function(e,t,n,a,o){e|=0,a|=0,o|=0;var r,i=0,d=0,l=0,f=0;if(g=r=g-112|0,(t|=0)|(n|=0)){i=u[o+28|0]|u[o+29|0]<<8|u[o+30|0]<<16|u[o+31|0]<<24,c[r+24>>2]=u[o+24|0]|u[o+25|0]<<8|u[o+26|0]<<16|u[o+27|0]<<24,c[r+28>>2]=i,i=u[o+20|0]|u[o+21|0]<<8|u[o+22|0]<<16|u[o+23|0]<<24,c[r+16>>2]=u[o+16|0]|u[o+17|0]<<8|u[o+18|0]<<16|u[o+19|0]<<24,c[r+20>>2]=i,i=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,c[r>>2]=u[0|o]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,c[r+4>>2]=i,i=u[o+12|0]|u[o+13|0]<<8|u[o+14|0]<<16|u[o+15|0]<<24,c[r+8>>2]=u[o+8|0]|u[o+9|0]<<8|u[o+10|0]<<16|u[o+11|0]<<24,c[r+12>>2]=i,o=u[0|a]|u[a+1|0]<<8|u[a+2|0]<<16|u[a+3|0]<<24,a=u[a+4|0]|u[a+5|0]<<8|u[a+6|0]<<16|u[a+7|0]<<24,c[r+104>>2]=0,c[r+108>>2]=0,c[r+96>>2]=o,c[r+100>>2]=a;e:{if(!n&t>>>0>=64|n){for(;P(e,r+96|0,r),a=u[r+104|0]+1|0,s[r+104|0]=a,a=u[r+105|0]+(a>>>8|0)|0,s[r+105|0]=a,a=u[r+106|0]+(a>>>8|0)|0,s[r+106|0]=a,a=u[r+107|0]+(a>>>8|0)|0,s[r+107|0]=a,a=u[r+108|0]+(a>>>8|0)|0,s[r+108|0]=a,a=u[r+109|0]+(a>>>8|0)|0,s[r+109|0]=a,a=u[r+110|0]+(a>>>8|0)|0,s[r+110|0]=a,s[r+111|0]=u[r+111|0]+(a>>>8|0),e=e- -64|0,n=n-1|0,!(n=(t=t+-64|0)>>>0<4294967232?n+1|0:n)&t>>>0>63|n;);if(!(t|n))break e}if(a=0,P(r+32|0,r+96|0,r),n=3&t,o=0,t-1>>>0>=3)for(i=-4&t,t=0;d=l=r+32|0,s[e+o|0]=u[d+o|0],s[(f=1|o)+e|0]=u[d+f|0],s[(d=2|o)+e|0]=u[d+l|0],s[(d=3|o)+e|0]=u[d+(r+32|0)|0],o=o+4|0,(0|i)!=(0|(t=t+4|0)););if(n)for(;s[e+o|0]=u[(r+32|0)+o|0],o=o+1|0,(0|n)!=(0|(a=a+1|0)););}$e(r+32|0,64),$e(r,32)}return g=r+112|0,0},function(e,t,n,a,o,r,i,d){e|=0,t|=0,o|=0,r|=0,i|=0,d|=0;var l,f=0;if(g=l=g-112|0,(n|=0)|(a|=0)){f=u[d+28|0]|u[d+29|0]<<8|u[d+30|0]<<16|u[d+31|0]<<24,c[l+24>>2]=u[d+24|0]|u[d+25|0]<<8|u[d+26|0]<<16|u[d+27|0]<<24,c[l+28>>2]=f,f=u[d+20|0]|u[d+21|0]<<8|u[d+22|0]<<16|u[d+23|0]<<24,c[l+16>>2]=u[d+16|0]|u[d+17|0]<<8|u[d+18|0]<<16|u[d+19|0]<<24,c[l+20>>2]=f,f=u[d+4|0]|u[d+5|0]<<8|u[d+6|0]<<16|u[d+7|0]<<24,c[l>>2]=u[0|d]|u[d+1|0]<<8|u[d+2|0]<<16|u[d+3|0]<<24,c[l+4>>2]=f,f=u[d+12|0]|u[d+13|0]<<8|u[d+14|0]<<16|u[d+15|0]<<24,c[l+8>>2]=u[d+8|0]|u[d+9|0]<<8|u[d+10|0]<<16|u[d+11|0]<<24,c[l+12>>2]=f,d=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,c[l+96>>2]=u[0|o]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,c[l+100>>2]=d,s[l+104|0]=r,s[l+111|0]=i>>>24,s[l+110|0]=i>>>16,s[l+109|0]=i>>>8,s[l+108|0]=i,s[l+107|0]=(16777215&i)<<8|r>>>24,s[l+106|0]=(65535&i)<<16|r>>>16,s[l+105|0]=(255&i)<<24|r>>>8;e:{if(!a&n>>>0>=64|a){for(;;){for(d=0,P(l+32|0,l+96|0,l);r=l+32|0,s[e+d|0]=u[r+d|0]^u[t+d|0],s[(o=1|d)+e|0]=u[o+r|0]^u[t+o|0],64!=(0|(d=d+2|0)););if(o=u[l+104|0]+1|0,s[l+104|0]=o,o=u[l+105|0]+(o>>>8|0)|0,s[l+105|0]=o,o=u[l+106|0]+(o>>>8|0)|0,s[l+106|0]=o,o=u[l+107|0]+(o>>>8|0)|0,s[l+107|0]=o,o=u[l+108|0]+(o>>>8|0)|0,s[l+108|0]=o,o=u[l+109|0]+(o>>>8|0)|0,s[l+109|0]=o,o=u[l+110|0]+(o>>>8|0)|0,s[l+110|0]=o,s[l+111|0]=u[l+111|0]+(o>>>8|0),t=t- -64|0,e=e- -64|0,a=a-1|0,!(!(a=(n=n+-64|0)>>>0<4294967232?a+1|0:a)&n>>>0>63|a))break}if(!(n|a))break e}if(d=0,P(l+32|0,l+96|0,l),a=1&n,1!=(0|n))for(r=-2&n,o=0;i=l+32|0,s[e+d|0]=u[i+d|0]^u[t+d|0],s[(n=1|d)+e|0]=u[n+i|0]^u[t+n|0],d=d+2|0,(0|r)!=(0|(o=o+2|0)););a&&(s[e+d|0]=u[(l+32|0)+d|0]^u[t+d|0])}$e(l+32|0,64),$e(l,32)}return g=l+112|0,0}],ut.grow=function(e){var t=this.length;return this.length=this.length+e,t},ut.set=function(e,t){this[e]=t},ut.get=function(e){return this[e]},ut);function lt(){return i.byteLength/65536|0}return{f:function(){},g:function(e,t,n,a,o,r,i,s,c,u,d,l){return 0|be(e|=0,t|=0,n|=0,a|=0,(e=0)|(o|=0),r|=0,i|=0,e|(s|=0),c|=0,d|=0,l|=0)},h:function(e,t,n,a,o,i,s,u,d,l,f){return e|=0,t|=0,d|=0,d=a|=0,!(a=o|=0)&(o=0|d)>>>0<4294967280?(be(e,e+o|0,0,n|=0,o,a,i|=0,s|=0,u|=0,l|=0,f|=0),t&&(a=(e=o+16|0)>>>0<16?a+1|0:a,c[t>>2]=e,c[t+4>>2]=a)):(Le(),r()),0},i:function(e,t,n,a,o,r,i,s,c,u,d,l){return 0|fe(e|=0,t|=0,n|=0,a|=0,(e=0)|(o|=0),r|=0,i|=0,e|(s|=0),c|=0,d|=0,l|=0)},j:function(e,t,n,a,o,i,s,u,d,l,f){return e|=0,t|=0,d|=0,d=a|=0,!(a=o|=0)&(o=0|d)>>>0<4294967280?(fe(e,e+o|0,0,n|=0,o,a,i|=0,s|=0,u|=0,l|=0,f|=0),t&&(a=(e=o+16|0)>>>0<16?a+1|0:a,c[t>>2]=e,c[t+4>>2]=a)):(Le(),r()),0},k:function(e,t,n,a,o,r,i,s,c,u,d){return 0|pe(e|=0,n|=0,(e=0)|(a|=0),o|=0,r|=0,i|=0,e|(s|=0),c|=0,u|=0,d|=0)},l:function(e,t,n,a,o,r,i,s,u,d,l){return t|=0,n|=0,a|=0,o|=0,s|=0,s|=0,n=-1,!(r|=0)&(o|=0)>>>0>=16|r&&(n=pe(e|=0,a,o-16|0,r-(o>>>0<16)|0,(a+o|0)-16|0,i|=0,s,u|=0,d|=0,l|=0)),t&&(c[t>>2]=n?0:o-16|0,c[t+4>>2]=n?0:r-(o>>>0<16)|0),0|n},m:function(e,t,n,a,o,r,i,s,c,u,d){return 0|le(e|=0,n|=0,(e=0)|(a|=0),o|=0,r|=0,i|=0,e|(s|=0),c|=0,u|=0,d|=0)},n:function(e,t,n,a,o,r,i,s,u,d,l){return t|=0,n|=0,a|=0,o|=0,s|=0,s|=0,n=-1,!(r|=0)&(o|=0)>>>0>=16|r&&(n=le(e|=0,a,o-16|0,r-(o>>>0<16)|0,(a+o|0)-16|0,i|=0,s,u|=0,d|=0,l|=0)),t&&(c[t>>2]=n?0:o-16|0,c[t+4>>2]=n?0:r-(o>>>0<16)|0),0|n},o:tt,p:function(){return 12},q:ct,r:et,s:at,t:Xe,u:tt,v:st,w:ct,x:et,y:at,z:Xe,A:function(e,t,n,a,o,r,i,s,c,u,d,l){return 0|oe(e|=0,t|=0,n|=0,a|=0,(e=0)|(o|=0),r|=0,i|=0,e|(s|=0),c|=0,d|=0,l|=0)},B:function(e,t,n,a,o,i,s,u,d,l,f){return e|=0,t|=0,d|=0,d=a|=0,!(a=o|=0)&(o=0|d)>>>0<4294967280?(oe(e,e+o|0,0,n|=0,o,a,i|=0,s|=0,u|=0,l|=0,f|=0),t&&(a=(e=o+16|0)>>>0<16?a+1|0:a,c[t>>2]=e,c[t+4>>2]=a)):(Le(),r()),0},C:function(e,t,n,a,o,r,i,s,c,u,d){return 0|ae(e|=0,n|=0,(e=0)|(a|=0),o|=0,r|=0,i|=0,e|(s|=0),c|=0,u|=0,d|=0)},D:function(e,t,n,a,o,r,i,s,u,d,l){return t|=0,n|=0,a|=0,o|=0,s|=0,s|=0,n=-1,!(r|=0)&(o|=0)>>>0>=16|r&&(n=ae(e|=0,a,o-16|0,r-(o>>>0<16)|0,(a+o|0)-16|0,i|=0,s,u|=0,d|=0,l|=0)),t&&(c[t>>2]=n?0:o-16|0,c[t+4>>2]=n?0:r-(o>>>0<16)|0),0|n},E:tt,F:nt,G:ct,H:et,I:at,J:Xe,K:tt,L:tt,M:function(e,t,n,a,o){var r;return e|=0,t|=0,n|=0,a|=0,g=r=g-480|0,ee(r,o|=0),Ye(r,t,n,a),Me(r,r+416|0),t=c[r+444>>2],n=c[r+440>>2],s[e+24|0]=n,s[e+25|0]=n>>>8,s[e+26|0]=n>>>16,s[e+27|0]=n>>>24,s[e+28|0]=t,s[e+29|0]=t>>>8,s[e+30|0]=t>>>16,s[e+31|0]=t>>>24,t=c[r+436>>2],n=c[r+432>>2],s[e+16|0]=n,s[e+17|0]=n>>>8,s[e+18|0]=n>>>16,s[e+19|0]=n>>>24,s[e+20|0]=t,s[e+21|0]=t>>>8,s[e+22|0]=t>>>16,s[e+23|0]=t>>>24,t=c[r+428>>2],n=c[r+424>>2],s[e+8|0]=n,s[e+9|0]=n>>>8,s[e+10|0]=n>>>16,s[e+11|0]=n>>>24,s[e+12|0]=t,s[e+13|0]=t>>>8,s[e+14|0]=t>>>16,s[e+15|0]=t>>>24,t=c[r+420>>2],n=c[r+416>>2],s[0|e]=n,s[e+1|0]=n>>>8,s[e+2|0]=n>>>16,s[e+3|0]=n>>>24,s[e+4|0]=t,s[e+5|0]=t>>>8,s[e+6|0]=t>>>16,s[e+7|0]=t>>>24,g=r+480|0,0},N:function(e,t,n,a,o){var r,i;return e|=0,t|=0,n|=0,a|=0,g=r=g-512|0,ee(i=r+32|0,o|=0),Ye(i,t,n,a),Me(i,r+448|0),t=c[r+476>>2],c[r+24>>2]=c[r+472>>2],c[r+28>>2]=t,t=c[r+468>>2],c[r+16>>2]=c[r+464>>2],c[r+20>>2]=t,t=c[r+460>>2],c[r+8>>2]=c[r+456>>2],c[r+12>>2]=t,t=c[r+452>>2],c[r>>2]=c[r+448>>2],c[r+4>>2]=t,t=me(e,r),n=ce(r,e,32),g=r+512|0,n|((0|e)==(0|r)?-1:t)},O:Xe,P:tt,Q:tt,R:tt,S:tt,T:nt,U:et,V:at,W:function(e,t,n){e|=0,t|=0;var a,o=0;return g=a=g+-64|0,re(a,n|=0,32,0),n=c[a+28>>2],o=c[a+24>>2],s[t+24|0]=o,s[t+25|0]=o>>>8,s[t+26|0]=o>>>16,s[t+27|0]=o>>>24,s[t+28|0]=n,s[t+29|0]=n>>>8,s[t+30|0]=n>>>16,s[t+31|0]=n>>>24,n=c[a+20>>2],o=c[a+16>>2],s[t+16|0]=o,s[t+17|0]=o>>>8,s[t+18|0]=o>>>16,s[t+19|0]=o>>>24,s[t+20|0]=n,s[t+21|0]=n>>>8,s[t+22|0]=n>>>16,s[t+23|0]=n>>>24,n=c[a+12>>2],o=c[a+8>>2],s[t+8|0]=o,s[t+9|0]=o>>>8,s[t+10|0]=o>>>16,s[t+11|0]=o>>>24,s[t+12|0]=n,s[t+13|0]=n>>>8,s[t+14|0]=n>>>16,s[t+15|0]=n>>>24,n=c[a+4>>2],o=c[a>>2],s[0|t]=o,s[t+1|0]=o>>>8,s[t+2|0]=o>>>16,s[t+3|0]=o>>>24,s[t+4|0]=n,s[t+5|0]=n>>>8,s[t+6|0]=n>>>16,s[t+7|0]=n>>>24,$e(a,64),e=qe(e,t),g=a- -64|0,0|e},X:je,Y:Se,Z:Pe,_:function(e,t,n,a,o,r,i,s){var c,u;return e|=0,t|=0,n|=0,r|=0,u=a|=0,a=o|=0,g=c=g-32|0,o=-1,Se(c,i|=0,s|=0)||(o=te(e,t,n,u,a,r,c),$e(c,32)),g=c+32|0,0|o},$:function(e,t,n,a,o,i){return e|=0,t|=0,o|=0,i|=0,!(a|=0)&(n|=0)>>>0>=4294967280|a&&(Le(),r()),0|te(e+16|0,e,t,n,a,o,i)},aa:function(e,t,n,a,o,r,i){return 0|Ie(e|=0,t|=0,n|=0,a|=0,o|=0,r|=0,i|=0)},ba:Ue,ca:function(e,t,n,a,o,r,i,s){var c,u;return e|=0,t|=0,n|=0,r|=0,u=a|=0,a=o|=0,g=c=g-32|0,o=-1,Se(c,i|=0,s|=0)||(o=ne(e,t,n,u,a,r,c),$e(c,32)),g=c+32|0,0|o},da:Te,ea:function(e,t,n,a,o,r,i){return 0|we(e|=0,t|=0,n|=0,a|=0,o|=0,r|=0,i|=0)},fa:function(e,t,n,a,o){e|=0,t|=0,o|=0;var r,i,u,d=0,l=0;return i=n|=0,n=a|=0,u=a=g,g=r=a-512&-64,a=-1,je(r- -64|0,r+32|0)||(_(a=r+128|0,0,0,24),V(a,l=r- -64|0,32,0),V(a,o,32,0),Re(a,d=r+96|0,24),a=Ie(e+32|0,t,i,n,d,a=o,o=r+32|0),t=c[r+92>>2],n=c[r+88>>2],s[e+24|0]=n,s[e+25|0]=n>>>8,s[e+26|0]=n>>>16,s[e+27|0]=n>>>24,s[e+28|0]=t,s[e+29|0]=t>>>8,s[e+30|0]=t>>>16,s[e+31|0]=t>>>24,t=c[r+84>>2],n=c[r+80>>2],s[e+16|0]=n,s[e+17|0]=n>>>8,s[e+18|0]=n>>>16,s[e+19|0]=n>>>24,s[e+20|0]=t,s[e+21|0]=t>>>8,s[e+22|0]=t>>>16,s[e+23|0]=t>>>24,t=c[r+76>>2],n=c[r+72>>2],s[e+8|0]=n,s[e+9|0]=n>>>8,s[e+10|0]=n>>>16,s[e+11|0]=n>>>24,s[e+12|0]=t,s[e+13|0]=t>>>8,s[e+14|0]=t>>>16,s[e+15|0]=t>>>24,t=c[r+68>>2],n=c[r+64>>2],s[0|e]=n,s[e+1|0]=n>>>8,s[e+2|0]=n>>>16,s[e+3|0]=n>>>24,s[e+4|0]=t,s[e+5|0]=t>>>8,s[e+6|0]=t>>>16,s[e+7|0]=t>>>24,$e(o,32),$e(l,32),$e(d,24)),g=u,0|a},ga:function(e,t,n,a,o,r){e|=0,t|=0,o|=0,r|=0;var i,s,c=0,u=0;return i=c=g,g=c=c-448&-64,u=-1,s=a|=0,!a&(n|=0)>>>0>=48|a&&(_(a=c- -64|0,0,0,24),V(a,t,32,0),V(a,o,32,0),Re(o=a,a=c+32|0,24),u=we(e,t+32|0,n-32|0,s-(n>>>0<32)|0,a,t,r)),g=i,0|u},ha:function(){return 48},ia:et,ja:ot,ka:tt,la:et,ma:ot,na:tt,oa:function(){return 384},pa:function(e,t,n,a,o,r,i){return 0|G(e|=0,t|=0,n|=0,a|=0,o|=0,r|=0,i|=0)},qa:_,ra:function(e,t,n,a){return 0|V(e|=0,t|=0,n|=0,a|=0)},sa:Re,ta:Xe,ua:ot,va:function(e,t,n,a){return 0|re(e|=0,t|=0,n|=0,a|=0)},wa:et,xa:ot,ya:st,za:tt,Aa:function(e,t,n,a,o,i){e|=0,t|=0,n|=0,a|=0,i|=0;var s,d=0,l=0,f=0,p=0,b=0,m=0,h=0;return g=s=g-32|0,d=u[0|(o|=0)]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,o=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,c[s+24>>2]=0,c[s+28>>2]=0,c[s+16>>2]=d,c[s+20>>2]=o,c[s+8>>2]=0,c[s+12>>2]=0,c[(o=s)>>2]=n,c[o+4>>2]=a,t-65>>>0<=4294967246?(c[8916]=28,e=-1):t-65>>>0<4294967232?e=-1:(g=o=(f=g)-512&-64,!i|!e|((l=255&t)-65&255)>>>0<=191?(Le(),r()):(a=s+16|0,s?(p=725511199^(u[s+8|0]|u[s+9|0]<<8|u[s+10|0]<<16|u[s+11|0]<<24),b=-1694144372^(u[s+12|0]|u[s+13|0]<<8|u[s+14|0]<<16|u[s+15|0]<<24),n=-1377402159^(u[0|s]|u[s+1|0]<<8|u[s+2|0]<<16|u[s+3|0]<<24),t=1359893119^(u[s+4|0]|u[s+5|0]<<8|u[s+6|0]<<16|u[s+7|0]<<24)):(p=725511199,b=-1694144372,n=-1377402159,t=1359893119),a?(m=327033209^(u[a+8|0]|u[a+9|0]<<8|u[a+10|0]<<16|u[a+11|0]<<24),h=1541459225^(u[a+12|0]|u[a+13|0]<<8|u[a+14|0]<<16|u[a+15|0]<<24),d=-79577749^(u[0|a]|u[a+1|0]<<8|u[a+2|0]<<16|u[a+3|0]<<24),a=528734635^(u[a+4|0]|u[a+5|0]<<8|u[a+6|0]<<16|u[a+7|0]<<24)):(m=327033209,h=1541459225,d=-79577749,a=528734635),Ee(o- -64|0,0,293),c[o+56>>2]=m,c[o+60>>2]=h,c[o+48>>2]=d,c[o+52>>2]=a,c[o+40>>2]=p,c[o+44>>2]=b,c[o+32>>2]=n,c[o+36>>2]=t,c[o+24>>2]=1595750129,c[o+28>>2]=-1521486534,c[o+16>>2]=-23791573,c[o+20>>2]=1013904242,c[o+8>>2]=-2067093701,c[o+12>>2]=-1150833019,c[o>>2]=-222443256^(8192|l),c[o+4>>2]=1779033703,Ee(32+(t=o+384|0)|0,0,96),Ce(t,i,32),Ce(o+96|0,t,128),c[o+352>>2]=128,$e(t,128),R(o,e,l),g=f),e=0),g=s+32|0,0|e},Ba:Xe,Ca:function(e,t,n){return e|=0,G(t|=0,32,n|=0,32,0,0,0),0|Ke(e,t)},Da:function(e,t){return e|=0,ve(t|=0,32),0|Ke(e,t)},Ea:function(e,t,n,a,o){t|=0,n|=0,a|=0,o|=0;var i,c,d=0,l=0;if(c=d=g,g=d=d-512&-64,i=(e|=0)||t){if(l=-1,!Oe(d+96|0,a,o)){for(a=t||e,e=0,_(t=d+128|0,0,0,64),V(t,l=d+96|0,32,0),$e(l,32),V(t,n,32,0),V(t,o,32,0),Re(t,d+32|0,64),$e(t,384);t=(o=d+32|0)+e|0,s[e+i|0]=u[0|t],s[e+a|0]=u[t+32|0],s[(n=1|e)+i|0]=u[n+o|0],s[n+a|0]=u[t+33|0],32!=(0|(e=e+2|0)););$e(d+32|0,64),l=0}return g=c,0|l}Le(),r()},Fa:function(e,t,n,a,o){t|=0,n|=0,a|=0,o|=0;var i,c,d=0,l=0;if(c=d=g,g=d=d-512&-64,i=(e|=0)||t){if(l=-1,!Oe(d+96|0,a,o)){for(a=t||e,e=0,_(t=d+128|0,0,0,64),V(t,l=d+96|0,32,0),$e(l,32),V(t,o,32,0),V(t,n,32,0),Re(t,d+32|0,64),$e(t,384);t=(o=d+32|0)+e|0,s[e+a|0]=u[0|t],s[e+i|0]=u[t+32|0],s[(n=1|e)+a|0]=u[n+o|0],s[n+i|0]=u[t+33|0],32!=(0|(e=e+2|0)););$e(d+32|0,64),l=0}return g=c,0|l}Le(),r()},Ga:tt,Ha:tt,Ia:tt,Ja:tt,Ka:Ke,La:Oe,Ma:tt,Na:tt,Oa:tt,Pa:nt,Qa:et,Ra:at,Sa:Xe,Ta:Pe,Ua:function(e,t,n,a,o,i){return e|=0,t|=0,o|=0,i|=0,!(a|=0)&(n|=0)>>>0>=4294967280|a&&(Le(),r()),te(e+16|0,e,t,n,a,o,i),0},Va:Ue,Wa:Te,Xa:Xe,Ya:function(e,t,n){return e|=0,n|=0,ve(t|=0,24),j(e,t,n),s[e+32|0]=1,s[e+33|0]=0,s[e+34|0]=0,s[e+35|0]=0,n=u[t+16|0]|u[t+17|0]<<8|u[t+18|0]<<16|u[t+19|0]<<24,t=u[t+20|0]|u[t+21|0]<<8|u[t+22|0]<<16|u[t+23|0]<<24,s[e+44|0]=0,s[e+45|0]=0,s[e+46|0]=0,s[e+47|0]=0,s[e+48|0]=0,s[e+49|0]=0,s[e+50|0]=0,s[e+51|0]=0,s[e+36|0]=n,s[e+37|0]=n>>>8,s[e+38|0]=n>>>16,s[e+39|0]=n>>>24,s[e+40|0]=t,s[e+41|0]=t>>>8,s[e+42|0]=t>>>16,s[e+43|0]=t>>>24,0},Za:function(e,t,n){return j(e|=0,t|=0,n|=0),s[e+32|0]=1,s[e+33|0]=0,s[e+34|0]=0,s[e+35|0]=0,n=u[t+16|0]|u[t+17|0]<<8|u[t+18|0]<<16|u[t+19|0]<<24,t=u[t+20|0]|u[t+21|0]<<8|u[t+22|0]<<16|u[t+23|0]<<24,s[e+44|0]=0,s[e+45|0]=0,s[e+46|0]=0,s[e+47|0]=0,s[e+48|0]=0,s[e+49|0]=0,s[e+50|0]=0,s[e+51|0]=0,s[e+36|0]=n,s[e+37|0]=n>>>8,s[e+38|0]=n>>>16,s[e+39|0]=n>>>24,s[e+40|0]=t,s[e+41|0]=t>>>8,s[e+42|0]=t>>>16,s[e+43|0]=t>>>24,0},_a:function(e){var t,n=0,a=0;g=t=g-48|0,n=u[28+(e|=0)|0]|u[e+29|0]<<8|u[e+30|0]<<16|u[e+31|0]<<24,c[t+24>>2]=u[e+24|0]|u[e+25|0]<<8|u[e+26|0]<<16|u[e+27|0]<<24,c[t+28>>2]=n,n=u[e+20|0]|u[e+21|0]<<8|u[e+22|0]<<16|u[e+23|0]<<24,c[t+16>>2]=u[e+16|0]|u[e+17|0]<<8|u[e+18|0]<<16|u[e+19|0]<<24,c[t+20>>2]=n,n=u[e+4|0]|u[e+5|0]<<8|u[e+6|0]<<16|u[e+7|0]<<24,c[t>>2]=u[0|e]|u[e+1|0]<<8|u[e+2|0]<<16|u[e+3|0]<<24,c[t+4>>2]=n,n=u[e+12|0]|u[e+13|0]<<8|u[e+14|0]<<16|u[e+15|0]<<24,c[t+8>>2]=u[e+8|0]|u[e+9|0]<<8|u[e+10|0]<<16|u[e+11|0]<<24,c[t+12>>2]=n,n=u[e+40|0]|u[e+41|0]<<8|u[e+42|0]<<16|u[e+43|0]<<24,c[t+32>>2]=u[e+36|0]|u[e+37|0]<<8|u[e+38|0]<<16|u[e+39|0]<<24,c[t+36>>2]=n,ze(t,t,e+32|0,e),n=c[t+28>>2],a=c[t+24>>2],s[e+24|0]=a,s[e+25|0]=a>>>8,s[e+26|0]=a>>>16,s[e+27|0]=a>>>24,s[e+28|0]=n,s[e+29|0]=n>>>8,s[e+30|0]=n>>>16,s[e+31|0]=n>>>24,n=c[t+20>>2],a=c[t+16>>2],s[e+16|0]=a,s[e+17|0]=a>>>8,s[e+18|0]=a>>>16,s[e+19|0]=a>>>24,s[e+20|0]=n,s[e+21|0]=n>>>8,s[e+22|0]=n>>>16,s[e+23|0]=n>>>24,n=c[t+12>>2],a=c[t+8>>2],s[e+8|0]=a,s[e+9|0]=a>>>8,s[e+10|0]=a>>>16,s[e+11|0]=a>>>24,s[e+12|0]=n,s[e+13|0]=n>>>8,s[e+14|0]=n>>>16,s[e+15|0]=n>>>24,n=c[t+4>>2],a=c[t>>2],s[0|e]=a,s[e+1|0]=a>>>8,s[e+2|0]=a>>>16,s[e+3|0]=a>>>24,s[e+4|0]=n,s[e+5|0]=n>>>8,s[e+6|0]=n>>>16,s[e+7|0]=n>>>24,a=c[t+36>>2],n=c[t+32>>2],s[e+32|0]=1,s[e+33|0]=0,s[e+34|0]=0,s[e+35|0]=0,s[e+36|0]=n,s[e+37|0]=n>>>8,s[e+38|0]=n>>>16,s[e+39|0]=n>>>24,s[e+40|0]=a,s[e+41|0]=a>>>8,s[e+42|0]=a>>>16,s[e+43|0]=a>>>24,g=t+48|0},$a:function(e,t,n,a,o,i,d,l,f,p){e|=0,t|=0,a|=0,d|=0,f|=0,p|=0;var b,m=0,h=0,y=0;return m=o|=0,o=i|=0,m|=i=0,b=i|(l|=0),g=i=g-384|0,(n|=0)&&(c[n>>2]=0,c[n+4>>2]=0),!o&m>>>0<4294967279?(We(h=i+16|0,64,y=e+32|0,e),Qe(l=i+80|0,h),$e(h,64),Ve(l,d,b,f),Ve(l,33904,0-b&15,0),c[i+72>>2]=0,c[i+76>>2]=0,c[(d=i- -64|0)>>2]=0,c[d+4>>2]=0,c[i+56>>2]=0,c[i+60>>2]=0,c[i+48>>2]=0,c[i+52>>2]=0,c[i+40>>2]=0,c[i+44>>2]=0,c[i+32>>2]=0,c[i+36>>2]=0,c[i+16>>2]=0,c[i+20>>2]=0,c[i+24>>2]=0,c[i+28>>2]=0,s[i+16|0]=p,ye(h,h,64,0,y,1,e),Ve(l,h,64,0),s[0|t]=u[i+16|0],ye(t=t+1|0,a,m,o,y,2,e),Ve(l,t,m,o),Ve(l,33904,15&m,0),c[i+8>>2]=b,c[i+12>>2]=f,Ve(l,a=i+8|0,8,0),c[i+8>>2]=m- -64,c[i+12>>2]=o-((m>>>0<4294967232)-1|0),Ve(l,a,8,0),Je(l,t=t+m|0),$e(l,256),s[e+36|0]=u[e+36|0]^u[0|t],s[e+37|0]=u[e+37|0]^u[t+1|0],s[e+38|0]=u[e+38|0]^u[t+2|0],s[e+39|0]=u[e+39|0]^u[t+3|0],s[e+40|0]=u[e+40|0]^u[t+4|0],s[e+41|0]=u[e+41|0]^u[t+5|0],s[e+42|0]=u[e+42|0]^u[t+6|0],s[e+43|0]=u[e+43|0]^u[t+7|0],he(y),(2&p||ie(y,4))&&(t=u[e+28|0]|u[e+29|0]<<8|u[e+30|0]<<16|u[e+31|0]<<24,c[i+360>>2]=u[e+24|0]|u[e+25|0]<<8|u[e+26|0]<<16|u[e+27|0]<<24,c[i+364>>2]=t,t=u[e+20|0]|u[e+21|0]<<8|u[e+22|0]<<16|u[e+23|0]<<24,c[i+352>>2]=u[e+16|0]|u[e+17|0]<<8|u[e+18|0]<<16|u[e+19|0]<<24,c[i+356>>2]=t,t=u[e+4|0]|u[e+5|0]<<8|u[e+6|0]<<16|u[e+7|0]<<24,c[i+336>>2]=u[0|e]|u[e+1|0]<<8|u[e+2|0]<<16|u[e+3|0]<<24,c[i+340>>2]=t,t=u[e+12|0]|u[e+13|0]<<8|u[e+14|0]<<16|u[e+15|0]<<24,c[i+344>>2]=u[e+8|0]|u[e+9|0]<<8|u[e+10|0]<<16|u[e+11|0]<<24,c[i+348>>2]=t,t=u[e+40|0]|u[e+41|0]<<8|u[e+42|0]<<16|u[e+43|0]<<24,c[i+368>>2]=u[e+36|0]|u[e+37|0]<<8|u[e+38|0]<<16|u[e+39|0]<<24,c[i+372>>2]=t,ze(t=i+336|0,t,y,e),t=c[i+364>>2],a=c[i+360>>2],s[e+24|0]=a,s[e+25|0]=a>>>8,s[e+26|0]=a>>>16,s[e+27|0]=a>>>24,s[e+28|0]=t,s[e+29|0]=t>>>8,s[e+30|0]=t>>>16,s[e+31|0]=t>>>24,t=c[i+356>>2],a=c[i+352>>2],s[e+16|0]=a,s[e+17|0]=a>>>8,s[e+18|0]=a>>>16,s[e+19|0]=a>>>24,s[e+20|0]=t,s[e+21|0]=t>>>8,s[e+22|0]=t>>>16,s[e+23|0]=t>>>24,t=c[i+348>>2],a=c[i+344>>2],s[e+8|0]=a,s[e+9|0]=a>>>8,s[e+10|0]=a>>>16,s[e+11|0]=a>>>24,s[e+12|0]=t,s[e+13|0]=t>>>8,s[e+14|0]=t>>>16,s[e+15|0]=t>>>24,t=c[i+340>>2],a=c[i+336>>2],s[0|e]=a,s[e+1|0]=a>>>8,s[e+2|0]=a>>>16,s[e+3|0]=a>>>24,s[e+4|0]=t,s[e+5|0]=t>>>8,s[e+6|0]=t>>>16,s[e+7|0]=t>>>24,t=c[i+368>>2],a=c[i+372>>2],s[e+32|0]=1,s[e+33|0]=0,s[e+34|0]=0,s[e+35|0]=0,s[e+36|0]=t,s[e+37|0]=t>>>8,s[e+38|0]=t>>>16,s[e+39|0]=t>>>24,s[e+40|0]=a,s[e+41|0]=a>>>8,s[e+42|0]=a>>>16,s[e+43|0]=a>>>24),n&&(o=(e=m+17|0)>>>0<17?o+1|0:o,c[n>>2]=e,c[n+4>>2]=o),g=i+384|0):(Le(),r()),0},ab:function(e,t,n,a,o,i,d,l,f,p){e|=0,t|=0,a|=0,o|=0,l|=0,p|=0;var b,m=0,h=0,y=0,v=0,w=0,k=0;m=i|=0,i=d|=0,h=0|m,b=f|=0,g=d=g-400|0,(n|=0)&&(c[n>>2]=0,c[n+4>>2]=0),a&&(s[0|a]=255),k=-1;e:{t:{if(!(!i&h>>>0<17)){if(w=m=i-(h>>>0<17)|0,!m&(f=h-17|0)>>>0>=4294967279|m)break t;We(y=d+32|0,64,v=e+32|0,e),Qe(m=d+96|0,y),$e(y,64),Ve(m,l,b,p),Ve(m,33904,0-b&15,0),c[d+88>>2]=0,c[d+92>>2]=0,c[d+80>>2]=0,c[d+84>>2]=0,c[d+72>>2]=0,c[d+76>>2]=0,c[(l=d- -64|0)>>2]=0,c[l+4>>2]=0,c[d+56>>2]=0,c[d+60>>2]=0,c[d+48>>2]=0,c[d+52>>2]=0,c[d+40>>2]=0,c[d+44>>2]=0,c[d+32>>2]=0,c[d+36>>2]=0,s[d+32|0]=u[0|o],ye(y,y,64,0,v,1,e),l=u[d+32|0],s[d+32|0]=u[0|o],Ve(m,y,64,0),Ve(m,o=o+1|0,f,w),Ve(m,33904,h-1&15,0),c[d+24>>2]=b,c[d+28>>2]=p,Ve(m,p=d+24|0,8,0),i=(h=h+47|0)>>>0<47?i+1|0:i,c[d+24>>2]=h,c[d+28>>2]=i,Ve(m,p,8,0),Je(m,d),$e(m,256),ce(d,o+f|0,16)?$e(d,16):(ye(t,o,f,w,v,2,e),s[e+36|0]=u[e+36|0]^u[0|d],s[e+37|0]=u[e+37|0]^u[d+1|0],s[e+38|0]=u[e+38|0]^u[d+2|0],s[e+39|0]=u[e+39|0]^u[d+3|0],s[e+40|0]=u[e+40|0]^u[d+4|0],s[e+41|0]=u[e+41|0]^u[d+5|0],s[e+42|0]=u[e+42|0]^u[d+6|0],s[e+43|0]=u[e+43|0]^u[d+7|0],he(v),(2&l||ie(v,4))&&(t=u[e+28|0]|u[e+29|0]<<8|u[e+30|0]<<16|u[e+31|0]<<24,c[d+376>>2]=u[e+24|0]|u[e+25|0]<<8|u[e+26|0]<<16|u[e+27|0]<<24,c[d+380>>2]=t,t=u[e+20|0]|u[e+21|0]<<8|u[e+22|0]<<16|u[e+23|0]<<24,c[d+368>>2]=u[e+16|0]|u[e+17|0]<<8|u[e+18|0]<<16|u[e+19|0]<<24,c[d+372>>2]=t,t=u[e+4|0]|u[e+5|0]<<8|u[e+6|0]<<16|u[e+7|0]<<24,c[d+352>>2]=u[0|e]|u[e+1|0]<<8|u[e+2|0]<<16|u[e+3|0]<<24,c[d+356>>2]=t,t=u[e+12|0]|u[e+13|0]<<8|u[e+14|0]<<16|u[e+15|0]<<24,c[d+360>>2]=u[e+8|0]|u[e+9|0]<<8|u[e+10|0]<<16|u[e+11|0]<<24,c[d+364>>2]=t,t=u[e+40|0]|u[e+41|0]<<8|u[e+42|0]<<16|u[e+43|0]<<24,c[d+384>>2]=u[e+36|0]|u[e+37|0]<<8|u[e+38|0]<<16|u[e+39|0]<<24,c[d+388>>2]=t,ze(t=d+352|0,t,v,e),t=c[d+380>>2],o=c[d+376>>2],s[e+24|0]=o,s[e+25|0]=o>>>8,s[e+26|0]=o>>>16,s[e+27|0]=o>>>24,s[e+28|0]=t,s[e+29|0]=t>>>8,s[e+30|0]=t>>>16,s[e+31|0]=t>>>24,t=c[d+372>>2],o=c[d+368>>2],s[e+16|0]=o,s[e+17|0]=o>>>8,s[e+18|0]=o>>>16,s[e+19|0]=o>>>24,s[e+20|0]=t,s[e+21|0]=t>>>8,s[e+22|0]=t>>>16,s[e+23|0]=t>>>24,t=c[d+364>>2],o=c[d+360>>2],s[e+8|0]=o,s[e+9|0]=o>>>8,s[e+10|0]=o>>>16,s[e+11|0]=o>>>24,s[e+12|0]=t,s[e+13|0]=t>>>8,s[e+14|0]=t>>>16,s[e+15|0]=t>>>24,t=c[d+356>>2],o=c[d+352>>2],s[0|e]=o,s[e+1|0]=o>>>8,s[e+2|0]=o>>>16,s[e+3|0]=o>>>24,s[e+4|0]=t,s[e+5|0]=t>>>8,s[e+6|0]=t>>>16,s[e+7|0]=t>>>24,t=c[d+384>>2],o=c[d+388>>2],s[e+32|0]=1,s[e+33|0]=0,s[e+34|0]=0,s[e+35|0]=0,s[e+36|0]=t,s[e+37|0]=t>>>8,s[e+38|0]=t>>>16,s[e+39|0]=t>>>24,s[e+40|0]=o,s[e+41|0]=o>>>8,s[e+42|0]=o>>>16,s[e+43|0]=o>>>24),n&&(c[n>>2]=f,c[n+4>>2]=w),k=0,a&&(s[0|a]=l))}g=d+400|0;break e}Le(),r()}return 0|k},bb:function(){return 52},cb:function(){return 17},db:nt,eb:tt,fb:function(){return-18},gb:ct,hb:rt,ib:function(){return 2},jb:it,kb:st,lb:et,mb:function(e,t,n,a,o){e|=0,t|=0,n|=0,a|=0;var r,i=0,c=0,d=0,l=0,f=0,p=0,b=0,m=0,h=0,g=0,v=0,w=0,k=0,A=0,x=0,I=0;if(k=1886610805^(o=u[0|(i=o|=0)]|u[i+1|0]<<8|u[i+2|0]<<16|u[i+3|0]<<24),A=1936682341^(c=u[i+4|0]|u[i+5|0]<<8|u[i+6|0]<<16|u[i+7|0]<<24),o^=1852142177,d=1819895653^c,x=1852075885^(c=u[i+8|0]|u[i+9|0]<<8|u[i+10|0]<<16|u[i+11|0]<<24),I=1685025377^(i=u[i+12|0]|u[i+13|0]<<8|u[i+14|0]<<16|u[i+15|0]<<24),l=2037671283^c,c=1952801890^i,g=n,(0|(m=(t+n|0)-(r=7&n)|0))!=(0|t)){for(;n=(v=c^(w=u[t+4|0]|u[t+5|0]<<8|u[t+6|0]<<16|u[t+7|0]<<24))+d|0,l=o=(i=a=l^(h=u[0|t]|u[t+1|0]<<8|u[t+2|0]<<16|u[t+3|0]<<24))+o|0,b=n=o>>>0>>0?n+1|0:n,n=A+I|0,n=(d=k+x|0)>>>0>>0?n+1|0:n,i=de(x,I,13)^d,c=n,n=b+(o=n^y)|0,n=i>>>0>(f=l+i|0)>>>0?n+1|0:n,i=de(i,o,17)^f,p=n,k=de(i,o=n^y,13),A=y,n=de(a,v,16),a=b^y,v=n^l,c=de(d,c,32),n=y+a|0,n=(c=(d=v+c|0)>>>0>>0?n+1|0:n)+o|0,b=n=(l=i+d|0)>>>0>>0?n+1|0:n,k=de(i=l^k,o=n^A,17),A=y,n=de(v,a,21),a=c^y,v=n^d,c=de(f,p,32),n=y+a|0,n=(c=(d=v+c|0)>>>0>>0?n+1|0:n)+o|0,x=(i=i+d|0)^k,o=n=i>>>0>>0?n+1|0:n,I=n^A,n=de(v,a,16),f=c^=y,p=de(n^=d,c,21),d=y,b=(c=de(l,b,32))+n|0,n=y+f|0,l=p^b,c=(n=c>>>0>b>>>0?n+1|0:n)^d,o=de(i,o,32),d=y,k=b^h,A=n^w,(0|m)!=(0|(t=t+8|0)););t=m}switch(w=0,p=g<<24,r-1|0){case 6:p|=u[t+6|0]<<16;case 5:p|=u[t+5|0]<<8;case 4:p|=u[t+4|0];case 3:w|=(a=u[t+3|0])<<24,p|=n=a>>>8|0;case 2:w|=(a=u[t+2|0])<<16,p|=n=a>>>16|0;case 1:w|=(a=u[t+1|0])<<8,p|=n=a>>>24|0;case 0:w=u[0|t]|w}return t=e,a=de(i=l^w,e=c^p,16),e=e+d|0,b=e=(l=o+i|0)>>>0>>0?e+1|0:e,f=de(o=a^l,e^=n=y,21),c=y,n=A+I|0,a=n=(i=k+x|0)>>>0>>0?n+1|0:n,m=o,o=de(i,n,32),n=y+e|0,e=c,c=n=o>>>0>(d=m+o|0)>>>0?n+1|0:n,g=de(o=d^f,e^=n,16),h=y,i=(n=l)+(l=m=de(x,I,13)^i)|0,n=(f=y^a)+b|0,a=i,b=o,o=de(i,n=i>>>0>>0?n+1|0:n,32),e=y+e|0,v=de(i=(l=b+o|0)^g,o=(b=o>>>0>l>>>0?e+1|0:e)^h,21),h=y,m=de(m,f,17)^a,n=(f=y^n)+c|0,e=n=(e=m)>>>0>(a=e+d|0)>>>0?n+1|0:n,c=i,i=de(a,n,32),n=y+o|0,g=n=(c=i>>>0>(d=c+i|0)>>>0?n+1|0:n)^h,h=de(v^=d,n,16),i=y,m=de(m,f,13)^a,e=(f=e^y)+b|0,a=e=(n=m)>>>0>(o=n+l|0)>>>0?e+1|0:e,e=de(o,e,32),n=g+y|0,g=n=(l=i)^(i=(e=v+(255^e)|0)>>>0>>0?n+1|0:n),l=e,h=de(v=h^e,n,21),b=y,m=de(m,f,17)^o,n=(f=a^y)+(c^p)|0,a=n=(e=d^w)>>>0>(o=m+e|0)>>>0?n+1|0:n,e=de(o,n,32),n=g+y|0,n=(c=(e=e+v|0)>>>0>>0?n+1|0:n)^b,b=e,h=de(g=h^e,n,16),d=y,f=de(m,f,13)^o,e=i+(p=y^a)|0,a=e=(o=l+f|0)>>>0>>0?e+1|0:e,e=de(o,e,32),n=n+y|0,m=n=(i=(e=e+g|0)>>>0>>0?n+1|0:n)^d,d=e,h=de(g=h^e,n,21),l=y,e=de(f,p,17),n=c+(f=a^y)|0,a=n=(o=b+(p=e^o)|0)>>>0>>0?n+1|0:n,e=de(o,n,32),n=m+y|0,l=n=(c=(e=e+g|0)>>>0>>0?n+1|0:n)^l,b=e,m=de(g=h^e,n,16),h=y,e=de(p,f,13),n=i+(f=a^y)|0,a=n=(i=d+(p=e^o)|0)>>>0>>0?n+1|0:n,e=de(i,n,32),n=l+y|0,l=e=e+g|0,d=n=e>>>0>>0?n+1|0:n,g=de(o=m^e,e=n^h,21),m=y,p=de(p,f,17),n=c+(h=a^y)|0,f=i^p,i=o,o=de(a=b+f|0,n=a>>>0>>0?n+1|0:n,32),e=y+e|0,m=de(i=(b=i+o|0)^g,o=(c=o>>>0>b>>>0?e+1|0:e)^m,16),p=y,e=de(f,h,13),n=d+(h=n^y)|0,e=n=(a=l+(f=e^a)|0)>>>0>>0?n+1|0:n,d=de(a,n,32),n=y+o|0,o=i=d+i|0,p=de(i^m,(n=i>>>0>>0?n+1|0:n)^p,21),l=y,a=de(f,h,17)^a,d=de(a,e^=y,13),e=e+c|0,c=e=y^((a=a+b|0)>>>0>>0?e+1|0:e),a=de(i=a^d,e,17)^p,e=y^l,n=n+c|0,l=o,a=de(o=o+i|0,n=l>>>0>o>>>0?n+1|0:n,32)^a^o,s[0|t]=a,s[t+1|0]=a>>>8,s[t+2|0]=a>>>16,s[t+3|0]=a>>>24,e^=n^y,s[t+4|0]=e,s[t+5|0]=e>>>8,s[t+6|0]=e>>>16,s[t+7|0]=e>>>24,0},nb:function(e){ve(e|=0,16)},ob:function(){return 208},pb:ot,qb:tt,rb:tt,sb:ot,tb:function(){return-65},ub:function(e,t,n){e|=0;var a,o,r,i,c=0,d=0,l=0,f=0,p=0;return g=r=g-160|0,re(t|=0,n|=0,32,0),s[0|t]=248&u[0|t],s[t+31|0]=63&u[t+31|0]|64,F(r,t),Ae(e,r),d=u[(o=n)+8|0]|u[o+9|0]<<8|u[o+10|0]<<16|u[o+11|0]<<24,c=u[o+12|0]|u[o+13|0]<<8|u[o+14|0]<<16|u[o+15|0]<<24,l=u[o+16|0]|u[o+17|0]<<8|u[o+18|0]<<16|u[o+19|0]<<24,f=u[o+20|0]|u[o+21|0]<<8|u[o+22|0]<<16|u[o+23|0]<<24,p=u[0|o]|u[o+1|0]<<8|u[o+2|0]<<16|u[o+3|0]<<24,n=u[o+4|0]|u[o+5|0]<<8|u[o+6|0]<<16|u[o+7|0]<<24,i=u[o+28|0]|u[o+29|0]<<8|u[o+30|0]<<16|u[o+31|0]<<24,a=t,t=u[o+24|0]|u[o+25|0]<<8|u[o+26|0]<<16|u[o+27|0]<<24,s[a+24|0]=t,s[a+25|0]=t>>>8,s[a+26|0]=t>>>16,s[a+27|0]=t>>>24,s[a+28|0]=i,s[a+29|0]=i>>>8,s[a+30|0]=i>>>16,s[a+31|0]=i>>>24,s[a+16|0]=l,s[a+17|0]=l>>>8,s[a+18|0]=l>>>16,s[a+19|0]=l>>>24,s[a+20|0]=f,s[a+21|0]=f>>>8,s[a+22|0]=f>>>16,s[a+23|0]=f>>>24,s[a+8|0]=d,s[a+9|0]=d>>>8,s[a+10|0]=d>>>16,s[a+11|0]=d>>>24,s[a+12|0]=c,s[a+13|0]=c>>>8,s[a+14|0]=c>>>16,s[a+15|0]=c>>>24,s[0|a]=p,s[a+1|0]=p>>>8,s[a+2|0]=p>>>16,s[a+3|0]=p>>>24,s[a+4|0]=n,s[a+5|0]=n>>>8,s[a+6|0]=n>>>16,s[a+7|0]=n>>>24,l=u[(c=e)+8|0]|u[c+9|0]<<8|u[c+10|0]<<16|u[c+11|0]<<24,f=u[c+12|0]|u[c+13|0]<<8|u[c+14|0]<<16|u[c+15|0]<<24,p=u[c+16|0]|u[c+17|0]<<8|u[c+18|0]<<16|u[c+19|0]<<24,n=u[c+20|0]|u[c+21|0]<<8|u[c+22|0]<<16|u[c+23|0]<<24,t=u[0|c]|u[c+1|0]<<8|u[c+2|0]<<16|u[c+3|0]<<24,e=u[c+4|0]|u[c+5|0]<<8|u[c+6|0]<<16|u[c+7|0]<<24,d=u[c+28|0]|u[c+29|0]<<8|u[c+30|0]<<16|u[c+31|0]<<24,c=u[c+24|0]|u[c+25|0]<<8|u[c+26|0]<<16|u[c+27|0]<<24,s[a+56|0]=c,s[a+57|0]=c>>>8,s[a+58|0]=c>>>16,s[a+59|0]=c>>>24,s[a+60|0]=d,s[a+61|0]=d>>>8,s[a+62|0]=d>>>16,s[a+63|0]=d>>>24,s[a+48|0]=p,s[a+49|0]=p>>>8,s[a+50|0]=p>>>16,s[a+51|0]=p>>>24,s[a+52|0]=n,s[a+53|0]=n>>>8,s[a+54|0]=n>>>16,s[a+55|0]=n>>>24,s[a+40|0]=l,s[a+41|0]=l>>>8,s[a+42|0]=l>>>16,s[a+43|0]=l>>>24,s[a+44|0]=f,s[a+45|0]=f>>>8,s[a+46|0]=f>>>16,s[a+47|0]=f>>>24,s[a+32|0]=t,s[a+33|0]=t>>>8,s[a+34|0]=t>>>16,s[a+35|0]=t>>>24,s[a+36|0]=e,s[a+37|0]=e>>>8,s[a+38|0]=e>>>16,s[a+39|0]=e>>>24,g=r+160|0,0},vb:function(e,t){e|=0,t|=0;var n,a,o,r,i,d=0,l=0,f=0;return g=l=g-192|0,ve(l,32),re(t,l,32,0),s[0|t]=248&u[0|t],s[t+31|0]=63&u[t+31|0]|64,F(f=l+32|0,t),Ae(e,f),n=l,f=c[l+28>>2],l=c[l+24>>2],s[t+24|0]=l,s[t+25|0]=l>>>8,s[t+26|0]=l>>>16,s[t+27|0]=l>>>24,s[t+28|0]=f,s[t+29|0]=f>>>8,s[t+30|0]=f>>>16,s[t+31|0]=f>>>24,f=c[n+20>>2],l=c[n+16>>2],s[t+16|0]=l,s[t+17|0]=l>>>8,s[t+18|0]=l>>>16,s[t+19|0]=l>>>24,s[t+20|0]=f,s[t+21|0]=f>>>8,s[t+22|0]=f>>>16,s[t+23|0]=f>>>24,f=c[n+12>>2],l=c[n+8>>2],s[t+8|0]=l,s[t+9|0]=l>>>8,s[t+10|0]=l>>>16,s[t+11|0]=l>>>24,s[t+12|0]=f,s[t+13|0]=f>>>8,s[t+14|0]=f>>>16,s[t+15|0]=f>>>24,f=c[n+4>>2],l=c[n>>2],s[0|t]=l,s[t+1|0]=l>>>8,s[t+2|0]=l>>>16,s[t+3|0]=l>>>24,s[t+4|0]=f,s[t+5|0]=f>>>8,s[t+6|0]=f>>>16,s[t+7|0]=f>>>24,a=u[(d=e)+8|0]|u[d+9|0]<<8|u[d+10|0]<<16|u[d+11|0]<<24,o=u[d+12|0]|u[d+13|0]<<8|u[d+14|0]<<16|u[d+15|0]<<24,r=u[d+16|0]|u[d+17|0]<<8|u[d+18|0]<<16|u[d+19|0]<<24,f=u[d+20|0]|u[d+21|0]<<8|u[d+22|0]<<16|u[d+23|0]<<24,l=u[0|d]|u[d+1|0]<<8|u[d+2|0]<<16|u[d+3|0]<<24,e=u[d+4|0]|u[d+5|0]<<8|u[d+6|0]<<16|u[d+7|0]<<24,i=u[d+28|0]|u[d+29|0]<<8|u[d+30|0]<<16|u[d+31|0]<<24,d=u[d+24|0]|u[d+25|0]<<8|u[d+26|0]<<16|u[d+27|0]<<24,s[t+56|0]=d,s[t+57|0]=d>>>8,s[t+58|0]=d>>>16,s[t+59|0]=d>>>24,s[t+60|0]=i,s[t+61|0]=i>>>8,s[t+62|0]=i>>>16,s[t+63|0]=i>>>24,s[t+48|0]=r,s[t+49|0]=r>>>8,s[t+50|0]=r>>>16,s[t+51|0]=r>>>24,s[t+52|0]=f,s[t+53|0]=f>>>8,s[t+54|0]=f>>>16,s[t+55|0]=f>>>24,s[t+40|0]=a,s[t+41|0]=a>>>8,s[t+42|0]=a>>>16,s[t+43|0]=a>>>24,s[t+44|0]=o,s[t+45|0]=o>>>8,s[t+46|0]=o>>>16,s[t+47|0]=o>>>24,s[t+32|0]=l,s[t+33|0]=l>>>8,s[t+34|0]=l>>>16,s[t+35|0]=l>>>24,s[t+36|0]=e,s[t+37|0]=e>>>8,s[t+38|0]=e>>>16,s[t+39|0]=e>>>24,$e(n,32),g=n+192|0,0},wb:function(e,t,n,a,o,r){t|=0,o|=0,r|=0;var i,s=0;return g=i=g-16|0,w(e|=0,i+8|0,xe(e- -64|0,n|=0,a|=0),a,o,r,0),64!=c[i+8>>2]|c[i+12>>2]?(t&&(c[t>>2]=0,c[t+4>>2]=0),Ee(e,0,a- -64|0),s=-1):t&&(c[t>>2]=a- -64,c[t+4>>2]=o-((a>>>0<4294967232)-1|0)),g=i+16|0,0|s},xb:function(e,t,n,a,o,r){e|=0,t|=0,n|=0;var i=0;e:{t:{if(!(!(o|=0)&(a|=0)>>>0<64||(o=o-1|0,!(o=(a=a+-64|0)>>>0<4294967232?o+1|0:o)&a>>>0>4294967231|o))){if(!x(n,i=n- -64|0,a,o,r|=0,0))break t;e&&Ee(e,0,a)}if(n=-1,!t)break e;c[t>>2]=0,c[t+4>>2]=0;break e}t&&(c[t>>2]=a,c[t+4>>2]=o),n=0,e&&xe(e,i,a)}return 0|n},yb:function(e,t,n,a,o,r){return w(e|=0,t|=0,n|=0,a|=0,o|=0,r|=0,0),0},zb:function(e,t,n,a,o){return 0|x(e|=0,t|=0,n|=0,a|=0,o|=0,0)},Ab:function(e){return se(e|=0),0},Bb:function(e,t,n,a){return 0|L(e|=0,t|=0,n|=0,a|=0)},Cb:function(e,t,n,a){var o;return t|=0,n|=0,a|=0,g=o=g+-64|0,E(e|=0,o),e=w(t,n,o,64,0,a,1),g=o- -64|0,0|e},Db:function(e,t,n){var a;return t|=0,n|=0,g=a=g+-64|0,E(e|=0,a),e=x(t,a,64,0,n,1),g=a- -64|0,0|e},Eb:function(e,t){e|=0;var n,a=0,o=0,r=0,i=0,u=0,d=0,f=0,p=0,b=0,m=0,h=0,v=0,w=0,k=0,A=0,x=0,S=0,C=0,E=0,R=0,P=0,U=0,_=0,N=0,O=0,F=0,L=0,j=0,H=0,G=0,z=0,K=0,Z=0,V=0,Q=0,J=0,X=0,$=0,ee=0,te=0,ne=0,ae=0,oe=0,re=0,se=0,ce=0,de=0,le=0,fe=0,pe=0,be=0,me=0,he=0,ye=0,ve=0,we=0,ke=0,Ae=0,xe=0,Ie=0,Te=0,Se=0,Ce=0,Re=0,Me=0,Pe=0,Ue=0,_e=0,Be=0,De=0,Ne=0,Oe=0,Fe=0,Le=0,je=0,He=0,Ge=0,ze=0,Ke=0,We=0;if(g=n=g-256|0,Oe=-1,!ue(t|=0)&&!M(n+96|0,t)){for(g=a=g-2048|0,q(w=a+640|0,t=n+96|0),o=c[t+8>>2],i=c[t+12>>2],r=c[t+16>>2],u=c[t+20>>2],b=c[t+24>>2],m=c[t+28>>2],d=c[t>>2],f=c[t+4>>2],k=c[t+36>>2],c[a+352>>2]=c[t+32>>2],c[a+356>>2]=k,c[a+344>>2]=b,c[a+348>>2]=m,c[a+336>>2]=r,c[a+340>>2]=u,c[a+328>>2]=o,c[a+332>>2]=i,c[a+320>>2]=d,c[a+324>>2]=f,o=c[t+40>>2],i=c[t+44>>2],r=c[t+48>>2],u=c[t+52>>2],b=c[t+56>>2],m=c[t+60>>2],f=c[(d=t- -64|0)>>2],d=c[d+4>>2],k=c[t+76>>2],c[a+392>>2]=c[t+72>>2],c[a+396>>2]=k,c[a+384>>2]=f,c[a+388>>2]=d,c[a+376>>2]=b,c[a+380>>2]=m,c[a+368>>2]=r,c[a+372>>2]=u,c[a+360>>2]=o,c[a+364>>2]=i,o=c[t+80>>2],i=c[t+84>>2],r=c[t+88>>2],u=c[t+92>>2],b=c[t+96>>2],m=c[t+100>>2],d=c[t+104>>2],f=c[t+108>>2],k=c[t+116>>2],c[a+432>>2]=c[t+112>>2],c[a+436>>2]=k,c[a+424>>2]=d,c[a+428>>2]=f,c[a+416>>2]=b,c[a+420>>2]=m,c[a+408>>2]=r,c[a+412>>2]=u,c[a+400>>2]=o,c[a+404>>2]=i,T(t=a+480|0,o=a+320|0),I(d=a+160|0,t,i=a+600|0),I(a+200|0,r=a+520|0,u=a+560|0),I(a+240|0,u,i),I(a+280|0,t,r),D(t,d,w),I(o,t,i),I(w=a+360|0,r,u),I(b=a+400|0,u,i),I(m=a+440|0,t,r),q(f=a+800|0,o),D(t,d,f),I(o,t,i),I(w,r,u),I(b,u,i),I(m,t,r),q(f=a+960|0,o),D(t,d,f),I(o,t,i),I(w,r,u),I(b,u,i),I(m,t,r),q(f=a+1120|0,o),D(t,d,f),I(o,t,i),I(w,r,u),I(b,u,i),I(m,t,r),q(f=a+1280|0,o),D(t,d,f),I(o,t,i),I(w,r,u),I(b,u,i),I(m,t,r),q(f=a+1440|0,o),D(t,d,f),I(o,t,i),I(w,r,u),I(b,u,i),I(m,t,r),q(f=a+1600|0,o),D(t,d,f),I(o,t,i),I(w,r,u),I(b,u,i),I(m,t,r),q(a+1760|0,o),c[a+32>>2]=0,c[a+36>>2]=0,c[a+24>>2]=0,c[a+28>>2]=0,c[a+16>>2]=0,c[a+20>>2]=0,c[a+8>>2]=0,c[a+12>>2]=0,c[a+44>>2]=0,c[a+48>>2]=0,c[a+52>>2]=0,c[a+56>>2]=0,c[a+60>>2]=0,c[a+64>>2]=0,c[a+68>>2]=0,c[a+72>>2]=0,c[a+76>>2]=0,c[a+80>>2]=1,c[a>>2]=0,c[a+4>>2]=0,c[a+40>>2]=1,Ee(a+84|0,0,76),f=a+120|0,k=a+80|0,E=a+40|0,t=252;o=c[a+36>>2],c[a+1960>>2]=c[a+32>>2],c[a+1964>>2]=o,o=c[a+28>>2],c[a+1952>>2]=c[a+24>>2],c[a+1956>>2]=o,o=c[a+20>>2],c[a+1944>>2]=c[a+16>>2],c[a+1948>>2]=o,o=c[a+12>>2],c[a+1936>>2]=c[a+8>>2],c[a+1940>>2]=o,o=c[a+4>>2],c[a+1928>>2]=c[a>>2],c[a+1932>>2]=o,o=c[a+76>>2],c[a+2e3>>2]=c[a+72>>2],c[a+2004>>2]=o,o=c[a+68>>2],c[a+1992>>2]=c[a+64>>2],c[a+1996>>2]=o,o=c[a+60>>2],c[a+1984>>2]=c[a+56>>2],c[a+1988>>2]=o,o=c[a+52>>2],c[a+1976>>2]=c[a+48>>2],c[a+1980>>2]=o,o=c[a+44>>2],c[a+1968>>2]=c[a+40>>2],c[a+1972>>2]=o,o=c[a+84>>2],c[a+2008>>2]=c[a+80>>2],c[a+2012>>2]=o,o=c[a+92>>2],c[a+2016>>2]=c[a+88>>2],c[a+2020>>2]=o,o=c[a+100>>2],c[a+2024>>2]=c[a+96>>2],c[a+2028>>2]=o,o=c[a+108>>2],c[a+2032>>2]=c[a+104>>2],c[a+2036>>2]=o,o=c[a+116>>2],c[a+2040>>2]=c[a+112>>2],c[a+2044>>2]=o,o=t,t=s[t+33424|0],T(a+480|0,a+1928|0),(0|t)>0?(I(x=a+320|0,d=a+480|0,i),I(w,r,u),I(b,u,i),I(m,d,r),D(d,x,(a+640|0)+l((254&t)>>>1|0,160)|0)):(0|t)>=0||(I(x=a+320|0,d=a+480|0,i),I(w,r,u),I(b,u,i),I(m,d,r),B(d,x,(a+640|0)+l((0-t&254)>>>1|0,160)|0)),I(a,t=a+480|0,i),I(E,r,u),I(k,u,i),I(f,t,r),t=o-1|0,o;);Y(t=a+640|0,a),t=ie(t,32),g=a+2048|0,t&&(r=c[n+136>>2],c[n>>2]=1-r,Oe=0,K=c[n+172>>2],c[n+36>>2]=0-K,f=c[n+168>>2],c[n+32>>2]=0-f,Z=c[n+164>>2],c[n+28>>2]=0-Z,w=c[n+160>>2],c[n+24>>2]=0-w,V=c[n+156>>2],c[n+20>>2]=0-V,b=c[n+152>>2],c[n+16>>2]=0-b,Q=c[n+148>>2],c[n+12>>2]=0-Q,m=c[n+144>>2],c[n+8>>2]=0-m,J=c[n+140>>2],c[n+4>>2]=0-J,W(n,n),t=ge(E=c[n+4>>2],H=E>>31,R=V<<1,fe=R>>31),o=y,a=ge(u=c[n>>2],U=u>>31,w,_=w>>31),o=y+o|0,o=(t=a+t|0)>>>0>>0?o+1|0:o,a=(i=ge(N=c[n+8>>2],X=N>>31,b,O=b>>31))+t|0,t=y+o|0,t=a>>>0>>0?t+1|0:t,o=a,a=ge(G=c[n+12>>2],te=G>>31,oe=Q<<1,pe=oe>>31),t=y+t|0,t=a>>>0>(o=o+a|0)>>>0?t+1|0:t,a=ge($=c[n+16>>2],re=$>>31,m,F=m>>31),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,Pe=i=c[n+20>>2],d=ge(i,be=i>>31,se=J<<1,me=se>>31),a=y+t|0,a=(o=d+o|0)>>>0>>0?a+1|0:a,Ue=S=c[n+24>>2],t=(r=ge(S,Ce=S>>31,d=r+1|0,L=d>>31))+o|0,o=y+a|0,o=t>>>0>>0?o+1|0:o,he=c[n+28>>2],a=(r=ge(h=l(he,19),ne=h>>31,ce=K<<1,ye=ce>>31))+t|0,t=y+o|0,t=a>>>0>>0?t+1|0:t,o=a,Fe=c[n+32>>2],a=ge(x=l(Fe,19),ee=x>>31,f,j=f>>31),t=y+t|0,t=a>>>0>(o=o+a|0)>>>0?t+1|0:t,Le=c[n+36>>2],a=ge(k=l(Le,19),z=k>>31,de=Z<<1,ve=de>>31),t=y+t|0,v=o=a+o|0,r=a>>>0>o>>>0?t+1|0:t,t=ge(b,O,E,H),o=y,p=ge(u,U,V,we=V>>31),a=y+o|0,a=(t=p+t|0)>>>0

>>0?a+1|0:a,p=ge(N,X,Q,ke=Q>>31),o=y+a|0,o=(t=p+t|0)>>>0

>>0?o+1|0:o,a=(p=ge(m,F,G,te))+t|0,t=y+o|0,t=a>>>0

>>0?t+1|0:t,o=a,a=ge($,re,J,Ae=J>>31),t=y+t|0,t=a>>>0>(o=o+a|0)>>>0?t+1|0:t,a=ge(d,L,i,be),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,p=ge(S=l(S,19),le=S>>31,K,xe=K>>31),a=y+t|0,a=(o=p+o|0)>>>0

>>0?a+1|0:a,t=(p=ge(f,j,h,ne))+o|0,o=y+a|0,o=t>>>0

>>0?o+1|0:o,a=(p=ge(x,ee,Z,Ie=Z>>31))+t|0,t=y+o|0,t=a>>>0

>>0?t+1|0:t,o=a,a=ge(w,_,k,z),t=y+t|0,_e=o=o+a|0,ae=a>>>0>o>>>0?t+1|0:t,t=ge(E,H,oe,pe),a=y,o=(p=ge(u,U,b,O))+t|0,t=y+a|0,t=o>>>0

>>0?t+1|0:t,p=ge(m,F,N,X),a=y+t|0,a=(o=p+o|0)>>>0

>>0?a+1|0:a,t=(p=ge(G,te,se,me))+o|0,o=y+a|0,o=t>>>0

>>0?o+1|0:o,a=(p=ge(d,L,$,re))+t|0,t=y+o|0,t=a>>>0

>>0?t+1|0:t,o=a,a=ge(p=l(i,19),Te=p>>31,ce,ye),t=y+t|0,t=a>>>0>(o=o+a|0)>>>0?t+1|0:t,a=ge(f,j,S,le),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,i=ge(h,ne,de,ve),a=y+t|0,a=(o=i+o|0)>>>0>>0?a+1|0:a,t=(i=ge(w,_,x,ee))+o|0,o=y+a|0,o=t>>>0>>0?o+1|0:o,a=(i=ge(k,z,R,fe))+t|0,t=y+o|0,je=a,He=t=a>>>0>>0?t+1|0:t,Ge=a=a+33554432|0,ze=t=a>>>0<33554432?t+1|0:t,a=(67108863&t)<<6|a>>>26,t=(t>>26)+ae|0,_e=i=a+_e|0,a=t=a>>>0>i>>>0?t+1|0:t,Ke=t=i+16777216|0,i=(33554431&(a=t>>>0<16777216?a+1|0:a))<<7|t>>>25,t=(o=a>>25)+r|0,t=(a=i+v|0)>>>0>>0?t+1|0:t,Be=o=a+33554432|0,i=t=o>>>0<33554432?t+1|0:t,c[n+72>>2]=a-(-67108864&o),t=ge(E,H,se,me),o=y,r=ge(u,U,m,F),a=y+o|0,a=(t=r+t|0)>>>0>>0?a+1|0:a,o=(r=ge(d,L,N,X))+t|0,t=y+a|0,t=o>>>0>>0?t+1|0:t,a=ge(r=l(G,19),Se=r>>31,ce,ye),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,a=(v=ge(ae=l($,19),Re=ae>>31,f,j))+o|0,o=y+t|0,o=a>>>0>>0?o+1|0:o,v=ge(de,ve,p,Te),t=y+o|0,t=(a=v+a|0)>>>0>>0?t+1|0:t,o=(v=ge(w,_,S,le))+a|0,a=y+t|0,a=o>>>0>>0?a+1|0:a,v=ge(h,ne,R,fe),t=y+a|0,t=(o=v+o|0)>>>0>>0?t+1|0:t,a=ge(b,O,x,ee),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,a=(v=ge(k,z,oe,pe))+o|0,o=y+t|0,C=a,De=a>>>0>>0?o+1|0:o,t=ge(d,L,E,H),o=y,a=(v=ge(u,U,J,Ae))+t|0,t=y+o|0,t=a>>>0>>0?t+1|0:t,v=o=l(N,19),o=(A=ge(o,Me=o>>31,K,xe))+a|0,a=y+t|0,a=o>>>0>>0?a+1|0:a,A=ge(f,j,r,Se),t=y+a|0,t=(o=A+o|0)>>>0>>0?t+1|0:t,a=ge(ae,Re,Z,Ie),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,a=(A=ge(w,_,p,Te))+o|0,o=y+t|0,o=a>>>0>>0?o+1|0:o,A=ge(S,le,V,we),t=y+o|0,t=(a=A+a|0)>>>0>>0?t+1|0:t,o=(A=ge(b,O,h,ne))+a|0,a=y+t|0,a=o>>>0>>0?a+1|0:a,A=ge(x,ee,Q,ke),t=y+a|0,t=(o=A+o|0)>>>0>>0?t+1|0:t,a=ge(m,F,k,z),t=y+t|0,Ne=o=a+o|0,A=a>>>0>o>>>0?t+1|0:t,t=ge(t=l(E,19),t>>31,ce,ye),o=y,a=ge(u,U,d,L),o=y+o|0,o=(t=a+t|0)>>>0>>0?o+1|0:o,a=(v=ge(f,j,v,Me))+t|0,t=y+o|0,o=(r=ge(r,Se,de,ve))+a|0,a=y+(a>>>0>>0?t+1|0:t)|0,a=o>>>0>>0?a+1|0:a,r=ge(w,_,ae,Re),t=y+a|0,t=(o=r+o|0)>>>0>>0?t+1|0:t,a=ge(R,fe,p,Te),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,a=(r=ge(b,O,S,le))+o|0,o=y+t|0,o=a>>>0>>0?o+1|0:o,r=ge(h,ne,oe,pe),t=y+o|0,t=(a=r+a|0)>>>0>>0?t+1|0:t,o=(r=ge(m,F,x,ee))+a|0,a=y+t|0,a=o>>>0>>0?a+1|0:a,r=ge(k,z,se,me),t=y+a|0,v=o=r+o|0,Se=t=o>>>0>>0?t+1|0:t,Me=o=o+33554432|0,We=t=o>>>0<33554432?t+1|0:t,a=t>>26,t=(67108863&t)<<6|o>>>26,o=a+A|0,A=r=t+Ne|0,t=o=t>>>0>r>>>0?o+1|0:o,Ne=o=r+16777216|0,r=(33554431&(t=o>>>0<16777216?t+1|0:t))<<7|o>>>25,t=(t>>25)+De|0,t=(o=r+C|0)>>>0>>0?t+1|0:t,De=o=(a=o)+33554432|0,r=t=o>>>0<33554432?t+1|0:t,c[n+56>>2]=a-(-67108864&o),t=ge(w,_,E,H),a=y,o=(C=ge(u,U,Z,Ie))+t|0,t=y+a|0,t=o>>>0>>0?t+1|0:t,a=ge(N,X,V,we),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,a=ge(b,O,G,te),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,C=ge($,re,Q,ke),a=y+t|0,a=(o=C+o|0)>>>0>>0?a+1|0:a,t=(C=ge(m,F,Pe,be))+o|0,o=y+a|0,o=t>>>0>>0?o+1|0:o,a=(C=ge(J,Ae,Ue,Ce))+t|0,t=y+o|0,t=a>>>0>>0?t+1|0:t,o=a,a=ge(he,C=he>>31,d,L),t=y+t|0,t=a>>>0>(o=o+a|0)>>>0?t+1|0:t,a=ge(x,ee,K,xe),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,P=(a=o)+(o=ge(k,z,f,j))|0,a=y+t|0,o=(t=i>>26)+(o=o>>>0>P>>>0?a+1|0:a)|0,t=(a=(i=(67108863&i)<<6|Be>>>26)+P|0)>>>0>>0?o+1|0:o,Be=o=a+16777216|0,i=t=o>>>0<16777216?t+1|0:t,c[n+76>>2]=a-(-33554432&o),t=ge(m,F,E,H),o=y,P=ge(u,U,Q,ke),a=y+o|0,a=(t=P+t|0)>>>0

>>0?a+1|0:a,P=ge(N,X,J,Ae),o=y+a|0,o=(t=P+t|0)>>>0

>>0?o+1|0:o,a=(P=ge(d,L,G,te))+t|0,t=y+o|0,t=a>>>0

>>0?t+1|0:t,o=a,a=ge(ae,Re,K,xe),t=y+t|0,t=a>>>0>(o=o+a|0)>>>0?t+1|0:t,a=ge(f,j,p,Te),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,o=(S=ge(S,le,Z,Ie))+o|0,a=y+t|0,t=(h=ge(w,_,h,ne))+o|0,o=y+(o>>>0>>0?a+1|0:a)|0,a=(x=ge(x,ee,V,we))+t|0,t=y+(t>>>0>>0?o+1|0:o)|0,t=a>>>0>>0?t+1|0:t,o=a,a=ge(b,O,k,z),t=y+t|0,h=o=o+a|0,t=(t=a>>>0>o>>>0?t+1|0:t)+(o=r>>26)|0,a=(o=r=h+(a=(67108863&r)<<6|De>>>26)|0)>>>0>>0?t+1|0:t,x=t=o+16777216|0,r=a=t>>>0<16777216?a+1|0:a,c[n+60>>2]=o-(-33554432&t),t=ge(E,H,de,ve),a=y,o=(h=ge(u,U,f,j))+t|0,t=y+a|0,t=o>>>0>>0?t+1|0:t,a=ge(w,_,N,X),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,h=ge(G,te,R,fe),a=y+t|0,a=(o=h+o|0)>>>0>>0?a+1|0:a,t=(h=ge(b,O,$,re))+o|0,o=y+a|0,o=t>>>0>>0?o+1|0:o,a=(h=ge(oe,pe,Pe,be))+t|0,t=y+o|0,t=a>>>0>>0?t+1|0:t,o=a,a=ge(m,F,Ue,Ce),t=y+t|0,t=a>>>0>(o=o+a|0)>>>0?t+1|0:t,a=o,o=ge(he,C,se,me),t=y+t|0,t=(a=a+o|0)>>>0>>0?t+1|0:t,h=o=Fe,o=(R=ge(o,S=o>>31,d,L))+a|0,a=y+t|0,t=(k=ge(k,z,ce,ye))+o|0,o=y+(o>>>0>>0?a+1|0:a)|0,a=t>>>0>>0?o+1|0:o,o=t,t=(t=i>>25)+a|0,t=(o=o+(i=(33554431&i)<<7|Be>>>25)|0)>>>0>>0?t+1|0:t,k=o=(a=o)+33554432|0,i=t=o>>>0<33554432?t+1|0:t,c[n+80>>2]=a-(-67108864&o),o=r>>25,a=(r=(33554431&r)<<7|x>>>25)+(je-(t=-67108864&Ge)|0)|0,t=o+(He-((t>>>0>je>>>0)+ze|0)|0)|0,t=a>>>0>>0?t+1|0:t,r=t=(67108863&(t=(o=a+33554432|0)>>>0<33554432?t+1|0:t))<<6|o>>>26,t=t+(R=_e-(-33554432&Ke)|0)|0,c[n+68>>2]=t,c[n+64>>2]=a-(-67108864&o),t=ge(f,j,E,H),a=y,o=(r=ge(u,U,K,xe))+t|0,t=y+a|0,t=o>>>0>>0?t+1|0:t,a=(r=ge(N,X,Z,Ie))+o|0,o=y+t|0,o=a>>>0>>0?o+1|0:o,t=(r=ge(w,_,G,te))+a|0,a=y+o|0,a=t>>>0>>0?a+1|0:a,o=(r=ge($,re,V,we))+t|0,t=y+a|0,t=o>>>0>>0?t+1|0:t,a=ge(b,O,Pe,be),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,a=ge(Q,ke,Ue,Ce),t=y+t|0,t=a>>>0>(o=a+o|0)>>>0?t+1|0:t,a=(r=ge(m,F,he,C))+o|0,o=y+t|0,o=a>>>0>>0?o+1|0:o,r=(t=ge(h,S,J,Ae))+a|0,a=y+o|0,a=t>>>0>r>>>0?a+1|0:a,o=r,r=ge(t=Le,t>>31,d,L),t=y+a|0,a=o=o+r|0,t=(t=o>>>0>>0?t+1|0:t)+(o=i>>26)|0,t=(a=a+(i=(67108863&i)<<6|k>>>26)|0)>>>0>>0?t+1|0:t,t=(o=a+16777216|0)>>>0<16777216?t+1|0:t,c[n+84>>2]=a-(-33554432&o),i=A-(-33554432&Ne)|0,r=v-(a=-67108864&Me)|0,u=Se-((a>>>0>v>>>0)+We|0)|0,t=ge((33554431&(a=t))<<7|o>>>25,t=a>>25,19,0),o=y+u|0,t=t>>>0>(a=t+r|0)>>>0?o+1|0:o,r=t=(67108863&(t=(o=a+33554432|0)>>>0<33554432?t+1|0:t))<<6|o>>>26,t=t+i|0,c[n+52>>2]=t,c[n+48>>2]=a-(-67108864&o),Y(e,n+48|0))}return g=n+256|0,0|Oe},Fb:function(e,t){e|=0;var n,a=0;return g=n=g+-64|0,re(n,t|=0,32,0),s[0|n]=248&u[0|n],s[n+31|0]=63&u[n+31|0]|64,t=c[n+20>>2],a=c[n+16>>2],s[e+16|0]=a,s[e+17|0]=a>>>8,s[e+18|0]=a>>>16,s[e+19|0]=a>>>24,s[e+20|0]=t,s[e+21|0]=t>>>8,s[e+22|0]=t>>>16,s[e+23|0]=t>>>24,t=c[n+12>>2],a=c[n+8>>2],s[e+8|0]=a,s[e+9|0]=a>>>8,s[e+10|0]=a>>>16,s[e+11|0]=a>>>24,s[e+12|0]=t,s[e+13|0]=t>>>8,s[e+14|0]=t>>>16,s[e+15|0]=t>>>24,t=c[n+4>>2],a=c[n>>2],s[0|e]=a,s[e+1|0]=a>>>8,s[e+2|0]=a>>>16,s[e+3|0]=a>>>24,s[e+4|0]=t,s[e+5|0]=t>>>8,s[e+6|0]=t>>>16,s[e+7|0]=t>>>24,t=c[n+28>>2],a=c[n+24>>2],s[e+24|0]=a,s[e+25|0]=a>>>8,s[e+26|0]=a>>>16,s[e+27|0]=a>>>24,s[e+28|0]=t,s[e+29|0]=t>>>8,s[e+30|0]=t>>>16,s[e+31|0]=t>>>24,$e(n,64),g=n- -64|0,0},Gb:function(){var e,t;return g=e=g-16|0,s[e+15|0]=0,t=0|p(34904,e+15|0,0),g=e+16|0,0|t},Hb:Ne,Ib:function(e){var t,n=0,a=0;if(g=t=g-16|0,(e|=0)>>>0>=2){for(n=(0-e>>>0)%(e>>>0)|0;s[t+15|0]=0,n>>>0>(a=0|p(34904,t+15|0,0))>>>0;);n=(a>>>0)%(e>>>0)|0}return g=t+16|0,0|n},Jb:ve,Kb:function(e,t,n){We(e|=0,t|=0,1024,n|=0)},Lb:tt,Mb:function(){var e=0,t=0;return(e=c[9048])&&(e=c[e+20>>2])&&(t=0|dt[0|e]()),0|t},Nb:function(e,t,n){e|=0,t|=0;var a,o=0,i=0,c=0;if(g=a=g-16|0,n|=0)b(1240,1100,197,1036),r();else{if(t)for(;s[a+15|0]=0,i=e+o|0,c=0|p(34904,a+15|0,0),s[0|i]=c,(0|t)!=(0|(o=o+1|0)););g=a+16|0}},Ob:function(e,t,n,a){e|=0,n|=0;var o=0,i=0,c=0;if(!((a|=0)>>>0>2147483646|a<<1>>>0>=(t|=0)>>>0)){if(t=0,a){for(;o=(t<<1)+e|0,i=15&(c=u[t+n|0]),s[o+1|0]=22272+((i<<8)+(i+65526&55552)|0)>>>8,i=o,o=c>>>4|0,s[0|i]=87+((o+65526>>>8&217)+o|0),(0|a)!=(0|(t=t+1|0)););t=a<<1}else t=0;return s[t+e|0]=0,0|e}Le(),r()},Pb:function(e,t,n,a,o,r,i){e|=0,t|=0,n|=0,o|=0,r|=0,i|=0;var d=0,l=0,f=0,p=0,b=0,m=0,h=0,g=0,y=0,v=0;e:if(a|=0){t:{n:{a:{o:{if(!o){for(l=1,o=0;;){if(!(255&((h=(65526+(f=(223&(b=u[n+d|0]))-55&255)^f+65520)>>>8|0)|(g=65526+(b^=48)>>>8|0))))break a;if(t>>>0<=m>>>0)break o;if(f=f&h|b&g,255&p?(s[e+m|0]=o|f,m=m+1|0):o=f<<4,p^=-1,(0|(d=d+1|0))==(0|a))break}d=a;break a}for(;;){r:{i:{s:{c:{u:{if(!(255&((b=(65526+(f=(223&(l=u[n+d|0]))-55&255)^f+65520)>>>8|0)|(g=65526+(h=48^l)>>>8|0)))){if(255&p)break n;if(!$(o,l))break e;if((d=p=d+1|0)>>>0>>0)break u;break e}if(t>>>0<=m>>>0)break o;if(l=f&b|h&g,!(255&p))break c;s[e+m|0]=l|v,m=m+1|0;break r}for(;;){if(!(255&((b=(65526+(f=(223&(l=u[n+d|0]))-55&255)^f+65520)>>>8|0)|(g=65526+(h=48^l)>>>8|0)))){if(!$(o,l))break e;if((d=d+1|0)>>>0>>0)continue;break s}break}if(t>>>0<=m>>>0)break i;l=f&b|h&g}v=l<<4,p=0;break r}d=a>>>0>p>>>0?a:p;break e}p=0;break o}if(p^=-1,l=1,!((d=d+1|0)>>>0>>0))break}break a}c[8916]=68,l=0}if(!(255&p))break t}c[8916]=28,y=-1,d=d-1|0,m=0;break e}l||(m=0,y=-1)}return i?c[i>>2]=n+d:(0|a)!=(0|d)&&(c[8916]=28,y=-1),r&&(c[r>>2]=m),0|y},Qb:function(e,t){e|=0;var n=0;return 1!=(-7&(t|=0))&&(Le(),r()),1+((3&(n=(n=e)+l(e=(e>>>0)/3|0,-3)|0)?2&t?n+1|0:4:0)+(e<<2)|0)|0},Rb:function(e,t,n,a,o){e|=0,t|=0,n|=0,a|=0;var i=0,c=0,d=0,f=0,p=0,m=0,h=0,g=0,y=0,v=0;e:{t:{n:{if(1==(-7&(o|=0))&&(f=(i=(a>>>0)/3|0)<<2,(i=l(i,-3)+a|0)&&(f=2&o?(2|f)+(i>>>1|0)|0:f+4|0),!(t>>>0<=f>>>0))){if(!(4&o)){if(i=0,!a)break e;break n}if(i=0,!a)break e;for(;;){for(m=(g=u[n+h|0])|m<<8,p=i,i=1+((((d|=8)-6>>>0)/6|0)+i|0)|0;y=65510+(c=m>>>(d=(o=d)-6|0)&63)>>>8|0,v=c+65484>>>8|0,s[e+p|0]=(1+(16321^c)^-1)>>>8&45|c+252&c+65474>>>8&(-1^v)|(c+32705^-1)>>>8&95|y&c+65|v&c+71&(-1^y),(0|(p=p+1|0))!=(0|i););if((0|(h=h+1|0))==(0|a))break}if(!d)break e;p=(a=65510+(n=g<<12-o&63)>>>8|0)&n+65,m=n+252&n+65474>>>8&(-1^(o=n+65484>>>8|0)),d=o&n+71&(-1^a),a=n+32705|0,o=(1+(16321^n)^-1)>>>8&45,n=95;break t}Le(),r()}for(;;){for(m=(g=u[n+h|0])|m<<8,p=i,i=1+((((d|=8)-6>>>0)/6|0)+i|0)|0;y=65510+(c=m>>>(d=(o=d)-6|0)&63)>>>8|0,v=c+65484>>>8|0,s[e+p|0]=(1+(16321^c)^-1)>>>8&43|c+252&c+65474>>>8&(-1^v)|(c+16321^-1)>>>8&47|y&c+65|v&c+71&(-1^y),(0|(p=p+1|0))!=(0|i););if((0|(h=h+1|0))==(0|a))break}if(!d)break e;p=(a=65510+(n=g<<12-o&63)>>>8|0)&n+65,m=n+252&n+65474>>>8&(-1^(o=n+65484>>>8|0)),d=o&n+71&(-1^a),a=n+16321|0,o=(1+(16321^n)^-1)>>>8&43,n=47}s[e+i|0]=n&(-1^a)>>>8|p|m|o|d,i=i+1|0}e:{t:{if(i>>>0<=f>>>0){if(i>>>0>>0)break t;f=i;break e}b(1048,1126,230,1319),r()}Ee(e+i|0,61,f-i|0)}return Ee(e+f|0,0,(t>>>0>(n=f+1|0)>>>0?t:n)-f|0),0|e},Sb:function(e,t,n,a,o,i,d,l){e|=0,t|=0,n|=0,a|=0,o|=0,i|=0,d|=0;var f=0,p=0,b=0,m=0,h=0,g=0,y=0,v=0;e:{t:{n:{a:{o:{r:{i:{s:{c:{u:{d:{if(1==(-7&(l|=0))){if(b=0,!a)break s;if(4&l)break d;for(;;){b=p;l:{f:{p:{b:{for(;;){if(f=(f=(m=s[n+b|0])-65|0)&((90-m^-1)&(-1^f))>>>8&255|m+4&((m+65488^-1)&(57-m^-1))>>>8&255|m+185&((m+65439^-1)&(122-m^-1))>>>8&255|(1+(16336^m)^-1)>>>8&63|(1+(16340^m)^-1)>>>8&62,255!=(0|(f|=(f-1&1+(65470^m))>>>8&255)))break b;if(f=0,!o)break c;if(!$(o,m))break;if((b=b+1|0)>>>0>=a>>>0)break p}p=b;break c}if(y=f+(y<<6)|0,h>>>0>1)break f;h=h+6|0;break l}p=(e=p+1|0)>>>0>>0?a:e;break c}if(h=h-2|0,t>>>0<=g>>>0)break u;s[e+g|0]=y>>>h,g=g+1|0}if(f=0,!((p=b+1|0)>>>0>>0))break}break c}Le(),r()}d:for(;;){for(b=p;;){l:{if(f=(f=(m=s[n+b|0])-65|0)&((90-m^-1)&(-1^f))>>>8&255|m+4&((m+65488^-1)&(57-m^-1))>>>8&255|m+185&((m+65439^-1)&(122-m^-1))>>>8&255|(1+(16288^m)^-1)>>>8&63|(1+(16338^m)^-1)>>>8&62,255==(0|(f|=(f-1&1+(65470^m))>>>8&255))){if(f=0,!o)break c;if($(o,m))break l;p=b;break c}if(y=f+(y<<6)|0,h>>>0<2)h=h+6|0;else{if(h=h-2|0,t>>>0<=g>>>0)break u;s[e+g|0]=y>>>h,g=g+1|0}if(f=0,(p=b+1|0)>>>0>>0)continue d;break c}if(!((b=b+1|0)>>>0>>0))break}break}p=(e=p+1|0)>>>0>>0?a:e;break c}p=b,c[8916]=68,f=1}if(h>>>0>4)break i;b=p}if(e=b,t=-1,f){p=e;break e}if((-1<>>0<2){l=e;break o}if(p=e>>>0>a>>>0?e:a,b=h>>>1|0,!o)break r;for(l=e;;){if((0|l)==(0|p)){f=68;break a}if(61!=(0|(e=s[n+l|0]))){if(!$(o,e)){f=28,p=l;break a}}else b=b-1|0;if(l=l+1|0,!b)break}break o}t=-1;break e}if(f=68,e>>>0>=a>>>0)break a;if(61!=u[e+n|0]){p=e,f=28;break a}if(l=e+b|0,1!=(0|b)){if((0|(h=e+1|0))==(0|p))break a;if(61!=u[n+h|0]){p=h,f=28;break a}if(2!=(0|b)){if((0|(e=e+2|0))==(0|p))break a;if(f=28,p=e,61!=u[e+n|0])break a}}}if(t=0,o)break n;break t}c[8916]=f;break e}if(!(a>>>0<=l>>>0)){for(;;){if(!$(o,s[n+l|0]))break t;if((0|(l=l+1|0))==(0|a))break}l=a}}p=l,v=g}return d?c[d>>2]=n+p:(0|a)!=(0|p)&&(c[8916]=28,t=-1),i&&(c[i>>2]=v),0|t},Tb:function(){var e=0;return c[9049]?e=1:(Ne(),ve(36176,16),c[9049]=1,e=0),0|e},Ub:function(e,t,n,a,o){e|=0,t|=0,n|=0,o|=0;var i,d=0,l=0,f=0;g=i=g-16|0;e:{if(a|=0){if(f=-1,(d=(d=a-1|0)-(l=d&a?(n>>>0)%(a>>>0)|0:n&d)|0)>>>0>=(-1^n)>>>0)break e;if(!((n=n+d|0)>>>0>=o>>>0))for(e&&(c[e>>2]=n+1),e=t+n|0,f=0,s[i+15|0]=0,n=0;o=t=e-n|0,l=u[0|t]&u[i+15|0],t=(n^d)-1>>>24|0,s[0|o]=l|128&t,s[i+15|0]=t|u[i+15|0],(0|a)!=(0|(n=n+1|0)););}else f=-1;return g=i+16|0,0|f}Le(),r()},Vb:function(e,t,n,a){e|=0,t|=0,n|=0,a|=0;var o,r=0,i=0,s=0,d=0,l=0;if(c[12+(o=g-16|0)>>2]=0,a-1>>>0>>0){for(l=(i=n-1|0)+t|0,n=0,t=0;t&=255,d=(128^(s=u[l-r|0]))-1&c[o+12>>2]-1&t-1,c[o+12>>2]=c[o+12>>2]|d<<23>>31&r,t|=s,n|=d>>>8&1,(0|(r=r+1|0))!=(0|a););c[e>>2]=i-c[o+12>>2],e=(255&n)-1|0}else e=-1;return 0|e},Wb:function(){return 1312},Xb:function(){return 10},Yb:it,Zb:rt,_b:function(e){var t,n=0,a=0,o=0,r=0,i=0,s=0,l=0,p=0,b=0,m=0,h=0,y=0;g=t=g-16|0;e:{t:{n:{a:{o:{r:{i:{s:{c:{if((e|=0)>>>0<=244){if(3&(n=(s=c[8917])>>>(a=(l=e>>>0<11?16:e+11&-8)>>>3|0)|0)){n=35708+(e=(a=a+(1&(-1^n))|0)<<3)|0,o=c[e+35716>>2],(0|n)!=(0|(e=c[o+8>>2]))?(c[e+12>>2]=n,c[n+8>>2]=e):(h=35668,y=_e(-2,a)&s,c[h>>2]=y),e=o+8|0,n=a<<3,c[o+4>>2]=3|n,c[4+(n=n+o|0)>>2]=1|c[n+4>>2];break e}if((m=c[8919])>>>0>=l>>>0)break c;if(n){n=35708+(e=(o=Ge(0-(e=(0-(e=2<>2],(0|n)!=(0|(e=c[r+8>>2]))?(c[e+12>>2]=n,c[n+8>>2]=e):(s=_e(-2,o)&s,c[8917]=s),c[r+4>>2]=3|l,o=(e=o<<3)-l|0,c[4+(a=r+l|0)>>2]=1|o,c[e+r>>2]=o,m&&(n=35708+(-8&m)|0,i=c[8922],(e=1<<(m>>>3))&s?e=c[n+8>>2]:(c[8917]=e|s,e=n),c[n+8>>2]=i,c[e+12>>2]=i,c[i+12>>2]=n,c[i+8>>2]=e),e=r+8|0,c[8922]=a,c[8919]=o;break e}if(!(b=c[8918]))break c;for(a=c[35972+(Ge(0-b&b)<<2)>>2],i=(-8&c[a+4>>2])-l|0,n=a;(e=c[n+16>>2])||(e=c[n+20>>2]);)i=(o=(n=(-8&c[e+4>>2])-l|0)>>>0>>0)?n:i,a=o?e:a,n=e;if(p=c[a+24>>2],(0|(o=c[a+12>>2]))!=(0|a)){e=c[a+8>>2],c[e+12>>2]=o,c[o+8>>2]=e;break t}if(!(e=c[(n=a+20|0)>>2])){if(!(e=c[a+16>>2]))break s;n=a+16|0}for(;r=n,o=e,(e=c[(n=e+20|0)>>2])||(n=o+16|0,e=c[o+16>>2]););c[r>>2]=0;break t}if(l=-1,!(e>>>0>4294967231)&&(l=-8&(e=e+11|0),b=c[8918])){i=0-l|0,s=0,l>>>0<256||(s=31,l>>>0>16777215||(s=62+((l>>>38-(e=f(e>>>8|0))&1)-(e<<1)|0)|0));u:{d:{if(n=c[35972+(s<<2)>>2])for(e=0,a=l<<(31!=(0|s)?25-(s>>>1|0)|0:0);;){if(!((r=(-8&c[n+4>>2])-l|0)>>>0>=i>>>0||(o=n,i=r,r))){i=0,e=n;break d}if(r=c[n+20>>2],n=c[16+((a>>>29&4)+n|0)>>2],e=r?(0|r)==(0|n)?e:r:e,a<<=1,!n)break}else e=0;if(!(e|o)){if(o=0,!(e=(0-(e=2<>2]}if(!e)break u}for(;i=(a=(n=(-8&c[e+4>>2])-l|0)>>>0>>0)?n:i,o=a?e:o,e=(n=c[e+16>>2])||c[e+20>>2];);}if(!(!o|c[8919]-l>>>0<=i>>>0)){if(s=c[o+24>>2],(0|o)!=(0|(a=c[o+12>>2]))){e=c[o+8>>2],c[e+12>>2]=a,c[a+8>>2]=e;break n}if(!(e=c[(n=o+20|0)>>2])){if(!(e=c[o+16>>2]))break i;n=o+16|0}for(;r=n,a=e,(e=c[(n=e+20|0)>>2])||(n=a+16|0,e=c[a+16>>2]););c[r>>2]=0;break n}}}if((e=c[8919])>>>0>=l>>>0){o=c[8922],(n=e-l|0)>>>0>=16?(c[4+(a=o+l|0)>>2]=1|n,c[e+o>>2]=n,c[o+4>>2]=3|l):(c[o+4>>2]=3|e,c[4+(e=e+o|0)>>2]=1|c[e+4>>2],a=0,n=0),c[8919]=n,c[8922]=a,e=o+8|0;break e}if((p=c[8920])>>>0>l>>>0){n=p-l|0,c[8920]=n,e=(a=c[8923])+l|0,c[8923]=e,c[e+4>>2]=1|n,c[a+4>>2]=3|l,e=a+8|0;break e}if(e=0,b=l+47|0,c[9035]?a=c[9037]:(c[9038]=-1,c[9039]=-1,c[9036]=4096,c[9037]=4096,c[9035]=t+12&-16^1431655768,c[9040]=0,c[9028]=0,a=4096),(n=(r=b+a|0)&(i=0-a|0))>>>0<=l>>>0)break e;if((o=c[9027])&&o>>>0<(s=(a=c[9025])+n|0)>>>0|a>>>0>=s>>>0)break e;c:{if(!(4&u[36112])){u:{d:{l:{f:{if(o=c[8923])for(e=36116;;){if((a=c[e>>2])>>>0<=o>>>0&o>>>0>2]>>>0)break f;if(!(e=c[e+8>>2]))break}if(-1==(0|(a=ke(0))))break u;if(s=n,(e=(o=c[9036])-1|0)&a&&(s=(n-a|0)+(e+a&0-o)|0),s>>>0<=l>>>0)break u;if((o=c[9027])&&o>>>0<(i=(e=c[9025])+s|0)>>>0|e>>>0>=i>>>0)break u;if((0|a)!=(0|(e=ke(s))))break l;break c}if((0|(a=ke(s=i&r-p)))==(c[e>>2]+c[e+4>>2]|0))break d;e=a}if(-1==(0|e))break u;if(l+48>>>0<=s>>>0){a=e;break c}if(-1==(0|ke(a=(a=c[9037])+(b-s|0)&0-a)))break u;s=a+s|0,a=e;break c}if(-1!=(0|a))break c}c[9028]=4|c[9028]}if(-1==(0|(a=ke(n)))|-1==(0|(e=ke(0)))|e>>>0<=a>>>0)break a;if((s=e-a|0)>>>0<=l+40>>>0)break a}e=c[9025]+s|0,c[9025]=e,e>>>0>d[9026]&&(c[9026]=e);c:{if(r=c[8923]){for(e=36116;;){if(((o=c[e>>2])+(n=c[e+4>>2])|0)==(0|a))break c;if(!(e=c[e+8>>2]))break}break r}for((e=c[8921])>>>0<=a>>>0&&e||(c[8921]=a),e=0,c[9030]=s,c[9029]=a,c[8925]=-1,c[8926]=c[9035],c[9032]=0;n=35708+(o=e<<3)|0,c[o+35716>>2]=n,c[o+35720>>2]=n,32!=(0|(e=e+1|0)););n=(o=s-40|0)-(e=a+8&7?-8-a&7:0)|0,c[8920]=n,e=e+a|0,c[8923]=e,c[e+4>>2]=1|n,c[4+(a+o|0)>>2]=40,c[8924]=c[9039];break o}if(8&u[e+12|0]|o>>>0>r>>>0|a>>>0<=r>>>0)break r;c[e+4>>2]=n+s,a=(e=r+8&7?-8-r&7:0)+r|0,c[8923]=a,e=(n=c[8920]+s|0)-e|0,c[8920]=e,c[a+4>>2]=1|e,c[4+(n+r|0)>>2]=40,c[8924]=c[9039];break o}o=0;break t}a=0;break n}d[8921]>a>>>0&&(c[8921]=a),n=a+s|0,e=36116;r:{i:{s:{c:{u:{d:{for(;;){if((0|n)!=c[e>>2]){if(e=c[e+8>>2])continue;break d}break}if(!(8&u[e+12|0]))break u}for(e=36116;;){if((n=c[e>>2])>>>0<=r>>>0&&(i=n+c[e+4>>2]|0)>>>0>r>>>0)break c;e=c[e+8>>2]}}if(c[e>>2]=a,c[e+4>>2]=c[e+4>>2]+s,c[4+(b=(a+8&7?-8-a&7:0)+a|0)>>2]=3|l,e=(s=n+(n+8&7?-8-n&7:0)|0)-(p=l+b|0)|0,(0|r)==(0|s)){c[8923]=p,e=c[8920]+e|0,c[8920]=e,c[p+4>>2]=1|e;break i}if(c[8922]==(0|s)){c[8922]=p,e=c[8919]+e|0,c[8919]=e,c[p+4>>2]=1|e,c[e+p>>2]=e;break i}if(1==(3&(i=c[s+4>>2]))){r=-8&i;u:if(i>>>0<=255){if(o=c[s+8>>2],n=i>>>3|0,(0|(a=c[s+12>>2]))==(0|o)){h=35668,y=c[8917]&_e(-2,n),c[h>>2]=y;break u}c[o+12>>2]=a,c[a+8>>2]=o}else{if(l=c[s+24>>2],(0|s)==(0|(a=c[s+12>>2])))if((n=c[(i=s+20|0)>>2])||(n=c[(i=s+16|0)>>2])){for(;o=i,(n=c[(i=(a=n)+20|0)>>2])||(i=a+16|0,n=c[a+16>>2]););c[o>>2]=0}else a=0;else n=c[s+8>>2],c[n+12>>2]=a,c[a+8>>2]=n;if(l){o=c[s+28>>2];d:{if(c[(n=35972+(o<<2)|0)>>2]==(0|s)){if(c[n>>2]=a,a)break d;h=35672,y=c[8918]&_e(-2,o),c[h>>2]=y;break u}if(c[l+(c[l+16>>2]==(0|s)?16:20)>>2]=a,!a)break u}c[a+24>>2]=l,(n=c[s+16>>2])&&(c[a+16>>2]=n,c[n+24>>2]=a),(n=c[s+20>>2])&&(c[a+20>>2]=n,c[n+24>>2]=a)}}i=c[4+(s=r+s|0)>>2],e=e+r|0}if(c[s+4>>2]=-2&i,c[p+4>>2]=1|e,c[e+p>>2]=e,e>>>0<=255){n=35708+(-8&e)|0,(a=c[8917])&(e=1<<(e>>>3))?e=c[n+8>>2]:(c[8917]=e|a,e=n),c[n+8>>2]=p,c[e+12>>2]=p,c[p+12>>2]=n,c[p+8>>2]=e;break i}if(i=31,e>>>0<=16777215&&(i=62+((e>>>38-(n=f(e>>>8|0))&1)-(n<<1)|0)|0),c[p+28>>2]=i,c[p+16>>2]=0,c[p+20>>2]=0,n=35972+(i<<2)|0,(o=c[8918])&(a=1<>>1|0)|0:0),a=c[n>>2];;){if(n=a,(-8&c[a+4>>2])==(0|e))break s;if(a=i>>>29|0,i<<=1,!(a=c[16+(o=(4&a)+n|0)>>2]))break}c[o+16>>2]=p}else c[8918]=a|o,c[n>>2]=p;c[p+24>>2]=n,c[p+12>>2]=p,c[p+8>>2]=p;break i}for(n=(o=s-40|0)-(e=a+8&7?-8-a&7:0)|0,c[8920]=n,e=e+a|0,c[8923]=e,c[e+4>>2]=1|n,c[4+(a+o|0)>>2]=40,c[8924]=c[9039],c[(o=(e=(i+(i-39&7?39-i&7:0)|0)-47|0)>>>0>>0?r:e)+4>>2]=27,e=c[9032],c[o+16>>2]=c[9031],c[o+20>>2]=e,e=c[9030],c[o+8>>2]=c[9029],c[o+12>>2]=e,c[9031]=o+8,c[9030]=s,c[9029]=a,c[9032]=0,e=o+24|0;c[e+4>>2]=7,n=e+8|0,e=e+4|0,n>>>0>>0;);if((0|o)==(0|r))break o;if(c[o+4>>2]=-2&c[o+4>>2],i=o-r|0,c[r+4>>2]=1|i,c[o>>2]=i,i>>>0<=255){n=35708+(-8&i)|0,(a=c[8917])&(e=1<<(i>>>3))?e=c[n+8>>2]:(c[8917]=e|a,e=n),c[n+8>>2]=r,c[e+12>>2]=r,c[r+12>>2]=n,c[r+8>>2]=e;break o}if(e=31,i>>>0<=16777215&&(e=62+((i>>>38-(e=f(i>>>8|0))&1)-(e<<1)|0)|0),c[r+28>>2]=e,c[r+16>>2]=0,c[r+20>>2]=0,n=35972+(e<<2)|0,(o=c[8918])&(a=1<>>1|0)|0:0),o=c[n>>2];;){if((0|i)==(-8&c[(n=o)+4>>2]))break r;if(a=e>>>29|0,e<<=1,!(o=c[16+(a=(4&a)+n|0)>>2]))break}c[a+16>>2]=r}else c[8918]=a|o,c[n>>2]=r;c[r+24>>2]=n,c[r+12>>2]=r,c[r+8>>2]=r;break o}e=c[n+8>>2],c[e+12>>2]=p,c[n+8>>2]=p,c[p+24>>2]=0,c[p+12>>2]=n,c[p+8>>2]=e}e=b+8|0;break e}e=c[n+8>>2],c[e+12>>2]=r,c[n+8>>2]=r,c[r+24>>2]=0,c[r+12>>2]=n,c[r+8>>2]=e}if(!((e=c[8920])>>>0<=l>>>0)){n=e-l|0,c[8920]=n,e=(a=c[8923])+l|0,c[8923]=e,c[e+4>>2]=1|n,c[a+4>>2]=3|l,e=a+8|0;break e}}c[8916]=48,e=0;break e}n:if(s){n=c[o+28>>2];a:{if(c[(e=35972+(n<<2)|0)>>2]==(0|o)){if(c[e>>2]=a,a)break a;b=_e(-2,n)&b,c[8918]=b;break n}if(c[s+(c[s+16>>2]==(0|o)?16:20)>>2]=a,!a)break n}c[a+24>>2]=s,(e=c[o+16>>2])&&(c[a+16>>2]=e,c[e+24>>2]=a),(e=c[o+20>>2])&&(c[a+20>>2]=e,c[e+24>>2]=a)}n:if(i>>>0<=15)e=i+l|0,c[o+4>>2]=3|e,c[4+(e=e+o|0)>>2]=1|c[e+4>>2];else if(c[o+4>>2]=3|l,c[4+(r=o+l|0)>>2]=1|i,c[r+i>>2]=i,i>>>0<=255)n=35708+(-8&i)|0,(a=c[8917])&(e=1<<(i>>>3))?e=c[n+8>>2]:(c[8917]=e|a,e=n),c[n+8>>2]=r,c[e+12>>2]=r,c[r+12>>2]=n,c[r+8>>2]=e;else{e=31,i>>>0<=16777215&&(e=62+((i>>>38-(e=f(i>>>8|0))&1)-(e<<1)|0)|0),c[r+28>>2]=e,c[r+16>>2]=0,c[r+20>>2]=0,n=35972+(e<<2)|0;a:{if((a=1<>>1|0)|0:0),l=c[n>>2];;){if((-8&c[(n=l)+4>>2])==(0|i))break a;if(a=e>>>29|0,e<<=1,!(l=c[16+(a=(4&a)+n|0)>>2]))break}c[a+16>>2]=r}else c[8918]=a|b,c[n>>2]=r;c[r+24>>2]=n,c[r+12>>2]=r,c[r+8>>2]=r;break n}e=c[n+8>>2],c[e+12>>2]=r,c[n+8>>2]=r,c[r+24>>2]=0,c[r+12>>2]=n,c[r+8>>2]=e}e=o+8|0;break e}t:if(p){n=c[a+28>>2];n:{if(c[(e=35972+(n<<2)|0)>>2]==(0|a)){if(c[e>>2]=o,o)break n;h=35672,y=_e(-2,n)&b,c[h>>2]=y;break t}if(c[p+(c[p+16>>2]==(0|a)?16:20)>>2]=o,!o)break t}c[o+24>>2]=p,(e=c[a+16>>2])&&(c[o+16>>2]=e,c[e+24>>2]=o),(e=c[a+20>>2])&&(c[o+20>>2]=e,c[e+24>>2]=o)}i>>>0<=15?(e=i+l|0,c[a+4>>2]=3|e,c[4+(e=e+a|0)>>2]=1|c[e+4>>2]):(c[a+4>>2]=3|l,c[4+(o=a+l|0)>>2]=1|i,c[o+i>>2]=i,m&&(n=35708+(-8&m)|0,r=c[8922],(e=1<<(m>>>3))&s?e=c[n+8>>2]:(c[8917]=e|s,e=n),c[n+8>>2]=r,c[e+12>>2]=r,c[r+12>>2]=n,c[r+8>>2]=e),c[8922]=o,c[8919]=i),e=a+8|0}return g=t+16|0,0|e},$b:function(e){var t=0,n=0,a=0,o=0,r=0,i=0,s=0,u=0,l=0;e:if(e|=0){r=(a=e-8|0)+(e=-8&(t=c[e-4>>2]))|0;t:if(!(1&t)){if(!(3&t))break e;if((a=a-(t=c[a>>2])|0)>>>0>2])))return c[8919]=e,c[r+4>>2]=-2&t,c[a+4>>2]=1|e,void(c[e+a>>2]=e)}else{if(t>>>0<=255){if(o=c[a+8>>2],t=t>>>3|0,(0|(n=c[a+12>>2]))==(0|o)){u=35668,l=c[8917]&_e(-2,t),c[u>>2]=l;break t}c[o+12>>2]=n,c[n+8>>2]=o;break t}if(s=c[a+24>>2],(0|a)==(0|(t=c[a+12>>2])))if((n=c[(o=a+20|0)>>2])||(n=c[(o=a+16|0)>>2])){for(;i=o,(n=c[(o=(t=n)+20|0)>>2])||(o=t+16|0,n=c[t+16>>2]););c[i>>2]=0}else t=0;else n=c[a+8>>2],c[n+12>>2]=t,c[t+8>>2]=n;if(!s)break t;o=c[a+28>>2];n:{if(c[(n=35972+(o<<2)|0)>>2]==(0|a)){if(c[n>>2]=t,t)break n;u=35672,l=c[8918]&_e(-2,o),c[u>>2]=l;break t}if(c[s+(c[s+16>>2]==(0|a)?16:20)>>2]=t,!t)break t}if(c[t+24>>2]=s,(n=c[a+16>>2])&&(c[t+16>>2]=n,c[n+24>>2]=t),!(n=c[a+20>>2]))break t;c[t+20>>2]=n,c[n+24>>2]=t}}if(!(a>>>0>=r>>>0)&&1&(t=c[r+4>>2])){t:{if(!(2&t)){if(c[8923]==(0|r)){if(c[8923]=a,e=c[8920]+e|0,c[8920]=e,c[a+4>>2]=1|e,c[8922]!=(0|a))break e;return c[8919]=0,void(c[8922]=0)}if(c[8922]==(0|r))return c[8922]=a,e=c[8919]+e|0,c[8919]=e,c[a+4>>2]=1|e,void(c[e+a>>2]=e);e=(-8&t)+e|0;n:if(t>>>0<=255){if(o=c[r+8>>2],t=t>>>3|0,(0|(n=c[r+12>>2]))==(0|o)){u=35668,l=c[8917]&_e(-2,t),c[u>>2]=l;break n}c[o+12>>2]=n,c[n+8>>2]=o}else{if(s=c[r+24>>2],(0|r)==(0|(t=c[r+12>>2])))if((n=c[(o=r+20|0)>>2])||(n=c[(o=r+16|0)>>2])){for(;i=o,(n=c[(o=(t=n)+20|0)>>2])||(o=t+16|0,n=c[t+16>>2]););c[i>>2]=0}else t=0;else n=c[r+8>>2],c[n+12>>2]=t,c[t+8>>2]=n;if(s){o=c[r+28>>2];a:{if(c[(n=35972+(o<<2)|0)>>2]==(0|r)){if(c[n>>2]=t,t)break a;u=35672,l=c[8918]&_e(-2,o),c[u>>2]=l;break n}if(c[s+(c[s+16>>2]==(0|r)?16:20)>>2]=t,!t)break n}c[t+24>>2]=s,(n=c[r+16>>2])&&(c[t+16>>2]=n,c[n+24>>2]=t),(n=c[r+20>>2])&&(c[t+20>>2]=n,c[n+24>>2]=t)}}if(c[a+4>>2]=1|e,c[e+a>>2]=e,c[8922]!=(0|a))break t;return void(c[8919]=e)}c[r+4>>2]=-2&t,c[a+4>>2]=1|e,c[e+a>>2]=e}if(e>>>0<=255)return t=35708+(-8&e)|0,(n=c[8917])&(e=1<<(e>>>3))?e=c[t+8>>2]:(c[8917]=e|n,e=t),c[t+8>>2]=a,c[e+12>>2]=a,c[a+12>>2]=t,void(c[a+8>>2]=e);o=31,e>>>0<=16777215&&(o=62+((e>>>38-(t=f(e>>>8|0))&1)-(t<<1)|0)|0),c[a+28>>2]=o,c[a+16>>2]=0,c[a+20>>2]=0,i=35972+(o<<2)|0;t:{n:{if((n=c[8918])&(t=1<>>1|0)|0:0),t=c[i>>2];;){if(n=t,(-8&c[t+4>>2])==(0|e))break n;if(t=o>>>29|0,o<<=1,!(t=c[16+(i=n+(4&t)|0)>>2]))break}c[i+16>>2]=a,c[a+24>>2]=n}else c[8918]=t|n,c[i>>2]=a,c[a+24>>2]=i;c[a+12>>2]=a,c[a+8>>2]=a;break t}e=c[n+8>>2],c[e+12>>2]=a,c[n+8>>2]=a,c[a+24>>2]=0,c[a+12>>2]=n,c[a+8>>2]=e}e=c[8925]-1|0,c[8925]=e||-1}}},ac:dt}}(e)}(t)},instantiate:function(e,t){return{then:function(n){var a=new k.Module(e);n({instance:new k.Instance(a,t)})}}},RuntimeError:Error};y=[],"object"!=typeof k&&j("no native wasm support detected");var A,x,I,T,S,C,E,R=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function P(e,t){return e?function(e,t,n){for(var a=t+n,o=t;e[o]&&!(o>=a);)++o;if(o-t>16&&e.buffer&&M)return M.decode(e.subarray(t,o));for(var r="";t>10,56320|1023&u)}}else r+=String.fromCharCode((31&i)<<6|s)}else r+=String.fromCharCode(i)}return r}(x,e,t):""}function U(){var e=w.buffer;d.HEAP8=A=new Int8Array(e),d.HEAP16=I=new Int16Array(e),d.HEAP32=T=new Int32Array(e),d.HEAPU8=x=new Uint8Array(e),d.HEAPU16=new Uint16Array(e),d.HEAPU32=S=new Uint32Array(e),d.HEAPF32=C=new Float32Array(e),d.HEAPF64=E=new Float64Array(e)}var _=d.INITIAL_MEMORY||16777216;_>=65536||j("INITIAL_MEMORY should be larger than STACK_SIZE, was "+_+"! (STACK_SIZE=65536)"),w=d.wasmMemory?d.wasmMemory:new k.Memory({initial:_/65536,maximum:32768}),U(),_=w.buffer.byteLength;var B=[],D=[],N=[],O=0,F=null,L=null;function j(e){throw d.onAbort&&d.onAbort(e),v(e="Aborted("+e+")"),R=!0,e+=". Build with -sASSERTIONS for more info.",new k.RuntimeError(e)}var H,G,z,K,W="data:application/octet-stream;base64,";function Z(e){return e.startsWith(W)}function V(e){return e.startsWith("file://")}function q(e){try{if(e==H&&y)return new Uint8Array(y);var t=ee(e);if(t)return t;if(u)return u(e);throw"both async and sync fetching of the wasm failed"}catch(e){j(e)}}Z(H="<<< WASM_BINARY_FILE >>>")||(G=H,H=d.locateFile?d.locateFile(G,m):m+G);var Q={34904:function(){return d.getRandomValue()},34940:function(){if(void 0===d.getRandomValue)try{var e="object"==typeof window?window:self,t=void 0!==e.crypto?e.crypto:e.msCrypto,a=function(){var e=new Uint32Array(1);return t.getRandomValues(e),e[0]>>>0};a(),d.getRandomValue=a}catch(e){try{var o=n(21921),r=function(){var e=o.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};r(),d.getRandomValue=r}catch(e){throw"No secure random number generator found"}}}};function J(e){for(;e.length>0;)e.shift()(d)}var Y=[];function X(e){var t=w.buffer;try{return w.grow(e-t.byteLength+65535>>>16),U(),1}catch(e){}}var $="function"==typeof atob?atob:function(e){var t,n,a,o,r,i,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",u=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{t=s.indexOf(e.charAt(u++))<<2|(o=s.indexOf(e.charAt(u++)))>>4,n=(15&o)<<4|(r=s.indexOf(e.charAt(u++)))>>2,a=(3&r)<<6|(i=s.indexOf(e.charAt(u++))),c+=String.fromCharCode(t),64!==r&&(c+=String.fromCharCode(n)),64!==i&&(c+=String.fromCharCode(a))}while(u>=2;n=x[e++];)t+=105!=n&t,Y.push(105==n?T[t]:E[t++>>1]),++t;return Y}(t,n);return Q[e].apply(null,a)}(e,t,n)},e:function(e){var t,n=x.length,a=2147483648;if((e>>>=0)>a)return!1;for(var o=1;o<=4;o*=2){var r=n*(1+.2/o);if(r=Math.min(r,e+100663296),X(Math.min(a,(t=Math.max(e,r))+(65536-t%65536)%65536)))return!0}return!1},a:w};function ae(){function e(){te||(te=!0,d.calledRun=!0,R||(J(D),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)e=d.postRun.shift(),N.unshift(e);var e;J(N)}()))}O>0||(function(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)e=d.preRun.shift(),B.unshift(e);var e;J(B)}(),O>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),e()}),1)):e()))}if(function(){var e={a:ne};function t(e,t){var n,a=e.exports;d.asm=a,d.asm.ac,n=d.asm.f,D.unshift(n),function(e){if(O--,d.monitorRunDependencies&&d.monitorRunDependencies(O),0==O&&(null!==F&&(clearInterval(F),F=null),L)){var t=L;L=null,t()}}()}function n(e){t(e.instance)}function a(t){return function(){if(!y&&(f||p)){if("function"==typeof fetch&&!V(H))return fetch(H,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+H+"'";return e.arrayBuffer()})).catch((function(){return q(H)}));if(c)return new Promise((function(e,t){c(H,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return q(H)}))}().then((function(t){return k.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){v("failed to asynchronously prepare wasm: "+e),j(e)}))}if(O++,d.monitorRunDependencies&&d.monitorRunDependencies(O),d.instantiateWasm)try{return d.instantiateWasm(e,t)}catch(e){return v("Module.instantiateWasm callback failed with error: "+e),!1}y||"function"!=typeof k.instantiateStreaming||Z(H)||V(H)||b||"function"!=typeof fetch?a(n):fetch(H,{credentials:"same-origin"}).then((function(t){return k.instantiateStreaming(t,e).then(n,(function(e){return v("wasm streaming compile failed: "+e),v("falling back to ArrayBuffer instantiation"),a(n)}))}))}(),d._crypto_aead_chacha20poly1305_encrypt_detached=function(){return(d._crypto_aead_chacha20poly1305_encrypt_detached=d.asm.g).apply(null,arguments)},d._crypto_aead_chacha20poly1305_encrypt=function(){return(d._crypto_aead_chacha20poly1305_encrypt=d.asm.h).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_encrypt_detached=function(){return(d._crypto_aead_chacha20poly1305_ietf_encrypt_detached=d.asm.i).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_encrypt=function(){return(d._crypto_aead_chacha20poly1305_ietf_encrypt=d.asm.j).apply(null,arguments)},d._crypto_aead_chacha20poly1305_decrypt_detached=function(){return(d._crypto_aead_chacha20poly1305_decrypt_detached=d.asm.k).apply(null,arguments)},d._crypto_aead_chacha20poly1305_decrypt=function(){return(d._crypto_aead_chacha20poly1305_decrypt=d.asm.l).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_decrypt_detached=function(){return(d._crypto_aead_chacha20poly1305_ietf_decrypt_detached=d.asm.m).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_decrypt=function(){return(d._crypto_aead_chacha20poly1305_ietf_decrypt=d.asm.n).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_keybytes=function(){return(d._crypto_aead_chacha20poly1305_ietf_keybytes=d.asm.o).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_npubbytes=function(){return(d._crypto_aead_chacha20poly1305_ietf_npubbytes=d.asm.p).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_nsecbytes=function(){return(d._crypto_aead_chacha20poly1305_ietf_nsecbytes=d.asm.q).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_abytes=function(){return(d._crypto_aead_chacha20poly1305_ietf_abytes=d.asm.r).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_messagebytes_max=function(){return(d._crypto_aead_chacha20poly1305_ietf_messagebytes_max=d.asm.s).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_keygen=function(){return(d._crypto_aead_chacha20poly1305_ietf_keygen=d.asm.t).apply(null,arguments)},d._crypto_aead_chacha20poly1305_keybytes=function(){return(d._crypto_aead_chacha20poly1305_keybytes=d.asm.u).apply(null,arguments)},d._crypto_aead_chacha20poly1305_npubbytes=function(){return(d._crypto_aead_chacha20poly1305_npubbytes=d.asm.v).apply(null,arguments)},d._crypto_aead_chacha20poly1305_nsecbytes=function(){return(d._crypto_aead_chacha20poly1305_nsecbytes=d.asm.w).apply(null,arguments)},d._crypto_aead_chacha20poly1305_abytes=function(){return(d._crypto_aead_chacha20poly1305_abytes=d.asm.x).apply(null,arguments)},d._crypto_aead_chacha20poly1305_messagebytes_max=function(){return(d._crypto_aead_chacha20poly1305_messagebytes_max=d.asm.y).apply(null,arguments)},d._crypto_aead_chacha20poly1305_keygen=function(){return(d._crypto_aead_chacha20poly1305_keygen=d.asm.z).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_encrypt_detached=function(){return(d._crypto_aead_xchacha20poly1305_ietf_encrypt_detached=d.asm.A).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_encrypt=function(){return(d._crypto_aead_xchacha20poly1305_ietf_encrypt=d.asm.B).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_decrypt_detached=function(){return(d._crypto_aead_xchacha20poly1305_ietf_decrypt_detached=d.asm.C).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_decrypt=function(){return(d._crypto_aead_xchacha20poly1305_ietf_decrypt=d.asm.D).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_keybytes=function(){return(d._crypto_aead_xchacha20poly1305_ietf_keybytes=d.asm.E).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_npubbytes=function(){return(d._crypto_aead_xchacha20poly1305_ietf_npubbytes=d.asm.F).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_nsecbytes=function(){return(d._crypto_aead_xchacha20poly1305_ietf_nsecbytes=d.asm.G).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_abytes=function(){return(d._crypto_aead_xchacha20poly1305_ietf_abytes=d.asm.H).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_messagebytes_max=function(){return(d._crypto_aead_xchacha20poly1305_ietf_messagebytes_max=d.asm.I).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_keygen=function(){return(d._crypto_aead_xchacha20poly1305_ietf_keygen=d.asm.J).apply(null,arguments)},d._crypto_auth_bytes=function(){return(d._crypto_auth_bytes=d.asm.K).apply(null,arguments)},d._crypto_auth_keybytes=function(){return(d._crypto_auth_keybytes=d.asm.L).apply(null,arguments)},d._crypto_auth=function(){return(d._crypto_auth=d.asm.M).apply(null,arguments)},d._crypto_auth_verify=function(){return(d._crypto_auth_verify=d.asm.N).apply(null,arguments)},d._crypto_auth_keygen=function(){return(d._crypto_auth_keygen=d.asm.O).apply(null,arguments)},d._crypto_box_seedbytes=function(){return(d._crypto_box_seedbytes=d.asm.P).apply(null,arguments)},d._crypto_box_publickeybytes=function(){return(d._crypto_box_publickeybytes=d.asm.Q).apply(null,arguments)},d._crypto_box_secretkeybytes=function(){return(d._crypto_box_secretkeybytes=d.asm.R).apply(null,arguments)},d._crypto_box_beforenmbytes=function(){return(d._crypto_box_beforenmbytes=d.asm.S).apply(null,arguments)},d._crypto_box_noncebytes=function(){return(d._crypto_box_noncebytes=d.asm.T).apply(null,arguments)},d._crypto_box_macbytes=function(){return(d._crypto_box_macbytes=d.asm.U).apply(null,arguments)},d._crypto_box_messagebytes_max=function(){return(d._crypto_box_messagebytes_max=d.asm.V).apply(null,arguments)},d._crypto_box_seed_keypair=function(){return(d._crypto_box_seed_keypair=d.asm.W).apply(null,arguments)},d._crypto_box_keypair=function(){return(d._crypto_box_keypair=d.asm.X).apply(null,arguments)},d._crypto_box_beforenm=function(){return(d._crypto_box_beforenm=d.asm.Y).apply(null,arguments)},d._crypto_box_detached_afternm=function(){return(d._crypto_box_detached_afternm=d.asm.Z).apply(null,arguments)},d._crypto_box_detached=function(){return(d._crypto_box_detached=d.asm._).apply(null,arguments)},d._crypto_box_easy_afternm=function(){return(d._crypto_box_easy_afternm=d.asm.$).apply(null,arguments)},d._crypto_box_easy=function(){return(d._crypto_box_easy=d.asm.aa).apply(null,arguments)},d._crypto_box_open_detached_afternm=function(){return(d._crypto_box_open_detached_afternm=d.asm.ba).apply(null,arguments)},d._crypto_box_open_detached=function(){return(d._crypto_box_open_detached=d.asm.ca).apply(null,arguments)},d._crypto_box_open_easy_afternm=function(){return(d._crypto_box_open_easy_afternm=d.asm.da).apply(null,arguments)},d._crypto_box_open_easy=function(){return(d._crypto_box_open_easy=d.asm.ea).apply(null,arguments)},d._crypto_box_seal=function(){return(d._crypto_box_seal=d.asm.fa).apply(null,arguments)},d._crypto_box_seal_open=function(){return(d._crypto_box_seal_open=d.asm.ga).apply(null,arguments)},d._crypto_box_sealbytes=function(){return(d._crypto_box_sealbytes=d.asm.ha).apply(null,arguments)},d._crypto_generichash_bytes_min=function(){return(d._crypto_generichash_bytes_min=d.asm.ia).apply(null,arguments)},d._crypto_generichash_bytes_max=function(){return(d._crypto_generichash_bytes_max=d.asm.ja).apply(null,arguments)},d._crypto_generichash_bytes=function(){return(d._crypto_generichash_bytes=d.asm.ka).apply(null,arguments)},d._crypto_generichash_keybytes_min=function(){return(d._crypto_generichash_keybytes_min=d.asm.la).apply(null,arguments)},d._crypto_generichash_keybytes_max=function(){return(d._crypto_generichash_keybytes_max=d.asm.ma).apply(null,arguments)},d._crypto_generichash_keybytes=function(){return(d._crypto_generichash_keybytes=d.asm.na).apply(null,arguments)},d._crypto_generichash_statebytes=function(){return(d._crypto_generichash_statebytes=d.asm.oa).apply(null,arguments)},d._crypto_generichash=function(){return(d._crypto_generichash=d.asm.pa).apply(null,arguments)},d._crypto_generichash_init=function(){return(d._crypto_generichash_init=d.asm.qa).apply(null,arguments)},d._crypto_generichash_update=function(){return(d._crypto_generichash_update=d.asm.ra).apply(null,arguments)},d._crypto_generichash_final=function(){return(d._crypto_generichash_final=d.asm.sa).apply(null,arguments)},d._crypto_generichash_keygen=function(){return(d._crypto_generichash_keygen=d.asm.ta).apply(null,arguments)},d._crypto_hash_bytes=function(){return(d._crypto_hash_bytes=d.asm.ua).apply(null,arguments)},d._crypto_hash=function(){return(d._crypto_hash=d.asm.va).apply(null,arguments)},d._crypto_kdf_bytes_min=function(){return(d._crypto_kdf_bytes_min=d.asm.wa).apply(null,arguments)},d._crypto_kdf_bytes_max=function(){return(d._crypto_kdf_bytes_max=d.asm.xa).apply(null,arguments)},d._crypto_kdf_contextbytes=function(){return(d._crypto_kdf_contextbytes=d.asm.ya).apply(null,arguments)},d._crypto_kdf_keybytes=function(){return(d._crypto_kdf_keybytes=d.asm.za).apply(null,arguments)},d._crypto_kdf_derive_from_key=function(){return(d._crypto_kdf_derive_from_key=d.asm.Aa).apply(null,arguments)},d._crypto_kdf_keygen=function(){return(d._crypto_kdf_keygen=d.asm.Ba).apply(null,arguments)},d._crypto_kx_seed_keypair=function(){return(d._crypto_kx_seed_keypair=d.asm.Ca).apply(null,arguments)},d._crypto_kx_keypair=function(){return(d._crypto_kx_keypair=d.asm.Da).apply(null,arguments)},d._crypto_kx_client_session_keys=function(){return(d._crypto_kx_client_session_keys=d.asm.Ea).apply(null,arguments)},d._crypto_kx_server_session_keys=function(){return(d._crypto_kx_server_session_keys=d.asm.Fa).apply(null,arguments)},d._crypto_kx_publickeybytes=function(){return(d._crypto_kx_publickeybytes=d.asm.Ga).apply(null,arguments)},d._crypto_kx_secretkeybytes=function(){return(d._crypto_kx_secretkeybytes=d.asm.Ha).apply(null,arguments)},d._crypto_kx_seedbytes=function(){return(d._crypto_kx_seedbytes=d.asm.Ia).apply(null,arguments)},d._crypto_kx_sessionkeybytes=function(){return(d._crypto_kx_sessionkeybytes=d.asm.Ja).apply(null,arguments)},d._crypto_scalarmult_base=function(){return(d._crypto_scalarmult_base=d.asm.Ka).apply(null,arguments)},d._crypto_scalarmult=function(){return(d._crypto_scalarmult=d.asm.La).apply(null,arguments)},d._crypto_scalarmult_bytes=function(){return(d._crypto_scalarmult_bytes=d.asm.Ma).apply(null,arguments)},d._crypto_scalarmult_scalarbytes=function(){return(d._crypto_scalarmult_scalarbytes=d.asm.Na).apply(null,arguments)},d._crypto_secretbox_keybytes=function(){return(d._crypto_secretbox_keybytes=d.asm.Oa).apply(null,arguments)},d._crypto_secretbox_noncebytes=function(){return(d._crypto_secretbox_noncebytes=d.asm.Pa).apply(null,arguments)},d._crypto_secretbox_macbytes=function(){return(d._crypto_secretbox_macbytes=d.asm.Qa).apply(null,arguments)},d._crypto_secretbox_messagebytes_max=function(){return(d._crypto_secretbox_messagebytes_max=d.asm.Ra).apply(null,arguments)},d._crypto_secretbox_keygen=function(){return(d._crypto_secretbox_keygen=d.asm.Sa).apply(null,arguments)},d._crypto_secretbox_detached=function(){return(d._crypto_secretbox_detached=d.asm.Ta).apply(null,arguments)},d._crypto_secretbox_easy=function(){return(d._crypto_secretbox_easy=d.asm.Ua).apply(null,arguments)},d._crypto_secretbox_open_detached=function(){return(d._crypto_secretbox_open_detached=d.asm.Va).apply(null,arguments)},d._crypto_secretbox_open_easy=function(){return(d._crypto_secretbox_open_easy=d.asm.Wa).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_keygen=function(){return(d._crypto_secretstream_xchacha20poly1305_keygen=d.asm.Xa).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_init_push=function(){return(d._crypto_secretstream_xchacha20poly1305_init_push=d.asm.Ya).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_init_pull=function(){return(d._crypto_secretstream_xchacha20poly1305_init_pull=d.asm.Za).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_rekey=function(){return(d._crypto_secretstream_xchacha20poly1305_rekey=d.asm._a).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_push=function(){return(d._crypto_secretstream_xchacha20poly1305_push=d.asm.$a).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_pull=function(){return(d._crypto_secretstream_xchacha20poly1305_pull=d.asm.ab).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_statebytes=function(){return(d._crypto_secretstream_xchacha20poly1305_statebytes=d.asm.bb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_abytes=function(){return(d._crypto_secretstream_xchacha20poly1305_abytes=d.asm.cb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_headerbytes=function(){return(d._crypto_secretstream_xchacha20poly1305_headerbytes=d.asm.db).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_keybytes=function(){return(d._crypto_secretstream_xchacha20poly1305_keybytes=d.asm.eb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_messagebytes_max=function(){return(d._crypto_secretstream_xchacha20poly1305_messagebytes_max=d.asm.fb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_tag_message=function(){return(d._crypto_secretstream_xchacha20poly1305_tag_message=d.asm.gb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_tag_push=function(){return(d._crypto_secretstream_xchacha20poly1305_tag_push=d.asm.hb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_tag_rekey=function(){return(d._crypto_secretstream_xchacha20poly1305_tag_rekey=d.asm.ib).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_tag_final=function(){return(d._crypto_secretstream_xchacha20poly1305_tag_final=d.asm.jb).apply(null,arguments)},d._crypto_shorthash_bytes=function(){return(d._crypto_shorthash_bytes=d.asm.kb).apply(null,arguments)},d._crypto_shorthash_keybytes=function(){return(d._crypto_shorthash_keybytes=d.asm.lb).apply(null,arguments)},d._crypto_shorthash=function(){return(d._crypto_shorthash=d.asm.mb).apply(null,arguments)},d._crypto_shorthash_keygen=function(){return(d._crypto_shorthash_keygen=d.asm.nb).apply(null,arguments)},d._crypto_sign_statebytes=function(){return(d._crypto_sign_statebytes=d.asm.ob).apply(null,arguments)},d._crypto_sign_bytes=function(){return(d._crypto_sign_bytes=d.asm.pb).apply(null,arguments)},d._crypto_sign_seedbytes=function(){return(d._crypto_sign_seedbytes=d.asm.qb).apply(null,arguments)},d._crypto_sign_publickeybytes=function(){return(d._crypto_sign_publickeybytes=d.asm.rb).apply(null,arguments)},d._crypto_sign_secretkeybytes=function(){return(d._crypto_sign_secretkeybytes=d.asm.sb).apply(null,arguments)},d._crypto_sign_messagebytes_max=function(){return(d._crypto_sign_messagebytes_max=d.asm.tb).apply(null,arguments)},d._crypto_sign_seed_keypair=function(){return(d._crypto_sign_seed_keypair=d.asm.ub).apply(null,arguments)},d._crypto_sign_keypair=function(){return(d._crypto_sign_keypair=d.asm.vb).apply(null,arguments)},d._crypto_sign=function(){return(d._crypto_sign=d.asm.wb).apply(null,arguments)},d._crypto_sign_open=function(){return(d._crypto_sign_open=d.asm.xb).apply(null,arguments)},d._crypto_sign_detached=function(){return(d._crypto_sign_detached=d.asm.yb).apply(null,arguments)},d._crypto_sign_verify_detached=function(){return(d._crypto_sign_verify_detached=d.asm.zb).apply(null,arguments)},d._crypto_sign_init=function(){return(d._crypto_sign_init=d.asm.Ab).apply(null,arguments)},d._crypto_sign_update=function(){return(d._crypto_sign_update=d.asm.Bb).apply(null,arguments)},d._crypto_sign_final_create=function(){return(d._crypto_sign_final_create=d.asm.Cb).apply(null,arguments)},d._crypto_sign_final_verify=function(){return(d._crypto_sign_final_verify=d.asm.Db).apply(null,arguments)},d._crypto_sign_ed25519_pk_to_curve25519=function(){return(d._crypto_sign_ed25519_pk_to_curve25519=d.asm.Eb).apply(null,arguments)},d._crypto_sign_ed25519_sk_to_curve25519=function(){return(d._crypto_sign_ed25519_sk_to_curve25519=d.asm.Fb).apply(null,arguments)},d._randombytes_random=function(){return(d._randombytes_random=d.asm.Gb).apply(null,arguments)},d._randombytes_stir=function(){return(d._randombytes_stir=d.asm.Hb).apply(null,arguments)},d._randombytes_uniform=function(){return(d._randombytes_uniform=d.asm.Ib).apply(null,arguments)},d._randombytes_buf=function(){return(d._randombytes_buf=d.asm.Jb).apply(null,arguments)},d._randombytes_buf_deterministic=function(){return(d._randombytes_buf_deterministic=d.asm.Kb).apply(null,arguments)},d._randombytes_seedbytes=function(){return(d._randombytes_seedbytes=d.asm.Lb).apply(null,arguments)},d._randombytes_close=function(){return(d._randombytes_close=d.asm.Mb).apply(null,arguments)},d._randombytes=function(){return(d._randombytes=d.asm.Nb).apply(null,arguments)},d._sodium_bin2hex=function(){return(d._sodium_bin2hex=d.asm.Ob).apply(null,arguments)},d._sodium_hex2bin=function(){return(d._sodium_hex2bin=d.asm.Pb).apply(null,arguments)},d._sodium_base64_encoded_len=function(){return(d._sodium_base64_encoded_len=d.asm.Qb).apply(null,arguments)},d._sodium_bin2base64=function(){return(d._sodium_bin2base64=d.asm.Rb).apply(null,arguments)},d._sodium_base642bin=function(){return(d._sodium_base642bin=d.asm.Sb).apply(null,arguments)},d._sodium_init=function(){return(d._sodium_init=d.asm.Tb).apply(null,arguments)},d._sodium_pad=function(){return(d._sodium_pad=d.asm.Ub).apply(null,arguments)},d._sodium_unpad=function(){return(d._sodium_unpad=d.asm.Vb).apply(null,arguments)},d._sodium_version_string=function(){return(d._sodium_version_string=d.asm.Wb).apply(null,arguments)},d._sodium_library_version_major=function(){return(d._sodium_library_version_major=d.asm.Xb).apply(null,arguments)},d._sodium_library_version_minor=function(){return(d._sodium_library_version_minor=d.asm.Yb).apply(null,arguments)},d._sodium_library_minimal=function(){return(d._sodium_library_minimal=d.asm.Zb).apply(null,arguments)},d._malloc=function(){return(d._malloc=d.asm._b).apply(null,arguments)},d._free=function(){return(d._free=d.asm.$b).apply(null,arguments)},d.UTF8ToString=P,d.setValue=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"i8";switch(n.endsWith("*")&&(n="*"),n){case"i1":case"i8":A[e>>0]=t;break;case"i16":I[e>>1]=t;break;case"i32":T[e>>2]=t;break;case"i64":K=[t>>>0,(z=t,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],T[e>>2]=K[0],T[e+4>>2]=K[1];break;case"float":C[e>>2]=t;break;case"double":E[e>>3]=t;break;case"*":S[e>>2]=t;break;default:j("invalid type for setValue: "+n)}},d.getValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"i8";switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return A[e>>0];case"i16":return I[e>>1];case"i32":case"i64":return T[e>>2];case"float":return C[e>>2];case"double":return E[e>>3];case"*":return S[e>>2];default:j("invalid type for getValue: "+t)}return null},L=function e(){te||ae(),te||(L=e)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();ae()}))};var o,c,u,d=void 0!==d?d:{},l=Object.assign({},d),f="object"==typeof window,p="function"==typeof importScripts,b="object"==typeof i&&"object"==typeof i.versions&&"string"==typeof i.versions.node,m="";if(b){var h=n(75992),g=n(78110);m=p?g.dirname(m)+"/":"//",o=function(e,t){var n=X(e);return n?t?n:n.toString():(e=W(e)?new URL(e):g.normalize(e),h.readFileSync(e,t?void 0:"utf8"))},u=function(e){var t=o(e,!0);return t.buffer||(t=new Uint8Array(t)),t},c=function(e,t,n){var a=X(e);a&&t(a),e=W(e)?new URL(e):g.normalize(e),h.readFile(e,(function(e,a){e?n(e):t(a.buffer)}))},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),i.argv.slice(2),e.exports=d,d.inspect=function(){return"[Emscripten Module object]"}}else(f||p)&&(p?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),m=0!==m.indexOf("blob:")?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText}catch(t){var n=X(e);if(n)return function(e){for(var t=[],n=0;n255&&(a&=255),t.push(String.fromCharCode(a))}return t.join("")}(n);throw t}},p&&(u=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}catch(t){var n=X(e);if(n)return n;throw t}}),c=function(e,t,n){var a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="arraybuffer",a.onload=function(){if(200==a.status||0==a.status&&a.response)t(a.response);else{var o=X(e);o?t(o.buffer):n()}},a.onerror=n,a.send(null)});d.print;var y,v,w=d.printErr||void 0;Object.assign(d,l),l=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit,d.wasmBinary&&(y=d.wasmBinary),d.noExitRuntime,"object"!=typeof WebAssembly&&F("no native wasm support detected");var k,A,x,I,T,S,C,E=!1,R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function M(e,t){return e?function(e,t,n){for(var a=t+n,o=t;e[o]&&!(o>=a);)++o;if(o-t>16&&e.buffer&&R)return R.decode(e.subarray(t,o));for(var r="";t>10,56320|1023&u)}}else r+=String.fromCharCode((31&i)<<6|s)}else r+=String.fromCharCode(i)}return r}(A,e,t):""}function P(){var e=v.buffer;d.HEAP8=k=new Int8Array(e),d.HEAP16=x=new Int16Array(e),d.HEAP32=I=new Int32Array(e),d.HEAPU8=A=new Uint8Array(e),d.HEAPU16=new Uint16Array(e),d.HEAPU32=T=new Uint32Array(e),d.HEAPF32=S=new Float32Array(e),d.HEAPF64=C=new Float64Array(e)}var U=[],_=[],B=[],D=0,N=null,O=null;function F(e){throw d.onAbort&&d.onAbort(e),w(e="Aborted("+e+")"),E=!0,e+=". Build with -sASSERTIONS for more info.",new WebAssembly.RuntimeError(e)}var L,j,H,G,z="data:application/octet-stream;base64,";function K(e){return e.startsWith(z)}function W(e){return e.startsWith("file://")}function Z(e){try{if(e==L&&y)return new Uint8Array(y);var t=X(e);if(t)return t;if(u)return u(e);throw"both async and sync fetching of the wasm failed"}catch(e){F(e)}}K(L="data:application/octet-stream;base64,AGFzbQEAAAABiwIfYAN/f34Bf2ACf38Bf2AAAX9gA39/fwF/YAJ/fwBgA39/fwBgBX9/f39/AX9gC39/f39/f39/f39/AX9gBn9/fn9/fwF/YAZ/f35/fn8Bf2AGf39/f39/AX9gAX8AYAR/fn9/AX9gBH9/f38Bf2ABfwF/YAd/f39/f39/AX9gAABgBn9/f35/fwF/YAR/f35/AX9gA39/fgBgCH9/fn9/fn9/AX9gCX9/f39+f35/fwF/YAh/f39/f39/fwF/YAx/f39/f39/f39/f38Bf2AEf39/fwBgBX9/fn9/AGAKf39/f39/f39/fwF/YAR/fn9/AGAGf39+f39/AGAEf39/fgBgBX9/fn9/AX8CHwUBYQFhAAMBYQFiABgBYQFjABABYQFkAAUBYQFlAA4DsAGuAQQFBAMQAgMABAUAAgUEBAsEBBsACwIcDgECAREDAw0DGAIFBAUEBAQBAh0RHhEDAgMLDgUTBBMDAQMLFBQVFQICAwUFAQQBEBkZCg8PCAgEEwQUFREDAgIBAQICAgICCwMDAgkMAQMLDgEAARISAgUOAgUNBgoKCgYaGgoKDQ0PCgYPCBYPChYGBgcHCQcXBwcHBwcXBxcMBgYDAQICCwIDDAINFgYBDw0DDQ4BBgQEAXAADgUGAQFAgIACBggBfwFB8JoGCweWBp4BAWYCAAFnAJsBAWgAmgEBaQCZAQFqAJgBAWsAlwEBbACWAQFtAJUBAW4AlAEBbwAKAXAAXwFxAC4BcgAQAXMAHgF0ABQBdQAKAXYANAF3AC4BeAAQAXkAHgF6ABQBQQCTAQFCAJIBAUMAkAEBRACPAQFFAAoBRgAmAUcALgFIABABSQAeAUoAFAFLAAoBTAAKAU0AjgEBTgCNAQFPABQBUAAKAVEACgFSAAoBUwAKAVQAJgFVABABVgAeAVcApQEBWAA9AVkAIQFaAFEBXwCMAQEkAIsBAmFhAIoBAmJhAFACY2EAiQECZGEATwJlYQCHAQJmYQCGAQJnYQCFAQJoYQCkAQJpYQAQAmphABoCa2EACgJsYQAQAm1hABoCbmEACgJvYQCnAQJwYQCEAQJxYQAjAnJhAIMBAnNhACICdGEAFAJ1YQAaAnZhAIIBAndhABACeGEAGgJ5YQA0AnphAAoCQWEAgQECQmEAFAJDYQCfAQJEYQA9AkVhAJ4BAkZhAJ0BAkdhAAoCSGEACgJJYQAKAkphAAoCS2EAoAECTGEAPAJNYQAKAk5hAAoCT2EACgJQYQAmAlFhABACUmEAHgJTYQAUAlRhAFECVWEAgAECVmEAUAJXYQBPAlhhABQCWWEAZgJaYQBlAl9hAGQCJGEAfwJhYgB+AmJiAGMCY2IAYgJkYgAmAmViAAoCZmIAYQJnYgAuAmhiAEUCaWIAYAJqYgBEAmtiADQCbGIAEAJtYgB9Am5iAKMBAm9iAFwCcGIAGgJxYgAKAnJiAAoCc2IAGgJ0YgBbAnViAFoCdmIAsQECd2IAfAJ4YgB7AnliAHoCemIAeQJBYgCwAQJCYgB4AkNiAK8BAkRiAK4BAkViAF4CRmIAXQJHYgB2AkhiAEwCSWIAdQJKYgAWAktiAHQCTGIACgJNYgBzAk5iAHcCT2IArQECUGIArAECUWIAqwECUmIAqgECU2IAqQECVGIAZwJVYgCyAQJWYgCoAQJXYgCiAQJYYgChAQJZYgBEAlpiAEUCX2IAbQIkYgBsAmFjAQAJFwEAQQELDaYBnAGRAYgBcnFwb25ramloCrPlBK4BywYCG34HfyAAIAEoAgwiHUEBdKwiByAdrCITfiABKAIQIiCsIgYgASgCCCIhQQF0rCILfnwgASgCFCIdQQF0rCIIIAEoAgQiIkEBdKwiAn58IAEoAhgiH6wiCSABKAIAIiNBAXSsIgV+fCABKAIgIh5BE2ysIgMgHqwiEH58IAEoAiQiHkEmbKwiBCABKAIcIgFBAXSsIhR+fCACIAZ+IAsgE358IB2sIhEgBX58IAMgFH58IAQgCX58IAIgB34gIawiDiAOfnwgBSAGfnwgAUEmbKwiDyABrCIVfnwgAyAfQQF0rH58IAQgCH58IhdCgICAEHwiGEIah3wiGUKAgIAIfCIaQhmHfCIKIApCgICAEHwiDEKAgIDgD4N9PgIYIAAgBSAOfiACICKsIg1+fCAfQRNsrCIKIAl+fCAIIA9+fCADICBBAXSsIhZ+fCAEIAd+fCAIIAp+IAUgDX58IAYgD358IAMgB358IAQgDn58IB1BJmysIBF+ICOsIg0gDX58IAogFn58IAcgD358IAMgC358IAIgBH58IgpCgICAEHwiDUIah3wiG0KAgIAIfCIcQhmHfCISIBJCgICAEHwiEkKAgIDgD4N9PgIIIAAgCyARfiAGIAd+fCACIAl+fCAFIBV+fCAEIBB+fCAMQhqHfCIMIAxCgICACHwiDEKAgIDwD4N9PgIcIAAgBSATfiACIA5+fCAJIA9+fCADIAh+fCAEIAZ+fCASQhqHfCIDIANCgICACHwiA0KAgIDwD4N9PgIMIAAgCSALfiAGIAZ+fCAHIAh+fCACIBR+fCAFIBB+fCAEIB6sIgZ+fCAMQhmHfCIEIARCgICAEHwiBEKAgIDgD4N9PgIgIAAgGSAaQoCAgPAPg30gFyAYQoCAgGCDfSADQhmHfCIDQoCAgBB8IghCGoh8PgIUIAAgAyAIQoCAgOAPg30+AhAgACAHIAl+IBEgFn58IAsgFX58IAIgEH58IAUgBn58IARCGod8IgIgAkKAgIAIfCICQoCAgPAPg30+AiQgACAbIBxCgICA8A+DfSAKIA1CgICAYIN9IAJCGYdCE358IgJCgICAEHwiBUIaiHw+AgQgACACIAVCgICA4A+DfT4CAAudCQInfgx/IAAgAigCBCIqrCILIAEoAhQiK0EBdKwiFH4gAjQCACIDIAE0AhgiBn58IAIoAggiLKwiDSABNAIQIgd+fCACKAIMIi2sIhAgASgCDCIuQQF0rCIVfnwgAigCECIvrCIRIAE0AggiCH58IAIoAhQiMKwiFiABKAIEIjFBAXSsIhd+fCACKAIYIjKsIiAgATQCACIJfnwgAigCHCIzQRNsrCIMIAEoAiQiNEEBdKwiGH58IAIoAiAiNUETbKwiBCABNAIgIgp+fCACKAIkIgJBE2ysIgUgASgCHCIBQQF0rCIZfnwgByALfiADICusIhp+fCANIC6sIht+fCAIIBB+fCARIDGsIhx+fCAJIBZ+fCAyQRNsrCIOIDSsIh1+fCAKIAx+fCAEIAGsIh5+fCAFIAZ+fCALIBV+IAMgB358IAggDX58IBAgF358IAkgEX58IDBBE2ysIh8gGH58IAogDn58IAwgGX58IAQgBn58IAUgFH58IiJCgICAEHwiI0Iah3wiJEKAgIAIfCIlQhmHfCISIBJCgICAEHwiE0KAgIDgD4N9PgIYIAAgCyAXfiADIAh+fCAJIA1+fCAtQRNsrCIPIBh+fCAKIC9BE2ysIhJ+fCAZIB9+fCAGIA5+fCAMIBR+fCAEIAd+fCAFIBV+fCAJIAt+IAMgHH58ICxBE2ysIiEgHX58IAogD358IBIgHn58IAYgH358IA4gGn58IAcgDH58IAQgG358IAUgCH58ICpBE2ysIBh+IAMgCX58IAogIX58IA8gGX58IAYgEn58IBQgH358IAcgDn58IAwgFX58IAQgCH58IAUgF358IiFCgICAEHwiJkIah3wiJ0KAgIAIfCIoQhmHfCIPIA9CgICAEHwiKUKAgIDgD4N9PgIIIAAgBiALfiADIB5+fCANIBp+fCAHIBB+fCARIBt+fCAIIBZ+fCAcICB+fCAJIDOsIg9+fCAEIB1+fCAFIAp+fCATQhqHfCITIBNCgICACHwiE0KAgIDwD4N9PgIcIAAgCCALfiADIBt+fCANIBx+fCAJIBB+fCASIB1+fCAKIB9+fCAOIB5+fCAGIAx+fCAEIBp+fCAFIAd+fCApQhqHfCIEIARCgICACHwiBEKAgIDwD4N9PgIMIAAgCyAZfiADIAp+fCAGIA1+fCAQIBR+fCAHIBF+fCAVIBZ+fCAIICB+fCAPIBd+fCAJIDWsIgx+fCAFIBh+fCATQhmHfCIFIAVCgICAEHwiBUKAgIDgD4N9PgIgIAAgJCAlQoCAgPAPg30gIiAjQoCAgGCDfSAEQhmHfCIEQoCAgBB8Ig5CGoh8PgIUIAAgBCAOQoCAgOAPg30+AhAgACAKIAt+IAMgHX58IA0gHn58IAYgEH58IBEgGn58IAcgFn58IBsgIH58IAggD358IAwgHH58IAkgAqx+fCAFQhqHfCIDIANCgICACHwiA0KAgIDwD4N9PgIkIAAgJyAoQoCAgPAPg30gISAmQoCAgGCDfSADQhmHQhN+fCIDQoCAgBB8IgZCGoh8PgIEIAAgAyAGQoCAgOAPg30+AgALCwAgAEEAIAEQCBoL8gICAn8BfgJAIAJFDQAgACABOgAAIAAgAmoiA0EBayABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBA2sgAToAACADQQJrIAE6AAAgAkEHSQ0AIAAgAToAAyADQQRrIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBBGsgATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQQhrIAE2AgAgAkEMayABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkEQayABNgIAIAJBFGsgATYCACACQRhrIAE2AgAgAkEcayABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa1CgYCAgBB+IQUgAyAEaiEBA0AgASAFNwMYIAEgBTcDECABIAU3AwggASAFNwMAIAFBIGohASACQSBrIgJBH0sNAAsLIAALGAEBf0HomgIoAgAiAARAIAAREAALEAIACwQAQSALgAQBA38gAkGABE8EQCAAIAEgAhADIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAEEDcUUEQCAAIQIMAQsgAkUEQCAAIQIMAQsgACECA0AgAiABLQAAOgAAIAFBAWohASACQQFqIgJBA3FFDQEgAiADSQ0ACwsCQCADQXxxIgRBwABJDQAgAiAEQUBqIgVLDQADQCACIAEoAgA2AgAgAiABKAIENgIEIAIgASgCCDYCCCACIAEoAgw2AgwgAiABKAIQNgIQIAIgASgCFDYCFCACIAEoAhg2AhggAiABKAIcNgIcIAIgASgCIDYCICACIAEoAiQ2AiQgAiABKAIoNgIoIAIgASgCLDYCLCACIAEoAjA2AjAgAiABKAI0NgI0IAIgASgCODYCOCACIAEoAjw2AjwgAUFAayEBIAJBQGsiAiAFTQ0ACwsgAiAETw0BA0AgAiABKAIANgIAIAFBBGohASACQQRqIgIgBEkNAAsMAQsgA0EESQRAIAAhAgwBCyAAIANBBGsiBEsEQCAAIQIMAQsgACECA0AgAiABLQAAOgAAIAIgAS0AAToAASACIAEtAAI6AAIgAiABLQADOgADIAFBBGohASACQQRqIgIgBE0NAAsLIAIgA0kEQANAIAIgAS0AADoAACABQQFqIQEgAkEBaiICIANHDQALCyAAC6EGAgd+BH8jAEHABWsiDCQAAkAgAlANACAAIAApA0giAyACQgOGfCIENwNIIABBQGsiCiAKKQMAIAMgBFatfCACQj2IfDcDACACQoABIANCA4hC/wCDIgR9IghaBEBCACEDIARC/wCFQgNaBEAgCEL8AYMhByAAQdAAaiEKA0AgCiADIAR8p2ogASADp2otAAA6AAAgCiADQgGEIgkgBHynaiABIAmnai0AADoAACAKIANCAoQiCSAEfKdqIAEgCadqLQAAOgAAIAogA0IDhCIJIAR8p2ogASAJp2otAAA6AAAgA0IEfCEDIAVCBHwiBSAHUg0ACwsgCEIDgyIFQgBSBEADQCAAIAMgBHynaiABIAOnai0AADoAUCADQgF8IQMgBkIBfCIGIAVSDQALCyAAIABB0ABqIAwgDEGABWoiChAlIAEgCKdqIQEgAiAIfSICQv8AVgRAA0AgACABIAwgChAlIAFBgAFqIQEgAkKAAX0iAkL/AFYNAAsLAkAgAlANACACQgODIQRCACEGQgAhAyACQgRaBEAgAkJ8gyEFIABB0ABqIQpCACECA0AgCiADpyILaiABIAtqLQAAOgAAIAogC0EBciINaiABIA1qLQAAOgAAIAogC0ECciINaiABIA1qLQAAOgAAIAogC0EDciILaiABIAtqLQAAOgAAIANCBHwhAyACQgR8IgIgBVINAAsLIARQDQADQCAAIAOnIgpqIAEgCmotAAA6AFAgA0IBfCEDIAZCAXwiBiAEUg0ACwsgDEHABRAHDAELQgAhAyACQgRaBEAgAkJ8gyEIIABB0ABqIQoDQCAKIAMgBHynaiABIAOnai0AADoAACAKIANCAYQiByAEfKdqIAEgB6dqLQAAOgAAIAogA0IChCIHIAR8p2ogASAHp2otAAA6AAAgCiADQgOEIgcgBHynaiABIAenai0AADoAACADQgR8IQMgBUIEfCIFIAhSDQALCyACQgODIgJQDQADQCAAIAMgBHynaiABIAOnai0AADoAUCADQgF8IQMgBkIBfCIGIAJSDQALCyAMQcAFaiQAQQALsQQCE38EfiABKAIoIQIgASgCBCEDIAEoAiwhBCABKAIIIQUgASgCMCEGIAEoAgwhByABKAI0IQggASgCECEJIAEoAjghCiABKAIUIQsgASgCPCEMIAEoAhghDSABQUBrIg4oAgAhDyABKAIcIRAgASgCRCERIAEoAiAhEiABKAJIIRMgASgCACEUIAAgASgCJCABKAJMajYCJCAAIBIgE2o2AiAgACAQIBFqNgIcIAAgDSAPajYCGCAAIAsgDGo2AhQgACAJIApqNgIQIAAgByAIajYCDCAAIAUgBmo2AgggACADIARqNgIEIAAgAiAUajYCACABKAIoIQIgASgCBCEDIAEoAiwhBCABKAIIIQUgASgCMCEGIAEoAgwhByABKAI0IQggASgCECEJIAEoAjghCiABKAIUIQsgASgCPCEMIAEoAhghDSAOKAIAIQ4gASgCHCEPIAEoAkQhECABKAIgIREgASgCSCESIAEoAgAhEyAAIAEoAkwgASgCJGs2AkwgACASIBFrNgJIIAAgECAPazYCRCAAQUBrIA4gDWs2AgAgACAMIAtrNgI8IAAgCiAJazYCOCAAIAggB2s2AjQgACAGIAVrNgIwIAAgBCADazYCLCAAIAIgE2s2AiggASkCUCEVIAEpAlghFiABKQJgIRcgASkCaCEYIAAgASkCcDcCcCAAIBg3AmggACAXNwJgIAAgFjcCWCAAIBU3AlAgAEH4AGogAUH4AGpBoAsQBgvwCQEefyABKAIoIQMgASgCBCEEIAEoAiwhBSABKAIIIQYgASgCMCEHIAEoAgwhCCABKAI0IQkgASgCECEKIAEoAjghCyABKAIUIQwgASgCPCENIAEoAhghDiABQUBrIg8oAgAhECABKAIcIREgASgCRCESIAEoAiAhEyABKAJIIRQgASgCACEVIAAgASgCJCABKAJMajYCJCAAIBMgFGo2AiAgACARIBJqNgIcIAAgDiAQajYCGCAAIAwgDWo2AhQgACAKIAtqNgIQIAAgCCAJajYCDCAAIAYgB2o2AgggACAEIAVqNgIEIAAgAyAVajYCACABKAIoIQUgASgCBCEDIAEoAiwhBiABKAIIIQcgASgCMCEIIAEoAgwhCSABKAI0IQogASgCECELIAEoAjghDCABKAIUIQ0gASgCPCEOIAEoAhghECAPKAIAIQ8gASgCHCEEIAEoAkQhESABKAIgIRIgASgCSCETIAEoAgAhFCAAIAEoAkwgASgCJGs2AkwgACATIBJrNgJIIAAgESAEazYCRCAAQUBrIgQgDyAQazYCACAAIA4gDWs2AjwgACAMIAtrNgI4IAAgCiAJazYCNCAAIAggB2s2AjAgACAGIANrNgIsIABBKGoiAyAFIBRrNgIAIABB0ABqIAAgAhAGIAMgAyACQShqEAYgAEH4AGogAkH4AGogAUH4AGoQBiAAIAFB0ABqIAJB0ABqEAYgACgCBCEVIAAoAgghFiAAKAIMIRcgACgCECEYIAAoAhQhGSAAKAIYIRogACgCHCEbIAAoAiAhHCAAKAIkIR0gAygCACEBIAAoAlAhAiAAKAIsIQUgACgCVCEGIAAoAjAhByAAKAJYIQggACgCNCEJIAAoAlwhCiAAKAI4IQsgACgCYCEMIAAoAjwhDSAAKAJkIQ4gBCgCACEPIAAoAmghECAAKAJEIREgACgCbCESIAAoAkghEyAAKAJwIRQgACgCACEeIAAgACgCTCIfIAAoAnQiIGo2AkwgACATIBRqNgJIIAAgESASajYCRCAEIA8gEGo2AgAgACANIA5qNgI8IAAgCyAMajYCOCAAIAkgCmo2AjQgACAHIAhqNgIwIAAgBSAGajYCLCADIAEgAmo2AgAgACAgIB9rNgIkIAAgFCATazYCICAAIBIgEWs2AhwgACAQIA9rNgIYIAAgDiANazYCFCAAIAwgC2s2AhAgACAKIAlrNgIMIAAgCCAHazYCCCAAIAYgBWs2AgQgACACIAFrNgIAIAAgHUEBdCIBIAAoApwBIgJrNgKcASAAIBxBAXQiAyAAKAKYASIEazYCmAEgACAbQQF0IgUgACgClAEiBms2ApQBIAAgGkEBdCIHIAAoApABIghrNgKQASAAIBlBAXQiCSAAKAKMASIKazYCjAEgACAYQQF0IgsgACgCiAEiDGs2AogBIAAgF0EBdCINIAAoAoQBIg5rNgKEASAAIBZBAXQiDyAAKAKAASIQazYCgAEgACAVQQF0IhEgACgCfCISazYCfCAAIB5BAXQiEyAAKAJ4IhRrNgJ4IAAgAyAEajYCcCAAIAUgBmo2AmwgACAHIAhqNgJoIAAgCSAKajYCZCAAIAsgDGo2AmAgACANIA5qNgJcIAAgDyAQajYCWCAAIBEgEmo2AlQgACATIBRqNgJQIAAgASACajYCdAvUAQIFfwJ+An8gAkIAUgRAIABB4AFqIQcgAEHgAGohAyAAKADgAiEEA0AgAyAEaiEGQYACIARrIgWtIgggAloEQCAGIAEgAqciARALGiAAIAAoAOACIAFqNgDgAkEADAMLIAYgASAFEAsaIAAgACgA4AIgBWo2AOACIAAgACkAQCIJQoABfDcAQCAAIAApAEggCUL/flatfDcASCAAIAMQKCADIAdBgAEQCxogACAAKADgAkGAAWsiBDYA4AIgASAFaiEBIAIgCH0iAkIAUg0ACwtBAAsLBABBEAuDBwEUfyABKAIEIQwgACgCBCEDIAEoAgghDSAAKAIIIQQgASgCDCEOIAAoAgwhBSABKAIQIQ8gACgCECEGIAEoAhQhECAAKAIUIQcgASgCGCERIAAoAhghCCABKAIcIRIgACgCHCEJIAEoAiAhEyAAKAIgIQogASgCJCEUIAAoAiQhCyAAQQAgAmsiAiAAKAIAIhUgASgCAHNxIBVzNgIAIAAgCyALIBRzIAJxczYCJCAAIAogCiATcyACcXM2AiAgACAJIAkgEnMgAnFzNgIcIAAgCCAIIBFzIAJxczYCGCAAIAcgByAQcyACcXM2AhQgACAGIAYgD3MgAnFzNgIQIAAgBSAFIA5zIAJxczYCDCAAIAQgBCANcyACcXM2AgggACADIAMgDHMgAnFzNgIEIAAoAighAyABKAIoIQwgACgCLCEEIAEoAiwhDSAAKAIwIQUgASgCMCEOIAAoAjQhBiABKAI0IQ8gACgCOCEHIAEoAjghECAAKAI8IQggASgCPCERIABBQGsiEigCACEJIAFBQGsoAgAhEyAAKAJEIQogASgCRCEUIAAoAkghCyABKAJIIRUgACAAKAJMIhYgASgCTHMgAnEgFnM2AkwgACALIAsgFXMgAnFzNgJIIAAgCiAKIBRzIAJxczYCRCASIAkgCSATcyACcXM2AgAgACAIIAggEXMgAnFzNgI8IAAgByAHIBBzIAJxczYCOCAAIAYgBiAPcyACcXM2AjQgACAFIAUgDnMgAnFzNgIwIAAgBCAEIA1zIAJxczYCLCAAIAMgAyAMcyACcXM2AiggACgCUCEDIAEoAlAhDCAAKAJUIQQgASgCVCENIAAoAlghBSABKAJYIQ4gACgCXCEGIAEoAlwhDyAAKAJgIQcgASgCYCEQIAAoAmQhCCABKAJkIREgACgCaCEJIAEoAmghEiAAKAJsIQogASgCbCETIAAoAnAhCyABKAJwIRQgACAAKAJ0IhUgASgCdHMgAnEgFXM2AnQgACALIAsgFHMgAnFzNgJwIAAgCiAKIBNzIAJxczYCbCAAIAkgCSAScyACcXM2AmggACAIIAggEXMgAnFzNgJkIAAgByAHIBBzIAJxczYCYCAAIAYgBiAPcyACcXM2AlwgACAFIAUgDnMgAnFzNgJYIAAgBCAEIA1zIAJxczYCVCAAIAMgAyAMcyACcXM2AlAL6AQBCX8gACABKAIgIgUgASgCHCIGIAEoAhgiByABKAIUIgggASgCECIJIAEoAgwiCiABKAIIIgQgASgCBCIDIAEoAgAiAiABKAIkIgFBE2xBgICACGpBGXZqQRp1akEZdWpBGnVqQRl1akEadWpBGXVqQRp1akEZdWpBGnUgAWpBGXVBE2wgAmoiAjoAACAAIAJBEHY6AAIgACACQQh2OgABIAAgAyACQRp1aiIDQQ52OgAFIAAgA0EGdjoABCAAIAJBGHZBA3EgA0ECdHI6AAMgACAEIANBGXVqIgJBDXY6AAggACACQQV2OgAHIAAgAkEDdCADQYCAgA5xQRZ2cjoABiAAIAogAkEadWoiBEELdjoACyAAIARBA3Y6AAogACAEQQV0IAJBgICAH3FBFXZyOgAJIAAgCSAEQRl1aiICQRJ2OgAPIAAgAkEKdjoADiAAIAJBAnY6AA0gACAIIAJBGnVqIgM6ABAgACACQQZ0IARBgIDgD3FBE3ZyOgAMIAAgA0EQdjoAEiAAIANBCHY6ABEgACAHIANBGXVqIgJBD3Y6ABUgACACQQd2OgAUIAAgA0EYdkEBcSACQQF0cjoAEyAAIAYgAkEadWoiA0ENdjoAGCAAIANBBXY6ABcgACADQQN0IAJBgICAHHFBF3ZyOgAWIAAgBSADQRl1aiICQQx2OgAbIAAgAkEEdjoAGiAAIAJBBHQgA0GAgIAPcUEVdnI6ABkgACABIAJBGnVqIgFBCnY6AB4gACABQQJ2OgAdIAAgAUGAgPAPcUESdjoAHyAAIAFBBnQgAkGAgMAfcUEUdnI6ABwLvQgCAX4DfyMAQcAFayIDJAAgACgCSEEDdkH/AHEiBCAAakHQAGohBQJAIARB7wBNBEAgBUHQjgJB8AAgBGsQCxoMAQsgBUHQjgJBgAEgBGsQCxogACAAQdAAaiIEIAMgA0GABWoQJSAEQQBB8AAQCBoLIAAgACkDQCICQjiGIAJCgP4Dg0IohoQgAkKAgPwHg0IYhiACQoCAgPgPg0IIhoSEIAJCCIhCgICA+A+DIAJCGIhCgID8B4OEIAJCKIhCgP4DgyACQjiIhISENwDAASAAIAApA0giAkI4hiACQoD+A4NCKIaEIAJCgID8B4NCGIYgAkKAgID4D4NCCIaEhCACQgiIQoCAgPgPgyACQhiIQoCA/AeDhCACQiiIQoD+A4MgAkI4iISEhDcAyAEgACAAQdAAaiADIANBgAVqECUgASAAKQMAIgJCOIYgAkKA/gODQiiGhCACQoCA/AeDQhiGIAJCgICA+A+DQgiGhIQgAkIIiEKAgID4D4MgAkIYiEKAgPwHg4QgAkIoiEKA/gODIAJCOIiEhIQ3AAAgASAAKQMIIgJCOIYgAkKA/gODQiiGhCACQoCA/AeDQhiGIAJCgICA+A+DQgiGhIQgAkIIiEKAgID4D4MgAkIYiEKAgPwHg4QgAkIoiEKA/gODIAJCOIiEhIQ3AAggASAAKQMQIgJCOIYgAkKA/gODQiiGhCACQoCA/AeDQhiGIAJCgICA+A+DQgiGhIQgAkIIiEKAgID4D4MgAkIYiEKAgPwHg4QgAkIoiEKA/gODIAJCOIiEhIQ3ABAgASAAKQMYIgJCOIYgAkKA/gODQiiGhCACQoCA/AeDQhiGIAJCgICA+A+DQgiGhIQgAkIIiEKAgID4D4MgAkIYiEKAgPwHg4QgAkIoiEKA/gODIAJCOIiEhIQ3ABggASAAKQMgIgJCOIYgAkKA/gODQiiGhCACQoCA/AeDQhiGIAJCgICA+A+DQgiGhIQgAkIIiEKAgID4D4MgAkIYiEKAgPwHg4QgAkIoiEKA/gODIAJCOIiEhIQ3ACAgASAAKQMoIgJCOIYgAkKA/gODQiiGhCACQoCA/AeDQhiGIAJCgICA+A+DQgiGhIQgAkIIiEKAgID4D4MgAkIYiEKAgPwHg4QgAkIoiEKA/gODIAJCOIiEhIQ3ACggASAAKQMwIgJCOIYgAkKA/gODQiiGhCACQoCA/AeDQhiGIAJCgICA+A+DQgiGhIQgAkIIiEKAgID4D4MgAkIYiEKAgPwHg4QgAkIoiEKA/gODIAJCOIiEhIQ3ADAgASAAKQM4IgJCOIYgAkKA/gODQiiGhCACQoCA/AeDQhiGIAJCgICA+A+DQgiGhIQgAkIIiEKAgID4D4MgAkIYiEKAgPwHg4QgAkIoiEKA/gODIAJCOIiEhIQ3ADggA0HABRAHIABB0AEQByADQcAFaiQACwgAIABBIBAWC+MOAhx+IH8jAEEwayIeJAAgACABEAUgAEHQAGogAUEoahAFIAAgASgCXCIiQQF0rCIIIAEoAlQiI0EBdKwiAn4gASgCWCIkrCINIA1+fCABKAJgIiWsIgcgASgCUCImQQF0rCIFfnwgASgCbCIfQSZsrCIOIB+sIhF+fCABKAJwIidBE2ysIgMgASgCaCIgQQF0rH58IAEoAnQiKEEmbKwiBCABKAJkIiFBAXSsIgl+fEIBhiIVQoCAgBB8IhZCGocgAiAHfiAkQQF0rCILICKsIhJ+fCAhrCIPIAV+fCADIB9BAXSsIhN+fCAEICCsIgp+fEIBhnwiF0KAgIAIfCIYQhmHIAggEn4gByALfnwgAiAJfnwgBSAKfnwgAyAnrCIQfnwgBCATfnxCAYZ8IgYgBkKAgIAQfCIMQoCAgOAPg30+ApABIAAgIUEmbKwgD34gJqwiBiAGfnwgIEETbKwiBiAlQQF0rCIUfnwgCCAOfnwgAyALfnwgAiAEfnxCAYYiGUKAgIAQfCIaQhqHIAYgCX4gBSAjrCIbfnwgByAOfnwgAyAIfnwgBCANfnxCAYZ8IhxCgICACHwiHUIZhyAFIA1+IAIgG358IAYgCn58IAkgDn58IAMgFH58IAQgCH58QgGGfCIGIAZCgICAEHwiBkKAgIDgD4N9PgKAASAAIAsgD34gByAIfnwgAiAKfnwgBSARfnwgBCAQfnxCAYYgDEIah3wiDCAMQoCAgAh8IgxCgICA8A+DfT4ClAEgACAFIBJ+IAIgDX58IAogDn58IAMgCX58IAQgB358QgGGIAZCGod8IgMgA0KAgIAIfCIDQoCAgPAPg30+AoQBIAAgCiALfiAHIAd+fCAIIAl+fCACIBN+fCAFIBB+fCAEICisIgd+fEIBhiAMQhmHfCIEIARCgICAEHwiBEKAgIDgD4N9PgKYASAAIBcgGEKAgIDwD4N9IBUgFkKAgIBgg30gA0IZh3wiA0KAgIAQfCIJQhqIfD4CjAEgACADIAlCgICA4A+DfT4CiAEgACAIIAp+IA8gFH58IAsgEX58IAIgEH58IAUgB358QgGGIARCGod8IgIgAkKAgIAIfCICQoCAgPAPg30+ApwBIAAgHCAdQoCAgPAPg30gGSAaQoCAgGCDfSACQhmHQhN+fCICQoCAgBB8IgVCGoh8PgJ8IAAgAiAFQoCAgOAPg30+AnggASgCKCEfIAEoAiwhICABKAIEISEgASgCMCEiIAEoAgghIyABKAI0ISQgASgCDCElIAEoAjghJiABKAIQIScgASgCPCEoIAEoAhQhKSABQUBrKAIAISogASgCGCErIAEoAkQhLCABKAIcIS0gASgCSCEuIAEoAiAhLyABKAIAITAgACABKAJMIAEoAiRqNgJMIAAgLiAvajYCSCAAICwgLWo2AkQgAEFAayIyICogK2o2AgAgACAoIClqNgI8IAAgJiAnajYCOCAAICQgJWo2AjQgACAiICNqNgIwIAAgICAhajYCLCAAQShqIgEgHyAwajYCACAeIAEQBSAAKAJQIR8gACgCBCEgIAAoAlQhISAAKAIIISIgACgCWCEjIAAoAgwhJCAAKAJcISUgACgCECEmIAAoAmAhJyAAKAIUISggACgCZCEpIAAoAhghKiAAKAJoISsgACgCHCEsIAAoAmwhLSAAKAIgIS4gACgCcCEvIAAoAgAhMCAAIAAoAnQiMSAAKAIkIjNrIjQ2AnQgACAvIC5rIjU2AnAgACAtICxrIjY2AmwgACArICprIjc2AmggACApIChrIjg2AmQgACAnICZrIjk2AmAgACAlICRrIjo2AlwgACAjICJrIjs2AlggACAhICBrIjw2AlQgACAfIDBrIj02AlAgACAxIDNqIjE2AkwgACAuIC9qIi42AkggACAsIC1qIiw2AkQgMiAqICtqIio2AgAgACAoIClqIig2AjwgACAmICdqIiY2AjggACAkICVqIiQ2AjQgACAiICNqIiI2AjAgACAgICFqIiA2AiwgASAfIDBqIgE2AgAgHigCACEfIB4oAgQhISAeKAIIISMgHigCDCElIB4oAhAhJyAeKAIUISkgHigCGCErIB4oAhwhLSAeKAIgIS8gACAeKAIkIDFrNgIkIAAgLyAuazYCICAAIC0gLGs2AhwgACArICprNgIYIAAgKSAoazYCFCAAICcgJms2AhAgACAlICRrNgIMIAAgIyAiazYCCCAAICEgIGs2AgQgACAfIAFrNgIAIAAoAnghASAAKAJ8IR8gACgCgAEhICAAKAKEASEhIAAoAogBISIgACgCjAEhIyAAKAKQASEkIAAoApQBISUgACgCmAEhJiAAIAAoApwBIDRrNgKcASAAICYgNWs2ApgBIAAgJSA2azYClAEgACAkIDdrNgKQASAAICMgOGs2AowBIAAgIiA5azYCiAEgACAhIDprNgKEASAAICAgO2s2AoABIAAgHyA8azYCfCAAIAEgPWs2AnggHkEwaiQAC0QBAn8jAEEQayICJAAgAQRAA0AgAkEAOgAPIAAgA2pB2JACIAJBD2pBABAAOgAAIANBAWoiAyABRw0ACwsgAkEQaiQACyQAIAFCgICAgBBaBEAQCQALIAAgASACIANBqJACKAIAEQwAGguVAQEBfyMAQdABayIDJAAgA0IANwNIIANBmIkCKQMANwMIIANBoIkCKQMANwMQIANBqIkCKQMANwMYIANBsIkCKQMANwMgIANBuIkCKQMANwMoIANBwIkCKQMANwMwIANByIkCKQMANwM4IANCADcDQCADQZCJAikDADcDACADIAEgAhAMGiADIAAQEyADQdABaiQAQQALcAAgAEIANwNAIABCADcDSCAAQZCJAikDADcDACAAQZiJAikDADcDCCAAQaCJAikDADcDECAAQaiJAikDADcDGCAAQbCJAikDADcDICAAQbiJAikDADcDKCAAQcCJAikDADcDMCAAQciJAikDADcDOAsFAEHAAAtAAAJAIAStQoCAgIAQIAJCP3xCBoh9Vg0AIAJCgICAgBBaDQAgACABIAIgAyAEIAVBsJACKAIAEQgAGg8LEAkAC1IBAn9BoJACKAIAIgEgAEEHakF4cSICaiEAAkAgAkEAIAAgAU0bDQAgAD8AQRB0SwRAIAAQBEUNAQtBoJACIAA2AgAgAQ8LQdCWAkEwNgIAQX8L0wIBA38CfwJAIAEiA0H/AXEiAgRAIABBA3EEQANAIAAtAAAiAUUNAyABIANB/wFxRg0DIABBAWoiAEEDcQ0ACwsCQCAAKAIAIgFBf3MgAUGBgoQIa3FBgIGChHhxDQAgAkGBgoQIbCECA0AgASACcyIBQX9zIAFBgYKECGtxQYCBgoR4cQ0BIAAoAgQhASAAQQRqIQAgAUGBgoQIayABQX9zcUGAgYKEeHFFDQALCwNAIAAiAS0AACICBEAgAUEBaiEAIAIgA0H/AXFHDQELCyABDAILAkAgACICQQNxBEADQCAALQAARQ0CIABBAWoiAEEDcQ0ACwsDQCAAIgFBBGohACABKAIAIgRBf3MgBEGBgoQIa3FBgIGChHhxRQ0ACwNAIAEiAEEBaiEBIAAtAAANAAsLIAIgACACa2oMAQsgAAsiAEEAIAAtAAAgA0H/AXFGGwsEAEFvC90BAQR/IwBBEGsiAkEAOgAPAkAgAUUNACABQQNxIQQgAUEETwRAIAFBfHEhBUEAIQEDQCACIAAgA2otAAAgAi0AD3I6AA8gAiAAIANBAXJqLQAAIAItAA9yOgAPIAIgACADQQJyai0AACACLQAPcjoADyACIAAgA0EDcmotAAAgAi0AD3I6AA8gA0EEaiEDIAFBBGoiASAFRw0ACwsgBEUNAEEAIQEDQCACIAAgA2otAAAgAi0AD3I6AA8gA0EBaiEDIAFBAWoiASAERw0ACwsgAi0AD0EBa0EIdkEBcQvEAgICfwF+IwBB4AJrIgYkACAGIAQgBRA+GgJAIAAgAksgACACa60gA1RxRQRAIAAgAk8NASACIABrrSADWg0BCyAAIAIgA6cQJCECCyAGQgA3AzggBkIANwMwIAZCADcDKCAGQgA3AyBCICADIANCIFobIghQIgdFBEAgBkFAayACIAinEAsaCyAGQSBqIgUgBSAIQiB8IARBEGoiBEIAIAZB1JACKAIAEQkAGiAGQeAAaiAFQbyQAigCABEBABogB0UEQCAAIAZBQGsgCKcQCxoLIAZBIGpBwAAQByADQiFaBEAgACAIpyIFaiACIAVqIAMgCH0gBEIBIAZB1JACKAIAEQkAGgsgBkEgEAcgBkHgAGoiAiAAIANBwJACKAIAEQAAGiACIAFBxJACKAIAEQEAGiACQYACEAcgBkHgAmokAEEACzIBAn8jAEEgayIDJABBfyEEIAMgAiABEEZFBEAgAEGQkAIgAxA+IQQLIANBIGokACAECyYAIAJBgAJPBEBB7AlBowlB6wBBqwgQAQALIAAgASACQf8BcRA1C40EAQJ/QX8hBAJAIAJBwABLDQAgA0HBAGtBQEkNAAJAIAFBACACG0UEQCADQf8BcSIBQcEAa0H/AXFBvwFNBEAQCQALIABBQGtBAEGlAhAIGiAAQvnC+JuRo7Pw2wA3ADggAELr+obav7X2wR83ADAgAEKf2PnZwpHagpt/NwAoIABC0YWa7/rPlIfRADcAICAAQvHt9Pilp/2npX83ABggAEKr8NP0r+68tzw3ABAgAEK7zqqm2NDrs7t/NwAIIAAgAa1CiJL3lf/M+YTqAIU3AAAMAQsCfyACQf8BcSECIwBBgAFrIgUkAAJAIANB/wFxIgNBwQBrQf8BcUG/AU0NACABRQ0AIAJBwQBrQf8BcUG/AU0NACAAQUBrQQBBpQIQCBogAEL5wvibkaOz8NsANwA4IABC6/qG2r+19sEfNwAwIABCn9j52cKR2oKbfzcAKCAAQtGFmu/6z5SH0QA3ACAgAELx7fT4paf9p6V/NwAYIABCq/DT9K/uvLc8NwAQIABCu86qptjQ67O7fzcACCAAIAOtIAKtQgiGhEKIkveV/8z5hOoAhTcAACACIAVqQQBBgAEgAmtBACACwEEAThsQCBogAEHgAGogBSABIAIQCyIBQYABEAsaIAAgACgA4AJBgAFqNgDgAiABQYABEAcgAUGAAWokAEEADAELEAkACw0BC0EAIQQLIAQL6AIBAn8CQCAAIAFGDQAgASAAIAJqIgRrQQAgAkEBdGtNBEAgACABIAIQCw8LIAAgAXNBA3EhAwJAAkAgACABSQRAIAMEQCAAIQMMAwsgAEEDcUUEQCAAIQMMAgsgACEDA0AgAkUNBCADIAEtAAA6AAAgAUEBaiEBIAJBAWshAiADQQFqIgNBA3ENAAsMAQsCQCADDQAgBEEDcQRAA0AgAkUNBSAAIAJBAWsiAmoiAyABIAJqLQAAOgAAIANBA3ENAAsLIAJBA00NAANAIAAgAkEEayICaiABIAJqKAIANgIAIAJBA0sNAAsLIAJFDQIDQCAAIAJBAWsiAmogASACai0AADoAACACDQALDAILIAJBA00NAANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIAJBBGsiAkEDSw0ACwsgAkUNAANAIAMgAS0AADoAACADQQFqIQMgAUEBaiEBIAJBAWsiAg0ACwsgAAv7FwIQfhB/A0AgAiAVQQN0IhZqIAEgFmopAAAiBEI4hiAEQoD+A4NCKIaEIARCgID8B4NCGIYgBEKAgID4D4NCCIaEhCAEQgiIQoCAgPgPgyAEQhiIQoCA/AeDhCAEQiiIQoD+A4MgBEI4iISEhDcDACAVQQFqIhVBEEcNAAsgAyAAKQMANwMAIAMgACkDODcDOCADIAApAzA3AzAgAyAAKQMoNwMoIAMgACkDIDcDICADIAApAxg3AxggAyAAKQMQNwMQIAMgACkDCDcDCEEAIRYDQCADIAMpAzggAiAWQQN0IgFqIhUpAwAgAykDICIHQjKJIAdCLomFIAdCF4mFfCABQdCJAmopAwB8IAcgAykDMCILIAMpAygiCIWDIAuFfHwiBCADKQMYfCIKNwMYIAMgAykDACIFQiSJIAVCHomFIAVCGYmFIAR8IAMpAxAiCSADKQMIIgaEIAWDIAYgCYOEfCIENwM4IAMgCSACIAFBCHIiFGoiGikDACALIAggCiAHIAiFg4V8IApCMokgCkIuiYUgCkIXiYV8fCAUQdCJAmopAwB8Igt8Igk3AxAgAyAEIAUgBoSDIAUgBoOEIAt8IARCJIkgBEIeiYUgBEIZiYV8Igs3AzAgAyAIIAIgAUEQciIUaiIbKQMAfCAUQdCJAmopAwB8IAcgCSAHIAqFg4V8IAlCMokgCUIuiYUgCUIXiYV8IgwgCyAEIAWEgyAEIAWDhCALQiSJIAtCHomFIAtCGYmFfHwiCDcDKCADIAYgDHwiBjcDCCADIAcgAiABQRhyIhRqIhwpAwB8IBRB0IkCaikDAHwgBiAJIAqFgyAKhXwgBkIyiSAGQi6JhSAGQheJhXwiDCAIIAQgC4SDIAQgC4OEIAhCJIkgCEIeiYUgCEIZiYV8fCIHNwMgIAMgBSAMfCIFNwMAIAMgAiABQSByIhRqIh0pAwAgCnwgFEHQiQJqKQMAfCAFIAYgCYWDIAmFfCAFQjKJIAVCLomFIAVCF4mFfCIMIAcgCCALhIMgCCALg4QgB0IkiSAHQh6JhSAHQhmJhXx8Igo3AxggAyAEIAx8Igw3AzggAyACIAFBKHIiFGoiHikDACAJfCAUQdCJAmopAwB8IAwgBSAGhYMgBoV8IAxCMokgDEIuiYUgDEIXiYV8IgkgCiAHIAiEgyAHIAiDhCAKQiSJIApCHomFIApCGYmFfHwiBDcDECADIAkgC3wiCTcDMCADIAIgAUEwciIUaiIfKQMAIAZ8IBRB0IkCaikDAHwgCSAFIAyFgyAFhXwgCUIyiSAJQi6JhSAJQheJhXwiBiAEIAcgCoSDIAcgCoOEIARCJIkgBEIeiYUgBEIZiYV8fCILNwMIIAMgBiAIfCIGNwMoIAMgAiABQThyIhRqIiApAwAgBXwgFEHQiQJqKQMAfCAGIAkgDIWDIAyFfCAGQjKJIAZCLomFIAZCF4mFfCIFIAsgBCAKhIMgBCAKg4QgC0IkiSALQh6JhSALQhmJhXx8Igg3AwAgAyAFIAd8IgU3AyAgAyACIAFBwAByIhRqIiEpAwAgDHwgFEHQiQJqKQMAfCAFIAYgCYWDIAmFfCAFQjKJIAVCLomFIAVCF4mFfCIMIAggBCALhIMgBCALg4QgCEIkiSAIQh6JhSAIQhmJhXx8Igc3AzggAyAKIAx8Igw3AxggAyACIAFByAByIhRqIiIpAwAgCXwgFEHQiQJqKQMAfCAMIAUgBoWDIAaFfCAMQjKJIAxCLomFIAxCF4mFfCIJIAcgCCALhIMgCCALg4QgB0IkiSAHQh6JhSAHQhmJhXx8Igo3AzAgAyAEIAl8Igk3AxAgAyAGIAIgAUHQAHIiFGoiIykDAHwgFEHQiQJqKQMAfCAJIAUgDIWDIAWFfCAJQjKJIAlCLomFIAlCF4mFfCIGIAogByAIhIMgByAIg4QgCkIkiSAKQh6JhSAKQhmJhXx8IgQ3AyggAyAGIAt8IgY3AwggAyABQdgAciIUQdCJAmopAwAgAiAUaiIUKQMAfCAFfCAGIAkgDIWDIAyFfCAGQjKJIAZCLomFIAZCF4mFfCIFIAQgByAKhIMgByAKg4QgBEIkiSAEQh6JhSAEQhmJhXx8Igs3AyAgAyAFIAh8Igg3AwAgAyABQeAAciIXQdCJAmopAwAgAiAXaiIXKQMAfCAMfCAIIAYgCYWDIAmFfCAIQjKJIAhCLomFIAhCF4mFfCIMIAsgBCAKhIMgBCAKg4QgC0IkiSALQh6JhSALQhmJhXx8IgU3AxggAyAHIAx8Igc3AzggAyABQegAciIYQdCJAmopAwAgAiAYaiIYKQMAfCAJfCAHIAYgCIWDIAaFfCAHQjKJIAdCLomFIAdCF4mFfCIMIAUgBCALhIMgBCALg4QgBUIkiSAFQh6JhSAFQhmJhXx8Igk3AxAgAyAKIAx8Igo3AzAgAyABQfAAciIZQdCJAmopAwAgAiAZaiIZKQMAfCAGfCAKIAcgCIWDIAiFfCAKQjKJIApCLomFIApCF4mFfCIMIAkgBSALhIMgBSALg4QgCUIkiSAJQh6JhSAJQhmJhXx8IgY3AwggAyAEIAx8IgQ3AyggAyABQfgAciIBQdCJAmopAwAgASACaiIBKQMAfCAIfCAEIAcgCoWDIAeFfCAEQjKJIARCLomFIARCF4mFfCIEIAYgBSAJhIMgBSAJg4QgBkIkiSAGQh6JhSAGQhmJhXx8Igg3AwAgAyAEIAt8NwMgIBZBwABGRQRAIAIgFkEQaiIWQQN0aiAVKQMAICIpAwAiByAZKQMAIgRCLYkgBEIDiYUgBEIGiIV8fCAaKQMAIghCP4kgCEI4iYUgCEIHiIV8Igs3AwAgFSAIICMpAwAiCnwgASkDACIIQi2JIAhCA4mFIAhCBoiFfCAbKQMAIgZCP4kgBkI4iYUgBkIHiIV8IgU3A4gBIBUgBiAUKQMAIgl8IAtCLYkgC0IDiYUgC0IGiIV8IBwpAwAiDUI/iSANQjiJhSANQgeIhXwiBjcDkAEgFSANIBcpAwAiDHwgBUItiSAFQgOJhSAFQgaIhXwgHSkDACIOQj+JIA5COImFIA5CB4iFfCINNwOYASAVIA4gGCkDACISfCAGQi2JIAZCA4mFIAZCBoiFfCAeKQMAIg9CP4kgD0I4iYUgD0IHiIV8Ig43A6ABIBUgBCAPfCANQi2JIA1CA4mFIA1CBoiFfCAfKQMAIhBCP4kgEEI4iYUgEEIHiIV8Ig83A6gBIBUgCCAQfCAgKQMAIhFCP4kgEUI4iYUgEUIHiIV8IA5CLYkgDkIDiYUgDkIGiIV8IhA3A7ABIBUgISkDACITIAUgB0I/iSAHQjiJhSAHQgeIhXx8IBBCLYkgEEIDiYUgEEIGiIV8IgU3A8ABIBUgCyARfCATQj+JIBNCOImFIBNCB4iFfCAPQi2JIA9CA4mFIA9CBoiFfCIRNwO4ASAVIAogCUI/iSAJQjiJhSAJQgeIhXwgDXwgBUItiSAFQgOJhSAFQgaIhXwiDTcD0AEgFSAHIApCP4kgCkI4iYUgCkIHiIV8IAZ8IBFCLYkgEUIDiYUgEUIGiIV8Igc3A8gBIBUgDCASQj+JIBJCOImFIBJCB4iFfCAPfCANQi2JIA1CA4mFIA1CBoiFfCIKNwPgASAVIAkgDEI/iSAMQjiJhSAMQgeIhXwgDnwgB0ItiSAHQgOJhSAHQgaIhXwiBzcD2AEgFSAEIAhCP4kgCEI4iYUgCEIHiIV8IBF8IApCLYkgCkIDiYUgCkIGiIV8NwPwASAVIBIgBEI/iSAEQjiJhSAEQgeIhXwgEHwgB0ItiSAHQgOJhSAHQgaIhXwiBDcD6AEgFSAIIAtCP4kgC0I4iYUgC0IHiIV8IAV8IARCLYkgBEIDiYUgBEIGiIV8NwP4AQwBCwsgACAAKQMAIAh8NwMAIAAgACkDCCADKQMIfDcDCCAAIAApAxAgAykDEHw3AxAgACAAKQMYIAMpAxh8NwMYIAAgACkDICADKQMgfDcDICAAIAApAyggAykDKHw3AyggACAAKQMwIAMpAzB8NwMwIAAgACkDOCADKQM4fDcDOAsEAEEYC+cEARJ/QbLaiMsHIQNB7siBmQMhBEHl8MGLBiEFQfTKgdkGIQ4gASgADCEGIAEoAAghDyABKAAEIQcgAigAHCELIAIoABghDCACKAAUIRAgAigAECENIAIoAAwhCCACKAAIIQkgAigABCEKIAEoAAAhASACKAAAIQIDQCACIAEgAiAFaiIFc0EQdyIBIA1qIg1zQQx3IgIgBWoiBSABc0EIdyIBIA1qIg0gAnNBB3ciAiAIIAYgCCAOaiIOc0EQdyIGIAtqIgtzQQx3IgggDmoiEWoiDiAJIA8gAyAJaiIDc0EQdyIPIAxqIgxzQQx3IgkgA2oiAyAPc0EIdyISc0EQdyIPIAogByAEIApqIgRzQRB3IgcgEGoiEHNBDHciCiAEaiIEIAdzQQh3IgcgEGoiE2oiECACc0EMdyICIA5qIg4gD3NBCHciDyAQaiIQIAJzQQd3IQIgDSAHIAMgBiARc0EIdyIGIAtqIgsgCHNBB3ciCGoiA3NBEHciB2oiDSAIc0EMdyIIIANqIgMgB3NBCHciByANaiINIAhzQQd3IQggCyABIAQgDCASaiIMIAlzQQd3IglqIgRzQRB3IgFqIgsgCXNBDHciCSAEaiIEIAFzQQh3IgEgC2oiCyAJc0EHdyEJIAwgBiAFIAogE3NBB3ciCmoiBXNBEHciBmoiDCAKc0EMdyIKIAVqIgUgBnNBCHciBiAMaiIMIApzQQd3IQogFEEBaiIUQQpHDQALIAAgBTYAACAAIAY2ABwgACAPNgAYIAAgBzYAFCAAIAE2ABAgACAONgAMIAAgAzYACCAAIAQ2AAQLiy4BJX4gACABKQAoIiAgASkAaCIYIAEpAEAiGiABKQAgIhkgGCABKQB4IhwgASkAWCIhIAEpAFAiGyAgIAApABAgGSAAKQAwIh18fCIVfCAdIAApAFAgFYVC6/qG2r+19sEfhUIgiSIVQqvw0/Sv7ry3PHwiHoVCKIkiHXwiFiAVhUIwiSIGIB58IgQgHYVCAYkiFyABKQAYIh0gACkACCIlIAEpABAiFSAAKQAoIh58fCIifCAAKQBIICKFQp/Y+dnCkdqCm3+FQiCJIgNCxbHV2aevlMzEAH0iBSAehUIoiSICfCIHfHwiI3wgFyAjIAEpAAgiHiAAKQAAIiYgASkAACIiIAApACAiJHx8Ih98ICQgAEFAaykAACAfhULRhZrv+s+Uh9EAhUIgiSIfQoiS853/zPmE6gB8IgiFQiiJIgt8IgwgH4VCMIkiCYVCIIkiHyABKQA4IiMgACkAGCABKQAwIiQgACkAOCIKfHwiDXwgCiAAKQBYIA2FQvnC+JuRo7Pw2wCFQiCJIg1Cj5KLh9rYgtjaAH0iDoVCKIkiCnwiECANhUIwiSINIA58Ig58IhGFQiiJIhd8IhIgH4VCMIkiEyARfCIRIBeFQgGJIhQgASkASCIXfCAYIAEpAGAiHyAWIAogDoVCAYkiCnx8IhZ8IBYgAyAHhUIwiSIDhUIgiSIHIAggCXwiCHwiCSAKhUIoiSIKfCIOfCIPfCAPIBwgASkAcCIWIBAgCCALhUIBiSIIfHwiC3wgBiALhUIgiSIGIAMgBXwiA3wiBSAIhUIoiSIIfCILIAaFQjCJIgaFQiCJIhAgFyAaIAIgA4VCAYkiAyAMfHwiAnwgAyAEIAIgDYVCIIkiAnwiBIVCKIkiA3wiDCAChUIwiSICIAR8IgR8Ig0gFIVCKIkiFHwiDyAhfCALIBggByAOhUIwiSIHIAl8IgkgCoVCAYkiCnx8IgsgJHwgCiACIAuFQiCJIgIgEXwiC4VCKIkiCnwiDiAChUIwiSICIAt8IgsgCoVCAYkiCnwiESAjfCAKIAUgBnwiBiAIhUIBiSIFIAwgFnx8IgggG3wgBSAIIBOFQiCJIgggCXwiDIVCKIkiBXwiCSAIhUIwiSIIIAx8IgwgESAaIBkgAyAEhUIBiSIEfCASfCIDfCAEIAYgAyAHhUIgiSIDfCIGhUIoiSIEfCIHIAOFQjCJIgOFQiCJIhF8IhKFQiiJIgp8IhMgEYVCMIkiESASfCISIAqFQgGJIgogHHwgHSAgIAUgDIVCAYkiBSAOfHwiDHwgBSAMIA8gEIVCMIkiDoVCIIkiDCADIAZ8IgZ8IgOFQiiJIgV8IhB8Ig8gBCAGhUIBiSIGIB58IAl8IgQgH3wgBiACIASFQiCJIgQgDSAOfCICfCIJhUIoiSIGfCINIASFQjCJIgSFQiCJIg4gFSACIBSFQgGJIgIgB3wgInwiB3wgAiAHIAiFQiCJIgcgC3wiCIVCKIkiAnwiCyAHhUIwiSIHIAh8Igh8IhQgCoVCKIkiCiAPfHwiDyAaIAUgAyAMIBCFQjCJIgV8IgOFQgGJIgwgDSAhfHwiDXwgDCAHIA2FQiCJIgcgEnwiDIVCKIkiDXwiECAHhUIwiSIHIAx8IgwgDYVCAYkiDXwgF3wiEnwgDSASICAgAiAIhUIBiSICIBN8fCIIIBV8IAIgBSAIhUIgiSIFIAQgCXwiBHwiCIVCKIkiAnwiCSAFhUIwiSIFhUIgiSISIAQgBoVCAYkiBiAffCALfCIEICJ8IAYgAyAEIBGFQiCJIgR8IgOFQiiJIgZ8IgsgBIVCMIkiBCADfCIDfCIRhUIoiSINfCITIB4gCSAKIA4gD4VCMIkiCiAUfCIOhUIBiSIUfCAjfCIJfCAEIAmFQiCJIgQgDHwiDCAUhUIoiSIJfCIUIASFQjCJIgQgDHwiDCAJhUIBiSIJfCAhfCIPIBZ8IAkgDyAWIBAgAyAGhUIBiSIGfCAbfCIDfCAGIAMgCoVCIIkiBiAFIAh8IgN8IgWFQiiJIgh8IgkgBoVCMIkiBoVCIIkiCiAOIAcgAiADhUIBiSIDIAsgHXx8IgKFQiCJIgd8IgsgA4VCKIkiAyACfCAkfCICIAeFQjCJIgcgC3wiC3wiDoVCKIkiEHwiDyANIBEgEiAThUIwiSINfCIRhUIBiSISIAkgI3x8IgkgF3wgByAJhUIgiSIHIAx8IgwgEoVCKIkiCXwiEiAHhUIwiSIHIAx8IgwgCYVCAYkiCXwgHHwiE3wgCSATIA0gGCADIAuFQgGJIgN8IBR8IguFQiCJIg0gBSAGfCIGfCIFIAOFQiiJIgMgC3wgH3wiCyANhUIwiSINhUIgiSITIB4gBiAIhUIBiSIGIB18IAJ8IgJ8IAYgESACIASFQiCJIgR8IgKFQiiJIgZ8IgggBIVCMIkiBCACfCICfCIRhUIoiSIJfCIUIAwgBCAKIA+FQjCJIgogDnwiDiAQhUIBiSIQIAsgGXx8IguFQiCJIgR8IgwgEIVCKIkiECALfCAifCILIASFQjCJIgQgDHwiDCAQhUIBiSIQfCAbfCIPIBx8IBAgDyASIAIgBoVCAYkiBnwgFXwiAiAkfCAGIAIgCoVCIIkiAiAFIA18IgV8IgqFQiiJIgZ8Ig0gAoVCMIkiAoVCIIkiEiAgIAMgBYVCAYkiAyAIfHwiBSAbfCADIAUgB4VCIIkiBSAOfCIHhUIoiSIDfCIIIAWFQjCJIgUgB3wiB3wiDoVCKIkiEHwiDyAJIBMgFIVCMIkiCSARfCIRhUIBiSITIA0gF3x8Ig0gInwgBSANhUIgiSIFIAx8IgwgE4VCKIkiDXwiEyAFhUIwiSIFIAx8IgwgDYVCAYkiDXwgHXwiFHwgDSAUIAMgB4VCAYkiAyAVfCALfCIHIBl8IAMgByAJhUIgiSIHIAIgCnwiAnwiC4VCKIkiA3wiCSAHhUIwiSIHhUIgiSIKICAgAiAGhUIBiSIGfCAIfCICICN8IAYgESACIASFQiCJIgR8IgKFQiiJIgZ8IgggBIVCMIkiBCACfCICfCINhUIoiSIRfCIUIAqFQjCJIgogAyAHIAt8IgOFQgGJIgcgCCAhfHwiCCAffCAHIA8gEoVCMIkiCyAOfCIOIAUgCIVCIIkiBXwiCIVCKIkiB3wiEiAFhUIwiSIFIAh8IgggB4VCAYkiByAifCAJIA4gEIVCAYkiCXwgJHwiDiAafCAJIAQgDoVCIIkiBCAMfCIMhUIoiSIJfCIOfCIQhUIgiSIPIB4gEyACIAaFQgGJIgZ8IBZ8IgJ8IAYgAyACIAuFQiCJIgZ8IgOFQiiJIgJ8IgsgBoVCMIkiBiADfCIDfCITIAeFQiiJIgcgEHwgIXwiECAPhUIwiSIPIBN8IhMgB4VCAYkiByACIAOFQgGJIgMgEnwgJHwiAiAbfCADIAogDXwiCiAEIA6FQjCJIgQgAoVCIIkiAnwiDYVCKIkiA3wiDnwgI3wiEnwgByASIAogEYVCAYkiCiALIBV8fCILIB98IAogBSALhUIgiSIFIAQgDHwiBHwiC4VCKIkiDHwiCiAFhUIwiSIFhUIgiSIRIAQgCYVCAYkiBCAafCAUfCIJIB18IAQgBiAJhUIgiSIGIAh8IgiFQiiJIgR8IgkgBoVCMIkiBiAIfCIIfCIShUIoiSIHfCIUIBGFQjCJIhEgEnwiEiAHhUIBiSIHIAogAyACIA6FQjCJIgMgDXwiAoVCAYkiDXwgGXwiCiAYfCAGIAqFQiCJIgYgE3wiCiANhUIoiSINfCIOIAaFQjCJIgYgCnwiCiACIA8gBSALfCIFIAyFQgGJIgIgCSAefHwiC4VCIIkiDHwiCSAChUIoiSICIAt8IBd8IgsgDIVCMIkiDCAQIAQgCIVCAYkiBHwgHHwiCCAWfCAEIAUgAyAIhUIgiSIDfCIFhUIoiSIEfCIIIAcgFnx8IgeFQiCJIhB8IhOFQiiJIg8gEyAQIA8gGHwgB3wiB4VCMIkiEHwiE4VCAYkiDyASIAYgGSAEIAMgCIVCMIkiBCAFfCIDhUIBiSIFfCALfCIIhUIgiSIGfCILIAYgBSALhUIoiSIFIBt8IAh8IgiFQjCJIgZ8IgsgAiAJIAx8IgyFQgGJIgIgDiAffHwiCSARhUIgiSIOIAMgDnwiAyAChUIoiSICICB8IAl8IgmFQjCJIg4gCiANhUIBiSIKIAwgBCAKIB58IBR8IgqFQiCJIgR8IgyFQiiJIg0gHHwgCnwiCiAPICR8fCIRhUIgiSISfCIUhUIoiSIPIBQgEiAPIB18IBF8IhGFQjCJIhJ8IhSFQgGJIg8gEyAGIAkgIiANIAwgBCAKhUIwiSIEfCIMhUIBiSIJfHwiCoVCIIkiBnwiDSAGIAkgDYVCKIkiCSAjfCAKfCIKhUIwiSIGfCINIBAgCCAaIAIgAyAOfCIDhUIBiSICfHwiCIVCIIkiDiAIIAIgDCAOfCIIhUIoiSICICF8fCIMhUIwiSIOIAUgC4VCAYkiBSADIAQgBSAXfCAHfCIFhUIgiSIEfCIDhUIoiSIHIBV8IAV8IgUgDyAffHwiC4VCIIkiEHwiE4VCKIkiDyATIBAgDyAefCALfCILhUIwiSIQfCIThUIBiSIPIBQgBiAdIAcgAyAEIAWFQjCJIgR8IgOFQgGJIgV8IAx8IgeFQiCJIgZ8IgwgBiAFIAyFQiiJIgUgF3wgB3wiB4VCMIkiBnwiDCASIAIgCCAOfCIIhUIBiSICIBh8IAp8IgqFQiCJIg4gAiADIA58IgOFQiiJIgIgIXwgCnwiCoVCMIkiDiAJIA2FQgGJIgkgCCAEIAkgI3wgEXwiCYVCIIkiBHwiCIVCKIkiDSAWfCAJfCIJIA8gHHx8IhGFQiCJIhJ8IhSFQiiJIg8gFCASIA8gGXwgEXwiEYVCMIkiEnwiFIVCAYkiDyATIAYgICANIAggBCAJhUIwiSIEfCIIhUIBiSIJfCAKfCIKhUIgiSIGfCINIAYgCSANhUIoiSIJICJ8IAp8IgqFQjCJIgZ8Ig0gECAVIAIgAyAOfCIDhUIBiSICfCAHfCIHhUIgiSIOIAcgAiAIIA58IgeFQiiJIgIgG3x8IgiFQjCJIg4gBSAMhUIBiSIFIAMgBCAFIBp8IAt8IgWFQiCJIgR8IgOFQiiJIgsgJHwgBXwiBSAPICF8fCIMhUIgiSIQfCIThUIoiSIPIBMgECAPIB18IAx8IgyFQjCJIhB8IhOFQgGJIg8gFCAGICIgCyADIAQgBYVCMIkiBHwiA4VCAYkiBXwgCHwiCIVCIIkiBnwiCyAGIAUgC4VCKIkiBSAafCAIfCIIhUIwiSIGfCILIBIgAiAHIA58IgeFQgGJIgIgJHwgCnwiCoVCIIkiDiACIAMgDnwiA4VCKIkiAiAcfCAKfCIKhUIwiSIOIAkgDYVCAYkiCSAHIAQgCSAWfCARfCIJhUIgiSIEfCIHhUIoiSINIBd8IAl8IgkgDyAYfHwiEYVCIIkiEnwiFIVCKIkiDyAUIBIgDyAjfCARfCIRhUIwiSISfCIUhUIBiSIPIBMgBiAfIA0gByAEIAmFQjCJIgR8IgeFQgGJIgl8IAp8IgqFQiCJIgZ8Ig0gBiAJIA2FQiiJIgkgFXwgCnwiCoVCMIkiBnwiDSAQIBsgAiADIA58IgOFQgGJIgJ8IAh8IgiFQiCJIg4gAiAHIA58IgeFQiiJIgIgIHwgCHwiCIVCMIkiDiAFIAuFQgGJIgUgAyAEIAUgHnwgDHwiBYVCIIkiBHwiA4VCKIkiCyAZfCAFfCIFIA8gI3x8IgyFQiCJIhB8IhOFQiiJIg8gEyAQIA8gJHwgDHwiDIVCMIkiEHwiE4VCAYkiDyAUIAYgHiALIAMgBCAFhUIwiSIEfCIDhUIBiSIFfCAIfCIIhUIgiSIGfCILIAYgBSALhUIoiSIFICB8IAh8IgiFQjCJIgZ8IgsgEiACIAcgDnwiB4VCAYkiAiAbfCAKfCIKhUIgiSIOIAIgAyAOfCIDhUIoiSICIBV8IAp8IgqFQjCJIg4gCSANhUIBiSIJIAcgBCAJIBp8IBF8IgmFQiCJIgR8IgeFQiiJIg0gGXwgCXwiCSAPIBd8fCIRhUIgiSISfCIUhUIoiSIPIBQgEiAPIBZ8IBF8IhGFQjCJIhJ8IhSFQgGJIg8gEyAGIBwgDSAHIAQgCYVCMIkiBHwiB4VCAYkiCXwgCnwiCoVCIIkiBnwiDSAGIAkgDYVCKIkiCSAhfCAKfCIKhUIwiSIGfCINIBAgGCACIAMgDnwiA4VCAYkiAnwgCHwiCIVCIIkiDiACIAcgDnwiB4VCKIkiAiAifCAIfCIIhUIwiSIOIAUgC4VCAYkiBSADIAQgBSAdfCAMfCIFhUIgiSIEfCIDhUIoiSILIB98IAV8IgUgDyAZfHwiDIVCIIkiEHwiE4VCKIkiDyATIBAgDyAgfCAMfCIMhUIwiSIQfCIThUIBiSIPIBQgBiAkIAsgAyAEIAWFQjCJIgR8IgOFQgGJIgV8IAh8IgiFQiCJIgZ8IgsgBiAFIAuFQiiJIgUgI3wgCHwiCIVCMIkiBnwiCyASIAIgByAOfCIHhUIBiSICICJ8IAp8IgqFQiCJIg4gAiADIA58IgOFQiiJIgIgHnwgCnwiCoVCMIkiDiAJIA2FQgGJIgkgByAEIAkgFXwgEXwiCYVCIIkiBHwiB4VCKIkiDSAdfCAJfCIJIA8gG3x8IhGFQiCJIhJ8IhSFQiiJIg8gFCASIA8gIXwgEXwiEYVCMIkiEnwiFIVCAYkiDyATIAYgGiANIAcgBCAJhUIwiSIEfCIHhUIBiSIJfCAKfCIKhUIgiSIGfCINIAYgCSANhUIoiSIJIBd8IAp8IgqFQjCJIgZ8Ig0gECAWIAIgAyAOfCIDhUIBiSICfCAIfCIIhUIgiSIOIAIgByAOfCIHhUIoiSICIBx8IAh8IgiFQjCJIg4gBSALhUIBiSIFIAMgBCAFIB98IAx8IgWFQiCJIgR8IgOFQiiJIgsgGHwgBXwiBSAPIBd8fCIXhUIgiSIMfCIQhUIoiSITIBAgDCATIBx8IBd8IhyFQjCJIhd8IgyFQgGJIhAgFCAGIBggCyADIAQgBYVCMIkiBHwiA4VCAYkiBXwgCHwiGIVCIIkiBnwiCCAGIBggJCAFIAiFQiiJIiR8fCIYhUIwiSIGfCIFIBIgFiACIAcgDnwiB4VCAYkiAnwgCnwiFoVCIIkiCCAWIBsgAiADIAh8IhaFQiiJIgN8fCIbhUIwiSICIBogCSANhUIBiSIIIAcgBCAIIBl8IBF8IhmFQiCJIgR8IgeFQiiJIgh8IBl8IhogECAifHwiGYVCIIkiInwiC4VCKIkiCSAVfCAZfCIZICWFIAcgBCAahUIwiSIafCIVIBcgGCAgIAMgAiAWfCIYhUIBiSIWfHwiIIVCIIkiF3wiBCAXICAgHSAEIBaFQiiJIh18fCIghUIwiSIXfCIWhTcACCAAIBggGiAcICEgBSAkhUIBiSIcfHwiIYVCIIkiGnwiGCAaICMgGCAchUIoiSIYfCAhfCIchUIwiSIafCIhICYgHyAIIBWFQgGJIhUgDCAGIBUgHnwgG3wiG4VCIIkiFXwiHoVCKIkiI3wgG3wiG4WFNwAAIAAgHiAVIBuFQjCJIht8IhUgHCAAKQAQhYU3ABAgACAZICKFQjCJIhkgACkAICAWIB2FQgGJhYU3ACAgACALIBl8IhkgICAAKQAYhYU3ABggACAAKQAoIBUgI4VCAYmFIBqFNwAoIAAgACkAOCAYICGFQgGJhSAbhTcAOCAAIAApADAgCSAZhUIBiYUgF4U3ADALvQUBH39B5fDBiwYhBCACKAAAIhUhBSACKAAEIhYhByACKAAIIhchCCACKAAMIhghCUHuyIGZAyEOIAEoAAAiGSEKIAEoAAQiGiELIAEoAAgiGyENIAEoAAwiHCEQQbLaiMsHIQEgAigAECIdIQNB9MqB2QYhBiACKAAcIh4hESACKAAYIh8hDyACKAAUIiAhAgNAIA8gECAFIA5qQQd3cyIMIA5qQQl3cyISIAIgBGpBB3cgCXMiCSAEakEJdyANcyITIAlqQQ13IAJzIiEgAyAGakEHdyAIcyIIIAZqQQl3IAtzIgsgCGpBDXcgA3MiDSALakESdyAGcyIGIBEgASAKakEHd3MiA2pBB3dzIgIgBmpBCXdzIg8gAmpBDXcgA3MiESAPakESdyAGcyEGIAMgASADakEJdyAHcyIHakENdyAKcyIKIAdqQRJ3IAFzIgEgDGpBB3cgDXMiAyABakEJdyATcyINIANqQQ13IAxzIhAgDWpBEncgAXMhASASIAwgEmpBDXcgBXMiDGpBEncgDnMiBSAJakEHdyAKcyIKIAVqQQl3IAtzIgsgCmpBDXcgCXMiCSALakESdyAFcyEOIBMgIWpBEncgBHMiBCAIakEHdyAMcyIFIARqQQl3IAdzIgcgBWpBDXcgCHMiCCAHakESdyAEcyEEIBRBEkkhDCAUQQJqIRQgDA0ACyAAIAZB9MqB2QZqNgA8IAAgESAeajYAOCAAIA8gH2o2ADQgACACICBqNgAwIAAgAyAdajYALCAAIAFBstqIywdqNgAoIAAgECAcajYAJCAAIA0gG2o2ACAgACALIBpqNgAcIAAgCiAZajYAGCAAIA5B7siBmQNqNgAUIAAgCSAYajYAECAAIAggF2o2AAwgACAHIBZqNgAIIAAgBSAVajYABCAAIARB5fDBiwZqNgAAC8QHAgp/BH4jAEHgA2siAiQAA0AgAkGgAmoiBSADQQF0aiIGIAEgA2otAAAiCEEEdjoAASAGIAhBD3E6AAAgA0EBciIGQQF0IAVqIgggASAGai0AACIGQQR2OgABIAggBkEPcToAACADQQJqIgNBIEcNAAtBACEBA0AgAkGgAmogBGoiAyADLQAAIAFqIgEgAUEIaiIBQfABcWs6AAAgAyADLQABIAHAQQR1aiIBIAFBCGoiAUHwAXFrOgABIAMgAy0AAiABwEEEdWoiASABQQhqIgFB8AFxazoAAiABwEEEdSEBIARBA2oiBEE/Rw0ACyACIAItAN8CIAFqOgDfAiAAQgA3AiAgAEIANwIYIABCADcCECAAQgA3AgggAEIANwIAIABCADcCLCAAQShqIghBATYCACAAQgA3AjQgAEIANwI8IABCADcCRCAAQoCAgIAQNwJMIABB1ABqQQBBzAAQCBogAEH4AGohCiAAQdAAaiELIAJB0AFqIQEgAkGoAWohBiACQfgBaiEEQQEhAwNAIAJBCGoiByADQQF2IAJBoAJqIANqLAAAEEcgAkGAAWoiBSAAIAcQOCAAIAUgBBAGIAggBiABEAYgCyABIAQQBiAKIAUgBhAGIANBPkkhByADQQJqIQMgBw0ACyAAKQIIIQwgACkCECENIAApAhghDiAAKQIAIQ8gAiAAKQIgNwOIAyACIA43A4ADIAIgDTcD+AIgAiAMNwPwAiACIA83A+gCIAApAighDCAAKQIwIQ0gACkCOCEOIABBQGspAgAhDyACIAApAkg3A7ADIAIgDzcDqAMgAiAONwOgAyACIA03A5gDIAIgDDcDkAMgACkCUCEMIAApAlghDSAAKQJgIQ4gACkCaCEPIAIgACkCcDcD2AMgAiAPNwPQAyACIA43A8gDIAIgDTcDwAMgAiAMNwO4AyACQYABaiIFIAJB6AJqIgkQFSAJIAUgBBAGIAJBkANqIgMgBiABEAYgAkG4A2oiByABIAQQBiAFIAkQFSAJIAUgBBAGIAMgBiABEAYgByABIAQQBiAFIAkQFSAJIAUgBBAGIAMgBiABEAYgByABIAQQBiAFIAkQFSAAIAUgBBAGIAggBiABEAYgCyABIAQQBiAKIAUgBhAGQQAhAwNAIAJBCGoiByADQQF2IAJBoAJqIANqLAAAEEcgAkGAAWoiBSAAIAcQOCAAIAUgBBAGIAggBiABEAYgCyABIAQQBiAKIAUgBhAGIANBPkkhByADQQJqIQMgBw0ACyACQeADaiQAC2IBA38jAEGwAWsiAiQAIAJB4ABqIgMgAUHQAGoQLCACQTBqIgQgASADEAYgAiABQShqIAMQBiAAIAIQEiACQZABaiAEEBIgACAALQAfIAItAJABQQd0czoAHyACQbABaiQAC8oIAQN/IwBBwAFrIgIkACACQZABaiIEIAEQBSACQeAAaiIDIAQQBSADIAMQBSADIAEgAxAGIAQgBCADEAYgAkEwaiIBIAQQBSADIAMgARAGIAEgAxAFIAEgARAFIAEgARAFIAEgARAFIAEgARAFIAMgASADEAYgASADEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABIAMQBiACIAEQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSABIAIgARAGIAEgARAFIAEgARAFIAEgARAFIAEgARAFIAEgARAFIAEgARAFIAEgARAFIAEgARAFIAEgARAFIAEgARAFIAMgASADEAYgASADEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABEAUgASABIAMQBiACIAEQBUEBIQEDQCACIAIQBSABQQFqIgFB5ABHDQALIAJBMGoiASACIAEQBiABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSABIAEQBSACQeAAaiIDIAEgAxAGIAMgAxAFIAMgAxAFIAMgAxAFIAMgAxAFIAMgAxAFIAAgAyACQZABahAGIAJBwAFqJAAL7wMBAX8jAEEQayICIAA2AgwgAiABNgIIIAJBADYCBCACIAIoAgQgAigCDC0AACACKAIILQAAc3I2AgQgAiACKAIEIAIoAgwtAAEgAigCCC0AAXNyNgIEIAIgAigCBCACKAIMLQACIAIoAggtAAJzcjYCBCACIAIoAgQgAigCDC0AAyACKAIILQADc3I2AgQgAiACKAIEIAIoAgwtAAQgAigCCC0ABHNyNgIEIAIgAigCBCACKAIMLQAFIAIoAggtAAVzcjYCBCACIAIoAgQgAigCDC0ABiACKAIILQAGc3I2AgQgAiACKAIEIAIoAgwtAAcgAigCCC0AB3NyNgIEIAIgAigCBCACKAIMLQAIIAIoAggtAAhzcjYCBCACIAIoAgQgAigCDC0ACSACKAIILQAJc3I2AgQgAiACKAIEIAIoAgwtAAogAigCCC0ACnNyNgIEIAIgAigCBCACKAIMLQALIAIoAggtAAtzcjYCBCACIAIoAgQgAigCDC0ADCACKAIILQAMc3I2AgQgAiACKAIEIAIoAgwtAA0gAigCCC0ADXNyNgIEIAIgAigCBCACKAIMLQAOIAIoAggtAA5zcjYCBCACIAIoAgQgAigCDC0ADyACKAIILQAPc3I2AgQgAigCBEEBa0EIdkEBcUEBawsEAEEAC6IJATF/IwBBQGohCSAAKAI8IR0gACgCOCEeIAAoAjQhEiAAKAIwIRMgACgCLCEfIAAoAighICAAKAIkISEgACgCICEiIAAoAhwhIyAAKAIYISQgACgCFCElIAAoAhAhJiAAKAIMIScgACgCCCEoIAAoAgQhKSAAKAIAISoDQAJAIANCP1YEQCACIQUMAQsgCUIANwM4IAlCADcDMCAJQgA3AyggCUIANwMgIAlCADcDGCAJQgA3AxAgCUIANwMIIAlCADcDAEEAIQQgA0IAUgRAA0AgBCAJaiABIARqLQAAOgAAIAMgBEEBaiIErVYNAAsLIAkiBSEBIAIhKwtBFCEWICohCCApIQogKCEOICchFCAmIQQgJSECICQhBiAjIQcgIiELICEhDyAgIQwgHSEQIB4hFyASIRggEyENIB8hEQNAIAQgBCAIaiIEIA1zQRB3IgggC2oiC3NBDHciDSAEaiIVIAhzQQh3IgggC2oiCyANc0EHdyIEIAcgByAUaiIHIBBzQRB3IhAgEWoiDXNBDHciESAHaiIHaiIUIAYgBiAOaiIGIBdzQRB3Ig4gDGoiDHNBDHciGSAGaiIGIA5zQQh3IhpzQRB3Ig4gAiACIApqIgIgGHNBEHciCiAPaiIPc0EMdyIbIAJqIgIgCnNBCHciCiAPaiIcaiIPIARzQQx3IgQgFGoiFCAOc0EIdyIXIA9qIg8gBHNBB3chBCALIAogBiAHIBBzQQh3IhAgDWoiBiARc0EHdyIHaiIKc0EQdyILaiINIAdzQQx3IgcgCmoiDiALc0EIdyIYIA1qIgsgB3NBB3chByAGIAggAiAMIBpqIgIgGXNBB3ciBmoiCHNBEHciDGoiESAGc0EMdyIGIAhqIgogDHNBCHciDSARaiIRIAZzQQd3IQYgAiAbIBxzQQd3IgIgFWoiCCAQc0EQdyIMaiIVIAJzQQx3IgIgCGoiCCAMc0EIdyIQIBVqIgwgAnNBB3chAiAWQQJrIhYNAAsgASgABCEWIAEoAAghFSABKAAMIRkgASgAECEaIAEoABQhGyABKAAYIRwgASgAHCEsIAEoACAhLSABKAAkIS4gASgAKCEvIAEoACwhMCABKAAwITEgASgANCEyIAEoADghMyABKAA8ITQgBSABKAAAIAggKmpzNgAAIAUgNCAQIB1qczYAPCAFIDMgFyAeanM2ADggBSAyIBIgGGpzNgA0IAUgMSANIBNqczYAMCAFIDAgESAfanM2ACwgBSAvIAwgIGpzNgAoIAUgLiAPICFqczYAJCAFIC0gCyAianM2ACAgBSAsIAcgI2pzNgAcIAUgHCAGICRqczYAGCAFIBsgAiAlanM2ABQgBSAaIAQgJmpzNgAQIAUgGSAUICdqczYADCAFIBUgDiAoanM2AAggBSAWIAogKWpzNgAEIBIgE0EBaiITRWohEiADQsAAWARAAkAgA0I/Vg0AIAOnIgFFDQBBACEEA0AgBCAraiAEIAVqLQAAOgAAIARBAWoiBCABSQ0ACwsgACASNgI0IAAgEzYCMAUgAUFAayEBIAVBQGshAiADQkB8IQMMAQsLC8QCAgJ/AX4jAEHgAGsiBiQAIAYgBCAFED4aIAZBIGoiB0IgIARBEGoiBSAGQdCQAigCABEMABpBfyEEAkACQCACIAEgAyAHQbiQAigCABESAA0AQQAhBCAARQ0BAkAgACABSSABIABrrSADVHFFBEAgACABTQ0BIAAgAWutIANaDQELIAAgASADpxAkIQELAkBCICADIANCIFobIghQBEAgBkEgaiICIAIgCEIgfCAFQgAgBkHUkAIoAgARCQAaDAELIAZBQGsgASAIpyICEAshBCAGQSBqIgcgByAIQiB8IAVCACAGQdSQAigCABEJABogACAEIAIQCxoLIAZBIGpBwAAQB0EAIQQgA0IhVA0AIAAgCKciAmogASACaiADIAh9IAVCASAGQdSQAigCABEJABoLIAZBIBAHCyAGQeAAaiQAIAQL4ScCJ38DfiMAQdAEayIPJABBfyELIABBIGohCUEgIQVBASEMA0AgBUEBayIHQfAUai0AACIKIAcgCWotAAAiB3NBAWtBCHUgDHEiCCAJIAVBAmsiBWotAAAiDSAFQfAUai0AACIOa0EIdXEgByAKa0EIdiAMcSAGckH/AXFyIQYgDSAOc0EBa0EIdSAIcSEMIAUNAAsCQCAGQf8BcUUNACAAEDcNACADLQAfQX9zQf8AcSADLQABIAMtAAIgAy0AAyADLQAEIAMtAAUgAy0ABiADLQAHIAMtAAggAy0ACSADLQAKIAMtAAsgAy0ADCADLQANIAMtAA4gAy0ADyADLQAQIAMtABEgAy0AEiADLQATIAMtABQgAy0AFSADLQAWIAMtABcgAy0AGCADLQAZIAMtABogAy0AGyADLQAcIAMtAB4gAy0AHXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxcXFxQf8Bc3JBAWtB7AEgAy0AAGtxQX9zQQh2QQFxRQ0AIAMQNw0AIA9BgAFqIAMQSQ0AIA9BgANqIgUQGSAEBEAgBUHQjwJCIhAMGgsgBSAAQiAQDBogBSADQiAQDBogBSABIAIQDBogBSAPQcACaiIBEBMgARA2IA9BCGohDCABIQQgD0GAAWohC0EAIQNBACEBIwBB4BFrIgUkAANAIAVB4A9qIgYgA2ogBCADQQN2aiIHLQAAIANBBnF2QQFxOgAAIAYgA0EBciIKaiAHLQAAIApBB3F2QQFxOgAAIANBAmoiA0GAAkcNAAsDQCABIgRBAWohAQJAIAQgBUHgD2pqIgYtAABFDQAgBEH+AUsNAAJAIAVB4A9qIAFqIgMsAAAiB0UNACAHQQF0IgcgBiwAACIKaiIIQQ9MBEAgBiAIOgAAIANBADoAAAwBCyAKIAdrIgNBcUgNASAGIAM6AAAgASEDA0AgBUHgD2ogA2oiBy0AAEUEQCAHQQE6AAAMAgsgB0EAOgAAIANB/wFJIQcgA0EBaiEDIAcNAAsLIARB/QFLDQACQCAEQQJqIgMgBUHgD2pqIgcsAAAiCkUNACAKQQJ0IgogBiwAACIIaiINQRBOBEAgCCAKayIHQXFIDQIgBiAHOgAAA0AgBUHgD2ogA2oiBy0AAARAIAdBADoAACADQf8BSSEHIANBAWohAyAHDQEMAwsLIAdBAToAAAwBCyAGIA06AAAgB0EAOgAACyAEQfwBSw0AAkAgBEEDaiIDIAVB4A9qaiIHLAAAIgpFDQAgCkEDdCIKIAYsAAAiCGoiDUEQTgRAIAggCmsiB0FxSA0CIAYgBzoAAANAIAVB4A9qIANqIgctAAAEQCAHQQA6AAAgA0H/AUkhByADQQFqIQMgBw0BDAMLCyAHQQE6AAAMAQsgBiANOgAAIAdBADoAAAsgBEH7AUsNAAJAIARBBGoiAyAFQeAPamoiBywAACIKRQ0AIApBBHQiCiAGLAAAIghqIg1BEE4EQCAIIAprIgdBcUgNAiAGIAc6AAADQCAFQeAPaiADaiIHLQAABEAgB0EAOgAAIANB/wFJIQcgA0EBaiEDIAcNAQwDCwsgB0EBOgAADAELIAYgDToAACAHQQA6AAALIARB+gFLDQACQCAEQQVqIgMgBUHgD2pqIgcsAAAiCkUNACAKQQV0IgogBiwAACIIaiINQRBOBEAgCCAKayIHQXFIDQIgBiAHOgAAA0AgBUHgD2ogA2oiBy0AAARAIAdBADoAACADQf8BSSEHIANBAWohAyAHDQEMAwsLIAdBAToAAAwBCyAGIA06AAAgB0EAOgAACyAEQfkBSw0AIARBBmoiAyAFQeAPamoiBCwAACIHRQ0AIAdBBnQiByAGLAAAIgpqIghBEE4EQCAKIAdrIgRBcUgNASAGIAQ6AAADQCAFQeAPaiADaiIELQAABEAgBEEAOgAAIANB/wFJIQQgA0EBaiEDIAQNAQwDCwsgBEEBOgAADAELIAYgCDoAACAEQQA6AAALIAFBgAJHDQALQQAhAwNAIAVB4A1qIgEgA2ogCSADQQN2aiIELQAAIANBBnF2QQFxOgAAIAEgA0EBciIGaiAELQAAIAZBB3F2QQFxOgAAIANBAmoiA0GAAkcNAAtBACEBA0AgASIEQQFqIQECQCAEIAVB4A1qaiIJLQAARQ0AIARB/gFLDQACQCAFQeANaiABaiIDLAAAIgZFDQAgBkEBdCIGIAksAAAiB2oiCkEPTARAIAkgCjoAACADQQA6AAAMAQsgByAGayIDQXFIDQEgCSADOgAAIAEhAwNAIAVB4A1qIANqIgYtAABFBEAgBkEBOgAADAILIAZBADoAACADQf8BSSEGIANBAWohAyAGDQALCyAEQf0BSw0AAkAgBEECaiIDIAVB4A1qaiIGLAAAIgdFDQAgB0ECdCIHIAksAAAiCmoiCEEQTgRAIAogB2siBkFxSA0CIAkgBjoAAANAIAVB4A1qIANqIgYtAAAEQCAGQQA6AAAgA0H/AUkhBiADQQFqIQMgBg0BDAMLCyAGQQE6AAAMAQsgCSAIOgAAIAZBADoAAAsgBEH8AUsNAAJAIARBA2oiAyAFQeANamoiBiwAACIHRQ0AIAdBA3QiByAJLAAAIgpqIghBEE4EQCAKIAdrIgZBcUgNAiAJIAY6AAADQCAFQeANaiADaiIGLQAABEAgBkEAOgAAIANB/wFJIQYgA0EBaiEDIAYNAQwDCwsgBkEBOgAADAELIAkgCDoAACAGQQA6AAALIARB+wFLDQACQCAEQQRqIgMgBUHgDWpqIgYsAAAiB0UNACAHQQR0IgcgCSwAACIKaiIIQRBOBEAgCiAHayIGQXFIDQIgCSAGOgAAA0AgBUHgDWogA2oiBi0AAARAIAZBADoAACADQf8BSSEGIANBAWohAyAGDQEMAwsLIAZBAToAAAwBCyAJIAg6AAAgBkEAOgAACyAEQfoBSw0AAkAgBEEFaiIDIAVB4A1qaiIGLAAAIgdFDQAgB0EFdCIHIAksAAAiCmoiCEEQTgRAIAogB2siBkFxSA0CIAkgBjoAAANAIAVB4A1qIANqIgYtAAAEQCAGQQA6AAAgA0H/AUkhBiADQQFqIQMgBg0BDAMLCyAGQQE6AAAMAQsgCSAIOgAAIAZBADoAAAsgBEH5AUsNACAEQQZqIgMgBUHgDWpqIgQsAAAiBkUNACAGQQZ0IgYgCSwAACIHaiIKQRBOBEAgByAGayIEQXFIDQEgCSAEOgAAA0AgBUHgDWogA2oiBC0AAARAIARBADoAACADQf8BSSEEIANBAWohAyAEDQEMAwsLIARBAToAAAwBCyAJIAo6AAAgBEEAOgAACyABQYACRw0ACyAFQeADaiIHIAsQDSALKQIIIQIgCykCECEsIAspAhghLSALKQIAIS4gBSALKQIgNwPAASAFIC03A7gBIAUgLDcDsAEgBSACNwOoASAFIC43A6ABIAspAighAiALKQIwISwgCykCOCEtIAtBQGspAgAhLiAFIAspAkg3A+gBIAUgLjcD4AEgBSAtNwPYASAFICw3A9ABIAUgAjcDyAEgCykCUCECIAspAlghLCALKQJgIS0gCykCaCEuIAUgCykCcDcDkAIgBSAuNwOIAiAFIC03A4ACIAUgLDcD+AEgBSACNwPwASAFQcACaiIBIAVBoAFqIgMQFSAFIAEgBUG4A2oiBBAGIAVBKGogBUHoAmoiCSAFQZADaiIGEAYgBUHQAGogBiAEEAYgBUH4AGogASAJEAYgASAFIAcQDiADIAEgBBAGIAVByAFqIgcgCSAGEAYgBUHwAWoiCiAGIAQQBiAFQZgCaiILIAEgCRAGIAVBgAVqIgggAxANIAEgBSAIEA4gAyABIAQQBiAHIAkgBhAGIAogBiAEEAYgCyABIAkQBiAFQaAGaiIIIAMQDSABIAUgCBAOIAMgASAEEAYgByAJIAYQBiAKIAYgBBAGIAsgASAJEAYgBUHAB2oiCCADEA0gASAFIAgQDiADIAEgBBAGIAcgCSAGEAYgCiAGIAQQBiALIAEgCRAGIAVB4AhqIgggAxANIAEgBSAIEA4gAyABIAQQBiAHIAkgBhAGIAogBiAEEAYgCyABIAkQBiAFQYAKaiIIIAMQDSABIAUgCBAOIAMgASAEEAYgByAJIAYQBiAKIAYgBBAGIAsgASAJEAYgBUGgC2oiCCADEA0gASAFIAgQDiADIAEgBBAGIAcgCSAGEAYgCiAGIAQQBiALIAEgCRAGIAVBwAxqIAMQDSAMQgA3AiAgDEIANwIYIAxCADcCECAMQgA3AgggDEIANwIAIAxCADcCLCAMQShqIiJBATYCACAMQgA3AjQgDEIANwI8IAxCADcCRCAMQgA3AlQgDEKAgICAEDcCTCAMQgA3AlwgDEIANwJkIAxCADcCbCAMQQA2AnQgDEHQAGohI0H/ASEBA0ACQAJAAkAgBUHgD2ogAWotAAANACAFQeANaiABai0AAA0AIAFBAWsiAyAFQeAPamotAABFBEAgBUHgDWogA2otAABFDQILIAMhAQsgAUEASA0BA0AgBUHAAmogDBAVAkAgASIDIAVB4A9qaiwAACIBQQBKBEAgBUGgAWoiDSAFQcACaiIIIAQQBiAHIAkgBhAGIAogBiAEEAYgCyAIIAkQBiAIIA0gBUHgA2ogAUH+AXFBAXZBoAFsahAODAELIAFBAE4NACAFQaABaiINIAVBwAJqIgggBBAGIAcgCSAGEAYgCiAGIAQQBiALIAggCRAGIAggDSAFQeADakEAIAFrQf4BcUEBdkGgAWxqEEgLAkAgBUHgDWogA2osAAAiAUEASgRAIAVBoAFqIg0gBUHAAmoiCCAEEAYgByAJIAYQBiAKIAYgBBAGIAsgCCAJEAYgCCANIAFB/gFxQQF2QfgAbEHQC2oQOAwBCyABQQBODQAgBUGgAWogBUHAAmoiCCAEEAYgByAJIAYQBiAKIAYgBBAGIAsgCCAJEAYgBSgCoAEhDSAFKALIASEOIAUoAqQBIRAgBSgCzAEhESAFKAKoASESIAUoAtABIRMgBSgCrAEhFCAFKALUASEVIAUoArABIRYgBSgC2AEhFyAFKAK0ASEYIAUoAtwBIRkgBSgCuAEhGiAFKALgASEbIAUoArwBIRwgBSgC5AEhHSAFKALAASEeIAUoAugBIR8gBSAFKALsASIgIAUoAsQBIiFrNgKMAyAFIB8gHms2AogDIAUgHSAcazYChAMgBSAbIBprNgKAAyAFIBkgGGs2AvwCIAUgFyAWazYC+AIgBSAVIBRrNgL0AiAFIBMgEms2AvACIAUgESAQazYC7AIgBSAOIA1rNgLoAiAFICAgIWo2AuQCIAUgHiAfajYC4AIgBSAcIB1qNgLcAiAFIBogG2o2AtgCIAUgGCAZajYC1AIgBSAWIBdqNgLQAiAFIBQgFWo2AswCIAUgEiATajYCyAIgBSAQIBFqNgLEAiAFIA0gDmo2AsACIAYgCEEAIAFrQf4BcUEBdkH4AGxB0AtqIgFBKGoQBiAJIAkgARAGIAQgAUHQAGogCxAGIAUoApQCIR4gBSgCkAIhHyAFKAKMAiEgIAUoAogCISEgBSgChAIhJCAFKAKAAiElIAUoAvwBISYgBSgC+AEhJyAFKAL0ASEoIAUoAvABISkgBSgC6AIhASAFKAKQAyEIIAUoAuwCIQ0gBSgClAMhDiAFKALwAiEQIAUoApgDIREgBSgC9AIhEiAFKAKcAyETIAUoAvgCIRQgBSgCoAMhFSAFKAL8AiEWIAUoAqQDIRcgBSgCgAMhGCAFKAKoAyEZIAUoAoQDIRogBSgCrAMhGyAFKAKIAyEcIAUoArADIR0gBSAFKAKMAyIqIAUoArQDIitqNgKMAyAFIBwgHWo2AogDIAUgGiAbajYChAMgBSAYIBlqNgKAAyAFIBYgF2o2AvwCIAUgFCAVajYC+AIgBSASIBNqNgL0AiAFIBAgEWo2AvACIAUgDSAOajYC7AIgBSABIAhqNgLoAiAFICsgKms2AuQCIAUgHSAcazYC4AIgBSAbIBprNgLcAiAFIBkgGGs2AtgCIAUgFyAWazYC1AIgBSAVIBRrNgLQAiAFIBMgEms2AswCIAUgESAQazYCyAIgBSAOIA1rNgLEAiAFIAggAWs2AsACIAUgKUEBdCIBIAUoArgDIghrNgKQAyAFIChBAXQiDSAFKAK8AyIOazYClAMgBSAnQQF0IhAgBSgCwAMiEWs2ApgDIAUgJkEBdCISIAUoAsQDIhNrNgKcAyAFICVBAXQiFCAFKALIAyIVazYCoAMgBSAkQQF0IhYgBSgCzAMiF2s2AqQDIAUgIUEBdCIYIAUoAtADIhlrNgKoAyAFICBBAXQiGiAFKALUAyIbazYCrAMgBSAfQQF0IhwgBSgC2AMiHWs2ArADIAUgHkEBdCIeIAUoAtwDIh9rNgK0AyAFIAEgCGo2ArgDIAUgDSAOajYCvAMgBSAQIBFqNgLAAyAFIBIgE2o2AsQDIAUgFCAVajYCyAMgBSAWIBdqNgLMAyAFIBggGWo2AtADIAUgGiAbajYC1AMgBSAcIB1qNgLYAyAFIB4gH2o2AtwDCyAMIAVBwAJqIAQQBiAiIAkgBhAGICMgBiAEEAYgA0EBayEBIANBAEoNAAsMAQsgAUECayEBIAMNAQsLIAVB4BFqJAAgD0GgAmoiASAMECtBfyABIAAQSyAAIAFGGyAAIAFBIBAzciELCyAPQdAEaiQAIAsLqSICOH4FfyMAQbAEayI/JAAgP0HgAmoQGSAFBEAgP0HgAmpB0I8CQiIQDBoLID9BoAJqIARCIBAYGiA/QeACaiJBID9BwAJqQiAQDBogQSACIAMQDBogQSA/QeABaiI+EBMgBCkAICEIIAQpACghByAEKQAwIQYgACAEKQA4NwA4IAAgBjcAMCAAIAc3ACggAEEgaiIEIAg3AAAgPhA2ID8gPhAqIAAgPxArIEEQGSAFBEAgP0HgAmpB0I8CQiIQDBoLID9B4AJqIgUgAELAABAMGiAFIAIgAxAMGiAFID9BoAFqIgAQEyAAEDYgPyA/LQCgAkH4AXE6AKACID8gPy0AvwJBP3FBwAByOgC/AiAEID9BoAJqIkAzABUgQDEAF0IQhkKAgPwAg4QiECAAKAAcQQd2rSIRfiAAKAAXIgVBGHatIAAxABtCCIaEIAAxABxCEIaEQgKIQv///wCDIhIgQCgAFyICQQV2Qf///wBxrSITfnwgADMAFSAAMQAXQhCGQoCA/ACDhCIUIEAoABxBB3atIhV+fCACQRh2rSBAMQAbQgiGhCBAMQAcQhCGhEICiEL///8AgyIWIAVBBXZB////AHGtIhd+fCATIBd+IEAoAA8iBUEYdq0gQDEAE0IIhoQgQDEAFEIQhoRCA4giGCARfnwgECASfnwgACgADyICQRh2rSAAMQATQgiGhCAAMQAUQhCGhEIDiCIZIBV+fCAUIBZ+fCIJQoCAQH0iCEIViHwiB0KAgEB9IgZCFYggFSAXfiARIBN+fCASIBZ+fCIDIANCgIBAfSIDQoCAgP////8Ag318IixCmNocfiARIBZ+IBIgFX58IANCFYh8IgMgA0KAgEB9IipCgICA/////wCDfSItQpPYKH58IAcgBkKAgIB/g30iLkLn9id+fCAJIAhCgICAf4N9IBIgGH4gBUEGdkH///8Aca0iGiARfnwgEyAUfnwgECAXfnwgFSACQQZ2Qf///wBxrSIbfnwgFiAZfnwgQCgACiJCQRh2rSBAMQAOQgiGhCBAMQAPQhCGhEIBiEL///8AgyIcIBF+IBIgGn58IBcgGH58IBMgGX58IBAgFH58IAAoAAoiQUEYdq0gADEADkIIhoQgADEAD0IQhoRCAYhC////AIMiHSAVfnwgFiAbfnwiDEKAgEB9IgpCFYh8IglCgIBAfSIIQhWIfCIvQtOMQ358ID9B4AFqIj4oABciBUEFdkH///8Aca0gQDMAACBAMQACQhCGQoCA/ACDhCIeIBd+IBQgQCgAAiICQQV2Qf///wBxrSIffnwgQDUAB0IHiEL///8AgyIgIBt+fCAdIEJBBHZB////AHGtIiF+fCACQRh2rSBAMQAGQgiGhCBAMQAHQhCGhEICiEL///8AgyIiIBl+fCAaIAA1AAdCB4hC////AIMiI358IBwgQUEEdkH///8Aca0iJH58IBggACgAAiICQRh2rSAAMQAGQgiGhCAAMQAHQhCGhEICiEL///8AgyIlfnwgADMAACAAMQACQhCGQoCA/ACDhCImIBN+fCAQIAJBBXZB////AHGtIid+fHwgPjMAFSAUIB5+IBkgH358IB0gIH58ICEgJH58IBsgIn58IBogJX58IBwgI358IBggJ358IBAgJn58fCA+MQAXQhCGQoCA/ACDfCIHQoCAQH0iBkIViHwiA3wgA0KAgEB9IgtCgICAf4N9IAcgLkKY2hx+ICxCk9gofnwgL0Ln9id+fCAZIB5+IBsgH358ICAgJH58ICEgI358IB0gIn58IBogJ358IBwgJX58IBggJn58ID4oAA8iAEEYdq0gPjEAE0IIhoQgPjEAFEIQhoRCA4h8IABBBnZB////AHGtIBsgHn4gHSAffnwgICAjfnwgISAlfnwgIiAkfnwgGiAmfnwgHCAnfnx8IjZCgIBAfSIwQhWIfCIoQoCAQH0iN0IViHx8IAZCgICAf4N9IjhCgIBAfSI5QhWHfCIOQoCAQH0iKUIVhyAJIAhCgICAf4N9IAwgESAVfiIPQoCAQH0iDUIViCIxQoOhVn58IApCgICAf4N9IBcgGn4gESAhfnwgEiAcfnwgFCAYfnwgEyAbfnwgECAZfnwgFSAkfnwgFiAdfnwgEiAhfiARICB+fCAUIBp+fCAXIBx+fCAYIBl+fCATIB1+fCAQIBt+fCAVICN+fCAWICR+fCIMQoCAQH0iCkIViHwiCUKAgEB9IghCFYh8IgdCgIBAfSIGQhWHfCIyQoOhVn58IBIgHn4gFyAffnwgGSAgfnwgGyAhfnwgFCAifnwgGiAkfnwgHCAdfnwgGCAjfnwgEyAnfnwgECAlfnwgFiAmfnwgBUEYdq0gPjEAG0IIhoQgPjEAHEIQhoRCAohC////AIN8IgMgLUKY2hx+IA8gDUKAgID/////A4N9ICpCFYh8IjNCk9gofnwgLELn9id+fCAuQtOMQ358IC9C0asIfnwgC0IViHx8IANCgIBAfSI6QoCAgH+DfSIDfCADQoCAQH0iO0KAgIB/g30iCyAOIAcgBkKAgIB/g30gM0KDoVZ+IDFC0asIfnwgCXwgCEKAgIB/g30gDCAxQtOMQ358IDNC0asIfnwgLUKDoVZ+fCAKQoCAgH+DfSAXICF+IBIgIH58IBEgIn58IBkgGn58IBQgHH58IBggG358IBMgJH58IBAgHX58IBUgJX58IBYgI358IBcgIH4gESAffnwgFCAhfnwgEiAifnwgGiAbfnwgGSAcfnwgGCAdfnwgEyAjfnwgECAkfnwgFSAnfnwgFiAlfnwiPEKAgEB9Ij1CFYh8IitCgIBAfSIqQhWIfCINQoCAQH0iDEIVh3wiBkKAgEB9IgNCFYd8IjRCg6FWfiAyQtGrCH58fCApQoCAgH+DfSA4IDRC0asIfiAyQtOMQ358IAYgA0KAgIB/g30iNUKDoVZ+fCAvQpjaHH4gLkKT2Ch+fCAofCA2IC9Ck9gofnwgMEKAgIB/g30gHSAefiAfICR+fCAgICV+fCAhICd+fCAiICN+fCAcICZ+fCA+KAAKIgBBGHatID4xAA5CCIaEID4xAA9CEIaEQgGIQv///wCDfCAAQQR2Qf///wBxrSAeICR+IB8gI358ICAgJ358ICEgJn58ICIgJX58fCI2QoCAQH0iMEIViHwiKEKAgEB9Ig5CFYh8IilCgIBAfSIPQhWHfCA3QoCAgH+DfSIKQoCAQH0iCUIVh3x8IDlCgICAf4N9IghCgIBAfSIHQhWHfCIGQoCAQH0iA0IVh3wgC0KAgEB9IgtCgICAf4N9IAYgA0KAgIB/g30gCCAHQoCAgH+DfSA0QtOMQ34gMkLn9id+fCA1QtGrCH58IAp8IAlCgICAf4N9IA0gDEKAgIB/g30gM0LTjEN+IDFC5/YnfnwgLULRqwh+fCAsQoOhVn58ICt8ICpCgICAf4N9IDNC5/YnfiAxQpjaHH58IC1C04xDfnwgPHwgLELRqwh+fCAuQoOhVn58ID1CgICAf4N9ID4oABxBB3atIBEgHn4gEiAffnwgFCAgfnwgGSAhfnwgFyAifnwgGiAdfnwgGyAcfnwgGCAkfnwgEyAlfnwgECAjfnwgFSAmfnwgFiAnfnx8IDpCFYh8Ig1CgIBAfSIMQhWIfCIKQoCAQH0iCUIVh3wiBkKAgEB9IgNCFYd8IitCg6FWfnwgKSAyQpjaHH58IA9CgICAf4N9IDRC5/YnfnwgNULTjEN+fCArQtGrCH58IAYgA0KAgIB/g30iKkKDoVZ+fCIIQoCAQH0iB0IVh3wiBkKAgEB9IgNCFYd8IAYgA0KAgIB/g30gCCAHQoCAgH+DfSAyQpPYKH4gKHwgDkKAgIB/g30gNEKY2hx+fCA1Quf2J358IAogCUKAgIB/g30gM0KY2hx+IDFCk9gofnwgLULn9id+fCAsQtOMQ358IC5C0asIfnwgL0KDoVZ+fCANfCAMQoCAgH+DfSA7QhWHfCINQoCAQH0iDEIVh3wiDkKDoVZ+fCArQtOMQ358ICpC0asIfnwgNiAwQoCAgH+DfSAeICN+IB8gJX58ICAgJn58ICIgJ358ID41AAdCB4hC////AIN8IB4gJX4gHyAnfnwgIiAmfnwgPigAAiIAQRh2rSA+MQAGQgiGhCA+MQAHQhCGhEICiEL///8Ag3wiKUKAgEB9Ig9CFYh8IgpCgIBAfSIJQhWIfCA0QpPYKH58IDVCmNocfnwgDkLRqwh+fCArQuf2J358ICpC04xDfnwiCEKAgEB9IgdCFYd8IgZCgIBAfSIDQhWHfCAGIA0gDEKAgIB/g30gC0IVh3wiMEKAgEB9IihCFYciC0KDoVZ+fCADQoCAgH+DfSAIIAtC0asIfnwgB0KAgIB/g30gCiAJQoCAgH+DfSA1QpPYKH58IA5C04xDfnwgK0KY2hx+fCAqQuf2J358ICkgAEEFdkH///8Aca0gHiAnfiAfICZ+fHwgHiAmfiA+MwAAID4xAAJCEIZCgID8AIOEfCINQoCAQH0iDEIViHwiCkKAgEB9IglCFYh8IA9CgICAf4N9IA5C5/YnfnwgK0KT2Ch+fCAqQpjaHH58IghCgIBAfSIHQhWHfCIGQoCAQH0iA0IVh3wgBiALQtOMQ358IANCgICAf4N9IAggC0Ln9id+fCAHQoCAgH+DfSAKIAlCgICAf4N9IA5CmNocfnwgKkKT2Ch+fCANIAxCgICA////A4N9IA5Ck9gofnwiCEKAgEB9IgdCFYd8IgZCgIBAfSIDQhWHfCAGIAtCmNocfnwgA0KAgIB/g30gCCAHQoCAgH+DfSALQpPYKH58Ig5CFYd8IgtCFYd8IilCFYd8Ig9CFYd8Ig1CFYd8IgxCFYd8IgpCFYd8IglCFYd8IghCFYd8IgdCFYd8IgZCFYcgMCAoQoCAgH+DfXwiA0IVhyIoQpPYKH4gDkL///8Ag3wiDjwAACAEIA5CCIg8AAEgBCAoQpjaHH4gC0L///8Ag3wgDkIVh3wiC0ILiDwABCAEIAtCA4g8AAMgBCAOQhCIQh+DIAtCBYaEPAACIAQgKELn9id+IClC////AIN8IAtCFYd8IilCBog8AAYgBCApQgKGIAtCgIDgAINCE4iEPAAFIAQgKELTjEN+IA9C////AIN8IClCFYd8Ig9CCYg8AAkgBCAPQgGIPAAIIAQgD0IHhiApQoCA/wCDQg6IhDwAByAEIChC0asIfiANQv///wCDfCAPQhWHfCINQgyIPAAMIAQgDUIEiDwACyAEIA1CBIYgD0KAgPgAg0IRiIQ8AAogBCAoQoOhVn4gDEL///8Ag3wgDUIVh3wiDEIHiDwADiAEIAxCAYYgDUKAgMAAg0IUiIQ8AA0gBCAKQv///wCDIAxCFYd8IgpCCog8ABEgBCAKQgKIPAAQIAQgCkIGhiAMQoCA/gCDQg+IhDwADyAEIAlC////AIMgCkIVh3wiCUINiDwAFCAEIAlCBYg8ABMgBCAIQv///wCDIAlCFYd8Igg8ABUgBCAJQgOGIApCgIDwAINCEoiEPAASIAQgCEIIiDwAFiAEIAdC////AIMgCEIVh3wiB0ILiDwAGSAEIAdCA4g8ABggBCAIQhCIQh+DIAdCBYaEPAAXIAQgBkL///8AgyAHQhWHfCIGQgaIPAAbIAQgBkIChiAHQoCA4ACDQhOIhDwAGiAEIANC////AIMgBkIVh3wiA0IRiDwAHyAEIANCCYg8AB4gBCADQgGIPAAdIAQgA0IHhiAGQoCA/wCDQg6IhDwAHCBAQcAAEAcgPkHAABAHIAEEQCABQsAANwMACyA/QbAEaiQAQQAL2wEBA38jAEEQayIDIAA2AgwgAyABNgIIQQAhACADQQA6AAcCQCACRQ0AIAJBAXEhASACQQFHBEAgAkF+cSEEQQAhAgNAIAMgAy0AByADKAIMIABqLQAAIAMoAgggAGotAABzcjoAByADIAMtAAcgAEEBciIFIAMoAgxqLQAAIAMoAgggBWotAABzcjoAByAAQQJqIQAgAkECaiICIARHDQALCyABRQ0AIAMgAy0AByADKAIMIABqLQAAIAMoAgggAGotAABzcjoABwsgAy0AB0EBa0EIdkEBcUEBawsEAEEIC4MDAgN/An4jAEFAaiIDJAACQCACQcEAa0H/AXFBvwFLBEBBfyEEIAApAFBQBEAgACgA4AIiBUGBAU8EQCAAQUBrIgUgBSkAACIGQoABfDcAACAAIAApAEggBkL/flatfDcASCAAIABB4ABqIgQQKCAAIAAoAOACQYABayIFNgDgAiAFQYEBTw0DIAQgAEHgAWogBRALGiAAKADgAiEFCyAAQUBrIgQgBCkAACIGIAWtfCIHNwAAIAAgACkASCAGIAdWrXw3AEggAC0A5AIEQCAAQn83AFgLIABCfzcAUCAAQeAAaiIEIAVqQQBBgAIgBWsQCBogACAEECggAyAAKQAANwMAIAMgACkACDcDCCADIAApABA3AxAgAyAAKQAYNwMYIAMgACkAIDcDICADIAApACg3AyggAyAAKQAwNwMwIAMgACkAODcDOCABIAMgAhALGiAAQcAAEAcgBEGAAhAHQQAhBAsgA0FAayQAIAQPCxAJAAtBgApB9ghBsgJBvggQAQAL6RICFX4DfyAAIAAoACwiFkEFdkH///8Aca0gACgAPEEDdq0iAkKDoVZ+IAAzACogADEALEIQhkKAgPwAg4R8IghCgIBAfSIJQhWHfCIBQoOhVn4gADUAMUIHiEL///8AgyIDQtOMQ34gACgAFyIXQRh2rSAAMQAbQgiGhCAAMQAcQhCGhEICiEL///8Ag3wgACgANCIYQQR2Qf///wBxrSIEQuf2J358IBZBGHatIAAxADBCCIaEIAAxADFCEIaEQgKIQv///wCDIgVC0asIfnwgADUAOUIGiEL///8AgyIGQpPYKH58IBhBGHatIAAxADhCCIaEIAAxADlCEIaEQgGIQv///wCDIgpCmNocfnwiB3wgB0KAgEB9IhBCgICAf4N9IBdBBXZB////AHGtIANC5/YnfnwgBEKY2hx+fCAFQtOMQ358IApCk9gofnwgA0KY2hx+IAAzABUgADEAF0IQhkKAgPwAg4R8IARCk9gofnwgBULn9id+fCIHQoCAQH0iC0IViHwiDEKAgEB9Ig1CFYd8IhEgEUKAgEB9IhFCgICAf4N9IAwgAULRqwh+fCANQoCAgH+DfSAIIAlCgICAf4N9IAJC0asIfiAAKAAkIhZBGHatIAAxAChCCIaEIAAxAClCEIaEQgOIfCAGQoOhVn58IBZBBnZB////AHGtIAJC04xDfnwgBkLRqwh+fCAKQoOhVn58IgxCgIBAfSINQhWHfCIJQoCAQH0iDkIVh3wiCEKDoVZ+fCAHIAtCgICA////A4N9IANCk9gofiAAKAAPIhZBGHatIAAxABNCCIaEIAAxABRCEIaEQgOIfCAFQpjaHH58IBZBBnZB////AHGtIAVCk9gofnwiC0KAgEB9IhJCFYh8IgdCgIBAfSIPQhWIfCABQtOMQ358IAhC0asIfnwgCSAOQoCAgH+DfSIJQoOhVn58Ig5CgIBAfSITQhWHfCIUQoCAQH0iFUIVh3wgFCAVQoCAgH+DfSAOIBNCgICAf4N9IAcgD0KAgIB/g30gAULn9id+fCAIQtOMQ358IAlC0asIfnwgDCANQoCAgH+DfSAEQoOhVn4gACgAHyIWQRh2rSAAMQAjQgiGhCAAMQAkQhCGhEIBiEL///8Ag3wgAkLn9id+fCAGQtOMQ358IApC0asIfnwgFkEEdkH///8Aca0gA0KDoVZ+fCAEQtGrCH58IAJCmNocfnwgBkLn9id+fCAKQtOMQ358IgxCgIBAfSINQhWHfCIOQoCAQH0iD0IVh3wiB0KDoVZ+fCALIBJCgICA////AYN9IAFCmNocfnwgCELn9id+fCAJQtOMQ358IAdC0asIfnwgDiAPQoCAgH+DfSILQoOhVn58Ig5CgIBAfSISQhWHfCIPQoCAQH0iE0IVh3wgDyATQoCAgH+DfSAOIBJCgICAf4N9IAFCk9gofiAAKAAKIhZBGHatIAAxAA5CCIaEIAAxAA9CEIaEQgGIQv///wCDfCAIQpjaHH58IAlC5/YnfnwgB0LTjEN+fCALQtGrCH58IAwgDUKAgIB/g30gA0LRqwh+IAA1ABxCB4hC////AIN8IARC04xDfnwgBUKDoVZ+fCACQpPYKH58IAZCmNocfnwgCkLn9id+fCAQQhWHfCIBQoCAQH0iA0IVh3wiAkKDoVZ+fCAWQQR2Qf///wBxrSAIQpPYKH58IAlCmNocfnwgB0Ln9id+fCALQtOMQ358IAJC0asIfnwiBEKAgEB9IgVCFYd8IgZCgIBAfSIKQhWHfCAGIAEgA0KAgIB/g30gEUIVh3wiA0KAgEB9IghCFYciAUKDoVZ+fCAKQoCAgH+DfSABQtGrCH4gBHwgBUKAgIB/g30gCUKT2Ch+IAA1AAdCB4hC////AIN8IAdCmNocfnwgC0Ln9id+fCACQtOMQ358IAdCk9gofiAAKAACIhZBGHatIAAxAAZCCIaEIAAxAAdCEIaEQgKIQv///wCDfCALQpjaHH58IAJC5/YnfnwiBEKAgEB9IgVCFYd8IgZCgIBAfSIKQhWHfCAGIAFC04xDfnwgCkKAgIB/g30gAULn9id+IAR8IAVCgICAf4N9IBZBBXZB////AHGtIAtCk9gofnwgAkKY2hx+fCACQpPYKH4gADMAACAAMQACQhCGQoCA/ACDhHwiAkKAgEB9IgRCFYd8IgVCgIBAfSIGQhWHfCABQpjaHH4gBXwgBkKAgIB/g30gAiAEQoCAgH+DfSABQpPYKH58IgFCFYd8IgRCFYd8IgVCFYd8IgZCFYd8IgpCFYd8IglCFYd8IgdCFYd8IgtCFYd8IhBCFYd8IgxCFYd8Ig1CFYcgAyAIQoCAgH+DfXwiCEIVhyICQpPYKH4gAUL///8Ag3wiAzwAACAAIANCCIg8AAEgACACQpjaHH4gBEL///8Ag3wgA0IVh3wiAUILiDwABCAAIAFCA4g8AAMgACADQhCIQh+DIAFCBYaEPAACIAAgAkLn9id+IAVC////AIN8IAFCFYd8IgNCBog8AAYgACADQgKGIAFCgIDgAINCE4iEPAAFIAAgAkLTjEN+IAZC////AIN8IANCFYd8IgFCCYg8AAkgACABQgGIPAAIIAAgAUIHhiADQoCA/wCDQg6IhDwAByAAIAJC0asIfiAKQv///wCDfCABQhWHfCIDQgyIPAAMIAAgA0IEiDwACyAAIANCBIYgAUKAgPgAg0IRiIQ8AAogACACQoOhVn4gCUL///8Ag3wgA0IVh3wiAUIHiDwADiAAIAFCAYYgA0KAgMAAg0IUiIQ8AA0gACAHQv///wCDIAFCFYd8IgJCCog8ABEgACACQgKIPAAQIAAgAkIGhiABQoCA/gCDQg+IhDwADyAAIAtC////AIMgAkIVh3wiAUINiDwAFCAAIAFCBYg8ABMgACAQQv///wCDIAFCFYd8IgM8ABUgACABQgOGIAJCgIDwAINCEoiEPAASIAAgA0IIiDwAFiAAIAxC////AIMgA0IVh3wiAkILiDwAGSAAIAJCA4g8ABggACADQhCIQh+DIAJCBYaEPAAXIAAgDUL///8AgyACQhWHfCIBQgaIPAAbIAAgAUIChiACQoCA4ACDQhOIhDwAGiAAIAhC////AIMgAUIVh3wiAkIRiDwAHyAAIAJCCYg8AB4gACACQgGIPAAdIAAgAkIHhiABQoCA/wCDQg6IhDwAHAv4AQEKfwNAIAQgACADai0AACIBIANBkBNqIgItAABzciEEIAogASACLQDAAXNyIQogCSABIAItAKABc3IhCSAIIAEgAi0AgAFzciEIIAcgASACLQBgc3IhByAGIAEgAkFAay0AAHNyIQYgBSABIAItACBzciEFIANBAWoiA0EfRw0ACyAKIAAtAB9B/wBxIgBB/wBzIgFyQf8BcUEBayABIAlyQf8BcUEBayABIAhyQf8BcUEBayAHIABB+gBzckH/AXFBAWsgBiAAQQVzckH/AXFBAWsgACAFckH/AXFBAWsgACAEckH/AXFBAWtycnJycnJBCHZBAXEL4AkBHn8gASgCKCEDIAEoAgQhBCABKAIsIQUgASgCCCEGIAEoAjAhByABKAIMIQggASgCNCEJIAEoAhAhCiABKAI4IQsgASgCFCEMIAEoAjwhDSABKAIYIQ4gAUFAayIPKAIAIRAgASgCHCERIAEoAkQhEiABKAIgIRMgASgCSCEUIAEoAgAhFSAAIAEoAiQgASgCTGo2AiQgACATIBRqNgIgIAAgESASajYCHCAAIA4gEGo2AhggACAMIA1qNgIUIAAgCiALajYCECAAIAggCWo2AgwgACAGIAdqNgIIIAAgBCAFajYCBCAAIAMgFWo2AgAgASgCKCEFIAEoAgQhAyABKAIsIQYgASgCCCEHIAEoAjAhCCABKAIMIQkgASgCNCEKIAEoAhAhCyABKAI4IQwgASgCFCENIAEoAjwhDiABKAIYIRAgDygCACEPIAEoAhwhBCABKAJEIREgASgCICESIAEoAkghEyABKAIAIRQgACABKAJMIAEoAiRrNgJMIAAgEyASazYCSCAAIBEgBGs2AkQgAEFAayIEIA8gEGs2AgAgACAOIA1rNgI8IAAgDCALazYCOCAAIAogCWs2AjQgACAIIAdrNgIwIAAgBiADazYCLCAAQShqIgMgBSAUazYCACAAQdAAaiAAIAIQBiADIAMgAkEoahAGIABB+ABqIAJB0ABqIAFB+ABqEAYgASgCUCEVIAEoAlQhFiABKAJYIRcgASgCXCEYIAEoAmAhGSABKAJkIRogASgCaCEbIAEoAmwhHCABKAJwIR0gASgCdCEeIAMoAgAhASAAKAJQIQIgACgCLCEFIAAoAlQhBiAAKAIwIQcgACgCWCEIIAAoAjQhCSAAKAJcIQogACgCOCELIAAoAmAhDCAAKAI8IQ0gACgCZCEOIAQoAgAhDyAAKAJoIRAgACgCRCERIAAoAmwhEiAAKAJIIRMgACgCcCEUIAAgACgCTCIfIAAoAnQiIGo2AkwgACATIBRqNgJIIAAgESASajYCRCAEIA8gEGo2AgAgACANIA5qNgI8IAAgCyAMajYCOCAAIAkgCmo2AjQgACAHIAhqNgIwIAAgBSAGajYCLCADIAEgAmo2AgAgACAgIB9rNgIkIAAgFCATazYCICAAIBIgEWs2AhwgACAQIA9rNgIYIAAgDiANazYCFCAAIAwgC2s2AhAgACAKIAlrNgIMIAAgCCAHazYCCCAAIAYgBWs2AgQgACACIAFrNgIAIAAgHkEBdCIBIAAoApwBIgJrNgKcASAAIB1BAXQiAyAAKAKYASIEazYCmAEgACAcQQF0IgUgACgClAEiBms2ApQBIAAgG0EBdCIHIAAoApABIghrNgKQASAAIBpBAXQiCSAAKAKMASIKazYCjAEgACAZQQF0IgsgACgCiAEiDGs2AogBIAAgGEEBdCINIAAoAoQBIg5rNgKEASAAIBdBAXQiDyAAKAKAASIQazYCgAEgACAWQQF0IhEgACgCfCISazYCfCAAIBVBAXQiEyAAKAJ4IhRrNgJ4IAAgAyAEajYCcCAAIAUgBmo2AmwgACAHIAhqNgJoIAAgCSAKajYCZCAAIAsgDGo2AmAgACANIA5qNgJcIAAgDyAQajYCWCAAIBEgEmo2AlQgACATIBRqNgJQIAAgASACajYCdAumBAIOfgp/IAAoAiQhEiAAKAIgIRMgACgCHCEUIAAoAhghFSAAKAIUIREgAkIQWgRAIAAtAFBFQRh0IRYgACgCECIXrSEPIAAoAgwiGK0hDSAAKAIIIhmtIQsgACgCBCIarSEJIBpBBWytIRAgGUEFbK0hDiAYQQVsrSEMIBdBBWytIQogADUCACEIA0AgASgAA0ECdkH///8fcSAVaq0iAyANfiABKAAAQf///x9xIBFqrSIEIA9+fCABKAAGQQR2Qf///x9xIBRqrSIFIAt+fCABKAAJQQZ2IBNqrSIGIAl+fCASIBZqIAEoAAxBCHZqrSIHIAh+fCADIAt+IAQgDX58IAUgCX58IAYgCH58IAcgCn58IAMgCX4gBCALfnwgBSAIfnwgBiAKfnwgByAMfnwgAyAIfiAEIAl+fCAFIAp+fCAGIAx+fCAHIA5+fCADIAp+IAQgCH58IAUgDH58IAYgDn58IAcgEH58IgNCGohC/////w+DfCIEQhqIQv////8Pg3wiBUIaiEL/////D4N8IgZCGohC/////w+DfCIHQhqIp0EFbCADp0H///8fcWoiEUEadiAEp0H///8fcWohFSAFp0H///8fcSEUIAanQf///x9xIRMgB6dB////H3EhEiARQf///x9xIREgAUEQaiEBIAJCEH0iAkIPVg0ACwsgACARNgIUIAAgEjYCJCAAIBM2AiAgACAUNgIcIAAgFTYCGAutAwIMfwN+IAApAzgiDkIAUgRAIABBQGsiAiAOpyIDakEBOgAAIA5CAXxCD1gEQCAAIANqQcEAakEAQQ8gA2sQCBoLIABBAToAUCAAIAJCEBA5CyAANQI0IQ4gADUCMCEPIAA1AiwhECABIAAoAhQgACgCJCAAKAIgIAAoAhwgACgCGCIDQRp2aiICQRp2aiIGQRp2aiIJQRp2QQVsaiIEQf///x9xIgVBBWoiB0EadiADQf///x9xIARBGnZqIgRqIghBGnYgAkH///8fcSIKaiILQRp2IAZB////H3EiBmoiDEEadiAJQf///x9xaiINQYCAgCBrIgJBH3UiAyAEcSACQR92QQFrIgRB////H3EiAiAIcXIiCEEadCACIAdxIAMgBXFyciIFIAAoAihqIgc2AAAgASAFIAdLrSAQIAMgCnEgAiALcXIiBUEUdCAIQQZ2cq18fCIQPgAEIAEgDyADIAZxIAIgDHFyIgJBDnQgBUEMdnKtfCAQQiCIfCIPPgAIIAEgDiAEIA1xIAMgCXFyQQh0IAJBEnZyrXwgD0IgiHw+AAwgAEHYABAHC98EAgZ+AX8CQCAAKQM4IgNCAFIEQCAAQhAgA30iBCACIAIgBFYbIgRCAFIEfkIAIQMgBEIEWgRAIARCfIMhBSAAQUBrIQkDQCAJIAApAzggA3ynaiABIAOnai0AADoAACAJIANCAYQiCCAAKQM4fKdqIAEgCKdqLQAAOgAAIAkgA0IChCIIIAApAzh8p2ogASAIp2otAAA6AAAgCSADQgOEIgggACkDOHynaiABIAinai0AADoAACADQgR8IQMgBkIEfCIGIAVSDQALCyAEQgODIgZCAFIEQANAIAAgACkDOCADfKdqQUBrIAEgA6dqLQAAOgAAIANCAXwhAyAHQgF8IgcgBlINAAsLIAApAzgFIAMLIAR8IgM3AzggA0IQVA0BIAAgAEFAa0IQEDkgAEIANwM4IAIgBH0hAiABIASnaiEBCyACQhBaBEAgACABIAJCcIMiAxA5IAJCD4MhAiABIAOnaiEBCyACUA0AQgAhB0IAIQMgAkIEWgRAIAJCDIMhBCAAQUBrIQlCACEGA0AgCSAAKQM4IAN8p2ogASADp2otAAA6AAAgCSADQgGEIgUgACkDOHynaiABIAWnai0AADoAACAJIANCAoQiBSAAKQM4fKdqIAEgBadqLQAAOgAAIAkgA0IDhCIFIAApAzh8p2ogASAFp2otAAA6AAAgA0IEfCEDIAZCBHwiBiAEUg0ACwsgAkIDgyIEQgBSBEADQCAAIAApAzggA3ynakFAayABIAOnai0AADoAACADQgF8IQMgB0IBfCIHIARSDQALCyAAIAApAzggAnw3AzgLCwoAIAAgASACEEYLFgAgAUEgEBYgACABQcyQAigCABEBAAuzBAEUf0H0yoHZBiEDQbLaiMsHIQxB7siBmQMhDUHl8MGLBiEEIAEoAAwhDyABKAAIIQUgASgABCEGIAIoABwhEiACKAAYIRBBFCERIAIoABQhDiACKAAQIQggAigADCEJIAIoAAghCiACKAAEIQsgASgAACEBIAIoAAAhAgNAIBAgDyACIA1qQQd3cyIHIA1qQQl3cyITIAQgDmpBB3cgCXMiCSAEakEJdyAFcyIUIAlqQQ13IA5zIhUgAyAIakEHdyAKcyIKIANqQQl3IAZzIgYgCmpBDXcgCHMiCCAGakESdyADcyIDIBIgASAMakEHd3MiBWpBB3dzIg4gA2pBCXdzIhAgDmpBDXcgBXMiEiAQakESdyADcyEDIAUgBSAMakEJdyALcyILakENdyABcyIWIAtqQRJ3IAxzIgEgB2pBB3cgCHMiCCABakEJdyAUcyIFIAhqQQ13IAdzIg8gBWpBEncgAXMhDCATIAcgE2pBDXcgAnMiB2pBEncgDXMiAiAJakEHdyAWcyIBIAJqQQl3IAZzIgYgAWpBDXcgCXMiCSAGakESdyACcyENIBQgFWpBEncgBHMiBCAKakEHdyAHcyICIARqQQl3IAtzIgsgAmpBDXcgCnMiCiALakESdyAEcyEEIBFBAkshByARQQJrIREgBw0ACyAAIAQ2AAAgACAPNgAcIAAgBTYAGCAAIAY2ABQgACABNgAQIAAgAzYADCAAIAw2AAggACANNgAEQQALhwEBBH9BASEBA0AgACADaiICIAEgAi0AAGoiAToAACAAIANBAXJqIgIgAi0AACABQQh2aiIBOgAAIAAgA0ECcmoiAiACLQAAIAFBCHZqIgE6AAAgACADQQNyaiICIAItAAAgAUEIdmoiAToAACABQQh2IQEgA0EEaiEDIARBBGoiBEEERw0ACwugAgEDfyMAQeACayIIJAAgCEEgaiIKQsAAIAYgBxAXIAhB4ABqIgkgCkG8kAIoAgARAQAaIApBwAAQByAJIAQgBUHAkAIoAgARAAAaIAlBgIkCQgAgBX1CD4NBwJACKAIAEQAAGiAJIAEgAkHAkAIoAgARAAAaIAlBgIkCQgAgAn1CD4NBwJACKAIAEQAAGiAIIAU3AxggCSAIQRhqIgRCCEHAkAIoAgARAAAaIAggAjcDGCAJIARCCEHAkAIoAgARAAAaIAkgCEHEkAIoAgARAQAaIAlBgAIQByAIIAMQLSEEIAhBEBAHAkAgAEUNACAEBEAgAEEAIAKnEAgaQX8hBAwBCyAAIAEgAiAGQQEgBxAbQQAhBAsgCEHgAmokACAEC/UBAQN/IwBB4AJrIggkACAIQSBqIgpCwAAgBiAHQaSQAigCABEMABogCEHgAGoiCSAKQbyQAigCABEBABogCkHAABAHIAkgBCAFQcCQAigCABEAABogCCAFNwMYIAkgCEEYaiIEQghBwJACKAIAEQAAGiAJIAEgAkHAkAIoAgARAAAaIAggAjcDGCAJIARCCEHAkAIoAgARAAAaIAkgCEHEkAIoAgARAQAaIAlBgAIQByAIIAMQLSEEIAhBEBAHAkAgAEUNACAEBEAgAEEAIAKnEAgaQX8hBAwBCyAAIAEgAiAGIAcQTkEAIQQLIAhB4AJqJAAgBAv9AQEDfyMAQdACayIKJAAgCkEQaiILQsAAIAcgCBAXIApB0ABqIgkgC0G8kAIoAgARAQAaIAtBwAAQByAJIAUgBkHAkAIoAgARAAAaIAlBgIkCQgAgBn1CD4NBwJACKAIAEQAAGiAAIAMgBCAHQQEgCBAbIAkgACAEQcCQAigCABEAABogCUGAiQJCACAEfUIPg0HAkAIoAgARAAAaIAogBjcDCCAJIApBCGoiAEIIQcCQAigCABEAABogCiAENwMIIAkgAEIIQcCQAigCABEAABogCSABQcSQAigCABEBABogCUGAAhAHIAIEQCACQhA3AwALIApB0AJqJABBAAvSAQEDfyMAQdACayIJJAAgCUEQaiILQsAAIAcgCEGkkAIoAgARDAAaIAlB0ABqIgogC0G8kAIoAgARAQAaIAtBwAAQByAKIAUgBkHAkAIoAgARAAAaIAkgBjcDCCAKIAlBCGoiBUIIQcCQAigCABEAABogACADIAQgByAIEE4gCiAAIARBwJACKAIAEQAAGiAJIAQ3AwggCiAFQghBwJACKAIAEQAAGiAKIAFBxJACKAIAEQEAGiAKQYACEAcgAgRAIAJCEDcDAAsgCUHQAmokAEEACwQAQQMLBABBAQvIBAECfyMAQRBrIgMkACADQQA6AA9BfyEEIAAgASACQciQAigCABEDAEUEQCADIAAtAAAgAy0AD3I6AA8gAyAALQABIAMtAA9yOgAPIAMgAC0AAiADLQAPcjoADyADIAAtAAMgAy0AD3I6AA8gAyAALQAEIAMtAA9yOgAPIAMgAC0ABSADLQAPcjoADyADIAAtAAYgAy0AD3I6AA8gAyAALQAHIAMtAA9yOgAPIAMgAC0ACCADLQAPcjoADyADIAAtAAkgAy0AD3I6AA8gAyAALQAKIAMtAA9yOgAPIAMgAC0ACyADLQAPcjoADyADIAAtAAwgAy0AD3I6AA8gAyAALQANIAMtAA9yOgAPIAMgAC0ADiADLQAPcjoADyADIAAtAA8gAy0AD3I6AA8gAyAALQAQIAMtAA9yOgAPIAMgAC0AESADLQAPcjoADyADIAAtABIgAy0AD3I6AA8gAyAALQATIAMtAA9yOgAPIAMgAC0AFCADLQAPcjoADyADIAAtABUgAy0AD3I6AA8gAyAALQAWIAMtAA9yOgAPIAMgAC0AFyADLQAPcjoADyADIAAtABggAy0AD3I6AA8gAyAALQAZIAMtAA9yOgAPIAMgAC0AGiADLQAPcjoADyADIAAtABsgAy0AD3I6AA8gAyAALQAcIAMtAA9yOgAPIAMgAC0AHSADLQAPcjoADyADIAAtAB4gAy0AD3I6AA8gAyAALQAfIAMtAA9yOgAPIAMtAA9BF3RBgICABGtBH3UhBAsgA0EQaiQAIAQL8QQCCX8EfiMAQYABayIDJAAgAEEBNgIAIABCADcCBCAAQgA3AgwgAEIANwIUIABCADcCHCAAQoCAgIAQNwIkIABBLGpBAEHMABAIGiAAIAFBwAdsQZAVaiIBIAIgAkEfdSACcUEBdGsiBEEBc0H/AXFBAWtBH3YQESAAIAFB+ABqIARBAnNB/wFxQQFrQR92EBEgACABQfABaiAEQQNzQf8BcUEBa0EfdhARIAAgAUHoAmogBEEEc0H/AXFBAWtBH3YQESAAIAFB4ANqIARBBXNB/wFxQQFrQR92EBEgACABQdgEaiAEQQZzQf8BcUEBa0EfdhARIAAgAUHQBWogBEEHc0H/AXFBAWtBH3YQESAAIAFByAZqIARBCHNB/wFxQQFrQR92EBEgACkCKCEMIAApAjAhDSAAKQI4IQ4gAEFAaykCACEPIAMgACkCSDcDKCADIA83AyAgAyAONwMYIAMgDTcDECADIAw3AwggACkCCCEMIAApAhAhDSAAKQIYIQ4gACkCACEPIAMgACkCIDcDUCADIA43A0ggA0FAayANNwMAIAMgDDcDOCADIA83AzAgACgCUCEBIAAoAlQhBCAAKAJYIQUgACgCXCEGIAAoAmAhByAAKAJkIQggACgCaCEJIAAoAmwhCiAAKAJwIQsgA0EAIAAoAnRrNgJ8IANBACALazYCeCADQQAgCms2AnQgA0EAIAlrNgJwIANBACAIazYCbCADQQAgB2s2AmggA0EAIAZrNgJkIANBACAFazYCYCADQQAgBGs2AlwgA0EAIAFrNgJYIAAgA0EIaiACQYABcUEHdhARIANBgAFqJAAL8AkBHn8gASgCKCEDIAEoAgQhBCABKAIsIQUgASgCCCEGIAEoAjAhByABKAIMIQggASgCNCEJIAEoAhAhCiABKAI4IQsgASgCFCEMIAEoAjwhDSABKAIYIQ4gAUFAayIPKAIAIRAgASgCHCERIAEoAkQhEiABKAIgIRMgASgCSCEUIAEoAgAhFSAAIAEoAiQgASgCTGo2AiQgACATIBRqNgIgIAAgESASajYCHCAAIA4gEGo2AhggACAMIA1qNgIUIAAgCiALajYCECAAIAggCWo2AgwgACAGIAdqNgIIIAAgBCAFajYCBCAAIAMgFWo2AgAgASgCKCEFIAEoAgQhAyABKAIsIQYgASgCCCEHIAEoAjAhCCABKAIMIQkgASgCNCEKIAEoAhAhCyABKAI4IQwgASgCFCENIAEoAjwhDiABKAIYIRAgDygCACEPIAEoAhwhBCABKAJEIREgASgCICESIAEoAkghEyABKAIAIRQgACABKAJMIAEoAiRrNgJMIAAgEyASazYCSCAAIBEgBGs2AkQgAEFAayIEIA8gEGs2AgAgACAOIA1rNgI8IAAgDCALazYCOCAAIAogCWs2AjQgACAIIAdrNgIwIAAgBiADazYCLCAAQShqIgMgBSAUazYCACAAQdAAaiAAIAJBKGoQBiADIAMgAhAGIABB+ABqIAJB+ABqIAFB+ABqEAYgACABQdAAaiACQdAAahAGIAAoAgQhFSAAKAIIIRYgACgCDCEXIAAoAhAhGCAAKAIUIRkgACgCGCEaIAAoAhwhGyAAKAIgIRwgACgCJCEdIAMoAgAhASAAKAJQIQIgACgCLCEFIAAoAlQhBiAAKAIwIQcgACgCWCEIIAAoAjQhCSAAKAJcIQogACgCOCELIAAoAmAhDCAAKAI8IQ0gACgCZCEOIAQoAgAhDyAAKAJoIRAgACgCRCERIAAoAmwhEiAAKAJIIRMgACgCcCEUIAAoAgAhHiAAIAAoAkwiHyAAKAJ0IiBqNgJMIAAgEyAUajYCSCAAIBEgEmo2AkQgBCAPIBBqNgIAIAAgDSAOajYCPCAAIAsgDGo2AjggACAJIApqNgI0IAAgByAIajYCMCAAIAUgBmo2AiwgAyABIAJqNgIAIAAgICAfazYCJCAAIBQgE2s2AiAgACASIBFrNgIcIAAgECAPazYCGCAAIA4gDWs2AhQgACAMIAtrNgIQIAAgCiAJazYCDCAAIAggB2s2AgggACAGIAVrNgIEIAAgAiABazYCACAAIAAoApwBIgEgHUEBdCICajYCnAEgACAAKAKYASIDIBxBAXQiBGo2ApgBIAAgACgClAEiBSAbQQF0IgZqNgKUASAAIAAoApABIgcgGkEBdCIIajYCkAEgACAAKAKMASIJIBlBAXQiCmo2AowBIAAgACgCiAEiCyAYQQF0IgxqNgKIASAAIAAoAoQBIg0gF0EBdCIOajYChAEgACAAKAKAASIPIBZBAXQiEGo2AoABIAAgACgCfCIRIBVBAXQiEmo2AnwgACAAKAJ4IhMgHkEBdCIUajYCeCAAIAQgA2s2AnAgACAGIAVrNgJsIAAgCCAHazYCaCAAIAogCWs2AmQgACAMIAtrNgJgIAAgDiANazYCXCAAIBAgD2s2AlggACASIBFrNgJUIAAgFCATazYCUCAAIAIgAWs2AnQLrQ4BF38jAEHAAmsiAyQAIABBKGoiCSABEEogAEIANwJUIABBATYCUCAAQgA3AlwgAEIANwJkIABCADcCbCAAQQA2AnQgA0HwAWoiCCAJEAUgA0HAAWoiBiAIQcAKEAZBfyEKIAMgAygC8AFBAWsiCzYC8AEgAyADKALAAUEBajYCwAEgAygC9AEhDCADKAL4ASENIAMoAvwBIQ4gAygCgAIhDyADKAKEAiEQIAMoAogCIREgAygCjAIhEiADKAKQAiETIAMoApQCIRQgA0GQAWoiByAGEAUgByAHIAYQBiAAIAcQBSAAIAAgBhAGIAAgACAIEAYjAEGQAWsiBCQAIARB4ABqIgUgABAFIARBMGoiAiAFEAUgAiACEAUgAiAAIAIQBiAFIAUgAhAGIAUgBRAFIAUgAiAFEAYgAiAFEAUgAiACEAUgAiACEAUgAiACEAUgAiACEAUgBSACIAUQBiACIAUQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIgBRAGIAQgAhAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAQgBBAFIAIgBCACEAYgAiACEAUgAiACEAUgAiACEAUgAiACEAUgAiACEAUgAiACEAUgAiACEAUgAiACEAUgAiACEAUgAiACEAUgBSACIAUQBiACIAUQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIQBSACIAIgBRAGIAQgAhAFQQEhAgNAIAQgBBAFIAJBAWoiAkHkAEcNAAsgBEEwaiICIAQgAhAGIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIAIgAhAFIARB4ABqIgUgAiAFEAYgBSAFEAUgBSAFEAUgACAFIAAQBiAEQZABaiQAIAAgACAHEAYgACAAIAgQBiADQeAAaiICIAAQBSACIAIgBhAGIAMgAygChAEiAiAUazYCVCADIAMoAoABIgQgE2s2AlAgAyADKAJ8IgUgEms2AkwgAyADKAJ4IgYgEWs2AkggAyADKAJ0IgcgEGs2AkQgAyADKAJwIgggD2s2AkAgAyADKAJsIhUgDms2AjwgAyADKAJoIhYgDWs2AjggAyADKAJkIhcgDGs2AjQgAyADKAJgIhggC2s2AjAgAyADQTBqEBICQCADQSAQH0UEQCADIAIgFGo2AiQgAyAEIBNqNgIgIAMgBSASajYCHCADIAYgEWo2AhggAyAHIBBqNgIUIAMgCCAPajYCECADIA4gFWo2AgwgAyANIBZqNgIIIAMgDCAXajYCBCADIAsgGGo2AgAgA0GgAmoiAiADEBIgAkEgEB9FDQEgACAAQfAKEAYLIANBoAJqIAAQEiADLQCgAkEBcSABLQAfQQd2RgRAIABBACAAKAIAazYCACAAQQAgACgCJGs2AiQgAEEAIAAoAiBrNgIgIABBACAAKAIcazYCHCAAQQAgACgCGGs2AhggAEEAIAAoAhRrNgIUIABBACAAKAIQazYCECAAQQAgACgCDGs2AgwgAEEAIAAoAghrNgIIIABBACAAKAIEazYCBAsgAEH4AGogACAJEAZBACEKCyADQcACaiQAIAoL9AQBGX4gATEAHyECIAExAB4hBiABMQAdIQ4gATEABiEHIAExAAUhCCABMQAEIQMgATEACSEPIAExAAghECABMQAHIREgATEADCEJIAExAAshCiABMQAKIQsgATEADyEMIAExAA4hEiABMQANIRMgATEAHCEEIAExABshFCABMQAaIRUgATEAGSEFIAExABghFiABMQAXIRcgATUAACEYIAAgATEAFUIPhiABMQAUQgeGhCABMQAWQheGhCABNQAQIhlCgICACHwiGkIZiHwiDSANQoCAgBB8Ig1CgICA4A+DfT4CGCAAIBZCDYYgF0IFhoQgBUIVhoQiBSANQhqIfCAFQoCAgAh8IgVCgICA8AODfT4CHCAAIBRCDIYgFUIEhoQgBEIUhoQgBUIZiHwiBCAEQoCAgBB8IgRCgICA4A+DfT4CICAAIBkgGkKAgIDwD4N9IBJCCoYgE0IChoQgDEIShoQgCkILhiALQgOGhCAJQhOGhCIJQoCAgAh8IgpCGYh8IgtCgICAEHwiDEIaiHw+AhQgACALIAxCgICA4A+DfT4CECAAIBBCDYYgEUIFhoQgD0IVhoQgCEIOhiADQgaGhCAHQhaGhCIHQoCAgAh8IghCGYh8IgMgA0KAgIAQfCIDQoCAgOAPg30+AgggACACQhKGQoCA8A+DIAZCCoYgDkIChoSEIgIgBEIaiHwgAkKAgIAIfCICQoCAgBCDfT4CJCAAIANCGoggCXwgCkKAgIDwAIN9PgIMIAAgByAIQoCAgPAHg30gGCACQhmIQhN+fCICQoCAgBB8IgZCGoh8PgIEIAAgAiAGQoCAgOAPg30+AgALiwEBAX8jAEEQayICIAA2AgwgAiABNgIIQQAhACACQQA2AgQDQCACIAIoAgQgAigCDCAAai0AACACKAIIIABqLQAAc3I2AgQgAiACKAIEIABBAXIiASACKAIMai0AACACKAIIIAFqLQAAc3I2AgQgAEECaiIAQSBHDQALIAIoAgRBAWtBCHZBAXFBAWsLKQEBfyMAQRBrIgAkACAAQQA6AA9B/JACIABBD2pBABAAGiAAQRBqJAALKAAgAkKAgICAEFoEQBAJAAsgACABIAIgA0EBIARBsJACKAIAEQgAGgsoACACQoCAgIAQWgRAEAkACyAAIAEgAiADQgEgBEGskAIoAgARCQAaCy0BAX4gAq0gA61CIIaEIgZCEFoEfyAAIAFBEGogASAGQhB9IAQgBRAwBUF/CwsYACAAIAEgAiADrSAErUIghoQgBSAGEDALGAAgACABIAIgA60gBK1CIIaEIAUgBhAgC0oBAn8jAEEgayIGJABBfyEHAkAgAkIQVA0AIAYgBCAFECENACAAIAFBEGogASACQhB9IAMgBhAwIQcgBkEgEAcLIAZBIGokACAHC08BAn8jAEEgayIGJAAgAkLw////D1QEQEF/IQcgBiAEIAUQIUUEQCAAQRBqIAAgASACIAMgBhAgIQcgBkEgEAcLIAZBIGokACAHDwsQCQALNwEBfyMAQUBqIgIkACAAIAIQEyAAQdABaiIAIAJCwAAQDBogACABEBMgAkHAABAHIAJBQGskAAsLACAAIAEgAhAMGguEAwEGfyMAQcABayIEJAAgABAZIARBQGtBNkGAARAIGgNAIARBQGsiBSACaiIDIAMtAAAgASACai0AAHM6AAAgBSACQQFyIgNqIgYgBi0AACABIANqLQAAczoAACAFIAJBAnIiA2oiBiAGLQAAIAEgA2otAABzOgAAIAUgAkEDciIDaiIFIAUtAAAgASADai0AAHM6AAAgAkEEaiECIAdBBGoiB0EgRw0ACyAAIARBQGsiAkKAARAMGiAAQdABaiIFEBkgAkHcAEGAARAIGkEAIQJBACEHA0AgBEFAayIAIAJqIgMgAy0AACABIAJqLQAAczoAACAAIAJBAXIiA2oiBiAGLQAAIAEgA2otAABzOgAAIAAgAkECciIDaiIGIAYtAAAgASADai0AAHM6AAAgACACQQNyIgNqIgAgAC0AACABIANqLQAAczoAACACQQRqIQIgB0EEaiIHQSBHDQALIAUgBEFAayIAQoABEAwaIABBgAEQByAEQcAAEAcgBEHAAWokAAvVAgECfyMAQZADayIIJAAgCEEANgIEIAhBEGoiCSAGIAcQJyAIIAYpABA3AgggCEHQAGoiB0LAACAIQQRqIAkQFyAIQZABaiIGIAdBvJACKAIAEQEAGiAHQcAAEAcgBiAEIAVBwJACKAIAEQAAGiAGQYCQAkIAIAV9Qg+DQcCQAigCABEAABogBiABIAJBwJACKAIAEQAAGiAGQYCQAkIAIAJ9Qg+DQcCQAigCABEAABogCCAFNwNIIAYgCEHIAGoiBEIIQcCQAigCABEAABogCCACNwNIIAYgBEIIQcCQAigCABEAABogBiAIQTBqIgRBxJACKAIAEQEAGiAGQYACEAcgBCADEC0hBiAEQRAQBwJAIABFDQAgBgRAIABBACACpxAIGkF/IQYMAQsgACABIAIgCEEEaiAIQRBqEE1BACEGCyAIQRBqQSAQByAIQZADaiQAIAYLpwIBA38jAEGAA2siCSQAIAlBADYCBCAJQRBqIgogByAIECcgCSAHKQAQNwIIIAlBQGsiCELAACAJQQRqIgsgChAXIAlBgAFqIgcgCEG8kAIoAgARAQAaIAhBwAAQByAHIAUgBkHAkAIoAgARAAAaIAdBgJACQgAgBn1CD4NBwJACKAIAEQAAGiAAIAMgBCALIAoQTSAHIAAgBEHAkAIoAgARAAAaIAdBgJACQgAgBH1CD4NBwJACKAIAEQAAGiAJIAY3AzggByAJQThqIgBCCEHAkAIoAgARAAAaIAkgBDcDOCAHIABCCEHAkAIoAgARAAAaIAcgAUHEkAIoAgARAQAaIAdBgAIQByACBEAgAkIQNwMACyAJQRBqQSAQByAJQYADaiQAQQALygUCBX8CfkF/IQYCQCABQcEAa0FASQ0AIAVBwABLDQACfyABQf8BcSEGIAVB/wFxIQUjACIBIQkgAUGABGtBQHEiASQAAkAgAkUgA0IAUnENACAARQ0AIAZBwQBrQf8BcUG/AU0NACAEQQEgBRtFDQAgBUHBAE8NAAJ/IAUEQCAERQ0CIAFBQGtBAEGlAhAIGiABQvnC+JuRo7Pw2wA3AzggAULr+obav7X2wR83AzAgAUKf2PnZwpHagpt/NwMoIAFC0YWa7/rPlIfRADcDICABQvHt9Pilp/2npX83AxggAUKr8NP0r+68tzw3AxAgAUK7zqqm2NDrs7t/NwMIIAEgBq0gBa1CCIaEQoiS95X/zPmE6gCFNwMAIAFBgANqIgcgBWpBAEGAASAFaxAIGiAHIAQgBRALGiABQeAAaiAHQYABEAsaIAFBgAE2AuACIAdBgAEQB0GAAQwBCyABQUBrQQBBpQIQCBogAUL5wvibkaOz8NsANwM4IAFC6/qG2r+19sEfNwMwIAFCn9j52cKR2oKbfzcDKCABQtGFmu/6z5SH0QA3AyAgAULx7fT4paf9p6V/NwMYIAFCq/DT9K/uvLc8NwMQIAFCu86qptjQ67O7fzcDCCABIAatQoiS95X/zPmE6gCFNwMAQQALIQQCQCADUA0AIAFB4AFqIQogAUHgAGohBQNAIAQgBWohCEGAAiAEayIHrSILIANaBEAgCCACIAOnIgIQCxogASABKALgAiACajYC4AIMAgsgCCACIAcQCxogASABKALgAiAHajYC4AIgASABKQNAIgxCgAF8NwNAIAEgASkDSCAMQv9+Vq18NwNIIAEgBRAoIAUgCkGAARALGiABIAEoAuACQYABayIENgLgAiACIAdqIQIgAyALfSIDQgBSDQALCyABIAAgBhA1GiAJJABBAAwBCxAJAAshBgsgBgu2AQIBfwN+IwBBoAFrIgMkACABIAJCIBAYGiABIAEtAABB+AFxOgAAIAEgAS0AH0E/cUHAAHI6AB8gAyABECogACADECsgAikACCEEIAIpABAhBSACKQAAIQYgASACKQAYNwAYIAEgBTcAECABIAQ3AAggASAGNwAAIAApAAghBCAAKQAQIQUgACkAACEGIAEgACkAGDcAOCABIAU3ADAgASAENwAoIAEgBjcAICADQaABaiQAQQALBQBBv38LBQBB0AELbQEBfyMAQUBqIgIkACACIAFCIBAYGiACIAItAABB+AFxOgAAIAIgAi0AH0E/cUHAAHI6AB8gACACKQMQNwAQIAAgAikDCDcACCAAIAIpAwA3AAAgACACKQMYNwAYIAJBwAAQByACQUBrJABBAAvXFAIPfyd+IwBBgAJrIgMkAEF/IRACQCABEDcNACADQeAAaiABEEkNACMAQYAQayICJAAgAkGABWoiCiADQeAAaiIBEA0gASkCCCERIAEpAhAhEiABKQIYIRMgASkCACEUIAIgASkCIDcD4AIgAiATNwPYAiACIBI3A9ACIAIgETcDyAIgAiAUNwPAAiABKQIoIREgASkCMCESIAEpAjghEyABQUBrKQIAIRQgAiABKQJINwOIAyACIBQ3A4ADIAIgEzcD+AIgAiASNwPwAiACIBE3A+gCIAEpAlAhESABKQJYIRIgASkCYCETIAEpAmghFCACIAEpAnA3A7ADIAIgFDcDqAMgAiATNwOgAyACIBI3A5gDIAIgETcDkAMgAkHgA2oiASACQcACaiIHEBUgAkGgAWoiCCABIAJB2ARqIgUQBiACQcgBaiACQYgEaiIGIAJBsARqIgQQBiACQfABaiAEIAUQBiACQZgCaiABIAYQBiABIAggChAOIAcgASAFEAYgAkHoAmoiCiAGIAQQBiACQZADaiILIAQgBRAGIAJBuANqIgwgASAGEAYgAkGgBmoiCSAHEA0gASAIIAkQDiAHIAEgBRAGIAogBiAEEAYgCyAEIAUQBiAMIAEgBhAGIAJBwAdqIgkgBxANIAEgCCAJEA4gByABIAUQBiAKIAYgBBAGIAsgBCAFEAYgDCABIAYQBiACQeAIaiIJIAcQDSABIAggCRAOIAcgASAFEAYgCiAGIAQQBiALIAQgBRAGIAwgASAGEAYgAkGACmoiCSAHEA0gASAIIAkQDiAHIAEgBRAGIAogBiAEEAYgCyAEIAUQBiAMIAEgBhAGIAJBoAtqIgkgBxANIAEgCCAJEA4gByABIAUQBiAKIAYgBBAGIAsgBCAFEAYgDCABIAYQBiACQcAMaiIJIAcQDSABIAggCRAOIAcgASAFEAYgCiAGIAQQBiALIAQgBRAGIAwgASAGEAYgAkHgDWogBxANIAJCADcDICACQgA3AxggAkIANwMQIAJCADcDCCACQgA3AiwgAkIANwI0IAJCADcCPCACQgA3AkQgAkKAgICAEDcCTCACQgA3AwAgAkEBNgIoIAJB1ABqQQBBzAAQCBogAkH4AGohCSACQdAAaiEOIAJBKGohD0H8ASEBA0AgAiACKQMgNwOoDyACIAIpAxg3A6APIAIgAikDEDcDmA8gAiACKQMINwOQDyACIAIpAwA3A4gPIAIgAikDSDcD0A8gAiACKQNANwPIDyACIAIpAzg3A8APIAIgAikDMDcDuA8gAiACKQMoNwOwDyACIAIpA1A3A9gPIAIgAikDWDcD4A8gAiACKQNgNwPoDyACIAIpA2g3A/APIAIgAikDcDcD+A8gASIHQZCFAmosAAAhASACQeADaiACQYgPahAVAkAgAUEASgRAIAJBwAJqIg0gAkHgA2oiCCAFEAYgCiAGIAQQBiALIAQgBRAGIAwgCCAGEAYgCCANIAJBgAVqIAFB/gFxQQF2QaABbGoQDgwBCyABQQBODQAgAkHAAmoiDSACQeADaiIIIAUQBiAKIAYgBBAGIAsgBCAFEAYgDCAIIAYQBiAIIA0gAkGABWpBACABa0H+AXFBAXZBoAFsahBICyACIAJB4ANqIgEgBRAGIA8gBiAEEAYgDiAEIAUQBiAJIAEgBhAGIAdBAWshASAHDQALIAJBgAVqIgEgAhASIAFBIBAfIQEgAkGAEGokACABRQ0AIANBASADKAKIASIEazYCAEEAIRAgA0EAIAMoAqwBIgFrNgIkIANBACADKAKoASIKazYCICADQQAgAygCpAEiB2s2AhwgA0EAIAMoAqABIgtrNgIYIANBACADKAKcASICazYCFCADQQAgAygCmAEiDGs2AhAgA0EAIAMoApQBIgVrNgIMIANBACADKAKQASIIazYCCCADQQAgAygCjAEiBms2AgQgAyADECwgAyADKAIEIgmsIhkgAkEBdKwiIn4gAzQCACIRIAusIhJ+fCADKAIIIgusIhsgDKwiE358IAMoAgwiDKwiHiAFQQF0rCIjfnwgAygCECIOrCIfIAisIhR+fCADKAIUIgisIiQgBkEBdKwiJX58IAMoAhgiD6wiLiAEQQFqrCIXfnwgAygCHCIEQRNsrCIaIAFBAXSsIiZ+fCADKAIgIg1BE2ysIhUgCqwiGH58IAMoAiQiCkETbKwiFiAHQQF0rCInfnwgEyAZfiARIAKsIih+fCAbIAWsIil+fCAUIB5+fCAfIAasIip+fCAXICR+fCAPQRNsrCIcIAGsIit+fCAYIBp+fCAVIAesIix+fCASIBZ+fCAZICN+IBEgE358IBQgG358IB4gJX58IBcgH358IAhBE2ysIi0gJn58IBggHH58IBogJ358IBIgFX58IBYgIn58IjBCgICAEHwiMUIah3wiMkKAgIAIfCIzQhmHfCIgICBCgICAEHwiIUKAgIDgD4N9PgJIIAMgGSAlfiARIBR+fCAXIBt+fCAMQRNsrCIdICZ+fCAOQRNsrCIgIBh+fCAnIC1+fCASIBx+fCAaICJ+fCATIBV+fCAWICN+fCAXIBl+IBEgKn58IAtBE2ysIi8gK358IBggHX58ICAgLH58IBIgLX58IBwgKH58IBMgGn58IBUgKX58IBQgFn58IAlBE2ysICZ+IBEgF358IBggL358IB0gJ358IBIgIH58ICIgLX58IBMgHH58IBogI358IBQgFX58IBYgJX58Ii9CgICAEHwiNEIah3wiNUKAgIAIfCI2QhmHfCIdIB1CgICAEHwiN0KAgIDgD4N9PgI4IAMgEiAZfiARICx+fCAbICh+fCATIB5+fCAfICl+fCAUICR+fCAqIC5+fCAErCIdIBd+fCAVICt+fCAWIBh+fCAhQhqHfCIhICFCgICACHwiIUKAgIDwD4N9PgJMIAMgFCAZfiARICl+fCAbICp+fCAXIB5+fCAgICt+fCAYIC1+fCAcICx+fCASIBp+fCAVICh+fCATIBZ+fCA3QhqHfCIVIBVCgICACHwiFUKAgIDwD4N9PgI8IAMgGSAnfiARIBh+fCASIBt+fCAeICJ+fCATIB9+fCAjICR+fCAUIC5+fCAdICV+fCANrCIaIBd+fCAWICZ+fCAhQhmHfCIWIBZCgICAEHwiFkKAgIDgD4N9PgJQIAMgMiAzQoCAgPAPg30gMCAxQoCAgGCDfSAVQhmHfCIVQoCAgBB8IhxCGoh8PgJEIAMgFSAcQoCAgOAPg30+AkAgAyAYIBl+IBEgK358IBsgLH58IBIgHn58IB8gKH58IBMgJH58ICkgLn58IBQgHX58IBogKn58IAqsIBd+fCAWQhqHfCIRIBFCgICACHwiEUKAgIDwD4N9PgJUIAMgNSA2QoCAgPAPg30gLyA0QoCAgGCDfSARQhmHQhN+fCIRQoCAgBB8IhJCGoh8PgI0IAMgESASQoCAgOAPg30+AjAgACADQTBqEBILIANBgAJqJAAgEAsEAEEMCwQAQQILBABBbgsEAEERCwQAQTQLnwECAX8BfiMAQTBrIgEkACABIAApABg3AxggASAAKQAQNwMQIAEgACkAADcDACABIAApAAg3AwggASAAKQAkNwMgIAEgAUIoIABBIGpBACAAQbCQAigCABEIABogACABKQMYNwAYIAAgASkDEDcAECAAIAEpAwg3AAggACABKQMANwAAIAEpAyAhAiAAQQE2ACAgACACNwAkIAFBMGokAAsqAQF+IAAgASACECcgAEEBNgAgIAEpABAhAyAAQgA3ACwgACADNwAkQQALMAEBfiABQRgQFiAAIAEgAhAnIABBATYAICABKQAQIQMgAEIANwAsIAAgAzcAJEEACyQAQeSaAigCAAR/QQEFEExB0JoCQRAQFkHkmgJBATYCAEEACwvqBAEFfyMAQfAAayIGJAAgAkIAUgRAIAYgBSkAGDcDGCAGIAUpABA3AxAgBiAFKQAANwMAIAYgBSkACDcDCCAGIAMpAAA3A2AgBiAEPABoIAYgBEI4iDwAbyAGIARCMIg8AG4gBiAEQiiIPABtIAYgBEIgiDwAbCAGIARCGIg8AGsgBiAEQhCIPABqIAYgBEIIiDwAaQJAIAJCwABaBEADQEEAIQUgBkEgaiAGQeAAaiAGECkDQCAAIAVqIAZBIGoiByAFai0AACABIAVqLQAAczoAACAAIAVBAXIiA2ogAyAHai0AACABIANqLQAAczoAACAFQQJqIgVBwABHDQALIAYgBi0AaEEBaiIDOgBoIAYgBi0AaSADQQh2aiIDOgBpIAYgBi0AaiADQQh2aiIDOgBqIAYgBi0AayADQQh2aiIDOgBrIAYgBi0AbCADQQh2aiIDOgBsIAYgBi0AbSADQQh2aiIDOgBtIAYgBi0AbiADQQh2aiIDOgBuIAYgBi0AbyADQQh2ajoAbyABQUBrIQEgAEFAayEAIAJCQHwiAkI/Vg0ACyACUA0BC0EAIQUgBkEgaiAGQeAAaiAGECkgAqciA0EBcSEIIANBAUcEQCADQX5xIQlBACEDA0AgACAFaiAGQSBqIgogBWotAAAgASAFai0AAHM6AAAgACAFQQFyIgdqIAcgCmotAAAgASAHai0AAHM6AAAgBUECaiEFIANBAmoiAyAJRw0ACwsgCEUNACAAIAVqIAZBIGogBWotAAAgASAFai0AAHM6AAALIAZBIGpBwAAQByAGQSAQBwsgBkHwAGokAEEAC4IEAgZ/AX4jAEHwAGsiBCQAIAFCAFIEQCAEIAMpABg3AxggBCADKQAQNwMQIAQgAykAADcDACAEIAMpAAg3AwggAikAACEKIARCADcDaCAEIAo3A2ACQCABQsAAWgRAA0AgACAEQeAAaiAEECkgBCAELQBoQQFqIgI6AGggBCAELQBpIAJBCHZqIgI6AGkgBCAELQBqIAJBCHZqIgI6AGogBCAELQBrIAJBCHZqIgI6AGsgBCAELQBsIAJBCHZqIgI6AGwgBCAELQBtIAJBCHZqIgI6AG0gBCAELQBuIAJBCHZqIgI6AG4gBCAELQBvIAJBCHZqOgBvIABBQGshACABQkB8IgFCP1YNAAsgAVANAQtBACECIARBIGogBEHgAGogBBApIAGnIgVBA3EhB0EAIQMgBUEBa0EDTwRAIAVBfHEhCEEAIQUDQCAAIANqIARBIGoiCSADai0AADoAACAAIANBAXIiBmogBiAJai0AADoAACAAIANBAnIiBmogBEEgaiAGai0AADoAACAAIANBA3IiBmogBEEgaiAGai0AADoAACADQQRqIQMgBUEEaiIFIAhHDQALCyAHRQ0AA0AgACADaiAEQSBqIANqLQAAOgAAIANBAWohAyACQQFqIgIgB0cNAAsLIARBIGpBwAAQByAEQSAQBwsgBEHwAGokAEEAC4YGARR/IwBBsAJrIgIkACAAIAEtAAA6AAAgACABLQABOgABIAAgAS0AAjoAAiAAIAEtAAM6AAMgACABLQAEOgAEIAAgAS0ABToABSAAIAEtAAY6AAYgACABLQAHOgAHIAAgAS0ACDoACCAAIAEtAAk6AAkgACABLQAKOgAKIAAgAS0ACzoACyAAIAEtAAw6AAwgACABLQANOgANIAAgAS0ADjoADiAAIAEtAA86AA8gACABLQAQOgAQIAAgAS0AEToAESAAIAEtABI6ABIgACABLQATOgATIAAgAS0AFDoAFCAAIAEtABU6ABUgACABLQAWOgAWIAAgAS0AFzoAFyAAIAEtABg6ABggACABLQAZOgAZIAAgAS0AGjoAGiAAIAEtABs6ABsgACABLQAcOgAcIAAgAS0AHToAHSAAIAEtAB46AB4gAS0AHyEBIAAgAC0AAEH4AXE6AAAgACABQT9xQcAAcjoAHyACQTBqIAAQKiACKAKEASEBIAIoAlwhAyACKAKIASEEIAIoAmAhBSACKAKMASEGIAIoAmQhByACKAKQASEIIAIoAmghCSACKAKUASEKIAIoAmwhCyACKAKYASEMIAIoAnAhDSACKAKcASEOIAIoAnQhDyACKAKgASEQIAIoAnghESACKAKAASESIAIoAlghEyACIAIoAnwiFCACKAKkASIVajYCpAIgAiAQIBFqNgKgAiACIA4gD2o2ApwCIAIgDCANajYCmAIgAiAKIAtqNgKUAiACIAggCWo2ApACIAIgBiAHajYCjAIgAiAEIAVqNgKIAiACIAEgA2o2AoQCIAIgEiATajYCgAIgAiAVIBRrNgL0ASACIBAgEWs2AvABIAIgDiAPazYC7AEgAiAMIA1rNgLoASACIAogC2s2AuQBIAIgCCAJazYC4AEgAiAGIAdrNgLcASACIAQgBWs2AtgBIAIgASADazYC1AEgAiASIBNrNgLQASACQdABaiIBIAEQLCACIAJBgAJqIAEQBiAAIAIQEiACQbACaiQAQQAL+RwCPX8MfiMAQfACayIDJAADQCACIAZqLQAAIgQgBkGQhwJqIgktAABzIAdyIQcgBCAJLQDAAXMgBXIhBSAEIAktAKABcyAMciEMIAQgCS0AgAFzIAhyIQggBCAJLQBgcyANciENIAQgCUFAay0AAHMgC3IhCyAEIAktACBzIApyIQogBkEBaiIGQR9HDQALQX8hCSACLQAfQf8AcSIEIApyQf8BcUEBayAEIAdyQf8BcUEBa3IgBCALckH/AXFBAWtyIARB1wBzIA1yQf8BcUEBa3IgBEH/AHMiBCAIckH/AXFBAWtyIAQgDHJB/wFxQQFrciAEIAVyQf8BcUEBa3JBgAJxRQRAIAMgASkAGDcD6AIgAyABKQAQNwPgAiADIAEpAAAiQjcD0AIgAyABKQAINwPYAiADIEKnQfgBcToA0AIgAyADLQDvAkE/cUHAAHI6AO8CIANBoAJqIAIQSiADQgA3AoQCIANCADcCjAIgA0EANgKUAiADQgA3A9ABIANCADcD2AEgA0IANwPgASADQgA3AvQBIANBATYC8AEgA0IANwL8ASADQgA3A8ABIANCADcDyAEgAyADKQO4AjcDqAEgAyADKQOwAjcDoAEgAyADKQOoAjcDmAEgAyADKQOgAjcDkAEgAyADKQPAAjcDsAEgA0IANwJ0IANCADcCfCADQQA2AoQBIANCADcCZCADQQE2AmAgA0IANwJsQf4BIQJBACEEA0AgAygClAIhCSADKAK0ASEGIAMoAmAhByADKALAASEKIAMoApABIQsgAygC8AEhDSADKAJkIQggAygCxAEhDCADKAKUASEFIAMoAvQBIRAgAygCaCEOIAMoAsgBIREgAygCmAEhEiADKAL4ASETIAMoAmwhDyADKALMASEUIAMoApwBIRUgAygC/AEhFiADKAJwIRggAygC0AEhHCADKAKgASEdIAMoAoACIR4gAygCdCEaIAMoAtQBIR8gAygCpAEhICADKAKEAiEhIAMoAnghGSADKALYASEiIAMoAqgBISMgAygCiAIhJCADKAJ8IRsgAygC3AEhJSADKAKsASEmIAMoAowCIScgAygCgAEhFyADKALgASEoIAMoArABISkgAygCkAIhLCADQQAgBCADQdACaiACIgFBA3ZqLQAAIAJBB3F2QQFxIgRzayICIAMoAoQBIiogAygC5AEiK3NxIi0gKnMiKjYChAEgAyAGIAYgCXMgAnEiLnMiLyAqazYCVCADIBcgFyAocyACcSIwcyIGNgKAASADICkgKSAscyACcSIXcyIpIAZrNgJQIAMgGyAbICVzIAJxIjFzIhs2AnwgAyAmICYgJ3MgAnEiMnMiJiAbazYCTCADIBkgGSAicyACcSIzcyIZNgJ4IAMgIyAjICRzIAJxIjRzIiMgGWs2AkggAyAaIBogH3MgAnEiNXMiGjYCdCADICAgICAhcyACcSI2cyIgIBprNgJEIAMgGCAYIBxzIAJxIjdzIhg2AnAgAyAdIB0gHnMgAnEiOHMiHSAYazYCQCADIA8gDyAUcyACcSI5cyIPNgJsIAMgFSAVIBZzIAJxIjpzIhUgD2s2AjwgAyAOIA4gEXMgAnEiO3MiDjYCaCADIBIgEiATcyACcSI8cyISIA5rNgI4IAMgCCAIIAxzIAJxIj1zIgg2AmQgAyAFIAUgEHMgAnEiPnMiBSAIazYCNCADIAcgByAKcyACcSI/cyIHNgJgIAMgCyALIA1zIAJxIgJzIgsgB2s2AjAgAyAJIC5zIgkgKyAtcyIrazYCJCADIBcgLHMiFyAoIDBzIihrNgIgIAMgJyAycyInICUgMXMiJWs2AhwgAyAkIDRzIiQgIiAzcyIiazYCGCADICEgNnMiISAfIDVzIh9rNgIUIAMgHiA4cyIeIBwgN3MiHGs2AhAgAyAWIDpzIhYgFCA5cyIUazYCDCADIBMgPHMiEyARIDtzIhFrNgIIIAMgECA+cyIQIAwgPXMiDGs2AgQgAyACIA1zIgIgCiA/cyIKazYCACADIAkgK2o2ApQCIAMgFyAoajYCkAIgAyAlICdqNgKMAiADICIgJGo2AogCIAMgHyAhajYChAIgAyAcIB5qNgKAAiADIBEgE2o2AvgBIAMgDCAQajYC9AEgAyACIApqNgLwASADIBQgFmo2AvwBIAMgKiAvajYC5AEgAyAGIClqNgLgASADIBsgJmo2AtwBIAMgGSAjajYC2AEgAyAaICBqNgLUASADIBggHWo2AtABIAMgDyAVajYCzAEgAyAOIBJqNgLIASADIAUgCGo2AsQBIAMgByALajYCwAEgA0HgAGoiGyADQTBqIhogA0HwAWoiGRAGIANBwAFqIhcgFyADEAYgGiADEAUgAyAZEAUgAygCwAEhAiADKAJgIQkgAygCxAEhBiADKAJkIQcgAygCyAEhCiADKAJoIQsgAygCzAEhDSADKAJsIQggAygC0AEhDCADKAJwIQUgAygC1AEhECADKAJ0IQ4gAygC2AEhESADKAJ4IRIgAygC3AEhEyADKAJ8IQ8gAygC4AEhFCADKAKAASEVIAMgAygC5AEiFiADKAKEASIYajYCtAEgAyAUIBVqNgKwASADIA8gE2o2AqwBIAMgESASajYCqAEgAyAOIBBqNgKkASADIAUgDGo2AqABIAMgCCANajYCnAEgAyAKIAtqNgKYASADIAYgB2o2ApQBIAMgAiAJajYCkAEgAyAYIBZrNgLkASADIBUgFGs2AuABIAMgDyATazYC3AEgAyASIBFrNgLYASADIA4gEGs2AtQBIAMgBSAMazYC0AEgAyAIIA1rNgLMASADIAsgCms2AsgBIAMgByAGazYCxAEgAyAJIAJrNgLAASAZIAMgGhAGIAMoAjQhAiADKAIEIQUgAygCOCEJIAMoAgghECADKAJAIQYgAygCECEOIAMoAjwhByADKAIMIREgAygCSCEKIAMoAhghEiADKAJEIQsgAygCFCETIAMoAlAhDSADKAIgIQ8gAygCTCEIIAMoAhwhFCADKAJUIQwgAygCJCEVIAMgAygCACADKAIwIhZrIhg2AgAgAyAVIAxrIhU2AiQgAyAUIAhrIhQ2AhwgAyAPIA1rIg82AiAgAyATIAtrIhM2AhQgAyASIAprIhI2AhggAyARIAdrIhE2AgwgAyAOIAZrIg42AhAgAyAQIAlrIhA2AgggAyAFIAJrIgU2AgQgFyAXEAUgAyAVrELCtgd+IkJCgICACHwiRkIZh0ITfiAYrELCtgd+fCJAIEBCgICAEHwiQEKAgIDgD4N9pyIVNgJgIAMgBaxCwrYHfiJBIEFCgICACHwiQUKAgIDwD4N9IEBCGoh8pyIFNgJkIAMgEKxCwrYHfiBBQhmHfCJAIEBCgICAEHwiQEKAgIDgD4N9pyIQNgJoIAMgDqxCwrYHfiARrELCtgd+IkFCgICACHwiR0IZh3wiQyBDQoCAgBB8IkNCgICA4A+DfaciDjYCcCADIBKsQsK2B34gE6xCwrYHfiJIQoCAgAh8IklCGYd8IkQgREKAgIAQfCJEQoCAgOAPg32nIhE2AnggAyAPrELCtgd+IBSsQsK2B34iSkKAgIAIfCJLQhmHfCJFIEVCgICAEHwiRUKAgIDgD4N9pyISNgKAASADIEBCGoggQXwgR0KAgIDwD4N9pyITNgJsIAMgQ0IaiCBIfCBJQoCAgPAPg32nIg82AnQgAyBEQhqIIEp8IEtCgICA8A+DfaciFDYCfCADIEVCGoggQnwgRkKAgIDwD4N9pyIYNgKEASADQZABaiIZIBkQBSADIAwgGGo2AlQgAyANIBJqNgJQIAMgCCAUajYCTCADIAogEWo2AkggAyALIA9qNgJEIAMgBiAOajYCQCADIAcgE2o2AjwgAyAJIBBqNgI4IAMgAiAFajYCNCADIBUgFmo2AjAgAUEBayECIBsgA0GgAmogFxAGIBcgAyAaEAYgAQ0ACyADKAKQASEQIAMoAvABIQIgAygClAEhDiADKAL0ASEGIAMoApgBIREgAygC+AEhByADKAKcASESIAMoAvwBIQogAygCoAEhEyADKAKAAiELIAMoAqQBIQ8gAygChAIhDSADKAKoASEUIAMoAogCIQggAygCrAEhFSADKAKMAiEMIAMoArABIRYgAygCkAIhBSADQQAgBGsiASADKAKUAiIEIAMoArQBc3EgBHM2ApQCIAMgBSAFIBZzIAFxczYCkAIgAyAMIAwgFXMgAXFzNgKMAiADIAggCCAUcyABcXM2AogCIAMgDSANIA9zIAFxczYChAIgAyALIAsgE3MgAXFzNgKAAiADIAogCiAScyABcXM2AvwBIAMgByAHIBFzIAFxczYC+AEgAyAGIAYgDnMgAXFzNgL0ASADIAIgAiAQcyABcXM2AvABIAMoAsABIQIgAygCYCEFIAMoAsQBIQQgAygCZCEQIAMoAsgBIQYgAygCaCEOIAMoAswBIQcgAygCbCERIAMoAtABIQogAygCcCESIAMoAtQBIQsgAygCdCETIAMoAtgBIQ0gAygCeCEPIAMoAtwBIQggAygCfCEUIAMoAuABIQwgAygCgAEhFSADIAMoAuQBIhYgAygChAFzIAFxIBZzNgLkASADIAwgDCAVcyABcXM2AuABIAMgCCAIIBRzIAFxczYC3AEgAyANIA0gD3MgAXFzNgLYASADIAsgCyATcyABcXM2AtQBIAMgCiAKIBJzIAFxczYC0AEgAyAHIAcgEXMgAXFzNgLMASADIAYgBiAOcyABcXM2AsgBIAMgBCAEIBBzIAFxczYCxAEgAyACIAIgBXMgAXFzNgLAASADQcABaiIBIAEQLCADQfABaiICIAIgARAGIAAgAhASIANB0AJqQSAQB0EAIQkLIANB8AJqJAAgCQuJDAEHfwJAIABFDQAgAEEIayICIABBBGsoAgAiAUF4cSIAaiEFAkAgAUEBcQ0AIAFBA3FFDQEgAiACKAIAIgFrIgJB5JYCKAIASQ0BIAAgAWohAEHolgIoAgAgAkcEQCABQf8BTQRAIAIoAggiBCABQQN2IgFBA3RB/JYCakYaIAQgAigCDCIDRgRAQdSWAkHUlgIoAgBBfiABd3E2AgAMAwsgBCADNgIMIAMgBDYCCAwCCyACKAIYIQYCQCACIAIoAgwiAUcEQCACKAIIIgMgATYCDCABIAM2AggMAQsCQCACQRRqIgQoAgAiAw0AIAJBEGoiBCgCACIDDQBBACEBDAELA0AgBCEHIAMiAUEUaiIEKAIAIgMNACABQRBqIQQgASgCECIDDQALIAdBADYCAAsgBkUNAQJAIAIoAhwiBEECdEGEmQJqIgMoAgAgAkYEQCADIAE2AgAgAQ0BQdiWAkHYlgIoAgBBfiAEd3E2AgAMAwsgBkEQQRQgBigCECACRhtqIAE2AgAgAUUNAgsgASAGNgIYIAIoAhAiAwRAIAEgAzYCECADIAE2AhgLIAIoAhQiA0UNASABIAM2AhQgAyABNgIYDAELIAUoAgQiAUEDcUEDRw0AQdyWAiAANgIAIAUgAUF+cTYCBCACIABBAXI2AgQgACACaiAANgIADwsgAiAFTw0AIAUoAgQiAUEBcUUNAAJAIAFBAnFFBEBB7JYCKAIAIAVGBEBB7JYCIAI2AgBB4JYCQeCWAigCACAAaiIANgIAIAIgAEEBcjYCBCACQeiWAigCAEcNA0HclgJBADYCAEHolgJBADYCAA8LQeiWAigCACAFRgRAQeiWAiACNgIAQdyWAkHclgIoAgAgAGoiADYCACACIABBAXI2AgQgACACaiAANgIADwsgAUF4cSAAaiEAAkAgAUH/AU0EQCAFKAIIIgQgAUEDdiIBQQN0QfyWAmpGGiAEIAUoAgwiA0YEQEHUlgJB1JYCKAIAQX4gAXdxNgIADAILIAQgAzYCDCADIAQ2AggMAQsgBSgCGCEGAkAgBSAFKAIMIgFHBEAgBSgCCCIDQeSWAigCAEkaIAMgATYCDCABIAM2AggMAQsCQCAFQRRqIgQoAgAiAw0AIAVBEGoiBCgCACIDDQBBACEBDAELA0AgBCEHIAMiAUEUaiIEKAIAIgMNACABQRBqIQQgASgCECIDDQALIAdBADYCAAsgBkUNAAJAIAUoAhwiBEECdEGEmQJqIgMoAgAgBUYEQCADIAE2AgAgAQ0BQdiWAkHYlgIoAgBBfiAEd3E2AgAMAgsgBkEQQRQgBigCECAFRhtqIAE2AgAgAUUNAQsgASAGNgIYIAUoAhAiAwRAIAEgAzYCECADIAE2AhgLIAUoAhQiA0UNACABIAM2AhQgAyABNgIYCyACIABBAXI2AgQgACACaiAANgIAIAJB6JYCKAIARw0BQdyWAiAANgIADwsgBSABQX5xNgIEIAIgAEEBcjYCBCAAIAJqIAA2AgALIABB/wFNBEAgAEF4cUH8lgJqIQECf0HUlgIoAgAiA0EBIABBA3Z0IgBxRQRAQdSWAiAAIANyNgIAIAEMAQsgASgCCAshACABIAI2AgggACACNgIMIAIgATYCDCACIAA2AggPC0EfIQQgAEH///8HTQRAIABBJiAAQQh2ZyIBa3ZBAXEgAUEBdGtBPmohBAsgAiAENgIcIAJCADcCECAEQQJ0QYSZAmohBwJAAkACQEHYlgIoAgAiA0EBIAR0IgFxRQRAQdiWAiABIANyNgIAIAcgAjYCACACIAc2AhgMAQsgAEEZIARBAXZrQQAgBEEfRxt0IQQgBygCACEBA0AgASIDKAIEQXhxIABGDQIgBEEddiEBIARBAXQhBCADIAFBBHFqIgdBEGooAgAiAQ0ACyAHIAI2AhAgAiADNgIYCyACIAI2AgwgAiACNgIIDAELIAMoAggiACACNgIMIAMgAjYCCCACQQA2AhggAiADNgIMIAIgADYCCAtB9JYCQfSWAigCAEEBayIAQX8gABs2AgALC60pAQt/IwBBEGsiCyQAAkACQAJAAkACQAJAAkACQAJAIABB9AFNBEBB1JYCKAIAIgZBECAAQQtqQXhxIABBC0kbIgVBA3YiAHYiAUEDcQRAAkAgAUF/c0EBcSAAaiICQQN0IgFB/JYCaiIAIAFBhJcCaigCACIBKAIIIgRGBEBB1JYCIAZBfiACd3E2AgAMAQsgBCAANgIMIAAgBDYCCAsgAUEIaiEAIAEgAkEDdCICQQNyNgIEIAEgAmoiASABKAIEQQFyNgIEDAoLIAVB3JYCKAIAIgdNDQEgAQRAAkBBAiAAdCICQQAgAmtyIAEgAHRxIgBBACAAa3FoIgFBA3QiAEH8lgJqIgIgAEGElwJqKAIAIgAoAggiBEYEQEHUlgIgBkF+IAF3cSIGNgIADAELIAQgAjYCDCACIAQ2AggLIAAgBUEDcjYCBCAAIAVqIgggAUEDdCIBIAVrIgRBAXI2AgQgACABaiAENgIAIAcEQCAHQXhxQfyWAmohAUHolgIoAgAhAgJ/IAZBASAHQQN2dCIDcUUEQEHUlgIgAyAGcjYCACABDAELIAEoAggLIQMgASACNgIIIAMgAjYCDCACIAE2AgwgAiADNgIICyAAQQhqIQBB6JYCIAg2AgBB3JYCIAQ2AgAMCgtB2JYCKAIAIgpFDQEgCkEAIAprcWhBAnRBhJkCaigCACICKAIEQXhxIAVrIQMgAiEBA0ACQCABKAIQIgBFBEAgASgCFCIARQ0BCyAAKAIEQXhxIAVrIgEgAyABIANJIgEbIQMgACACIAEbIQIgACEBDAELCyACKAIYIQkgAiACKAIMIgRHBEAgAigCCCIAQeSWAigCAEkaIAAgBDYCDCAEIAA2AggMCQsgAkEUaiIBKAIAIgBFBEAgAigCECIARQ0DIAJBEGohAQsDQCABIQggACIEQRRqIgEoAgAiAA0AIARBEGohASAEKAIQIgANAAsgCEEANgIADAgLQX8hBSAAQb9/Sw0AIABBC2oiAEF4cSEFQdiWAigCACIIRQ0AQQAgBWshAwJAAkACQAJ/QQAgBUGAAkkNABpBHyAFQf///wdLDQAaIAVBJiAAQQh2ZyIAa3ZBAXEgAEEBdGtBPmoLIgdBAnRBhJkCaigCACIBRQRAQQAhAAwBC0EAIQAgBUEZIAdBAXZrQQAgB0EfRxt0IQIDQAJAIAEoAgRBeHEgBWsiBiADTw0AIAEhBCAGIgMNAEEAIQMgASEADAMLIAAgASgCFCIGIAYgASACQR12QQRxaigCECIBRhsgACAGGyEAIAJBAXQhAiABDQALCyAAIARyRQRAQQAhBEECIAd0IgBBACAAa3IgCHEiAEUNAyAAQQAgAGtxaEECdEGEmQJqKAIAIQALIABFDQELA0AgACgCBEF4cSAFayICIANJIQEgAiADIAEbIQMgACAEIAEbIQQgACgCECIBBH8gAQUgACgCFAsiAA0ACwsgBEUNACADQdyWAigCACAFa08NACAEKAIYIQcgBCAEKAIMIgJHBEAgBCgCCCIAQeSWAigCAEkaIAAgAjYCDCACIAA2AggMBwsgBEEUaiIBKAIAIgBFBEAgBCgCECIARQ0DIARBEGohAQsDQCABIQYgACICQRRqIgEoAgAiAA0AIAJBEGohASACKAIQIgANAAsgBkEANgIADAYLIAVB3JYCKAIAIgRNBEBB6JYCKAIAIQACQCAEIAVrIgFBEE8EQCAAIAVqIgIgAUEBcjYCBCAAIARqIAE2AgAgACAFQQNyNgIEDAELIAAgBEEDcjYCBCAAIARqIgEgASgCBEEBcjYCBEEAIQJBACEBC0HclgIgATYCAEHolgIgAjYCACAAQQhqIQAMCAsgBUHglgIoAgAiAkkEQEHglgIgAiAFayIBNgIAQeyWAkHslgIoAgAiACAFaiICNgIAIAIgAUEBcjYCBCAAIAVBA3I2AgQgAEEIaiEADAgLQQAhACAFQS9qIgMCf0GsmgIoAgAEQEG0mgIoAgAMAQtBuJoCQn83AgBBsJoCQoCggICAgAQ3AgBBrJoCIAtBDGpBcHFB2KrVqgVzNgIAQcCaAkEANgIAQZCaAkEANgIAQYAgCyIBaiIGQQAgAWsiCHEiASAFTQ0HQYyaAigCACIEBEBBhJoCKAIAIgcgAWoiCSAHTQ0IIAQgCUkNCAsCQEGQmgItAABBBHFFBEACQAJAAkACQEHslgIoAgAiBARAQZSaAiEAA0AgBCAAKAIAIgdPBEAgByAAKAIEaiAESw0DCyAAKAIIIgANAAsLQQAQHCICQX9GDQMgASEGQbCaAigCACIAQQFrIgQgAnEEQCABIAJrIAIgBGpBACAAa3FqIQYLIAUgBk8NA0GMmgIoAgAiAARAQYSaAigCACIEIAZqIgggBE0NBCAAIAhJDQQLIAYQHCIAIAJHDQEMBQsgBiACayAIcSIGEBwiAiAAKAIAIAAoAgRqRg0BIAIhAAsgAEF/Rg0BIAYgBUEwak8EQCAAIQIMBAtBtJoCKAIAIgIgAyAGa2pBACACa3EiAhAcQX9GDQEgAiAGaiEGIAAhAgwDCyACQX9HDQILQZCaAkGQmgIoAgBBBHI2AgALIAEQHCECQQAQHCEAIAJBf0YNBSAAQX9GDQUgACACTQ0FIAAgAmsiBiAFQShqTQ0FC0GEmgJBhJoCKAIAIAZqIgA2AgBBiJoCKAIAIABJBEBBiJoCIAA2AgALAkBB7JYCKAIAIgMEQEGUmgIhAANAIAIgACgCACIBIAAoAgQiBGpGDQIgACgCCCIADQALDAQLQeSWAigCACIAQQAgACACTRtFBEBB5JYCIAI2AgALQQAhAEGYmgIgBjYCAEGUmgIgAjYCAEH0lgJBfzYCAEH4lgJBrJoCKAIANgIAQaCaAkEANgIAA0AgAEEDdCIBQYSXAmogAUH8lgJqIgQ2AgAgAUGIlwJqIAQ2AgAgAEEBaiIAQSBHDQALQeCWAiAGQShrIgBBeCACa0EHcUEAIAJBCGpBB3EbIgFrIgQ2AgBB7JYCIAEgAmoiATYCACABIARBAXI2AgQgACACakEoNgIEQfCWAkG8mgIoAgA2AgAMBAsgAC0ADEEIcQ0CIAEgA0sNAiACIANNDQIgACAEIAZqNgIEQeyWAiADQXggA2tBB3FBACADQQhqQQdxGyIAaiIBNgIAQeCWAkHglgIoAgAgBmoiAiAAayIANgIAIAEgAEEBcjYCBCACIANqQSg2AgRB8JYCQbyaAigCADYCAAwDC0EAIQQMBQtBACECDAMLQeSWAigCACACSwRAQeSWAiACNgIACyACIAZqIQFBlJoCIQACQAJAAkACQAJAAkADQCABIAAoAgBHBEAgACgCCCIADQEMAgsLIAAtAAxBCHFFDQELQZSaAiEAA0AgAyAAKAIAIgFPBEAgASAAKAIEaiIEIANLDQMLIAAoAgghAAwACwALIAAgAjYCACAAIAAoAgQgBmo2AgQgAkF4IAJrQQdxQQAgAkEIakEHcRtqIgcgBUEDcjYCBCABQXggAWtBB3FBACABQQhqQQdxG2oiBiAFIAdqIgVrIQAgAyAGRgRAQeyWAiAFNgIAQeCWAkHglgIoAgAgAGoiADYCACAFIABBAXI2AgQMAwtB6JYCKAIAIAZGBEBB6JYCIAU2AgBB3JYCQdyWAigCACAAaiIANgIAIAUgAEEBcjYCBCAAIAVqIAA2AgAMAwsgBigCBCIDQQNxQQFGBEAgA0F4cSEJAkAgA0H/AU0EQCAGKAIIIgEgA0EDdiIEQQN0QfyWAmpGGiABIAYoAgwiAkYEQEHUlgJB1JYCKAIAQX4gBHdxNgIADAILIAEgAjYCDCACIAE2AggMAQsgBigCGCEIAkAgBiAGKAIMIgJHBEAgBigCCCIBIAI2AgwgAiABNgIIDAELAkAgBkEUaiIDKAIAIgENACAGQRBqIgMoAgAiAQ0AQQAhAgwBCwNAIAMhBCABIgJBFGoiAygCACIBDQAgAkEQaiEDIAIoAhAiAQ0ACyAEQQA2AgALIAhFDQACQCAGKAIcIgFBAnRBhJkCaiIEKAIAIAZGBEAgBCACNgIAIAINAUHYlgJB2JYCKAIAQX4gAXdxNgIADAILIAhBEEEUIAgoAhAgBkYbaiACNgIAIAJFDQELIAIgCDYCGCAGKAIQIgEEQCACIAE2AhAgASACNgIYCyAGKAIUIgFFDQAgAiABNgIUIAEgAjYCGAsgBiAJaiIGKAIEIQMgACAJaiEACyAGIANBfnE2AgQgBSAAQQFyNgIEIAAgBWogADYCACAAQf8BTQRAIABBeHFB/JYCaiEBAn9B1JYCKAIAIgJBASAAQQN2dCIAcUUEQEHUlgIgACACcjYCACABDAELIAEoAggLIQAgASAFNgIIIAAgBTYCDCAFIAE2AgwgBSAANgIIDAMLQR8hAyAAQf///wdNBEAgAEEmIABBCHZnIgFrdkEBcSABQQF0a0E+aiEDCyAFIAM2AhwgBUIANwIQIANBAnRBhJkCaiEBAkBB2JYCKAIAIgJBASADdCIEcUUEQEHYlgIgAiAEcjYCACABIAU2AgAMAQsgAEEZIANBAXZrQQAgA0EfRxt0IQMgASgCACECA0AgAiIBKAIEQXhxIABGDQMgA0EddiECIANBAXQhAyABIAJBBHFqIgQoAhAiAg0ACyAEIAU2AhALIAUgATYCGCAFIAU2AgwgBSAFNgIIDAILQeCWAiAGQShrIgBBeCACa0EHcUEAIAJBCGpBB3EbIgFrIgg2AgBB7JYCIAEgAmoiATYCACABIAhBAXI2AgQgACACakEoNgIEQfCWAkG8mgIoAgA2AgAgAyAEQScgBGtBB3FBACAEQSdrQQdxG2pBL2siACAAIANBEGpJGyIBQRs2AgQgAUGcmgIpAgA3AhAgAUGUmgIpAgA3AghBnJoCIAFBCGo2AgBBmJoCIAY2AgBBlJoCIAI2AgBBoJoCQQA2AgAgAUEYaiEAA0AgAEEHNgIEIABBCGohAiAAQQRqIQAgAiAESQ0ACyABIANGDQMgASABKAIEQX5xNgIEIAMgASADayICQQFyNgIEIAEgAjYCACACQf8BTQRAIAJBeHFB/JYCaiEAAn9B1JYCKAIAIgFBASACQQN2dCICcUUEQEHUlgIgASACcjYCACAADAELIAAoAggLIQEgACADNgIIIAEgAzYCDCADIAA2AgwgAyABNgIIDAQLQR8hACACQf///wdNBEAgAkEmIAJBCHZnIgBrdkEBcSAAQQF0a0E+aiEACyADIAA2AhwgA0IANwIQIABBAnRBhJkCaiEBAkBB2JYCKAIAIgRBASAAdCIGcUUEQEHYlgIgBCAGcjYCACABIAM2AgAMAQsgAkEZIABBAXZrQQAgAEEfRxt0IQAgASgCACEEA0AgBCIBKAIEQXhxIAJGDQQgAEEddiEEIABBAXQhACABIARBBHFqIgYoAhAiBA0ACyAGIAM2AhALIAMgATYCGCADIAM2AgwgAyADNgIIDAMLIAEoAggiACAFNgIMIAEgBTYCCCAFQQA2AhggBSABNgIMIAUgADYCCAsgB0EIaiEADAULIAEoAggiACADNgIMIAEgAzYCCCADQQA2AhggAyABNgIMIAMgADYCCAtB4JYCKAIAIgAgBU0NAEHglgIgACAFayIBNgIAQeyWAkHslgIoAgAiACAFaiICNgIAIAIgAUEBcjYCBCAAIAVBA3I2AgQgAEEIaiEADAMLQdCWAkEwNgIAQQAhAAwCCwJAIAdFDQACQCAEKAIcIgBBAnRBhJkCaiIBKAIAIARGBEAgASACNgIAIAINAUHYlgIgCEF+IAB3cSIINgIADAILIAdBEEEUIAcoAhAgBEYbaiACNgIAIAJFDQELIAIgBzYCGCAEKAIQIgAEQCACIAA2AhAgACACNgIYCyAEKAIUIgBFDQAgAiAANgIUIAAgAjYCGAsCQCADQQ9NBEAgBCADIAVqIgBBA3I2AgQgACAEaiIAIAAoAgRBAXI2AgQMAQsgBCAFQQNyNgIEIAQgBWoiAiADQQFyNgIEIAIgA2ogAzYCACADQf8BTQRAIANBeHFB/JYCaiEAAn9B1JYCKAIAIgFBASADQQN2dCIDcUUEQEHUlgIgASADcjYCACAADAELIAAoAggLIQEgACACNgIIIAEgAjYCDCACIAA2AgwgAiABNgIIDAELQR8hACADQf///wdNBEAgA0EmIANBCHZnIgBrdkEBcSAAQQF0a0E+aiEACyACIAA2AhwgAkIANwIQIABBAnRBhJkCaiEBAkACQCAIQQEgAHQiBnFFBEBB2JYCIAYgCHI2AgAgASACNgIADAELIANBGSAAQQF2a0EAIABBH0cbdCEAIAEoAgAhBQNAIAUiASgCBEF4cSADRg0CIABBHXYhBiAAQQF0IQAgASAGQQRxaiIGKAIQIgUNAAsgBiACNgIQCyACIAE2AhggAiACNgIMIAIgAjYCCAwBCyABKAIIIgAgAjYCDCABIAI2AgggAkEANgIYIAIgATYCDCACIAA2AggLIARBCGohAAwBCwJAIAlFDQACQCACKAIcIgBBAnRBhJkCaiIBKAIAIAJGBEAgASAENgIAIAQNAUHYlgIgCkF+IAB3cTYCAAwCCyAJQRBBFCAJKAIQIAJGG2ogBDYCACAERQ0BCyAEIAk2AhggAigCECIABEAgBCAANgIQIAAgBDYCGAsgAigCFCIARQ0AIAQgADYCFCAAIAQ2AhgLAkAgA0EPTQRAIAIgAyAFaiIAQQNyNgIEIAAgAmoiACAAKAIEQQFyNgIEDAELIAIgBUEDcjYCBCACIAVqIgQgA0EBcjYCBCADIARqIAM2AgAgBwRAIAdBeHFB/JYCaiEAQeiWAigCACEBAn9BASAHQQN2dCIFIAZxRQRAQdSWAiAFIAZyNgIAIAAMAQsgACgCCAshBiAAIAE2AgggBiABNgIMIAEgADYCDCABIAY2AggLQeiWAiAENgIAQdyWAiADNgIACyACQQhqIQALIAtBEGokACAACwoAIAAgARA6QQALDAAgACABIAIQO0EAC7QBAQF/IAAgASgAAEH///8fcTYCACAAIAEoAANBAnZBg/7/H3E2AgQgACABKAAGQQR2Qf+B/x9xNgIIIAAgASgACUEGdkH//8AfcTYCDCABKAAMIQIgAEIANwIUIABCADcCHCAAQQA2AiQgACACQQh2Qf//P3E2AhAgACABKAAQNgIoIAAgASgAFDYCLCAAIAEoABg2AjAgASgAHCEBIABBADoAUCAAQgA3AzggACABNgI0QQAL6AEBA38jACIFQcABa0FAcSIEJAAgBCADKAAAQf///x9xNgJAIAQgAygAA0ECdkGD/v8fcTYCRCAEIAMoAAZBBHZB/4H/H3E2AkggBCADKAAJQQZ2Qf//wB9xNgJMIAMoAAwhBiAEQgA3AlQgBEIANwJcIARBADYCZCAEIAZBCHZB//8/cTYCUCAEIAMoABA2AmggBCADKAAUNgJsIAQgAygAGDYCcCADKAAcIQMgBEEAOgCQASAEQgA3A3ggBCADNgJ0IARBQGsiAyABIAIQOyADIARBMGoiARA6IAAgARAtIQAgBSQAIAAL1QEBA38jACIFQYABa0FAcSIEJAAgBCADKAAAQf///x9xNgIAIAQgAygAA0ECdkGD/v8fcTYCBCAEIAMoAAZBBHZB/4H/H3E2AgggBCADKAAJQQZ2Qf//wB9xNgIMIAMoAAwhBiAEQgA3AhQgBEIANwIcIARBADYCJCAEIAZBCHZB//8/cTYCECAEIAMoABA2AiggBCADKAAUNgIsIAQgAygAGDYCMCADKAAcIQMgBEEAOgBQIARCADcDOCAEIAM2AjQgBCABIAIQOyAEIAAQOiAFJABBAAsmAQJ/AkBB4JoCKAIAIgBFDQAgACgCFCIARQ0AIAARAgAhAQsgAQsOACAAIAGtQYAIIAIQFwtNAQN/IwBBEGsiAiQAIABBAk8EQEEAIABrIABwIQEDQCACQQA6AA9B2JACIAJBD2pBABAAIgMgAUkNAAsgAyAAcCEBCyACQRBqJAAgAQssAQJ/IwBBEGsiACQAIABBADoAD0HYkAIgAEEPakEAEAAhASAAQRBqJAAgAQtzAgJ/AX4CQCMAQRBrIgQkACABrSACrUIghoQiBUKAgICAEFQEQCAFpyIBBEADQCAEQQA6AA8gACADakHYkAIgBEEPakEAEAA6AAAgA0EBaiIDIAFHDQALCyAEQRBqJAAMAQtB2AlBzAhBxQFBjAgQAQALCxIAIAAgASACrSADrUIghoQQDAsWACAAIAEgAq0gA61CIIaEIARBABAxCxsAIAAgASACIAOtIAStQiCGhCAFQQAQMhpBAAuKAQEBfgJ/AkACQAJAIAOtIAStQiCGhCIGQsAAVA0AIAZCQHwiBkK/////D1YNACACIAJBQGsiAyAGIAVBABAxRQ0BIABFDQAgAEEAIAanEAgaC0F/IQIgAUUNASABQgA3AwBBfwwCCyABBEAgASAGNwMAC0EAIQIgAEUNACAAIAMgBqcQJBoLIAILC3wCAn8BfiMAQRBrIgYkACAAIAZBCGogAEFAayACIAOtIAStQiCGhCIIpyICECQgCCAFQQAQMhoCQCAGKQMIQsAAUgRAIAEEQCABQgA3AwALIABBACACQUBrEAgaQX8hBwwBCyABRQ0AIAEgCEJAfTcDAAsgBkEQaiQAIAcL+gUBCX4gBCkAACIFQvXKzYPXrNu38wCFIQkgBULh5JXz1uzZvOwAhSEGIAQpAAgiBULt3pHzlszct+QAhSELIAVC88rRy6eM2bL0AIUhByABIAEgAq0gA61CIIaEIgynIgJqIAJBB3EiA2siAkcEQANAIAYgASkAACINIAeFIgh8IgcgCSALfCIJIAtCDYmFIgV8IgogBUIRiYUiBkINiSAGIAhCEIkgB4UiByAJQiCJfCIFfCIJhSIGQhGJIAYgB0IViSAFhSIHIApCIIl8IgV8IgaFIQsgB0IQiSAFhSIFQhWJIAUgCUIgiXwiBYUhByAGQiCJIQYgBSANhSEJIAFBCGoiASACRw0ACyACIQELIAxCOIYhCAJAAkACQAJAAkACQAJAAkAgA0EBaw4HBgUEAwIBAAcLIAExAAZCMIYgCIQhCAsgATEABUIohiAIhCEICyABMQAEQiCGIAiEIQgLIAExAANCGIYgCIQhCAsgATEAAkIQhiAIhCEICyABMQABQgiGIAiEIQgLIAggATEAAIQhCAsgACAHIAiFIgVCEIkgBSAGfCIKhSIFQhWJIAUgCSALfCIGQiCJfCIJhSIFQhCJIAUgCiAGIAtCDYmFIgd8IgZCIIl8IgqFIgVCFYkgBSAJIAYgB0IRiYUiB3wiBkIgiXwiCYUiBUIQiSAKIAdCDYkgBoUiB3wiBkIgiUL/AYUgBXwiCoUiBUIViSAHQhGJIAaFIgcgCCAJhXwiBkIgiSAFfCIJhSIFQhCJIAYgB0INiYUiByAKfCIGQiCJIAV8IgqFIgVCFYkgB0IRiSAGhSIHIAl8IgZCIIkgBXwiCYUiBUIQiSAHQg2JIAaFIgcgCnwiBkIgiSAFfCIKhSIFQhWJIAUgB0IRiSAGhSIHIAl8IgVCIIl8IgmFIgZCEIkgBiAHQg2JIAWFIgcgCnwiBUIgiXwiBoVCFYkgB0IRiSAFhSIFQg2JIAUgCXyFIgVCEYmFIAUgBnwiBUIgiYUgBYU3AABBAAuzBgIDfgF/An8gBa0gBq1CIIaEIQogCK0gCa1CIIaEIQwjAEGQA2siBSQAIAIEQCACQgA3AwALIAMEQCADQf8BOgAAC0F/IQ0CQAJAIApCEVQNACAKQhF9IgtC7////w9aDQEgBUEgaiIIQsAAIABBIGoiCSAAEBcgBUHgAGoiBiAIQbyQAigCABEBABogCEHAABAHIAYgByAMQcCQAigCABEAABogBkHwiAJCACAMfUIPg0HAkAIoAgARAAAaIAVCADcDWCAFQgA3A1AgBUIANwNIIAVBQGtCADcDACAFQgA3AzggBUIANwMwIAVCADcDKCAFQgA3AyAgBSAELQAAOgAgIAggCELAACAJQQEgABAbIAUtACAhByAFIAQtAAA6ACAgBiAIQsAAQcCQAigCABEAABogBiAEQQFqIgQgC0HAkAIoAgARAAAaIAZB8IgCIApCAX1CD4NBwJACKAIAEQAAGiAFIAw3AxggBiAFQRhqIghCCEHAkAIoAgARAAAaIAUgCkIvfDcDGCAGIAhCCEHAkAIoAgARAAAaIAYgBUHEkAIoAgARAQAaIAZBgAIQByAFIAQgC6dqQRAQMwRAIAVBEBAHDAELIAEgBCALIAlBAiAAEBsgACAALQAkIAUtAABzOgAkIAAgAC0AJSAFLQABczoAJSAAIAAtACYgBS0AAnM6ACYgACAALQAnIAUtAANzOgAnIAAgAC0AKCAFLQAEczoAKCAAIAAtACkgBS0ABXM6ACkgACAALQAqIAUtAAZzOgAqIAAgAC0AKyAFLQAHczoAKyAJED8CQCAHQQJxRQRAIAlBBBAfRQ0BCyAFIAApABg3A/gCIAUgACkAEDcD8AIgBSAAKQAANwPgAiAFIAApAAg3A+gCIAUgACkAJDcDgAMgBUHgAmoiASABQiggCUEAIABBsJACKAIAEQgAGiAAIAUpA/gCNwAYIAAgBSkD8AI3ABAgACAFKQPoAjcACCAAIAUpA+ACNwAAIAUpA4ADIQogAEEBNgAgIAAgCjcAJAsgAgRAIAIgCzcDAAtBACENIANFDQAgAyAHOgAACyAFQZADaiQAIA0MAQsQCQALC+QFAQJ+An8gBK0gBa1CIIaEIQogB60gCK1CIIaEIQsjAEGAA2siBCQAIAIEQCACQgA3AwALIApC7////w9UBEAgBEEQaiIHQsAAIABBIGoiCCAAEBcgBEHQAGoiBSAHQbyQAigCABEBABogB0HAABAHIAUgBiALQcCQAigCABEAABogBUHwiAJCACALfUIPg0HAkAIoAgARAAAaIARCADcDSCAEQUBrQgA3AwAgBEIANwM4IARCADcDMCAEQgA3AyggBEIANwMgIARCADcDECAEQgA3AxggBCAJOgAQIAcgB0LAACAIQQEgABAbIAUgB0LAAEHAkAIoAgARAAAaIAEgBC0AEDoAACABQQFqIgEgAyAKIAhBAiAAEBsgBSABIApBwJACKAIAEQAAGiAFQfCIAiAKQg+DQcCQAigCABEAABogBCALNwMIIAUgBEEIaiIDQghBwJACKAIAEQAAGiAEIApCQH03AwggBSADQghBwJACKAIAEQAAGiAFIAEgCqdqIgFBxJACKAIAEQEAGiAFQYACEAcgACAALQAkIAEtAABzOgAkIAAgAC0AJSABLQABczoAJSAAIAAtACYgAS0AAnM6ACYgACAALQAnIAEtAANzOgAnIAAgAC0AKCABLQAEczoAKCAAIAAtACkgAS0ABXM6ACkgACAALQAqIAEtAAZzOgAqIAAgAC0AKyABLQAHczoAKyAIED8CQCAJQQJxRQRAIAhBBBAfRQ0BCyAEIAApABg3A+gCIAQgACkAEDcD4AIgBCAAKQAANwPQAiAEIAApAAg3A9gCIAQgACkAJDcD8AIgBEHQAmoiASABQiggCEEAIABBsJACKAIAEQgAGiAAIAQpA+gCNwAYIAAgBCkD4AI3ABAgACAEKQPYAjcACCAAIAQpA9ACNwAAIAQpA/ACIQsgAEEBNgAgIAAgCzcAJAsgAgRAIAIgCkIRfDcDAAsgBEGAA2okAEEADAELEAkACwsxAQF+IAKtIAOtQiCGhCIGQvD///8PWgRAEAkACyAAQRBqIAAgASAGIAQgBRAgGkEAC4YEAgF/BH4jAEEgayIGJAAgBCkAACEHIAZCADcDGCAGIAc3AxAgBkIANwMIIAYgAq0gA61CIIaENwMAAn8gAUHBAGtBTk0EQEHQlgJBHDYCAEF/DAELIAFBwQBrQUBPBH8CfyAGQRBqIQIgAUH/AXEhAyMAIgEhBCABQYAEa0FAcSIBJAACQCAARQ0AIANBwQBrQf8BcUG/AU0NACAFRQ0AIAVFDQACfiAGRQRAQp/Y+dnCkdqCm38hB0LRhZrv+s+Uh9EADAELIAYpAAhCn9j52cKR2oKbf4UhByAGKQAAQtGFmu/6z5SH0QCFCyEJAn4gAkUEQEL5wvibkaOz8NsAIQhC6/qG2r+19sEfDAELIAIpAAhC+cL4m5Gjs/DbAIUhCCACKQAAQuv6htq/tfbBH4ULIQogAUFAa0EAQaUCEAgaIAEgCDcDOCABIAo3AzAgASAHNwMoIAEgCTcDICABQvHt9Pilp/2npX83AxggAUKr8NP0r+68tzw3AxAgAUK7zqqm2NDrs7t/NwMIIAEgA61CgMAAhEKIkveV/8z5hOoAhTcDACABQYADaiICQSBqQQBB4AAQCBogAiAFQSAQCxogAUHgAGogAkGAARALGiABQYABNgLgAiACQYABEAcgASAAIAMQNRogBCQAQQAMAQsQCQALBUF/CwshACAGQSBqJAAgAAsSACAAIAEgAq0gA61CIIaEEBgLEgAgACABIAKtIAOtQiCGhBAPCxgAIAAgASACIAOtIAStQiCGhCAFIAYQWQt7AgN/AX4jACIGIQggBkHAA2tBQHEiBiQAQX8hByACrSADrUIghoQiCUIwWgRAIAZBQGsiAkEAQQBBGBAjGiACIAFCIBAPGiACIARCIBAPGiACIAZBIGoiAkEYECIaIAAgAUEgaiAJQiB9IAIgASAFEFIhBwsgCCQAIAcLyAECA38BfiACrSADrUIghoQhCCMAIgIhBiACQYAEa0FAcSICJABBfyEDIAJBQGsgAkEgahA9RQRAIAJBgAFqIgNBAEEAQRgQIxogAyACQUBrIgdCIBAPGiADIARCIBAPGiADIAJB4ABqIgVBGBAiGiAAQSBqIAEgCCAFIAQgAkEgaiIBEFMhAyAAIAIpA1g3ABggACACKQNQNwAQIAAgAikDSDcACCAAIAIpA0A3AAAgAUEgEAcgB0EgEAcgBUEYEAcLIAYkACADCxgAIAAgASACrSADrUIghoQgBCAFIAYQUgvHAQEBfyMAQUBqIgYkACACQgBSBEAgBkKy2ojLx66ZkOsANwMIIAZC5fDBi+aNmZAzNwMAIAYgBSgAADYCECAGIAUoAAQ2AhQgBiAFKAAINgIYIAYgBSgADDYCHCAGIAUoABA2AiAgBiAFKAAUNgIkIAYgBSgAGDYCKCAFKAAcIQUgBiAENgIwIAYgBTYCLCAGIAMoAAA2AjQgBiADKAAENgI4IAYgAygACDYCPCAGIAEgACACEC8gBkHAABAHCyAGQUBrJABBAAtIAQF+IAOtIAStQiCGhCEIIwBBIGsiAyQAQX8hBCADIAYgBxAhRQRAIAAgASACIAggBSADEDAhBCADQSAQBwsgA0EgaiQAIAQLGAAgACABIAKtIAOtQiCGhCAEIAUgBhBTCy4BAX4gAq0gA61CIIaEIgZC8P///w9aBEAQCQALIABBEGogACABIAYgBCAFECALSAEBfiADrSAErUIghoQhCCMAQSBrIgMkAEF/IQQgAyAGIAcQIUUEQCAAIAEgAiAIIAUgAxAgIQQgA0EgEAcLIANBIGokACAEC4YBAQJ/IwBBgARrIgUkACAFQSBqIgYgBBBWIAYgASACrSADrUIghoQQVSAGIAVBwANqEFQgBSAFKQPYAzcDGCAFIAUpA9ADNwMQIAUgBSkDyAM3AwggBSAFKQPAAzcDACAAIAUQSyEBIAUgAEEgEDMhAiAFQYAEaiQAIAJBfyABIAAgBUYbcgtkAQF/IwBB4ANrIgUkACAFIAQQViAFIAEgAq0gA61CIIaEEFUgBSAFQaADahBUIAAgBSkDuAM3ABggACAFKQOwAzcAECAAIAUpA6gDNwAIIAAgBSkDoAM3AAAgBUHgA2okAEEAC1oBAn4gB60gCK1CIIaEIQxBfyECIAStIAWtQiCGhCILQhBaBEAgACADIAtCEH0gAyALp2pBEGsgBiAMIAkgChBXIQILIAEEQCABQgAgC0IQfSACGzcDAAsgAgskACAAIAIgA60gBK1CIIaEIAUgBiAHrSAIrUIghoQgCSAKEFcLwwEBAX8jAEFAaiIGJAAgAkIAUgRAIAZCstqIy8eumZDrADcDCCAGQuXwwYvmjZmQMzcDACAGIAUoAAA2AhAgBiAFKAAENgIUIAYgBSgACDYCGCAGIAUoAAw2AhwgBiAFKAAQNgIgIAYgBSgAFDYCJCAGIAUoABg2AiggBiAFKAAcNgIsIAYgBD4CMCAGIARCIIg+AjQgBiADKAAANgI4IAYgAygABDYCPCAGIAEgACACEC8gBkHAABAHCyAGQUBrJABBAAtYAQJ+An8gBq0gB61CIIaEIQwgA60gBK1CIIaEIgtC8P///w9UBEAgACAAIAunakEAIAIgCyAFIAwgCSAKEFgaIAEEQCABIAtCEHw3AwALQQAMAQsQCQALCyYAIAAgASACIAMgBK0gBa1CIIaEIAYgB60gCK1CIIaEIAogCxBYC1oBAn4gB60gCK1CIIaEIQxBfyECIAStIAWtQiCGhCILQhBaBEAgACADIAtCEH0gAyALp2pBEGsgBiAMIAkgChBAIQILIAEEQCABQgAgC0IQfSACGzcDAAsgAgskACAAIAIgA60gBK1CIIaEIAUgBiAHrSAIrUIghoQgCSAKEEALWgECfiAHrSAIrUIghoQhDEF/IQIgBK0gBa1CIIaEIgtCEFoEQCAAIAMgC0IQfSADIAunakEQayAGIAwgCSAKEEEhAgsgAQRAIAFCACALQhB9IAIbNwMACyACCyQAIAAgAiADrSAErUIghoQgBSAGIAetIAitQiCGhCAJIAoQQQtYAQJ+An8gBq0gB61CIIaEIQwgA60gBK1CIIaEIgtC8P///w9UBEAgACAAIAunakEAIAIgCyAFIAwgCSAKEEIaIAEEQCABIAtCEHw3AwALQQAMAQsQCQALCyYAIAAgASACIAMgBK0gBa1CIIaEIAYgB60gCK1CIIaEIAogCxBCC1gBAn4CfyAGrSAHrUIghoQhDCADrSAErUIghoQiC0Lw////D1QEQCAAIAAgC6dqQQAgAiALIAUgDCAJIAoQQxogAQRAIAEgC0IQfDcDAAtBAAwBCxAJAAsLJgAgACABIAIgAyAErSAFrUIghoQgBiAHrSAIrUIghoQgCiALEEML0AEBAX8jAEFAaiIEJAAgAUIAUgRAIARCstqIy8eumZDrADcDCCAEQuXwwYvmjZmQMzcDACAEIAMoAAA2AhAgBCADKAAENgIUIAQgAygACDYCGCAEIAMoAAw2AhwgBCADKAAQNgIgIAQgAygAFDYCJCAEIAMoABg2AiggAygAHCEDIARBADYCMCAEIAM2AiwgBCACKAAANgI0IAQgAigABDYCOCAEIAIoAAg2AjwgBCAAQQAgAacQCCIAIAAgARAvIARBwAAQBwsgBEFAayQAQQAL/gEBBH8jACIFIQggBUGABGtBQHEiBSQAIAAgASAAGyIHBEBBfyEGIAVB4ABqIAMgBBA8RQRAIAEgACABGyEBQQAhACAFQYABaiIDQQBBAEHAABAjGiADIAVB4ABqIgZCIBAPGiAGQSAQByADIARCIBAPGiADIAJCIBAPGiADIAVBIGpBwAAQIhogA0GAAxAHA0AgACABaiAFQSBqIgQgAGoiAi0AADoAACAAIAdqIAItACA6AAAgASAAQQFyIgNqIAMgBGotAAA6AAAgAyAHaiACLQAhOgAAIABBAmoiAEEgRw0ACyAFQSBqQcAAEAdBACEGCyAIJAAgBg8LEAkAC/4BAQR/IwAiBSEIIAVBgARrQUBxIgUkACAAIAEgABsiBwRAQX8hBiAFQeAAaiADIAQQPEUEQCABIAAgARshAUEAIQAgBUGAAWoiA0EAQQBBwAAQIxogAyAFQeAAaiIGQiAQDxogBkEgEAcgAyACQiAQDxogAyAEQiAQDxogAyAFQSBqQcAAECIaIANBgAMQBwNAIAAgB2ogBUEgaiIEIABqIgItAAA6AAAgACABaiACLQAgOgAAIAcgAEEBciIDaiADIARqLQAAOgAAIAEgA2ogAi0AIToAACAAQQJqIgBBIEcNAAsgBUEgakHAABAHQQAhBgsgCCQAIAYPCxAJAAsfACABQSAgAkIgQQBBABBZGiAAIAFBzJACKAIAEQEACxAAIAAgAUHMkAIoAgARAQALBABBCgsFAEGgCgsIACAAQRAQFgsEAEEwC14BAX8jAEFAaiIDJAAgAyACQiAQGBogASADKQMYNwAYIAEgAykDEDcAECABIAMpAwg3AAggASADKQMANwAAIANBwAAQByAAIAFBzJACKAIAEQEAIQAgA0FAayQAIAALxgEBAX8jAEFAaiIEJAAgAUIAUgRAIARCstqIy8eumZDrADcDCCAEQuXwwYvmjZmQMzcDACAEIAMoAAA2AhAgBCADKAAENgIUIAQgAygACDYCGCAEIAMoAAw2AhwgBCADKAAQNgIgIAQgAygAFDYCJCAEIAMoABg2AiggAygAHCEDIARCADcDMCAEIAM2AiwgBCACKAAANgI4IAQgAigABDYCPCAEIABBACABpxAIIgAgACABEC8gBEHAABAHCyAEQUBrJABBAAsFAEGAAwuqAQEGfyMAQRBrIgZBADYCDEF/IQQgAiADQQFrSwR/IAEgAkEBayICaiEIQQAhBEEAIQEDQCAGIAYoAgwiByAIIAVrLQAAIglBgAFzQQFrIAdBAWsgAUH/AXEiAUEBa3FxIgdBF3RBH3UgBXFyNgIMIAEgCXIhASAEIAdBCHZBAXFyIQQgBUEBaiIFIANHDQALIAAgAiAGKAIMazYCACAEQf8BcUEBawVBfwsLpQkBCH8CQAJ/AkACQAJAAkACQAJAAn8CQAJAAkAgB0F5cUEBRgRAQQAgA0UNBBogB0EEcQ0BA0AgCCELAkACQAJAAkADQCACIAtqLAAAIgpB0P8Ac0EBakF/c0EIdkE/cSAKQdT/AHNBAWpBf3NBCHZBPnFyIApBuQFqIApBn/8DakF/c0H6ACAKa0F/c3FBCHZxQf8BcXIgCkEEaiAKQdD/A2pBf3NBOSAKa0F/c3FBCHZxQf8BcXJB2gAgCmtBf3MgCkHBAGsiCUF/c3FBCHYgCXFB/wFxciIJQQFrIApBvv8Dc0EBanFBCHZB/wFxIAlyIglB/wFHDQFBACEJIARFDQkgBCAKEB0EQCALQQFqIgsgA08NAwwBCwsgCyEIDAgLIAkgDkEGdGohDiAMQQFLDQEgDEEGaiEMDAILIAMgCEEBaiIAIAAgA0kbIQgMBgsgDEECayEMIAEgDU0NBCAAIA1qIA4gDHY6AAAgDUEBaiENC0EAIQkgC0EBaiIIIANJDQALDAMLEAkACwNAIAghCwNAAkAgAiALaiwAACIKQaD/AHNBAWpBf3NBCHZBP3EgCkHS/wBzQQFqQX9zQQh2QT5xciAKQbkBaiAKQZ//A2pBf3NB+gAgCmtBf3NxQQh2cUH/AXFyIApBBGogCkHQ/wNqQX9zQTkgCmtBf3NxQQh2cUH/AXFyQdoAIAprQX9zIApBwQBrIglBf3NxQQh2IAlxQf8BcXIiCUEBayAKQb7/A3NBAWpxQQh2Qf8BcSAJciIJQf8BRgRAQQAhCSAERQ0FIAQgChAdDQEgCyEIDAULIAkgDkEGdGohDgJAIAxBAkkEQCAMQQZqIQwMAQsgDEECayEMIAEgDU0NBCAAIA1qIA4gDHY6AAAgDUEBaiENC0EAIQkgC0EBaiIIIANJDQIMBAsgC0EBaiILIANJDQALCyADIAhBAWoiACAAIANJGyEIDAELIAshCEHQlgJBxAA2AgBBASEJCyAMQQRLDQEgCAshAEF/IQEgCQRAIAAhCAwICyAOQX8gDHRBf3NxBEAgACEIDAgLIAdBAnEEQCAAIQcMAwsgDEECSQRAIAAhBwwDCyAAIAMgACADSxshCCAMQQF2IQsgBEUNASAAIQcDQCAHIAhGBEBBxAAhCQwFCwJAIAIgB2osAAAiAEE9RgRAIAtBAWshCwwBCyAEIAAQHQ0AQRwhCSAHIQgMBQsgB0EBaiEHIAsNAAsMAgtBfyEBDAYLQcQAIQkgACADTw0BIAAgAmotAABBPUcEQCAAIQhBHCEJDAILIAAgC2ohByALQQFGDQAgAEEBaiIMIAhGDQEgAiAMai0AAEE9RwRAIAwhCEEcIQkMAgsgC0ECRg0AIABBAmoiACAIRg0BQRwhCSAAIgggAmotAABBPUcNAQtBACEBIAQNAQwCC0HQlgIgCTYCAAwDCyADIAdNDQADQCAEIAIgB2osAAAQHUUNASAHQQFqIgcgA0cNAAsgAwwBCyAHCyEIIA0hDwsCQCAGBEAgBiACIAhqNgIADAELIAMgCEYNAEHQlgJBHDYCAEF/IQELIAUEQCAFIA82AgALIAELkQcBCn8CfwJ/AkACQCAEQXlxQQFHDQAgA0EDbiIGQQJ0IQkCQCAGQX1sIANqIgZFDQAgBEECcUUEQCAJQQRqIQkMAQsgCUECciAGQQF2aiEJCyABIAlNDQACQCAEQQRxBEBBACADRQ0FGkEAIQYMAQtBACADRQ0EGkEAIQYMAgsDQCACIAtqLQAAIgwgBUEIdHIhBSAGIgogCEEIciIIQQZrQQZuakEBaiEGA0AgACAKaiAFIAgiBEEGayIIdkE/cSIHQcH/AWpBf3NBCHZB3wBxIAdB5v8DakEIdiINIAdBwQBqcXIgB0H8AWogB0HC/wNqQQh2cSAHQcz/A2pBCHYiDkF/c3FyIAdBwf8Ac0EBakF/c0EIdkEtcXIgB0HHAGogDUF/c3EgDnFyOgAAIApBAWoiCiAGRw0ACyALQQFqIgsgA0cNAAsgBiAIRQ0DGiAMQQwgBGt0QT9xIgJB5v8DakEIdiIDIAJBwQBqcSEKIAJB/AFqIAJBwv8DakEIdnEgAkHM/wNqQQh2IgRBf3NxIQUgAkHHAGogA0F/c3EgBHEhCCACQcH/AWohAyACQcH/AHNBAWpBf3NBCHZBLXEhBEHfAAwCCxAJAAsDQCACIAtqLQAAIgwgBUEIdHIhBSAGIgogCEEIciIIQQZrQQZuakEBaiEGA0AgACAKaiAFIAgiBEEGayIIdkE/cSIHQcH/AGpBf3NBCHZBL3EgB0Hm/wNqQQh2Ig0gB0HBAGpxciAHQfwBaiAHQcL/A2pBCHZxIAdBzP8DakEIdiIOQX9zcXIgB0HB/wBzQQFqQX9zQQh2QStxciAHQccAaiANQX9zcSAOcXI6AAAgCkEBaiIKIAZHDQALIAtBAWoiCyADRw0ACyAGIAhFDQEaIAxBDCAEa3RBP3EiAkHm/wNqQQh2IgMgAkHBAGpxIQogAkH8AWogAkHC/wNqQQh2cSACQcz/A2pBCHYiBEF/c3EhBSACQccAaiADQX9zcSAEcSEIIAJBwf8AaiEDIAJBwf8Ac0EBakF/c0EIdkErcSEEQS8LIQIgACAGaiACIANBf3NBCHZxIApyIAVyIARyIAhyOgAAIAZBAWoLIQUCQAJAIAUgCU0EQCAFIAlJDQEgBSEJDAILQZgIQeYIQeYBQacKEAEACyAAIAVqQT0gCSAFaxAIGgsgACAJakEAIAEgCUEBaiICIAEgAksbIAlrEAgaIAALPQEBfyABQXlxQQFHBEAQCQALIAAgAEEDbiIAQX1saiICQQFqQQQgAUECcRtBACACQQNxGyAAQQJ0akEBaguIBQEKfwJAIANFDQACQAJAAkACQCAERQRAQQEhCUEAIQQDQCACIAdqLQAAIgxB3wFxQTdrQf8BcSIKQfb/A2ogCkHw/wNqc0EIdiINIAxBMHMiDEH2/wNqQQh2Ig5yQf8BcUUNAyABIAtNDQIgCiANcSAMIA5xciEKAkAgCEH/AXFFBEAgCkEEdCEEDAELIAAgC2ogBCAKcjoAACALQQFqIQsLIAhBf3MhCCAHQQFqIgcgA0cNAAsgAyEHDAILA0ACQAJAAkACfwJAIAIgB2otAAAiCUHfAXFBN2tB/wFxIgpB9v8DaiAKQfD/A2pzQQh2IgwgCUEwcyINQfb/A2pBCHYiDnJB/wFxRQRAIAhB/wFxDQkgBCAJEB1FDQsgB0EBaiIIIQcgAyAISw0BDAsLIAEgC00NBiAKIAxxIA0gDnFyIgkgCEH/AXFFDQEaIAAgC2ogCSAQcjoAACALQQFqIQsMBAsDQCACIAdqLQAAIglB3wFxQTdrQf8BcSIKQfb/A2ogCkHw/wNqc0EIdiIMIAlBMHMiDUH2/wNqQQh2Ig5yQf8BcUUEQCAEIAkQHUUNCyADIAdBAWoiB0sNAQwDCwsgASALTQ0CIAogDHEgDSAOcXILQQR0IRBBACEIDAILIAMgCCADIAhLGyEHDAcLQQAhCAwCCyAIQX9zIQhBASEJIAdBAWoiByADSQ0ACwwBC0HQlgJBxAA2AgBBACEJCyAIQf8BcUUNAQtB0JYCQRw2AgBBfyEPIAdBAWshB0EAIQsMAQsgCQ0AQQAhC0F/IQ8LAkAgBgRAIAYgAiAHajYCAAwBCyADIAdGDQBB0JYCQRw2AgBBfyEPCyAFBEAgBSALNgIACyAPC50BAQN/AkAgA0H+////B0sNACADQQF0IAFPDQBBACEBIAMEfwNAIAAgAUEBdGoiBCABIAJqLQAAIgVBD3EiBkEIdCAGQfb/A2pBgLIDcWpBgK4BakEIdjoAASAEIAVBBHYiBCAEQfb/A2pBCHZB2QFxakHXAGo6AAAgAUEBaiIBIANHDQALIANBAXQFQQALIABqQQA6AAAgAA8LEAkACysBAX8jAEFAaiIDJAAgACADEBMgASADQsAAIAJBARAxIQAgA0FAayQAIAALLQEBfyMAQUBqIgQkACAAIAQQEyABIAIgBELAACADQQEQMiEAIARBQGskACAACwgAIAAQGUEAC7sBAgJ/A34jAEHAAWsiAiQAIAJBIBAWIAEgAkIgEBgaIAEgAS0AAEH4AXE6AAAgASABLQAfQT9xQcAAcjoAHyACQSBqIgMgARAqIAAgAxArIAEgAikDGDcAGCABIAIpAxA3ABAgASACKQMINwAIIAEgAikDADcAACAAKQAIIQQgACkAECEFIAApAAAhBiABIAApABg3ADggASAFNwAwIAEgBDcAKCABIAY3ACAgAkEgEAcgAkHAAWokAEEAC9IBAQR/IwBBEGsiBSQAAkACQCADRQRAQX8hBwwBCwJ/IAMgA0EBayIGcUUEQCACIAZxDAELIAIgA3ALIQhBfyEHIAYgCGsiBiACQX9zTw0BIAIgBmoiAiAETw0AIAAEQCAAIAJBAWo2AgALIAEgAmohAEEAIQcgBUEAOgAPQQAhAgNAIAAgAmsiASABLQAAIAUtAA9xIAIgBnNBAWtBGHYiAUGAAXFyOgAAIAUgBS0ADyABcjoADyACQQFqIgIgA0cNAAsLIAVBEGokACAHDwsQCQALC7qFAgwAQYAIC5cDTGlic29kaXVtRFJHcmFuZG9tYnl0ZXMAYjY0X3BvcyA8PSBiNjRfbGVuAGNyeXB0b19nZW5lcmljaGFzaF9ibGFrZTJiX2ZpbmFsAHJhbmRvbWJ5dGVzL3JhbmRvbWJ5dGVzLmMAc29kaXVtL2NvZGVjcy5jAGNyeXB0b19nZW5lcmljaGFzaC9ibGFrZTJiL3JlZi9ibGFrZTJiLXJlZi5jAGNyeXB0b19nZW5lcmljaGFzaC9ibGFrZTJiL3JlZi9nZW5lcmljaGFzaF9ibGFrZTJiLmMAYnVmX2xlbiA8PSBTSVpFX01BWABvdXRsZW4gPD0gVUlOVDhfTUFYAFMtPmJ1ZmxlbiA8PSBCTEFLRTJCX0JMT0NLQllURVMAMS4wLjE4AHNvZGl1bV9iaW4yYmFzZTY0AAAAAAAAAAC2eFn/hXLTAL1uFf8PCmoAKcABAJjoef+8PKD/mXHO/wC34v60DUj/AAAAAAAAAACwoA7+08mG/54YjwB/aTUAYAy9AKfX+/+fTID+amXh/x78BACSDK4AQaALCydZ8bL+CuWm/3vdKv4eFNQAUoADADDR8wB3eUD/MuOc/wBuxQFnG5AAQdALC8AHhTuMAb3xJP/4JcMBYNw3ALdMPv/DQj0AMkykAeGkTP9MPaP/dT4fAFGRQP92QQ4AonPW/waKLgB85vT/CoqPADQawgC49EwAgY8pAb70E/97qnr/YoFEAHnVkwBWZR7/oWebAIxZQ//v5b4BQwu1AMbwif7uRbz/Q5fuABMqbP/lVXEBMkSH/xFqCQAyZwH/UAGoASOYHv8QqLkBOFno/2XS/AAp+kcAzKpP/w4u7/9QTe8AvdZL/xGN+QAmUEz/vlV1AFbkqgCc2NABw8+k/5ZCTP+v4RD/jVBiAUzb8gDGonIALtqYAJsr8f6boGj/M7ulAAIRrwBCVKAB9zoeACNBNf5F7L8ALYb1AaN73QAgbhT/NBelALrWRwDpsGAA8u82ATlZigBTAFT/iKBkAFyOeP5ofL4AtbE+//opVQCYgioBYPz2AJeXP/7vhT4AIDicAC2nvf+OhbMBg1bTALuzlv76qg7/0qNOACU0lwBjTRoA7pzV/9XA0QFJLlQAFEEpATbOTwDJg5L+qm8Y/7EhMv6rJsv/Tvd0ANHdmQCFgLIBOiwZAMknOwG9E/wAMeXSAXW7dQC1s7gBAHLbADBekwD1KTgAfQ3M/vStdwAs3SD+VOoUAPmgxgHsfur/L2Oo/qrimf9ms9gA4o16/3pCmf629YYA4+QZAdY56//YrTj/tefSAHeAnf+BX4j/bn4zAAKpt/8HgmL+RbBe/3QE4wHZ8pH/yq0fAWkBJ/8ur0UA5C86/9fgRf7POEX/EP6L/xfP1P/KFH7/X9Vg/wmwIQDIBc//8SqA/iMhwP/45cQBgRF4APtnl/8HNHD/jDhC/yji9f/ZRiX+rNYJ/0hDhgGSwNb/LCZwAES4S//OWvsAleuNALWqOgB09O8AXJ0CAGatYgDpiWABfzHLAAWblAAXlAn/03oMACKGGv/bzIgAhggp/+BTK/5VGfcAbX8A/qmIMADud9v/563VAM4S/v4Iugf/fgkHAW8qSABvNOz+YD+NAJO/f/7NTsD/DmrtAbvbTACv87v+aVmtAFUZWQGi85QAAnbR/iGeCQCLoy7/XUYoAGwqjv5v/I7/m9+QADPlp/9J/Jv/XnQM/5ig2v+c7iX/s+rP/8UAs/+apI0A4cRoAAojGf7R1PL/Yf3e/rhl5QDeEn8BpIiH/x7PjP6SYfMAgcAa/slUIf9vCk7/k1Gy/wQEGACh7tf/Bo0hADXXDv8ptdD/54udALPL3f//uXEAveKs/3FC1v/KPi3/ZkAI/06uEP6FdUT/AEGwEwsBAQBB0BMLsAEm6JWPwrInsEXD9Iny75jw1d+sBdPGMzmxOAKIbVP8BccXanA9TdhPujwLdg0QZw8qIFP6LDnMxk7H/XeSrAN67P///////////////////////////////////////3/t////////////////////////////////////////f+7///////////////////////////////////////9/7dP1XBpjEljWnPei3vneFABBjxUL/PABEIU7jAG98ST/+CXDAWDcNwC3TD7/w0I9ADJMpAHhpEz/TD2j/3U+HwBRkUD/dkEOAKJz1v8Gii4AfOb0/wqKjwA0GsIAuPRMAIGPKQG+9BP/e6p6/2KBRAB51ZMAVmUe/6FnmwCMWUP/7+W+AUMLtQDG8In+7kW8/+pxPP8l/zn/RbK2/oDQswB2Gn3+AwfW//EyTf9Vy8X/04f6/xkwZP+71bT+EVhpAFPRngEFc2IABK48/qs3bv/ZtRH/FLyqAJKcZv5X1q7/cnqbAeksqgB/CO8B1uzqAK8F2wAxaj3/BkLQ/wJqbv9R6hP/12vA/0OX7gATKmz/5VVxATJEh/8RagkAMmcB/1ABqAEjmB7/EKi5AThZ6P9l0vwAKfpHAMyqT/8OLu//UE3vAL3WS/8RjfkAJlBM/75VdQBW5KoAnNjQAcPPpP+WQkz/r+EQ/41QYgFM2/IAxqJyAC7amACbK/H+m6Bo/7IJ/P5kbtQADgWnAOnvo/8cl50BZZIK//6eRv5H+eQAWB4yAEQ6oP+/GGgBgUKB/8AyVf8Is4r/JvrJAHNQoACD5nEAfViTAFpExwD9TJ4AHP92AHH6/gBCSy4A5torAOV4ugGURCsAiHzuAbtrxf9UNfb/M3T+/zO7pQACEa8AQlSgAfc6HgAjQTX+Rey/AC2G9QGje90AIG4U/zQXpQC61kcA6bBgAPLvNgE5WYoAUwBU/4igZABcjnj+aHy+ALWxPv/6KVUAmIIqAWD89gCXlz/+74U+ACA4nAAtp73/joWzAYNW0wC7s5b++qoO/0RxFf/eujv/QgfxAUUGSABWnGz+N6dZAG002/4NsBf/xCxq/++VR/+kjH3/n60BADMp5wCRPiEAim9dAblTRQCQcy4AYZcQ/xjkGgAx2eIAcUvq/sGZDP+2MGD/Dg0aAIDD+f5FwTsAhCVR/n1qPADW8KkBpONCANKjTgAlNJcAY00aAO6c1f/VwNEBSS5UABRBKQE2zk8AyYOS/qpvGP+xITL+qybL/073dADR3ZkAhYCyATosGQDJJzsBvRP8ADHl0gF1u3UAtbO4AQBy2wAwXpMA9Sk4AH0NzP70rXcALN0g/lTqFAD5oMYB7H7q/48+3QCBWdb/N4sF/kQUv/8OzLIBI8PZAC8zzgEm9qUAzhsG/p5XJADZNJL/fXvX/1U8H/+rDQcA2vVY/vwjPAA31qD/hWU4AOAgE/6TQOoAGpGiAXJ2fQD4/PoAZV7E/8aN4v4zKrYAhwwJ/m2s0v/F7MIB8UGaADCcL/+ZQzf/2qUi/kq0swDaQkcBWHpjANS12/9cKuf/7wCaAPVNt/9eUaoBEtXYAKtdRwA0XvgAEpeh/sXRQv+u9A/+ojC3ADE98P62XcMAx+QGAcgFEf+JLe3/bJQEAFpP7f8nP03/NVLPAY4Wdv9l6BIBXBpDAAXIWP8hqIr/leFIAALRG/8s9agB3O0R/x7Taf6N7t0AgFD1/m/+DgDeX74B3wnxAJJM1P9szWj/P3WZAJBFMAAj5G8AwCHB/3DWvv5zmJcAF2ZYADNK+ADix4/+zKJl/9BhvQH1aBIA5vYe/xeURQBuWDT+4rVZ/9AvWv5yoVD/IXT4ALOYV/9FkLEBWO4a/zogcQEBTUUAO3k0/5juUwA0CMEA5yfp/8ciigDeRK0AWzny/tzSf//AB/b+lyO7AMPspQBvXc4A1PeFAZqF0f+b5woAQE4mAHr5ZAEeE2H/Plv5AfiFTQDFP6j+dApSALjscf7Uy8L/PWT8/iQFyv93W5n/gU8dAGdnq/7t12//2DVFAO/wFwDCld3/JuHeAOj/tP52UoX/OdGxAYvohQCesC7+wnMuAFj35QEcZ78A3d6v/pXrLACX5Bn+2mlnAI5V0gCVgb7/1UFe/nWG4P9SxnUAnd3cAKNlJADFciUAaKym/gu2AABRSLz/YbwQ/0UGCgDHk5H/CAlzAUHWr//ZrdEAUH+mAPflBP6nt3z/WhzM/q878P8LKfgBbCgz/5Cxw/6W+n4AiltBAXg83v/1we8AHda9/4ACGQBQmqIATdxrAerNSv82pmf/dEgJAOReL/8eyBn/I9ZZ/z2wjP9T4qP/S4KsAIAmEQBfiZj/13yfAU9dAACUUp3+w4L7/yjKTP/7fuAAnWM+/s8H4f9gRMMAjLqd/4MT5/8qgP4ANNs9/mbLSACNBwv/uqTVAB96dwCF8pEA0Pzo/1vVtv+PBPr++ddKAKUebwGrCd8A5XsiAVyCGv9Nmy0Bw4sc/zvgTgCIEfcAbHkgAE/6vf9g4/z+JvE+AD6uff+bb13/CubOAWHFKP8AMTn+QfoNABL7lv/cbdL/Ba6m/iyBvQDrI5P/JfeN/0iNBP9na/8A91oEADUsKgACHvAABDs/AFhOJABxp7QAvkfB/8eepP86CKwATSEMAEE/AwCZTSH/rP5mAeTdBP9XHv4BkilW/4rM7/5sjRH/u/KHANLQfwBELQ7+SWA+AFE8GP+qBiT/A/kaACPVbQAWgTb/FSPh/+o9OP862QYAj3xYAOx+QgDRJrf/Iu4G/66RZgBfFtMAxA+Z/i5U6P91IpIB5/pK/xuGZAFcu8P/qsZwAHgcKgDRRkMAHVEfAB2oZAGpraAAayN1AD5gO/9RDEUBh+++/9z8EgCj3Dr/iYm8/1NmbQBgBkwA6t7S/7muzQE8ntX/DfHWAKyBjABdaPIAwJz7ACt1HgDhUZ4Af+jaAOIcywDpG5f/dSsF//IOL/8hFAYAifss/hsf9f+31n3+KHmVALqe1f9ZCOMARVgA/suH4QDJrssAk0e4ABJ5Kf5eBU4A4Nbw/iQFtAD7h+cBo4rUANL5dP5YgbsAEwgx/j4OkP+fTNMA1jNSAG115P5n38v/S/wPAZpH3P8XDVsBjahg/7W2hQD6MzcA6urU/q8/ngAn8DQBnr0k/9UoVQEgtPf/E2YaAVQYYf9FFd4AlIt6/9zV6wHoy/8AeTmTAOMHmgA1FpMBSAHhAFKGMP5TPJ3/kUipACJn7wDG6S8AdBME/7hqCf+3gVMAJLDmASJnSADbooYA9SqeACCVYP6lLJAAyu9I/teWBQAqQiQBhNevAFauVv8axZz/MeiH/me2UgD9gLABmbJ6APX6CgDsGLIAiWqEACgdKQAyHpj/fGkmAOa/SwCPK6oALIMU/ywNF//t/5sBn21k/3C1GP9o3GwAN9ODAGMM1f+Yl5H/7gWfAGGbCAAhbFEAAQNnAD5tIv/6m7QAIEfD/yZGkQGfX/UAReVlAYgc8ABP4BkATm55//iofAC7gPcAApPr/k8LhABGOgwBtQij/0+Jhf8lqgv/jfNV/7Dn1//MlqT/79cn/y5XnP4Io1j/rCLoAEIsZv8bNin+7GNX/yl7qQE0cisAdYYoAJuGGgDnz1v+I4Qm/xNmff4k44X/dgNx/x0NfACYYEoBWJLO/6e/3P6iElj/tmQXAB91NABRLmoBDAIHAEVQyQHR9qwADDCNAeDTWAB04p8AemKCAEHs6gHh4gn/z+J7AVnWOwBwh1gBWvTL/zELJgGBbLoAWXAPAWUuzP9/zC3+T//d/zNJEv9/KmX/8RXKAKDjBwBpMuwATzTF/2jK0AG0DxAAZcVO/2JNywApufEBI8F8ACObF//PNcAAC32jAfmeuf8EgzAAFV1v/z155wFFyCT/uTC5/2/uFf8nMhn/Y9ej/1fUHv+kkwX/gAYjAWzfbv/CTLIASmW0APMvMACuGSv/Uq39ATZywP8oN1sA12yw/ws4BwDg6UwA0WLK/vIZfQAswV3+ywixAIewEwBwR9X/zjuwAQRDGgAOj9X+KjfQ/zxDeADBFaMAY6RzAAoUdgCc1N7+oAfZ/3L1TAF1O3sAsMJW/tUPsABOzs/+1YE7AOn7FgFgN5j/7P8P/8VZVP9dlYUArqBxAOpjqf+YdFgAkKRT/18dxv8iLw//Y3iG/wXswQD5937/k7seADLmdf9s2dv/o1Gm/0gZqf6beU//HJtZ/gd+EQCTQSEBL+r9ABozEgBpU8f/o8TmAHH4pADi/toAvdHL/6T33v7/I6UABLzzAX+zRwAl7f7/ZLrwAAU5R/5nSEn/9BJR/uXShP/uBrT/C+Wu/+PdwAERMRwAo9fE/gl2BP8z8EcAcYFt/0zw5wC8sX8AfUcsARqv8wBeqRn+G+YdAA+LdwGoqrr/rMVM//xLvACJfMQASBZg/y2X+QHckWQAQMCf/3jv4gCBspIAAMB9AOuK6gC3nZIAU8fA/7isSP9J4YAATQb6/7pBQwBo9s8AvCCK/9oY8gBDilH+7YF5/xTPlgEpxxD/BhSAAJ92BQC1EI//3CYPABdAk/5JGg0AV+Q5Acx8gAArGN8A22PHABZLFP8TG34AnT7XAG4d5gCzp/8BNvy+AN3Mtv6znkH/UZ0DAMLanwCq3wAA4Asg/ybFYgCopCUAF1gHAaS6bgBgJIYA6vLlAPp5EwDy/nD/Ay9eAQnvBv9Rhpn+1v2o/0N84AD1X0oAHB4s/gFt3P+yWVkA/CRMABjGLv9MTW8AhuqI/ydeHQC5SOr/RkSH/+dmB/5N54wApy86AZRhdv8QG+EBps6P/26y1v+0g6IAj43hAQ3aTv9ymSEBYmjMAK9ydQGnzksAysRTATpAQwCKL28BxPeA/4ng4P6ecM8AmmT/AYYlawDGgE//f9Gb/6P+uf48DvMAH9tw/h3ZQQDIDXT+ezzE/+A7uP7yWcQAexBL/pUQzgBF/jAB53Tf/9GgQQHIUGIAJcK4/pQ/IgCL8EH/2ZCE/zgmLf7HeNIAbLGm/6DeBADcfnf+pWug/1Lc+AHxr4gAkI0X/6mKVACgiU7/4nZQ/zQbhP8/YIv/mPonALybDwDoM5b+KA/o//DlCf+Jrxv/S0lhAdrUCwCHBaIBa7nVAAL5a/8o8kYA28gZABmdDQBDUlD/xPkX/5EUlQAySJIAXkyUARj7QQAfwBcAuNTJ/3vpogH3rUgAolfb/n6GWQCfCwz+pmkdAEkb5AFxeLf/QqNtAdSPC/+f56gB/4BaADkOOv5ZNAr//QijAQCR0v8KgVUBLrUbAGeIoP5+vNH/IiNvANfbGP/UC9b+ZQV2AOjFhf/fp23/7VBW/0aLXgCewb8Bmw8z/w++cwBOh8//+QobAbV96QBfrA3+qtWh/yfsiv9fXVf/voBfAH0PzgCmlp8A4w+e/86eeP8qjYAAZbJ4AZxtgwDaDiz+96jO/9RwHABwEeT/WhAlAcXebAD+z1P/CVrz//P0rAAaWHP/zXR6AL/mwQC0ZAsB2SVg/5pOnADr6h//zrKy/5XA+wC2+ocA9hZpAHzBbf8C0pX/qRGqAABgbv91CQgBMnso/8G9YwAi46AAMFBG/tMz7AAtevX+LK4IAK0l6f+eQasAekXX/1pQAv+DamD+43KHAM0xd/6wPkD/UjMR//EU8/+CDQj+gNnz/6IbAf5advEA9sb2/zcQdv/In50AoxEBAIxreQBVoXb/JgCVAJwv7gAJpqYBS2K1/zJKGQBCDy8Ai+GfAEwDjv8O7rgAC881/7fAugGrIK7/v0zdAfeq2wAZrDL+2QnpAMt+RP+3XDAAf6e3AUEx/gAQP38B/hWq/zvgf/4WMD//G06C/ijDHQD6hHD+I8uQAGipqADP/R7/aCgm/l7kWADOEID/1Dd6/98W6gDfxX8A/bW1AZFmdgDsmST/1NlI/xQmGP6KPj4AmIwEAObcY/8BFdT/lMnnAPR7Cf4Aq9IAMzol/wH/Dv/0t5H+APKmABZKhAB52CkAX8Ny/oUYl/+c4uf/9wVN//aUc/7hXFH/3lD2/qp7Wf9Kx40AHRQI/4qIRv9dS1wA3ZMx/jR+4gDlfBcALgm1AM1ANAGD/hwAl57UAINATgDOGasAAOaLAL/9bv5n96cAQCgoASql8f87S+T+fPO9/8Rcsv+CjFb/jVk4AZPGBf/L+J7+kKKNAAus4gCCKhX/AaeP/5AkJP8wWKT+qKrcAGJH1gBb0E8An0zJAaYq1v9F/wD/BoB9/74BjACSU9r/1+5IAXp/NQC9dKX/VAhC/9YD0P/VboUAw6gsAZ7nRQCiQMj+WzpoALY6u/755IgAy4ZM/mPd6QBL/tb+UEWaAECY+P7siMr/nWmZ/pWvFAAWIxP/fHnpALr6xv6E5YsAiVCu/6V9RACQypT+6+/4AIe4dgBlXhH/ekhG/kWCkgB/3vgBRX92/x5S1/68ShP/5afC/nUZQv9B6jj+1RacAJc7Xf4tHBv/un6k/yAG7wB/cmMB2zQC/2Ngpv4+vn7/bN6oAUvirgDm4scAPHXa//z4FAHWvMwAH8KG/ntFwP+prST+N2JbAN8qZv6JAWYAnVoZAO96QP/8BukABzYU/1J0rgCHJTb/D7p9AONwr/9ktOH/Ku30//St4v74EiEAq2OW/0rrMv91UiD+aqjtAM9t0AHkCboAhzyp/rNcjwD0qmj/6y18/0ZjugB1ibcA4B/XACgJZAAaEF8BRNlXAAiXFP8aZDr/sKXLATR2RgAHIP7+9P71/6eQwv99cRf/sHm1AIhU0QCKBh7/WTAcACGbDv8Z8JoAjc1tAUZzPv8UKGv+iprH/17f4v+dqyYAo7EZ/i12A/8O3hcB0b5R/3Z76AEN1WX/ezd7/hv2pQAyY0z/jNYg/2FBQ/8YDBwArlZOAUD3YACgh0MAQjfz/5PMYP8aBiH/YjNTAZnV0P8CuDb/GdoLADFD9v4SlUj/DRlIACpP1gAqBCYBG4uQ/5W7FwASpIQA9VS4/njGaP9+2mAAOHXq/w0d1v5ELwr/p5qE/pgmxgBCsln/yC6r/w1jU//Su/3/qi0qAYrRfADWoo0ADOacAGYkcP4Dk0MANNd7/+mrNv9iiT4A99on/+fa7AD3v38Aw5JUAKWwXP8T1F7/EUrjAFgomQHGkwH/zkP1/vAD2v89jdX/YbdqAMPo6/5fVpoA0TDN/nbR8f/weN8B1R2fAKN/k/8N2l0AVRhE/kYUUP+9BYwBUmH+/2Njv/+EVIX/a9p0/3B6LgBpESAAwqA//0TeJwHY/VwAsWnN/5XJwwAq4Qv/KKJzAAkHUQCl2tsAtBYA/h2S/P+Sz+EBtIdgAB+jcACxC9v/hQzB/itOMgBBcXkBO9kG/25eGAFwrG8ABw9gACRVewBHlhX/0Em8AMALpwHV9SIACeZcAKKOJ//XWhsAYmFZAF5P0wBanfAAX9x+AWaw4gAkHuD+Ix9/AOfocwFVU4IA0kn1/y+Pcv9EQcUAO0g+/7eFrf5deXb/O7FR/+pFrf/NgLEA3PQzABr00QFJ3k3/owhg/paV0wCe/ssBNn+LAKHgOwAEbRb/3iot/9CSZv/sjrsAMs31/wpKWf4wT44A3kyC/x6mPwDsDA3/Mbj0ALtxZgDaZf0AmTm2/iCWKgAZxpIB7fE4AIxEBQBbpKz/TpG6/kM0zQDbz4EBbXMRADaPOgEV+Hj/s/8eAMHsQv8B/wf//cAw/xNF2QED1gD/QGWSAd99I//rSbP/+afiAOGvCgFhojoAanCrAVSsBf+FjLL/hvWOAGFaff+6y7n/300X/8BcagAPxnP/2Zj4AKuyeP/khjUAsDbBAfr7NQDVCmQBIsdqAJcf9P6s4Ff/Du0X//1VGv9/J3T/rGhkAPsORv/U0Ir//dP6ALAxpQAPTHv/Jdqg/1yHEAEKfnL/RgXg//f5jQBEFDwB8dK9/8PZuwGXA3EAl1yuAOc+sv/bt+EAFxch/821UAA5uPj/Q7QB/1p7Xf8nAKL/YPg0/1RCjAAif+T/wooHAaZuvAAVEZsBmr7G/9ZQO/8SB48ASB3iAcfZ+QDooUcBlb7JANmvX/5xk0P/io/H/3/MAQAdtlMBzuab/7rMPAAKfVX/6GAZ//9Z9//V/q8B6MFRABwrnP4MRQgAkxj4ABLGMQCGPCMAdvYS/zFY/v7kFbr/tkFwAdsWAf8WfjT/vTUx/3AZjwAmfzf/4mWj/tCFPf+JRa4BvnaR/zxi2//ZDfX/+ogKAFT+4gDJH30B8DP7/x+Dgv8CijL/19exAd8M7v/8lTj/fFtE/0h+qv53/2QAgofo/w5PsgD6g8UAisbQAHnYi/53EiT/HcF6ABAqLf/V8OsB5r6p/8Yj5P5urUgA1t3x/ziUhwDAdU7+jV3P/49BlQAVEmL/Xyz0AWq/TQD+VQj+1m6w/0mtE/6gxMf/7VqQAMGscf/Im4j+5FrdAIkxSgGk3df/0b0F/2nsN/8qH4EBwf/sAC7ZPACKWLv/4lLs/1FFl/+OvhABDYYIAH96MP9RQJwAq/OLAO0j9gB6j8H+1HqSAF8p/wFXhE0ABNQfABEfTgAnLa3+GI7Z/18JBv/jUwYAYjuC/j4eIQAIc9MBomGA/we4F/50HKj/+IqX/2L08AC6doIAcvjr/2mtyAGgfEf/XiSkAa9Bkv/u8ar+ysbFAORHiv4t9m3/wjSeAIW7sABT/Jr+Wb3d/6pJ/ACUOn0AJEQz/ipFsf+oTFb/JmTM/yY1IwCvE2EA4e79/1FRhwDSG//+60lrAAjPcwBSf4gAVGMV/s8TiABkpGUAUNBN/4TP7f8PAw//IaZuAJxfVf8luW8Blmoj/6aXTAByV4f/n8JAAAx6H//oB2X+rXdiAJpH3P6/OTX/qOig/+AgY//anKUAl5mjANkNlAHFcVkAlRyh/s8XHgBphOP/NuZe/4WtzP9ct53/WJD8/mYhWgCfYQMAtdqb//BydwBq1jX/pb5zAZhb4f9Yaiz/0D1xAJc0fAC/G5z/bjbsAQ4epv8nf88B5cccALzkvP5knesA9tq3AWsWwf/OoF8ATO+TAM+hdQAzpgL/NHUK/kk44/+YweEAhF6I/2W/0QAga+X/xiu0AWTSdgByQ5n/F1ga/1maXAHceIz/kHLP//xz+v8izkgAioV//wiyfAFXS2EAD+Vc/vBDg/92e+P+knho/5HV/wGBu0b/23c2AAETrQAtlpQB+FNIAMvpqQGOazgA9/kmAS3yUP8e6WcAYFJGABfJbwBRJx7/obdO/8LqIf9E44z+2M50AEYb6/9okE8ApOZd/taHnACau/L+vBSD/yRtrgCfcPEABW6VASSl2gCmHRMBsi5JAF0rIP74ve0AZpuNAMldw//xi/3/D29i/2xBo/6bT77/Sa7B/vYoMP9rWAv+ymFV//3MEv9x8kIAbqDC/tASugBRFTwAvGin/3ymYf7ShY4AOPKJ/ilvggBvlzoBb9WN/7es8f8mBsT/uQd7/y4L9gD1aXcBDwKh/wjOLf8Sykr/U3xzAdSNnQBTCNH+iw/o/6w2rf4y94QA1r3VAJC4aQDf/vgA/5Pw/xe8SAAHMzYAvBm0/ty0AP9ToBQAo73z/zrRwv9XSTwAahgxAPX53AAWracAdgvD/xN+7QBunyX/O1IvALS7VgC8lNABZCWF/wdwwQCBvJz/VGqB/4XhygAO7G//KBRlAKysMf4zNkr/+7m4/12b4P+0+eAB5rKSAEg5Nv6yPrgAd81IALnv/f89D9oAxEM4/+ogqwEu2+QA0Gzq/xQ/6P+lNccBheQF/zTNawBK7oz/lpzb/u+ssv/7vd/+II7T/9oPigHxxFAAHCRi/hbqxwA97dz/9jklAI4Rjv+dPhoAK+5f/gPZBv/VGfABJ9yu/5rNMP4TDcD/9CI2/owQmwDwtQX+m8E8AKaABP8kkTj/lvDbAHgzkQBSmSoBjOySAGtc+AG9CgMAP4jyANMnGAATyqEBrRu6/9LM7/4p0aL/tv6f/6x0NADDZ97+zUU7ADUWKQHaMMIAUNLyANK8zwC7oaH+2BEBAIjhcQD6uD8A3x5i/k2oogA7Na8AE8kK/4vgwgCTwZr/1L0M/gHIrv8yhXEBXrNaAK22hwBesXEAK1nX/4j8av97hlP+BfVC/1IxJwHcAuAAYYGxAE07WQA9HZsBy6vc/1xOiwCRIbX/qRiNATeWswCLPFD/2idhAAKTa/88+EgAreYvAQZTtv8QaaL+idRR/7S4hgEn3qT/3Wn7Ae9wfQA/B2EAP2jj/5Q6DABaPOD/VNT8AE/XqAD43ccBc3kBACSseAAgorv/OWsx/5MqFQBqxisBOUpXAH7LUf+Bh8MAjB+xAN2LwgAD3tcAg0TnALFWsv58l7QAuHwmAUajEQD5+7UBKjfjAOKhLAAX7G4AM5WOAV0F7ADat2r+QxhNACj10f/eeZkApTkeAFN9PABGJlIB5Qa8AG3enf83dj//zZe6AOMhlf/+sPYB47HjACJqo/6wK08Aal9OAbnxev+5Dj0AJAHKAA2yov/3C4QAoeZcAUEBuf/UMqUBjZJA/57y2gAVpH0A1Yt6AUNHVwDLnrIBl1wrAJhvBf8nA+//2f/6/7A/R/9K9U0B+q4S/yIx4//2Lvv/miMwAX2dPf9qJE7/YeyZAIi7eP9xhqv/E9XZ/the0f/8BT0AXgPKAAMat/9Avyv/HhcVAIGNTf9meAcBwkyMALyvNP8RUZQA6FY3AeEwrACGKir/7jIvAKkS/gAUk1f/DsPv/0X3FwDu5YD/sTFwAKhi+/95R/gA8wiR/vbjmf/bqbH++4ul/wyjuf+kKKv/mZ8b/vNtW//eGHABEtbnAGudtf7DkwD/wmNo/1mMvv+xQn7+arlCADHaHwD8rp4AvE/mAe4p4ADU6ggBiAu1AKZ1U/9Ew14ALoTJAPCYWACkOUX+oOAq/zvXQ/93w43/JLR5/s8vCP+u0t8AZcVE//9SjQH6iekAYVaFARBQRQCEg58AdF1kAC2NiwCYrJ3/WitbAEeZLgAnEHD/2Yhh/9zGGf6xNTEA3liG/4APPADPwKn/wHTR/2pO0wHI1bf/Bwx6/t7LPP8hbsf++2p1AOThBAF4Ogf/3cFU/nCFGwC9yMn/i4eWAOo3sP89MkEAmGyp/9xVAf9wh+MAohq6AM9guf70iGsAXZkyAcZhlwBuC1b/j3Wu/3PUyAAFyrcA7aQK/rnvPgDseBL+Yntj/6jJwv4u6tYAv4Ux/2OpdwC+uyMBcxUt//mDSABwBnv/1jG1/qbpIgBcxWb+/eTN/wM7yQEqYi4A2yUj/6nDJgBefMEBnCvfAF9Ihf54zr8AesXv/7G7T//+LgIB+qe+AFSBEwDLcab/+R+9/kidyv/QR0n/zxhIAAoQEgHSUUz/WNDA/37za//ujXj/x3nq/4kMO/8k3Hv/lLM8/vAMHQBCAGEBJB4m/3MBXf9gZ+f/xZ47AcCk8ADKyjn/GK4wAFlNmwEqTNcA9JfpABcwUQDvfzT+44Il//h0XQF8hHYArf7AAQbrU/9ur+cB+xy2AIH5Xf5UuIAATLU+AK+AugBkNYj+bR3iAN3pOgEUY0oAABagAIYNFQAJNDf/EVmMAK8iOwBUpXf/4OLq/wdIpv97c/8BEtb2APoHRwHZ3LkA1CNM/yZ9rwC9YdIAcu4s/ym8qf4tupoAUVwWAISgwQB50GL/DVEs/8ucUgBHOhX/0HK//jImkwCa2MMAZRkSADz61//phOv/Z6+OARAOXACNH27+7vEt/5nZ7wFhqC//+VUQARyvPv85/jYA3ud+AKYtdf4SvWD/5EwyAMj0XgDGmHgBRCJF/wxBoP5lE1oAp8V4/0Q2uf8p2rwAcagwAFhpvQEaUiD/uV2kAeTw7f9CtjUAq8Vc/2sJ6QHHeJD/TjEK/22qaf9aBB//HPRx/0o6CwA+3Pb/eZrI/pDSsv9+OYEBK/oO/2VvHAEvVvH/PUaW/zVJBf8eGp4A0RpWAIrtSgCkX7wAjjwd/qJ0+P+7r6AAlxIQANFvQf7Lhif/WGwx/4MaR//dG9f+aGld/x/sH/6HANP/j39uAdRJ5QDpQ6f+wwHQ/4QR3f8z2VoAQ+sy/9/SjwCzNYIB6WrGANmt3P9w5Rj/r5pd/kfL9v8wQoX/A4jm/xfdcf7rb9UAqnhf/vvdAgAtgp7+aV7Z//I0tP7VRC3/aCYcAPSeTAChyGD/zzUN/7tDlACqNvgAd6Ky/1MUCwAqKsABkp+j/7fobwBN5RX/RzWPABtMIgD2iC//2ye2/1zgyQETjg7/Rbbx/6N29QAJbWoBqrX3/04v7v9U0rD/1WuLACcmCwBIFZYASIJFAM1Nm/6OhRUAR2+s/uIqO/+zANcBIYDxAOr8DQG4TwgAbh5J//aNvQCqz9oBSppF/4r2Mf+bIGQAfUpp/1pVPf8j5bH/Pn3B/5lWvAFJeNQA0Xv2/ofRJv+XOiwBXEXW/w4MWP/8mab//c9w/zxOU//jfG4AtGD8/zV1If6k3FL/KQEb/yakpv+kY6n+PZBG/8CmEgBr+kIAxUEyAAGzEv//aAH/K5kj/1BvqABur6gAKWkt/9sOzf+k6Yz+KwF2AOlDwwCyUp//ild6/9TuWv+QI3z+GYykAPvXLP6FRmv/ZeNQ/lypNwDXKjEAcrRV/yHoGwGs1RkAPrB7/iCFGP/hvz4AXUaZALUqaAEWv+D/yMiM//nqJQCVOY0AwzjQ//6CRv8grfD/HdzHAG5kc/+E5fkA5Onf/yXY0f6ysdH/ty2l/uBhcgCJYaj/4d6sAKUNMQHS68z//AQc/kaglwDovjT+U/hd/z7XTQGvr7P/oDJCAHkw0AA/qdH/ANLIAOC7LAFJolIACbCP/xNMwf8dO6cBGCuaABy+vgCNvIEA6OvL/+oAbf82QZ8APFjo/3n9lv786YP/xm4pAVNNR//IFjv+av3y/xUMz//tQr0AWsbKAeGsfwA1FsoAOOaEAAFWtwBtvioA80SuAW3kmgDIsXoBI6C3/7EwVf9a2qn/+JhOAMr+bgAGNCsAjmJB/z+RFgBGal0A6IprAW6zPf/TgdoB8tFcACNa2QG2j2r/dGXZ/3L63f+tzAYAPJajAEmsLP/vblD/7UyZ/qGM+QCV6OUAhR8o/66kdwBxM9YAgeQC/kAi8wBr4/T/rmrI/1SZRgEyIxAA+krY/uy9Qv+Z+Q0A5rIE/90p7gB243n/XleM/v53XABJ7/b+dVeAABPTkf+xLvwA5Vv2AUWA9//KTTYBCAsJ/5lgpgDZ1q3/hsACAQDPAAC9rmsBjIZkAJ7B8wG2ZqsA65ozAI4Fe/88qFkB2Q5c/xPWBQHTp/4ALAbK/ngS7P8Pcbj/uN+LACixd/62e1r/sKWwAPdNwgAb6ngA5wDW/zsnHgB9Y5H/lkREAY3e+ACZe9L/bn+Y/+Uh1gGH3cUAiWECAAyPzP9RKbwAc0+C/14DhACYr7v/fI0K/37As/8LZ8YAlQYtANtVuwHmErL/SLaYAAPGuP+AcOABYaHmAP5jJv86n8UAl0LbADtFj/+5cPkAd4gv/3uChACoR1//cbAoAei5rQDPXXUBRJ1s/2YFk/4xYSEAWUFv/vceo/982d0BZvrYAMauS/45NxIA4wXsAeXVrQDJbdoBMenvAB43ngEZsmoAm2+8AV5+jADXH+4BTfAQANXyGQEmR6gAzbpd/jHTjP/bALT/hnalAKCThv9uuiP/xvMqAPOSdwCG66MBBPGH/8Euwf5ntE//4QS4/vJ2ggCSh7AB6m8eAEVC1f4pYHsAeV4q/7K/w/8ugioAdVQI/+kx1v7uem0ABkdZAezTewD0DTD+d5QOAHIcVv9L7Rn/keUQ/oFkNf+Glnj+qJ0yABdIaP/gMQ4A/3sW/5e5l/+qULgBhrYUAClkZQGZIRAATJpvAVbO6v/AoKT+pXtd/wHYpP5DEa//qQs7/54pPf9JvA7/wwaJ/xaTHf8UZwP/9oLj/3oogADiLxj+IyQgAJi6t/9FyhQAw4XDAN4z9wCpq14BtwCg/0DNEgGcUw//xTr5/vtZbv8yClj+MyvYAGLyxgH1l3EAq+zCAcUfx//lUSYBKTsUAP1o5gCYXQ7/9vKS/tap8P/wZmz+oKfsAJravACW6cr/GxP6AQJHhf+vDD8BkbfGAGh4c/+C+/cAEdSn/z57hP/3ZL0Am9+YAI/FIQCbOyz/ll3wAX8DV/9fR88Bp1UB/7yYdP8KFxcAicNdATZiYQDwAKj/lLx/AIZrlwBM/asAWoTAAJIWNgDgQjb+5rrl/ye2xACU+4L/QYNs/oABoACpMaf+x/6U//sGgwC7/oH/VVI+ALIXOv/+hAUApNUnAIb8kv4lNVH/m4ZSAM2n7v9eLbT/hCihAP5vcAE2S9kAs+bdAetev/8X8zABypHL/yd2Kv91jf0A/gDeACv7MgA2qeoBUETQAJTL8/6RB4cABv4AAPy5fwBiCIH/JiNI/9Mk3AEoGlkAqEDF/gPe7/8CU9f+tJ9pADpzwgC6dGr/5ffb/4F2wQDKrrcBpqFIAMlrk/7tiEoA6eZqAWlvqABA4B4BAeUDAGaXr//C7uT//vrUALvteQBD+2ABxR4LALdfzADNWYoAQN0lAf/fHv+yMNP/8cha/6fRYP85gt0ALnLI/z24QgA3thj+brYhAKu+6P9yXh8AEt0IAC/n/gD/cFMAdg/X/60ZKP7AwR//7hWS/6vBdv9l6jX+g9RwAFnAawEI0BsAtdkP/+eV6ACM7H4AkAnH/wxPtf6Ttsr/E222/zHU4QBKo8sAr+mUABpwMwDBwQn/D4f5AJbjggDMANsBGPLNAO7Qdf8W9HAAGuUiACVQvP8mLc7+8Frh/x0DL/8q4EwAuvOnACCED/8FM30Ai4cYAAbx2wCs5YX/9tYyAOcLz/+/flMBtKOq//U4GAGypNP/AxDKAWI5dv+Ng1n+ITMYAPOVW//9NA4AI6lD/jEeWP+zGyT/pYy3ADq9lwBYHwAAS6lCAEJlx/8Y2McBecQa/w5Py/7w4lH/XhwK/1PB8P/MwYP/Xg9WANoonQAzwdEAAPKxAGa59wCebXQAJodbAN+vlQDcQgH/VjzoABlgJf/heqIB17uo/56dLgA4q6IA6PBlAXoWCQAzCRX/NRnu/9ke6P59qZQADehmAJQJJQClYY0B5IMpAN4P8//+EhEABjztAWoDcQA7hL0AXHAeAGnQ1QAwVLP/u3nn/hvYbf+i3Wv+Se/D//ofOf+Vh1n/uRdzAQOjnf8ScPoAGTm7/6FgpAAvEPMADI37/kPquP8pEqEArwZg/6CsNP4YsLf/xsFVAXx5if+XMnL/3Ms8/8/vBQEAJmv/N+5e/kaYXgDV3E0BeBFF/1Wkvv/L6lEAJjEl/j2QfACJTjH+qPcwAF+k/ABpqYcA/eSGAECmSwBRSRT/z9IKAOpqlv9eIlr//p85/tyFYwCLk7T+GBe5ACk5Hv+9YUwAQbvf/+CsJf8iPl8B55DwAE1qfv5AmFsAHWKbAOL7Nf/q0wX/kMve/6Sw3f4F5xgAs3rNACQBhv99Rpf+YeT8AKyBF/4wWtH/luBSAVSGHgDxxC4AZ3Hq/y5lef4ofPr/hy3y/gn5qP+MbIP/j6OrADKtx/9Y3o7/yF+eAI7Ao/8HdYcAb3wWAOwMQf5EJkH/467+APT1JgDwMtD/oT/6ADzR7wB6IxMADiHm/gKfcQBqFH//5M1gAInSrv601JD/WWKaASJYiwCnonABQW7FAPElqQBCOIP/CslT/oX9u/+xcC3+xPsAAMT6l//u6Nb/ltHNABzwdgBHTFMB7GNbACr6gwFgEkD/dt4jAHHWy/96d7j/QhMkAMxA+QCSWYsAhj6HAWjpZQC8VBoAMfmBANDWS//Pgk3/c6/rAKsCif+vkboBN/WH/5pWtQFkOvb/bcc8/1LMhv/XMeYBjOXA/97B+/9RiA//s5Wi/xcnHf8HX0v+v1HeAPFRWv9rMcn/9NOdAN6Mlf9B2zj+vfZa/7I7nQEw2zQAYiLXABwRu/+vqRgAXE+h/+zIwgGTj+oA5eEHAcWoDgDrMzUB/XiuAMUGqP/KdasAoxXOAHJVWv8PKQr/whNjAEE32P6iknQAMs7U/0CSHf+enoMBZKWC/6wXgf99NQn/D8ESARoxC/+1rskBh8kO/2QTlQDbYk8AKmOP/mAAMP/F+VP+aJVP/+tuiP5SgCz/QSkk/ljTCgC7ebsAYobHAKu8s/7SC+7/QnuC/jTqPQAwcRf+BlZ4/3ey9QBXgckA8o3RAMpyVQCUFqEAZ8MwABkxq/+KQ4IAtkl6/pQYggDT5ZoAIJueAFRpPQCxwgn/pllWATZTuwD5KHX/bQPX/zWSLAE/L7MAwtgD/g5UiACIsQ3/SPO6/3URff/TOtP/XU/fAFpY9f+L0W//Rt4vAAr2T//G2bIA4+ELAU5+s/8+K34AZ5QjAIEIpf718JQAPTOOAFHQhgAPiXP/03fs/5/1+P8Choj/5os6AaCk/gByVY3/Maa2/5BGVAFVtgcALjVdAAmmof83orL/Lbi8AJIcLP6pWjEAeLLxAQ57f/8H8ccBvUIy/8aPZf6984f/jRgY/kthVwB2+5oB7TacAKuSz/+DxPb/iEBxAZfoOQDw2nMAMT0b/0CBSQH8qRv/KIQKAVrJwf/8efABus4pACvGYQCRZLcAzNhQ/qyWQQD55cT+aHtJ/01oYP6CtAgAaHs5ANzK5f9m+dMAVg7o/7ZO0QDv4aQAag0g/3hJEf+GQ+kAU/61ALfscAEwQIP/8djz/0HB4gDO8WT+ZIam/+3KxQA3DVEAIHxm/yjksQB2tR8B56CG/3e7ygAAjjz/gCa9/6bJlgDPeBoBNrisAAzyzP6FQuYAIiYfAbhwUAAgM6X+v/M3ADpJkv6bp83/ZGiY/8X+z/+tE/cA7grKAO+X8gBeOyf/8B1m/wpcmv/lVNv/oYFQANBazAHw267/nmaRATWyTP80bKgBU95rANMkbQB2OjgACB0WAO2gxwCq0Z0AiUcvAI9WIADG8gIA1DCIAVysugDml2kBYL/lAIpQv/7w2IL/YisG/qjEMQD9ElsBkEl5AD2SJwE/aBj/uKVw/n7rYgBQ1WL/ezxX/1KM9QHfeK3/D8aGAc487wDn6lz/Ie4T/6VxjgGwdyYAoCum/u9baQBrPcIBGQREAA+LMwCkhGr/InQu/qhfxQCJ1BcASJw6AIlwRf6WaZr/7MmdABfUmv+IUuP+4jvd/1+VwABRdjT/ISvXAQ6TS/9ZnHn+DhJPAJPQiwGX2j7/nFgIAdK4Yv8Ur3v/ZlPlANxBdAGW+gT/XI7c/yL3Qv/M4bP+l1GXAEco7P+KPz4ABk/w/7e5tQB2MhsAP+PAAHtjOgEy4Jv/EeHf/tzgTf8OLHsBjYCvAPjUyACWO7f/k2EdAJbMtQD9JUcAkVV3AJrIugACgPn/Uxh8AA5XjwCoM/UBfJfn/9DwxQF8vrkAMDr2ABTp6AB9EmL/Df4f//Wxgv9sjiMAq33y/owMIv+loaIAzs1lAPcZIgFkkTkAJ0Y5AHbMy//yAKIApfQeAMZ04gCAb5n/jDa2ATx6D/+bOjkBNjLGAKvTHf9riqf/rWvH/22hwQBZSPL/znNZ//r+jv6xyl7/UVkyAAdpQv8Z/v/+y0AX/0/ebP8n+UsA8XwyAO+YhQDd8WkAk5diANWhef7yMYkA6SX5/iq3GwC4d+b/2SCj/9D75AGJPoP/T0AJ/l4wcQARijL+wf8WAPcSxQFDN2gAEM1f/zAlQgA3nD8BQFJK/8g1R/7vQ30AGuDeAN+JXf8e4Mr/CdyEAMYm6wFmjVYAPCtRAYgcGgDpJAj+z/KUAKSiPwAzLuD/cjBP/wmv4gDeA8H/L6Do//9daf4OKuYAGopSAdAr9AAbJyb/YtB//0CVtv8F+tEAuzwc/jEZ2v+pdM3/dxJ4AJx0k/+ENW3/DQrKAG5TpwCd24n/BgOC/zKnHv88ny//gYCd/l4DvQADpkQAU9/XAJZawgEPqEEA41Mz/82rQv82uzwBmGYt/3ea4QDw94gAZMWy/4tH3//MUhABKc4q/5zA3f/Ye/T/2tq5/7u67//8rKD/wzQWAJCutf67ZHP/006w/xsHwQCT1Wj/WskK/1B7QgEWIboAAQdj/h7OCgDl6gUANR7SAIoI3P5HN6cASOFWAXa+vAD+wWUBq/ms/16et/5dAmz/sF1M/0ljT/9KQIH+9i5BAGPxf/72l2b/LDXQ/jtm6gCar6T/WPIgAG8mAQD/tr7/c7AP/qk8gQB67fEAWkw/AD5KeP96w24AdwSyAN7y0gCCIS7+nCgpAKeScAExo2//ebDrAEzPDv8DGcYBKevVAFUk1gExXG3/yBge/qjswwCRJ3wB7MOVAFokuP9DVar/JiMa/oN8RP/vmyP/NsmkAMQWdf8xD80AGOAdAX5xkAB1FbYAy5+NAN+HTQCw5rD/vuXX/2Mltf8zFYr/Gb1Z/zEwpf6YLfcAqmzeAFDKBQAbRWf+zBaB/7T8Pv7SAVv/km7+/9uiHADf/NUBOwghAM4Q9ACB0zAAa6DQAHA70QBtTdj+IhW5//ZjOP+zixP/uR0y/1RZEwBK+mL/4SrI/8DZzf/SEKcAY4RfASvmOQD+C8v/Y7w//3fB+/5QaTYA6LW9AbdFcP/Qq6X/L220/3tTpQCSojT/mgsE/5fjWv+SiWH+Pekp/14qN/9spOwAmET+AAqMg/8Kak/+856JAEOyQv6xe8b/Dz4iAMVYKv+VX7H/mADG/5X+cf/hWqP/fdn3ABIR4ACAQnj+wBkJ/zLdzQAx1EYA6f+kAALRCQDdNNv+rOD0/144zgHyswL/H1ukAeYuiv+95twAOS89/28LnQCxW5gAHOZiAGFXfgDGWZH/p09rAPlNoAEd6eb/lhVW/jwLwQCXJST+uZbz/+TUUwGsl7QAyambAPQ86gCO6wQBQ9o8AMBxSwF088//QaybAFEenP9QSCH+Eudt/45rFf59GoT/sBA7/5bJOgDOqckA0HniACisDv+WPV7/ODmc/408kf8tbJX/7pGb/9FVH/7ADNIAY2Jd/pgQlwDhudwAjess/6CsFf5HGh//DUBd/hw4xgCxPvgBtgjxAKZllP9OUYX/gd7XAbypgf/oB2EAMXA8/9nl+wB3bIoAJxN7/oMx6wCEVJEAguaU/xlKuwAF9Tb/udvxARLC5P/xymYAaXHKAJvrTwAVCbL/nAHvAMiUPQBz99L/Md2HADq9CAEjLgkAUUEF/zSeuf99dC7/SowN/9JcrP6TF0cA2eD9/nNstP+ROjD+27EY/5z/PAGak/IA/YZXADVL5QAww97/H68y/5zSeP/QI97/EvizAQIKZf+dwvj/nsxl/2j+xf9PPgQAsqxlAWCS+/9BCpwAAoml/3QE5wDy1wEAEyMd/yuhTwA7lfYB+0KwAMghA/9Qbo7/w6ERAeQ4Qv97L5H+hASkAEOurAAZ/XIAV2FXAfrcVABgW8j/JX07ABNBdgChNPH/7awG/7C///8BQYL+377mAGX95/+SI20A+h1NATEAEwB7WpsBFlYg/9rVQQBvXX8APF2p/wh/tgARug7+/Yn2/9UZMP5M7gD/+FxG/2PgiwC4Cf8BB6TQAM2DxgFX1scAgtZfAN2V3gAXJqv+xW7VACtzjP7XsXYAYDRCAXWe7QAOQLb/Lj+u/55fvv/hzbH/KwWO/6xj1P/0u5MAHTOZ/+R0GP4eZc8AE/aW/4bnBQB9huIBTUFiAOyCIf8Fbj4ARWx//wdxFgCRFFP+wqHn/4O1PADZ0bH/5ZTU/gODuAB1sbsBHA4f/7BmUAAyVJf/fR82/xWdhf8Ts4sB4OgaACJ1qv+n/Kv/SY3O/oH6IwBIT+wB3OUU/ynKrf9jTO7/xhbg/2zGw/8kjWAB7J47/2pkVwBu4gIA4+reAJpdd/9KcKT/Q1sC/xWRIf9m1on/r+Zn/qP2pgBd93T+p+Ac/9wCOQGrzlQAe+QR/xt4dwB3C5MBtC/h/2jIuf6lAnIATU7UAC2asf8YxHn+Up22AFoQvgEMk8UAX++Y/wvrRwBWknf/rIbWADyDxACh4YEAH4J4/l/IMwBp59L/OgmU/yuo3f987Y4AxtMy/i71ZwCk+FQAmEbQ/7R1sQBGT7kA80ogAJWczwDFxKEB9TXvAA9d9v6L8DH/xFgk/6ImewCAyJ0Brkxn/62pIv7YAav/cjMRAIjkwgBuljj+avafABO4T/+WTfD/m1CiAAA1qf8dl1YARF4QAFwHbv5idZX/+U3m//0KjADWfFz+I3brAFkwOQEWNaYAuJA9/7P/wgDW+D3+O272AHkVUf6mA+QAakAa/0Xohv/y3DX+LtxVAHGV9/9hs2f/vn8LAIfRtgBfNIEBqpDO/3rIzP+oZJIAPJCV/kY8KAB6NLH/9tNl/67tCAAHM3gAEx+tAH7vnP+PvcsAxIBY/+mF4v8efa3/yWwyAHtkO//+owMB3ZS1/9aIOf7etIn/z1g2/xwh+/9D1jQB0tBkAFGqXgCRKDUA4G/n/iMc9P/ix8P+7hHmANnZpP6pnd0A2i6iAcfPo/9sc6IBDmC7/3Y8TAC4n5gA0edH/iqkuv+6mTP+3au2/6KOrQDrL8EAB4sQAV+kQP8Q3aYA28UQAIQdLP9kRXX/POtY/ihRrQBHvj3/u1idAOcLFwDtdaQA4ajf/5pydP+jmPIBGCCqAH1icf6oE0wAEZ3c/ps0BQATb6H/R1r8/61u8AAKxnn//f/w/0J70gDdwtf+eaMR/+EHYwC+MbYAcwmFAegaiv/VRIQALHd6/7NiMwCVWmoARzLm/wqZdv+xRhkApVfNADeK6gDuHmEAcZvPAGKZfwAia9v+dXKs/0y0//7yObP/3SKs/jiiMf9TA///cd29/7wZ5P4QWFn/RxzG/hYRlf/zef7/a8pj/wnODgHcL5kAa4knAWExwv+VM8X+ujoL/2sr6AHIBg7/tYVB/t3kq/97PucB4+qz/yK91P70u/kAvg1QAYJZAQDfha0ACd7G/0J/SgCn2F3/m6jGAUKRAABEZi4BrFqaANiAS/+gKDMAnhEbAXzwMQDsyrD/l3zA/ybBvgBftj0Ao5N8//+lM/8cKBH+12BOAFaR2v4fJMr/VgkFAG8pyP/tbGEAOT4sAHW4DwEt8XQAmAHc/52lvAD6D4MBPCx9/0Hc+/9LMrgANVqA/+dQwv+IgX8BFRK7/y06of9HkyIArvkL/iONHQDvRLH/c246AO6+sQFX9ab/vjH3/5JTuP+tDif/ktdoAI7feACVyJv/1M+RARC12QCtIFf//yO1AHffoQHI317/Rga6/8BDVf8yqZgAkBp7/zjzs/4URIgAJ4y8/v3QBf/Ic4cBK6zl/5xouwCX+6cANIcXAJeZSACTxWv+lJ4F/+6PzgB+mYn/WJjF/gdEpwD8n6X/7042/xg/N/8m3l4A7bcM/87M0gATJ/b+HkrnAIdsHQGzcwAAdXZ0AYQG/P+RgaEBaUONAFIl4v/u4uT/zNaB/qJ7ZP+5eeoALWznAEIIOP+EiIAArOBC/q+dvADm3+L+8ttFALgOdwFSojgAcnsUAKJnVf8x72P+nIfXAG//p/4nxNYAkCZPAfmofQCbYZz/FzTb/5YWkAAslaX/KH+3AMRN6f92gdL/qofm/9Z3xgDp8CMA/TQH/3VmMP8VzJr/s4ix/xcCAwGVgln//BGfAUY8GgCQaxEAtL48/zi2O/9uRzb/xhKB/5XgV//fFZj/iha2//qczQDsLdD/T5TyAWVG0QBnTq4AZZCs/5iI7QG/wogAcVB9AZgEjQCbljX/xHT1AO9ySf4TUhH/fH3q/yg0vwAq0p7/m4SlALIFKgFAXCj/JFVN/7LkdgCJQmD+c+JCAG7wRf6Xb1AAp67s/+Nsa/+88kH/t1H/ADnOtf8vIrX/1fCeAUdLXwCcKBj/ZtJRAKvH5P+aIikA469LABXvwwCK5V8BTMAxAHV7VwHj4YIAfT4//wLGqwD+JA3+kbrOAJT/9P8jAKYAHpbbAVzk1ABcxjz+PoXI/8kpOwB97m3/tKPuAYx6UgAJFlj/xZ0v/5leOQBYHrYAVKFVALKSfACmpgf/FdDfAJy28gCbebkAU5yu/poQdv+6U+gB3zp5/x0XWAAjfX//qgWV/qQMgv+bxB0AoWCIAAcjHQGiJfsAAy7y/wDZvAA5ruIBzukCADm7iP57vQn/yXV//7okzADnGdgAUE5pABOGgf+Uy0QAjVF9/vilyP/WkIcAlzem/ybrWwAVLpoA3/6W/yOZtP99sB0BK2Ie/9h65v/poAwAObkM/vBxB/8FCRD+GltsAG3GywAIkygAgYbk/3y6KP9yYoT+poQXAGNFLAAJ8u7/uDU7AISBZv80IPP+k9/I/3tTs/6HkMn/jSU4AZc84/9aSZwBy6y7AFCXL/9eief/JL87/+HRtf9K19X+Bnaz/5k2wQEyAOcAaJ1IAYzjmv+24hD+YOFc/3MUqv4G+k4A+Eut/zVZBv8AtHYASK0BAEAIzgGuhd8AuT6F/9YLYgDFH9AAq6f0/xbntQGW2rkA96lhAaWL9/8veJUBZ/gzADxFHP4Zs8QAfAfa/jprUQC46Zz//EokAHa8QwCNXzX/3l6l/i49NQDOO3P/L+z6/0oFIAGBmu7/aiDiAHm7Pf8DpvH+Q6qs/x3Ysv8XyfwA/W7zAMh9OQBtwGD/NHPuACZ58//JOCEAwnaCAEtgGf+qHub+Jz/9ACQt+v/7Ae8AoNRcAS3R7QDzIVf+7VTJ/9QSnf7UY3//2WIQ/ous7wCoyYL/j8Gp/+6XwQHXaCkA7z2l/gID8gAWy7H+scwWAJWB1f4fCyn/AJ95/qAZcv+iUMgAnZcLAJqGTgHYNvwAMGeFAGncxQD9qE3+NbMXABh58AH/LmD/azyH/mLN+f8/+Xf/eDvT/3K0N/5bVe0AldRNAThJMQBWxpYAXdGgAEXNtv/0WisAFCSwAHp03QAzpycB5wE//w3FhgAD0SL/hzvKAKdkTgAv30wAuTw+ALKmewGEDKH/Pa4rAMNFkAB/L78BIixOADnqNAH/Fij/9l6SAFPkgAA8TuD/AGDS/5mv7ACfFUkAtHPE/oPhagD/p4YAnwhw/3hEwv+wxMb/djCo/12pAQBwyGYBShj+ABONBP6OPj8Ag7O7/02cm/93VqQAqtCS/9CFmv+Umzr/onjo/vzVmwDxDSoAXjKDALOqcACMU5f/N3dUAYwj7/+ZLUMB7K8nADaXZ/+eKkH/xO+H/lY1ywCVYS/+2CMR/0YDRgFnJFr/KBqtALgwDQCj29n/UQYB/92qbP7p0F0AZMn5/lYkI//Rmh4B48n7/wK9p/5kOQMADYApAMVkSwCWzOv/ka47AHj4lf9VN+EActI1/sfMdwAO90oBP/uBAENolwGHglAAT1k3/3Xmnf8ZYI8A1ZEFAEXxeAGV81//cioUAINIAgCaNRT/ST5tAMRmmAApDMz/eiYLAfoKkQDPfZQA9vTe/ykgVQFw1X4AovlWAUfGf/9RCRUBYicE/8xHLQFLb4kA6jvnACAwX//MH3IBHcS1/zPxp/5dbY4AaJAtAOsMtf80cKQATP7K/64OogA965P/K0C5/ul92QDzWKf+SjEIAJzMQgB81nsAJt12AZJw7AByYrEAl1nHAFfFcAC5laEALGClAPizFP+829j+KD4NAPOOjQDl487/rMoj/3Ww4f9SbiYBKvUO/xRTYQAxqwoA8nd4ABnoPQDU8JP/BHM4/5ER7/7KEfv/+RL1/2N17wC4BLP/9u0z/yXvif+mcKb/Ubwh/7n6jv82u60A0HDJAPYr5AFouFj/1DTE/zN1bP/+dZsALlsP/1cOkP9X48wAUxpTAZ9M4wCfG9UBGJdsAHWQs/6J0VIAJp8KAHOFyQDftpwBbsRd/zk86QAFp2n/msWkAGAiuv+ThSUB3GO+AAGnVP8UkasAwsX7/l9Ohf/8+PP/4V2D/7uGxP/YmaoAFHae/owBdgBWng8BLdMp/5MBZP5xdEz/039sAWcPMADBEGYBRTNf/2uAnQCJq+kAWnyQAWqhtgCvTOwByI2s/6M6aADptDT/8P0O/6Jx/v8m74r+NC6mAPFlIf6DupwAb9A+/3xeoP8frP4AcK44/7xjG/9DivsAfTqAAZyYrv+yDPf//FSeAFLFDv6syFP/JScuAWrPpwAYvSIAg7KQAM7VBACh4tIASDNp/2Etu/9OuN//sB37AE+gVv90JbIAUk3VAVJUjf/iZdQBr1jH//Ve9wGsdm3/prm+AIO1eABX/l3/hvBJ/yD1j/+Lomf/s2IS/tnMcACT33j/NQrzAKaMlgB9UMj/Dm3b/1vaAf/8/C/+bZx0/3MxfwHMV9P/lMrZ/xpV+f8O9YYBTFmp//It5gA7Yqz/ckmE/k6bMf+eflQAMa8r/xC2VP+dZyMAaMFt/0PdmgDJrAH+CKJYAKUBHf99m+X/HprcAWfvXADcAW3/ysYBAF4CjgEkNiwA6+Ke/6r71v+5TQkAYUryANujlf/wI3b/33JY/sDHAwBqJRj/yaF2/2FZYwHgOmf/ZceT/t48YwDqGTsBNIcbAGYDW/6o2OsA5eiIAGg8gQAuqO4AJ79DAEujLwCPYWL/ONioAajp/P8jbxb/XFQrABrIVwFb/ZgAyjhGAI4ITQBQCq8B/MdMABZuUv+BAcIAC4A9AVcOkf/93r4BD0iuAFWjVv46Yyz/LRi8/hrNDwAT5dL++EPDAGNHuACaxyX/l/N5/yYzS//JVYL+LEH6ADmT8/6SKzv/WRw1ACFUGP+zMxL+vUZTAAucswFihncAnm9vAHeaSf/IP4z+LQ0N/5rAAv5RSCoALqC5/ixwBgCS15UBGrBoAEQcVwHsMpn/s4D6/s7Bv/+mXIn+NSjvANIBzP6orSMAjfMtASQybf8P8sL/4596/7Cvyv5GOUgAKN84ANCiOv+3Yl0AD28MAB4ITP+Ef/b/LfJnAEW1D/8K0R4AA7N5APHo2gF7x1j/AtLKAbyCUf9eZdABZyQtAEzBGAFfGvH/paK7ACRyjADKQgX/JTiTAJgL8wF/Vej/+ofUAbmxcQBa3Ev/RfiSADJvMgBcFlAA9CRz/qNkUv8ZwQYBfz0kAP1DHv5B7Kr/oRHX/j+vjAA3fwQAT3DpAG2gKACPUwf/QRru/9mpjP9OXr3/AJO+/5NHuv5qTX//6Z3pAYdX7f/QDewBm20k/7Rk2gC0oxIAvm4JARE/e/+ziLT/pXt7/5C8Uf5H8Gz/GXAL/+PaM/+nMur/ck9s/x8Tc/+38GMA41eP/0jZ+P9mqV8BgZWVAO6FDAHjzCMA0HMaAWYI6gBwWI8BkPkOAPCerP5kcHcAwo2Z/ig4U/95sC4AKjVM/56/mgBb0VwArQ0QAQVI4v/M/pUAULjPAGQJev52Zav//MsA/qDPNgA4SPkBOIwN/wpAa/5bZTT/4bX4AYv/hADmkREA6TgXAHcB8f/VqZf/Y2MJ/rkPv/+tZ20Brg37/7JYB/4bO0T/CiEC//hhOwAaHpIBsJMKAF95zwG8WBgAuV7+/nM3yQAYMkYAeDUGAI5CkgDk4vn/aMDeAa1E2wCiuCT/j2aJ/50LFwB9LWIA613h/jhwoP9GdPMBmfk3/4EnEQHxUPQAV0UVAV7kSf9OQkH/wuPnAD2SV/+tmxf/cHTb/tgmC/+DuoUAXtS7AGQvWwDM/q//3hLX/q1EbP/j5E//Jt3VAKPjlv4fvhIAoLMLAQpaXv/crlgAo9Pl/8eINACCX93/jLzn/otxgP91q+z+MdwU/zsUq//kbbwAFOEg/sMQrgDj/ogBhydpAJZNzv/S7uIAN9SE/u85fACqwl3/+RD3/xiXPv8KlwoAT4uy/3jyygAa29UAPn0j/5ACbP/mIVP/US3YAeA+EQDW2X0AYpmZ/7Owav6DXYr/bT4k/7J5IP94/EYA3PglAMxYZwGA3Pv/7OMHAWoxxv88OGsAY3LuANzMXgFJuwEAWZoiAE7Zpf8Ow/n/Ceb9/82H9QAa/Af/VM0bAYYCcAAlniAA51vt/7+qzP+YB94AbcAxAMGmkv/oE7X/aY40/2cQGwH9yKUAw9kE/zS9kP97m6D+V4I2/054Pf8OOCkAGSl9/1eo9QDWpUYA1KkG/9vTwv5IXaT/xSFn/yuOjQCD4awA9GkcAERE4QCIVA3/gjko/otNOABUljUANl+dAJANsf5fc7oAdRd2//Sm8f8LuocAsmrL/2HaXQAr/S0ApJgEAIt27wBgARj+65nT/6huFP8y77AAcinoAMH6NQD+oG/+iHop/2FsQwDXmBf/jNHUACq9owDKKjL/amq9/75E2f/pOnUA5dzzAcUDBAAleDb+BJyG/yQ9q/6liGT/1OgOAFquCgDYxkH/DANAAHRxc//4ZwgA530S/6AcxQAeuCMB30n5/3sULv6HOCX/rQ3lAXehIv/1PUkAzX1wAIlohgDZ9h7/7Y6PAEGfZv9spL4A23Wt/yIleP7IRVAAH3za/koboP+6msf/R8f8AGhRnwERyCcA0z3AARruWwCU2QwAO1vV/wtRt/+B5nr/csuRAXe0Qv9IirQA4JVqAHdSaP/QjCsAYgm2/81lhv8SZSYAX8Wm/8vxkwA+0JH/hfb7AAKpDgAN97gAjgf+ACTIF/9Yzd8AW4E0/xW6HgCP5NIB9+r4/+ZFH/6wuof/7s00AYtPKwARsNn+IPNDAPJv6QAsIwn/43JRAQRHDP8mab8AB3Uy/1FPEAA/REH/nSRu/03xA//iLfsBjhnOAHh70QEc/u7/BYB+/1ve1/+iD78AVvBJAIe5Uf4s8aMA1NvS/3CimwDPZXYAqEg4/8QFNABIrPL/fhad/5JgO/+ieZj+jBBfAMP+yP5SlqIAdyuR/sysTv+m4J8AaBPt//V+0P/iO9UAddnFAJhI7QDcHxf+Dlrn/7zUQAE8Zfb/VRhWAAGxbQCSUyABS7bAAHfx4AC57Rv/uGVSAeslTf/9hhMA6PZ6ADxqswDDCwwAbULrAX1xOwA9KKQAr2jwAAIvu/8yDI0Awou1/4f6aABhXN7/2ZXJ/8vxdv9Pl0MAeo7a/5X17wCKKsj+UCVh/3xwp/8kilf/gh2T//FXTv/MYRMBsdEW//fjf/5jd1P/1BnGARCzswCRTaz+WZkO/9q9pwBr6Tv/IyHz/ixwcP+hf08BzK8KACgViv5odOQAx1+J/4W+qP+SpeoBt2MnALfcNv7/3oUAott5/j/vBgDhZjb/+xL2AAQigQGHJIMAzjI7AQ9htwCr2If/ZZgr/5b7WwAmkV8AIswm/rKMU/8ZgfP/TJAlAGokGv52kKz/RLrl/2uh1f8uo0T/lar9ALsRDwDaoKX/qyP2AWANEwCly3UA1mvA//R7sQFkA2gAsvJh//tMgv/TTSoB+k9G/z/0UAFpZfYAPYg6Ae5b1QAOO2L/p1RNABGELv45r8X/uT64AExAzwCsr9D+r0olAIob0/6UfcIACllRAKjLZf8r1dEB6/U2AB4j4v8JfkYA4n1e/px1FP85+HAB5jBA/6RcpgHg1ub/JHiPADcIK//7AfUBamKlAEprav41BDb/WrKWAQN4e//0BVkBcvo9//6ZUgFNDxEAOe5aAV/f5gDsNC/+Z5Sk/3nPJAESELn/SxRKALsLZQAuMIH/Fu/S/03sgf9vTcz/PUhh/8fZ+/8q18wAhZHJ/znmkgHrZMYAkkkj/mzGFP+2T9L/UmeIAPZssAAiETz/E0py/qiqTv+d7xT/lSmoADp5HABPs4b/53mH/67RYv/zer4Aq6bNANR0MAAdbEL/ot62AQ53FQDVJ/n//t/k/7elxgCFvjAAfNBt/3evVf8J0XkBMKu9/8NHhgGI2zP/tluN/jGfSAAjdvX/cLrj/zuJHwCJLKMAcmc8/gjVlgCiCnH/wmhIANyDdP+yT1wAy/rV/l3Bvf+C/yL+1LyXAIgRFP8UZVP/1M6mAOXuSf+XSgP/qFfXAJu8hf+mgUkA8E+F/7LTUf/LSKP+wailAA6kx/4e/8wAQUhbAaZKZv/IKgD/wnHj/0IX0ADl2GT/GO8aAArpPv97CrIBGiSu/3fbxwEto74AEKgqAKY5xv8cGhoAfqXnAPtsZP895Xn/OnaKAEzPEQANInD+WRCoACXQaf8jydf/KGpl/gbvcgAoZ+L+9n9u/z+nOgCE8I4ABZ5Y/4FJnv9eWZIA5jaSAAgtrQBPqQEAc7r3AFRAgwBD4P3/z71AAJocUQEtuDb/V9Tg/wBgSf+BIesBNEJQ//uum/8EsyUA6qRd/l2v/QDGRVf/4GouAGMd0gA+vHL/LOoIAKmv9/8XbYn/5bYnAMClXv71ZdkAv1hgAMReY/9q7gv+NX7zAF4BZf8ukwIAyXx8/40M2gANpp0BMPvt/5v6fP9qlJL/tg3KABw9pwDZmAj+3IIt/8jm/wE3QVf/Xb9h/nL7DgAgaVwBGs+NABjPDf4VMjD/upR0/9Mr4QAlIqL+pNIq/0QXYP+21gj/9XWJ/0LDMgBLDFP+UIykAAmlJAHkbuMA8RFaARk01AAG3wz/i/M5AAxxSwH2t7//1b9F/+YPjgABw8T/iqsv/0A/agEQqdb/z644AVhJhf+2hYwAsQ4Z/5O4Nf8K46H/eNj0/0lN6QCd7osBO0HpAEb72AEpuJn/IMtwAJKT/QBXZW0BLFKF//SWNf9emOj/O10n/1iT3P9OUQ0BIC/8/6ATcv9dayf/dhDTAbl30f/j23/+WGns/6JuF/8kpm7/W+zd/0LqdABvE/T+CukaACC3Bv4Cv/IA2pw1/ik8Rv+o7G8Aebl+/+6Oz/83fjQA3IHQ/lDMpP9DF5D+2ihs/3/KpADLIQP/Ap4AACVgvP/AMUoAbQQAAG+nCv5b2of/y0Kt/5bC4gDJ/Qb/rmZ5AM2/bgA1wgQAUSgt/iNmj/8MbMb/EBvo//xHugGwbnIAjgN1AXFNjgATnMUBXC/8ADXoFgE2EusALiO9/+zUgQACYND+yO7H/zuvpP+SK+cAwtk0/wPfDACKNrL+VevPAOjPIgAxNDL/pnFZ/wot2P8+rRwAb6X2AHZzW/+AVDwAp5DLAFcN8wAWHuQBsXGS/4Gq5v78mYH/keErAEbnBf96aX7+VvaU/24lmv7RA1sARJE+AOQQpf833fn+stJbAFOS4v5FkroAXdJo/hAZrQDnuiYAvXqM//sNcP9pbl0A+0iqAMAX3/8YA8oB4V3kAJmTx/5tqhYA+GX2/7J8DP+y/mb+NwRBAH3WtAC3YJMALXUX/oS/+QCPsMv+iLc2/5LqsQCSZVb/LHuPASHRmADAWin+Uw99/9WsUgDXqZAAEA0iACDRZP9UEvkBxRHs/9m65gAxoLD/b3Zh/+1o6wBPO1z+RfkL/yOsSgETdkQA3nyl/7RCI/9WrvYAK0pv/36QVv/k6lsA8tUY/kUs6//ctCMACPgH/2YvXP/wzWb/cearAR+5yf/C9kb/ehG7AIZGx/+VA5b/dT9nAEFoe//UNhMBBo1YAFOG8/+INWcAqRu0ALExGABvNqcAwz3X/x8BbAE8KkYAuQOi/8KVKP/2fyb+vncm/z13CAFgodv/KsvdAbHypP/1nwoAdMQAAAVdzf6Af7MAfe32/5Wi2f9XJRT+jO7AAAkJwQBhAeIAHSYKAACIP//lSNL+JoZc/07a0AFoJFT/DAXB//KvPf+/qS4Bs5OT/3G+i/59rB8AA0v8/tckDwDBGxgB/0WV/26BdgDLXfkAiolA/iZGBgCZdN4AoUp7AMFjT/92O17/PQwrAZKxnQAuk78AEP8mAAszHwE8OmL/b8JNAZpb9ACMKJABrQr7AMvRMv5sgk4A5LRaAK4H+gAfrjwAKaseAHRjUv92wYv/u63G/tpvOAC5e9gA+Z40ADS0Xf/JCVv/OC2m/oSby/866G4ANNNZ//0AogEJV7cAkYgsAV569QBVvKsBk1zGAAAIaAAeX64A3eY0Aff36/+JrjX/IxXM/0fj1gHoUsIACzDj/6pJuP/G+/z+LHAiAINlg/9IqLsAhId9/4poYf/uuKj/82hU/4fY4v+LkO0AvImWAVA4jP9Wqaf/wk4Z/9wRtP8RDcEAdYnU/43glwAx9K8AwWOv/xNjmgH/QT7/nNI3//L0A//6DpUAnljZ/53Phv776BwALpz7/6s4uP/vM+oAjoqD/xn+8wEKycIAP2FLANLvogDAyB8BddbzABhH3v42KOj/TLdv/pAOV//WT4j/2MTUAIQbjP6DBf0AfGwT/xzXSwBM3jf+6bY/AESrv/40b97/CmlN/1Cq6wCPGFj/Led5AJSB4AE99lQA/S7b/+9MIQAxlBL+5iVFAEOGFv6Om14AH53T/tUqHv8E5Pf+/LAN/ycAH/7x9P//qi0K/v3e+QDecoQA/y8G/7SjswFUXpf/WdFS/uU0qf/V7AAB1jjk/4d3l/9wycEAU6A1/gaXQgASohEA6WFbAIMFTgG1eDX/dV8//+11uQC/foj/kHfpALc5YQEvybv/p6V3AS1kfgAVYgb+kZZf/3g2mADRYmgAj28e/riU+QDr2C4A+MqU/zlfFgDy4aMA6ffo/0erE/9n9DH/VGdd/0R59AFS4A0AKU8r//nOp//XNBX+wCAW//dvPABlSib/FltU/h0cDf/G59f+9JrIAN+J7QDThA4AX0DO/xE+9//pg3kBXRdNAM3MNP5RvYgAtNuKAY8SXgDMK4z+vK/bAG9ij/+XP6L/0zJH/hOSNQCSLVP+slLu/xCFVP/ixl3/yWEU/3h2I/9yMuf/ouWc/9MaDAByJ3P/ztSGAMXZoP90gV7+x9fb/0vf+QH9dLX/6Ndo/+SC9v+5dVYADgUIAO8dPQHtV4X/fZKJ/syo3wAuqPUAmmkWANzUof9rRRj/idq1//FUxv+CetP/jQiZ/76xdgBgWbIA/xAw/npgaf91Nuj/In5p/8xDpgDoNIr/05MMABk2BwAsD9f+M+wtAL5EgQFqk+EAHF0t/uyND/8RPaEA3HPAAOyRGP5vqKkA4Do//3+kvABS6ksB4J6GANFEbgHZptkARuGmAbvBj/8QB1j/Cs2MAHXAnAEROCYAG3xsAavXN/9f/dQAm4eo//aymf6aREoA6D1g/mmEOwAhTMcBvbCC/wloGf5Lxmb/6QFwAGzcFP9y5kYAjMKF/zmepP6SBlD/qcRhAVW3ggBGnt4BO+3q/2AZGv/or2H/C3n4/lgjwgDbtPz+SgjjAMPjSQG4bqH/MemkAYA1LwBSDnn/wb46ADCudf+EFyAAKAqGARYzGf/wC7D/bjmSAHWP7wGdZXb/NlRMAM24Ev8vBEj/TnBV/8EyQgFdEDT/CGmGAAxtSP86nPsAkCPMACygdf4ya8IAAUSl/29uogCeUyj+TNbqADrYzf+rYJP/KONyAbDj8QBG+bcBiFSL/zx69/6PCXX/sa6J/kn3jwDsuX7/Phn3/y1AOP+h9AYAIjk4AWnKUwCAk9AABmcK/0qKQf9hUGT/1q4h/zKGSv9ul4L+b1SsAFTHS/74O3D/CNiyAQm3XwDuGwj+qs3cAMPlhwBiTO3/4lsaAVLbJ//hvscB2ch5/1GzCP+MQc4Ass9X/vr8Lv9oWW4B/b2e/5DWnv+g9Tb/NbdcARXIwv+SIXEB0QH/AOtqK/+nNOgAneXdADMeGQD63RsBQZNX/097xABBxN//TCwRAVXxRADKt/n/QdTU/wkhmgFHO1AAr8I7/41ICQBkoPQA5tA4ADsZS/5QwsIAEgPI/qCfcwCEj/cBb105/zrtCwGG3of/eqNsAXsrvv/7vc7+ULZI/9D24AERPAkAoc8mAI1tWwDYD9P/iE5uAGKjaP8VUHn/rbK3AX+PBABoPFL+1hAN/2DuIQGelOb/f4E+/zP/0v8+jez+nTfg/3In9ADAvPr/5Ew1AGJUUf+tyz3+kzI3/8zrvwA0xfQAWCvT/hu/dwC855oAQlGhAFzBoAH643gAezfiALgRSACFqAr+Foec/ykZZ/8wyjoAupVR/7yG7wDrtb3+2Yu8/0owUgAu2uUAvf37ADLlDP/Tjb8BgPQZ/6nnev5WL73/hLcX/yWylv8zif0AyE4fABZpMgCCPAAAhKNb/hfnuwDAT+8AnWak/8BSFAEYtWf/8AnqAAF7pP+F6QD/yvLyADy69QDxEMf/4HSe/r99W//gVs8AeSXn/+MJxv8Pme//eejZ/ktwUgBfDDn+M9Zp/5TcYQHHYiQAnNEM/grUNADZtDf+1Kro/9gUVP+d+ocAnWN//gHOKQCVJEYBNsTJ/1d0AP7rq5YAG6PqAMqHtADQXwD+e5xdALc+SwCJ67YAzOH//9aL0v8Ccwj/HQxvADScAQD9Ffv/JaUf/gyC0wBqEjX+KmOaAA7ZPf7YC1z/yMVw/pMmxwAk/Hj+a6lNAAF7n//PS2YAo6/EACwB8AB4urD+DWJM/+188f/okrz/yGDgAMwfKQDQyA0AFeFg/6+cxAD30H4APrj0/gKrUQBVc54ANkAt/xOKcgCHR80A4y+TAdrnQgD90RwA9A+t/wYPdv4QltD/uRYy/1Zwz/9LcdcBP5Ir/wThE/7jFz7/Dv/W/i0Izf9XxZf+0lLX//X49/+A+EYA4fdXAFp4RgDV9VwADYXiAC+1BQFco2n/Bh6F/uiyPf/mlRj/EjGeAORkPf508/v/TUtcAVHbk/9Mo/7+jdX2AOglmP5hLGQAySUyAdT0OQCuq7f/+UpwAKacHgDe3WH/811J/vtlZP/Y2V3//oq7/46+NP87y7H/yF40AHNynv+lmGgBfmPi/3ad9AFryBAAwVrlAHkGWACcIF3+ffHT/w7tnf+lmhX/uOAW//oYmP9xTR8A96sX/+2xzP80iZH/wrZyAODqlQAKb2cByYEEAO6OTgA0Bij/btWl/jzP/QA+10UAYGEA/zEtygB4eRb/64swAcYtIv+2MhsBg9Jb/y42gACve2n/xo1O/kP07//1Nmf+Tiby/wJc+f77rlf/iz+QABhsG/8iZhIBIhaYAELldv4yj2MAkKmVAXYemACyCHkBCJ8SAFpl5v+BHXcARCQLAei3NwAX/2D/oSnB/z+L3gAPs/MA/2QP/1I1hwCJOZUBY/Cq/xbm5P4xtFL/PVIrAG712QDHfT0ALv00AI3F2wDTn8EAN3lp/rcUgQCpd6r/y7KL/4cotv+sDcr/QbKUAAjPKwB6NX8BSqEwAOPWgP5WC/P/ZFYHAfVEhv89KxUBmFRe/748+v7vduj/1oglAXFMa/9daGQBkM4X/26WmgHkZ7kA2jEy/odNi/+5AU4AAKGU/2Ed6f/PlJX/oKgAAFuAq/8GHBP+C2/3ACe7lv+K6JUAdT5E/z/YvP/r6iD+HTmg/xkM8QGpPL8AIION/+2fe/9exV7+dP4D/1yzYf55YVz/qnAOABWV+AD44wMAUGBtAEvASgEMWuL/oWpEAdByf/9yKv/+ShpK//ezlv55jDwAk0bI/9Yoof+hvMn/jUGH//Jz/AA+L8oAtJX//oI37QClEbr/CqnCAJxt2v9wjHv/aIDf/rGObP95Jdv/gE0S/29sFwFbwEsArvUW/wTsPv8rQJkB463+AO16hAF/Wbr/jlKA/vxUrgBas7EB89ZX/2c8ov/Qgg7/C4KLAM6B2/9e2Z3/7+bm/3Rzn/6ka18AM9oCAdh9xv+MyoD+C19E/zcJXf6umQb/zKxgAEWgbgDVJjH+G1DVAHZ9cgBGRkP/D45J/4N6uf/zFDL+gu0oANKfjAHFl0H/VJlCAMN+WgAQ7uwBdrtm/wMYhf+7ReYAOMVcAdVFXv9QiuUBzgfmAN5v5gFb6Xf/CVkHAQJiAQCUSoX/M/a0/+SxcAE6vWz/wsvt/hXRwwCTCiMBVp3iAB+ji/44B0v/Plp0ALU8qQCKotT+UacfAM1acP8hcOMAU5d1AbHgSf+ukNn/5sxP/xZN6P9yTuoA4Dl+/gkxjQDyk6UBaLaM/6eEDAF7RH8A4VcnAftsCADGwY8BeYfP/6wWRgAyRHT/Za8o//hp6QCmywcAbsXaANf+Gv6o4v0AH49gAAtnKQC3gcv+ZPdK/9V+hADSkywAx+obAZQvtQCbW54BNmmv/wJOkf5mml8AgM9//jR87P+CVEcA3fPTAJiqzwDeascAt1Re/lzIOP+KtnMBjmCSAIWI5ABhEpYAN/tCAIxmBADKZ5cAHhP4/zO4zwDKxlkAN8Xh/qlf+f9CQUT/vOp+AKbfZAFw7/QAkBfCADontgD0LBj+r0Sz/5h2mgGwooIA2XLM/q1+Tv8h3h7/JAJb/wKP8wAJ69cAA6uXARjX9f+oL6T+8ZLPAEWBtABE83EAkDVI/vstDgAXbqgARERP/25GX/6uW5D/Ic5f/4kpB/8Tu5n+I/9w/wmRuf4ynSUAC3AxAWYIvv/q86kBPFUXAEonvQB0Me8ArdXSAC6hbP+fliUAxHi5/yJiBv+Zwz7/YeZH/2Y9TAAa1Oz/pGEQAMY7kgCjF8QAOBg9ALViwQD7k+X/Yr0Y/y42zv/qUvYAt2cmAW0+zAAK8OAAkhZ1/46aeABF1CMA0GN2AXn/A/9IBsIAdRHF/30PFwCaT5kA1l7F/7k3k/8+/k7+f1KZAG5mP/9sUqH/abvUAVCKJwA8/13/SAy6ANL7HwG+p5D/5CwT/oBD6ADW+Wv+iJFW/4QusAC9u+P/0BaMANnTdAAyUbr+i/ofAB5AxgGHm2QAoM4X/rui0/8QvD8A/tAxAFVUvwDxwPL/mX6RAeqiov/mYdgBQId+AL6U3wE0ACv/HCe9AUCI7gCvxLkAYuLV/3+f9AHirzwAoOmOAbTzz/9FmFkBH2UVAJAZpP6Lv9EAWxl5ACCTBQAnunv/P3Pm/12nxv+P1dz/s5wT/xlCegDWoNn/Ai0+/2pPkv4ziWP/V2Tn/6+R6P9luAH/rgl9AFIloQEkco3/MN6O//W6mgAFrt3+P3Kb/4c3oAFQH4cAfvqzAezaLQAUHJEBEJNJAPm9hAERvcD/347G/0gUD//6Ne3+DwsSABvTcf7Vazj/rpOS/2B+MAAXwW0BJaJeAMed+f4YgLv/zTGy/l2kKv8rd+sBWLft/9rSAf9r/ioA5gpj/6IA4gDb7VsAgbLLANAyX/7O0F//979Z/m7qT/+lPfMAFHpw//b2uf5nBHsA6WPmAdtb/P/H3hb/s/Xp/9Px6gBv+sD/VVSIAGU6Mv+DrZz+dy0z/3bpEP7yWtYAXp/bAQMD6v9iTFz+UDbmAAXk5/41GN//cTh2ARSEAf+r0uwAOPGe/7pzE/8I5a4AMCwAAXJypv8GSeL/zVn0AInjSwH4rTgASnj2/ncDC/9ReMb/iHpi/5Lx3QFtwk7/3/FGAdbIqf9hvi//L2eu/2NcSP526bT/wSPp/hrlIP/e/MYAzCtH/8dUrACGZr4Ab+5h/uYo5gDjzUD+yAzhAKYZ3gBxRTP/j58YAKe4SgAd4HT+ntDpAMF0fv/UC4X/FjqMAcwkM//oHisA60a1/0A4kv6pElT/4gEN/8gysP801fX+qNFhAL9HNwAiTpwA6JA6AblKvQC6jpX+QEV//6HLk/+wl78AiOfL/qO2iQChfvv+6SBCAETPQgAeHCUAXXJgAf5c9/8sq0UAyncL/7x2MgH/U4j/R1IaAEbjAgAg63kBtSmaAEeG5f7K/yQAKZgFAJo/Sf8itnwAed2W/xrM1QEprFcAWp2S/22CFABHa8j/82a9AAHDkf4uWHUACM7jAL9u/f9tgBT+hlUz/4mxcAHYIhb/gxDQ/3mVqgByExcBplAf/3HwegDos/oARG60/tKqdwDfbKT/z0/p/xvl4v7RYlH/T0QHAIO5ZACqHaL/EaJr/zkVCwFkyLX/f0GmAaWGzABop6gAAaRPAJKHOwFGMoD/ZncN/uMGhwCijrP/oGTeABvg2wGeXcP/6o2JABAYff/uzi//YRFi/3RuDP9gc00AW+Po//j+T/9c5Qb+WMaLAM5LgQD6Tc7/jfR7AYpF3AAglwYBg6cW/+1Ep/7HvZYAo6uK/zO8Bv9fHYn+lOKzALVr0P+GH1L/l2Ut/4HK4QDgSJMAMIqX/8NAzv7t2p4Aah2J/v296f9nDxH/wmH/ALItqf7G4ZsAJzB1/4dqcwBhJrUAli9B/1OC5f72JoEAXO+a/ltjfwChbyH/7tny/4O5w//Vv57/KZbaAISpgwBZVPwBq0aA/6P4y/4BMrT/fExVAftvUABjQu//mu22/91+hf5KzGP/QZN3/2M4p/9P+JX/dJvk/+0rDv5FiQv/FvrxAVt6j//N+fMA1Bo8/zC2sAEwF7//y3mY/i1K1f8+WhL+9aPm/7lqdP9TI58ADCEC/1AiPgAQV67/rWVVAMokUf6gRcz/QOG7ADrOXgBWkC8A5Vb1AD+RvgElBScAbfsaAImT6gCieZH/kHTO/8Xouf+3voz/SQz+/4sU8v+qWu//YUK7//W1h/7eiDQA9QUz/ssvTgCYZdgASRd9AP5gIQHr0kn/K9FYAQeBbQB6aOT+qvLLAPLMh//KHOn/QQZ/AJ+QRwBkjF8ATpYNAPtrdgG2On3/ASZs/4290f8Im30BcaNb/3lPvv+G72z/TC/4AKPk7wARbwoAWJVL/9fr7wCnnxj/L5ds/2vRvADp52P+HMqU/64jiv9uGET/AkW1AGtmUgBm7QcAXCTt/92iUwE3ygb/h+qH/xj63gBBXqj+9fjS/6dsyf7/oW8AzQj+AIgNdABksIT/K9d+/7GFgv+eT5QAQ+AlAQzOFf8+Im4B7Wiv/1CEb/+OrkgAVOW0/mmzjABA+A//6YoQAPVDe/7aedT/P1/aAdWFif+PtlL/MBwLAPRyjQHRr0z/nbWW/7rlA/+knW8B572LAHfKvv/aakD/ROs//mAarP+7LwsB1xL7/1FUWQBEOoAAXnEFAVyB0P9hD1P+CRy8AO8JpAA8zZgAwKNi/7gSPADZtosAbTt4/wTA+wCp0vD/Jaxc/pTT9f+zQTQA/Q1zALmuzgFyvJX/7VqtACvHwP9YbHEANCNMAEIZlP/dBAf/l/Fy/77R6ABiMscAl5bV/xJKJAE1KAcAE4dB/xqsRQCu7VUAY18pAAM4EAAnoLH/yGra/rlEVP9buj3+Q4+N/w30pv9jcsYAx26j/8ESugB87/YBbkQWAALrLgHUPGsAaSppAQ7mmAAHBYMAjWia/9UDBgCD5KL/s2QcAed7Vf/ODt8B/WDmACaYlQFiiXoA1s0D/+KYs/8GhYkAnkWM/3Gimv+086z/G71z/48u3P/VhuH/fh1FALwriQHyRgkAWsz//+eqkwAXOBP+OH2d/zCz2v9Ptv3/JtS/ASnrfABglxwAh5S+AM35J/40YIj/1CyI/0PRg//8ghf/24AU/8aBdgBsZQsAsgWSAT4HZP+17F7+HBqkAEwWcP94Zk8AysDlAciw1wApQPT/zrhOAKctPwGgIwD/OwyO/8wJkP/bXuUBehtwAL1pbf9A0Er/+383AQLixgAsTNEAl5hN/9IXLgHJq0X/LNPnAL4l4P/1xD7/qbXe/yLTEQB38cX/5SOYARVFKP+y4qEAlLPBANvC/gEozjP/51z6AUOZqgAVlPEAqkVS/3kS5/9ccgMAuD7mAOHJV/+SYKL/tfLcAK273QHiPqr/OH7ZAXUN4/+zLO8AnY2b/5DdUwDr0dAAKhGlAftRhQB89cn+YdMY/1PWpgCaJAn/+C9/AFrbjP+h2Sb+1JM//0JUlAHPAwEA5oZZAX9Oev/gmwH/UohKALKc0P+6GTH/3gPSAeWWvv9VojT/KVSN/0l7VP5dEZYAdxMcASAW1/8cF8z/jvE0/+Q0fQAdTM8A16f6/q+k5gA3z2kBbbv1/6Es3AEpZYD/pxBeAF3Wa/92SAD+UD3q/3mvfQCLqfsAYSeT/vrEMf+ls27+30a7/xaOfQGas4r/drAqAQqumQCcXGYAqA2h/48QIAD6xbT/y6MsAVcgJAChmRT/e/wPABnjUAA8WI4AERbJAZrNTf8nPy8ACHqNAIAXtv7MJxP/BHAd/xckjP/S6nT+NTI//3mraP+g214AV1IO/ucqBQCli3/+Vk4mAII8Qv7LHi3/LsR6Afk1ov+Ij2f+19JyAOcHoP6pmCr/by32AI6Dh/+DR8z/JOILAAAc8v/hitX/9y7Y/vUDtwBs/EoBzhow/8029v/TxiT/eSMyADTYyv8mi4H+8kmUAEPnjf8qL8wATnQZAQThv/8Gk+QAOlixAHql5f/8U8n/4KdgAbG4nv/yabMB+MbwAIVCywH+JC8ALRhz/3c+/gDE4br+e42sABpVKf/ib7cA1eeXAAQ7B//uipQAQpMh/x/2jf/RjXT/aHAfAFihrABT1+b+L2+XAC0mNAGELcwAioBt/ul1hv/zvq3+8ezwAFJ/7P4o36H/brbh/3uu7wCH8pEBM9GaAJYDc/7ZpPz/N5xFAVRe///oSS0BFBPU/2DFO/5g+yEAJsdJAUCs9/91dDj/5BESAD6KZwH25aT/9HbJ/lYgn/9tIokBVdO6AArBwf56wrEAeu5m/6LaqwBs2aEBnqoiALAvmwG15Av/CJwAABBLXQDOYv8BOpojAAzzuP5DdUL/5uV7AMkqbgCG5LL+umx2/zoTmv9SqT7/co9zAe/EMv+tMMH/kwJU/5aGk/5f6EkAbeM0/r+JCgAozB7+TDRh/6TrfgD+fLwASrYVAXkdI//xHgf+VdrW/wdUlv5RG3X/oJ+Y/kIY3f/jCjwBjYdmANC9lgF1s1wAhBaI/3jHHAAVgU/+tglBANqjqQD2k8b/ayaQAU6vzf/WBfr+L1gd/6QvzP8rNwb/g4bP/nRk1gBgjEsBatyQAMMgHAGsUQX/x7M0/yVUywCqcK4ACwRbAEX0GwF1g1wAIZiv/4yZa//7hyv+V4oE/8bqk/55mFT/zWWbAZ0JGQBIahH+bJkA/73lugDBCLD/rpXRAO6CHQDp1n4BPeJmADmjBAHGbzP/LU9OAXPSCv/aCRn/novG/9NSu/5QhVMAnYHmAfOFhv8oiBAATWtP/7dVXAGxzMoAo0eT/5hFvgCsM7wB+tKs/9PycQFZWRr/QEJv/nSYKgChJxv/NlD+AGrRcwFnfGEA3eZi/x/nBgCywHj+D9nL/3yeTwBwkfcAXPowAaO1wf8lL47+kL2l/y6S8AAGS4AAKZ3I/ld51QABcewABS36AJAMUgAfbOcA4e93/6cHvf+75IT/br0iAF4szAGiNMUATrzx/jkUjQD0ki8BzmQzAH1rlP4bw00AmP1aAQePkP8zJR8AIncm/wfFdgCZvNMAlxR0/vVBNP+0/W4BL7HRAKFjEf923soAfbP8AXs2fv+ROb8AN7p5AArzigDN0+X/fZzx/pScuf/jE7z/fCkg/x8izv4ROVMAzBYl/ypgYgB3ZrgBA74cAG5S2v/IzMD/yZF2AHXMkgCEIGIBwMJ5AGqh+AHtWHwAF9QaAM2rWv/4MNgBjSXm/3zLAP6eqB7/1vgVAHC7B/9Lhe//SuPz//qTRgDWeKIApwmz/xaeEgDaTdEBYW1R//Qhs/85NDn/QazS//lH0f+Oqe4Anr2Z/67+Z/5iIQ4AjUzm/3GLNP8POtQAqNfJ//jM1wHfRKD/OZq3/i/neQBqpokAUYiKAKUrMwDniz0AOV87/nZiGf+XP+wBXr76/6m5cgEF+jr/S2lhAdffhgBxY6MBgD5wAGNqkwCjwwoAIc22ANYOrv+BJuf/NbbfAGIqn//3DSgAvNKxAQYVAP//PZT+iS2B/1kadP5+JnIA+zLy/nmGgP/M+af+pevXAMqx8wCFjT4A8IK+AW6v/wAAFJIBJdJ5/wcnggCO+lT/jcjPAAlfaP8L9K4Ahuh+AKcBe/4QwZX/6OnvAdVGcP/8dKD+8t7c/81V4wAHuToAdvc/AXRNsf8+9cj+PxIl/2s16P4y3dMAotsH/gJeKwC2Prb+oE7I/4eMqgDruOQArzWK/lA6Tf+YyQIBP8QiAAUeuACrsJoAeTvOACZjJwCsUE3+AIaXALoh8f5e/d//LHL8AGx+Of/JKA3/J+Ub/yfvFwGXeTP/mZb4AArqrv929gT+yPUmAEWh8gEQspYAcTiCAKsfaQAaWGz/MSpqAPupQgBFXZUAFDn+AKQZbwBavFr/zATFACjVMgHUYIT/WIq0/uSSfP+49vcAQXVW//1m0v7+eSQAiXMD/zwY2ACGEh0AO+JhALCORwAH0aEAvVQz/pv6SADVVOv/Ld7gAO6Uj/+qKjX/Tqd1ALoAKP99sWf/ReFCAOMHWAFLrAYAqS3jARAkRv8yAgn/i8EWAI+35/7aRTIA7DihAdWDKgCKkSz+iOUo/zE/I/89kfX/ZcAC/uincQCYaCYBebnaAHmL0/538CMAQb3Z/ruzov+gu+YAPvgO/zxOYQD/96P/4Ttb/2tHOv/xLyEBMnXsANuxP/70WrMAI8LX/71DMv8Xh4EAaL0l/7k5wgAjPuf/3PhsAAznsgCPUFsBg11l/5AnAgH/+rIABRHs/osgLgDMvCb+9XM0/79xSf6/bEX/FkX1ARfLsgCqY6oAQfhvACVsmf9AJUUAAFg+/lmUkP+/ROAB8Sc1ACnL7f+RfsL/3Sr9/xljlwBh/d8BSnMx/wavSP87sMsAfLf5AeTkYwCBDM/+qMDD/8ywEP6Y6qsATSVV/yF4h/+OwuMBH9Y6ANW7ff/oLjz/vnQq/peyE/8zPu3+zOzBAMLoPACsIp3/vRC4/mcDX/+N6ST+KRkL/xXDpgB29S0AQ9WV/58MEv+7pOMBoBkFAAxOwwErxeEAMI4p/sSbPP/fxxIBkYicAPx1qf6R4u4A7xdrAG21vP/mcDH+Sart/+e34/9Q3BQAwmt/AX/NZQAuNMUB0qsk/1gDWv84l40AYLv//ypOyAD+RkYB9H2oAMxEigF810YAZkLI/hE05AB13I/+y/h7ADgSrv+6l6T/M+jQAaDkK//5HRkBRL4/AA0AAAAA/wAAAAD1AAAAAAAA+wAAAAAAAP0AAAAA8wAAAAAHAAAAAAADAAAAAPMAAAAABQAAAAAAAAAACwAAAAAACwAAAADzAAAAAAAA/QAAAAAA/wAAAAADAAAAAPUAAAAAAAAADwAAAAAA/wAAAAD/AAAAAAcAAAAABQBBjIcCCwEBAEGwhwILAQEAQdCHAgugAeDrenw7QbiuFlbj+vGfxGraCY3rnDKx/YZiBRZfSbgAX5yVvKNQjCSx0LFVnIPvWwREXMRYHI6G2CJO3dCfEVfs////////////////////////////////////////f+3///////////////////////////////////////9/7v///////////////////////////////////////38AQZCJAgvBBQjJvPNn5glqO6fKhIWuZ7sr+JT+cvNuPPE2HV869U+l0YLmrX9SDlEfbD4rjGgFm2u9Qfur2YMfeSF+ExnN4FsirijXmC+KQs1l7yORRDdxLztN7M/7wLW824mBpdu16Ti1SPNbwlY5GdAFtvER8VmbTxmvpII/khiBbdrVXhyrQgIDo5iqB9i+b3BFAVuDEoyy5E6+hTEk4rT/1cN9DFVviXvydF2+crGWFjv+sd6ANRLHJacG3JuUJmnPdPGbwdJK8Z7BaZvk4yVPOIZHvu+11YyLxp3BD2WcrHfMoQwkdQIrWW8s6S2D5KZuqoR0StT7Qb3cqbBctVMRg9qI+Xar32buUlE+mBAytC1txjGoPyH7mMgnA7DkDu++x39Zv8KPqD3zC+DGJacKk0eRp9VvggPgUWPKBnBuDgpnKSkU/C/SRoUKtycmySZcOCEbLu0qxFr8bSxN37OVnRMNOFPeY6+LVHMKZaiydzy7Cmp25q7tRy7JwoE7NYIUhSxykmQD8Uyh6L+iATBCvEtmGqiRl/jQcItLwjC+VAajUWzHGFLv1hnoktEQqWVVJAaZ1iogcVeFNQ70uNG7MnCgahDI0NK4FsGkGVOrQVEIbDcemeuO30x3SCeoSJvhtbywNGNaycWzDBw5y4pB40qq2E5z42N3T8qcW6O4stbzby5o/LLvXe6Cj3RgLxdDb2OleHKr8KEUeMiE7DlkGggCx4woHmMj+v++kOm9gt7rbFCkFXnGsvej+b4rU3Lj8nhxxpxhJurOPifKB8LAIce4htEe6+DN1n3a6njRbu5/T331um8Xcqpn8AammMiixX1jCq4N+b4EmD8RG0ccEzULcRuEfQQj9XfbKJMkx0B7q8oyvL7JFQq+njxMDRCcxGcdQ7ZCPsu+1MVMKn5l/Jwpf1ns+tY6q2/LXxdYR0qMGURsgABB0I8CCyFTaWdFZDI1NTE5IG5vIEVkMjU1MTkgY29sbGlzaW9ucwEAQaCQAgs1cI0BAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0=")||(j=L,L=d.locateFile?d.locateFile(j,m):m+j);var V={34904:function(){return d.getRandomValue()},34940:function(){if(void 0===d.getRandomValue)try{var e="object"==typeof window?window:self,t=void 0!==e.crypto?e.crypto:e.msCrypto,a=function(){var e=new Uint32Array(1);return t.getRandomValues(e),e[0]>>>0};a(),d.getRandomValue=a}catch(e){try{var o=n(21921),r=function(){var e=o.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};r(),d.getRandomValue=r}catch(e){throw"No secure random number generator found"}}}};function q(e){for(;e.length>0;)e.shift()(d)}var Q=[];function J(e){var t=v.buffer;try{return v.grow(e-t.byteLength+65535>>>16),P(),1}catch(e){}}var Y="function"==typeof atob?atob:function(e){var t,n,a,o,r,i,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",u=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{t=s.indexOf(e.charAt(u++))<<2|(o=s.indexOf(e.charAt(u++)))>>4,n=(15&o)<<4|(r=s.indexOf(e.charAt(u++)))>>2,a=(3&r)<<6|(i=s.indexOf(e.charAt(u++))),c+=String.fromCharCode(t),64!==r&&(c+=String.fromCharCode(n)),64!==i&&(c+=String.fromCharCode(a))}while(u>=2;n=A[e++];)t+=105!=n&t,Q.push(105==n?I[t]:C[t++>>1]),++t;return Q}(t,n);return V[e].apply(null,a)}(e,t,n)},d:function(e,t,n){A.copyWithin(e,t,t+n)},e:function(e){var t,n=A.length,a=2147483648;if((e>>>=0)>a)return!1;for(var o=1;o<=4;o*=2){var r=n*(1+.2/o);if(r=Math.min(r,e+100663296),J(Math.min(a,(t=Math.max(e,r))+(65536-t%65536)%65536)))return!0}return!1}};function te(){function e(){$||($=!0,d.calledRun=!0,E||(q(_),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)e=d.postRun.shift(),B.unshift(e);var e;q(B)}()))}D>0||(function(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)e=d.preRun.shift(),U.unshift(e);var e;q(U)}(),D>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),e()}),1)):e()))}if(function(){var e={a:ee};function t(e,t){var n=e.exports;d.asm=n,v=d.asm.f,P(),d.asm.ac,function(e){if(D--,d.monitorRunDependencies&&d.monitorRunDependencies(D),0==D&&(null!==N&&(clearInterval(N),N=null),O)){var t=O;O=null,t()}}()}function n(e){t(e.instance)}function a(t){return function(){if(!y&&(f||p)){if("function"==typeof fetch&&!W(L))return fetch(L,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+L+"'";return e.arrayBuffer()})).catch((function(){return Z(L)}));if(c)return new Promise((function(e,t){c(L,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return Z(L)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){w("failed to asynchronously prepare wasm: "+e),F(e)}))}if(D++,d.monitorRunDependencies&&d.monitorRunDependencies(D),d.instantiateWasm)try{return d.instantiateWasm(e,t)}catch(e){return w("Module.instantiateWasm callback failed with error: "+e),!1}y||"function"!=typeof WebAssembly.instantiateStreaming||K(L)||W(L)||b||"function"!=typeof fetch?a(n):fetch(L,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(e){return w("wasm streaming compile failed: "+e),w("falling back to ArrayBuffer instantiation"),a(n)}))}))}(),d._crypto_aead_chacha20poly1305_encrypt_detached=function(){return(d._crypto_aead_chacha20poly1305_encrypt_detached=d.asm.g).apply(null,arguments)},d._crypto_aead_chacha20poly1305_encrypt=function(){return(d._crypto_aead_chacha20poly1305_encrypt=d.asm.h).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_encrypt_detached=function(){return(d._crypto_aead_chacha20poly1305_ietf_encrypt_detached=d.asm.i).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_encrypt=function(){return(d._crypto_aead_chacha20poly1305_ietf_encrypt=d.asm.j).apply(null,arguments)},d._crypto_aead_chacha20poly1305_decrypt_detached=function(){return(d._crypto_aead_chacha20poly1305_decrypt_detached=d.asm.k).apply(null,arguments)},d._crypto_aead_chacha20poly1305_decrypt=function(){return(d._crypto_aead_chacha20poly1305_decrypt=d.asm.l).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_decrypt_detached=function(){return(d._crypto_aead_chacha20poly1305_ietf_decrypt_detached=d.asm.m).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_decrypt=function(){return(d._crypto_aead_chacha20poly1305_ietf_decrypt=d.asm.n).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_keybytes=function(){return(d._crypto_aead_chacha20poly1305_ietf_keybytes=d.asm.o).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_npubbytes=function(){return(d._crypto_aead_chacha20poly1305_ietf_npubbytes=d.asm.p).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_nsecbytes=function(){return(d._crypto_aead_chacha20poly1305_ietf_nsecbytes=d.asm.q).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_abytes=function(){return(d._crypto_aead_chacha20poly1305_ietf_abytes=d.asm.r).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_messagebytes_max=function(){return(d._crypto_aead_chacha20poly1305_ietf_messagebytes_max=d.asm.s).apply(null,arguments)},d._crypto_aead_chacha20poly1305_ietf_keygen=function(){return(d._crypto_aead_chacha20poly1305_ietf_keygen=d.asm.t).apply(null,arguments)},d._crypto_aead_chacha20poly1305_keybytes=function(){return(d._crypto_aead_chacha20poly1305_keybytes=d.asm.u).apply(null,arguments)},d._crypto_aead_chacha20poly1305_npubbytes=function(){return(d._crypto_aead_chacha20poly1305_npubbytes=d.asm.v).apply(null,arguments)},d._crypto_aead_chacha20poly1305_nsecbytes=function(){return(d._crypto_aead_chacha20poly1305_nsecbytes=d.asm.w).apply(null,arguments)},d._crypto_aead_chacha20poly1305_abytes=function(){return(d._crypto_aead_chacha20poly1305_abytes=d.asm.x).apply(null,arguments)},d._crypto_aead_chacha20poly1305_messagebytes_max=function(){return(d._crypto_aead_chacha20poly1305_messagebytes_max=d.asm.y).apply(null,arguments)},d._crypto_aead_chacha20poly1305_keygen=function(){return(d._crypto_aead_chacha20poly1305_keygen=d.asm.z).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_encrypt_detached=function(){return(d._crypto_aead_xchacha20poly1305_ietf_encrypt_detached=d.asm.A).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_encrypt=function(){return(d._crypto_aead_xchacha20poly1305_ietf_encrypt=d.asm.B).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_decrypt_detached=function(){return(d._crypto_aead_xchacha20poly1305_ietf_decrypt_detached=d.asm.C).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_decrypt=function(){return(d._crypto_aead_xchacha20poly1305_ietf_decrypt=d.asm.D).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_keybytes=function(){return(d._crypto_aead_xchacha20poly1305_ietf_keybytes=d.asm.E).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_npubbytes=function(){return(d._crypto_aead_xchacha20poly1305_ietf_npubbytes=d.asm.F).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_nsecbytes=function(){return(d._crypto_aead_xchacha20poly1305_ietf_nsecbytes=d.asm.G).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_abytes=function(){return(d._crypto_aead_xchacha20poly1305_ietf_abytes=d.asm.H).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_messagebytes_max=function(){return(d._crypto_aead_xchacha20poly1305_ietf_messagebytes_max=d.asm.I).apply(null,arguments)},d._crypto_aead_xchacha20poly1305_ietf_keygen=function(){return(d._crypto_aead_xchacha20poly1305_ietf_keygen=d.asm.J).apply(null,arguments)},d._crypto_auth_bytes=function(){return(d._crypto_auth_bytes=d.asm.K).apply(null,arguments)},d._crypto_auth_keybytes=function(){return(d._crypto_auth_keybytes=d.asm.L).apply(null,arguments)},d._crypto_auth=function(){return(d._crypto_auth=d.asm.M).apply(null,arguments)},d._crypto_auth_verify=function(){return(d._crypto_auth_verify=d.asm.N).apply(null,arguments)},d._crypto_auth_keygen=function(){return(d._crypto_auth_keygen=d.asm.O).apply(null,arguments)},d._crypto_box_seedbytes=function(){return(d._crypto_box_seedbytes=d.asm.P).apply(null,arguments)},d._crypto_box_publickeybytes=function(){return(d._crypto_box_publickeybytes=d.asm.Q).apply(null,arguments)},d._crypto_box_secretkeybytes=function(){return(d._crypto_box_secretkeybytes=d.asm.R).apply(null,arguments)},d._crypto_box_beforenmbytes=function(){return(d._crypto_box_beforenmbytes=d.asm.S).apply(null,arguments)},d._crypto_box_noncebytes=function(){return(d._crypto_box_noncebytes=d.asm.T).apply(null,arguments)},d._crypto_box_macbytes=function(){return(d._crypto_box_macbytes=d.asm.U).apply(null,arguments)},d._crypto_box_messagebytes_max=function(){return(d._crypto_box_messagebytes_max=d.asm.V).apply(null,arguments)},d._crypto_box_seed_keypair=function(){return(d._crypto_box_seed_keypair=d.asm.W).apply(null,arguments)},d._crypto_box_keypair=function(){return(d._crypto_box_keypair=d.asm.X).apply(null,arguments)},d._crypto_box_beforenm=function(){return(d._crypto_box_beforenm=d.asm.Y).apply(null,arguments)},d._crypto_box_detached_afternm=function(){return(d._crypto_box_detached_afternm=d.asm.Z).apply(null,arguments)},d._crypto_box_detached=function(){return(d._crypto_box_detached=d.asm._).apply(null,arguments)},d._crypto_box_easy_afternm=function(){return(d._crypto_box_easy_afternm=d.asm.$).apply(null,arguments)},d._crypto_box_easy=function(){return(d._crypto_box_easy=d.asm.aa).apply(null,arguments)},d._crypto_box_open_detached_afternm=function(){return(d._crypto_box_open_detached_afternm=d.asm.ba).apply(null,arguments)},d._crypto_box_open_detached=function(){return(d._crypto_box_open_detached=d.asm.ca).apply(null,arguments)},d._crypto_box_open_easy_afternm=function(){return(d._crypto_box_open_easy_afternm=d.asm.da).apply(null,arguments)},d._crypto_box_open_easy=function(){return(d._crypto_box_open_easy=d.asm.ea).apply(null,arguments)},d._crypto_box_seal=function(){return(d._crypto_box_seal=d.asm.fa).apply(null,arguments)},d._crypto_box_seal_open=function(){return(d._crypto_box_seal_open=d.asm.ga).apply(null,arguments)},d._crypto_box_sealbytes=function(){return(d._crypto_box_sealbytes=d.asm.ha).apply(null,arguments)},d._crypto_generichash_bytes_min=function(){return(d._crypto_generichash_bytes_min=d.asm.ia).apply(null,arguments)},d._crypto_generichash_bytes_max=function(){return(d._crypto_generichash_bytes_max=d.asm.ja).apply(null,arguments)},d._crypto_generichash_bytes=function(){return(d._crypto_generichash_bytes=d.asm.ka).apply(null,arguments)},d._crypto_generichash_keybytes_min=function(){return(d._crypto_generichash_keybytes_min=d.asm.la).apply(null,arguments)},d._crypto_generichash_keybytes_max=function(){return(d._crypto_generichash_keybytes_max=d.asm.ma).apply(null,arguments)},d._crypto_generichash_keybytes=function(){return(d._crypto_generichash_keybytes=d.asm.na).apply(null,arguments)},d._crypto_generichash_statebytes=function(){return(d._crypto_generichash_statebytes=d.asm.oa).apply(null,arguments)},d._crypto_generichash=function(){return(d._crypto_generichash=d.asm.pa).apply(null,arguments)},d._crypto_generichash_init=function(){return(d._crypto_generichash_init=d.asm.qa).apply(null,arguments)},d._crypto_generichash_update=function(){return(d._crypto_generichash_update=d.asm.ra).apply(null,arguments)},d._crypto_generichash_final=function(){return(d._crypto_generichash_final=d.asm.sa).apply(null,arguments)},d._crypto_generichash_keygen=function(){return(d._crypto_generichash_keygen=d.asm.ta).apply(null,arguments)},d._crypto_hash_bytes=function(){return(d._crypto_hash_bytes=d.asm.ua).apply(null,arguments)},d._crypto_hash=function(){return(d._crypto_hash=d.asm.va).apply(null,arguments)},d._crypto_kdf_bytes_min=function(){return(d._crypto_kdf_bytes_min=d.asm.wa).apply(null,arguments)},d._crypto_kdf_bytes_max=function(){return(d._crypto_kdf_bytes_max=d.asm.xa).apply(null,arguments)},d._crypto_kdf_contextbytes=function(){return(d._crypto_kdf_contextbytes=d.asm.ya).apply(null,arguments)},d._crypto_kdf_keybytes=function(){return(d._crypto_kdf_keybytes=d.asm.za).apply(null,arguments)},d._crypto_kdf_derive_from_key=function(){return(d._crypto_kdf_derive_from_key=d.asm.Aa).apply(null,arguments)},d._crypto_kdf_keygen=function(){return(d._crypto_kdf_keygen=d.asm.Ba).apply(null,arguments)},d._crypto_kx_seed_keypair=function(){return(d._crypto_kx_seed_keypair=d.asm.Ca).apply(null,arguments)},d._crypto_kx_keypair=function(){return(d._crypto_kx_keypair=d.asm.Da).apply(null,arguments)},d._crypto_kx_client_session_keys=function(){return(d._crypto_kx_client_session_keys=d.asm.Ea).apply(null,arguments)},d._crypto_kx_server_session_keys=function(){return(d._crypto_kx_server_session_keys=d.asm.Fa).apply(null,arguments)},d._crypto_kx_publickeybytes=function(){return(d._crypto_kx_publickeybytes=d.asm.Ga).apply(null,arguments)},d._crypto_kx_secretkeybytes=function(){return(d._crypto_kx_secretkeybytes=d.asm.Ha).apply(null,arguments)},d._crypto_kx_seedbytes=function(){return(d._crypto_kx_seedbytes=d.asm.Ia).apply(null,arguments)},d._crypto_kx_sessionkeybytes=function(){return(d._crypto_kx_sessionkeybytes=d.asm.Ja).apply(null,arguments)},d._crypto_scalarmult_base=function(){return(d._crypto_scalarmult_base=d.asm.Ka).apply(null,arguments)},d._crypto_scalarmult=function(){return(d._crypto_scalarmult=d.asm.La).apply(null,arguments)},d._crypto_scalarmult_bytes=function(){return(d._crypto_scalarmult_bytes=d.asm.Ma).apply(null,arguments)},d._crypto_scalarmult_scalarbytes=function(){return(d._crypto_scalarmult_scalarbytes=d.asm.Na).apply(null,arguments)},d._crypto_secretbox_keybytes=function(){return(d._crypto_secretbox_keybytes=d.asm.Oa).apply(null,arguments)},d._crypto_secretbox_noncebytes=function(){return(d._crypto_secretbox_noncebytes=d.asm.Pa).apply(null,arguments)},d._crypto_secretbox_macbytes=function(){return(d._crypto_secretbox_macbytes=d.asm.Qa).apply(null,arguments)},d._crypto_secretbox_messagebytes_max=function(){return(d._crypto_secretbox_messagebytes_max=d.asm.Ra).apply(null,arguments)},d._crypto_secretbox_keygen=function(){return(d._crypto_secretbox_keygen=d.asm.Sa).apply(null,arguments)},d._crypto_secretbox_detached=function(){return(d._crypto_secretbox_detached=d.asm.Ta).apply(null,arguments)},d._crypto_secretbox_easy=function(){return(d._crypto_secretbox_easy=d.asm.Ua).apply(null,arguments)},d._crypto_secretbox_open_detached=function(){return(d._crypto_secretbox_open_detached=d.asm.Va).apply(null,arguments)},d._crypto_secretbox_open_easy=function(){return(d._crypto_secretbox_open_easy=d.asm.Wa).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_keygen=function(){return(d._crypto_secretstream_xchacha20poly1305_keygen=d.asm.Xa).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_init_push=function(){return(d._crypto_secretstream_xchacha20poly1305_init_push=d.asm.Ya).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_init_pull=function(){return(d._crypto_secretstream_xchacha20poly1305_init_pull=d.asm.Za).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_rekey=function(){return(d._crypto_secretstream_xchacha20poly1305_rekey=d.asm._a).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_push=function(){return(d._crypto_secretstream_xchacha20poly1305_push=d.asm.$a).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_pull=function(){return(d._crypto_secretstream_xchacha20poly1305_pull=d.asm.ab).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_statebytes=function(){return(d._crypto_secretstream_xchacha20poly1305_statebytes=d.asm.bb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_abytes=function(){return(d._crypto_secretstream_xchacha20poly1305_abytes=d.asm.cb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_headerbytes=function(){return(d._crypto_secretstream_xchacha20poly1305_headerbytes=d.asm.db).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_keybytes=function(){return(d._crypto_secretstream_xchacha20poly1305_keybytes=d.asm.eb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_messagebytes_max=function(){return(d._crypto_secretstream_xchacha20poly1305_messagebytes_max=d.asm.fb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_tag_message=function(){return(d._crypto_secretstream_xchacha20poly1305_tag_message=d.asm.gb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_tag_push=function(){return(d._crypto_secretstream_xchacha20poly1305_tag_push=d.asm.hb).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_tag_rekey=function(){return(d._crypto_secretstream_xchacha20poly1305_tag_rekey=d.asm.ib).apply(null,arguments)},d._crypto_secretstream_xchacha20poly1305_tag_final=function(){return(d._crypto_secretstream_xchacha20poly1305_tag_final=d.asm.jb).apply(null,arguments)},d._crypto_shorthash_bytes=function(){return(d._crypto_shorthash_bytes=d.asm.kb).apply(null,arguments)},d._crypto_shorthash_keybytes=function(){return(d._crypto_shorthash_keybytes=d.asm.lb).apply(null,arguments)},d._crypto_shorthash=function(){return(d._crypto_shorthash=d.asm.mb).apply(null,arguments)},d._crypto_shorthash_keygen=function(){return(d._crypto_shorthash_keygen=d.asm.nb).apply(null,arguments)},d._crypto_sign_statebytes=function(){return(d._crypto_sign_statebytes=d.asm.ob).apply(null,arguments)},d._crypto_sign_bytes=function(){return(d._crypto_sign_bytes=d.asm.pb).apply(null,arguments)},d._crypto_sign_seedbytes=function(){return(d._crypto_sign_seedbytes=d.asm.qb).apply(null,arguments)},d._crypto_sign_publickeybytes=function(){return(d._crypto_sign_publickeybytes=d.asm.rb).apply(null,arguments)},d._crypto_sign_secretkeybytes=function(){return(d._crypto_sign_secretkeybytes=d.asm.sb).apply(null,arguments)},d._crypto_sign_messagebytes_max=function(){return(d._crypto_sign_messagebytes_max=d.asm.tb).apply(null,arguments)},d._crypto_sign_seed_keypair=function(){return(d._crypto_sign_seed_keypair=d.asm.ub).apply(null,arguments)},d._crypto_sign_keypair=function(){return(d._crypto_sign_keypair=d.asm.vb).apply(null,arguments)},d._crypto_sign=function(){return(d._crypto_sign=d.asm.wb).apply(null,arguments)},d._crypto_sign_open=function(){return(d._crypto_sign_open=d.asm.xb).apply(null,arguments)},d._crypto_sign_detached=function(){return(d._crypto_sign_detached=d.asm.yb).apply(null,arguments)},d._crypto_sign_verify_detached=function(){return(d._crypto_sign_verify_detached=d.asm.zb).apply(null,arguments)},d._crypto_sign_init=function(){return(d._crypto_sign_init=d.asm.Ab).apply(null,arguments)},d._crypto_sign_update=function(){return(d._crypto_sign_update=d.asm.Bb).apply(null,arguments)},d._crypto_sign_final_create=function(){return(d._crypto_sign_final_create=d.asm.Cb).apply(null,arguments)},d._crypto_sign_final_verify=function(){return(d._crypto_sign_final_verify=d.asm.Db).apply(null,arguments)},d._crypto_sign_ed25519_pk_to_curve25519=function(){return(d._crypto_sign_ed25519_pk_to_curve25519=d.asm.Eb).apply(null,arguments)},d._crypto_sign_ed25519_sk_to_curve25519=function(){return(d._crypto_sign_ed25519_sk_to_curve25519=d.asm.Fb).apply(null,arguments)},d._randombytes_random=function(){return(d._randombytes_random=d.asm.Gb).apply(null,arguments)},d._randombytes_stir=function(){return(d._randombytes_stir=d.asm.Hb).apply(null,arguments)},d._randombytes_uniform=function(){return(d._randombytes_uniform=d.asm.Ib).apply(null,arguments)},d._randombytes_buf=function(){return(d._randombytes_buf=d.asm.Jb).apply(null,arguments)},d._randombytes_buf_deterministic=function(){return(d._randombytes_buf_deterministic=d.asm.Kb).apply(null,arguments)},d._randombytes_seedbytes=function(){return(d._randombytes_seedbytes=d.asm.Lb).apply(null,arguments)},d._randombytes_close=function(){return(d._randombytes_close=d.asm.Mb).apply(null,arguments)},d._randombytes=function(){return(d._randombytes=d.asm.Nb).apply(null,arguments)},d._sodium_bin2hex=function(){return(d._sodium_bin2hex=d.asm.Ob).apply(null,arguments)},d._sodium_hex2bin=function(){return(d._sodium_hex2bin=d.asm.Pb).apply(null,arguments)},d._sodium_base64_encoded_len=function(){return(d._sodium_base64_encoded_len=d.asm.Qb).apply(null,arguments)},d._sodium_bin2base64=function(){return(d._sodium_bin2base64=d.asm.Rb).apply(null,arguments)},d._sodium_base642bin=function(){return(d._sodium_base642bin=d.asm.Sb).apply(null,arguments)},d._sodium_init=function(){return(d._sodium_init=d.asm.Tb).apply(null,arguments)},d._sodium_pad=function(){return(d._sodium_pad=d.asm.Ub).apply(null,arguments)},d._sodium_unpad=function(){return(d._sodium_unpad=d.asm.Vb).apply(null,arguments)},d._sodium_version_string=function(){return(d._sodium_version_string=d.asm.Wb).apply(null,arguments)},d._sodium_library_version_major=function(){return(d._sodium_library_version_major=d.asm.Xb).apply(null,arguments)},d._sodium_library_version_minor=function(){return(d._sodium_library_version_minor=d.asm.Yb).apply(null,arguments)},d._sodium_library_minimal=function(){return(d._sodium_library_minimal=d.asm.Zb).apply(null,arguments)},d._malloc=function(){return(d._malloc=d.asm._b).apply(null,arguments)},d._free=function(){return(d._free=d.asm.$b).apply(null,arguments)},d.UTF8ToString=M,d.setValue=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"i8";switch(n.endsWith("*")&&(n="*"),n){case"i1":case"i8":k[e>>0]=t;break;case"i16":x[e>>1]=t;break;case"i32":I[e>>2]=t;break;case"i64":G=[t>>>0,(H=t,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],I[e>>2]=G[0],I[e+4>>2]=G[1];break;case"float":S[e>>2]=t;break;case"double":C[e>>3]=t;break;case"*":T[e>>2]=t;break;default:F("invalid type for setValue: "+n)}},d.getValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"i8";switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return k[e>>0];case"i16":return x[e>>1];case"i32":case"i64":return I[e>>2];case"float":return S[e>>2];case"double":return C[e>>3];case"*":return T[e>>2];default:F("invalid type for getValue: "+t)}return null},O=function e(){$||te(),$||(O=e)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();te()})).catch((function(){return r.useBackupModule()})),a},void 0===(r="function"===typeof a?a.apply(t,o):a)||(e.exports=r)},7697:function(e,t,n){var a=1/0,o="[object Symbol]",r=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,s="\\ud800-\\udfff",c="\\u0300-\\u036f\\ufe20-\\ufe23",u="\\u20d0-\\u20f0",d="\\u2700-\\u27bf",l="a-z\\xdf-\\xf6\\xf8-\\xff",f="A-Z\\xc0-\\xd6\\xd8-\\xde",p="\\ufe0e\\ufe0f",b="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",m="['\u2019]",h="["+s+"]",g="["+b+"]",y="["+c+u+"]",v="\\d+",w="["+d+"]",k="["+l+"]",A="[^"+s+b+v+d+l+f+"]",x="\\ud83c[\\udffb-\\udfff]",I="[^"+s+"]",T="(?:\\ud83c[\\udde6-\\uddff]){2}",S="[\\ud800-\\udbff][\\udc00-\\udfff]",C="["+f+"]",E="\\u200d",R="(?:"+k+"|"+A+")",M="(?:"+C+"|"+A+")",P="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",U="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",_="(?:"+y+"|"+x+")"+"?",B="["+p+"]?",D=B+_+("(?:"+E+"(?:"+[I,T,S].join("|")+")"+B+_+")*"),N="(?:"+[w,T,S].join("|")+")"+D,O="(?:"+[I+y+"?",y,T,S,h].join("|")+")",F=RegExp(m,"g"),L=RegExp(y,"g"),j=RegExp(x+"(?="+x+")|"+O+D,"g"),H=RegExp([C+"?"+k+"+"+P+"(?="+[g,C,"$"].join("|")+")",M+"+"+U+"(?="+[g,C+R,"$"].join("|")+")",C+"?"+R+"+"+P,C+"+"+U,v,N].join("|"),"g"),G=RegExp("["+E+s+c+u+p+"]"),z=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,K="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,W="object"==typeof self&&self&&self.Object===Object&&self,Z=K||W||Function("return this")();var V,q=(V={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"ss"},function(e){return null==V?void 0:V[e]});function Q(e){return G.test(e)}function J(e){return Q(e)?function(e){return e.match(j)||[]}(e):function(e){return e.split("")}(e)}var Y=Object.prototype.toString,X=Z.Symbol,$=X?X.prototype:void 0,ee=$?$.toString:void 0;function te(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Y.call(e)==o}(e))return ee?ee.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}function ne(e,t,n){var a=e.length;return n=void 0===n?a:n,!t&&n>=a?e:function(e,t,n){var a=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(o);++a-1},Te.prototype.set=function(e,t){var n=this.__data__,a=Me(n,e);return a<0?n.push([e,t]):n[a][1]=t,this},Se.prototype.clear=function(){this.__data__={hash:new Ie,map:new(le||Te),string:new Ie}},Se.prototype.delete=function(e){return He(this,e).delete(e)},Se.prototype.get=function(e){return He(this,e).get(e)},Se.prototype.has=function(e){return He(this,e).has(e)},Se.prototype.set=function(e,t){return He(this,e).set(e,t),this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,r),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.clear=function(){this.__data__=new Te},Ee.prototype.delete=function(e){return this.__data__.delete(e)},Ee.prototype.get=function(e){return this.__data__.get(e)},Ee.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Te){var o=n.__data__;if(!le||o.lengthu))return!1;var l=r.get(e);if(l&&r.get(t))return l==t;var f=-1,p=!0,b=o&i?new Ce:void 0;for(r.set(e,t),r.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=u}function ot(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function rt(e){return!!e&&"object"==typeof e}function it(e){return"symbol"==typeof e||rt(e)&&ae.call(e)==I}var st=z?function(e){return function(t){return e(t)}}(z):function(e){return rt(e)&&at(e.length)&&!!D[ae.call(e)]};function ct(e){return tt(e)?Re(e):Fe(e)}function ut(e){return e}e.exports=function(e,t){var n={};return t=Oe(t),function(e,t){e&&Ue(e,t,ct)}(e,(function(e,a,o){n[a]=t(e,a,o)})),n}},78940:function(e,t,n){var a="Expected a function",o="__lodash_hash_undefined__",r="[object Function]",i="[object GeneratorFunction]",s=/^\[object .+?Constructor\]$/,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=c||u||Function("return this")();var l=Array.prototype,f=Function.prototype,p=Object.prototype,b=d["__core-js_shared__"],m=function(){var e=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),h=f.toString,g=p.hasOwnProperty,y=p.toString,v=RegExp("^"+h.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=l.splice,k=R(d,"Map"),A=R(Object,"create");function x(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},I.prototype.set=function(e,t){var n=this.__data__,a=S(n,e);return a<0?n.push([e,t]):n[a][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new x,map:new(k||I),string:new x}},T.prototype.delete=function(e){return E(this,e).delete(e)},T.prototype.get=function(e){return E(this,e).get(e)},T.prototype.has=function(e){return E(this,e).has(e)},T.prototype.set=function(e,t){return E(this,e).set(e,t),this},M.Cache=T,e.exports=M},14667:function(e,t,n){var a;e=n.nmd(e),function(){var o,r="Expected a function",i="__lodash_hash_undefined__",s="__lodash_placeholder__",c=16,u=32,d=64,l=128,f=256,p=1/0,b=9007199254740991,m=NaN,h=4294967295,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",c],["flip",512],["partial",u],["partialRight",d],["rearg",f]],y="[object Arguments]",v="[object Array]",w="[object Boolean]",k="[object Date]",A="[object Error]",x="[object Function]",I="[object GeneratorFunction]",T="[object Map]",S="[object Number]",C="[object Object]",E="[object Promise]",R="[object RegExp]",M="[object Set]",P="[object String]",U="[object Symbol]",_="[object WeakMap]",B="[object ArrayBuffer]",D="[object DataView]",N="[object Float32Array]",O="[object Float64Array]",F="[object Int8Array]",L="[object Int16Array]",j="[object Int32Array]",H="[object Uint8Array]",G="[object Uint8ClampedArray]",z="[object Uint16Array]",K="[object Uint32Array]",W=/\b__p \+= '';/g,Z=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Q=/[&<>"']/g,J=RegExp(q.source),Y=RegExp(Q.source),X=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,re=RegExp(oe.source),ie=/^\s+/,se=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,de=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,be=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,ke=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ae=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Ie="\\ud800-\\udfff",Te="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Re="\\ufe0e\\ufe0f",Me="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="['\u2019]",Ue="["+Ie+"]",_e="["+Me+"]",Be="["+Te+"]",De="\\d+",Ne="["+Se+"]",Oe="["+Ce+"]",Fe="[^"+Ie+Me+De+Se+Ce+Ee+"]",Le="\\ud83c[\\udffb-\\udfff]",je="[^"+Ie+"]",He="(?:\\ud83c[\\udde6-\\uddff]){2}",Ge="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+Ee+"]",Ke="\\u200d",We="(?:"+Oe+"|"+Fe+")",Ze="(?:"+ze+"|"+Fe+")",Ve="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",qe="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Be+"|"+Le+")"+"?",Je="["+Re+"]?",Ye=Je+Qe+("(?:"+Ke+"(?:"+[je,He,Ge].join("|")+")"+Je+Qe+")*"),Xe="(?:"+[Ne,He,Ge].join("|")+")"+Ye,$e="(?:"+[je+Be+"?",Be,He,Ge,Ue].join("|")+")",et=RegExp(Pe,"g"),tt=RegExp(Be,"g"),nt=RegExp(Le+"(?="+Le+")|"+$e+Ye,"g"),at=RegExp([ze+"?"+Oe+"+"+Ve+"(?="+[_e,ze,"$"].join("|")+")",Ze+"+"+qe+"(?="+[_e,ze+We,"$"].join("|")+")",ze+"?"+We+"+"+Ve,ze+"+"+qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",De,Xe].join("|"),"g"),ot=RegExp("["+Ke+Ie+Te+Re+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,ct={};ct[N]=ct[O]=ct[F]=ct[L]=ct[j]=ct[H]=ct[G]=ct[z]=ct[K]=!0,ct[y]=ct[v]=ct[B]=ct[w]=ct[D]=ct[k]=ct[A]=ct[x]=ct[T]=ct[S]=ct[C]=ct[R]=ct[M]=ct[P]=ct[_]=!1;var ut={};ut[y]=ut[v]=ut[B]=ut[D]=ut[w]=ut[k]=ut[N]=ut[O]=ut[F]=ut[L]=ut[j]=ut[T]=ut[S]=ut[C]=ut[R]=ut[M]=ut[P]=ut[U]=ut[H]=ut[G]=ut[z]=ut[K]=!0,ut[A]=ut[x]=ut[_]=!1;var dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ft=parseInt,pt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,bt="object"==typeof self&&self&&self.Object===Object&&self,mt=pt||bt||Function("return this")(),ht=t&&!t.nodeType&&t,gt=ht&&e&&!e.nodeType&&e,yt=gt&>.exports===ht,vt=yt&&pt.process,wt=function(){try{var e=gt&>.require&>.require("util").types;return e||vt&&vt.binding&&vt.binding("util")}catch(t){}}(),kt=wt&&wt.isArrayBuffer,At=wt&&wt.isDate,xt=wt&&wt.isMap,It=wt&&wt.isRegExp,Tt=wt&&wt.isSet,St=wt&&wt.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Et(e,t,n,a){for(var o=-1,r=null==e?0:e.length;++o-1}function Bt(e,t,n){for(var a=-1,o=null==e?0:e.length;++a-1;);return n}function an(e,t){for(var n=e.length;n--&&zt(t,e[n],0)>-1;);return n}var on=qt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),rn=qt({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(e){return"\\"+dt[e]}function cn(e){return ot.test(e)}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,a){n[++t]=[a,e]})),n}function dn(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,a=e.length,o=0,r=[];++n",""":'"',"'":"'"});var yn=function e(t){var n=(t=null==t?mt:yn.defaults(mt.Object(),t,yn.pick(mt,it))).Array,a=t.Date,se=t.Error,Ie=t.Function,Te=t.Math,Se=t.Object,Ce=t.RegExp,Ee=t.String,Re=t.TypeError,Me=n.prototype,Pe=Ie.prototype,Ue=Se.prototype,_e=t["__core-js_shared__"],Be=Pe.toString,De=Ue.hasOwnProperty,Ne=0,Oe=function(){var e=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Fe=Ue.toString,Le=Be.call(Se),je=mt._,He=Ce("^"+Be.call(De).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=yt?t.Buffer:o,ze=t.Symbol,Ke=t.Uint8Array,We=Ge?Ge.allocUnsafe:o,Ze=dn(Se.getPrototypeOf,Se),Ve=Se.create,qe=Ue.propertyIsEnumerable,Qe=Me.splice,Je=ze?ze.isConcatSpreadable:o,Ye=ze?ze.iterator:o,Xe=ze?ze.toStringTag:o,$e=function(){try{var e=fr(Se,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,ot=a&&a.now!==mt.Date.now&&a.now,dt=t.setTimeout!==mt.setTimeout&&t.setTimeout,pt=Te.ceil,bt=Te.floor,ht=Se.getOwnPropertySymbols,gt=Ge?Ge.isBuffer:o,vt=t.isFinite,wt=Me.join,jt=dn(Se.keys,Se),qt=Te.max,vn=Te.min,wn=a.now,kn=t.parseInt,An=Te.random,xn=Me.reverse,In=fr(t,"DataView"),Tn=fr(t,"Map"),Sn=fr(t,"Promise"),Cn=fr(t,"Set"),En=fr(t,"WeakMap"),Rn=fr(Se,"create"),Mn=En&&new En,Pn={},Un=Fr(In),_n=Fr(Tn),Bn=Fr(Sn),Dn=Fr(Cn),Nn=Fr(En),On=ze?ze.prototype:o,Fn=On?On.valueOf:o,Ln=On?On.toString:o;function jn(e){if(ts(e)&&!Ki(e)&&!(e instanceof Kn)){if(e instanceof zn)return e;if(De.call(e,"__wrapped__"))return Lr(e)}return new zn(e)}var Hn=function(){function e(){}return function(t){if(!es(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Gn(){}function zn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Kn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ca(e,t,n,a,r,i){var s,c=1&t,u=2&t,d=4&t;if(n&&(s=r?n(e,a,r,i):n(e)),s!==o)return s;if(!es(e))return e;var l=Ki(e);if(l){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!c)return Mo(e,s)}else{var f=mr(e),p=f==x||f==I;if(qi(e))return Io(e,c);if(f==C||f==y||p&&!r){if(s=u||p?{}:gr(e),!c)return u?function(e,t){return Po(e,br(e),t)}(e,function(e,t){return e&&Po(t,Us(t),e)}(s,e)):function(e,t){return Po(e,pr(e),t)}(e,oa(s,e))}else{if(!ut[f])return r?e:{};s=function(e,t,n){var a=e.constructor;switch(t){case B:return To(e);case w:case k:return new a(+e);case D:return function(e,t){var n=t?To(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case O:case F:case L:case j:case H:case G:case z:case K:return So(e,n);case T:return new a;case S:case P:return new a(e);case R:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case M:return new a;case U:return o=e,Fn?Se(Fn.call(o)):{}}var o}(e,f,c)}}i||(i=new Qn);var b=i.get(e);if(b)return b;i.set(e,s),is(e)?e.forEach((function(a){s.add(ca(a,t,n,a,e,i))})):ns(e)&&e.forEach((function(a,o){s.set(o,ca(a,t,n,o,e,i))}));var m=l?o:(d?u?rr:or:u?Us:Ps)(e);return Rt(m||e,(function(a,o){m&&(a=e[o=a]),ta(s,o,ca(a,t,n,o,e,i))})),s}function ua(e,t,n){var a=n.length;if(null==e)return!a;for(e=Se(e);a--;){var r=n[a],i=t[r],s=e[r];if(s===o&&!(r in e)||!i(s))return!1}return!0}function da(e,t,n){if("function"!=typeof e)throw new Re(r);return Pr((function(){e.apply(o,n)}),t)}function la(e,t,n,a){var o=-1,r=_t,i=!0,s=e.length,c=[],u=t.length;if(!s)return c;n&&(t=Dt(t,$t(n))),a?(r=Bt,i=!1):t.length>=200&&(r=tn,i=!1,t=new qn(t));e:for(;++o-1},Zn.prototype.set=function(e,t){var n=this.__data__,a=na(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Tn||Zn),string:new Wn}},Vn.prototype.delete=function(e){var t=dr(this,e).delete(e);return this.size-=t?1:0,t},Vn.prototype.get=function(e){return dr(this,e).get(e)},Vn.prototype.has=function(e){return dr(this,e).has(e)},Vn.prototype.set=function(e,t){var n=dr(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,i),this},qn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.clear=function(){this.__data__=new Zn,this.size=0},Qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Qn.prototype.get=function(e){return this.__data__.get(e)},Qn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Zn){var a=n.__data__;if(!Tn||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vn(a)}return n.set(e,t),this.size=n.size,this};var fa=Bo(wa),pa=Bo(ka,!0);function ba(e,t){var n=!0;return fa(e,(function(e,a,o){return n=!!t(e,a,o)})),n}function ma(e,t,n){for(var a=-1,r=e.length;++a0&&n(s)?t>1?ga(s,t-1,n,a,o):Nt(o,s):a||(o[o.length]=s)}return o}var ya=Do(),va=Do(!0);function wa(e,t){return e&&ya(e,t,Ps)}function ka(e,t){return e&&va(e,t,Ps)}function Aa(e,t){return Ut(t,(function(t){return Yi(e[t])}))}function xa(e,t){for(var n=0,a=(t=wo(t,e)).length;null!=e&&nt}function Ca(e,t){return null!=e&&De.call(e,t)}function Ea(e,t){return null!=e&&t in Se(e)}function Ra(e,t,a){for(var r=a?Bt:_t,i=e[0].length,s=e.length,c=s,u=n(s),d=1/0,l=[];c--;){var f=e[c];c&&t&&(f=Dt(f,$t(t))),d=vn(f.length,d),u[c]=!a&&(t||i>=120&&f.length>=120)?new qn(c&&f):o}f=e[0];var p=-1,b=u[0];e:for(;++p=s?c:c*("desc"==n[a]?-1:1)}return e.index-t.index}(e,t,n)}))}function Wa(e,t,n){for(var a=-1,o=t.length,r={};++a-1;)s!==e&&Qe.call(s,c,1),Qe.call(e,c,1);return e}function Va(e,t){for(var n=e?t.length:0,a=n-1;n--;){var o=t[n];if(n==a||o!==r){var r=o;vr(o)?Qe.call(e,o,1):fo(e,o)}}return e}function qa(e,t){return e+bt(An()*(t-e+1))}function Qa(e,t){var n="";if(!e||t<1||t>b)return n;do{t%2&&(n+=e),(t=bt(t/2))&&(e+=e)}while(t);return n}function Ja(e,t){return Ur(Cr(e,t,ac),e+"")}function Ya(e){return Yn(js(e))}function Xa(e,t){var n=js(e);return Dr(n,sa(t,0,n.length))}function $a(e,t,n,a){if(!es(e))return e;for(var r=-1,i=(t=wo(t,e)).length,s=i-1,c=e;null!=c&&++rr?0:r+t),(a=a>r?r:a)<0&&(a+=r),r=t>a?0:a-t>>>0,t>>>=0;for(var i=n(r);++o>>1,i=e[r];null!==i&&!cs(i)&&(n?i<=t:i=200){var u=t?null:Jo(e);if(u)return fn(u);i=!1,o=tn,c=new qn}else c=t?[]:s;e:for(;++a=a?e:ao(e,t,n)}var xo=nt||function(e){return mt.clearTimeout(e)};function Io(e,t){if(t)return e.slice();var n=e.length,a=We?We(n):new e.constructor(n);return e.copy(a),a}function To(e){var t=new e.constructor(e.byteLength);return new Ke(t).set(new Ke(e)),t}function So(e,t){var n=t?To(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Co(e,t){if(e!==t){var n=e!==o,a=null===e,r=e===e,i=cs(e),s=t!==o,c=null===t,u=t===t,d=cs(t);if(!c&&!d&&!i&&e>t||i&&s&&u&&!c&&!d||a&&s&&u||!n&&u||!r)return 1;if(!a&&!i&&!d&&e1?n[r-1]:o,s=r>2?n[2]:o;for(i=e.length>3&&"function"==typeof i?(r--,i):o,s&&wr(n[0],n[1],s)&&(i=r<3?o:i,r=1),t=Se(t);++a-1?r[i?t[s]:s]:o}}function jo(e){return ar((function(t){var n=t.length,a=n,i=zn.prototype.thru;for(e&&t.reverse();a--;){var s=t[a];if("function"!=typeof s)throw new Re(r);if(i&&!c&&"wrapper"==sr(s))var c=new zn([],!0)}for(a=c?a:n;++a1&&w.reverse(),p&&dc))return!1;var d=i.get(e),l=i.get(t);if(d&&l)return d==t&&l==e;var f=-1,p=!0,b=2&n?new qn:o;for(i.set(e,t),i.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[a],t=t.join(n>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(a,function(e,t){return Rt(g,(function(n){var a="_."+n[0];t&n[1]&&!_t(e,a)&&e.push(a)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(de):[]}(a),n)))}function Br(e){var t=0,n=0;return function(){var a=wn(),r=16-(a-n);if(n=a,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Dr(e,t){var n=-1,a=e.length,r=a-1;for(t=t===o?a:t;++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,ri(e,n)}));function fi(e){var t=jn(e);return t.__chain__=!0,t}function pi(e,t){return t(e)}var bi=ar((function(e){var t=e.length,n=t?e[0]:0,a=this.__wrapped__,r=function(t){return ia(t,e)};return!(t>1||this.__actions__.length)&&a instanceof Kn&&vr(n)?((a=a.slice(n,+n+(t?1:0))).__actions__.push({func:pi,args:[r],thisArg:o}),new zn(a,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(r)}));var mi=Uo((function(e,t,n){De.call(e,n)?++e[n]:ra(e,n,1)}));var hi=Lo(zr),gi=Lo(Kr);function yi(e,t){return(Ki(e)?Rt:fa)(e,ur(t,3))}function vi(e,t){return(Ki(e)?Mt:pa)(e,ur(t,3))}var wi=Uo((function(e,t,n){De.call(e,n)?e[n].push(t):ra(e,n,[t])}));var ki=Ja((function(e,t,a){var o=-1,r="function"==typeof t,i=Zi(e)?n(e.length):[];return fa(e,(function(e){i[++o]=r?Ct(t,e,a):Ma(e,t,a)})),i})),Ai=Uo((function(e,t,n){ra(e,n,t)}));function xi(e,t){return(Ki(e)?Dt:La)(e,ur(t,3))}var Ii=Uo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ti=Ja((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wr(e,t[0],t[1])?t=[]:n>2&&wr(t[0],t[1],t[2])&&(t=[t[0]]),Ka(e,ga(t,1),[])})),Si=ot||function(){return mt.Date.now()};function Ci(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Xo(e,l,o,o,o,o,t)}function Ei(e,t){var n;if("function"!=typeof t)throw new Re(r);return e=bs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ri=Ja((function(e,t,n){var a=1;if(n.length){var o=ln(n,cr(Ri));a|=u}return Xo(e,a,t,n,o)})),Mi=Ja((function(e,t,n){var a=3;if(n.length){var o=ln(n,cr(Mi));a|=u}return Xo(t,a,e,n,o)}));function Pi(e,t,n){var a,i,s,c,u,d,l=0,f=!1,p=!1,b=!0;if("function"!=typeof e)throw new Re(r);function m(t){var n=a,r=i;return a=i=o,l=t,c=e.apply(r,n)}function h(e){var n=e-d;return d===o||n>=t||n<0||p&&e-l>=s}function g(){var e=Si();if(h(e))return y(e);u=Pr(g,function(e){var n=t-(e-d);return p?vn(n,s-(e-l)):n}(e))}function y(e){return u=o,b&&a?m(e):(a=i=o,c)}function v(){var e=Si(),n=h(e);if(a=arguments,i=this,d=e,n){if(u===o)return function(e){return l=e,u=Pr(g,t),f?m(e):c}(d);if(p)return xo(u),u=Pr(g,t),m(d)}return u===o&&(u=Pr(g,t)),c}return t=hs(t)||0,es(n)&&(f=!!n.leading,s=(p="maxWait"in n)?qt(hs(n.maxWait)||0,t):s,b="trailing"in n?!!n.trailing:b),v.cancel=function(){u!==o&&xo(u),l=0,a=d=i=u=o},v.flush=function(){return u===o?c:y(Si())},v}var Ui=Ja((function(e,t){return da(e,1,t)})),_i=Ja((function(e,t,n){return da(e,hs(t)||0,n)}));function Bi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Re(r);var n=function n(){var a=arguments,o=t?t.apply(this,a):a[0],r=n.cache;if(r.has(o))return r.get(o);var i=e.apply(this,a);return n.cache=r.set(o,i)||r,i};return n.cache=new(Bi.Cache||Vn),n}function Di(e){if("function"!=typeof e)throw new Re(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Bi.Cache=Vn;var Ni=ko((function(e,t){var n=(t=1==t.length&&Ki(t[0])?Dt(t[0],$t(ur())):Dt(ga(t,1),$t(ur()))).length;return Ja((function(a){for(var o=-1,r=vn(a.length,n);++o=t})),zi=Pa(function(){return arguments}())?Pa:function(e){return ts(e)&&De.call(e,"callee")&&!qe.call(e,"callee")},Ki=n.isArray,Wi=kt?$t(kt):function(e){return ts(e)&&Ta(e)==B};function Zi(e){return null!=e&&$i(e.length)&&!Yi(e)}function Vi(e){return ts(e)&&Zi(e)}var qi=gt||hc,Qi=At?$t(At):function(e){return ts(e)&&Ta(e)==k};function Ji(e){if(!ts(e))return!1;var t=Ta(e);return t==A||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!os(e)}function Yi(e){if(!es(e))return!1;var t=Ta(e);return t==x||t==I||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xi(e){return"number"==typeof e&&e==bs(e)}function $i(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=b}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=xt?$t(xt):function(e){return ts(e)&&mr(e)==T};function as(e){return"number"==typeof e||ts(e)&&Ta(e)==S}function os(e){if(!ts(e)||Ta(e)!=C)return!1;var t=Ze(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Be.call(n)==Le}var rs=It?$t(It):function(e){return ts(e)&&Ta(e)==R};var is=Tt?$t(Tt):function(e){return ts(e)&&mr(e)==M};function ss(e){return"string"==typeof e||!Ki(e)&&ts(e)&&Ta(e)==P}function cs(e){return"symbol"==typeof e||ts(e)&&Ta(e)==U}var us=St?$t(St):function(e){return ts(e)&&$i(e.length)&&!!ct[Ta(e)]};var ds=Vo(Fa),ls=Vo((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Zi(e))return ss(e)?mn(e):Mo(e);if(Ye&&e[Ye])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ye]());var t=mr(e);return(t==T?un:t==M?fn:js)(e)}function ps(e){return e?(e=hs(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function bs(e){var t=ps(e),n=t%1;return t===t?n?t-n:t:0}function ms(e){return e?sa(bs(e),0,h):0}function hs(e){if("number"==typeof e)return e;if(cs(e))return m;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=ge.test(e);return n||ve.test(e)?ft(e.slice(2),n?2:8):he.test(e)?m:+e}function gs(e){return Po(e,Us(e))}function ys(e){return null==e?"":uo(e)}var vs=_o((function(e,t){if(Ir(t)||Zi(t))Po(t,Ps(t),e);else for(var n in t)De.call(t,n)&&ta(e,n,t[n])})),ws=_o((function(e,t){Po(t,Us(t),e)})),ks=_o((function(e,t,n,a){Po(t,Us(t),e,a)})),As=_o((function(e,t,n,a){Po(t,Ps(t),e,a)})),xs=ar(ia);var Is=Ja((function(e,t){e=Se(e);var n=-1,a=t.length,r=a>2?t[2]:o;for(r&&wr(t[0],t[1],r)&&(a=1);++n1),t})),Po(e,rr(e),n),a&&(n=ca(n,7,tr));for(var o=t.length;o--;)fo(n,t[o]);return n}));var Ns=ar((function(e,t){return null==e?{}:function(e,t){return Wa(e,t,(function(t,n){return Cs(e,n)}))}(e,t)}));function Os(e,t){if(null==e)return{};var n=Dt(rr(e),(function(e){return[e]}));return t=ur(t),Wa(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Yo(Ps),Ls=Yo(Us);function js(e){return null==e?[]:en(e,Ps(e))}var Hs=Oo((function(e,t,n){return t=t.toLowerCase(),e+(n?Gs(t):t)}));function Gs(e){return Js(ys(e).toLowerCase())}function zs(e){return(e=ys(e))&&e.replace(ke,on).replace(tt,"")}var Ks=Oo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ws=Oo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Zs=No("toLowerCase");var Vs=Oo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var qs=Oo((function(e,t,n){return e+(n?" ":"")+Js(t)}));var Qs=Oo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Js=No("toUpperCase");function Ys(e,t,n){return e=ys(e),(t=n?o:t)===o?function(e){return rt.test(e)}(e)?function(e){return e.match(at)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Xs=Ja((function(e,t){try{return Ct(e,o,t)}catch(n){return Ji(n)?n:new se(n)}})),$s=ar((function(e,t){return Rt(t,(function(t){t=Or(t),ra(e,t,Ri(e[t],e))})),e}));function ec(e){return function(){return e}}var tc=jo(),nc=jo(!0);function ac(e){return e}function oc(e){return Da("function"==typeof e?e:ca(e,1))}var rc=Ja((function(e,t){return function(n){return Ma(n,e,t)}})),ic=Ja((function(e,t){return function(n){return Ma(e,n,t)}}));function sc(e,t,n){var a=Ps(t),o=Aa(t,a);null!=n||es(t)&&(o.length||!a.length)||(n=t,t=e,e=this,o=Aa(t,Ps(t)));var r=!(es(n)&&"chain"in n)||!!n.chain,i=Yi(e);return Rt(o,(function(n){var a=t[n];e[n]=a,i&&(e.prototype[n]=function(){var t=this.__chain__;if(r||t){var n=e(this.__wrapped__);return(n.__actions__=Mo(this.__actions__)).push({func:a,args:arguments,thisArg:e}),n.__chain__=t,n}return a.apply(e,Nt([this.value()],arguments))})})),e}function cc(){}var uc=Ko(Dt),dc=Ko(Pt),lc=Ko(Lt);function fc(e){return kr(e)?Vt(Or(e)):function(e){return function(t){return xa(t,e)}}(e)}var pc=Zo(),bc=Zo(!0);function mc(){return[]}function hc(){return!1}var gc=zo((function(e,t){return e+t}),0),yc=Qo("ceil"),vc=zo((function(e,t){return e/t}),1),wc=Qo("floor");var kc=zo((function(e,t){return e*t}),1),Ac=Qo("round"),xc=zo((function(e,t){return e-t}),0);return jn.after=function(e,t){if("function"!=typeof t)throw new Re(r);return e=bs(e),function(){if(--e<1)return t.apply(this,arguments)}},jn.ary=Ci,jn.assign=vs,jn.assignIn=ws,jn.assignInWith=ks,jn.assignWith=As,jn.at=xs,jn.before=Ei,jn.bind=Ri,jn.bindAll=$s,jn.bindKey=Mi,jn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ki(e)?e:[e]},jn.chain=fi,jn.chunk=function(e,t,a){t=(a?wr(e,t,a):t===o)?1:qt(bs(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,s=0,c=n(pt(r/t));ir?0:r+n),(a=a===o||a>r?r:bs(a))<0&&(a+=r),a=n>a?0:ms(a);n>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!rs(t))&&!(t=uo(t))&&cn(e)?Ao(mn(e),0,n):e.split(t,n):[]},jn.spread=function(e,t){if("function"!=typeof e)throw new Re(r);return t=null==t?0:qt(bs(t),0),Ja((function(n){var a=n[t],o=Ao(n,0,t);return a&&Nt(o,a),Ct(e,this,o)}))},jn.tail=function(e){var t=null==e?0:e.length;return t?ao(e,1,t):[]},jn.take=function(e,t,n){return e&&e.length?ao(e,0,(t=n||t===o?1:bs(t))<0?0:t):[]},jn.takeRight=function(e,t,n){var a=null==e?0:e.length;return a?ao(e,(t=a-(t=n||t===o?1:bs(t)))<0?0:t,a):[]},jn.takeRightWhile=function(e,t){return e&&e.length?bo(e,ur(t,3),!1,!0):[]},jn.takeWhile=function(e,t){return e&&e.length?bo(e,ur(t,3)):[]},jn.tap=function(e,t){return t(e),e},jn.throttle=function(e,t,n){var a=!0,o=!0;if("function"!=typeof e)throw new Re(r);return es(n)&&(a="leading"in n?!!n.leading:a,o="trailing"in n?!!n.trailing:o),Pi(e,t,{leading:a,maxWait:t,trailing:o})},jn.thru=pi,jn.toArray=fs,jn.toPairs=Fs,jn.toPairsIn=Ls,jn.toPath=function(e){return Ki(e)?Dt(e,Or):cs(e)?[e]:Mo(Nr(ys(e)))},jn.toPlainObject=gs,jn.transform=function(e,t,n){var a=Ki(e),o=a||qi(e)||us(e);if(t=ur(t,4),null==n){var r=e&&e.constructor;n=o?a?new r:[]:es(e)&&Yi(r)?Hn(Ze(e)):{}}return(o?Rt:wa)(e,(function(e,a,o){return t(n,e,a,o)})),n},jn.unary=function(e){return Ci(e,1)},jn.union=ti,jn.unionBy=ni,jn.unionWith=ai,jn.uniq=function(e){return e&&e.length?lo(e):[]},jn.uniqBy=function(e,t){return e&&e.length?lo(e,ur(t,2)):[]},jn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?lo(e,o,t):[]},jn.unset=function(e,t){return null==e||fo(e,t)},jn.unzip=oi,jn.unzipWith=ri,jn.update=function(e,t,n){return null==e?e:po(e,t,vo(n))},jn.updateWith=function(e,t,n,a){return a="function"==typeof a?a:o,null==e?e:po(e,t,vo(n),a)},jn.values=js,jn.valuesIn=function(e){return null==e?[]:en(e,Us(e))},jn.without=ii,jn.words=Ys,jn.wrap=function(e,t){return Oi(vo(t),e)},jn.xor=si,jn.xorBy=ci,jn.xorWith=ui,jn.zip=di,jn.zipObject=function(e,t){return go(e||[],t||[],ta)},jn.zipObjectDeep=function(e,t){return go(e||[],t||[],$a)},jn.zipWith=li,jn.entries=Fs,jn.entriesIn=Ls,jn.extend=ws,jn.extendWith=ks,sc(jn,jn),jn.add=gc,jn.attempt=Xs,jn.camelCase=Hs,jn.capitalize=Gs,jn.ceil=yc,jn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=hs(n))===n?n:0),t!==o&&(t=(t=hs(t))===t?t:0),sa(hs(e),t,n)},jn.clone=function(e){return ca(e,4)},jn.cloneDeep=function(e){return ca(e,5)},jn.cloneDeepWith=function(e,t){return ca(e,5,t="function"==typeof t?t:o)},jn.cloneWith=function(e,t){return ca(e,4,t="function"==typeof t?t:o)},jn.conformsTo=function(e,t){return null==t||ua(e,t,Ps(t))},jn.deburr=zs,jn.defaultTo=function(e,t){return null==e||e!==e?t:e},jn.divide=vc,jn.endsWith=function(e,t,n){e=ys(e),t=uo(t);var a=e.length,r=n=n===o?a:sa(bs(n),0,a);return(n-=t.length)>=0&&e.slice(n,r)==t},jn.eq=ji,jn.escape=function(e){return(e=ys(e))&&Y.test(e)?e.replace(Q,rn):e},jn.escapeRegExp=function(e){return(e=ys(e))&&re.test(e)?e.replace(oe,"\\$&"):e},jn.every=function(e,t,n){var a=Ki(e)?Pt:ba;return n&&wr(e,t,n)&&(t=o),a(e,ur(t,3))},jn.find=hi,jn.findIndex=zr,jn.findKey=function(e,t){return Ht(e,ur(t,3),wa)},jn.findLast=gi,jn.findLastIndex=Kr,jn.findLastKey=function(e,t){return Ht(e,ur(t,3),ka)},jn.floor=wc,jn.forEach=yi,jn.forEachRight=vi,jn.forIn=function(e,t){return null==e?e:ya(e,ur(t,3),Us)},jn.forInRight=function(e,t){return null==e?e:va(e,ur(t,3),Us)},jn.forOwn=function(e,t){return e&&wa(e,ur(t,3))},jn.forOwnRight=function(e,t){return e&&ka(e,ur(t,3))},jn.get=Ss,jn.gt=Hi,jn.gte=Gi,jn.has=function(e,t){return null!=e&&hr(e,t,Ca)},jn.hasIn=Cs,jn.head=Zr,jn.identity=ac,jn.includes=function(e,t,n,a){e=Zi(e)?e:js(e),n=n&&!a?bs(n):0;var o=e.length;return n<0&&(n=qt(o+n,0)),ss(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&zt(e,t,n)>-1},jn.indexOf=function(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var o=null==n?0:bs(n);return o<0&&(o=qt(a+o,0)),zt(e,t,o)},jn.inRange=function(e,t,n){return t=ps(t),n===o?(n=t,t=0):n=ps(n),function(e,t,n){return e>=vn(t,n)&&e=-9007199254740991&&e<=b},jn.isSet=is,jn.isString=ss,jn.isSymbol=cs,jn.isTypedArray=us,jn.isUndefined=function(e){return e===o},jn.isWeakMap=function(e){return ts(e)&&mr(e)==_},jn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Ta(e)},jn.join=function(e,t){return null==e?"":wt.call(e,t)},jn.kebabCase=Ks,jn.last=Jr,jn.lastIndexOf=function(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var r=a;return n!==o&&(r=(r=bs(n))<0?qt(a+r,0):vn(r,a-1)),t===t?function(e,t,n){for(var a=n+1;a--;)if(e[a]===t)return a;return a}(e,t,r):Gt(e,Wt,r,!0)},jn.lowerCase=Ws,jn.lowerFirst=Zs,jn.lt=ds,jn.lte=ls,jn.max=function(e){return e&&e.length?ma(e,ac,Sa):o},jn.maxBy=function(e,t){return e&&e.length?ma(e,ur(t,2),Sa):o},jn.mean=function(e){return Zt(e,ac)},jn.meanBy=function(e,t){return Zt(e,ur(t,2))},jn.min=function(e){return e&&e.length?ma(e,ac,Fa):o},jn.minBy=function(e,t){return e&&e.length?ma(e,ur(t,2),Fa):o},jn.stubArray=mc,jn.stubFalse=hc,jn.stubObject=function(){return{}},jn.stubString=function(){return""},jn.stubTrue=function(){return!0},jn.multiply=kc,jn.nth=function(e,t){return e&&e.length?za(e,bs(t)):o},jn.noConflict=function(){return mt._===this&&(mt._=je),this},jn.noop=cc,jn.now=Si,jn.pad=function(e,t,n){e=ys(e);var a=(t=bs(t))?bn(e):0;if(!t||a>=t)return e;var o=(t-a)/2;return Wo(bt(o),n)+e+Wo(pt(o),n)},jn.padEnd=function(e,t,n){e=ys(e);var a=(t=bs(t))?bn(e):0;return t&&at){var a=e;e=t,t=a}if(n||e%1||t%1){var r=An();return vn(e+r*(t-e+lt("1e-"+((r+"").length-1))),t)}return qa(e,t)},jn.reduce=function(e,t,n){var a=Ki(e)?Ot:Qt,o=arguments.length<3;return a(e,ur(t,4),n,o,fa)},jn.reduceRight=function(e,t,n){var a=Ki(e)?Ft:Qt,o=arguments.length<3;return a(e,ur(t,4),n,o,pa)},jn.repeat=function(e,t,n){return t=(n?wr(e,t,n):t===o)?1:bs(t),Qa(ys(e),t)},jn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jn.result=function(e,t,n){var a=-1,r=(t=wo(t,e)).length;for(r||(r=1,e=o);++ab)return[];var n=h,a=vn(e,h);t=ur(t),e-=h;for(var o=Yt(a,t);++n=i)return e;var c=n-bn(a);if(c<1)return a;var u=s?Ao(s,0,c).join(""):e.slice(0,c);if(r===o)return u+a;if(s&&(c+=u.length-c),rs(r)){if(e.slice(c).search(r)){var d,l=u;for(r.global||(r=Ce(r.source,ys(me.exec(r))+"g")),r.lastIndex=0;d=r.exec(l);)var f=d.index;u=u.slice(0,f===o?c:f)}}else if(e.indexOf(uo(r),c)!=c){var p=u.lastIndexOf(r);p>-1&&(u=u.slice(0,p))}return u+a},jn.unescape=function(e){return(e=ys(e))&&J.test(e)?e.replace(q,gn):e},jn.uniqueId=function(e){var t=++Ne;return ys(e)+t},jn.upperCase=Qs,jn.upperFirst=Js,jn.each=yi,jn.eachRight=vi,jn.first=Zr,sc(jn,function(){var e={};return wa(jn,(function(t,n){De.call(jn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),jn.VERSION="4.17.21",Rt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jn[e].placeholder=jn})),Rt(["drop","take"],(function(e,t){Kn.prototype[e]=function(n){n=n===o?1:qt(bs(n),0);var a=this.__filtered__&&!t?new Kn(this):this.clone();return a.__filtered__?a.__takeCount__=vn(n,a.__takeCount__):a.__views__.push({size:vn(n,h),type:e+(a.__dir__<0?"Right":"")}),a},Kn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Rt(["filter","map","takeWhile"],(function(e,t){var n=t+1,a=1==n||3==n;Kn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ur(e,3),type:n}),t.__filtered__=t.__filtered__||a,t}})),Rt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Kn.prototype[e]=function(){return this[n](1).value()[0]}})),Rt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Kn.prototype[e]=function(){return this.__filtered__?new Kn(this):this[n](1)}})),Kn.prototype.compact=function(){return this.filter(ac)},Kn.prototype.find=function(e){return this.filter(e).head()},Kn.prototype.findLast=function(e){return this.reverse().find(e)},Kn.prototype.invokeMap=Ja((function(e,t){return"function"==typeof e?new Kn(this):this.map((function(n){return Ma(n,e,t)}))})),Kn.prototype.reject=function(e){return this.filter(Di(ur(e)))},Kn.prototype.slice=function(e,t){e=bs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Kn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=bs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Kn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Kn.prototype.toArray=function(){return this.take(h)},wa(Kn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),r=jn[a?"take"+("last"==t?"Right":""):t],i=a||/^find/.test(t);r&&(jn.prototype[t]=function(){var t=this.__wrapped__,s=a?[1]:arguments,c=t instanceof Kn,u=s[0],d=c||Ki(t),l=function(e){var t=r.apply(jn,Nt([e],s));return a&&f?t[0]:t};d&&n&&"function"==typeof u&&1!=u.length&&(c=d=!1);var f=this.__chain__,p=!!this.__actions__.length,b=i&&!f,m=c&&!p;if(!i&&d){t=m?t:new Kn(this);var h=e.apply(t,s);return h.__actions__.push({func:pi,args:[l],thisArg:o}),new zn(h,f)}return b&&m?e.apply(this,s):(h=this.thru(l),b?a?h.value()[0]:h.value():h)})})),Rt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Me[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);jn.prototype[e]=function(){var e=arguments;if(a&&!this.__chain__){var o=this.value();return t.apply(Ki(o)?o:[],e)}return this[n]((function(n){return t.apply(Ki(n)?n:[],e)}))}})),wa(Kn.prototype,(function(e,t){var n=jn[t];if(n){var a=n.name+"";De.call(Pn,a)||(Pn[a]=[]),Pn[a].push({name:t,func:n})}})),Pn[Ho(o,2).name]=[{name:"wrapper",func:o}],Kn.prototype.clone=function(){var e=new Kn(this.__wrapped__);return e.__actions__=Mo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mo(this.__views__),e},Kn.prototype.reverse=function(){if(this.__filtered__){var e=new Kn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Kn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ki(e),a=t<0,o=n?e.length:0,r=function(e,t,n){var a=-1,o=n.length;for(;++a=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},jn.prototype.plant=function(e){for(var t,n=this;n instanceof Gn;){var a=Lr(n);a.__index__=0,a.__values__=o,t?r.__wrapped__=a:t=a;var r=a;n=n.__wrapped__}return r.__wrapped__=e,t},jn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Kn){var t=e;return this.__actions__.length&&(t=new Kn(this)),(t=t.reverse()).__actions__.push({func:pi,args:[ei],thisArg:o}),new zn(t,this.__chain__)}return this.thru(ei)},jn.prototype.toJSON=jn.prototype.valueOf=jn.prototype.value=function(){return mo(this.__wrapped__,this.__actions__)},jn.prototype.first=jn.prototype.head,Ye&&(jn.prototype[Ye]=function(){return this}),jn}();mt._=yn,(a=function(){return yn}.call(t,n,t,e))===o||(e.exports=a)}.call(this)},29600:function(e){e.exports=n;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(T){}function n(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function a(e){return!0===(e&&e.__isLong__)}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=a;var o={},r={};function i(e,t){var n,a,i;return t?(i=0<=(e>>>=0)&&e<256)&&(a=r[e])?a:(n=c(e,(0|e)<0?-1:0,!0),i&&(r[e]=n),n):(i=-128<=(e|=0)&&e<128)&&(a=o[e])?a:(n=c(e,e<0?-1:0,!1),i&&(o[e]=n),n)}function s(e,t){if(isNaN(e))return t?g:h;if(t){if(e<0)return g;if(e>=p)return A}else{if(e<=-b)return x;if(e+1>=b)return k}return e<0?s(-e,t).neg():c(e%f|0,e/f|0,t)}function c(e,t,a){return new n(e,t,a)}n.fromInt=i,n.fromNumber=s,n.fromBits=c;var u=Math.pow;function d(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return h;if("number"===typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||360)throw Error("interior hyphen");if(0===a)return d(e.substring(1),t,n).neg();for(var o=s(u(n,8)),r=h,i=0;i>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},I.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((r=c).isZero())return d+i;for(;d.length<6;)d="0"+d;i=""+d+i}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(x)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},I.isOdd=function(){return 1===(1&this.low)},I.isEven=function(){return 0===(1&this.low)},I.equals=function(e){return a(e)||(e=l(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&(this.high===e.high&&this.low===e.low)},I.eq=I.equals,I.notEquals=function(e){return!this.eq(e)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(e){return this.comp(e)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(e){return this.comp(e)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(e){return this.comp(e)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(e){return this.comp(e)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(e){if(a(e)||(e=l(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(x)?x:this.not().add(y)},I.neg=I.negate,I.add=function(e){a(e)||(e=l(e));var t=this.high>>>16,n=65535&this.high,o=this.low>>>16,r=65535&this.low,i=e.high>>>16,s=65535&e.high,u=e.low>>>16,d=0,f=0,p=0,b=0;return p+=(b+=r+(65535&e.low))>>>16,f+=(p+=o+u)>>>16,d+=(f+=n+s)>>>16,d+=t+i,c((p&=65535)<<16|(b&=65535),(d&=65535)<<16|(f&=65535),this.unsigned)},I.subtract=function(e){return a(e)||(e=l(e)),this.add(e.neg())},I.sub=I.subtract,I.multiply=function(e){if(this.isZero())return h;if(a(e)||(e=l(e)),t)return c(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return h;if(this.eq(x))return e.isOdd()?x:h;if(e.eq(x))return this.isOdd()?x:h;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(m)&&e.lt(m))return s(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,o=65535&this.high,r=this.low>>>16,i=65535&this.low,u=e.high>>>16,d=65535&e.high,f=e.low>>>16,p=65535&e.low,b=0,g=0,y=0,v=0;return y+=(v+=i*p)>>>16,g+=(y+=r*p)>>>16,y&=65535,g+=(y+=i*f)>>>16,b+=(g+=o*p)>>>16,g&=65535,b+=(g+=r*f)>>>16,g&=65535,b+=(g+=i*d)>>>16,b+=n*p+o*f+r*d+i*u,c((y&=65535)<<16|(v&=65535),(b&=65535)<<16|(g&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(e){if(a(e)||(e=l(e)),e.isZero())throw Error("division by zero");var n,o,r;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?g:h;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return g;if(e.gt(this.shru(1)))return v;r=g}else{if(this.eq(x))return e.eq(y)||e.eq(w)?x:e.eq(x)?y:(n=this.shr(1).div(e).shl(1)).eq(h)?e.isNegative()?y:w:(o=this.sub(e.mul(n)),r=n.add(o.div(e)));if(e.eq(x))return this.unsigned?g:h;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();r=h}for(o=this;o.gte(e);){n=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var i=Math.ceil(Math.log(n)/Math.LN2),d=i<=48?1:u(2,i-48),f=s(n),p=f.mul(e);p.isNegative()||p.gt(o);)p=(f=s(n-=d,this.unsigned)).mul(e);f.isZero()&&(f=y),r=r.add(f),o=o.sub(p)}return r},I.div=I.divide,I.modulo=function(e){return a(e)||(e=l(e)),t?c((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return c(~this.low,~this.high,this.unsigned)},I.and=function(e){return a(e)||(e=l(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},I.or=function(e){return a(e)||(e=l(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},I.xor=function(e){return a(e)||(e=l(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},I.shiftLeft=function(e){return a(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?c(this.low<>>32-e,this.unsigned):c(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(e){if(a(e)&&(e=e.toInt()),0===(e&=63))return this;var t=this.high;return e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},I.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},I.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},n.fromBytes=function(e,t,a){return a?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},40596:function(e,t,n){"use strict";n.r(t),n.d(t,{allEvents:function(){return k},animationEvents:function(){return y},clipboardEvents:function(){return o},compositionEvents:function(){return r},default:function(){return A},focusEvents:function(){return s},formEvents:function(){return c},genericEvents:function(){return u},imageEvents:function(){return g},keyboardEvents:function(){return i},mediaEvents:function(){return h},mouseEvents:function(){return d},otherEvents:function(){return w},pointerEvents:function(){return l},selectionEvents:function(){return f},touchEvents:function(){return p},transitionEvents:function(){return v},uiEvents:function(){return b},wheelEvents:function(){return m}});var a=function(e,t,n){if(n||2===arguments.length)for(var a,o=0,r=t.length;o3&&void 0!==arguments[3]?arguments[3]:new WeakMap;if(r=o({deep:!1,target:{}},r),c.has(t))return c.get(t);c.set(t,r.target);var u=r.target;delete r.target;var d=function(t){return t.map((function(t){return s(t)?e(t,n,r,c):t}))};if(Array.isArray(t))return d(t);for(var l=0,f=Object.entries(t);l>>32-t}function u(e,t,n,a,o,r,i){return c(e+(t&n|~t&a)+o+r|0,i)+t|0}function d(e,t,n,a,o,r,i){return c(e+(t&a|n&~a)+o+r|0,i)+t|0}function l(e,t,n,a,o,r,i){return c(e+(t^n^a)+o+r|0,i)+t|0}function f(e,t,n,a,o,r,i){return c(e+(n^(t|~a))+o+r|0,i)+t|0}a(s,o),s.prototype._update=function(){for(var e=i,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,a=this._b,o=this._c,r=this._d;n=u(n,a,o,r,e[0],3614090360,7),r=u(r,n,a,o,e[1],3905402710,12),o=u(o,r,n,a,e[2],606105819,17),a=u(a,o,r,n,e[3],3250441966,22),n=u(n,a,o,r,e[4],4118548399,7),r=u(r,n,a,o,e[5],1200080426,12),o=u(o,r,n,a,e[6],2821735955,17),a=u(a,o,r,n,e[7],4249261313,22),n=u(n,a,o,r,e[8],1770035416,7),r=u(r,n,a,o,e[9],2336552879,12),o=u(o,r,n,a,e[10],4294925233,17),a=u(a,o,r,n,e[11],2304563134,22),n=u(n,a,o,r,e[12],1804603682,7),r=u(r,n,a,o,e[13],4254626195,12),o=u(o,r,n,a,e[14],2792965006,17),n=d(n,a=u(a,o,r,n,e[15],1236535329,22),o,r,e[1],4129170786,5),r=d(r,n,a,o,e[6],3225465664,9),o=d(o,r,n,a,e[11],643717713,14),a=d(a,o,r,n,e[0],3921069994,20),n=d(n,a,o,r,e[5],3593408605,5),r=d(r,n,a,o,e[10],38016083,9),o=d(o,r,n,a,e[15],3634488961,14),a=d(a,o,r,n,e[4],3889429448,20),n=d(n,a,o,r,e[9],568446438,5),r=d(r,n,a,o,e[14],3275163606,9),o=d(o,r,n,a,e[3],4107603335,14),a=d(a,o,r,n,e[8],1163531501,20),n=d(n,a,o,r,e[13],2850285829,5),r=d(r,n,a,o,e[2],4243563512,9),o=d(o,r,n,a,e[7],1735328473,14),n=l(n,a=d(a,o,r,n,e[12],2368359562,20),o,r,e[5],4294588738,4),r=l(r,n,a,o,e[8],2272392833,11),o=l(o,r,n,a,e[11],1839030562,16),a=l(a,o,r,n,e[14],4259657740,23),n=l(n,a,o,r,e[1],2763975236,4),r=l(r,n,a,o,e[4],1272893353,11),o=l(o,r,n,a,e[7],4139469664,16),a=l(a,o,r,n,e[10],3200236656,23),n=l(n,a,o,r,e[13],681279174,4),r=l(r,n,a,o,e[0],3936430074,11),o=l(o,r,n,a,e[3],3572445317,16),a=l(a,o,r,n,e[6],76029189,23),n=l(n,a,o,r,e[9],3654602809,4),r=l(r,n,a,o,e[12],3873151461,11),o=l(o,r,n,a,e[15],530742520,16),n=f(n,a=l(a,o,r,n,e[2],3299628645,23),o,r,e[0],4096336452,6),r=f(r,n,a,o,e[7],1126891415,10),o=f(o,r,n,a,e[14],2878612391,15),a=f(a,o,r,n,e[5],4237533241,21),n=f(n,a,o,r,e[12],1700485571,6),r=f(r,n,a,o,e[3],2399980690,10),o=f(o,r,n,a,e[10],4293915773,15),a=f(a,o,r,n,e[1],2240044497,21),n=f(n,a,o,r,e[8],1873313359,6),r=f(r,n,a,o,e[15],4264355552,10),o=f(o,r,n,a,e[6],2734768916,15),a=f(a,o,r,n,e[13],1309151649,21),n=f(n,a,o,r,e[4],4149444226,6),r=f(r,n,a,o,e[11],3174756917,10),o=f(o,r,n,a,e[2],718787259,15),a=f(a,o,r,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+a|0,this._c=this._c+o|0,this._d=this._d+r|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},3634:function(e,t,n){var a=n(63253),o=n(58692);function r(e){this.rand=e||new o.Rand}e.exports=r,r.create=function(e){return new r(e)},r.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var o=new a(this.rand.generate(n))}while(o.cmp(e)>=0);return o},r.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},r.prototype.test=function(e,t,n){var o=e.bitLength(),r=a.mont(e),i=new a(1).toRed(r);t||(t=Math.max(1,o/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var u=e.shrn(c),d=s.toRed(r);t>0;t--){var l=this._randrange(new a(2),s);n&&n(l);var f=l.toRed(r).redPow(u);if(0!==f.cmp(i)&&0!==f.cmp(d)){for(var p=1;p0;t--){var d=this._randrange(new a(2),i),l=e.gcd(d);if(0!==l.cmpn(1))return l;var f=d.toRed(o).redPow(c);if(0!==f.cmp(r)&&0!==f.cmp(u)){for(var p=1;p=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(e,t,n){var a=s(e,n);return n-1>=t&&(a|=s(e,n-1)<<4),a}function u(e,t,n,a){for(var o=0,r=Math.min(e.length,n),i=t;i=49?s-49+10:s>=17?s-17+10:s}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"===typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=i<>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a=t;a-=2)o=c(e,t,a)<=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;else for(a=(e.length-t)%2===0?t+1:t;a=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,o=1;o<=67108863;o*=t)a++;a--,o=o/t|0;for(var r=e.length-n,i=r%a,s=Math.min(r,r-i)+n,c=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var a=e.length+t.length|0;n.length=a,a=a-1|0;var o=0|e.words[0],r=0|t.words[0],i=o*r,s=67108863&i,c=i/67108864|0;n.words[0]=s;for(var u=1;u>>26,l=67108863&c,f=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=f;p++){var b=u-p|0;d+=(i=(o=0|e.words[b])*(r=0|t.words[p])+l)/67108864|0,l=67108863&i}n.words[u]=0|l,c=0|d}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,i=0;i>>24-o&16777215)||i!==this.length-1?d[6-c.length]+c+n:c+n,(o+=2)>=26&&(o-=26,i--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=l[e],p=f[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var m=b.modn(p).toString(e);n=(b=b.idivn(p)).isZero()?m+n:d[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return a("undefined"!==typeof i),this.toArrayLike(i,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);a(o<=r,"byte array longer than desired length"),a(r>0,"Requested array length <= 0"),this.strip();var i,s,c="le"===t,u=new e(r),d=this.clone();if(c){for(s=0;!d.isZero();s++)i=d.andln(255),d.iushrn(8),u[s]=i;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;ae.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){a("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){a("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,a=e):(n=e,a=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,a,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,a=e):(n=e,a=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,p=0|i[1],b=8191&p,m=p>>>13,h=0|i[2],g=8191&h,y=h>>>13,v=0|i[3],w=8191&v,k=v>>>13,A=0|i[4],x=8191&A,I=A>>>13,T=0|i[5],S=8191&T,C=T>>>13,E=0|i[6],R=8191&E,M=E>>>13,P=0|i[7],U=8191&P,_=P>>>13,B=0|i[8],D=8191&B,N=B>>>13,O=0|i[9],F=8191&O,L=O>>>13,j=0|s[0],H=8191&j,G=j>>>13,z=0|s[1],K=8191&z,W=z>>>13,Z=0|s[2],V=8191&Z,q=Z>>>13,Q=0|s[3],J=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,ae=te>>>13,oe=0|s[6],re=8191&oe,ie=oe>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,de=0|s[8],le=8191&de,fe=de>>>13,pe=0|s[9],be=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var he=(u+(a=Math.imul(l,H))|0)+((8191&(o=(o=Math.imul(l,G))+Math.imul(f,H)|0))<<13)|0;u=((r=Math.imul(f,G))+(o>>>13)|0)+(he>>>26)|0,he&=67108863,a=Math.imul(b,H),o=(o=Math.imul(b,G))+Math.imul(m,H)|0,r=Math.imul(m,G);var ge=(u+(a=a+Math.imul(l,K)|0)|0)+((8191&(o=(o=o+Math.imul(l,W)|0)+Math.imul(f,K)|0))<<13)|0;u=((r=r+Math.imul(f,W)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,a=Math.imul(g,H),o=(o=Math.imul(g,G))+Math.imul(y,H)|0,r=Math.imul(y,G),a=a+Math.imul(b,K)|0,o=(o=o+Math.imul(b,W)|0)+Math.imul(m,K)|0,r=r+Math.imul(m,W)|0;var ye=(u+(a=a+Math.imul(l,V)|0)|0)+((8191&(o=(o=o+Math.imul(l,q)|0)+Math.imul(f,V)|0))<<13)|0;u=((r=r+Math.imul(f,q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,a=Math.imul(w,H),o=(o=Math.imul(w,G))+Math.imul(k,H)|0,r=Math.imul(k,G),a=a+Math.imul(g,K)|0,o=(o=o+Math.imul(g,W)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,W)|0,a=a+Math.imul(b,V)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(m,V)|0,r=r+Math.imul(m,q)|0;var ve=(u+(a=a+Math.imul(l,J)|0)|0)+((8191&(o=(o=o+Math.imul(l,Y)|0)+Math.imul(f,J)|0))<<13)|0;u=((r=r+Math.imul(f,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,a=Math.imul(x,H),o=(o=Math.imul(x,G))+Math.imul(I,H)|0,r=Math.imul(I,G),a=a+Math.imul(w,K)|0,o=(o=o+Math.imul(w,W)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,W)|0,a=a+Math.imul(g,V)|0,o=(o=o+Math.imul(g,q)|0)+Math.imul(y,V)|0,r=r+Math.imul(y,q)|0,a=a+Math.imul(b,J)|0,o=(o=o+Math.imul(b,Y)|0)+Math.imul(m,J)|0,r=r+Math.imul(m,Y)|0;var we=(u+(a=a+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((r=r+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,a=Math.imul(S,H),o=(o=Math.imul(S,G))+Math.imul(C,H)|0,r=Math.imul(C,G),a=a+Math.imul(x,K)|0,o=(o=o+Math.imul(x,W)|0)+Math.imul(I,K)|0,r=r+Math.imul(I,W)|0,a=a+Math.imul(w,V)|0,o=(o=o+Math.imul(w,q)|0)+Math.imul(k,V)|0,r=r+Math.imul(k,q)|0,a=a+Math.imul(g,J)|0,o=(o=o+Math.imul(g,Y)|0)+Math.imul(y,J)|0,r=r+Math.imul(y,Y)|0,a=a+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(m,$)|0,r=r+Math.imul(m,ee)|0;var ke=(u+(a=a+Math.imul(l,ne)|0)|0)+((8191&(o=(o=o+Math.imul(l,ae)|0)+Math.imul(f,ne)|0))<<13)|0;u=((r=r+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,a=Math.imul(R,H),o=(o=Math.imul(R,G))+Math.imul(M,H)|0,r=Math.imul(M,G),a=a+Math.imul(S,K)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(C,K)|0,r=r+Math.imul(C,W)|0,a=a+Math.imul(x,V)|0,o=(o=o+Math.imul(x,q)|0)+Math.imul(I,V)|0,r=r+Math.imul(I,q)|0,a=a+Math.imul(w,J)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(k,J)|0,r=r+Math.imul(k,Y)|0,a=a+Math.imul(g,$)|0,o=(o=o+Math.imul(g,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,a=a+Math.imul(b,ne)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(m,ne)|0,r=r+Math.imul(m,ae)|0;var Ae=(u+(a=a+Math.imul(l,re)|0)|0)+((8191&(o=(o=o+Math.imul(l,ie)|0)+Math.imul(f,re)|0))<<13)|0;u=((r=r+Math.imul(f,ie)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,a=Math.imul(U,H),o=(o=Math.imul(U,G))+Math.imul(_,H)|0,r=Math.imul(_,G),a=a+Math.imul(R,K)|0,o=(o=o+Math.imul(R,W)|0)+Math.imul(M,K)|0,r=r+Math.imul(M,W)|0,a=a+Math.imul(S,V)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(C,V)|0,r=r+Math.imul(C,q)|0,a=a+Math.imul(x,J)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(I,J)|0,r=r+Math.imul(I,Y)|0,a=a+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,a=a+Math.imul(g,ne)|0,o=(o=o+Math.imul(g,ae)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ae)|0,a=a+Math.imul(b,re)|0,o=(o=o+Math.imul(b,ie)|0)+Math.imul(m,re)|0,r=r+Math.imul(m,ie)|0;var xe=(u+(a=a+Math.imul(l,ce)|0)|0)+((8191&(o=(o=o+Math.imul(l,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((r=r+Math.imul(f,ue)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,a=Math.imul(D,H),o=(o=Math.imul(D,G))+Math.imul(N,H)|0,r=Math.imul(N,G),a=a+Math.imul(U,K)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(_,K)|0,r=r+Math.imul(_,W)|0,a=a+Math.imul(R,V)|0,o=(o=o+Math.imul(R,q)|0)+Math.imul(M,V)|0,r=r+Math.imul(M,q)|0,a=a+Math.imul(S,J)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(C,J)|0,r=r+Math.imul(C,Y)|0,a=a+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(I,$)|0,r=r+Math.imul(I,ee)|0,a=a+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ae)|0,a=a+Math.imul(g,re)|0,o=(o=o+Math.imul(g,ie)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,ie)|0,a=a+Math.imul(b,ce)|0,o=(o=o+Math.imul(b,ue)|0)+Math.imul(m,ce)|0,r=r+Math.imul(m,ue)|0;var Ie=(u+(a=a+Math.imul(l,le)|0)|0)+((8191&(o=(o=o+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;u=((r=r+Math.imul(f,fe)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,a=Math.imul(F,H),o=(o=Math.imul(F,G))+Math.imul(L,H)|0,r=Math.imul(L,G),a=a+Math.imul(D,K)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,W)|0,a=a+Math.imul(U,V)|0,o=(o=o+Math.imul(U,q)|0)+Math.imul(_,V)|0,r=r+Math.imul(_,q)|0,a=a+Math.imul(R,J)|0,o=(o=o+Math.imul(R,Y)|0)+Math.imul(M,J)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(C,$)|0,r=r+Math.imul(C,ee)|0,a=a+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(I,ne)|0,r=r+Math.imul(I,ae)|0,a=a+Math.imul(w,re)|0,o=(o=o+Math.imul(w,ie)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,ie)|0,a=a+Math.imul(g,ce)|0,o=(o=o+Math.imul(g,ue)|0)+Math.imul(y,ce)|0,r=r+Math.imul(y,ue)|0,a=a+Math.imul(b,le)|0,o=(o=o+Math.imul(b,fe)|0)+Math.imul(m,le)|0,r=r+Math.imul(m,fe)|0;var Te=(u+(a=a+Math.imul(l,be)|0)|0)+((8191&(o=(o=o+Math.imul(l,me)|0)+Math.imul(f,be)|0))<<13)|0;u=((r=r+Math.imul(f,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,a=Math.imul(F,K),o=(o=Math.imul(F,W))+Math.imul(L,K)|0,r=Math.imul(L,W),a=a+Math.imul(D,V)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(N,V)|0,r=r+Math.imul(N,q)|0,a=a+Math.imul(U,J)|0,o=(o=o+Math.imul(U,Y)|0)+Math.imul(_,J)|0,r=r+Math.imul(_,Y)|0,a=a+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(M,$)|0,r=r+Math.imul(M,ee)|0,a=a+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(C,ne)|0,r=r+Math.imul(C,ae)|0,a=a+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ie)|0)+Math.imul(I,re)|0,r=r+Math.imul(I,ie)|0,a=a+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(k,ce)|0,r=r+Math.imul(k,ue)|0,a=a+Math.imul(g,le)|0,o=(o=o+Math.imul(g,fe)|0)+Math.imul(y,le)|0,r=r+Math.imul(y,fe)|0;var Se=(u+(a=a+Math.imul(b,be)|0)|0)+((8191&(o=(o=o+Math.imul(b,me)|0)+Math.imul(m,be)|0))<<13)|0;u=((r=r+Math.imul(m,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,a=Math.imul(F,V),o=(o=Math.imul(F,q))+Math.imul(L,V)|0,r=Math.imul(L,q),a=a+Math.imul(D,J)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(N,J)|0,r=r+Math.imul(N,Y)|0,a=a+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(_,$)|0,r=r+Math.imul(_,ee)|0,a=a+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(M,ne)|0,r=r+Math.imul(M,ae)|0,a=a+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ie)|0)+Math.imul(C,re)|0,r=r+Math.imul(C,ie)|0,a=a+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,ue)|0)+Math.imul(I,ce)|0,r=r+Math.imul(I,ue)|0,a=a+Math.imul(w,le)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(k,le)|0,r=r+Math.imul(k,fe)|0;var Ce=(u+(a=a+Math.imul(g,be)|0)|0)+((8191&(o=(o=o+Math.imul(g,me)|0)+Math.imul(y,be)|0))<<13)|0;u=((r=r+Math.imul(y,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,a=Math.imul(F,J),o=(o=Math.imul(F,Y))+Math.imul(L,J)|0,r=Math.imul(L,Y),a=a+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,a=a+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(_,ne)|0,r=r+Math.imul(_,ae)|0,a=a+Math.imul(R,re)|0,o=(o=o+Math.imul(R,ie)|0)+Math.imul(M,re)|0,r=r+Math.imul(M,ie)|0,a=a+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(C,ce)|0,r=r+Math.imul(C,ue)|0,a=a+Math.imul(x,le)|0,o=(o=o+Math.imul(x,fe)|0)+Math.imul(I,le)|0,r=r+Math.imul(I,fe)|0;var Ee=(u+(a=a+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(k,be)|0))<<13)|0;u=((r=r+Math.imul(k,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,a=Math.imul(F,$),o=(o=Math.imul(F,ee))+Math.imul(L,$)|0,r=Math.imul(L,ee),a=a+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ae)|0,a=a+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ie)|0)+Math.imul(_,re)|0,r=r+Math.imul(_,ie)|0,a=a+Math.imul(R,ce)|0,o=(o=o+Math.imul(R,ue)|0)+Math.imul(M,ce)|0,r=r+Math.imul(M,ue)|0,a=a+Math.imul(S,le)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(C,le)|0,r=r+Math.imul(C,fe)|0;var Re=(u+(a=a+Math.imul(x,be)|0)|0)+((8191&(o=(o=o+Math.imul(x,me)|0)+Math.imul(I,be)|0))<<13)|0;u=((r=r+Math.imul(I,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,a=Math.imul(F,ne),o=(o=Math.imul(F,ae))+Math.imul(L,ne)|0,r=Math.imul(L,ae),a=a+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,ie)|0,a=a+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,ue)|0)+Math.imul(_,ce)|0,r=r+Math.imul(_,ue)|0,a=a+Math.imul(R,le)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(M,le)|0,r=r+Math.imul(M,fe)|0;var Me=(u+(a=a+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,me)|0)+Math.imul(C,be)|0))<<13)|0;u=((r=r+Math.imul(C,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,a=Math.imul(F,re),o=(o=Math.imul(F,ie))+Math.imul(L,re)|0,r=Math.imul(L,ie),a=a+Math.imul(D,ce)|0,o=(o=o+Math.imul(D,ue)|0)+Math.imul(N,ce)|0,r=r+Math.imul(N,ue)|0,a=a+Math.imul(U,le)|0,o=(o=o+Math.imul(U,fe)|0)+Math.imul(_,le)|0,r=r+Math.imul(_,fe)|0;var Pe=(u+(a=a+Math.imul(R,be)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(M,be)|0))<<13)|0;u=((r=r+Math.imul(M,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,a=Math.imul(F,ce),o=(o=Math.imul(F,ue))+Math.imul(L,ce)|0,r=Math.imul(L,ue),a=a+Math.imul(D,le)|0,o=(o=o+Math.imul(D,fe)|0)+Math.imul(N,le)|0,r=r+Math.imul(N,fe)|0;var Ue=(u+(a=a+Math.imul(U,be)|0)|0)+((8191&(o=(o=o+Math.imul(U,me)|0)+Math.imul(_,be)|0))<<13)|0;u=((r=r+Math.imul(_,me)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,a=Math.imul(F,le),o=(o=Math.imul(F,fe))+Math.imul(L,le)|0,r=Math.imul(L,fe);var _e=(u+(a=a+Math.imul(D,be)|0)|0)+((8191&(o=(o=o+Math.imul(D,me)|0)+Math.imul(N,be)|0))<<13)|0;u=((r=r+Math.imul(N,me)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863;var Be=(u+(a=Math.imul(F,be))|0)+((8191&(o=(o=Math.imul(F,me))+Math.imul(L,be)|0))<<13)|0;return u=((r=Math.imul(L,me))+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=he,c[1]=ge,c[2]=ye,c[3]=ve,c[4]=we,c[5]=ke,c[6]=Ae,c[7]=xe,c[8]=Ie,c[9]=Te,c[10]=Se,c[11]=Ce,c[12]=Ee,c[13]=Re,c[14]=Me,c[15]=Pe,c[16]=Ue,c[17]=_e,c[18]=Be,0!==u&&(c[19]=u,n.length++),n};function m(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(b=p),r.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return n=10===this.length&&10===e.length?b(this,e,t):a<63?p(this,e,t):a<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var a=0,o=0,r=0;r>>26)|0)>>>26,i&=67108863}n.words[r]=s,a=i,i=o}return 0!==a?n.words[r]=a:n.length--,n.strip()}(this,e,t):m(this,e,t),n},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,a=0;a>=1;return a},h.prototype.permute=function(e,t,n,a,o,r){for(var i=0;i>>=1)o++;return 1<>>=13,n[2*i+1]=8191&r,r>>>=13;for(i=2*t;i>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,a=0;a=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var i=0;for(t=0;t>>26-n}i&&(this.words[t]=i,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,i=Math.min((e-r)/26,this.length),s=67108863^67108863>>>r<i)for(this.length-=i,u=0;u=0&&(0!==d||u>=o);u--){var l=0|this.words[u];this.words[u]=d<<26-r|l>>>r,d=l&s}return c&&0!==d&&(c.words[c.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return a(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){a("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(a("number"===typeof e),a(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===s)return this.strip();for(a(-1===s),s=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),o=e,i=0|o.words[o.length-1];0!==(n=26-this._countBits(i))&&(o=o.ushln(n),a.iushln(n),i=0|o.words[o.length-1]);var s,c=a.length-o.length;if("mod"!==t){(s=new r(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var f=67108864*(0|a.words[o.length+l])+(0|a.words[o.length+l-1]);for(f=Math.min(f/i|0,67108863),a._ishlnsubmul(o,f,l);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(o,1,l),a.isZero()||(a.negative^=1);s&&(s.words[l]=f)}return s&&s.strip(),a.strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:s||null,mod:a}},r.prototype.divmod=function(e,t,n){return a(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:o,mod:i}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:s.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,i,s},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,a=e.ushrn(1),o=e.andln(1),r=n.cmp(a);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){a(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){a(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),i=new r(0),s=new r(0),c=new r(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var d=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;0===(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(d),i.isub(l)),o.iushrn(1),i.iushrn(1);for(var b=0,m=1;0===(n.words[0]&m)&&b<26;++b,m<<=1);if(b>0)for(n.iushrn(b);b-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(d),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),i.isub(c)):(n.isub(t),s.isub(o),c.isub(i))}return{a:s,b:c,gcd:n.iushln(u)}},r.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,i=new r(1),s=new r(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,d=1;0===(t.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(c),i.iushrn(1);for(var l=0,f=1;0===(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s)):(n.isub(t),s.isub(i))}return(o=0===t.cmpn(1)?i:s).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(a)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){a("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,s&=67108863,this.words[i]=s}return 0!==r&&(this.words[i]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),a(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var a=0|this.words[n],o=0|e.words[n];if(a!==o){ao&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new x(e)},r.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var a=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(v,y),v.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),o=0;o>>22,r=i}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=a}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},x.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){a(0===(e.negative|t.negative),"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2===1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),i=0;!o.isZero()&&0===o.andln(1);)i++,o.iushrn(1);a(!o.isZero());var s=new r(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new r(2*d*d).toRed(this);0!==this.pow(d,u).cmp(c);)d.redIAdd(c);for(var l=this.pow(d,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),b=i;0!==p.cmp(s);){for(var m=p,h=0;0!==m.cmp(s);h++)m=m.redSqr();a(h=0;a--){for(var u=t.words[a],d=c-1;d>=0;d--){var l=u>>d&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==i?(i<<=1,i|=l,(4===++s||0===a&&0===d)&&(o=this.mul(o,n[i]),s=0,i=0)):s=0}c=26}return o},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new I(e)},o(I,x),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},72259:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},27142:function(e,t){"use strict";var n=t;function a(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",n=0;n>8,i=255&o;r?n.push(r,i):n.push(i)}return n},n.zero2=a,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},20387:function(e){e.exports=function(){"use strict";var e=Object.prototype.toString,t=Array.isArray||function(t){return"[object Array]"===e.call(t)};function n(e){return"function"===typeof e}function a(e){return t(e)?"array":typeof e}function o(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function r(e,t){return null!=e&&"object"===typeof e&&t in e}function i(e,t){return null!=e&&"object"!==typeof e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var s=RegExp.prototype.test;function c(e,t){return s.call(e,t)}var u=/\S/;function d(e){return!c(u,e)}var l={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function f(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return l[e]}))}var p=/\s*/,b=/\s+/,m=/\s*=/,h=/\s*\}/,g=/#|\^|\/|>|\{|&|=|!/;function y(e,n){if(!e)return[];var a,r,i,s=!1,c=[],u=[],l=[],f=!1,y=!1,A="",x=0;function T(){if(f&&!y)for(;l.length;)delete u[l.pop()];else l=[];f=!1,y=!1}function S(e){if("string"===typeof e&&(e=e.split(b,2)),!t(e)||2!==e.length)throw new Error("Invalid tags: "+e);a=new RegExp(o(e[0])+"\\s*"),r=new RegExp("\\s*"+o(e[1])),i=new RegExp("\\s*"+o("}"+e[1]))}S(n||I.tags);for(var C,E,R,M,P,U,_=new k(e);!_.eos();){if(C=_.pos,R=_.scanUntil(a))for(var B=0,D=R.length;B0?o[o.length-1][4]:n;break;default:a.push(t)}return n}function k(e){this.string=e,this.tail=e,this.pos=0}function A(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function x(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}k.prototype.eos=function(){return""===this.tail},k.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},k.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},A.prototype.push=function(e){return new A(e,this)},A.prototype.lookup=function(e){var t,a=this.cache;if(a.hasOwnProperty(e))t=a[e];else{for(var o,s,c,u=this,d=!1;u;){if(e.indexOf(".")>0)for(o=u.view,s=e.split("."),c=0;null!=o&&c"===i?s=this.renderPartial(r,t,n,o):"&"===i?s=this.unescapedValue(r,t):"name"===i?s=this.escapedValue(r,t,o):"text"===i&&(s=this.rawValue(r)),void 0!==s&&(c+=s);return c},x.prototype.renderSection=function(e,a,o,r,i){var s=this,c="",u=a.lookup(e[1]);function d(e){return s.render(e,a,o,i)}if(u){if(t(u))for(var l=0,f=u.length;l0||!n)&&(o[r]=a+o[r]);return o.join("\n")},x.prototype.renderPartial=function(e,t,a,o){if(a){var r=this.getConfigTags(o),i=n(a)?a(e[1]):a[e[1]];if(null!=i){var s=e[6],c=e[5],u=e[4],d=i;0==c&&u&&(d=this.indentPartial(i,u,s));var l=this.parse(d,r);return this.renderTokens(l,t,a,d,o)}}},x.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},x.prototype.escapedValue=function(e,t,n){var a=this.getConfigEscape(n)||I.escape,o=t.lookup(e[1]);if(null!=o)return"number"===typeof o&&a===I.escape?String(o):a(o)},x.prototype.rawValue=function(e){return e[1]},x.prototype.getConfigTags=function(e){return t(e)?e:e&&"object"===typeof e?e.tags:void 0},x.prototype.getConfigEscape=function(e){return e&&"object"===typeof e&&!t(e)?e.escape:void 0};var I={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){T.templateCache=e},get templateCache(){return T.templateCache}},T=new x;return I.clearCache=function(){return T.clearCache()},I.parse=function(e,t){return T.parse(e,t)},I.render=function(e,t,n,o){if("string"!==typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+a(e)+'" was given as the first argument for mustache#render(template, view, partials)');return T.render(e,t,n,o)},I.escape=f,I.Scanner=k,I.Context=A,I.Writer=x,I}()},83423:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(65218),r=n(861).default,i=n(27424).default,s=n(74704).default,c=n(17061).default,u=n(56690).default,d=n(89728).default,l=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Account=void 0;var p=f(n(43811)),b=f(n(94025)),m=n(54952),h=n(31234),g=n(6323),y=n(30898),v=n(45359),w=n(58638),k=n(47332),A=f(n(65640));function x(e){return JSON.parse(a.from(e).toString())}function I(e){return a.from(JSON.stringify(e))}var T=function(){function e(t,n){u(this,e),this.accessKeyByPublicKeyCache={},this.connection=t,this.accountId=n}return d(e,[{key:"state",value:function(){return l(this,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"}));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"printLogsAndFailures",value:function(e,t){if(!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.NEAR_NO_LOGS){var n,a=s(t);try{for(a.s();!(n=a.n()).done;){var r=n.value;o.log("Receipt".concat(r.receiptIds.length>1?"s":"",": ").concat(r.receiptIds.join(", "))),this.printLogs(e,r.logs,"\t"),r.failure&&o.warn("\tFailure [".concat(e,"]: ").concat(r.failure))}}catch(i){a.e(i)}finally{a.f()}}}},{key:"printLogs",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.NEAR_NO_LOGS){var a,r=s(t);try{for(r.s();!(a=r.n()).done;){var i=a.value;o.log("".concat(n,"Log [").concat(e,"]: ").concat(i))}}catch(c){r.e(c)}finally{r.f()}}}},{key:"signTransaction",value:function(e,t){return l(this,void 0,void 0,c().mark((function n(){var a,o,r,i,s;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.findAccessKey(e,t);case 2:if(a=n.sent){n.next=5;break}throw new h.TypedError("Can not sign transactions for account ".concat(this.accountId," on network ").concat(this.connection.networkId,", no matching key pair exists for this account"),"KeyNotFound");case 5:return o=a.accessKey,n.next=8,this.connection.provider.block({finality:"final"});case 8:return r=n.sent,i=r.header.hash,s=o.nonce.add(new p.default(1)),n.next=13,(0,m.signTransaction)(e,s,t,(0,g.baseDecode)(i),this.connection.signer,this.accountId,this.connection.networkId);case 13:return n.abrupt("return",n.sent);case 14:case"end":return n.stop()}}),n,this)})))}},{key:"signAndSendTransaction",value:function(e){var t=e.receiverId,n=e.actions,a=e.returnError;return l(this,void 0,void 0,c().mark((function e(){var o,s,u,d,f=this;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,A.default)(500,12,1.5,(function(){return l(f,void 0,void 0,c().mark((function e(){var a,r,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.signTransaction(t,n);case 2:return a=e.sent,r=i(a,2),o=r[0],s=r[1],u=s.transaction.publicKey,e.prev=7,e.next=10,this.connection.provider.sendTransaction(s);case 10:return e.abrupt("return",e.sent);case 13:if(e.prev=13,e.t0=e.catch(7),"InvalidNonce"!==e.t0.type){e.next=19;break}return(0,v.logWarning)("Retrying transaction ".concat(t,":").concat((0,g.baseEncode)(o)," with new nonce.")),delete this.accessKeyByPublicKeyCache[u.toString()],e.abrupt("return",null);case 19:if("Expired"!==e.t0.type){e.next=22;break}return(0,v.logWarning)("Retrying transaction ".concat(t,":").concat((0,g.baseEncode)(o)," due to expired block hash")),e.abrupt("return",null);case 22:throw e.t0.context=new h.ErrorContext((0,g.baseEncode)(o)),e.t0;case 24:case"end":return e.stop()}}),e,this,[[7,13]])})))}));case 2:if(u=e.sent){e.next=5;break}throw new h.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");case 5:if(d=[u.transaction_outcome].concat(r(u.receipts_outcome)).reduce((function(e,t){return t.outcome.logs.length||"object"===typeof t.outcome.status&&"object"===typeof t.outcome.status.Failure?e.concat({receiptIds:t.outcome.receipt_ids,logs:t.outcome.logs,failure:"undefined"!=typeof t.outcome.status.Failure?(0,w.parseRpcError)(t.outcome.status.Failure):null}):e}),[]),this.printLogsAndFailures(s.transaction.receiverId,d),a||"object"!==typeof u.status||"object"!==typeof u.status.Failure||null===u.status.Failure){e.next=13;break}if(!u.status.Failure.error_message||!u.status.Failure.error_type){e.next=12;break}throw new h.TypedError("Transaction ".concat(u.transaction_outcome.id," failed. ").concat(u.status.Failure.error_message),u.status.Failure.error_type);case 12:throw(0,w.parseResultError)(u);case 13:return e.abrupt("return",u);case 14:case"end":return e.stop()}}),e,this)})))}},{key:"findAccessKey",value:function(e,t){return l(this,void 0,void 0,c().mark((function e(){var t,n,a,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);case 2:if(t=e.sent){e.next=5;break}throw new h.TypedError("no matching key pair found in ".concat(this.connection.signer),"PublicKeyNotFound");case 5:if(void 0===(n=this.accessKeyByPublicKeyCache[t.toString()])){e.next=8;break}return e.abrupt("return",{publicKey:t,accessKey:n});case 8:return e.prev=8,e.next=11,this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:t.toString(),finality:"optimistic"});case 11:if(a=e.sent,o=Object.assign(Object.assign({},a),{nonce:new p.default(a.nonce)}),!this.accessKeyByPublicKeyCache[t.toString()]){e.next=15;break}return e.abrupt("return",{publicKey:t,accessKey:this.accessKeyByPublicKeyCache[t.toString()]});case 15:return this.accessKeyByPublicKeyCache[t.toString()]=o,e.abrupt("return",{publicKey:t,accessKey:o});case 19:if(e.prev=19,e.t0=e.catch(8),"AccessKeyDoesNotExist"!=e.t0.type){e.next=23;break}return e.abrupt("return",null);case 23:throw e.t0;case 24:case"end":return e.stop()}}),e,this,[[8,19]])})))}},{key:"createAndDeployContract",value:function(t,n,a,o){return l(this,void 0,void 0,c().mark((function r(){var i,s;return c().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=(0,m.fullAccessKey)(),r.next=3,this.signAndSendTransaction({receiverId:t,actions:[(0,m.createAccount)(),(0,m.transfer)(o),(0,m.addKey)(y.PublicKey.from(n),i),(0,m.deployContract)(a)]});case 3:return s=new e(this.connection,t),r.abrupt("return",s);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"sendMoney",value:function(e,t){return l(this,void 0,void 0,c().mark((function n(){return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this.signAndSendTransaction({receiverId:e,actions:[(0,m.transfer)(t)]}));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"createAccount",value:function(e,t,n){return l(this,void 0,void 0,c().mark((function a(){var o;return c().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return o=(0,m.fullAccessKey)(),a.abrupt("return",this.signAndSendTransaction({receiverId:e,actions:[(0,m.createAccount)(),(0,m.transfer)(n),(0,m.addKey)(y.PublicKey.from(t),o)]}));case 2:case"end":return a.stop()}}),a,this)})))}},{key:"deleteAccount",value:function(e){return l(this,void 0,void 0,c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.NEAR_NO_LOGS||o.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),t.abrupt("return",this.signAndSendTransaction({receiverId:this.accountId,actions:[(0,m.deleteAccount)(e)]}));case 2:case"end":return t.stop()}}),t,this)})))}},{key:"deployContract",value:function(e){return l(this,void 0,void 0,c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.signAndSendTransaction({receiverId:this.accountId,actions:[(0,m.deployContract)(e)]}));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"encodeJSContractArgs",value:function(e,t,n){return a.concat([a.from(e),a.from([0]),a.from(t),a.from([0]),a.from(n)])}},{key:"functionCall",value:function(e){var t=e.contractId,n=e.methodName,a=e.args,o=void 0===a?{}:a,r=e.gas,i=void 0===r?k.DEFAULT_FUNCTION_CALL_GAS:r,s=e.attachedDeposit,u=e.walletMeta,d=e.walletCallbackUrl,f=e.stringify,p=e.jsContract;return l(this,void 0,void 0,c().mark((function e(){var a,r,l;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateArgs(o),p?(r=this.encodeJSContractArgs(t,n,JSON.stringify(o)),a=["call_js_contract",r,i,s,null,!0]):(l=void 0===f?m.stringifyJsonOrBytes:f,a=[n,o,i,s,l,!1]),e.abrupt("return",this.signAndSendTransaction({receiverId:p?this.connection.jsvmAccountId:t,actions:[m.functionCall.apply(void 0,a)],walletMeta:u,walletCallbackUrl:d}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"addKey",value:function(e,t,n,a){return l(this,void 0,void 0,c().mark((function o(){var r;return c().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return n||(n=[]),Array.isArray(n)||(n=[n]),r=t?(0,m.functionCallAccessKey)(t,n,a):(0,m.fullAccessKey)(),o.abrupt("return",this.signAndSendTransaction({receiverId:this.accountId,actions:[(0,m.addKey)(y.PublicKey.from(e),r)]}));case 4:case"end":return o.stop()}}),o,this)})))}},{key:"deleteKey",value:function(e){return l(this,void 0,void 0,c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.signAndSendTransaction({receiverId:this.accountId,actions:[(0,m.deleteKey)(y.PublicKey.from(e))]}));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"stake",value:function(e,t){return l(this,void 0,void 0,c().mark((function n(){return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this.signAndSendTransaction({receiverId:this.accountId,actions:[(0,m.stake)(t,y.PublicKey.from(e))]}));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"validateArgs",value:function(e){if(!(void 0!==e.byteLength&&e.byteLength===e.length)&&(Array.isArray(e)||"object"!==typeof e))throw new v.PositionalArgsError}},{key:"viewFunction",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=a.parse,r=void 0===o?x:o,i=a.stringify,s=void 0===i?I:i,u=a.jsContract,d=void 0!==u&&u,f=a.blockQuery,p=void 0===f?{finality:"optimistic"}:f;return l(this,void 0,void 0,c().mark((function a(){return c().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return(0,b.default)("Account.viewFunction(contractId, methodName, args, options)")("use `Account.viewFunction(ViewFunctionCallOptions)` instead"),a.abrupt("return",this.viewFunctionV2({contractId:e,methodName:t,args:n,parse:r,stringify:s,jsContract:d,blockQuery:p}));case 3:case"end":return a.stop()}}),a,this)})))}},{key:"viewFunctionV2",value:function(e){var t=e.contractId,n=e.methodName,o=e.args,r=e.parse,i=void 0===r?x:r,s=e.stringify,u=void 0===s?I:s,d=e.jsContract,f=void 0!==d&&d,p=e.blockQuery,b=void 0===p?{finality:"optimistic"}:p;return l(this,void 0,void 0,c().mark((function e(){var r,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateArgs(o),r=f?this.encodeJSContractArgs(t,n,Object.keys(o).length>0?JSON.stringify(o):""):u(o),e.next=4,this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},b),{account_id:f?this.connection.jsvmAccountId:t,method_name:f?"view_js_contract":n,args_base64:r.toString("base64")}));case 4:return(s=e.sent).logs&&this.printLogs(t,s.logs),e.abrupt("return",s.result&&s.result.length>0&&i(a.from(s.result)));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"viewState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{finality:"optimistic"};return l(this,void 0,void 0,c().mark((function n(){var o,r;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},t),{account_id:this.accountId,prefix_base64:a.from(e).toString("base64")}));case 2:return o=n.sent,r=o.values,n.abrupt("return",r.map((function(e){var t=e.key,n=e.value;return{key:a.from(t,"base64"),value:a.from(n,"base64")}})));case 5:case"end":return n.stop()}}),n,this)})))}},{key:"getAccessKeys",value:function(){var e;return l(this,void 0,void 0,c().mark((function t(){var n;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});case 2:return n=t.sent,t.abrupt("return",null===(e=null===n||void 0===n?void 0:n.keys)||void 0===e?void 0:e.map((function(e){return Object.assign(Object.assign({},e),{access_key:Object.assign(Object.assign({},e.access_key),{nonce:new p.default(e.access_key.nonce)})})})));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getAccountDetails",value:function(){return l(this,void 0,void 0,c().mark((function e(){var t,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccessKeys();case 2:return t=e.sent,n=t.filter((function(e){return"FullAccess"!==e.access_key.permission})).map((function(e){var t=e.access_key.permission;return{contractId:t.FunctionCall.receiver_id,amount:t.FunctionCall.allowance,publicKey:e.public_key}})),e.abrupt("return",{authorizedApps:n});case 5:case"end":return e.stop()}}),e,this)})))}},{key:"getAccountBalance",value:function(){return l(this,void 0,void 0,c().mark((function e(){var t,n,a,o,r,i,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.connection.provider.experimental_protocolConfig({finality:"final"});case 2:return t=e.sent,e.next=5,this.state();case 5:return n=e.sent,a=new p.default(t.runtime_config.storage_amount_per_byte),o=new p.default(n.storage_usage).mul(a),r=new p.default(n.locked),i=new p.default(n.amount).add(r),s=i.sub(p.default.max(r,o)),e.abrupt("return",{total:i.toString(),stateStaked:o.toString(),staked:r.toString(),available:s.toString()});case 12:case"end":return e.stop()}}),e,this)})))}},{key:"getActiveDelegatedStakeBalance",value:function(){return l(this,void 0,void 0,c().mark((function e(){var t,n,a,o,i,s,u,d,l,f,b,m,h=this;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.connection.provider.block({finality:"final"});case 2:return t=e.sent,n=t.header.hash,a=t.header.epoch_id,e.next=7,this.connection.provider.validators(a);case 7:return o=e.sent,i=o.current_validators,s=o.next_validators,u=o.current_proposals,d=new Set,[].concat(r(i),r(s),r(u)).forEach((function(e){return d.add(e.account_id)})),l=r(d),f=l.map((function(e){return h.viewFunction({contractId:e,methodName:"get_account_total_balance",args:{account_id:h.accountId},blockQuery:{blockId:n}})})),e.next=17,Promise.allSettled(f);case 17:if(b=e.sent,!b.some((function(e){return"rejected"===e.status&&"TimeoutError"===e.reason.type}))){e.next=21;break}throw new Error("Failed to get delegated stake balance");case 21:return m=b.reduce((function(e,t,n){var a=l[n];if("fulfilled"===t.status){var o=new p.default(t.value);if(!o.isZero())return Object.assign(Object.assign({},e),{stakedValidators:[].concat(r(e.stakedValidators),[{validatorId:a,amount:o.toString()}]),total:e.total.add(o)})}return"rejected"===t.status?Object.assign(Object.assign({},e),{failedValidators:[].concat(r(e.failedValidators),[{validatorId:a,error:t.reason}])}):e}),{stakedValidators:[],failedValidators:[],total:new p.default(0)}),e.abrupt("return",Object.assign(Object.assign({},m),{total:m.total.toString()}));case 23:case"end":return e.stop()}}),e,this)})))}}]),e}();t.Account=T},78396:function(e,t,n){"use strict";var a=n(17061).default,o=n(61655).default,r=n(26389).default,i=n(89728).default,s=n(56690).default,c=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UrlAccountCreator=t.LocalAccountCreator=t.AccountCreator=void 0;var u=n(30039),d=i((function e(){s(this,e)}));t.AccountCreator=d;var l=function(e){o(n,e);var t=r(n);function n(e,a){var o;return s(this,n),(o=t.call(this)).masterAccount=e,o.initialBalance=a,o}return i(n,[{key:"createAccount",value:function(e,t){return c(this,void 0,void 0,a().mark((function n(){return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.masterAccount.createAccount(e,t,this.initialBalance);case 2:case"end":return n.stop()}}),n,this)})))}}]),n}(d);t.LocalAccountCreator=l;var f=function(e){o(n,e);var t=r(n);function n(e,a){var o;return s(this,n),(o=t.call(this)).connection=e,o.helperUrl=a,o}return i(n,[{key:"createAccount",value:function(e,t){return c(this,void 0,void 0,a().mark((function n(){return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,u.fetchJson)("".concat(this.helperUrl,"/account"),JSON.stringify({newAccountId:e,newAccountPublicKey:t.toString()}));case 2:case"end":return n.stop()}}),n,this)})))}}]),n}(d);t.UrlAccountCreator=f},17797:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(65218),r=n(861).default,i=n(74704).default,s=n(17061).default,c=n(56690).default,u=n(89728).default,d=n(41588).default,l=n(73808).default,f=n(61655).default,p=n(26389).default,b=n(38416).default,m=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Account2FA=t.AccountMultisig=t.MultisigStateStatus=t.MultisigDeleteRequestRejectionError=t.MULTISIG_CONFIRM_METHODS=t.MULTISIG_CHANGE_METHODS=t.MULTISIG_DEPOSIT=t.MULTISIG_GAS=t.MULTISIG_ALLOWANCE=t.MULTISIG_STORAGE_KEY=void 0;var g,y,v,w=h(n(43811)),k=n(83423),A=n(69097),x=n(30898),I=n(54952),T=n(31234),S=n(30039);t.MULTISIG_STORAGE_KEY="__multisigRequest",t.MULTISIG_ALLOWANCE=new w.default((0,A.parseNearAmount)("1")),t.MULTISIG_GAS=new w.default("100000000000000"),t.MULTISIG_DEPOSIT=new w.default("0"),t.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],t.MULTISIG_CONFIRM_METHODS=["confirm"],function(e){e.CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",e.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",e.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",e.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",e.METHOD_NOT_FOUND="Contract method is not found"}(g=t.MultisigDeleteRequestRejectionError||(t.MultisigDeleteRequestRejectionError={})),function(e){e[e.INVALID_STATE=0]="INVALID_STATE",e[e.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",e[e.VALID_STATE=2]="VALID_STATE",e[e.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(y=t.MultisigStateStatus||(t.MultisigStateStatus={})),function(e){e[e.INVALID_CODE=0]="INVALID_CODE",e[e.VALID_CODE=1]="VALID_CODE",e[e.UNKNOWN_CODE=2]="UNKNOWN_CODE"}(v||(v={}));var C=b({},t.MULTISIG_STORAGE_KEY,null),E=function(e){f(r,e);var n=p(r);function r(e,t,a){var o;return c(this,r),(o=n.call(this,e,t)).storage=a.storage,o.onAddRequestResult=a.onAddRequestResult,o}return u(r,[{key:"signAndSendTransactionWithAccount",value:function(e,t){var n=this,a=Object.create(null,{signAndSendTransaction:{get:function(){return d(l(r.prototype),"signAndSendTransaction",n)}}});return m(this,void 0,void 0,s().mark((function n(){return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",a.signAndSendTransaction.call(this,{receiverId:e,actions:t}));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"signAndSendTransaction",value:function(e){var n=this,o=e.receiverId,i=e.actions,c=Object.create(null,{signAndSendTransaction:{get:function(){return d(l(r.prototype),"signAndSendTransaction",n)}}});return m(this,void 0,void 0,s().mark((function e(){var n,r,u,d;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.accountId,r=a.from(JSON.stringify({request:{receiver_id:o,actions:P(i,n,o)}})),e.prev=2,e.next=5,c.signAndSendTransaction.call(this,{receiverId:n,actions:[(0,I.functionCall)("add_request_and_confirm",r,t.MULTISIG_GAS,t.MULTISIG_DEPOSIT)]});case 5:u=e.sent,e.next=17;break;case 8:if(e.prev=8,e.t0=e.catch(2),!e.t0.toString().includes("Account has too many active requests. Confirm or delete some")){e.next=16;break}return e.next=13,this.deleteUnconfirmedRequests();case 13:return e.next=15,this.signAndSendTransaction({receiverId:o,actions:i});case 15:return e.abrupt("return",e.sent);case 16:throw e.t0;case 17:if(u.status){e.next=19;break}throw new Error("Request failed");case 19:if((d=Object.assign({},u.status)).SuccessValue&&"string"===typeof d.SuccessValue){e.next=22;break}throw new Error("Request failed");case 22:if(this.setRequest({accountId:n,actions:i,requestId:parseInt(a.from(d.SuccessValue,"base64").toString("ascii"),10)}),!this.onAddRequestResult){e.next=26;break}return e.next=26,this.onAddRequestResult(u);case 26:return this.deleteUnconfirmedRequests(),e.abrupt("return",u);case 28:case"end":return e.stop()}}),e,this,[[2,8]])})))}},{key:"checkMultisigCodeAndStateStatus",value:function(e){var n=this,a=Object.create(null,{signAndSendTransaction:{get:function(){return d(l(r.prototype),"signAndSendTransaction",n)}}});return m(this,void 0,void 0,s().mark((function n(){var o,r;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=4294967295,r=e?v.UNKNOWN_CODE:v.VALID_CODE,n.prev=2,!e){n.next=8;break}return n.next=6,a.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[(0,I.deployContract)(e),(0,I.functionCall)("delete_request",{request_id:o},t.MULTISIG_GAS,t.MULTISIG_DEPOSIT)]});case 6:n.next=10;break;case 8:return n.next=10,this.deleteRequest(o);case 10:return n.abrupt("return",{codeStatus:v.VALID_CODE,stateStatus:y.VALID_STATE});case 13:if(n.prev=13,n.t0=n.catch(2),!new RegExp(g.CANNOT_DESERIALIZE_STATE).test(n.t0&&n.t0.kind&&n.t0.kind.ExecutionError)){n.next=19;break}return n.abrupt("return",{codeStatus:r,stateStatus:y.INVALID_STATE});case 19:if(!new RegExp(g.MULTISIG_NOT_INITIALIZED).test(n.t0&&n.t0.kind&&n.t0.kind.ExecutionError)){n.next=23;break}return n.abrupt("return",{codeStatus:r,stateStatus:y.STATE_NOT_INITIALIZED});case 23:if(!new RegExp(g.NO_SUCH_REQUEST).test(n.t0&&n.t0.kind&&n.t0.kind.ExecutionError)){n.next=27;break}return n.abrupt("return",{codeStatus:r,stateStatus:y.VALID_STATE});case 27:if(!new RegExp(g.METHOD_NOT_FOUND).test(n.t0&&n.t0.message)){n.next=29;break}return n.abrupt("return",{codeStatus:v.INVALID_CODE,stateStatus:y.UNKNOWN_STATE});case 29:throw n.t0;case 30:case"end":return n.stop()}}),n,this,[[2,13]])})))}},{key:"deleteRequest",value:function(e){return d(l(r.prototype),"signAndSendTransaction",this).call(this,{receiverId:this.accountId,actions:[(0,I.functionCall)("delete_request",{request_id:e},t.MULTISIG_GAS,t.MULTISIG_DEPOSIT)]})}},{key:"deleteAllRequests",value:function(){return m(this,void 0,void 0,s().mark((function e(){var t,n=this;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRequestIds();case 2:if(!(t=e.sent).length){e.next=6;break}return e.next=6,Promise.all(t.map((function(e){return n.deleteRequest(e)})));case 6:case"end":return e.stop()}}),e,this)})))}},{key:"deleteUnconfirmedRequests",value:function(){var e=this,n=Object.create(null,{signAndSendTransaction:{get:function(){return d(l(r.prototype),"signAndSendTransaction",e)}}});return m(this,void 0,void 0,s().mark((function e(){var a,r,c,u,d,l;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRequestIds();case 2:a=e.sent,r=this.getRequest(),c=r.requestId,u=i(a),e.prev=5,u.s();case 7:if((d=u.n()).done){e.next=21;break}if((l=d.value)!=c){e.next=11;break}return e.abrupt("continue",19);case 11:return e.prev=11,e.next=14,n.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[(0,I.functionCall)("delete_request",{request_id:l},t.MULTISIG_GAS,t.MULTISIG_DEPOSIT)]});case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(11),o.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.");case 19:e.next=7;break;case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(5),u.e(e.t1);case 26:return e.prev=26,u.f(),e.finish(26);case 29:case"end":return e.stop()}}),e,this,[[5,23,26,29],[11,16]])})))}},{key:"getRequestIds",value:function(){return m(this,void 0,void 0,s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.viewFunction(this.accountId,"list_request_ids"));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getRequest",value:function(){return this.storage?JSON.parse(this.storage.getItem(t.MULTISIG_STORAGE_KEY)||"{}"):C[t.MULTISIG_STORAGE_KEY]}},{key:"setRequest",value:function(e){if(this.storage)return this.storage.setItem(t.MULTISIG_STORAGE_KEY,JSON.stringify(e));C[t.MULTISIG_STORAGE_KEY]=e}}]),r}(k.Account);t.AccountMultisig=E;var R=function(e){f(i,e);var n=p(i);function i(e,t,a){var o;return c(this,i),(o=n.call(this,e,t,a)).helperUrl="https://helper.testnet.near.org",o.helperUrl=a.helperUrl||o.helperUrl,o.storage=a.storage,o.sendCode=a.sendCode||o.sendCodeDefault,o.getCode=a.getCode||o.getCodeDefault,o.verifyCode=a.verifyCode||o.verifyCodeDefault,o.onConfirmResult=a.onConfirmResult,o}return u(i,[{key:"signAndSendTransaction",value:function(e){var t=this,n=e.receiverId,a=e.actions,o=Object.create(null,{signAndSendTransaction:{get:function(){return d(l(i.prototype),"signAndSendTransaction",t)}}});return m(this,void 0,void 0,s().mark((function e(){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.signAndSendTransaction.call(this,{receiverId:n,actions:a});case 2:return e.next=4,this.sendCode();case 4:return e.next=6,this.promptAndVerify();case 6:if(t=e.sent,!this.onConfirmResult){e.next=10;break}return e.next=10,this.onConfirmResult(t);case 10:return e.abrupt("return",t);case 11:case"end":return e.stop()}}),e,this)})))}},{key:"deployMultisig",value:function(e){var n=this,c=Object.create(null,{signAndSendTransactionWithAccount:{get:function(){return d(l(i.prototype),"signAndSendTransactionWithAccount",n)}}});return m(this,void 0,void 0,s().mark((function n(){var i,u,d,l,f,p,b,m,h;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=this.accountId,n.next=3,this.getRecoveryMethods();case 3:return u=n.sent.data.filter((function(e){var t=e.kind,n=e.publicKey;return("phrase"===t||"ledger"===t)&&null!==n})).map((function(e){return e.publicKey})),n.next=6,this.getAccessKeys();case 6:return d=n.sent.filter((function(e){var t=e.public_key;return"FullAccess"===e.access_key.permission&&!u.includes(t)})).map((function(e){return e.public_key})).map(M),n.t0=M,n.next=10,this.postSignedJson("/2fa/getAccessKey",{accountId:i});case 10:return n.t1=n.sent.publicKey,l=(0,n.t0)(n.t1),f=a.from(JSON.stringify({num_confirmations:2})),p=[].concat(r(d.map((function(e){return(0,I.deleteKey)(e)}))),r(d.map((function(e){return(0,I.addKey)(e,(0,I.functionCallAccessKey)(i,t.MULTISIG_CHANGE_METHODS,null))}))),[(0,I.addKey)(l,(0,I.functionCallAccessKey)(i,t.MULTISIG_CONFIRM_METHODS,null)),(0,I.deployContract)(e)]),b=p.concat((0,I.functionCall)("new",f,t.MULTISIG_GAS,t.MULTISIG_DEPOSIT)),o.log("deploying multisig contract for",i),n.next=18,this.checkMultisigCodeAndStateStatus(e);case 18:m=n.sent,h=m.stateStatus,n.t2=h,n.next=n.t2===y.STATE_NOT_INITIALIZED?23:n.t2===y.VALID_STATE?26:n.t2===y.INVALID_STATE?29:30;break;case 23:return n.next=25,c.signAndSendTransactionWithAccount.call(this,i,b);case 25:case 28:return n.abrupt("return",n.sent);case 26:return n.next=28,c.signAndSendTransactionWithAccount.call(this,i,p);case 29:throw new T.TypedError("Can not deploy a contract to account ".concat(this.accountId," on network ").concat(this.connection.networkId,", the account has existing state."),"ContractHasExistingState");case 30:throw new T.TypedError("Can not deploy a contract to account ".concat(this.accountId," on network ").concat(this.connection.networkId,", the account state could not be verified."),"ContractStateUnknown");case 31:case"end":return n.stop()}}),n,this)})))}},{key:"disableWithFAK",value:function(e){var t=e.contractBytes,n=e.cleanupContractBytes;return m(this,void 0,void 0,s().mark((function e(){var a,o,i,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=[],!n){e.next=7;break}return e.next=4,this.deleteAllRequests().catch((function(e){return e}));case 4:return e.next=6,this.get2faDisableCleanupActions(n);case 6:a=e.sent;case 7:return e.next=9,this.get2faDisableKeyConversionActions();case 9:return o=e.sent,i=[].concat(r(a),r(o),[(0,I.deployContract)(t)]),e.next=13,this.findAccessKey(this.accountId,i);case 13:if(!(c=e.sent)||!c.accessKey||"FullAccess"===c.accessKey.permission){e.next=16;break}throw new T.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");case 16:return e.abrupt("return",this.signAndSendTransactionWithAccount(this.accountId,i));case 17:case"end":return e.stop()}}),e,this)})))}},{key:"get2faDisableCleanupActions",value:function(e){return m(this,void 0,void 0,s().mark((function n(){var a,o,r=this;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.viewState("").catch((function(e){var t=e.cause&&e.cause.name;if("NO_CONTRACT_CODE"==t)return[];throw"TOO_LARGE_CONTRACT_STATE"==t?new T.TypedError("Can not deploy a contract to account ".concat(r.accountId," on network ").concat(r.connection.networkId,", the account has existing state."),"ContractHasExistingState"):e}));case 2:return a=n.sent,o=a.map((function(e){return e.key.toString("base64")})),n.abrupt("return",a.length?[(0,I.deployContract)(e),(0,I.functionCall)("clean",{keys:o},t.MULTISIG_GAS,new w.default("0"))]:[]);case 5:case"end":return n.stop()}}),n,this)})))}},{key:"get2faDisableKeyConversionActions",value:function(){return m(this,void 0,void 0,s().mark((function e(){var t,n,a,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.accountId,e.next=3,this.getAccessKeys();case 3:return n=e.sent,a=n.filter((function(e){return"FullAccess"!==e.access_key.permission})).filter((function(e){var n=e.access_key.permission.FunctionCall;return n.receiver_id===t&&4===n.method_names.length&&n.method_names.includes("add_request_and_confirm")})),e.t0=x.PublicKey,e.next=8,this.postSignedJson("/2fa/getAccessKey",{accountId:t});case 8:return e.t1=e.sent.publicKey,o=e.t0.from.call(e.t0,e.t1),e.abrupt("return",[(0,I.deleteKey)(o)].concat(r(a.map((function(e){var t=e.public_key;return(0,I.deleteKey)(x.PublicKey.from(t))}))),r(a.map((function(e){var t=e.public_key;return(0,I.addKey)(x.PublicKey.from(t),(0,I.fullAccessKey)())})))));case 11:case"end":return e.stop()}}),e,this)})))}},{key:"disable",value:function(e,t){return m(this,void 0,void 0,s().mark((function n(){var a,i,c,u,d;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.checkMultisigCodeAndStateStatus();case 2:if(a=n.sent,(i=a.stateStatus)===y.VALID_STATE||i===y.STATE_NOT_INITIALIZED){n.next=6;break}throw new T.TypedError("Can not deploy a contract to account ".concat(this.accountId," on network ").concat(this.connection.networkId,", the account state could not be verified."),"ContractStateUnknown");case 6:return n.next=8,this.deleteAllRequests().catch((function(e){return c=e}));case 8:return n.next=10,this.get2faDisableCleanupActions(t).catch((function(e){if("ContractHasExistingState"===e.type)throw c||e;throw e}));case 10:return u=n.sent,n.t0=[],n.t1=r(u),n.t2=r,n.next=16,this.get2faDisableKeyConversionActions();case 16:return n.t3=n.sent,n.t4=(0,n.t2)(n.t3),n.t5=[(0,I.deployContract)(e)],d=n.t0.concat.call(n.t0,n.t1,n.t4,n.t5),o.log("disabling 2fa for",this.accountId),n.next=23,this.signAndSendTransaction({receiverId:this.accountId,actions:d});case 23:return n.abrupt("return",n.sent);case 24:case"end":return n.stop()}}),n,this)})))}},{key:"sendCodeDefault",value:function(){return m(this,void 0,void 0,s().mark((function e(){var t,n,a,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.accountId,n=this.getRequest(),a=n.requestId,e.next=4,this.get2faMethod();case 4:return o=e.sent,e.next=7,this.postSignedJson("/2fa/send",{accountId:t,method:o,requestId:a});case 7:return e.abrupt("return",a);case 8:case"end":return e.stop()}}),e,this)})))}},{key:"getCodeDefault",value:function(){return m(this,void 0,void 0,s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".');case 1:case"end":return e.stop()}}),e)})))}},{key:"promptAndVerify",value:function(){return m(this,void 0,void 0,s().mark((function e(){var t,n,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get2faMethod();case 2:return t=e.sent,e.next=5,this.getCode(t);case 5:return n=e.sent,e.prev=6,e.next=9,this.verifyCode(n);case 9:return a=e.sent,e.abrupt("return",a);case 13:if(e.prev=13,e.t0=e.catch(6),o.warn("Error validating security code:",e.t0),!e.t0.toString().includes("invalid 2fa code provided")&&!e.t0.toString().includes("2fa code not valid")){e.next=20;break}return e.next=19,this.promptAndVerify();case 19:return e.abrupt("return",e.sent);case 20:throw e.t0;case 21:case"end":return e.stop()}}),e,this,[[6,13]])})))}},{key:"verifyCodeDefault",value:function(e){return m(this,void 0,void 0,s().mark((function t(){var n,a,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.accountId,a=this.getRequest()){t.next=4;break}throw new Error("no request pending");case 4:return o=a.requestId,t.next=7,this.postSignedJson("/2fa/verify",{accountId:n,securityCode:e,requestId:o});case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"getRecoveryMethods",value:function(){return m(this,void 0,void 0,s().mark((function e(){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.accountId,e.t0=t,e.next=4,this.postSignedJson("/account/recoveryMethods",{accountId:t});case 4:return e.t1=e.sent,e.abrupt("return",{accountId:e.t0,data:e.t1});case 6:case"end":return e.stop()}}),e,this)})))}},{key:"get2faMethod",value:function(){return m(this,void 0,void 0,s().mark((function e(){var t,n,a,o,r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRecoveryMethods();case 2:if(t=e.sent,(n=t.data)&&n.length&&(n=n.find((function(e){return 0===e.kind.indexOf("2fa-")}))),n){e.next=7;break}return e.abrupt("return",null);case 7:return o=(a=n).kind,r=a.detail,e.abrupt("return",{kind:o,detail:r});case 9:case"end":return e.stop()}}),e,this)})))}},{key:"signatureFor",value:function(){return m(this,void 0,void 0,s().mark((function e(){var t,n,o,r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.accountId,e.next=3,this.connection.provider.block({finality:"final"});case 3:return n=e.sent,o=n.header.height.toString(),e.next=7,this.connection.signer.signMessage(a.from(o),t,this.connection.networkId);case 7:return r=e.sent,i=a.from(r.signature).toString("base64"),e.abrupt("return",{blockNumber:o,blockNumberSignature:i});case 10:case"end":return e.stop()}}),e,this)})))}},{key:"postSignedJson",value:function(e,t){return m(this,void 0,void 0,s().mark((function n(){return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=S.fetchJson,n.t1=this.helperUrl+e,n.t2=JSON,n.t3=Object,n.t4=Object.assign({},t),n.next=7,this.signatureFor();case 7:return n.t5=n.sent,n.t6=n.t3.assign.call(n.t3,n.t4,n.t5),n.t7=n.t2.stringify.call(n.t2,n.t6),n.next=12,(0,n.t0)(n.t1,n.t7);case 12:return n.abrupt("return",n.sent);case 13:case"end":return n.stop()}}),n,this)})))}}]),i}(E);t.Account2FA=R;var M=function(e){return x.PublicKey.from(e)},P=function(e,n,o){return e.map((function(e){var r,i=e.enum,s=e[i],c=s.gas,u=s.publicKey,d=s.methodName,l=s.args,f=s.deposit,p=s.accessKey,b=s.code,m={type:i[0].toUpperCase()+i.substr(1),gas:c&&c.toString()||void 0,public_key:u&&(r=u,r.toString().replace("ed25519:",""))||void 0,method_name:d,args:l&&a.from(l).toString("base64")||void 0,code:b&&a.from(b).toString("base64")||void 0,amount:f&&f.toString()||void 0,deposit:f&&f.toString()||"0",permission:void 0};if(p&&(o===n&&"fullAccess"!==p.permission.enum&&(m.permission={receiver_id:n,allowance:t.MULTISIG_ALLOWANCE.toString(),method_names:t.MULTISIG_CHANGE_METHODS}),"functionCall"===p.permission.enum)){var h=p.permission.functionCall,g=h.receiverId,y=h.methodNames,v=h.allowance;m.permission={receiver_id:g,allowance:v&&v.toString()||void 0,method_names:y}}return m}))}},26291:function(e,t,n){"use strict";var a=n(17061).default,o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var r=n(61387);t.connect=function(e){return o(this,void 0,void 0,a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new r.Near(e));case 1:case"end":return t.stop()}}),t)})))}},41564:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.keyStores=void 0,t.keyStores=r(n(14547)),i(n(96875),t),i(n(26291),t),n(56575)},96875:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletConnection=t.ConnectedWalletAccount=t.Near=t.KeyPair=t.Signer=t.InMemorySigner=t.Contract=t.Connection=t.Account=t.multisig=t.validators=t.transactions=t.utils=t.providers=t.accountCreator=void 0;var i=r(n(31234));t.providers=i;var s=r(n(15350));t.utils=s;var c=r(n(54952));t.transactions=c;var u=r(n(29658));t.validators=u;var d=n(83423);Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return d.Account}});var l=r(n(17797));t.multisig=l;var f=r(n(78396));t.accountCreator=f;var p=n(54531);Object.defineProperty(t,"Connection",{enumerable:!0,get:function(){return p.Connection}});var b=n(56820);Object.defineProperty(t,"Signer",{enumerable:!0,get:function(){return b.Signer}}),Object.defineProperty(t,"InMemorySigner",{enumerable:!0,get:function(){return b.InMemorySigner}});var m=n(63284);Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return m.Contract}});var h=n(30898);Object.defineProperty(t,"KeyPair",{enumerable:!0,get:function(){return h.KeyPair}});var g=n(61387);Object.defineProperty(t,"Near",{enumerable:!0,get:function(){return g.Near}});var y=n(97221);Object.defineProperty(t,"ConnectedWalletAccount",{enumerable:!0,get:function(){return y.ConnectedWalletAccount}}),Object.defineProperty(t,"WalletConnection",{enumerable:!0,get:function(){return y.WalletConnection}})},54531:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Connection=void 0;var r=n(31234),i=n(56820);var s=function(){function e(t,n,o,r){a(this,e),this.networkId=t,this.provider=n,this.signer=o,this.jsvmAccountId=r}return o(e,null,[{key:"fromConfig",value:function(t){var n=function(e){switch(e.type){case void 0:return e;case"JsonRpcProvider":return new r.JsonRpcProvider(Object.assign({},e.args));default:throw new Error("Unknown provider type ".concat(e.type))}}(t.provider),a=function(e){switch(e.type){case void 0:return e;case"InMemorySigner":return new i.InMemorySigner(e.keyStore);default:throw new Error("Unknown signer type ".concat(e.type))}}(t.signer);return new e(t.networkId,n,a,t.jsvmAccountId)}}]),e}();t.Connection=s},47332:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FUNCTION_CALL_GAS=void 0;var o=a(n(43811));t.DEFAULT_FUNCTION_CALL_GAS=new o.default("30000000000000")},63284:function(e,t,n){"use strict";var a=n(17061).default,o=n(56690).default,r=n(89728).default,i=n(38416).default,s=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=void 0;var u=c(n(43811)),d=c(n(94025)),l=n(31234),f=n(45359);function p(e,t){return i({},e,(function(){return t.apply(void 0,arguments)}))[e]}var b=function(e){return e&&void 0!==e.byteLength&&e.byteLength===e.length},m=function(e){return"[object Object]"===Object.prototype.toString.call(e)},h=function(){function e(t,n,r){var i=this;o(this,e),this.account=t,this.contractId=n;var c=r.viewMethods,u=void 0===c?[]:c,l=r.changeMethods,h=void 0===l?[]:l;u.forEach((function(e){Object.defineProperty(i,e,{writable:!1,enumerable:!0,value:p(e,(function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length,r=new Array(o>2?o-2:0),c=2;c3||!m(n[0])&&!b(n[0]))){t.next=2;break}throw new f.PositionalArgsError;case 2:if(!(n.length>1)&&n[0]&&n[0].args){t.next=6;break}return(0,d.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),t.abrupt("return",this._changeMethod({methodName:e,args:n[0],gas:n[1],amount:n[2]}));case 6:return t.abrupt("return",this._changeMethod(Object.assign({methodName:e},n[0])));case 7:case"end":return t.stop()}}),t,this)})))}))})}))}return r(e,[{key:"_changeMethod",value:function(e){var t=e.args,n=e.methodName,o=e.gas,r=e.amount,i=e.meta,c=e.callbackUrl;return s(this,void 0,void 0,a().mark((function e(){var s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g({gas:o,amount:r}),e.next=3,this.account.functionCall({contractId:this.contractId,methodName:n,args:t,gas:o,attachedDeposit:r,walletMeta:i,walletCallbackUrl:c});case 3:return s=e.sent,e.abrupt("return",(0,l.getTransactionLastResult)(s));case 5:case"end":return e.stop()}}),e,this)})))}}]),e}();function g(e){for(var t=0,n=Object.keys(e);t0&&void 0!==arguments[0]?arguments[0]:window.localStorage,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"near-api-js:keystore:";return r(this,n),(e=t.call(this)).localStorage=a,e.prefix=o,e}return i(n,[{key:"setKey",value:function(e,t,n){return u(this,void 0,void 0,o().mark((function a(){return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:this.localStorage.setItem(this.storageKeyForSecretKey(e,t),n.toString());case 1:case"end":return a.stop()}}),a,this)})))}},{key:"getKey",value:function(e,t){return u(this,void 0,void 0,o().mark((function n(){var a;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=this.localStorage.getItem(this.storageKeyForSecretKey(e,t))){n.next=3;break}return n.abrupt("return",null);case 3:return n.abrupt("return",l.KeyPair.fromString(a));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"removeKey",value:function(e,t){return u(this,void 0,void 0,o().mark((function n(){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:this.localStorage.removeItem(this.storageKeyForSecretKey(e,t));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"clear",value:function(){return u(this,void 0,void 0,o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this.storageKeys());try{for(t.s();!(n=t.n()).done;)(r=n.value).startsWith(this.prefix)&&this.localStorage.removeItem(r)}catch(o){t.e(o)}finally{t.f()}case 2:case"end":return e.stop()}}),e,this)})))}},{key:"getNetworks",value:function(){return u(this,void 0,void 0,o().mark((function e(){var t,n,r,i,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=new Set,n=a(this.storageKeys());try{for(n.s();!(r=n.n()).done;)(i=r.value).startsWith(this.prefix)&&(s=i.substring(this.prefix.length).split(":"),t.add(s[1]))}catch(o){n.e(o)}finally{n.f()}return e.abrupt("return",Array.from(t.values()));case 4:case"end":return e.stop()}}),e,this)})))}},{key:"getAccounts",value:function(e){return u(this,void 0,void 0,o().mark((function t(){var n,r,i,s,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new Array,r=a(this.storageKeys());try{for(r.s();!(i=r.n()).done;)(s=i.value).startsWith(this.prefix)&&(c=s.substring(this.prefix.length).split(":"))[1]===e&&n.push(c[0])}catch(o){r.e(o)}finally{r.f()}return t.abrupt("return",n);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"storageKeyForSecretKey",value:function(e,t){return"".concat(this.prefix).concat(t,":").concat(e)}},{key:"storageKeys",value:o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t1&&void 0!==arguments[1]?arguments[1]:{writeKeyStoreIndex:0};return r(this,n),(a=t.call(this)).options=o,a.keyStores=e,a}return i(n,[{key:"setKey",value:function(e,t,n){return u(this,void 0,void 0,o().mark((function a(){return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.keyStores[this.options.writeKeyStoreIndex].setKey(e,t,n);case 2:case"end":return a.stop()}}),a,this)})))}},{key:"getKey",value:function(e,t){return u(this,void 0,void 0,o().mark((function n(){var r,i,s,c;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=a(this.keyStores),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=12;break}return s=i.value,n.next=7,s.getKey(e,t);case 7:if(!(c=n.sent)){n.next=10;break}return n.abrupt("return",c);case 10:n.next=3;break;case 12:n.next=17;break;case 14:n.prev=14,n.t0=n.catch(1),r.e(n.t0);case 17:return n.prev=17,r.f(),n.finish(17);case 20:return n.abrupt("return",null);case 21:case"end":return n.stop()}}),n,this,[[1,14,17,20]])})))}},{key:"removeKey",value:function(e,t){return u(this,void 0,void 0,o().mark((function n(){var r,i,s;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=a(this.keyStores),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=9;break}return s=i.value,n.next=7,s.removeKey(e,t);case 7:n.next=3;break;case 9:n.next=14;break;case 11:n.prev=11,n.t0=n.catch(1),r.e(n.t0);case 14:return n.prev=14,r.f(),n.finish(14);case 17:case"end":return n.stop()}}),n,this,[[1,11,14,17]])})))}},{key:"clear",value:function(){return u(this,void 0,void 0,o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this.keyStores),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,r.clear();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])})))}},{key:"getNetworks",value:function(){return u(this,void 0,void 0,o().mark((function e(){var t,n,r,i,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=new Set,n=a(this.keyStores),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=14;break}return i=r.value,e.t0=a,e.next=9,i.getNetworks();case 9:e.t1=e.sent,s=(0,e.t0)(e.t1);try{for(s.s();!(c=s.n()).done;)u=c.value,t.add(u)}catch(o){s.e(o)}finally{s.f()}case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t2=e.catch(2),n.e(e.t2);case 19:return e.prev=19,n.f(),e.finish(19);case 22:return e.abrupt("return",Array.from(t));case 23:case"end":return e.stop()}}),e,this,[[2,16,19,22]])})))}},{key:"getAccounts",value:function(e){return u(this,void 0,void 0,o().mark((function t(){var n,r,i,s,c,u,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new Set,r=a(this.keyStores),t.prev=2,r.s();case 4:if((i=r.n()).done){t.next=14;break}return s=i.value,t.t0=a,t.next=9,s.getAccounts(e);case 9:t.t1=t.sent,c=(0,t.t0)(t.t1);try{for(c.s();!(u=c.n()).done;)d=u.value,n.add(d)}catch(o){c.e(o)}finally{c.f()}case 12:t.next=4;break;case 14:t.next=19;break;case 16:t.prev=16,t.t2=t.catch(2),r.e(t.t2);case 19:return t.prev=19,r.f(),t.finish(19);case 22:return t.abrupt("return",Array.from(n));case 23:case"end":return t.stop()}}),t,this,[[2,16,19,22]])})))}},{key:"toString",value:function(){return"MergeKeyStore(".concat(this.keyStores.join(", "),")")}}]),n}(n(56302).KeyStore);t.MergeKeyStore=d},61387:function(e,t,n){"use strict";var a=n(17061).default,o=n(56690).default,r=n(89728).default,i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Near=void 0;var c=s(n(43811)),u=n(83423),d=n(54531),l=n(78396),f=function(){function e(t){if(o(this,e),this.config=t,this.connection=d.Connection.fromConfig({networkId:t.networkId,provider:{type:"JsonRpcProvider",args:{url:t.nodeUrl,headers:t.headers}},signer:t.signer||{type:"InMemorySigner",keyStore:t.keyStore},jsvmAccountId:t.jsvmAccountId||"jsvm.".concat(t.networkId)}),t.masterAccount){var n=t.initialBalance?new c.default(t.initialBalance):new c.default("500000000000000000000000000");this.accountCreator=new l.LocalAccountCreator(new u.Account(this.connection,t.masterAccount),n)}else t.helperUrl?this.accountCreator=new l.UrlAccountCreator(this.connection,t.helperUrl):this.accountCreator=null}return r(e,[{key:"account",value:function(e){return i(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new u.Account(this.connection,e),t.abrupt("return",n);case 2:case"end":return t.stop()}}),t,this)})))}},{key:"createAccount",value:function(e,t){return i(this,void 0,void 0,a().mark((function n(){return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.accountCreator){n.next=2;break}throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");case 2:return n.next=4,this.accountCreator.createAccount(e,t);case 4:return n.abrupt("return",new u.Account(this.connection,e));case 5:case"end":return n.stop()}}),n,this)})))}}]),e}();t.Near=f},31234:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorContext=t.TypedError=t.getTransactionLastResult=t.FinalExecutionStatusBasic=t.JsonRpcProvider=t.Provider=void 0;var a=n(31573);Object.defineProperty(t,"Provider",{enumerable:!0,get:function(){return a.Provider}}),Object.defineProperty(t,"getTransactionLastResult",{enumerable:!0,get:function(){return a.getTransactionLastResult}}),Object.defineProperty(t,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return a.FinalExecutionStatusBasic}});var o=n(41040);Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return o.JsonRpcProvider}}),Object.defineProperty(t,"TypedError",{enumerable:!0,get:function(){return o.TypedError}}),Object.defineProperty(t,"ErrorContext",{enumerable:!0,get:function(){return o.ErrorContext}})},41040:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(65218),r=n(17061).default,i=n(56690).default,s=n(89728).default,c=n(61655).default,u=n(26389).default,d=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},l=this&&this.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o2&&void 0!==arguments[2]?arguments[2]:"";return d(this,void 0,void 0,r().mark((function a(){var o,i;return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return o=t.finality,i=t.blockId,a.abrupt("return",this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"data_changes",account_ids:e,key_prefix_base64:n,block_id:i,finality:o}));case 3:case"end":return a.stop()}}),a,this)})))}},{key:"contractCodeChanges",value:function(e,t){return d(this,void 0,void 0,r().mark((function n(){var a,o;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.finality,o=t.blockId,n.abrupt("return",this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"contract_code_changes",account_ids:e,block_id:o,finality:a}));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"gasPrice",value:function(e){return d(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sendJsonRpc("gas_price",[e]);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"sendJsonRpc",value:function(e,t){return d(this,void 0,void 0,r().mark((function n(){var a,i,s=this;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,g.default)(500,12,1.5,(function(){return d(s,void 0,void 0,r().mark((function n(){var a,i,s;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,a={method:e,params:t,id:v++,jsonrpc:"2.0"},n.next=4,(0,b.fetchJson)(this.connection,JSON.stringify(a));case 4:if(!(i=n.sent).error){n.next=16;break}if("object"!==typeof i.error.data){n.next=12;break}if("string"!==typeof i.error.data.error_message||"string"!==typeof i.error.data.error_type){n.next=9;break}throw new m.TypedError(i.error.data.error_message,i.error.data.error_type);case 9:throw(0,y.parseRpcError)(i.error.data);case 12:if(s="[".concat(i.error.code,"] ").concat(i.error.message,": ").concat(i.error.data),"Timeout"!==i.error.data&&!s.includes("Timeout error")&&!s.includes("query has timed out")){n.next=15;break}throw new m.TypedError(s,"TimeoutError");case 15:throw new m.TypedError(s,i.error.name);case 16:return n.abrupt("return",i);case 19:if(n.prev=19,n.t0=n.catch(0),"TimeoutError"!==n.t0.type){n.next=24;break}return{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.NEAR_NO_LOGS||o.warn("Retrying request to ".concat(e," as it has timed out"),t),n.abrupt("return",null);case 24:throw n.t0;case 25:case"end":return n.stop()}}),n,this,[[0,19]])})))}));case 2:if(a=n.sent,"undefined"!==typeof(i=a.result)){n.next=6;break}throw new m.TypedError("Exceeded ".concat(12," attempts for request to ").concat(e,"."),"RetriesExceeded");case 6:return n.abrupt("return",i);case 7:case"end":return n.stop()}}),n)})))}}]),n}(p.Provider);t.JsonRpcProvider=w},31573:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(89728).default,r=n(56690).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionLastResult=t.Provider=t.IdType=t.FinalExecutionStatusBasic=t.ExecutionStatusBasic=void 0,function(e){e.Unknown="Unknown",e.Pending="Pending",e.Failure="Failure"}(t.ExecutionStatusBasic||(t.ExecutionStatusBasic={})),function(e){e.NotStarted="NotStarted",e.Started="Started",e.Failure="Failure"}(t.FinalExecutionStatusBasic||(t.FinalExecutionStatusBasic={})),function(e){e.Transaction="transaction",e.Receipt="receipt"}(t.IdType||(t.IdType={}));var i=o((function e(){r(this,e)}));t.Provider=i,t.getTransactionLastResult=function(e){if("object"===typeof e.status&&"string"===typeof e.status.SuccessValue){var t=a.from(e.status.SuccessValue,"base64").toString();try{return JSON.parse(t)}catch(n){return t}}return null}},56820:function(e,t,n){"use strict";var a=n(17061).default,o=n(61655).default,r=n(26389).default,i=n(89728).default,s=n(56690).default,c=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.InMemorySigner=t.Signer=void 0;var d=u(n(30477)),l=n(30898),f=n(86931),p=i((function e(){s(this,e)}));t.Signer=p;var b=function(e){o(n,e);var t=r(n);function n(e){var a;return s(this,n),(a=t.call(this)).keyStore=e,a}return i(n,[{key:"createKey",value:function(e,t){return c(this,void 0,void 0,a().mark((function n(){var o;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=l.KeyPair.fromRandom("ed25519"),n.next=3,this.keyStore.setKey(t,e,o);case 3:return n.abrupt("return",o.getPublicKey());case 4:case"end":return n.stop()}}),n,this)})))}},{key:"getPublicKey",value:function(e,t){return c(this,void 0,void 0,a().mark((function n(){var o;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.keyStore.getKey(t,e);case 2:if(null!==(o=n.sent)){n.next=5;break}return n.abrupt("return",null);case 5:return n.abrupt("return",o.getPublicKey());case 6:case"end":return n.stop()}}),n,this)})))}},{key:"signMessage",value:function(e,t,n){return c(this,void 0,void 0,a().mark((function o(){var r,i;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(r=new Uint8Array(d.default.sha256.array(e)),t){a.next=3;break}throw new Error("InMemorySigner requires provided account id");case 3:return a.next=5,this.keyStore.getKey(n,t);case 5:if(null!==(i=a.sent)){a.next=8;break}throw new Error("Key for ".concat(t," not found in ").concat(n));case 8:return a.abrupt("return",i.sign(r));case 9:case"end":return a.stop()}}),o,this)})))}},{key:"toString",value:function(){return"InMemorySigner(".concat(this.keyStore,")")}}],[{key:"fromKeyPair",value:function(e,t,o){return c(this,void 0,void 0,a().mark((function r(){var i;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=new f.InMemoryKeyStore,a.next=3,i.setKey(e,t,o);case 3:return a.abrupt("return",new n(i));case 4:case"end":return a.stop()}}),r)})))}}]),n}(p);t.InMemorySigner=b},54952:function(e,t,n){"use strict";var a=n(54659).Buffer,o=n(17061).default,r=n(89728).default,i=n(56690).default,s=n(61655).default,c=n(26389).default,u=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(t){r(t)}}function s(e){try{c(a.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.signTransaction=t.createTransaction=t.SCHEMA=t.Action=t.SignedTransaction=t.Transaction=t.Signature=t.deleteAccount=t.deleteKey=t.addKey=t.stake=t.transfer=t.functionCall=t.stringifyJsonOrBytes=t.deployContract=t.createAccount=t.DeleteAccount=t.DeleteKey=t.AddKey=t.Stake=t.Transfer=t.FunctionCall=t.DeployContract=t.CreateAccount=t.IAction=t.functionCallAccessKey=t.fullAccessKey=t.AccessKey=t.AccessKeyPermission=t.FullAccessPermission=t.FunctionCallPermission=void 0;var l=d(n(30477)),f=n(54635),p=n(6323),b=n(30898),m=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(f.Assignable);t.FunctionCallPermission=m;var h=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(f.Assignable);t.FullAccessPermission=h;var g=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(f.Enum);t.AccessKeyPermission=g;var y=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(f.Assignable);t.AccessKey=y,t.fullAccessKey=function(){return new y({permission:new g({fullAccess:new h({})})})},t.functionCallAccessKey=function(e,t,n){return new y({permission:new g({functionCall:new m({receiverId:e,allowance:n,methodNames:t})})})};var v=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(f.Assignable);t.IAction=v;var w=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(v);t.CreateAccount=w;var k=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(v);t.DeployContract=k;var A=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(v);t.FunctionCall=A;var x=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(v);t.Transfer=x;var I=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(v);t.Stake=I;var T=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(v);t.AddKey=T;var S=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(v);t.DeleteKey=S;var C=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(v);function E(e){return void 0!==e.byteLength&&e.byteLength===e.length?e:a.from(JSON.stringify(e))}t.DeleteAccount=C,t.createAccount=function(){return new U({createAccount:new w({})})},t.deployContract=function(e){return new U({deployContract:new k({code:e})})},t.stringifyJsonOrBytes=E,t.functionCall=function(e,t,n,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:E;return new U(arguments.length>5&&void 0!==arguments[5]&&arguments[5]?{functionCall:new A({methodName:e,args:t,gas:n,deposit:a})}:{functionCall:new A({methodName:e,args:o(t),gas:n,deposit:a})})},t.transfer=function(e){return new U({transfer:new x({deposit:e})})},t.stake=function(e,t){return new U({stake:new I({stake:e,publicKey:t})})},t.addKey=function(e,t){return new U({addKey:new T({publicKey:e,accessKey:t})})},t.deleteKey=function(e){return new U({deleteKey:new S({publicKey:e})})},t.deleteAccount=function(e){return new U({deleteAccount:new C({beneficiaryId:e})})};var R=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(f.Assignable);t.Signature=R;var M=function(e){s(a,e);var n=c(a);function a(){return i(this,a),n.apply(this,arguments)}return r(a,[{key:"encode",value:function(){return(0,p.serialize)(t.SCHEMA,this)}}],[{key:"decode",value:function(e){return(0,p.deserialize)(t.SCHEMA,a,e)}}]),a}(f.Assignable);t.Transaction=M;var P=function(e){s(a,e);var n=c(a);function a(){return i(this,a),n.apply(this,arguments)}return r(a,[{key:"encode",value:function(){return(0,p.serialize)(t.SCHEMA,this)}}],[{key:"decode",value:function(e){return(0,p.deserialize)(t.SCHEMA,a,e)}}]),a}(f.Assignable);t.SignedTransaction=P;var U=function(e){s(n,e);var t=c(n);function n(){return i(this,n),t.apply(this,arguments)}return r(n)}(f.Enum);function _(e,t,n,a,o,r){return new M({signerId:e,publicKey:t,nonce:a,receiverId:n,actions:o,blockHash:r})}function B(e,n,a,r){return u(this,void 0,void 0,o().mark((function i(){var s,c,u,d;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return s=(0,p.serialize)(t.SCHEMA,e),c=new Uint8Array(l.default.sha256.array(s)),o.next=4,n.signMessage(s,a,r);case 4:return u=o.sent,d=new P({transaction:e,signature:new R({keyType:e.publicKey.keyType,data:u.signature})}),o.abrupt("return",[c,d]);case 7:case"end":return o.stop()}}),i)})))}t.Action=U,t.SCHEMA=new Map([[R,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[P,{kind:"struct",fields:[["transaction",M],["signature",R]]}],[M,{kind:"struct",fields:[["signerId","string"],["publicKey",b.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[U]]]}],[b.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[y,{kind:"struct",fields:[["nonce","u64"],["permission",g]]}],[g,{kind:"enum",field:"enum",values:[["functionCall",m],["fullAccess",h]]}],[m,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[h,{kind:"struct",fields:[]}],[U,{kind:"enum",field:"enum",values:[["createAccount",w],["deployContract",k],["functionCall",A],["transfer",x],["stake",I],["addKey",T],["deleteKey",S],["deleteAccount",C]]}],[w,{kind:"struct",fields:[]}],[k,{kind:"struct",fields:[["code",["u8"]]]}],[A,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[x,{kind:"struct",fields:[["deposit","u128"]]}],[I,{kind:"struct",fields:[["stake","u128"],["publicKey",b.PublicKey]]}],[T,{kind:"struct",fields:[["publicKey",b.PublicKey],["accessKey",y]]}],[S,{kind:"struct",fields:[["publicKey",b.PublicKey]]}],[C,{kind:"struct",fields:[["beneficiaryId","string"]]}]]),t.createTransaction=_,t.signTransaction=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:t.NEAR_NOMINATION_EXP,a=new o.default(e,10);if(n!==t.NEAR_NOMINATION_EXP){var i=t.NEAR_NOMINATION_EXP-n-1;i>0&&a.iadd(r[i])}var s=(e=a.toString()).substring(0,e.length-t.NEAR_NOMINATION_EXP)||"0",c=e.substring(e.length-t.NEAR_NOMINATION_EXP).padStart(t.NEAR_NOMINATION_EXP,"0").substring(0,n);return"".concat(function(e){for(var t=/(-?\d+)(\d{3})/;t.test(e);)e=e.replace(t,"$1,$2");return e}(s),".").concat(c).replace(/\.?0*$/,"")},t.parseNearAmount=function(e){if(!e)return null;var n=(e=e.replace(/,/g,"").trim()).split("."),a=n[0],o=n[1]||"";if(n.length>2||o.length>t.NEAR_NOMINATION_EXP)throw new Error("Cannot parse '".concat(e,"' as NEAR amount"));return function(e){if(""===(e=e.replace(/^0+/,"")))return"0";return e}(a+o.padEnd(t.NEAR_NOMINATION_EXP,"0"))}},15350:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.logWarning=t.rpc_errors=t.KeyPairEd25519=t.KeyPair=t.PublicKey=t.format=t.enums=t.web=t.serialize=t.key_pair=void 0;var i=r(n(30898));t.key_pair=i;var s=r(n(90214));t.serialize=s;var c=r(n(30039));t.web=c;var u=r(n(54635));t.enums=u;var d=r(n(69097));t.format=d;var l=r(n(58638));t.rpc_errors=l;var f=n(30898);Object.defineProperty(t,"PublicKey",{enumerable:!0,get:function(){return f.PublicKey}}),Object.defineProperty(t,"KeyPair",{enumerable:!0,get:function(){return f.KeyPair}}),Object.defineProperty(t,"KeyPairEd25519",{enumerable:!0,get:function(){return f.KeyPairEd25519}});var p=n(45359);Object.defineProperty(t,"logWarning",{enumerable:!0,get:function(){return p.logWarning}})},30898:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default,r=n(61655).default,i=n(26389).default,s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.KeyPairEd25519=t.KeyPair=t.PublicKey=t.KeyType=void 0;var c,u=s(n(10616)),d=n(90214),l=n(54635);function f(e){if("ed25519"===e.toLowerCase())return c.ED25519;throw new Error("Unknown key type ".concat(e))}!function(e){e[e.ED25519=0]="ED25519"}(c=t.KeyType||(t.KeyType={}));var p=function(e){r(n,e);var t=i(n);function n(){return a(this,n),t.apply(this,arguments)}return o(n,[{key:"toString",value:function(){return"".concat(function(e){if(e===c.ED25519)return"ed25519";throw new Error("Unknown key type ".concat(e))}(this.keyType),":").concat((0,d.base_encode)(this.data))}},{key:"verify",value:function(e,t){if(this.keyType===c.ED25519)return u.default.sign.detached.verify(e,t,this.data);throw new Error("Unknown key type ".concat(this.keyType))}}],[{key:"from",value:function(e){return"string"===typeof e?n.fromString(e):e}},{key:"fromString",value:function(e){var t=e.split(":");if(1===t.length)return new n({keyType:c.ED25519,data:(0,d.base_decode)(t[0])});if(2===t.length)return new n({keyType:f(t[0]),data:(0,d.base_decode)(t[1])});throw new Error("Invalid encoded key format, must be :")}}]),n}(l.Assignable);t.PublicKey=p;var b=function(){function e(){a(this,e)}return o(e,null,[{key:"fromRandom",value:function(e){if("ED25519"===e.toUpperCase())return m.fromRandom();throw new Error("Unknown curve ".concat(e))}},{key:"fromString",value:function(e){var t=e.split(":");if(1===t.length)return new m(t[0]);if(2===t.length){if("ED25519"===t[0].toUpperCase())return new m(t[1]);throw new Error("Unknown curve: ".concat(t[0]))}throw new Error("Invalid encoded key format, must be :")}}]),e}();t.KeyPair=b;var m=function(e){r(n,e);var t=i(n);function n(e){var o;a(this,n),o=t.call(this);var r=u.default.sign.keyPair.fromSecretKey((0,d.base_decode)(e));return o.publicKey=new p({keyType:c.ED25519,data:r.publicKey}),o.secretKey=e,o}return o(n,[{key:"sign",value:function(e){return{signature:u.default.sign.detached(e,(0,d.base_decode)(this.secretKey)),publicKey:this.publicKey}}},{key:"verify",value:function(e,t){return this.publicKey.verify(e,t)}},{key:"toString",value:function(){return"ed25519:".concat(this.secretKey)}},{key:"getPublicKey",value:function(){return this.publicKey}}],[{key:"fromRandom",value:function(){var e=u.default.sign.keyPair();return new n((0,d.base_encode)(e.secretKey))}}]),n}(b);t.KeyPairEd25519=m},58638:function(e,t,n){"use strict";var a=n(89728).default,o=n(56690).default,r=n(61655).default,i=n(26389).default,s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.formatError=t.parseResultError=t.parseRpcError=t.ServerError=void 0;var c=s(n(20387)),u=s(n(56527)),d=s(n(87930)),l=n(96875),f=n(45359),p={formatNear:function(){return function(e,t){return l.utils.format.formatNearAmount(t(e))}}},b=function(e){r(n,e);var t=i(n);function n(){return o(this,n),t.apply(this,arguments)}return a(n)}(f.TypedError);t.ServerError=b;var m=function(e){r(n,e);var t=i(n);function n(){return o(this,n),t.apply(this,arguments)}return a(n)}(b);function h(e){var t={},n=y(e,u.default.schema,t,""),a=new b(g(n,t),n);return Object.assign(a,t),a}function g(e,t){return"string"===typeof d.default[e]?c.default.render(d.default[e],Object.assign(Object.assign({},t),p)):JSON.stringify(t)}function y(e,t,n,a){var o,r,i,s;for(var c in t){if(s=e[c],"[object String]"===Object.prototype.toString.call(s))return e[c];if(v(e[c]))o=e[c],r=t[c],i=c;else{if(!v(e.kind)||!v(e.kind[c]))continue;o=e.kind[c],r=t[c],i=c}}if(o&&r){for(var u=0,d=Object.keys(r.props);u=600)&&o("non-error status code; use only 4xx or 5xx status codes");("number"!==typeof a||!i[a]&&(a<400||a>=600))&&(a=500);var d=e[a]||e[u(a)];t||(t=d?new d(n):new Error(n||i[a]),Error.captureStackTrace(t,e));d&&t instanceof d&&t.status===a||(t.expose=a<500,t.status=t.statusCode=a);for(var l in r)"status"!==l&&"statusCode"!==l&&(t[l]=r[l]);return t},e.exports.HttpError=function(){function e(){throw new TypeError("cannot construct abstract class")}return s(e,Error),e}(),e.exports.isHttpError=(a=e.exports.HttpError,function(e){return!(!e||"object"!==typeof e)&&(e instanceof a||e instanceof Error&&"boolean"===typeof e.expose&&"number"===typeof e.statusCode&&e.status===e.statusCode)}),function(e,t,n){t.forEach((function(t){var a,o=c(i[t]);switch(u(t)){case 400:a=function(e,t,n){var a=l(t);function o(e){var t=null!=e?e:i[n],s=new Error(t);return Error.captureStackTrace(s,o),r(s,o.prototype),Object.defineProperty(s,"message",{enumerable:!0,configurable:!0,value:t,writable:!0}),Object.defineProperty(s,"name",{enumerable:!1,configurable:!0,value:a,writable:!0}),s}return s(o,e),d(o,a),o.prototype.status=n,o.prototype.statusCode=n,o.prototype.expose=!0,o}(n,o,t);break;case 500:a=function(e,t,n){var a=l(t);function o(e){var t=null!=e?e:i[n],s=new Error(t);return Error.captureStackTrace(s,o),r(s,o.prototype),Object.defineProperty(s,"message",{enumerable:!0,configurable:!0,value:t,writable:!0}),Object.defineProperty(s,"name",{enumerable:!1,configurable:!0,value:a,writable:!0}),s}return s(o,e),d(o,a),o.prototype.status=n,o.prototype.statusCode=n,o.prototype.expose=!1,o}(n,o,t)}a&&(e[t]=a,e[o]=a)})),e["I'mateapot"]=o.function(e.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(e.exports,i.codes,e.exports.HttpError)},86709:function(e){"use strict";function t(e,t){if("function"!==typeof e)throw new TypeError("argument fn must be a function");return e}function n(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new TypeError("argument obj must be object");var a=Object.getOwnPropertyDescriptor(e,t);if(!a)throw new TypeError("must call property on owner object");if(!a.configurable)throw new TypeError("property must be configurable")}e.exports=function(e){if(!e)throw new TypeError("argument namespace is required");function a(e){}return a._file=void 0,a._ignored=!0,a._namespace=e,a._traced=!1,a._warned=Object.create(null),a.function=t,a.property=n,a}},60296:function(e,t,n){"use strict";var a=n(10798);function o(e){if("number"===typeof e){if(!o[e])throw new Error("invalid status code: "+e);return e}if("string"!==typeof e)throw new TypeError("code must be a number or string");var t=parseInt(e,10);if(!isNaN(t)){if(!o[t])throw new Error("invalid status code: "+t);return t}if(!(t=o[e.toLowerCase()]))throw new Error('invalid status message: "'+e+'"');return t}e.exports=o,o.STATUS_CODES=a,o.codes=function(e,t){var n=[];return Object.keys(t).forEach((function(a){var o=t[a],r=Number(a);e[r]=o,e[o]=r,e[o.toLowerCase()]=r,n.push(r)})),n}(o,a),o.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},o.empty={204:!0,205:!0,304:!0},o.retry={502:!0,503:!0,504:!0}},29052:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(56784),t),o(n(55092),t),o(n(46770),t),o(n(84570),t)},78374:function(e,t){"use strict";var n;function a(e){switch(e){case n.Day:return 1;case n.Week:return 7;case n.Month:return 30;case n.Year:return 365}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.convertRate=t.RateInterval=void 0,function(e){e.Day="day",e.Week="week",e.Month="month",e.Year="year"}(n=t.RateInterval||(t.RateInterval={})),t.convertRate=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.Day;return Math.pow(1+e,a(t)/a(o))-1}},32613:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(78374),t)},53426:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56784:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(32613),t),o(n(53426),t),o(n(66016),t),o(n(36456),t),o(n(46820),t)},66016:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(32944),t)},32944:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.irr=void 0;var a=n(55092),o=n(46770);t.irr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new a.Polynomial(e).findRoot((0,o.getRootFinderOptionsWithDefaults)(t));return n.converged?n.value-1:NaN}},36456:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(5139),t)},5139:function(e,t,n){"use strict";var a=n(27424).default;Object.defineProperty(t,"__esModule",{value:!0}),t.transform=void 0;var o=[/^(\d{4})[-/]?(\d{2})[-/]?(\d{2})$/],r=864e5;function i(e){if(e instanceof Date)return e;var t=o.find((function(t){return t.test(e)}));if(!t)throw new Error("Invalid date pattern: ".concat(e));var n=e.match(t),r=a(n,4),i=r[1],s=r[2],c=r[3];return new Date(parseInt(i,10),parseInt(s,10)-1,parseInt(c,10))}function s(e,t){return function(e,t){var n=Math.floor(e.valueOf()/r);return Math.floor(t.valueOf()/r)-n}(i(e),i(t))}t.transform=function(e){if(0===e.length)return[];var t=e[0].date;return e.map((function(e){return{amount:e.amount,day:s(t,e.date)}}))}},46820:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(22766),t)},22766:function(e,t,n){"use strict";var a=n(861).default;Object.defineProperty(t,"__esModule",{value:!0}),t.xirr=void 0;var o=n(66016),r=n(36456),i=n(84570);t.xirr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,r.transform)(e),s=n.map((function(e){return e.day})),c=Math.min.apply(Math,a(s)),u=Math.max.apply(Math,a(s))-c+1,d=(0,i.zeros)(u);return n.forEach((function(e){var t=e.amount,n=e.day;return d[n]+=t})),{days:u,rate:(0,o.irr)(d,t)}}},52788:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},55092:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(52788),t),o(n(31546),t),o(n(81193),t)},31546:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(56685),t)},56685:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Line=void 0;var r=function(){function e(t,n){a(this,e),this.m=t,this.k=n}return o(e,[{key:"calculate",value:function(e){return this.m*e+this.k}},{key:"findRoot",value:function(){return{converged:!0,iterations:0,value:-this.k/this.m}}},{key:"getK",value:function(){return this.k}},{key:"getM",value:function(){return this.m}}]),e}();t.Line=r},81193:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(49041),t)},49041:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Polynomial=void 0;var r=n(46770),i=n(31546),s=function(){function e(t){a(this,e),this.coefficients=t,this.derivative=null}return o(e,[{key:"getDegree",value:function(){return this.coefficients.length-1}},{key:"calculate",value:function(e){for(var t=1,n=0,a=this.getDegree();a>=0;a--)n+=t*this.coefficients[a],t*=e;return n}},{key:"differentiate",value:function(){if(this.derivative)return this.derivative;var t=this.getDegree(),n=[];return this.coefficients.forEach((function(e,a){a!==t&&n.push(e*(t-a))})),this.derivative=new e(n)}},{key:"findRoot",value:function(e){var t=new r.RootFinderFactory(e),n=t.make(e.method).findRoot(this);return e.fallbackMethod&&!n.converged&&e.method!==e.fallbackMethod?t.make(e.fallbackMethod).findRoot(this):n}},{key:"getCoefficients",value:function(){return this.coefficients}},{key:"getTangentAt",value:function(e){var t=this.differentiate().calculate(e),n=this.calculate(e)-t*e;return new i.Line(t,n)}}]),e}();t.Polynomial=s},69029:function(e,t,n){"use strict";var a=n(56690).default,o=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.BisectionRootFinder=void 0;var r=n(84570),i=function(){function e(t){a(this,e),this.options=t}return o(e,[{key:"findUpperLimit",value:function(e){for(var t=this.options.maxIterations,n=0,a=1;n++0?a+=e:o-=e})),(a/o-1)/n+1}},{key:"findRoot",value:function(e){for(var t=this.options.epsilon,n=this.options.estimate,a=this.options.maxIterations,o=0,i="auto"===n?this.autoEstimate(e):n;o++=0}},37691:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(63333),t)},63333:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeros=void 0,t.zeros=function(e){return new Array(e).fill(0)}},60398:function(e,t,n){n(94421),e.exports=n(91339)},71677:function(e){var t=function e(){var t=Object.create({Source:Object,config:{},buildArgs:[]});function n(e){var n="config";if(e instanceof Function)n="Source";else if(e instanceof Array)n="buildArgs";else{if(!(e instanceof Object))throw new Error("Invalid configuration option.");n="config"}if(t.hasOwnProperty(n))throw new Error("Duplicated configuration option: "+n+".");t[n]=e}for(var a=0,o=arguments.length;a0&&!o.call(e,0))for(var m=0;m0)for(var h=0;h=0&&"[object Function]"===t.call(e.callee)),a}},85714:function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!==typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!==typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},32660:function(e,t,n){"use strict";var a=n(26798);t.certificate=n(15708);var o=a.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=o;var r=a.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=r;var i=a.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=i;var s=a.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),c=a.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=c;var u=a.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=u;var d=a.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=d,t.DSAparam=a.define("DSAparam",(function(){this.int()}));var l=a.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=l;var f=a.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=a.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},15708:function(e,t,n){"use strict";var a=n(26798),o=a.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),r=a.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),i=a.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=a.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(i),this.key("subjectPublicKey").bitstr())})),c=a.define("RelativeDistinguishedName",(function(){this.setof(r)})),u=a.define("RDNSequence",(function(){this.seqof(c)})),d=a.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),l=a.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(o),this.key("notAfter").use(o))})),f=a.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),p=a.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(i),this.key("issuer").use(d),this.key("validity").use(l),this.key("subject").use(d),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())})),b=a.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(i),this.key("signatureValue").bitstr())}));e.exports=b},81203:function(e,t,n){var a=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,i=n(37965),s=n(670),c=n(88284).Buffer;e.exports=function(e,t){var n,u=e.toString(),d=u.match(a);if(d){var l="aes"+d[1],f=c.from(d[2],"hex"),p=c.from(d[3].replace(/[\r\n]/g,""),"base64"),b=i(t,f.slice(0,8),parseInt(d[1],10)).key,m=[],h=s.createDecipheriv(l,b,f);m.push(h.update(p)),m.push(h.final()),n=c.concat(m)}else{var g=u.match(r);n=c.from(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(o)[1],data:n}}},25873:function(e,t,n){var a=n(32660),o=n(22562),r=n(81203),i=n(670),s=n(70721),c=n(88284).Buffer;function u(e){var t;"object"!==typeof e||c.isBuffer(e)||(t=e.passphrase,e=e.key),"string"===typeof e&&(e=c.from(e));var n,u,d=r(e,t),l=d.tag,f=d.data;switch(l){case"CERTIFICATE":u=a.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=a.PublicKey.decode(f,"der")),n=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=a.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":f=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,a=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),r=o[e.algorithm.decrypt.cipher.algo.join(".")],u=e.algorithm.decrypt.cipher.iv,d=e.subjectPrivateKey,l=parseInt(r.split("-")[1],10)/8,f=s.pbkdf2Sync(t,n,a,l,"sha1"),p=i.createDecipheriv(r,f,u),b=[];return b.push(p.update(d)),b.push(p.final()),c.concat(b)}(f=a.EncryptedPrivateKey.decode(f,"der"),t);case"PRIVATE KEY":switch(n=(u=a.PrivateKey.decode(f,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:a.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=a.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return a.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return a.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:a.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return{curve:(f=a.ECPrivateKey.decode(f,"der")).parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+l)}}e.exports=u,u.signature=a.signature},60089:function(e,t,n){"use strict";var a=n(456);function o(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var n,a="",o=0,r=-1,i=0,s=0;s<=e.length;++s){if(s2){var c=a.lastIndexOf("/");if(c!==a.length-1){-1===c?(a="",o=0):o=(a=a.slice(0,c)).length-1-a.lastIndexOf("/"),r=s,i=0;continue}}else if(2===a.length||1===a.length){a="",o=0,r=s,i=0;continue}t&&(a.length>0?a+="/..":a="..",o=2)}else a.length>0?a+="/"+e.slice(r+1,s):a=e.slice(r+1,s),o=s-r-1;r=s,i=0}else 46===n&&-1!==i?++i:i=-1}return a}var i={resolve:function(){for(var e,t="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=a.cwd()),s=e),o(s),0!==s.length&&(t=s+"/"+t,n=47===s.charCodeAt(0))}return t=r(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(o(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return o(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(o(e),o(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var n=1;nu){if(47===t.charCodeAt(s+l))return t.slice(s+l+1);if(0===l)return t.slice(s+l)}else r>u&&(47===e.charCodeAt(n+l)?d=l:0===l&&(d=0));break}var f=e.charCodeAt(n+l);if(f!==t.charCodeAt(s+l))break;47===f&&(d=l)}var p="";for(l=n+d+1;l<=a;++l)l!==a&&47!==e.charCodeAt(l)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+d):(s+=d,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(o(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,a=-1,r=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!r){a=i;break}}else r=!1;return-1===a?n?"/":".":n&&1===a?"//":e.slice(0,a)},basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');o(e);var n,a=0,r=-1,i=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,c=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!i){a=n+1;break}}else-1===c&&(i=!1,c=n+1),s>=0&&(u===t.charCodeAt(s)?-1===--s&&(r=n):(s=-1,r=c))}return a===r?r=c:-1===r&&(r=e.length),e.slice(a,r)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!i){a=n+1;break}}else-1===r&&(i=!1,r=n+1);return-1===r?"":e.slice(a,r)},extname:function(e){o(e);for(var t=-1,n=0,a=-1,r=!0,i=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(47!==c)-1===a&&(r=!1,a=s+1),46===c?-1===t?t=s:1!==i&&(i=1):-1!==t&&(i=-1);else if(!r){n=s+1;break}}return-1===t||-1===a||0===i||1===i&&t===a-1&&t===n+1?"":e.slice(t,a)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,a=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+a:n+e+a:a}("/",e)},parse:function(e){o(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,a=e.charCodeAt(0),r=47===a;r?(t.root="/",n=1):n=0;for(var i=-1,s=0,c=-1,u=!0,d=e.length-1,l=0;d>=n;--d)if(47!==(a=e.charCodeAt(d)))-1===c&&(u=!1,c=d+1),46===a?-1===i?i=d:1!==l&&(l=1):-1!==i&&(l=-1);else if(!u){s=d+1;break}return-1===i||-1===c||0===l||1===l&&i===c-1&&i===s+1?-1!==c&&(t.base=t.name=0===s&&r?e.slice(1,c):e.slice(s,c)):(0===s&&r?(t.name=e.slice(1,i),t.base=e.slice(1,c)):(t.name=e.slice(s,i),t.base=e.slice(s,c)),t.ext=e.slice(i,c)),s>0?t.dir=e.slice(0,s-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i},70721:function(e,t,n){t.pbkdf2=n(52791),t.pbkdf2Sync=n(32068)},52791:function(e,t,n){var a,o,r=n(88284).Buffer,i=n(86833),s=n(34554),c=n(32068),u=n(36707),d=n.g.crypto&&n.g.crypto.subtle,l={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},f=[];function p(){return o||(o=n.g.process&&n.g.process.nextTick?n.g.process.nextTick:n.g.queueMicrotask?n.g.queueMicrotask:n.g.setImmediate?n.g.setImmediate:n.g.setTimeout)}function b(e,t,n,a,o){return d.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return d.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:o}},e,a<<3)})).then((function(e){return r.from(e)}))}e.exports=function(e,t,o,m,h,g){"function"===typeof h&&(g=h,h=void 0);var y=l[(h=h||"sha1").toLowerCase()];if(y&&"function"===typeof n.g.Promise){if(i(o,m),e=u(e,s,"Password"),t=u(t,s,"Salt"),"function"!==typeof g)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){p()((function(){t(null,e)}))}),(function(e){p()((function(){t(e)}))}))}(function(e){if(n.g.process&&!n.g.process.browser)return Promise.resolve(!1);if(!d||!d.importKey||!d.deriveBits)return Promise.resolve(!1);if(void 0!==f[e])return f[e];var t=b(a=a||r.alloc(8),a,10,128,e).then((function(){return!0})).catch((function(){return!1}));return f[e]=t,t}(y).then((function(n){return n?b(e,t,o,m,y):c(e,t,o,m,h)})),g)}else p()((function(){var n;try{n=c(e,t,o,m,h)}catch(a){return g(a)}g(null,n)}))}},34554:function(e,t,n){var a,o=n(456);if(n.g.process&&n.g.process.browser)a="utf-8";else if(n.g.process&&n.g.process.version){a=parseInt(o.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else a="utf-8";e.exports=a},86833:function(e){var t=Math.pow(2,30)-1;e.exports=function(e,n){if("number"!==typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!==typeof n)throw new TypeError("Key length not a number");if(n<0||n>t||n!==n)throw new TypeError("Bad key length")}},32068:function(e,t,n){var a=n(70083),o=n(6701),r=n(41561),i=n(88284).Buffer,s=n(86833),c=n(34554),u=n(36707),d=i.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(e,t,n){var s=function(e){function t(t){return r(e).update(t).digest()}function n(e){return(new o).update(e).digest()}return"rmd160"===e||"ripemd160"===e?n:"md5"===e?a:t}(e),c="sha512"===e||"sha384"===e?128:64;t.length>c?t=s(t):t.length1)for(var n=1;nt.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var a=[],o=0;o=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(void 0===n){if(!this._cachedTimeouts)return!1;this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),n=this._timeouts.shift()}var a=this,o=setTimeout((function(){a._attempts++,a._operationTimeoutCb&&(a._timeout=setTimeout((function(){a._operationTimeoutCb(a._attempts)}),a._operationTimeout),a._options.unref&&a._timeout.unref()),a._fn(a._attempts)}),n);return this._options.unref&&o.unref(),!0},o.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){n._operationTimeoutCb()}),n._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},o.prototype.try=function(e){a.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},o.prototype.start=function(e){a.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},o.prototype.start=o.prototype.try,o.prototype.errors=function(){return this._errors},o.prototype.attempts=function(){return this._attempts},o.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,a=0;a=n&&(t=o,n=i)}return t}},36694:function(e,t,n){"use strict";var a=n(68638);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,r,i){if(i!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:o};return n.PropTypes=n,n}},43161:function(e,t,n){e.exports=n(36694)()},68638:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},80121:function(e,t,n){"use strict";e.exports=n(42975)},42975:function(e,t,n){"use strict";var a=t;function o(){a.util._configure(),a.Writer._configure(a.BufferWriter),a.Reader._configure(a.BufferReader)}a.build="minimal",a.Writer=n(89979),a.BufferWriter=n(63120),a.Reader=n(87441),a.BufferReader=n(2472),a.util=n(80986),a.rpc=n(44304),a.roots=n(54681),a.configure=o,o()},87441:function(e,t,n){"use strict";e.exports=c;var a,o=n(80986),r=o.LongBits,i=o.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},d=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new a(e):u(e)})(e)}:u};function l(){var e=new r(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw s(this,8);return new r(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=d(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},c.prototype.skip=function(e){if("number"===typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){a=e,c.create=d(),a._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return l.call(this)[t](!1)},uint64:function(){return l.call(this)[t](!0)},sint64:function(){return l.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},2472:function(e,t,n){"use strict";e.exports=r;var a=n(87441);(r.prototype=Object.create(a.prototype)).constructor=r;var o=n(80986);function r(e){a.call(this,e)}r._configure=function(){o.Buffer&&(r.prototype._slice=o.Buffer.prototype.slice)},r.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},r._configure()},54681:function(e){"use strict";e.exports={}},44304:function(e,t,n){"use strict";t.Service=n(36585)},36585:function(e,t,n){"use strict";e.exports=o;var a=n(80986);function o(e,t,n){if("function"!==typeof e)throw TypeError("rpcImpl must be a function");a.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(a.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,r,i){if(!r)throw TypeError("request must be specified");var s=this;if(!i)return a.asPromise(e,s,t,n,o,r);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](r).finish(),(function(e,n){if(e)return s.emit("error",e,t),i(e);if(null!==n){if(!(n instanceof o))try{n=o[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),i(e)}return s.emit("data",n,t),i(null,n)}s.end(!0)}))}catch(c){return s.emit("error",c,t),void setTimeout((function(){i(c)}),0)}else setTimeout((function(){i(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},54747:function(e,t,n){"use strict";e.exports=o;var a=n(80986);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var r=o.zero=new o(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var i=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return r;var t=e<0;t&&(e=-e);var n=e>>>0,a=(e-n)/4294967296>>>0;return t&&(a=~a>>>0,n=~n>>>0,++n>4294967295&&(n=0,++a>4294967295&&(a=0))),new o(n,a)},o.from=function(e){if("number"===typeof e)return o.fromNumber(e);if(a.isString(e)){if(!a.Long)return o.fromNumber(parseInt(e,10));e=a.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):r},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return a.Long?new a.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===i?r:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},80986:function(e,t,n){"use strict";var a=t;function o(e,t,n){for(var a=Object.keys(t),o=0;o0)},a.Buffer=function(){try{var e=a.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),a._Buffer_from=null,a._Buffer_allocUnsafe=null,a.newBuffer=function(e){return"number"===typeof e?a.Buffer?a._Buffer_allocUnsafe(e):new a.Array(e):a.Buffer?a._Buffer_from(e):"undefined"===typeof Uint8Array?e:new Uint8Array(e)},a.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,a.Long=a.global.dcodeIO&&a.global.dcodeIO.Long||a.global.Long||a.inquire("long"),a.key2Re=/^true|false|0|1$/,a.key32Re=/^-?(?:0|[1-9][0-9]*)$/,a.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,a.longToHash=function(e){return e?a.LongBits.from(e).toHash():a.LongBits.zeroHash},a.longFromHash=function(e,t){var n=a.LongBits.fromHash(e);return a.Long?a.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},a.merge=o,a.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},a.newError=r,a.ProtocolError=r("ProtocolError"),a.oneOfGetter=function(e){for(var t={},n=0;n-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},a.oneOfSetter=function(e){return function(t){for(var n=0;n>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function h(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=f(),l.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(l.alloc=o.pool(l.alloc,o.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},b.prototype=Object.create(c.prototype),b.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new b((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(m,10,r.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=r.from(e);return this._push(m,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=r.from(e).zzEncode();return this._push(m,t.length(),t)},l.prototype.bool=function(e){return this._push(p,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(h,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=r.from(e);return this._push(h,4,t.lo)._push(h,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var a=0;a>>0;if(!t)return this._push(p,1,0);if(o.isString(e)){var n=l.alloc(t=i.length(e));i.decode(e,n,0),e=n}return this.uint32(t)._push(g,t,e)},l.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(p,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){a=e,l.create=f(),a._configure()}},63120:function(e,t,n){"use strict";e.exports=r;var a=n(89979);(r.prototype=Object.create(a.prototype)).constructor=r;var o=n(80986);function r(){a.call(this)}function i(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}r._configure=function(){r.alloc=o._Buffer_allocUnsafe,r.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var a=0;a>>0;return this.uint32(t),t&&this._push(r.writeBytesBuffer,t,e),this},r.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(i,t,e),this},r._configure()},19787:function(e,t,n){t.publicEncrypt=n(63464),t.privateDecrypt=n(71127),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},98010:function(e,t,n){var a=n(40222),o=n(88284).Buffer;function r(e){var t=o.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var n,i=o.alloc(0),s=0;i.length=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(e,t,n){var a=s(e,n);return n-1>=t&&(a|=s(e,n-1)<<4),a}function u(e,t,n,a){for(var o=0,r=Math.min(e.length,n),i=t;i=49?s-49+10:s>=17?s-17+10:s}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"===typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=i<>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a=t;a-=2)o=c(e,t,a)<=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;else for(a=(e.length-t)%2===0?t+1:t;a=18?(r-=18,i+=1,this.words[i]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,o=1;o<=67108863;o*=t)a++;a--,o=o/t|0;for(var r=e.length-n,i=r%a,s=Math.min(r,r-i)+n,c=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var a=e.length+t.length|0;n.length=a,a=a-1|0;var o=0|e.words[0],r=0|t.words[0],i=o*r,s=67108863&i,c=i/67108864|0;n.words[0]=s;for(var u=1;u>>26,l=67108863&c,f=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=f;p++){var b=u-p|0;d+=(i=(o=0|e.words[b])*(r=0|t.words[p])+l)/67108864|0,l=67108863&i}n.words[u]=0|l,c=0|d}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,i=0;i>>24-o&16777215)||i!==this.length-1?d[6-c.length]+c+n:c+n,(o+=2)>=26&&(o-=26,i--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=l[e],p=f[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var m=b.modn(p).toString(e);n=(b=b.idivn(p)).isZero()?m+n:d[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return a("undefined"!==typeof i),this.toArrayLike(i,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);a(o<=r,"byte array longer than desired length"),a(r>0,"Requested array length <= 0"),this.strip();var i,s,c="le"===t,u=new e(r),d=this.clone();if(c){for(s=0;!d.isZero();s++)i=d.andln(255),d.iushrn(8),u[s]=i;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;ae.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){a("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){a("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,a=e):(n=e,a=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,a,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,a=e):(n=e,a=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,p=0|i[1],b=8191&p,m=p>>>13,h=0|i[2],g=8191&h,y=h>>>13,v=0|i[3],w=8191&v,k=v>>>13,A=0|i[4],x=8191&A,I=A>>>13,T=0|i[5],S=8191&T,C=T>>>13,E=0|i[6],R=8191&E,M=E>>>13,P=0|i[7],U=8191&P,_=P>>>13,B=0|i[8],D=8191&B,N=B>>>13,O=0|i[9],F=8191&O,L=O>>>13,j=0|s[0],H=8191&j,G=j>>>13,z=0|s[1],K=8191&z,W=z>>>13,Z=0|s[2],V=8191&Z,q=Z>>>13,Q=0|s[3],J=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,ae=te>>>13,oe=0|s[6],re=8191&oe,ie=oe>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,de=0|s[8],le=8191&de,fe=de>>>13,pe=0|s[9],be=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var he=(u+(a=Math.imul(l,H))|0)+((8191&(o=(o=Math.imul(l,G))+Math.imul(f,H)|0))<<13)|0;u=((r=Math.imul(f,G))+(o>>>13)|0)+(he>>>26)|0,he&=67108863,a=Math.imul(b,H),o=(o=Math.imul(b,G))+Math.imul(m,H)|0,r=Math.imul(m,G);var ge=(u+(a=a+Math.imul(l,K)|0)|0)+((8191&(o=(o=o+Math.imul(l,W)|0)+Math.imul(f,K)|0))<<13)|0;u=((r=r+Math.imul(f,W)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,a=Math.imul(g,H),o=(o=Math.imul(g,G))+Math.imul(y,H)|0,r=Math.imul(y,G),a=a+Math.imul(b,K)|0,o=(o=o+Math.imul(b,W)|0)+Math.imul(m,K)|0,r=r+Math.imul(m,W)|0;var ye=(u+(a=a+Math.imul(l,V)|0)|0)+((8191&(o=(o=o+Math.imul(l,q)|0)+Math.imul(f,V)|0))<<13)|0;u=((r=r+Math.imul(f,q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,a=Math.imul(w,H),o=(o=Math.imul(w,G))+Math.imul(k,H)|0,r=Math.imul(k,G),a=a+Math.imul(g,K)|0,o=(o=o+Math.imul(g,W)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,W)|0,a=a+Math.imul(b,V)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(m,V)|0,r=r+Math.imul(m,q)|0;var ve=(u+(a=a+Math.imul(l,J)|0)|0)+((8191&(o=(o=o+Math.imul(l,Y)|0)+Math.imul(f,J)|0))<<13)|0;u=((r=r+Math.imul(f,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,a=Math.imul(x,H),o=(o=Math.imul(x,G))+Math.imul(I,H)|0,r=Math.imul(I,G),a=a+Math.imul(w,K)|0,o=(o=o+Math.imul(w,W)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,W)|0,a=a+Math.imul(g,V)|0,o=(o=o+Math.imul(g,q)|0)+Math.imul(y,V)|0,r=r+Math.imul(y,q)|0,a=a+Math.imul(b,J)|0,o=(o=o+Math.imul(b,Y)|0)+Math.imul(m,J)|0,r=r+Math.imul(m,Y)|0;var we=(u+(a=a+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((r=r+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,a=Math.imul(S,H),o=(o=Math.imul(S,G))+Math.imul(C,H)|0,r=Math.imul(C,G),a=a+Math.imul(x,K)|0,o=(o=o+Math.imul(x,W)|0)+Math.imul(I,K)|0,r=r+Math.imul(I,W)|0,a=a+Math.imul(w,V)|0,o=(o=o+Math.imul(w,q)|0)+Math.imul(k,V)|0,r=r+Math.imul(k,q)|0,a=a+Math.imul(g,J)|0,o=(o=o+Math.imul(g,Y)|0)+Math.imul(y,J)|0,r=r+Math.imul(y,Y)|0,a=a+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(m,$)|0,r=r+Math.imul(m,ee)|0;var ke=(u+(a=a+Math.imul(l,ne)|0)|0)+((8191&(o=(o=o+Math.imul(l,ae)|0)+Math.imul(f,ne)|0))<<13)|0;u=((r=r+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,a=Math.imul(R,H),o=(o=Math.imul(R,G))+Math.imul(M,H)|0,r=Math.imul(M,G),a=a+Math.imul(S,K)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(C,K)|0,r=r+Math.imul(C,W)|0,a=a+Math.imul(x,V)|0,o=(o=o+Math.imul(x,q)|0)+Math.imul(I,V)|0,r=r+Math.imul(I,q)|0,a=a+Math.imul(w,J)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(k,J)|0,r=r+Math.imul(k,Y)|0,a=a+Math.imul(g,$)|0,o=(o=o+Math.imul(g,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,a=a+Math.imul(b,ne)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(m,ne)|0,r=r+Math.imul(m,ae)|0;var Ae=(u+(a=a+Math.imul(l,re)|0)|0)+((8191&(o=(o=o+Math.imul(l,ie)|0)+Math.imul(f,re)|0))<<13)|0;u=((r=r+Math.imul(f,ie)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,a=Math.imul(U,H),o=(o=Math.imul(U,G))+Math.imul(_,H)|0,r=Math.imul(_,G),a=a+Math.imul(R,K)|0,o=(o=o+Math.imul(R,W)|0)+Math.imul(M,K)|0,r=r+Math.imul(M,W)|0,a=a+Math.imul(S,V)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(C,V)|0,r=r+Math.imul(C,q)|0,a=a+Math.imul(x,J)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(I,J)|0,r=r+Math.imul(I,Y)|0,a=a+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,a=a+Math.imul(g,ne)|0,o=(o=o+Math.imul(g,ae)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ae)|0,a=a+Math.imul(b,re)|0,o=(o=o+Math.imul(b,ie)|0)+Math.imul(m,re)|0,r=r+Math.imul(m,ie)|0;var xe=(u+(a=a+Math.imul(l,ce)|0)|0)+((8191&(o=(o=o+Math.imul(l,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((r=r+Math.imul(f,ue)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,a=Math.imul(D,H),o=(o=Math.imul(D,G))+Math.imul(N,H)|0,r=Math.imul(N,G),a=a+Math.imul(U,K)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(_,K)|0,r=r+Math.imul(_,W)|0,a=a+Math.imul(R,V)|0,o=(o=o+Math.imul(R,q)|0)+Math.imul(M,V)|0,r=r+Math.imul(M,q)|0,a=a+Math.imul(S,J)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(C,J)|0,r=r+Math.imul(C,Y)|0,a=a+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(I,$)|0,r=r+Math.imul(I,ee)|0,a=a+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ae)|0,a=a+Math.imul(g,re)|0,o=(o=o+Math.imul(g,ie)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,ie)|0,a=a+Math.imul(b,ce)|0,o=(o=o+Math.imul(b,ue)|0)+Math.imul(m,ce)|0,r=r+Math.imul(m,ue)|0;var Ie=(u+(a=a+Math.imul(l,le)|0)|0)+((8191&(o=(o=o+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;u=((r=r+Math.imul(f,fe)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,a=Math.imul(F,H),o=(o=Math.imul(F,G))+Math.imul(L,H)|0,r=Math.imul(L,G),a=a+Math.imul(D,K)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,W)|0,a=a+Math.imul(U,V)|0,o=(o=o+Math.imul(U,q)|0)+Math.imul(_,V)|0,r=r+Math.imul(_,q)|0,a=a+Math.imul(R,J)|0,o=(o=o+Math.imul(R,Y)|0)+Math.imul(M,J)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(C,$)|0,r=r+Math.imul(C,ee)|0,a=a+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(I,ne)|0,r=r+Math.imul(I,ae)|0,a=a+Math.imul(w,re)|0,o=(o=o+Math.imul(w,ie)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,ie)|0,a=a+Math.imul(g,ce)|0,o=(o=o+Math.imul(g,ue)|0)+Math.imul(y,ce)|0,r=r+Math.imul(y,ue)|0,a=a+Math.imul(b,le)|0,o=(o=o+Math.imul(b,fe)|0)+Math.imul(m,le)|0,r=r+Math.imul(m,fe)|0;var Te=(u+(a=a+Math.imul(l,be)|0)|0)+((8191&(o=(o=o+Math.imul(l,me)|0)+Math.imul(f,be)|0))<<13)|0;u=((r=r+Math.imul(f,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,a=Math.imul(F,K),o=(o=Math.imul(F,W))+Math.imul(L,K)|0,r=Math.imul(L,W),a=a+Math.imul(D,V)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(N,V)|0,r=r+Math.imul(N,q)|0,a=a+Math.imul(U,J)|0,o=(o=o+Math.imul(U,Y)|0)+Math.imul(_,J)|0,r=r+Math.imul(_,Y)|0,a=a+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(M,$)|0,r=r+Math.imul(M,ee)|0,a=a+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(C,ne)|0,r=r+Math.imul(C,ae)|0,a=a+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ie)|0)+Math.imul(I,re)|0,r=r+Math.imul(I,ie)|0,a=a+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(k,ce)|0,r=r+Math.imul(k,ue)|0,a=a+Math.imul(g,le)|0,o=(o=o+Math.imul(g,fe)|0)+Math.imul(y,le)|0,r=r+Math.imul(y,fe)|0;var Se=(u+(a=a+Math.imul(b,be)|0)|0)+((8191&(o=(o=o+Math.imul(b,me)|0)+Math.imul(m,be)|0))<<13)|0;u=((r=r+Math.imul(m,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,a=Math.imul(F,V),o=(o=Math.imul(F,q))+Math.imul(L,V)|0,r=Math.imul(L,q),a=a+Math.imul(D,J)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(N,J)|0,r=r+Math.imul(N,Y)|0,a=a+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(_,$)|0,r=r+Math.imul(_,ee)|0,a=a+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(M,ne)|0,r=r+Math.imul(M,ae)|0,a=a+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ie)|0)+Math.imul(C,re)|0,r=r+Math.imul(C,ie)|0,a=a+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,ue)|0)+Math.imul(I,ce)|0,r=r+Math.imul(I,ue)|0,a=a+Math.imul(w,le)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(k,le)|0,r=r+Math.imul(k,fe)|0;var Ce=(u+(a=a+Math.imul(g,be)|0)|0)+((8191&(o=(o=o+Math.imul(g,me)|0)+Math.imul(y,be)|0))<<13)|0;u=((r=r+Math.imul(y,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,a=Math.imul(F,J),o=(o=Math.imul(F,Y))+Math.imul(L,J)|0,r=Math.imul(L,Y),a=a+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,a=a+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(_,ne)|0,r=r+Math.imul(_,ae)|0,a=a+Math.imul(R,re)|0,o=(o=o+Math.imul(R,ie)|0)+Math.imul(M,re)|0,r=r+Math.imul(M,ie)|0,a=a+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(C,ce)|0,r=r+Math.imul(C,ue)|0,a=a+Math.imul(x,le)|0,o=(o=o+Math.imul(x,fe)|0)+Math.imul(I,le)|0,r=r+Math.imul(I,fe)|0;var Ee=(u+(a=a+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(k,be)|0))<<13)|0;u=((r=r+Math.imul(k,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,a=Math.imul(F,$),o=(o=Math.imul(F,ee))+Math.imul(L,$)|0,r=Math.imul(L,ee),a=a+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ae)|0,a=a+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ie)|0)+Math.imul(_,re)|0,r=r+Math.imul(_,ie)|0,a=a+Math.imul(R,ce)|0,o=(o=o+Math.imul(R,ue)|0)+Math.imul(M,ce)|0,r=r+Math.imul(M,ue)|0,a=a+Math.imul(S,le)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(C,le)|0,r=r+Math.imul(C,fe)|0;var Re=(u+(a=a+Math.imul(x,be)|0)|0)+((8191&(o=(o=o+Math.imul(x,me)|0)+Math.imul(I,be)|0))<<13)|0;u=((r=r+Math.imul(I,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,a=Math.imul(F,ne),o=(o=Math.imul(F,ae))+Math.imul(L,ne)|0,r=Math.imul(L,ae),a=a+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,ie)|0,a=a+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,ue)|0)+Math.imul(_,ce)|0,r=r+Math.imul(_,ue)|0,a=a+Math.imul(R,le)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(M,le)|0,r=r+Math.imul(M,fe)|0;var Me=(u+(a=a+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,me)|0)+Math.imul(C,be)|0))<<13)|0;u=((r=r+Math.imul(C,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,a=Math.imul(F,re),o=(o=Math.imul(F,ie))+Math.imul(L,re)|0,r=Math.imul(L,ie),a=a+Math.imul(D,ce)|0,o=(o=o+Math.imul(D,ue)|0)+Math.imul(N,ce)|0,r=r+Math.imul(N,ue)|0,a=a+Math.imul(U,le)|0,o=(o=o+Math.imul(U,fe)|0)+Math.imul(_,le)|0,r=r+Math.imul(_,fe)|0;var Pe=(u+(a=a+Math.imul(R,be)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(M,be)|0))<<13)|0;u=((r=r+Math.imul(M,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,a=Math.imul(F,ce),o=(o=Math.imul(F,ue))+Math.imul(L,ce)|0,r=Math.imul(L,ue),a=a+Math.imul(D,le)|0,o=(o=o+Math.imul(D,fe)|0)+Math.imul(N,le)|0,r=r+Math.imul(N,fe)|0;var Ue=(u+(a=a+Math.imul(U,be)|0)|0)+((8191&(o=(o=o+Math.imul(U,me)|0)+Math.imul(_,be)|0))<<13)|0;u=((r=r+Math.imul(_,me)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,a=Math.imul(F,le),o=(o=Math.imul(F,fe))+Math.imul(L,le)|0,r=Math.imul(L,fe);var _e=(u+(a=a+Math.imul(D,be)|0)|0)+((8191&(o=(o=o+Math.imul(D,me)|0)+Math.imul(N,be)|0))<<13)|0;u=((r=r+Math.imul(N,me)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863;var Be=(u+(a=Math.imul(F,be))|0)+((8191&(o=(o=Math.imul(F,me))+Math.imul(L,be)|0))<<13)|0;return u=((r=Math.imul(L,me))+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=he,c[1]=ge,c[2]=ye,c[3]=ve,c[4]=we,c[5]=ke,c[6]=Ae,c[7]=xe,c[8]=Ie,c[9]=Te,c[10]=Se,c[11]=Ce,c[12]=Ee,c[13]=Re,c[14]=Me,c[15]=Pe,c[16]=Ue,c[17]=_e,c[18]=Be,0!==u&&(c[19]=u,n.length++),n};function m(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(b=p),r.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return n=10===this.length&&10===e.length?b(this,e,t):a<63?p(this,e,t):a<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var a=0,o=0,r=0;r>>26)|0)>>>26,i&=67108863}n.words[r]=s,a=i,i=o}return 0!==a?n.words[r]=a:n.length--,n.strip()}(this,e,t):m(this,e,t),n},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,a=0;a>=1;return a},h.prototype.permute=function(e,t,n,a,o,r){for(var i=0;i>>=1)o++;return 1<>>=13,n[2*i+1]=8191&r,r>>>=13;for(i=2*t;i>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,a=0;a=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var i=0;for(t=0;t>>26-n}i&&(this.words[t]=i,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,i=Math.min((e-r)/26,this.length),s=67108863^67108863>>>r<i)for(this.length-=i,u=0;u=0&&(0!==d||u>=o);u--){var l=0|this.words[u];this.words[u]=d<<26-r|l>>>r,d=l&s}return c&&0!==d&&(c.words[c.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return a(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){a("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(a("number"===typeof e),a(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===s)return this.strip();for(a(-1===s),s=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),o=e,i=0|o.words[o.length-1];0!==(n=26-this._countBits(i))&&(o=o.ushln(n),a.iushln(n),i=0|o.words[o.length-1]);var s,c=a.length-o.length;if("mod"!==t){(s=new r(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var f=67108864*(0|a.words[o.length+l])+(0|a.words[o.length+l-1]);for(f=Math.min(f/i|0,67108863),a._ishlnsubmul(o,f,l);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(o,1,l),a.isZero()||(a.negative^=1);s&&(s.words[l]=f)}return s&&s.strip(),a.strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:s||null,mod:a}},r.prototype.divmod=function(e,t,n){return a(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:o,mod:i}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(i=s.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:s.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,i,s},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,a=e.ushrn(1),o=e.andln(1),r=n.cmp(a);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){a(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){a(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),i=new r(0),s=new r(0),c=new r(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var d=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;0===(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(d),i.isub(l)),o.iushrn(1),i.iushrn(1);for(var b=0,m=1;0===(n.words[0]&m)&&b<26;++b,m<<=1);if(b>0)for(n.iushrn(b);b-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(d),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),i.isub(c)):(n.isub(t),s.isub(o),c.isub(i))}return{a:s,b:c,gcd:n.iushln(u)}},r.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,i=new r(1),s=new r(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,d=1;0===(t.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(c),i.iushrn(1);for(var l=0,f=1;0===(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s)):(n.isub(t),s.isub(i))}return(o=0===t.cmpn(1)?i:s).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(a)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){a("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,s&=67108863,this.words[i]=s}return 0!==r&&(this.words[i]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),a(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var a=0|this.words[n],o=0|e.words[n];if(a!==o){ao&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new x(e)},r.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var a=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(v,y),v.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),o=0;o>>22,r=i}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=a}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},x.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){a(0===(e.negative|t.negative),"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2===1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),i=0;!o.isZero()&&0===o.andln(1);)i++,o.iushrn(1);a(!o.isZero());var s=new r(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new r(2*d*d).toRed(this);0!==this.pow(d,u).cmp(c);)d.redIAdd(c);for(var l=this.pow(d,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),b=i;0!==p.cmp(s);){for(var m=p,h=0;0!==m.cmp(s);h++)m=m.redSqr();a(h=0;a--){for(var u=t.words[a],d=c-1;d>=0;d--){var l=u>>d&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==i?(i<<=1,i|=l,(4===++s||0===a&&0===d)&&(o=this.mul(o,n[i]),s=0,i=0)):s=0}c=26}return o},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new I(e)},o(I,x),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(a).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},71127:function(e,t,n){var a=n(25873),o=n(98010),r=n(62344),i=n(83123),s=n(50150),c=n(40222),u=n(26776),d=n(88284).Buffer;e.exports=function(e,t,n){var l;l=e.padding?e.padding:n?1:4;var f,p=a(e),b=p.modulus.byteLength();if(t.length>b||new i(t).cmp(p.modulus)>=0)throw new Error("decryption error");f=n?u(new i(t),p):s(t,p);var m=d.alloc(b-f.length);if(f=d.concat([m,f],b),4===l)return function(e,t){var n=e.modulus.byteLength(),a=c("sha1").update(d.alloc(0)).digest(),i=a.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,i+1),u=t.slice(i+1),l=r(s,o(u,i)),f=r(u,o(l,n-i-1));if(function(e,t){e=d.from(e),t=d.from(t);var n=0,a=e.length;e.length!==t.length&&(n++,a=Math.min(e.length,t.length));var o=-1;for(;++o=t.length){r++;break}var i=t.slice(2,o-1);("0002"!==a.toString("hex")&&!n||"0001"!==a.toString("hex")&&n)&&r++;i.length<8&&r++;if(r)throw new Error("decryption error");return t.slice(o)}(0,f,n);if(3===l)return f;throw new Error("unknown padding")}},63464:function(e,t,n){var a=n(25873),o=n(97924),r=n(40222),i=n(98010),s=n(62344),c=n(83123),u=n(26776),d=n(50150),l=n(88284).Buffer;e.exports=function(e,t,n){var f;f=e.padding?e.padding:n?1:4;var p,b=a(e);if(4===f)p=function(e,t){var n=e.modulus.byteLength(),a=t.length,u=r("sha1").update(l.alloc(0)).digest(),d=u.length,f=2*d;if(a>n-f-2)throw new Error("message too long");var p=l.alloc(n-a-f-2),b=n-d-1,m=o(d),h=s(l.concat([u,p,l.alloc(1,1),t],b),i(m,b)),g=s(m,i(h,d));return new c(l.concat([l.alloc(1),g,h],n))}(b,t);else if(1===f)p=function(e,t,n){var a,r=t.length,i=e.modulus.byteLength();if(r>i-11)throw new Error("message too long");a=n?l.alloc(i-r-3,255):function(e){var t,n=l.allocUnsafe(e),a=0,r=o(2*e),i=0;for(;a=0)throw new Error("data too long for modulus")}return n?d(p,b):u(p,b)}},26776:function(e,t,n){var a=n(83123),o=n(88284).Buffer;e.exports=function(e,t){return o.from(e.toRed(a.mont(t.modulus)).redPow(new a(t.publicExponent)).fromRed().toArray())}},62344:function(e){e.exports=function(e,t){for(var n=e.length,a=-1;++a0&&c>s&&(c=s);for(var u=0;u=0?(d=b.substr(0,m),l=b.substr(m+1)):(d=b,l=""),f=decodeURIComponent(d),p=decodeURIComponent(l),t(r,f)?Array.isArray(r[f])?r[f].push(p):r[f]=[r[f],p]:r[f]=p}return r}},92713:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,a,o){return n=n||"&",a=a||"=",null===e&&(e=void 0),"object"===typeof e?Object.keys(e).map((function(o){var r=encodeURIComponent(t(o))+a;return Array.isArray(e[o])?e[o].map((function(e){return r+encodeURIComponent(t(e))})).join(n):r+encodeURIComponent(t(e[o]))})).join(n):o?encodeURIComponent(t(o))+a+encodeURIComponent(t(e)):""}},28331:function(e,t,n){"use strict";t.decode=t.parse=n(73058),t.encode=t.stringify=n(92713)},97924:function(e,t,n){"use strict";var a=n(456),o=65536,r=4294967295;var i=n(88284).Buffer,s=n.g.crypto||n.g.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>r)throw new RangeError("requested too many random bytes");var n=i.allocUnsafe(e);if(e>0)if(e>o)for(var c=0;cd||e<0)throw new TypeError("offset must be a uint32");if(e>c||e>t)throw new RangeError("offset out of range")}function f(e,t,n){if("number"!==typeof e||e!==e)throw new TypeError("size must be a number");if(e>d||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>c)throw new RangeError("buffer too small")}function p(e,t,n,o){if(a.browser){var r=e.buffer,s=new Uint8Array(r,t,n);return u.getRandomValues(s),o?void a.nextTick((function(){o(null,e)})):e}if(!o)return i(n).copy(e,t),e;i(n,(function(n,a){if(n)return o(n);a.copy(e,t),o(null,e)}))}u&&u.getRandomValues||!a.browser?(t.randomFill=function(e,t,a,o){if(!s.isBuffer(e)&&!(e instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof t)o=t,t=0,a=e.length;else if("function"===typeof a)o=a,a=e.length-t;else if("function"!==typeof o)throw new TypeError('"cb" argument must be a function');return l(t,e.length),f(a,t,e.length),p(e,t,a,o)},t.randomFillSync=function(e,t,a){"undefined"===typeof t&&(t=0);if(!s.isBuffer(e)&&!(e instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(t,e.length),void 0===a&&(a=e.length-t);return f(a,t,e.length),p(e,t,a)}):(t.randomFill=o,t.randomFillSync=o)},48679:function(e,t,n){"use strict";n.r(t),n.d(t,{Calendar:function(){return In},CenturyView:function(){return Ze},DecadeView:function(){return rt},MonthView:function(){return qt},Navigation:function(){return ee},YearView:function(){return vt},default:function(){return Cn}});var a,o=n(67861),r=n(43161),i=n.n(r),s=n(85370),c=n(5410),u=n(31656);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:p.ISO_8601,n=e.getDay();switch(t){case p.ISO_8601:return(n+6)%7;case p.ARABIC:return(n+1)%7;case p.HEBREW:case p.US:return n;default:throw new Error("Unsupported calendar type.")}}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.ISO_8601,n=(0,u.getYear)(e),a=(0,u.getMonth)(e),o=e.getDate()-E(e,t);return new Date(n,a,o)}function M(e,t){switch(e){case"century":return(0,u.getCenturyStart)(t);case"decade":return(0,u.getDecadeStart)(t);case"year":return(0,u.getYearStart)(t);case"month":return(0,u.getMonthStart)(t);case"day":return(0,u.getDayStart)(t);default:throw new Error("Invalid rangeType: ".concat(e))}}function P(e,t){switch(e){case"century":return(0,u.getNextCenturyStart)(t);case"decade":return(0,u.getNextDecadeStart)(t);case"year":return(0,u.getNextYearStart)(t);case"month":return(0,u.getNextMonthStart)(t);default:throw new Error("Invalid rangeType: ".concat(e))}}var U=function(e,t){switch(e){case"decade":return(0,u.getPreviousDecadeStart)(t,-100);case"year":return(0,u.getPreviousYearStart)(t,-10);case"month":return(0,u.getPreviousMonthStart)(t,-12);default:throw new Error("Invalid rangeType: ".concat(e))}},_=function(e,t){switch(e){case"decade":return(0,u.getNextDecadeStart)(t,100);case"year":return(0,u.getNextYearStart)(t,10);case"month":return(0,u.getNextMonthStart)(t,12);default:throw new Error("Invalid rangeType: ".concat(e))}};function B(e,t){switch(e){case"century":return(0,u.getCenturyEnd)(t);case"decade":return(0,u.getDecadeEnd)(t);case"year":return(0,u.getYearEnd)(t);case"month":return(0,u.getMonthEnd)(t);case"day":return(0,u.getDayEnd)(t);default:throw new Error("Invalid rangeType: ".concat(e))}}var D=function(e,t){switch(e){case"decade":return(0,u.getPreviousDecadeEnd)(t,-100);case"year":return(0,u.getPreviousYearEnd)(t,-10);case"month":return(0,u.getPreviousMonthEnd)(t,-12);default:throw new Error("Invalid rangeType: ".concat(e))}};function N(e,t){switch(e){case"century":return(0,u.getCenturyRange)(t);case"decade":return(0,u.getDecadeRange)(t);case"year":return(0,u.getYearRange)(t);case"month":return(0,u.getMonthRange)(t);case"day":return(0,u.getDayRange)(t);default:throw new Error("Invalid rangeType: ".concat(e))}}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I;return(arguments.length>2?arguments[2]:void 0).map((function(n){return t(e,n)})).join(" \u2013 ")}function F(e,t,n){return O(e,t,(0,u.getDecadeRange)(n))}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.ISO_8601,n=e.getDay();switch(t){case p.ARABIC:case p.HEBREW:return n===S||n===C;case p.ISO_8601:case p.US:return n===C||n===T;default:throw new Error("Unsupported calendar type.")}}function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}var H=Object.values(p),G=["century","decade","year","month"],z=i().oneOf(H),K=i().oneOfType([i().string,i().arrayOf(i().string)]),W=function(e,t,n){var a=e[t];if(!a)return null;if(!(a instanceof Date))return new Error("Invalid prop `".concat(t,"` of type `").concat(j(a),"` supplied to `").concat(n,"`, expected instance of `Date`."));var o=e.maxDate;return o&&a>o?new Error("Invalid prop `".concat(t,"` of type `").concat(j(a),"` supplied to `").concat(n,"`, minDate cannot be larger than maxDate.")):null},Z=function(e,t,n){var a=e[t];if(!a)return null;if(!(a instanceof Date))return new Error("Invalid prop `".concat(t,"` of type `").concat(j(a),"` supplied to `").concat(n,"`, expected instance of `Date`."));var o=e.minDate;return o&&a0,W="century"!==z,Z=function(e,t){switch(e){case"century":return(0,u.getPreviousCenturyStart)(t);case"decade":return(0,u.getPreviousDecadeStart)(t);case"year":return(0,u.getPreviousYearStart)(t);case"month":return(0,u.getPreviousMonthStart)(t);default:throw new Error("Invalid rangeType: ".concat(e))}}(z,t),V=W&&U(z,t),q=P(z,t),Q=W&&_(z,t),J=function(){if(Z.getFullYear()<0)return!0;var e=function(e,t){switch(e){case"century":return(0,u.getPreviousCenturyEnd)(t);case"decade":return(0,u.getPreviousDecadeEnd)(t);case"year":return(0,u.getPreviousYearEnd)(t);case"month":return(0,u.getPreviousMonthEnd)(t);default:throw new Error("Invalid rangeType: ".concat(e))}}(z,t);return f&&f>=e}(),Y=W&&function(){if(V.getFullYear()<0)return!0;var e=D(z,t);return f&&f>=e}(),X=l&&l=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function se(e){return"".concat(e,"%")}function ce(e){var t=e.children,n=e.className,a=e.direction,r=e.count,i=e.offset,s=e.style,c=e.wrap,u=ie(e,te);return o.createElement("div",ne({className:n,style:oe({display:"flex",flexDirection:a,flexWrap:c?"wrap":"no-wrap"},s)},u),o.Children.map(t,(function(e,t){return o.cloneElement(e,oe(oe({},e.props),{},{style:{flexBasis:se(100/r),flexShrink:0,flexGrow:0,overflow:"hidden",marginLeft:i&&0===t?se(100*i/r):null}}))})))}function ue(e){return function(e){if(Array.isArray(e))return de(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return de(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return de(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function de(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n=e}function fe(e,t){return le(e[0],t)||le(e[1],t)}function pe(e,t,n){var a=[];if(fe(t,e)){a.push(n);var o=le(e[0],t),r=le(e[1],t);o&&a.push("".concat(n,"Start")),r&&a.push("".concat(n,"End")),o&&r&&a.push("".concat(n,"BothEnds"))}return a}function be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.value,n=e.valueType,a=e.date,o=e.dateType,r=e.hover,i="react-calendar__tile",s=[i];if(!a)return s;if(!Array.isArray(a)&&!o)throw new Error("getTileClasses(): Unable to get tile activity classes because one or more required arguments were not passed.");var c=new Date,u=Array.isArray(a)?a:N(o,a);if(le(c,u)&&s.push("".concat(i,"--now")),!t)return s;if(!Array.isArray(t)&&!n)throw new Error("getTileClasses(): Unable to get tile activity classes because one or more required arguments were not passed.");var d,l,f=Array.isArray(t)?t:N(n,t);l=u,(d=f)[0]<=l[0]&&d[1]>=l[1]?s.push("".concat(i,"--active")):fe(f,u)&&s.push("".concat(i,"--hasActive"));var p=pe(f,u,"".concat(i,"--range"));s.push.apply(s,ue(p));var b=[].concat(t);if(r&&1===b.length){var m=pe(r>f[0]?[f[0],r]:[r,f[0]],u,"".concat(i,"--hover"));s.push.apply(s,ue(m))}return s}ce.propTypes={children:i().node,className:i().string,count:i().number.isRequired,direction:i().string,offset:i().number,style:i().objectOf(i().oneOfType([i().string,i().number])),wrap:i().bool};var me=["className","count","dateTransform","dateType","end","hover","offset","start","step","tile","value","valueType"];function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ge(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ke(e){for(var t=e.className,n=e.count,a=void 0===n?3:n,r=e.dateTransform,i=e.dateType,s=e.end,c=e.hover,u=e.offset,d=e.start,l=e.step,f=void 0===l?1:l,p=e.tile,b=e.value,m=e.valueType,h=we(e,me),g=[],y=d;y<=s;y+=f){var v=r(y);g.push(o.createElement(p,ve({key:v.getTime(),classes:be({value:b,valueType:m,date:v,dateType:i,hover:c}),date:v,point:y},h)))}return o.createElement(ce,{className:t,count:a,offset:u,wrap:!0},g)}function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Ie(e){for(var t=1;tr||u&&d(u)=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var je="react-calendar__century-view__decades__decade";function He(e){var t=e.classes,n=e.formatYear,a=void 0===n?I:n,r=Le(e,Be),i=r.date,s=r.locale;return o.createElement(_e,Fe({},r,{classes:[].concat(t,je),maxDateTransform:u.getDecadeEnd,minDateTransform:u.getDecadeStart,view:"century"}),F(s,a,i))}function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var $e="react-calendar__decade-view__years__year";function et(e){var t=e.classes,n=e.formatYear,a=void 0===n?I:n,r=Xe(e,Ve),i=r.date,s=r.locale;return o.createElement(_e,Ye({},r,{classes:[].concat(t,$e),maxDateTransform:u.getYearEnd,minDateTransform:u.getYearStart,view:"decade"}),a(s,i))}function tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function at(){return at=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ft="react-calendar__year-view__months__month";function pt(e){var t=e.classes,n=e.formatMonth,a=void 0===n?w:n,r=e.formatMonthYear,i=void 0===r?k:r,s=lt(e,it),c=s.date,d=s.locale;return o.createElement(_e,dt({},s,{classes:[].concat(t,ft),formatAbbr:i,maxDateTransform:u.getMonthEnd,minDateTransform:u.getMonthStart,view:"year"}),a(d,c))}function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function mt(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var St="react-calendar__month-view__days__day";function Ct(e){var t=e.formatDay,n=void 0===t?y:t,a=e.formatLongDate,r=void 0===a?v:a,i=e.calendarType,s=e.classes,c=e.currentMonthIndex,d=Tt(e,wt),l=d.date,f=d.locale;return o.createElement(_e,It({},d,{classes:[].concat(s,St,L(l,i)?"".concat(St,"--weekend"):null,l.getMonth()!==c?"".concat(St,"--neighboringMonth"):null),formatAbbr:r,maxDateTransform:u.getDayEnd,minDateTransform:u.getDayStart,view:"month"}),n(f,l))}Ct.propTypes=At(At({},X),{},{currentMonthIndex:i().number.isRequired,formatDay:i().func,formatLongDate:i().func});var Et=["showFixedNumberOfWeeks","showNeighboringMonth"];function Rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pt(){return Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _t(e){var t=e.activeStartDate,n=e.calendarType,a=e.showFixedNumberOfWeeks,r=e.showNeighboringMonth,i=Ut(e,Et),s=(0,u.getYear)(t),c=(0,u.getMonth)(t),d=a||r,l=E(t,n),f=d?0:l,p=1+(d?-l:0),b=function(){if(a)return p+42-1;var e=(0,u.getDaysInMonth)(t);if(r){var o=new Date;return o.setFullYear(s,c,e),o.setHours(0,0,0,0),e+(7-E(o,n)-1)}return e}();return o.createElement(ke,Pt({},i,{className:"react-calendar__month-view__days",count:7,currentMonthIndex:c,dateTransform:function(e){var t=new Date;return t.setFullYear(s,c,e),t.setHours(0,0,0,0),t},dateType:"day",end:b,offset:f,start:p,tile:Ct}))}_t.propTypes=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Gt="react-calendar__tile";function zt(e){var t=e.date,n=e.onClickWeekNumber,a=e.weekNumber,r=Ht(e,Ot),i=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:p.ISO_8601,a=n===p.US?p.US:p.ISO_8601,o=R(e,n),r=(0,u.getYear)(e)+1;do{t=R(new Date(r,0,a===p.ISO_8601?4:1),n),r-=1}while(e=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function qt(e){var t=e.activeStartDate,n=e.locale,a=e.onMouseLeave,r=e.showFixedNumberOfWeeks,i=e.calendarType,c=void 0===i?function(e){return Object.keys(b).find((function(t){return b[t].includes(e)}))||p.ISO_8601}(n):i,u=e.formatShortWeekday,d=e.formatWeekday,l=e.onClickWeekNumber,f=e.showWeekNumbers,m=Vt(e,Wt);var h="react-calendar__month-view";return o.createElement("div",{className:(0,s.default)(h,f?"".concat(h,"--weekNumbers"):"")},o.createElement("div",{style:{display:"flex",alignItems:"flex-end"}},f?o.createElement(Kt,{activeStartDate:t,calendarType:c,onClickWeekNumber:l,onMouseLeave:a,showFixedNumberOfWeeks:r}):null,o.createElement("div",{style:{flexGrow:1,width:"100%"}},o.createElement(Nt,{calendarType:c,formatShortWeekday:u,formatWeekday:d,locale:n,onMouseLeave:a}),o.createElement(_t,Zt({calendarType:c},m)))))}qt.propTypes={activeStartDate:i().instanceOf(Date).isRequired,calendarType:z,formatShortWeekday:i().func,formatWeekday:i().func,locale:i().string,onClickWeekNumber:i().func,onMouseLeave:i().func,showFixedNumberOfWeeks:i().bool,showWeekNumbers:i().bool};var Qt=["activeStartDate","defaultActiveStartDate","defaultValue","defaultView","maxDetail","minDetail","value","view"];function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);ne?t:n&&n0}},{key:"getProcessedValue",value:function(e){var t=this.props,n=t.minDate,a=t.maxDate,o=t.maxDetail,r=t.returnValue;return function(){switch(r){case"start":return vn;case"end":return wn;case"range":return kn;default:throw new Error("Invalid returnValue.")}}()({value:e,minDate:n,maxDate:a,maxDetail:o})}},{key:"renderContent",value:function(e){var t=this.activeStartDate,n=this.onMouseOver,a=this.valueType,r=this.value,i=this.view,s=this.props,c=s.calendarType,u=s.locale,d=s.maxDate,l=s.minDate,f=s.selectRange,p=s.tileClassName,b=s.tileContent,m=s.tileDisabled,h=this.hover,g={activeStartDate:e?P(i,t):M(i,t),hover:h,locale:u,maxDate:d,minDate:l,onClick:this.drillDownAvailable?this.drillDown:this.onChange,onMouseOver:f?n:null,tileClassName:p,tileContent:b,tileDisabled:m,value:r,valueType:a};switch(i){case"century":var y=this.props.formatYear;return o.createElement(Ze,Jt({formatYear:y},g));case"decade":var v=this.props.formatYear;return o.createElement(rt,Jt({formatYear:v},g));case"year":var w=this.props,k=w.formatMonth,A=w.formatMonthYear;return o.createElement(vt,Jt({formatMonth:k,formatMonthYear:A},g));case"month":var x=this.props,I=x.formatDay,T=x.formatLongDate,S=x.formatShortWeekday,C=x.formatWeekday,E=x.onClickWeekNumber,R=x.showDoubleView,U=x.showFixedNumberOfWeeks,_=x.showNeighboringMonth,B=x.showWeekNumbers,D=this.onMouseLeave;return o.createElement(qt,Jt({calendarType:c,formatDay:I,formatLongDate:T,formatShortWeekday:S,formatWeekday:C,onClickWeekNumber:E,onMouseLeave:f?D:null,showFixedNumberOfWeeks:"undefined"!==typeof U?U:R,showNeighboringMonth:_,showWeekNumbers:B},g));default:throw new Error("Invalid view: ".concat(i,"."))}}},{key:"renderNavigation",value:function(){if(!this.props.showNavigation)return null;var e=this.activeStartDate,t=this.view,n=this.views,a=this.props,r=a.formatMonthYear,i=a.formatYear,s=a.locale,c=a.maxDate,u=a.minDate,d=a.navigationAriaLabel,l=a.navigationAriaLive,f=a.navigationLabel,p=a.next2AriaLabel,b=a.next2Label,m=a.nextAriaLabel,h=a.nextLabel,g=a.prev2AriaLabel,y=a.prev2Label,v=a.prevAriaLabel,w=a.prevLabel,k=a.showDoubleView;return o.createElement(ee,{activeStartDate:e,drillUp:this.drillUp,formatMonthYear:r,formatYear:i,locale:s,maxDate:c,minDate:u,navigationAriaLabel:d,navigationAriaLive:l,navigationLabel:f,next2AriaLabel:p,next2Label:b,nextAriaLabel:m,nextLabel:h,prev2AriaLabel:g,prev2Label:y,prevAriaLabel:v,prevLabel:w,setActiveStartDate:this.setActiveStartDate,showDoubleView:k,view:t,views:n})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.inputRef,a=e.selectRange,r=e.showDoubleView,i=this.onMouseLeave,c=this.value,u=[].concat(c);return o.createElement("div",{className:(0,s.default)(ln,a&&1===u.length&&"".concat(ln,"--selectRange"),r&&"".concat(ln,"--doubleView"),t),ref:n},this.renderNavigation(),o.createElement("div",{className:"".concat(ln,"__viewContainer"),onBlur:a?i:null,onMouseLeave:a?i:null},this.renderContent(),r&&this.renderContent(!0)))}}],n&&Xt(t.prototype,n),a&&Xt(t,a),Object.defineProperty(t,"prototype",{writable:!1}),i}(o.Component);In.defaultProps={goToRangeStartOnSelect:!0,maxDate:dn,maxDetail:"month",minDate:un,minDetail:"century",returnValue:"start",showNavigation:!0,showNeighboringMonth:!0};var Tn=i().instanceOf(Date),Sn=i().oneOfType([i().string,q]);In.propTypes={activeStartDate:Tn,allowPartialRange:i().bool,calendarType:z,className:K,defaultActiveStartDate:Tn,defaultValue:Sn,defaultView:J,formatDay:i().func,formatLongDate:i().func,formatMonth:i().func,formatMonthYear:i().func,formatShortWeekday:i().func,formatWeekday:i().func,formatYear:i().func,goToRangeStartOnSelect:i().bool,inputRef:V,locale:i().string,maxDate:Z,maxDetail:i().oneOf(fn),minDate:W,minDetail:i().oneOf(fn),navigationAriaLabel:i().string,navigationAriaLive:i().oneOf(["off","polite","assertive"]),navigationLabel:i().func,next2AriaLabel:i().string,next2Label:i().node,nextAriaLabel:i().string,nextLabel:i().node,onActiveStartDateChange:i().func,onChange:i().func,onClickDay:i().func,onClickDecade:i().func,onClickMonth:i().func,onClickWeekNumber:i().func,onClickYear:i().func,onDrillDown:i().func,onDrillUp:i().func,onViewChange:i().func,prev2AriaLabel:i().string,prev2Label:i().node,prevAriaLabel:i().string,prevLabel:i().node,returnValue:i().oneOf(["start","end","range"]),selectRange:i().bool,showDoubleView:i().bool,showFixedNumberOfWeeks:i().bool,showNavigation:i().bool,showNeighboringMonth:i().bool,showWeekNumbers:i().bool,tileClassName:i().oneOfType([i().func,K]),tileContent:i().oneOfType([i().func,i().node]),tileDisabled:i().func,value:Sn,view:J};var Cn=In},81911:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E}});var a=n(67861),o=n(43161),r=n.n(o),i=n(85370),s=n(31656);function c(e,t){return function(n,a,o){var r=n[a];if("undefined"!==typeof r){if("number"!==typeof r)return new Error("Invalid prop `".concat(a,"` of type `").concat(typeof r,"` supplied to `").concat(o,"`, expected `number`."));if(rt)return new Error("Invalid prop `".concat(a,"` of type `").concat(typeof r,"` supplied to `").concat(o,"`, length must be between ").concat(e," and ").concat(t,"."))}return null}}var u=c(0,100),d=c(-100,100);function l(e,t,n){var a=e[t];if("undefined"!==typeof a){if("number"!==typeof a)return new Error("Invalid prop `".concat(t,"` of type `").concat(typeof a,"` supplied to `").concat(n,"`, expected `number`."));if(a<0)return new Error("Invalid prop `".concat(t,"` of type `").concat(typeof a,"` supplied to `").concat(n,"`, width must be greater or equal to 0."))}return null}var f=u,p=l;function b(e){var t=e.angle,n=void 0===t?0:t,o=e.name,r=e.length,i=void 0===r?100:r,s=e.oppositeLength,c=void 0===s?10:s,u=e.width,d=void 0===u?1:u;return a.createElement("div",{className:"react-clock__hand react-clock__".concat(o,"-hand"),style:{transform:"rotate(".concat(n,"deg)")}},a.createElement("div",{className:"react-clock__hand__body react-clock__".concat(o,"-hand__body"),style:{width:"".concat(d,"px"),top:"".concat(50-i/2,"%"),bottom:"".concat(50-c/2,"%")}}))}function m(e){var t=e.angle,n=void 0===t?0:t,o=e.length,r=void 0===o?10:o,i=e.name,s=e.width,c=void 0===s?1:s,u=e.number;return a.createElement("div",{className:"react-clock__mark react-clock__".concat(i,"-mark"),style:{transform:"rotate(".concat(n,"deg)")}},a.createElement("div",{className:"react-clock__mark__body react-clock__".concat(i,"-mark__body"),style:{width:"".concat(c,"px"),top:0,bottom:"".concat(100-r/2,"%")}}),u&&a.createElement("div",{className:"react-clock__mark__number",style:{transform:"rotate(-".concat(n,"deg)"),top:"".concat(r/2,"%")}},u))}b.propTypes={angle:r().number,length:u,name:r().string.isRequired,oppositeLength:u,width:l},m.propTypes={angle:r().number,length:f,name:r().string.isRequired,number:r().node,width:p};var h=function(){return h=Object.assign||function(e){for(var t,n=1,a=arguments.length;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function p(e){var t=e.maxDate,n=e.minDate,o=e.month,s=e.year,d=f(e,u),p=o?(0,r.getDaysInMonth)(new Date(s,o-1,1)):31;function b(e){return e&&s===(0,r.getYear)(e).toString()&&o===(0,r.getMonthHuman)(e).toString()}var m=(0,c.safeMin)(p,b(t)&&(0,r.getDate)(t)),h=(0,c.safeMax)(1,b(n)&&(0,r.getDate)(n));return a.default.createElement(i.default,l({max:m,min:h,name:"day"},d))}p.propTypes={ariaLabel:o.default.string,className:o.default.string.isRequired,disabled:o.default.bool,inputRef:s.isRef,maxDate:s.isMaxDate,minDate:s.isMinDate,month:o.default.string,onChange:o.default.func,onKeyDown:o.default.func,onKeyUp:o.default.func,placeholder:o.default.string,required:o.default.bool,showLeadingZeros:o.default.bool,value:o.default.string,year:o.default.string}},3890:function(e,t,n){"use strict";function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var o=l(n(67861)),r=u(n(43161)),i=u(n(85370)),s=l(n(66965)),c=n(86065);function u(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function l(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}var f="undefined"!==typeof document,p=f?o.useLayoutEffect:o.useEffect,b=f&&/(MSIE|Trident\/|Edge\/)/.test(navigator.userAgent),m=f&&/Firefox/.test(navigator.userAgent);function h(e){var t=e.target;b?requestAnimationFrame((function(){return t.select()})):t.select()}function g(e){return function(t){if(!m){var n=t.key,a=t.target,o=a.value,r=1===n.length&&/\d/.test(n),i=function(e){return e&&"selectionStart"in e&&null!==e.selectionStart?e.value.slice(e.selectionStart,e.selectionEnd):"getSelection"in window?window.getSelection().toString():null}(a);r&&(i||o.length=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function p(e){var t=e.maxDate,n=e.minDate,o=e.year,s=f(e,u);function d(e){return e&&o===(0,r.getYear)(e).toString()}var p=(0,c.safeMin)(12,d(t)&&(0,r.getMonthHuman)(t)),b=(0,c.safeMax)(1,d(n)&&(0,r.getMonthHuman)(n));return a.default.createElement(i.default,l({max:p,min:b,name:"month"},s))}p.propTypes={ariaLabel:o.default.string,className:o.default.string.isRequired,disabled:o.default.bool,inputRef:s.isRef,maxDate:s.isMaxDate,minDate:s.isMinDate,onChange:o.default.func,onKeyDown:o.default.func,onKeyUp:o.default.func,placeholder:o.default.string,required:o.default.bool,showLeadingZeros:o.default.bool,value:o.default.string,year:o.default.string}},30413:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var a=l(n(67861)),o=l(n(43161)),r=l(n(85370)),i=n(31656),s=n(59981),c=n(86065),u=n(78749),d=["ariaLabel","className","inputRef","locale","maxDate","minDate","placeholder","short","value","year"];function l(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,a=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function h(e){var t=e.ariaLabel,n=e.className,o=e.inputRef,c=e.locale,l=e.maxDate,b=e.minDate,h=e.placeholder,g=void 0===h?"--":h,y=e.short,v=e.value,w=e.year,k=m(e,d);function A(e){return e&&w===(0,i.getYear)(e).toString()}var x=(0,u.safeMin)(12,A(l)&&(0,i.getMonthHuman)(l)),I=(0,u.safeMax)(1,A(b)&&(0,i.getMonthHuman)(b)),T=p(Array(12)).map((function(e,t){return new Date(2019,t,1)})),S="month",C=y?s.formatShortMonth:s.formatMonth;return a.default.createElement("select",f({"aria-label":t,className:(0,r.default)("".concat(n,"__input"),"".concat(n,"__").concat(S)),"data-input":"true","data-select":"true",name:S,ref:o,value:null!==v?v:""},k),!v&&a.default.createElement("option",{value:""},g),T.map((function(e){var t=(0,i.getMonthHuman)(e),n=tx;return a.default.createElement("option",{key:t,disabled:n,value:t},C(c,e))})))}h.propTypes={ariaLabel:o.default.string,className:o.default.string.isRequired,disabled:o.default.bool,inputRef:c.isRef,locale:o.default.string,maxDate:c.isMaxDate,minDate:c.isMinDate,onChange:o.default.func,onKeyDown:o.default.func,onKeyUp:o.default.func,placeholder:o.default.string,required:o.default.bool,short:o.default.bool,value:o.default.string,year:o.default.string}},90650:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var a=d(n(67861)),o=d(n(43161)),r=n(31656),i=d(n(3890)),s=n(86065),c=n(78749),u=["maxDate","minDate","placeholder","valueType"];function d(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function p(e){var t=e.maxDate,n=e.minDate,o=e.placeholder,s=void 0===o?"----":o,d=e.valueType,p=f(e,u),b=(0,c.safeMin)(275760,t&&(0,r.getYear)(t)),m=(0,c.safeMax)(1,n&&(0,r.getYear)(n)),h="century"===d?10:1;return a.default.createElement(i.default,l({max:b,min:m,name:"year",placeholder:s,step:h},p))}p.propTypes={ariaLabel:o.default.string,className:o.default.string.isRequired,disabled:o.default.bool,inputRef:s.isRef,maxDate:s.isMaxDate,minDate:s.isMinDate,onChange:o.default.func,onKeyDown:o.default.func,onKeyUp:o.default.func,placeholder:o.default.string,required:o.default.bool,value:o.default.string,valueType:s.isValueType}},59981:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatShortMonth=t.formatMonth=void 0,t.getFormatter=i;var a,o=(a=n(5410))&&a.__esModule?a:{default:a};var r=new Map;function i(e){return function(t,n){var a=t||(0,o.default)();r.has(a)||r.set(a,new Map);var i=r.get(a);return i.has(e)||i.set(e,new Intl.DateTimeFormat(a,e).format),i.get(e)(n)}}function s(e){return function(t,n){return i(e)(t,function(e){var t=new Date(e);return new Date(t.setHours(12))}(n))}}var c=s({month:"long"});t.formatMonth=c;var u=s({month:"short"});t.formatShortMonth=u},86065:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValueType=t.isRef=t.isMinDate=t.isMaxDate=void 0;var a,o=(a=n(43161))&&a.__esModule?a:{default:a};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);no?new Error("Invalid prop `".concat(t,"` of type `").concat(r(a),"` supplied to `").concat(n,"`, minDate cannot be larger than maxDate.")):null};t.isMaxDate=function(e,t,n){var a=e[t];if(!a)return null;if(!(a instanceof Date))return new Error("Invalid prop `".concat(t,"` of type `").concat(r(a),"` supplied to `").concat(n,"`, expected instance of `Date`."));var o=e.minDate;return o&&ae.length)&&(t=e.length);for(var n=0,a=new Array(t);ne)return t;if(n&&ne.length)&&(t=e.length);for(var n=0,a=new Array(t);no||a.length>=o.length){V(Z(n,"nextElementSibling"))}}})),P(R(e),"onChange",(function(t){var n=t.target,a=n.name,o=n.value;switch(a){case"hour12":e.setState((function(e){return{hour:o?(0,v.convert12to24)(parseInt(o,10),e.amPm).toString():""}}),e.onChangeExternal);break;case"hour24":e.setState({hour:o},e.onChangeExternal);break;default:e.setState(P({},a,o),e.onChangeExternal)}})),P(R(e),"onChangeNative",(function(t){var n=e.props.onChange,a=t.target.value;n&&n(function(){if(!a)return null;var e=T(a.split("T"),2),t=e[0],n=e[1],o=T(t.split("-"),3),r=o[0],i=o[1],s=o[2],c=parseInt(r,10),u=parseInt(i,10)-1||0,d=parseInt(s,10)||1,l=T(n.split(":"),3),f=l[0],p=l[1],b=l[2],m=parseInt(f,10)||0,h=parseInt(p,10)||0,g=parseInt(b,10)||0,y=new Date;return y.setFullYear(c,u,d),y.setHours(m,h,g,0),y}(),!1)})),P(R(e),"onChangeAmPm",(function(t){var n=t.target.value;e.setState({amPm:n},e.onChangeExternal)})),P(R(e),"onChangeExternal",(function(){var t=e.props.onChange;if(t){var n=[e.amPmInput.current,e.dayInput.current,e.monthInput.current,e.yearInput.current,e.hour12Input.current,e.hour24Input.current,e.minuteInput.current,e.secondInput.current].filter(Boolean),a=n.slice(1),o={};if(n.forEach((function(e){o[e.name]=e.value})),a.every((function(e){return!e.value})))t(null,!1);else if(n.every((function(e){return e.value&&e.validity.valid}))){var r=parseInt(o.year,10)||(new Date).getFullYear(),i=parseInt(o.month||1,10)-1,s=parseInt(o.day||1,10),c=parseInt(o.hour24||(0,v.convert12to24)(o.hour12,o.amPm)||0,10),u=parseInt(o.minute||0,10),d=parseInt(o.second||0,10),l=new Date;l.setFullYear(r,i,s),l.setHours(c,u,d,0),t(l,!1)}}})),P(R(e),"renderDay",(function(t,n){var a=e.props,r=a.autoFocus,i=a.dayAriaLabel,c=a.dayPlaceholder,u=a.showLeadingZeros,d=e.state,l=d.day,f=d.month,p=d.year;if(t&&t.length>2)throw new Error("Unsupported token: ".concat(t));var b=t&&2===t.length;return o.default.createElement(s.default,I({key:"day"},e.commonInputProps,{ariaLabel:i,autoFocus:0===n&&r,inputRef:e.dayInput,month:f,placeholder:c,showLeadingZeros:b||u,value:l,year:p}))})),P(R(e),"renderMonth",(function(t,n){var a=e.props,r=a.autoFocus,i=a.locale,s=a.monthAriaLabel,d=a.monthPlaceholder,l=a.showLeadingZeros,f=e.state,p=f.month,b=f.year;if(t&&t.length>4)throw new Error("Unsupported token: ".concat(t));if(t.length>2)return o.default.createElement(u.default,I({key:"month"},e.commonInputProps,{ariaLabel:s,autoFocus:0===n&&r,inputRef:e.monthInput,locale:i,placeholder:d,short:3===t.length,value:p,year:b}));var m=t&&2===t.length;return o.default.createElement(c.default,I({key:"month"},e.commonInputProps,{ariaLabel:s,autoFocus:0===n&&r,inputRef:e.monthInput,placeholder:d,showLeadingZeros:m||l,value:p,year:b}))})),P(R(e),"renderYear",(function(t,n){var a=e.props,r=a.autoFocus,i=a.yearAriaLabel,s=a.yearPlaceholder,c=e.state.year;return o.default.createElement(d.default,I({key:"year"},e.commonInputProps,{ariaLabel:i,autoFocus:0===n&&r,inputRef:e.yearInput,placeholder:s,value:c,valueType:"day"}))})),P(R(e),"renderHour",(function(t,n){return/h/.test(t)?e.renderHour12(t,n):e.renderHour24(t,n)})),P(R(e),"renderHour12",(function(t,n){var a=e.props,r=a.autoFocus,i=a.hourAriaLabel,s=a.hourPlaceholder,c=e.state,u=c.amPm,d=c.hour;if(t&&t.length>2)throw new Error("Unsupported token: ".concat(t));var f=t&&2===t.length;return o.default.createElement(l.default,I({key:"hour12"},e.commonInputProps,e.commonTimeInputProps,{amPm:u,ariaLabel:i,autoFocus:0===n&&r,inputRef:e.hour12Input,placeholder:s,showLeadingZeros:f,value:d}))})),P(R(e),"renderHour24",(function(t,n){var a=e.props,r=a.autoFocus,i=a.hourAriaLabel,s=a.hourPlaceholder,c=e.state.hour;if(t&&t.length>2)throw new Error("Unsupported token: ".concat(t));var u=t&&2===t.length;return o.default.createElement(f.default,I({key:"hour24"},e.commonInputProps,e.commonTimeInputProps,{ariaLabel:i,autoFocus:0===n&&r,inputRef:e.hour24Input,placeholder:s,showLeadingZeros:u,value:c}))})),P(R(e),"renderMinute",(function(t,n){var a=e.props,r=a.autoFocus,i=a.minuteAriaLabel,s=a.minutePlaceholder,c=e.state,u=c.hour,d=c.minute;if(t&&t.length>2)throw new Error("Unsupported token: ".concat(t));var l=t&&2===t.length;return o.default.createElement(p.default,I({key:"minute"},e.commonInputProps,e.commonTimeInputProps,{ariaLabel:i,autoFocus:0===n&&r,hour:u,inputRef:e.minuteInput,placeholder:s,showLeadingZeros:l,value:d}))})),P(R(e),"renderSecond",(function(t,n){var a=e.props,r=a.autoFocus,i=a.secondAriaLabel,s=a.secondPlaceholder,c=e.state,u=c.hour,d=c.minute,l=c.second;if(t&&t.length>2)throw new Error("Unsupported token: ".concat(t));var f=!t||2===t.length;return o.default.createElement(b.default,I({key:"second"},e.commonInputProps,e.commonTimeInputProps,{ariaLabel:i,autoFocus:0===n&&r,hour:u,inputRef:e.secondInput,minute:d,placeholder:s,showLeadingZeros:f,value:l}))})),P(R(e),"renderAmPm",(function(t,n){var a=e.props,r=a.amPmAriaLabel,i=a.autoFocus,s=a.locale,c=e.state.amPm;return o.default.createElement(m.default,I({key:"ampm"},e.commonInputProps,e.commonTimeInputProps,{ariaLabel:r,autoFocus:0===n&&i,inputRef:e.amPmInput,locale:s,onChange:e.onChangeAmPm,value:c}))})),e}return t=w,a=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.minDate,a=e.maxDate,o={};e.isWidgetOpen!==t.isWidgetOpen&&(o.isWidgetOpen=e.isWidgetOpen);var r=K({value:e.value,minDate:n,maxDate:a}),s=[r,t.value];if(o.isCalendarOpen||j.apply(void 0,_(s.map((function(e){return K({value:e,minDate:n,maxDate:a})}))))||j.apply(void 0,_(s.map((function(e){return z({value:e,minDate:n,maxDate:a},1)}))))){if(r){var c=T((0,v.convert24to12)((0,i.getHours)(r)),2);o.amPm=c[1],o.year=(0,i.getYear)(r).toString(),o.month=(0,i.getMonthHuman)(r).toString(),o.day=(0,i.getDate)(r).toString(),o.hour=(0,i.getHours)(r).toString(),o.minute=(0,i.getMinutes)(r).toString(),o.second=(0,i.getSeconds)(r).toString()}else o.amPm=null,o.year=null,o.month=null,o.day=null,o.hour=null,o.minute=null,o.second=null;o.value=r}return o}}],(n=[{key:"formatTime",get:function(){var e=this.props.maxDetail,t=L.indexOf(e),n=N[t]||function(){var e={hour:"numeric"};return t>=1&&(e.minute="numeric"),t>=2&&(e.second="numeric"),N[t]=e,e}();return(0,y.getFormatter)(n)}},{key:"formatNumber",get:function(){return q}},{key:"dateDivider",get:function(){return this.datePlaceholder.match(/[^0-9a-z]/i)[0]}},{key:"timeDivider",get:function(){return this.timePlaceholder.match(/[^0-9a-z]/i)[0]}},{key:"datePlaceholder",get:function(){var e=this.props.locale,t=new Date(2017,11,11),n=(0,y.formatDate)(e,t),a=["y","M","d"],o=n;return["year","month","day"].forEach((function(n,r){var i=function(t,n){var a=N[t]||function(){var e=P({useGrouping:!1},t,"numeric");return N[t]=e,e}();return(0,y.getFormatter)(a)(e,n).match(/\d{1,}/)}(n,t),s=a[r];o=o.replace(i,s)})),o=o.replace("17","y")}},{key:"timePlaceholder",get:function(){var e=this.props.locale,t=new Date(2017,0,1,21,13,14);return this.formatTime(e,t).replace(this.formatNumber(e,9),"h").replace(this.formatNumber(e,21),"H").replace(this.formatNumber(e,13),"mm").replace(this.formatNumber(e,14),"ss").replace(new RegExp((0,k.getAmPmLabels)(e).join("|")),"a")}},{key:"placeholder",get:function(){var e=this.props.format;return e||"".concat(this.datePlaceholder,"\xa0").concat(this.timePlaceholder)}},{key:"maxTime",get:function(){var e=this.props.maxDate;if(!e)return null;var t=this.state;return H(e,t.year,t.month,t.day)?(0,i.getHoursMinutesSeconds)(e||F):null}},{key:"minTime",get:function(){var e=this.props.minDate;if(!e)return null;var t=this.state;return H(e,t.year,t.month,t.day)?(0,i.getHoursMinutesSeconds)(e||O):null}},{key:"commonInputProps",get:function(){var e=this.props,t=e.className,n=e.disabled,a=e.isWidgetOpen,o=e.maxDate,r=e.minDate,i=e.required;return{className:t,disabled:n,maxDate:o||F,minDate:r||O,onChange:this.onChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,placeholder:"--",required:i||a}}},{key:"commonTimeInputProps",get:function(){return{maxTime:this.maxTime,minTime:this.minTime}}},{key:"valueType",get:function(){return this.props.maxDetail}},{key:"renderCustomInputs",value:function(){var e=this.placeholder,t=this.props.format;return function(e,t,n){var a=[],r=new RegExp(Object.keys(t).map((function(e){return"".concat(e,"+")})).join("|"),"g"),i=e.match(r);return e.split(r).reduce((function(e,r,s){var c=r&&o.default.createElement(h.default,{key:"separator_".concat(s)},r),u=[].concat(_(e),[c]),d=i&&i[s];if(d){var l=t[d]||t[Object.keys(t).find((function(e){return d.match(e)}))];!n&&a.includes(l)?u.push(d):(u.push(l(d,s)),a.push(l))}return u}),[])}(e,{d:this.renderDay,M:this.renderMonth,y:this.renderYear,h:this.renderHour,H:this.renderHour,m:this.renderMinute,s:this.renderSecond,a:this.renderAmPm},"undefined"!==typeof t)}},{key:"renderNativeInput",value:function(){var e=this.props,t=e.disabled,n=e.maxDate,a=e.minDate,r=e.name,i=e.nativeInputAriaLabel,s=e.required,c=this.state.value;return o.default.createElement(g.default,{key:"time",ariaLabel:i,disabled:t,maxDate:n||F,minDate:a||O,name:r,onChange:this.onChangeNative,required:s,value:c,valueType:this.valueType})}},{key:"render",value:function(){var e=this.props.className;return o.default.createElement("div",{className:e,onClick:this.onClick},this.renderNativeInput(),this.renderCustomInputs())}}])&&S(t.prototype,n),a&&S(t,a),Object.defineProperty(t,"prototype",{writable:!1}),w}(o.PureComponent);t.default=Q,Q.defaultProps={maxDetail:"minute",name:"datetime"};var J=r.default.oneOfType([r.default.string,r.default.instanceOf(Date)]);Q.propTypes={amPmAriaLabel:r.default.string,autoFocus:r.default.bool,className:r.default.string.isRequired,dayAriaLabel:r.default.string,dayPlaceholder:r.default.string,disabled:r.default.bool,format:r.default.string,hourAriaLabel:r.default.string,hourPlaceholder:r.default.string,isWidgetOpen:r.default.bool,locale:r.default.string,maxDate:w.isMaxDate,maxDetail:r.default.oneOf(L),minDate:w.isMinDate,minuteAriaLabel:r.default.string,minutePlaceholder:r.default.string,monthAriaLabel:r.default.string,monthPlaceholder:r.default.string,name:r.default.string,nativeInputAriaLabel:r.default.string,onChange:r.default.func,required:r.default.bool,secondAriaLabel:r.default.string,secondPlaceholder:r.default.string,showLeadingZeros:r.default.bool,value:r.default.oneOfType([J,r.default.arrayOf(J)]),yearAriaLabel:r.default.string,yearPlaceholder:r.default.string}},48845:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var a=s(n(67861)),o=s(n(43161)),r=n(31656),i=n(67093);function s(e){return e&&e.__esModule?e:{default:e}}function c(e){var t=e.ariaLabel,n=e.disabled,o=e.maxDate,i=e.minDate,s=e.name,c=e.onChange,u=e.required,d=e.value,l=e.valueType,f=function(){switch(l){case"hour":return function(e){return"".concat((0,r.getISOLocalDate)(e),"T").concat((0,r.getHours)(e),":00")};case"minute":return function(e){return"".concat((0,r.getISOLocalDate)(e),"T").concat((0,r.getHoursMinutes)(e))};case"second":return r.getISOLocalDateTime;default:throw new Error("Invalid valueType.")}}(),p=function(){switch(l){case"hour":return 3600;case"minute":return 60;case"second":return 1;default:throw new Error("Invalid valueType.")}}();return a.default.createElement("input",{"aria-label":t,disabled:n,hidden:!0,max:o?f(o):null,min:i?f(i):null,name:s,onChange:c,onFocus:function(e){e.stopPropagation()},required:u,step:p,style:{visibility:"hidden",position:"absolute",zIndex:"-999"},type:"datetime-local",value:d?f(d):""})}c.propTypes={ariaLabel:o.default.string,disabled:o.default.bool,maxDate:i.isMaxDate,minDate:i.isMinDate,name:o.default.string,onChange:o.default.func,required:o.default.bool,value:o.default.oneOfType([o.default.string,o.default.instanceOf(Date)]),valueType:i.isValueType}},70818:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==y(e)&&"function"!==typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(a,r,i):a[r]=e[r]}a.default=e,n&&n.set(e,a);return a}(n(67861)),o=n(89084),r=h(n(43161)),i=h(n(40596)),s=h(n(85370)),c=h(n(48679)),u=h(n(62368)),d=h(n(81911)),l=h(n(22605)),f=n(67093),p=["calendarClassName","className","maxDetail","onChange","portalContainer","value"],b=["clockClassName","className","maxDetail","onChange","portalContainer","value"],m=["onChange"];function h(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,a=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:e.props.closeWidgets,a=e.props.onChange;n&&e.closeWidgets(),a&&a(t)})),E(S(e),"onFocus",(function(t){var n=e.props,a=n.disabled,o=n.onFocus,r=n.openWidgetsOnFocus;if(o&&o(t),!a&&r){if("true"===t.target.dataset.select)return;switch(t.target.name){case"day":case"month":case"year":e.openCalendar();break;case"hour12":case"hour24":case"minute":case"second":e.openClock()}}})),E(S(e),"onKeyDown",(function(t){"Escape"===t.key&&e.closeWidgets()})),E(S(e),"openClock",(function(){e.setState((function(e){var t={isClockOpen:!0};return e.isCalendarOpen&&(t.isCalendarOpen=!1),t}))})),E(S(e),"openCalendar",(function(){e.setState((function(e){var t={isCalendarOpen:!0};return e.isClockOpen&&(t.isClockOpen=!1),t}))})),E(S(e),"toggleCalendar",(function(){e.setState((function(e){var t={isCalendarOpen:!e.isCalendarOpen};return e.isClockOpen&&(t.isClockOpen=!1),t}))})),E(S(e),"closeWidgets",(function(){e.setState((function(e){var t={};return e.isCalendarOpen&&(t.isCalendarOpen=!1),e.isClockOpen&&(t.isClockOpen=!1),t}))})),E(S(e),"stopPropagation",(function(e){return e.stopPropagation()})),E(S(e),"clear",(function(){return e.onChange(null)})),e}return t=h,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n={};return e.isCalendarOpen!==t.isCalendarOpenProps&&(n.isCalendarOpen=e.isCalendarOpen,n.isCalendarOpenProps=e.isCalendarOpen),e.isClockOpen!==t.isClockOpenProps&&(n.isClockOpen=e.isClockOpen,n.isClockOpenProps=e.isClockOpen),n}}],(n=[{key:"componentDidMount",value:function(){this.handleOutsideActionListeners()}},{key:"componentDidUpdate",value:function(e,t){var n=this.state,a=n.isCalendarOpen,o=n.isClockOpen,r=this.props,i=r.onCalendarClose,s=r.onCalendarOpen,c=r.onClockClose,u=r.onClockOpen;if((a||o)!==(t.isCalendarOpen||t.isClockOpen)&&this.handleOutsideActionListeners(),a!==t.isCalendarOpen){var d=a?s:i;d&&d()}if(o!==t.isClockOpen){var l=o?u:c;l&&l()}}},{key:"componentWillUnmount",value:function(){this.handleOutsideActionListeners(!1)}},{key:"eventProps",get:function(){return(0,i.default)(this.props)}},{key:"handleOutsideActionListeners",value:function(e){var t=this,n=this.state,a=n.isCalendarOpen,o=n.isClockOpen,r=("undefined"!==typeof e?e:a||o)?"addEventListener":"removeEventListener";U.forEach((function(e){return document[r](e,t.onOutsideAction)})),document[r]("keydown",this.onKeyDown)}},{key:"renderInputs",value:function(){var e=this.props,t=e.amPmAriaLabel,n=e.autoFocus,o=e.calendarAriaLabel,r=e.calendarIcon,i=e.clearAriaLabel,s=e.clearIcon,c=e.dayAriaLabel,u=e.dayPlaceholder,d=e.disableCalendar,f=e.disabled,p=e.format,b=e.hourAriaLabel,m=e.hourPlaceholder,h=e.locale,g=e.maxDate,y=e.maxDetail,v=e.minDate,A=e.minuteAriaLabel,x=e.minutePlaceholder,I=e.monthAriaLabel,T=e.monthPlaceholder,S=e.name,C=e.nativeInputAriaLabel,E=e.required,R=e.secondAriaLabel,M=e.secondPlaceholder,U=e.showLeadingZeros,_=e.value,B=e.yearAriaLabel,D=e.yearPlaceholder,N=this.state,O=N.isCalendarOpen,F=N.isClockOpen,L=k([].concat(_),1)[0],j={amPmAriaLabel:t,dayAriaLabel:c,hourAriaLabel:b,minuteAriaLabel:A,monthAriaLabel:I,nativeInputAriaLabel:C,secondAriaLabel:R,yearAriaLabel:B},H={dayPlaceholder:u,hourPlaceholder:m,minutePlaceholder:x,monthPlaceholder:T,secondPlaceholder:M,yearPlaceholder:D};return a.default.createElement("div",{className:"".concat(P,"__wrapper")},a.default.createElement(l.default,w({},j,H,{autoFocus:n,className:"".concat(P,"__inputGroup"),disabled:f,format:p,isWidgetOpen:O||F,locale:h,maxDate:g,maxDetail:y,minDate:v,name:S,onChange:this.onChange,placeholder:this.placeholder,required:E,showLeadingZeros:U,value:L})),null!==s&&a.default.createElement("button",{"aria-label":i,className:"".concat(P,"__clear-button ").concat(P,"__button"),disabled:f,onClick:this.clear,onFocus:this.stopPropagation,type:"button"},s),null!==r&&!d&&a.default.createElement("button",{"aria-label":o,className:"".concat(P,"__calendar-button ").concat(P,"__button"),disabled:f,onBlur:this.resetValue,onClick:this.toggleCalendar,onFocus:this.stopPropagation,type:"button"},r))}},{key:"renderCalendar",value:function(){var e=this,t=this.props.disableCalendar,n=this.state.isCalendarOpen;if(null===n||t)return null;var r=this.props,i=r.calendarClassName,d=(r.className,r.maxDetail,r.onChange,r.portalContainer),l=r.value,f=v(r,p),b="".concat(P,"__calendar"),m=(0,s.default)(b,"".concat(b,"--").concat(n?"open":"closed")),h=a.default.createElement(c.default,w({className:i,onChange:function(t){return e.onDateChange(t)},value:l||null},f));return d?(0,o.createPortal)(a.default.createElement("div",{ref:this.calendarWrapper,className:m},h),d):a.default.createElement(u.default,null,a.default.createElement("div",{ref:function(e){e&&!n&&e.removeAttribute("style")},className:m},h))}},{key:"renderClock",value:function(){var e=this.props.disableClock,t=this.state.isClockOpen;if(null===t||e)return null;var n=this.props,r=n.clockClassName,i=(n.className,n.maxDetail),c=(n.onChange,n.portalContainer),l=n.value,f=v(n,b),p="".concat(P,"__clock"),m=(0,s.default)(p,"".concat(p,"--").concat(t?"open":"closed")),h=k([].concat(l),1)[0],g=M.indexOf(i),y=a.default.createElement(d.default,w({className:r,renderMinuteHand:g>0,renderSecondHand:g>1,value:h},f));return c?(0,o.createPortal)(a.default.createElement("div",{ref:this.clockWrapper,className:m},y),c):a.default.createElement(u.default,null,a.default.createElement("div",{ref:function(e){e&&!t&&e.removeAttribute("style")},className:m},y))}},{key:"render",value:function(){var e=this.eventProps,t=this.props,n=t.className,o=t["data-testid"],r=t.disabled,i=this.state,c=i.isCalendarOpen,u=i.isClockOpen,d=(e.onChange,v(e,m));return a.default.createElement("div",w({className:(0,s.default)(P,"".concat(P,"--").concat(c||u?"open":"closed"),"".concat(P,"--").concat(r?"disabled":"enabled"),n),"data-testid":o},d,{onFocus:this.onFocus,ref:this.wrapper}),this.renderInputs(),this.renderCalendar(),this.renderClock())}}])&&x(t.prototype,n),r&&x(t,r),Object.defineProperty(t,"prototype",{writable:!1}),h}(a.PureComponent);t.default=_;var B={xmlns:"http://www.w3.org/2000/svg",width:19,height:19,viewBox:"0 0 19 19",stroke:"black",strokeWidth:2},D=a.default.createElement("svg",w({},B,{className:"".concat(P,"__calendar-button__icon ").concat(P,"__button__icon")}),a.default.createElement("rect",{fill:"none",height:"15",width:"15",x:"2",y:"2"}),a.default.createElement("line",{x1:"6",x2:"6",y1:"0",y2:"4"}),a.default.createElement("line",{x1:"13",x2:"13",y1:"0",y2:"4"})),N=a.default.createElement("svg",w({},B,{className:"".concat(P,"__clear-button__icon ").concat(P,"__button__icon")}),a.default.createElement("line",{x1:"4",x2:"15",y1:"4",y2:"15"}),a.default.createElement("line",{x1:"15",x2:"4",y1:"4",y2:"15"}));_.defaultProps={calendarIcon:D,clearIcon:N,closeWidgets:!0,isCalendarOpen:null,isClockOpen:null,maxDetail:"minute",openWidgetsOnFocus:!0};var O=r.default.oneOfType([r.default.string,r.default.instanceOf(Date)]);_.propTypes={amPmAriaLabel:r.default.string,autoFocus:r.default.bool,calendarAriaLabel:r.default.string,calendarClassName:r.default.oneOfType([r.default.string,r.default.arrayOf(r.default.string)]),calendarIcon:r.default.node,className:r.default.oneOfType([r.default.string,r.default.arrayOf(r.default.string)]),clearAriaLabel:r.default.string,clearIcon:r.default.node,clockClassName:r.default.oneOfType([r.default.string,r.default.arrayOf(r.default.string)]),closeWidgets:r.default.bool,"data-testid":r.default.string,dayAriaLabel:r.default.string,dayPlaceholder:r.default.string,disableCalendar:r.default.bool,disableClock:r.default.bool,disabled:r.default.bool,format:r.default.string,hourAriaLabel:r.default.string,hourPlaceholder:r.default.string,isCalendarOpen:r.default.bool,isClockOpen:r.default.bool,locale:r.default.string,maxDate:f.isMaxDate,maxDetail:r.default.oneOf(M),minDate:f.isMinDate,minuteAriaLabel:r.default.string,minutePlaceholder:r.default.string,monthAriaLabel:r.default.string,monthPlaceholder:r.default.string,name:r.default.string,nativeInputAriaLabel:r.default.string,onCalendarClose:r.default.func,onCalendarOpen:r.default.func,onChange:r.default.func,onClockClose:r.default.func,onClockOpen:r.default.func,onFocus:r.default.func,openWidgetsOnFocus:r.default.bool,portalContainer:r.default.object,required:r.default.bool,secondAriaLabel:r.default.string,secondPlaceholder:r.default.string,showLeadingZeros:r.default.bool,value:r.default.oneOfType([O,r.default.arrayOf(O)]),yearAriaLabel:r.default.string,yearPlaceholder:r.default.string}},12157:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=r(n(67861)),o=r(n(43161));function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.children;return a.default.createElement("span",{className:"react-datetime-picker__inputGroup__divider"},t)}i.propTypes={children:o.default.node}},10075:function(e,t,n){"use strict";t.Z=void 0,n(70537),n(86186);var a,o=(a=n(70818))&&a.__esModule?a:{default:a};n(61404);var r=o.default;t.Z=r},31533:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDate=void 0,t.getFormatter=i,t.getNumberFormatter=function(e){return function(t,n){var a=t||(0,o.default)();s.has(a)||s.set(a,new Map);var r=s.get(a);return r.has(e)||r.set(e,new Intl.NumberFormat(a,e).format),r.get(e)(n)}};var a,o=(a=n(5410))&&a.__esModule?a:{default:a};var r=new Map;function i(e){return function(t,n){var a=t||(0,o.default)();r.has(a)||r.set(a,new Map);var i=r.get(a);return i.has(e)||i.set(e,new Intl.DateTimeFormat(a,e).format),i.get(e)(n)}}var s=new Map;var c=i({day:"numeric",month:"numeric",year:"numeric"});t.formatDate=c},64007:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convert12to24=function(e,t){var n=parseInt(e,10);"am"===t&&12===n?n=0:"pm"===t&&n<12&&(n+=12);return n},t.convert24to12=function(e){return[e%12||12,e<12?"am":"pm"]}},67093:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValueType=t.isMinDate=t.isMaxDate=void 0;var a,o=(a=n(43161))&&a.__esModule?a:{default:a};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var i=[].concat(["hour","minute","second"]);t.isMinDate=function(e,t,n){var a=e[t];if(!a)return null;if(!(a instanceof Date))return new Error("Invalid prop `".concat(t,"` of type `").concat(r(a),"` supplied to `").concat(n,"`, expected instance of `Date`."));var o=e.maxDate;return o&&a>o?new Error("Invalid prop `".concat(t,"` of type `").concat(r(a),"` supplied to `").concat(n,"`, minDate cannot be larger than maxDate.")):null};t.isMaxDate=function(e,t,n){var a=e[t];if(!a)return null;if(!(a instanceof Date))return new Error("Invalid prop `".concat(t,"` of type `").concat(r(a),"` supplied to `").concat(n,"`, expected instance of `Date`."));var o=e.minDate;return o&&ae)return t;if(n&&ne.length)&&(t=e.length);for(var n=0,a=new Array(t);n

- - - ); -} - -function SerumLogoButton() { - const history = useHistory(); - return ( -
history.push("/")}> - -
- ); + const wallet = useAnchorWallet(); + const navigate = useNavigate(); + const [multisigAddress, setMultisigAddress] = useState(""); + const disabled = !isValidPubkey(multisigAddress); + const searchFn = () => { + navigate(`/${multisigAddress}`); + }; + return ( + + +
+
+ +
+ setMultisigAddress(e.target.value as string)} + onKeyPress={(e) => { + if (e.key === "Enter") { + searchFn(); + } + }} + /> + + + +
+
+
+ + + {wallet && ( + } + style={{ marginLeft: 8 }} + /> + )} +
+
+
+
+ ); } type BarButtonProps = { - label: string; - hrefClient?: string; - href?: string; + label: string; + hrefClient?: string; + href?: string; }; function BarButton(props: BarButtonProps) { - const history = useHistory(); - const { label, href, hrefClient } = props; - return ( -
hrefClient && history.push(hrefClient)} - > - - - -
- ); + const navigate = useNavigate(); + const { label, href, hrefClient } = props; + return ( +
hrefClient && navigate(hrefClient)} + > + + + +
+ ); } function NetworkSelector() { - const [anchorEl, setAnchorEl] = useState(null); - const {env, setEndpoint} = useConnectionConfig(); + const [anchorEl, setAnchorEl] = useState(null); + const { env, setEndpoint } = useConnectionConfig(); - const handleClose = () => { - setAnchorEl(null); - }; + const handleClose = () => { + setAnchorEl(null); + }; - return ( -
- - - {ENDPOINTS.map(endpoint => { - return ( - { - handleClose(); - setEndpoint(endpoint.endpoint); - }} - > - {endpoint.name} - - ) - })} - -
- ); + return ( +
+ + + {ENDPOINTS.map((endpoint) => { + return ( + { + handleClose(); + setEndpoint(endpoint.endpoint); + }} + > + {endpoint.name} + + ); + })} + +
+ ); } function isValidPubkey(addr: string): boolean { - try { - new PublicKey(addr); - return true; - } catch (_) { - return false; - } + try { + new PublicKey(addr); + return true; + } catch (_) { + return false; + } } diff --git a/src/components/Multisig.tsx b/src/components/Multisig.tsx index 5df4042..16a4174 100644 --- a/src/components/Multisig.tsx +++ b/src/components/Multisig.tsx @@ -1,10 +1,10 @@ import React, { useState, useEffect } from "react"; -import { useHistory } from "react-router"; +import { useNavigate } from "react-router"; import { useSnackbar } from "notistack"; import { encode as encodeBase64 } from "js-base64"; import Container from "@material-ui/core/Container"; import AppBar from "@material-ui/core/AppBar"; -import GavelIcon from "@material-ui/icons/Gavel"; +import StarsIcon from "@material-ui/icons/Stars"; import DescriptionIcon from "@material-ui/icons/Description"; import Paper from "@material-ui/core/Paper"; import SupervisorAccountIcon from "@material-ui/icons/SupervisorAccount"; @@ -17,6 +17,7 @@ import InfoIcon from "@material-ui/icons/Info"; import Table from "@material-ui/core/Table"; import TableHead from "@material-ui/core/TableHead"; import TableBody from "@material-ui/core/TableBody"; +import GavelIcon from "@material-ui/icons/Gavel"; import TableCell from "@material-ui/core/TableCell"; import TableRow from "@material-ui/core/TableRow"; import BuildIcon from "@material-ui/icons/Build"; @@ -41,1613 +42,1423 @@ import ListItemIcon from "@material-ui/core/ListItemIcon"; import ListItem from "@material-ui/core/ListItem"; import ListItemText from "@material-ui/core/ListItemText"; import CheckCircleIcon from "@material-ui/icons/CheckCircle"; -import BN from "bn.js"; +// import CredixLogo from "../credix.svg"; +import { BN } from "bn.js"; import { - Account, - PublicKey, - SYSVAR_RENT_PUBKEY, - SYSVAR_CLOCK_PUBKEY, + Account, + PublicKey, + SYSVAR_RENT_PUBKEY, + SYSVAR_CLOCK_PUBKEY, } from "@solana/web3.js"; import { ViewTransactionOnExplorerButton } from "./Notification"; -import * as idl from "../utils/idl"; +// import * as idl from "../utils/idl"; import { useMultisigProgram } from "../hooks/useMultisigProgram"; -import { Token, TOKEN_PROGRAM_ID, u64, AccountInfo as TokenAccount, AccountLayout } from "@solana/spl-token"; +import { TOKEN_PROGRAM_ID, AccountLayout, getAccount } from "@solana/spl-token"; import { MoneyRounded } from "@material-ui/icons"; import { Connection } from "@solana/web3.js"; -import { getMintInfo, getTokenAccount, parseTokenAccount } from "@project-serum/common"; +import { + getMintInfo, + getTokenAccount, + parseTokenAccount, + ProgramAccount, +} from "@project-serum/common"; import { useMultiSigOwnedTokenAccounts } from "../hooks/useOwnedTokenAccounts"; import { FormControl, InputLabel, MenuItem, Select } from "@material-ui/core"; -import { ACCOUNT_LAYOUT } from "@project-serum/common/dist/lib/token"; - -export default function Multisig({ multisig }: { multisig?: PublicKey }) { - return ( -
- -
- -
-
- {multisig && } -
- ); -} +import { config } from "../credix/config"; +import { ChangeThresholdListItem } from "./transactions/ChangeThreshold"; +import { ProgramUpdateListItem } from "./transactions/ProgramUpgrade"; +// import { IdlUpgradeListItem } from "./transactions/IdlUpgrade"; +import { MultisigSetOwnersListItem } from "./transactions/SetOwners"; +import { ActivateDealListItem } from "./transactions/ActivateDeal"; +import { OpenDealListItem } from "./transactions/OpenDeal"; +import { TransferTokenListItem } from "./transactions/TransferToken"; +import { FreezeThawGlobalMarketStateListItem } from "./transactions/FreezeThawGlobalMarketState"; +import { UpdateMarketListItem } from "./transactions/UpdateMarket"; +import { FreezeThawTokenAccountListItem } from "./transactions/FreezeThawTokenAccount"; +import { CredixPassListItem } from "./transactions/CredixPass"; +import { TranchePassListItem } from "./transactions/TranchePass"; +import { MarketAdminsListItem } from "./transactions/MarketAdmins"; +import { UpdateDealListItem } from "./transactions/UpdateDeal"; +import { AdjustRepaymentScheduleListItem } from "./transactions/AdjustRepaymentSchedule"; +import { ActivateMigratedDealListItem } from "./transactions/ActivateMigratedDeal"; +// import { InitializeMarketListItem } from "./transactions/InitializeMarket"; +import { u64 } from "@project-serum/borsh"; +import { UpdateProgramStateListItem } from "./transactions/updateProgramState"; -function NewMultisigButton() { - const [open, setOpen] = useState(false); - return ( -
- setOpen(true)} - > - - - setOpen(false)} /> -
- ); -} - -export function MultisigInstance({ multisig }: { multisig: PublicKey }) { - const multisigClient = useMultisigProgram(); - const [multisigAccount, setMultisigAccount] = useState(undefined); - const [transactions, setTransactions] = useState(null); - const [showSignerDialog, setShowSignerDialog] = useState(false); - const [showAddTransactionDialog, setShowAddTransactionDialog] = useState( - false - ); - const [forceRefresh, setForceRefresh] = useState(false); - useEffect(() => { - multisigClient.account - .multisig.fetch(multisig) - .then((account: any) => { - setMultisigAccount(account); - }) - .catch((err: any) => { - console.error(err); - setMultisigAccount(null); - }); - }, [multisig, multisigClient.account]); - useEffect(() => { - multisigClient.account.transaction.all(multisig.toBuffer()).then((txs) => { - setTransactions(txs); - }); - }, [multisigClient.account.transaction, multisig, forceRefresh]); - useEffect(() => { - multisigClient.account.multisig - .subscribe(multisig) - .on("change", (account) => { - setMultisigAccount(account); - }); - }, [multisigClient, multisig]); - return ( - -
- - {multisigAccount === undefined ? ( -
- -
- ) : multisigAccount === null ? ( - - - Multisig not found - - - ) : ( - <> - )} -
- {multisigAccount && ( - - - - - {multisig.toString()} | {multisigAccount.threshold.toString()}{" "} - of {multisigAccount.owners.length.toString()} Multisig - - - setShowSignerDialog(true)}> - - - - - setShowAddTransactionDialog(true)}> - - - - - - - {transactions === null ? ( -
- -
- ) : transactions.length === 0 ? ( - - - - ) : ( - transactions.map((tx: any) => ( - - )) - )} -
-
- )} -
- setShowAddTransactionDialog(false)} - didAddTransaction={() => setForceRefresh(!forceRefresh)} - /> - {multisigAccount && ( - setShowSignerDialog(false)} - /> - )} -
- ); -} +const NO_SHOW_LIST = [ + "BxLmPP7E28NNth178MQ3nbDTTURcg196FuWNoEEvJ1HY", + "EsQJUXtfz5BQJya9e5sYZdeGUgsN61KyqABRybWyHx2r", + "9f7DQZVCcrAwbZqdaPzZmvgCsKJeuyat8vX1Pf2dUgUt", + "Fu9E3uxbwy5TmFQneYzrwh1KHcqdgqpZUunLgUEXkUkX", + "AHoRfLLjdubrzEXyjqKrMoRWCT89Ld8gVVV1XMyKPKTh", + "Gk5h7TZ2HqRfnTewmpyirj9dMhozXUcjYoEf4UL5hJU1", + "6xxwD7NdsMcFLaiLKRyJfYyYMozqrmYFV6u5GT6AjPRj", + "2rQ6KmUbw4vEmLGfetoaWS9CU1Vyt15GgwqEbtx9fwtR", + "EcgopxcRz2Byn7EUJRV7WEBAdr2SQVHaRwsBAuu7URfP", + "6uAwRDhirmgnE7EJeh9n6iAKDSzJrE46CAdM8WzY5U1f", + "Ge671HMHqxkwP6Q432ddkKk4VobXXByCXGmq769iMpiK", + "ayiDB95vJ2cEytyLgdtJT4Nyoo2xasYvpchnLta4kzF", + "GSJafVfeatmr9z5XEioKy8gtXKuDk64WoXqxd4n9P3PD", + "GH8nBK1X4wkcpHRQwKnZcrwHFwnXWo21ZZBjn6hoE1MH", + "CsAmxJJ6Mnuy1Jwb4QGk4NgYGitJDRP7ytKw3x8DB68w", + "8i5E1gAEcrJU4KRUrYJwGhFCHZAt27QrguJrypiJmKFb", + "6j6VYhuqHNs5x1BLxopbjVqKojn3Qy3VmbAb2nmNgn7K", + "DheryLuiGDC2amNNPcCRkJ5ML9DLqLqsNFwuZ2Un4J7g", + "GEb3sK26tcg8aYoGxeEdWfnWun57XQ6fV91KDJDPXB6P", + "2nQQEEBsiUSRiS4Q49Ro7LWAyV65zLYCkLE4SMPee2Jj", + "GwwXVrBD7r2FS2UdewBjFx8bG4C2SEq59WHk7LAgNjP9", + "Cjg9WED7M6jQznCqvdpLpkLuixp61Ht7DktG8MMM7Tka", + "2ku116ffxiu2mkybCHixnHBFVw6ZY7FARARmzwe3tatp", + "APiCuumSsEXUQLtMEEq7jp5dvKBPv6NZVxS1XZ3NwF8a", + "HEjFY96S96rPLVtPW1iFZ2bmMNg7SsvdvZkE5L7MLcsK", + "6Q7JidT3eA1H8KAoKSVPSPwxW1WsR9ycLB86jrAqh1Db", + "Azec2baAs7g86tYEjoJsibp6jBJKpvSxFeJk5cc4SuTa", + "BURPA2yzMb6JMqLA4cJHuaN43oJ8o5Lfga66ru2wcVgH", + "BxLmPP7E28NNth178MQ3nbDTTURcg196FuWNoEEvJ1HY", + "DRPykGTLFzhNB8mMP1aw9wBt9ZSgv1FFxdnbCQoXDo8o", + "7ezaSsbSoHJWqA59KAq1ENZGgJjhNtVpzULPbyzFNRqF", + "59y9hWxMbW3MVFP36TJbipaXzXMAWJfoBisP6NtFKDrU", + "FPyePnLxghsUwPtrp9pEU8yc3W96ieDPdAdhWFbPKdMV", + "AuMhJnjpiQjHffgbkA8HQ4fWjWi5yTJpAV9b8ZdwfpKv", + "3PRgK6SPnJZD8C34esq2fW13pMU1Ky8GagjEqxJVcmXK", + "AczcRjjZ47negBzU4TVkQQRe4PYMCVsmo5C3Tt6dzXRs", + "2CPEs3TizBopukcHTrPPeVYy8DRr4RVoLfp5ccgchDEn", + "CrWf9XdZwL8iy8Jhbu4DRJLAUmn7iv5pT67c8Wyj2pUu", + "BA4gCkzBYcrVv6CmrWoia4cV7GqwSV2Aay18wM2Jf8Fu", + "56bNvH6Ckvqops5gbgM1rBaVi8nSk4aiykmXgrjNfCRn", + "4gAmLrY61STRGrPL2eLmyXz2eE3x9XZSJPkbUBF3LDwB", + "387KmRLPVDUf7TQSbiEaQB8Jy36HgH7LMsbyj67LHXWu", + "9Do5Eh2oeQjVNW75c6gmSBbcnM2Z8FK6AQNPsjmLWcX6", + "AaXXDNBDESnrN3wWGsXV7ke1v5mTY6m46ok418FeQ1mt", + "BC8ZyiUT7nVSGQnBcujCEHyaJrjkmFA7SBSbfjL3qnsV", + "9YkX6vfZKg9vD4E7P46UMzkeqYtsXiTm2WLfrZS4tA8L", + "J9QvJTf8y9Vm4Q69zSBqzXLjTvdc8zgbqBmrC3TJwdJW", + "9ULcD9McCETwUaT3Pw8uZxk81qriiKRTX9Uo7LJZXj6o", + "7ZwEod26DTdygr4rvrYLH9yLyyzh5UgXEumvo8x9CFJ7", + "9QXwLCgjFJYSCrHaDgti4qQJHcFmnTsuBipNVXDCWUs8", + "35GhRoQNbtB8h5zAWWFNo4vvqpAqfYhwGMGyDQahg8pJ", + "EigpveeSn5jVPL78m4x7M83er3Czz5Gw2aeJ5XtSgPgr", + "3kFi2X6WV3R5twcs21SWmTwUrt8w596o28GdCrrCVCyx", + "DcUqaEubCEwpHVykCx3QQmrbm6BomtStnkFNjPxEvNxF", + "AGnNFEp49utYtqMCRFGZo1t5J9mZVY4CA5rGWWdiyLqr", + "HhkHFd7DjGxzDCDhYe5tsz4EqLuHHe7uVoUyquP2b6MK", + "6vCbSFtMScZnqJUfQbfJGKHQVGGgHLNNBsZEtTCUHnUo", + "8R4svSBvqEQV4twfiCZeZVbfdjUGgTmMT1GpHhWMBrA6", + "5n5bwcHRMEZL6pYrMKQMeyQDtMbVzAbHeQF6mpy26jYS", + "CjBoGN5suTtiyAevoQ69sCr5dVX8LAGLvQ2vyiuLcfnY", + "EQ73zgjJPJU71qjzofCDJ6zexntvDttFBxwG9jbFunTh", + "DeEHzBxtQyDVK2vZyB3euvgL6cnYU6cfsPHTgdm7euXz", + "DtTHVgjYUkubr6haRyY74Kv8rBQM7kBmdbEKmrrjrprB", + "fiq7nyThaQdH8wyfEFgFhHS4VnYFGdA4SvTP73LdgUh", + "Dc2DrnKfAcnnTwf9bJYGi8ot6qsr5BwPXLH6GNNy93cP", + "Crh7AQdaHbGQzMLpcgxU9xntjLfr5jxXejrPAfE9qnuR", + "GpDmfRGGF7Wz1EZ2rMU3Grn7NkVwspLMg3p7RHFtKk1S", + "4hRCkqCyyMtMvraFA7fGCFF3wpvCwdNXrMxGRxSwujqo", + "5cnSAp7vCadCH75R6Kat1ZW1Pq4W317hQ6bWKD35oTBN", + "3pnafRSCgSuU7yCeuUCXRgeNJKbbC25sXGnybW3GvipY", + "GR4bLNMD7tBRTLgFXwJq5So2QGh92QZDfDXrH3e1M3eN", + "FFu2QvyiFDg2omxLTqwyV57gAonRR5RSouVdJonFwekd", + "CE7cQRSbYBXXWu9MvBj6MoMbfzNhJgJux7Rg1JAhZtqy", + "GTh1AY9v5ZAQYpQ7KdzWK8K8k41nAiPRas2nfnscYxU9", + "5fuFHNcQebNdsEQhaMwgZs7tpcdSy8LA2LFuDKG1bNAH", + "9Y1Xo76H1oeEhokpDGR7d5iVgioq48ktHFEXP6Pjk2Lm", + "Ap3sqH2ka1XgxS11PbrjTaVLwSQVbQj8QdwbE96mREyR", + "BR526swddpwyyuJqzwtWhc59gEcoy88qV45uJi2PwEZH", + "2Z6TsJVg7YhS3RtYUjzxUXab6cYLgaQsEvhWnusJcUnK", + "BeWMfsBrj6z9UvyPcGSe3o1gLvMrEwR788jmm9q8uK21", + "HhtHWL6dwHFDFxrr4BJgBoD18wF27FHxEX8oeQ2iu4y2", + "EnBq28EkxUU7avzabfwgESZvWZMhW2rHhY9YUf1mCBkZ", + "3riNy5z1s6fryUzZJCESKY5WGMFVWxfrKeTNWSRGiV8J", + "86hM1sf5mDnXGEVubjdFUwMvkNgLZMmq13apQRa4CpEe", + "9ZXvBiW1U5CBh56FD9Mi82RJWh9juRuqgr1EYNcgHKpg", + "AJKeAJgXo16NzYJcw3R8WKrK11tYhoChVCHTWGBbHxcw", + "c5eiDeZHQe1Ly4bDx7QfRaKckuBgZWfgfJj8khyUcAu", + "2Mbj3epHTv6Q2NHESqU4pCv8KjMRynhQtNULsEBjPWeY", + "6GSHyR9HyKj2KH9PnU5Dd3uLeoayxiKqGbkcM8Y5dzeo", + "2mztM4EBhUAiFVixdaYvzqe9YdZZ3oCGTewaVojFbufR", + "HcJcGK6zdV4EnNCHwEmpUMFGvDJYL3dRaVHCtiRFJ8z3", + "FiLV2C198Yfw156Q1CvotjmDhNbqdwsNxZFMhB8Cbce8", + "5UqRdQyB4k9cwcMvZKyvVrESSVEg931Y3P2c6BjSAk6E", + "7u3n13SDjBgz5Q6tmKRZzXnWCUmZJpva4Db1PUFXU9BE", + "FP3hjhVmkk2b5adR6hYQ4HUjXaB659Gb6fTMzeCVZoiS", + "8J5ChExD4pM6fPbMFk2bBKDQfkPLXXTeKSgeNkpfuEsR", + "BGkL2E8h9m1W6Ea7ekjqC7QZd7ewGkuQH14aTdnAPd61", + "4Erf8j8fzEqbRwpfmsPu4EmrzSSusBTpURiKbNkrATp4", + "GWUdwKp4Z64R3kAqS44rwwVsmvWFzTBTvn558dQB2mWp", + "ATLMVhNNvKzTv6egMbETc2EhJWvJCHwAzHiDCwi1ssdn", + "DP4VKAYv5LSK7Cry4MRaUig9KPvrAkTcAUwK759P6Zxt", + "CUPTwXBcUQZUqw5mw9B6GJ2GmuU2Yjww5Wrw4NpDgQ4k", + "HuwWNPWEW8fkkLe4LuvNXpcoMhjNznhRZxQxFYVwjKz3", + "G6TvM8C79sd2YJ3T48HQCQJQjKXTeid5RWYWN1fuB3V", + "2rWbzXDwQJmuk5tQRTVcNd4NtTXAD2Ef818KvPVMiKyM", + "4Nze5JiKfGto3gWX8GavSEBzS4Lk7AjX2y2zGAXXHsoj", + "E2PdfEuHJtBphswMQZszWUvd1s9qXVEDKFYW12yqtGQK", + "5exYBKsNX2GKk2SKiryc52ShjVfGNcJ4XWj4VBozjZ4q", + "A82xKtY9e2843KvUHDtHQu4scCFkpkQy9Dqdm97F84Rh", + "3wT6joRc3roQKJ2tFhAR2JUo3KdoDmLoju7W75TLLMeh", + "4NstAjLkfK9ZroAhXzpYZJnvZP1bfskzsjbmxjnUdBrJ", + "FZrcwZGXNRdbpeqguceQ6FF9MJ6MHQQ3bsZxnp9rCXV2", + "BPEZo8oGtM5WUS2CBS7SevDuKg6MEDMpPqvEV8xPVWwJ", + "GxKz1fqPHiN4qKWnFnM6vPYL4g1WnZu7BVu9BdZSTp3J", + "kfop3R8VQ9gECHkevpcjwB4Q6KdCVJs1j22eixE3Cgc", + "Ak9qm4TVV7cvjAb845ahQzVXgAqHtRyukz6qNZL7GvhJ", + "4Ag98qAUuZ7NgNmwqFBhC7c79Sf7BrbCmta3QwBGRE1r", + "GaGM8KVreknmZ97qoHN97HMg8HcJ6ZbeeGKy15n6n3Ze", + "G9ssXpeQgvCr31DW6X65ydgCrQFrvuaJ5pNZ7x2hwa8Y", + "98iK6nnM1tGZ5Fu4sMMt8EQ8kS8XRiXNA6L5p6jLNG9P", + "G2M4doqrefm8sZZUHur44iTNxhC9TBV1tGswV7s1Y6hg", + "Ex4JjJRgSdfdB6RtT8Wz4zE3XCskcWkPk6KVLRJSss4B", + "7owPfQwzVtQTjcexe75QvndN7BmQ8nyoLdMvsPGFrnFF", + "EdaX7pxgidLkG75MybfkY4xiQb9JrwofqrZejJ2Vby4Q", + "5kmkh6KbX4vhAwagyY7K7FdndvqaAysoDzahDopL3ECX", + "J6pw9EFSjFa6DcAVYqsiiuBZgJL7tyJfvrhH6Ui5mbNw", + "7dPKjoQ8KuZoxLFy7cdq2zAQZbXzE5oiG7iyfLUycgx1", + "3RiYVRYpGzHpopesjvcvQQ57mzhZLHQQpD7F9bqpmXtA", + "E5p1TCVFYysYn1hVU8TMhanAfuK6Vq17zwXh8KcumzSC", + "972A9xK9vVGhKxr9w8iuQnjrPGCPQCNHNNkW1Ghyh1H2", + "AjmGFS9JsCypv3XWBZGz4E6Qtq7d2sPLZyQFKKRoMmgd", + "EdE8QfZm5PCthUfhoXRah5SGBGiSosrFovqBbgXJj2HK", + "DYkcRPihE16pVMQHrT4NC3A76rWhBdiHWWSNGaw9uAR2", + "4pEiTxKVEyCsVVSB2zW25VHqu7R7gqr1yHbxwhgsisMZ", + "AGUkdPWf6xPv3gNGpTLT2d2R9gtAxRKtEWcyF25sCfvh", + "7pzn2B6mmLDSwNxzW9Wwh46NdZdVQAveSSxg8UeQmobb", + "C2Lz5Zd9GXduQbqvrogw9nbd4kbQyiW4vBmYdD4aMQda", + "2N9Ef9YikP14VGCpTcRQMG4B7zQZnN6RuJVmTq8isNRZ", + "G4YvQz9y1YXkDzPJb6eCQfyStLZcPXDuxcFnSd68hNDp", + "5YajNcMbPcD2UTuPgCfjYpUyJHeB8fykn35xbeBDnZxD", + "BNwZfUYRkW39CwHx4nPWCDmaSVa5gvdCEdUYoJTmTjhF", + "DWx52mw3VSFNTUCAErSbNcwJgWg2R6nXNAMD2tzsdGYf", + "4PoCSqsuxAuMRwqDw85kkjaxEZLdNkJuNSKctrEjGhUi", + "2JGq7UbHkVqoET2Jxb9shY8ZM4YHsfMKzMcsvHr8BFTN", + "HfXpfZT1GyNXKMYQynSJD1BYBoaQeY7yq3fgkgeGtNFf", + "9csQD7d9ZFe3GuHoZA6Nr6yqxfy4qtVMXmrhVsEUsNxP", + "9cLREHvxGBWBvQWZu5fGG8H4qEXpytaUVamWuPkYWQGg", + "DW9ja8GF7hHjFrjaq8M1tCxPcj1UAjnc5UkMRHGTjkzZ", + "ALo3RphkyUUun3CN8R1AUemERg8dkzokr8CEdhbK537d", + "FejJy7Tmc37rxhUf3kPaLJTcoJZPqCggMDFK9KAaXJWr", + "4VZmVQ3ZWom7BtnTJ3NMs9rL9YuEmwyCn8GyHzZoEnky", + "4TY5UQH7EmqUuTPYQHxtdrvgjEZXWuSHq7vq1nngQmQ1", + "646hCQTsgNqu3bB9GekE5AXeCripu8ArUsSG7jDvC6r5", + "4ChxfaFM2wBJJddrAPPHfwhTKZ8XE2xmemKesCqTdygS", + "GHH83Q2accMQ78sN5fE5NVHujks5GP5DUUyfCQbdRo7C", + "ADQZtd7HioN5nei6jZwxXpP43kER4PvCw9VGmnzdYJpW", + "CfLputQBpcMJaxSAg19uoUsSkjUfAeZSrmdXFW8gijuY", + "DTPYoYL6JavHn79zHaYmsyWM7qmEFSBXGJohLUGKFEi1", + "3bvewBPmj3QkTVeoMs1yAbxQeRzTj4hcRNWFtcPG1cfR", + "4ZnCuzHrXL9AMQdNN1NTE4ZhHfZDSHbZCYzKohUUvNUX", + "5LCwobAnV4BLV2pe4MJMkhtYcEZhmU23PuYGDf35RjWf", + "QviavfdDoSajY92fQA41PLa9PNwX6F9VRFKQo2EMjpC", + "HpR1XGvh2cmkisCatWjMLPuuyGHBCqPx23PAGA91ehoe", + "D67YtkaNYJchP5UNfcT9o7JK21UE2rWhggmMEAiTsUki", + "HCj1zKfi4x23Zu63Nb54rRWDQyNz2Nz9bJfizaHyvtZX", + "7WY1dyitfL6MkTbhNX2ZDC818GfxHGDjZBMnD167Y3ET", + "HF21mDZ6W9E1LNUMk615Mbx1Fg14WHRQBL2QewbsjFmE", + "6wx9pyfGMddjQEHewMtgACjPgzaYTbyzq5acUPvrE3Q8", + "FTiL7Ab6yUpB7qB6q65JpgvkLrQrkZTVjX3vJXxoUkqH", + "Wf6VYpJhf9Grt5PqBYLSPBaN74F4w2DMEtEfTS7nq3V", + "2ifwdTp9QUcq8A6bsQqhbvrrFE8PnU2CMdMojep2dzgZ", + "82Qd9Av7VbFprweUnEVEZ8fywY8of26pQzh24s4H4mSL", + "8QTst9rBAqwNNMtAXquk8LmjpckFxUv8BEQVSahyMDyu", + "EiSJT3iCTHVesWL2ukf9CVwk8DLLQbpdNPzn7eZgn7BS", + "E9Ta56PcPFCJpiLQEbEovrg5sWggNjFm5pogZd7UZMV9", + "nhodHHFM9T5XmTvRMQKueBJh6eUVCEw5MhtDNagCoS8", + "CCjPcKavFrw8mBmMY5ANCypVAjeQvch1QS1Z74Bj4m66", + "FB5DLSh9eE4M9fAY62FS5DNcPW2JEFwcPsZmZANgdzNj", + "6dZZ4sc4Hs5q2931ne4TR1Ekegwn1DRjmjxAqxfumNmH", + "2tC6wad8cTrcLkGFtzvot9czSjy6Jg1pviUykhrEkosv", + "2E7zgGWpmbWvUmiCNLTVyUVRRxoS4rt94pUcSZkdR1Ph", + "HK27oTbRF5Zg2DLPd3ET5FKZSjyAoLRym9wZoKfgAkbU", + "AvXCE3gvjcf1BPmrWbDJ7BY4eePwnXcQ76tpdFGRGHxM", + "BTu2ptLLMXcVYoQYZWWTnn2FFtgR31hf9Eo12hHB58uf", + "BBUwKZTH642cx5SHZd7g1qUgGRXYW59JiEhmjnTEUoi9", + "AeKgqDHpBu1SM6ekNrM4Vm2AZa8wkzkZKAPZRLWv4u8t", + "Fmo2rmLkgPYrNy2VwnEaBYgs6rh6jJD1G1ptVmYnnndd", + "3mxR89PfCWye9Fo7fyki25ubzDnAmS9AQjHmZUMVHsud", + "HUqrXzXqttzBjChDhHLiBuk2wbuGMRqPaBHDeNae69PP", + "EKEhkrSrpruKCtgv9mFyeqnZTi4TxhKesCREF9yTcepk", + "5czrdzrsbqeV3SkYbwEQGAEBG4ThFzkfJZmsaRNKbGsJ", + "BkNMjcaHy9xVTfHNfPxfMSqmotsSsf6njmmjJd9E3ayH", + "8hmsvPesandvUrPNdEvYA2g8U3vZfWq2stywF3Ca5TEg", + "4NwhgvCYWBHb27FRHRdb2GiNW2xzww8mSD4SAtDDDEZU", + "6x4ZyAMQ5Lam2sDmGzVym2GdjMNAmseUc9MSbLTTdfmv", + "9A6FDPsP1C256akJUuheexE2W7WeovvpwLPb2jUnLUDK", + "Cvbip8WAghcGxMvpLxiBduutweJjmq7VXd2TXUQ8PSMh", + "6GWcq4hMtrHHBSd3vDSQC1rs9Cy36rGhk2HjD9XmsytK", + "B7EhUTi65sMD4xPgBjwhXeX3F91vnb3WHCvHfYcGa8qc", + "8jrp9cBekXPEDZfR979ttxG3FxYB7fWkMjHUa3b9Ljth", + "7s1zs85aLgGXBa92M8xzLWwS34GRoxZQTdHaFYMaD5fp", + "HtRpoDNv6vLDLajMcEa2M1sBamaSY1wAxJgcLXWXAFao", + "CsAt6ttT14xbUPDHza9nQkKnd1AYcmGABbBpWWyqYf1S", + "H8ZhSsbeckLf5Ukfswu8W2PxdwC9p2S3Esaqpad7CYp9", + "6JxBB9KEGqa1k2s1SxQagL7tK6BU2rHQdxzYEiTnafpp", + "7jY2eVK7ebKmBULQq1S4ZSAaqFgxTvtmUvcieMKdKc9j", + "AXRh5HE3jCAU5d2NaZB9rNhmH9baUDzsStRRrgBb4tZa", + "4Mcpypis6dFEpvZXGLsYub9ndnc9AQy1c2Wx33v9EaVi", + "299xNEuEduyxQyH4FtZXan4QzqgVcijY4KSd36GaJxAu", + "3x7FbiNmRQEag4Vuii6NorpptsFHsLjDttQXUgUvzhvt", + "Bumj6J2Tu4etqKfMg5u4hSc6ejFdpzKMeSkt8EtSgMxD", + "HTwm8XTzms6HJQ3Wogg3gW8SCzXAYpSuVv1da2yBGQvn", + "GNDiB22Bp95nyuf6ZmhE2smM7wM4Wxy5F4XhZPhRtY5x", + "GGm3bw9ZGeYxDyX6kknp99NqBNx6Uip2e2W35Mn1PXAp", + "CYzCHkBXt832UE872QC8WB9RkuuCMmaCzMVXm3UtJVhB", + "Vc4CqKXx88imzo457WTkwJyqo9eDXEKE9dJiDpKoZo8", + "AY2WoofcD28oe38RexuhFvQFJ7sqgkGWKJWKEQ6BdAYP", + "3kK4gvxEfFqUfEbUYnStWu3v3JPz31hyrnKzxEviEwFg", + "75aCecXHPgSBEhEZdFtCmo7AMFkHLeP4jK1Dk7MZqTkC", + "DC5oWJDNf7pmJyMYvdThSvpAFT345wpTSvzQmPzTHMn3", + "36txzL16DEoj6Ty9KYz1o5EHZBYkWeHBuamo1CGmWDJV", + "5xdVeNXt3339hu1RcTs8jdDeyyB7xxULAKNsjYrVn2Cp", + "59ss3MBo9PjU8DA5jRrX6mwSp7eKNuPvwSFVbZvASQ6P", + "7ThYuQhNk8iH4z1Z93AC6Td87hDKZkK78opCyj9w6TbY", + "GHLK2eAJMVTZ1PemAeMLtJFUEFhN5ggtvxRghTKgn5ZX", + "Fxd4G9ywB1pMGgddgpF8y3JfNfbSaPBcAeL9JnDF8xbK", + "Gs72fa1YswvikdCiviazFoJjTSfZMuWBoJKZRZGBzyKG", + "E5WnF5evq8CLw4aM7N9qzraceiMnoHZQL24DBBJxQLUf", + "9eLXpRF2BBd6SZ24j3g4QxJtt6AxMyULLXeAzsG5Dxfc", + "H6Ctg1Kp91F4yBvaYK1LwNgurbNTzpEsm6EUuSgZbVA1", + "5KMaaxeuho8Dm1egQWCvYzDo1TW6WJ9sPoJHHqAEP5Fq", + "DCiYrEtuztPRWfiF39bfSNpeBbUrKprmzXDRQRdXkRbT", + "CY7MeTPhqgTNij43DBXSAK6J7n4gWWxJWgCNu8gNak9w", + "4ugWThTTLoVJfKN7D3e23rpAKuJvcoitjyBgu92shB9N", + "37xNJuHwB9dvdKT1vgQ3GyH8CxsAKe1JShFTN2ps5K1H", + "5fyGMXoGDNVoCHK7E7ud2kigjmGx831GXbir46E7sthT", + "BqJWa8rS24RYvqv5LUPDKkfRh42e82mKgxxmduBcTw5B", + "AZCEEhTjnCS5CJ98DkLT1WaFJPMYnb6zbXA6fLiGhSGU", + "2dE9paZ5mBuhJdJr954xRLXJs8vQLTzCrKRkzGeL91z9", + "GfyU8x9UrqNUNZdLgJTBnhFmCwDShHoZ3fDVFq3FriWb", + "8rmsrDRuuq53y4pMi6AP3WuMrLw7kKHJSBBwVAdiVHtz", + "2hFTGCshRFfFoZXNZYNEUtmMPAcMoxEKWiogkekH2A8U", + "3ppWgzRovXB2gsW5xQcfjq4bhKLrQq8eTUMaYgAZ5seg", + "4MRQQVvzPF78g9kRDhFMcs5buU62v4yPJfNu2BLviRT8", + "HwUScS8RaVP41zyPrun5NjAs225xppYaTRf1J54kRFxc", + "CyJ1q54tW9vWCNrFQAUo7i6tnnXAaJWhx4eeMzLJfeuB", + "6UoGrdG5bi8qc3J8g2UKoRTcrXJRSe2ZgFCU5ZCGy5mY", + "N1XU1ndqGv2MzrbmXJ4iY74gs7kxFL184bjT5vdz4ja", + "DptVMryAbFUB7rAy3Qc5RkXYKxj5T6btPqwdgL9w2UDV", + "6f8hFVczMZhRrve5dhtjYbqREzs6C2oT2XmfxvDkHyQu", + "AcPhYcoWKnqr98JLgg4dQk7EQovvJPrVCfEzRztqvDGr", + "9Ttdz98wSXVRLV2TZQt5fRkwKi2R7sCKBgz2KGTCEMLv", + "7Ugxuy4wuTHap9cPPwLap25XNUbpTUqrnQ7bDiH4eEsp", + "5HR6JWhBfGKxagDqVbqZtb4pYzswwngUwbfutfhCUupo", + "7JgUYoymSMmFPKRoZtfACYWET5xe6uGig9UiuAUae2Qu", + "AUxFYA8rCGxwRBpmhKWARTZRPWndAdDKaf19vJ3SPwbA", + "HiZE4HGRRLNaVRCEKwTq57im2e4ZAUsQo3TSrKJoxULY", + "2NgHQZTqouonTqr71CV1AVMVqeVXfXxfSNz5qxJb5iZD", + "3GnmRqrSXxgs2GRJmJAXXsSys7DCHx15eSzuRDp5puAw", + "A61LGy4EGKMN1TEy1UdefbQtYBK3D1GY28viE6rhiD6M", + "61Vp6kvZfz53FKNQJ7At9n14Y4mFZxyGt9KZD6kV6Dxd", + "Br1V18yM8c7xxuSXa86ZangXFZmkeV1KB3ccgUccjsaj", + "BUAKru3Z17uqxjbWW6VchcQ5Vji7CuJT6s7zuGieyBAx", + "3NyM6VQjbcs4KCEjMUH9UkSUHTu9LSxeEuq6pyxgfEkW", + "72P7mq3bueuX83UvVtrC73ex6a3mNjiK8Pggzs1a3iz3", + "2vJeusvZ6TS62NdUSGpUff9NTQatSZkrVcoxdAJqVyLj", + "q7yeJ8P1sHtZzbMh874g4rZrFiujbzfRNyGFghKCbP3", +]; -export function NewMultisigDialog({ - open, - onClose, -}: { - open: boolean; - onClose: () => void; -}) { - const history = useHistory(); - const multisigClient = useMultisigProgram(); - const { enqueueSnackbar } = useSnackbar(); - const [threshold, setThreshold] = useState(2); - // @ts-ignore - const zeroAddr = new PublicKey("11111111111111111111111111111111").toString(); - const [participants, setParticipants] = useState([zeroAddr]); - const _onClose = () => { - onClose(); - setThreshold(2); - setParticipants([zeroAddr, zeroAddr]); - }; - const [maxParticipantLength, setMaxParticipantLength] = useState(10); - const disableCreate = maxParticipantLength < participants.length; - const createMultisig = async () => { - enqueueSnackbar("Creating multisig", { - variant: "info", - }); - const multisig = new Account(); - // Disc. + threshold + nonce. - const baseSize = 8 + 8 + 1 + 4; - // Add enough for 2 more participants, in case the user changes one's - /// mind later. - const fudge = 64; - // Can only grow the participant set by 2x the initialized value. - const ownerSize = maxParticipantLength * 32 + 8; - const multisigSize = baseSize + ownerSize + fudge; - const [, nonce] = await PublicKey.findProgramAddress( - [multisig.publicKey.toBuffer()], - multisigClient.programId - ); - const owners = participants.map((p) => new PublicKey(p)); - const tx = await multisigClient.rpc.createMultisig( - owners, - new BN(threshold), - nonce, - { - accounts: { - multisig: multisig.publicKey, - rent: SYSVAR_RENT_PUBKEY, - }, - signers: [multisig], - instructions: [ - await multisigClient.account.multisig.createInstruction( - multisig, - // @ts-ignore - multisigSize - ), - ], - } - ); - enqueueSnackbar(`Multisig created: ${multisig.publicKey.toString()}`, { - variant: "success", - action: , - }); - _onClose(); - history.push(`/${multisig.publicKey.toString()}`); - }; - return ( - - - - New Multisig - - - - setThreshold(parseInt(e.target.value) as number)} - /> - setMaxParticipantLength(parseInt(e.target.value) as number)} - /> - {participants.map((p, idx) => ( - { - const p = [...participants]; - p[idx] = e.target.value; - setParticipants(p); - }} - /> - ))} -
- { - const p = [...participants]; - // @ts-ignore - p.push(new PublicKey("11111111111111111111111111111111").toString()); - setParticipants(p); - }} - > - - -
-
- - - - -
- ); -} - -function TxListItem({ - multisig, - multisigAccount, - tx, +// NEW TRANSACTION +function AddTransactionDialog({ + multisig, + open, + onClose, + didAddTransaction, }: { - multisig: PublicKey; - multisigAccount: any; - tx: any; + multisig: PublicKey; + open: boolean; + onClose: () => void; + didAddTransaction: (tx: PublicKey) => void; }) { - const { enqueueSnackbar } = useSnackbar(); - const multisigClient = useMultisigProgram(); - const [open, setOpen] = useState(false); - const [txAccount, setTxAccount] = useState(tx.account); - useEffect(() => { - multisigClient.account.transaction - .subscribe(tx.publicKey) - .on("change", (account) => { - setTxAccount(account); - }); - }, [multisigClient, multisig, tx.publicKey]); - const rows = [ - { - field: "Program ID", - value: txAccount.programId.toString(), - }, - { - field: "Did execute", - value: txAccount.didExecute.toString(), - }, - { - field: "Instruction data", - value: ( - - {encodeBase64(txAccount.data)} - - ), - }, - { - field: "Multisig", - value: txAccount.multisig.toString(), - }, - { - field: "Transaction account", - value: tx.publicKey.toString(), - }, - { - field: "Owner set seqno", - value: txAccount.ownerSetSeqno.toString(), - }, - ]; - const msAccountRows = multisigAccount.owners.map( - (owner: PublicKey, idx: number) => { - return { - field: owner.toString(), - value: txAccount.signers[idx] ? : , - }; - } - ); - const approve = async () => { - enqueueSnackbar("Approving transaction", { - variant: "info", - }); - await multisigClient.rpc.approve({ - accounts: { - multisig, - transaction: tx.publicKey, - owner: multisigClient.provider.wallet.publicKey, - }, - }); - enqueueSnackbar("Transaction approved", { - variant: "success", - }); - }; - const execute = async () => { - enqueueSnackbar("Executing transaction", { - variant: "info", - }); - const [multisigSigner] = await PublicKey.findProgramAddress( - [multisig.toBuffer()], - multisigClient.programId - ); - await multisigClient.rpc.executeTransaction({ - accounts: { - multisig, - multisigSigner, - transaction: tx.publicKey, - }, - remainingAccounts: txAccount.accounts - .map((t: any) => { - if (t.pubkey.equals(multisigSigner)) { - return { ...t, isSigner: false }; - } - return t; - }) - .concat({ - pubkey: txAccount.programId, - isWritable: false, - isSigner: false, - }), - }); - enqueueSnackbar("Transaction executed", { - variant: "success", - }); - }; - return ( - <> - setOpen(!open)} key={tx.publicKey.toString()}> - {icon(tx, multisigClient)} - {ixLabel(tx, multisigClient)} - {txAccount.didExecute && ( - - )} - {open ? : } - - -
-
- - -
- - - - - - Transaction Field - Value - - - - {rows.map((r) => ( - - {r.field} - {r.value} - - ))} - -
-
-
- - - - - - Multisig Owner - Did Sign - - - - {txAccount.ownerSetSeqno === multisigAccount.ownerSetSeqno && - msAccountRows.map((r: any) => ( - - {r.field} - {r.value} - - ))} - -
- {txAccount.ownerSetSeqno !== multisigAccount.ownerSetSeqno && ( -
- - The owner set has changed since this transaction was created - -
- )} -
-
- - - - - -
-
- - ); + return ( + + + + New Transaction + + + + + Create a new transaction to be signed by the multisig. This + transaction will not execute until enough owners have signed the + transaction. + + + + {/* */} + + + + {/* */} + + + + + + + + + + + + + + + + ); } +// LABELS FOR TRANSACTIONS function ixLabel(tx: any, multisigClient: any) { - if (tx.account.programId.equals(BPF_LOADER_UPGRADEABLE_PID)) { - // Upgrade instruction. - if (tx.account.data.equals(Buffer.from([3, 0, 0, 0]))) { - return ( - - ); - } - } - if (tx.account.programId.equals(multisigClient.programId)) { - const setThresholdSighash = multisigClient.coder.sighash( - "global", - "change_threshold" - ); - if (setThresholdSighash.equals(tx.account.data.slice(0, 8))) { - return ( - - ); - } - const setOwnersSighash = multisigClient.coder.sighash( - "global", - "set_owners" - ); - if (setOwnersSighash.equals(tx.account.data.slice(0, 8))) { - return ( - - ); - } - } - if (tx.account.programId.equals(TOKEN_PROGRAM_ID)) { - const tag = tx.account.data.slice(0, 1); - const amountBuf = tx.account.data.slice(1, 9) as Buffer; - const amountParsed = u64.fromBuffer(amountBuf); - if (Buffer.from([3]).equals(tag)) { - return ( - - ); - } + // console.log(tx); + console.log("account length", tx.account.accounts.length); + console.log("data length", tx.account.data.length); + if (tx.account.programId.equals(BPF_LOADER_UPGRADEABLE_PID)) { + // Upgrade instruction. + if (tx.account.data.equals(Buffer.from([3, 0, 0, 0]))) { + return ( + + ); + } + } + // if (tx.account.programId.equals(multisigClient.programId)) { + // const setThresholdSighash = multisigClient.coder.sighash( + // "global", + // "change_threshold" + // ); + // if (setThresholdSighash.equals(tx.account.data.slice(0, 8))) { + // return ( + // + // ); + // } + // const setOwnersSighash = multisigClient.coder.sighash( + // "global", + // "set_owners" + // ); + // if (setOwnersSighash.equals(tx.account.data.slice(0, 8))) { + // return ( + // + // ); + // } + // } + if (tx.account.programId.equals(TOKEN_PROGRAM_ID)) { + const tag = tx.account.data.slice(0, 1); + const amountBuf = tx.account.data.slice(1, 9) as Buffer; + const amountInt = amountBuf.readBigInt64LE(); + // @ts-ignore + const amountParsed = Number(amountInt.toString()) / 1000000; + if (Buffer.from([3]).equals(tag)) { + return ( + + ); + } - if (Buffer.from([4]).equals(tag)) { - return ( - - ); - } + if (Buffer.from([4]).equals(tag)) { + return ( + + ); + } - if (Buffer.from([7]).equals(tag)) { - return ( - - ); - } - return ( - - ); - } - if (idl.IDL_TAG.equals(tx.account.data.slice(0, 8))) { - return ( - - ); - } - return ; -} - -function AccountsList({ accounts }: { accounts: any }) { - return ( - - - - Account - Writable - Signer - - - - {accounts.map((r: any) => ( - - {r.pubkey.toString()} - {r.isWritable.toString()} - {r.isSigner.toString()} - - ))} - -
- ); -} + if (Buffer.from([7]).equals(tag)) { + return ( + + ); + } + return ( + + ); + } + if (tx.account.programId.equals(config.clusterConfig.programId)) { + if (tx.account.accounts.length === 4 && tx.account.data.length === 8) { + return ( + + ); + // } else if (tx.account.accounts.length === 13) { + // return ( + // + // ); + } else if ( + tx.account.accounts.length === 6 && + tx.account.data.length === 20 + ) { + console.log("helloooo"); + // update credix pass newest version + const credixPassPk = tx.account.accounts[1].pubkey.toString(); + const active = tx.account.data.slice(8, 9)[0]; + const underwriter = tx.account.data.slice(9, 10)[0]; + const borrower = tx.account.data.slice(10, 11)[0]; + const releaseDateBuffer = tx.account.data.slice(11, 19) as Buffer; + // @ts-ignore + const releaseDateUnix = new BN(releaseDateBuffer.readBigInt64LE()); + const disableWithdrawalFee = tx.account.data.slice(19, 20)[0]; + let releaseDate; -function SignerDialog({ - multisig, - multisigAccount, - open, - onClose, -}: { - multisig: PublicKey; - multisigAccount: any; - open: boolean; - onClose: () => void; -}) { - const multisigClient = useMultisigProgram(); - const [signer, setSigner] = useState(null); - useEffect(() => { - PublicKey.findProgramAddress( - [multisig.toBuffer()], - multisigClient.programId - ).then((addrNonce) => setSigner(addrNonce[0].toString())); - }, [multisig, multisigClient.programId, setSigner, multisigClient]); - return ( - - - - Multisig Info - - - - - Program derived address: {signer}. This is the address one - should use as the authority for data governed by the multisig. - - - - - Owners - - - - {multisigAccount.owners.map((r: any) => ( - - {r.toString()} - - ))} - -
-
- - - -
- ); -} + if (releaseDateUnix.eq(new BN(0))) { + releaseDate = "no lockup"; + } else { + releaseDate = new Date(releaseDateUnix.toNumber() * 1000); + } -function AddTransactionDialog({ - multisig, - open, - onClose, - didAddTransaction, -}: { - multisig: PublicKey; - open: boolean; - onClose: () => void; - didAddTransaction: (tx: PublicKey) => void; -}) { - return ( - - - - New Transaction - - - - - Create a new transaction to be signed by the multisig. This - transaction will not execute until enough owners have signed the - transaction. - - - - - - - - - - - ); -} + return ( + + ); + } else if ( + tx.account.accounts.length === 8 && + tx.account.data.length === 19 + ) { + // create credix pass newest version + const credixPassPk = tx.account.accounts[1].pubkey.toString(); + const underwriter = tx.account.data.slice(8, 9)[0]; + const borrower = tx.account.data.slice(9, 10)[0]; + const releaseDateBuffer = tx.account.data.slice(10, 18) as Buffer; + // @ts-ignore + const releaseDateUnix = new BN(releaseDateBuffer.readBigInt64LE()); + const disableWithdrawalFee = tx.account.data.slice(18, 19)[0]; + let releaseDate; -function ChangeThresholdListItem({ - multisig, - onClose, - didAddTransaction, -}: { - multisig: PublicKey; - onClose: Function; - didAddTransaction: (tx: PublicKey) => void; -}) { - const [open, setOpen] = useState(false); - return ( - <> - setOpen((open) => !open)}> - - - - - {open ? : } - - - - - - ); -} + if (releaseDateUnix.eq(new BN(0))) { + releaseDate = "no lockup"; + } else { + releaseDate = new Date(releaseDateUnix.toNumber() * 1000); + } -function ChangeThresholdListItemDetails({ - multisig, - onClose, - didAddTransaction, -}: { - multisig: PublicKey; - onClose: Function; - didAddTransaction: (tx: PublicKey) => void; -}) { - const [threshold, setThreshold] = useState(2); - const multisigClient = useMultisigProgram(); - // @ts-ignore - const { enqueueSnackbar } = useSnackbar(); - const changeThreshold = async () => { - enqueueSnackbar("Creating change threshold transaction", { - variant: "info", - }); - const data = changeThresholdData(multisigClient, threshold); - const [multisigSigner] = await PublicKey.findProgramAddress( - [multisig.toBuffer()], - multisigClient.programId - ); - const accounts = [ - { - pubkey: multisig, - isWritable: true, - isSigner: false, - }, - { - pubkey: multisigSigner, - isWritable: false, - isSigner: true, - }, - ]; - const transaction = new Account(); - const txSize = 1000; // todo - const tx = await multisigClient.rpc.createTransaction( - multisigClient.programId, - accounts, - data, - { - accounts: { - multisig, - transaction: transaction.publicKey, - proposer: multisigClient.provider.wallet.publicKey, - rent: SYSVAR_RENT_PUBKEY, - }, - signers: [transaction], - instructions: [ - await multisigClient.account.transaction.createInstruction( - transaction, - // @ts-ignore - txSize - ), - ], - } - ); - enqueueSnackbar("Transaction created", { - variant: "success", - action: , - }); - didAddTransaction(transaction.publicKey); - onClose(); - }; - return ( -
- { - // @ts-ignore - setThreshold(e.target.value); - }} - /> -
- -
-
- ); + return ( + + ); + } else if (tx.account.data.length === 11) { + // update credix pass newest version + const credixPassPk = tx.account.accounts[1].pubkey.toString(); + return ( + + ); + } else if ( + tx.account.accounts.length === 10 && + tx.account.data.length === 9 + ) { + const investorPk = tx.account.accounts[1].pubkey.toString(); + return ( + + ); + } else if ( + tx.account.accounts.length === 2 && + tx.account.data.length === 44 + ) { + return ( + + ); + } else if ( + tx.account.accounts.length === 4 && + tx.account.data.length === 43 + ) { + return ( + + ); + } else if (tx.account.accounts.length === 8) { + return ( + + ); + } else if (tx.account.accounts.length === 4) { + return ( + + ); + } else if ( + tx.account.accounts.length === 6 && + tx.account.data.length === 8 + ) { + const dealPk = tx.account.accounts[2].pubkey.toString(); + return ( + + ); + } else if (tx.account.accounts.length === 3) { + return ( + + ); + } else if (tx.account.accounts.length === 6) { + console.log(tx); + return ( + + ); + } else if (tx.account.accounts.length === 19) { + const borrowerPk = tx.account.accounts[11].pubkey.toString(); + return ( + + ); + } else if (tx.account.accounts.length === 7) { + return ( + + ); + } else { + const borrowerPk = tx.account.accounts[9].pubkey.toString(); + return ( + + ); + } + } + // if (idl.IDL_TAG.equals(tx.account.data.slice(0, 8))) { + // return ( + // + // ); + // } + return ; } -function MultisigSetOwnersListItem({ - multisig, - onClose, - didAddTransaction, -}: { - multisig: PublicKey; - onClose: Function; - didAddTransaction: (tx: PublicKey) => void; -}) { - const [open, setOpen] = useState(false); - return ( - <> - setOpen((open) => !open)}> - - - - - {open ? : } - - - - - - ); +export default function Multisig({ multisig }: { multisig?: PublicKey }) { + return ( +
+ +
+ +
+
+ {multisig && } +
+ ); } -function SetOwnersListItemDetails({ - multisig, - onClose, - didAddTransaction, -}: { - multisig: PublicKey; - onClose: Function; - didAddTransaction: (tx: PublicKey) => void; -}) { - const multisigClient = useMultisigProgram(); - // @ts-ignore - const zeroAddr = new PublicKey("11111111111111111111111111111111").toString(); - const [participants, setParticipants] = useState([zeroAddr]); - const { enqueueSnackbar } = useSnackbar(); - const setOwners = async () => { - enqueueSnackbar("Creating setOwners transaction", { - variant: "info", - }); - const owners = participants.map((p) => new PublicKey(p)); - const data = setOwnersData(multisigClient, owners); - const [multisigSigner] = await PublicKey.findProgramAddress( - [multisig.toBuffer()], - multisigClient.programId - ); - const accounts = [ - { - pubkey: multisig, - isWritable: true, - isSigner: false, - }, - { - pubkey: multisigSigner, - isWritable: false, - isSigner: true, - }, - ]; - const transaction = new Account(); - const txSize = 5000; // TODO: tighter bound. - const tx = await multisigClient.rpc.createTransaction( - multisigClient.programId, - accounts, - data, - { - accounts: { - multisig, - transaction: transaction.publicKey, - proposer: multisigClient.provider.wallet.publicKey, - rent: SYSVAR_RENT_PUBKEY, - }, - signers: [transaction], - instructions: [ - await multisigClient.account.transaction.createInstruction( - transaction, - // @ts-ignore - txSize - ), - ], - } - ); - if (!tx) { - return; - } - enqueueSnackbar("Transaction created", { - variant: "success", - action: , - }); - didAddTransaction(transaction.publicKey); - onClose(); - }; - return ( -
- {participants.map((p, idx) => ( - { - const p = [...participants]; - p[idx] = e.target.value; - setParticipants(p); - }} - /> - ))} -
- { - const p = [...participants]; - // @ts-ignore - p.push(new PublicKey("11111111111111111111111111111111").toString()); - setParticipants(p); - }} - > - - -
-
- -
-
- ); -} +const BPF_LOADER_UPGRADEABLE_PID = new PublicKey( + "BPFLoaderUpgradeab1e11111111111111111111111" +); -function IdlUpgradeListItem({ - multisig, - onClose, - didAddTransaction, -}: { - multisig: PublicKey; - onClose: Function; - didAddTransaction: (tx: PublicKey) => void; -}) { - const [open, setOpen] = useState(false); - return ( - <> - setOpen((open) => !open)}> - - - - - {open ? : } - - - - - - ); +function NewMultisigButton() { + const [open, setOpen] = useState(false); + return ( +
+ setOpen(true)} + > + + + setOpen(false)} /> +
+ ); } -function UpgradeIdlListItemDetails({ - multisig, - onClose, - didAddTransaction, -}: { - multisig: PublicKey; - onClose: Function; - didAddTransaction: (tx: PublicKey) => void; -}) { - - const [programId, setProgramId] = useState(null); - const [buffer, setBuffer] = useState(null); - - const multisigClient = useMultisigProgram(); - const { enqueueSnackbar } = useSnackbar(); - const createTransactionAccount = async () => { - enqueueSnackbar("Creating transaction", { - variant: "info", - }); - const programAddr = new PublicKey(programId as string); - const bufferAddr = new PublicKey(buffer as string); - const idlAddr = await idlAddress(programAddr); - const [multisigSigner] = await PublicKey.findProgramAddress( - [multisig.toBuffer()], - multisigClient.programId - ); - const data = idl.encodeInstruction({ setBuffer: {} }); - const accs = [ - { - pubkey: bufferAddr, - isWritable: true, - isSigner: false, - }, - { pubkey: idlAddr, isWritable: true, isSigner: false }, - { pubkey: multisigSigner, isWritable: true, isSigner: false }, - ]; - const txSize = 1000; // TODO: tighter bound. - const transaction = new Account(); - const tx = await multisigClient.rpc.createTransaction( - programAddr, - accs, - data, - { - accounts: { - multisig, - transaction: transaction.publicKey, - proposer: multisigClient.provider.wallet.publicKey, - rent: SYSVAR_RENT_PUBKEY, - }, - signers: [transaction], - instructions: [ - await multisigClient.account.transaction.createInstruction( - transaction, - // @ts-ignore - txSize - ), - ], - } - ); - enqueueSnackbar("Transaction created", { - variant: "success", - action: , - }); - didAddTransaction(transaction.publicKey); - onClose(); - }; - - return ( -
- setProgramId(e.target.value as string)} - /> - setBuffer(e.target.value as string)} - /> -
- -
-
- ); +export function MultisigInstance({ multisig }: { multisig: PublicKey }) { + const [multisigClient, credixClient, provider] = useMultisigProgram(); + const [multisigAccount, setMultisigAccount] = useState(undefined); + const [transactions, setTransactions] = useState(null); + const [showSignerDialog, setShowSignerDialog] = useState(false); + const [showAddTransactionDialog, setShowAddTransactionDialog] = + useState(false); + const [forceRefresh, setForceRefresh] = useState(false); + useEffect(() => { + multisigClient.account.multisig + .fetch(multisig) + .then((account: any) => { + setMultisigAccount(account); + }) + .catch((err: any) => { + console.error(err); + setMultisigAccount(null); + }); + }, [multisig, multisigClient.account]); + useEffect(() => { + multisigClient.account.transaction + .all(multisig.toBuffer()) + .then((txs) => { + txs.sort((a, b) => + !a.account.didExecute && b.account.didExecute ? -1 : 1 + ); + var txsFiltered = txs.filter(function (tx) { + return !NO_SHOW_LIST.includes(tx.publicKey.toString()); + }); + setTransactions(txsFiltered); + }) + .catch((err) => console.log("error", err)); + }, [multisigClient.account.transaction, multisig, forceRefresh]); + useEffect(() => { + multisigClient.account.multisig + .subscribe(multisig) + .on("change", (account) => { + setMultisigAccount(account); + }); + }, [multisigClient, multisig]); + return ( + +
+ + {multisigAccount === undefined ? ( +
+ +
+ ) : multisigAccount === null ? ( + + + Multisig not found + + + ) : ( + <> + )} +
+ {multisigAccount && ( + + + + + {multisig.toString()} | {multisigAccount.threshold.toString()}{" "} + of {multisigAccount.owners.length.toString()} Multisig + + + setShowSignerDialog(true)}> + + + + + setShowAddTransactionDialog(true)}> + + + + + + + {transactions === null ? ( +
+ +
+ ) : transactions.length === 0 ? ( + + + + ) : ( + // eslint-disable-next-line array-callback-return + transactions.map((tx: any) => { + if ( + !tx.account.didExecute && + multisigAccount.ownerSetSeqno === tx.account.ownerSetSeqno + ) { + console.log(tx.publicKey.toString()); + return ( + + ); + } + }) + )} +
+
+ )} +
+ setShowAddTransactionDialog(false)} + didAddTransaction={() => setForceRefresh(!forceRefresh)} + /> + {multisigAccount && ( + setShowSignerDialog(false)} + /> + )} +
+ ); } -function ProgramUpdateListItem({ - multisig, - onClose, - didAddTransaction, +export function NewMultisigDialog({ + open, + onClose, }: { - multisig: PublicKey; - onClose: Function; - didAddTransaction: (tx: PublicKey) => void; + open: boolean; + onClose: () => void; }) { - const [open, setOpen] = useState(false); - return ( - <> - setOpen((open) => !open)}> - - - - - {open ? : } - - - - - - ); + const navigate = useNavigate(); + const [multisigClient, credixClient, provider] = useMultisigProgram(); + const { enqueueSnackbar } = useSnackbar(); + const [threshold, setThreshold] = useState(2); + // @ts-ignore + const zeroAddr = new PublicKey("11111111111111111111111111111111").toString(); + const [participants, setParticipants] = useState([zeroAddr]); + const _onClose = () => { + onClose(); + setThreshold(2); + setParticipants([zeroAddr, zeroAddr]); + }; + const [maxParticipantLength, setMaxParticipantLength] = useState(10); + const disableCreate = maxParticipantLength < participants.length; + const createMultisig = async () => { + enqueueSnackbar("Creating multisig", { + variant: "info", + }); + const multisig = new Account(); + // Disc. + threshold + nonce. + const baseSize = 8 + 8 + 1 + 4; + // Add enough for 2 more participants, in case the user changes one's + /// mind later. + const fudge = 64; + // Can only grow the participant set by 2x the initialized value. + const ownerSize = maxParticipantLength * 32 + 8; + const multisigSize = baseSize + ownerSize + fudge; + const [, nonce] = await PublicKey.findProgramAddress( + [multisig.publicKey.toBuffer()], + multisigClient.programId + ); + const owners = participants.map((p) => new PublicKey(p)); + const tx = await multisigClient.rpc.createMultisig( + owners, + new BN(threshold), + nonce, + { + accounts: { + multisig: multisig.publicKey, + rent: SYSVAR_RENT_PUBKEY, + }, + signers: [multisig], + instructions: [ + await multisigClient.account.multisig.createInstruction( + multisig, + // @ts-ignore + multisigSize + ), + ], + } + ); + enqueueSnackbar(`Multisig created: ${multisig.publicKey.toString()}`, { + variant: "success", + action: , + }); + _onClose(); + navigate(`/${multisig.publicKey.toString()}`); + }; + return ( + + + + New Multisig + + + + setThreshold(parseInt(e.target.value) as number)} + /> + + setMaxParticipantLength(parseInt(e.target.value) as number) + } + /> + {participants.map((p, idx) => ( + { + const p = [...participants]; + p[idx] = e.target.value; + setParticipants(p); + }} + /> + ))} +
+ { + const p = [...participants]; + // @ts-ignore + p.push( + new PublicKey("11111111111111111111111111111111").toString() + ); + setParticipants(p); + }} + > + + +
+
+ + + + +
+ ); } -const BPF_LOADER_UPGRADEABLE_PID = new PublicKey( - "BPFLoaderUpgradeab1e11111111111111111111111" -); - -function UpgradeProgramListItemDetails({ - multisig, - onClose, - didAddTransaction, +function TxListItem({ + multisig, + multisigAccount, + tx, }: { - multisig: PublicKey; - onClose: Function; - didAddTransaction: (tx: PublicKey) => void; + multisig: PublicKey; + multisigAccount: any; + tx: any; }) { - const [programId, setProgramId] = useState(null); - const [buffer, setBuffer] = useState(null); - - const multisigClient = useMultisigProgram(); - const { enqueueSnackbar } = useSnackbar(); - const createTransactionAccount = async () => { - enqueueSnackbar("Creating transaction", { - variant: "info", - }); - const programAddr = new PublicKey(programId as string); - const bufferAddr = new PublicKey(buffer as string); - // Hard code serialization. - const data = Buffer.from([3, 0, 0, 0]); - - const programAccount = await (async () => { - const programAccount = await multisigClient.provider.connection.getAccountInfo( - programAddr - ); - if (programAccount === null) { - throw new Error("Invalid program ID"); - } - return { - // Hard code deserialization. - programdataAddress: new PublicKey(programAccount.data.slice(4)), - }; - })(); - const spill = multisigClient.provider.wallet.publicKey; - const [multisigSigner] = await PublicKey.findProgramAddress( - [multisig.toBuffer()], - multisigClient.programId - ); - const accs = [ - { - pubkey: programAccount.programdataAddress, - isWritable: true, - isSigner: false, - }, - { pubkey: programAddr, isWritable: true, isSigner: false }, - { pubkey: bufferAddr, isWritable: true, isSigner: false }, - { pubkey: spill, isWritable: true, isSigner: false }, - { pubkey: SYSVAR_RENT_PUBKEY, isWritable: false, isSigner: false }, - { pubkey: SYSVAR_CLOCK_PUBKEY, isWritable: false, isSigner: false }, - { pubkey: multisigSigner, isWritable: false, isSigner: false }, - ]; - const txSize = 1000; // TODO: tighter bound. - const transaction = new Account(); - const tx = await multisigClient.rpc.createTransaction( - BPF_LOADER_UPGRADEABLE_PID, - accs, - data, - { - accounts: { - multisig, - transaction: transaction.publicKey, - proposer: multisigClient.provider.wallet.publicKey, - rent: SYSVAR_RENT_PUBKEY, - }, - signers: [transaction], - instructions: [ - await multisigClient.account.transaction.createInstruction( - transaction, - // @ts-ignore - txSize - ), - ], - } - ); - enqueueSnackbar("Transaction created", { - variant: "success", - action: , - }); - didAddTransaction(transaction.publicKey); - onClose(); - }; - - return ( -
- setProgramId(e.target.value as string)} - /> - setBuffer(e.target.value as string)} - /> -
- -
-
- ); + const { enqueueSnackbar } = useSnackbar(); + const [multisigClient, credixClient, provider] = useMultisigProgram(); + const [open, setOpen] = useState(false); + const [txAccount, setTxAccount] = useState(tx.account); + useEffect(() => { + multisigClient.account.transaction + .subscribe(tx.publicKey) + .on("change", (account) => { + setTxAccount(account); + }); + }, [multisigClient, multisig, tx.publicKey]); + const rows = [ + { + field: "Program ID", + value: txAccount.programId.toString(), + }, + { + field: "Did execute", + value: txAccount.didExecute.toString(), + }, + { + field: "Instruction data", + value: ( + + {encodeBase64(txAccount.data)} + + ), + }, + { + field: "Multisig", + value: txAccount.multisig.toString(), + }, + { + field: "Transaction account", + value: tx.publicKey.toString(), + }, + { + field: "Owner set seqno", + value: txAccount.ownerSetSeqno.toString(), + }, + ]; + const msAccountRows = multisigAccount.owners.map( + (owner: PublicKey, idx: number) => { + return { + field: owner.toString(), + value: txAccount.signers[idx] ? : , + }; + } + ); + const approve = async () => { + enqueueSnackbar("Approving transaction", { + variant: "info", + }); + //@ts-ignore + await multisigClient.rpc.approve({ + accounts: { + multisig, + transaction: tx.publicKey, + owner: multisigClient.provider.publicKey, + }, + }); + enqueueSnackbar("Transaction approved", { + variant: "success", + }); + }; + const execute = async () => { + enqueueSnackbar("Executing transaction", { + variant: "info", + }); + const [multisigSigner] = await PublicKey.findProgramAddress( + [multisig.toBuffer()], + multisigClient.programId + ); + await multisigClient.rpc.executeTransaction({ + accounts: { + multisig, + multisigSigner, + transaction: tx.publicKey, + }, + remainingAccounts: txAccount.accounts + .map((t: any) => { + if (t.pubkey.equals(multisigSigner)) { + return { ...t, isSigner: false }; + } + return t; + }) + .concat({ + pubkey: txAccount.programId, + isWritable: false, + isSigner: false, + }), + }); + enqueueSnackbar("Transaction executed", { + variant: "success", + }); + }; + return ( + <> + setOpen(!open)} + key={tx.publicKey.toString()} + > + {icon(tx, multisigClient)} + {ixLabel(tx, multisigClient)} + {txAccount.didExecute && ( + + )} + {open ? : } + + +
+
+ + +
+ + + + + + Transaction Field + Value + + + + {rows.map((r) => ( + + {r.field} + + {r.value} + + + ))} + +
+
+
+ + + + + + Multisig Owner + Did Sign + + + + {txAccount.ownerSetSeqno === multisigAccount.ownerSetSeqno && + msAccountRows.map((r: any) => ( + + {r.field} + {r.value} + + ))} + +
+ {txAccount.ownerSetSeqno !== multisigAccount.ownerSetSeqno && ( +
+ + The owner set has changed since this transaction was created + +
+ )} +
+
+ + + + + +
+
+ + ); } -function TransferTokenListItem({ - multisig, - onClose, - didAddTransaction, -}: { - multisig: PublicKey; - onClose: Function; - didAddTransaction: (tx: PublicKey) => void; -}) { - const [open, setOpen] = useState(false); - return ( - <> - setOpen((open) => !open)}> - - - - - {open ? : } - - - - - - ); +function AccountsList({ accounts }: { accounts: any }) { + return ( + + + + Account + Writable + Signer + + + + {accounts.map((r: any) => ( + + {r.pubkey.toString()} + {r.isWritable.toString()} + {r.isSigner.toString()} + + ))} + +
+ ); } -function TransferTokenListItemDetails({ - multisig, - onClose, - didAddTransaction, +function SignerDialog({ + multisig, + multisigAccount, + open, + onClose, }: { - multisig: PublicKey; - onClose: Function; - didAddTransaction: (tx: PublicKey) => void; + multisig: PublicKey; + multisigAccount: any; + open: boolean; + onClose: () => void; }) { - const [source, setSource] = useState(null); - const [destination, setDestination] = useState(null); - const [amount, setAmount] = useState(null); - - - const multisigClient = useMultisigProgram(); - const { enqueueSnackbar } = useSnackbar(); - - const tokenAccounts = useMultiSigOwnedTokenAccounts(multisigClient.provider, multisig, multisigClient.programId) - - const createTransactionAccount = async () => { - enqueueSnackbar("Creating transaction", { - variant: "info", - }); - const sourceAddr = new PublicKey(source as string); - const destinationAddr = new PublicKey(destination as string); - const [multisigSigner] = await PublicKey.findProgramAddress( - [multisig.toBuffer()], - multisigClient.programId - ); - const sourceTokenAccount = await getTokenAccount( - multisigClient.provider, - sourceAddr, - ); - - const destinationAccountInfo = await multisigClient.provider.connection.getAccountInfo( - destinationAddr - ); - - if (destinationAccountInfo === null || destinationAccountInfo.owner.toString() !== TOKEN_PROGRAM_ID.toString() || destinationAccountInfo.data.length !== ACCOUNT_LAYOUT.span) { - debugger - enqueueSnackbar("Not token account", { - variant: "error", - }); - return; - } - - const destinationTokenAccount = await getTokenAccount( - multisigClient.provider, - destinationAddr - ); - - if (sourceTokenAccount.mint.toBase58() !== destinationTokenAccount.mint.toBase58()) { - enqueueSnackbar("Token mint does not match", { - variant: "error", - }); - return; - } - - const tokenMint = await getMintInfo( - multisigClient.provider, sourceTokenAccount.mint); - - if (!amount) { - enqueueSnackbar("No amount provided", { - variant: "warning", - }); - return; - } - const TEN = new u64(10); - const multiplier = TEN.pow(new BN(tokenMint.decimals)); - const amountInLamports = amount.mul(multiplier); - const transferIx = Token.createTransferInstruction( - TOKEN_PROGRAM_ID, - sourceAddr, - destinationAddr, - multisigSigner, - [], - new u64(amountInLamports.toString()) - ); - const transaction = new Account(); - const tx = await multisigClient.rpc.createTransaction( - TOKEN_PROGRAM_ID, - transferIx.keys, - Buffer.from(transferIx.data), - { - accounts: { - multisig, - transaction: transaction.publicKey, - proposer: multisigClient.provider.wallet.publicKey, - rent: SYSVAR_RENT_PUBKEY, - }, - signers: [transaction], - instructions: [ - await multisigClient.account.transaction.createInstruction( - transaction, - // @ts-ignore - 1000 - ), - ], - } - ); - enqueueSnackbar("Transaction created", { - variant: "success", - action: , - }); - didAddTransaction(transaction.publicKey); - onClose(); - }; - - return ( -
- - Source Token Account - - setAmount(new u64(e.target.value as string))} - /> - setDestination(e.target.value as string)} - /> - - -
- -
-
- ); + const [multisigClient, credixClient, provider] = useMultisigProgram(); + const [signer, setSigner] = useState(null); + useEffect(() => { + PublicKey.findProgramAddress( + [multisig.toBuffer()], + multisigClient.programId + ).then((addrNonce) => setSigner(addrNonce[0].toString())); + }, [multisig, multisigClient.programId, setSigner, multisigClient]); + return ( + + + + Multisig Info + + + + + Program derived address: {signer}. This is the address one + should use as the authority for data governed by the multisig. + + + + + Owners + + + + {multisigAccount.owners.map((r: any) => ( + + {r.toString()} + + ))} + +
+
+ + + +
+ ); } // @ts-ignore function icon(tx, multisigClient) { - if (tx.account.programId.equals(BPF_LOADER_UPGRADEABLE_PID)) { - return ; - } - if (tx.account.programId.equals(multisigClient.programId)) { - const setThresholdSighash = multisigClient.coder.sighash( - "global", - "change_threshold" - ); - if (setThresholdSighash.equals(tx.account.data.slice(0, 8))) { - return ; - } - const setOwnersSighash = multisigClient.coder.sighash( - "global", - "set_owners" - ); - if (setOwnersSighash.equals(tx.account.data.slice(0, 8))) { - return ; - } - } - if (tx.account.programId.equals(TOKEN_PROGRAM_ID)) { - return - } - if (idl.IDL_TAG.equals(tx.account.data.slice(0, 8))) { - return ; - } - return ; -} - -// @ts-ignore -function changeThresholdData(multisigClient, threshold) { - return multisigClient.coder.instruction.encode("change_threshold", { - threshold: new BN(threshold), - }); + if (tx.account.programId.equals(BPF_LOADER_UPGRADEABLE_PID)) { + return ; + } + // if (tx.account.programId.equals(multisigClient.programId)) { + // const setThresholdSighash = multisigClient.coder.sighash( + // "global", + // "change_threshold" + // ); + // if (setThresholdSighash.equals(tx.account.data.slice(0, 8))) { + // return ; + // } + // const setOwnersSighash = multisigClient.coder.sighash( + // "global", + // "set_owners" + // ); + // if (setOwnersSighash.equals(tx.account.data.slice(0, 8))) { + // return ; + // } + // } + if (tx.account.programId.equals(TOKEN_PROGRAM_ID)) { + return ; + } + // if (idl.IDL_TAG.equals(tx.account.data.slice(0, 8))) { + // return ; + // } + return ( + Credix Logo + ); } -// @ts-ignore -function setOwnersData(multisigClient, owners) { - return multisigClient.coder.instruction.encode("set_owners", { - owners, - }); -} - - // Deterministic IDL address as a function of the program id. async function idlAddress(programId: PublicKey): Promise { - const base = (await PublicKey.findProgramAddress([], programId))[0]; - return await PublicKey.createWithSeed(base, seed(), programId); + const base = (await PublicKey.findProgramAddress([], programId))[0]; + return await PublicKey.createWithSeed(base, seed(), programId); } // Seed for generating the idlAddress. function seed(): string { - return "anchor:idl"; + return "anchor:idl"; } export async function getOwnedTokenAccounts( - connection: Connection, - publicKey: PublicKey, -): Promise { - const accounts = await connection.getProgramAccounts( - TOKEN_PROGRAM_ID, - { - filters: [ - { - memcmp: { - offset: 32, - bytes: publicKey.toBase58(), - } - }, - { - dataSize: AccountLayout.span, - } - ] - } - ); - return ( - accounts - .map(r => { - const tokenAccount = parseTokenAccount(r.account.data); - tokenAccount.address = r.pubkey; - return tokenAccount; - }) - ); -} \ No newline at end of file + connection: Connection, + publicKey: PublicKey +): Promise { + const accounts = await connection.getProgramAccounts(TOKEN_PROGRAM_ID, { + filters: [ + { + memcmp: { + offset: 32, + bytes: publicKey.toBase58(), + }, + }, + { + dataSize: AccountLayout.span, + }, + ], + }); + console.log(accounts); + return accounts.map(async (r) => { + // console.log("before parsing"); + // const tokenAccount = parseTokenAccount(r.account.data); + // console.log("after parsing"); + // tokenAccount.address = r.pubkey; + const tokenAccount = await getAccount(connection, r.pubkey); + return tokenAccount; + }); +} diff --git a/src/components/Notification.tsx b/src/components/Notification.tsx index 2d03d13..a3484fd 100644 --- a/src/components/Notification.tsx +++ b/src/components/Notification.tsx @@ -4,45 +4,45 @@ import { TransactionSignature } from "@solana/web3.js"; import { useConnectionConfig } from "../context/connection"; type Props = { - signature: string; + signature: string; }; export async function withTx( - snack: any, - beforeLabel: string, - afterLabel: string, - execTx: () => Promise + snack: any, + beforeLabel: string, + afterLabel: string, + execTx: () => Promise ) { - snack.enqueueSnackbar(beforeLabel, { - variant: "info", - }); - try { - let tx = await execTx(); - snack.closeSnackbar(); - snack.enqueueSnackbar(afterLabel, { - variant: "success", - action: , - }); - } catch (err) { - snack.enqueueSnackbar(`Error: ${err.toString()}`, { - variant: "error", - }); - } + snack.enqueueSnackbar(beforeLabel, { + variant: "info", + }); + try { + let tx = await execTx(); + snack.closeSnackbar(); + snack.enqueueSnackbar(afterLabel, { + variant: "success", + action: , + }); + } catch (err: any) { + snack.enqueueSnackbar(`Error: ${err.toString()}`, { + variant: "error", + }); + } } export function ViewTransactionOnExplorerButton(props: Props) { - const { signature } = props; - const { env } = useConnectionConfig(); - const urlSuffix = `?cluster=${env.toString()}`; - return ( - - ); + const { signature } = props; + const { env } = useConnectionConfig(); + const urlSuffix = `?cluster=${env.toString()}`; + return ( + + ); } diff --git a/src/components/transactions/ActivateDeal.tsx b/src/components/transactions/ActivateDeal.tsx new file mode 100644 index 0000000..16414c4 --- /dev/null +++ b/src/components/transactions/ActivateDeal.tsx @@ -0,0 +1,207 @@ +import { + ListItem, + ListItemIcon, + ListItemText, + Collapse, + Button, + Checkbox, +} from "@material-ui/core"; +import { MoneyRounded, ExpandLess, ExpandMore } from "@material-ui/icons"; +import { ProgramAccount } from "@project-serum/anchor"; +import { useSnackbar } from "notistack"; +import { useState, useEffect, useCallback } from "react"; +import { config } from "../../credix/config"; +import { useMultisigProgram } from "../../hooks/useMultisigProgram"; +import { ViewTransactionOnExplorerButton } from "../Notification"; + +import { + Account, + PublicKey, + SYSVAR_RENT_PUBKEY, + SYSVAR_CLOCK_PUBKEY, +} from "@solana/web3.js"; +import { SEEDS, TX_SIZE } from "../../credix/consts"; +import { Market, Deal, DealStatus } from "@credix/credix-client"; + +export function ActivateDealListItem({ + multisig, + onClose, + didAddTransaction, +}: { + multisig: PublicKey; + onClose: Function; + didAddTransaction: (tx: PublicKey) => void; +}) { + const [open, setOpen] = useState(false); + return ( + <> + setOpen((open) => !open)}> + + Credix Logo + + + {open ? : } + + + + + + ); +} + +function ActivateDealListItemDetails({ + multisig, + onClose, + didAddTransaction, +}: { + multisig: PublicKey; + onClose: Function; + didAddTransaction: (tx: PublicKey) => void; +}) { + const [deal, setDeal] = useState(); + const [globalMarketSeed, setGlobalMarketSeed] = useState( + SEEDS.GLOBAL_MARKET_STATE_PDA + ); + const [dealRows, setDealRows] = useState([

"no pending deals"

]); + const [multisigClient, credixClient, provider] = useMultisigProgram(); + const { enqueueSnackbar } = useSnackbar(); + + const isValidPublicKey = (publicKey: string) => { + try { + new PublicKey(publicKey); + return true; + } catch (e) { + return false; + } + }; + + const onBlurDeal = async (e: React.ChangeEvent) => { + if (!isValidPublicKey(e.target.value)) { + enqueueSnackbar(`Non valid PassHolder Public Key`, { + variant: "error", + }); + return; + } + const dealPubkey = new PublicKey(e.target.value); + const dealForPubkey = await credixClient?.fetchDealByPublicKey(dealPubkey); + setDeal(dealForPubkey); + constructDealRows(); + }; + + const createTransactionAccount = async (deal: Deal) => { + enqueueSnackbar("Creating transaction", { + variant: "info", + }); + + const [multisigSigner] = await PublicKey.findProgramAddress( + [multisig.toBuffer()], + multisigClient.programId + ); + const activateIx = await deal.activateIx(multisigSigner); + console.log(activateIx); + const transaction = new Account(); + const tx = await multisigClient.rpc.createTransaction( + config.clusterConfig.programId, + activateIx.keys, + Buffer.from(activateIx.data), + { + accounts: { + multisig, + transaction: transaction.publicKey, + proposer: multisigClient.provider.publicKey as PublicKey, + rent: SYSVAR_RENT_PUBKEY, + }, + signers: [transaction], + instructions: [ + await multisigClient.account.transaction.createInstruction( + transaction, + // @ts-ignore + TX_SIZE + 1000 + ), + ], + } + ); + enqueueSnackbar("Transaction created", { + variant: "success", + action: , + }); + didAddTransaction(transaction.publicKey); + onClose(); + }; + + const constructDealRows = () => { + if (deal) { + let dealRowsNew = ( +
+

{deal.borrower.toString()}

+

{deal.name}

+ {/*

{deal.principal.toNumber()/1000000} USDC

*/} + +
+ ); + setDealRows([dealRowsNew]); + } + }; + + return ( +
+
+ + +
+

Borrower Public Key

+

Deal name

+ {/*

Amount

*/} +

+
+ {dealRows} +
+ ); +} diff --git a/src/components/transactions/ActivateMigratedDeal.tsx b/src/components/transactions/ActivateMigratedDeal.tsx new file mode 100644 index 0000000..2fa0157 --- /dev/null +++ b/src/components/transactions/ActivateMigratedDeal.tsx @@ -0,0 +1,326 @@ +import { + ListItem, + ListItemIcon, + ListItemText, + Collapse, + Checkbox, +} from "@material-ui/core"; +import { ExpandLess, ExpandMore, RestoreOutlined } from "@material-ui/icons"; +import { useSnackbar } from "notistack"; +import React, { useState } from "react"; +import { config } from "../../credix/config"; +import { useMultisigProgram } from "../../hooks/useMultisigProgram"; +import { ViewTransactionOnExplorerButton } from "../Notification"; + +import { Account, PublicKey, SYSVAR_RENT_PUBKEY } from "@solana/web3.js"; +import { SEEDS, TX_SIZE } from "../../credix/consts"; +import { + Market, + Deal, + Fraction, + UpdateDealConfig, + MarketAdmins, + RepaymentPeriodConfig, +} from "@credix/credix-client"; +import { serialAsync } from "../../credix/utils/async.utils"; + +export function ActivateMigratedDealListItem({ + multisig, + onClose, + didAddTransaction, +}: { + multisig: PublicKey; + onClose: Function; + didAddTransaction: (tx: PublicKey) => void; +}) { + const [open, setOpen] = useState(false); + return ( + <> + setOpen((open) => !open)}> + + Credix Logo + + + {open ? : } + + + + + + ); +} + +function ActivateMigratedDealListItemDetails({ + multisig, + onClose, + didAddTransaction, +}: { + multisig: PublicKey; + onClose: Function; + didAddTransaction: (tx: PublicKey) => void; +}) { + const [deal, setDeal] = useState(); + const [indexToStart, setIndexToStart] = useState(0); + const [lpClaims, setLpClaims] = useState(""); + const [trancheClaims, setTrancheClaims] = useState(""); + + const [multisigClient, credixClient, provider] = useMultisigProgram(); + const decimals = 1000000; + const { enqueueSnackbar } = useSnackbar(); + + const isValidPublicKey = (publicKey: string) => { + try { + new PublicKey(publicKey); + return true; + } catch (e) { + return false; + } + }; + + const fetchInitialClaims = async () => { + if (deal) { + // const schedule = await deal.fetchRepaymentSchedule(); + const tranches = await deal.fetchTranches(); + + // @ts-ignore + if (Number(tranches?.tranches[1]?.size.amount) > 0) { + console.log(tranches?.tranches[1].size.amount); + setLpClaims( + JSON.stringify([ + { + investor: "REPLACE_WITH_INVESTOR_PUBKEY", + baseAmountDeposit: tranches?.tranches[1].size.amount, + }, + ]) + ); + } else { + setLpClaims(JSON.stringify([])); + } + + // @ts-ignore + const trancheClaims = []; + tranches?.tranches.forEach((tranche) => { + if (tranche.index !== 1 && Number(tranche.size.amount) > 0) { + const trancheClaim = { + investor: "REPLACE_WITH_INVESTOR_PUBKEY", + baseAmountDeposit: tranche.size.amount, + trancheIndex: tranche.index, + }; + // @ts-ignore + trancheClaims.push(trancheClaim); + } + }); + // @ts-ignore + setTrancheClaims(JSON.stringify(trancheClaims)); + } + }; + + const onBlurDeal = async (e: React.ChangeEvent) => { + if (!isValidPublicKey(e.target.value)) { + enqueueSnackbar(`Non valid Deal Public Key`, { + variant: "error", + }); + return; + } + console.log(e.target.value); + const dealPubkey = new PublicKey(e.target.value); + const dealForPubkey = await credixClient.fetchDealByPublicKey(dealPubkey); + setDeal(dealForPubkey); + await fetchInitialClaims(); + }; + + const onChangeIndexToStart = (e: React.ChangeEvent) => { + setIndexToStart(Number(e.target.value)); + }; + + const onChangeLpClaims = async ( + e: React.ChangeEvent + ) => { + setLpClaims(e.target.value); + }; + + const onChangeTrancheClaims = async ( + e: React.ChangeEvent + ) => { + setTrancheClaims(e.target.value); + }; + + // @ts-ignore + const transformLpClaims = (parsedLpClaims) => { + // @ts-ignore + const transformedLpClaims = []; + // @ts-ignore + parsedLpClaims.forEach((claim) => { + const transformedLpClaim = {}; + // @ts-ignore + transformedLpClaim["investor"] = new PublicKey(claim.investor); + // @ts-ignore + transformedLpClaim["baseAmountDeposit"] = Number(claim.baseAmountDeposit); + transformedLpClaims.push(transformedLpClaim); + }); + // @ts-ignore + return transformedLpClaims; + }; + + // @ts-ignore + const transformTrancheClaims = (parsedTrancheClaims) => { + // @ts-ignore + const transformedTrancheClaims = []; + // @ts-ignore + parsedTrancheClaims.forEach((claim) => { + const transformedTrancheClaim = {}; + // @ts-ignore + transformedTrancheClaim["investor"] = new PublicKey(claim.investor); + // @ts-ignore + transformedTrancheClaim["baseAmountDeposit"] = Number( + claim.baseAmountDeposit + ); + // @ts-ignore + transformedTrancheClaim["trancheIndex"] = claim.trancheIndex; + transformedTrancheClaims.push(transformedTrancheClaim); + }); + // @ts-ignore + return transformedTrancheClaims; + }; + + const onSubmit = serialAsync(async (e: React.SyntheticEvent) => { + e.preventDefault(); + enqueueSnackbar("Creating transaction", { + variant: "info", + }); + + const parsedLpClaims = JSON.parse(lpClaims); + console.log({ parsedLpClaims }); + const transformedLpClaims = transformLpClaims(parsedLpClaims); + console.log({ transformedLpClaims }); + const parsedTrancheClaims = JSON.parse(trancheClaims); + console.log({ parsedTrancheClaims }); + const transformedTrancheClaims = + transformTrancheClaims(parsedTrancheClaims); + console.log({ transformedTrancheClaims }); + + const [multisigSigner] = await PublicKey.findProgramAddress( + [multisig.toBuffer()], + multisigClient.programId + ); + + console.log({ + lpClaims: transformedLpClaims, + trancheClaims: transformedTrancheClaims, + }); + const activateMigratedDealIx = await deal?.activateMigratedIx( + { + lpClaims: transformedLpClaims, + trancheClaims: transformedTrancheClaims, + }, + multisigSigner + ); + + console.log("here2"); + + const transaction = new Account(); + const tx = await multisigClient.rpc.createTransaction( + config.clusterConfig.programId, + // @ts-ignore + activateMigratedDealIx.keys, + // @ts-ignore + Buffer.from(activateMigratedDealIx.data), + { + // @ts-ignore + accounts: { + multisig, + transaction: transaction.publicKey, + proposer: multisigClient.provider.publicKey as PublicKey, + rent: SYSVAR_RENT_PUBKEY, + }, + signers: [transaction], + instructions: [ + await multisigClient.account.transaction.createInstruction( + transaction, + // @ts-ignore + TX_SIZE + 800 + ), + ], + } + ); + enqueueSnackbar("Transaction created", { + variant: "success", + action: , + }); + didAddTransaction(transaction.publicKey); + onClose(); + }); + + return ( +
+
+
+ + +
+