@credenza3/passport-evm 0.3.13 → 0.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/{App-DH2kp5om.js → App-BSUbcs5N.js} +18 -18
  2. package/dist/{App-DH2kp5om.js.map → App-BSUbcs5N.js.map} +1 -1
  3. package/dist/{Button-DDVwlLjj.js → Button-Do331Sio.js} +4 -4
  4. package/dist/{Button-DDVwlLjj.js.map → Button-Do331Sio.js.map} +1 -1
  5. package/dist/{ButtonBack-C2CdNgo1.js → ButtonBack-COpQSSbA.js} +4 -4
  6. package/dist/{ButtonBack-C2CdNgo1.js.map → ButtonBack-COpQSSbA.js.map} +1 -1
  7. package/dist/{ButtonLink-C3VBU1ab.js → ButtonLink-7sr68aXy.js} +3 -3
  8. package/dist/{ButtonLink-C3VBU1ab.js.map → ButtonLink-7sr68aXy.js.map} +1 -1
  9. package/dist/{ConfirmAccount-e43gGdrb.js → ConfirmAccount-CUp76RaC.js} +9 -9
  10. package/dist/{ConfirmAccount-e43gGdrb.js.map → ConfirmAccount-CUp76RaC.js.map} +1 -1
  11. package/dist/{ContentHeader-UsnuSzZM.js → ContentHeader-BEtMQDCY.js} +3 -3
  12. package/dist/{ContentHeader-UsnuSzZM.js.map → ContentHeader-BEtMQDCY.js.map} +1 -1
  13. package/dist/{Error-Bnv7BzVG.js → Error-DIE0qjZW.js} +5 -5
  14. package/dist/{Error-Bnv7BzVG.js.map → Error-DIE0qjZW.js.map} +1 -1
  15. package/dist/{Input-Hp6LmVtL.js → Input-CwKuey2u.js} +4 -4
  16. package/dist/{Input-Hp6LmVtL.js.map → Input-CwKuey2u.js.map} +1 -1
  17. package/dist/{Label-5D5fMM5j.js → Label-B1E79bWR.js} +3 -3
  18. package/dist/{Label-5D5fMM5j.js.map → Label-B1E79bWR.js.map} +1 -1
  19. package/dist/{Loader-Dtuwqw1D.js → Loader-BJi-IZD4.js} +3 -3
  20. package/dist/{Loader-Dtuwqw1D.js.map → Loader-BJi-IZD4.js.map} +1 -1
  21. package/dist/{Login-DF83btfx.js → Login-BZwxqrJo.js} +9 -9
  22. package/dist/{Login-DF83btfx.js.map → Login-BZwxqrJo.js.map} +1 -1
  23. package/dist/{Logout-DJr9UAOj.js → Logout-CVOl93tE.js} +6 -6
  24. package/dist/{Logout-DJr9UAOj.js.map → Logout-CVOl93tE.js.map} +1 -1
  25. package/dist/{Nav-C2x_bd3e.js → Nav-D2XU3cdF.js} +5 -5
  26. package/dist/{Nav-C2x_bd3e.js.map → Nav-D2XU3cdF.js.map} +1 -1
  27. package/dist/{PassportId-2Fjr2mlf.js → PassportId-BVES8VD0.js} +6 -6
  28. package/dist/{PassportId-2Fjr2mlf.js.map → PassportId-BVES8VD0.js.map} +1 -1
  29. package/dist/{Payment-CU5N9LaQ.js → Payment-99Or-v_m.js} +218 -216
  30. package/dist/Payment-99Or-v_m.js.map +1 -0
  31. package/dist/{PaymentResult-C0rLxOlQ.js → PaymentResult-tps5kYly.js} +4 -4
  32. package/dist/{PaymentResult-C0rLxOlQ.js.map → PaymentResult-tps5kYly.js.map} +1 -1
  33. package/dist/{Profile-BVWKnLqL.js → Profile-CMUhjUBZ.js} +7 -7
  34. package/dist/{Profile-BVWKnLqL.js.map → Profile-CMUhjUBZ.js.map} +1 -1
  35. package/dist/{ProgressVideo-BYZ-xHMl.js → ProgressVideo-BnvjmIfk.js} +5 -5
  36. package/dist/{ProgressVideo-BYZ-xHMl.js.map → ProgressVideo-BnvjmIfk.js.map} +1 -1
  37. package/dist/{RichAlert-CGg5Wu_0.js → RichAlert-CPTVnOly.js} +5 -5
  38. package/dist/{RichAlert-CGg5Wu_0.js.map → RichAlert-CPTVnOly.js.map} +1 -1
  39. package/dist/{Scanner-21HHlHTt.js → Scanner-BK6r11ag.js} +6 -6
  40. package/dist/{Scanner-21HHlHTt.js.map → Scanner-BK6r11ag.js.map} +1 -1
  41. package/dist/{SendTokens-MHQ91lHt.js → SendTokens-CY0x-dNv.js} +7 -7
  42. package/dist/{SendTokens-MHQ91lHt.js.map → SendTokens-CY0x-dNv.js.map} +1 -1
  43. package/dist/{Sign-DurOP9_G.js → Sign-BtMALc-L.js} +6 -6
  44. package/dist/{Sign-DurOP9_G.js.map → Sign-BtMALc-L.js.map} +1 -1
  45. package/dist/{Stripe.service-CIzSiVWY.js → Stripe.service-CmkodGA4.js} +3 -3
  46. package/dist/{Stripe.service-CIzSiVWY.js.map → Stripe.service-CmkodGA4.js.map} +1 -1
  47. package/dist/{UpdateProfile-UqsqZTZ8.js → UpdateProfile-BpDEoygB.js} +10 -10
  48. package/dist/{UpdateProfile-UqsqZTZ8.js.map → UpdateProfile-BpDEoygB.js.map} +1 -1
  49. package/dist/{UserInfo-DxIKVGJn.js → UserInfo-CybjgUPr.js} +4 -4
  50. package/dist/{UserInfo-DxIKVGJn.js.map → UserInfo-CybjgUPr.js.map} +1 -1
  51. package/dist/{Wallet-CbAnv18L.js → Wallet-DOr2QsdF.js} +7 -7
  52. package/dist/{Wallet-CbAnv18L.js.map → Wallet-DOr2QsdF.js.map} +1 -1
  53. package/dist/{each-CL-k6Ycv.js → each-BGWW2yNi.js} +2 -2
  54. package/dist/{each-CL-k6Ycv.js.map → each-BGWW2yNi.js.map} +1 -1
  55. package/dist/{html-CsUNDDtl.js → html-B5PuXdLp.js} +3 -3
  56. package/dist/{html-CsUNDDtl.js.map → html-B5PuXdLp.js.map} +1 -1
  57. package/dist/{index-Dh2Q8K88.js → index-BZcOD1tg.js} +1858 -1858
  58. package/dist/{index-Dh2Q8K88.js.map → index-BZcOD1tg.js.map} +1 -1
  59. package/dist/{index-client-Bzfofg5b.js → index-client-Y_-1H35w.js} +2 -2
  60. package/dist/{index-client-Bzfofg5b.js.map → index-client-Y_-1H35w.js.map} +1 -1
  61. package/dist/{input-YUoS6CCW.js → input-DNdiLHPp.js} +2 -2
  62. package/dist/{input-YUoS6CCW.js.map → input-DNdiLHPp.js.map} +1 -1
  63. package/dist/{legacy-BKVjj-zC.js → legacy-B_pXyAF3.js} +2 -2
  64. package/dist/{legacy-BKVjj-zC.js.map → legacy-B_pXyAF3.js.map} +1 -1
  65. package/dist/passport.es.js +1 -1
  66. package/dist/passport.umd.js +3 -3
  67. package/dist/passport.umd.js.map +1 -1
  68. package/package.json +1 -1
  69. package/dist/Payment-CU5N9LaQ.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`@import"https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap";.crdz-ui *,.crdz-ui :before,.crdz-ui :after{font-family:Poppins,serif;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}.crdz-ui :before,.crdz-ui :after{--tw-content: ""}.crdz-ui hr{height:0;color:inherit;border-top-width:1px}.crdz-ui abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.crdz-ui h1,.crdz-ui h2,.crdz-ui h3,.crdz-ui h4,.crdz-ui h5,.crdz-ui h6{font-size:inherit;font-weight:inherit}.crdz-ui a{color:inherit;text-decoration:inherit}.crdz-ui b,.crdz-ui strong{font-weight:bolder}.crdz-ui code,.crdz-ui kbd,.crdz-ui samp,.crdz-ui pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.crdz-ui small{font-size:80%}.crdz-ui sub,.crdz-ui sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.crdz-ui sub{bottom:-.25em}.crdz-ui sup{top:-.5em}.crdz-ui table{text-indent:0;border-color:inherit;border-collapse:collapse}.crdz-ui button,.crdz-ui select{text-transform:none}.crdz-ui button,.crdz-ui [type=button],.crdz-ui [type=reset],.crdz-ui [type=submit]{font-size:100%;-webkit-appearance:button;background-image:none}.crdz-ui :-moz-focusring{outline:auto}.crdz-ui :-moz-ui-invalid{box-shadow:none}.crdz-ui progress{vertical-align:baseline}.crdz-ui ::-webkit-inner-spin-button,.crdz-ui ::-webkit-outer-spin-button{height:auto}.crdz-ui [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.crdz-ui ::-webkit-search-decoration{-webkit-appearance:none}.crdz-ui ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.crdz-ui summary{display:list-item}.crdz-ui blockquote,.crdz-ui dl,.crdz-ui dd,.crdz-ui h1,.crdz-ui h2,.crdz-ui h3,.crdz-ui h4,.crdz-ui h5,.crdz-ui h6,.crdz-ui hr,.crdz-ui figure,.crdz-ui p,.crdz-ui span,.crdz-ui label,.crdz-ui pre{margin:0;letter-spacing:normal!important}.crdz-ui label{text-transform:initial!important}.crdz-ui fieldset{margin:0;padding:0}.crdz-ui legend{padding:0}.crdz-ui ol,.crdz-ui ul,.crdz-ui menu{list-style:none;margin:0;padding:0}.crdz-ui dialog{padding:0}.crdz-ui textarea{resize:vertical}.crdz-ui input::-moz-placeholder,.crdz-ui textarea::-moz-placeholder{opacity:1;color:#9ca3af}.crdz-ui input::placeholder,.crdz-ui textarea::placeholder{opacity:1;color:#9ca3af}.crdz-ui button,.crdz-ui [role=button]{cursor:pointer}.crdz-ui :disabled{cursor:default}.crdz-ui img,.crdz-ui svg,.crdz-ui video,.crdz-ui canvas,.crdz-ui audio,.crdz-ui iframe,.crdz-ui embed,.crdz-ui object{display:block;vertical-align:middle;opacity:1}.crdz-ui [hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.crtw-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border-width:0!important}.crtw-pointer-events-none{pointer-events:none!important}.crtw-invisible{visibility:hidden!important}.crtw-fixed{position:fixed!important}.crtw-absolute{position:absolute!important}.crtw-relative{position:relative!important}.crtw-bottom-0{bottom:0!important}.crtw-left-0{left:0!important}.crtw-right-0{right:0!important}.crtw-top-0{top:0!important}.crtw-top-\\[8px\\]{top:8px!important}.crtw-z-10{z-index:10!important}.crtw-z-50{z-index:50!important}.crtw-z-\\[-1\\]{z-index:-1!important}.crtw-z-\\[1050\\]{z-index:1050!important}.crtw-float-right{float:right!important}.crtw-m-2{margin:.5rem!important}.crtw-m-3\\.5{margin:.875rem!important}.crtw-m-5{margin:1.25rem!important}.crtw-mx-1\\.5{margin-left:.375rem!important;margin-right:.375rem!important}.crtw-mx-\\[50px\\]{margin-left:50px!important;margin-right:50px!important}.crtw-mx-auto{margin-left:auto!important;margin-right:auto!important}.crtw-my-0{margin-top:0!important;margin-bottom:0!important}.crtw-my-0\\.5{margin-top:.125rem!important;margin-bottom:.125rem!important}.crtw-my-4{margin-top:1rem!important;margin-bottom:1rem!important}.crtw-my-5{margin-top:1.25rem!important;margin-bottom:1.25rem!important}.crtw-mb-1{margin-bottom:.25rem!important}.crtw-mb-1\\.5{margin-bottom:.375rem!important}.crtw-mb-2{margin-bottom:.5rem!important}.crtw-mb-2\\.5{margin-bottom:.625rem!important}.crtw-mb-3{margin-bottom:.75rem!important}.crtw-mb-3\\.5{margin-bottom:.875rem!important}.crtw-mb-4{margin-bottom:1rem!important}.crtw-mb-5{margin-bottom:1.25rem!important}.crtw-mb-6{margin-bottom:1.5rem!important}.crtw-mb-9{margin-bottom:2.25rem!important}.crtw-mb-\\[100px\\]{margin-bottom:100px!important}.crtw-mb-\\[30px\\]{margin-bottom:30px!important}.crtw-ml-1{margin-left:.25rem!important}.crtw-ml-1\\.5{margin-left:.375rem!important}.crtw-ml-2\\.5{margin-left:.625rem!important}.crtw-mr-0\\.5{margin-right:.125rem!important}.crtw-mr-1\\.5{margin-right:.375rem!important}.crtw-mr-14{margin-right:3.5rem!important}.crtw-mr-2{margin-right:.5rem!important}.crtw-mt-0\\.5{margin-top:.125rem!important}.crtw-mt-1{margin-top:.25rem!important}.crtw-mt-1\\.5{margin-top:.375rem!important}.crtw-mt-2\\.5{margin-top:.625rem!important}.crtw-mt-3\\.5{margin-top:.875rem!important}.crtw-mt-4{margin-top:1rem!important}.crtw-mt-6{margin-top:1.5rem!important}.crtw-mt-9{margin-top:2.25rem!important}.crtw-mt-\\[-10px\\]{margin-top:-10px!important}.crtw-mt-\\[30px\\]{margin-top:30px!important}.crtw-mt-\\[36px\\]{margin-top:36px!important}.crtw-mt-\\[5px\\]{margin-top:5px!important}.crtw-box-border{box-sizing:border-box!important}.crtw-block{display:block!important}.crtw-flex{display:flex!important}.crtw-inline-flex{display:inline-flex!important}.crtw-hidden{display:none!important}.crtw-h-1\\.5{height:.375rem!important}.crtw-h-11{height:2.75rem!important}.crtw-h-3{height:.75rem!important}.crtw-h-4{height:1rem!important}.crtw-h-64{height:16rem!important}.crtw-h-7{height:1.75rem!important}.crtw-h-8{height:2rem!important}.crtw-h-9{height:2.25rem!important}.crtw-h-\\[30px\\]{height:30px!important}.crtw-h-\\[50px\\]{height:50px!important}.crtw-h-\\[53px\\]{height:53px!important}.crtw-h-full{height:100%!important}.crtw-max-h-full{max-height:100%!important}.crtw-min-h-\\[155px\\]{min-height:155px!important}.crtw-min-h-screen{min-height:100vh!important}.crtw-w-1\\.5{width:.375rem!important}.crtw-w-1\\/2{width:50%!important}.crtw-w-11{width:2.75rem!important}.crtw-w-16{width:4rem!important}.crtw-w-4{width:1rem!important}.crtw-w-40{width:10rem!important}.crtw-w-56{width:14rem!important}.crtw-w-64{width:16rem!important}.crtw-w-8{width:2rem!important}.crtw-w-\\[110px\\]{width:110px!important}.crtw-w-\\[200px\\]{width:200px!important}.crtw-w-\\[70px\\]{width:70px!important}.crtw-w-\\[90px\\]{width:90px!important}.crtw-w-full{width:100%!important}.crtw-min-w-16{min-width:4rem!important}.crtw-max-w-\\[30px\\]{max-width:30px!important}.crtw-max-w-\\[380px\\]{max-width:380px!important}.crtw-max-w-xs{max-width:20rem!important}.crtw-flex-1{flex:1 1 0%!important}@keyframes crtw-spin{to{transform:rotate(360deg)}}.crtw-animate-spin{animation:crtw-spin 1s linear infinite!important}.crtw-cursor-pointer{cursor:pointer!important}.crtw-appearance-none{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.crtw-flex-row{flex-direction:row!important}.crtw-flex-col{flex-direction:column!important}.crtw-items-start{align-items:flex-start!important}.crtw-items-center{align-items:center!important}.crtw-justify-start{justify-content:flex-start!important}.crtw-justify-center{justify-content:center!important}.crtw-justify-between{justify-content:space-between!important}.crtw-justify-items-center{justify-items:center!important}.crtw-gap-10{gap:2.5rem!important}.crtw-gap-14{gap:3.5rem!important}.crtw-gap-2\\.5{gap:.625rem!important}.crtw-gap-3{gap:.75rem!important}.crtw-gap-4{gap:1rem!important}.crtw-gap-6{gap:1.5rem!important}.crtw-gap-9{gap:2.25rem!important}.crtw-gap-\\[22px\\]{gap:22px!important}.crtw-gap-\\[6px\\]{gap:6px!important}.crtw-overflow-hidden{overflow:hidden!important}.crtw-overflow-y-scroll{overflow-y:scroll!important}.crtw-whitespace-normal{white-space:normal!important}.crtw-break-words{overflow-wrap:break-word!important}.crtw-break-all{word-break:break-all!important}.crtw-rounded{border-radius:.25rem!important}.crtw-rounded-\\[10px\\]{border-radius:10px!important}.crtw-rounded-\\[3px\\]{border-radius:3px!important}.crtw-rounded-full{border-radius:9999px!important}.crtw-rounded-lg{border-radius:.5rem!important}.crtw-rounded-md{border-radius:.375rem!important}.crtw-rounded-sm{border-radius:.125rem!important}.crtw-rounded-xl{border-radius:.75rem!important}.crtw-border{border-width:1px!important}.crtw-border-0{border-width:0px!important}.crtw-border-2{border-width:2px!important}.crtw-border-t-2{border-top-width:2px!important}.crtw-border-\\[\\#990008\\]{--tw-border-opacity: 1 !important;border-color:rgb(153 0 8 / var(--tw-border-opacity, 1))!important}.crtw-border-\\[\\#d9d9d9\\]{--tw-border-opacity: 1 !important;border-color:rgb(217 217 217 / var(--tw-border-opacity, 1))!important}.crtw-border-black{--tw-border-opacity: 1 !important;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))!important}.crtw-border-blue-800{--tw-border-opacity: 1 !important;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))!important}.crtw-border-gray-200{--tw-border-opacity: 1 !important;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))!important}.crtw-border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))!important}.crtw-border-gray-700{--tw-border-opacity: 1 !important;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))!important}.crtw-bg-black{--tw-bg-opacity: 1 !important;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))!important}.crtw-bg-black\\/70{background-color:#000000b3!important}.crtw-bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))!important}.crtw-bg-gray-300{--tw-bg-opacity: 1 !important;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))!important}.crtw-bg-green-500{--tw-bg-opacity: 1 !important;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))!important}.crtw-bg-red-500{--tw-bg-opacity: 1 !important;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))!important}.crtw-bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))!important}.crtw-fill-black{fill:#000!important}.crtw-fill-red-500{fill:#ef4444!important}.crtw-p-0{padding:0!important}.crtw-p-2\\.5{padding:.625rem!important}.crtw-p-px{padding:1px!important}.crtw-px-0{padding-left:0!important;padding-right:0!important}.crtw-px-0\\.5{padding-left:.125rem!important;padding-right:.125rem!important}.crtw-px-2{padding-left:.5rem!important;padding-right:.5rem!important}.crtw-px-2\\.5{padding-left:.625rem!important;padding-right:.625rem!important}.crtw-px-4{padding-left:1rem!important;padding-right:1rem!important}.crtw-px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}.crtw-px-\\[22px\\]{padding-left:22px!important;padding-right:22px!important}.crtw-px-\\[36px\\]{padding-left:36px!important;padding-right:36px!important}.crtw-py-0{padding-top:0!important;padding-bottom:0!important}.crtw-py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.crtw-py-2\\.5{padding-top:.625rem!important;padding-bottom:.625rem!important}.crtw-py-4{padding-top:1rem!important;padding-bottom:1rem!important}.crtw-pb-2{padding-bottom:.5rem!important}.crtw-pb-9{padding-bottom:2.25rem!important}.crtw-pl-5{padding-left:1.25rem!important}.crtw-pr-1\\.5{padding-right:.375rem!important}.crtw-pr-5{padding-right:1.25rem!important}.crtw-pt-11{padding-top:2.75rem!important}.crtw-pt-4{padding-top:1rem!important}.crtw-pt-5{padding-top:1.25rem!important}.crtw-pt-\\[3px\\]{padding-top:3px!important}.crtw-text-left{text-align:left!important}.crtw-text-center{text-align:center!important}.crtw-text-right{text-align:right!important}.crtw-text-justify{text-align:justify!important}.crtw-font-\\[\\'Poppins\\'\\]{font-family:Poppins!important}.crtw-font-\\[\\'poppins\\'\\],.crtw-font-\\[poppins\\]{font-family:poppins!important}.crtw-text-2xl{font-size:1.5rem!important;line-height:2rem!important}.crtw-text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.crtw-text-\\[10px\\]{font-size:10px!important}.crtw-text-\\[13px\\]{font-size:13px!important}.crtw-text-\\[21px\\]{font-size:21px!important}.crtw-text-\\[24px\\]{font-size:24px!important}.crtw-text-\\[9px\\]{font-size:9px!important}.crtw-text-base{font-size:1rem!important;line-height:1.5rem!important}.crtw-text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.crtw-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.crtw-text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.crtw-text-xs{font-size:.75rem!important;line-height:1rem!important}.crtw-font-bold{font-weight:700!important}.crtw-font-medium{font-weight:500!important}.crtw-font-semibold{font-weight:600!important}.crtw-uppercase{text-transform:uppercase!important}.crtw-text-\\[\\#121e2b\\]{--tw-text-opacity: 1 !important;color:rgb(18 30 43 / var(--tw-text-opacity, 1))!important}.crtw-text-\\[\\#313a2c\\]{--tw-text-opacity: 1 !important;color:rgb(49 58 44 / var(--tw-text-opacity, 1))!important}.crtw-text-\\[\\#747474\\]{--tw-text-opacity: 1 !important;color:rgb(116 116 116 / var(--tw-text-opacity, 1))!important}.crtw-text-\\[\\#990008\\]{--tw-text-opacity: 1 !important;color:rgb(153 0 8 / var(--tw-text-opacity, 1))!important}.crtw-text-black{--tw-text-opacity: 1 !important;color:rgb(0 0 0 / var(--tw-text-opacity, 1))!important}.crtw-text-blue-600{--tw-text-opacity: 1 !important;color:rgb(37 99 235 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-400{--tw-text-opacity: 1 !important;color:rgb(156 163 175 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-500{--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-600{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-800{--tw-text-opacity: 1 !important;color:rgb(31 41 55 / var(--tw-text-opacity, 1))!important}.crtw-text-hightlightColor{--tw-text-opacity: 1 !important;color:rgb(11 114 224 / var(--tw-text-opacity, 1))!important}.crtw-text-red-500{--tw-text-opacity: 1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1))!important}.crtw-text-red-600{--tw-text-opacity: 1 !important;color:rgb(220 38 38 / var(--tw-text-opacity, 1))!important}.crtw-text-textMain{--tw-text-opacity: 1 !important;color:rgb(31 31 31 / var(--tw-text-opacity, 1))!important}.crtw-text-warningTextColor{--tw-text-opacity: 1 !important;color:rgb(153 0 8 / var(--tw-text-opacity, 1))!important}.crtw-text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.crtw-underline{text-decoration-line:underline!important}.crtw-no-underline{text-decoration-line:none!important}.crtw-placeholder-\\[\\#d9d9d9\\]::-moz-placeholder{--tw-placeholder-opacity: 1 !important;color:rgb(217 217 217 / var(--tw-placeholder-opacity, 1))!important}.crtw-placeholder-\\[\\#d9d9d9\\]::placeholder{--tw-placeholder-opacity: 1 !important;color:rgb(217 217 217 / var(--tw-placeholder-opacity, 1))!important}.crtw-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.crtw-outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.crtw-backdrop-blur-lg{--tw-backdrop-blur: blur(16px) !important;-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important;backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important}.crtw-backdrop-blur-md{--tw-backdrop-blur: blur(12px) !important;-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important;backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important}.first\\:crtw-rounded-l:first-child{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.last\\:crtw-rounded-r:last-child{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.hover\\:crtw-bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))!important}.hover\\:crtw-bg-gray-800:hover{--tw-bg-opacity: 1 !important;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))!important}.hover\\:crtw-text-blue-800:hover{--tw-text-opacity: 1 !important;color:rgb(30 64 175 / var(--tw-text-opacity, 1))!important}.focus\\:crtw-border-\\[\\#121e2b\\]:focus{--tw-border-opacity: 1 !important;border-color:rgb(18 30 43 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-border-\\[\\#990008\\]:focus{--tw-border-opacity: 1 !important;border-color:rgb(153 0 8 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-border-blue-800:focus{--tw-border-opacity: 1 !important;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-border-blue-900:focus{--tw-border-opacity: 1 !important;border-color:rgb(30 58 138 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-text-blue-900:focus{--tw-text-opacity: 1 !important;color:rgb(30 58 138 / var(--tw-text-opacity, 1))!important}.focus\\:crtw-outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\\:crtw-outline-0:focus{outline-width:0px!important}.disabled\\:crtw-bg-\\[\\#d9d9d9\\]:disabled{--tw-bg-opacity: 1 !important;background-color:rgb(217 217 217 / var(--tw-bg-opacity, 1))!important}.crtw-group:hover .group-hover\\:crtw-visible{visibility:visible!important}@media (min-width: 640px){.sm\\:crtw-m-4{margin:1rem!important}.sm\\:crtw-mb-px{margin-bottom:1px!important}.sm\\:crtw-max-w-\\[360px\\]{max-width:360px!important}.sm\\:crtw-max-w-md{max-width:28rem!important}.sm\\:crtw-px-1\\.5{padding-left:.375rem!important;padding-right:.375rem!important}.sm\\:crtw-pt-2{padding-top:.5rem!important}.sm\\:crtw-pt-\\[50px\\]{padding-top:50px!important}.sm\\:crtw-text-2xl{font-size:1.5rem!important;line-height:2rem!important}.sm\\:crtw-text-\\[11px\\]{font-size:11px!important}.sm\\:crtw-text-base{font-size:1rem!important;line-height:1.5rem!important}.sm\\:crtw-text-sm{font-size:.875rem!important;line-height:1.25rem!important}}@media (min-width: 768px){.md\\:crtw-text-2xl{font-size:1.5rem!important;line-height:2rem!important}}@media (min-height: 650px){.sm-tall\\:crtw-max-h-\\[650px\\]{max-height:650px!important}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- (function(Nd,F1){typeof exports=="object"&&typeof module<"u"?F1(exports):typeof define=="function"&&define.amd?define(["exports"],F1):(Nd=typeof globalThis<"u"?globalThis:Nd||self,F1(Nd.CredenzaPassport={}))})(this,function(Nd){"use strict";const nD={version:"0.3.13"},$A=!1;var V1=Array.isArray,iD=Array.prototype.indexOf,Jw=Array.from,Cp=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,HA=Object.getOwnPropertyDescriptors,sD=Object.prototype,oD=Array.prototype,Qw=Object.getPrototypeOf,ZA=Object.isExtensible;const lc=()=>{};function JA(t){return typeof t?.then=="function"}function aD(t){return t()}function Sp(t){for(var e=0;e<t.length;e++)t[e]()}function cD(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}const wi=2,Yw=4,D1=8,Id=16,ea=32,Il=64,QA=128,Di=256,W1=512,bn=1024,Wi=2048,ta=4096,ws=8192,Ol=16384,Kw=32768,j1=65536,YA=1<<17,lD=1<<18,Rp=1<<19,KA=1<<20,qw=1<<21,Xw=1<<22,Bl=1<<23,uc=Symbol("$state"),qA=Symbol("legacy props"),uD=Symbol(""),e3=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},t3=3,Od=8;function XA(t){return t===this.v}function e9(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function t9(t){return!e9(t,this.v)}function dD(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function r9(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function hD(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function fD(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function pD(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function gD(t){throw new Error("https://svelte.dev/e/effect_orphan")}function mD(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function yD(){throw new Error("https://svelte.dev/e/hydration_failed")}function vD(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function bD(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function wD(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function kD(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Bd=!1,ED=!1;function AD(){Bd=!0}const G1=1,z1=2,n9=4,_D=8,TD=16,CD=1,SD=2,i9=4,RD=8,PD=16,ND=1,xD=2,s9="[",$1="[!",r3="]",Ml={},Kr=Symbol(),ID="http://www.w3.org/1999/xhtml",OD="@attach";let Pr=null;function Md(t){Pr=t}function ot(t,e=!1,r){Pr={p:Pr,c:null,e:null,s:t,x:null,l:Bd&&!e?{s:null,u:null,$:[]}:null}}function at(t){var e=Pr,r=e.e;if(r!==null){e.e=null;for(var n of r)L9(n)}return t!==void 0&&(e.x=t),Pr=e.p,t??{}}function Ul(){return!Bd||Pr!==null&&Pr.l===null}function Pp(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function BD(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let Rt=!1;function ki(t){Rt=t}let tr;function ui(t){if(t===null)throw Pp(),Ml;return tr=t}function ra(){return ui(co(tr))}function xe(t){if(Rt){if(co(tr)!==null)throw Pp(),Ml;tr=t}}function Jn(t=1){if(Rt){for(var e=t,r=tr;e--;)r=co(r);tr=r}}function H1(){for(var t=0,e=tr;;){if(e.nodeType===Od){var r=e.data;if(r===r3){if(t===0)return e;t-=1}else(r===s9||r===$1)&&(t+=1)}var n=co(e);e.remove(),e=n}}function o9(t){if(!t||t.nodeType!==Od)throw Pp(),Ml;return t.data}function Ud(t){if(typeof t!="object"||t===null||uc in t)return t;const e=Qw(t);if(e!==sD&&e!==oD)return t;var r=new Map,n=V1(t),i=fc(0),s=Dl,o=a=>{if(Dl===s)return a();var c=Xt,l=Dl;ji(null),x9(s);var u=a();return ji(c),x9(l),u};return n&&r.set("length",fc(t.length)),new Proxy(t,{defineProperty(a,c,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&bD();var u=r.get(c);return u===void 0?u=o(()=>{var h=fc(l.value);return r.set(c,h),h}):Re(u,l.value,!0),!0},deleteProperty(a,c){var l=r.get(c);if(l===void 0){if(c in a){const u=o(()=>fc(Kr));r.set(c,u),c3(i)}}else Re(l,Kr),c3(i);return!0},get(a,c,l){if(c===uc)return t;var u=r.get(c),h=c in a;if(u===void 0&&(!h||xd(a,c)?.writable)&&(u=o(()=>{var p=Ud(h?a[c]:Kr),g=fc(p);return g}),r.set(c,u)),u!==void 0){var d=H(u);return d===Kr?void 0:d}return Reflect.get(a,c,l)},getOwnPropertyDescriptor(a,c){var l=Reflect.getOwnPropertyDescriptor(a,c);if(l&&"value"in l){var u=r.get(c);u&&(l.value=H(u))}else if(l===void 0){var h=r.get(c),d=h?.v;if(h!==void 0&&d!==Kr)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return l},has(a,c){if(c===uc)return!0;var l=r.get(c),u=l!==void 0&&l.v!==Kr||Reflect.has(a,c);if(l!==void 0||xt!==null&&(!u||xd(a,c)?.writable)){l===void 0&&(l=o(()=>{var d=u?Ud(a[c]):Kr,p=fc(d);return p}),r.set(c,l));var h=H(l);if(h===Kr)return!1}return u},set(a,c,l,u){var h=r.get(c),d=c in a;if(n&&c==="length")for(var p=l;p<h.v;p+=1){var g=r.get(p+"");g!==void 0?Re(g,Kr):p in a&&(g=o(()=>fc(Kr)),r.set(p+"",g))}if(h===void 0)(!d||xd(a,c)?.writable)&&(h=o(()=>fc(void 0)),Re(h,Ud(l)),r.set(c,h));else{d=h.v!==Kr;var m=o(()=>Ud(l));Re(h,m)}var y=Reflect.getOwnPropertyDescriptor(a,c);if(y?.set&&y.set.call(u,l),!d){if(n&&typeof c=="string"){var v=r.get("length"),A=Number(c);Number.isInteger(A)&&A>=v.v&&Re(v,A+1)}c3(i)}return!0},ownKeys(a){H(i);var c=Reflect.ownKeys(a).filter(h=>{var d=r.get(h);return d===void 0||d.v!==Kr});for(var[l,u]of r)u.v!==Kr&&!(l in a)&&c.push(l);return c},setPrototypeOf(){wD()}})}function a9(t){try{if(t!==null&&typeof t=="object"&&uc in t)return t[uc]}catch{}return t}function MD(t,e){return Object.is(a9(t),a9(e))}var c9,l9,u9,d9;function n3(){if(c9===void 0){c9=window,l9=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;u9=xd(e,"firstChild").get,d9=xd(e,"nextSibling").get,ZA(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),ZA(r)&&(r.__t=void 0)}}function ks(t=""){return document.createTextNode(t)}function Es(t){return u9.call(t)}function co(t){return d9.call(t)}function Ie(t,e){if(!Rt)return Es(t);var r=Es(tr);if(r===null)r=tr.appendChild(ks());else if(e&&r.nodeType!==t3){var n=ks();return r?.before(n),ui(n),n}return ui(r),r}function He(t,e){if(!Rt){var r=Es(t);return r instanceof Comment&&r.data===""?co(r):r}return tr}function Me(t,e=1,r=!1){let n=Rt?tr:t;for(var i;e--;)i=n,n=co(n);if(!Rt)return n;if(r&&n?.nodeType!==t3){var s=ks();return n===null?i?.after(s):n.before(s),ui(s),s}return ui(n),n}function h9(t){t.textContent=""}function i3(){return!1}const UD=new WeakMap;function LD(t){var e=xt;if(e===null)return Xt.f|=Bl,t;if((e.f&Kw)===0){if((e.f&QA)===0)throw!e.parent&&t instanceof Error&&f9(t),t;e.b.error(t)}else s3(t,e)}function s3(t,e){for(;e!==null;){if((e.f&QA)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t instanceof Error&&f9(t),t}function f9(t){const e=UD.get(t);e&&(Cp(t,"message",{value:e.message}),Cp(t,"stack",{value:e.stack}))}const FD=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let Np=[],xp=[];function p9(){var t=Np;Np=[],Sp(t)}function g9(){var t=xp;xp=[],Sp(t)}function Z1(t){Np.length===0&&queueMicrotask(p9),Np.push(t)}function VD(t){xp.length===0&&FD(g9),xp.push(t)}function DD(){Np.length>0&&p9(),xp.length>0&&g9()}function WD(){for(var t=xt.b;t!==null&&!t.has_pending_snippet();)t=t.parent;return t===null&&dD(),t}function J1(t){var e=wi|Wi,r=Xt!==null&&(Xt.f&wi)!==0?Xt:null;return xt===null||r!==null&&(r.f&Di)!==0?e|=Di:xt.f|=Rp,{ctx:Pr,deps:null,effects:null,equals:XA,f:e,fn:t,reactions:null,rv:0,v:Kr,wv:0,parent:r??xt,ac:null}}function jD(t,e){let r=xt;r===null&&hD();var n=r.b,i=void 0,s=hc(Kr),o=null,a=!Xt;return rW(()=>{try{var c=t()}catch(p){c=Promise.reject(p)}var l=()=>c;i=o?.then(l,l)??Promise.resolve(c),o=i;var u=wr,h=n.pending;a&&(n.update_pending_count(1),h||u.increment());const d=(p,g=void 0)=>{o=null,h||u.activate(),g?g!==e3&&(s.f|=Bl,pc(s,g)):((s.f&Bl)!==0&&(s.f^=Bl),pc(s,p)),a&&(n.update_pending_count(-1),h||u.decrement()),b9()};if(i.then(d,p=>d(null,p||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(c=>{function l(u){function h(){u===i?c(s):l(i)}u.then(h,h)}l(i)})}function bt(t){const e=J1(t);return e.equals=t9,e}function m9(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)$i(e[r])}}function GD(t){for(var e=t.parent;e!==null;){if((e.f&wi)===0)return e;e=e.parent}return null}function o3(t){var e,r=xt;Gi(GD(t));try{m9(t),e=B9(t)}finally{Gi(r)}return e}function y9(t){var e=o3(t);if(t.equals(e)||(t.v=e,t.wv=I9()),!Vl)if(Ld!==null)Ld.set(t,t.v);else{var r=(gc||(t.f&Di)!==0)&&t.deps!==null?ta:bn;Yn(t,r)}}function v9(t,e,r){const n=Ul()?J1:bt;if(e.length===0){r(t.map(n));return}var i=wr,s=xt,o=zD(),a=WD();Promise.all(e.map(c=>jD(c))).then(c=>{i?.activate(),o();try{r([...t.map(n),...c])}catch(l){(s.f&Ol)===0&&s3(l,s)}i?.deactivate(),b9()}).catch(c=>{a.error(c)})}function zD(){var t=xt,e=Xt,r=Pr;return function(){Gi(t),ji(e),Md(r)}}function b9(){Gi(null),ji(null),Md(null)}const Ip=new Set;let wr=null,Q1=null,Ld=null,w9=new Set,Y1=[];function k9(){const t=Y1.shift();Y1.length>0&&queueMicrotask(k9),t()}let Ll=[],K1=null,a3=!1,q1=!1;class Fd{current=new Map;#t=new Map;#e=new Set;#r=0;#l=null;#u=!1;#i=[];#o=[];#s=[];#n=[];#a=[];#d=[];#h=[];skipped_effects=new Set;process(e){Ll=[],Q1=null;var r=null;if(Ip.size>1){r=new Map,Ld=new Map;for(const[s,o]of this.current)r.set(s,{v:s.v,wv:s.wv}),s.v=o;for(const s of Ip)if(s!==this)for(const[o,a]of s.#t)r.has(o)||(r.set(o,{v:o.v,wv:o.wv}),o.v=a)}for(const s of e)this.#p(s);if(this.#i.length===0&&this.#r===0){this.#f();var n=this.#s,i=this.#n;this.#s=[],this.#n=[],this.#a=[],Q1=wr,wr=null,A9(n),A9(i),wr===null?wr=this:Ip.delete(this),this.#l?.resolve()}else this.#c(this.#s),this.#c(this.#n),this.#c(this.#a);if(r){for(const[s,{v:o,wv:a}]of r)s.wv<=a&&(s.v=o);Ld=null}for(const s of this.#i)Wl(s);for(const s of this.#o)Wl(s);this.#i=[],this.#o=[]}#p(e){e.f^=bn;for(var r=e.first;r!==null;){var n=r.f,i=(n&(ea|Il))!==0,s=i&&(n&bn)!==0,o=s||(n&ws)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(i)r.f^=bn;else if((n&Yw)!==0)this.#n.push(r);else if((n&bn)===0)if((n&Xw)!==0){var a=r.b?.pending?this.#o:this.#i;a.push(r)}else Bp(r)&&((r.f&Id)!==0&&this.#a.push(r),Wl(r));var c=r.first;if(c!==null){r=c;continue}}var l=r.parent;for(r=r.next;r===null&&l!==null;)r=l.next,l=l.parent}}#c(e){for(const r of e)((r.f&Wi)!==0?this.#d:this.#h).push(r),Yn(r,bn);e.length=0}capture(e,r){this.#t.has(e)||this.#t.set(e,r),this.current.set(e,e.v)}activate(){wr=this}deactivate(){wr=null,Q1=null;for(const e of w9)if(w9.delete(e),e(),wr!==null)break}neuter(){this.#u=!0}flush(){Ll.length>0?E9():this.#f(),wr===this&&(this.#r===0&&Ip.delete(this),this.deactivate())}#f(){if(!this.#u)for(const e of this.#e)e();this.#e.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const e of this.#d)Yn(e,Wi),Vd(e);for(const e of this.#h)Yn(e,ta),Vd(e);this.#s=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(e){this.#e.add(e)}settled(){return(this.#l??=cD()).promise}static ensure(){if(wr===null){const e=wr=new Fd;Ip.add(wr),q1||Fd.enqueue(()=>{wr===e&&e.flush()})}return wr}static enqueue(e){Y1.length===0&&queueMicrotask(k9),Y1.unshift(e)}}function je(t){var e=q1;q1=!0;try{for(var r;;){if(DD(),Ll.length===0&&(wr?.flush(),Ll.length===0))return K1=null,r;E9()}}finally{q1=e}}function E9(){var t=Dd;a3=!0;try{var e=0;for(R9(!0);Ll.length>0;){var r=Fd.ensure();if(e++>1e3){var n,i;$D()}r.process(Ll),dc.clear()}}finally{a3=!1,R9(t),K1=null}}function $D(){try{mD()}catch(t){s3(t,K1)}}let Fl=null;function A9(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(Ol|ws))===0&&Bp(n)&&(Fl=[],Wl(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?W9(n):n.fn=null),Fl.length>0)){dc.clear();for(const i of Fl)Wl(i);Fl=[]}}Fl=null}}function Vd(t){for(var e=K1=t;e.parent!==null;){e=e.parent;var r=e.f;if(a3&&e===xt&&(r&Id)!==0)return;if((r&(Il|ea))!==0){if((r&bn)===0)return;e.f^=bn}}Ll.push(e)}const dc=new Map;function hc(t,e){var r={f:0,v:t,reactions:null,equals:XA,rv:0,wv:0};return r}function fc(t,e){const r=hc(t);return QD(r),r}function De(t,e=!1,r=!0){const n=hc(t);return e||(n.equals=t9),Bd&&r&&Pr!==null&&Pr.l!==null&&(Pr.l.s??=[]).push(n),n}function HD(t,e){return Re(t,Le(()=>H(t))),e}function Re(t,e,r=!1){Xt!==null&&(!lo||(Xt.f&YA)!==0)&&Ul()&&(Xt.f&(wi|Id|Xw|YA))!==0&&!na?.includes(t)&&kD();let n=r?Ud(e):e;return pc(t,n)}function pc(t,e){if(!t.equals(e)){var r=t.v;Vl?dc.set(t,e):dc.set(t,r),t.v=e;var n=Fd.ensure();n.capture(t,r),(t.f&wi)!==0&&((t.f&Wi)!==0&&o3(t),Yn(t,(t.f&Di)===0?bn:ta)),t.wv=I9(),T9(t,Wi),Ul()&&xt!==null&&(xt.f&bn)!==0&&(xt.f&(ea|Il))===0&&(zi===null?YD([t]):zi.push(t))}return e}function _9(t,e=1){var r=H(t),n=e===1?r++:r--;return Re(t,r),n}function c3(t){Re(t,t.v+1)}function T9(t,e){var r=t.reactions;if(r!==null)for(var n=Ul(),i=r.length,s=0;s<i;s++){var o=r[s],a=o.f;if(!(!n&&o===xt)){var c=(a&Wi)===0;c&&Yn(o,e),(a&wi)!==0?T9(o,ta):c&&((a&Id)!==0&&Fl!==null&&Fl.push(o),Vd(o))}}}function ZD(t,e){if(e){const r=document.body;t.autofocus=!0,Z1(()=>{document.activeElement===r&&t.focus()})}}let C9=!1;function S9(){C9||(C9=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function X1(t){var e=Xt,r=xt;ji(null),Gi(null);try{return t()}finally{ji(e),Gi(r)}}function JD(t,e,r,n=r){t.addEventListener(e,()=>X1(r));const i=t.__on_r;i?t.__on_r=()=>{i(),n(!0)}:t.__on_r=()=>n(!0),S9()}let Dd=!1;function R9(t){Dd=t}let Vl=!1;function P9(t){Vl=t}let Xt=null,lo=!1;function ji(t){Xt=t}let xt=null;function Gi(t){xt=t}let na=null;function QD(t){Xt!==null&&(na===null?na=[t]:na.push(t))}let Qn=null,Ei=0,zi=null;function YD(t){zi=t}let N9=1,Op=0,Dl=Op;function x9(t){Dl=t}let gc=!1;function I9(){return++N9}function Bp(t){var e=t.f;if((e&Wi)!==0)return!0;if((e&ta)!==0){var r=t.deps,n=(e&Di)!==0;if(r!==null){var i,s,o=(e&W1)!==0,a=n&&xt!==null&&!gc,c=r.length;if((o||a)&&(xt===null||(xt.f&Ol)===0)){var l=t,u=l.parent;for(i=0;i<c;i++)s=r[i],(o||!s?.reactions?.includes(l))&&(s.reactions??=[]).push(l);o&&(l.f^=W1),a&&u!==null&&(u.f&Di)===0&&(l.f^=Di)}for(i=0;i<c;i++)if(s=r[i],Bp(s)&&y9(s),s.wv>t.wv)return!0}(!n||xt!==null&&!gc)&&Yn(t,bn)}return!1}function O9(t,e,r=!0){var n=t.reactions;if(n!==null&&!na?.includes(t))for(var i=0;i<n.length;i++){var s=n[i];(s.f&wi)!==0?O9(s,e,!1):e===s&&(r?Yn(s,Wi):(s.f&bn)!==0&&Yn(s,ta),Vd(s))}}function B9(t){var e=Qn,r=Ei,n=zi,i=Xt,s=gc,o=na,a=Pr,c=lo,l=Dl,u=t.f;Qn=null,Ei=0,zi=null,gc=(u&Di)!==0&&(lo||!Dd||Xt===null),Xt=(u&(ea|Il))===0?t:null,na=null,Md(t.ctx),lo=!1,Dl=++Op,t.ac!==null&&(X1(()=>{t.ac.abort(e3)}),t.ac=null);try{t.f|=qw;var h=t.fn,d=h(),p=t.deps;if(Qn!==null){var g;if(ey(t,Ei),p!==null&&Ei>0)for(p.length=Ei+Qn.length,g=0;g<Qn.length;g++)p[Ei+g]=Qn[g];else t.deps=p=Qn;if(!gc||(u&wi)!==0&&t.reactions!==null)for(g=Ei;g<p.length;g++)(p[g].reactions??=[]).push(t)}else p!==null&&Ei<p.length&&(ey(t,Ei),p.length=Ei);if(Ul()&&zi!==null&&!lo&&p!==null&&(t.f&(wi|ta|Wi))===0)for(g=0;g<zi.length;g++)O9(zi[g],t);return i!==null&&i!==t&&(Op++,zi!==null&&(n===null?n=zi:n.push(...zi))),(t.f&Bl)!==0&&(t.f^=Bl),d}catch(m){return LD(m)}finally{t.f^=qw,Qn=e,Ei=r,zi=n,Xt=i,gc=s,na=o,Md(a),lo=c,Dl=l}}function KD(t,e){let r=e.reactions;if(r!==null){var n=iD.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(e.f&wi)!==0&&(Qn===null||!Qn.includes(e))&&(Yn(e,ta),(e.f&(Di|W1))===0&&(e.f^=W1),m9(e),ey(e,0))}function ey(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)KD(t,r[n])}function Wl(t){var e=t.f;if((e&Ol)===0){Yn(t,bn);var r=xt,n=Dd;xt=t,Dd=!0;try{(e&Id)!==0?nW(t):V9(t),F9(t);var i=B9(t);t.teardown=typeof i=="function"?i:null,t.wv=N9;var s;$A&&ED&&(t.f&Wi)!==0&&t.deps}finally{Dd=n,xt=r}}}function H(t){var e=t.f,r=(e&wi)!==0;if(Xt!==null&&!lo){var n=xt!==null&&(xt.f&Ol)!==0;if(!n&&!na?.includes(t)){var i=Xt.deps;if((Xt.f&qw)!==0)t.rv<Op&&(t.rv=Op,Qn===null&&i!==null&&i[Ei]===t?Ei++:Qn===null?Qn=[t]:(!gc||!Qn.includes(t))&&Qn.push(t));else{(Xt.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[Xt]:s.includes(Xt)||s.push(Xt)}}}else if(r&&t.deps===null&&t.effects===null){var o=t,a=o.parent;a!==null&&(a.f&Di)===0&&(o.f^=Di)}if(Vl){if(dc.has(t))return dc.get(t);if(r){o=t;var c=o.v;return((o.f&bn)===0&&o.reactions!==null||M9(o))&&(c=o3(o)),dc.set(o,c),c}}else if(r){if(o=t,Ld?.has(o))return Ld.get(o);Bp(o)&&y9(o)}if((t.f&Bl)!==0)throw t.v;return t.v}function M9(t){if(t.v===Kr)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(dc.has(e)||(e.f&wi)!==0&&M9(e))return!0;return!1}function l3(t){return t&&H(t)}function Le(t){var e=lo;try{return lo=!0,t()}finally{lo=e}}const qD=-7169;function Yn(t,e){t.f=t.f&qD|e}function $e(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(uc in t)u3(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&uc in r&&u3(r)}}}function u3(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{u3(t[n],e)}catch{}const r=Qw(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=HA(r);for(let i in n){const s=n[i].get;if(s)try{s.call(t)}catch{}}}}}function U9(t){xt===null&&Xt===null&&gD(),Xt!==null&&(Xt.f&Di)!==0&&xt===null&&pD(),Vl&&fD()}function XD(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function uo(t,e,r,n=!0){var i=xt;i!==null&&(i.f&ws)!==0&&(t|=ws);var s={ctx:Pr,deps:null,nodes_start:null,nodes_end:null,f:t|Wi,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Wl(s),s.f|=Kw}catch(c){throw $i(s),c}else e!==null&&Vd(s);if(n){var o=s;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&Rp)===0&&(o=o.first),o!==null&&(o.parent=i,i!==null&&XD(o,i),Xt!==null&&(Xt.f&wi)!==0&&(t&Il)===0)){var a=Xt;(a.effects??=[]).push(o)}}return s}function d3(t){const e=uo(D1,null,!1);return Yn(e,bn),e.teardown=t,e}function h3(t){U9();var e=xt.f,r=!Xt&&(e&ea)!==0&&(e&Kw)===0;if(r){var n=Pr;(n.e??=[]).push(t)}else return L9(t)}function L9(t){return uo(Yw|KA,t,!1)}function eW(t){return U9(),uo(D1|KA,t,!0)}function tW(t){Fd.ensure();const e=uo(Il|Rp,t,!0);return(r={})=>new Promise(n=>{r.outro?jl(e,()=>{$i(e),n(void 0)}):($i(e),n(void 0))})}function f3(t){return uo(Yw,t,!1)}function gt(t,e){var r=Pr,n={effect:null,ran:!1,deps:t};r.l.$.push(n),n.effect=p3(()=>{t(),!n.ran&&(n.ran=!0,Le(e))})}function mr(){var t=Pr;p3(()=>{for(var e of t.l.$){e.deps();var r=e.effect;(r.f&bn)!==0&&Yn(r,ta),Bp(r)&&Wl(r),e.ran=!1}})}function rW(t){return uo(Xw|Rp,t,!0)}function p3(t,e=0){return uo(D1|e,t,!0)}function Ye(t,e=[],r=[]){v9(e,r,n=>{uo(D1,()=>t(...n.map(H)),!0)})}function Wd(t,e=0){var r=uo(Id|e,t,!0);return r}function ho(t,e=!0){return uo(ea|Rp,t,!0,e)}function F9(t){var e=t.teardown;if(e!==null){const r=Vl,n=Xt;P9(!0),ji(null);try{e.call(null)}finally{P9(r),ji(n)}}}function V9(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&X1(()=>{i.abort(e3)});var n=r.next;(r.f&Il)!==0?r.parent=null:$i(r,e),r=n}}function nW(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&ea)===0&&$i(e),e=r}}function $i(t,e=!0){var r=!1;(e||(t.f&lD)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(D9(t.nodes_start,t.nodes_end),r=!0),V9(t,e&&!r),ey(t,0),Yn(t,Ol);var n=t.transitions;if(n!==null)for(const s of n)s.stop();F9(t);var i=t.parent;i!==null&&i.first!==null&&W9(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function D9(t,e){for(;t!==null;){var r=t===e?null:co(t);t.remove(),t=r}}function W9(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function jl(t,e){var r=[];g3(t,r,!0),j9(r,()=>{$i(t),e&&e()})}function j9(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function g3(t,e,r){if((t.f&ws)===0){if(t.f^=ws,t.transitions!==null)for(const o of t.transitions)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var i=n.next,s=(n.f&j1)!==0||(n.f&ea)!==0;g3(n,e,s?r:!1),n=i}}}function ty(t){G9(t,!0)}function G9(t,e){if((t.f&ws)!==0){t.f^=ws,(t.f&bn)===0&&(Yn(t,Wi),Vd(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&j1)!==0||(r.f&ea)!==0;G9(r,i?e:!1),r=n}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||e)&&s.in()}}function iW(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const sW=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function oW(t){return sW.includes(t)}const aW={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function cW(t){return t=t.toLowerCase(),aW[t]??t}const lW=["touchstart","touchmove"];function uW(t){return lW.includes(t)}const z9=new Set,m3=new Set;function $9(t,e,r,n={}){function i(s){if(n.capture||Mp.call(e,s),!s.cancelBubble)return X1(()=>r?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Z1(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function un(t,e,r,n,i){var s={capture:n,passive:i},o=$9(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&d3(()=>{e.removeEventListener(t,o,s)})}function dW(t){for(var e=0;e<t.length;e++)z9.add(t[e]);for(var r of m3)r(t)}let H9=null;function Mp(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;H9=t;var o=0,a=H9===t&&t.__root;if(a){var c=i.indexOf(a);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var l=i.indexOf(e);if(l===-1)return;c<=l&&(o=c)}if(s=i[o]||t.target,s!==e){Cp(t,"currentTarget",{configurable:!0,get(){return s||r}});var u=Xt,h=xt;ji(null),Gi(null);try{for(var d,p=[];s!==null;){var g=s.assignedSlot||s.parentNode||s.host||null;try{var m=s["__"+n];if(m!=null&&(!s.disabled||t.target===s))if(V1(m)){var[y,...v]=m;y.apply(s,[t,...v])}else m.call(s,t)}catch(A){d?p.push(A):d=A}if(t.cancelBubble||g===e||g===null)break;s=g}if(d){for(let A of p)queueMicrotask(()=>{throw A});throw d}}finally{t.__root=e,delete t.currentTarget,ji(u),Gi(h)}}}function Z9(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function fo(t,e){var r=xt;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Fe(t,e){var r=(e&ND)!==0,n=(e&xD)!==0,i,s=!t.startsWith("<!>");return()=>{if(Rt)return fo(tr,null),tr;i===void 0&&(i=Z9(s?t:"<!>"+t),r||(i=Es(i)));var o=n||l9?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Es(o),c=o.lastChild;fo(a,c)}else fo(o,o);return o}}function Mr(t=""){if(!Rt){var e=ks(t+"");return fo(e,e),e}var r=tr;return r.nodeType!==t3&&(r.before(r=ks()),ui(r)),fo(r,r),r}function nt(){if(Rt)return fo(tr,null),tr;var t=document.createDocumentFragment(),e=document.createComment(""),r=ks();return t.append(e,r),fo(e,r),t}function Ee(t,e){if(Rt){xt.nodes_end=tr,ra();return}t!==null&&t.before(e)}function pt(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function J9(t,e){return Q9(t,e)}function hW(t,e){n3(),e.intro=e.intro??!1;const r=e.target,n=Rt,i=tr;try{for(var s=Es(r);s&&(s.nodeType!==Od||s.data!==s9);)s=co(s);if(!s)throw Ml;ki(!0),ui(s),ra();const o=Q9(t,{...e,anchor:s});if(tr===null||tr.nodeType!==Od||tr.data!==r3)throw Pp(),Ml;return ki(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
+ (function(Nd,F1){typeof exports=="object"&&typeof module<"u"?F1(exports):typeof define=="function"&&define.amd?define(["exports"],F1):(Nd=typeof globalThis<"u"?globalThis:Nd||self,F1(Nd.CredenzaPassport={}))})(this,function(Nd){"use strict";const nD={version:"0.3.14"},$A=!1;var V1=Array.isArray,iD=Array.prototype.indexOf,Jw=Array.from,Cp=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,HA=Object.getOwnPropertyDescriptors,sD=Object.prototype,oD=Array.prototype,Qw=Object.getPrototypeOf,ZA=Object.isExtensible;const lc=()=>{};function JA(t){return typeof t?.then=="function"}function aD(t){return t()}function Sp(t){for(var e=0;e<t.length;e++)t[e]()}function cD(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}const wi=2,Yw=4,D1=8,Id=16,ea=32,Il=64,QA=128,Di=256,W1=512,bn=1024,Wi=2048,ta=4096,ws=8192,Ol=16384,Kw=32768,j1=65536,YA=1<<17,lD=1<<18,Rp=1<<19,KA=1<<20,qw=1<<21,Xw=1<<22,Bl=1<<23,uc=Symbol("$state"),qA=Symbol("legacy props"),uD=Symbol(""),e3=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},t3=3,Od=8;function XA(t){return t===this.v}function e9(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function t9(t){return!e9(t,this.v)}function dD(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function r9(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function hD(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function fD(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function pD(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function gD(t){throw new Error("https://svelte.dev/e/effect_orphan")}function mD(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function yD(){throw new Error("https://svelte.dev/e/hydration_failed")}function vD(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function bD(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function wD(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function kD(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Bd=!1,ED=!1;function AD(){Bd=!0}const G1=1,z1=2,n9=4,_D=8,TD=16,CD=1,SD=2,i9=4,RD=8,PD=16,ND=1,xD=2,s9="[",$1="[!",r3="]",Ml={},Kr=Symbol(),ID="http://www.w3.org/1999/xhtml",OD="@attach";let Pr=null;function Md(t){Pr=t}function ot(t,e=!1,r){Pr={p:Pr,c:null,e:null,s:t,x:null,l:Bd&&!e?{s:null,u:null,$:[]}:null}}function at(t){var e=Pr,r=e.e;if(r!==null){e.e=null;for(var n of r)L9(n)}return t!==void 0&&(e.x=t),Pr=e.p,t??{}}function Ul(){return!Bd||Pr!==null&&Pr.l===null}function Pp(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function BD(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let Rt=!1;function ki(t){Rt=t}let tr;function ui(t){if(t===null)throw Pp(),Ml;return tr=t}function ra(){return ui(co(tr))}function xe(t){if(Rt){if(co(tr)!==null)throw Pp(),Ml;tr=t}}function Jn(t=1){if(Rt){for(var e=t,r=tr;e--;)r=co(r);tr=r}}function H1(){for(var t=0,e=tr;;){if(e.nodeType===Od){var r=e.data;if(r===r3){if(t===0)return e;t-=1}else(r===s9||r===$1)&&(t+=1)}var n=co(e);e.remove(),e=n}}function o9(t){if(!t||t.nodeType!==Od)throw Pp(),Ml;return t.data}function Ud(t){if(typeof t!="object"||t===null||uc in t)return t;const e=Qw(t);if(e!==sD&&e!==oD)return t;var r=new Map,n=V1(t),i=fc(0),s=Dl,o=a=>{if(Dl===s)return a();var c=Xt,l=Dl;ji(null),x9(s);var u=a();return ji(c),x9(l),u};return n&&r.set("length",fc(t.length)),new Proxy(t,{defineProperty(a,c,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&bD();var u=r.get(c);return u===void 0?u=o(()=>{var h=fc(l.value);return r.set(c,h),h}):Re(u,l.value,!0),!0},deleteProperty(a,c){var l=r.get(c);if(l===void 0){if(c in a){const u=o(()=>fc(Kr));r.set(c,u),c3(i)}}else Re(l,Kr),c3(i);return!0},get(a,c,l){if(c===uc)return t;var u=r.get(c),h=c in a;if(u===void 0&&(!h||xd(a,c)?.writable)&&(u=o(()=>{var p=Ud(h?a[c]:Kr),g=fc(p);return g}),r.set(c,u)),u!==void 0){var d=H(u);return d===Kr?void 0:d}return Reflect.get(a,c,l)},getOwnPropertyDescriptor(a,c){var l=Reflect.getOwnPropertyDescriptor(a,c);if(l&&"value"in l){var u=r.get(c);u&&(l.value=H(u))}else if(l===void 0){var h=r.get(c),d=h?.v;if(h!==void 0&&d!==Kr)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return l},has(a,c){if(c===uc)return!0;var l=r.get(c),u=l!==void 0&&l.v!==Kr||Reflect.has(a,c);if(l!==void 0||xt!==null&&(!u||xd(a,c)?.writable)){l===void 0&&(l=o(()=>{var d=u?Ud(a[c]):Kr,p=fc(d);return p}),r.set(c,l));var h=H(l);if(h===Kr)return!1}return u},set(a,c,l,u){var h=r.get(c),d=c in a;if(n&&c==="length")for(var p=l;p<h.v;p+=1){var g=r.get(p+"");g!==void 0?Re(g,Kr):p in a&&(g=o(()=>fc(Kr)),r.set(p+"",g))}if(h===void 0)(!d||xd(a,c)?.writable)&&(h=o(()=>fc(void 0)),Re(h,Ud(l)),r.set(c,h));else{d=h.v!==Kr;var m=o(()=>Ud(l));Re(h,m)}var y=Reflect.getOwnPropertyDescriptor(a,c);if(y?.set&&y.set.call(u,l),!d){if(n&&typeof c=="string"){var v=r.get("length"),A=Number(c);Number.isInteger(A)&&A>=v.v&&Re(v,A+1)}c3(i)}return!0},ownKeys(a){H(i);var c=Reflect.ownKeys(a).filter(h=>{var d=r.get(h);return d===void 0||d.v!==Kr});for(var[l,u]of r)u.v!==Kr&&!(l in a)&&c.push(l);return c},setPrototypeOf(){wD()}})}function a9(t){try{if(t!==null&&typeof t=="object"&&uc in t)return t[uc]}catch{}return t}function MD(t,e){return Object.is(a9(t),a9(e))}var c9,l9,u9,d9;function n3(){if(c9===void 0){c9=window,l9=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;u9=xd(e,"firstChild").get,d9=xd(e,"nextSibling").get,ZA(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),ZA(r)&&(r.__t=void 0)}}function ks(t=""){return document.createTextNode(t)}function Es(t){return u9.call(t)}function co(t){return d9.call(t)}function Ie(t,e){if(!Rt)return Es(t);var r=Es(tr);if(r===null)r=tr.appendChild(ks());else if(e&&r.nodeType!==t3){var n=ks();return r?.before(n),ui(n),n}return ui(r),r}function He(t,e){if(!Rt){var r=Es(t);return r instanceof Comment&&r.data===""?co(r):r}return tr}function Me(t,e=1,r=!1){let n=Rt?tr:t;for(var i;e--;)i=n,n=co(n);if(!Rt)return n;if(r&&n?.nodeType!==t3){var s=ks();return n===null?i?.after(s):n.before(s),ui(s),s}return ui(n),n}function h9(t){t.textContent=""}function i3(){return!1}const UD=new WeakMap;function LD(t){var e=xt;if(e===null)return Xt.f|=Bl,t;if((e.f&Kw)===0){if((e.f&QA)===0)throw!e.parent&&t instanceof Error&&f9(t),t;e.b.error(t)}else s3(t,e)}function s3(t,e){for(;e!==null;){if((e.f&QA)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t instanceof Error&&f9(t),t}function f9(t){const e=UD.get(t);e&&(Cp(t,"message",{value:e.message}),Cp(t,"stack",{value:e.stack}))}const FD=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let Np=[],xp=[];function p9(){var t=Np;Np=[],Sp(t)}function g9(){var t=xp;xp=[],Sp(t)}function Z1(t){Np.length===0&&queueMicrotask(p9),Np.push(t)}function VD(t){xp.length===0&&FD(g9),xp.push(t)}function DD(){Np.length>0&&p9(),xp.length>0&&g9()}function WD(){for(var t=xt.b;t!==null&&!t.has_pending_snippet();)t=t.parent;return t===null&&dD(),t}function J1(t){var e=wi|Wi,r=Xt!==null&&(Xt.f&wi)!==0?Xt:null;return xt===null||r!==null&&(r.f&Di)!==0?e|=Di:xt.f|=Rp,{ctx:Pr,deps:null,effects:null,equals:XA,f:e,fn:t,reactions:null,rv:0,v:Kr,wv:0,parent:r??xt,ac:null}}function jD(t,e){let r=xt;r===null&&hD();var n=r.b,i=void 0,s=hc(Kr),o=null,a=!Xt;return rW(()=>{try{var c=t()}catch(p){c=Promise.reject(p)}var l=()=>c;i=o?.then(l,l)??Promise.resolve(c),o=i;var u=wr,h=n.pending;a&&(n.update_pending_count(1),h||u.increment());const d=(p,g=void 0)=>{o=null,h||u.activate(),g?g!==e3&&(s.f|=Bl,pc(s,g)):((s.f&Bl)!==0&&(s.f^=Bl),pc(s,p)),a&&(n.update_pending_count(-1),h||u.decrement()),b9()};if(i.then(d,p=>d(null,p||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(c=>{function l(u){function h(){u===i?c(s):l(i)}u.then(h,h)}l(i)})}function bt(t){const e=J1(t);return e.equals=t9,e}function m9(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)$i(e[r])}}function GD(t){for(var e=t.parent;e!==null;){if((e.f&wi)===0)return e;e=e.parent}return null}function o3(t){var e,r=xt;Gi(GD(t));try{m9(t),e=B9(t)}finally{Gi(r)}return e}function y9(t){var e=o3(t);if(t.equals(e)||(t.v=e,t.wv=I9()),!Vl)if(Ld!==null)Ld.set(t,t.v);else{var r=(gc||(t.f&Di)!==0)&&t.deps!==null?ta:bn;Yn(t,r)}}function v9(t,e,r){const n=Ul()?J1:bt;if(e.length===0){r(t.map(n));return}var i=wr,s=xt,o=zD(),a=WD();Promise.all(e.map(c=>jD(c))).then(c=>{i?.activate(),o();try{r([...t.map(n),...c])}catch(l){(s.f&Ol)===0&&s3(l,s)}i?.deactivate(),b9()}).catch(c=>{a.error(c)})}function zD(){var t=xt,e=Xt,r=Pr;return function(){Gi(t),ji(e),Md(r)}}function b9(){Gi(null),ji(null),Md(null)}const Ip=new Set;let wr=null,Q1=null,Ld=null,w9=new Set,Y1=[];function k9(){const t=Y1.shift();Y1.length>0&&queueMicrotask(k9),t()}let Ll=[],K1=null,a3=!1,q1=!1;class Fd{current=new Map;#t=new Map;#e=new Set;#r=0;#l=null;#u=!1;#i=[];#o=[];#s=[];#n=[];#a=[];#d=[];#h=[];skipped_effects=new Set;process(e){Ll=[],Q1=null;var r=null;if(Ip.size>1){r=new Map,Ld=new Map;for(const[s,o]of this.current)r.set(s,{v:s.v,wv:s.wv}),s.v=o;for(const s of Ip)if(s!==this)for(const[o,a]of s.#t)r.has(o)||(r.set(o,{v:o.v,wv:o.wv}),o.v=a)}for(const s of e)this.#p(s);if(this.#i.length===0&&this.#r===0){this.#f();var n=this.#s,i=this.#n;this.#s=[],this.#n=[],this.#a=[],Q1=wr,wr=null,A9(n),A9(i),wr===null?wr=this:Ip.delete(this),this.#l?.resolve()}else this.#c(this.#s),this.#c(this.#n),this.#c(this.#a);if(r){for(const[s,{v:o,wv:a}]of r)s.wv<=a&&(s.v=o);Ld=null}for(const s of this.#i)Wl(s);for(const s of this.#o)Wl(s);this.#i=[],this.#o=[]}#p(e){e.f^=bn;for(var r=e.first;r!==null;){var n=r.f,i=(n&(ea|Il))!==0,s=i&&(n&bn)!==0,o=s||(n&ws)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(i)r.f^=bn;else if((n&Yw)!==0)this.#n.push(r);else if((n&bn)===0)if((n&Xw)!==0){var a=r.b?.pending?this.#o:this.#i;a.push(r)}else Bp(r)&&((r.f&Id)!==0&&this.#a.push(r),Wl(r));var c=r.first;if(c!==null){r=c;continue}}var l=r.parent;for(r=r.next;r===null&&l!==null;)r=l.next,l=l.parent}}#c(e){for(const r of e)((r.f&Wi)!==0?this.#d:this.#h).push(r),Yn(r,bn);e.length=0}capture(e,r){this.#t.has(e)||this.#t.set(e,r),this.current.set(e,e.v)}activate(){wr=this}deactivate(){wr=null,Q1=null;for(const e of w9)if(w9.delete(e),e(),wr!==null)break}neuter(){this.#u=!0}flush(){Ll.length>0?E9():this.#f(),wr===this&&(this.#r===0&&Ip.delete(this),this.deactivate())}#f(){if(!this.#u)for(const e of this.#e)e();this.#e.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const e of this.#d)Yn(e,Wi),Vd(e);for(const e of this.#h)Yn(e,ta),Vd(e);this.#s=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(e){this.#e.add(e)}settled(){return(this.#l??=cD()).promise}static ensure(){if(wr===null){const e=wr=new Fd;Ip.add(wr),q1||Fd.enqueue(()=>{wr===e&&e.flush()})}return wr}static enqueue(e){Y1.length===0&&queueMicrotask(k9),Y1.unshift(e)}}function je(t){var e=q1;q1=!0;try{for(var r;;){if(DD(),Ll.length===0&&(wr?.flush(),Ll.length===0))return K1=null,r;E9()}}finally{q1=e}}function E9(){var t=Dd;a3=!0;try{var e=0;for(R9(!0);Ll.length>0;){var r=Fd.ensure();if(e++>1e3){var n,i;$D()}r.process(Ll),dc.clear()}}finally{a3=!1,R9(t),K1=null}}function $D(){try{mD()}catch(t){s3(t,K1)}}let Fl=null;function A9(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(Ol|ws))===0&&Bp(n)&&(Fl=[],Wl(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?W9(n):n.fn=null),Fl.length>0)){dc.clear();for(const i of Fl)Wl(i);Fl=[]}}Fl=null}}function Vd(t){for(var e=K1=t;e.parent!==null;){e=e.parent;var r=e.f;if(a3&&e===xt&&(r&Id)!==0)return;if((r&(Il|ea))!==0){if((r&bn)===0)return;e.f^=bn}}Ll.push(e)}const dc=new Map;function hc(t,e){var r={f:0,v:t,reactions:null,equals:XA,rv:0,wv:0};return r}function fc(t,e){const r=hc(t);return QD(r),r}function De(t,e=!1,r=!0){const n=hc(t);return e||(n.equals=t9),Bd&&r&&Pr!==null&&Pr.l!==null&&(Pr.l.s??=[]).push(n),n}function HD(t,e){return Re(t,Le(()=>H(t))),e}function Re(t,e,r=!1){Xt!==null&&(!lo||(Xt.f&YA)!==0)&&Ul()&&(Xt.f&(wi|Id|Xw|YA))!==0&&!na?.includes(t)&&kD();let n=r?Ud(e):e;return pc(t,n)}function pc(t,e){if(!t.equals(e)){var r=t.v;Vl?dc.set(t,e):dc.set(t,r),t.v=e;var n=Fd.ensure();n.capture(t,r),(t.f&wi)!==0&&((t.f&Wi)!==0&&o3(t),Yn(t,(t.f&Di)===0?bn:ta)),t.wv=I9(),T9(t,Wi),Ul()&&xt!==null&&(xt.f&bn)!==0&&(xt.f&(ea|Il))===0&&(zi===null?YD([t]):zi.push(t))}return e}function _9(t,e=1){var r=H(t),n=e===1?r++:r--;return Re(t,r),n}function c3(t){Re(t,t.v+1)}function T9(t,e){var r=t.reactions;if(r!==null)for(var n=Ul(),i=r.length,s=0;s<i;s++){var o=r[s],a=o.f;if(!(!n&&o===xt)){var c=(a&Wi)===0;c&&Yn(o,e),(a&wi)!==0?T9(o,ta):c&&((a&Id)!==0&&Fl!==null&&Fl.push(o),Vd(o))}}}function ZD(t,e){if(e){const r=document.body;t.autofocus=!0,Z1(()=>{document.activeElement===r&&t.focus()})}}let C9=!1;function S9(){C9||(C9=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function X1(t){var e=Xt,r=xt;ji(null),Gi(null);try{return t()}finally{ji(e),Gi(r)}}function JD(t,e,r,n=r){t.addEventListener(e,()=>X1(r));const i=t.__on_r;i?t.__on_r=()=>{i(),n(!0)}:t.__on_r=()=>n(!0),S9()}let Dd=!1;function R9(t){Dd=t}let Vl=!1;function P9(t){Vl=t}let Xt=null,lo=!1;function ji(t){Xt=t}let xt=null;function Gi(t){xt=t}let na=null;function QD(t){Xt!==null&&(na===null?na=[t]:na.push(t))}let Qn=null,Ei=0,zi=null;function YD(t){zi=t}let N9=1,Op=0,Dl=Op;function x9(t){Dl=t}let gc=!1;function I9(){return++N9}function Bp(t){var e=t.f;if((e&Wi)!==0)return!0;if((e&ta)!==0){var r=t.deps,n=(e&Di)!==0;if(r!==null){var i,s,o=(e&W1)!==0,a=n&&xt!==null&&!gc,c=r.length;if((o||a)&&(xt===null||(xt.f&Ol)===0)){var l=t,u=l.parent;for(i=0;i<c;i++)s=r[i],(o||!s?.reactions?.includes(l))&&(s.reactions??=[]).push(l);o&&(l.f^=W1),a&&u!==null&&(u.f&Di)===0&&(l.f^=Di)}for(i=0;i<c;i++)if(s=r[i],Bp(s)&&y9(s),s.wv>t.wv)return!0}(!n||xt!==null&&!gc)&&Yn(t,bn)}return!1}function O9(t,e,r=!0){var n=t.reactions;if(n!==null&&!na?.includes(t))for(var i=0;i<n.length;i++){var s=n[i];(s.f&wi)!==0?O9(s,e,!1):e===s&&(r?Yn(s,Wi):(s.f&bn)!==0&&Yn(s,ta),Vd(s))}}function B9(t){var e=Qn,r=Ei,n=zi,i=Xt,s=gc,o=na,a=Pr,c=lo,l=Dl,u=t.f;Qn=null,Ei=0,zi=null,gc=(u&Di)!==0&&(lo||!Dd||Xt===null),Xt=(u&(ea|Il))===0?t:null,na=null,Md(t.ctx),lo=!1,Dl=++Op,t.ac!==null&&(X1(()=>{t.ac.abort(e3)}),t.ac=null);try{t.f|=qw;var h=t.fn,d=h(),p=t.deps;if(Qn!==null){var g;if(ey(t,Ei),p!==null&&Ei>0)for(p.length=Ei+Qn.length,g=0;g<Qn.length;g++)p[Ei+g]=Qn[g];else t.deps=p=Qn;if(!gc||(u&wi)!==0&&t.reactions!==null)for(g=Ei;g<p.length;g++)(p[g].reactions??=[]).push(t)}else p!==null&&Ei<p.length&&(ey(t,Ei),p.length=Ei);if(Ul()&&zi!==null&&!lo&&p!==null&&(t.f&(wi|ta|Wi))===0)for(g=0;g<zi.length;g++)O9(zi[g],t);return i!==null&&i!==t&&(Op++,zi!==null&&(n===null?n=zi:n.push(...zi))),(t.f&Bl)!==0&&(t.f^=Bl),d}catch(m){return LD(m)}finally{t.f^=qw,Qn=e,Ei=r,zi=n,Xt=i,gc=s,na=o,Md(a),lo=c,Dl=l}}function KD(t,e){let r=e.reactions;if(r!==null){var n=iD.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(e.f&wi)!==0&&(Qn===null||!Qn.includes(e))&&(Yn(e,ta),(e.f&(Di|W1))===0&&(e.f^=W1),m9(e),ey(e,0))}function ey(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)KD(t,r[n])}function Wl(t){var e=t.f;if((e&Ol)===0){Yn(t,bn);var r=xt,n=Dd;xt=t,Dd=!0;try{(e&Id)!==0?nW(t):V9(t),F9(t);var i=B9(t);t.teardown=typeof i=="function"?i:null,t.wv=N9;var s;$A&&ED&&(t.f&Wi)!==0&&t.deps}finally{Dd=n,xt=r}}}function H(t){var e=t.f,r=(e&wi)!==0;if(Xt!==null&&!lo){var n=xt!==null&&(xt.f&Ol)!==0;if(!n&&!na?.includes(t)){var i=Xt.deps;if((Xt.f&qw)!==0)t.rv<Op&&(t.rv=Op,Qn===null&&i!==null&&i[Ei]===t?Ei++:Qn===null?Qn=[t]:(!gc||!Qn.includes(t))&&Qn.push(t));else{(Xt.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[Xt]:s.includes(Xt)||s.push(Xt)}}}else if(r&&t.deps===null&&t.effects===null){var o=t,a=o.parent;a!==null&&(a.f&Di)===0&&(o.f^=Di)}if(Vl){if(dc.has(t))return dc.get(t);if(r){o=t;var c=o.v;return((o.f&bn)===0&&o.reactions!==null||M9(o))&&(c=o3(o)),dc.set(o,c),c}}else if(r){if(o=t,Ld?.has(o))return Ld.get(o);Bp(o)&&y9(o)}if((t.f&Bl)!==0)throw t.v;return t.v}function M9(t){if(t.v===Kr)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(dc.has(e)||(e.f&wi)!==0&&M9(e))return!0;return!1}function l3(t){return t&&H(t)}function Le(t){var e=lo;try{return lo=!0,t()}finally{lo=e}}const qD=-7169;function Yn(t,e){t.f=t.f&qD|e}function $e(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(uc in t)u3(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&uc in r&&u3(r)}}}function u3(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{u3(t[n],e)}catch{}const r=Qw(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=HA(r);for(let i in n){const s=n[i].get;if(s)try{s.call(t)}catch{}}}}}function U9(t){xt===null&&Xt===null&&gD(),Xt!==null&&(Xt.f&Di)!==0&&xt===null&&pD(),Vl&&fD()}function XD(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function uo(t,e,r,n=!0){var i=xt;i!==null&&(i.f&ws)!==0&&(t|=ws);var s={ctx:Pr,deps:null,nodes_start:null,nodes_end:null,f:t|Wi,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Wl(s),s.f|=Kw}catch(c){throw $i(s),c}else e!==null&&Vd(s);if(n){var o=s;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&Rp)===0&&(o=o.first),o!==null&&(o.parent=i,i!==null&&XD(o,i),Xt!==null&&(Xt.f&wi)!==0&&(t&Il)===0)){var a=Xt;(a.effects??=[]).push(o)}}return s}function d3(t){const e=uo(D1,null,!1);return Yn(e,bn),e.teardown=t,e}function h3(t){U9();var e=xt.f,r=!Xt&&(e&ea)!==0&&(e&Kw)===0;if(r){var n=Pr;(n.e??=[]).push(t)}else return L9(t)}function L9(t){return uo(Yw|KA,t,!1)}function eW(t){return U9(),uo(D1|KA,t,!0)}function tW(t){Fd.ensure();const e=uo(Il|Rp,t,!0);return(r={})=>new Promise(n=>{r.outro?jl(e,()=>{$i(e),n(void 0)}):($i(e),n(void 0))})}function f3(t){return uo(Yw,t,!1)}function gt(t,e){var r=Pr,n={effect:null,ran:!1,deps:t};r.l.$.push(n),n.effect=p3(()=>{t(),!n.ran&&(n.ran=!0,Le(e))})}function mr(){var t=Pr;p3(()=>{for(var e of t.l.$){e.deps();var r=e.effect;(r.f&bn)!==0&&Yn(r,ta),Bp(r)&&Wl(r),e.ran=!1}})}function rW(t){return uo(Xw|Rp,t,!0)}function p3(t,e=0){return uo(D1|e,t,!0)}function Ye(t,e=[],r=[]){v9(e,r,n=>{uo(D1,()=>t(...n.map(H)),!0)})}function Wd(t,e=0){var r=uo(Id|e,t,!0);return r}function ho(t,e=!0){return uo(ea|Rp,t,!0,e)}function F9(t){var e=t.teardown;if(e!==null){const r=Vl,n=Xt;P9(!0),ji(null);try{e.call(null)}finally{P9(r),ji(n)}}}function V9(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&X1(()=>{i.abort(e3)});var n=r.next;(r.f&Il)!==0?r.parent=null:$i(r,e),r=n}}function nW(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&ea)===0&&$i(e),e=r}}function $i(t,e=!0){var r=!1;(e||(t.f&lD)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(D9(t.nodes_start,t.nodes_end),r=!0),V9(t,e&&!r),ey(t,0),Yn(t,Ol);var n=t.transitions;if(n!==null)for(const s of n)s.stop();F9(t);var i=t.parent;i!==null&&i.first!==null&&W9(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function D9(t,e){for(;t!==null;){var r=t===e?null:co(t);t.remove(),t=r}}function W9(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function jl(t,e){var r=[];g3(t,r,!0),j9(r,()=>{$i(t),e&&e()})}function j9(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function g3(t,e,r){if((t.f&ws)===0){if(t.f^=ws,t.transitions!==null)for(const o of t.transitions)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var i=n.next,s=(n.f&j1)!==0||(n.f&ea)!==0;g3(n,e,s?r:!1),n=i}}}function ty(t){G9(t,!0)}function G9(t,e){if((t.f&ws)!==0){t.f^=ws,(t.f&bn)===0&&(Yn(t,Wi),Vd(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&j1)!==0||(r.f&ea)!==0;G9(r,i?e:!1),r=n}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||e)&&s.in()}}function iW(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const sW=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function oW(t){return sW.includes(t)}const aW={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function cW(t){return t=t.toLowerCase(),aW[t]??t}const lW=["touchstart","touchmove"];function uW(t){return lW.includes(t)}const z9=new Set,m3=new Set;function $9(t,e,r,n={}){function i(s){if(n.capture||Mp.call(e,s),!s.cancelBubble)return X1(()=>r?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Z1(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function un(t,e,r,n,i){var s={capture:n,passive:i},o=$9(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&d3(()=>{e.removeEventListener(t,o,s)})}function dW(t){for(var e=0;e<t.length;e++)z9.add(t[e]);for(var r of m3)r(t)}let H9=null;function Mp(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;H9=t;var o=0,a=H9===t&&t.__root;if(a){var c=i.indexOf(a);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var l=i.indexOf(e);if(l===-1)return;c<=l&&(o=c)}if(s=i[o]||t.target,s!==e){Cp(t,"currentTarget",{configurable:!0,get(){return s||r}});var u=Xt,h=xt;ji(null),Gi(null);try{for(var d,p=[];s!==null;){var g=s.assignedSlot||s.parentNode||s.host||null;try{var m=s["__"+n];if(m!=null&&(!s.disabled||t.target===s))if(V1(m)){var[y,...v]=m;y.apply(s,[t,...v])}else m.call(s,t)}catch(A){d?p.push(A):d=A}if(t.cancelBubble||g===e||g===null)break;s=g}if(d){for(let A of p)queueMicrotask(()=>{throw A});throw d}}finally{t.__root=e,delete t.currentTarget,ji(u),Gi(h)}}}function Z9(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function fo(t,e){var r=xt;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Fe(t,e){var r=(e&ND)!==0,n=(e&xD)!==0,i,s=!t.startsWith("<!>");return()=>{if(Rt)return fo(tr,null),tr;i===void 0&&(i=Z9(s?t:"<!>"+t),r||(i=Es(i)));var o=n||l9?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Es(o),c=o.lastChild;fo(a,c)}else fo(o,o);return o}}function Mr(t=""){if(!Rt){var e=ks(t+"");return fo(e,e),e}var r=tr;return r.nodeType!==t3&&(r.before(r=ks()),ui(r)),fo(r,r),r}function nt(){if(Rt)return fo(tr,null),tr;var t=document.createDocumentFragment(),e=document.createComment(""),r=ks();return t.append(e,r),fo(e,r),t}function Ee(t,e){if(Rt){xt.nodes_end=tr,ra();return}t!==null&&t.before(e)}function pt(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function J9(t,e){return Q9(t,e)}function hW(t,e){n3(),e.intro=e.intro??!1;const r=e.target,n=Rt,i=tr;try{for(var s=Es(r);s&&(s.nodeType!==Od||s.data!==s9);)s=co(s);if(!s)throw Ml;ki(!0),ui(s),ra();const o=Q9(t,{...e,anchor:s});if(tr===null||tr.nodeType!==Od||tr.data!==r3)throw Pp(),Ml;return ki(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
3
3
  `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==Ml&&console.warn("Failed to hydrate: ",o),e.recover===!1&&yD(),n3(),h9(r),ki(!1),J9(t,e)}finally{ki(n),ui(i)}}const jd=new Map;function Q9(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0}){n3();var a=new Set,c=h=>{for(var d=0;d<h.length;d++){var p=h[d];if(!a.has(p)){a.add(p);var g=uW(p);e.addEventListener(p,Mp,{passive:g});var m=jd.get(p);m===void 0?(document.addEventListener(p,Mp,{passive:g}),jd.set(p,1)):jd.set(p,m+1)}}};c(Jw(z9)),m3.add(c);var l=void 0,u=tW(()=>{var h=r??e.appendChild(ks());return ho(()=>{if(s){ot({});var d=Pr;d.c=s}i&&(n.$$events=i),Rt&&fo(h,null),l=t(h,n)||{},Rt&&(xt.nodes_end=tr),s&&at()}),()=>{for(var d of a){e.removeEventListener(d,Mp);var p=jd.get(d);--p===0?(document.removeEventListener(d,Mp),jd.delete(d)):jd.set(d,p)}m3.delete(c),h!==r&&h.parentNode?.removeChild(h)}});return y3.set(l,u),l}let y3=new WeakMap;function fW(t,e){const r=y3.get(t);return r?(y3.delete(t),r(e)):Promise.resolve()}const v3=0,ry=1,b3=2;function wn(t,e,r,n,i){Rt&&ra();var s=t,o=Ul(),a=Pr,c=Kr,l,u,h,d=o?hc(void 0):De(void 0,!1,!1),p=o?hc(void 0):De(void 0,!1,!1),g=!1;function m(v,A){g=!0,A&&(Gi(y),ji(y),Md(a));try{v===ry&&n&&(u?ty(u):u=ho(()=>n(s,d))),v!==v3&&l&&jl(l,()=>l=null),v!==ry&&u&&jl(u,()=>u=null),v!==b3&&h&&jl(h,()=>h=null)}finally{A&&(Md(null),ji(null),Gi(null),je())}}var y=Wd(()=>{if(c===(c=e()))return;let v=Rt&&JA(c)===(s.data===$1);if(v&&(s=H1(),ui(s),ki(!1),v=!0),JA(c)){var A=c;g=!1,A.then(E=>{A===c&&(pc(d,E),m(ry,!0))},E=>{if(A===c)throw pc(p,E),m(b3,!0),p.v}),Rt||Z1(()=>{g||m(v3,!0)})}else pc(d,c),m(ry,!1);return v&&ki(!0),()=>c=Kr});Rt&&(s=tr)}function Je(t,e,r=!1){Rt&&ra();var n=t,i=null,s=null,o=Kr,a=r?j1:0,c=!1;const l=(p,g=!0)=>{c=!0,d(g,p)};var u=null;function h(){u!==null&&(u.lastChild.remove(),n.before(u),u=null);var p=o?i:s,g=o?s:i;p&&ty(p),g&&jl(g,()=>{o?s=null:i=null})}const d=(p,g)=>{if(o===(o=p))return;let m=!1;if(Rt){const C=o9(n)===$1;!!o===C&&(n=H1(),ui(n),ki(!1),m=!0)}var y=i3(),v=n;if(y&&(u=document.createDocumentFragment(),u.append(v=ks())),o?i??=g&&ho(()=>g(v)):s??=g&&ho(()=>g(v)),y){var A=wr,E=o?i:s,w=o?s:i;E&&A.skipped_effects.delete(E),w&&A.skipped_effects.add(w),A.add_callback(h)}else h();m&&ki(!0)};Wd(()=>{c=!1,e(l),c||d(null,null)},a),Rt&&(n=tr)}function Up(t,e){return e}function pW(t,e,r){for(var n=t.items,i=[],s=e.length,o=0;o<s;o++)g3(e[o].e,i,!0);var a=s>0&&i.length===0&&r!==null;if(a){var c=r.parentNode;h9(c),c.append(r),n.clear(),po(t,e[0].prev,e[s-1].next)}j9(i,()=>{for(var l=0;l<s;l++){var u=e[l];a||(n.delete(u.k),po(t,u.prev,u.next)),$i(u.e,!a)}})}function Lp(t,e,r,n,i,s=null){var o=t,a={flags:e,items:new Map,first:null},c=(e&n9)!==0;if(c){var l=t;o=Rt?ui(Es(l)):l.appendChild(ks())}Rt&&ra();var u=null,h=!1,d=new Map,p=bt(()=>{var v=r();return V1(v)?v:v==null?[]:Jw(v)}),g,m;function y(){gW(m,g,a,d,o,i,e,n,r),s!==null&&(g.length===0?u?ty(u):u=ho(()=>s(o)):u!==null&&jl(u,()=>{u=null}))}Wd(()=>{m??=xt,g=H(p);var v=g.length;if(h&&v===0)return;h=v===0;let A=!1;if(Rt){var E=o9(o)===$1;E!==(v===0)&&(o=H1(),ui(o),ki(!1),A=!0)}if(Rt){for(var w=null,C,O=0;O<v;O++){if(tr.nodeType===Od&&tr.data===r3){o=tr,A=!0,ki(!1);break}var U=g[O],I=n(U,O);C=w3(tr,a,w,null,U,I,O,i,e,r),a.items.set(I,C),w=C}v>0&&ui(H1())}if(Rt)v===0&&s&&(u=ho(()=>s(o)));else if(i3()){var B=new Set,W=wr;for(O=0;O<v;O+=1){U=g[O],I=n(U,O);var M=a.items.get(I)??d.get(I);M?(e&(G1|z1))!==0&&Y9(M,U,O,e):(C=w3(null,a,null,null,U,I,O,i,e,r,!0),d.set(I,C)),B.add(I)}for(const[x,P]of a.items)B.has(x)||W.skipped_effects.add(P.e);W.add_callback(y)}else y();A&&ki(!0),H(p)}),Rt&&(o=tr)}function gW(t,e,r,n,i,s,o,a,c){var l=(o&_D)!==0,u=(o&(G1|z1))!==0,h=e.length,d=r.items,p=r.first,g=p,m,y=null,v,A=[],E=[],w,C,O,U;if(l)for(U=0;U<h;U+=1)w=e[U],C=a(w,U),O=d.get(C),O!==void 0&&(O.a?.measure(),(v??=new Set).add(O));for(U=0;U<h;U+=1){if(w=e[U],C=a(w,U),O=d.get(C),O===void 0){var I=n.get(C);if(I!==void 0){n.delete(C),d.set(C,I);var B=y?y.next:g;po(r,y,I),po(r,I,B),k3(I,B,i),y=I}else{var W=g?g.e.nodes_start:i;y=w3(W,r,y,y===null?r.first:y.next,w,C,U,s,o,c)}d.set(C,y),A=[],E=[],g=y.next;continue}if(u&&Y9(O,w,U,o),(O.e.f&ws)!==0&&(ty(O.e),l&&(O.a?.unfix(),(v??=new Set).delete(O))),O!==g){if(m!==void 0&&m.has(O)){if(A.length<E.length){var M=E[0],x;y=M.prev;var P=A[0],L=A[A.length-1];for(x=0;x<A.length;x+=1)k3(A[x],M,i);for(x=0;x<E.length;x+=1)m.delete(E[x]);po(r,P.prev,L.next),po(r,y,P),po(r,L,M),g=M,y=L,U-=1,A=[],E=[]}else m.delete(O),k3(O,g,i),po(r,O.prev,O.next),po(r,O,y===null?r.first:y.next),po(r,y,O),y=O;continue}for(A=[],E=[];g!==null&&g.k!==C;)(g.e.f&ws)===0&&(m??=new Set).add(g),E.push(g),g=g.next;if(g===null)continue;O=g}A.push(O),y=O,g=O.next}if(g!==null||m!==void 0){for(var F=m===void 0?[]:Jw(m);g!==null;)(g.e.f&ws)===0&&F.push(g),g=g.next;var G=F.length;if(G>0){var j=(o&n9)!==0&&h===0?i:null;if(l){for(U=0;U<G;U+=1)F[U].a?.measure();for(U=0;U<G;U+=1)F[U].a?.fix()}pW(r,F,j)}}l&&Z1(()=>{if(v!==void 0)for(O of v)O.a?.apply()}),t.first=r.first&&r.first.e,t.last=y&&y.e;for(var q of n.values())$i(q.e);n.clear()}function Y9(t,e,r,n){(n&G1)!==0&&pc(t.v,e),(n&z1)!==0?pc(t.i,r):t.i=r}function w3(t,e,r,n,i,s,o,a,c,l,u){var h=(c&G1)!==0,d=(c&TD)===0,p=h?d?De(i,!1,!1):hc(i):i,g=(c&z1)===0?o:hc(o),m={i:g,v:p,k:s,a:null,e:null,prev:r,next:n};try{if(t===null){var y=document.createDocumentFragment();y.append(t=ks())}return m.e=ho(()=>a(t,p,g,l),Rt),m.e.prev=r&&r.e,m.e.next=n&&n.e,r===null?u||(e.first=m):(r.next=m,r.e.next=m.e),n!==null&&(n.prev=m,n.e.prev=m.e),m}finally{}}function k3(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,i=e?e.e.nodes_start:r,s=t.e.nodes_start;s!==null&&s!==n;){var o=co(s);i.before(s),s=o}}function po(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function E3(t,e,r=!1,n=!1,i=!1){var s=t,o="";Ye(()=>{var a=xt;if(o===(o=e()??"")){Rt&&ra();return}if(a.nodes_start!==null&&(D9(a.nodes_start,a.nodes_end),a.nodes_start=a.nodes_end=null),o!==""){if(Rt){tr.data;for(var c=ra(),l=c;c!==null&&(c.nodeType!==Od||c.data!=="");)l=c,c=co(c);if(c===null)throw Pp(),Ml;fo(tr,l),s=ui(c);return}var u=o+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var h=Z9(u);if((r||n)&&(h=Es(h)),fo(Es(h),h.lastChild),r||n)for(;Es(h);)s.before(Es(h));else s.before(h)}})}function As(t,e,r,n,i){Rt&&ra();var s=e.$$slots?.[r],o=!1;s===!0&&(s=e[r==="default"?"children":r],o=!0),s===void 0||s(t,o?()=>n:n)}function dn(t,e,r){Rt&&ra();var n=t,i,s,o=null,a=null;function c(){s&&(jl(s),s=null),o&&(o.lastChild.remove(),n.before(o),o=null),s=a,a=null}Wd(()=>{if(i!==(i=e())){var l=i3();if(i){var u=n;l&&(o=document.createDocumentFragment(),o.append(u=ks()),s&&wr.skipped_effects.add(s)),a=ho(()=>r(u,i))}l?wr.add_callback(c):c()}},j1),Rt&&(n=tr)}function mc(t,e){f3(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=document.createElement("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}function mW(t,e){var r=void 0,n;Wd(()=>{r!==(r=e())&&(n&&($i(n),n=null),r&&(n=ho(()=>{f3(()=>r(t))})))})}function K9(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=K9(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function yW(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=K9(t))&&(n&&(n+=" "),n+=e);return n}function A3(t){return typeof t=="object"?yW(t):t??""}const q9=[...`
4
4
  \r\f \v\uFEFF`];function vW(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i in r)if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+s;(o===0||q9.includes(n[o-1]))&&(a===n.length||q9.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function X9(t,e=!1){var r=e?" !important;":";",n="";for(var i in t){var s=t[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function _3(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function bW(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,o=0,a=!1,c=[];n&&c.push(...Object.keys(n).map(_3)),i&&c.push(...Object.keys(i).map(_3));var l=0,u=-1;const m=t.length;for(var h=0;h<m;h++){var d=t[h];if(a?d==="/"&&t[h-1]==="*"&&(a=!1):s?s===d&&(s=!1):d==="/"&&t[h+1]==="*"?a=!0:d==='"'||d==="'"?s=d:d==="("?o++:d===")"&&o--,!a&&s===!1&&o===0){if(d===":"&&u===-1)u=h;else if(d===";"||h===m-1){if(u!==-1){var p=_3(t.substring(l,u).trim());if(!c.includes(p)){d!==";"&&h++;var g=t.substring(l,h).trim();r+=" "+g+";"}}l=h+1,u=-1}}}}return n&&(r+=X9(n)),i&&(r+=X9(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function Fr(t,e,r,n,i,s){var o=t.__className;if(Rt||o!==r||o===void 0){var a=vW(r,n,s);(!Rt||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t.__className=r}else if(s&&i!==s)for(var c in s){var l=!!s[c];(i==null||l!==!!i[c])&&t.classList.toggle(c,l)}return s}function T3(t,e={},r,n){for(var i in r){var s=r[i];e[i]!==s&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,s,n))}}function _s(t,e,r,n){var i=t.__style;if(Rt||i!==e){var s=bW(e,n);(!Rt||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t.__style=e}else n&&(Array.isArray(n)?(T3(t,r?.[0],n[0]),T3(t,r?.[1],n[1],"important")):T3(t,r,n));return n}function C3(t,e,r=!1){if(t.multiple){if(e==null)return;if(!V1(e))return BD();for(var n of t.options)n.selected=e.includes(e_(n));return}for(n of t.options){var i=e_(n);if(MD(i,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function wW(t){var e=new MutationObserver(()=>{C3(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),d3(()=>{e.disconnect()})}function e_(t){return"__value"in t?t.__value:t.value}const Gd=Symbol("class"),Fp=Symbol("style"),t_=Symbol("is custom element"),r_=Symbol("is html");function S3(t){if(Rt){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;kt(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;kt(t,"checked",null),t.checked=i}}};t.__on_r=r,VD(r),S9()}}function R3(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function kt(t,e,r,n){var i=i_(t);Rt&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||i[e]!==(i[e]=r)&&(e==="loading"&&(t[uD]=r),r==null?t.removeAttribute(e):typeof r!="string"&&o_(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function kW(t,e,r,n,i=!1){var s=i_(t),o=s[t_],a=!s[r_];let c=Rt&&o;c&&ki(!1);var l=e||{},u=t.tagName==="OPTION";for(var h in e)h in r||(r[h]=null);r.class?r.class=A3(r.class):(n||r[Gd])&&(r.class=null),r[Fp]&&(r.style??=null);var d=o_(t);for(const E in r){let w=r[E];if(u&&E==="value"&&w==null){t.value=t.__value="",l[E]=w;continue}if(E==="class"){var p=t.namespaceURI==="http://www.w3.org/1999/xhtml";Fr(t,p,w,n,e?.[Gd],r[Gd]),l[E]=w,l[Gd]=r[Gd];continue}if(E==="style"){_s(t,w,e?.[Fp],r[Fp]),l[E]=w,l[Fp]=r[Fp];continue}var g=l[E];if(!(w===g&&!(w===void 0&&t.hasAttribute(E)))){l[E]=w;var m=E[0]+E[1];if(m!=="$$")if(m==="on"){const C={},O="$$"+E;let U=E.slice(2);var y=oW(U);if(iW(U)&&(U=U.slice(0,-7),C.capture=!0),!y&&g){if(w!=null)continue;t.removeEventListener(U,l[O],C),l[O]=null}if(w!=null)if(y)t[`__${U}`]=w,dW([U]);else{let I=function(B){l[E].call(this,B)};l[O]=$9(U,t,I,C)}else y&&(t[`__${U}`]=void 0)}else if(E==="style")kt(t,E,w);else if(E==="autofocus")ZD(t,!!w);else if(!o&&(E==="__value"||E==="value"&&w!=null))t.value=t.__value=w;else if(E==="selected"&&u)R3(t,w);else{var v=E;a||(v=cW(v));var A=v==="defaultValue"||v==="defaultChecked";if(w==null&&!o&&!A)if(s[E]=null,v==="value"||v==="checked"){let C=t;const O=e===void 0;if(v==="value"){let U=C.defaultValue;C.removeAttribute(v),C.defaultValue=U,C.value=C.__value=O?U:null}else{let U=C.defaultChecked;C.removeAttribute(v),C.defaultChecked=U,C.checked=O?U:!1}}else t.removeAttribute(E);else A||d.includes(v)&&(o||typeof w!="string")?(t[v]=w,v in s&&(s[v]=Kr)):typeof w!="function"&&kt(t,v,w)}}}return c&&ki(!0),l}function n_(t,e,r=[],n=[],i,s=!1){v9(r,n,o=>{var a=void 0,c={},l=t.nodeName==="SELECT",u=!1;if(Wd(()=>{var d=e(...o.map(H)),p=kW(t,a,d,i,s);u&&l&&"value"in d&&C3(t,d.value);for(let m of Object.getOwnPropertySymbols(c))d[m]||$i(c[m]);for(let m of Object.getOwnPropertySymbols(d)){var g=d[m];m.description===OD&&(!a||g!==a[m])&&(c[m]&&$i(c[m]),c[m]=ho(()=>mW(t,()=>g))),p[m]=g}a=p}),l){var h=t;f3(()=>{C3(h,a.value,!0),wW(h)})}u=!0})}function i_(t){return t.__attributes??={[t_]:t.nodeName.includes("-"),[r_]:t.namespaceURI===ID}}var s_=new Map;function o_(t){var e=s_.get(t.nodeName);if(e)return e;s_.set(t.nodeName,e=[]);for(var r,n=t,i=Element.prototype;i!==n;){r=HA(n);for(var s in r)r[s].set&&e.push(s);n=Qw(n)}return e}function P3(t,e,r=e){var n=Ul(),i=new WeakSet;JD(t,"input",s=>{var o=s?t.defaultValue:t.value;if(o=N3(t)?x3(o):o,r(o),wr!==null&&i.add(wr),n&&o!==(o=e())){var a=t.selectionStart,c=t.selectionEnd;t.value=o??"",c!==null&&(t.selectionStart=a,t.selectionEnd=Math.min(c,t.value.length))}}),(Rt&&t.defaultValue!==t.value||Le(e)==null&&t.value)&&(r(N3(t)?x3(t.value):t.value),wr!==null&&i.add(wr)),p3(()=>{var s=e();if(t===document.activeElement){var o=Q1??wr;if(i.has(o))return}N3(t)&&s===x3(t.value)||t.type==="date"&&!s&&!t.value||s!==t.value&&(t.value=s??"")})}function N3(t){var e=t.type;return e==="number"||e==="range"}function x3(t){return t===""?null:+t}function I3(t){return function(...e){var r=e[0];return r.preventDefault(),t?.apply(this,e)}}function Et(t=!1){const e=Pr,r=e.l.u;if(!r)return;let n=()=>$e(e.s);if(t){let i=0,s={};const o=J1(()=>{let a=!1;const c=e.s;for(const l in c)c[l]!==s[l]&&(s[l]=c[l],a=!0);return a&&i++,i});n=()=>H(o)}r.b.length&&eW(()=>{a_(e,n),Sp(r.b)}),h3(()=>{const i=Le(()=>r.m.map(aD));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&h3(()=>{a_(e,n),Sp(r.a)})}function a_(t,e){if(t.l.s)for(const r of t.l.s)H(r);e()}function lt(t,e,r){t.$$events||={},t.$$events[e]||=[],t.$$events[e].push(r)}function ut(t){for(var e in t)e in this&&(this[e]=t[e])}let ny=!1,O3=Symbol();function It(t,e,r){const n=r[e]??={store:null,source:De(void 0),unsubscribe:lc};if(n.store!==t&&!(O3 in r))if(n.unsubscribe(),n.store=t??null,t==null)n.source.v=void 0,n.unsubscribe=lc;else{var i=!0;n.unsubscribe=B3(t,s=>{i?n.source.v=s:Re(n.source,s)}),i=!1}return t&&O3 in r?We(t):H(n.source)}function kn(){const t={};function e(){d3(()=>{for(var r in t)t[r].unsubscribe();Cp(t,O3,{enumerable:!1,value:!0})})}return[t,e]}function EW(t,e,r){return t.set(r),e}function AW(t){var e=ny;try{return ny=!1,[t(),ny]}finally{ny=e}}const _W={get(t,e){if(!t.exclude.includes(e))return H(t.version),e in t.special?t.special[e]():t.props[e]},set(t,e,r){if(!(e in t.special)){var n=xt;try{Gi(t.parent_effect),t.special[e]=Ge({get[e](){return t.props[e]}},e,i9)}finally{Gi(n)}}return t.special[e](r),_9(t.version),!0},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},deleteProperty(t,e){return t.exclude.includes(e)||(t.exclude.push(e),_9(t.version)),!0},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Vp(t,e){return new Proxy({props:t,exclude:e,special:{},version:hc(0),parent_effect:xt},_W)}function Ge(t,e,r,n){var i=!Bd||(r&SD)!==0,s=(r&RD)!==0,o=(r&PD)!==0,a=n,c=!0,l=()=>(c&&(c=!1,a=o?Le(n):n),a),u;if(s){var h=uc in t||qA in t;u=xd(t,e)?.set??(h&&e in t?E=>t[e]=E:void 0)}var d,p=!1;s?[d,p]=AW(()=>t[e]):d=t[e],d===void 0&&n!==void 0&&(d=l(),u&&(i&&vD(),u(d)));var g;if(i?g=()=>{var E=t[e];return E===void 0?l():(c=!0,E)}:g=()=>{var E=t[e];return E!==void 0&&(a=void 0),E===void 0?a:E},i&&(r&i9)===0)return g;if(u){var m=t.$$legacy;return function(E,w){return arguments.length>0?((!i||!w||m||p)&&u(w?g():E),E):g()}}var y=!1,v=((r&CD)!==0?J1:bt)(()=>(y=!1,g()));s&&H(v);var A=xt;return function(E,w){if(arguments.length>0){const C=w?H(v):i&&s?Ud(E):E;return Re(v,C),y=!0,a!==void 0&&(a=C),E}return Vl&&y||(A.f&Ol)!==0?v.v:H(v)}}function dt(t){return new TW(t)}class TW{#t;#e;constructor(e){var r=new Map,n=(s,o)=>{var a=De(o,!1,!1);return r.set(s,a),a};const i=new Proxy({...e.props||{},$$events:{}},{get(s,o){return H(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===qA?!0:(H(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return Re(r.get(o)??n(o,a),a),Reflect.set(s,o,a)}});this.#e=(e.hydrate?hW:J9)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&je(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||Cp(this,s,{get(){return this.#e[s]},set(o){this.#e[s]=o},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{fW(this.#e)}}$set(e){this.#e.$set(e)}$on(e,r){this.#t[e]=this.#t[e]||[];const n=(...i)=>r.call(this,...i);return this.#t[e].push(n),()=>{this.#t[e]=this.#t[e].filter(i=>i!==n)}}$destroy(){this.#e.$destroy()}}function zd(t){Pr===null&&r9(),Bd&&Pr.l!==null?CW(Pr).m.push(t):h3(()=>{const e=Le(t);if(typeof e=="function")return e})}function $d(t){Pr===null&&r9(),zd(()=>()=>Le(t))}function CW(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function B3(t,e,r){if(t==null)return e(void 0),r&&r(void 0),lc;const n=Le(()=>t.subscribe(e,r));return n.unsubscribe?()=>n.unsubscribe():n}const Hd=[];function SW(t,e){return{subscribe:Mn(t,e).subscribe}}function Mn(t,e=lc){let r=null;const n=new Set;function i(a){if(e9(t,a)&&(t=a,r)){const c=!Hd.length;for(const l of n)l[1](),Hd.push(l,t);if(c){for(let l=0;l<Hd.length;l+=2)Hd[l][0](Hd[l+1]);Hd.length=0}}}function s(a){i(a(t))}function o(a,c=lc){const l=[a,c];return n.add(l),n.size===1&&(r=e(i,s)||lc),a(t),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:i,update:s,subscribe:o}}function M3(t,e,r){const n=!Array.isArray(t),i=n?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=e.length<2;return SW(r,(o,a)=>{let c=!1;const l=[];let u=0,h=lc;const d=()=>{if(u)return;h();const g=e(n?l[0]:l,o,a);s?o(g):h=typeof g=="function"?g:lc},p=i.map((g,m)=>B3(g,y=>{l[m]=y,u&=~(1<<m),c&&d()},()=>{u|=1<<m}));return c=!0,d(),function(){Sp(p),h(),c=!1}})}function We(t){let e;return B3(t,r=>e=r)(),e}function RW(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var c_={exports:{}},jr=c_.exports={},go,mo;function U3(){throw new Error("setTimeout has not been defined")}function L3(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?go=setTimeout:go=U3}catch{go=U3}try{typeof clearTimeout=="function"?mo=clearTimeout:mo=L3}catch{mo=L3}})();function l_(t){if(go===setTimeout)return setTimeout(t,0);if((go===U3||!go)&&setTimeout)return go=setTimeout,setTimeout(t,0);try{return go(t,0)}catch{try{return go.call(null,t,0)}catch{return go.call(this,t,0)}}}function PW(t){if(mo===clearTimeout)return clearTimeout(t);if((mo===L3||!mo)&&clearTimeout)return mo=clearTimeout,clearTimeout(t);try{return mo(t)}catch{try{return mo.call(null,t)}catch{return mo.call(this,t)}}}var ia=[],Zd=!1,Gl,iy=-1;function NW(){!Zd||!Gl||(Zd=!1,Gl.length?ia=Gl.concat(ia):iy=-1,ia.length&&u_())}function u_(){if(!Zd){var t=l_(NW);Zd=!0;for(var e=ia.length;e;){for(Gl=ia,ia=[];++iy<e;)Gl&&Gl[iy].run();iy=-1,e=ia.length}Gl=null,Zd=!1,PW(t)}}jr.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];ia.push(new d_(t,e)),ia.length===1&&!Zd&&l_(u_)};function d_(t,e){this.fun=t,this.array=e}d_.prototype.run=function(){this.fun.apply(null,this.array)},jr.title="browser",jr.browser=!0,jr.env={},jr.argv=[],jr.version="",jr.versions={};function sa(){}jr.on=sa,jr.addListener=sa,jr.once=sa,jr.off=sa,jr.removeListener=sa,jr.removeAllListeners=sa,jr.emit=sa,jr.prependListener=sa,jr.prependOnceListener=sa,jr.listeners=function(t){return[]},jr.binding=function(t){throw new Error("process.binding is not supported")},jr.cwd=function(){return"/"},jr.chdir=function(t){throw new Error("process.chdir is not supported")},jr.umask=function(){return 0};var xW=c_.exports;const F3=RW(xW);var IW=Object.defineProperty,h_=t=>{throw TypeError(t)},OW=(t,e,r)=>e in t?IW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,X=(t,e,r)=>OW(t,typeof e!="symbol"?e+"":e,r),V3=(t,e,r)=>e.has(t)||h_("Cannot "+r),T=(t,e,r)=>(V3(t,e,"read from private field"),r?r.call(t):e.get(t)),ne=(t,e,r)=>e.has(t)?h_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),V=(t,e,r,n)=>(V3(t,e,"write to private field"),e.set(t,r),r),ve=(t,e,r)=>(V3(t,e,"access private method"),r),yo=(t,e,r,n)=>({set _(i){V(t,e,i)},get _(){return T(t,e,n)}});const sy="6.13.4";function BW(t,e,r){const n=e.split("|").map(s=>s.trim());for(let s=0;s<n.length;s++)switch(e){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof t===e)return}const i=new Error(`invalid value for type ${e}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${r}`,i.value=t,i}async function nn(t){const e=Object.keys(t);return(await Promise.all(e.map(r=>Promise.resolve(t[r])))).reduce((r,n,i)=>(r[e[i]]=n,r),{})}function rt(t,e,r){for(let n in e){let i=e[n];const s=r?r[n]:null;s&&BW(i,s,n),Object.defineProperty(t,n,{enumerable:!0,value:i,writable:!1})}}function Jd(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(Jd).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let n=0;n<t.length;n++)r+=e[t[n]>>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return Jd(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${Jd(r)}: ${Jd(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Gr(t,e){return t&&t.code===e}function Dp(t){return Gr(t,"CALL_EXCEPTION")}function yr(t,e,r){let n=t;{const s=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${Jd(r)}`);for(const o in r){if(o==="shortMessage")continue;const a=r[o];s.push(o+"="+Jd(a))}}s.push(`code=${e}`),s.push(`version=${sy}`),s.length&&(t+=" ("+s.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(t);break;default:i=new Error(t)}return rt(i,{code:e}),r&&Object.assign(i,r),i.shortMessage==null&&rt(i,{shortMessage:n}),i}function Be(t,e,r,n){if(!t)throw yr(e,r,n)}function pe(t,e,r,n){Be(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function oy(t,e,r){r==null&&(r=""),r&&(r=": "+r),Be(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),Be(t<=e,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const MW=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");t.push(e)}catch{}return t},[]);function ay(t){Be(MW.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function vo(t,e,r){if(r==null&&(r=""),t!==e){let n=r,i="new";r&&(n+=".",i+=" "+r),Be(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function f_(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((t.length-2)/2);let i=2;for(let s=0;s<n.length;s++)n[s]=parseInt(t.substring(i,i+2),16),i+=2;return n}pe(!1,"invalid BytesLike value",e||"value",t)}function qe(t,e){return f_(t,e,!1)}function sn(t,e){return f_(t,e,!0)}function ur(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&t.length!==2+2*e||e===!0&&t.length%2!==0)}function Qd(t){return ur(t,!0)||t instanceof Uint8Array}const p_="0123456789abcdef";function Ze(t){const e=qe(t);let r="0x";for(let n=0;n<e.length;n++){const i=e[n];r+=p_[(i&240)>>4]+p_[i&15]}return r}function Zt(t){return"0x"+t.map(e=>Ze(e).substring(2)).join("")}function oa(t){return ur(t,!0)?(t.length-2)/2:qe(t).length}function dr(t,e,r){const n=qe(t);return r!=null&&r>n.length&&Be(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),Ze(n.slice(e??0,r??n.length))}function g_(t){let e=Ze(t).substring(2);for(;e.startsWith("00");)e=e.substring(2);return"0x"+e}function m_(t,e,r){const n=qe(t);Be(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),r?i.set(n,e-n.length):i.set(n,0),Ze(i)}function Hi(t,e){return m_(t,e,!0)}function Wp(t,e){return m_(t,e,!1)}const cy=BigInt(0),Ts=BigInt(1),Yd=9007199254740991;function Kd(t,e){const r=qd(t,"value"),n=BigInt(mt(e,"width"));if(Be(r>>n===cy,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Ts){const i=(Ts<<n)-Ts;return-((~r&i)+Ts)}return r}function jp(t,e){let r=ct(t,"value");const n=BigInt(mt(e,"width")),i=Ts<<n-Ts;if(r<cy){r=-r,Be(r<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});const s=(Ts<<n)-Ts;return(~r&s)+Ts}else Be(r<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});return r}function aa(t,e){const r=qd(t,"value"),n=BigInt(mt(e,"bits"));return r&(Ts<<n)-Ts}function ct(t,e){switch(typeof t){case"bigint":return t;case"number":return pe(Number.isInteger(t),"underflow",e||"value",t),pe(t>=-Yd&&t<=Yd,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){pe(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}pe(!1,"invalid BigNumberish value",e||"value",t)}function qd(t,e){const r=ct(t,e);return Be(r>=cy,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const y_="0123456789abcdef";function zl(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=y_[r>>4],e+=y_[r&15];return BigInt(e)}return ct(t)}function mt(t,e){switch(typeof t){case"bigint":return pe(t>=-Yd&&t<=Yd,"overflow",e||"value",t),Number(t);case"number":return pe(Number.isInteger(t),"underflow",e||"value",t),pe(t>=-Yd&&t<=Yd,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return mt(BigInt(t),e)}catch(r){pe(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}pe(!1,"invalid numeric value",e||"value",t)}function Gp(t){return mt(zl(t))}function Zi(t,e){let r=qd(t,"value").toString(16);if(e==null)r.length%2&&(r="0"+r);else{const n=mt(e,"width");for(Be(n*2>=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});r.length<n*2;)r="0"+r}return"0x"+r}function on(t){const e=qd(t,"value");if(e===cy)return new Uint8Array([]);let r=e.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let i=0;i<n.length;i++){const s=i*2;n[i]=parseInt(r.substring(s,s+2),16)}return n}function ca(t){let e=Ze(Qd(t)?t:on(t)).substring(2);for(;e.startsWith("0");)e=e.substring(1);return e===""&&(e="0"),"0x"+e}const ly="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let uy=null;function UW(t){if(uy==null){uy={};for(let r=0;r<ly.length;r++)uy[ly[r]]=BigInt(r)}const e=uy[t];return pe(e!=null,"invalid base58 value","letter",t),e}const LW=BigInt(0),D3=BigInt(58);function dy(t){const e=qe(t);let r=zl(e),n="";for(;r;)n=ly[Number(r%D3)]+n,r/=D3;for(let i=0;i<e.length&&!e[i];i++)n=ly[0]+n;return n}function W3(t){let e=LW;for(let r=0;r<t.length;r++)e*=D3,e+=UW(t[r]);return e}function j3(t){t=atob(t);const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return qe(e)}function G3(t){const e=qe(t);let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}var zp;class hy{constructor(e,r,n){X(this,"filter"),X(this,"emitter"),ne(this,zp),V(this,zp,r),rt(this,{emitter:e,filter:n})}async removeListener(){T(this,zp)!=null&&await this.emitter.off(this.filter,T(this,zp))}}zp=new WeakMap;function FW(t,e,r,n,i){pe(!1,`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function v_(t,e,r,n,i){if(t==="BAD_PREFIX"||t==="UNEXPECTED_CONTINUE"){let s=0;for(let o=e+1;o<r.length&&r[o]>>6===2;o++)s++;return s}return t==="OVERRUN"?r.length-e-1:0}function VW(t,e,r,n,i){return t==="OVERLONG"?(pe(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),v_(t,e,r))}const z3=Object.freeze({error:FW,ignore:v_,replace:VW});function b_(t,e){e==null&&(e=z3.error);const r=qe(t,"bytes"),n=[];let i=0;for(;i<r.length;){const s=r[i++];if(!(s>>7)){n.push(s);continue}let o=null,a=null;if((s&224)===192)o=1,a=127;else if((s&240)===224)o=2,a=2047;else if((s&248)===240)o=3,a=65535;else{(s&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,r,n):i+=e("BAD_PREFIX",i-1,r,n);continue}if(i-1+o>=r.length){i+=e("OVERRUN",i-1,r,n);continue}let c=s&(1<<8-o-1)-1;for(let l=0;l<o;l++){let u=r[i];if((u&192)!=128){i+=e("MISSING_CONTINUE",i,r,n),c=null;break}c=c<<6|u&63,i++}if(c!==null){if(c>1114111){i+=e("OUT_OF_RANGE",i-1-o,r,n,c);continue}if(c>=55296&&c<=57343){i+=e("UTF16_SURROGATE",i-1-o,r,n,c);continue}if(c<=a){i+=e("OVERLONG",i-1-o,r,n,c);continue}n.push(c)}}return n}function qr(t,e){pe(typeof t=="string","invalid string value","str",t),e!=null&&(ay(e),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);if(i<128)r.push(i);else if(i<2048)r.push(i>>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const s=t.charCodeAt(n);pe(n<t.length&&(s&64512)===56320,"invalid surrogate pair","str",t);const o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return new Uint8Array(r)}function DW(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function la(t,e){return DW(b_(t,e))}function w_(t,e){return b_(qr(t,e))}function k_(t){async function e(r,n){Be(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const i=r.url.split(":")[0].toLowerCase();Be(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),Be(i==="https"||!r.credentials||r.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let s=null;const o=new AbortController,a=setTimeout(()=>{s=yr("request timeout","TIMEOUT"),o.abort()},r.timeout);n&&n.addListener(()=>{s=yr("request cancelled","CANCELLED"),o.abort()});const c={method:r.method,headers:new Headers(Array.from(r)),body:r.body||void 0,signal:o.signal};let l;try{l=await fetch(r.url,c)}catch(p){throw clearTimeout(a),s||p}clearTimeout(a);const u={};l.headers.forEach((p,g)=>{u[g.toLowerCase()]=p});const h=await l.arrayBuffer(),d=h==null?null:new Uint8Array(h);return{statusCode:l.status,statusMessage:l.statusText,headers:u,body:d}}return e}const WW=12,jW=250;let E_=k_();const GW=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),zW=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let $3=!1;async function A_(t,e){try{const r=t.match(GW);if(!r)throw new Error("invalid data");return new bc(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?j3(r[3]):ZW(r[3]))}catch{return new bc(599,"BAD REQUEST (invalid data: URI)",{},null,new Un(t))}}function __(t){async function e(r,n){try{const i=r.match(zW);if(!i)throw new Error("invalid link");return new Un(`${t}${i[2]}`)}catch{return new bc(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Un(r))}}return e}const fy={data:A_,ipfs:__("https://gateway.ipfs.io/ipfs/")},T_=new WeakMap;var Xd,$l;class H3{constructor(e){ne(this,Xd),ne(this,$l),V(this,Xd,[]),V(this,$l,!1),T_.set(e,()=>{if(!T(this,$l)){V(this,$l,!0);for(const r of T(this,Xd))setTimeout(()=>{r()},0);V(this,Xd,[])}})}addListener(e){Be(!T(this,$l),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),T(this,Xd).push(e)}get cancelled(){return T(this,$l)}checkSignal(){Be(!this.cancelled,"cancelled","CANCELLED",{})}}Xd=new WeakMap,$l=new WeakMap;function py(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var $p,Hp,bo,yc,Zp,Jp,En,Ji,vc,eh,th,rh,ua,wo,Hl,nh,Qp;const $W=class VA{constructor(e){ne(this,nh),ne(this,$p),ne(this,Hp),ne(this,bo),ne(this,yc),ne(this,Zp),ne(this,Jp),ne(this,En),ne(this,Ji),ne(this,vc),ne(this,eh),ne(this,th),ne(this,rh),ne(this,ua),ne(this,wo),ne(this,Hl),V(this,Jp,String(e)),V(this,$p,!1),V(this,Hp,!0),V(this,bo,{}),V(this,yc,""),V(this,Zp,3e5),V(this,wo,{slotInterval:jW,maxAttempts:WW}),V(this,Hl,null)}get url(){return T(this,Jp)}set url(e){V(this,Jp,String(e))}get body(){return T(this,En)==null?null:new Uint8Array(T(this,En))}set body(e){if(e==null)V(this,En,void 0),V(this,Ji,void 0);else if(typeof e=="string")V(this,En,qr(e)),V(this,Ji,"text/plain");else if(e instanceof Uint8Array)V(this,En,e),V(this,Ji,"application/octet-stream");else if(typeof e=="object")V(this,En,qr(JSON.stringify(e))),V(this,Ji,"application/json");else throw new Error("invalid body")}hasBody(){return T(this,En)!=null}get method(){return T(this,yc)?T(this,yc):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),V(this,yc,String(e).toUpperCase())}get headers(){const e=Object.assign({},T(this,bo));return T(this,vc)&&(e.authorization=`Basic ${G3(qr(T(this,vc)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&T(this,Ji)&&(e["content-type"]=T(this,Ji)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){T(this,bo)[String(e).toLowerCase()]=String(r)}clearHeaders(){V(this,bo,{})}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n<r.length){const i=r[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return T(this,vc)||null}setCredentials(e,r){pe(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),V(this,vc,`${e}:${r}`)}get allowGzip(){return T(this,Hp)}set allowGzip(e){V(this,Hp,!!e)}get allowInsecureAuthentication(){return!!T(this,$p)}set allowInsecureAuthentication(e){V(this,$p,!!e)}get timeout(){return T(this,Zp)}set timeout(e){pe(e>=0,"timeout must be non-zero","timeout",e),V(this,Zp,e)}get preflightFunc(){return T(this,eh)||null}set preflightFunc(e){V(this,eh,e)}get processFunc(){return T(this,th)||null}set processFunc(e){V(this,th,e)}get retryFunc(){return T(this,rh)||null}set retryFunc(e){V(this,rh,e)}get getUrlFunc(){return T(this,Hl)||E_}set getUrlFunc(e){V(this,Hl,e)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${T(this,En)?Ze(T(this,En)):"null"}>`}setThrottleParams(e){e.slotInterval!=null&&(T(this,wo).slotInterval=e.slotInterval),e.maxAttempts!=null&&(T(this,wo).maxAttempts=e.maxAttempts)}send(){return Be(T(this,ua)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),V(this,ua,new H3(this)),ve(this,nh,Qp).call(this,0,C_()+this.timeout,0,this,new bc(0,"",{},null,this))}cancel(){Be(T(this,ua)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=T_.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();Be(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new VA(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,V(i,bo,Object.assign({},T(this,bo))),T(this,En)&&V(i,En,new Uint8Array(T(this,En))),V(i,Ji,T(this,Ji)),i}clone(){const e=new VA(this.url);return V(e,yc,T(this,yc)),T(this,En)&&V(e,En,T(this,En)),V(e,Ji,T(this,Ji)),V(e,bo,Object.assign({},T(this,bo))),V(e,vc,T(this,vc)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),V(e,eh,T(this,eh)),V(e,th,T(this,th)),V(e,rh,T(this,rh)),V(e,wo,Object.assign({},T(this,wo))),V(e,Hl,T(this,Hl)),e}static lockConfig(){$3=!0}static getGateway(e){return fy[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if($3)throw new Error("gateways locked");fy[e]=r}static registerGetUrl(e){if($3)throw new Error("gateways locked");E_=e}static createGetUrlFunc(e){return k_()}static createDataGateway(){return A_}static createIpfsGatewayFunc(e){return __(e)}};$p=new WeakMap,Hp=new WeakMap,bo=new WeakMap,yc=new WeakMap,Zp=new WeakMap,Jp=new WeakMap,En=new WeakMap,Ji=new WeakMap,vc=new WeakMap,eh=new WeakMap,th=new WeakMap,rh=new WeakMap,ua=new WeakMap,wo=new WeakMap,Hl=new WeakMap,nh=new WeakSet,Qp=async function(t,e,r,n,i){var s,o,a;if(t>=T(this,wo).maxAttempts)return i.makeServerError("exceeded maximum retry limit");Be(C_()<=e,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:n}),r>0&&await JW(r);let c=this.clone();const l=(c.url.split(":")[0]||"").toLowerCase();if(l in fy){const d=await fy[l](c.url,py(T(n,ua)));if(d instanceof bc){let p=d;if(this.processFunc){py(T(n,ua));try{p=await this.processFunc(c,p)}catch(g){(g.throttle==null||typeof g.stall!="number")&&p.makeServerError("error in post-processing function",g).assertOk()}}return p}c=d}this.preflightFunc&&(c=await this.preflightFunc(c));const u=await this.getUrlFunc(c,py(T(n,ua)));let h=new bc(u.statusCode,u.statusMessage,u.headers,u.body,n);if(h.statusCode===301||h.statusCode===302){try{const d=h.headers.location||"";return ve(s=c.redirect(d),nh,Qp).call(s,t+1,e,0,n,h)}catch{}return h}else if(h.statusCode===429&&(this.retryFunc==null||await this.retryFunc(c,h,t))){const d=h.headers["retry-after"];let p=T(this,wo).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return typeof d=="string"&&d.match(/^[1-9][0-9]*$/)&&(p=parseInt(d)),ve(o=c.clone(),nh,Qp).call(o,t+1,e,p,n,h)}if(this.processFunc){py(T(n,ua));try{h=await this.processFunc(c,h)}catch(d){(d.throttle==null||typeof d.stall!="number")&&h.makeServerError("error in post-processing function",d).assertOk();let p=T(this,wo).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return d.stall>=0&&(p=d.stall),ve(a=c.clone(),nh,Qp).call(a,t+1,e,p,n,h)}}return h};let Un=$W;var gy,my,yy,Qi,Yp,ih;const HW=class DV{constructor(e,r,n,i,s){ne(this,gy),ne(this,my),ne(this,yy),ne(this,Qi),ne(this,Yp),ne(this,ih),V(this,gy,e),V(this,my,r),V(this,yy,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),V(this,Qi,i==null?null:new Uint8Array(i)),V(this,Yp,s||null),V(this,ih,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${T(this,Qi)?Ze(T(this,Qi)):"null"}>`}get statusCode(){return T(this,gy)}get statusMessage(){return T(this,my)}get headers(){return Object.assign({},T(this,yy))}get body(){return T(this,Qi)==null?null:new Uint8Array(T(this,Qi))}get bodyText(){try{return T(this,Qi)==null?"":la(T(this,Qi))}catch{Be(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{Be(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n<r.length){const i=r[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}makeServerError(e,r){let n;e?n=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:(e=`${this.statusCode} ${this.statusMessage}`,n=`CLIENT ESCALATED SERVER ERROR (${e})`);const i=new DV(599,n,this.headers,this.body,T(this,Yp)||void 0);return V(i,ih,{message:e,error:r}),i}throwThrottleError(e,r){r==null?r=-1:pe(Number.isInteger(r)&&r>=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw rt(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return T(this,Qi)!=null}get request(){return T(this,Yp)}ok(){return T(this,ih).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=T(this,ih);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let i=null;try{T(this,Qi)&&(i=la(T(this,Qi)))}catch{}Be(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r,info:{requestUrl:n,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};gy=new WeakMap,my=new WeakMap,yy=new WeakMap,Qi=new WeakMap,Yp=new WeakMap,ih=new WeakMap;let bc=HW;function C_(){return new Date().getTime()}function ZW(t){return qr(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function JW(t){return new Promise(e=>setTimeout(e,t))}const QW=BigInt(-1),Cs=BigInt(0),sh=BigInt(1),YW=BigInt(5),oh={};let ah="0000";for(;ah.length<80;)ah+=ah;function Zl(t){let e=ah;for(;e.length<t;)e+=e;return BigInt("1"+e.substring(0,t))}function Kp(t,e,r){const n=BigInt(e.width);if(e.signed){const i=sh<<n-sh;Be(r==null||t>=-i&&t<i,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t>Cs?t=Kd(aa(t,n),n):t=-Kd(aa(-t,n),n)}else{const i=sh<<n;Be(r==null||t>=0&&t<i,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t=(t%i+i)%i&i-sh}return t}function Z3(t){typeof t=="number"&&(t=`fixed128x${t}`);let e=!0,r=128,n=18;if(typeof t=="string"){if(t!=="fixed")if(t==="ufixed")e=!1;else{const s=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);pe(s,"invalid fixed format","format",t),e=s[1]!=="u",r=parseInt(s[2]),n=parseInt(s[3])}}else if(t){const s=t,o=(a,c,l)=>s[a]==null?l:(pe(typeof s[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,s[a]),s[a]);e=o("signed","boolean",e),r=o("width","number",r),n=o("decimals","number",n)}pe(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),pe(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const i=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:i}}function KW(t,e){let r="";t<Cs&&(r="-",t*=QW);let n=t.toString();if(e===0)return r+n;for(;n.length<=e;)n=ah+n;const i=n.length-e;for(n=n.substring(0,i)+"."+n.substring(i);n[0]==="0"&&n[1]!==".";)n=n.substring(1);for(;n[n.length-1]==="0"&&n[n.length-2]!==".";)n=n.substring(0,n.length-1);return r+n}var ko,fr,di,Nr,Jl,da,J3,Q3,Y3,K3;const S_=class wp{constructor(e,r,n){ne(this,Nr),X(this,"format"),ne(this,ko),ne(this,fr),ne(this,di),X(this,"_value"),vo(e,oh,"FixedNumber"),V(this,fr,r),V(this,ko,n);const i=KW(r,n.decimals);rt(this,{format:n.name,_value:i}),V(this,di,Zl(n.decimals))}get signed(){return T(this,ko).signed}get width(){return T(this,ko).width}get decimals(){return T(this,ko).decimals}get value(){return T(this,fr)}addUnsafe(e){return ve(this,Nr,J3).call(this,e)}add(e){return ve(this,Nr,J3).call(this,e,"add")}subUnsafe(e){return ve(this,Nr,Q3).call(this,e)}sub(e){return ve(this,Nr,Q3).call(this,e,"sub")}mulUnsafe(e){return ve(this,Nr,Y3).call(this,e)}mul(e){return ve(this,Nr,Y3).call(this,e,"mul")}mulSignal(e){ve(this,Nr,Jl).call(this,e);const r=T(this,fr)*T(e,fr);return Be(r%T(this,di)===Cs,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),ve(this,Nr,da).call(this,r/T(this,di),"mulSignal")}divUnsafe(e){return ve(this,Nr,K3).call(this,e)}div(e){return ve(this,Nr,K3).call(this,e,"div")}divSignal(e){Be(T(e,fr)!==Cs,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),ve(this,Nr,Jl).call(this,e);const r=T(this,fr)*T(this,di);return Be(r%T(e,fr)===Cs,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),ve(this,Nr,da).call(this,r/T(e,fr),"divSignal")}cmp(e){let r=this.value,n=e.value;const i=this.decimals-e.decimals;return i>0?n*=Zl(i):i<0&&(r*=Zl(-i)),r<n?-1:r>n?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=T(this,fr);return T(this,fr)<Cs&&(e-=T(this,di)-sh),e=T(this,fr)/T(this,di)*T(this,di),ve(this,Nr,da).call(this,e,"floor")}ceiling(){let e=T(this,fr);return T(this,fr)>Cs&&(e+=T(this,di)-sh),e=T(this,fr)/T(this,di)*T(this,di),ve(this,Nr,da).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=YW*Zl(r-1);let i=this.value+n;const s=Zl(r);return i=i/s*s,Kp(i,T(this,ko),"round"),new wp(oh,i,T(this,ko))}isZero(){return T(this,fr)===Cs}isNegative(){return T(this,fr)<Cs}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return wp.fromString(this.toString(),e)}static fromValue(e,r,n){const i=r==null?0:mt(r),s=Z3(n);let o=ct(e,"value");const a=i-s.decimals;if(a>0){const c=Zl(a);Be(o%c===Cs,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=Zl(-a));return Kp(o,s,"fromValue"),new wp(oh,o,s)}static fromString(e,r){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);pe(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const i=Z3(r);let s=n[2]||"0",o=n[3]||"";for(;o.length<i.decimals;)o+=ah;Be(o.substring(i.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),o=o.substring(0,i.decimals);const a=BigInt(n[1]+s+o);return Kp(a,i,"fromString"),new wp(oh,a,i)}static fromBytes(e,r){let n=zl(qe(e,"value"));const i=Z3(r);return i.signed&&(n=Kd(n,i.width)),Kp(n,i,"fromBytes"),new wp(oh,n,i)}};ko=new WeakMap,fr=new WeakMap,di=new WeakMap,Nr=new WeakSet,Jl=function(t){pe(this.format===t.format,"incompatible format; use fixedNumber.toFormat","other",t)},da=function(t,e){return t=Kp(t,T(this,ko),e),new S_(oh,t,T(this,ko))},J3=function(t,e){return ve(this,Nr,Jl).call(this,t),ve(this,Nr,da).call(this,T(this,fr)+T(t,fr),e)},Q3=function(t,e){return ve(this,Nr,Jl).call(this,t),ve(this,Nr,da).call(this,T(this,fr)-T(t,fr),e)},Y3=function(t,e){return ve(this,Nr,Jl).call(this,t),ve(this,Nr,da).call(this,T(this,fr)*T(t,fr)/T(this,di),e)},K3=function(t,e){return Be(T(t,fr)!==Cs,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),ve(this,Nr,Jl).call(this,t),ve(this,Nr,da).call(this,T(this,fr)*T(this,di)/T(t,fr),e)};let vy=S_;function qW(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function R_(t,e,r){let n=0;for(let i=0;i<r;i++)n=n*256+t[e+i];return n}function P_(t,e,r,n){const i=[];for(;r<e+1+n;){const s=N_(t,r);i.push(s.result),r+=s.consumed,Be(r<=e+1+n,"child data too short","BUFFER_OVERRUN",{buffer:t,length:n,offset:e})}return{consumed:1+n,result:i}}function N_(t,e){Be(t.length!==0,"data too short","BUFFER_OVERRUN",{buffer:t,length:0,offset:1});const r=n=>{Be(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){const n=t[e]-247;r(e+1+n);const i=R_(t,e+1,n);return r(e+1+n+i),P_(t,e,e+1+n,n+i)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),P_(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const i=R_(t,e+1,n);r(e+1+n+i);const s=Ze(t.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:s}}else if(t[e]>=128){const n=t[e]-128;r(e+1+n);const i=Ze(t.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:qW(t[e])}}function ch(t){const e=qe(t,"data"),r=N_(e,0);return pe(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function x_(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function I_(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(s){n=n.concat(I_(s))}),n.length<=55)return n.unshift(192+n.length),n;const i=x_(n.length);return i.unshift(247+i.length),i.concat(n)}const e=Array.prototype.slice.call(qe(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=x_(e.length);return r.unshift(183+r.length),r.concat(e)}const O_="0123456789abcdef";function ha(t){let e="0x";for(const r of I_(t))e+=O_[r>>4],e+=O_[r&15];return e}const B_=["wei","kwei","mwei","gwei","szabo","finney","ether"];function q3(t,e){let r=18;if(typeof e=="string"){const n=B_.indexOf(e);pe(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=mt(e,"unit"));return vy.fromValue(t,r,{decimals:r,width:512}).toString()}function X3(t,e){pe(typeof t=="string","value must be a string","value",t);let r=18;if(typeof e=="string"){const n=B_.indexOf(e);pe(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=mt(e,"unit"));return vy.fromString(t,{decimals:r,width:512}).value}function M_(t){return q3(t,18)}function U_(t){return X3(t,18)}function e4(t){const e=qe(t,"randomBytes");e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=Ze(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const Kn=32,t4=new Uint8Array(Kn),XW=["then"],by={},L_=new WeakMap;function Ql(t){return L_.get(t)}function F_(t,e){L_.set(t,e)}function qp(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}function r4(t,e,r){return t.indexOf(null)>=0?e.map((n,i)=>n instanceof lh?r4(Ql(n),n,r):n):t.reduce((n,i,s)=>{let o=e.getValue(i);return i in n||(r&&o instanceof lh&&(o=r4(Ql(o),o,r)),n[i]=o),n},{})}var Xp;const ej=class O1 extends Array{constructor(...e){const r=e[0];let n=e[1],i=(e[2]||[]).slice(),s=!0;r!==by&&(n=e,i=[],s=!1),super(n.length),ne(this,Xp),n.forEach((c,l)=>{this[l]=c});const o=i.reduce((c,l)=>(typeof l=="string"&&c.set(l,(c.get(l)||0)+1),c),new Map);if(F_(this,Object.freeze(n.map((c,l)=>{const u=i[l];return u!=null&&o.get(u)===1?u:null}))),V(this,Xp,[]),T(this,Xp)==null&&T(this,Xp),!s)return;Object.freeze(this);const a=new Proxy(this,{get:(c,l,u)=>{if(typeof l=="string"){if(l.match(/^[0-9]+$/)){const d=mt(l,"%index");if(d<0||d>=this.length)throw new RangeError("out of result range");const p=c[d];return p instanceof Error&&qp(`index ${d}`,p),p}if(XW.indexOf(l)>=0)return Reflect.get(c,l,u);const h=c[l];if(h instanceof Function)return function(...d){return h.apply(this===u?c:this,d)};if(!(l in c))return c.getValue.apply(this===u?c:this,[l])}return Reflect.get(c,l,u)}});return F_(a,Ql(this)),a}toArray(e){const r=[];return this.forEach((n,i)=>{n instanceof Error&&qp(`index ${i}`,n),e&&n instanceof O1&&(n=n.toArray(e)),r.push(n)}),r}toObject(e){const r=Ql(this);return r.reduce((n,i,s)=>(Be(i!=null,`value at index ${s} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),r4(r,this,e)),{})}slice(e,r){e==null&&(e=0),e<0&&(e+=this.length,e<0&&(e=0)),r==null&&(r=this.length),r<0&&(r+=this.length,r<0&&(r=0)),r>this.length&&(r=this.length);const n=Ql(this),i=[],s=[];for(let o=e;o<r;o++)i.push(this[o]),s.push(n[o]);return new O1(by,i,s)}filter(e,r){const n=Ql(this),i=[],s=[];for(let o=0;o<this.length;o++){const a=this[o];a instanceof Error&&qp(`index ${o}`,a),e.call(r,a,o,this)&&(i.push(a),s.push(n[o]))}return new O1(by,i,s)}map(e,r){const n=[];for(let i=0;i<this.length;i++){const s=this[i];s instanceof Error&&qp(`index ${i}`,s),n.push(e.call(r,s,i,this))}return n}getValue(e){const r=Ql(this).indexOf(e);if(r===-1)return;const n=this[r];return n instanceof Error&&qp(`property ${JSON.stringify(e)}`,n.error),n}static fromItems(e,r){return new O1(by,e,r)}};Xp=new WeakMap;let lh=ej;function V_(t){const e=[],r=function(n,i){if(Array.isArray(i))for(let s in i){const o=n.slice();o.push(s);try{r(o,i[s])}catch(a){e.push({path:o,error:a})}}};return r([],t),e}function D_(t){let e=on(t);return Be(e.length<=Kn,"value out-of-bounds","BUFFER_OVERRUN",{buffer:e,length:Kn,offset:e.length}),e.length!==Kn&&(e=sn(Zt([t4.slice(e.length%Kn),e]))),e}class fa{constructor(e,r,n,i){X(this,"name"),X(this,"type"),X(this,"localName"),X(this,"dynamic"),rt(this,{name:e,type:r,localName:n,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,r){pe(!1,e,this.localName,r)}}var wc,kc,e0,wy;class n4{constructor(){ne(this,e0),ne(this,wc),ne(this,kc),V(this,wc,[]),V(this,kc,0)}get data(){return Zt(T(this,wc))}get length(){return T(this,kc)}appendWriter(e){return ve(this,e0,wy).call(this,sn(e.data))}writeBytes(e){let r=sn(e);const n=r.length%Kn;return n&&(r=sn(Zt([r,t4.slice(n)]))),ve(this,e0,wy).call(this,r)}writeValue(e){return ve(this,e0,wy).call(this,D_(e))}writeUpdatableValue(){const e=T(this,wc).length;return T(this,wc).push(t4),V(this,kc,T(this,kc)+Kn),r=>{T(this,wc)[e]=D_(r)}}}wc=new WeakMap,kc=new WeakMap,e0=new WeakSet,wy=function(t){return T(this,wc).push(t),V(this,kc,T(this,kc)+t.length),t.length};var Ai,_i,Yl,uh,Kl,t0,i4,W_;const tj=class WV{constructor(e,r,n){ne(this,t0),X(this,"allowLoose"),ne(this,Ai),ne(this,_i),ne(this,Yl),ne(this,uh),ne(this,Kl),rt(this,{allowLoose:!!r}),V(this,Ai,sn(e)),V(this,Yl,0),V(this,uh,null),V(this,Kl,n??1024),V(this,_i,0)}get data(){return Ze(T(this,Ai))}get dataLength(){return T(this,Ai).length}get consumed(){return T(this,_i)}get bytes(){return new Uint8Array(T(this,Ai))}subReader(e){const r=new WV(T(this,Ai).slice(T(this,_i)+e),this.allowLoose,T(this,Kl));return V(r,uh,this),r}readBytes(e,r){let n=ve(this,t0,W_).call(this,0,e,!!r);return ve(this,t0,i4).call(this,e),V(this,_i,T(this,_i)+n.length),n.slice(0,e)}readValue(){return zl(this.readBytes(Kn))}readIndex(){return Gp(this.readBytes(Kn))}};Ai=new WeakMap,_i=new WeakMap,Yl=new WeakMap,uh=new WeakMap,Kl=new WeakMap,t0=new WeakSet,i4=function(t){var e;if(T(this,uh))return ve(e=T(this,uh),t0,i4).call(e,t);V(this,Yl,T(this,Yl)+t),Be(T(this,Kl)<1||T(this,Yl)<=T(this,Kl)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${T(this,Kl)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:sn(T(this,Ai)),offset:T(this,_i),length:t,info:{bytesRead:T(this,Yl),dataLength:this.dataLength}})},W_=function(t,e,r){let n=Math.ceil(e/Kn)*Kn;return T(this,_i)+n>T(this,Ai).length&&(this.allowLoose&&r&&T(this,_i)+e<=T(this,Ai).length?n=e:Be(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:sn(T(this,Ai)),length:T(this,Ai).length,offset:T(this,_i)+n})),T(this,Ai).slice(T(this,_i),T(this,_i)+n)};let rj=tj;function Ti(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function s4(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function j_(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ti(t.outputLen),Ti(t.blockLen)}function dh(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function G_(t,e){s4(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const o4=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const z_=t=>t instanceof Uint8Array,ky=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),r0=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Eo=(t,e)=>t<<32-e|t>>>e;if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");const nj=async()=>{};async function a4(t,e,r){let n=Date.now();for(let i=0;i<t;i++){r(i);const s=Date.now()-n;s>=0&&s<e||(await nj(),n+=s)}}function ij(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function ql(t){if(typeof t=="string"&&(t=ij(t)),!z_(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function sj(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!z_(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class c4{clone(){return this._cloneInto()}}const oj={}.toString;function $_(t,e){if(e!==void 0&&oj.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function Ec(t){const e=n=>t().update(ql(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function aj(t){const e=(n,i)=>t(i).update(ql(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function H_(t=32){if(o4&&typeof o4.getRandomValues=="function")return o4.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class l4 extends c4{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,j_(e);const n=ql(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),s.fill(0)}update(e){return dh(this),this.iHash.update(e),this}digestInto(e){dh(this),s4(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const n0=(t,e,r)=>new l4(t,e).update(r).digest();n0.create=(t,e)=>new l4(t,e);const cj=Object.freeze(Object.defineProperty({__proto__:null,HMAC:l4,hmac:n0},Symbol.toStringTag,{value:"Module"}));function Z_(t,e,r,n){j_(t);const i=$_({dkLen:32,asyncTick:10},n),{c:s,dkLen:o,asyncTick:a}=i;if(Ti(s),Ti(o),Ti(a),s<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=ql(e),l=ql(r),u=new Uint8Array(o),h=n0.create(t,c),d=h._cloneInto().update(l);return{c:s,dkLen:o,asyncTick:a,DK:u,PRF:h,PRFSalt:d}}function J_(t,e,r,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),i.fill(0),r}function Ey(t,e,r,n){const{c:i,dkLen:s,DK:o,PRF:a,PRFSalt:c}=Z_(t,e,r,n);let l;const u=new Uint8Array(4),h=r0(u),d=new Uint8Array(a.outputLen);for(let p=1,g=0;g<s;p++,g+=a.outputLen){const m=o.subarray(g,g+a.outputLen);h.setInt32(0,p,!1),(l=c._cloneInto(l)).update(u).digestInto(d),m.set(d.subarray(0,m.length));for(let y=1;y<i;y++){a._cloneInto(l).update(d).digestInto(d);for(let v=0;v<m.length;v++)m[v]^=d[v]}}return J_(a,c,o,l,d)}async function lj(t,e,r,n){const{c:i,dkLen:s,asyncTick:o,DK:a,PRF:c,PRFSalt:l}=Z_(t,e,r,n);let u;const h=new Uint8Array(4),d=r0(h),p=new Uint8Array(c.outputLen);for(let g=1,m=0;m<s;g++,m+=c.outputLen){const y=a.subarray(m,m+c.outputLen);d.setInt32(0,g,!1),(u=l._cloneInto(u)).update(h).digestInto(p),y.set(p.subarray(0,y.length)),await a4(i-1,o,()=>{c._cloneInto(u).update(p).digestInto(p);for(let v=0;v<y.length;v++)y[v]^=p[v]})}return J_(c,l,a,u,p)}const uj=Object.freeze(Object.defineProperty({__proto__:null,pbkdf2:Ey,pbkdf2Async:lj},Symbol.toStringTag,{value:"Module"}));function dj(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}class u4 extends c4{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=r0(this.buffer)}update(e){dh(this);const{view:r,buffer:n,blockLen:i}=this;e=ql(e);const s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=r0(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){dh(this),G_(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let h=o;h<i;h++)r[h]=0;dj(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=r0(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<l;h++)a.setUint32(4*h,u[h],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%r&&e.buffer.set(n),e}}const hj=(t,e,r)=>t&e^~t&r,fj=(t,e,r)=>t&e^t&r^e&r,pj=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]),Ac=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_c=new Uint32Array(64);class Q_ extends u4{constructor(){super(64,32,8,!1),this.A=Ac[0]|0,this.B=Ac[1]|0,this.C=Ac[2]|0,this.D=Ac[3]|0,this.E=Ac[4]|0,this.F=Ac[5]|0,this.G=Ac[6]|0,this.H=Ac[7]|0}get(){const{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let h=0;h<16;h++,r+=4)_c[h]=e.getUint32(r,!1);for(let h=16;h<64;h++){const d=_c[h-15],p=_c[h-2],g=Eo(d,7)^Eo(d,18)^d>>>3,m=Eo(p,17)^Eo(p,19)^p>>>10;_c[h]=m+_c[h-7]+g+_c[h-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let h=0;h<64;h++){const d=Eo(a,6)^Eo(a,11)^Eo(a,25),p=u+d+hj(a,c,l)+pj[h]+_c[h]|0,g=(Eo(n,2)^Eo(n,13)^Eo(n,22))+fj(n,i,s)|0;u=l,l=c,c=a,a=o+p|0,o=s,s=i,i=n,n=p+g|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,i,s,o,a,c,l,u)}roundClean(){_c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class gj extends Q_{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const Ao=Ec(()=>new Q_),mj=Ec(()=>new gj),yj=Object.freeze(Object.defineProperty({__proto__:null,sha224:mj,sha256:Ao},Symbol.toStringTag,{value:"Module"})),Ay=BigInt(2**32-1),d4=BigInt(32);function Y_(t,e=!1){return e?{h:Number(t&Ay),l:Number(t>>d4&Ay)}:{h:Number(t>>d4&Ay)|0,l:Number(t&Ay)|0}}function K_(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:s,l:o}=Y_(t[i],e);[r[i],n[i]]=[s,o]}return[r,n]}const vj=(t,e)=>BigInt(t>>>0)<<d4|BigInt(e>>>0),bj=(t,e,r)=>t>>>r,wj=(t,e,r)=>t<<32-r|e>>>r,kj=(t,e,r)=>t>>>r|e<<32-r,Ej=(t,e,r)=>t<<32-r|e>>>r,Aj=(t,e,r)=>t<<64-r|e>>>r-32,_j=(t,e,r)=>t>>>r-32|e<<64-r,Tj=(t,e)=>e,Cj=(t,e)=>t,q_=(t,e,r)=>t<<r|e>>>32-r,X_=(t,e,r)=>e<<r|t>>>32-r,eT=(t,e,r)=>e<<r-32|t>>>64-r,tT=(t,e,r)=>t<<r-32|e>>>64-r;function Sj(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const Rj=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Pj=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Nj=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),xj=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,Ij=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),Oj=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,Nt={fromBig:Y_,split:K_,toBig:vj,shrSH:bj,shrSL:wj,rotrSH:kj,rotrSL:Ej,rotrBH:Aj,rotrBL:_j,rotr32H:Tj,rotr32L:Cj,rotlSH:q_,rotlSL:X_,rotlBH:eT,rotlBL:tT,add:Sj,add3L:Rj,add3H:Pj,add4L:Nj,add4H:xj,add5H:Oj,add5L:Ij},[Bj,Mj]=Nt.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(t=>BigInt(t))),Tc=new Uint32Array(80),Cc=new Uint32Array(80);class i0 extends u4{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:h,Fl:d,Gh:p,Gl:g,Hh:m,Hl:y}=this;return[e,r,n,i,s,o,a,c,l,u,h,d,p,g,m,y]}set(e,r,n,i,s,o,a,c,l,u,h,d,p,g,m,y){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=h|0,this.Fl=d|0,this.Gh=p|0,this.Gl=g|0,this.Hh=m|0,this.Hl=y|0}process(e,r){for(let E=0;E<16;E++,r+=4)Tc[E]=e.getUint32(r),Cc[E]=e.getUint32(r+=4);for(let E=16;E<80;E++){const w=Tc[E-15]|0,C=Cc[E-15]|0,O=Nt.rotrSH(w,C,1)^Nt.rotrSH(w,C,8)^Nt.shrSH(w,C,7),U=Nt.rotrSL(w,C,1)^Nt.rotrSL(w,C,8)^Nt.shrSL(w,C,7),I=Tc[E-2]|0,B=Cc[E-2]|0,W=Nt.rotrSH(I,B,19)^Nt.rotrBH(I,B,61)^Nt.shrSH(I,B,6),M=Nt.rotrSL(I,B,19)^Nt.rotrBL(I,B,61)^Nt.shrSL(I,B,6),x=Nt.add4L(U,M,Cc[E-7],Cc[E-16]),P=Nt.add4H(x,O,W,Tc[E-7],Tc[E-16]);Tc[E]=P|0,Cc[E]=x|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:h,El:d,Fh:p,Fl:g,Gh:m,Gl:y,Hh:v,Hl:A}=this;for(let E=0;E<80;E++){const w=Nt.rotrSH(h,d,14)^Nt.rotrSH(h,d,18)^Nt.rotrBH(h,d,41),C=Nt.rotrSL(h,d,14)^Nt.rotrSL(h,d,18)^Nt.rotrBL(h,d,41),O=h&p^~h&m,U=d&g^~d&y,I=Nt.add5L(A,C,U,Mj[E],Cc[E]),B=Nt.add5H(I,v,w,O,Bj[E],Tc[E]),W=I|0,M=Nt.rotrSH(n,i,28)^Nt.rotrBH(n,i,34)^Nt.rotrBH(n,i,39),x=Nt.rotrSL(n,i,28)^Nt.rotrBL(n,i,34)^Nt.rotrBL(n,i,39),P=n&s^n&a^s&a,L=i&o^i&c^o&c;v=m|0,A=y|0,m=p|0,y=g|0,p=h|0,g=d|0,{h,l:d}=Nt.add(l|0,u|0,B|0,W|0),l=a|0,u=c|0,a=s|0,c=o|0,s=n|0,o=i|0;const F=Nt.add3L(W,x,L);n=Nt.add3H(F,B,M,P),i=F|0}({h:n,l:i}=Nt.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=Nt.add(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=Nt.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=Nt.add(this.Dh|0,this.Dl|0,l|0,u|0),{h,l:d}=Nt.add(this.Eh|0,this.El|0,h|0,d|0),{h:p,l:g}=Nt.add(this.Fh|0,this.Fl|0,p|0,g|0),{h:m,l:y}=Nt.add(this.Gh|0,this.Gl|0,m|0,y|0),{h:v,l:A}=Nt.add(this.Hh|0,this.Hl|0,v|0,A|0),this.set(n,i,s,o,a,c,l,u,h,d,p,g,m,y,v,A)}roundClean(){Tc.fill(0),Cc.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class Uj extends i0{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class Lj extends i0{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class Fj extends i0{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const _y=Ec(()=>new i0),Vj=Ec(()=>new Uj),Dj=Ec(()=>new Lj),Wj=Ec(()=>new Fj),jj=Object.freeze(Object.defineProperty({__proto__:null,SHA512:i0,sha384:Wj,sha512:_y,sha512_224:Vj,sha512_256:Dj},Symbol.toStringTag,{value:"Module"}));function Gj(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}const rT=Gj(),nT=rT.crypto||rT.msCrypto;function iT(t){switch(t){case"sha256":return Ao.create();case"sha512":return _y.create()}pe(!1,"invalid hashing algorithm name","algorithm",t)}function zj(t,e){const r={sha256:Ao,sha512:_y}[t];return pe(r!=null,"invalid hmac algorithm","algorithm",t),n0.create(r,e)}function $j(t,e,r,n,i){const s={sha256:Ao,sha512:_y}[i];return pe(s!=null,"invalid pbkdf2 algorithm","algorithm",i),Ey(s,t,e,{c:r,dkLen:n})}function Hj(t){Be(nT!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),pe(Number.isInteger(t)&&t>0&&t<=1024,"invalid length","length",t);const e=new Uint8Array(t);return nT.getRandomValues(e),e}let sT=!1;const oT=function(t,e,r){return zj(t,e).update(r).digest()};let aT=oT;function pa(t,e,r){const n=qe(e,"key"),i=qe(r,"data");return Ze(aT(t,n,i))}pa._=oT,pa.lock=function(){sT=!0},pa.register=function(t){if(sT)throw new Error("computeHmac is locked");aT=t},Object.freeze(pa);const[cT,lT,uT]=[[],[],[]],Zj=BigInt(0),s0=BigInt(1),Jj=BigInt(2),Qj=BigInt(7),Yj=BigInt(256),Kj=BigInt(113);for(let t=0,e=s0,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],cT.push(2*(5*n+r)),lT.push((t+1)*(t+2)/2%64);let i=Zj;for(let s=0;s<7;s++)e=(e<<s0^(e>>Qj)*Kj)%Yj,e&Jj&&(i^=s0<<(s0<<BigInt(s))-s0);uT.push(i)}const[qj,Xj]=K_(uT,!0),dT=(t,e,r)=>r>32?eT(t,e,r):q_(t,e,r),hT=(t,e,r)=>r>32?tT(t,e,r):X_(t,e,r);function fT(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],h=dT(l,u,1)^r[a],d=hT(l,u,1)^r[a+1];for(let p=0;p<50;p+=10)t[o+p]^=h,t[o+p+1]^=d}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=lT[o],c=dT(i,s,a),l=hT(i,s,a),u=cT[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=qj[n],t[1]^=Xj[n]}r.fill(0)}let h4=class jV extends c4{constructor(e,r,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Ti(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=ky(this.state)}keccak(){fT(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){dh(this);const{blockLen:r,state:n}=this;e=ql(e);const i=e.length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,r&128&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){dh(this,!1),s4(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Ti(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(G_(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new jV(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}};const Sc=(t,e,r)=>Ec(()=>new h4(e,t,r)),eG=Sc(6,144,224/8),tG=Sc(6,136,256/8),rG=Sc(6,104,384/8),nG=Sc(6,72,512/8),iG=Sc(1,144,224/8),pT=Sc(1,136,256/8),sG=Sc(1,104,384/8),oG=Sc(1,72,512/8),gT=(t,e,r)=>aj((n={})=>new h4(e,t,n.dkLen===void 0?r:n.dkLen,!0)),aG=gT(31,168,128/8),cG=gT(31,136,256/8),lG=Object.freeze(Object.defineProperty({__proto__:null,Keccak:h4,keccakP:fT,keccak_224:iG,keccak_256:pT,keccak_384:sG,keccak_512:oG,sha3_224:eG,sha3_256:tG,sha3_384:rG,sha3_512:nG,shake128:aG,shake256:cG},Symbol.toStringTag,{value:"Module"}));let mT=!1;const yT=function(t){return pT(t)};let vT=yT;function hr(t){const e=qe(t,"data");return Ze(vT(e))}hr._=yT,hr.lock=function(){mT=!0},hr.register=function(t){if(mT)throw new TypeError("keccak256 is locked");vT=t},Object.freeze(hr);const uG=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),bT=Uint8Array.from({length:16},(t,e)=>e),dG=bT.map(t=>(9*t+5)%16);let f4=[bT],p4=[dG];for(let t=0;t<4;t++)for(let e of[f4,p4])e.push(e[t].map(r=>uG[r]));const wT=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>new Uint8Array(t)),hG=f4.map((t,e)=>t.map(r=>wT[e][r])),fG=p4.map((t,e)=>t.map(r=>wT[e][r])),pG=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),gG=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),Ty=(t,e)=>t<<e|t>>>32-e;function kT(t,e,r,n){return t===0?e^r^n:t===1?e&r|~e&n:t===2?(e|~r)^n:t===3?e&n|r&~n:e^(r|~n)}const Cy=new Uint32Array(16);class ET extends u4{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:r,h2:n,h3:i,h4:s}=this;return[e,r,n,i,s]}set(e,r,n,i,s){this.h0=e|0,this.h1=r|0,this.h2=n|0,this.h3=i|0,this.h4=s|0}process(e,r){for(let p=0;p<16;p++,r+=4)Cy[p]=e.getUint32(r,!0);let n=this.h0|0,i=n,s=this.h1|0,o=s,a=this.h2|0,c=a,l=this.h3|0,u=l,h=this.h4|0,d=h;for(let p=0;p<5;p++){const g=4-p,m=pG[p],y=gG[p],v=f4[p],A=p4[p],E=hG[p],w=fG[p];for(let C=0;C<16;C++){const O=Ty(n+kT(p,s,a,l)+Cy[v[C]]+m,E[C])+h|0;n=h,h=l,l=Ty(a,10)|0,a=s,s=O}for(let C=0;C<16;C++){const O=Ty(i+kT(g,o,c,u)+Cy[A[C]]+y,w[C])+d|0;i=d,d=u,u=Ty(c,10)|0,c=o,o=O}}this.set(this.h1+a+u|0,this.h2+l+d|0,this.h3+h+i|0,this.h4+n+o|0,this.h0+s+c|0)}roundClean(){Cy.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const AT=Ec(()=>new ET),mG=Object.freeze(Object.defineProperty({__proto__:null,RIPEMD160:ET,ripemd160:AT},Symbol.toStringTag,{value:"Module"}));let _T=!1;const TT=function(t){return AT(t)};let CT=TT;function ga(t){const e=qe(t,"data");return Ze(CT(e))}ga._=TT,ga.lock=function(){_T=!0},ga.register=function(t){if(_T)throw new TypeError("ripemd160 is locked");CT=t},Object.freeze(ga);let ST=!1;const RT=function(t,e,r,n,i){return $j(t,e,r,n,i)};let PT=RT;function Ss(t,e,r,n,i){const s=qe(t,"password"),o=qe(e,"salt");return Ze(PT(s,o,r,n,i))}Ss._=RT,Ss.lock=function(){ST=!0},Ss.register=function(t){if(ST)throw new Error("pbkdf2 is locked");PT=t},Object.freeze(Ss);let NT=!1;const xT=function(t){return new Uint8Array(Hj(t))};let IT=xT;function Ci(t){return IT(t)}Ci._=xT,Ci.lock=function(){NT=!0},Ci.register=function(t){if(NT)throw new Error("randomBytes is locked");IT=t},Object.freeze(Ci);const rr=(t,e)=>t<<e|t>>>32-e;function OT(t,e,r,n,i,s){let o=t[e++]^r[n++],a=t[e++]^r[n++],c=t[e++]^r[n++],l=t[e++]^r[n++],u=t[e++]^r[n++],h=t[e++]^r[n++],d=t[e++]^r[n++],p=t[e++]^r[n++],g=t[e++]^r[n++],m=t[e++]^r[n++],y=t[e++]^r[n++],v=t[e++]^r[n++],A=t[e++]^r[n++],E=t[e++]^r[n++],w=t[e++]^r[n++],C=t[e++]^r[n++],O=o,U=a,I=c,B=l,W=u,M=h,x=d,P=p,L=g,F=m,G=y,j=v,q=A,z=E,Q=w,K=C;for(let te=0;te<8;te+=2)W^=rr(O+q|0,7),L^=rr(W+O|0,9),q^=rr(L+W|0,13),O^=rr(q+L|0,18),F^=rr(M+U|0,7),z^=rr(F+M|0,9),U^=rr(z+F|0,13),M^=rr(U+z|0,18),Q^=rr(G+x|0,7),I^=rr(Q+G|0,9),x^=rr(I+Q|0,13),G^=rr(x+I|0,18),B^=rr(K+j|0,7),P^=rr(B+K|0,9),j^=rr(P+B|0,13),K^=rr(j+P|0,18),U^=rr(O+B|0,7),I^=rr(U+O|0,9),B^=rr(I+U|0,13),O^=rr(B+I|0,18),x^=rr(M+W|0,7),P^=rr(x+M|0,9),W^=rr(P+x|0,13),M^=rr(W+P|0,18),j^=rr(G+F|0,7),L^=rr(j+G|0,9),F^=rr(L+j|0,13),G^=rr(F+L|0,18),q^=rr(K+Q|0,7),z^=rr(q+K|0,9),Q^=rr(z+q|0,13),K^=rr(Q+z|0,18);i[s++]=o+O|0,i[s++]=a+U|0,i[s++]=c+I|0,i[s++]=l+B|0,i[s++]=u+W|0,i[s++]=h+M|0,i[s++]=d+x|0,i[s++]=p+P|0,i[s++]=g+L|0,i[s++]=m+F|0,i[s++]=y+G|0,i[s++]=v+j|0,i[s++]=A+q|0,i[s++]=E+z|0,i[s++]=w+Q|0,i[s++]=C+K|0}function hh(t,e,r,n,i){let s=n+0,o=n+16*i;for(let a=0;a<16;a++)r[o+a]=t[e+(2*i-1)*16+a];for(let a=0;a<i;a++,s+=16,e+=16)OT(r,o,t,e,r,s),a>0&&(o+=16),OT(r,s,t,e+=16,r,o)}function BT(t,e,r){const n=$_({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:i,r:s,p:o,dkLen:a,asyncTick:c,maxmem:l,onProgress:u}=n;if(Ti(i),Ti(s),Ti(o),Ti(a),Ti(c),Ti(l),u!==void 0&&typeof u!="function")throw new Error("progressCb should be function");const h=128*s,d=h/4;if(i<=1||i&i-1||i>=2**(h/8)||i>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(o<0||o>(2**32-1)*32/h)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const p=h*(i+o);if(p>l)throw new Error(`Scrypt: parameters too large, ${p} (128 * r * (N + p)) > ${l} (maxmem)`);const g=Ey(Ao,t,e,{c:1,dkLen:h*o}),m=ky(g),y=ky(new Uint8Array(h*i)),v=ky(new Uint8Array(h));let A=()=>{};if(u){const E=2*i*o,w=Math.max(Math.floor(E/1e4),1);let C=0;A=()=>{C++,u&&(!(C%w)||C===E)&&u(C/E)}}return{N:i,r:s,p:o,dkLen:a,blockSize32:d,V:y,B32:m,B:g,tmp:v,blockMixCb:A,asyncTick:c}}function MT(t,e,r,n,i){const s=Ey(Ao,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),i.fill(0),s}function UT(t,e,r){const{N:n,r:i,p:s,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:h,blockMixCb:d}=BT(t,e,r);for(let p=0;p<s;p++){const g=a*p;for(let m=0;m<a;m++)c[m]=l[g+m];for(let m=0,y=0;m<n-1;m++)hh(c,y,c,y+=a,i),d();hh(c,(n-1)*a,l,g,i),d();for(let m=0;m<n;m++){const y=l[g+a-16]%n;for(let v=0;v<a;v++)h[v]=l[g+v]^c[y*a+v];hh(h,0,l,g,i),d()}}return MT(t,o,u,c,h)}async function LT(t,e,r){const{N:n,r:i,p:s,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:h,blockMixCb:d,asyncTick:p}=BT(t,e,r);for(let g=0;g<s;g++){const m=a*g;for(let v=0;v<a;v++)c[v]=l[m+v];let y=0;await a4(n-1,p,()=>{hh(c,y,c,y+=a,i),d()}),hh(c,(n-1)*a,l,m,i),d(),await a4(n,p,()=>{const v=l[m+a-16]%n;for(let A=0;A<a;A++)h[A]=l[m+A]^c[v*a+A];hh(h,0,l,m,i),d()})}return MT(t,o,u,c,h)}const yG=Object.freeze(Object.defineProperty({__proto__:null,scrypt:UT,scryptAsync:LT},Symbol.toStringTag,{value:"Module"}));let FT=!1,VT=!1;const DT=async function(t,e,r,n,i,s,o){return await LT(t,e,{N:r,r:n,p:i,dkLen:s,onProgress:o})},WT=function(t,e,r,n,i,s){return UT(t,e,{N:r,r:n,p:i,dkLen:s})};let jT=DT,GT=WT;async function ma(t,e,r,n,i,s,o){const a=qe(t,"passwd"),c=qe(e,"salt");return Ze(await jT(a,c,r,n,i,s,o))}ma._=DT,ma.lock=function(){VT=!0},ma.register=function(t){if(VT)throw new Error("scrypt is locked");jT=t},Object.freeze(ma);function ya(t,e,r,n,i,s){const o=qe(t,"passwd"),a=qe(e,"salt");return Ze(GT(o,a,r,n,i,s))}ya._=WT,ya.lock=function(){FT=!0},ya.register=function(t){if(FT)throw new Error("scryptSync is locked");GT=t},Object.freeze(ya);const zT=function(t){return iT("sha256").update(t).digest()},$T=function(t){return iT("sha512").update(t).digest()};let HT=zT,ZT=$T,JT=!1,QT=!1;function Ln(t){const e=qe(t,"data");return Ze(HT(e))}Ln._=zT,Ln.lock=function(){JT=!0},Ln.register=function(t){if(JT)throw new Error("sha256 is locked");HT=t},Object.freeze(Ln);function fh(t){const e=qe(t,"data");return Ze(ZT(e))}fh._=$T,fh.lock=function(){QT=!0},fh.register=function(t){if(QT)throw new Error("sha512 is locked");ZT=t},Object.freeze(Ln);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const YT=BigInt(0),Sy=BigInt(1),vG=BigInt(2),Ry=t=>t instanceof Uint8Array,bG=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function ph(t){if(!Ry(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=bG[t[r]];return e}function KT(t){const e=t.toString(16);return e.length&1?`0${e}`:e}function g4(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function gh(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(e/2);for(let n=0;n<r.length;n++){const i=n*2,s=t.slice(i,i+2),o=Number.parseInt(s,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[n]=o}return r}function qn(t){return g4(ph(t))}function m4(t){if(!Ry(t))throw new Error("Uint8Array expected");return g4(ph(Uint8Array.from(t).reverse()))}function Rc(t,e){return gh(t.toString(16).padStart(e*2,"0"))}function y4(t,e){return Rc(t,e).reverse()}function wG(t){return gh(KT(t))}function Fn(t,e,r){let n;if(typeof e=="string")try{n=gh(e)}catch(s){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${s}`)}else if(Ry(e))n=Uint8Array.from(e);else throw new Error(`${t} must be hex string or Uint8Array`);const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(`${t} expected ${r} bytes, got ${i}`);return n}function Si(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!Ry(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function kG(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function Py(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function EG(t){let e;for(e=0;t>YT;t>>=Sy,e+=1);return e}function AG(t,e){return t>>BigInt(e)&Sy}const _G=(t,e,r)=>t|(r?Sy:YT)<<BigInt(e),v4=t=>(vG<<BigInt(t-1))-Sy,b4=t=>new Uint8Array(t),qT=t=>Uint8Array.from(t);function XT(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=b4(t),i=b4(t),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},a=(...u)=>r(i,n,...u),c=(u=b4())=>{i=a(qT([0]),u),n=a(),u.length!==0&&(i=a(qT([1]),u),n=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let u=0;const h=[];for(;u<e;){n=a();const d=n.slice();h.push(d),u+=n.length}return Si(...h)};return(u,h)=>{o(),c(u);let d;for(;!(d=h(l()));)c();return o(),d}}const TG={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function mh(t,e,r={}){const n=(i,s,o)=>{const a=TG[s];if(typeof a!="function")throw new Error(`Invalid validator "${s}", expected function`);const c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${s}`)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(r))n(i,s,!0);return t}const CG=Object.freeze(Object.defineProperty({__proto__:null,bitGet:AG,bitLen:EG,bitMask:v4,bitSet:_G,bytesToHex:ph,bytesToNumberBE:qn,bytesToNumberLE:m4,concatBytes:Si,createHmacDrbg:XT,ensureBytes:Fn,equalBytes:kG,hexToBytes:gh,hexToNumber:g4,numberToBytesBE:Rc,numberToBytesLE:y4,numberToHexUnpadded:KT,numberToVarBytesBE:wG,utf8ToBytes:Py,validateObject:mh},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hn=BigInt(0),zr=BigInt(1),Xl=BigInt(2),SG=BigInt(3),w4=BigInt(4),e7=BigInt(5),t7=BigInt(8);BigInt(9),BigInt(16);function fn(t,e){const r=t%e;return r>=hn?r:e+r}function RG(t,e,r){if(r<=hn||e<hn)throw new Error("Expected power/modulo > 0");if(r===zr)return hn;let n=zr;for(;e>hn;)e&zr&&(n=n*t%r),t=t*t%r,e>>=zr;return n}function Yi(t,e,r){let n=t;for(;e-- >hn;)n*=n,n%=r;return n}function k4(t,e){if(t===hn||e<=hn)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=fn(t,e),n=e,i=hn,s=zr;for(;r!==hn;){const o=n/r,a=n%r,c=i-s*o;n=r,r=a,i=s,s=c}if(n!==zr)throw new Error("invert: does not exist");return fn(i,e)}function PG(t){const e=(t-zr)/Xl;let r,n,i;for(r=t-zr,n=0;r%Xl===hn;r/=Xl,n++);for(i=Xl;i<t&&RG(i,e,t)!==t-zr;i++);if(n===1){const o=(t+zr)/w4;return function(a,c){const l=a.pow(c,o);if(!a.eql(a.sqr(l),c))throw new Error("Cannot find square root");return l}}const s=(r+zr)/Xl;return function(o,a){if(o.pow(a,e)===o.neg(o.ONE))throw new Error("Cannot find square root");let c=n,l=o.pow(o.mul(o.ONE,i),r),u=o.pow(a,s),h=o.pow(a,r);for(;!o.eql(h,o.ONE);){if(o.eql(h,o.ZERO))return o.ZERO;let d=1;for(let g=o.sqr(h);d<c&&!o.eql(g,o.ONE);d++)g=o.sqr(g);const p=o.pow(l,zr<<BigInt(c-d-1));l=o.sqr(p),u=o.mul(u,p),h=o.mul(h,l),c=d}return u}}function NG(t){if(t%w4===SG){const e=(t+zr)/w4;return function(r,n){const i=r.pow(n,e);if(!r.eql(r.sqr(i),n))throw new Error("Cannot find square root");return i}}if(t%t7===e7){const e=(t-e7)/t7;return function(r,n){const i=r.mul(n,Xl),s=r.pow(i,e),o=r.mul(n,s),a=r.mul(r.mul(o,Xl),s),c=r.mul(o,r.sub(a,r.ONE));if(!r.eql(r.sqr(c),n))throw new Error("Cannot find square root");return c}}return PG(t)}const xG=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function r7(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=xG.reduce((n,i)=>(n[i]="function",n),e);return mh(t,r)}function IG(t,e,r){if(r<hn)throw new Error("Expected power > 0");if(r===hn)return t.ONE;if(r===zr)return e;let n=t.ONE,i=e;for(;r>hn;)r&zr&&(n=t.mul(n,i)),i=t.sqr(i),r>>=zr;return n}function OG(t,e){const r=new Array(e.length),n=e.reduce((s,o,a)=>t.is0(o)?s:(r[a]=s,t.mul(s,o)),t.ONE),i=t.inv(n);return e.reduceRight((s,o,a)=>t.is0(o)?s:(r[a]=t.mul(s,r[a]),t.mul(s,o)),i),r}function n7(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function BG(t,e,r=!1,n={}){if(t<=hn)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:s}=n7(t,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=NG(t),a=Object.freeze({ORDER:t,BITS:i,BYTES:s,MASK:v4(i),ZERO:hn,ONE:zr,create:c=>fn(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return hn<=c&&c<t},is0:c=>c===hn,isOdd:c=>(c&zr)===zr,neg:c=>fn(-c,t),eql:(c,l)=>c===l,sqr:c=>fn(c*c,t),add:(c,l)=>fn(c+l,t),sub:(c,l)=>fn(c-l,t),mul:(c,l)=>fn(c*l,t),pow:(c,l)=>IG(a,c,l),div:(c,l)=>fn(c*k4(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>k4(c,t),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>OG(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?y4(c,s):Rc(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${c.length}`);return r?m4(c):qn(c)}});return Object.freeze(a)}function i7(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function s7(t){const e=i7(t);return e+Math.ceil(e/2)}function MG(t,e,r=!1){const n=t.length,i=i7(e),s=s7(e);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const o=r?qn(t):m4(t),a=fn(o,e-zr)+zr;return r?y4(a,i):Rc(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const UG=BigInt(0),E4=BigInt(1);function LG(t,e){const r=(i,s)=>{const o=s.negate();return i?o:s},n=i=>{const s=Math.ceil(e/i)+1,o=2**(i-1);return{windows:s,windowSize:o}};return{constTimeNegate:r,unsafeLadder(i,s){let o=t.ZERO,a=i;for(;s>UG;)s&E4&&(o=o.add(a)),a=a.double(),s>>=E4;return o},precomputeWindow(i,s){const{windows:o,windowSize:a}=n(s),c=[];let l=i,u=l;for(let h=0;h<o;h++){u=l,c.push(u);for(let d=1;d<a;d++)u=u.add(l),c.push(u);l=u.double()}return c},wNAF(i,s,o){const{windows:a,windowSize:c}=n(i);let l=t.ZERO,u=t.BASE;const h=BigInt(2**i-1),d=2**i,p=BigInt(i);for(let g=0;g<a;g++){const m=g*c;let y=Number(o&h);o>>=p,y>c&&(y-=d,o+=E4);const v=m,A=m+Math.abs(y)-1,E=g%2!==0,w=y<0;y===0?u=u.add(r(E,s[v])):l=l.add(r(w,s[A]))}return{p:l,f:u}},wNAFCached(i,s,o,a){const c=i._WINDOW_SIZE||1;let l=s.get(i);return l||(l=this.precomputeWindow(i,c),c!==1&&s.set(i,a(l))),this.wNAF(c,l,o)}}}function o7(t){return r7(t.Fp),mh(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...n7(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function FG(t){const e=o7(t);mh(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:VG,hexToBytes:DG}=CG,eu={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(t){const{Err:e}=eu;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:VG(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=eu,r=typeof t=="string"?DG(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:s}=eu._parseInt(r.subarray(2)),{d:o,l:a}=eu._parseInt(s);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,r=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},n=e(r(t.s)),i=e(r(t.r)),s=n.length/2,o=i.length/2,a=r(s),c=r(o);return`30${r(o+s+4)}02${c}${i}02${a}${n}`}},Rs=BigInt(0),Vr=BigInt(1),Pc=BigInt(2),Ny=BigInt(3),a7=BigInt(4);function WG(t){const e=FG(t),{Fp:r}=e,n=e.toBytes||((g,m,y)=>{const v=m.toAffine();return Si(Uint8Array.from([4]),r.toBytes(v.x),r.toBytes(v.y))}),i=e.fromBytes||(g=>{const m=g.subarray(1),y=r.fromBytes(m.subarray(0,r.BYTES)),v=r.fromBytes(m.subarray(r.BYTES,2*r.BYTES));return{x:y,y:v}});function s(g){const{a:m,b:y}=e,v=r.sqr(g),A=r.mul(v,g);return r.add(r.add(A,r.mul(g,m)),y)}if(!r.eql(r.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function o(g){return typeof g=="bigint"&&Rs<g&&g<e.n}function a(g){if(!o(g))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(g){const{allowedPrivateKeyLengths:m,nByteLength:y,wrapPrivateKey:v,n:A}=e;if(m&&typeof g!="bigint"){if(g instanceof Uint8Array&&(g=ph(g)),typeof g!="string"||!m.includes(g.length))throw new Error("Invalid key");g=g.padStart(y*2,"0")}let E;try{E=typeof g=="bigint"?g:qn(Fn("private key",g,y))}catch{throw new Error(`private key must be ${y} bytes, hex or bigint, not ${typeof g}`)}return v&&(E=fn(E,A)),a(E),E}const l=new Map;function u(g){if(!(g instanceof h))throw new Error("ProjectivePoint expected")}class h{constructor(m,y,v){if(this.px=m,this.py=y,this.pz=v,m==null||!r.isValid(m))throw new Error("x required");if(y==null||!r.isValid(y))throw new Error("y required");if(v==null||!r.isValid(v))throw new Error("z required")}static fromAffine(m){const{x:y,y:v}=m||{};if(!m||!r.isValid(y)||!r.isValid(v))throw new Error("invalid affine point");if(m instanceof h)throw new Error("projective point not allowed");const A=E=>r.eql(E,r.ZERO);return A(y)&&A(v)?h.ZERO:new h(y,v,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(m){const y=r.invertBatch(m.map(v=>v.pz));return m.map((v,A)=>v.toAffine(y[A])).map(h.fromAffine)}static fromHex(m){const y=h.fromAffine(i(Fn("pointHex",m)));return y.assertValidity(),y}static fromPrivateKey(m){return h.BASE.multiply(c(m))}_setWindowSize(m){this._WINDOW_SIZE=m,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:m,y}=this.toAffine();if(!r.isValid(m)||!r.isValid(y))throw new Error("bad point: x or y not FE");const v=r.sqr(y),A=s(m);if(!r.eql(v,A))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:m}=this.toAffine();if(r.isOdd)return!r.isOdd(m);throw new Error("Field doesn't support isOdd")}equals(m){u(m);const{px:y,py:v,pz:A}=this,{px:E,py:w,pz:C}=m,O=r.eql(r.mul(y,C),r.mul(E,A)),U=r.eql(r.mul(v,C),r.mul(w,A));return O&&U}negate(){return new h(this.px,r.neg(this.py),this.pz)}double(){const{a:m,b:y}=e,v=r.mul(y,Ny),{px:A,py:E,pz:w}=this;let C=r.ZERO,O=r.ZERO,U=r.ZERO,I=r.mul(A,A),B=r.mul(E,E),W=r.mul(w,w),M=r.mul(A,E);return M=r.add(M,M),U=r.mul(A,w),U=r.add(U,U),C=r.mul(m,U),O=r.mul(v,W),O=r.add(C,O),C=r.sub(B,O),O=r.add(B,O),O=r.mul(C,O),C=r.mul(M,C),U=r.mul(v,U),W=r.mul(m,W),M=r.sub(I,W),M=r.mul(m,M),M=r.add(M,U),U=r.add(I,I),I=r.add(U,I),I=r.add(I,W),I=r.mul(I,M),O=r.add(O,I),W=r.mul(E,w),W=r.add(W,W),I=r.mul(W,M),C=r.sub(C,I),U=r.mul(W,B),U=r.add(U,U),U=r.add(U,U),new h(C,O,U)}add(m){u(m);const{px:y,py:v,pz:A}=this,{px:E,py:w,pz:C}=m;let O=r.ZERO,U=r.ZERO,I=r.ZERO;const B=e.a,W=r.mul(e.b,Ny);let M=r.mul(y,E),x=r.mul(v,w),P=r.mul(A,C),L=r.add(y,v),F=r.add(E,w);L=r.mul(L,F),F=r.add(M,x),L=r.sub(L,F),F=r.add(y,A);let G=r.add(E,C);return F=r.mul(F,G),G=r.add(M,P),F=r.sub(F,G),G=r.add(v,A),O=r.add(w,C),G=r.mul(G,O),O=r.add(x,P),G=r.sub(G,O),I=r.mul(B,F),O=r.mul(W,P),I=r.add(O,I),O=r.sub(x,I),I=r.add(x,I),U=r.mul(O,I),x=r.add(M,M),x=r.add(x,M),P=r.mul(B,P),F=r.mul(W,F),x=r.add(x,P),P=r.sub(M,P),P=r.mul(B,P),F=r.add(F,P),M=r.mul(x,F),U=r.add(U,M),M=r.mul(G,F),O=r.mul(L,O),O=r.sub(O,M),M=r.mul(L,x),I=r.mul(G,I),I=r.add(I,M),new h(O,U,I)}subtract(m){return this.add(m.negate())}is0(){return this.equals(h.ZERO)}wNAF(m){return p.wNAFCached(this,l,m,y=>{const v=r.invertBatch(y.map(A=>A.pz));return y.map((A,E)=>A.toAffine(v[E])).map(h.fromAffine)})}multiplyUnsafe(m){const y=h.ZERO;if(m===Rs)return y;if(a(m),m===Vr)return this;const{endo:v}=e;if(!v)return p.unsafeLadder(this,m);let{k1neg:A,k1:E,k2neg:w,k2:C}=v.splitScalar(m),O=y,U=y,I=this;for(;E>Rs||C>Rs;)E&Vr&&(O=O.add(I)),C&Vr&&(U=U.add(I)),I=I.double(),E>>=Vr,C>>=Vr;return A&&(O=O.negate()),w&&(U=U.negate()),U=new h(r.mul(U.px,v.beta),U.py,U.pz),O.add(U)}multiply(m){a(m);let y=m,v,A;const{endo:E}=e;if(E){const{k1neg:w,k1:C,k2neg:O,k2:U}=E.splitScalar(y);let{p:I,f:B}=this.wNAF(C),{p:W,f:M}=this.wNAF(U);I=p.constTimeNegate(w,I),W=p.constTimeNegate(O,W),W=new h(r.mul(W.px,E.beta),W.py,W.pz),v=I.add(W),A=B.add(M)}else{const{p:w,f:C}=this.wNAF(y);v=w,A=C}return h.normalizeZ([v,A])[0]}multiplyAndAddUnsafe(m,y,v){const A=h.BASE,E=(C,O)=>O===Rs||O===Vr||!C.equals(A)?C.multiplyUnsafe(O):C.multiply(O),w=E(this,y).add(E(m,v));return w.is0()?void 0:w}toAffine(m){const{px:y,py:v,pz:A}=this,E=this.is0();m==null&&(m=E?r.ONE:r.inv(A));const w=r.mul(y,m),C=r.mul(v,m),O=r.mul(A,m);if(E)return{x:r.ZERO,y:r.ZERO};if(!r.eql(O,r.ONE))throw new Error("invZ was invalid");return{x:w,y:C}}isTorsionFree(){const{h:m,isTorsionFree:y}=e;if(m===Vr)return!0;if(y)return y(h,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:m,clearCofactor:y}=e;return m===Vr?this:y?y(h,this):this.multiplyUnsafe(e.h)}toRawBytes(m=!0){return this.assertValidity(),n(h,this,m)}toHex(m=!0){return ph(this.toRawBytes(m))}}h.BASE=new h(e.Gx,e.Gy,r.ONE),h.ZERO=new h(r.ZERO,r.ONE,r.ZERO);const d=e.nBitLength,p=LG(h,e.endo?Math.ceil(d/2):d);return{CURVE:e,ProjectivePoint:h,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function jG(t){const e=o7(t);return mh(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function GG(t){const e=jG(t),{Fp:r,n}=e,i=r.BYTES+1,s=2*r.BYTES+1;function o(F){return Rs<F&&F<r.ORDER}function a(F){return fn(F,n)}function c(F){return k4(F,n)}const{ProjectivePoint:l,normPrivateKeyToScalar:u,weierstrassEquation:h,isWithinCurveOrder:d}=WG({...e,toBytes(F,G,j){const q=G.toAffine(),z=r.toBytes(q.x),Q=Si;return j?Q(Uint8Array.from([G.hasEvenY()?2:3]),z):Q(Uint8Array.from([4]),z,r.toBytes(q.y))},fromBytes(F){const G=F.length,j=F[0],q=F.subarray(1);if(G===i&&(j===2||j===3)){const z=qn(q);if(!o(z))throw new Error("Point is not on curve");const Q=h(z);let K=r.sqrt(Q);const te=(K&Vr)===Vr;return(j&1)===1!==te&&(K=r.neg(K)),{x:z,y:K}}else if(G===s&&j===4){const z=r.fromBytes(q.subarray(0,r.BYTES)),Q=r.fromBytes(q.subarray(r.BYTES,2*r.BYTES));return{x:z,y:Q}}else throw new Error(`Point of length ${G} was invalid. Expected ${i} compressed bytes or ${s} uncompressed bytes`)}}),p=F=>ph(Rc(F,e.nByteLength));function g(F){const G=n>>Vr;return F>G}function m(F){return g(F)?a(-F):F}const y=(F,G,j)=>qn(F.slice(G,j));class v{constructor(G,j,q){this.r=G,this.s=j,this.recovery=q,this.assertValidity()}static fromCompact(G){const j=e.nByteLength;return G=Fn("compactSignature",G,j*2),new v(y(G,0,j),y(G,j,2*j))}static fromDER(G){const{r:j,s:q}=eu.toSig(Fn("DER",G));return new v(j,q)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(G){return new v(this.r,this.s,G)}recoverPublicKey(G){const{r:j,s:q,recovery:z}=this,Q=U(Fn("msgHash",G));if(z==null||![0,1,2,3].includes(z))throw new Error("recovery id invalid");const K=z===2||z===3?j+e.n:j;if(K>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const te=z&1?"03":"02",oe=l.fromHex(te+p(K)),ye=c(K),_e=a(-Q*ye),Ce=a(q*ye),ie=l.BASE.multiplyAndAddUnsafe(oe,_e,Ce);if(!ie)throw new Error("point at infinify");return ie.assertValidity(),ie}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new v(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return gh(this.toDERHex())}toDERHex(){return eu.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return gh(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}const A={isValidPrivateKey(F){try{return u(F),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const F=s7(e.n);return MG(e.randomBytes(F),e.n)},precompute(F=8,G=l.BASE){return G._setWindowSize(F),G.multiply(BigInt(3)),G}};function E(F,G=!0){return l.fromPrivateKey(F).toRawBytes(G)}function w(F){const G=F instanceof Uint8Array,j=typeof F=="string",q=(G||j)&&F.length;return G?q===i||q===s:j?q===2*i||q===2*s:F instanceof l}function C(F,G,j=!0){if(w(F))throw new Error("first arg must be private key");if(!w(G))throw new Error("second arg must be public key");return l.fromHex(G).multiply(u(F)).toRawBytes(j)}const O=e.bits2int||function(F){const G=qn(F),j=F.length*8-e.nBitLength;return j>0?G>>BigInt(j):G},U=e.bits2int_modN||function(F){return a(O(F))},I=v4(e.nBitLength);function B(F){if(typeof F!="bigint")throw new Error("bigint expected");if(!(Rs<=F&&F<I))throw new Error(`bigint expected < 2^${e.nBitLength}`);return Rc(F,e.nByteLength)}function W(F,G,j=M){if(["recovered","canonical"].some(we=>we in j))throw new Error("sign() legacy options not supported");const{hash:q,randomBytes:z}=e;let{lowS:Q,prehash:K,extraEntropy:te}=j;Q==null&&(Q=!0),F=Fn("msgHash",F),K&&(F=Fn("prehashed msgHash",q(F)));const oe=U(F),ye=u(G),_e=[B(ye),B(oe)];if(te!=null){const we=te===!0?z(r.BYTES):te;_e.push(Fn("extraEntropy",we))}const Ce=Si(..._e),ie=oe;function le(we){const D=O(we);if(!d(D))return;const ue=c(D),me=l.BASE.multiply(D).toAffine(),be=a(me.x);if(be===Rs)return;const re=a(ue*a(ie+be*ye));if(re===Rs)return;let N=(me.x===be?0:2)|Number(me.y&Vr),$=re;return Q&&g(re)&&($=m(re),N^=1),new v(be,$,N)}return{seed:Ce,k2sig:le}}const M={lowS:e.lowS,prehash:!1},x={lowS:e.lowS,prehash:!1};function P(F,G,j=M){const{seed:q,k2sig:z}=W(F,G,j),Q=e;return XT(Q.hash.outputLen,Q.nByteLength,Q.hmac)(q,z)}l.BASE._setWindowSize(8);function L(F,G,j,q=x){var z;const Q=F;if(G=Fn("msgHash",G),j=Fn("publicKey",j),"strict"in q)throw new Error("options.strict was renamed to lowS");const{lowS:K,prehash:te}=q;let oe,ye;try{if(typeof Q=="string"||Q instanceof Uint8Array)try{oe=v.fromDER(Q)}catch(me){if(!(me instanceof eu.Err))throw me;oe=v.fromCompact(Q)}else if(typeof Q=="object"&&typeof Q.r=="bigint"&&typeof Q.s=="bigint"){const{r:me,s:be}=Q;oe=new v(me,be)}else throw new Error("PARSE");ye=l.fromHex(j)}catch(me){if(me.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(K&&oe.hasHighS())return!1;te&&(G=e.hash(G));const{r:_e,s:Ce}=oe,ie=U(G),le=c(Ce),we=a(ie*le),D=a(_e*le),ue=(z=l.BASE.multiplyAndAddUnsafe(ye,we,D))==null?void 0:z.toAffine();return ue?a(ue.x)===_e:!1}return{CURVE:e,getPublicKey:E,getSharedSecret:C,sign:P,verify:L,ProjectivePoint:l,Signature:v,utils:A}}function zG(t,e){const r=t.ORDER;let n=Rs;for(let g=r-Vr;g%Pc===Rs;g/=Pc)n+=Vr;const i=n,s=Pc<<i-Vr-Vr,o=s*Pc,a=(r-Vr)/o,c=(a-Vr)/Pc,l=o-Vr,u=s,h=t.pow(e,a),d=t.pow(e,(a+Vr)/Pc);let p=(g,m)=>{let y=h,v=t.pow(m,l),A=t.sqr(v);A=t.mul(A,m);let E=t.mul(g,A);E=t.pow(E,c),E=t.mul(E,v),v=t.mul(E,m),A=t.mul(E,g);let w=t.mul(A,v);E=t.pow(w,u);let C=t.eql(E,t.ONE);v=t.mul(A,d),E=t.mul(w,y),A=t.cmov(v,A,C),w=t.cmov(E,w,C);for(let O=i;O>Vr;O--){let U=O-Pc;U=Pc<<U-Vr;let I=t.pow(w,U);const B=t.eql(I,t.ONE);v=t.mul(A,y),y=t.mul(y,y),I=t.mul(w,y),A=t.cmov(v,A,B),w=t.cmov(I,w,B)}return{isValid:C,value:A}};if(t.ORDER%a7===Ny){const g=(t.ORDER-Ny)/a7,m=t.sqrt(t.neg(e));p=(y,v)=>{let A=t.sqr(v);const E=t.mul(y,v);A=t.mul(A,E);let w=t.pow(A,g);w=t.mul(w,E);const C=t.mul(w,m),O=t.mul(t.sqr(w),v),U=t.eql(O,y);let I=t.cmov(C,w,U);return{isValid:U,value:I}}}return p}function $G(t,e){if(r7(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=zG(t,e.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,s,o,a,c,l,u,h;i=t.sqr(n),i=t.mul(i,e.Z),s=t.sqr(i),s=t.add(s,i),o=t.add(s,t.ONE),o=t.mul(o,e.B),a=t.cmov(e.Z,t.neg(s),!t.eql(s,t.ZERO)),a=t.mul(a,e.A),s=t.sqr(o),l=t.sqr(a),c=t.mul(l,e.A),s=t.add(s,c),s=t.mul(s,o),l=t.mul(l,a),c=t.mul(l,e.B),s=t.add(s,c),u=t.mul(i,o);const{isValid:d,value:p}=r(s,l);h=t.mul(i,n),h=t.mul(h,p),u=t.cmov(u,o,d),h=t.cmov(h,p,d);const g=t.isOdd(n)===t.isOdd(h);return h=t.cmov(t.neg(h),h,g),u=t.div(u,a),{x:u,y:h}}}function HG(t){if(t instanceof Uint8Array)return t;if(typeof t=="string")return Py(t);throw new Error("DST must be Uint8Array or string")}const ZG=qn;function Nc(t,e){if(t<0||t>=1<<8*e)throw new Error(`bad I2OSP call: value=${t} length=${e}`);const r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=t&255,t>>>=8;return new Uint8Array(r)}function JG(t,e){const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}function o0(t){if(!(t instanceof Uint8Array))throw new Error("Uint8Array expected")}function A4(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function QG(t,e,r,n){o0(t),o0(e),A4(r),e.length>255&&(e=n(Si(Py("H2C-OVERSIZE-DST-"),e)));const{outputLen:i,blockLen:s}=n,o=Math.ceil(r/i);if(o>255)throw new Error("Invalid xmd length");const a=Si(e,Nc(e.length,1)),c=Nc(0,s),l=Nc(r,2),u=new Array(o),h=n(Si(c,t,l,Nc(0,1),a));u[0]=n(Si(h,Nc(1,1),a));for(let d=1;d<=o;d++){const p=[JG(h,u[d-1]),Nc(d+1,1),a];u[d]=n(Si(...p))}return Si(...u).slice(0,r)}function YG(t,e,r,n,i){if(o0(t),o0(e),A4(r),e.length>255){const s=Math.ceil(2*n/8);e=i.create({dkLen:s}).update(Py("H2C-OVERSIZE-DST-")).update(e).digest()}if(r>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(t).update(Nc(r,2)).update(e).update(Nc(e.length,1)).digest()}function c7(t,e,r){mh(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:n,k:i,m:s,hash:o,expand:a,DST:c}=r;o0(t),A4(e);const l=HG(c),u=n.toString(2).length,h=Math.ceil((u+i)/8),d=e*s*h;let p;if(a==="xmd")p=QG(t,l,d,o);else if(a==="xof")p=YG(t,l,d,i,o);else if(a==="_internal_pass")p=t;else throw new Error('expand must be "xmd" or "xof"');const g=new Array(e);for(let m=0;m<e;m++){const y=new Array(s);for(let v=0;v<s;v++){const A=h*(v+m*s),E=p.subarray(A,A+h);y[v]=fn(ZG(E),n)}g[m]=y}return g}function KG(t,e){const r=e.map(n=>Array.from(n).reverse());return(n,i)=>{const[s,o,a,c]=r.map(l=>l.reduce((u,h)=>t.add(t.mul(u,n),h)));return n=t.div(s,o),i=t.mul(i,t.div(a,c)),{x:n,y:i}}}function qG(t,e,r){if(typeof e!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const s=c7(n,2,{...r,DST:r.DST,...i}),o=t.fromAffine(e(s[0])),a=t.fromAffine(e(s[1])),c=o.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,i){const s=c7(n,1,{...r,DST:r.encodeDST,...i}),o=t.fromAffine(e(s[0])).clearCofactor();return o.assertValidity(),o}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function XG(t){return{hash:t,hmac:(e,...r)=>n0(t,e,sj(...r)),randomBytes:H_}}function ez(t,e){const r=n=>GG({...t,...XG(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const xy=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Iy=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),l7=BigInt(1),Oy=BigInt(2),u7=(t,e)=>(t+e/Oy)/e;function d7(t){const e=xy,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,h=Yi(u,r,e)*u%e,d=Yi(h,r,e)*u%e,p=Yi(d,Oy,e)*l%e,g=Yi(p,i,e)*p%e,m=Yi(g,s,e)*g%e,y=Yi(m,a,e)*m%e,v=Yi(y,c,e)*y%e,A=Yi(v,a,e)*m%e,E=Yi(A,r,e)*u%e,w=Yi(E,o,e)*g%e,C=Yi(w,n,e)*l%e,O=Yi(C,Oy,e);if(!xc.eql(xc.sqr(O),t))throw new Error("Cannot find square root");return O}const xc=BG(xy,void 0,void 0,{sqrt:d7}),Ki=ez({a:BigInt(0),b:BigInt(7),Fp:xc,n:Iy,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=Iy,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-l7*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,o=BigInt("0x100000000000000000000000000000000"),a=u7(s*t,e),c=u7(-n*t,e);let l=fn(t-a*r-c*i,e),u=fn(-a*n-c*s,e);const h=l>o,d=u>o;if(h&&(l=e-l),d&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:h,k1:l,k2neg:d,k2:u}}}},Ao),By=BigInt(0),h7=t=>typeof t=="bigint"&&By<t&&t<xy,tz=t=>typeof t=="bigint"&&By<t&&t<Iy,f7={};function My(t,...e){let r=f7[t];if(r===void 0){const n=Ao(Uint8Array.from(t,i=>i.charCodeAt(0)));r=Si(n,n),f7[t]=r}return Ao(Si(r,...e))}const _4=t=>t.toRawBytes(!0).slice(1),T4=t=>Rc(t,32),C4=t=>fn(t,xy),a0=t=>fn(t,Iy),S4=Ki.ProjectivePoint,rz=(t,e,r)=>S4.BASE.multiplyAndAddUnsafe(t,e,r);function R4(t){let e=Ki.utils.normPrivateKeyToScalar(t),r=S4.fromPrivateKey(e);return{scalar:r.hasEvenY()?e:a0(-e),bytes:_4(r)}}function p7(t){if(!h7(t))throw new Error("bad x: need 0 < x < p");const e=C4(t*t),r=C4(e*t+BigInt(7));let n=d7(r);n%Oy!==By&&(n=C4(-n));const i=new S4(t,n,l7);return i.assertValidity(),i}function g7(...t){return a0(qn(My("BIP0340/challenge",...t)))}function nz(t){return R4(t).bytes}function iz(t,e,r=H_(32)){const n=Fn("message",t),{bytes:i,scalar:s}=R4(e),o=Fn("auxRand",r,32),a=T4(s^qn(My("BIP0340/aux",o))),c=My("BIP0340/nonce",a,i,n),l=a0(qn(c));if(l===By)throw new Error("sign failed: k is zero");const{bytes:u,scalar:h}=R4(l),d=g7(u,i,n),p=new Uint8Array(64);if(p.set(u,0),p.set(T4(a0(h+d*s)),32),!m7(p,n,i))throw new Error("sign: Invalid signature produced");return p}function m7(t,e,r){const n=Fn("signature",t,64),i=Fn("message",e),s=Fn("publicKey",r,32);try{const o=p7(qn(s)),a=qn(n.subarray(0,32));if(!h7(a))return!1;const c=qn(n.subarray(32,64));if(!tz(c))return!1;const l=g7(T4(a),_4(o),i),u=rz(o,c,a0(-l));return!(!u||!u.hasEvenY()||u.toAffine().x!==a)}catch{return!1}}const sz={getPublicKey:nz,sign:iz,verify:m7,utils:{randomPrivateKey:Ki.utils.randomPrivateKey,lift_x:p7,pointToBytes:_4,numberToBytesBE:Rc,bytesToNumberBE:qn,taggedHash:My,mod:fn}},oz=KG(xc,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(e=>BigInt(e)))),az=$G(xc,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:xc.create(BigInt("-11"))}),y7=qG(Ki.ProjectivePoint,t=>{const{x:e,y:r}=az(xc.create(t[0]));return oz(e,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:xc.ORDER,m:1,k:128,expand:"xmd",hash:Ao}),cz=y7.hashToCurve,lz=y7.encodeToCurve,uz=Object.freeze(Object.defineProperty({__proto__:null,encodeToCurve:lz,hashToCurve:cz,schnorr:sz,secp256k1:Ki},Symbol.toStringTag,{value:"Module"})),tu="0x0000000000000000000000000000000000000000",Uy="0x0000000000000000000000000000000000000000000000000000000000000000",v7=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),b7=BigInt("1000000000000000000"),w7=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),k7=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),E7=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),A7="Ξ",P4=`Ethereum Signed Message:
5
5
  `,_7=BigInt(0),T7=BigInt(1),C7=BigInt(2),S7=BigInt(27),R7=BigInt(28),Ly=BigInt(35),yh={};function P7(t){return Hi(on(t),32)}var c0,l0,u0,vh;const dz=class qo{constructor(e,r,n,i){ne(this,c0),ne(this,l0),ne(this,u0),ne(this,vh),vo(e,yh,"Signature"),V(this,c0,r),V(this,l0,n),V(this,u0,i),V(this,vh,null)}get r(){return T(this,c0)}set r(e){pe(oa(e)===32,"invalid r","value",e),V(this,c0,Ze(e))}get s(){return T(this,l0)}set s(e){pe(oa(e)===32,"invalid s","value",e);const r=Ze(e);pe(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),V(this,l0,r)}get v(){return T(this,u0)}set v(e){const r=mt(e,"value");pe(r===27||r===28,"invalid v","v",e),V(this,u0,r)}get networkV(){return T(this,vh)}get legacyChainId(){const e=this.networkV;return e==null?null:qo.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=qe(this.s);return this.yParity&&(e[0]|=128),Ze(e)}get compactSerialized(){return Zt([this.r,this.yParityAndS])}get serialized(){return Zt([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new qo(yh,this.r,this.s,this.v);return this.networkV&&V(e,vh,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const r=ct(e,"v");return r==S7||r==R7?_7:(pe(r>=Ly,"invalid EIP-155 v","v",e),(r-Ly)/C7)}static getChainIdV(e,r){return ct(e)*C7+BigInt(35+r-27)}static getNormalizedV(e){const r=ct(e);return r===_7||r===S7?27:r===T7||r===R7?28:(pe(r>=Ly,"invalid v","v",e),r&T7?27:28)}static from(e){function r(l,u){pe(l,u,"signature",e)}if(e==null)return new qo(yh,Uy,Uy,27);if(typeof e=="string"){const l=qe(e,"signature");if(l.length===64){const u=Ze(l.slice(0,32)),h=l.slice(32,64),d=h[0]&128?28:27;return h[0]&=127,new qo(yh,u,Ze(h),d)}if(l.length===65){const u=Ze(l.slice(0,32)),h=l.slice(32,64);r((h[0]&128)===0,"non-canonical s");const d=qo.getNormalizedV(l[64]);return new qo(yh,u,Ze(h),d)}r(!1,"invalid raw signature length")}if(e instanceof qo)return e.clone();const n=e.r;r(n!=null,"missing r");const i=P7(n),s=function(l,u){if(l!=null)return P7(l);if(u!=null){r(ur(u,32),"invalid yParityAndS");const h=qe(u);return h[0]&=127,Ze(h)}r(!1,"missing s")}(e.s,e.yParityAndS);r((qe(s)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(l,u,h){if(l!=null){const d=ct(l);return{networkV:d>=Ly?d:void 0,v:qo.getNormalizedV(d)}}if(u!=null)return r(ur(u,32),"invalid yParityAndS"),{v:qe(u)[0]&128?28:27};if(h!=null){switch(mt(h,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new qo(yh,i,s,a);return o&&V(c,vh,o),r(e.yParity==null||mt(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};c0=new WeakMap,l0=new WeakMap,u0=new WeakMap,vh=new WeakMap;let Ps=dz;var Ic;const hz=class kp{constructor(e){ne(this,Ic),pe(oa(e)===32,"invalid private key","privateKey","[REDACTED]"),V(this,Ic,Ze(e))}get privateKey(){return T(this,Ic)}get publicKey(){return kp.computePublicKey(T(this,Ic))}get compressedPublicKey(){return kp.computePublicKey(T(this,Ic),!0)}sign(e){pe(oa(e)===32,"invalid digest length","digest",e);const r=Ki.sign(sn(e),sn(T(this,Ic)),{lowS:!0});return Ps.from({r:Zi(r.r,32),s:Zi(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=kp.computePublicKey(e);return Ze(Ki.getSharedSecret(sn(T(this,Ic)),qe(r),!1))}static computePublicKey(e,r){let n=qe(e,"key");if(n.length===32){const s=Ki.getPublicKey(n,!!r);return Ze(s)}if(n.length===64){const s=new Uint8Array(65);s[0]=4,s.set(n,1),n=s}const i=Ki.ProjectivePoint.fromHex(n);return Ze(i.toRawBytes(r))}static recoverPublicKey(e,r){pe(oa(e)===32,"invalid digest length","digest",e);const n=Ps.from(r);let i=Ki.Signature.fromCompact(sn(Zt([n.r,n.s])));i=i.addRecoveryBit(n.yParity);const s=i.recoverPublicKey(sn(e));return pe(s!=null,"invalid signautre for digest","signature",r),"0x"+s.toHex(!1)}static addPoints(e,r,n){const i=Ki.ProjectivePoint.fromHex(kp.computePublicKey(e).substring(2)),s=Ki.ProjectivePoint.fromHex(kp.computePublicKey(r).substring(2));return"0x"+i.add(s).toHex(!!n)}};Ic=new WeakMap;let _o=hz;function N7(){pa.lock(),hr.lock(),Ss.lock(),Ci.lock(),ga.lock(),ma.lock(),ya.lock(),Ln.lock(),fh.lock(),Ci.lock()}const fz=BigInt(0),pz=BigInt(36);function x7(t){t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=qe(hr(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const N4={};for(let t=0;t<10;t++)N4[String(t)]=String(t);for(let t=0;t<26;t++)N4[String.fromCharCode(65+t)]=String(10+t);const I7=15;function O7(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>N4[n]).join("");for(;e.length>=I7;){let n=e.substring(0,I7);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}const gz=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function mz(t){t=t.toLowerCase();let e=fz;for(let r=0;r<t.length;r++)e=e*pz+gz[t[r]];return e}function Mt(t){if(pe(typeof t=="string","invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);const e=x7(t);return pe(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,"bad address checksum","address",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){pe(t.substring(2,4)===O7(t),"bad icap checksum","address",t);let e=mz(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return x7("0x"+e)}pe(!1,"invalid address","address",t)}function B7(t){let e=BigInt(Mt(t)).toString(36).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+O7("XE00"+e)+e}function Fy(t){const e=Mt(t.from);let r=ct(t.nonce,"tx.nonce").toString(16);return r==="0"?r="0x":r.length%2?r="0x0"+r:r="0x"+r,Mt(dr(hr(ha([e,r])),12))}function M7(t,e,r){const n=Mt(t),i=qe(e,"salt"),s=qe(r,"initCodeHash");return pe(i.length===32,"salt must be 32 bytes","salt",e),pe(s.length===32,"initCodeHash must be 32 bytes","initCodeHash",r),Mt(dr(hr(Zt(["0xff",n,i,s])),12))}function Vy(t){return t&&typeof t.getAddress=="function"}function U7(t){try{return Mt(t),!0}catch{}return!1}async function x4(t,e){const r=await e;return(r==null||r==="0x0000000000000000000000000000000000000000")&&(Be(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),pe(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),Mt(r)}function an(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?Mt(t):(Be(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),x4(t,e.resolveName(t)));if(Vy(t))return x4(t,t.getAddress());if(t&&typeof t.then=="function")return x4(t,t);pe(!1,"unsupported addressable value","target",t)}const va={};function st(t,e){let r=!1;return e<0&&(r=!0,e*=-1),new Vn(va,`${r?"":"u"}int${e}`,t,{signed:r,width:e})}function nr(t,e){return new Vn(va,`bytes${e||""}`,t,{size:e})}const L7=Symbol.for("_ethers_typed");var bh;const yz=class Cl{constructor(e,r,n,i){X(this,"type"),X(this,"value"),ne(this,bh),X(this,"_typedSymbol"),i==null&&(i=null),vo(va,e,"Typed"),rt(this,{_typedSymbol:L7,type:r,value:n}),V(this,bh,i),this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(e=>e.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return T(this,bh)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return T(this,bh)===!0?-1:T(this,bh)===!1?this.value.length:null}static from(e,r){return new Cl(va,e,r)}static uint8(e){return st(e,8)}static uint16(e){return st(e,16)}static uint24(e){return st(e,24)}static uint32(e){return st(e,32)}static uint40(e){return st(e,40)}static uint48(e){return st(e,48)}static uint56(e){return st(e,56)}static uint64(e){return st(e,64)}static uint72(e){return st(e,72)}static uint80(e){return st(e,80)}static uint88(e){return st(e,88)}static uint96(e){return st(e,96)}static uint104(e){return st(e,104)}static uint112(e){return st(e,112)}static uint120(e){return st(e,120)}static uint128(e){return st(e,128)}static uint136(e){return st(e,136)}static uint144(e){return st(e,144)}static uint152(e){return st(e,152)}static uint160(e){return st(e,160)}static uint168(e){return st(e,168)}static uint176(e){return st(e,176)}static uint184(e){return st(e,184)}static uint192(e){return st(e,192)}static uint200(e){return st(e,200)}static uint208(e){return st(e,208)}static uint216(e){return st(e,216)}static uint224(e){return st(e,224)}static uint232(e){return st(e,232)}static uint240(e){return st(e,240)}static uint248(e){return st(e,248)}static uint256(e){return st(e,256)}static uint(e){return st(e,256)}static int8(e){return st(e,-8)}static int16(e){return st(e,-16)}static int24(e){return st(e,-24)}static int32(e){return st(e,-32)}static int40(e){return st(e,-40)}static int48(e){return st(e,-48)}static int56(e){return st(e,-56)}static int64(e){return st(e,-64)}static int72(e){return st(e,-72)}static int80(e){return st(e,-80)}static int88(e){return st(e,-88)}static int96(e){return st(e,-96)}static int104(e){return st(e,-104)}static int112(e){return st(e,-112)}static int120(e){return st(e,-120)}static int128(e){return st(e,-128)}static int136(e){return st(e,-136)}static int144(e){return st(e,-144)}static int152(e){return st(e,-152)}static int160(e){return st(e,-160)}static int168(e){return st(e,-168)}static int176(e){return st(e,-176)}static int184(e){return st(e,-184)}static int192(e){return st(e,-192)}static int200(e){return st(e,-200)}static int208(e){return st(e,-208)}static int216(e){return st(e,-216)}static int224(e){return st(e,-224)}static int232(e){return st(e,-232)}static int240(e){return st(e,-240)}static int248(e){return st(e,-248)}static int256(e){return st(e,-256)}static int(e){return st(e,-256)}static bytes1(e){return nr(e,1)}static bytes2(e){return nr(e,2)}static bytes3(e){return nr(e,3)}static bytes4(e){return nr(e,4)}static bytes5(e){return nr(e,5)}static bytes6(e){return nr(e,6)}static bytes7(e){return nr(e,7)}static bytes8(e){return nr(e,8)}static bytes9(e){return nr(e,9)}static bytes10(e){return nr(e,10)}static bytes11(e){return nr(e,11)}static bytes12(e){return nr(e,12)}static bytes13(e){return nr(e,13)}static bytes14(e){return nr(e,14)}static bytes15(e){return nr(e,15)}static bytes16(e){return nr(e,16)}static bytes17(e){return nr(e,17)}static bytes18(e){return nr(e,18)}static bytes19(e){return nr(e,19)}static bytes20(e){return nr(e,20)}static bytes21(e){return nr(e,21)}static bytes22(e){return nr(e,22)}static bytes23(e){return nr(e,23)}static bytes24(e){return nr(e,24)}static bytes25(e){return nr(e,25)}static bytes26(e){return nr(e,26)}static bytes27(e){return nr(e,27)}static bytes28(e){return nr(e,28)}static bytes29(e){return nr(e,29)}static bytes30(e){return nr(e,30)}static bytes31(e){return nr(e,31)}static bytes32(e){return nr(e,32)}static address(e){return new Cl(va,"address",e)}static bool(e){return new Cl(va,"bool",!!e)}static bytes(e){return new Cl(va,"bytes",e)}static string(e){return new Cl(va,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new Cl(va,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===L7}static dereference(e,r){if(Cl.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};bh=new WeakMap;let Vn=yz;class vz extends fa{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=Vn.dereference(r,"string");try{n=Mt(n)}catch(i){return this._throwError(i.message,r)}return e.writeValue(n)}decode(e){return Mt(Zi(e.readValue(),20))}}class bz extends fa{constructor(e){super(e.name,e.type,"_",e.dynamic),X(this,"coder"),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}function F7(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const u=l.localName;return Be(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),Be(!c[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),c[u]=!0,r[u]})}else pe(!1,"invalid tuple value","tuple",r);pe(e.length===n.length,"types/value length mismatch","tuple",r);let i=new n4,s=new n4,o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let h=s.length;c.encode(s,u);let d=i.writeUpdatableValue();o.push(p=>{d(p+h)})}else c.encode(i,u)}),o.forEach(c=>{c(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function V7(t,e){let r=[],n=[],i=t.subReader(0);return e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readIndex(),c=i.subReader(a);try{o=s.decode(c)}catch(l){if(Gr(l,"BUFFER_OVERRUN"))throw l;o=l,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(Gr(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}if(o==null)throw new Error("investigate");r.push(o),n.push(s.localName||null)}),lh.fromItems(r,n)}class wz extends fa{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),X(this,"coder"),X(this,"length"),rt(this,{coder:e,length:r})}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;n<this.length;n++)r.push(e);return r}encode(e,r){const n=Vn.dereference(r,"array");Array.isArray(n)||this._throwError("expected array value",n);let i=this.length;i===-1&&(i=n.length,e.writeValue(n.length)),oy(n.length,i,"coder array"+(this.localName?" "+this.localName:""));let s=[];for(let o=0;o<n.length;o++)s.push(this.coder);return F7(e,s,n)}decode(e){let r=this.length;r===-1&&(r=e.readIndex(),Be(r*Kn<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:r*Kn,length:e.dataLength}));let n=[];for(let i=0;i<r;i++)n.push(new bz(this.coder));return V7(e,n)}}class kz extends fa{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,r){const n=Vn.dereference(r,"bool");return e.writeValue(n?1:0)}decode(e){return!!e.readValue()}}class D7 extends fa{constructor(e,r){super(e,e,r,!0)}defaultValue(){return"0x"}encode(e,r){r=sn(r);let n=e.writeValue(r.length);return n+=e.writeBytes(r),n}decode(e){return e.readBytes(e.readIndex(),!0)}}class Ez extends D7{constructor(e){super("bytes",e)}decode(e){return Ze(super.decode(e))}}class Az extends fa{constructor(e,r){let n="bytes"+String(e);super(n,n,r,!1),X(this,"size"),rt(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,r){let n=sn(Vn.dereference(r,this.type));return n.length!==this.size&&this._throwError("incorrect data length",r),e.writeBytes(n)}decode(e){return Ze(e.readBytes(this.size))}}const _z=new Uint8Array([]);class Tz extends fa{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes(_z)}decode(e){return e.readBytes(0),null}}const Cz=BigInt(0),Sz=BigInt(1),Rz=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class Pz extends fa{constructor(e,r,n){const i=(r?"int":"uint")+e*8;super(i,i,n,!1),X(this,"size"),X(this,"signed"),rt(this,{size:e,signed:r},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,r){let n=ct(Vn.dereference(r,this.type)),i=aa(Rz,Kn*8);if(this.signed){let s=aa(i,this.size*8-1);(n>s||n<-(s+Sz))&&this._throwError("value out-of-bounds",r),n=jp(n,8*Kn)}else(n<Cz||n>aa(i,this.size*8))&&this._throwError("value out-of-bounds",r);return e.writeValue(n)}decode(e){let r=aa(e.readValue(),this.size*8);return this.signed&&(r=Kd(r,this.size*8)),r}}class Nz extends D7{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,qr(Vn.dereference(r,"string")))}decode(e){return la(super.decode(e))}}class Dy extends fa{constructor(e,r){let n=!1;const i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});const s="tuple("+i.join(",")+")";super("tuple",s,r,n),X(this,"coders"),rt(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){const n=Vn.dereference(r,"tuple");return F7(e,this.coders,n)}decode(e){return V7(e,this.coders)}}function Ns(t){return hr(qr(t))}var xz="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const W7=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),j7=4;function Iz(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,s=[0,1];for(let C=1;C<n;C++)s.push(i+=r());let o=r(),a=e;e+=o;let c=0,l=0;function u(){return c==0&&(l=l<<8|t[e++],c=8),l>>--c&1}const h=31,d=2**h,p=d>>>1,g=p>>1,m=d-1;let y=0;for(let C=0;C<h;C++)y=y<<1|u();let v=[],A=0,E=d;for(;;){let C=Math.floor(((y-A+1)*i-1)/E),O=0,U=n;for(;U-O>1;){let W=O+U>>>1;C<s[W]?U=W:O=W}if(O==0)break;v.push(O);let I=A+Math.floor(E*s[O]/i),B=A+Math.floor(E*s[O+1]/i)-1;for(;!((I^B)&p);)y=y<<1&m|u(),I=I<<1&m,B=B<<1&m|1;for(;I&~B&g;)y=y&p|y<<1&m>>>1|u(),I=I<<1^p,B=(B^p)<<1|p|1;A=I,E=1+B-I}let w=n-4;return v.map(C=>{switch(C-w){case 3:return w+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return w+256+(t[a++]<<8|t[a++]);case 1:return w+t[a++];default:return C-1}})}function Oz(t){let e=0;return()=>t[e++]}function G7(t){return Oz(Iz(Bz(t)))}function Bz(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>e[i.charCodeAt(0)]=s);let r=t.length,n=new Uint8Array(6*r>>3);for(let i=0,s=0,o=0,a=0;i<r;i++)a=a<<6|e[t.charCodeAt(i)],o+=6,o>=8&&(n[s++]=a>>(o-=8));return n}function Mz(t){return t&1?~t>>1:t>>1}function Uz(t,e){let r=Array(t);for(let n=0,i=0;n<t;n++)r[n]=i+=Mz(e());return r}function d0(t,e=0){let r=[];for(;;){let n=t(),i=t();if(!i)break;e+=n;for(let s=0;s<i;s++)r.push(e+s);e+=i+1}return r}function z7(t){return h0(()=>{let e=d0(t);if(e.length)return e})}function $7(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(Lz(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Fz(r,t))}return e.flat()}function h0(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function H7(t,e,r){let n=Array(t).fill().map(()=>[]);for(let i=0;i<e;i++)Uz(t,r).forEach((s,o)=>n[o].push(s));return n}function Lz(t,e){let r=1+e(),n=e(),i=h0(e);return H7(i.length,1+t,e).flatMap((s,o)=>{let[a,...c]=s;return Array(i[o]).fill().map((l,u)=>{let h=u*n;return[a+u*r,c.map(d=>d+h)]})})}function Fz(t,e){let r=1+e();return H7(r,1+t,e).map(n=>[n[0],n.slice(1)])}function Vz(t){let e=[],r=d0(t);return i(n([]),[]),e;function n(s){let o=t(),a=h0(()=>{let c=d0(t).map(l=>r[l]);if(c.length)return n(c)});return{S:o,B:a,Q:s}}function i({S:s,B:o},a,c){if(!(s&4&&c===a[a.length-1])){s&2&&(c=a[a.length-1]),s&1&&e.push(a);for(let l of o)for(let u of l.Q)i(l,[...a,u],c)}}}function Dz(t){return t.toString(16).toUpperCase().padStart(2,"0")}function Z7(t){return`{${Dz(t)}}`}function I4(t){let e=[];for(let r=0,n=t.length;r<n;){let i=t.codePointAt(r);r+=i<65536?1:2,e.push(i)}return e}function Oc(t){let e=t.length;if(e<4096)return String.fromCodePoint(...t);let r=[];for(let n=0;n<e;)r.push(String.fromCodePoint(...t.slice(n,n+=4096)));return r.join("")}function J7(t,e){let r=t.length,n=r-e.length;for(let i=0;n==0&&i<r;i++)n=t[i]-e[i];return n}var Wz="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g";const f0=44032,Wy=4352,jy=4449,Gy=4519,Q7=19,Y7=21,wh=28,zy=Y7*wh,jz=Q7*zy,Gz=f0+jz,zz=Wy+Q7,$z=jy+Y7,Hz=Gy+wh;function p0(t){return t>>24&255}function K7(t){return t&16777215}let O4,q7,B4,$y;function Zz(){let t=G7(Wz);O4=new Map(z7(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),q7=new Set(d0(t)),B4=new Map,$y=new Map;for(let[e,r]of $7(t)){if(!q7.has(e)&&r.length==2){let[n,i]=r,s=$y.get(n);s||(s=new Map,$y.set(n,s)),s.set(i,e)}B4.set(e,r.reverse())}}function X7(t){return t>=f0&&t<Gz}function Jz(t,e){if(t>=Wy&&t<zz&&e>=jy&&e<$z)return f0+(t-Wy)*zy+(e-jy)*wh;if(X7(t)&&e>Gy&&e<Hz&&(t-f0)%wh==0)return t+(e-Gy);{let r=$y.get(t);return r&&(r=r.get(e),r)?r:-1}}function eC(t){O4||Zz();let e=[],r=[],n=!1;function i(s){let o=O4.get(s);o&&(n=!0,s|=o),e.push(s)}for(let s of t)for(;;){if(s<128)e.push(s);else if(X7(s)){let o=s-f0,a=o/zy|0,c=o%zy/wh|0,l=o%wh;i(Wy+a),i(jy+c),l>0&&i(Gy+l)}else{let o=B4.get(s);o?r.push(...o):i(s)}if(!r.length)break;s=r.pop()}if(n&&e.length>1){let s=p0(e[0]);for(let o=1;o<e.length;o++){let a=p0(e[o]);if(a==0||s<=a){s=a;continue}let c=o-1;for(;;){let l=e[c+1];if(e[c+1]=e[c],e[c]=l,!c||(s=p0(e[--c]),s<=a))break}s=p0(e[o])}}return e}function Qz(t){let e=[],r=[],n=-1,i=0;for(let s of t){let o=p0(s),a=K7(s);if(n==-1)o==0?n=a:e.push(a);else if(i>0&&i>=o)o==0?(e.push(n,...r),r.length=0,n=a):r.push(a),i=o;else{let c=Jz(n,a);c>=0?n=c:i==0&&o==0?(e.push(n),n=a):(r.push(a),i=o)}}return n>=0&&e.push(n,...r),e}function Hy(t){return eC(t).map(K7)}function kh(t){return Qz(eC(t))}const tC=45,Yz=46,Zy=".",rC=65039,nC=1,Jy=t=>Array.from(t);function g0(t,e){return t.P.has(e)||t.Q.has(e)}class Kz extends Array{get is_emoji(){return!0}}let Qy,M4,ru,U4,iC,sC,Eh,L4,Ah,Bc,F4,V4;function _h(){if(Qy)return;let t=G7(xz);const e=()=>d0(t),r=()=>new Set(e()),n=(u,h)=>h.forEach(d=>u.add(d));Qy=new Map($7(t)),M4=r(),ru=e(),U4=new Set(e().map(u=>ru[u])),ru=new Set(ru),iC=r(),sC=r();let i=z7(t),s=t();const o=()=>{let u=new Set;return e().forEach(h=>n(u,i[h])),n(u,e()),u};Eh=h0(u=>{let h=h0(t).map(d=>d+96);if(h.length){let d=u>=s;h[0]-=32,h=Oc(h),d&&(h=`Restricted[${h}]`);let p=o(),g=o(),m=!t();return{N:h,P:p,Q:g,M:m,R:d}}}),L4=r(),Ah=new Map;let a=e().concat(Jy(L4)).sort((u,h)=>u-h);a.forEach((u,h)=>{let d=t(),p=a[h]=d?a[h-d]:{V:[],M:new Map};p.V.push(u),L4.has(u)||Ah.set(u,p)});for(let{V:u,M:h}of new Set(Ah.values())){let d=[];for(let g of u){let m=Eh.filter(v=>g0(v,g)),y=d.find(({G:v})=>m.some(A=>v.has(A)));y||(y={G:new Set,V:[]},d.push(y)),y.V.push(g),n(y.G,m)}let p=d.flatMap(g=>Jy(g.G));for(let{G:g,V:m}of d){let y=new Set(p.filter(v=>!g.has(v)));for(let v of m)h.set(v,y)}}Bc=new Set;let c=new Set;const l=u=>Bc.has(u)?c.add(u):Bc.add(u);for(let u of Eh){for(let h of u.P)l(h);for(let h of u.Q)l(h)}for(let u of Bc)!Ah.has(u)&&!c.has(u)&&Ah.set(u,nC);n(Bc,Hy(Bc)),F4=Vz(t).map(u=>Kz.from(u)).sort(J7),V4=new Map;for(let u of F4){let h=[V4];for(let d of u){let p=h.map(g=>{let m=g.get(d);return m||(m=new Map,g.set(d,m)),m});d===rC?h.push(...p):h=p}for(let d of h)d.V=u}}function D4(t){return(j4(t)?"":`${W4(m0([t]))} `)+Z7(t)}function W4(t){return`"${t}"‎`}function qz(t){if(t.length>=4&&t[2]==tC&&t[3]==tC)throw new Error(`invalid label extension: "${Oc(t.slice(0,4))}"`)}function Xz(t){for(let e=t.lastIndexOf(95);e>0;)if(t[--e]!==95)throw new Error("underscore allowed only at start")}function e$(t){let e=t[0],r=W7.get(e);if(r)throw y0(`leading ${r}`);let n=t.length,i=-1;for(let s=1;s<n;s++){e=t[s];let o=W7.get(e);if(o){if(i==s)throw y0(`${r} + ${o}`);i=s+1,r=o}}if(i==n)throw y0(`trailing ${r}`)}function m0(t,e=1/0,r=Z7){let n=[];oC(t[0])&&n.push("◌"),t.length>e&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let i=0,s=t.length;for(let o=0;o<s;o++){let a=t[o];j4(a)&&(n.push(Oc(t.slice(i,o))),n.push(r(a)),i=o+1)}return n.push(Oc(t.slice(i,s))),n.join("")}function oC(t){return _h(),ru.has(t)}function j4(t){return _h(),iC.has(t)}function t$(){return _h(),F4.map(t=>t.slice())}function r$(t,e){_h();let r=e?Hy:kh;return t.split(Zy).map(n=>Oc(dC(I4(n),r,Yy).flat())).join(Zy)}function aC(t){return cC(G4(t,kh,Yy))}function n$(t){let e=G4(t,kh,r=>r);for(let{type:r,output:n,error:i}of e){if(i)break;r!=="Greek"&&i$(n,958,926)}return cC(e)}function i$(t,e,r){let n=0;for(;;){let i=t.indexOf(e,n);if(i<0)break;t[i]=r,n=i+1}}function s$(t,e){return G4(t,kh,e?r=>r.slice():Yy)}function G4(t,e,r){if(!t)return[];_h();let n=0;return t.split(Zy).map(i=>{let s=I4(i),o={input:s,offset:n};n+=s.length+1;try{let a=o.tokens=dC(s,e,r),c=a.length,l;if(!c)throw new Error("empty label");let u=o.output=a.flat();if(Xz(u),!(o.emoji=c>1||a[0].is_emoji)&&u.every(h=>h<128))qz(u),l="ASCII";else{let h=a.flatMap(d=>d.is_emoji?[]:d);if(!h.length)l="Emoji";else{if(ru.has(u[0]))throw y0("leading combining mark");for(let g=1;g<c;g++){let m=a[g];if(!m.is_emoji&&ru.has(m[0]))throw y0(`emoji + combining mark: "${Oc(a[g-1])} + ${m0([m[0]])}"`)}e$(u);let d=Jy(new Set(h)),[p]=a$(d);c$(p,h),o$(p,d),l=p.N}}o.type=l}catch(a){o.error=a}return o})}function o$(t,e){let r,n=[];for(let i of e){let s=Ah.get(i);if(s===nC)return;if(s){let o=s.M.get(i);if(r=r?r.filter(a=>o.has(a)):Jy(o),!r.length)return}else n.push(i)}if(r){for(let i of r)if(n.every(s=>g0(i,s)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function a$(t){let e=Eh;for(let r of t){let n=e.filter(i=>g0(i,r));if(!n.length)throw Eh.some(i=>g0(i,r))?uC(e[0],r):lC(r);if(e=n,n.length==1)break}return e}function cC(t){return t.map(({input:e,error:r,output:n})=>{if(r){let i=r.message;throw new Error(t.length==1?i:`Invalid label ${W4(m0(e,63))}: ${i}`)}return Oc(n)}).join(Zy)}function lC(t){return new Error(`disallowed character: ${D4(t)}`)}function uC(t,e){let r=D4(e),n=Eh.find(i=>i.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function y0(t){return new Error(`illegal placement: ${t}`)}function c$(t,e){for(let r of e)if(!g0(t,r))throw uC(t,r);if(t.M){let r=Hy(e);for(let n=1,i=r.length;n<i;n++)if(U4.has(r[n])){let s=n+1;for(let o;s<i&&U4.has(o=r[s]);s++)for(let a=n;a<s;a++)if(r[a]==o)throw new Error(`duplicate non-spacing marks: ${D4(o)}`);if(s-n>j7)throw new Error(`excessive non-spacing marks: ${W4(m0(r.slice(n-1,s)))} (${s-n}/${j7})`);n=s}}}function dC(t,e,r){let n=[],i=[];for(t=t.slice().reverse();t.length;){let s=hC(t);if(s)i.length&&(n.push(e(i)),i=[]),n.push(r(s));else{let o=t.pop();if(Bc.has(o))i.push(o);else{let a=Qy.get(o);if(a)i.push(...a);else if(!M4.has(o))throw lC(o)}}}return i.length&&n.push(e(i)),n}function Yy(t){return t.filter(e=>e!=rC)}function hC(t,e){let r=V4,n,i=t.length;for(;i&&(r=r.get(t[--i]),!!r);){let{V:s}=r;s&&(n=s,e&&e.push(...t.slice(i).reverse()),t.length=i)}return n}const v0="valid",fC="mapped",z4="ignored",l$="disallowed",u$="emoji",d$="nfc",h$="stop";function pC(t,{nf:e=!0}={}){_h();let r=I4(t).reverse(),n=[],i=[];for(;r.length;){let s=hC(r,n);if(s)i.push({type:u$,emoji:s.slice(),input:n,cps:Yy(s)}),n=[];else{let o=r.pop();if(o==Yz)i.push({type:h$,cp:o});else if(Bc.has(o))i.push({type:v0,cps:[o]});else if(M4.has(o))i.push({type:z4,cp:o});else{let a=Qy.get(o);a?i.push({type:fC,cp:o,cps:a.slice()}):i.push({type:l$,cp:o})}}}if(e)for(let s=0,o=-1;s<i.length;s++){let a=i[s];if($4(a.type))if(gC(a.cps)){let c=s+1;for(let d=c;d<i.length;d++){let{type:p,cps:g}=i[d];if($4(p)){if(!gC(g))break;c=d+1}else if(p!==z4)break}o<0&&(o=s);let l=i.slice(o,c),u=l.flatMap(d=>$4(d.type)?d.cps:[]),h=kh(u);J7(h,u)?(i.splice(o,c-o,{type:d$,input:u,cps:h,tokens0:mC(l),tokens:pC(Oc(h),{nf:!1})}),s=o):s=c-1,o=-1}else o=s;else a.type!==z4&&(o=-1)}return mC(i)}function $4(t){return t==v0||t==fC}function gC(t){return t.some(e=>sC.has(e))}function mC(t){for(let e=0;e<t.length;e++)if(t[e].type==v0){let r=e+1;for(;r<t.length&&t[r].type==v0;)r++;t.splice(e,r-e,{type:v0,cps:t.slice(e,r).flatMap(n=>n.cps)})}return t}const f$=Object.freeze(Object.defineProperty({__proto__:null,ens_beautify:n$,ens_emoji:t$,ens_normalize:aC,ens_normalize_fragment:r$,ens_split:s$,ens_tokenize:pC,is_combining_mark:oC,nfc:kh,nfd:Hy,safe_str_from_cps:m0,should_escape:j4},Symbol.toStringTag,{value:"Module"})),yC=new Uint8Array(32);yC.fill(0);function vC(t){return pe(t.length!==0,"invalid ENS name; empty component","comp",t),t}function H4(t){const e=qr(Z4(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i<e.length;i++)e[i]===46&&(r.push(vC(e.slice(n,i))),n=i+1);return pe(n<e.length,"invalid ENS name; empty component","name",t),r.push(vC(e.slice(n))),r}function Z4(t){try{if(t.length===0)throw new Error("empty label");return aC(t)}catch(e){pe(!1,`invalid ENS name (${e.message})`,"name",t)}}function bC(t){try{return H4(t).length!==0}catch{}return!1}function b0(t){pe(typeof t=="string","invalid ENS name; not a string","name",t),pe(t.length,"invalid ENS name (empty label)","name",t);let e=yC;const r=H4(t);for(;r.length;)e=hr(Zt([e,hr(r.pop())]));return Ze(e)}function J4(t,e){const r=e??63;return pe(r<=255,"DNS encoded label cannot exceed 255","length",r),Ze(Zt(H4(t).map(n=>{pe(n.length<=r,`label ${JSON.stringify(t)} exceeds ${r} bytes`,"name",t);const i=new Uint8Array(n.length+1);return i.set(n,1),i[0]=i.length-1,i})))+"00"}function Q4(t,e){return{address:Mt(t),storageKeys:e.map((r,n)=>(pe(ur(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function To(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(pe(r.length===2,"invalid slot set",`value[${n}]`,r),Q4(r[0],r[1])):(pe(r!=null&&typeof r=="object","invalid address-slot set","value",t),Q4(r.address,r.storageKeys)));pe(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return Q4(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function nu(t){let e;return typeof t=="string"?e=_o.computePublicKey(t,!1):e=t.publicKey,Mt(hr("0x"+e.substring(4)).substring(26))}function w0(t,e){return nu(_o.recoverPublicKey(t,e))}const pn=BigInt(0),p$=BigInt(2),g$=BigInt(27),m$=BigInt(28),y$=BigInt(35),v$=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Y4=4096*32;function wC(t,e){let r=t.toString(16);for(;r.length<2;)r="0"+r;return r+=Ln(e).substring(4),"0x"+r}function Ky(t){return t==="0x"?null:Mt(t)}function K4(t,e){try{return To(t)}catch(r){pe(!1,r.message,e,t)}}function k0(t,e){return t==="0x"?0:mt(t,e)}function $r(t,e){if(t==="0x")return pn;const r=ct(t,e);return pe(r<=v$,"value exceeds uint size",e,r),r}function kr(t,e){const r=ct(t,"value"),n=on(r);return pe(n.length<=32,"value too large",`tx.${e}`,r),n}function q4(t){return To(t).map(e=>[e.address,e.storageKeys])}function b$(t,e){pe(Array.isArray(t),`invalid ${e}`,"value",t);for(let r=0;r<t.length;r++)pe(ur(t[r],32),"invalid ${ param } hash",`value[${r}]`,t[r]);return t}function w$(t){const e=ch(t);pe(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);const r={type:0,nonce:k0(e[0],"nonce"),gasPrice:$r(e[1],"gasPrice"),gasLimit:$r(e[2],"gasLimit"),to:Ky(e[3]),value:$r(e[4],"value"),data:Ze(e[5]),chainId:pn};if(e.length===6)return r;const n=$r(e[6],"v"),i=$r(e[7],"r"),s=$r(e[8],"s");if(i===pn&&s===pn)r.chainId=n;else{let o=(n-y$)/p$;o<pn&&(o=pn),r.chainId=o,pe(o!==pn||n===g$||n===m$,"non-canonical legacy v","v",e[6]),r.signature=Ps.from({r:Hi(e[7],32),s:Hi(e[8],32),v:n})}return r}function k$(t,e){const r=[kr(t.nonce,"nonce"),kr(t.gasPrice||0,"gasPrice"),kr(t.gasLimit,"gasLimit"),t.to||"0x",kr(t.value,"value"),t.data];let n=pn;if(t.chainId!=pn)n=ct(t.chainId,"tx.chainId"),pe(!e||e.networkV==null||e.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",e);else if(t.signature){const s=t.signature.legacyChainId;s!=null&&(n=s)}if(!e)return n!==pn&&(r.push(on(n)),r.push("0x"),r.push("0x")),ha(r);let i=BigInt(27+e.yParity);return n!==pn?i=Ps.getChainIdV(n,e.v):BigInt(e.v)!==i&&pe(!1,"tx.chainId/sig.v mismatch","sig",e),r.push(on(i)),r.push(on(e.r)),r.push(on(e.s)),ha(r)}function X4(t,e){let r;try{if(r=k0(e[0],"yParity"),r!==0&&r!==1)throw new Error("bad yParity")}catch{pe(!1,"invalid yParity","yParity",e[0])}const n=Hi(e[1],32),i=Hi(e[2],32),s=Ps.from({r:n,s:i,yParity:r});t.signature=s}function E$(t){const e=ch(qe(t).slice(1));pe(Array.isArray(e)&&(e.length===9||e.length===12),"invalid field count for transaction type: 2","data",Ze(t));const r={type:2,chainId:$r(e[0],"chainId"),nonce:k0(e[1],"nonce"),maxPriorityFeePerGas:$r(e[2],"maxPriorityFeePerGas"),maxFeePerGas:$r(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:$r(e[4],"gasLimit"),to:Ky(e[5]),value:$r(e[6],"value"),data:Ze(e[7]),accessList:K4(e[8],"accessList")};return e.length===9||X4(r,e.slice(9)),r}function A$(t,e){const r=[kr(t.chainId,"chainId"),kr(t.nonce,"nonce"),kr(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),kr(t.maxFeePerGas||0,"maxFeePerGas"),kr(t.gasLimit,"gasLimit"),t.to||"0x",kr(t.value,"value"),t.data,q4(t.accessList||[])];return e&&(r.push(kr(e.yParity,"yParity")),r.push(on(e.r)),r.push(on(e.s))),Zt(["0x02",ha(r)])}function _$(t){const e=ch(qe(t).slice(1));pe(Array.isArray(e)&&(e.length===8||e.length===11),"invalid field count for transaction type: 1","data",Ze(t));const r={type:1,chainId:$r(e[0],"chainId"),nonce:k0(e[1],"nonce"),gasPrice:$r(e[2],"gasPrice"),gasLimit:$r(e[3],"gasLimit"),to:Ky(e[4]),value:$r(e[5],"value"),data:Ze(e[6]),accessList:K4(e[7],"accessList")};return e.length===8||X4(r,e.slice(8)),r}function T$(t,e){const r=[kr(t.chainId,"chainId"),kr(t.nonce,"nonce"),kr(t.gasPrice||0,"gasPrice"),kr(t.gasLimit,"gasLimit"),t.to||"0x",kr(t.value,"value"),t.data,q4(t.accessList||[])];return e&&(r.push(kr(e.yParity,"recoveryParam")),r.push(on(e.r)),r.push(on(e.s))),Zt(["0x01",ha(r)])}function C$(t){let e=ch(qe(t).slice(1)),r="3",n=null;if(e.length===4&&Array.isArray(e[0])){r="3 (network format)";const s=e[1],o=e[2],a=e[3];pe(Array.isArray(s),"invalid network format: blobs not an array","fields[1]",s),pe(Array.isArray(o),"invalid network format: commitments not an array","fields[2]",o),pe(Array.isArray(a),"invalid network format: proofs not an array","fields[3]",a),pe(s.length===o.length,"invalid network format: blobs/commitments length mismatch","fields",e),pe(s.length===a.length,"invalid network format: blobs/proofs length mismatch","fields",e),n=[];for(let c=0;c<e[1].length;c++)n.push({data:s[c],commitment:o[c],proof:a[c]});e=e[0]}pe(Array.isArray(e)&&(e.length===11||e.length===14),`invalid field count for transaction type: ${r}`,"data",Ze(t));const i={type:3,chainId:$r(e[0],"chainId"),nonce:k0(e[1],"nonce"),maxPriorityFeePerGas:$r(e[2],"maxPriorityFeePerGas"),maxFeePerGas:$r(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:$r(e[4],"gasLimit"),to:Ky(e[5]),value:$r(e[6],"value"),data:Ze(e[7]),accessList:K4(e[8],"accessList"),maxFeePerBlobGas:$r(e[9],"maxFeePerBlobGas"),blobVersionedHashes:e[10]};n&&(i.blobs=n),pe(i.to!=null,`invalid address for transaction type: ${r}`,"data",t),pe(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",t);for(let s=0;s<i.blobVersionedHashes.length;s++)pe(ur(i.blobVersionedHashes[s],32),`invalid blobVersionedHash at index ${s}: must be length 32`,"data",t);return e.length===11||X4(i,e.slice(11)),i}function S$(t,e,r){const n=[kr(t.chainId,"chainId"),kr(t.nonce,"nonce"),kr(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),kr(t.maxFeePerGas||0,"maxFeePerGas"),kr(t.gasLimit,"gasLimit"),t.to||tu,kr(t.value,"value"),t.data,q4(t.accessList||[]),kr(t.maxFeePerBlobGas||0,"maxFeePerBlobGas"),b$(t.blobVersionedHashes||[],"blobVersionedHashes")];return e&&(n.push(kr(e.yParity,"yParity")),n.push(on(e.r)),n.push(on(e.s)),r)?Zt(["0x03",ha([n,r.map(i=>i.data),r.map(i=>i.commitment),r.map(i=>i.proof)])]):Zt(["0x03",ha(n)])}var ba,E0,A0,_0,T0,C0,S0,R0,P0,N0,x0,I0,Th,iu,Mc,su,O0,qy;const R$=class Sl{constructor(){ne(this,O0),ne(this,ba),ne(this,E0),ne(this,A0),ne(this,_0),ne(this,T0),ne(this,C0),ne(this,S0),ne(this,R0),ne(this,P0),ne(this,N0),ne(this,x0),ne(this,I0),ne(this,Th),ne(this,iu),ne(this,Mc),ne(this,su),V(this,ba,null),V(this,E0,null),V(this,_0,0),V(this,T0,pn),V(this,C0,null),V(this,S0,null),V(this,R0,null),V(this,A0,"0x"),V(this,P0,pn),V(this,N0,pn),V(this,x0,null),V(this,I0,null),V(this,Th,null),V(this,iu,null),V(this,su,null),V(this,Mc,null)}get type(){return T(this,ba)}set type(e){switch(e){case null:V(this,ba,null);break;case 0:case"legacy":V(this,ba,0);break;case 1:case"berlin":case"eip-2930":V(this,ba,1);break;case 2:case"london":case"eip-1559":V(this,ba,2);break;case 3:case"cancun":case"eip-4844":V(this,ba,3);break;default:pe(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=T(this,E0);return e==null&&this.type===3?tu:e}set to(e){V(this,E0,e==null?null:Mt(e))}get nonce(){return T(this,_0)}set nonce(e){V(this,_0,mt(e,"value"))}get gasLimit(){return T(this,T0)}set gasLimit(e){V(this,T0,ct(e))}get gasPrice(){const e=T(this,C0);return e==null&&(this.type===0||this.type===1)?pn:e}set gasPrice(e){V(this,C0,e==null?null:ct(e,"gasPrice"))}get maxPriorityFeePerGas(){return T(this,S0)??(this.type===2||this.type===3?pn:null)}set maxPriorityFeePerGas(e){V(this,S0,e==null?null:ct(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){return T(this,R0)??(this.type===2||this.type===3?pn:null)}set maxFeePerGas(e){V(this,R0,e==null?null:ct(e,"maxFeePerGas"))}get data(){return T(this,A0)}set data(e){V(this,A0,Ze(e))}get value(){return T(this,P0)}set value(e){V(this,P0,ct(e,"value"))}get chainId(){return T(this,N0)}set chainId(e){V(this,N0,ct(e))}get signature(){return T(this,x0)||null}set signature(e){V(this,x0,e==null?null:Ps.from(e))}get accessList(){return(T(this,I0)||null)??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){V(this,I0,e==null?null:To(e))}get maxFeePerBlobGas(){const e=T(this,Th);return e==null&&this.type===3?pn:e}set maxFeePerBlobGas(e){V(this,Th,e==null?null:ct(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=T(this,iu);return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){pe(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let r=0;r<e.length;r++)pe(ur(e[r],32),"invalid blobVersionedHash",`value[${r}]`,e[r])}V(this,iu,e)}get blobs(){return T(this,su)==null?null:T(this,su).map(e=>Object.assign({},e))}set blobs(e){if(e==null){V(this,su,null);return}const r=[],n=[];for(let i=0;i<e.length;i++){const s=e[i];if(Qd(s)){Be(T(this,Mc),"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let o=qe(s);if(pe(o.length<=Y4,"blob is too large",`blobs[${i}]`,s),o.length!==Y4){const l=new Uint8Array(Y4);l.set(o),o=l}const a=T(this,Mc).blobToKzgCommitment(o),c=Ze(T(this,Mc).computeBlobKzgProof(o,a));r.push({data:Ze(o),commitment:Ze(a),proof:c}),n.push(wC(1,a))}else{const o=Ze(s.commitment);r.push({data:Ze(s.data),commitment:o,proof:Ze(s.proof)}),n.push(wC(1,o))}}V(this,su,r),V(this,iu,n)}get kzg(){return T(this,Mc)}set kzg(e){V(this,Mc,e)}get hash(){return this.signature==null?null:hr(ve(this,O0,qy).call(this,!0,!1))}get unsignedHash(){return hr(this.unsignedSerialized)}get from(){return this.signature==null?null:w0(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:_o.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){return ve(this,O0,qy).call(this,!0,!0)}get unsignedSerialized(){return ve(this,O0,qy).call(this,!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,r=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,i=T(this,Th)!=null||T(this,iu);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&Be(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),Be(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),Be(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const s=[];return this.type!=null?s.push(this.type):r?s.push(2):e?(s.push(1),n||s.push(0)):n?(s.push(1),s.push(2)):(i&&this.to||(s.push(0),s.push(1),s.push(2)),s.push(3)),s.sort(),s}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return Sl.from(this)}toJSON(){const e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Sl;if(typeof e=="string"){const n=qe(e);if(n[0]>=127)return Sl.from(w$(n));switch(n[0]){case 1:return Sl.from(_$(n));case 2:return Sl.from(E$(n));case 3:return Sl.from(C$(n))}Be(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new Sl;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(r.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=Ps.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.blobVersionedHashes!=null&&(r.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(r.kzg=e.kzg),e.blobs!=null&&(r.blobs=e.blobs),e.hash!=null&&(pe(r.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),pe(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(pe(r.isSigned(),"unsigned transaction cannot define '.from'","tx",e),pe(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};ba=new WeakMap,E0=new WeakMap,A0=new WeakMap,_0=new WeakMap,T0=new WeakMap,C0=new WeakMap,S0=new WeakMap,R0=new WeakMap,P0=new WeakMap,N0=new WeakMap,x0=new WeakMap,I0=new WeakMap,Th=new WeakMap,iu=new WeakMap,Mc=new WeakMap,su=new WeakMap,O0=new WeakSet,qy=function(t,e){Be(!t||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=t?this.signature:null;switch(this.inferType()){case 0:return k$(this,r);case 1:return T$(this,r);case 2:return A$(this,r);case 3:return S$(this,r,e?this.blobs:null)}Be(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let Ch=R$;function Xy(t){return typeof t=="string"&&(t=qr(t)),hr(Zt([qr(P4),qr(String(t.length)),t]))}function kC(t,e){const r=Xy(t);return w0(r,e)}const P$=new RegExp("^bytes([0-9]+)$"),N$=new RegExp("^(u?int)([0-9]*)$"),x$=new RegExp("^(.*)\\[([0-9]*)\\]$");function EC(t,e,r){switch(t){case"address":return qe(r?Hi(e,32):Mt(e));case"string":return qr(e);case"bytes":return qe(e);case"bool":return e=e?"0x01":"0x00",qe(r?Hi(e,32):e)}let n=t.match(N$);if(n){let i=n[1]==="int",s=parseInt(n[2]||"256");return pe((!n[2]||n[2]===String(s))&&s%8===0&&s!==0&&s<=256,"invalid number type","type",t),r&&(s=256),i&&(e=jp(e,s)),qe(Hi(on(e),s/8))}if(n=t.match(P$),n){const i=parseInt(n[1]);return pe(String(i)===n[1]&&i!==0&&i<=32,"invalid bytes type","type",t),pe(oa(e)===i,`invalid value for ${t}`,"value",e),r?qe(Wp(e,32)):e}if(n=t.match(x$),n&&Array.isArray(e)){const i=n[1],s=parseInt(n[2]||String(e.length));pe(s===e.length,`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(EC(i,a,!0))}),qe(Zt(o))}pe(!1,"invalid type","type",t)}function e2(t,e){pe(t.length===e.length,"wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(EC(n,e[i]))}),Ze(Zt(r))}function AC(t,e){return hr(e2(t,e))}function _C(t,e){return Ln(e2(t,e))}const TC=new Uint8Array(32);TC.fill(0);const I$=BigInt(-1),CC=BigInt(0),SC=BigInt(1),O$=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function B$(t){const e=qe(t),r=e.length%32;return r?Zt([e,TC.slice(r)]):Ze(e)}const M$=Zi(SC,32),U$=Zi(CC,32),RC={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},e5=["name","version","chainId","verifyingContract","salt"];function PC(t){return function(e){return pe(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const L$={name:PC("name"),version:PC("version"),chainId:function(t){const e=ct(t,"domain.chainId");return pe(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):ca(e)},verifyingContract:function(t){try{return Mt(t).toLowerCase()}catch{}pe(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=qe(t,"domain.salt");return pe(e.length===32,'invalid domain value "salt"',"domain.salt",t),Ze(e)}};function t5(t){{const e=t.match(/^(u?)int(\d+)$/);if(e){const r=e[1]==="",n=parseInt(e[2]);pe(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",t);const i=aa(O$,r?n-1:n),s=r?(i+SC)*I$:CC;return function(o){const a=ct(o,"value");return pe(a>=s&&a<=i,`value out-of-bounds for ${t}`,"value",a),Zi(r?jp(a,256):a,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return pe(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const i=qe(n);return pe(i.length===r,`invalid length for ${t}`,"value",n),B$(n)}}}switch(t){case"address":return function(e){return Hi(Mt(e),32)};case"bool":return function(e){return e?M$:U$};case"bytes":return function(e){return hr(e)};case"string":return function(e){return Ns(e)}}return null}function NC(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}function t2(t){const e=t.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}var r2,Uc,B0,r5,xC;const F$=class io{constructor(e){ne(this,r5),X(this,"primaryType"),ne(this,r2),ne(this,Uc),ne(this,B0),V(this,Uc,new Map),V(this,B0,new Map);const r=new Map,n=new Map,i=new Map,s={};Object.keys(e).forEach(c=>{s[c]=e[c].map(({name:l,type:u})=>{let{base:h,index:d}=t2(u);return h==="int"&&!e.int&&(h="int256"),h==="uint"&&!e.uint&&(h="uint256"),{name:l,type:h+(d||"")}}),r.set(c,new Set),n.set(c,[]),i.set(c,new Set)}),V(this,r2,JSON.stringify(s));for(const c in s){const l=new Set;for(const u of s[c]){pe(!l.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(c)}`,"types",e),l.add(u.name);const h=t2(u.type).base;pe(h!==c,`circular type reference to ${JSON.stringify(h)}`,"types",e),!t5(h)&&(pe(n.has(h),`unknown type ${JSON.stringify(h)}`,"types",e),n.get(h).push(c),r.get(c).add(h))}}const o=Array.from(n.keys()).filter(c=>n.get(c).length===0);pe(o.length!==0,"missing primary type","types",e),pe(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),rt(this,{primaryType:o[0]});function a(c,l){pe(!l.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",e),l.add(c);for(const u of r.get(c))if(n.has(u)){a(u,l);for(const h of l)i.get(h).add(u)}l.delete(c)}a(this.primaryType,new Set);for(const[c,l]of i){const u=Array.from(l);u.sort(),T(this,Uc).set(c,NC(c,s[c])+u.map(h=>NC(h,s[h])).join(""))}}get types(){return JSON.parse(T(this,r2))}getEncoder(e){let r=T(this,B0).get(e);return r||(r=ve(this,r5,xC).call(this,e),T(this,B0).set(e,r)),r}encodeType(e){const r=T(this,Uc).get(e);return pe(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return hr(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(t5(e))return n(e,r);const i=t2(e).array;if(i)return pe(i.count===-1||i.count===r.length,`array length mismatch; expected length ${i.count}`,"value",r),r.map(o=>this._visit(i.prefix,o,n));const s=this.types[e];if(s)return s.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{});pe(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new io(e)}static getPrimaryType(e){return io.from(e).primaryType}static hashStruct(e,r,n){return io.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const i=RC[n];pe(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>e5.indexOf(n.name)-e5.indexOf(i.name)),io.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Zt(["0x1901",io.hashDomain(e),io.from(r).hash(n)])}static hash(e,r,n){return hr(io.encode(e,r,n))}static async resolveNames(e,r,n,i){e=Object.assign({},e);for(const a in e)e[a]==null&&delete e[a];const s={};e.verifyingContract&&!ur(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=io.from(r);o.visit(n,(a,c)=>(a==="address"&&!ur(c,20)&&(s[c]="0x"),c));for(const a in s)s[a]=await i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&s[c]?s[c]:c),{domain:e,value:n}}static getPayload(e,r,n){io.hashDomain(e);const i={},s=[];e5.forEach(c=>{const l=e[c];l!=null&&(i[c]=L$[c](l),s.push({name:c,type:RC[c]}))});const o=io.from(r);r=o.types;const a=Object.assign({},r);return pe(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return Ze(qe(l));if(c.match(/^u?int/))return ct(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return pe(typeof l=="string","invalid string","value",l),l}pe(!1,"unsupported type","type",c)})}}};r2=new WeakMap,Uc=new WeakMap,B0=new WeakMap,r5=new WeakSet,xC=function(t){{const n=t5(t);if(n)return n}const e=t2(t).array;if(e){const n=e.prefix,i=this.getEncoder(n);return s=>{pe(e.count===-1||e.count===s.length,`array length mismatch; expected length ${e.count}`,"value",s);let o=s.map(i);return T(this,Uc).has(n)&&(o=o.map(hr)),hr(Zt(o))}}const r=this.types[t];if(r){const n=Ns(T(this,Uc).get(t));return i=>{const s=r.map(({name:o,type:a})=>{const c=this.getEncoder(a)(i[o]);return T(this,Uc).has(a)?hr(c):c});return s.unshift(n),Zt(s)}}pe(!1,`unknown type: ${t}`,"type",t)};let ou=F$;function IC(t,e,r,n){return w0(ou.hash(t,e,r),n)}function Xn(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const V$="external public payable override",D$=Xn(V$.split(" ")),OC="constant external internal payable private public pure view override",W$=Xn(OC.split(" ")),BC="constructor error event fallback function receive struct",MC=Xn(BC.split(" ")),UC="calldata memory storage payable indexed",j$=Xn(UC.split(" ")),G$="tuple returns",z$=[BC,UC,G$,OC].join(" "),$$=Xn(z$.split(" ")),H$={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},Z$=new RegExp("^(\\s*)"),J$=new RegExp("^([0-9]+)"),Q$=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),LC=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),FC=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var Dn,Co,n2,n5;const VC=class GV{constructor(e){ne(this,n2),ne(this,Dn),ne(this,Co),V(this,Dn,0),V(this,Co,e.slice())}get offset(){return T(this,Dn)}get length(){return T(this,Co).length-T(this,Dn)}clone(){return new GV(T(this,Co))}reset(){V(this,Dn,0)}popKeyword(e){const r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const r=this.peek();throw new Error(`expected ${e}; got ${r.type} ${JSON.stringify(r.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=ve(this,n2,n5).call(this,T(this,Dn)+1,e.match+1);return V(this,Dn,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;T(this,Dn)<e.match-1;){const n=this.peek().linkNext;r.push(ve(this,n2,n5).call(this,T(this,Dn)+1,n)),V(this,Dn,n)}return V(this,Dn,e.match+1),r}peek(){if(T(this,Dn)>=T(this,Co).length)throw new Error("out-of-bounds");return T(this,Co)[T(this,Dn)]}peekKeyword(e){const r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;const r=this.peek();return r.type===e?r.text:null}pop(){const e=this.peek();return yo(this,Dn)._++,e}toString(){const e=[];for(let r=T(this,Dn);r<T(this,Co).length;r++){const n=T(this,Co)[r];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(" ")}>`}};Dn=new WeakMap,Co=new WeakMap,n2=new WeakSet,n5=function(t=0,e=0){return new VC(T(this,Co).slice(t,e).map(r=>Object.freeze(Object.assign({},r,{match:r.match-t,linkBack:r.linkBack-t,linkNext:r.linkNext-t}))))};let wa=VC;function Lc(t){const e=[],r=o=>{const a=s<t.length?JSON.stringify(t[s]):"$EOI";throw new Error(`invalid token ${a} at ${s}: ${o}`)};let n=[],i=[],s=0;for(;s<t.length;){let o=t.substring(s),a=o.match(Z$);a&&(s+=a[1].length,o=t.substring(s));const c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};e.push(c);let l=H$[o[0]]||"";if(l){if(c.type=l,c.text=o[0],s++,l==="OPEN_PAREN")n.push(e.length-1),i.push(e.length-1);else if(l=="CLOSE_PAREN")n.length===0&&r("no matching open bracket"),c.match=n.pop(),e[c.match].match=e.length-1,c.depth--,c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1;else if(l==="COMMA")c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1,i.push(e.length-1);else if(l==="OPEN_BRACKET")c.type="BRACKET";else if(l==="CLOSE_BRACKET"){let u=e.pop().text;if(e.length>0&&e[e.length-1].type==="NUMBER"){const h=e.pop().text;u=h+u,e[e.length-1].value=mt(h)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(a=o.match(Q$),a){if(c.text=a[1],s+=c.text.length,$$.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(FC)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(J$),a){c.text=a[1],c.type="NUMBER",s+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${s}`)}return new wa(e.map(o=>Object.freeze(o)))}function DC(t,e){let r=[];for(const n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function i2(t,e){if(e.peekKeyword(MC)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function ka(t,e){const r=new Set;for(;;){const n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function WC(t){let e=ka(t,W$);return DC(e,Xn("constant payable nonpayable".split(" "))),DC(e,Xn("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function Ea(t,e){return t.popParams().map(r=>An.from(r,e))}function jC(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return ct(t.pop().text);throw new Error("invalid gas")}return null}function au(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const Y$=new RegExp(/^(.*)\[([0-9]*)\]$/);function GC(t){const e=t.match(FC);if(pe(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);pe(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);pe(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const Ur={},hi=Symbol.for("_ethers_internal"),zC="_ParamTypeInternal",$C="_ErrorInternal",HC="_EventInternal",ZC="_ConstructorInternal",JC="_FallbackInternal",QC="_FunctionInternal",YC="_StructInternal";var M0,s2;const K$=class so{constructor(e,r,n,i,s,o,a,c){if(ne(this,M0),X(this,"name"),X(this,"type"),X(this,"baseType"),X(this,"indexed"),X(this,"components"),X(this,"arrayLength"),X(this,"arrayChildren"),vo(e,Ur,"ParamType"),Object.defineProperty(this,hi,{value:zC}),o&&(o=Object.freeze(o.slice())),i==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");rt(this,{name:r,type:n,baseType:i,indexed:s,components:o,arrayLength:a,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const s=JSON.parse(this.arrayChildren.format("json"));return s.name=n,s.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(s)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(s=>JSON.parse(s.format(e)))),JSON.stringify(i)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(i=>n.arrayChildren.walk(i,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((i,s)=>n.components[s].walk(i,r))}return r(this.type,e)}async walkAsync(e,r){const n=[],i=[e];return ve(this,M0,s2).call(this,n,e,r,s=>{i[0]=s}),n.length&&await Promise.all(n),i[0]}static from(e,r){if(so.isParamType(e))return e;if(typeof e=="string")try{return so.from(Lc(e),r)}catch{pe(!1,"invalid param type","obj",e)}else if(e instanceof wa){let a="",c="",l=null;ka(e,Xn(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",l=e.popParams().map(g=>so.from(g)),a=`tuple(${l.map(g=>g.format()).join(",")})`):(a=GC(e.popType("TYPE")),c=a);let u=null,h=null;for(;e.length&&e.peekType("BRACKET");){const g=e.pop();u=new so(Ur,"",a,c,null,l,h,u),h=g.value,a+=g.text,c="array",l=null}let d=null;if(ka(e,j$).has("indexed")){if(!r)throw new Error("");d=!0}const p=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new so(Ur,p,a,c,d,l,h,u)}const n=e.name;pe(!n||typeof n=="string"&&n.match(LC),"invalid name","obj.name",n);let i=e.indexed;i!=null&&(pe(r,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,o=s.match(Y$);if(o){const a=parseInt(o[2]||"-1"),c=so.from({type:o[1],components:e.components});return new so(Ur,n||"",s,"array",i,null,a,c)}if(s==="tuple"||s.startsWith("tuple(")||s.startsWith("(")){const a=e.components!=null?e.components.map(c=>so.from(c)):null;return new so(Ur,n||"",s,"tuple",i,a,null,null)}return s=GC(e.type),new so(Ur,n||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[hi]===zC}};M0=new WeakSet,s2=function(t,e,r,n){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const s=this.arrayChildren,o=e.slice();o.forEach((a,c)=>{var l;ve(l=s,M0,s2).call(l,t,a,r,u=>{o[c]=u})}),n(o);return}if(this.isTuple()){const s=this.components;let o;if(Array.isArray(e))o=e.slice();else{if(e==null||typeof e!="object")throw new Error("invalid tuple value");o=s.map(a=>{if(!a.name)throw new Error("cannot use object value with unnamed components");if(!(a.name in e))throw new Error(`missing value for component ${a.name}`);return e[a.name]})}if(o.length!==this.components.length)throw new Error("array is wrong length");o.forEach((a,c)=>{var l;ve(l=s[c],M0,s2).call(l,t,a,r,u=>{o[c]=u})}),n(o);return}const i=r(this.type,e);i.then?t.push(async function(){n(await i)}()):n(i)};let An=K$;class Aa{constructor(e,r,n){X(this,"type"),X(this,"inputs"),vo(e,Ur,"Fragment"),n=Object.freeze(n.slice()),rt(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{Aa.from(JSON.parse(e))}catch{}return Aa.from(Lc(e))}if(e instanceof wa)switch(e.peekKeyword(MC)){case"constructor":return Is.from(e);case"error":return xs.from(e);case"event":return qi.from(e);case"fallback":case"receive":return Os.from(e);case"function":return Xi.from(e);case"struct":return _a.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Is.from(e);case"error":return xs.from(e);case"event":return qi.from(e);case"fallback":case"receive":return Os.from(e);case"function":return Xi.from(e);case"struct":return _a.from(e)}Be(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}pe(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Is.isFragment(e)}static isError(e){return xs.isFragment(e)}static isEvent(e){return qi.isFragment(e)}static isFunction(e){return Xi.isFragment(e)}static isStruct(e){return _a.isFragment(e)}}class Sh extends Aa{constructor(e,r,n,i){super(e,r,i),X(this,"name"),pe(typeof n=="string"&&n.match(LC),"invalid identifier","name",n),i=Object.freeze(i.slice()),rt(this,{name:n})}}function U0(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}let xs=class B1 extends Sh{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,hi,{value:$C})}get selector(){return Ns(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+U0(e,this.inputs)),r.join(" ")}static from(e){if(B1.isFragment(e))return e;if(typeof e=="string")return B1.from(Lc(e));if(e instanceof wa){const r=i2("error",e),n=Ea(e);return au(e),new B1(Ur,r,n)}return new B1(Ur,e.name,e.inputs?e.inputs.map(An.from):[])}static isFragment(e){return e&&e[hi]===$C}};class qi extends Sh{constructor(e,r,n,i){super(e,"event",r,n),X(this,"anonymous"),Object.defineProperty(this,hi,{value:HC}),rt(this,{anonymous:i})}get topicHash(){return Ns(this.format("sighash"))}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("event"),r.push(this.name+U0(e,this.inputs)),e!=="sighash"&&this.anonymous&&r.push("anonymous"),r.join(" ")}static getTopicHash(e,r){return r=(r||[]).map(n=>An.from(n)),new qi(Ur,e,r,!1).topicHash}static from(e){if(qi.isFragment(e))return e;if(typeof e=="string")try{return qi.from(Lc(e))}catch{pe(!1,"invalid event fragment","obj",e)}else if(e instanceof wa){const r=i2("event",e),n=Ea(e,!0),i=!!ka(e,Xn(["anonymous"])).has("anonymous");return au(e),new qi(Ur,r,n,i)}return new qi(Ur,e.name,e.inputs?e.inputs.map(r=>An.from(r,!0)):[],!!e.anonymous)}static isFragment(e){return e&&e[hi]===HC}}class Is extends Aa{constructor(e,r,n,i,s){super(e,r,n),X(this,"payable"),X(this,"gas"),Object.defineProperty(this,hi,{value:ZC}),rt(this,{payable:i,gas:s})}format(e){if(Be(e!=null&&e!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),e==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[`constructor${U0(e,this.inputs)}`];return this.payable&&r.push("payable"),this.gas!=null&&r.push(`@${this.gas.toString()}`),r.join(" ")}static from(e){if(Is.isFragment(e))return e;if(typeof e=="string")try{return Is.from(Lc(e))}catch{pe(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof wa){ka(e,Xn(["constructor"]));const r=Ea(e),n=!!ka(e,D$).has("payable"),i=jC(e);return au(e),new Is(Ur,"constructor",r,n,i)}return new Is(Ur,"constructor",e.inputs?e.inputs.map(An.from):[],!!e.payable,e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[hi]===ZC}}class Os extends Aa{constructor(e,r,n){super(e,"fallback",r),X(this,"payable"),Object.defineProperty(this,hi,{value:JC}),rt(this,{payable:n})}format(e){const r=this.inputs.length===0?"receive":"fallback";if(e==="json"){const n=this.payable?"payable":"nonpayable";return JSON.stringify({type:r,stateMutability:n})}return`${r}()${this.payable?" payable":""}`}static from(e){if(Os.isFragment(e))return e;if(typeof e=="string")try{return Os.from(Lc(e))}catch{pe(!1,"invalid fallback fragment","obj",e)}else if(e instanceof wa){const r=e.toString(),n=e.peekKeyword(Xn(["fallback","receive"]));if(pe(n,"type must be fallback or receive","obj",r),e.popKeyword(Xn(["fallback","receive"]))==="receive"){const o=Ea(e);return pe(o.length===0,"receive cannot have arguments","obj.inputs",o),ka(e,Xn(["payable"])),au(e),new Os(Ur,[],!0)}let i=Ea(e);i.length?pe(i.length===1&&i[0].type==="bytes","invalid fallback inputs","obj.inputs",i.map(o=>o.format("minimal")).join(", ")):i=[An.from("bytes")];const s=WC(e);if(pe(s==="nonpayable"||s==="payable","fallback cannot be constants","obj.stateMutability",s),ka(e,Xn(["returns"])).has("returns")){const o=Ea(e);pe(o.length===1&&o[0].type==="bytes","invalid fallback outputs","obj.outputs",o.map(a=>a.format("minimal")).join(", "))}return au(e),new Os(Ur,i,s==="payable")}if(e.type==="receive")return new Os(Ur,[],!0);if(e.type==="fallback"){const r=[An.from("bytes")],n=e.stateMutability==="payable";return new Os(Ur,r,n)}pe(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[hi]===JC}}class Xi extends Sh{constructor(e,r,n,i,s,o){super(e,"function",r,i),X(this,"constant"),X(this,"outputs"),X(this,"stateMutability"),X(this,"payable"),X(this,"gas"),Object.defineProperty(this,hi,{value:QC}),s=Object.freeze(s.slice()),rt(this,{constant:n==="view"||n==="pure",gas:o,outputs:s,payable:n==="payable",stateMutability:n})}get selector(){return Ns(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("function"),r.push(this.name+U0(e,this.inputs)),e!=="sighash"&&(this.stateMutability!=="nonpayable"&&r.push(this.stateMutability),this.outputs&&this.outputs.length&&(r.push("returns"),r.push(U0(e,this.outputs))),this.gas!=null&&r.push(`@${this.gas.toString()}`)),r.join(" ")}static getSelector(e,r){return r=(r||[]).map(n=>An.from(n)),new Xi(Ur,e,"view",r,[],null).selector}static from(e){if(Xi.isFragment(e))return e;if(typeof e=="string")try{return Xi.from(Lc(e))}catch{pe(!1,"invalid function fragment","obj",e)}else if(e instanceof wa){const n=i2("function",e),i=Ea(e),s=WC(e);let o=[];ka(e,Xn(["returns"])).has("returns")&&(o=Ea(e));const a=jC(e);return au(e),new Xi(Ur,n,s,i,o,a)}let r=e.stateMutability;return r==null&&(r="payable",typeof e.constant=="boolean"?(r="view",e.constant||(r="payable",typeof e.payable=="boolean"&&!e.payable&&(r="nonpayable"))):typeof e.payable=="boolean"&&!e.payable&&(r="nonpayable")),new Xi(Ur,e.name,r,e.inputs?e.inputs.map(An.from):[],e.outputs?e.outputs.map(An.from):[],e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[hi]===QC}}class _a extends Sh{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,hi,{value:YC})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return _a.from(Lc(e))}catch{pe(!1,"invalid struct fragment","obj",e)}else if(e instanceof wa){const r=i2("struct",e),n=Ea(e);return au(e),new _a(Ur,r,n)}return new _a(Ur,e.name,e.inputs?e.inputs.map(An.from):[])}static isFragment(e){return e&&e[hi]===YC}}const Bs=new Map;Bs.set(0,"GENERIC_PANIC"),Bs.set(1,"ASSERT_FALSE"),Bs.set(17,"OVERFLOW"),Bs.set(18,"DIVIDE_BY_ZERO"),Bs.set(33,"ENUM_RANGE_ERROR"),Bs.set(34,"BAD_STORAGE_DATA"),Bs.set(49,"STACK_UNDERFLOW"),Bs.set(50,"ARRAY_RANGE_ERROR"),Bs.set(65,"OUT_OF_MEMORY"),Bs.set(81,"UNINITIALIZED_FUNCTION_CALL");const q$=new RegExp(/^bytes([0-9]*)$/),X$=new RegExp(/^(u?int)([0-9]*)$/);let i5=null,KC=1024;function eH(t,e,r,n){let i="missing revert data",s=null;const o=null;let a=null;if(r){i="execution reverted";const l=qe(r);if(r=Ze(r),l.length===0)i+=" (no data present; likely require(false) occurred",s="require(false)";else if(l.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(Ze(l.slice(0,4))==="0x08c379a0")try{s=n.decode(["string"],l.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[s]},i+=`: ${JSON.stringify(s)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(Ze(l.slice(0,4))==="0x4e487b71")try{const u=Number(n.decode(["uint256"],l.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[u]},s=`Panic due to ${Bs.get(u)||"UNKNOWN"}(${u})`,i+=`: ${s}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const c={to:e.to?Mt(e.to):null,data:e.data||"0x"};return e.from&&(c.from=Mt(e.from)),yr(i,"CALL_EXCEPTION",{action:t,data:r,reason:s,transaction:c,invocation:o,revert:a})}var cu,Rh;const tH=class DA{constructor(){ne(this,cu)}getDefaultValue(e){const r=e.map(n=>ve(this,cu,Rh).call(this,An.from(n)));return new Dy(r,"_").defaultValue()}encode(e,r){oy(r.length,e.length,"types/values length mismatch");const n=e.map(o=>ve(this,cu,Rh).call(this,An.from(o))),i=new Dy(n,"_"),s=new n4;return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(s=>ve(this,cu,Rh).call(this,An.from(s)));return new Dy(i,"_").decode(new rj(r,n,KC))}static _setDefaultMaxInflation(e){pe(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),KC=e}static defaultAbiCoder(){return i5==null&&(i5=new DA),i5}static getBuiltinCallException(e,r,n){return eH(e,r,n,DA.defaultAbiCoder())}};cu=new WeakSet,Rh=function(t){if(t.isArray())return new wz(ve(this,cu,Rh).call(this,t.arrayChildren),t.arrayLength,t.name);if(t.isTuple())return new Dy(t.components.map(r=>ve(this,cu,Rh).call(this,r)),t.name);switch(t.baseType){case"address":return new vz(t.name);case"bool":return new kz(t.name);case"string":return new Nz(t.name);case"bytes":return new Ez(t.name);case"":return new Tz(t.name)}let e=t.type.match(X$);if(e){let r=parseInt(e[2]||"256");return pe(r!==0&&r<=256&&r%8===0,"invalid "+e[1]+" bit length","param",t),new Pz(r/8,e[1]==="int",t.name)}if(e=t.type.match(q$),e){let r=parseInt(e[1]);return pe(r!==0&&r<=32,"invalid bytes length","param",t),new Az(r,t.name)}pe(!1,"invalid type","type",t.type)};let Ph=tH;function qC(t){const e=qr(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Wp(e,32)}function XC(t){const e=qe(t,"bytes");if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return la(e.slice(0,r))}class s5{constructor(e,r,n){X(this,"fragment"),X(this,"name"),X(this,"signature"),X(this,"topic"),X(this,"args");const i=e.name,s=e.format();rt(this,{fragment:e,name:i,signature:s,topic:r,args:n})}}class o5{constructor(e,r,n,i){X(this,"fragment"),X(this,"name"),X(this,"args"),X(this,"signature"),X(this,"selector"),X(this,"value");const s=e.name,o=e.format();rt(this,{fragment:e,name:s,args:n,signature:o,selector:r,value:i})}}class a5{constructor(e,r,n){X(this,"fragment"),X(this,"name"),X(this,"args"),X(this,"signature"),X(this,"selector");const i=e.name,s=e.format();rt(this,{fragment:e,name:i,args:n,signature:s,selector:r})}}class o2{constructor(e){X(this,"hash"),X(this,"_isIndexed"),rt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const eS={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},tS={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&eS[t.toString()]&&(e=eS[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var Ta,Ca,Sa,ei,Fc,a2,c2;const rH=class Ep{constructor(e){ne(this,Fc),X(this,"fragments"),X(this,"deploy"),X(this,"fallback"),X(this,"receive"),ne(this,Ta),ne(this,Ca),ne(this,Sa),ne(this,ei);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,V(this,Sa,new Map),V(this,Ta,new Map),V(this,Ca,new Map);const n=[];for(const o of r)try{n.push(Aa.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}rt(this,{fragments:Object.freeze(n)});let i=null,s=!1;V(this,ei,this.getAbiCoder()),this.fragments.forEach((o,a)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}rt(this,{deploy:o});return;case"fallback":o.inputs.length===0?s=!0:(pe(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${a}]`,o),i=o,s=i.payable);return;case"function":c=T(this,Sa);break;case"event":c=T(this,Ca);break;case"error":c=T(this,Ta);break;default:return}const l=o.format();c.has(l)||c.set(l,o)}),this.deploy||rt(this,{deploy:Is.from("constructor()")}),rt(this,{fallback:i,receive:s})}format(e){const r=e?"minimal":"full";return this.fragments.map(n=>n.format(r))}formatJson(){const e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return Ph.defaultAbiCoder()}getFunctionName(e){const r=ve(this,Fc,a2).call(this,e,null,!1);return pe(r,"no matching function","key",e),r.name}hasFunction(e){return!!ve(this,Fc,a2).call(this,e,null,!1)}getFunction(e,r){return ve(this,Fc,a2).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(T(this,Sa).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(T(this,Sa).get(i),n)}}getEventName(e){const r=ve(this,Fc,c2).call(this,e,null,!1);return pe(r,"no matching event","key",e),r.name}hasEvent(e){return!!ve(this,Fc,c2).call(this,e,null,!1)}getEvent(e,r){return ve(this,Fc,c2).call(this,e,r||null,!0)}forEachEvent(e){const r=Array.from(T(this,Ca).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(T(this,Ca).get(i),n)}}getError(e,r){if(ur(e)){const i=e.toLowerCase();if(tS[i])return xs.from(tS[i].signature);for(const s of T(this,Ta).values())if(i===s.selector)return s;return null}if(e.indexOf("(")===-1){const i=[];for(const[s,o]of T(this,Ta))s.split("(")[0]===e&&i.push(o);if(i.length===0)return e==="Error"?xs.from("error Error(string)"):e==="Panic"?xs.from("error Panic(uint256)"):null;if(i.length>1){const s=i.map(o=>JSON.stringify(o.format())).join(", ");pe(!1,`ambiguous error description (i.e. ${s})`,"name",e)}return i[0]}return e=xs.from(e).format(),e==="Error(string)"?xs.from("error Error(string)"):e==="Panic(uint256)"?xs.from("error Panic(uint256)"):T(this,Ta).get(e)||null}forEachError(e){const r=Array.from(T(this,Ta).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(T(this,Ta).get(i),n)}}_decodeParams(e,r){return T(this,ei).decode(e,r)}_encodeParams(e,r){return T(this,ei).encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);pe(n,"unknown error","fragment",e),e=n}return pe(dr(r,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",r),this._decodeParams(e.inputs,dr(r,4))}encodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);pe(n,"unknown error","fragment",e),e=n}return Zt([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);pe(n,"unknown function","fragment",e),e=n}return pe(dr(r,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",r),this._decodeParams(e.inputs,dr(r,4))}encodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);pe(n,"unknown function","fragment",e),e=n}return Zt([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionResult(e,r){if(typeof e=="string"){const s=this.getFunction(e);pe(s,"unknown function","fragment",e),e=s}let n="invalid length for result data";const i=sn(r);if(i.length%32===0)try{return T(this,ei).decode(e.outputs,i)}catch{n="could not decode result data"}Be(!1,n,"BAD_DATA",{value:Ze(i),info:{method:e.name,signature:e.format()}})}makeError(e,r){const n=qe(e,"data"),i=Ph.getBuiltinCallException("call",r,n);if(i.message.startsWith("execution reverted (unknown custom error)")){const o=Ze(n.slice(0,4)),a=this.getError(o);if(a)try{const c=T(this,ei).decode(a.inputs,n.slice(4));i.revert={name:a.name,signature:a.format(),args:c},i.reason=i.revert.signature,i.message=`execution reverted: ${i.reason}`}catch{i.message="execution reverted (coult not decode custom error)"}}const s=this.parseTransaction(r);return s&&(i.invocation={method:s.name,signature:s.signature,args:s.args}),i}encodeFunctionResult(e,r){if(typeof e=="string"){const n=this.getFunction(e);pe(n,"unknown function","fragment",e),e=n}return Ze(T(this,ei).encode(e.outputs,r||[]))}encodeFilterTopics(e,r){if(typeof e=="string"){const s=this.getEvent(e);pe(s,"unknown event","eventFragment",e),e=s}Be(r.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:r.length,expectedCount:e.inputs.length});const n=[];e.anonymous||n.push(e.topicHash);const i=(s,o)=>s.type==="string"?Ns(o):s.type==="bytes"?hr(Ze(o)):(s.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":s.type.match(/^u?int/)?o=Zi(o):s.type.match(/^bytes/)?o=Wp(o,32):s.type==="address"&&T(this,ei).encode(["address"],[o]),Hi(Ze(o),32));for(r.forEach((s,o)=>{const a=e.inputs[o];if(!a.indexed){pe(s==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?pe(!1,"filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(c=>i(a,c))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){const o=this.getEvent(e);pe(o,"unknown event","eventFragment",e),e=o}const n=[],i=[],s=[];return e.anonymous||n.push(e.topicHash),pe(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(Ns(c));else if(o.type==="bytes")n.push(hr(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(T(this,ei).encode([o.type],[c]))}else i.push(o),s.push(c)}),{data:T(this,ei).encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const p=this.getEvent(e);pe(p,"unknown event","eventFragment",e),e=p}if(n!=null&&!e.anonymous){const p=e.topicHash;pe(ur(n[0],32)&&n[0].toLowerCase()===p,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const i=[],s=[],o=[];e.inputs.forEach((p,g)=>{p.indexed?p.type==="string"||p.type==="bytes"||p.baseType==="tuple"||p.baseType==="array"?(i.push(An.from({type:"bytes32",name:p.name})),o.push(!0)):(i.push(p),o.push(!1)):(s.push(p),o.push(!1))});const a=n!=null?T(this,ei).decode(i,Zt(n)):null,c=T(this,ei).decode(s,r,!0),l=[],u=[];let h=0,d=0;return e.inputs.forEach((p,g)=>{let m=null;if(p.indexed)if(a==null)m=new o2(null);else if(o[g])m=new o2(a[d++]);else try{m=a[d++]}catch(y){m=y}else try{m=c[h++]}catch(y){m=y}l.push(m),u.push(p.name||null)}),lh.fromItems(l,u)}parseTransaction(e){const r=qe(e.data,"tx.data"),n=ct(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(Ze(r.slice(0,4)));if(!i)return null;const s=T(this,ei).decode(i.inputs,r.slice(4));return new o5(i,i.selector,s,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new s5(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=Ze(e),n=this.getError(dr(r,0,4));if(!n)return null;const i=T(this,ei).decode(n.inputs,dr(r,4));return new a5(n,n.selector,i)}static from(e){return e instanceof Ep?e:typeof e=="string"?new Ep(JSON.parse(e)):typeof e.formatJson=="function"?new Ep(e.formatJson()):typeof e.format=="function"?new Ep(e.format("json")):new Ep(e)}};Ta=new WeakMap,Ca=new WeakMap,Sa=new WeakMap,ei=new WeakMap,Fc=new WeakSet,a2=function(t,e,r){if(ur(t)){const i=t.toLowerCase();for(const s of T(this,Sa).values())if(i===s.selector)return s;return null}if(t.indexOf("(")===-1){const i=[];for(const[s,o]of T(this,Sa))s.split("(")[0]===t&&i.push(o);if(e){const s=e.length>0?e[e.length-1]:null;let o=e.length,a=!0;Vn.isTyped(s)&&s.type==="overrides"&&(a=!1,o--);for(let c=i.length-1;c>=0;c--){const l=i[c].inputs.length;l!==o&&(!a||l!==o-1)&&i.splice(c,1)}for(let c=i.length-1;c>=0;c--){const l=i[c].inputs;for(let u=0;u<e.length;u++)if(Vn.isTyped(e[u])){if(u>=l.length){if(e[u].type==="overrides")continue;i.splice(c,1);break}if(e[u].type!==l[u].baseType){i.splice(c,1);break}}}}if(i.length===1&&e&&e.length!==i[0].inputs.length){const s=e[e.length-1];(s==null||Array.isArray(s)||typeof s!="object")&&i.splice(0,1)}if(i.length===0)return null;if(i.length>1&&r){const s=i.map(o=>JSON.stringify(o.format())).join(", ");pe(!1,`ambiguous function description (i.e. matches ${s})`,"key",t)}return i[0]}return T(this,Sa).get(Xi.from(t).format())||null},c2=function(t,e,r){if(ur(t)){const i=t.toLowerCase();for(const s of T(this,Ca).values())if(i===s.topicHash)return s;return null}if(t.indexOf("(")===-1){const i=[];for(const[s,o]of T(this,Ca))s.split("(")[0]===t&&i.push(o);if(e){for(let s=i.length-1;s>=0;s--)i[s].inputs.length<e.length&&i.splice(s,1);for(let s=i.length-1;s>=0;s--){const o=i[s].inputs;for(let a=0;a<e.length;a++)if(Vn.isTyped(e[a])&&e[a].type!==o[a].baseType){i.splice(s,1);break}}}if(i.length===0)return null;if(i.length>1&&r){const s=i.map(o=>JSON.stringify(o.format())).join(", ");pe(!1,`ambiguous event description (i.e. matches ${s})`,"key",t)}return i[0]}return T(this,Ca).get(qi.from(t).format())||null};let l2=rH;const rS=BigInt(0);function Nh(t){return t??null}function Hr(t){return t==null?null:t.toString()}class u2{constructor(e,r,n){X(this,"gasPrice"),X(this,"maxFeePerGas"),X(this,"maxPriorityFeePerGas"),rt(this,{gasPrice:Nh(e),maxFeePerGas:Nh(r),maxPriorityFeePerGas:Nh(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Hr(e),maxFeePerGas:Hr(r),maxPriorityFeePerGas:Hr(n)}}}function lu(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=Ze(t.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of r)!(i in t)||t[i]==null||(e[i]=ct(t[i],`request.${i}`));const n="type,nonce".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=mt(t[i],`request.${i}`));return t.accessList&&(e.accessList=To(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),"blobVersionedHashes"in t&&t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.slice()),"kzg"in t&&(e.kzg=t.kzg),"blobs"in t&&t.blobs&&(e.blobs=t.blobs.map(i=>Qd(i)?Ze(i):Object.assign({},i))),e}var Vc;class c5{constructor(e,r){X(this,"provider"),X(this,"number"),X(this,"hash"),X(this,"timestamp"),X(this,"parentHash"),X(this,"parentBeaconBlockRoot"),X(this,"nonce"),X(this,"difficulty"),X(this,"gasLimit"),X(this,"gasUsed"),X(this,"stateRoot"),X(this,"receiptsRoot"),X(this,"blobGasUsed"),X(this,"excessBlobGas"),X(this,"miner"),X(this,"prevRandao"),X(this,"extraData"),X(this,"baseFeePerGas"),ne(this,Vc),V(this,Vc,e.transactions.map(n=>typeof n!="string"?new L0(n,r):n)),rt(this,{provider:r,hash:Nh(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:Nh(e.prevRandao),extraData:e.extraData,baseFeePerGas:Nh(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return T(this,Vc).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=T(this,Vc).slice();return e.length===0?[]:(Be(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:i,gasUsed:s,hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:h,parentBeaconBlockRoot:d,stateRoot:p,receiptsRoot:g,timestamp:m,transactions:y}=this;return{_type:"Block",baseFeePerGas:Hr(e),difficulty:Hr(r),extraData:n,gasLimit:Hr(i),gasUsed:Hr(s),blobGasUsed:Hr(this.blobGasUsed),excessBlobGas:Hr(this.excessBlobGas),hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:h,timestamp:m,parentBeaconBlockRoot:d,stateRoot:p,receiptsRoot:g,transactions:y}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>e<this.length?{value:r[e++],done:!1}:{value:void 0,done:!0}}}get length(){return T(this,Vc).length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(e){let r;if(typeof e=="number")r=T(this,Vc)[e];else{const n=e.toLowerCase();for(const i of T(this,Vc))if(typeof i=="string"){if(i!==n)continue;r=i;break}else{if(i.hash===n)continue;r=i;break}}if(r==null)throw new Error("no such tx");return typeof r=="string"?await this.provider.getTransaction(r):r}getPrefetchedTransaction(e){const r=this.prefetchedTransactions;if(typeof e=="number")return r[e];e=e.toLowerCase();for(const n of r)if(n.hash===e)return n;pe(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return iH(this)}}Vc=new WeakMap;class uu{constructor(e,r){X(this,"provider"),X(this,"transactionHash"),X(this,"blockHash"),X(this,"blockNumber"),X(this,"removed"),X(this,"address"),X(this,"data"),X(this,"topics"),X(this,"index"),X(this,"transactionIndex"),this.provider=r;const n=Object.freeze(e.topics.slice());rt(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:n,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:r,blockNumber:n,data:i,index:s,removed:o,topics:a,transactionHash:c,transactionIndex:l}=this;return{_type:"log",address:e,blockHash:r,blockNumber:n,data:i,index:s,removed:o,topics:a,transactionHash:c,transactionIndex:l}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return Be(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return Be(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return Be(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return sH(this)}}var d2;class h2{constructor(e,r){X(this,"provider"),X(this,"to"),X(this,"from"),X(this,"contractAddress"),X(this,"hash"),X(this,"index"),X(this,"blockHash"),X(this,"blockNumber"),X(this,"logsBloom"),X(this,"gasUsed"),X(this,"blobGasUsed"),X(this,"cumulativeGasUsed"),X(this,"gasPrice"),X(this,"blobGasPrice"),X(this,"type"),X(this,"status"),X(this,"root"),ne(this,d2),V(this,d2,Object.freeze(e.logs.map(i=>new uu(i,r))));let n=rS;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),rt(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return T(this,d2)}toJSON(){const{to:e,from:r,contractAddress:n,hash:i,index:s,blockHash:o,blockNumber:a,logsBloom:c,logs:l,status:u,root:h}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:Hr(this.cumulativeGasUsed),from:r,gasPrice:Hr(this.gasPrice),blobGasUsed:Hr(this.blobGasUsed),blobGasPrice:Hr(this.blobGasPrice),gasUsed:Hr(this.gasUsed),hash:i,index:s,logs:l,logsBloom:c,root:h,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(e==null)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(e==null)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return iS(this)}reorderedEvent(e){return Be(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),nS(this,e)}}d2=new WeakMap;var du;const nH=class zV{constructor(e,r){X(this,"provider"),X(this,"blockNumber"),X(this,"blockHash"),X(this,"index"),X(this,"hash"),X(this,"type"),X(this,"to"),X(this,"from"),X(this,"nonce"),X(this,"gasLimit"),X(this,"gasPrice"),X(this,"maxPriorityFeePerGas"),X(this,"maxFeePerGas"),X(this,"maxFeePerBlobGas"),X(this,"data"),X(this,"value"),X(this,"chainId"),X(this,"signature"),X(this,"accessList"),X(this,"blobVersionedHashes"),ne(this,du),this.provider=r,this.blockNumber=e.blockNumber!=null?e.blockNumber:null,this.blockHash=e.blockHash!=null?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=e.maxPriorityFeePerGas!=null?e.maxPriorityFeePerGas:null,this.maxFeePerGas=e.maxFeePerGas!=null?e.maxFeePerGas:null,this.maxFeePerBlobGas=e.maxFeePerBlobGas!=null?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=e.accessList!=null?e.accessList:null,this.blobVersionedHashes=e.blobVersionedHashes!=null?e.blobVersionedHashes:null,V(this,du,-1)}toJSON(){const{blockNumber:e,blockHash:r,index:n,hash:i,type:s,to:o,from:a,nonce:c,data:l,signature:u,accessList:h,blobVersionedHashes:d}=this;return{_type:"TransactionResponse",accessList:h,blockNumber:e,blockHash:r,blobVersionedHashes:d,chainId:Hr(this.chainId),data:l,from:a,gasLimit:Hr(this.gasLimit),gasPrice:Hr(this.gasPrice),hash:i,maxFeePerGas:Hr(this.maxFeePerGas),maxPriorityFeePerGas:Hr(this.maxPriorityFeePerGas),maxFeePerBlobGas:Hr(this.maxFeePerBlobGas),nonce:c,signature:u,to:o,index:n,type:s,value:Hr(this.value)}}async getBlock(){let e=this.blockNumber;if(e==null){const n=await this.getTransaction();n&&(e=n.blockNumber)}if(e==null)return null;const r=this.provider.getBlock(e);if(r==null)throw new Error("TODO");return r}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:e,blockNumber:r}=await nn({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return e==null||e.blockNumber==null?0:r-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,r){const n=e??1,i=r??0;let s=T(this,du),o=-1,a=s===-1;const c=async()=>{if(a)return null;const{blockNumber:h,nonce:d}=await nn({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(d<this.nonce){s=h;return}if(a)return null;const p=await this.getTransaction();if(!(p&&p.blockNumber!=null))for(o===-1&&(o=s-3,o<T(this,du)&&(o=T(this,du)));o<=h;){if(a)return null;const g=await this.provider.getBlock(o,!0);if(g==null)return;for(const m of g)if(m===this.hash)return;for(let m=0;m<g.length;m++){const y=await g.getTransaction(m);if(y.from===this.from&&y.nonce===this.nonce){if(a)return null;const v=await this.provider.getTransactionReceipt(y.hash);if(v==null||h-v.blockNumber+1<n)return;let A="replaced";y.data===this.data&&y.to===this.to&&y.value===this.value?A="repriced":y.data==="0x"&&y.from===y.to&&y.value===rS&&(A="cancelled"),Be(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:A==="replaced"||A==="cancelled",reason:A,replacement:y.replaceableTransaction(s),hash:y.hash,receipt:v})}}o++}},l=h=>{if(h==null||h.status!==0)return h;Be(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:h.to,from:h.from,data:""},receipt:h})},u=await this.provider.getTransactionReceipt(this.hash);if(n===0)return l(u);if(u){if(await u.confirmations()>=n)return l(u)}else if(await c(),n===0)return null;return await new Promise((h,d)=>{const p=[],g=()=>{p.forEach(y=>y())};if(p.push(()=>{a=!0}),i>0){const y=setTimeout(()=>{g(),d(yr("wait for transaction timeout","TIMEOUT"))},i);p.push(()=>{clearTimeout(y)})}const m=async y=>{if(await y.confirmations()>=n){g();try{h(l(y))}catch(v){d(v)}}};if(p.push(()=>{this.provider.off(this.hash,m)}),this.provider.on(this.hash,m),s>=0){const y=async()=>{try{await c()}catch(v){if(Gr(v,"TRANSACTION_REPLACED")){g(),d(v);return}}a||this.provider.once("block",y)};p.push(()=>{this.provider.off("block",y)}),this.provider.once("block",y)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return Be(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),iS(this)}reorderedEvent(e){return Be(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Be(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),nS(this,e)}replaceableTransaction(e){pe(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new zV(this,this.provider);return V(r,du,e),r}};du=new WeakMap;let L0=nH;function iH(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function nS(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function iS(t){return{orphan:"drop-transaction",tx:t}}function sH(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class F0 extends uu{constructor(e,r,n){super(e,e.provider),X(this,"interface"),X(this,"fragment"),X(this,"args");const i=r.decodeEventLog(n,e.data,e.topics);rt(this,{args:i,fragment:n,interface:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class f2 extends uu{constructor(e,r){super(e,e.provider),X(this,"error"),rt(this,{error:r})}}var V0;class l5 extends h2{constructor(e,r,n){super(n,r),ne(this,V0),V(this,V0,e)}get logs(){return super.logs.map(e=>{const r=e.topics.length?T(this,V0).getEvent(e.topics[0]):null;if(r)try{return new F0(e,T(this,V0),r)}catch(n){return new f2(e,n)}return e})}}V0=new WeakMap;var p2;class D0 extends L0{constructor(e,r,n){super(n,r),ne(this,p2),V(this,p2,e)}async wait(e,r){const n=await super.wait(e,r);return n==null?null:new l5(T(this,p2),this.provider,n)}}p2=new WeakMap;class g2 extends hy{constructor(e,r,n,i){super(e,r,n),X(this,"log"),rt(this,{log:i})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class u5 extends g2{constructor(e,r,n,i,s){super(e,r,n,new F0(s,e.interface,i));const o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);rt(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const sS=BigInt(0);function oS(t){return t&&typeof t.call=="function"}function aS(t){return t&&typeof t.estimateGas=="function"}function m2(t){return t&&typeof t.resolveName=="function"}function cS(t){return t&&typeof t.sendTransaction=="function"}function lS(t){if(t!=null){if(m2(t))return t;if(t.provider)return t.provider}}var y2;class oH{constructor(e,r,n){if(ne(this,y2),X(this,"fragment"),rt(this,{fragment:r}),r.inputs.length<n.length)throw new Error("too many arguments");const i=hu(e.runner,"resolveName"),s=m2(i)?i:null;V(this,y2,async function(){const o=await Promise.all(r.inputs.map((a,c)=>n[c]==null?null:a.walkAsync(n[c],(l,u)=>l==="address"?Array.isArray(u)?Promise.all(u.map(h=>an(h,s))):an(u,s):u)));return e.interface.encodeFilterTopics(r,o)}())}getTopicFilter(){return T(this,y2)}}y2=new WeakMap;function hu(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function fu(t){return t==null?null:t.provider||null}async function d5(t,e){const r=Vn.dereference(t,"overrides");pe(typeof r=="object","invalid overrides parameter","overrides",t);const n=lu(r);return pe(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),pe(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function uS(t,e,r){const n=hu(t,"resolveName"),i=m2(n)?n:null;return await Promise.all(e.map((s,o)=>s.walkAsync(r[o],(a,c)=>(c=Vn.dereference(c,a),a==="address"?an(c,i):c))))}function aH(t){const e=async function(o){const a=await d5(o,["data"]);a.to=await t.getAddress(),a.from&&(a.from=await an(a.from,lS(t.runner)));const c=t.interface,l=ct(a.value||sS,"overrides.value")===sS,u=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!u&&!l&&pe(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),pe(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data);const h=c.receive||c.fallback&&c.fallback.payable;return pe(h||l,"cannot send value to non-payable fallback","overrides.value",a.value),pe(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data),a},r=async function(o){const a=hu(t.runner,"call");Be(oS(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await e(o);try{return await a.call(c)}catch(l){throw Dp(l)&&l.data?t.interface.makeError(l.data,c):l}},n=async function(o){const a=t.runner;Be(cS(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await e(o)),l=fu(t.runner);return new D0(t.interface,l,c)},i=async function(o){const a=hu(t.runner,"estimateGas");return Be(aS(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await e(o))},s=async o=>await n(o);return rt(s,{_contract:t,estimateGas:i,populateTransaction:e,send:n,staticCall:r}),s}function cH(t,e){const r=function(...l){const u=t.interface.getFunction(e,l);return Be(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:l}}),u},n=async function(...l){const u=r(...l);let h={};if(u.inputs.length+1===l.length&&(h=await d5(l.pop()),h.from&&(h.from=await an(h.from,lS(t.runner)))),u.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const d=await uS(t.runner,u.inputs,l);return Object.assign({},h,await nn({to:t.getAddress(),data:t.interface.encodeFunctionData(u,d)}))},i=async function(...l){const u=await a(...l);return u.length===1?u[0]:u},s=async function(...l){const u=t.runner;Be(cS(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const h=await u.sendTransaction(await n(...l)),d=fu(t.runner);return new D0(t.interface,d,h)},o=async function(...l){const u=hu(t.runner,"estimateGas");return Be(aS(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await n(...l))},a=async function(...l){const u=hu(t.runner,"call");Be(oS(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const h=await n(...l);let d="0x";try{d=await u.call(h)}catch(g){throw Dp(g)&&g.data?t.interface.makeError(g.data,h):g}const p=r(...l);return t.interface.decodeFunctionResult(p,d)},c=async(...l)=>r(...l).constant?await i(...l):await s(...l);return rt(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:o,populateTransaction:n,send:s,staticCall:i,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=t.interface.getFunction(e);return Be(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),l}}),c}function lH(t,e){const r=function(...i){const s=t.interface.getEvent(e,i);return Be(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),s},n=function(...i){return new oH(t,r(...i),i)};return rt(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=t.interface.getEvent(e);return Be(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}const v2=Symbol.for("_ethersInternal_contract"),dS=new WeakMap;function uH(t,e){dS.set(t[v2],e)}function Ri(t){return dS.get(t[v2])}function dH(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function h5(t,e){let r,n=null;if(Array.isArray(e)){const s=function(o){if(ur(o,32))return o;const a=t.interface.getEvent(o);return pe(a,"unknown fragment","name",o),a.topicHash};r=e.map(o=>o==null?null:Array.isArray(o)?o.map(s):s(o))}else e==="*"?r=[null]:typeof e=="string"?ur(e,32)?r=[e]:(n=t.interface.getEvent(e),pe(n,"unknown fragment","event",e),r=[n.topicHash]):dH(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):pe(!1,"unknown event name","event",e);r=r.map(s=>{if(s==null)return null;if(Array.isArray(s)){const o=Array.from(new Set(s.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return s.toLowerCase()});const i=r.map(s=>s==null?"null":Array.isArray(s)?s.join("|"):s).join("&");return{fragment:n,tag:i,topics:r}}async function W0(t,e){const{subs:r}=Ri(t);return r.get((await h5(t,e)).tag)||null}async function hS(t,e,r){const n=fu(t.runner);Be(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:s,topics:o}=await h5(t,r),{addr:a,subs:c}=Ri(t);let l=c.get(s);if(!l){const u={address:a||t,topics:o},h=p=>{let g=i;if(g==null)try{g=t.interface.getEvent(p.topics[0])}catch{}if(g){const m=g,y=i?t.interface.decodeEventLog(i,p.data,p.topics):[];p5(t,r,y,v=>new u5(t,v,r,m,p))}else p5(t,r,[],m=>new g2(t,m,r,p))};let d=[];l={tag:s,listeners:[],start:()=>{d.length||d.push(n.on(u,h))},stop:async()=>{if(d.length==0)return;let p=d;d=[],await Promise.all(p),n.off(u,h)}},c.set(s,l)}return l}let f5=Promise.resolve();async function hH(t,e,r,n){await f5;const i=await W0(t,e);if(!i)return!1;const s=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:a})=>{const c=Array.from(r);n&&c.push(n(a?null:o));try{o.call(t,...c)}catch{}return!a}),i.listeners.length===0&&(i.stop(),Ri(t).subs.delete(i.tag)),s>0}async function p5(t,e,r,n){try{await f5}catch{}const i=hH(t,e,r,n);return f5=i,await i}const b2=["then"];var fS;fS=v2;let j0=class zw{constructor(e,r,n,i){X(this,"target"),X(this,"interface"),X(this,"runner"),X(this,"filters"),X(this,fS),X(this,"fallback"),pe(typeof e=="string"||Vy(e),"invalid value for Contract target","target",e),n==null&&(n=null);const s=l2.from(r);rt(this,{target:e,runner:n,interface:s}),Object.defineProperty(this,v2,{value:{}});let o,a=null,c=null;if(i){const h=fu(n);c=new D0(this.interface,h,i)}let l=new Map;if(typeof e=="string")if(ur(e))a=e,o=Promise.resolve(e);else{const h=hu(n,"resolveName");if(!m2(h))throw yr("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=h.resolveName(e).then(d=>{if(d==null)throw yr("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Ri(this).addr=d,d})}else o=e.getAddress().then(h=>{if(h==null)throw new Error("TODO");return Ri(this).addr=h,h});uH(this,{addrPromise:o,addr:a,deployTx:c,subs:l});const u=new Proxy({},{get:(h,d,p)=>{if(typeof d=="symbol"||b2.indexOf(d)>=0)return Reflect.get(h,d,p);try{return this.getEvent(d)}catch(g){if(!Gr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(h,d)=>b2.indexOf(d)>=0?Reflect.has(h,d):Reflect.has(h,d)||this.interface.hasEvent(String(d))});return rt(this,{filters:u}),rt(this,{fallback:s.receive||s.fallback?aH(this):null}),new Proxy(this,{get:(h,d,p)=>{if(typeof d=="symbol"||d in h||b2.indexOf(d)>=0)return Reflect.get(h,d,p);try{return h.getFunction(d)}catch(g){if(!Gr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(h,d)=>typeof d=="symbol"||d in h||b2.indexOf(d)>=0?Reflect.has(h,d):h.interface.hasFunction(d)})}connect(e){return new zw(this.target,this.interface,e)}attach(e){return new zw(e,this.interface,this.runner)}async getAddress(){return await Ri(this).addrPromise}async getDeployedCode(){const e=fu(this.runner);Be(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const r=await e.getCode(await this.getAddress());return r==="0x"?null:r}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=fu(this.runner);return Be(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((n,i)=>{const s=async()=>{try{if(await this.getDeployedCode()!=null)return n(this);r.once("block",s)}catch(o){i(o)}};s()})}deploymentTransaction(){return Ri(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),cH(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),lH(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:i,addrPromise:s}=Ri(this),o=i||await s,{fragment:a,topics:c}=await h5(this,e),l={address:o,topics:c,fromBlock:r,toBlock:n},u=fu(this.runner);return Be(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(l)).map(h=>{let d=a;if(d==null)try{d=this.interface.getEvent(h.topics[0])}catch{}if(d)try{return new F0(h,this.interface,d)}catch(p){return new f2(h,p)}return new uu(h,u)})}async on(e,r){const n=await hS(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await hS(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await p5(this,e,r,null)}async listenerCount(e){if(e){const i=await W0(this,e);return i?i.listeners.length:0}const{subs:r}=Ri(this);let n=0;for(const{listeners:i}of r.values())n+=i.length;return n}async listeners(e){if(e){const i=await W0(this,e);return i?i.listeners.map(({listener:s})=>s):[]}const{subs:r}=Ri(this);let n=[];for(const{listeners:i}of r.values())n=n.concat(i.map(({listener:s})=>s));return n}async off(e,r){const n=await W0(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:s})=>s).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(r==null||n.listeners.length===0)&&(n.stop(),Ri(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await W0(this,e);if(!r)return this;r.stop(),Ri(this).subs.delete(r.tag)}else{const{subs:r}=Ri(this);for(const{tag:n,stop:i}of r.values())i(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends zw{constructor(i,s=null){super(i,e,s)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};function fH(){return j0}class Dc extends fH(){}class w2{constructor(e,r,n){X(this,"interface"),X(this,"bytecode"),X(this,"runner");const i=l2.from(e);r instanceof Uint8Array||(typeof r=="object"&&(r=r.object),r.startsWith("0x")||(r="0x"+r)),r=Ze(qe(r)),rt(this,{bytecode:r,interface:i,runner:n||null})}attach(e){return new j0(e,this.interface,this.runner)}async getDeployTransaction(...e){let r={};const n=this.interface.deploy;if(n.inputs.length+1===e.length&&(r=await d5(e.pop())),n.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const i=await uS(this.runner,n.inputs,e),s=Zt([this.bytecode,this.interface.encodeDeploy(i)]);return Object.assign({},r,{data:s})}async deploy(...e){const r=await this.getDeployTransaction(...e);Be(this.runner&&typeof this.runner.sendTransaction=="function","factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const n=await this.runner.sendTransaction(r),i=Fy(n);return new j0(i,this.interface,this.runner,n)}connect(e){return new w2(this.interface,this.bytecode,e)}static fromSolidity(e,r){pe(e!=null,"bad compiler output","output",e),typeof e=="string"&&(e=JSON.parse(e));const n=e.abi;let i="";return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,r)}}function g5(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):pe(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class m5{constructor(e){X(this,"name"),rt(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,r){throw new Error("unsupported coin")}async decodeAddress(e,r){throw new Error("unsupported coin")}}const pS=new RegExp("^(ipfs)://(.*)$","i"),gS=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),pS,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var pu,xh,gu,Ih,y5,mS;const v5=class WA{constructor(e,r,n){ne(this,gu),X(this,"provider"),X(this,"address"),X(this,"name"),ne(this,pu),ne(this,xh),rt(this,{provider:e,address:r,name:n}),V(this,pu,null),V(this,xh,new Dc(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return T(this,pu)==null&&V(this,pu,(async()=>{try{return await T(this,xh).supportsInterface("0x9061b923")}catch(e){if(Gr(e,"CALL_EXCEPTION"))return!1;throw V(this,pu,null),e}})()),await T(this,pu)}async getAddress(e){if(e==null&&(e=60),e===60)try{const s=await ve(this,gu,Ih).call(this,"addr(bytes32)");return s==null||s===tu?null:s}catch(s){if(Gr(s,"CALL_EXCEPTION"))return null;throw s}if(e>=0&&e<2147483648){let s=e+2147483648;const o=await ve(this,gu,Ih).call(this,"addr(bytes32,uint)",[s]);if(ur(o,20))return Mt(o)}let r=null;for(const s of this.provider.plugins)if(s instanceof m5&&s.supportsCoinType(e)){r=s;break}if(r==null)return null;const n=await ve(this,gu,Ih).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const i=await r.decodeAddress(e,n);if(i!=null)return i;Be(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await ve(this,gu,Ih).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await ve(this,gu,Ih).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const i=r[1]==="e3010170"?"ipfs":"ipns",s=parseInt(r[4],16);if(r[5].length===s*2)return`${i}://${dy("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;Be(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const r=await this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n<gS.length;n++){const i=r.match(gS[n]);if(i==null)continue;const s=i[1].toLowerCase();switch(s){case"https":case"data":return e.push({type:"url",value:r}),{linkage:e,url:r};case"ipfs":{const o=g5(r);return e.push({type:"ipfs",value:r}),e.push({type:"url",value:o}),{linkage:e,url:o}}case"erc721":case"erc1155":{const o=s==="erc721"?"tokenURI(uint256)":"uri(uint256)";e.push({type:s,value:r});const a=await this.getAddress();if(a==null)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const c=(i[2]||"").split("/");if(c.length!==2)return e.push({type:`!${s}caip`,value:i[2]||""}),{url:null,linkage:e};const l=c[1],u=new Dc(c[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(s==="erc721"){const m=await u.ownerOf(l);if(a!==m)return e.push({type:"!owner",value:m}),{url:null,linkage:e};e.push({type:"owner",value:m})}else if(s==="erc1155"){const m=await u.balanceOf(a,l);if(!m)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:m.toString()})}let h=await u[o](l);if(h==null||h==="0x")return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:h}),s==="erc1155"&&(h=h.replace("{id}",Zi(l,32).substring(2)),e.push({type:"metadata-url-expanded",value:h})),h.match(/^ipfs:/i)&&(h=g5(h)),e.push({type:"metadata-url",value:h});let d={};const p=await new Un(h).send();p.assertOk();try{d=p.bodyJson}catch{try{e.push({type:"!metadata",value:p.bodyText})}catch{const m=p.body;return m&&e.push({type:"!metadata",value:Ze(m)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!d)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(d)});let g=d.image;if(typeof g!="string")return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(!g.match(/^(https:\/\/|data:)/i)){if(g.match(pS)==null)return e.push({type:"!imageUrl-ipfs",value:g}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:g}),g=g5(g)}return e.push({type:"url",value:g}),{linkage:e,url:g}}}}}catch{}return{linkage:e,url:null}}static async getEnsAddress(e){const r=await e.getNetwork(),n=r.getPlugin("org.ethers.plugins.network.Ens");return Be(n,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:r}}),n.address}static async fromName(e,r){var n;let i=r;for(;;){if(i===""||i==="."||r!=="eth"&&i==="eth")return null;const s=await ve(n=WA,y5,mS).call(n,e,i);if(s!=null){const o=new WA(e,s,r);return i!==r&&!await o.supportsWildcard()?null:o}i=i.split(".").slice(1).join(".")}}};pu=new WeakMap,xh=new WeakMap,gu=new WeakSet,Ih=async function(t,e){e=(e||[]).slice();const r=T(this,xh).interface;e.unshift(b0(this.name));let n=null;await this.supportsWildcard()&&(n=r.getFunction(t),Be(n,"missing fragment","UNKNOWN_ERROR",{info:{funcName:t}}),e=[J4(this.name,255),r.encodeFunctionData(n,e)],t="resolve(bytes,bytes)"),e.push({enableCcipRead:!0});try{const i=await T(this,xh)[t](...e);return n?r.decodeFunctionResult(n,i)[0]:i}catch(i){if(!Gr(i,"CALL_EXCEPTION"))throw i}return null},y5=new WeakSet,mS=async function(t,e){const r=await v5.getEnsAddress(t);try{const n=await new Dc(r,["function resolver(bytes32) view returns (address)"],t).resolver(b0(e),{enableCcipRead:!0});return n===tu?null:n}catch(n){throw n}return null},ne(v5,y5);let k2=v5;const yS=BigInt(0);function Jt(t,e){return function(r){return r==null?e:t(r)}}function E2(t,e){return r=>{if(e&&r==null)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map(n=>t(n))}}function G0(t,e){return r=>{const n={};for(const i in t){let s=i;if(e&&i in e&&!(s in r)){for(const o of e[i])if(o in r){s=o;break}}try{const o=t[i](r[s]);o!==void 0&&(n[i]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";Be(!1,`invalid value for value.${i} (${a})`,"BAD_DATA",{value:r})}}return n}}function pH(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}pe(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Oh(t){return pe(ur(t,!0),"invalid data","value",t),t}function _n(t){return pe(ur(t,32),"invalid hash","value",t),t}const gH=G0({address:Mt,blockHash:_n,blockNumber:mt,data:Oh,index:mt,removed:Jt(pH,!1),topics:E2(_n),transactionHash:_n,transactionIndex:mt},{index:["logIndex"]});function mH(t){return gH(t)}const yH=G0({hash:Jt(_n),parentHash:_n,parentBeaconBlockRoot:Jt(_n,null),number:mt,timestamp:mt,nonce:Jt(Oh),difficulty:ct,gasLimit:ct,gasUsed:ct,stateRoot:Jt(_n,null),receiptsRoot:Jt(_n,null),blobGasUsed:Jt(ct,null),excessBlobGas:Jt(ct,null),miner:Jt(Mt),prevRandao:Jt(_n,null),extraData:Oh,baseFeePerGas:Jt(ct)},{prevRandao:["mixHash"]});function vH(t){const e=yH(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:vS(r)),e}const bH=G0({transactionIndex:mt,blockNumber:mt,transactionHash:_n,address:Mt,topics:E2(_n),data:Oh,index:mt,blockHash:_n},{index:["logIndex"]});function wH(t){return bH(t)}const kH=G0({to:Jt(Mt,null),from:Jt(Mt,null),contractAddress:Jt(Mt,null),index:mt,root:Jt(Ze),gasUsed:ct,blobGasUsed:Jt(ct,null),logsBloom:Jt(Oh),blockHash:_n,hash:_n,logs:E2(wH),blockNumber:mt,cumulativeGasUsed:ct,effectiveGasPrice:Jt(ct),blobGasPrice:Jt(ct,null),status:Jt(mt),type:Jt(mt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function EH(t){return kH(t)}function vS(t){t.to&&ct(t.to)===yS&&(t.to="0x0000000000000000000000000000000000000000");const e=G0({hash:_n,index:Jt(mt,void 0),type:r=>r==="0x"||r==null?0:mt(r),accessList:Jt(To,null),blobVersionedHashes:Jt(E2(_n,!0),null),blockHash:Jt(_n,null),blockNumber:Jt(mt,null),transactionIndex:Jt(mt,null),from:Mt,gasPrice:Jt(ct),maxPriorityFeePerGas:Jt(ct),maxFeePerGas:Jt(ct),maxFeePerBlobGas:Jt(ct,null),gasLimit:ct,to:Jt(Mt,null),value:ct,nonce:mt,data:Oh,creates:Jt(Mt,null),chainId:Jt(ct,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=Fy(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=Ps.from(t.signature):e.signature=Ps.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&ct(e.blockHash)===yS&&(e.blockHash=null),e}const AH="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Ra{constructor(e){X(this,"name"),rt(this,{name:e})}clone(){return new Ra(this.name)}}class Bh extends Ra{constructor(e,r){e==null&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`),X(this,"effectiveBlock"),X(this,"txBase"),X(this,"txCreate"),X(this,"txDataZero"),X(this,"txDataNonzero"),X(this,"txAccessListStorageKey"),X(this,"txAccessListAddress");const n={effectiveBlock:e};function i(s,o){let a=(r||{})[s];a==null&&(a=o),pe(typeof a=="number",`invalud value for ${s}`,"costs",r),n[s]=a}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),rt(this,n)}clone(){return new Bh(this.effectiveBlock,this)}}class Mh extends Ra{constructor(e,r){super("org.ethers.plugins.network.Ens"),X(this,"address"),X(this,"targetNetwork"),rt(this,{address:e||AH,targetNetwork:r??1})}clone(){return new Mh(this.address,this.targetNetwork)}}var Uh;const _H=class $V extends Ra{constructor(e){super("org.ethers.plugins.network.FeeData"),ne(this,Uh),V(this,Uh,e)}get feeDataFunc(){return T(this,Uh)}async getFeeData(e){return await T(this,Uh).call(this,e)}clone(){return new $V(T(this,Uh))}};Uh=new WeakMap;let bS=_H;var A2,_2;class b5 extends Ra{constructor(e,r){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),ne(this,A2),ne(this,_2),V(this,A2,e),V(this,_2,r)}get url(){return T(this,A2)}get processFunc(){return T(this,_2)}clone(){return this}}A2=new WeakMap,_2=new WeakMap;const w5=new Map;var z0,$0,mu;const TH=class M1{constructor(e,r){ne(this,z0),ne(this,$0),ne(this,mu),V(this,z0,e),V(this,$0,ct(r)),V(this,mu,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return T(this,z0)}set name(e){V(this,z0,e)}get chainId(){return T(this,$0)}set chainId(e){V(this,$0,ct(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===ct(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===ct(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===ct(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(T(this,mu).values())}attachPlugin(e){if(T(this,mu).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return T(this,mu).set(e.name,e.clone()),this}getPlugin(e){return T(this,mu).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new M1(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){const r=this.getPlugin("org.ethers.plugins.network.GasCost")||new Bh;let n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let i=2;i<e.data.length;i+=2)e.data.substring(i,i+2)==="00"?n+=r.txDataZero:n+=r.txDataNonzero;if(e.accessList){const i=To(e.accessList);for(const s in i)n+=r.txAccessListAddress+r.txAccessListStorageKey*i[s].storageKeys.length}return n}static from(e){if(CH(),e==null)return M1.from("mainnet");if(typeof e=="number"&&(e=BigInt(e)),typeof e=="string"||typeof e=="bigint"){const r=w5.get(e);if(r)return r();if(typeof e=="bigint")return new M1("unknown",e);pe(!1,"unknown network","network",e)}if(typeof e.clone=="function")return e.clone();if(typeof e=="object"){pe(typeof e.name=="string"&&typeof e.chainId=="number","invalid network object name or chainId","network",e);const r=new M1(e.name,e.chainId);return(e.ensAddress||e.ensNetwork!=null)&&r.attachPlugin(new Mh(e.ensAddress,e.ensNetwork)),r}pe(!1,"invalid network","network",e)}static register(e,r){typeof e=="number"&&(e=BigInt(e));const n=w5.get(e);n&&pe(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",e),w5.set(e,r)}};z0=new WeakMap,$0=new WeakMap,mu=new WeakMap;let Xr=TH;function wS(t,e){const r=String(t);if(!r.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${t}`);const n=r.split(".");if(n.length===1&&n.push(""),n.length!==2)throw new Error(`invalid gwei value: ${t}`);for(;n[1].length<e;)n[1]+="0";if(n[1].length>9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function kS(t){return new b5(t,async(e,r,n)=>{n.setHeader("User-Agent","ethers");let i;try{const[s,o]=await Promise.all([n.send(),e()]);i=s;const a=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:wS(a.maxFee,9),maxPriorityFeePerGas:wS(a.maxPriorityFee,9)}}catch(s){Be(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:s})}})}let ES=!1;function CH(){if(ES)return;ES=!0;function t(e,r,n){const i=function(){const s=new Xr(e,r);return n.ensNetwork!=null&&s.attachPlugin(new Mh(null,n.ensNetwork)),s.attachPlugin(new Bh),(n.plugins||[]).forEach(o=>{s.attachPlugin(o)}),s};Xr.register(e,i),Xr.register(r,i),n.altNames&&n.altNames.forEach(s=>{Xr.register(s,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("holesky",17e3,{ensNetwork:17e3}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("arbitrum-sepolia",421614,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("linea-sepolia",59141,{}),t("matic",137,{ensNetwork:1,plugins:[kS("https://gasstation.polygon.technology/v2")]}),t("matic-amoy",80002,{}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[kS("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("optimism-sepolia",11155420,{}),t("xdai",100,{ensNetwork:1})}function k5(t){return JSON.parse(JSON.stringify(t))}var Wc,Ms,yu,Pa,H0,T2;class SH{constructor(e){ne(this,H0),ne(this,Wc),ne(this,Ms),ne(this,yu),ne(this,Pa),V(this,Wc,e),V(this,Ms,null),V(this,yu,4e3),V(this,Pa,-2)}get pollingInterval(){return T(this,yu)}set pollingInterval(e){V(this,yu,e)}start(){T(this,Ms)||(V(this,Ms,T(this,Wc)._setTimeout(ve(this,H0,T2).bind(this),T(this,yu))),ve(this,H0,T2).call(this))}stop(){T(this,Ms)&&(T(this,Wc)._clearTimeout(T(this,Ms)),V(this,Ms,null))}pause(e){this.stop(),e&&V(this,Pa,-2)}resume(){this.start()}}Wc=new WeakMap,Ms=new WeakMap,yu=new WeakMap,Pa=new WeakMap,H0=new WeakSet,T2=async function(){try{const t=await T(this,Wc).getBlockNumber();if(T(this,Pa)===-2){V(this,Pa,t);return}if(t!==T(this,Pa)){for(let e=T(this,Pa)+1;e<=t;e++){if(T(this,Ms)==null)return;await T(this,Wc).emit("block",e)}V(this,Pa,t)}}catch{}T(this,Ms)!=null&&V(this,Ms,T(this,Wc)._setTimeout(ve(this,H0,T2).bind(this),T(this,yu)))};var Lh,Fh,vu;class E5{constructor(e){ne(this,Lh),ne(this,Fh),ne(this,vu),V(this,Lh,e),V(this,vu,!1),V(this,Fh,r=>{this._poll(r,T(this,Lh))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){T(this,vu)||(V(this,vu,!0),T(this,Fh).call(this,-2),T(this,Lh).on("block",T(this,Fh)))}stop(){T(this,vu)&&(V(this,vu,!1),T(this,Lh).off("block",T(this,Fh)))}pause(e){this.stop()}resume(){this.start()}}Lh=new WeakMap,Fh=new WeakMap,vu=new WeakMap;var Z0,jc;class RH extends E5{constructor(e,r){super(e),ne(this,Z0),ne(this,jc),V(this,Z0,r),V(this,jc,-2)}pause(e){e&&V(this,jc,-2),super.pause(e)}async _poll(e,r){const n=await r.getBlock(T(this,Z0));n!=null&&(T(this,jc)===-2?V(this,jc,n.number):n.number>T(this,jc)&&(r.emit(T(this,Z0),n.number),V(this,jc,n.number)))}}Z0=new WeakMap,jc=new WeakMap;var A5;class PH extends E5{constructor(e,r){super(e),ne(this,A5),V(this,A5,k5(r))}async _poll(e,r){throw new Error("@TODO")}}A5=new WeakMap;var J0;class NH extends E5{constructor(e,r){super(e),ne(this,J0),V(this,J0,r)}async _poll(e,r){const n=await r.getTransactionReceipt(T(this,J0));n&&r.emit(T(this,J0),n)}}J0=new WeakMap;var Gc,Q0,Y0,bu,Us,_5,AS;class T5{constructor(e,r){ne(this,_5),ne(this,Gc),ne(this,Q0),ne(this,Y0),ne(this,bu),ne(this,Us),V(this,Gc,e),V(this,Q0,k5(r)),V(this,Y0,ve(this,_5,AS).bind(this)),V(this,bu,!1),V(this,Us,-2)}start(){T(this,bu)||(V(this,bu,!0),T(this,Us)===-2&&T(this,Gc).getBlockNumber().then(e=>{V(this,Us,e)}),T(this,Gc).on("block",T(this,Y0)))}stop(){T(this,bu)&&(V(this,bu,!1),T(this,Gc).off("block",T(this,Y0)))}pause(e){this.stop(),e&&V(this,Us,-2)}resume(){this.start()}}Gc=new WeakMap,Q0=new WeakMap,Y0=new WeakMap,bu=new WeakMap,Us=new WeakMap,_5=new WeakSet,AS=async function(t){if(T(this,Us)===-2)return;const e=k5(T(this,Q0));e.fromBlock=T(this,Us)+1,e.toBlock=t;const r=await T(this,Gc).getLogs(e);if(r.length===0){T(this,Us)<t-60&&V(this,Us,t-60);return}for(const n of r)T(this,Gc).emit(T(this,Q0),n),V(this,Us,n.blockNumber)};const xH=BigInt(2),IH=10;function C2(t){return t&&typeof t.then=="function"}function S2(t,e){return t+":"+JSON.stringify(e,(r,n)=>{if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const i=Object.keys(n);return i.sort(),i.reduce((s,o)=>(s[o]=n[o],s),{})}return n})}class Vh{constructor(e){X(this,"name"),rt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function OH(t){return JSON.parse(JSON.stringify(t))}function C5(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function S5(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(ur(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:S2("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:S2("orphan",r),filter:OH(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(i=>i==null?null:Array.isArray(i)?C5(i.map(s=>s.toLowerCase())):i.toLowerCase())};if(r.address){const i=[],s=[],o=a=>{ur(a)?i.push(a):s.push((async()=>{i.push(await an(a,e))})())};Array.isArray(r.address)?r.address.forEach(o):o(r.address),s.length&&await Promise.all(s),n.address=C5(i.map(a=>a.toLowerCase()))}return{filter:n,tag:S2("event",n),type:"event"}}pe(!1,"unknown ProviderEvent","event",t)}function R5(){return new Date().getTime()}const BH={cacheTimeout:250,pollingInterval:4e3};var ti,wu,ri,K0,es,Dh,ku,zc,R2,Ls,q0,X0,sr,Pi,P5,N5,eg,x5,tg,P2;class Wh{constructor(e,r){if(ne(this,sr),ne(this,ti),ne(this,wu),ne(this,ri),ne(this,K0),ne(this,es),ne(this,Dh),ne(this,ku),ne(this,zc),ne(this,R2),ne(this,Ls),ne(this,q0),ne(this,X0),V(this,X0,Object.assign({},BH,r||{})),e==="any")V(this,Dh,!0),V(this,es,null);else if(e){const n=Xr.from(e);V(this,Dh,!1),V(this,es,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else V(this,Dh,!1),V(this,es,null);V(this,zc,-1),V(this,ku,new Map),V(this,ti,new Map),V(this,wu,new Map),V(this,ri,null),V(this,K0,!1),V(this,R2,1),V(this,Ls,new Map),V(this,q0,!1)}get pollingInterval(){return T(this,X0).pollingInterval}get provider(){return this}get plugins(){return Array.from(T(this,wu).values())}attachPlugin(e){if(T(this,wu).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return T(this,wu).set(e.name,e.connect(this)),this}getPlugin(e){return T(this,wu).get(e)||null}get disableCcipRead(){return T(this,q0)}set disableCcipRead(e){V(this,q0,!!e)}async ccipReadFetch(e,r,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a<n.length;a++){const c=n[a],l=c.replace("{sender}",i).replace("{data}",s),u=new Un(l);c.indexOf("{data}")===-1&&(u.body={data:s,sender:i}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:u,index:a,urls:n});let h="unknown error",d;try{d=await u.send()}catch(p){o.push(p.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:{error:p}});continue}try{const p=d.bodyJson;if(p.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:u,result:p}),p.data;p.message&&(h=p.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:p})}catch{}Be(d.statusCode<400||d.statusCode>=500,`response not found during CCIP fetch: ${h}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:h}}),o.push(h)}Be(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,r){return new c5(vH(e),this)}_wrapLog(e,r){return new uu(mH(e),this)}_wrapTransactionReceipt(e,r){return new h2(EH(e),this)}_wrapTransactionResponse(e,r){return new L0(vS(e),this)}_detectNetwork(){Be(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){Be(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=mt(await ve(this,sr,Pi).call(this,{method:"getBlockNumber"}),"%response");return T(this,zc)>=0&&V(this,zc,e),e}_getAddress(e){return an(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(ur(e))return ur(e,32)?e:ca(e);if(typeof e=="bigint"&&(e=mt(e,"blockTag")),typeof e=="number")return e>=0?ca(e):T(this,zc)>=0?ca(T(this,zc)+e):this.getBlockNumber().then(r=>ca(r+e));pe(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?C5(c.map(l=>l.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(c,l,u)=>{let h;switch(c.length){case 0:break;case 1:h=c[0];break;default:c.sort(),h=c}if(n&&(l!=null||u!=null))throw new Error("invalid filter");const d={};return h&&(d.address=h),r.length&&(d.topics=r),l&&(d.fromBlock=l),u&&(d.toBlock=u),n&&(d.blockHash=n),d};let s=[];if(e.address)if(Array.isArray(e.address))for(const c of e.address)s.push(this._getAddress(c));else s.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),s.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(s),o,a]).then(c=>i(c[0],c[1],c[2])):i(s,o,a)}_getTransactionRequest(e){const r=lu(e),n=[];if(["to","from"].forEach(i=>{if(r[i]==null)return;const s=an(r[i],this);C2(s)?n.push(async function(){r[i]=await s}()):r[i]=s}),r.blockTag!=null){const i=this._getBlockTag(r.blockTag);C2(i)?n.push(async function(){r.blockTag=await i}()):r.blockTag=i}return n.length?async function(){return await Promise.all(n),r}():r}async getNetwork(){if(T(this,es)==null){const i=(async()=>{try{const s=await this._detectNetwork();return this.emit("network",s,null),s}catch(s){throw T(this,es)===i&&V(this,es,null),s}})();return V(this,es,i),(await i).clone()}const e=T(this,es),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(T(this,Dh)?(this.emit("network",n,r),T(this,es)===e&&V(this,es,Promise.resolve(n))):Be(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()}async getFeeData(){const e=await this.getNetwork(),r=async()=>{const{_block:i,gasPrice:s,priorityFee:o}=await nn({_block:ve(this,sr,x5).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await ve(this,sr,Pi).call(this,{method:"getGasPrice"});return ct(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await ve(this,sr,Pi).call(this,{method:"getPriorityFee"});return ct(u,"%response")}catch{}return null})()});let a=null,c=null;const l=this._wrapBlock(i,e);return l&&l.baseFeePerGas&&(c=o??BigInt("1000000000"),a=l.baseFeePerGas*xH+c),new u2(s,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new Un(n.url),s=await n.processFunc(r,this,i);return new u2(s.gasPrice,s.maxFeePerGas,s.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return C2(r)&&(r=await r),ct(await ve(this,sr,Pi).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await nn({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await ve(this,sr,N5).call(this,ve(this,sr,P5).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return ct(await ve(this,sr,eg).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return mt(await ve(this,sr,eg).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return Ze(await ve(this,sr,eg).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const i=ct(r,"position");return Ze(await ve(this,sr,eg).call(this,{method:"getStorage",position:i},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:i}=await nn({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),s=Ch.from(e);if(s.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(s,i).replaceableTransaction(r)}async getBlock(e,r){const{network:n,params:i}=await nn({network:this.getNetwork(),params:ve(this,sr,x5).call(this,e,!!r)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){const{network:r,params:n}=await nn({network:this.getNetwork(),params:ve(this,sr,Pi).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await nn({network:this.getNetwork(),params:ve(this,sr,Pi).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await ve(this,sr,Pi).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await nn({network:this.getNetwork(),result:ve(this,sr,Pi).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:Ze(r)}async getLogs(e){let r=this._getFilter(e);C2(r)&&(r=await r);const{network:n,params:i}=await nn({network:this.getNetwork(),params:ve(this,sr,Pi).call(this,{method:"getLogs",filter:r})});return i.map(s=>this._wrapLog(s,n))}_getProvider(e){Be(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await k2.fromName(this,e)}async getAvatar(e){const r=await this.getResolver(e);return r?await r.getAvatar():null}async resolveName(e){const r=await this.getResolver(e);return r?await r.getAddress():null}async lookupAddress(e){e=Mt(e);const r=b0(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await k2.getEnsAddress(this),i=await new Dc(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(i==null||i===tu)return null;const s=await new Dc(i,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(s)!==e?null:s}catch(n){if(Gr(n,"BAD_DATA")&&n.value==="0x"||Gr(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,r,n){const i=r??1;return i===0?this.getTransactionReceipt(e):new Promise(async(s,o)=>{let a=null;const c=async l=>{try{const u=await this.getTransactionReceipt(e);if(u!=null&&l-u.blockNumber+1>=i){s(u),a&&(clearTimeout(a),a=null);return}}catch(u){console.log("EEE",u)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(yr("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){Be(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=T(this,Ls).get(e);r&&(r.timer&&clearTimeout(r.timer),T(this,Ls).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=yo(this,R2)._++,i=()=>{T(this,Ls).delete(n),e()};if(this.paused)T(this,Ls).set(n,{timer:null,func:i,time:r});else{const s=setTimeout(i,r);T(this,Ls).set(n,{timer:s,func:i,time:R5()})}return n}_forEachSubscriber(e){for(const r of T(this,ti).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new Vh(e.type);case"block":{const r=new SH(this);return r.pollingInterval=this.pollingInterval,r}case"safe":case"finalized":return new RH(this,e.type);case"event":return new T5(this,e.filter);case"transaction":return new NH(this,e.hash);case"orphan":return new PH(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of T(this,ti).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),T(this,ri)!=null&&r.pause(T(this,ri));break}}async on(e,r){const n=await ve(this,sr,P2).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,T(this,ri)!=null&&n.subscriber.pause(T(this,ri))),this}async once(e,r){const n=await ve(this,sr,P2).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,T(this,ri)!=null&&n.subscriber.pause(T(this,ri))),this}async emit(e,...r){const n=await ve(this,sr,tg).call(this,e,r);if(!n||n.listeners.length===0)return!1;const i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:s,once:o})=>{const a=new hy(this,o?null:s,e);try{s.call(this,...r,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),T(this,ti).delete(n.tag)),i>0}async listenerCount(e){if(e){const n=await ve(this,sr,tg).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of T(this,ti).values())r+=n.length;return r}async listeners(e){if(e){const n=await ve(this,sr,tg).call(this,e);return n?n.listeners.map(({listener:i})=>i):[]}let r=[];for(const{listeners:n}of T(this,ti).values())r=r.concat(n.map(({listener:i})=>i));return r}async off(e,r){const n=await ve(this,sr,tg).call(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:s})=>s).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),T(this,ti).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:i}=await ve(this,sr,P2).call(this,e);n&&i.stop(),T(this,ti).delete(r)}else for(const[r,{started:n,subscriber:i}]of T(this,ti))n&&i.stop(),T(this,ti).delete(r);return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return this.off(e,r)}get destroyed(){return T(this,K0)}destroy(){this.removeAllListeners();for(const e of T(this,Ls).keys())this._clearTimeout(e);V(this,K0,!0)}get paused(){return T(this,ri)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(V(this,zc,-1),T(this,ri)!=null){if(T(this,ri)==!!e)return;Be(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),V(this,ri,!!e);for(const r of T(this,Ls).values())r.timer&&clearTimeout(r.timer),r.time=R5()-r.time}resume(){if(T(this,ri)!=null){this._forEachSubscriber(e=>e.resume()),V(this,ri,null);for(const e of T(this,Ls).values()){let r=e.time;r<0&&(r=0),e.time=R5(),setTimeout(e.func,r)}}}}ti=new WeakMap,wu=new WeakMap,ri=new WeakMap,K0=new WeakMap,es=new WeakMap,Dh=new WeakMap,ku=new WeakMap,zc=new WeakMap,R2=new WeakMap,Ls=new WeakMap,q0=new WeakMap,X0=new WeakMap,sr=new WeakSet,Pi=async function(t){const e=T(this,X0).cacheTimeout;if(e<0)return await this._perform(t);const r=S2(t.method,t);let n=T(this,ku).get(r);return n||(n=this._perform(t),T(this,ku).set(r,n),setTimeout(()=>{T(this,ku).get(r)===n&&T(this,ku).delete(r)},e)),await n},P5=async function(t,e,r){Be(r<IH,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},t,{blockTag:e,enableCcipRead:!0})});const n=lu(t);try{return Ze(await this._perform({method:"call",transaction:n,blockTag:e}))}catch(i){if(!this.disableCcipRead&&Dp(i)&&i.data&&r>=0&&e==="latest"&&n.to!=null&&dr(i.data,0,4)==="0x556f1830"){const s=i.data,o=await an(n.to,this);let a;try{a=VH(dr(i.data,4))}catch(u){Be(!1,u.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:n,info:{data:s}})}Be(a.sender.toLowerCase()===o.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:s,reason:"OffchainLookup",transaction:n,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:a.errorArgs}});const c=await this.ccipReadFetch(n,a.calldata,a.urls);Be(c!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:n,info:{data:i.data,errorArgs:a.errorArgs}});const l={to:o,data:Zt([a.selector,FH([c,a.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:l});try{const u=await ve(this,sr,P5).call(this,l,e,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},l),result:u}),u}catch(u){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},l),error:u}),u}}throw i}},N5=async function(t){const{value:e}=await nn({network:this.getNetwork(),value:t});return e},eg=async function(t,e,r){let n=this._getAddress(e),i=this._getBlockTag(r);return(typeof n!="string"||typeof i!="string")&&([n,i]=await Promise.all([n,i])),await ve(this,sr,N5).call(this,ve(this,sr,Pi).call(this,Object.assign(t,{address:n,blockTag:i})))},x5=async function(t,e){if(ur(t,32))return await ve(this,sr,Pi).call(this,{method:"getBlock",blockHash:t,includeTransactions:e});let r=this._getBlockTag(t);return typeof r!="string"&&(r=await r),await ve(this,sr,Pi).call(this,{method:"getBlock",blockTag:r,includeTransactions:e})},tg=async function(t,e){let r=await S5(t,this);return r.type==="event"&&e&&e.length>0&&e[0].removed===!0&&(r=await S5({orphan:"drop-log",log:e[0]},this)),T(this,ti).get(r.tag)||null},P2=async function(t){const e=await S5(t,this),r=e.tag;let n=T(this,ti).get(r);return n||(n={subscriber:this._getSubscriber(e),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},T(this,ti).set(r,n)),n};function MH(t,e){try{const r=I5(t,e);if(r)return la(r)}catch{}return null}function I5(t,e){if(t==="0x")return null;try{const r=mt(dr(t,e,e+32)),n=mt(dr(t,r,r+32));return dr(t,r+32,r+32+n)}catch{}return null}function _S(t){const e=on(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function UH(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const LH=new Uint8Array([]);function FH(t){const e=[];let r=0;for(let n=0;n<t.length;n++)e.push(LH),r+=32;for(let n=0;n<t.length;n++){const i=qe(t[n]);e[n]=_S(r),e.push(_S(i.length)),e.push(UH(i)),r+=32+Math.ceil(i.length/32)*32}return Zt(e)}const TS="0x0000000000000000000000000000000000000000000000000000000000000000";function VH(t){const e={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};Be(oa(t)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=dr(t,0,32);Be(dr(r,0,12)===dr(TS,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=dr(r,12);try{const n=[],i=mt(dr(t,32,64)),s=mt(dr(t,i,i+32)),o=dr(t,i+32);for(let a=0;a<s;a++){const c=MH(o,a*32);if(c==null)throw new Error("abort");n.push(c)}e.urls=n}catch{Be(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const n=I5(t,64);if(n==null)throw new Error("abort");e.calldata=n}catch{Be(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}Be(dr(t,100,128)===dr(TS,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),e.selector=dr(t,96,100);try{const n=I5(t,128);if(n==null)throw new Error("abort");e.extraData=n}catch{Be(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return e.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(n=>e[n]),e}function jh(t,e){if(t.provider)return t.provider;Be(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function CS(t,e){let r=lu(e);if(r.to!=null&&(r.to=an(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),an(n,t)]).then(([i,s])=>(pe(i.toLowerCase()===s.toLowerCase(),"transaction from mismatch","tx.from",s),i))}else r.from=t.getAddress();return await nn(r)}class Gh{constructor(e){X(this,"provider"),rt(this,{provider:e||null})}async getNonce(e){return jh(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await CS(this,e)}async populateTransaction(e){const r=jh(this,"populateTransaction"),n=await CS(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const i=await this.provider.getNetwork();if(n.chainId!=null){const o=ct(n.chainId);pe(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;const s=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||s)?pe(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&s&&pe(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await r.getFeeData();Be(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await r.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(Be(!s,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):Be(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await nn(n)}async estimateGas(e){return jh(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return jh(this,"call").call(await this.populateCall(e))}async resolveName(e){return await jh(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=jh(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=Ch.from(n);return await r.broadcastTransaction(await this.signTransaction(i))}}var rg,N2;const DH=class HV extends Gh{constructor(e,r){super(r),ne(this,rg),X(this,"address"),rt(this,{address:e})}async getAddress(){return this.address}connect(e){return new HV(this.address,e)}async signTransaction(e){ve(this,rg,N2).call(this,"transactions","signTransaction")}async signMessage(e){ve(this,rg,N2).call(this,"messages","signMessage")}async signTypedData(e,r,n){ve(this,rg,N2).call(this,"typed-data","signTypedData")}};rg=new WeakSet,N2=function(t,e){Be(!1,`VoidSigner cannot sign ${t}`,"UNSUPPORTED_OPERATION",{operation:e})};let x2=DH;const SS=new Set;function Na(t){SS.has(t)||(SS.add(t),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${t} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}function WH(t){return JSON.parse(JSON.stringify(t))}var fi,xa,zh,Eu,$h,ng,Hh,O5,B5;class RS{constructor(e){ne(this,Hh),ne(this,fi),ne(this,xa),ne(this,zh),ne(this,Eu),ne(this,$h),ne(this,ng),V(this,fi,e),V(this,xa,null),V(this,zh,ve(this,Hh,O5).bind(this)),V(this,Eu,!1),V(this,$h,null),V(this,ng,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){T(this,Eu)||(V(this,Eu,!0),ve(this,Hh,O5).call(this,-2))}stop(){T(this,Eu)&&(V(this,Eu,!1),V(this,ng,!0),ve(this,Hh,B5).call(this),T(this,fi).off("block",T(this,zh)))}pause(e){e&&ve(this,Hh,B5).call(this),T(this,fi).off("block",T(this,zh))}resume(){this.start()}}fi=new WeakMap,xa=new WeakMap,zh=new WeakMap,Eu=new WeakMap,$h=new WeakMap,ng=new WeakMap,Hh=new WeakSet,O5=async function(t){try{T(this,xa)==null&&V(this,xa,this._subscribe(T(this,fi)));let e=null;try{e=await T(this,xa)}catch(i){if(!Gr(i,"UNSUPPORTED_OPERATION")||i.operation!=="eth_newFilter")throw i}if(e==null){V(this,xa,null),T(this,fi)._recoverSubscriber(this,this._recover(T(this,fi)));return}const r=await T(this,fi).getNetwork();if(T(this,$h)||V(this,$h,r),T(this,$h).chainId!==r.chainId)throw new Error("chaid changed");if(T(this,ng))return;const n=await T(this,fi).send("eth_getFilterChanges",[e]);await this._emitResults(T(this,fi),n)}catch(e){console.log("@TODO",e)}T(this,fi).once("block",T(this,zh))},B5=function(){const t=T(this,xa);t&&(V(this,xa,null),t.then(e=>{T(this,fi).destroyed||T(this,fi).send("eth_uninstallFilter",[e])}))};var Zh;class jH extends RS{constructor(e,r){super(e),ne(this,Zh),V(this,Zh,WH(r))}_recover(e){return new T5(e,T(this,Zh))}async _subscribe(e){return await e.send("eth_newFilter",[T(this,Zh)])}async _emitResults(e,r){for(const n of r)e.emit(T(this,Zh),e._wrapLog(n,e._network))}}Zh=new WeakMap;class GH extends RS{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const zH="bigint,boolean,function,number,string,symbol".split(/,/g);function I2(t){if(t==null||zH.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(I2);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function $H(t){return new Promise(e=>{setTimeout(e,t)})}function Jh(t){return t&&t.toLowerCase()}function PS(t){return t&&typeof t.pollingInterval=="number"}const NS={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class ig extends Gh{constructor(e,r){super(e),X(this,"address"),r=Mt(r),rt(this,{address:r})}connect(e){Be(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const r=I2(e),n=[];if(r.from){const s=r.from;n.push((async()=>{const o=await an(s,this.provider);pe(o!=null&&o.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),r.from=o})())}else r.from=this.address;if(r.gasLimit==null&&n.push((async()=>{r.gasLimit=await this.provider.estimateGas({...r,from:this.address})})()),r.to!=null){const s=r.to;n.push((async()=>{r.to=await an(s,this.provider)})())}n.length&&await Promise.all(n);const i=this.provider.getRpcTransaction(r);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(e){const r=await this.provider.getBlockNumber(),n=await this.sendUncheckedTransaction(e);return await new Promise((i,s)=>{const o=[1e3,100];let a=0;const c=async()=>{try{const l=await this.provider.getTransaction(n);if(l!=null){i(l.replaceableTransaction(r));return}}catch(l){if(Gr(l,"CANCELLED")||Gr(l,"BAD_DATA")||Gr(l,"NETWORK_ERROR")||Gr(l,"UNSUPPORTED_OPERATION")){l.info==null&&(l.info={}),l.info.sendTransactionHash=n,s(l);return}if(Gr(l,"INVALID_ARGUMENT")&&(a++,l.info==null&&(l.info={}),l.info.sendTransactionHash=n,a>10)){s(l);return}this.provider.emit("error",yr("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:l}))}this.provider._setTimeout(()=>{c()},o.pop()||4e3)};c()})}async signTransaction(e){const r=I2(e);if(r.from){const i=await an(r.from,this.provider);pe(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),r.from=i}else r.from=this.address;const n=this.provider.getRpcTransaction(r);return await this.provider.send("eth_signTransaction",[n])}async signMessage(e){const r=typeof e=="string"?qr(e):e;return await this.provider.send("personal_sign",[Ze(r),this.address.toLowerCase()])}async signTypedData(e,r,n){const i=I2(n),s=await ou.resolveNames(e,r,i,async o=>{const a=await an(o);return pe(a!=null,"TypedData does not support null address","value",o),a});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(ou.getPayload(s.domain,r,s.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const r=typeof e=="string"?qr(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Ze(r)])}}var Qh,sg,$c,Ia,So,Fs,Ni,O2,M5;class B2 extends Wh{constructor(e,r){super(e,r),ne(this,O2),ne(this,Qh),ne(this,sg),ne(this,$c),ne(this,Ia),ne(this,So),ne(this,Fs),ne(this,Ni),V(this,sg,1),V(this,Qh,Object.assign({},NS,r||{})),V(this,$c,[]),V(this,Ia,null),V(this,Fs,null),V(this,Ni,null);{let i=null;const s=new Promise(o=>{i=o});V(this,So,{promise:s,resolve:i})}const n=this._getOption("staticNetwork");typeof n=="boolean"?(pe(!n||e!=="any","staticNetwork cannot be used on special network 'any'","options",r),n&&e!=null&&V(this,Fs,Xr.from(e))):n&&(pe(e==null||n.matches(e),"staticNetwork MUST match network object","options",r),V(this,Fs,n))}_getOption(e){return T(this,Qh)[e]}get _network(){return Be(T(this,Fs),"network is not available yet","NETWORK_ERROR"),T(this,Fs)}async _perform(e){if(e.method==="call"||e.method==="estimateGas"){let n=e.transaction;if(n&&n.type!=null&&ct(n.type)&&n.maxFeePerGas==null&&n.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(e=Object.assign({},e,{transaction:Object.assign({},n,{type:void 0})}))}}const r=this.getRpcRequest(e);return r!=null?await this.send(r.method,r.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e)if(e===!0){if(T(this,Fs))return T(this,Fs)}else return e;return T(this,Ni)?await T(this,Ni):this.ready?(V(this,Ni,(async()=>{try{const r=Xr.from(ct(await this.send("eth_chainId",[])));return V(this,Ni,null),r}catch(r){throw V(this,Ni,null),r}})()),await T(this,Ni)):(V(this,Ni,(async()=>{const r={id:yo(this,sg)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:r});let n;try{n=(await this._send(r))[0],V(this,Ni,null)}catch(i){throw V(this,Ni,null),this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:n}),"result"in n)return Xr.from(ct(n.result));throw this.getRpcError(r,n)})()),await T(this,Ni))}_start(){T(this,So)==null||T(this,So).resolve==null||(T(this,So).resolve(),V(this,So,null),(async()=>{for(;T(this,Fs)==null&&!this.destroyed;)try{V(this,Fs,await this._detectNetwork())}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",yr("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await $H(1e3)}ve(this,O2,M5).call(this)})())}async _waitUntilReady(){if(T(this,So)!=null)return await T(this,So).promise}_getSubscriber(e){return e.type==="pending"?new GH(this):e.type==="event"?this._getOption("polling")?new T5(this,e.filter):new jH(this,e.filter):e.type==="orphan"&&e.filter.orphan==="drop-log"?new Vh("orphan"):super._getSubscriber(e)}get ready(){return T(this,So)==null}getRpcTransaction(e){const r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(n=>{if(e[n]==null)return;let i=n;n==="gasLimit"&&(i="gas"),r[i]=ca(ct(e[n],`tx.${n}`))}),["from","to","data"].forEach(n=>{e[n]!=null&&(r[n]=Ze(e[n]))}),e.accessList&&(r.accessList=To(e.accessList)),e.blobVersionedHashes&&(r.blobVersionedHashes=e.blobVersionedHashes.map(n=>n.toLowerCase())),r}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[Jh(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[Jh(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[Jh(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[Jh(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&e.filter.address!=null&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(Jh):e.filter.address=Jh(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,r){const{method:n}=e,{error:i}=r;if(n==="eth_estimateGas"&&i.message){const a=i.message;if(!a.match(/revert/i)&&a.match(/insufficient funds/i))return yr("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}})}if(n==="eth_call"||n==="eth_estimateGas"){const a=U5(i),c=Ph.getBuiltinCallException(n==="eth_call"?"call":"estimateGas",e.params[0],a?a.data:null);return c.info={error:i,payload:e},c}const s=JSON.stringify(HH(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return yr("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[n]||"unknown",reason:"rejected",info:{payload:e,error:i}});if(n==="eth_sendRawTransaction"||n==="eth_sendTransaction"){const a=e.params[0];if(s.match(/insufficient funds|base fee exceeds gas limit/i))return yr("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:a,info:{error:i}});if(s.match(/nonce/i)&&s.match(/too low/i))return yr("nonce has already been used","NONCE_EXPIRED",{transaction:a,info:{error:i}});if(s.match(/replacement transaction/i)&&s.match(/underpriced/i))return yr("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:a,info:{error:i}});if(s.match(/only replay-protected/i))return yr("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:n,info:{transaction:a,info:{error:i}}})}let o=!!s.match(/the method .* does not exist/i);return o||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(o=!0),o?yr("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}):yr("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,r){if(this.destroyed)return Promise.reject(yr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const n=yo(this,sg)._++,i=new Promise((s,o)=>{T(this,$c).push({resolve:s,reject:o,payload:{method:e,params:r,id:n,jsonrpc:"2.0"}})});return ve(this,O2,M5).call(this),i}async getSigner(e){e==null&&(e=0);const r=this.send("eth_accounts",[]);if(typeof e=="number"){const i=await r;if(e>=i.length)throw new Error("no such account");return new ig(this,i[e])}const{accounts:n}=await nn({network:this.getNetwork(),accounts:r});e=Mt(e);for(const i of n)if(Mt(i)===e)return new ig(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(e=>new ig(this,e))}destroy(){T(this,Ia)&&(clearTimeout(T(this,Ia)),V(this,Ia,null));for(const{payload:e,reject:r}of T(this,$c))r(yr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));V(this,$c,[]),super.destroy()}}Qh=new WeakMap,sg=new WeakMap,$c=new WeakMap,Ia=new WeakMap,So=new WeakMap,Fs=new WeakMap,Ni=new WeakMap,O2=new WeakSet,M5=function(){if(T(this,Ia))return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");V(this,Ia,setTimeout(()=>{V(this,Ia,null);const e=T(this,$c);for(V(this,$c,[]);e.length;){const r=[e.shift()];for(;e.length&&r.length!==T(this,Qh).batchMaxCount;)if(r.push(e.shift()),JSON.stringify(r.map(n=>n.payload)).length>T(this,Qh).batchMaxSize){e.unshift(r.pop());break}(async()=>{const n=r.length===1?r[0].payload:r.map(i=>i.payload);this.emit("debug",{action:"sendRpcPayload",payload:n});try{const i=await this._send(n);this.emit("debug",{action:"receiveRpcResult",result:i});for(const{resolve:s,reject:o,payload:a}of r){if(this.destroyed){o(yr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:a.method}));continue}const c=i.filter(l=>l.id===a.id)[0];if(c==null){const l=yr("missing response for request","BAD_DATA",{value:i,info:{payload:a}});this.emit("error",l),o(l);continue}if("error"in c){o(this.getRpcError(a,c));continue}s(c.result)}}catch(i){this.emit("debug",{action:"receiveRpcError",error:i});for(const{reject:s}of r)s(i)}})()}},t))};var Au;class xS extends B2{constructor(e,r){super(e,r),ne(this,Au);let n=this._getOption("pollingInterval");n==null&&(n=NS.pollingInterval),V(this,Au,n)}_getSubscriber(e){const r=super._getSubscriber(e);return PS(r)&&(r.pollingInterval=T(this,Au)),r}get pollingInterval(){return T(this,Au)}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");V(this,Au,e),this._forEachSubscriber(r=>{PS(r)&&(r.pollingInterval=T(this,Au))})}}Au=new WeakMap;var og;class xi extends xS{constructor(e,r,n){e==null&&(e="http://localhost:8545"),super(r,n),ne(this,og),typeof e=="string"?V(this,og,new Un(e)):V(this,og,e.clone())}_getConnection(){return T(this,og).clone()}async send(e,r){return await this._start(),await super.send(e,r)}async _send(e){const r=this._getConnection();r.body=JSON.stringify(e),r.setHeader("content-type","application/json");const n=await r.send();n.assertOk();let i=n.bodyJson;return Array.isArray(i)||(i=[i]),i}}og=new WeakMap;function U5(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&ur(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=U5(t[e]);if(r)return r}return null}if(typeof t=="string")try{return U5(JSON.parse(t))}catch{}return null}function L5(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)L5(t[r],e);if(typeof t=="string")try{return L5(JSON.parse(t),e)}catch{}}}function HH(t){const e=[];return L5(t,e),e}const M2="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function ZH(t){switch(t){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}pe(!1,"unsupported network","network",t)}class Yh extends xi{constructor(e,r){e==null&&(e="mainnet");const n=Xr.from(e);r==null&&(r=M2);const i={polling:!0,staticNetwork:n},s=Yh.getRequest(n,r);super(s,n,i),X(this,"apiKey"),rt(this,{apiKey:r})}_getProvider(e){try{return new Yh(e,this.apiKey)}catch{}return super._getProvider(e)}static getRequest(e,r){r==null&&(r=M2);const n=new Un(`https://${ZH(e.name)}/${r}`);return n.allowGzip=!0,r===M2&&(n.retryFunc=async(i,s,o)=>(Na("AnkrProvider"),!0)),n}getRpcError(e,r){return e.method==="eth_sendRawTransaction"&&r&&r.error&&r.error.message==="INTERNAL_ERROR: could not replace existing tx"&&(r.error.message="replacement transaction underpriced"),super.getRpcError(e,r)}isCommunityResource(){return this.apiKey===M2}}const U2="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";function JH(t){switch(t){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}pe(!1,"unsupported network","network",t)}class Kh extends xi{constructor(e,r){e==null&&(e="mainnet");const n=Xr.from(e);r==null&&(r=U2);const i=Kh.getRequest(n,r);super(i,n,{staticNetwork:n}),X(this,"apiKey"),rt(this,{apiKey:r})}_getProvider(e){try{return new Kh(e,this.apiKey)}catch{}return super._getProvider(e)}async _perform(e){if(e.method==="getTransactionResult"){const{trace:r,tx:n}=await nn({trace:this.send("trace_transaction",[e.hash]),tx:this.getTransaction(e.hash)});if(r==null||n==null)return null;let i,s=!1;try{i=r[0].result.output,s=r[0].error==="Reverted"}catch{}if(i)return Be(!s,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:i,reason:null,transaction:n,invocation:null,revert:null}),i;Be(!1,"could not parse trace result","BAD_DATA",{value:r})}return await super._perform(e)}isCommunityResource(){return this.apiKey===U2}static getRequest(e,r){r==null&&(r=U2);const n=new Un(`https://${JH(e.name)}/v2/${r}`);return n.allowGzip=!0,r===U2&&(n.retryFunc=async(i,s,o)=>(Na("alchemy"),!0)),n}}function L2(t){switch(t){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}pe(!1,"unsupported network","network",t)}function QH(t){switch(t){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}pe(!1,"unsupported network","network",t)}class qh extends xi{constructor(e,r){e==null&&(e="mainnet");const n=Xr.from(e);r==null&&(r=L2(n.name));const i=qh.getRequest(n,r);super(i,n,{staticNetwork:n}),X(this,"apiKey"),rt(this,{apiKey:r})}_getProvider(e){try{return new qh(e,this.apiKey)}catch{}return super._getProvider(e)}isCommunityResource(){return this.apiKey===L2(this._network.name)}static getRequest(e,r){r==null&&(r=L2(e.name));const n=new Un(`https://${QH(e.name)}/${r}`);return n.allowGzip=!0,r===L2(e.name)&&(n.retryFunc=async(i,s,o)=>(Na("ChainstackProvider"),!0)),n}}class F5 extends xi{constructor(e){e==null&&(e="mainnet");const r=Xr.from(e);pe(r.name==="mainnet","unsupported network","network",e),super("https://cloudflare-eth.com/",r,{staticNetwork:r})}}const IS=2e3;function YH(t){return t&&typeof t.then=="function"}const OS="org.ethers.plugins.provider.Etherscan";class F2 extends Ra{constructor(e){super(OS),X(this,"baseUrl"),rt(this,{baseUrl:e})}clone(){return new F2(this.baseUrl)}}const KH=["enableCcipRead"];let qH=1;var ag;class V5 extends Wh{constructor(e,r){const n=r??null;super(),X(this,"network"),X(this,"apiKey"),ne(this,ag);const i=Xr.from(e);V(this,ag,i.getPlugin(OS)),rt(this,{apiKey:n,network:i}),this.getBaseUrl()}getBaseUrl(){if(T(this,ag))return T(this,ag).baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}pe(!1,"unsupported network","network",this.network)}getUrl(e,r){const n=Object.keys(r).reduce((s,o)=>{const a=r[o];return a!=null&&(s+=`&${o}=${a}`),s},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.getBaseUrl()}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.getBaseUrl()}/api`}getPostData(e,r){return r.module=e,r.apikey=this.apiKey,r}async detectNetwork(){return this.network}async fetch(e,r,n){const i=qH++,s=n?this.getPostUrl():this.getUrl(e,r),o=n?this.getPostData(e,r):null;this.emit("debug",{action:"sendRequest",id:i,url:s,payload:o});const a=new Un(s);a.setThrottleParams({slotInterval:1e3}),a.retryFunc=(u,h,d)=>(this.isCommunityResource()&&Na("Etherscan"),Promise.resolve(!0)),a.processFunc=async(u,h)=>{const d=h.hasBody()?JSON.parse(la(h.body)):{},p=(typeof d.result=="string"?d.result:"").toLowerCase().indexOf("rate limit")>=0;return e==="proxy"?d&&d.status==0&&d.message=="NOTOK"&&p&&(this.emit("debug",{action:"receiveError",id:i,reason:"proxy-NOTOK",error:d}),h.throwThrottleError(d.result,IS)):p&&(this.emit("debug",{action:"receiveError",id:i,reason:"null result",error:d.result}),h.throwThrottleError(d.result,IS)),h},o&&(a.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),a.body=Object.keys(o).map(u=>`${u}=${o[u]}`).join("&"));const c=await a.send();try{c.assertOk()}catch(u){this.emit("debug",{action:"receiveError",id:i,error:u,reason:"assertOk"}),Be(!1,"response error","SERVER_ERROR",{request:a,response:c})}c.hasBody()||(this.emit("debug",{action:"receiveError",id:i,error:"missing body",reason:"null body"}),Be(!1,"missing response","SERVER_ERROR",{request:a,response:c}));const l=JSON.parse(la(c.body));return e==="proxy"?(l.jsonrpc!="2.0"&&(this.emit("debug",{action:"receiveError",id:i,result:l,reason:"invalid JSON-RPC"}),Be(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:a,response:c,info:{result:l}})),l.error&&(this.emit("debug",{action:"receiveError",id:i,result:l,reason:"JSON-RPC error"}),Be(!1,"error response","SERVER_ERROR",{request:a,response:c,info:{result:l}})),this.emit("debug",{action:"receiveRequest",id:i,result:l}),l.result):l.status==0&&(l.message==="No records found"||l.message==="No transactions found")?(this.emit("debug",{action:"receiveRequest",id:i,result:l}),l.result):((l.status!=1||typeof l.message=="string"&&!l.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:i,result:l}),Be(!1,"error response","SERVER_ERROR",{request:a,response:c,info:{result:l}})),this.emit("debug",{action:"receiveRequest",id:i,result:l}),l.result)}_getTransactionPostData(e){const r={};for(let n in e){if(KH.indexOf(n)>=0||e[n]==null)continue;let i=e[n];if(!(n==="type"&&i===0)&&!(n==="blockTag"&&i==="latest")){if({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[n])i=ca(i);else if(n==="accessList")i="["+To(i).map(s=>`{address:"${s.address}",storageKeys:["${s.storageKeys.join('","')}"]}`).join(",")+"]";else if(n==="blobVersionedHashes"){if(i.length===0)continue;Be(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:e}})}else i=Ze(i);r[n]=i}}return r}_checkError(e,r,n){let i="";if(Gr(r,"SERVER_ERROR")){try{i=r.info.result.error.message}catch{}if(!i)try{i=r.info.message}catch{}}if(e.method==="estimateGas"&&!i.match(/revert/i)&&i.match(/insufficient funds/i)&&Be(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.transaction}),(e.method==="call"||e.method==="estimateGas")&&i.match(/execution reverted/i)){let s="";try{s=r.info.result.error.data}catch{}const o=Ph.getBuiltinCallException(e.method,e.transaction,s);throw o.info={request:e,error:r},o}if(i&&e.method==="broadcastTransaction"){const s=Ch.from(e.signedTransaction);i.match(/replacement/i)&&i.match(/underpriced/i)&&Be(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:s}),i.match(/insufficient funds/)&&Be(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:s}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Be(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:s})}throw r}async _detectNetwork(){return this.network}async _perform(e){switch(e.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if(this.network.name==="mainnet")return"1000000000";if(this.network.name==="optimism")return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch(r=>this._checkError(e,r,e.signedTransaction));case"getBlock":if("blockTag"in e)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"});Be(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.hash});case"call":{if(e.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const r=this._getTransactionPostData(e.transaction);r.module="proxy",r.action="eth_call";try{return await this.fetch("proxy",r,!0)}catch(n){return this._checkError(e,n,e.transaction)}}case"estimateGas":{const r=this._getTransactionPostData(e.transaction);r.module="proxy",r.action="eth_estimateGas";try{return await this.fetch("proxy",r,!0)}catch(n){return this._checkError(e,n,e.transaction)}}}return super._perform(e)}async getNetwork(){return this.network}async getEtherPrice(){return this.network.name!=="mainnet"?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(e){let r=this._getAddress(e);YH(r)&&(r=await r);try{const n=await this.fetch("contract",{action:"getabi",address:r}),i=JSON.parse(n);return new Dc(r,i,this)}catch{return null}}isCommunityResource(){return this.apiKey==null}}ag=new WeakMap;function XH(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}const eZ=XH().WebSocket;var Oa,V2,_u,Xh,Tu;class cg{constructor(e,r){ne(this,Oa),ne(this,V2),ne(this,_u),ne(this,Xh),ne(this,Tu),V(this,Oa,e),V(this,V2,JSON.stringify(r)),V(this,_u,null),V(this,Xh,null),V(this,Tu,null)}get filter(){return JSON.parse(T(this,V2))}start(){V(this,_u,T(this,Oa).send("eth_subscribe",this.filter).then(e=>(T(this,Oa)._register(e,this),e)))}stop(){T(this,_u).then(e=>{T(this,Oa).destroyed||T(this,Oa).send("eth_unsubscribe",[e])}),V(this,_u,null)}pause(e){Be(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),V(this,Xh,!!e)}resume(){V(this,Xh,null)}_handleMessage(e){if(T(this,_u)!=null&&T(this,Xh)===null){let r=T(this,Tu);r==null?r=this._emit(T(this,Oa),e):r=r.then(async()=>{await this._emit(T(this,Oa),e)}),V(this,Tu,r.then(()=>{T(this,Tu)===r&&V(this,Tu,null)}))}}async _emit(e,r){throw new Error("sub-classes must implemente this; _emit")}}Oa=new WeakMap,V2=new WeakMap,_u=new WeakMap,Xh=new WeakMap,Tu=new WeakMap;class D5 extends cg{constructor(e){super(e,["newHeads"])}async _emit(e,r){e.emit("block",parseInt(r.number))}}class W5 extends cg{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,r){e.emit("pending",r)}}var D2;class j5 extends cg{constructor(e,r){super(e,["logs",r]),ne(this,D2),V(this,D2,JSON.stringify(r))}get logFilter(){return JSON.parse(T(this,D2))}async _emit(e,r){e.emit(this.logFilter,e._wrapLog(r,e._network))}}D2=new WeakMap;var ef,lg,Cu;class G5 extends B2{constructor(e,r){const n=Object.assign({},r??{});pe(n.batchMaxCount==null||n.batchMaxCount===1,"sockets-based providers do not support batches","options.batchMaxCount",r),n.batchMaxCount=1,n.staticNetwork==null&&(n.staticNetwork=!0),super(e,n),ne(this,ef),ne(this,lg),ne(this,Cu),V(this,ef,new Map),V(this,lg,new Map),V(this,Cu,new Map)}_getSubscriber(e){switch(e.type){case"close":return new Vh("close");case"block":return new D5(this);case"pending":return new W5(this);case"event":return new j5(this,e.filter);case"orphan":if(e.filter.orphan==="drop-log")return new Vh("drop-log")}return super._getSubscriber(e)}_register(e,r){T(this,lg).set(e,r);const n=T(this,Cu).get(e);if(n){for(const i of n)r._handleMessage(i);T(this,Cu).delete(e)}}async _send(e){pe(!Array.isArray(e),"WebSocket does not support batch send","payload",e);const r=new Promise((n,i)=>{T(this,ef).set(e.id,{payload:e,resolve:n,reject:i})});return await this._waitUntilReady(),await this._write(JSON.stringify(e)),[await r]}async _processMessage(e){const r=JSON.parse(e);if(r&&typeof r=="object"&&"id"in r){const n=T(this,ef).get(r.id);if(n==null){this.emit("error",yr("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:r}));return}T(this,ef).delete(r.id),n.resolve(r)}else if(r&&r.method==="eth_subscription"){const n=r.params.subscription,i=T(this,lg).get(n);if(i)i._handleMessage(r.params.result);else{let s=T(this,Cu).get(n);s==null&&(s=[],T(this,Cu).set(n,s)),s.push(r.params.result)}}else{this.emit("error",yr("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:r}));return}}async _write(e){throw new Error("sub-classes must override this")}}ef=new WeakMap,lg=new WeakMap,Cu=new WeakMap;var tf,Ro;class W2 extends G5{constructor(e,r,n){super(r,n),ne(this,tf),ne(this,Ro),typeof e=="string"?(V(this,tf,()=>new eZ(e)),V(this,Ro,T(this,tf).call(this))):typeof e=="function"?(V(this,tf,e),V(this,Ro,e())):(V(this,tf,null),V(this,Ro,e)),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(i){console.log("failed to start WebsocketProvider",i)}},this.websocket.onmessage=i=>{this._processMessage(i.data)}}get websocket(){if(T(this,Ro)==null)throw new Error("websocket closed");return T(this,Ro)}async _write(e){this.websocket.send(e)}async destroy(){T(this,Ro)!=null&&(T(this,Ro).close(),V(this,Ro,null)),super.destroy()}}tf=new WeakMap,Ro=new WeakMap;const ug="84842078b09946638c03157f83405213";function tZ(t){switch(t){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}pe(!1,"unsupported network","network",t)}class z5 extends W2{constructor(e,r){const n=new Su(e,r),i=n._getConnection();Be(!i.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});const s=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(s,n._network),X(this,"projectId"),X(this,"projectSecret"),rt(this,{projectId:n.projectId,projectSecret:n.projectSecret})}isCommunityResource(){return this.projectId===ug}}class Su extends xi{constructor(e,r,n){e==null&&(e="mainnet");const i=Xr.from(e);r==null&&(r=ug),n==null&&(n=null);const s=Su.getRequest(i,r,n);super(s,i,{staticNetwork:i}),X(this,"projectId"),X(this,"projectSecret"),rt(this,{projectId:r,projectSecret:n})}_getProvider(e){try{return new Su(e,this.projectId,this.projectSecret)}catch{}return super._getProvider(e)}isCommunityResource(){return this.projectId===ug}static getWebSocketProvider(e,r){return new z5(e,r)}static getRequest(e,r,n){r==null&&(r=ug),n==null&&(n=null);const i=new Un(`https://${tZ(e.name)}/v3/${r}`);return i.allowGzip=!0,n&&i.setCredentials("",n),r===ug&&(i.retryFunc=async(s,o,a)=>(Na("InfuraProvider"),!0)),i}}const j2="919b412a057b5e9c9b6dce193c5a60242d6efadb";function rZ(t){switch(t){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}pe(!1,"unsupported network","network",t)}class rf extends xi{constructor(e,r){e==null&&(e="mainnet");const n=Xr.from(e);r==null&&(r=j2);const i=rf.getRequest(n,r);super(i,n,{staticNetwork:n}),X(this,"token"),rt(this,{token:r})}_getProvider(e){try{return new rf(e,this.token)}catch{}return super._getProvider(e)}isCommunityResource(){return this.token===j2}static getRequest(e,r){r==null&&(r=j2);const n=new Un(`https://${rZ(e.name)}/${r}`);return n.allowGzip=!0,r===j2&&(n.retryFunc=async(i,s,o)=>(Na("QuickNodeProvider"),!0)),n}}const nZ=BigInt("1"),iZ=BigInt("2");function sZ(t){for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}}function oZ(t){return new Promise(e=>{setTimeout(e,t)})}function $5(){return new Date().getTime()}function H5(t){return JSON.stringify(t,(e,r)=>typeof r=="bigint"?{type:"bigint",value:r.toString()}:r)}const BS={stallTimeout:400,priority:1,weight:1},MS={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};async function aZ(t,e){for(;(t.blockNumber<0||t.blockNumber<e)&&(t._updateNumber||(t._updateNumber=(async()=>{try{const r=await t.provider.getBlockNumber();r>t.blockNumber&&(t.blockNumber=r)}catch(r){t.blockNumber=-2,t._lastFatalError=r,t._lastFatalErrorTimestamp=$5()}t._updateNumber=null})()),await t._updateNumber,t.outOfSync++,!t._lastFatalError););}function dg(t){if(t==null)return"null";if(Array.isArray(t))return"["+t.map(dg).join(",")+"]";if(typeof t=="object"&&typeof t.toJSON=="function")return dg(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":case"number":return BigInt(t).toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{"+e.map(r=>`${JSON.stringify(r)}:${dg(t[r])}`).join(",")+"}"}}throw console.log("Could not serialize",t),new Error("Hmm...")}function Z5(t){if("error"in t){const r=t.error;return{tag:dg(r),value:r}}const e=t.result;return{tag:dg(e),value:e}}function G2(t,e){const r=new Map;for(const{value:i,tag:s,weight:o}of e){const a=r.get(s)||{value:i,weight:0};a.weight+=o,r.set(s,a)}let n=null;for(const i of r.values())i.weight>=t&&(!n||i.weight>n.weight)&&(n=i);if(n)return n.value}function J5(t,e){let r=0;const n=new Map;let i=null;const s=[];for(const{value:a,tag:c,weight:l}of e)if(a instanceof Error){const u=n.get(c)||{value:a,weight:0};u.weight+=l,n.set(c,u),(i==null||u.weight>i.weight)&&(i=u)}else s.push(BigInt(a)),r+=l;if(r<t)return i&&i.weight>=t?i.value:void 0;s.sort((a,c)=>a<c?-1:c>a?1:0);const o=Math.floor(s.length/2);return s.length%2?s[o]:(s[o-1]+s[o]+nZ)/iZ}function Q5(t,e){const r=G2(t,e);if(r!==void 0)return r;for(const n of e)if(n.value)return n.value}function cZ(t,e){if(t===1)return mt(J5(t,e),"%internal");const r=new Map,n=(o,a)=>{const c=r.get(o)||{result:o,weight:0};c.weight+=a,r.set(o,c)};for(const{weight:o,value:a}of e){const c=mt(a);n(c-1,o),n(c,o),n(c+1,o)}let i=0,s;for(const{weight:o,result:a}of r.values())o>=t&&(o>i||s!=null&&o===i&&a>s)&&(i=o,s=a);return s}var Ii,Hc,hg,Ba,US,Y5,LS,FS,K5;class q5 extends Wh{constructor(e,r,n){super(r,n),ne(this,Ba),X(this,"quorum"),X(this,"eventQuorum"),X(this,"eventWorkers"),ne(this,Ii),ne(this,Hc),ne(this,hg),V(this,Ii,e.map(i=>i instanceof Wh?Object.assign({provider:i},BS,MS):Object.assign({},BS,i,MS))),V(this,Hc,-2),V(this,hg,null),n&&n.quorum!=null?this.quorum=n.quorum:this.quorum=Math.ceil(T(this,Ii).reduce((i,s)=>(i+=s.weight,i),0)/2),this.eventQuorum=1,this.eventWorkers=1,pe(this.quorum<=T(this,Ii).reduce((i,s)=>i+s.weight,0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return T(this,Ii).map(e=>{const r=Object.assign({},e);for(const n in r)n[0]==="_"&&delete r[n];return r})}async _detectNetwork(){return Xr.from(ct(await this._perform({method:"chainId"})))}async _translatePerform(e,r){switch(r.method){case"broadcastTransaction":return await e.broadcastTransaction(r.signedTransaction);case"call":return await e.call(Object.assign({},r.transaction,{blockTag:r.blockTag}));case"chainId":return(await e.getNetwork()).chainId;case"estimateGas":return await e.estimateGas(r.transaction);case"getBalance":return await e.getBalance(r.address,r.blockTag);case"getBlock":{const n="blockHash"in r?r.blockHash:r.blockTag;return await e.getBlock(n,r.includeTransactions)}case"getBlockNumber":return await e.getBlockNumber();case"getCode":return await e.getCode(r.address,r.blockTag);case"getGasPrice":return(await e.getFeeData()).gasPrice;case"getPriorityFee":return(await e.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await e.getLogs(r.filter);case"getStorage":return await e.getStorage(r.address,r.position,r.blockTag);case"getTransaction":return await e.getTransaction(r.hash);case"getTransactionCount":return await e.getTransactionCount(r.address,r.blockTag);case"getTransactionReceipt":return await e.getTransactionReceipt(r.hash);case"getTransactionResult":return await e.getTransactionResult(r.hash)}}async _perform(e){if(e.method==="broadcastTransaction"){const s=T(this,Ii).map(c=>null),o=T(this,Ii).map(async({provider:c,weight:l},u)=>{try{const h=await c._perform(e);s[u]=Object.assign(Z5({result:h}),{weight:l})}catch(h){s[u]=Object.assign(Z5({error:h}),{weight:l})}});for(;;){const c=s.filter(h=>h!=null);for(const{value:h}of c)if(!(h instanceof Error))return h;const l=G2(this.quorum,s.filter(h=>h!=null));if(Gr(l,"INSUFFICIENT_FUNDS"))throw l;const u=o.filter((h,d)=>s[d]==null);if(u.length===0)break;await Promise.race(u)}const a=Q5(this.quorum,s);if(Be(a!==void 0,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:s.map(H5)}}),a instanceof Error)throw a;return a}await ve(this,Ba,LS).call(this);const r=new Set;let n=0;for(;;){const s=ve(this,Ba,Y5).call(this,r,e);if(s==null||(n+=s.config.weight,n>=this.quorum))break}const i=await ve(this,Ba,K5).call(this,r,e);for(const s of r)s.perform&&s.result==null&&s.config.lateResponses++;return i}async destroy(){for(const{provider:e}of T(this,Ii))e.destroy();super.destroy()}}Ii=new WeakMap,Hc=new WeakMap,hg=new WeakMap,Ba=new WeakSet,US=function(t){const e=Array.from(t).map(n=>n.config),r=T(this,Ii).slice();sZ(r),r.sort((n,i)=>n.priority-i.priority);for(const n of r)if(!n._lastFatalError&&e.indexOf(n)===-1)return n;return null},Y5=function(t,e){const r=ve(this,Ba,US).call(this,t);if(r==null)return null;const n={config:r,result:null,didBump:!1,perform:null,staller:null},i=$5();return n.perform=(async()=>{try{r.requests++;const o=await this._translatePerform(r.provider,e);n.result={result:o}}catch(o){r.errorResponses++,n.result={error:o}}const s=$5()-i;r._totalTime+=s,r.rollingDuration=.95*r.rollingDuration+.05*s,n.perform=null})(),n.staller=(async()=>{await oZ(r.stallTimeout),n.staller=null})(),t.add(n),n},LS=async function(){let t=T(this,hg);if(!t){const e=[];T(this,Ii).forEach(r=>{e.push((async()=>{await aZ(r,0),r._lastFatalError||(r._network=await r.provider.getNetwork())})())}),V(this,hg,t=(async()=>{await Promise.all(e);let r=null;for(const n of T(this,Ii)){if(n._lastFatalError)continue;const i=n._network;r==null?r=i.chainId:i.chainId!==r&&Be(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})())}await t},FS=async function(t,e){const r=[];for(const n of t)if(n.result!=null){const{tag:i,value:s}=Z5(n.result);r.push({tag:i,value:s,weight:n.config.weight})}if(!(r.reduce((n,i)=>n+i.weight,0)<this.quorum)){switch(e.method){case"getBlockNumber":{T(this,Hc)===-2&&V(this,Hc,Math.ceil(mt(J5(this.quorum,T(this,Ii).filter(i=>!i._lastFatalError).map(i=>({value:i.blockNumber,tag:mt(i.blockNumber).toString(),weight:i.weight}))))));const n=cZ(this.quorum,r);return n===void 0?void 0:(n>T(this,Hc)&&V(this,Hc,n),T(this,Hc))}case"getGasPrice":case"getPriorityFee":case"estimateGas":return J5(this.quorum,r);case"getBlock":return"blockTag"in e&&e.blockTag==="pending"?Q5(this.quorum,r):G2(this.quorum,r);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return G2(this.quorum,r);case"broadcastTransaction":return Q5(this.quorum,r)}Be(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${H5(e.method)})`})}},K5=async function(t,e){if(t.size===0)throw new Error("no runners?!");const r=[];let n=0;for(const s of t){if(s.perform&&r.push(s.perform),s.staller){r.push(s.staller);continue}s.didBump||(s.didBump=!0,n++)}const i=await ve(this,Ba,FS).call(this,t,e);if(i!==void 0){if(i instanceof Error)throw i;return i}for(let s=0;s<n;s++)ve(this,Ba,Y5).call(this,t,e);return Be(r.length>0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:Array.from(t).map(s=>H5(s.result))}}),await Promise.race(r),await ve(this,Ba,K5).call(this,t,e)};function lZ(t){return t&&typeof t.send=="function"&&typeof t.close=="function"}const uZ="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");function VS(t,e){e==null&&(e={});const r=o=>e[o]==="-"?!1:typeof e.exclusive=="string"?o===e.exclusive:Array.isArray(e.exclusive)?e.exclusive.indexOf(o)!==-1:!0;if(typeof t=="string"&&t.match(/^https?:/))return new xi(t);if(typeof t=="string"&&t.match(/^wss?:/)||lZ(t))return new W2(t);let n=null;try{n=Xr.from(t)}catch{}const i=[];if(r("publicPolygon")&&n&&(n.name==="matic"?i.push(new xi("https://polygon-rpc.com/",n,{staticNetwork:n})):n.name==="matic-amoy"&&i.push(new xi("https://rpc-amoy.polygon.technology/",n,{staticNetwork:n}))),r("alchemy"))try{i.push(new Kh(t,e.alchemy))}catch{}if(r("ankr")&&e.ankr!=null)try{i.push(new Yh(t,e.ankr))}catch{}if(r("chainstack"))try{i.push(new qh(t,e.chainstack))}catch{}if(r("cloudflare"))try{i.push(new F5(t))}catch{}if(r("etherscan"))try{i.push(new V5(t,e.etherscan))}catch{}if(r("infura"))try{let o=e.infura,a;typeof o=="object"&&(a=o.projectSecret,o=o.projectId),i.push(new Su(t,o,a))}catch{}if(r("quicknode"))try{let o=e.quicknode;i.push(new rf(t,o))}catch{}if(Be(i.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),i.length===1)return i[0];let s=Math.floor(i.length/2);return s>2&&(s=2),n&&uZ.indexOf(n.name)!==-1&&(s=1),e&&e.quorum&&(s=e.quorum),new q5(i,void 0,{quorum:s})}var Ru,nf;const dZ=class ZV extends Gh{constructor(e){super(e.provider),X(this,"signer"),ne(this,Ru),ne(this,nf),rt(this,{signer:e}),V(this,Ru,null),V(this,nf,0)}async getAddress(){return this.signer.getAddress()}connect(e){return new ZV(this.signer.connect(e))}async getNonce(e){if(e==="pending"){T(this,Ru)==null&&V(this,Ru,super.getNonce("pending"));const r=T(this,nf);return await T(this,Ru)+r}return super.getNonce(e)}increment(){yo(this,nf)._++}reset(){V(this,nf,0),V(this,Ru,null)}async sendTransaction(e){const r=this.getNonce("pending");return this.increment(),e=await this.signer.populateTransaction(e),e.nonce=await r,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,r,n){return this.signer.signTypedData(e,r,n)}};Ru=new WeakMap,nf=new WeakMap;let DS=dZ;var fg;class X5 extends xS{constructor(e,r,n){const i=Object.assign({},n??{},{batchMaxCount:1});pe(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(r,i),ne(this,fg),V(this,fg,async(s,o)=>{const a={method:s,params:o};this.emit("debug",{action:"sendEip1193Request",payload:a});try{const c=await e.request(a);return this.emit("debug",{action:"receiveEip1193Result",result:c}),c}catch(c){const l=new Error(c.message);throw l.code=c.code,l.data=c.data,l.payload=a,this.emit("debug",{action:"receiveEip1193Error",error:l}),l}})}async send(e,r){return await this._start(),await super.send(e,r)}async _send(e){pe(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const r=await T(this,fg).call(this,e.method,e.params||[]);return[{id:e.id,result:r}]}catch(r){return[{id:e.id,error:{code:r.code,data:r.data,message:r.message}}]}}getRpcError(e,r){switch(r=JSON.parse(JSON.stringify(r)),r.error.code||-1){case 4001:r.error.message=`ethers-user-denied: ${r.error.message}`;break;case 4200:r.error.message=`ethers-unsupported: ${r.error.message}`;break}return super.getRpcError(e,r)}async hasSigner(e){e==null&&(e=0);const r=await this.send("eth_accounts",[]);return typeof e=="number"?r.length>e:(e=e.toLowerCase(),r.filter(n=>n.toLowerCase()===e).length!==0)}async getSigner(e){if(e==null&&(e=0),!await this.hasSigner(e))try{await T(this,fg).call(this,"eth_requestAccounts",[])}catch(r){const n=r.payload;throw this.getRpcError(n,{id:n.id,error:r})}return await super.getSigner(e)}}fg=new WeakMap;const z2="62e1ad51b37b8e00394bda3b";function hZ(t){switch(t){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}pe(!1,"unsupported network","network",t)}class pg extends xi{constructor(e,r,n){e==null&&(e="mainnet");const i=Xr.from(e);r==null&&(r=z2),n==null&&(n=null);const s={staticNetwork:i},o=pg.getRequest(i,r,n);super(o,i,s),X(this,"applicationId"),X(this,"applicationSecret"),rt(this,{applicationId:r,applicationSecret:n})}_getProvider(e){try{return new pg(e,this.applicationId,this.applicationSecret)}catch{}return super._getProvider(e)}static getRequest(e,r,n){r==null&&(r=z2);const i=new Un(`https://${hZ(e.name)}/v1/lb/${r}`);return i.allowGzip=!0,n&&i.setCredentials("",n),r===z2&&(i.retryFunc=async(s,o,a)=>(Na("PocketProvider"),!0)),i}isCommunityResource(){return this.applicationId===z2}}const WS=void 0;var gg;const fZ=class JV extends Gh{constructor(e,r){super(r),X(this,"address"),ne(this,gg),pe(e&&typeof e.sign=="function","invalid private key","privateKey","[ REDACTED ]"),V(this,gg,e);const n=nu(this.signingKey.publicKey);rt(this,{address:n})}get signingKey(){return T(this,gg)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new JV(T(this,gg),e)}async signTransaction(e){e=lu(e);const{to:r,from:n}=await nn({to:e.to?an(e.to,this.provider):void 0,from:e.from?an(e.from,this.provider):void 0});r!=null&&(e.to=r),n!=null&&(e.from=n),e.from!=null&&(pe(Mt(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const i=Ch.from(e);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign(Xy(e)).serialized}async signTypedData(e,r,n){const i=await ou.resolveNames(e,r,n,async s=>{Be(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:s}});const o=await this.provider.resolveName(s);return Be(o!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:s}),o});return this.signingKey.sign(ou.hash(i.domain,r,i.value)).serialized}};gg=new WeakMap;let $2=fZ;const H2=" !#$%&'()*+,-./<=>?@[]^_`{|}~",pZ=/^[a-z]*$/i;function jS(t,e){let r=97;return t.reduce((n,i)=>(i===e?r++:i.match(pZ)?n.push(String.fromCharCode(r)+i):(r=97,n.push(i)),n),[])}function gZ(t,e){for(let i=H2.length-1;i>=0;i--)t=t.split(H2[i]).join(e.substring(2*i,2*i+2));const r=[],n=t.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(i,s,o,a)=>{if(o)for(let c=parseInt(o);c>=0;c--)r.push(";");else r.push(s.toLowerCase());return""});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return jS(jS(r,";"),":")}function GS(t){return pe(t[0]==="0","unsupported auwl data","data",t),gZ(t.substring(1+2*H2.length),t.substring(1,1+2*H2.length))}class e6{constructor(e){X(this,"locale"),rt(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var mg,Z2,sf,J2,t6;class Q2 extends e6{constructor(e,r,n){super(e),ne(this,J2),ne(this,mg),ne(this,Z2),ne(this,sf),V(this,mg,r),V(this,Z2,n),V(this,sf,null)}get _data(){return T(this,mg)}_decodeWords(){return GS(T(this,mg))}getWord(e){const r=ve(this,J2,t6).call(this);return pe(e>=0&&e<r.length,`invalid word index: ${e}`,"index",e),r[e]}getWordIndex(e){return ve(this,J2,t6).call(this).indexOf(e)}}mg=new WeakMap,Z2=new WeakMap,sf=new WeakMap,J2=new WeakSet,t6=function(){if(T(this,sf)==null){const t=this._decodeWords();if(Ns(t.join(`
@@ -565,7 +565,7 @@ table.apg-attrs a:hover {
565
565
  *
566
566
  * @author Feross Aboukhadijeh <https://feross.org>
567
567
  * @license MIT
568
- */(function(t){const e=Fv,r=lk,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=C,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const S=new s(1),k={foo:function(){return 42}};return Object.setPrototypeOf(k,s.prototype),Object.setPrototypeOf(S,k),S.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(S){if(S>i)throw new RangeError('The value "'+S+'" is invalid for option "size"');const k=new s(S);return Object.setPrototypeOf(k,u.prototype),k}function u(S,k,R){if(typeof S=="number"){if(typeof k=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(S)}return h(S,k,R)}u.poolSize=8192;function h(S,k,R){if(typeof S=="string")return m(S,k);if(o.isView(S))return v(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(se(S,o)||S&&se(S.buffer,o)||typeof a<"u"&&(se(S,a)||S&&se(S.buffer,a)))return A(S,k,R);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Z=S.valueOf&&S.valueOf();if(Z!=null&&Z!==S)return u.from(Z,k,R);const ce=E(S);if(ce)return ce;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return u.from(S[Symbol.toPrimitive]("string"),k,R);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}u.from=function(S,k,R){return h(S,k,R)},Object.setPrototypeOf(u.prototype,s.prototype),Object.setPrototypeOf(u,s);function d(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function p(S,k,R){return d(S),S<=0?l(S):k!==void 0?typeof R=="string"?l(S).fill(k,R):l(S).fill(k):l(S)}u.alloc=function(S,k,R){return p(S,k,R)};function g(S){return d(S),l(S<0?0:w(S)|0)}u.allocUnsafe=function(S){return g(S)},u.allocUnsafeSlow=function(S){return g(S)};function m(S,k){if((typeof k!="string"||k==="")&&(k="utf8"),!u.isEncoding(k))throw new TypeError("Unknown encoding: "+k);const R=O(S,k)|0;let Z=l(R);const ce=Z.write(S,k);return ce!==R&&(Z=Z.slice(0,ce)),Z}function y(S){const k=S.length<0?0:w(S.length)|0,R=l(k);for(let Z=0;Z<k;Z+=1)R[Z]=S[Z]&255;return R}function v(S){if(se(S,s)){const k=new s(S);return A(k.buffer,k.byteOffset,k.byteLength)}return y(S)}function A(S,k,R){if(k<0||S.byteLength<k)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<k+(R||0))throw new RangeError('"length" is outside of buffer bounds');let Z;return k===void 0&&R===void 0?Z=new s(S):R===void 0?Z=new s(S,k):Z=new s(S,k,R),Object.setPrototypeOf(Z,u.prototype),Z}function E(S){if(u.isBuffer(S)){const k=w(S.length)|0,R=l(k);return R.length===0||S.copy(R,0,0,k),R}if(S.length!==void 0)return typeof S.length!="number"||ae(S.length)?l(0):y(S);if(S.type==="Buffer"&&Array.isArray(S.data))return y(S.data)}function w(S){if(S>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return S|0}function C(S){return+S!=S&&(S=0),u.alloc(+S)}u.isBuffer=function(k){return k!=null&&k._isBuffer===!0&&k!==u.prototype},u.compare=function(k,R){if(se(k,s)&&(k=u.from(k,k.offset,k.byteLength)),se(R,s)&&(R=u.from(R,R.offset,R.byteLength)),!u.isBuffer(k)||!u.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(k===R)return 0;let Z=k.length,ce=R.length;for(let de=0,ke=Math.min(Z,ce);de<ke;++de)if(k[de]!==R[de]){Z=k[de],ce=R[de];break}return Z<ce?-1:ce<Z?1:0},u.isEncoding=function(k){switch(String(k).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(k,R){if(!Array.isArray(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return u.alloc(0);let Z;if(R===void 0)for(R=0,Z=0;Z<k.length;++Z)R+=k[Z].length;const ce=u.allocUnsafe(R);let de=0;for(Z=0;Z<k.length;++Z){let ke=k[Z];if(se(ke,s))de+ke.length>ce.length?(u.isBuffer(ke)||(ke=u.from(ke)),ke.copy(ce,de)):s.prototype.set.call(ce,ke,de);else if(u.isBuffer(ke))ke.copy(ce,de);else throw new TypeError('"list" argument must be an Array of Buffers');de+=ke.length}return ce};function O(S,k){if(u.isBuffer(S))return S.length;if(o.isView(S)||se(S,o))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const R=S.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&R===0)return 0;let ce=!1;for(;;)switch(k){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return Se(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R*2;case"hex":return R>>>1;case"base64":return Pe(S).length;default:if(ce)return Z?-1:Se(S).length;k=(""+k).toLowerCase(),ce=!0}}u.byteLength=O;function U(S,k,R){let Z=!1;if((k===void 0||k<0)&&(k=0),k>this.length||((R===void 0||R>this.length)&&(R=this.length),R<=0)||(R>>>=0,k>>>=0,R<=k))return"";for(S||(S="utf8");;)switch(S){case"hex":return te(this,k,R);case"utf8":case"utf-8":return j(this,k,R);case"ascii":return Q(this,k,R);case"latin1":case"binary":return K(this,k,R);case"base64":return G(this,k,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,k,R);default:if(Z)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),Z=!0}}u.prototype._isBuffer=!0;function I(S,k,R){const Z=S[k];S[k]=S[R],S[R]=Z}u.prototype.swap16=function(){const k=this.length;if(k%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let R=0;R<k;R+=2)I(this,R,R+1);return this},u.prototype.swap32=function(){const k=this.length;if(k%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let R=0;R<k;R+=4)I(this,R,R+3),I(this,R+1,R+2);return this},u.prototype.swap64=function(){const k=this.length;if(k%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let R=0;R<k;R+=8)I(this,R,R+7),I(this,R+1,R+6),I(this,R+2,R+5),I(this,R+3,R+4);return this},u.prototype.toString=function(){const k=this.length;return k===0?"":arguments.length===0?j(this,0,k):U.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(k){if(!u.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k?!0:u.compare(this,k)===0},u.prototype.inspect=function(){let k="";const R=t.INSPECT_MAX_BYTES;return k=this.toString("hex",0,R).replace(/(.{2})/g,"$1 ").trim(),this.length>R&&(k+=" ... "),"<Buffer "+k+">"},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(k,R,Z,ce,de){if(se(k,s)&&(k=u.from(k,k.offset,k.byteLength)),!u.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(R===void 0&&(R=0),Z===void 0&&(Z=k?k.length:0),ce===void 0&&(ce=0),de===void 0&&(de=this.length),R<0||Z>k.length||ce<0||de>this.length)throw new RangeError("out of range index");if(ce>=de&&R>=Z)return 0;if(ce>=de)return-1;if(R>=Z)return 1;if(R>>>=0,Z>>>=0,ce>>>=0,de>>>=0,this===k)return 0;let ke=de-ce,Ne=Z-R;const ze=Math.min(ke,Ne),Ft=this.slice(ce,de),St=k.slice(R,Z);for(let vt=0;vt<ze;++vt)if(Ft[vt]!==St[vt]){ke=Ft[vt],Ne=St[vt];break}return ke<Ne?-1:Ne<ke?1:0};function B(S,k,R,Z,ce){if(S.length===0)return-1;if(typeof R=="string"?(Z=R,R=0):R>2147483647?R=2147483647:R<-2147483648&&(R=-2147483648),R=+R,ae(R)&&(R=ce?0:S.length-1),R<0&&(R=S.length+R),R>=S.length){if(ce)return-1;R=S.length-1}else if(R<0)if(ce)R=0;else return-1;if(typeof k=="string"&&(k=u.from(k,Z)),u.isBuffer(k))return k.length===0?-1:W(S,k,R,Z,ce);if(typeof k=="number")return k=k&255,typeof s.prototype.indexOf=="function"?ce?s.prototype.indexOf.call(S,k,R):s.prototype.lastIndexOf.call(S,k,R):W(S,[k],R,Z,ce);throw new TypeError("val must be string, number or Buffer")}function W(S,k,R,Z,ce){let de=1,ke=S.length,Ne=k.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(S.length<2||k.length<2)return-1;de=2,ke/=2,Ne/=2,R/=2}function ze(St,vt){return de===1?St[vt]:St.readUInt16BE(vt*de)}let Ft;if(ce){let St=-1;for(Ft=R;Ft<ke;Ft++)if(ze(S,Ft)===ze(k,St===-1?0:Ft-St)){if(St===-1&&(St=Ft),Ft-St+1===Ne)return St*de}else St!==-1&&(Ft-=Ft-St),St=-1}else for(R+Ne>ke&&(R=ke-Ne),Ft=R;Ft>=0;Ft--){let St=!0;for(let vt=0;vt<Ne;vt++)if(ze(S,Ft+vt)!==ze(k,vt)){St=!1;break}if(St)return Ft}return-1}u.prototype.includes=function(k,R,Z){return this.indexOf(k,R,Z)!==-1},u.prototype.indexOf=function(k,R,Z){return B(this,k,R,Z,!0)},u.prototype.lastIndexOf=function(k,R,Z){return B(this,k,R,Z,!1)};function M(S,k,R,Z){R=Number(R)||0;const ce=S.length-R;Z?(Z=Number(Z),Z>ce&&(Z=ce)):Z=ce;const de=k.length;Z>de/2&&(Z=de/2);let ke;for(ke=0;ke<Z;++ke){const Ne=parseInt(k.substr(ke*2,2),16);if(ae(Ne))return ke;S[R+ke]=Ne}return ke}function x(S,k,R,Z){return Ve(Se(k,S.length-R),S,R,Z)}function P(S,k,R,Z){return Ve(J(k),S,R,Z)}function L(S,k,R,Z){return Ve(Pe(k),S,R,Z)}function F(S,k,R,Z){return Ve(ge(k,S.length-R),S,R,Z)}u.prototype.write=function(k,R,Z,ce){if(R===void 0)ce="utf8",Z=this.length,R=0;else if(Z===void 0&&typeof R=="string")ce=R,Z=this.length,R=0;else if(isFinite(R))R=R>>>0,isFinite(Z)?(Z=Z>>>0,ce===void 0&&(ce="utf8")):(ce=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const de=this.length-R;if((Z===void 0||Z>de)&&(Z=de),k.length>0&&(Z<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");ce||(ce="utf8");let ke=!1;for(;;)switch(ce){case"hex":return M(this,k,R,Z);case"utf8":case"utf-8":return x(this,k,R,Z);case"ascii":case"latin1":case"binary":return P(this,k,R,Z);case"base64":return L(this,k,R,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,k,R,Z);default:if(ke)throw new TypeError("Unknown encoding: "+ce);ce=(""+ce).toLowerCase(),ke=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function G(S,k,R){return k===0&&R===S.length?e.fromByteArray(S):e.fromByteArray(S.slice(k,R))}function j(S,k,R){R=Math.min(S.length,R);const Z=[];let ce=k;for(;ce<R;){const de=S[ce];let ke=null,Ne=de>239?4:de>223?3:de>191?2:1;if(ce+Ne<=R){let ze,Ft,St,vt;switch(Ne){case 1:de<128&&(ke=de);break;case 2:ze=S[ce+1],(ze&192)===128&&(vt=(de&31)<<6|ze&63,vt>127&&(ke=vt));break;case 3:ze=S[ce+1],Ft=S[ce+2],(ze&192)===128&&(Ft&192)===128&&(vt=(de&15)<<12|(ze&63)<<6|Ft&63,vt>2047&&(vt<55296||vt>57343)&&(ke=vt));break;case 4:ze=S[ce+1],Ft=S[ce+2],St=S[ce+3],(ze&192)===128&&(Ft&192)===128&&(St&192)===128&&(vt=(de&15)<<18|(ze&63)<<12|(Ft&63)<<6|St&63,vt>65535&&vt<1114112&&(ke=vt))}}ke===null?(ke=65533,Ne=1):ke>65535&&(ke-=65536,Z.push(ke>>>10&1023|55296),ke=56320|ke&1023),Z.push(ke),ce+=Ne}return z(Z)}const q=4096;function z(S){const k=S.length;if(k<=q)return String.fromCharCode.apply(String,S);let R="",Z=0;for(;Z<k;)R+=String.fromCharCode.apply(String,S.slice(Z,Z+=q));return R}function Q(S,k,R){let Z="";R=Math.min(S.length,R);for(let ce=k;ce<R;++ce)Z+=String.fromCharCode(S[ce]&127);return Z}function K(S,k,R){let Z="";R=Math.min(S.length,R);for(let ce=k;ce<R;++ce)Z+=String.fromCharCode(S[ce]);return Z}function te(S,k,R){const Z=S.length;(!k||k<0)&&(k=0),(!R||R<0||R>Z)&&(R=Z);let ce="";for(let de=k;de<R;++de)ce+=f[S[de]];return ce}function oe(S,k,R){const Z=S.slice(k,R);let ce="";for(let de=0;de<Z.length-1;de+=2)ce+=String.fromCharCode(Z[de]+Z[de+1]*256);return ce}u.prototype.slice=function(k,R){const Z=this.length;k=~~k,R=R===void 0?Z:~~R,k<0?(k+=Z,k<0&&(k=0)):k>Z&&(k=Z),R<0?(R+=Z,R<0&&(R=0)):R>Z&&(R=Z),R<k&&(R=k);const ce=this.subarray(k,R);return Object.setPrototypeOf(ce,u.prototype),ce};function ye(S,k,R){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+k>R)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k],de=1,ke=0;for(;++ke<R&&(de*=256);)ce+=this[k+ke]*de;return ce},u.prototype.readUintBE=u.prototype.readUIntBE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k+--R],de=1;for(;R>0&&(de*=256);)ce+=this[k+--R]*de;return ce},u.prototype.readUint8=u.prototype.readUInt8=function(k,R){return k=k>>>0,R||ye(k,1,this.length),this[k]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(k,R){return k=k>>>0,R||ye(k,2,this.length),this[k]|this[k+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(k,R){return k=k>>>0,R||ye(k,2,this.length),this[k]<<8|this[k+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+this[k+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]*16777216+(this[k+1]<<16|this[k+2]<<8|this[k+3])},u.prototype.readBigUInt64LE=b(function(k){k=k>>>0,$(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=R+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24,de=this[++k]+this[++k]*2**8+this[++k]*2**16+Z*2**24;return BigInt(ce)+(BigInt(de)<<BigInt(32))}),u.prototype.readBigUInt64BE=b(function(k){k=k>>>0,$(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=R*2**24+this[++k]*2**16+this[++k]*2**8+this[++k],de=this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+Z;return(BigInt(ce)<<BigInt(32))+BigInt(de)}),u.prototype.readIntLE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k],de=1,ke=0;for(;++ke<R&&(de*=256);)ce+=this[k+ke]*de;return de*=128,ce>=de&&(ce-=Math.pow(2,8*R)),ce},u.prototype.readIntBE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=R,de=1,ke=this[k+--ce];for(;ce>0&&(de*=256);)ke+=this[k+--ce]*de;return de*=128,ke>=de&&(ke-=Math.pow(2,8*R)),ke},u.prototype.readInt8=function(k,R){return k=k>>>0,R||ye(k,1,this.length),this[k]&128?(255-this[k]+1)*-1:this[k]},u.prototype.readInt16LE=function(k,R){k=k>>>0,R||ye(k,2,this.length);const Z=this[k]|this[k+1]<<8;return Z&32768?Z|4294901760:Z},u.prototype.readInt16BE=function(k,R){k=k>>>0,R||ye(k,2,this.length);const Z=this[k+1]|this[k]<<8;return Z&32768?Z|4294901760:Z},u.prototype.readInt32LE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},u.prototype.readInt32BE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},u.prototype.readBigInt64LE=b(function(k){k=k>>>0,$(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=this[k+4]+this[k+5]*2**8+this[k+6]*2**16+(Z<<24);return(BigInt(ce)<<BigInt(32))+BigInt(R+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24)}),u.prototype.readBigInt64BE=b(function(k){k=k>>>0,$(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=(R<<24)+this[++k]*2**16+this[++k]*2**8+this[++k];return(BigInt(ce)<<BigInt(32))+BigInt(this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+Z)}),u.prototype.readFloatLE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),r.read(this,k,!0,23,4)},u.prototype.readFloatBE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),r.read(this,k,!1,23,4)},u.prototype.readDoubleLE=function(k,R){return k=k>>>0,R||ye(k,8,this.length),r.read(this,k,!0,52,8)},u.prototype.readDoubleBE=function(k,R){return k=k>>>0,R||ye(k,8,this.length),r.read(this,k,!1,52,8)};function _e(S,k,R,Z,ce,de){if(!u.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>ce||k<de)throw new RangeError('"value" argument is out of bounds');if(R+Z>S.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(k,R,Z,ce){if(k=+k,R=R>>>0,Z=Z>>>0,!ce){const Ne=Math.pow(2,8*Z)-1;_e(this,k,R,Z,Ne,0)}let de=1,ke=0;for(this[R]=k&255;++ke<Z&&(de*=256);)this[R+ke]=k/de&255;return R+Z},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(k,R,Z,ce){if(k=+k,R=R>>>0,Z=Z>>>0,!ce){const Ne=Math.pow(2,8*Z)-1;_e(this,k,R,Z,Ne,0)}let de=Z-1,ke=1;for(this[R+de]=k&255;--de>=0&&(ke*=256);)this[R+de]=k/ke&255;return R+Z},u.prototype.writeUint8=u.prototype.writeUInt8=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,1,255,0),this[R]=k&255,R+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,65535,0),this[R]=k&255,this[R+1]=k>>>8,R+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,65535,0),this[R]=k>>>8,this[R+1]=k&255,R+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,4294967295,0),this[R+3]=k>>>24,this[R+2]=k>>>16,this[R+1]=k>>>8,this[R]=k&255,R+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,4294967295,0),this[R]=k>>>24,this[R+1]=k>>>16,this[R+2]=k>>>8,this[R+3]=k&255,R+4};function Ce(S,k,R,Z,ce){N(k,Z,ce,S,R,7);let de=Number(k&BigInt(4294967295));S[R++]=de,de=de>>8,S[R++]=de,de=de>>8,S[R++]=de,de=de>>8,S[R++]=de;let ke=Number(k>>BigInt(32)&BigInt(4294967295));return S[R++]=ke,ke=ke>>8,S[R++]=ke,ke=ke>>8,S[R++]=ke,ke=ke>>8,S[R++]=ke,R}function ie(S,k,R,Z,ce){N(k,Z,ce,S,R,7);let de=Number(k&BigInt(4294967295));S[R+7]=de,de=de>>8,S[R+6]=de,de=de>>8,S[R+5]=de,de=de>>8,S[R+4]=de;let ke=Number(k>>BigInt(32)&BigInt(4294967295));return S[R+3]=ke,ke=ke>>8,S[R+2]=ke,ke=ke>>8,S[R+1]=ke,ke=ke>>8,S[R]=ke,R+8}u.prototype.writeBigUInt64LE=b(function(k,R=0){return Ce(this,k,R,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=b(function(k,R=0){return ie(this,k,R,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(k,R,Z,ce){if(k=+k,R=R>>>0,!ce){const ze=Math.pow(2,8*Z-1);_e(this,k,R,Z,ze-1,-ze)}let de=0,ke=1,Ne=0;for(this[R]=k&255;++de<Z&&(ke*=256);)k<0&&Ne===0&&this[R+de-1]!==0&&(Ne=1),this[R+de]=(k/ke>>0)-Ne&255;return R+Z},u.prototype.writeIntBE=function(k,R,Z,ce){if(k=+k,R=R>>>0,!ce){const ze=Math.pow(2,8*Z-1);_e(this,k,R,Z,ze-1,-ze)}let de=Z-1,ke=1,Ne=0;for(this[R+de]=k&255;--de>=0&&(ke*=256);)k<0&&Ne===0&&this[R+de+1]!==0&&(Ne=1),this[R+de]=(k/ke>>0)-Ne&255;return R+Z},u.prototype.writeInt8=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,1,127,-128),k<0&&(k=255+k+1),this[R]=k&255,R+1},u.prototype.writeInt16LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,32767,-32768),this[R]=k&255,this[R+1]=k>>>8,R+2},u.prototype.writeInt16BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,32767,-32768),this[R]=k>>>8,this[R+1]=k&255,R+2},u.prototype.writeInt32LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,2147483647,-2147483648),this[R]=k&255,this[R+1]=k>>>8,this[R+2]=k>>>16,this[R+3]=k>>>24,R+4},u.prototype.writeInt32BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[R]=k>>>24,this[R+1]=k>>>16,this[R+2]=k>>>8,this[R+3]=k&255,R+4},u.prototype.writeBigInt64LE=b(function(k,R=0){return Ce(this,k,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=b(function(k,R=0){return ie(this,k,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function le(S,k,R,Z,ce,de){if(R+Z>S.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function we(S,k,R,Z,ce){return k=+k,R=R>>>0,ce||le(S,k,R,4),r.write(S,k,R,Z,23,4),R+4}u.prototype.writeFloatLE=function(k,R,Z){return we(this,k,R,!0,Z)},u.prototype.writeFloatBE=function(k,R,Z){return we(this,k,R,!1,Z)};function D(S,k,R,Z,ce){return k=+k,R=R>>>0,ce||le(S,k,R,8),r.write(S,k,R,Z,52,8),R+8}u.prototype.writeDoubleLE=function(k,R,Z){return D(this,k,R,!0,Z)},u.prototype.writeDoubleBE=function(k,R,Z){return D(this,k,R,!1,Z)},u.prototype.copy=function(k,R,Z,ce){if(!u.isBuffer(k))throw new TypeError("argument should be a Buffer");if(Z||(Z=0),!ce&&ce!==0&&(ce=this.length),R>=k.length&&(R=k.length),R||(R=0),ce>0&&ce<Z&&(ce=Z),ce===Z||k.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(Z<0||Z>=this.length)throw new RangeError("Index out of range");if(ce<0)throw new RangeError("sourceEnd out of bounds");ce>this.length&&(ce=this.length),k.length-R<ce-Z&&(ce=k.length-R+Z);const de=ce-Z;return this===k&&typeof s.prototype.copyWithin=="function"?this.copyWithin(R,Z,ce):s.prototype.set.call(k,this.subarray(Z,ce),R),de},u.prototype.fill=function(k,R,Z,ce){if(typeof k=="string"){if(typeof R=="string"?(ce=R,R=0,Z=this.length):typeof Z=="string"&&(ce=Z,Z=this.length),ce!==void 0&&typeof ce!="string")throw new TypeError("encoding must be a string");if(typeof ce=="string"&&!u.isEncoding(ce))throw new TypeError("Unknown encoding: "+ce);if(k.length===1){const ke=k.charCodeAt(0);(ce==="utf8"&&ke<128||ce==="latin1")&&(k=ke)}}else typeof k=="number"?k=k&255:typeof k=="boolean"&&(k=Number(k));if(R<0||this.length<R||this.length<Z)throw new RangeError("Out of range index");if(Z<=R)return this;R=R>>>0,Z=Z===void 0?this.length:Z>>>0,k||(k=0);let de;if(typeof k=="number")for(de=R;de<Z;++de)this[de]=k;else{const ke=u.isBuffer(k)?k:u.from(k,ce),Ne=ke.length;if(Ne===0)throw new TypeError('The value "'+k+'" is invalid for argument "value"');for(de=0;de<Z-R;++de)this[de+R]=ke[de%Ne]}return this};const ue={};function me(S,k,R){ue[S]=class extends R{constructor(){super(),Object.defineProperty(this,"message",{value:k.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ce,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}me("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),me("ERR_INVALID_ARG_TYPE",function(S,k){return`The "${S}" argument must be of type number. Received type ${typeof k}`},TypeError),me("ERR_OUT_OF_RANGE",function(S,k,R){let Z=`The value of "${S}" is out of range.`,ce=R;return Number.isInteger(R)&&Math.abs(R)>2**32?ce=be(String(R)):typeof R=="bigint"&&(ce=String(R),(R>BigInt(2)**BigInt(32)||R<-(BigInt(2)**BigInt(32)))&&(ce=be(ce)),ce+="n"),Z+=` It must be ${k}. Received ${ce}`,Z},RangeError);function be(S){let k="",R=S.length;const Z=S[0]==="-"?1:0;for(;R>=Z+4;R-=3)k=`_${S.slice(R-3,R)}${k}`;return`${S.slice(0,R)}${k}`}function re(S,k,R){$(k,"offset"),(S[k]===void 0||S[k+R]===void 0)&&ee(k,S.length-(R+1))}function N(S,k,R,Z,ce,de){if(S>R||S<k){const ke=typeof k=="bigint"?"n":"";let Ne;throw k===0||k===BigInt(0)?Ne=`>= 0${ke} and < 2${ke} ** ${(de+1)*8}${ke}`:Ne=`>= -(2${ke} ** ${(de+1)*8-1}${ke}) and < 2 ** ${(de+1)*8-1}${ke}`,new ue.ERR_OUT_OF_RANGE("value",Ne,S)}re(Z,ce,de)}function $(S,k){if(typeof S!="number")throw new ue.ERR_INVALID_ARG_TYPE(k,"number",S)}function ee(S,k,R){throw Math.floor(S)!==S?($(S,R),new ue.ERR_OUT_OF_RANGE("offset","an integer",S)):k<0?new ue.ERR_BUFFER_OUT_OF_BOUNDS:new ue.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${k}`,S)}const fe=/[^+/0-9A-Za-z-_]/g;function Ae(S){if(S=S.split("=")[0],S=S.trim().replace(fe,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function Se(S,k){k=k||1/0;let R;const Z=S.length;let ce=null;const de=[];for(let ke=0;ke<Z;++ke){if(R=S.charCodeAt(ke),R>55295&&R<57344){if(!ce){if(R>56319){(k-=3)>-1&&de.push(239,191,189);continue}else if(ke+1===Z){(k-=3)>-1&&de.push(239,191,189);continue}ce=R;continue}if(R<56320){(k-=3)>-1&&de.push(239,191,189),ce=R;continue}R=(ce-55296<<10|R-56320)+65536}else ce&&(k-=3)>-1&&de.push(239,191,189);if(ce=null,R<128){if((k-=1)<0)break;de.push(R)}else if(R<2048){if((k-=2)<0)break;de.push(R>>6|192,R&63|128)}else if(R<65536){if((k-=3)<0)break;de.push(R>>12|224,R>>6&63|128,R&63|128)}else if(R<1114112){if((k-=4)<0)break;de.push(R>>18|240,R>>12&63|128,R>>6&63|128,R&63|128)}else throw new Error("Invalid code point")}return de}function J(S){const k=[];for(let R=0;R<S.length;++R)k.push(S.charCodeAt(R)&255);return k}function ge(S,k){let R,Z,ce;const de=[];for(let ke=0;ke<S.length&&!((k-=2)<0);++ke)R=S.charCodeAt(ke),Z=R>>8,ce=R%256,de.push(ce),de.push(Z);return de}function Pe(S){return e.toByteArray(Ae(S))}function Ve(S,k,R,Z){let ce;for(ce=0;ce<Z&&!(ce+R>=k.length||ce>=S.length);++ce)k[ce+R]=S[ce];return ce}function se(S,k){return S instanceof k||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===k.name}function ae(S){return S!==S}const f=function(){const S="0123456789abcdef",k=new Array(256);for(let R=0;R<16;++R){const Z=R*16;for(let ce=0;ce<16;++ce)k[Z+ce]=S[R]+S[ce]}return k}();function b(S){return typeof BigInt>"u"?_:S}function _(){throw new Error("BigInt not supported")}})(RI);const el=RI.Buffer;var Vv={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_208a712f-fd45-48c9-9613-fbb4e0b7f779",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"pnpm/10.24.0 npm/? node/v24.11.1 linux x64",CI:"true",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_208a712f-fd45-48c9-9613-fbb4e0b7f779",PIPX_HOME:"/opt/pipx",RUNNER_ENVIRONMENT:"github-hosted",npm_node_execpath:"/opt/hostedtoolcache/node/24.11.1/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",NODE_AUTH_TOKEN:"XXXXX-XXXXX-XXXXX-XXXXX",SHLVL:"1",HOME:"/home/runner",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",RUNNER_TEMP:"/home/runner/work/_temp",npm_package_json:"/home/runner/work/passport/passport/packages/passport-evm/package.json",GITHUB_REPOSITORY_OWNER:"credenza-web3",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",npm_package_engines_node:">=20.10.0",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/29.0.14206865",GITHUB_RETENTION_DAYS:"90",GRADLE_HOME:"/usr/share/gradle-9.2.1",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",GITHUB_REPOSITORY_OWNER_ID:"93208388",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",npm_config__credenza3_registry:"https://registry.npmjs.org/",npm_config_userconfig:"/home/runner/work/_temp/.npmrc",SYSTEMD_EXEC_PID:"1766",npm_config_engine_strict:"true",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",ImageVersion:"20251126.144.1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",LOGNAME:"runner",RUNNER_OS:"Linux",SWIFT_PATH:"/usr/share/swift/usr/bin",pnpm_config_verify_deps_before_run:"false",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GITHUB_WORKFLOW:"Publish @credenza3/passport-evm",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:12811",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.10/x64",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"20025561515",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.4/x64",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_BASE_REF:"",GITHUB_REF_TYPE:"branch",GITHUB_WORKFLOW_SHA:"aa7fa8fd4a160d1ba8fb3e08d0ac4653f7cf421e",ImageOS:"ubuntu24",ACTIONS_ID_TOKEN_REQUEST_TOKEN:"eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9tYWluXCIsXCJQZXJtaXNzaW9uXCI6M31dIiwiYWNzbCI6IjEwIiwiYXVkIjoidnNvOmQ5NmZlZWUwLTg5OTYtNDI2Yy1hYzBmLWY0YTQ0NzFkNWNjMyIsImJpbGxpbmdfb3duZXJfaWQiOiJPX2tnRE9CWTRfUkEiLCJleHAiOjE3NjUyMTMyNzEsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImlhdCI6MTc2NTE5MTA3MSwiaXNzIjoiaHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImpvYl9pZCI6ImMxNjJhNTczLTg4YjktNTc0NS1iMzMwLWI4ZjEyZWIzZDE1OCIsIm5hbWVpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsIm5iZiI6MTc2NTE5MDc3MSwib2lkY19leHRyYSI6IntcImFjdG9yXCI6XCJtaWtlYXZ2YWRcIixcImFjdG9yX2lkXCI6XCI4NzI5OTMxNVwiLFwiYmFzZV9yZWZcIjpcIlwiLFwiY2hlY2tfcnVuX2lkXCI6XCI1NzQyMTk5MTM4N1wiLFwiZXZlbnRfbmFtZVwiOlwicHVzaFwiLFwiaGVhZF9yZWZcIjpcIlwiLFwiam9iX3dvcmtmbG93X3JlZlwiOlwiY3JlZGVuemEtd2ViMy9wYXNzcG9ydC8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoX2V2bS55bWxAcmVmcy9oZWFkcy9tYWluXCIsXCJqb2Jfd29ya2Zsb3dfc2hhXCI6XCJhYTdmYThmZDRhMTYwZDFiYThmYjNlMDhkMGFjNDY1M2Y3Y2Y0MjFlXCIsXCJyZWZcIjpcInJlZnMvaGVhZHMvbWFpblwiLFwicmVmX3Byb3RlY3RlZFwiOlwiZmFsc2VcIixcInJlZl90eXBlXCI6XCJicmFuY2hcIixcInJlcG9zaXRvcnlcIjpcImNyZWRlbnphLXdlYjMvcGFzc3BvcnRcIixcInJlcG9zaXRvcnlfaWRcIjpcIjQ5MzE1NTgxNFwiLFwicmVwb3NpdG9yeV9vd25lclwiOlwiY3JlZGVuemEtd2ViM1wiLFwicmVwb3NpdG9yeV9vd25lcl9pZFwiOlwiOTMyMDgzODhcIixcInJlcG9zaXRvcnlfdmlzaWJpbGl0eVwiOlwicHJpdmF0ZVwiLFwicnVuX2F0dGVtcHRcIjpcIjFcIixcInJ1bl9pZFwiOlwiMjAwMjU1NjE1MTVcIixcInJ1bl9udW1iZXJcIjpcIjEyXCIsXCJydW5uZXJfZW52aXJvbm1lbnRcIjpcImdpdGh1Yi1ob3N0ZWRcIixcInNoYVwiOlwiYWE3ZmE4ZmQ0YTE2MGQxYmE4ZmIzZTA4ZDBhYzQ2NTNmN2NmNDIxZVwiLFwid29ya2Zsb3dcIjpcIlB1Ymxpc2ggQGNyZWRlbnphMy9wYXNzcG9ydC1ldm1cIixcIndvcmtmbG93X3JlZlwiOlwiY3JlZGVuemEtd2ViMy9wYXNzcG9ydC8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoX2V2bS55bWxAcmVmcy9oZWFkcy9tYWluXCIsXCJ3b3JrZmxvd19zaGFcIjpcImFhN2ZhOGZkNGExNjBkMWJhOGZiM2UwOGQwYWM0NjUzZjdjZjQyMWVcIn0iLCJvaWRjX3N1YiI6InJlcG86Y3JlZGVuemEtd2ViMy9wYXNzcG9ydDpyZWY6cmVmcy9oZWFkcy9tYWluIiwib3JjaF9pZCI6ImVlNjY5ODE3LTdkNTUtNGNiZC1iY2ZhLWE4YTNmZGU2ZjAwMC5wdWJsaXNoLWdwci5fMjQiLCJvd25lcl9pZCI6Ik9fa2dET0JZNF9SQSIsInBsYW5faWQiOiJlZTY2OTgxNy03ZDU1LTRjYmQtYmNmYS1hOGEzZmRlNmYwMDAiLCJyZXBvc2l0b3J5X2lkIjoiNDkzMTU1ODE0IiwicnVuX2lkIjoiMjAwMjU1NjE1MTUiLCJydW5fbnVtYmVyIjoiMTIiLCJydW5fdHlwZSI6ImZ1bGwiLCJydW5uZXJfaWQiOiIxMDAwMDAwODE2IiwicnVubmVyX3R5cGUiOiJob3N0ZWQiLCJzY3AiOiJBY3Rpb25zLlJlc3VsdHM6ZWU2Njk4MTctN2Q1NS00Y2JkLWJjZmEtYThhM2ZkZTZmMDAwOmMxNjJhNTczLTg4YjktNTc0NS1iMzMwLWI4ZjEyZWIzZDE1OCBBY3Rpb25zLlJ1bm5lcjplZTY2OTgxNy03ZDU1LTRjYmQtYmNmYS1hOGEzZmRlNmYwMDA6YzE2MmE1NzMtODhiOS01NzQ1LWIzMzAtYjhmMTJlYjNkMTU4IEFjdGlvbnMuVXBsb2FkQXJ0aWZhY3RzOmVlNjY5ODE3LTdkNTUtNGNiZC1iY2ZhLWE4YTNmZGU2ZjAwMDpjMTYyYTU3My04OGI5LTU3NDUtYjMzMC1iOGYxMmViM2QxNTggZ2VuZXJhdGVfaWRfdG9rZW46ZWU2Njk4MTctN2Q1NS00Y2JkLWJjZmEtYThhM2ZkZTZmMDAwOmMxNjJhNTczLTg4YjktNTc0NS1iMzMwLWI4ZjEyZWIzZDE1OCBBY3Rpb25zLkdlbmVyaWNSZWFkOjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCIsInNoYSI6ImFhN2ZhOGZkNGExNjBkMWJhOGZiM2UwOGQwYWM0NjUzZjdjZjQyMWUiLCJ0cnVzdF90aWVyIjoiMiJ9.5MHrJOG_ia6t5NE7W-b-jWZtwJVQtVo-D-u-IZL55KtXHjfrS8lFIUcedHaZXVz9Ek2NAhYlzbx1nb8cSBQk2fduxqM4tVj9tKieAungeuCK3n8zVJHN4M7j3OgXArVJZsoMQNzbt3AawBYOObaomQzk7yoV6O_lC1YKeGmAuFe2p4fSE1ohvnbOim9F815_DIX_lSOSF6ArmpeAByDg-AxTHiX4_YBnoqWiEzMvR2dfz7Ehi5-FMr8BaeeD2RYMNuxRiTITasc5PJv2j67ljR0UiSuWQLvoF6OslrfpmzXxwIkkLpJMKihR4MvqHhZA-YO10lnfwIARmLzb1YyLVw",ENABLE_RUNNER_TRACING:"true",GITHUB_ACTION_REPOSITORY:"",GITHUB_WORKFLOW_REF:"credenza-web3/passport/.github/workflows/publish_evm.yml@refs/heads/main",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/passport/passport/packages/passport-evm/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/24.11.1/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",INVOCATION_ID:"14833964b0fc42db9693bb48a64fac82",NODE:"/opt/hostedtoolcache/node/24.11.1/x64/bin/node",NPM_CONFIG_USERCONFIG:"/home/runner/work/_temp/.npmrc",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",RUNNER_TRACKING_ID:"github_d419acde-203c-448b-834a-923806f092d4",TURBO_HASH:"a88645caa8f69876",npm_package_name:"@credenza3/passport-evm",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"12",GITHUB_TRIGGERING_ACTOR:"mikeavvad",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"credenza-web3/passport",RUNNER_NAME:"GitHub Actions 1000000816",XDG_CONFIG_HOME:"/home/runner/.config",npm_lifecycle_script:"vite build",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",DEBIAN_FRONTEND:"noninteractive",GITHUB_ACTION_REF:"",GITHUB_ACTIONS:"true",GITHUB_REPOSITORY_ID:"493155814",NODE_PATH:"/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules/vite/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules/vite/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",SHELL:"/bin/bash",npm_package_version:"0.3.13",npm_config_verify_deps_before_run:"false",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",ACCEPT_EULA:"Y",GITHUB_JOB:"publish-gpr",GITHUB_WORKSPACE:"/home/runner/work/passport/passport",TURBO_INVOCATION_DIR:"/home/runner/work/passport/passport",npm_package_engines_pnpm:">=9",npm_config_npm_globalconfig:"/opt/hostedtoolcache/node/24.11.1/x64/etc/npmrc",GITHUB_RUN_ATTEMPT:"1",GITHUB_SHA:"aa7fa8fd4a160d1ba8fb3e08d0ac4653f7cf421e",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",GITHUB_ACTOR:"mikeavvad",GITHUB_REF:"refs/heads/main",npm_config_globalconfig:"/home/runner/.config/pnpm/rc",GITHUB_ACTOR_ID:"87299315",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_208a712f-fd45-48c9-9613-fbb4e0b7f779",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/passport/passport/packages/passport-evm",RUNNER_WORKSPACE:"/home/runner/work/passport",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/bin/pnpm.cjs",ACTIONS_ID_TOKEN_REQUEST_URL:"https://run-actions-2-azure-eastus.actions.githubusercontent.com/177//idtoken/ee669817-7d55-4cbd-bcfa-a8a3fde6f000/c162a573-88b9-5745-b330-b8f12eb3d158?api-version=2.0",ANDROID_HOME:"/usr/local/lib/android/sdk",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_EVENT_NAME:"push",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_208a712f-fd45-48c9-9613-fbb4e0b7f779",GITHUB_SERVER_URL:"https://github.com",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",HOMEBREW_NO_AUTO_UPDATE:"1",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/passport/passport/packages/passport-evm",npm_config__jsr_registry:"https://npm.jsr.io/",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",CHROME_BIN:"/usr/bin/google-chrome",SGX_AESM_ADDR:"1",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_208a712f-fd45-48c9-9613-fbb4e0b7f779",INIT_CWD:"/home/runner/work/passport/passport/packages/passport-evm",NODE_ENV:"production"},tt;if(typeof window>"u"){var NI={hostname:""};tt={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:NI,referrer:""},screen:{width:0,height:0},location:NI,addEventListener:function(){},removeEventListener:function(){}}}else tt=window;function xI(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function II(t,e,r,n,i,s,o){try{var a=t[s](o),c=a.value}catch(l){r(l);return}a.done?e(c):Promise.resolve(c).then(n,i)}function uk(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function o(c){II(s,n,i,o,a,"next",c)}function a(c){II(s,n,i,o,a,"throw",c)}o(void 0)})}}function Dv(t,e,r){return OI()?Dv=Reflect.construct:Dv=function(i,s,o){var a=[null];a.push.apply(a,s);var c=Function.bind.apply(i,a),l=new c;return o&&Um(l,o.prototype),l},Dv.apply(null,arguments)}function qY(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pn(t,e,r){return e&&qY(t.prototype,e),t}function er(){return er=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},er.apply(this,arguments)}function dk(t){return dk=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},dk(t)}function jn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Um(t,e)}function Pt(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function XY(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Mm(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Um(t,e){return Um=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Um(t,e)}function Vt(t){"@swc/helpers - typeof";return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}function eK(t,e){if(t){if(typeof t=="string")return xI(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xI(t,e)}}function Wv(t){var e=typeof Map=="function"?new Map:void 0;return Wv=function(n){if(n===null||!XY(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return Dv(n,arguments,dk(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Um(i,n)},Wv(t)}function OI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OI=function(){return!!t})()}function ht(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=eK(t))||e){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Lm(t,e){var r,n,i,s,o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=l[0]&2?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(l[0]===6&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=e.call(t,o)}catch(u){l=[6,u],n=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function BI(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var tK=Object.defineProperty,rK=function(t,e,r){return e in t?tK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},et=function(t,e,r){return rK(t,(typeof e>"u"?"undefined":Vt(e))!=="symbol"?e+"":e,r)},MI,nK=Object.defineProperty,iK=function(t,e,r){return e in t?nK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},UI=function(t,e,r){return iK(t,(typeof e>"u"?"undefined":Vt(e))!=="symbol"?e+"":e,r)},ln=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}(ln||{}),LI={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},FI={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},jv={},sK=function(){return!!globalThis.Zone};function hk(t){if(jv[t])return jv[t];var e=globalThis[t],r=e.prototype,n=t in LI?LI[t]:void 0,i=!!(n&&n.every(function(u){var h,d;return!!((d=(h=Object.getOwnPropertyDescriptor(r,u))==null?void 0:h.get)!=null&&d.toString().includes("[native code]"))})),s=t in FI?FI[t]:void 0,o=!!(s&&s.every(function(u){var h;return typeof r[u]=="function"&&((h=r[u])==null?void 0:h.toString().includes("[native code]"))}));if(i&&o&&!sK())return jv[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var c=a.contentWindow;if(!c)return e.prototype;var l=c[t].prototype;return document.body.removeChild(a),l?jv[t]=l:r}catch{return r}}var fk={};function tl(t,e,r){var n,i=t+"."+String(r);if(fk[i])return fk[i].call(e);var s=hk(t),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(fk[i]=o,o.call(e)):e[r]}var pk={};function VI(t,e,r){var n=t+"."+String(r);if(pk[n])return pk[n].bind(e);var i=hk(t),s=i[r];return typeof s!="function"?e[r]:(pk[n]=s,s.bind(e))}function oK(t){return tl("Node",t,"childNodes")}function aK(t){return tl("Node",t,"parentNode")}function cK(t){return tl("Node",t,"parentElement")}function lK(t){return tl("Node",t,"textContent")}function uK(t,e){return VI("Node",t,"contains")(e)}function dK(t){return VI("Node",t,"getRootNode")()}function hK(t){return!t||!("host"in t)?null:tl("ShadowRoot",t,"host")}function fK(t){return t.styleSheets}function pK(t){return!t||!("shadowRoot"in t)?null:tl("Element",t,"shadowRoot")}function gK(t,e){return tl("Element",t,"querySelector")(e)}function mK(t,e){return tl("Element",t,"querySelectorAll")(e)}function yK(){return hk("MutationObserver").constructor}function vK(t,e,r){try{if(!(e in t))return function(){};var n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,function(){t[e]=n}}catch{return function(){}}}var Gn={childNodes:oK,parentNode:aK,parentElement:cK,textContent:lK,contains:uK,getRootNode:dK,host:hK,styleSheets:fK,shadowRoot:pK,querySelector:gK,querySelectorAll:mK,mutationObserver:yK,patch:vK};function DI(t){return t.nodeType===t.ELEMENT_NODE}function Fm(t){var e=t&&"host"in t&&"mode"in t&&Gn.host(t)||null;return!!(e&&"shadowRoot"in e&&Gn.shadowRoot(e)===t)}function Vm(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function bK(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function wK(t){var e=t.cssText;if(e.split('"').length<3)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return t.layerName===""?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function gk(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;!r&&t.ownerNode&&t.ownerNode.ownerDocument&&(r=t.ownerNode.ownerDocument.location.href);var n=Array.from(e,function(i){return WI(i,r)}).join("");return bK(n)}catch{return null}}function WI(t,e){if(EK(t)){var r;try{r=gk(t.styleSheet)||wK(t)}catch{r=t.cssText}return t.styleSheet.href?$v(r,t.styleSheet.href):r}else{var n=t.cssText;return AK(t)&&t.selectorText.includes(":")&&(n=kK(n)),e?$v(n,e):n}}function kK(t){var e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function EK(t){return"styleSheet"in t}function AK(t){return"selectorText"in t}var jI=function(){function t(){UI(this,"idNodeMap",new Map),UI(this,"nodeMetaMap",new WeakMap)}var e=t.prototype;return e.getId=function(n){var i;if(!n)return-1;var s=(i=this.getMeta(n))==null?void 0:i.id;return s??-1},e.getNode=function(n){return this.idNodeMap.get(n)||null},e.getIds=function(){return Array.from(this.idNodeMap.keys())},e.getMeta=function(n){return this.nodeMetaMap.get(n)||null},e.removeNodeFromMap=function(n){var i=this,s=this.getId(n);this.idNodeMap.delete(s),n.childNodes&&n.childNodes.forEach(function(o){return i.removeNodeFromMap(o)})},e.has=function(n){return this.idNodeMap.has(n)},e.hasNode=function(n){return this.nodeMetaMap.has(n)},e.add=function(n,i){var s=i.id;this.idNodeMap.set(s,n),this.nodeMetaMap.set(n,i)},e.replace=function(n,i){var s=this.getNode(n);if(s){var o=this.nodeMetaMap.get(s);o&&this.nodeMetaMap.set(i,o)}this.idNodeMap.set(n,i)},e.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function _K(){return new jI}function Gv(t){var e=t.element,r=t.maskInputOptions,n=t.tagName,i=t.type,s=t.value,o=t.maskInputFn,a=s||"",c=i&&od(i);return(r[n.toLowerCase()]||c&&r[c])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function od(t){return t.toLowerCase()}var GI="__rrweb_original__";function TK(t){var e=t.getContext("2d");if(!e)return!0;for(var r=50,n=0;n<t.width;n+=r)for(var i=0;i<t.height;i+=r){var s=e.getImageData,o=GI in s?s[GI]:s,a=new Uint32Array(o.call(e,n,i,Math.min(r,t.width-n),Math.min(r,t.height-i)).data.buffer);if(a.some(function(c){return c!==0}))return!1}return!0}function zv(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?od(e):null}function zI(t,e){var r;try{r=new URL(t,e??window.location.href)}catch{return null}var n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n),s;return(s=i?.[1])!=null?s:null}function CK(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var SK=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,RK=/^(?:[a-z+]+:)?\/\//i,PK=/^www\..*/i,NK=/^(data:)([^,]*),(.*)/i;function $v(t,e){return(t||"").replace(SK,function(r,n,i,s,o,a){var c=i||o||a,l=n||s||"";if(!c)return r;if(RK.test(c)||PK.test(c)||NK.test(c))return"url("+l+c+l+")";if(c[0]==="/")return"url("+l+(CK(e)+c)+l+")";var u=e.split("/"),h=c.split("/");u.pop();for(var d=ht(h),p;!(p=d()).done;){var g=p.value;g!=="."&&(g===".."?u.pop():u.push(g))}return"url("+l+u.join("/")+l+")"})}function Hv(t,e){return e===void 0&&(e=!1),e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function xK(t,e,r){r===void 0&&(r=!1);var n=Array.from(e.childNodes),i=[],s=0;if(n.length>1&&t&&typeof t=="string"){for(var o=Hv(t,r),a=o.length/t.length,c=1;c<n.length;c++)if(n[c].textContent&&typeof n[c].textContent=="string"){for(var l=Hv(n[c].textContent,r),u=100,h=3;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,h),1)!==-1);h++);for(;h<l.length;h++){var d=l.substring(0,h),p=o.split(d),g=-1;if(p.length===2)g=p[0].length;else if(p.length>2&&p[0]===""&&n[c-1].textContent!=="")g=o.indexOf(d,1);else if(p.length===1){if(d=d.substring(0,d.length-1),p=o.split(d),p.length<=1)return i.push(t),i;h=u+1}else h===l.length-1&&(g=o.indexOf(d));if(p.length>=2&&h>u){var m=n[c-1].textContent;if(m&&typeof m=="string"){var y=Hv(m).length;g=o.indexOf(d,y)}g===-1&&(g=p[0].length)}if(g!==-1){for(var v=Math.floor(g/a);v>0&&v<t.length;){if(s+=1,s>50*n.length)return i.push(t),i;var A=Hv(t.substring(0,v),r);if(A.length===g){i.push(t.substring(0,v)),t=t.substring(v),o=o.substring(g);break}else A.length<g?v+=Math.max(1,Math.floor((g-A.length)/a)):v-=Math.max(1,Math.floor((A.length-g)*a))}break}}}}return i.push(t),i}function IK(t,e){return xK(t,e).join("/* rr_split */")}var OK=1,BK=new RegExp("[^a-z0-9-_:]"),Dm=-2;function $I(){return OK++}function MK(t){if(Pt(t,HTMLFormElement))return"form";var e=od(t.tagName);return BK.test(e)?"div":e}var kf,HI,UK=/^[^ \t\n\r\u000c]+/,LK=/^[, \t\n\r\u000c]+/;function FK(t,e){if(e.trim()==="")return e;var r=0;function n(l){var u,h=l.exec(e.substring(r));return h?(u=h[0],r+=u.length,u):""}for(var i=[];n(LK),!(r>=e.length);){var s=n(UK);if(s.slice(-1)===",")s=Ef(t,s.substring(0,s.length-1)),i.push(s);else{var o="";s=Ef(t,s);for(var a=!1;;){var c=e.charAt(r);if(c===""){i.push((s+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){r+=1,i.push((s+o).trim());break}else c==="("&&(a=!0);o+=c,r+=1}}}return i.join(", ")}var ZI=new WeakMap;function Ef(t,e){return!e||e.trim()===""?e:mk(t,e)}function VK(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function mk(t,e){var r=ZI.get(t);if(r||(r=t.createElement("a"),ZI.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function JI(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(e==="table"||e==="td"||e==="th")?Ef(t,n):r==="srcset"?FK(t,n):r==="style"?$v(n,mk(t)):e==="object"&&r==="data"?Ef(t,n):n)}function QI(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function DK(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var n=t.classList.length;n--;){var i=t.classList[n];if(e.test(i))return!0}if(r)return t.matches(r)}catch{}return!1}function Zv(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?Zv(Gn.parentNode(t),e,r):!1;for(var n=t.classList.length;n--;){var i=t.classList[n];if(e.test(i))return!0}return r?Zv(Gn.parentNode(t),e,r):!1}function YI(t,e,r,n){var i;if(DI(t)){if(i=t,!Gn.childNodes(i).length)return!1}else{if(Gn.parentElement(t)===null)return!1;i=Gn.parentElement(t)}try{if(typeof e=="string"){if(n){if(i.closest("."+e))return!0}else if(i.classList.contains(e))return!0}else if(Zv(i,e,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function WK(t,e,r){var n=t.contentWindow;if(n){var i=!1,s;try{s=n.document.readyState}catch{return}if(s!=="complete"){var o=setTimeout(function(){i||(e(),i=!0)},r);t.addEventListener("load",function(){clearTimeout(o),i=!0,e()});return}var a="about:blank";if(n.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}}function jK(t,e,r){var n=!1,i;try{i=t.sheet}catch{return}if(!i){var s=setTimeout(function(){n||(e(),n=!0)},r);t.addEventListener("load",function(){clearTimeout(s),n=!0,e()})}}function GK(t,e){var r=e.doc,n=e.mirror,i=e.blockClass,s=e.blockSelector,o=e.needsMask,a=e.inlineStylesheet,c=e.maskInputOptions,l=c===void 0?{}:c,u=e.maskTextFn,h=e.maskInputFn,d=e.dataURLOptions,p=d===void 0?{}:d,g=e.inlineImages,m=e.recordCanvas,y=e.keepIframeSrcFn,v=e.newlyAddedElement,A=v===void 0?!1:v,E=e.cssCaptured,w=E===void 0?!1:E,C=zK(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:ln.Document,childNodes:[],compatMode:t.compatMode}:{type:ln.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:ln.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:C};case t.ELEMENT_NODE:return HK(t,{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:p,inlineImages:g,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:A,rootId:C});case t.TEXT_NODE:return $K(t,{doc:r,needsMask:o,maskTextFn:u,rootId:C,cssCaptured:w});case t.CDATA_SECTION_NODE:return{type:ln.CDATA,textContent:"",rootId:C};case t.COMMENT_NODE:return{type:ln.Comment,textContent:Gn.textContent(t)||"",rootId:C};default:return!1}}function zK(t,e){if(e.hasNode(t)){var r=e.getId(t);return r===1?void 0:r}}function $K(t,e){var r=e.needsMask,n=e.maskTextFn,i=e.rootId,s=e.cssCaptured,o=Gn.parentNode(t),a=o&&o.tagName,c="",l=a==="STYLE"?!0:void 0,u=a==="SCRIPT"?!0:void 0;return u?c="SCRIPT_PLACEHOLDER":s||(c=Gn.textContent(t),l&&c&&(c=$v(c,mk(e.doc)))),!l&&!u&&c&&r&&(c=n?n(c,Gn.parentElement(t)):c.replace(/[\S]/g,"*")),{type:ln.Text,textContent:c||"",rootId:i}}function HK(t,e){for(var r=e.doc,n=e.blockClass,i=e.blockSelector,s=e.inlineStylesheet,o=e.maskInputOptions,a=o===void 0?{}:o,c=e.maskInputFn,l=e.dataURLOptions,u=l===void 0?{}:l,h=e.inlineImages,d=e.recordCanvas,p=e.keepIframeSrcFn,g=e.newlyAddedElement,m=g===void 0?!1:g,y=e.rootId,v=DK(t,n,i),A=MK(t),E={},w=t.attributes.length,C=0;C<w;C++){var O=t.attributes[C];QI(A,O.name,O.value)||(E[O.name]=JI(r,A,od(O.name),O.value))}if(A==="link"&&s){var U=Array.from(r.styleSheets).find(function(ye){return ye.href===t.href}),I=null;U&&(I=gk(U)),I&&(delete E.rel,delete E.href,E._cssText=I)}if(A==="style"&&t.sheet){var B=gk(t.sheet);B&&(t.childNodes.length>1&&(B=IK(B,t)),E._cssText=B)}if(A==="input"||A==="textarea"||A==="select"){var W=t.value,M=t.checked;E.type!=="radio"&&E.type!=="checkbox"&&E.type!=="submit"&&E.type!=="button"&&W?E.value=Gv({element:t,type:zv(t),tagName:A,value:W,maskInputOptions:a,maskInputFn:c}):M&&(E.checked=M)}if(A==="option"&&(t.selected&&!a.select?E.selected=!0:delete E.selected),A==="dialog"&&t.open&&(E.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),A==="canvas"&&d){if(t.__context==="2d")TK(t)||(E.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){var x=t.toDataURL(u.type,u.quality),P=r.createElement("canvas");P.width=t.width,P.height=t.height;var L=P.toDataURL(u.type,u.quality);x!==L&&(E.rr_dataURL=x)}}if(A==="img"&&h){kf||(kf=r.createElement("canvas"),HI=kf.getContext("2d"));var F=t,G=F.currentSrc||F.getAttribute("src")||"<unknown-src>",j=F.crossOrigin,q=function(){F.removeEventListener("load",q);try{kf.width=F.naturalWidth,kf.height=F.naturalHeight,HI.drawImage(F,0,0),E.rr_dataURL=kf.toDataURL(u.type,u.quality)}catch(ye){if(F.crossOrigin!=="anonymous"){F.crossOrigin="anonymous",F.complete&&F.naturalWidth!==0?q():F.addEventListener("load",q);return}else console.warn("Cannot inline img src="+G+"! Error: "+ye)}F.crossOrigin==="anonymous"&&(j?E.crossOrigin=j:F.removeAttribute("crossorigin"))};F.complete&&F.naturalWidth!==0?q():F.addEventListener("load",q)}if(A==="audio"||A==="video"){var z=E;z.rr_mediaState=t.paused?"paused":"played",z.rr_mediaCurrentTime=t.currentTime,z.rr_mediaPlaybackRate=t.playbackRate,z.rr_mediaMuted=t.muted,z.rr_mediaLoop=t.loop,z.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop)),v){var Q=t.getBoundingClientRect(),K=Q.width,te=Q.height;E={class:E.class,rr_width:""+K+"px",rr_height:""+te+"px"}}A==="iframe"&&!p(E.src)&&(t.contentDocument||(E.rr_src=E.src),delete E.src);var oe;try{customElements.get(A)&&(oe=!0)}catch{}return{type:ln.Element,tagName:A,attributes:E,childNodes:[],isSVG:VK(t)||void 0,needBlock:v,rootId:y,isCustom:oe}}function vr(t){return t==null?"":t.toLowerCase()}function ZK(t,e){if(e.comment&&t.type===ln.Comment)return!0;if(t.type===ln.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&zI(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(vr(t.attributes.name).match(/^msapplication-tile(image|color)$/)||vr(t.attributes.name)==="application-name"||vr(t.attributes.rel)==="icon"||vr(t.attributes.rel)==="apple-touch-icon"||vr(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&vr(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(vr(t.attributes.property).match(/^(og|twitter|fb):/)||vr(t.attributes.name).match(/^(og|twitter):/)||vr(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(vr(t.attributes.name)==="robots"||vr(t.attributes.name)==="googlebot"||vr(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(vr(t.attributes.name)==="author"||vr(t.attributes.name)==="generator"||vr(t.attributes.name)==="framework"||vr(t.attributes.name)==="publisher"||vr(t.attributes.name)==="progid"||vr(t.attributes.property).match(/^article:/)||vr(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(vr(t.attributes.name)==="google-site-verification"||vr(t.attributes.name)==="yandex-verification"||vr(t.attributes.name)==="csrf-token"||vr(t.attributes.name)==="p:domain_verify"||vr(t.attributes.name)==="verify-v1"||vr(t.attributes.name)==="verification"||vr(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Af(t,e){var r=e.doc,n=e.mirror,i=e.blockClass,s=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,c=e.skipChild,l=c===void 0?!1:c,u=e.inlineStylesheet,h=u===void 0?!0:u,d=e.maskInputOptions,p=d===void 0?{}:d,g=e.maskTextFn,m=e.maskInputFn,y=e.slimDOMOptions,v=e.dataURLOptions,A=v===void 0?{}:v,E=e.inlineImages,w=E===void 0?!1:E,C=e.recordCanvas,O=C===void 0?!1:C,U=e.onSerialize,I=e.onIframeLoad,B=e.iframeLoadTimeout,W=B===void 0?5e3:B,M=e.onStylesheetLoad,x=e.stylesheetLoadTimeout,P=x===void 0?5e3:x,L=e.keepIframeSrcFn,F=L===void 0?function(){return!1}:L,G=e.newlyAddedElement,j=G===void 0?!1:G,q=e.cssCaptured,z=q===void 0?!1:q,Q=e.needsMask,K=e.preserveWhiteSpace,te=K===void 0?!0:K;if(!Q){var oe=Q===void 0;Q=YI(t,o,a,oe)}var ye=GK(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:Q,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:A,inlineImages:w,recordCanvas:O,keepIframeSrcFn:F,newlyAddedElement:j,cssCaptured:z});if(!ye)return console.warn(t,"not serialized"),null;var _e;n.hasNode(t)?_e=n.getId(t):ZK(ye,y)||!te&&ye.type===ln.Text&&!ye.textContent.replace(/^\s+|\s+$/gm,"").length?_e=Dm:_e=$I();var Ce=Object.assign(ye,{id:_e});if(n.add(t,Ce),_e===Dm)return null;U&&U(t);var ie=!l;if(Ce.type===ln.Element){ie=ie&&!Ce.needBlock,delete Ce.needBlock;var le=Gn.shadowRoot(t);le&&Vm(le)&&(Ce.isShadowHost=!0)}if((Ce.type===ln.Document||Ce.type===ln.Element)&&ie){y.headWhitespace&&Ce.type===ln.Element&&Ce.tagName==="head"&&(te=!1);var we={doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:Q,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:O,preserveWhiteSpace:te,onSerialize:U,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:M,stylesheetLoadTimeout:P,keepIframeSrcFn:F,cssCaptured:!1};if(!(Ce.type===ln.Element&&Ce.tagName==="textarea"&&Ce.attributes.value!==void 0)){Ce.type===ln.Element&&Ce.attributes._cssText!==void 0&&typeof Ce.attributes._cssText=="string"&&(we.cssCaptured=!0);for(var D=ht(Array.from(Gn.childNodes(t))),ue;!(ue=D()).done;){var me=ue.value,be=Af(me,we);be&&Ce.childNodes.push(be)}}var re=null;if(DI(t)&&(re=Gn.shadowRoot(t)))for(var N=ht(Array.from(Gn.childNodes(re))),$;!($=N()).done;){var ee=$.value,fe=Af(ee,we);fe&&(Vm(re)&&(fe.isShadow=!0),Ce.childNodes.push(fe))}}var Ae=Gn.parentNode(t);return Ae&&Fm(Ae)&&Vm(Ae)&&(Ce.isShadow=!0),Ce.type===ln.Element&&Ce.tagName==="iframe"&&WK(t,function(){var Se=t.contentDocument;if(Se&&I){var J=Af(Se,{doc:Se,mirror:n,blockClass:i,blockSelector:s,needsMask:Q,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:O,preserveWhiteSpace:te,onSerialize:U,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:M,stylesheetLoadTimeout:P,keepIframeSrcFn:F});J&&I(t,J)}},W),Ce.type===ln.Element&&Ce.tagName==="link"&&typeof Ce.attributes.rel=="string"&&(Ce.attributes.rel==="stylesheet"||Ce.attributes.rel==="preload"&&typeof Ce.attributes.href=="string"&&zI(Ce.attributes.href)==="css")&&jK(t,function(){if(M){var Se=Af(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:Q,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:O,preserveWhiteSpace:te,onSerialize:U,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:M,stylesheetLoadTimeout:P,keepIframeSrcFn:F});Se&&M(t,Se)}},P),Ce}function JK(t,e){var r=e||{},n=r.mirror,i=n===void 0?new jI:n,s=r.blockClass,o=s===void 0?"rr-block":s,a=r.blockSelector,c=a===void 0?null:a,l=r.maskTextClass,u=l===void 0?"rr-mask":l,h=r.maskTextSelector,d=h===void 0?null:h,p=r.inlineStylesheet,g=p===void 0?!0:p,m=r.inlineImages,y=m===void 0?!1:m,v=r.recordCanvas,A=v===void 0?!1:v,E=r.maskAllInputs,w=E===void 0?!1:E,C=r.maskTextFn,O=r.maskInputFn,U=r.slimDOM,I=U===void 0?!1:U,B=r.dataURLOptions,W=r.preserveWhiteSpace,M=r.onSerialize,x=r.onIframeLoad,P=r.iframeLoadTimeout,L=r.onStylesheetLoad,F=r.stylesheetLoadTimeout,G=r.keepIframeSrcFn,j=G===void 0?function(){return!1}:G,q=w===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:w===!1?{password:!0}:w,z=I===!0||I==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:I==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:I===!1?{}:I;return Af(t,{doc:t,mirror:i,blockClass:o,blockSelector:c,maskTextClass:u,maskTextSelector:d,skipChild:!1,inlineStylesheet:g,maskInputOptions:q,maskTextFn:C,maskInputFn:O,slimDOMOptions:z,dataURLOptions:B,inlineImages:y,recordCanvas:A,preserveWhiteSpace:W,onSerialize:M,onIframeLoad:x,iframeLoadTimeout:P,onStylesheetLoad:L,stylesheetLoadTimeout:F,keepIframeSrcFn:j,newlyAddedElement:!1})}function QK(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function YK(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return Pt(this,n)?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var yk={exports:{}},Cr=String,KI=function(){return{isColorSupported:!1,reset:Cr,bold:Cr,dim:Cr,italic:Cr,underline:Cr,inverse:Cr,hidden:Cr,strikethrough:Cr,black:Cr,red:Cr,green:Cr,yellow:Cr,blue:Cr,magenta:Cr,cyan:Cr,white:Cr,gray:Cr,bgBlack:Cr,bgRed:Cr,bgGreen:Cr,bgYellow:Cr,bgBlue:Cr,bgMagenta:Cr,bgCyan:Cr,bgWhite:Cr}};yk.exports=KI(),yk.exports.createColors=KI;var KK=yk.exports,qK={},XK=Object.freeze(Object.defineProperty({__proto__:null,default:qK},Symbol.toStringTag,{value:"Module"})),Qr=YK(XK),qI=KK,XI=Qr,vk=function(t){jn(e,t);function e(n,i,s,o,a,c){var l;return l=t.call(this,n)||this,l.name="CssSyntaxError",l.reason=n,a&&(l.file=a),o&&(l.source=o),c&&(l.plugin=c),typeof i<"u"&&typeof s<"u"&&(typeof i=="number"?(l.line=i,l.column=s):(l.line=i.line,l.column=i.column,l.endLine=s.line,l.endColumn=s.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,e),l}var r=e.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(i){var s=this;if(!this.source)return"";var o=this.source;i==null&&(i=qI.isColorSupported),XI&&i&&(o=XI(o));var a=o.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),u=String(l).length,h,d;if(i){var p=qI.createColors(!0),g=p.bold,m=p.gray,y=p.red;h=function(v){return g(y(v))},d=function(v){return m(v)}}else h=d=function(v){return v};return a.slice(c,l).map(function(v,A){var E=c+1+A,w=" "+(" "+E).slice(-u)+" | ";if(E===s.line){var C=d(w.replace(/\d/g," "))+v.slice(0,s.column-1).replace(/[^\t]/g," ");return h(">")+d(w)+v+`
568
+ */(function(t){const e=Fv,r=lk,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=C,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const S=new s(1),k={foo:function(){return 42}};return Object.setPrototypeOf(k,s.prototype),Object.setPrototypeOf(S,k),S.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(S){if(S>i)throw new RangeError('The value "'+S+'" is invalid for option "size"');const k=new s(S);return Object.setPrototypeOf(k,u.prototype),k}function u(S,k,R){if(typeof S=="number"){if(typeof k=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(S)}return h(S,k,R)}u.poolSize=8192;function h(S,k,R){if(typeof S=="string")return m(S,k);if(o.isView(S))return v(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(se(S,o)||S&&se(S.buffer,o)||typeof a<"u"&&(se(S,a)||S&&se(S.buffer,a)))return A(S,k,R);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Z=S.valueOf&&S.valueOf();if(Z!=null&&Z!==S)return u.from(Z,k,R);const ce=E(S);if(ce)return ce;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return u.from(S[Symbol.toPrimitive]("string"),k,R);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}u.from=function(S,k,R){return h(S,k,R)},Object.setPrototypeOf(u.prototype,s.prototype),Object.setPrototypeOf(u,s);function d(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function p(S,k,R){return d(S),S<=0?l(S):k!==void 0?typeof R=="string"?l(S).fill(k,R):l(S).fill(k):l(S)}u.alloc=function(S,k,R){return p(S,k,R)};function g(S){return d(S),l(S<0?0:w(S)|0)}u.allocUnsafe=function(S){return g(S)},u.allocUnsafeSlow=function(S){return g(S)};function m(S,k){if((typeof k!="string"||k==="")&&(k="utf8"),!u.isEncoding(k))throw new TypeError("Unknown encoding: "+k);const R=O(S,k)|0;let Z=l(R);const ce=Z.write(S,k);return ce!==R&&(Z=Z.slice(0,ce)),Z}function y(S){const k=S.length<0?0:w(S.length)|0,R=l(k);for(let Z=0;Z<k;Z+=1)R[Z]=S[Z]&255;return R}function v(S){if(se(S,s)){const k=new s(S);return A(k.buffer,k.byteOffset,k.byteLength)}return y(S)}function A(S,k,R){if(k<0||S.byteLength<k)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<k+(R||0))throw new RangeError('"length" is outside of buffer bounds');let Z;return k===void 0&&R===void 0?Z=new s(S):R===void 0?Z=new s(S,k):Z=new s(S,k,R),Object.setPrototypeOf(Z,u.prototype),Z}function E(S){if(u.isBuffer(S)){const k=w(S.length)|0,R=l(k);return R.length===0||S.copy(R,0,0,k),R}if(S.length!==void 0)return typeof S.length!="number"||ae(S.length)?l(0):y(S);if(S.type==="Buffer"&&Array.isArray(S.data))return y(S.data)}function w(S){if(S>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return S|0}function C(S){return+S!=S&&(S=0),u.alloc(+S)}u.isBuffer=function(k){return k!=null&&k._isBuffer===!0&&k!==u.prototype},u.compare=function(k,R){if(se(k,s)&&(k=u.from(k,k.offset,k.byteLength)),se(R,s)&&(R=u.from(R,R.offset,R.byteLength)),!u.isBuffer(k)||!u.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(k===R)return 0;let Z=k.length,ce=R.length;for(let de=0,ke=Math.min(Z,ce);de<ke;++de)if(k[de]!==R[de]){Z=k[de],ce=R[de];break}return Z<ce?-1:ce<Z?1:0},u.isEncoding=function(k){switch(String(k).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(k,R){if(!Array.isArray(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return u.alloc(0);let Z;if(R===void 0)for(R=0,Z=0;Z<k.length;++Z)R+=k[Z].length;const ce=u.allocUnsafe(R);let de=0;for(Z=0;Z<k.length;++Z){let ke=k[Z];if(se(ke,s))de+ke.length>ce.length?(u.isBuffer(ke)||(ke=u.from(ke)),ke.copy(ce,de)):s.prototype.set.call(ce,ke,de);else if(u.isBuffer(ke))ke.copy(ce,de);else throw new TypeError('"list" argument must be an Array of Buffers');de+=ke.length}return ce};function O(S,k){if(u.isBuffer(S))return S.length;if(o.isView(S)||se(S,o))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const R=S.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&R===0)return 0;let ce=!1;for(;;)switch(k){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return Se(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R*2;case"hex":return R>>>1;case"base64":return Pe(S).length;default:if(ce)return Z?-1:Se(S).length;k=(""+k).toLowerCase(),ce=!0}}u.byteLength=O;function U(S,k,R){let Z=!1;if((k===void 0||k<0)&&(k=0),k>this.length||((R===void 0||R>this.length)&&(R=this.length),R<=0)||(R>>>=0,k>>>=0,R<=k))return"";for(S||(S="utf8");;)switch(S){case"hex":return te(this,k,R);case"utf8":case"utf-8":return j(this,k,R);case"ascii":return Q(this,k,R);case"latin1":case"binary":return K(this,k,R);case"base64":return G(this,k,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,k,R);default:if(Z)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),Z=!0}}u.prototype._isBuffer=!0;function I(S,k,R){const Z=S[k];S[k]=S[R],S[R]=Z}u.prototype.swap16=function(){const k=this.length;if(k%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let R=0;R<k;R+=2)I(this,R,R+1);return this},u.prototype.swap32=function(){const k=this.length;if(k%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let R=0;R<k;R+=4)I(this,R,R+3),I(this,R+1,R+2);return this},u.prototype.swap64=function(){const k=this.length;if(k%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let R=0;R<k;R+=8)I(this,R,R+7),I(this,R+1,R+6),I(this,R+2,R+5),I(this,R+3,R+4);return this},u.prototype.toString=function(){const k=this.length;return k===0?"":arguments.length===0?j(this,0,k):U.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(k){if(!u.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k?!0:u.compare(this,k)===0},u.prototype.inspect=function(){let k="";const R=t.INSPECT_MAX_BYTES;return k=this.toString("hex",0,R).replace(/(.{2})/g,"$1 ").trim(),this.length>R&&(k+=" ... "),"<Buffer "+k+">"},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(k,R,Z,ce,de){if(se(k,s)&&(k=u.from(k,k.offset,k.byteLength)),!u.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(R===void 0&&(R=0),Z===void 0&&(Z=k?k.length:0),ce===void 0&&(ce=0),de===void 0&&(de=this.length),R<0||Z>k.length||ce<0||de>this.length)throw new RangeError("out of range index");if(ce>=de&&R>=Z)return 0;if(ce>=de)return-1;if(R>=Z)return 1;if(R>>>=0,Z>>>=0,ce>>>=0,de>>>=0,this===k)return 0;let ke=de-ce,Ne=Z-R;const ze=Math.min(ke,Ne),Ft=this.slice(ce,de),St=k.slice(R,Z);for(let vt=0;vt<ze;++vt)if(Ft[vt]!==St[vt]){ke=Ft[vt],Ne=St[vt];break}return ke<Ne?-1:Ne<ke?1:0};function B(S,k,R,Z,ce){if(S.length===0)return-1;if(typeof R=="string"?(Z=R,R=0):R>2147483647?R=2147483647:R<-2147483648&&(R=-2147483648),R=+R,ae(R)&&(R=ce?0:S.length-1),R<0&&(R=S.length+R),R>=S.length){if(ce)return-1;R=S.length-1}else if(R<0)if(ce)R=0;else return-1;if(typeof k=="string"&&(k=u.from(k,Z)),u.isBuffer(k))return k.length===0?-1:W(S,k,R,Z,ce);if(typeof k=="number")return k=k&255,typeof s.prototype.indexOf=="function"?ce?s.prototype.indexOf.call(S,k,R):s.prototype.lastIndexOf.call(S,k,R):W(S,[k],R,Z,ce);throw new TypeError("val must be string, number or Buffer")}function W(S,k,R,Z,ce){let de=1,ke=S.length,Ne=k.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(S.length<2||k.length<2)return-1;de=2,ke/=2,Ne/=2,R/=2}function ze(St,vt){return de===1?St[vt]:St.readUInt16BE(vt*de)}let Ft;if(ce){let St=-1;for(Ft=R;Ft<ke;Ft++)if(ze(S,Ft)===ze(k,St===-1?0:Ft-St)){if(St===-1&&(St=Ft),Ft-St+1===Ne)return St*de}else St!==-1&&(Ft-=Ft-St),St=-1}else for(R+Ne>ke&&(R=ke-Ne),Ft=R;Ft>=0;Ft--){let St=!0;for(let vt=0;vt<Ne;vt++)if(ze(S,Ft+vt)!==ze(k,vt)){St=!1;break}if(St)return Ft}return-1}u.prototype.includes=function(k,R,Z){return this.indexOf(k,R,Z)!==-1},u.prototype.indexOf=function(k,R,Z){return B(this,k,R,Z,!0)},u.prototype.lastIndexOf=function(k,R,Z){return B(this,k,R,Z,!1)};function M(S,k,R,Z){R=Number(R)||0;const ce=S.length-R;Z?(Z=Number(Z),Z>ce&&(Z=ce)):Z=ce;const de=k.length;Z>de/2&&(Z=de/2);let ke;for(ke=0;ke<Z;++ke){const Ne=parseInt(k.substr(ke*2,2),16);if(ae(Ne))return ke;S[R+ke]=Ne}return ke}function x(S,k,R,Z){return Ve(Se(k,S.length-R),S,R,Z)}function P(S,k,R,Z){return Ve(J(k),S,R,Z)}function L(S,k,R,Z){return Ve(Pe(k),S,R,Z)}function F(S,k,R,Z){return Ve(ge(k,S.length-R),S,R,Z)}u.prototype.write=function(k,R,Z,ce){if(R===void 0)ce="utf8",Z=this.length,R=0;else if(Z===void 0&&typeof R=="string")ce=R,Z=this.length,R=0;else if(isFinite(R))R=R>>>0,isFinite(Z)?(Z=Z>>>0,ce===void 0&&(ce="utf8")):(ce=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const de=this.length-R;if((Z===void 0||Z>de)&&(Z=de),k.length>0&&(Z<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");ce||(ce="utf8");let ke=!1;for(;;)switch(ce){case"hex":return M(this,k,R,Z);case"utf8":case"utf-8":return x(this,k,R,Z);case"ascii":case"latin1":case"binary":return P(this,k,R,Z);case"base64":return L(this,k,R,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,k,R,Z);default:if(ke)throw new TypeError("Unknown encoding: "+ce);ce=(""+ce).toLowerCase(),ke=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function G(S,k,R){return k===0&&R===S.length?e.fromByteArray(S):e.fromByteArray(S.slice(k,R))}function j(S,k,R){R=Math.min(S.length,R);const Z=[];let ce=k;for(;ce<R;){const de=S[ce];let ke=null,Ne=de>239?4:de>223?3:de>191?2:1;if(ce+Ne<=R){let ze,Ft,St,vt;switch(Ne){case 1:de<128&&(ke=de);break;case 2:ze=S[ce+1],(ze&192)===128&&(vt=(de&31)<<6|ze&63,vt>127&&(ke=vt));break;case 3:ze=S[ce+1],Ft=S[ce+2],(ze&192)===128&&(Ft&192)===128&&(vt=(de&15)<<12|(ze&63)<<6|Ft&63,vt>2047&&(vt<55296||vt>57343)&&(ke=vt));break;case 4:ze=S[ce+1],Ft=S[ce+2],St=S[ce+3],(ze&192)===128&&(Ft&192)===128&&(St&192)===128&&(vt=(de&15)<<18|(ze&63)<<12|(Ft&63)<<6|St&63,vt>65535&&vt<1114112&&(ke=vt))}}ke===null?(ke=65533,Ne=1):ke>65535&&(ke-=65536,Z.push(ke>>>10&1023|55296),ke=56320|ke&1023),Z.push(ke),ce+=Ne}return z(Z)}const q=4096;function z(S){const k=S.length;if(k<=q)return String.fromCharCode.apply(String,S);let R="",Z=0;for(;Z<k;)R+=String.fromCharCode.apply(String,S.slice(Z,Z+=q));return R}function Q(S,k,R){let Z="";R=Math.min(S.length,R);for(let ce=k;ce<R;++ce)Z+=String.fromCharCode(S[ce]&127);return Z}function K(S,k,R){let Z="";R=Math.min(S.length,R);for(let ce=k;ce<R;++ce)Z+=String.fromCharCode(S[ce]);return Z}function te(S,k,R){const Z=S.length;(!k||k<0)&&(k=0),(!R||R<0||R>Z)&&(R=Z);let ce="";for(let de=k;de<R;++de)ce+=f[S[de]];return ce}function oe(S,k,R){const Z=S.slice(k,R);let ce="";for(let de=0;de<Z.length-1;de+=2)ce+=String.fromCharCode(Z[de]+Z[de+1]*256);return ce}u.prototype.slice=function(k,R){const Z=this.length;k=~~k,R=R===void 0?Z:~~R,k<0?(k+=Z,k<0&&(k=0)):k>Z&&(k=Z),R<0?(R+=Z,R<0&&(R=0)):R>Z&&(R=Z),R<k&&(R=k);const ce=this.subarray(k,R);return Object.setPrototypeOf(ce,u.prototype),ce};function ye(S,k,R){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+k>R)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k],de=1,ke=0;for(;++ke<R&&(de*=256);)ce+=this[k+ke]*de;return ce},u.prototype.readUintBE=u.prototype.readUIntBE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k+--R],de=1;for(;R>0&&(de*=256);)ce+=this[k+--R]*de;return ce},u.prototype.readUint8=u.prototype.readUInt8=function(k,R){return k=k>>>0,R||ye(k,1,this.length),this[k]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(k,R){return k=k>>>0,R||ye(k,2,this.length),this[k]|this[k+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(k,R){return k=k>>>0,R||ye(k,2,this.length),this[k]<<8|this[k+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+this[k+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]*16777216+(this[k+1]<<16|this[k+2]<<8|this[k+3])},u.prototype.readBigUInt64LE=b(function(k){k=k>>>0,$(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=R+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24,de=this[++k]+this[++k]*2**8+this[++k]*2**16+Z*2**24;return BigInt(ce)+(BigInt(de)<<BigInt(32))}),u.prototype.readBigUInt64BE=b(function(k){k=k>>>0,$(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=R*2**24+this[++k]*2**16+this[++k]*2**8+this[++k],de=this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+Z;return(BigInt(ce)<<BigInt(32))+BigInt(de)}),u.prototype.readIntLE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k],de=1,ke=0;for(;++ke<R&&(de*=256);)ce+=this[k+ke]*de;return de*=128,ce>=de&&(ce-=Math.pow(2,8*R)),ce},u.prototype.readIntBE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=R,de=1,ke=this[k+--ce];for(;ce>0&&(de*=256);)ke+=this[k+--ce]*de;return de*=128,ke>=de&&(ke-=Math.pow(2,8*R)),ke},u.prototype.readInt8=function(k,R){return k=k>>>0,R||ye(k,1,this.length),this[k]&128?(255-this[k]+1)*-1:this[k]},u.prototype.readInt16LE=function(k,R){k=k>>>0,R||ye(k,2,this.length);const Z=this[k]|this[k+1]<<8;return Z&32768?Z|4294901760:Z},u.prototype.readInt16BE=function(k,R){k=k>>>0,R||ye(k,2,this.length);const Z=this[k+1]|this[k]<<8;return Z&32768?Z|4294901760:Z},u.prototype.readInt32LE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},u.prototype.readInt32BE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},u.prototype.readBigInt64LE=b(function(k){k=k>>>0,$(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=this[k+4]+this[k+5]*2**8+this[k+6]*2**16+(Z<<24);return(BigInt(ce)<<BigInt(32))+BigInt(R+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24)}),u.prototype.readBigInt64BE=b(function(k){k=k>>>0,$(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=(R<<24)+this[++k]*2**16+this[++k]*2**8+this[++k];return(BigInt(ce)<<BigInt(32))+BigInt(this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+Z)}),u.prototype.readFloatLE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),r.read(this,k,!0,23,4)},u.prototype.readFloatBE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),r.read(this,k,!1,23,4)},u.prototype.readDoubleLE=function(k,R){return k=k>>>0,R||ye(k,8,this.length),r.read(this,k,!0,52,8)},u.prototype.readDoubleBE=function(k,R){return k=k>>>0,R||ye(k,8,this.length),r.read(this,k,!1,52,8)};function _e(S,k,R,Z,ce,de){if(!u.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>ce||k<de)throw new RangeError('"value" argument is out of bounds');if(R+Z>S.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(k,R,Z,ce){if(k=+k,R=R>>>0,Z=Z>>>0,!ce){const Ne=Math.pow(2,8*Z)-1;_e(this,k,R,Z,Ne,0)}let de=1,ke=0;for(this[R]=k&255;++ke<Z&&(de*=256);)this[R+ke]=k/de&255;return R+Z},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(k,R,Z,ce){if(k=+k,R=R>>>0,Z=Z>>>0,!ce){const Ne=Math.pow(2,8*Z)-1;_e(this,k,R,Z,Ne,0)}let de=Z-1,ke=1;for(this[R+de]=k&255;--de>=0&&(ke*=256);)this[R+de]=k/ke&255;return R+Z},u.prototype.writeUint8=u.prototype.writeUInt8=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,1,255,0),this[R]=k&255,R+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,65535,0),this[R]=k&255,this[R+1]=k>>>8,R+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,65535,0),this[R]=k>>>8,this[R+1]=k&255,R+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,4294967295,0),this[R+3]=k>>>24,this[R+2]=k>>>16,this[R+1]=k>>>8,this[R]=k&255,R+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,4294967295,0),this[R]=k>>>24,this[R+1]=k>>>16,this[R+2]=k>>>8,this[R+3]=k&255,R+4};function Ce(S,k,R,Z,ce){N(k,Z,ce,S,R,7);let de=Number(k&BigInt(4294967295));S[R++]=de,de=de>>8,S[R++]=de,de=de>>8,S[R++]=de,de=de>>8,S[R++]=de;let ke=Number(k>>BigInt(32)&BigInt(4294967295));return S[R++]=ke,ke=ke>>8,S[R++]=ke,ke=ke>>8,S[R++]=ke,ke=ke>>8,S[R++]=ke,R}function ie(S,k,R,Z,ce){N(k,Z,ce,S,R,7);let de=Number(k&BigInt(4294967295));S[R+7]=de,de=de>>8,S[R+6]=de,de=de>>8,S[R+5]=de,de=de>>8,S[R+4]=de;let ke=Number(k>>BigInt(32)&BigInt(4294967295));return S[R+3]=ke,ke=ke>>8,S[R+2]=ke,ke=ke>>8,S[R+1]=ke,ke=ke>>8,S[R]=ke,R+8}u.prototype.writeBigUInt64LE=b(function(k,R=0){return Ce(this,k,R,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=b(function(k,R=0){return ie(this,k,R,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(k,R,Z,ce){if(k=+k,R=R>>>0,!ce){const ze=Math.pow(2,8*Z-1);_e(this,k,R,Z,ze-1,-ze)}let de=0,ke=1,Ne=0;for(this[R]=k&255;++de<Z&&(ke*=256);)k<0&&Ne===0&&this[R+de-1]!==0&&(Ne=1),this[R+de]=(k/ke>>0)-Ne&255;return R+Z},u.prototype.writeIntBE=function(k,R,Z,ce){if(k=+k,R=R>>>0,!ce){const ze=Math.pow(2,8*Z-1);_e(this,k,R,Z,ze-1,-ze)}let de=Z-1,ke=1,Ne=0;for(this[R+de]=k&255;--de>=0&&(ke*=256);)k<0&&Ne===0&&this[R+de+1]!==0&&(Ne=1),this[R+de]=(k/ke>>0)-Ne&255;return R+Z},u.prototype.writeInt8=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,1,127,-128),k<0&&(k=255+k+1),this[R]=k&255,R+1},u.prototype.writeInt16LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,32767,-32768),this[R]=k&255,this[R+1]=k>>>8,R+2},u.prototype.writeInt16BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,32767,-32768),this[R]=k>>>8,this[R+1]=k&255,R+2},u.prototype.writeInt32LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,2147483647,-2147483648),this[R]=k&255,this[R+1]=k>>>8,this[R+2]=k>>>16,this[R+3]=k>>>24,R+4},u.prototype.writeInt32BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[R]=k>>>24,this[R+1]=k>>>16,this[R+2]=k>>>8,this[R+3]=k&255,R+4},u.prototype.writeBigInt64LE=b(function(k,R=0){return Ce(this,k,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=b(function(k,R=0){return ie(this,k,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function le(S,k,R,Z,ce,de){if(R+Z>S.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function we(S,k,R,Z,ce){return k=+k,R=R>>>0,ce||le(S,k,R,4),r.write(S,k,R,Z,23,4),R+4}u.prototype.writeFloatLE=function(k,R,Z){return we(this,k,R,!0,Z)},u.prototype.writeFloatBE=function(k,R,Z){return we(this,k,R,!1,Z)};function D(S,k,R,Z,ce){return k=+k,R=R>>>0,ce||le(S,k,R,8),r.write(S,k,R,Z,52,8),R+8}u.prototype.writeDoubleLE=function(k,R,Z){return D(this,k,R,!0,Z)},u.prototype.writeDoubleBE=function(k,R,Z){return D(this,k,R,!1,Z)},u.prototype.copy=function(k,R,Z,ce){if(!u.isBuffer(k))throw new TypeError("argument should be a Buffer");if(Z||(Z=0),!ce&&ce!==0&&(ce=this.length),R>=k.length&&(R=k.length),R||(R=0),ce>0&&ce<Z&&(ce=Z),ce===Z||k.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(Z<0||Z>=this.length)throw new RangeError("Index out of range");if(ce<0)throw new RangeError("sourceEnd out of bounds");ce>this.length&&(ce=this.length),k.length-R<ce-Z&&(ce=k.length-R+Z);const de=ce-Z;return this===k&&typeof s.prototype.copyWithin=="function"?this.copyWithin(R,Z,ce):s.prototype.set.call(k,this.subarray(Z,ce),R),de},u.prototype.fill=function(k,R,Z,ce){if(typeof k=="string"){if(typeof R=="string"?(ce=R,R=0,Z=this.length):typeof Z=="string"&&(ce=Z,Z=this.length),ce!==void 0&&typeof ce!="string")throw new TypeError("encoding must be a string");if(typeof ce=="string"&&!u.isEncoding(ce))throw new TypeError("Unknown encoding: "+ce);if(k.length===1){const ke=k.charCodeAt(0);(ce==="utf8"&&ke<128||ce==="latin1")&&(k=ke)}}else typeof k=="number"?k=k&255:typeof k=="boolean"&&(k=Number(k));if(R<0||this.length<R||this.length<Z)throw new RangeError("Out of range index");if(Z<=R)return this;R=R>>>0,Z=Z===void 0?this.length:Z>>>0,k||(k=0);let de;if(typeof k=="number")for(de=R;de<Z;++de)this[de]=k;else{const ke=u.isBuffer(k)?k:u.from(k,ce),Ne=ke.length;if(Ne===0)throw new TypeError('The value "'+k+'" is invalid for argument "value"');for(de=0;de<Z-R;++de)this[de+R]=ke[de%Ne]}return this};const ue={};function me(S,k,R){ue[S]=class extends R{constructor(){super(),Object.defineProperty(this,"message",{value:k.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ce,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}me("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),me("ERR_INVALID_ARG_TYPE",function(S,k){return`The "${S}" argument must be of type number. Received type ${typeof k}`},TypeError),me("ERR_OUT_OF_RANGE",function(S,k,R){let Z=`The value of "${S}" is out of range.`,ce=R;return Number.isInteger(R)&&Math.abs(R)>2**32?ce=be(String(R)):typeof R=="bigint"&&(ce=String(R),(R>BigInt(2)**BigInt(32)||R<-(BigInt(2)**BigInt(32)))&&(ce=be(ce)),ce+="n"),Z+=` It must be ${k}. Received ${ce}`,Z},RangeError);function be(S){let k="",R=S.length;const Z=S[0]==="-"?1:0;for(;R>=Z+4;R-=3)k=`_${S.slice(R-3,R)}${k}`;return`${S.slice(0,R)}${k}`}function re(S,k,R){$(k,"offset"),(S[k]===void 0||S[k+R]===void 0)&&ee(k,S.length-(R+1))}function N(S,k,R,Z,ce,de){if(S>R||S<k){const ke=typeof k=="bigint"?"n":"";let Ne;throw k===0||k===BigInt(0)?Ne=`>= 0${ke} and < 2${ke} ** ${(de+1)*8}${ke}`:Ne=`>= -(2${ke} ** ${(de+1)*8-1}${ke}) and < 2 ** ${(de+1)*8-1}${ke}`,new ue.ERR_OUT_OF_RANGE("value",Ne,S)}re(Z,ce,de)}function $(S,k){if(typeof S!="number")throw new ue.ERR_INVALID_ARG_TYPE(k,"number",S)}function ee(S,k,R){throw Math.floor(S)!==S?($(S,R),new ue.ERR_OUT_OF_RANGE("offset","an integer",S)):k<0?new ue.ERR_BUFFER_OUT_OF_BOUNDS:new ue.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${k}`,S)}const fe=/[^+/0-9A-Za-z-_]/g;function Ae(S){if(S=S.split("=")[0],S=S.trim().replace(fe,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function Se(S,k){k=k||1/0;let R;const Z=S.length;let ce=null;const de=[];for(let ke=0;ke<Z;++ke){if(R=S.charCodeAt(ke),R>55295&&R<57344){if(!ce){if(R>56319){(k-=3)>-1&&de.push(239,191,189);continue}else if(ke+1===Z){(k-=3)>-1&&de.push(239,191,189);continue}ce=R;continue}if(R<56320){(k-=3)>-1&&de.push(239,191,189),ce=R;continue}R=(ce-55296<<10|R-56320)+65536}else ce&&(k-=3)>-1&&de.push(239,191,189);if(ce=null,R<128){if((k-=1)<0)break;de.push(R)}else if(R<2048){if((k-=2)<0)break;de.push(R>>6|192,R&63|128)}else if(R<65536){if((k-=3)<0)break;de.push(R>>12|224,R>>6&63|128,R&63|128)}else if(R<1114112){if((k-=4)<0)break;de.push(R>>18|240,R>>12&63|128,R>>6&63|128,R&63|128)}else throw new Error("Invalid code point")}return de}function J(S){const k=[];for(let R=0;R<S.length;++R)k.push(S.charCodeAt(R)&255);return k}function ge(S,k){let R,Z,ce;const de=[];for(let ke=0;ke<S.length&&!((k-=2)<0);++ke)R=S.charCodeAt(ke),Z=R>>8,ce=R%256,de.push(ce),de.push(Z);return de}function Pe(S){return e.toByteArray(Ae(S))}function Ve(S,k,R,Z){let ce;for(ce=0;ce<Z&&!(ce+R>=k.length||ce>=S.length);++ce)k[ce+R]=S[ce];return ce}function se(S,k){return S instanceof k||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===k.name}function ae(S){return S!==S}const f=function(){const S="0123456789abcdef",k=new Array(256);for(let R=0;R<16;++R){const Z=R*16;for(let ce=0;ce<16;++ce)k[Z+ce]=S[R]+S[ce]}return k}();function b(S){return typeof BigInt>"u"?_:S}function _(){throw new Error("BigInt not supported")}})(RI);const el=RI.Buffer;var Vv={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_94150eb7-9245-4efb-99e9-59278b4ccbd2",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"pnpm/10.25.0 npm/? node/v24.11.1 linux x64",CI:"true",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_94150eb7-9245-4efb-99e9-59278b4ccbd2",PIPX_HOME:"/opt/pipx",RUNNER_ENVIRONMENT:"github-hosted",npm_node_execpath:"/opt/hostedtoolcache/node/24.11.1/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",NODE_AUTH_TOKEN:"XXXXX-XXXXX-XXXXX-XXXXX",SHLVL:"1",HOME:"/home/runner",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",RUNNER_TEMP:"/home/runner/work/_temp",npm_package_json:"/home/runner/work/passport/passport/packages/passport-evm/package.json",GITHUB_REPOSITORY_OWNER:"credenza-web3",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",npm_package_engines_node:">=20.10.0",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/29.0.14206865",GITHUB_RETENTION_DAYS:"90",GRADLE_HOME:"/usr/share/gradle-9.2.1",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",GITHUB_REPOSITORY_OWNER_ID:"93208388",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",npm_config__credenza3_registry:"https://registry.npmjs.org/",npm_config_userconfig:"/home/runner/work/_temp/.npmrc",SYSTEMD_EXEC_PID:"1774",npm_config_engine_strict:"true",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",ImageVersion:"20251126.144.1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",LOGNAME:"runner",RUNNER_OS:"Linux",SWIFT_PATH:"/usr/share/swift/usr/bin",pnpm_config_verify_deps_before_run:"false",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GITHUB_WORKFLOW:"Publish @credenza3/passport-evm",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:12788",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.10/x64",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"20106337189",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.4/x64",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_BASE_REF:"",GITHUB_REF_TYPE:"branch",GITHUB_WORKFLOW_SHA:"72db920f13776773d087319210f62652e8947220",ImageOS:"ubuntu24",ACTIONS_ID_TOKEN_REQUEST_TOKEN:"eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9tYWluXCIsXCJQZXJtaXNzaW9uXCI6M31dIiwiYWNzbCI6IjEwIiwiYXVkIjoidnNvOmQ5NmZlZWUwLTg5OTYtNDI2Yy1hYzBmLWY0YTQ0NzFkNWNjMyIsImJpbGxpbmdfb3duZXJfaWQiOiJPX2tnRE9CWTRfUkEiLCJleHAiOjE3NjU0MDc0MDcsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImlhdCI6MTc2NTM4NTIwNywiaXNzIjoiaHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImpvYl9pZCI6ImQ2YmI0ZTRmLTg4YjEtNTM3YS04NjBkLTBkNjMzMmJhYTIyNiIsIm5hbWVpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsIm5iZiI6MTc2NTM4NDkwNywib2lkY19leHRyYSI6IntcImFjdG9yXCI6XCJtaWtlYXZ2YWRcIixcImFjdG9yX2lkXCI6XCI4NzI5OTMxNVwiLFwiYmFzZV9yZWZcIjpcIlwiLFwiY2hlY2tfcnVuX2lkXCI6XCI1NzY5MTIwNzg4NFwiLFwiZXZlbnRfbmFtZVwiOlwicHVzaFwiLFwiaGVhZF9yZWZcIjpcIlwiLFwiam9iX3dvcmtmbG93X3JlZlwiOlwiY3JlZGVuemEtd2ViMy9wYXNzcG9ydC8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoX2V2bS55bWxAcmVmcy9oZWFkcy9tYWluXCIsXCJqb2Jfd29ya2Zsb3dfc2hhXCI6XCI3MmRiOTIwZjEzNzc2NzczZDA4NzMxOTIxMGY2MjY1MmU4OTQ3MjIwXCIsXCJyZWZcIjpcInJlZnMvaGVhZHMvbWFpblwiLFwicmVmX3Byb3RlY3RlZFwiOlwiZmFsc2VcIixcInJlZl90eXBlXCI6XCJicmFuY2hcIixcInJlcG9zaXRvcnlcIjpcImNyZWRlbnphLXdlYjMvcGFzc3BvcnRcIixcInJlcG9zaXRvcnlfaWRcIjpcIjQ5MzE1NTgxNFwiLFwicmVwb3NpdG9yeV9vd25lclwiOlwiY3JlZGVuemEtd2ViM1wiLFwicmVwb3NpdG9yeV9vd25lcl9pZFwiOlwiOTMyMDgzODhcIixcInJlcG9zaXRvcnlfdmlzaWJpbGl0eVwiOlwicHJpdmF0ZVwiLFwicnVuX2F0dGVtcHRcIjpcIjFcIixcInJ1bl9pZFwiOlwiMjAxMDYzMzcxODlcIixcInJ1bl9udW1iZXJcIjpcIjEzXCIsXCJydW5uZXJfZW52aXJvbm1lbnRcIjpcImdpdGh1Yi1ob3N0ZWRcIixcInNoYVwiOlwiNzJkYjkyMGYxMzc3Njc3M2QwODczMTkyMTBmNjI2NTJlODk0NzIyMFwiLFwid29ya2Zsb3dcIjpcIlB1Ymxpc2ggQGNyZWRlbnphMy9wYXNzcG9ydC1ldm1cIixcIndvcmtmbG93X3JlZlwiOlwiY3JlZGVuemEtd2ViMy9wYXNzcG9ydC8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoX2V2bS55bWxAcmVmcy9oZWFkcy9tYWluXCIsXCJ3b3JrZmxvd19zaGFcIjpcIjcyZGI5MjBmMTM3NzY3NzNkMDg3MzE5MjEwZjYyNjUyZTg5NDcyMjBcIn0iLCJvaWRjX3N1YiI6InJlcG86Y3JlZGVuemEtd2ViMy9wYXNzcG9ydDpyZWY6cmVmcy9oZWFkcy9tYWluIiwib3JjaF9pZCI6ImNjY2MxZTUwLTEyMDctNGE3Mi04YjlhLTYwYzhiMGFmNmVkMi5wdWJsaXNoLWdwci5fMjQiLCJvd25lcl9pZCI6Ik9fa2dET0JZNF9SQSIsInBsYW5faWQiOiJjY2NjMWU1MC0xMjA3LTRhNzItOGI5YS02MGM4YjBhZjZlZDIiLCJyZXBvc2l0b3J5X2lkIjoiNDkzMTU1ODE0IiwicnVuX2lkIjoiMjAxMDYzMzcxODkiLCJydW5fbnVtYmVyIjoiMTMiLCJydW5fdHlwZSI6ImZ1bGwiLCJydW5uZXJfaWQiOiIxMDAwMDAwODE4IiwicnVubmVyX3R5cGUiOiJob3N0ZWQiLCJzY3AiOiJBY3Rpb25zLlJlc3VsdHM6Y2NjYzFlNTAtMTIwNy00YTcyLThiOWEtNjBjOGIwYWY2ZWQyOmQ2YmI0ZTRmLTg4YjEtNTM3YS04NjBkLTBkNjMzMmJhYTIyNiBBY3Rpb25zLlJ1bm5lcjpjY2NjMWU1MC0xMjA3LTRhNzItOGI5YS02MGM4YjBhZjZlZDI6ZDZiYjRlNGYtODhiMS01MzdhLTg2MGQtMGQ2MzMyYmFhMjI2IEFjdGlvbnMuVXBsb2FkQXJ0aWZhY3RzOmNjY2MxZTUwLTEyMDctNGE3Mi04YjlhLTYwYzhiMGFmNmVkMjpkNmJiNGU0Zi04OGIxLTUzN2EtODYwZC0wZDYzMzJiYWEyMjYgZ2VuZXJhdGVfaWRfdG9rZW46Y2NjYzFlNTAtMTIwNy00YTcyLThiOWEtNjBjOGIwYWY2ZWQyOmQ2YmI0ZTRmLTg4YjEtNTM3YS04NjBkLTBkNjMzMmJhYTIyNiBBY3Rpb25zLkdlbmVyaWNSZWFkOjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCIsInNoYSI6IjcyZGI5MjBmMTM3NzY3NzNkMDg3MzE5MjEwZjYyNjUyZTg5NDcyMjAiLCJ0cnVzdF90aWVyIjoiMiJ9.3VR5rnDx2KpZ7tYmP6WgkHrjo2XtAbpyvbhp88etSzF-cR-9JekIuNuhVwwzhYefZmHzFAZn5KF6HL1ivknVLAPi3IXwpKk1j5uCfpeoLTkkbCK9VpqMxCUQJmVmK2tfz4OfAT2jFbTdrtts37sQFnUJ8G0hUqvcivRFXK_57DgkVFbgZNvZDoFcnMqAKJNr0UWSJc8ltE0udN6JOA9MolL3QcnpnstXzTn6v5OQpRwd09nU8Sa0HiIZazyi00r7J6A-59It4e-SYX6jcDpcZdkicwLhoYUy1dVHESW6fpIvT66O5oWdzhfaOWTXfpI6ifj7xBGkY500NwtUK2Mn5Q",ENABLE_RUNNER_TRACING:"true",GITHUB_ACTION_REPOSITORY:"",GITHUB_WORKFLOW_REF:"credenza-web3/passport/.github/workflows/publish_evm.yml@refs/heads/main",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.25.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/passport/passport/packages/passport-evm/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.25.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.25.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/24.11.1/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",INVOCATION_ID:"473280dd8dc94d4c92b17089d618dcb4",NODE:"/opt/hostedtoolcache/node/24.11.1/x64/bin/node",NPM_CONFIG_USERCONFIG:"/home/runner/work/_temp/.npmrc",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",RUNNER_TRACKING_ID:"github_aa7f4bac-f76a-4f3d-b589-07b4c9e7af12",TURBO_HASH:"a21eba5c0b0c79d8",npm_package_name:"@credenza3/passport-evm",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"13",GITHUB_TRIGGERING_ACTOR:"mikeavvad",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"credenza-web3/passport",RUNNER_NAME:"GitHub Actions 1000000818",XDG_CONFIG_HOME:"/home/runner/.config",npm_lifecycle_script:"vite build",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",DEBIAN_FRONTEND:"noninteractive",GITHUB_ACTION_REF:"",GITHUB_ACTIONS:"true",GITHUB_REPOSITORY_ID:"493155814",NODE_PATH:"/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules/vite/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules/vite/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.25.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.25.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.25.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.25.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.25.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.25.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",SHELL:"/bin/bash",npm_package_version:"0.3.14",npm_config_verify_deps_before_run:"false",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",ACCEPT_EULA:"Y",GITHUB_JOB:"publish-gpr",GITHUB_WORKSPACE:"/home/runner/work/passport/passport",TURBO_INVOCATION_DIR:"/home/runner/work/passport/passport",npm_package_engines_pnpm:">=9",npm_config_npm_globalconfig:"/opt/hostedtoolcache/node/24.11.1/x64/etc/npmrc",GITHUB_RUN_ATTEMPT:"1",GITHUB_SHA:"72db920f13776773d087319210f62652e8947220",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",GITHUB_ACTOR:"mikeavvad",GITHUB_REF:"refs/heads/main",npm_config_globalconfig:"/home/runner/.config/pnpm/rc",GITHUB_ACTOR_ID:"87299315",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_94150eb7-9245-4efb-99e9-59278b4ccbd2",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/passport/passport/packages/passport-evm",RUNNER_WORKSPACE:"/home/runner/work/passport",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.25.0/node_modules/pnpm/bin/pnpm.cjs",ACTIONS_ID_TOKEN_REQUEST_URL:"https://run-actions-1-azure-eastus.actions.githubusercontent.com/113//idtoken/cccc1e50-1207-4a72-8b9a-60c8b0af6ed2/d6bb4e4f-88b1-537a-860d-0d6332baa226?api-version=2.0",ANDROID_HOME:"/usr/local/lib/android/sdk",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_EVENT_NAME:"push",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_94150eb7-9245-4efb-99e9-59278b4ccbd2",GITHUB_SERVER_URL:"https://github.com",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",HOMEBREW_NO_AUTO_UPDATE:"1",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/passport/passport/packages/passport-evm",npm_config__jsr_registry:"https://npm.jsr.io/",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",CHROME_BIN:"/usr/bin/google-chrome",SGX_AESM_ADDR:"1",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_94150eb7-9245-4efb-99e9-59278b4ccbd2",INIT_CWD:"/home/runner/work/passport/passport/packages/passport-evm",NODE_ENV:"production"},tt;if(typeof window>"u"){var NI={hostname:""};tt={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:NI,referrer:""},screen:{width:0,height:0},location:NI,addEventListener:function(){},removeEventListener:function(){}}}else tt=window;function xI(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function II(t,e,r,n,i,s,o){try{var a=t[s](o),c=a.value}catch(l){r(l);return}a.done?e(c):Promise.resolve(c).then(n,i)}function uk(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function o(c){II(s,n,i,o,a,"next",c)}function a(c){II(s,n,i,o,a,"throw",c)}o(void 0)})}}function Dv(t,e,r){return OI()?Dv=Reflect.construct:Dv=function(i,s,o){var a=[null];a.push.apply(a,s);var c=Function.bind.apply(i,a),l=new c;return o&&Um(l,o.prototype),l},Dv.apply(null,arguments)}function qY(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pn(t,e,r){return e&&qY(t.prototype,e),t}function er(){return er=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},er.apply(this,arguments)}function dk(t){return dk=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},dk(t)}function jn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Um(t,e)}function Pt(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function XY(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Mm(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Um(t,e){return Um=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Um(t,e)}function Vt(t){"@swc/helpers - typeof";return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}function eK(t,e){if(t){if(typeof t=="string")return xI(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xI(t,e)}}function Wv(t){var e=typeof Map=="function"?new Map:void 0;return Wv=function(n){if(n===null||!XY(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return Dv(n,arguments,dk(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Um(i,n)},Wv(t)}function OI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OI=function(){return!!t})()}function ht(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=eK(t))||e){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Lm(t,e){var r,n,i,s,o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=l[0]&2?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(l[0]===6&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=e.call(t,o)}catch(u){l=[6,u],n=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function BI(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var tK=Object.defineProperty,rK=function(t,e,r){return e in t?tK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},et=function(t,e,r){return rK(t,(typeof e>"u"?"undefined":Vt(e))!=="symbol"?e+"":e,r)},MI,nK=Object.defineProperty,iK=function(t,e,r){return e in t?nK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},UI=function(t,e,r){return iK(t,(typeof e>"u"?"undefined":Vt(e))!=="symbol"?e+"":e,r)},ln=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}(ln||{}),LI={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},FI={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},jv={},sK=function(){return!!globalThis.Zone};function hk(t){if(jv[t])return jv[t];var e=globalThis[t],r=e.prototype,n=t in LI?LI[t]:void 0,i=!!(n&&n.every(function(u){var h,d;return!!((d=(h=Object.getOwnPropertyDescriptor(r,u))==null?void 0:h.get)!=null&&d.toString().includes("[native code]"))})),s=t in FI?FI[t]:void 0,o=!!(s&&s.every(function(u){var h;return typeof r[u]=="function"&&((h=r[u])==null?void 0:h.toString().includes("[native code]"))}));if(i&&o&&!sK())return jv[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var c=a.contentWindow;if(!c)return e.prototype;var l=c[t].prototype;return document.body.removeChild(a),l?jv[t]=l:r}catch{return r}}var fk={};function tl(t,e,r){var n,i=t+"."+String(r);if(fk[i])return fk[i].call(e);var s=hk(t),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(fk[i]=o,o.call(e)):e[r]}var pk={};function VI(t,e,r){var n=t+"."+String(r);if(pk[n])return pk[n].bind(e);var i=hk(t),s=i[r];return typeof s!="function"?e[r]:(pk[n]=s,s.bind(e))}function oK(t){return tl("Node",t,"childNodes")}function aK(t){return tl("Node",t,"parentNode")}function cK(t){return tl("Node",t,"parentElement")}function lK(t){return tl("Node",t,"textContent")}function uK(t,e){return VI("Node",t,"contains")(e)}function dK(t){return VI("Node",t,"getRootNode")()}function hK(t){return!t||!("host"in t)?null:tl("ShadowRoot",t,"host")}function fK(t){return t.styleSheets}function pK(t){return!t||!("shadowRoot"in t)?null:tl("Element",t,"shadowRoot")}function gK(t,e){return tl("Element",t,"querySelector")(e)}function mK(t,e){return tl("Element",t,"querySelectorAll")(e)}function yK(){return hk("MutationObserver").constructor}function vK(t,e,r){try{if(!(e in t))return function(){};var n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,function(){t[e]=n}}catch{return function(){}}}var Gn={childNodes:oK,parentNode:aK,parentElement:cK,textContent:lK,contains:uK,getRootNode:dK,host:hK,styleSheets:fK,shadowRoot:pK,querySelector:gK,querySelectorAll:mK,mutationObserver:yK,patch:vK};function DI(t){return t.nodeType===t.ELEMENT_NODE}function Fm(t){var e=t&&"host"in t&&"mode"in t&&Gn.host(t)||null;return!!(e&&"shadowRoot"in e&&Gn.shadowRoot(e)===t)}function Vm(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function bK(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function wK(t){var e=t.cssText;if(e.split('"').length<3)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return t.layerName===""?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function gk(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;!r&&t.ownerNode&&t.ownerNode.ownerDocument&&(r=t.ownerNode.ownerDocument.location.href);var n=Array.from(e,function(i){return WI(i,r)}).join("");return bK(n)}catch{return null}}function WI(t,e){if(EK(t)){var r;try{r=gk(t.styleSheet)||wK(t)}catch{r=t.cssText}return t.styleSheet.href?$v(r,t.styleSheet.href):r}else{var n=t.cssText;return AK(t)&&t.selectorText.includes(":")&&(n=kK(n)),e?$v(n,e):n}}function kK(t){var e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function EK(t){return"styleSheet"in t}function AK(t){return"selectorText"in t}var jI=function(){function t(){UI(this,"idNodeMap",new Map),UI(this,"nodeMetaMap",new WeakMap)}var e=t.prototype;return e.getId=function(n){var i;if(!n)return-1;var s=(i=this.getMeta(n))==null?void 0:i.id;return s??-1},e.getNode=function(n){return this.idNodeMap.get(n)||null},e.getIds=function(){return Array.from(this.idNodeMap.keys())},e.getMeta=function(n){return this.nodeMetaMap.get(n)||null},e.removeNodeFromMap=function(n){var i=this,s=this.getId(n);this.idNodeMap.delete(s),n.childNodes&&n.childNodes.forEach(function(o){return i.removeNodeFromMap(o)})},e.has=function(n){return this.idNodeMap.has(n)},e.hasNode=function(n){return this.nodeMetaMap.has(n)},e.add=function(n,i){var s=i.id;this.idNodeMap.set(s,n),this.nodeMetaMap.set(n,i)},e.replace=function(n,i){var s=this.getNode(n);if(s){var o=this.nodeMetaMap.get(s);o&&this.nodeMetaMap.set(i,o)}this.idNodeMap.set(n,i)},e.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function _K(){return new jI}function Gv(t){var e=t.element,r=t.maskInputOptions,n=t.tagName,i=t.type,s=t.value,o=t.maskInputFn,a=s||"",c=i&&od(i);return(r[n.toLowerCase()]||c&&r[c])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function od(t){return t.toLowerCase()}var GI="__rrweb_original__";function TK(t){var e=t.getContext("2d");if(!e)return!0;for(var r=50,n=0;n<t.width;n+=r)for(var i=0;i<t.height;i+=r){var s=e.getImageData,o=GI in s?s[GI]:s,a=new Uint32Array(o.call(e,n,i,Math.min(r,t.width-n),Math.min(r,t.height-i)).data.buffer);if(a.some(function(c){return c!==0}))return!1}return!0}function zv(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?od(e):null}function zI(t,e){var r;try{r=new URL(t,e??window.location.href)}catch{return null}var n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n),s;return(s=i?.[1])!=null?s:null}function CK(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var SK=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,RK=/^(?:[a-z+]+:)?\/\//i,PK=/^www\..*/i,NK=/^(data:)([^,]*),(.*)/i;function $v(t,e){return(t||"").replace(SK,function(r,n,i,s,o,a){var c=i||o||a,l=n||s||"";if(!c)return r;if(RK.test(c)||PK.test(c)||NK.test(c))return"url("+l+c+l+")";if(c[0]==="/")return"url("+l+(CK(e)+c)+l+")";var u=e.split("/"),h=c.split("/");u.pop();for(var d=ht(h),p;!(p=d()).done;){var g=p.value;g!=="."&&(g===".."?u.pop():u.push(g))}return"url("+l+u.join("/")+l+")"})}function Hv(t,e){return e===void 0&&(e=!1),e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function xK(t,e,r){r===void 0&&(r=!1);var n=Array.from(e.childNodes),i=[],s=0;if(n.length>1&&t&&typeof t=="string"){for(var o=Hv(t,r),a=o.length/t.length,c=1;c<n.length;c++)if(n[c].textContent&&typeof n[c].textContent=="string"){for(var l=Hv(n[c].textContent,r),u=100,h=3;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,h),1)!==-1);h++);for(;h<l.length;h++){var d=l.substring(0,h),p=o.split(d),g=-1;if(p.length===2)g=p[0].length;else if(p.length>2&&p[0]===""&&n[c-1].textContent!=="")g=o.indexOf(d,1);else if(p.length===1){if(d=d.substring(0,d.length-1),p=o.split(d),p.length<=1)return i.push(t),i;h=u+1}else h===l.length-1&&(g=o.indexOf(d));if(p.length>=2&&h>u){var m=n[c-1].textContent;if(m&&typeof m=="string"){var y=Hv(m).length;g=o.indexOf(d,y)}g===-1&&(g=p[0].length)}if(g!==-1){for(var v=Math.floor(g/a);v>0&&v<t.length;){if(s+=1,s>50*n.length)return i.push(t),i;var A=Hv(t.substring(0,v),r);if(A.length===g){i.push(t.substring(0,v)),t=t.substring(v),o=o.substring(g);break}else A.length<g?v+=Math.max(1,Math.floor((g-A.length)/a)):v-=Math.max(1,Math.floor((A.length-g)*a))}break}}}}return i.push(t),i}function IK(t,e){return xK(t,e).join("/* rr_split */")}var OK=1,BK=new RegExp("[^a-z0-9-_:]"),Dm=-2;function $I(){return OK++}function MK(t){if(Pt(t,HTMLFormElement))return"form";var e=od(t.tagName);return BK.test(e)?"div":e}var kf,HI,UK=/^[^ \t\n\r\u000c]+/,LK=/^[, \t\n\r\u000c]+/;function FK(t,e){if(e.trim()==="")return e;var r=0;function n(l){var u,h=l.exec(e.substring(r));return h?(u=h[0],r+=u.length,u):""}for(var i=[];n(LK),!(r>=e.length);){var s=n(UK);if(s.slice(-1)===",")s=Ef(t,s.substring(0,s.length-1)),i.push(s);else{var o="";s=Ef(t,s);for(var a=!1;;){var c=e.charAt(r);if(c===""){i.push((s+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){r+=1,i.push((s+o).trim());break}else c==="("&&(a=!0);o+=c,r+=1}}}return i.join(", ")}var ZI=new WeakMap;function Ef(t,e){return!e||e.trim()===""?e:mk(t,e)}function VK(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function mk(t,e){var r=ZI.get(t);if(r||(r=t.createElement("a"),ZI.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function JI(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(e==="table"||e==="td"||e==="th")?Ef(t,n):r==="srcset"?FK(t,n):r==="style"?$v(n,mk(t)):e==="object"&&r==="data"?Ef(t,n):n)}function QI(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function DK(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var n=t.classList.length;n--;){var i=t.classList[n];if(e.test(i))return!0}if(r)return t.matches(r)}catch{}return!1}function Zv(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?Zv(Gn.parentNode(t),e,r):!1;for(var n=t.classList.length;n--;){var i=t.classList[n];if(e.test(i))return!0}return r?Zv(Gn.parentNode(t),e,r):!1}function YI(t,e,r,n){var i;if(DI(t)){if(i=t,!Gn.childNodes(i).length)return!1}else{if(Gn.parentElement(t)===null)return!1;i=Gn.parentElement(t)}try{if(typeof e=="string"){if(n){if(i.closest("."+e))return!0}else if(i.classList.contains(e))return!0}else if(Zv(i,e,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function WK(t,e,r){var n=t.contentWindow;if(n){var i=!1,s;try{s=n.document.readyState}catch{return}if(s!=="complete"){var o=setTimeout(function(){i||(e(),i=!0)},r);t.addEventListener("load",function(){clearTimeout(o),i=!0,e()});return}var a="about:blank";if(n.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}}function jK(t,e,r){var n=!1,i;try{i=t.sheet}catch{return}if(!i){var s=setTimeout(function(){n||(e(),n=!0)},r);t.addEventListener("load",function(){clearTimeout(s),n=!0,e()})}}function GK(t,e){var r=e.doc,n=e.mirror,i=e.blockClass,s=e.blockSelector,o=e.needsMask,a=e.inlineStylesheet,c=e.maskInputOptions,l=c===void 0?{}:c,u=e.maskTextFn,h=e.maskInputFn,d=e.dataURLOptions,p=d===void 0?{}:d,g=e.inlineImages,m=e.recordCanvas,y=e.keepIframeSrcFn,v=e.newlyAddedElement,A=v===void 0?!1:v,E=e.cssCaptured,w=E===void 0?!1:E,C=zK(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:ln.Document,childNodes:[],compatMode:t.compatMode}:{type:ln.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:ln.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:C};case t.ELEMENT_NODE:return HK(t,{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:p,inlineImages:g,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:A,rootId:C});case t.TEXT_NODE:return $K(t,{doc:r,needsMask:o,maskTextFn:u,rootId:C,cssCaptured:w});case t.CDATA_SECTION_NODE:return{type:ln.CDATA,textContent:"",rootId:C};case t.COMMENT_NODE:return{type:ln.Comment,textContent:Gn.textContent(t)||"",rootId:C};default:return!1}}function zK(t,e){if(e.hasNode(t)){var r=e.getId(t);return r===1?void 0:r}}function $K(t,e){var r=e.needsMask,n=e.maskTextFn,i=e.rootId,s=e.cssCaptured,o=Gn.parentNode(t),a=o&&o.tagName,c="",l=a==="STYLE"?!0:void 0,u=a==="SCRIPT"?!0:void 0;return u?c="SCRIPT_PLACEHOLDER":s||(c=Gn.textContent(t),l&&c&&(c=$v(c,mk(e.doc)))),!l&&!u&&c&&r&&(c=n?n(c,Gn.parentElement(t)):c.replace(/[\S]/g,"*")),{type:ln.Text,textContent:c||"",rootId:i}}function HK(t,e){for(var r=e.doc,n=e.blockClass,i=e.blockSelector,s=e.inlineStylesheet,o=e.maskInputOptions,a=o===void 0?{}:o,c=e.maskInputFn,l=e.dataURLOptions,u=l===void 0?{}:l,h=e.inlineImages,d=e.recordCanvas,p=e.keepIframeSrcFn,g=e.newlyAddedElement,m=g===void 0?!1:g,y=e.rootId,v=DK(t,n,i),A=MK(t),E={},w=t.attributes.length,C=0;C<w;C++){var O=t.attributes[C];QI(A,O.name,O.value)||(E[O.name]=JI(r,A,od(O.name),O.value))}if(A==="link"&&s){var U=Array.from(r.styleSheets).find(function(ye){return ye.href===t.href}),I=null;U&&(I=gk(U)),I&&(delete E.rel,delete E.href,E._cssText=I)}if(A==="style"&&t.sheet){var B=gk(t.sheet);B&&(t.childNodes.length>1&&(B=IK(B,t)),E._cssText=B)}if(A==="input"||A==="textarea"||A==="select"){var W=t.value,M=t.checked;E.type!=="radio"&&E.type!=="checkbox"&&E.type!=="submit"&&E.type!=="button"&&W?E.value=Gv({element:t,type:zv(t),tagName:A,value:W,maskInputOptions:a,maskInputFn:c}):M&&(E.checked=M)}if(A==="option"&&(t.selected&&!a.select?E.selected=!0:delete E.selected),A==="dialog"&&t.open&&(E.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),A==="canvas"&&d){if(t.__context==="2d")TK(t)||(E.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){var x=t.toDataURL(u.type,u.quality),P=r.createElement("canvas");P.width=t.width,P.height=t.height;var L=P.toDataURL(u.type,u.quality);x!==L&&(E.rr_dataURL=x)}}if(A==="img"&&h){kf||(kf=r.createElement("canvas"),HI=kf.getContext("2d"));var F=t,G=F.currentSrc||F.getAttribute("src")||"<unknown-src>",j=F.crossOrigin,q=function(){F.removeEventListener("load",q);try{kf.width=F.naturalWidth,kf.height=F.naturalHeight,HI.drawImage(F,0,0),E.rr_dataURL=kf.toDataURL(u.type,u.quality)}catch(ye){if(F.crossOrigin!=="anonymous"){F.crossOrigin="anonymous",F.complete&&F.naturalWidth!==0?q():F.addEventListener("load",q);return}else console.warn("Cannot inline img src="+G+"! Error: "+ye)}F.crossOrigin==="anonymous"&&(j?E.crossOrigin=j:F.removeAttribute("crossorigin"))};F.complete&&F.naturalWidth!==0?q():F.addEventListener("load",q)}if(A==="audio"||A==="video"){var z=E;z.rr_mediaState=t.paused?"paused":"played",z.rr_mediaCurrentTime=t.currentTime,z.rr_mediaPlaybackRate=t.playbackRate,z.rr_mediaMuted=t.muted,z.rr_mediaLoop=t.loop,z.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop)),v){var Q=t.getBoundingClientRect(),K=Q.width,te=Q.height;E={class:E.class,rr_width:""+K+"px",rr_height:""+te+"px"}}A==="iframe"&&!p(E.src)&&(t.contentDocument||(E.rr_src=E.src),delete E.src);var oe;try{customElements.get(A)&&(oe=!0)}catch{}return{type:ln.Element,tagName:A,attributes:E,childNodes:[],isSVG:VK(t)||void 0,needBlock:v,rootId:y,isCustom:oe}}function vr(t){return t==null?"":t.toLowerCase()}function ZK(t,e){if(e.comment&&t.type===ln.Comment)return!0;if(t.type===ln.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&zI(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(vr(t.attributes.name).match(/^msapplication-tile(image|color)$/)||vr(t.attributes.name)==="application-name"||vr(t.attributes.rel)==="icon"||vr(t.attributes.rel)==="apple-touch-icon"||vr(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&vr(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(vr(t.attributes.property).match(/^(og|twitter|fb):/)||vr(t.attributes.name).match(/^(og|twitter):/)||vr(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(vr(t.attributes.name)==="robots"||vr(t.attributes.name)==="googlebot"||vr(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(vr(t.attributes.name)==="author"||vr(t.attributes.name)==="generator"||vr(t.attributes.name)==="framework"||vr(t.attributes.name)==="publisher"||vr(t.attributes.name)==="progid"||vr(t.attributes.property).match(/^article:/)||vr(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(vr(t.attributes.name)==="google-site-verification"||vr(t.attributes.name)==="yandex-verification"||vr(t.attributes.name)==="csrf-token"||vr(t.attributes.name)==="p:domain_verify"||vr(t.attributes.name)==="verify-v1"||vr(t.attributes.name)==="verification"||vr(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Af(t,e){var r=e.doc,n=e.mirror,i=e.blockClass,s=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,c=e.skipChild,l=c===void 0?!1:c,u=e.inlineStylesheet,h=u===void 0?!0:u,d=e.maskInputOptions,p=d===void 0?{}:d,g=e.maskTextFn,m=e.maskInputFn,y=e.slimDOMOptions,v=e.dataURLOptions,A=v===void 0?{}:v,E=e.inlineImages,w=E===void 0?!1:E,C=e.recordCanvas,O=C===void 0?!1:C,U=e.onSerialize,I=e.onIframeLoad,B=e.iframeLoadTimeout,W=B===void 0?5e3:B,M=e.onStylesheetLoad,x=e.stylesheetLoadTimeout,P=x===void 0?5e3:x,L=e.keepIframeSrcFn,F=L===void 0?function(){return!1}:L,G=e.newlyAddedElement,j=G===void 0?!1:G,q=e.cssCaptured,z=q===void 0?!1:q,Q=e.needsMask,K=e.preserveWhiteSpace,te=K===void 0?!0:K;if(!Q){var oe=Q===void 0;Q=YI(t,o,a,oe)}var ye=GK(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:Q,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:A,inlineImages:w,recordCanvas:O,keepIframeSrcFn:F,newlyAddedElement:j,cssCaptured:z});if(!ye)return console.warn(t,"not serialized"),null;var _e;n.hasNode(t)?_e=n.getId(t):ZK(ye,y)||!te&&ye.type===ln.Text&&!ye.textContent.replace(/^\s+|\s+$/gm,"").length?_e=Dm:_e=$I();var Ce=Object.assign(ye,{id:_e});if(n.add(t,Ce),_e===Dm)return null;U&&U(t);var ie=!l;if(Ce.type===ln.Element){ie=ie&&!Ce.needBlock,delete Ce.needBlock;var le=Gn.shadowRoot(t);le&&Vm(le)&&(Ce.isShadowHost=!0)}if((Ce.type===ln.Document||Ce.type===ln.Element)&&ie){y.headWhitespace&&Ce.type===ln.Element&&Ce.tagName==="head"&&(te=!1);var we={doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:Q,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:O,preserveWhiteSpace:te,onSerialize:U,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:M,stylesheetLoadTimeout:P,keepIframeSrcFn:F,cssCaptured:!1};if(!(Ce.type===ln.Element&&Ce.tagName==="textarea"&&Ce.attributes.value!==void 0)){Ce.type===ln.Element&&Ce.attributes._cssText!==void 0&&typeof Ce.attributes._cssText=="string"&&(we.cssCaptured=!0);for(var D=ht(Array.from(Gn.childNodes(t))),ue;!(ue=D()).done;){var me=ue.value,be=Af(me,we);be&&Ce.childNodes.push(be)}}var re=null;if(DI(t)&&(re=Gn.shadowRoot(t)))for(var N=ht(Array.from(Gn.childNodes(re))),$;!($=N()).done;){var ee=$.value,fe=Af(ee,we);fe&&(Vm(re)&&(fe.isShadow=!0),Ce.childNodes.push(fe))}}var Ae=Gn.parentNode(t);return Ae&&Fm(Ae)&&Vm(Ae)&&(Ce.isShadow=!0),Ce.type===ln.Element&&Ce.tagName==="iframe"&&WK(t,function(){var Se=t.contentDocument;if(Se&&I){var J=Af(Se,{doc:Se,mirror:n,blockClass:i,blockSelector:s,needsMask:Q,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:O,preserveWhiteSpace:te,onSerialize:U,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:M,stylesheetLoadTimeout:P,keepIframeSrcFn:F});J&&I(t,J)}},W),Ce.type===ln.Element&&Ce.tagName==="link"&&typeof Ce.attributes.rel=="string"&&(Ce.attributes.rel==="stylesheet"||Ce.attributes.rel==="preload"&&typeof Ce.attributes.href=="string"&&zI(Ce.attributes.href)==="css")&&jK(t,function(){if(M){var Se=Af(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:Q,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:O,preserveWhiteSpace:te,onSerialize:U,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:M,stylesheetLoadTimeout:P,keepIframeSrcFn:F});Se&&M(t,Se)}},P),Ce}function JK(t,e){var r=e||{},n=r.mirror,i=n===void 0?new jI:n,s=r.blockClass,o=s===void 0?"rr-block":s,a=r.blockSelector,c=a===void 0?null:a,l=r.maskTextClass,u=l===void 0?"rr-mask":l,h=r.maskTextSelector,d=h===void 0?null:h,p=r.inlineStylesheet,g=p===void 0?!0:p,m=r.inlineImages,y=m===void 0?!1:m,v=r.recordCanvas,A=v===void 0?!1:v,E=r.maskAllInputs,w=E===void 0?!1:E,C=r.maskTextFn,O=r.maskInputFn,U=r.slimDOM,I=U===void 0?!1:U,B=r.dataURLOptions,W=r.preserveWhiteSpace,M=r.onSerialize,x=r.onIframeLoad,P=r.iframeLoadTimeout,L=r.onStylesheetLoad,F=r.stylesheetLoadTimeout,G=r.keepIframeSrcFn,j=G===void 0?function(){return!1}:G,q=w===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:w===!1?{password:!0}:w,z=I===!0||I==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:I==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:I===!1?{}:I;return Af(t,{doc:t,mirror:i,blockClass:o,blockSelector:c,maskTextClass:u,maskTextSelector:d,skipChild:!1,inlineStylesheet:g,maskInputOptions:q,maskTextFn:C,maskInputFn:O,slimDOMOptions:z,dataURLOptions:B,inlineImages:y,recordCanvas:A,preserveWhiteSpace:W,onSerialize:M,onIframeLoad:x,iframeLoadTimeout:P,onStylesheetLoad:L,stylesheetLoadTimeout:F,keepIframeSrcFn:j,newlyAddedElement:!1})}function QK(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function YK(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return Pt(this,n)?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var yk={exports:{}},Cr=String,KI=function(){return{isColorSupported:!1,reset:Cr,bold:Cr,dim:Cr,italic:Cr,underline:Cr,inverse:Cr,hidden:Cr,strikethrough:Cr,black:Cr,red:Cr,green:Cr,yellow:Cr,blue:Cr,magenta:Cr,cyan:Cr,white:Cr,gray:Cr,bgBlack:Cr,bgRed:Cr,bgGreen:Cr,bgYellow:Cr,bgBlue:Cr,bgMagenta:Cr,bgCyan:Cr,bgWhite:Cr}};yk.exports=KI(),yk.exports.createColors=KI;var KK=yk.exports,qK={},XK=Object.freeze(Object.defineProperty({__proto__:null,default:qK},Symbol.toStringTag,{value:"Module"})),Qr=YK(XK),qI=KK,XI=Qr,vk=function(t){jn(e,t);function e(n,i,s,o,a,c){var l;return l=t.call(this,n)||this,l.name="CssSyntaxError",l.reason=n,a&&(l.file=a),o&&(l.source=o),c&&(l.plugin=c),typeof i<"u"&&typeof s<"u"&&(typeof i=="number"?(l.line=i,l.column=s):(l.line=i.line,l.column=i.column,l.endLine=s.line,l.endColumn=s.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,e),l}var r=e.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(i){var s=this;if(!this.source)return"";var o=this.source;i==null&&(i=qI.isColorSupported),XI&&i&&(o=XI(o));var a=o.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),u=String(l).length,h,d;if(i){var p=qI.createColors(!0),g=p.bold,m=p.gray,y=p.red;h=function(v){return g(y(v))},d=function(v){return m(v)}}else h=d=function(v){return v};return a.slice(c,l).map(function(v,A){var E=c+1+A,w=" "+(" "+E).slice(-u)+" | ";if(E===s.line){var C=d(w.replace(/\d/g," "))+v.slice(0,s.column-1).replace(/[^\t]/g," ");return h(">")+d(w)+v+`
569
569
  `+C+h("^")}return" "+d(w)+v}).join(`
570
570
  `)},r.toString=function(){var i=this.showSourceCode();return i&&(i=`
571
571
 
@@ -685,7 +685,7 @@ crtw-text-white crtw-mt-[5px] crtw-justify-center crtw-flex"><!></button>`);func
685
685
  * @license MIT
686
686
  */(function(t){const e=Ww,r=NA,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=A,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const f=new Uint8Array(1),b={foo:function(){return 42}};return Object.setPrototypeOf(b,Uint8Array.prototype),Object.setPrototypeOf(f,b),f.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(f){if(f>i)throw new RangeError('The value "'+f+'" is invalid for option "size"');const b=new Uint8Array(f);return Object.setPrototypeOf(b,a.prototype),b}function a(f,b,_){if(typeof f=="number"){if(typeof b=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(f)}return c(f,b,_)}a.poolSize=8192;function c(f,b,_){if(typeof f=="string")return d(f,b);if(ArrayBuffer.isView(f))return g(f);if(f==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f);if(ge(f,ArrayBuffer)||f&&ge(f.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ge(f,SharedArrayBuffer)||f&&ge(f.buffer,SharedArrayBuffer)))return m(f,b,_);if(typeof f=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const S=f.valueOf&&f.valueOf();if(S!=null&&S!==f)return a.from(S,b,_);const k=y(f);if(k)return k;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof f[Symbol.toPrimitive]=="function")return a.from(f[Symbol.toPrimitive]("string"),b,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f)}a.from=function(f,b,_){return c(f,b,_)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(f){if(typeof f!="number")throw new TypeError('"size" argument must be of type number');if(f<0)throw new RangeError('The value "'+f+'" is invalid for option "size"')}function u(f,b,_){return l(f),f<=0?o(f):b!==void 0?typeof _=="string"?o(f).fill(b,_):o(f).fill(b):o(f)}a.alloc=function(f,b,_){return u(f,b,_)};function h(f){return l(f),o(f<0?0:v(f)|0)}a.allocUnsafe=function(f){return h(f)},a.allocUnsafeSlow=function(f){return h(f)};function d(f,b){if((typeof b!="string"||b==="")&&(b="utf8"),!a.isEncoding(b))throw new TypeError("Unknown encoding: "+b);const _=E(f,b)|0;let S=o(_);const k=S.write(f,b);return k!==_&&(S=S.slice(0,k)),S}function p(f){const b=f.length<0?0:v(f.length)|0,_=o(b);for(let S=0;S<b;S+=1)_[S]=f[S]&255;return _}function g(f){if(ge(f,Uint8Array)){const b=new Uint8Array(f);return m(b.buffer,b.byteOffset,b.byteLength)}return p(f)}function m(f,b,_){if(b<0||f.byteLength<b)throw new RangeError('"offset" is outside of buffer bounds');if(f.byteLength<b+(_||0))throw new RangeError('"length" is outside of buffer bounds');let S;return b===void 0&&_===void 0?S=new Uint8Array(f):_===void 0?S=new Uint8Array(f,b):S=new Uint8Array(f,b,_),Object.setPrototypeOf(S,a.prototype),S}function y(f){if(a.isBuffer(f)){const b=v(f.length)|0,_=o(b);return _.length===0||f.copy(_,0,0,b),_}if(f.length!==void 0)return typeof f.length!="number"||Pe(f.length)?o(0):p(f);if(f.type==="Buffer"&&Array.isArray(f.data))return p(f.data)}function v(f){if(f>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return f|0}function A(f){return+f!=f&&(f=0),a.alloc(+f)}a.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==a.prototype},a.compare=function(f,b){if(ge(f,Uint8Array)&&(f=a.from(f,f.offset,f.byteLength)),ge(b,Uint8Array)&&(b=a.from(b,b.offset,b.byteLength)),!a.isBuffer(f)||!a.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===b)return 0;let _=f.length,S=b.length;for(let k=0,R=Math.min(_,S);k<R;++k)if(f[k]!==b[k]){_=f[k],S=b[k];break}return _<S?-1:S<_?1:0},a.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(f,b){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return a.alloc(0);let _;if(b===void 0)for(b=0,_=0;_<f.length;++_)b+=f[_].length;const S=a.allocUnsafe(b);let k=0;for(_=0;_<f.length;++_){let R=f[_];if(ge(R,Uint8Array))k+R.length>S.length?(a.isBuffer(R)||(R=a.from(R)),R.copy(S,k)):Uint8Array.prototype.set.call(S,R,k);else if(a.isBuffer(R))R.copy(S,k);else throw new TypeError('"list" argument must be an Array of Buffers');k+=R.length}return S};function E(f,b){if(a.isBuffer(f))return f.length;if(ArrayBuffer.isView(f)||ge(f,ArrayBuffer))return f.byteLength;if(typeof f!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof f);const _=f.length,S=arguments.length>2&&arguments[2]===!0;if(!S&&_===0)return 0;let k=!1;for(;;)switch(b){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return ee(f).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Se(f).length;default:if(k)return S?-1:ee(f).length;b=(""+b).toLowerCase(),k=!0}}a.byteLength=E;function w(f,b,_){let S=!1;if((b===void 0||b<0)&&(b=0),b>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,b>>>=0,_<=b))return"";for(f||(f="utf8");;)switch(f){case"hex":return z(this,b,_);case"utf8":case"utf-8":return L(this,b,_);case"ascii":return j(this,b,_);case"latin1":case"binary":return q(this,b,_);case"base64":return P(this,b,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,b,_);default:if(S)throw new TypeError("Unknown encoding: "+f);f=(f+"").toLowerCase(),S=!0}}a.prototype._isBuffer=!0;function C(f,b,_){const S=f[b];f[b]=f[_],f[_]=S}a.prototype.swap16=function(){const f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let b=0;b<f;b+=2)C(this,b,b+1);return this},a.prototype.swap32=function(){const f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let b=0;b<f;b+=4)C(this,b,b+3),C(this,b+1,b+2);return this},a.prototype.swap64=function(){const f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let b=0;b<f;b+=8)C(this,b,b+7),C(this,b+1,b+6),C(this,b+2,b+5),C(this,b+3,b+4);return this},a.prototype.toString=function(){const f=this.length;return f===0?"":arguments.length===0?L(this,0,f):w.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(f){if(!a.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:a.compare(this,f)===0},a.prototype.inspect=function(){let f="";const b=t.INSPECT_MAX_BYTES;return f=this.toString("hex",0,b).replace(/(.{2})/g,"$1 ").trim(),this.length>b&&(f+=" ... "),"<Buffer "+f+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(f,b,_,S,k){if(ge(f,Uint8Array)&&(f=a.from(f,f.offset,f.byteLength)),!a.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(b===void 0&&(b=0),_===void 0&&(_=f?f.length:0),S===void 0&&(S=0),k===void 0&&(k=this.length),b<0||_>f.length||S<0||k>this.length)throw new RangeError("out of range index");if(S>=k&&b>=_)return 0;if(S>=k)return-1;if(b>=_)return 1;if(b>>>=0,_>>>=0,S>>>=0,k>>>=0,this===f)return 0;let R=k-S,Z=_-b;const ce=Math.min(R,Z),de=this.slice(S,k),ke=f.slice(b,_);for(let Ne=0;Ne<ce;++Ne)if(de[Ne]!==ke[Ne]){R=de[Ne],Z=ke[Ne];break}return R<Z?-1:Z<R?1:0};function O(f,b,_,S,k){if(f.length===0)return-1;if(typeof _=="string"?(S=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Pe(_)&&(_=k?0:f.length-1),_<0&&(_=f.length+_),_>=f.length){if(k)return-1;_=f.length-1}else if(_<0)if(k)_=0;else return-1;if(typeof b=="string"&&(b=a.from(b,S)),a.isBuffer(b))return b.length===0?-1:U(f,b,_,S,k);if(typeof b=="number")return b=b&255,typeof Uint8Array.prototype.indexOf=="function"?k?Uint8Array.prototype.indexOf.call(f,b,_):Uint8Array.prototype.lastIndexOf.call(f,b,_):U(f,[b],_,S,k);throw new TypeError("val must be string, number or Buffer")}function U(f,b,_,S,k){let R=1,Z=f.length,ce=b.length;if(S!==void 0&&(S=String(S).toLowerCase(),S==="ucs2"||S==="ucs-2"||S==="utf16le"||S==="utf-16le")){if(f.length<2||b.length<2)return-1;R=2,Z/=2,ce/=2,_/=2}function de(Ne,ze){return R===1?Ne[ze]:Ne.readUInt16BE(ze*R)}let ke;if(k){let Ne=-1;for(ke=_;ke<Z;ke++)if(de(f,ke)===de(b,Ne===-1?0:ke-Ne)){if(Ne===-1&&(Ne=ke),ke-Ne+1===ce)return Ne*R}else Ne!==-1&&(ke-=ke-Ne),Ne=-1}else for(_+ce>Z&&(_=Z-ce),ke=_;ke>=0;ke--){let Ne=!0;for(let ze=0;ze<ce;ze++)if(de(f,ke+ze)!==de(b,ze)){Ne=!1;break}if(Ne)return ke}return-1}a.prototype.includes=function(f,b,_){return this.indexOf(f,b,_)!==-1},a.prototype.indexOf=function(f,b,_){return O(this,f,b,_,!0)},a.prototype.lastIndexOf=function(f,b,_){return O(this,f,b,_,!1)};function I(f,b,_,S){_=Number(_)||0;const k=f.length-_;S?(S=Number(S),S>k&&(S=k)):S=k;const R=b.length;S>R/2&&(S=R/2);let Z;for(Z=0;Z<S;++Z){const ce=parseInt(b.substr(Z*2,2),16);if(Pe(ce))return Z;f[_+Z]=ce}return Z}function B(f,b,_,S){return J(ee(b,f.length-_),f,_,S)}function W(f,b,_,S){return J(fe(b),f,_,S)}function M(f,b,_,S){return J(Se(b),f,_,S)}function x(f,b,_,S){return J(Ae(b,f.length-_),f,_,S)}a.prototype.write=function(f,b,_,S){if(b===void 0)S="utf8",_=this.length,b=0;else if(_===void 0&&typeof b=="string")S=b,_=this.length,b=0;else if(isFinite(b))b=b>>>0,isFinite(_)?(_=_>>>0,S===void 0&&(S="utf8")):(S=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const k=this.length-b;if((_===void 0||_>k)&&(_=k),f.length>0&&(_<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");S||(S="utf8");let R=!1;for(;;)switch(S){case"hex":return I(this,f,b,_);case"utf8":case"utf-8":return B(this,f,b,_);case"ascii":case"latin1":case"binary":return W(this,f,b,_);case"base64":return M(this,f,b,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,f,b,_);default:if(R)throw new TypeError("Unknown encoding: "+S);S=(""+S).toLowerCase(),R=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(f,b,_){return b===0&&_===f.length?e.fromByteArray(f):e.fromByteArray(f.slice(b,_))}function L(f,b,_){_=Math.min(f.length,_);const S=[];let k=b;for(;k<_;){const R=f[k];let Z=null,ce=R>239?4:R>223?3:R>191?2:1;if(k+ce<=_){let de,ke,Ne,ze;switch(ce){case 1:R<128&&(Z=R);break;case 2:de=f[k+1],(de&192)===128&&(ze=(R&31)<<6|de&63,ze>127&&(Z=ze));break;case 3:de=f[k+1],ke=f[k+2],(de&192)===128&&(ke&192)===128&&(ze=(R&15)<<12|(de&63)<<6|ke&63,ze>2047&&(ze<55296||ze>57343)&&(Z=ze));break;case 4:de=f[k+1],ke=f[k+2],Ne=f[k+3],(de&192)===128&&(ke&192)===128&&(Ne&192)===128&&(ze=(R&15)<<18|(de&63)<<12|(ke&63)<<6|Ne&63,ze>65535&&ze<1114112&&(Z=ze))}}Z===null?(Z=65533,ce=1):Z>65535&&(Z-=65536,S.push(Z>>>10&1023|55296),Z=56320|Z&1023),S.push(Z),k+=ce}return G(S)}const F=4096;function G(f){const b=f.length;if(b<=F)return String.fromCharCode.apply(String,f);let _="",S=0;for(;S<b;)_+=String.fromCharCode.apply(String,f.slice(S,S+=F));return _}function j(f,b,_){let S="";_=Math.min(f.length,_);for(let k=b;k<_;++k)S+=String.fromCharCode(f[k]&127);return S}function q(f,b,_){let S="";_=Math.min(f.length,_);for(let k=b;k<_;++k)S+=String.fromCharCode(f[k]);return S}function z(f,b,_){const S=f.length;(!b||b<0)&&(b=0),(!_||_<0||_>S)&&(_=S);let k="";for(let R=b;R<_;++R)k+=Ve[f[R]];return k}function Q(f,b,_){const S=f.slice(b,_);let k="";for(let R=0;R<S.length-1;R+=2)k+=String.fromCharCode(S[R]+S[R+1]*256);return k}a.prototype.slice=function(f,b){const _=this.length;f=~~f,b=b===void 0?_:~~b,f<0?(f+=_,f<0&&(f=0)):f>_&&(f=_),b<0?(b+=_,b<0&&(b=0)):b>_&&(b=_),b<f&&(b=f);const S=this.subarray(f,b);return Object.setPrototypeOf(S,a.prototype),S};function K(f,b,_){if(f%1!==0||f<0)throw new RangeError("offset is not uint");if(f+b>_)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(f,b,_){f=f>>>0,b=b>>>0,_||K(f,b,this.length);let S=this[f],k=1,R=0;for(;++R<b&&(k*=256);)S+=this[f+R]*k;return S},a.prototype.readUintBE=a.prototype.readUIntBE=function(f,b,_){f=f>>>0,b=b>>>0,_||K(f,b,this.length);let S=this[f+--b],k=1;for(;b>0&&(k*=256);)S+=this[f+--b]*k;return S},a.prototype.readUint8=a.prototype.readUInt8=function(f,b){return f=f>>>0,b||K(f,1,this.length),this[f]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(f,b){return f=f>>>0,b||K(f,2,this.length),this[f]|this[f+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(f,b){return f=f>>>0,b||K(f,2,this.length),this[f]<<8|this[f+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(f,b){return f=f>>>0,b||K(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(f,b){return f=f>>>0,b||K(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},a.prototype.readBigUInt64LE=se(function(f){f=f>>>0,be(f,"offset");const b=this[f],_=this[f+7];(b===void 0||_===void 0)&&re(f,this.length-8);const S=b+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,k=this[++f]+this[++f]*2**8+this[++f]*2**16+_*2**24;return BigInt(S)+(BigInt(k)<<BigInt(32))}),a.prototype.readBigUInt64BE=se(function(f){f=f>>>0,be(f,"offset");const b=this[f],_=this[f+7];(b===void 0||_===void 0)&&re(f,this.length-8);const S=b*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],k=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+_;return(BigInt(S)<<BigInt(32))+BigInt(k)}),a.prototype.readIntLE=function(f,b,_){f=f>>>0,b=b>>>0,_||K(f,b,this.length);let S=this[f],k=1,R=0;for(;++R<b&&(k*=256);)S+=this[f+R]*k;return k*=128,S>=k&&(S-=Math.pow(2,8*b)),S},a.prototype.readIntBE=function(f,b,_){f=f>>>0,b=b>>>0,_||K(f,b,this.length);let S=b,k=1,R=this[f+--S];for(;S>0&&(k*=256);)R+=this[f+--S]*k;return k*=128,R>=k&&(R-=Math.pow(2,8*b)),R},a.prototype.readInt8=function(f,b){return f=f>>>0,b||K(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},a.prototype.readInt16LE=function(f,b){f=f>>>0,b||K(f,2,this.length);const _=this[f]|this[f+1]<<8;return _&32768?_|4294901760:_},a.prototype.readInt16BE=function(f,b){f=f>>>0,b||K(f,2,this.length);const _=this[f+1]|this[f]<<8;return _&32768?_|4294901760:_},a.prototype.readInt32LE=function(f,b){return f=f>>>0,b||K(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},a.prototype.readInt32BE=function(f,b){return f=f>>>0,b||K(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},a.prototype.readBigInt64LE=se(function(f){f=f>>>0,be(f,"offset");const b=this[f],_=this[f+7];(b===void 0||_===void 0)&&re(f,this.length-8);const S=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(_<<24);return(BigInt(S)<<BigInt(32))+BigInt(b+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),a.prototype.readBigInt64BE=se(function(f){f=f>>>0,be(f,"offset");const b=this[f],_=this[f+7];(b===void 0||_===void 0)&&re(f,this.length-8);const S=(b<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(S)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+_)}),a.prototype.readFloatLE=function(f,b){return f=f>>>0,b||K(f,4,this.length),r.read(this,f,!0,23,4)},a.prototype.readFloatBE=function(f,b){return f=f>>>0,b||K(f,4,this.length),r.read(this,f,!1,23,4)},a.prototype.readDoubleLE=function(f,b){return f=f>>>0,b||K(f,8,this.length),r.read(this,f,!0,52,8)},a.prototype.readDoubleBE=function(f,b){return f=f>>>0,b||K(f,8,this.length),r.read(this,f,!1,52,8)};function te(f,b,_,S,k,R){if(!a.isBuffer(f))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>k||b<R)throw new RangeError('"value" argument is out of bounds');if(_+S>f.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(f,b,_,S){if(f=+f,b=b>>>0,_=_>>>0,!S){const Z=Math.pow(2,8*_)-1;te(this,f,b,_,Z,0)}let k=1,R=0;for(this[b]=f&255;++R<_&&(k*=256);)this[b+R]=f/k&255;return b+_},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(f,b,_,S){if(f=+f,b=b>>>0,_=_>>>0,!S){const Z=Math.pow(2,8*_)-1;te(this,f,b,_,Z,0)}let k=_-1,R=1;for(this[b+k]=f&255;--k>=0&&(R*=256);)this[b+k]=f/R&255;return b+_},a.prototype.writeUint8=a.prototype.writeUInt8=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,1,255,0),this[b]=f&255,b+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,2,65535,0),this[b]=f&255,this[b+1]=f>>>8,b+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,2,65535,0),this[b]=f>>>8,this[b+1]=f&255,b+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,4,4294967295,0),this[b+3]=f>>>24,this[b+2]=f>>>16,this[b+1]=f>>>8,this[b]=f&255,b+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,4,4294967295,0),this[b]=f>>>24,this[b+1]=f>>>16,this[b+2]=f>>>8,this[b+3]=f&255,b+4};function oe(f,b,_,S,k){me(b,S,k,f,_,7);let R=Number(b&BigInt(4294967295));f[_++]=R,R=R>>8,f[_++]=R,R=R>>8,f[_++]=R,R=R>>8,f[_++]=R;let Z=Number(b>>BigInt(32)&BigInt(4294967295));return f[_++]=Z,Z=Z>>8,f[_++]=Z,Z=Z>>8,f[_++]=Z,Z=Z>>8,f[_++]=Z,_}function ye(f,b,_,S,k){me(b,S,k,f,_,7);let R=Number(b&BigInt(4294967295));f[_+7]=R,R=R>>8,f[_+6]=R,R=R>>8,f[_+5]=R,R=R>>8,f[_+4]=R;let Z=Number(b>>BigInt(32)&BigInt(4294967295));return f[_+3]=Z,Z=Z>>8,f[_+2]=Z,Z=Z>>8,f[_+1]=Z,Z=Z>>8,f[_]=Z,_+8}a.prototype.writeBigUInt64LE=se(function(f,b=0){return oe(this,f,b,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=se(function(f,b=0){return ye(this,f,b,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(f,b,_,S){if(f=+f,b=b>>>0,!S){const ce=Math.pow(2,8*_-1);te(this,f,b,_,ce-1,-ce)}let k=0,R=1,Z=0;for(this[b]=f&255;++k<_&&(R*=256);)f<0&&Z===0&&this[b+k-1]!==0&&(Z=1),this[b+k]=(f/R>>0)-Z&255;return b+_},a.prototype.writeIntBE=function(f,b,_,S){if(f=+f,b=b>>>0,!S){const ce=Math.pow(2,8*_-1);te(this,f,b,_,ce-1,-ce)}let k=_-1,R=1,Z=0;for(this[b+k]=f&255;--k>=0&&(R*=256);)f<0&&Z===0&&this[b+k+1]!==0&&(Z=1),this[b+k]=(f/R>>0)-Z&255;return b+_},a.prototype.writeInt8=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,1,127,-128),f<0&&(f=255+f+1),this[b]=f&255,b+1},a.prototype.writeInt16LE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,2,32767,-32768),this[b]=f&255,this[b+1]=f>>>8,b+2},a.prototype.writeInt16BE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,2,32767,-32768),this[b]=f>>>8,this[b+1]=f&255,b+2},a.prototype.writeInt32LE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,4,2147483647,-2147483648),this[b]=f&255,this[b+1]=f>>>8,this[b+2]=f>>>16,this[b+3]=f>>>24,b+4},a.prototype.writeInt32BE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[b]=f>>>24,this[b+1]=f>>>16,this[b+2]=f>>>8,this[b+3]=f&255,b+4},a.prototype.writeBigInt64LE=se(function(f,b=0){return oe(this,f,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=se(function(f,b=0){return ye(this,f,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _e(f,b,_,S,k,R){if(_+S>f.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function Ce(f,b,_,S,k){return b=+b,_=_>>>0,k||_e(f,b,_,4),r.write(f,b,_,S,23,4),_+4}a.prototype.writeFloatLE=function(f,b,_){return Ce(this,f,b,!0,_)},a.prototype.writeFloatBE=function(f,b,_){return Ce(this,f,b,!1,_)};function ie(f,b,_,S,k){return b=+b,_=_>>>0,k||_e(f,b,_,8),r.write(f,b,_,S,52,8),_+8}a.prototype.writeDoubleLE=function(f,b,_){return ie(this,f,b,!0,_)},a.prototype.writeDoubleBE=function(f,b,_){return ie(this,f,b,!1,_)},a.prototype.copy=function(f,b,_,S){if(!a.isBuffer(f))throw new TypeError("argument should be a Buffer");if(_||(_=0),!S&&S!==0&&(S=this.length),b>=f.length&&(b=f.length),b||(b=0),S>0&&S<_&&(S=_),S===_||f.length===0||this.length===0)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("sourceEnd out of bounds");S>this.length&&(S=this.length),f.length-b<S-_&&(S=f.length-b+_);const k=S-_;return this===f&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(b,_,S):Uint8Array.prototype.set.call(f,this.subarray(_,S),b),k},a.prototype.fill=function(f,b,_,S){if(typeof f=="string"){if(typeof b=="string"?(S=b,b=0,_=this.length):typeof _=="string"&&(S=_,_=this.length),S!==void 0&&typeof S!="string")throw new TypeError("encoding must be a string");if(typeof S=="string"&&!a.isEncoding(S))throw new TypeError("Unknown encoding: "+S);if(f.length===1){const R=f.charCodeAt(0);(S==="utf8"&&R<128||S==="latin1")&&(f=R)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(b<0||this.length<b||this.length<_)throw new RangeError("Out of range index");if(_<=b)return this;b=b>>>0,_=_===void 0?this.length:_>>>0,f||(f=0);let k;if(typeof f=="number")for(k=b;k<_;++k)this[k]=f;else{const R=a.isBuffer(f)?f:a.from(f,S),Z=R.length;if(Z===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(k=0;k<_-b;++k)this[k+b]=R[k%Z]}return this};const le={};function we(f,b,_){le[f]=class extends _{constructor(){super(),Object.defineProperty(this,"message",{value:b.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${f}]`,this.stack,delete this.name}get code(){return f}set code(S){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:S,writable:!0})}toString(){return`${this.name} [${f}]: ${this.message}`}}}we("ERR_BUFFER_OUT_OF_BOUNDS",function(f){return f?`${f} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),we("ERR_INVALID_ARG_TYPE",function(f,b){return`The "${f}" argument must be of type number. Received type ${typeof b}`},TypeError),we("ERR_OUT_OF_RANGE",function(f,b,_){let S=`The value of "${f}" is out of range.`,k=_;return Number.isInteger(_)&&Math.abs(_)>2**32?k=D(String(_)):typeof _=="bigint"&&(k=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(k=D(k)),k+="n"),S+=` It must be ${b}. Received ${k}`,S},RangeError);function D(f){let b="",_=f.length;const S=f[0]==="-"?1:0;for(;_>=S+4;_-=3)b=`_${f.slice(_-3,_)}${b}`;return`${f.slice(0,_)}${b}`}function ue(f,b,_){be(b,"offset"),(f[b]===void 0||f[b+_]===void 0)&&re(b,f.length-(_+1))}function me(f,b,_,S,k,R){if(f>_||f<b){const Z=typeof b=="bigint"?"n":"";let ce;throw b===0||b===BigInt(0)?ce=`>= 0${Z} and < 2${Z} ** ${(R+1)*8}${Z}`:ce=`>= -(2${Z} ** ${(R+1)*8-1}${Z}) and < 2 ** ${(R+1)*8-1}${Z}`,new le.ERR_OUT_OF_RANGE("value",ce,f)}ue(S,k,R)}function be(f,b){if(typeof f!="number")throw new le.ERR_INVALID_ARG_TYPE(b,"number",f)}function re(f,b,_){throw Math.floor(f)!==f?(be(f,_),new le.ERR_OUT_OF_RANGE("offset","an integer",f)):b<0?new le.ERR_BUFFER_OUT_OF_BOUNDS:new le.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${b}`,f)}const N=/[^+/0-9A-Za-z-_]/g;function $(f){if(f=f.split("=")[0],f=f.trim().replace(N,""),f.length<2)return"";for(;f.length%4!==0;)f=f+"=";return f}function ee(f,b){b=b||1/0;let _;const S=f.length;let k=null;const R=[];for(let Z=0;Z<S;++Z){if(_=f.charCodeAt(Z),_>55295&&_<57344){if(!k){if(_>56319){(b-=3)>-1&&R.push(239,191,189);continue}else if(Z+1===S){(b-=3)>-1&&R.push(239,191,189);continue}k=_;continue}if(_<56320){(b-=3)>-1&&R.push(239,191,189),k=_;continue}_=(k-55296<<10|_-56320)+65536}else k&&(b-=3)>-1&&R.push(239,191,189);if(k=null,_<128){if((b-=1)<0)break;R.push(_)}else if(_<2048){if((b-=2)<0)break;R.push(_>>6|192,_&63|128)}else if(_<65536){if((b-=3)<0)break;R.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((b-=4)<0)break;R.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return R}function fe(f){const b=[];for(let _=0;_<f.length;++_)b.push(f.charCodeAt(_)&255);return b}function Ae(f,b){let _,S,k;const R=[];for(let Z=0;Z<f.length&&!((b-=2)<0);++Z)_=f.charCodeAt(Z),S=_>>8,k=_%256,R.push(k),R.push(S);return R}function Se(f){return e.toByteArray($(f))}function J(f,b,_,S){let k;for(k=0;k<S&&!(k+_>=b.length||k>=f.length);++k)b[k+_]=f[k];return k}function ge(f,b){return f instanceof b||f!=null&&f.constructor!=null&&f.constructor.name!=null&&f.constructor.name===b.name}function Pe(f){return f!==f}const Ve=function(){const f="0123456789abcdef",b=new Array(256);for(let _=0;_<16;++_){const S=_*16;for(let k=0;k<16;++k)b[S+k]=f[_]+f[k]}return b}();function se(f){return typeof BigInt>"u"?ae:f}function ae(){throw new Error("BigInt not supported")}})(RA);const jue=t=>{const e=RA.Buffer.from(t,"base64").toString("utf8"),r=RA.Buffer.from(e,"binary").toString("base64");return t===r?e:t},Gue=async t=>{const e=jue(t),r=JSON.parse(e);return{message:e,...r}};class Bt{constructor(e,r,n,i,s){this._legacyCanvasSize=Bt.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=e,this.$canvas=document.createElement("canvas"),n&&typeof n=="object"?this._onDecode=r:(console.warn(n||i||s?"You're using a deprecated version of the QrScanner constructor which will be removed in the future":"Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=r),r=typeof n=="object"?n:{},this._onDecodeError=r.onDecodeError||(typeof n=="function"?n:this._onDecodeError),this._calculateScanRegion=r.calculateScanRegion||(typeof i=="function"?i:this._calculateScanRegion),this._preferredCamera=r.preferredCamera||s||this._preferredCamera,this._legacyCanvasSize=typeof n=="number"?n:typeof i=="number"?i:this._legacyCanvasSize,this._maxScansPerSecond=r.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),e.disablePictureInPicture=!0,e.playsInline=!0,e.muted=!0;let o=!1;if(e.hidden&&(e.hidden=!1,o=!0),document.body.contains(e)||(document.body.appendChild(e),o=!0),n=e.parentElement,r.highlightScanRegion||r.highlightCodeOutline){if(i=!!r.overlay,this.$overlay=r.overlay||document.createElement("div"),s=this.$overlay.style,s.position="absolute",s.display="none",s.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!i&&r.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch{}n.insertBefore(this.$overlay,this.$video.nextSibling)}r.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(e),requestAnimationFrame(()=>{let a=window.getComputedStyle(e);a.display==="none"&&(e.style.setProperty("display","block","important"),o=!0),a.visibility!=="visible"&&(e.style.setProperty("visibility","visible","important"),o=!0),o&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),e.style.opacity="0",e.style.width="0",e.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),e.addEventListener("play",this._onPlay),e.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=Bt.createQrEngine()}static set WORKER_PATH(e){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await Bt.listCameras(!1)).length}catch{return!1}}static async listCameras(e=!1){if(!navigator.mediaDevices)return[];let r=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(i=>i.kind==="videoinput"),n;try{e&&(await r()).every(i=>!i.label)&&(n=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch{}try{return(await r()).map((i,s)=>({id:i.deviceId,label:i.label||(s===0?"Default Camera":`Camera ${s+1}`)}))}finally{n&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),Bt._stopVideoStream(n))}}async hasFlash(){let e;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;e=this.$video.srcObject}else e=(await this._getCameraStream()).stream;return"torch"in e.getVideoTracks()[0].getSettings()}catch{return!1}finally{e&&e!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),Bt._stopVideoStream(e))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(e){throw this._flashOn=!1,e}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),Bt._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&(window.location.protocol!=="https:"&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:e,facingMode:r}=await this._getCameraStream();!this._active||this._paused?Bt._stopVideoStream(e):(this._setVideoMirror(r),this.$video.srcObject=e,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(e){if(!this._paused)throw this._active=!1,e}}stop(){this.pause(),this._active=!1}async pause(e=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let r=()=>{this.$video.srcObject instanceof MediaStream&&(Bt._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return e?(r(),!0):(await new Promise(n=>setTimeout(n,300)),this._paused?(r(),!0):!1)}async setCamera(e){e!==this._preferredCamera&&(this._preferredCamera=e,await this._restartVideoStream())}static async scanImage(e,r,n,i,s=!1,o=!1){let a,c=!1;r&&("scanRegion"in r||"qrEngine"in r||"canvas"in r||"disallowCanvasResizing"in r||"alsoTryWithoutScanRegion"in r||"returnDetailedScanResult"in r)?(a=r.scanRegion,n=r.qrEngine,i=r.canvas,s=r.disallowCanvasResizing||!1,o=r.alsoTryWithoutScanRegion||!1,c=!0):console.warn(r||n||i||s||o?"You're using a deprecated api for scanImage which will be removed in the future.":"Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),r=!!n;try{let l,u;[n,l]=await Promise.all([n||Bt.createQrEngine(),Bt._loadImage(e)]),[i,u]=Bt._drawToCanvas(l,a,i,s);let h;if(n instanceof Worker){let d=n;r||Bt._postWorkerMessageSync(d,"inversionMode","both"),h=await new Promise((p,g)=>{let m,y,v,A=-1;y=w=>{w.data.id===A&&(d.removeEventListener("message",y),d.removeEventListener("error",v),clearTimeout(m),w.data.data!==null?p({data:w.data.data,cornerPoints:Bt._convertPoints(w.data.cornerPoints,a)}):g(Bt.NO_QR_CODE_FOUND))},v=w=>{d.removeEventListener("message",y),d.removeEventListener("error",v),clearTimeout(m),g("Scanner error: "+(w?w.message||w:"Unknown Error"))},d.addEventListener("message",y),d.addEventListener("error",v),m=setTimeout(()=>v("timeout"),1e4);let E=u.getImageData(0,0,i.width,i.height);A=Bt._postWorkerMessageSync(d,"decode",E,[E.data.buffer])})}else h=await Promise.race([new Promise((d,p)=>window.setTimeout(()=>p("Scanner error: timeout"),1e4)),(async()=>{try{var[d]=await n.detect(i);if(!d)throw Bt.NO_QR_CODE_FOUND;return{data:d.rawValue,cornerPoints:Bt._convertPoints(d.cornerPoints,a)}}catch(p){if(d=p.message||p,/not implemented|service unavailable/.test(d))return Bt._disableBarcodeDetector=!0,Bt.scanImage(e,{scanRegion:a,canvas:i,disallowCanvasResizing:s,alsoTryWithoutScanRegion:o});throw`Scanner error: ${d}`}})()]);return c?h:h.data}catch(l){if(!a||!o)throw l;let u=await Bt.scanImage(e,{qrEngine:n,canvas:i,disallowCanvasResizing:s});return c?u:u.data}finally{r||Bt._postWorkerMessage(n,"close")}}setGrayscaleWeights(e,r,n,i=!0){Bt._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:e,green:r,blue:n,useIntegerApproximation:i})}setInversionMode(e){Bt._postWorkerMessage(this._qrEnginePromise,"inversionMode",e)}static async createQrEngine(e){if(e&&console.warn("Specifying a worker path is not required and not supported anymore."),e=()=>Promise.resolve().then(()=>vde).then(n=>n.createWorker()),!(!Bt._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return e();let r=navigator.userAgentData;return r&&r.brands.some(({brand:n})=>/Chromium/i.test(n))&&/mac ?OS/i.test(r.platform)&&await r.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:n,platformVersion:i})=>/arm/i.test(n||"arm")&&13<=parseInt(i||"13")).catch(()=>!0)?e():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(e){let r=Math.round(.6666666666666666*Math.min(e.videoWidth,e.videoHeight));return{x:Math.round((e.videoWidth-r)/2),y:Math.round((e.videoHeight-r)/2),width:r,height:r,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var e=this.$video,r=e.videoWidth,n=e.videoHeight,i=e.offsetWidth,s=e.offsetHeight,o=e.offsetLeft,a=e.offsetTop,c=window.getComputedStyle(e),l=c.objectFit,u=r/n,h=i/s;switch(l){case"none":var d=r,p=n;break;case"fill":d=i,p=s;break;default:(l==="cover"?u>h:u<h)?(p=s,d=p*u):(d=i,p=d/u),l==="scale-down"&&(d=Math.min(d,r),p=Math.min(p,n))}var[g,m]=c.objectPosition.split(" ").map((v,A)=>{const E=parseFloat(v);return v.endsWith("%")?(A?s-p:i-d)*E/100:E});c=this._scanRegion.width||r,h=this._scanRegion.height||n,l=this._scanRegion.x||0;var y=this._scanRegion.y||0;u=this.$overlay.style,u.width=`${c/r*d}px`,u.height=`${h/n*p}px`,u.top=`${a+m+y/n*p}px`,n=/scaleX\(-1\)/.test(e.style.transform),u.left=`${o+(n?i-g-d:g)+(n?r-l-c:l)/r*d}px`,u.transform=e.style.transform}})}static _convertPoints(e,r){if(!r)return e;let n=r.x||0,i=r.y||0,s=r.width&&r.downScaledWidth?r.width/r.downScaledWidth:1;r=r.height&&r.downScaledHeight?r.height/r.downScaledHeight:1;for(let o of e)o.x=o.x*s+n,o.y=o.y*r+i;return e}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var e=Date.now()-this._lastScanTimestamp,r=1e3/this._maxScansPerSecond;e<r&&await new Promise(i=>setTimeout(i,r-e)),this._lastScanTimestamp=Date.now();try{var n=await Bt.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(i){if(!this._active)return;this._onDecodeError(i)}!Bt._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=Bt.createQrEngine()),n?(this._onDecode?this._onDecode(n):this._legacyOnDecode&&this._legacyOnDecode(n.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",n.cornerPoints.map(({x:i,y:s})=>`${i},${s}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(e){e!==Bt.NO_QR_CODE_FOUND&&console.log(e)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let e=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",r=[{width:{min:1024}},{width:{min:768}},{}],n=r.map(i=>Object.assign({},i,{[e]:{exact:this._preferredCamera}}));for(let i of[...n,...r])try{let s=await navigator.mediaDevices.getUserMedia({video:i,audio:!1}),o=this._getFacingMode(s)||(i.facingMode?this._preferredCamera:this._preferredCamera==="environment"?"user":"environment");return{stream:s,facingMode:o}}catch{}throw"Camera not found."}async _restartVideoStream(){let e=this._paused;await this.pause(!0)&&!e&&this._active&&await this.start()}static _stopVideoStream(e){for(let r of e.getTracks())r.stop(),e.removeTrack(r)}_setVideoMirror(e){this.$video.style.transform="scaleX("+(e==="user"?-1:1)+")"}_getFacingMode(e){return(e=e.getVideoTracks()[0])?/rear|back|environment/i.test(e.label)?"environment":/front|user|face/i.test(e.label)?"user":null:null}static _drawToCanvas(e,r,n,i=!1){n=n||document.createElement("canvas");let s=r&&r.x?r.x:0,o=r&&r.y?r.y:0,a=r&&r.width?r.width:e.videoWidth||e.width,c=r&&r.height?r.height:e.videoHeight||e.height;return i||(i=r&&r.downScaledWidth?r.downScaledWidth:a,r=r&&r.downScaledHeight?r.downScaledHeight:c,n.width!==i&&(n.width=i),n.height!==r&&(n.height=r)),r=n.getContext("2d",{alpha:!1}),r.imageSmoothingEnabled=!1,r.drawImage(e,s,o,a,c,0,0,n.width,n.height),[n,r]}static async _loadImage(e){if(e instanceof Image)return await Bt._awaitImageLoad(e),e;if(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement||e instanceof SVGImageElement||"OffscreenCanvas"in window&&e instanceof OffscreenCanvas||"ImageBitmap"in window&&e instanceof ImageBitmap)return e;if(e instanceof File||e instanceof Blob||e instanceof URL||typeof e=="string"){let r=new Image;r.src=e instanceof File||e instanceof Blob?URL.createObjectURL(e):e.toString();try{return await Bt._awaitImageLoad(r),r}finally{(e instanceof File||e instanceof Blob)&&URL.revokeObjectURL(r.src)}}else throw"Unsupported image type."}static async _awaitImageLoad(e){e.complete&&e.naturalWidth!==0||await new Promise((r,n)=>{let i=s=>{e.removeEventListener("load",i),e.removeEventListener("error",i),s instanceof ErrorEvent?n("Image load error"):r()};e.addEventListener("load",i),e.addEventListener("error",i)})}static async _postWorkerMessage(e,r,n,i){return Bt._postWorkerMessageSync(await e,r,n,i)}static _postWorkerMessageSync(e,r,n,i){if(!(e instanceof Worker))return-1;let s=Bt._workerMessageId++;return e.postMessage({id:s,type:r,data:n},i),s}}Bt.DEFAULT_CANVAS_SIZE=400,Bt.NO_QR_CODE_FOUND="No QR code found",Bt._disableBarcodeDetector=!1,Bt._workerMessageId=0;const fV=class{constructor(e,r,n){this.events={};const i=document.querySelector(e.target);if(!i)throw new Error(`Target element '${e.target}' is not found`);this.targetElement=i,this.decode=r,this.scannerElements=n}async _initializeScanner(e,r=25){var n,i,s,o;try{if(!e){const a=await this.listVideoInputDevices();e=this._getMainCameraDeviceId(a)}this.qrScanner=new Bt(document.getElementById(`${this.scannerElements.VIDEO}`),async a=>{var c,l,u,h;if(this.previousScanText!==a.data)try{this.previousScanText=a.data,(l=(c=this.events)==null?void 0:c[cp.CAPTURE])==null||l.call(c,await this.decode(a.data))}catch(d){(h=(u=this.events)==null?void 0:u[cp.ERROR])==null||h.call(u,d)}},{returnDetailedScanResult:!0,maxScansPerSecond:r,preferredCamera:e,highlightScanRegion:!0,highlightCodeOutline:!0,onDecodeError:()=>{}}),await this.qrScanner.start()}catch(a){(i=(n=this.events)==null?void 0:n[cp.ERROR])==null||i.call(n,a),(s=this.qrScanner)==null||s.stop(),(o=this.rootElement)==null||o.remove()}}async listVideoInputDevices(){return Bt.listCameras(!0)}_getMainCameraDeviceId(e){var r,n;if(!(e!=null&&e.length))throw new Error("No video input devices available");const i=["back","задня"],s=e.find(o=>{const a=o.label.toLowerCase();return a.includes(i[0])||a.includes(i[1])});return s?.id||((r=e[1])==null?void 0:r.id)||((n=e[0])==null?void 0:n.id)}close(){var e,r,n,i;this.previousScanText=null,(r=(e=this.events)==null?void 0:e[cp.CANCEL])==null||r.call(e),(n=this.qrScanner)==null||n.stop(),(i=this.rootElement)==null||i.remove()}on(e,r){this.events[e]=r}off(e){this.events[e]=void 0}};fV.events=cp;let zue=fV;class pV extends zue{constructor(e){super(e,Gue,Dw)}async scan({deviceId:e,maxScansPerSecond:r,isCloseButton:n}={}){var i,s;n===void 0&&(n=!0),(i=this.qrScanner)==null||i.stop(),(s=this.rootElement)==null||s.remove(),new Oue({target:this.targetElement,props:{close:this.close.bind(this),isCloseButton:n,scannerElements:Dw}}),this.rootElement=document.getElementById(Dw.ROOT),await this._initializeScanner(e,r)}}typeof window<"u"&&(window.CredenzaScanner=pV);const gV=Object.freeze(Object.defineProperty({__proto__:null,Scanner:pV},Symbol.toStringTag,{value:"Module"}));function mV(t,e){if(new.target)return dt({component:mV,...t});ot(e,!1);const[r,n]=kn(),i=()=>It(wt,"$configStore",r),s=()=>It(Wr,"$providerStore",r),o=()=>It(Mo,"$clientPublicStore",r),a=De(),c=De();var l=this&&this.__awaiter||function(j,q,z,Q){function K(te){return te instanceof z?te:new z(function(oe){oe(te)})}return new(z||(z=Promise))(function(te,oe){function ye(ie){try{Ce(Q.next(ie))}catch(le){oe(le)}}function _e(ie){try{Ce(Q.throw(ie))}catch(le){oe(le)}}function Ce(ie){ie.done?te(ie.value):K(ie.value).then(ye,_e)}Ce((Q=Q.apply(j,q||[])).next())})};const u=We(wt),{sendTokens:h,getCREDContract:d,toastAlert:p}=We(Tr);let g="",m=De(""),y=De(),v=De(""),A=18,E=De("-"),w=De(""),C=18,O=De("-"),U=De(""),I=De(!0),B=De(!1),W,M,x;const P=()=>l(void 0,void 0,void 0,function*(){const{Scanner:j}=yield Promise.resolve().then(()=>gV);x=new j({target:"#cpuiCredScanner"}),OE(Ct.UI_CLOSED,x.close),yield x.scan(),x.on(j.events.CAPTURE,q=>l(void 0,[q],void 0,function*({sub:z}){const{address:Q}=yield fL(z);Re(m,Q),x.close()})),x.on(j.events.CANCEL,()=>Re(I,!0)),x.on(j.events.ERROR,q=>{(q?.message||q).includes("Permission")&&alert("In order to scan please allow the current page to access your camera and try again."),Re(I,!0)}),Re(I,!1)}),L=()=>l(void 0,void 0,void 0,function*(){const j=H(v)===H(E);Re(B,!0);try{const q=ar.parseUnits(String(H(y)),j?A:C),z=yield h({address:H(m),amount:q,instance:j?W:void 0});p(`<a href="${qU(z.hash)}" target="_blank">Send TX</a> was created`),Re(m,""),Re(y,void 0);const[Q,K]=yield Promise.all([W.balanceOf(g),M.provider.getBalance(g)]);Re(w,ar.formatUnits(Q,A)),Re(U,parseFloat(ar.formatUnits(K,C)).toFixed(4)),Ht(Ct.RECHECK_BALANCE,[z.hash])}catch(q){p(q?.message||q||"An error occurred while sending tokens","failure"),Ht(Ct.ERROR,{error:q})}Re(B,!1)}),F=()=>l(void 0,void 0,void 0,function*(){var j,q,z,Q,K,te;const oe=We(Ot);Re(m,oe?.to||""),Re(y,oe?.amount||void 0);const{decimals:ye,contract:_e}=yield d();A=ye,W=_e;const Ce=We(Wr);if(!Ce)return;M=yield Ce.getSigner(),g=yield rn();const ie=yield Promise.all([W.symbol(),W.balanceOf(g),Ce.getBalance(g),fetch("https://chainid.network/chains.json").then(le=>le.json()).then(le=>le.find(we=>String(we.chainId)===u.chainId))]);Re(E,ie[0]),Re(w,ar.formatUnits(ie[1],A)),C=(z=(q=(j=ie[3])===null||j===void 0?void 0:j.nativeCurrency)===null||q===void 0?void 0:q.decimals)!==null&&z!==void 0?z:18,Re(U,parseFloat(ar.formatUnits(ie[2],C)).toFixed(4)),Re(O,(te=(K=(Q=ie[3])===null||Q===void 0?void 0:Q.nativeCurrency)===null||K===void 0?void 0:K.symbol)!==null&&te!==void 0?te:"ETH"),Re(v,H(E))});gt(()=>(i(),s()),()=>{i().chainId&&s()&&F()}),gt(()=>H(m),()=>{Re(a,!!ar.isAddress(H(m)))}),gt(()=>(H(B),H(y),H(a),H(v),H(E),H(w),H(O),H(U)),()=>{Re(c,H(B)||!H(y)||!H(a)||H(v)===H(E)&&H(y)>+H(w)||H(v)===H(O)&&H(y)>+H(U))}),mr(),Et();{let j=bt(()=>(i(),H(I),H(w),H(a),$e(jt),$e(Xe),H(v),H(E),H(O),H(y),H(U),H(B),H(c),o(),Le(()=>({title:"Send stored value",isNativeCurrecyTransferAllowed:i().transferTokens?.nativeCurrency!==!1,isScannerHidden:H(I),balance:H(w),chainId:u.chainId,isRecipientAddressValid:H(a),onScannerClicked:P,onSendTokens:L,onBackClicked:()=>jt.set(Xe.WALLET),onChangeCurrency:()=>H(v)===H(E)?Re(v,H(O)):Re(v,H(E)),onSetMaxAmount:()=>H(v)===H(E)?Re(y,+H(w)):Re(y,+H(U)),isLoading:H(B),isSubmitDisabled:H(c),credAlias:o()?.ui_settings.cred_alias,activeCurrency:H(v),symbol:H(E),nativeSymbol:H(O),nativeBalance:H(U)}))));wF(t,{get options(){return H(j)},get recipientAddress(){return H(m)},set recipientAddress(q){Re(m,q)},get amount(){return H(y)},set amount(q){Re(y,q)},$$legacy:!0})}var G=at({$set:ut,$on:(j,q)=>lt(e,j,q)});return n(),G}const $ue=Object.freeze(Object.defineProperty({__proto__:null,default:mV},Symbol.toStringTag,{value:"Module"}));var Hue=Fe('<div id="ctui-wallet-pay" class="crtw-w-full crtw-my-4" style="dispay: none;"><div id="ctui-payment-request-button"></div></div>');function yV(t,e){if(new.target)return dt({component:yV,...t});ot(e,!1);var r=this&&this.__awaiter||function(l,u,h,d){function p(g){return g instanceof h?g:new h(function(m){m(g)})}return new(h||(h=Promise))(function(g,m){function y(E){try{A(d.next(E))}catch(w){m(w)}}function v(E){try{A(d.throw(E))}catch(w){m(w)}}function A(E){E.done?g(E.value):p(E.value).then(y,v)}A((d=d.apply(l,u||[])).next())})};let n=Ge(e,"doPayment",12),i=Ge(e,"stripe",12),s=Ge(e,"stripeElements",12),o=Ge(e,"priceCents",12),a=Ge(e,"isLoading",12);zd(()=>r(void 0,void 0,void 0,function*(){const l=i().paymentRequest({country:"US",currency:"usd",total:{label:"Apple/Google payment",amount:o()},requestPayerName:!0,requestPayerEmail:!0});if(!(yield l.canMakePayment()))return;const h=document.getElementById("ctui-wallet-pay");h&&(h.style.display="crtw-block"),s().create("paymentRequestButton",{paymentRequest:l,style:{paymentRequestButton:{height:"48px"}}}).mount("#ctui-payment-request-button"),l.on("token",p=>r(void 0,void 0,void 0,function*(){a(!0);try{yield n()(p.token.id),yield p.complete("success")}catch(g){yield p.complete("error"),Ht(Ct.ERROR,{error:g})}a(!1)}))})),Et();var c=Hue();return Ee(t,c),at({get doPayment(){return n()},set doPayment(l){n(l),je()},get stripe(){return i()},set stripe(l){i(l),je()},get stripeElements(){return s()},set stripeElements(l){s(l),je()},get priceCents(){return o()},set priceCents(l){o(l),je()},get isLoading(){return a()},set isLoading(l){a(l),je()},$set:ut,$on:(l,u)=>lt(e,l,u)})}const Zue={base:{color:"#121e2b",fontSize:"12px","::placeholder":{color:"#d9d9d9"}},invalid:{color:"#fa755a"}},Jue=t=>new Promise((e,r)=>{const n=document.createElement("script");n.src=t,document.body.appendChild(n),n.addEventListener("load",()=>e(n)),n.addEventListener("error",()=>r(n))}),Que=async(t,e,r=5)=>{let n=0;for(;n<r;){const i=await fetch(`${t}/orders/completed/${e}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${We(gi)}`},method:"GET"});if(i.status===204){if(n++,n<r)continue;throw new Error("No content received after multiple attempts")}if(!i.ok)throw new Error("Failed to get order details");return await i.json()}},Yue=(t,e)=>{if(t.every(r=>r===null))throw new Error(`All transactions failed.
687
687
  ${e}`)},Kue=t=>{const e=t.filter(r=>r.error).map(r=>`Name: ${r.metadata?.name||r.directive.resource_id}, reason: ${r.error}`).join(`
688
- `);if(t?.every(r=>r.status==="ERROR"))throw new Error("All transactions failed.}");return e},vV=async({hash:t,stripeChargeId:e,title:r,subtitle:n,amount:i,currency:s})=>{const{credenza:o,receiptTarget:a,clientId:c}=We(wt),l=[];a?l.push(...a):l.push(SI.EMAIL);let u=0;for(const h of l){const d=await fetch(`${o.evmApiUrl}/contracts/receipt`,{method:"POST",body:JSON.stringify({...t?{tx:t}:{charge_id:e},...i?{amount:i}:{},...s?{currency:s}:{},target:h,title:r,subtitle:n,source:A1(c).name}),headers:{Authorization:`Bearer ${We(gi)}`,"Content-Type":"application/json"}});d.ok?u++:console.warn(`Failed to send receipt to ${h}:`,d.status)}return u>0},que=async(t,e,r)=>{const{toastAlert:n}=We(Tr),i=We(wt),s=Kue(t.items);(r.tokens?.length||r.memberships?.length)&&Yue(t.chain_txs,s),Ht(Ct.PAYMENT,{type:Lv.STRIPE,results:{...t,tokens:r.tokens,memberships:r.memberships,licenses:r.licenses}}),n("Your payment was successful"),Ht(Ct.RECHECK_BALANCE,t.chain_txs);const o=We(Wn);o&&xn.track("cp_payment_fiat",{$email:o.email,$phone:o.phone,chain:i.chainId,clientId:i.clientId,address:await rn(),location:window.location.href,tokens:r?.tokens,memberships:r?.memberships,licenses:r?.licenses,total:e/100,description:(r?.title??"")+`(${r?.subtitle??""})`}),await gE(),e===0&&Ot.set({subtitle:"Your claim was successful!",receipt:!1}),s&&Ot.set({title:"Done!",subtitle:"Your payment was partly successful",orders:t.items}),jt.set(Xe.PAYMENT_RESULT)};var Xue=Fe("<!> <!>",1);function bV(t,e){if(new.target)return dt({component:bV,...t});ot(e,!1);const r=De(),n=De();var i=this&&this.__awaiter||function(U,I,B,W){function M(x){return x instanceof B?x:new B(function(P){P(x)})}return new(B||(B=Promise))(function(x,P){function L(j){try{G(W.next(j))}catch(q){P(q)}}function F(j){try{G(W.throw(j))}catch(q){P(q)}}function G(j){j.done?x(j.value):M(j.value).then(L,F)}G((W=W.apply(U,I||[])).next())})};let s=Ge(e,"priceCents",12),o=Ge(e,"isLoading",12),a=Ge(e,"purchaseConfig",12),c=Ge(e,"isPriceLoading",12);const{toastAlert:l}=We(Tr),u=We(wt);let h,d=De(),p=De(),g,m=De(),y=De(!1);zd(()=>i(void 0,void 0,void 0,function*(){var U;try{if(!h){if(!window.Stripe&&(yield Jue("https://js.stripe.com/v3/"),!window.Stripe))throw{};h=window.Stripe}}catch{return console.log("Please include stripe to use payments.")}if(H(d))return;const I=A1(u.clientId).name;Re(d,h((U=u.stripe.pk[I])!==null&&U!==void 0?U:u.stripe.pk.DEFAULT)),Re(p,H(d).elements()),g=H(p).create("card",{style:Zue}),g.mount("#cpui-card-element"),g.on("change",B=>{Re(m,B.complete&&!B.error)}),g.on("focus",()=>Re(y,!0)),g.on("blur",()=>Re(y,!1))}));const v=()=>i(void 0,void 0,void 0,function*(){try{if(!H(m))return;o(!0);const U=yield H(d).createToken(g);if(U.error)throw U.error;yield A(U.token.id)}catch(U){Ht(Ct.ERROR,{error:U})}o(!1)}),A=U=>i(void 0,void 0,void 0,function*(){try{const{processPayment:I}=yield Promise.resolve().then(()=>kde),B=yield I(U);yield que(B,s(),a())}catch(I){l(`Payment error: ${I.message||I}`,"failure"),Ot.set({errorMessage:I.message||I}),jt.set(Xe.ERROR),Ht(Ct.ERROR,{error:I})}});gt(()=>(H(m),$e(o()),$e(c())),()=>{Re(r,!H(m)||o()||c())}),gt(()=>$e(s()),()=>{Re(n,(s()/100).toFixed(2))}),mr(),Et();var E=Xue(),w=He(E);{let U=bt(()=>(H(y),$e(A1),Le(()=>({isCardFocused:H(y),onPay:v,currencySymbol:A1(u.clientId).currencySymbol}))));CF(w,{get options(){return H(U)},get isPaymentDisabled(){return H(r)},set isPaymentDisabled(I){Re(r,I)},get isLoading(){return o()},set isLoading(I){o(I)},get totalToPay(){return H(n)},set totalToPay(I){Re(n,I)},$$legacy:!0})}var C=Me(w,2);{var O=U=>{yV(U,{doPayment:A,get stripe(){return H(d)},get stripeElements(){return H(p)},get priceCents(){return s()},get isLoading(){return o()},set isLoading(I){o(I)},$$legacy:!0})};Je(C,U=>{H(d)&&H(p)&&U(O)})}return Ee(t,E),at({get priceCents(){return s()},set priceCents(U){s(U),je()},get isLoading(){return o()},set isLoading(U){o(U),je()},get purchaseConfig(){return a()},set purchaseConfig(U){a(U),je()},get isPriceLoading(){return c()},set isPriceLoading(U){c(U),je()},$set:ut,$on:(U,I)=>lt(e,U,I)})}const ede=JSON.parse('[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"priceToken","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"addAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"addOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"contentTokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"buyLicenseWithEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"contentTokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"buyLicenseWithToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"contentTokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"currencyTokenContract","type":"address"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"buyLicenseWithToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_requestedAmount","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"buyWithEther","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_requestedAmount","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address","name":"_currencyTokenContract","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_requestedAmount","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"clearOwners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contentNftContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableCurrencyTokenContractsList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeneficiaryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDefaultCurrencyTokenContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceFiat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenLicenseContentNftId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenLicenseExpiresAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenLicenseType","outputs":[{"internalType":"enum ContentNftTypes.LicenseType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTrustedForwarder","outputs":[{"internalType":"address","name":"forwarder","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"image","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"isAvailableCurrencyTokenContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"tokenURI","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintBatch","outputs":[{"internalType":"uint256[]","name":"arr","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"priceToken","type":"uint256"},{"internalType":"uint256","name":"contentNftId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"expiresAt","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"internalType":"struct LicenseNftContract.LicenseNFTVoucher","name":"voucher","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"removeAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"removeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"addr","type":"address"}],"name":"setBeneficiaryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"setContentNftContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"}],"name":"setDefaultCurrencyTokenContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newImage","type":"string"}],"name":"setImage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceFiat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newSymbol","type":"string"}],"name":"setSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURIByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_forwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenURIByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]');var tde=Fe('<div class="crtw-w-full crtw-justify-items-center crtw-my-5"><!></div>');function wV(t,e){if(new.target)return dt({component:wV,...t});ot(e,!1);const[r,n]=kn(),i=()=>It(Mo,"$clientPublicStore",r);var s=this&&this.__awaiter||function(j,q,z,Q){function K(te){return te instanceof z?te:new z(function(oe){oe(te)})}return new(z||(z=Promise))(function(te,oe){function ye(ie){try{Ce(Q.next(ie))}catch(le){oe(le)}}function _e(ie){try{Ce(Q.throw(ie))}catch(le){oe(le)}}function Ce(ie){ie.done?te(ie.value):K(ie.value).then(ye,_e)}Ce((Q=Q.apply(j,q||[])).next())})};let o=Ge(e,"totalPriceToken",12),a=Ge(e,"purchaseConfig",12),c=Ge(e,"isLoading",12),l=Ge(e,"isPriceLoading",12),u=Ge(e,"pricesByToken",12);const{getCREDContract:h,toastAlert:d}=We(Tr),{chainId:p,clientId:g}=We(wt);let m=De(!1),y=De(BigInt(0)),v=De(),A="",E,w=De(),C,O,U;const I=(j,q,z)=>s(void 0,void 0,void 0,function*(){d(`<a href="${qU(q.hash)}" target="_blank">Purchase TX #${j}</a> was created`),Ht(Ct.PAYMENT,{type:Lv.ERC20,data:q}),Ht(Ct.RECHECK_BALANCE),yield vV({hash:q.hash,title:a().title,subtitle:a().subtitle,currency:"CRED",amount:+ar.formatUnits(z,H(w))}),Ht(Ct.RECEIPT,{hash:q.hash})}),B=(j,q)=>s(void 0,void 0,void 0,function*(){try{const{credenzaSellableMinAbi:z}=yield Promise.resolve().then(()=>kl),Q=new ar.Contract(j.contractAddress,z,O),K=j.tokenId?j.tokenId:j.typeId,te=u()[`${j.contractAddress}/${K}`],oe=yield E.approve.populateTransaction(yield Q.getAddress(),te);yield md(oe,E);const ye=yield Q.buyWithToken.populateTransaction(K,j.amount||1,C),_e=yield md(ye,Q);yield I(q,_e,te)}catch(z){d(`Payment error: ${z.message||z}`,"failure"),Ot.set({errorMessage:z.message}),jt.set(Xe.ERROR),Ht(Ct.ERROR,{error:z})}}),W=(j,q)=>s(void 0,void 0,void 0,function*(){if(j.licenseContractAddress)try{const z=new ar.Contract(j.licenseContractAddress,ede,O),Q=u()[`${j.contractAddress}/${j.contentTokenId}`],K=yield E.approve.populateTransaction(yield z.getAddress(),Q);yield md(K,E);const te=yield z.buyLicenseWithToken.populateTransaction(j.contentTokenId,C,U.address,j.licenseType),oe=yield md(te,z);yield I(q,oe,Q)}catch(z){d(`Payment error: ${z.message||z}`,"failure"),Ot.set({errorMessage:z.message}),jt.set(Xe.ERROR),Ht(Ct.ERROR,{error:z})}}),M=()=>s(void 0,void 0,void 0,function*(){var j,q;try{if(BigInt(o())>H(y))return;c(!0);const z=[...a().tokens||[],...a().memberships||[]].map((te,oe)=>B(te,oe+1)),Q=[...a().licenses||[]].map((te,oe)=>W(te,oe+1));yield Promise.all([...z,...Q]);const K=We(Wn);K&&xn.track("cp_payment_stored_value",{$email:K.email,$phone:K.phone,chain:p,clientId:g,address:C,location:window.location.href,tokens:a().tokens,memberships:a().memberships,total:o(),description:((j=a()===null||a()===void 0?void 0:a().title)!==null&&j!==void 0?j:"")+`(${(q=a()===null||a()===void 0?void 0:a().subtitle)!==null&&q!==void 0?q:""})`}),yield gE(),o()===0&&Ot.set({subtitle:"Your claim was successful!",receipt:!1}),jt.set(Xe.PAYMENT_RESULT)}catch(z){d(`Payment error: ${z.message||z}`,"failure"),Ot.set({errorMessage:z.message}),jt.set(Xe.ERROR),Ht(Ct.ERROR,{error:z})}finally{c(!1)}});zd(()=>s(void 0,void 0,void 0,function*(){try{Re(m,!0),U=yield h();const j=We(Wr);if(!j)return;O=yield j.getSigner(),E=U.contract,Re(w,U.decimals),[C,A]=yield Promise.all([rn(),E.symbol()]),Re(y,yield E.balanceOf(C)),Re(v,`${ar.formatUnits(BigInt(H(y))-BigInt(o()),H(w))} ${_1(A,"cred")}`)}catch(j){console.log(j)}finally{Re(m,!1)}})),Et();var x=nt(),P=He(x);{var L=j=>{var q=tde(),z=Ie(q);El(z,{}),xe(q),Ee(j,q)},F=j=>{{let q=bt(()=>(H(v),$e(ar),H(y),H(w),i(),$e(jt),$e(Xe),$e(o()),$e(c()),$e(l()),Le(()=>({formattedBalance:H(v),balance:Number((+ar.formatUnits(BigInt(H(y)),H(w))).toFixed(2)),credAlias:i()?.ui_settings.cred_alias,onPay:M,onGetCred:()=>jt.set(Xe.WALLET),totalToPay:(+ar.formatUnits(o(),H(w))).toFixed(2),isLoading:c(),isPaymentDisabled:!Number(H(y))||BigInt(o())>H(y)||l()}))));SF(j,{get options(){return H(q)}})}};Je(P,j=>{H(m)?j(L):j(F,!1)})}Ee(t,x);var G=at({get totalPriceToken(){return o()},set totalPriceToken(j){o(j),je()},get purchaseConfig(){return a()},set purchaseConfig(j){a(j),je()},get isLoading(){return c()},set isLoading(j){c(j),je()},get isPriceLoading(){return l()},set isPriceLoading(j){l(j),je()},get pricesByToken(){return u()},set pricesByToken(j){u(j),je()},$set:ut,$on:(j,q)=>lt(e,j,q)});return n(),G}const rde=JSON.parse('[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"priceToken","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"addAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"addOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"buyWithEther","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"currencyTokenContract","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"clearOwners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableCurrencyTokenContractsList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeneficiaryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDefaultCurrencyTokenContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceFiat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceFiat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenLicenseInfo","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTrustedForwarder","outputs":[{"internalType":"address","name":"forwarder","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"image","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"isAvailableCurrencyTokenContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"tokenURI","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintBatch","outputs":[{"internalType":"uint256[]","name":"arr","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"string","name":"licenseInfo","type":"string"},{"internalType":"uint256","name":"fullLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"fullLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"fullLicensePriceEther","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceEther","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceEther","type":"uint256"}],"name":"mintWithPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"priceToken","type":"uint256"},{"internalType":"string","name":"licenseInfo","type":"string"},{"internalType":"string","name":"uri","type":"string"}],"internalType":"struct ContentNftContract.ContentNFTVoucher","name":"voucher","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"removeAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"removeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"addr","type":"address"}],"name":"setBeneficiaryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"}],"name":"setDefaultCurrencyTokenContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newImage","type":"string"}],"name":"setImage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceEther","type":"uint256"}],"name":"setLicensePriceEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceFiat","type":"uint256"}],"name":"setLicensePriceFiat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceToken","type":"uint256"}],"name":"setLicensePriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceFiat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newSymbol","type":"string"}],"name":"setSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"licenseInfo","type":"string"}],"name":"setTokenLicenseInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURIByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_forwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenURIByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]');var nde=Fe('<div slot="credit-card"><!></div>'),ide=Fe('<div slot="cred-balance"><!></div>'),sde=Fe("<!> <!>",1);function kV(t,e){if(new.target)return dt({component:kV,...t});ot(e,!1);const[r,n]=kn(),i=()=>It(wt,"$configStore",r),s=()=>It(Wr,"$providerStore",r),o=()=>It(Gf,"$contractsStore",r),a=()=>It(Wn,"$userStore",r),c=()=>It(Ot,"$pageOptsStore",r);var l=this&&this.__awaiter||function(B,W,M,x){function P(L){return L instanceof M?L:new M(function(F){F(L)})}return new(M||(M=Promise))(function(L,F){function G(z){try{q(x.next(z))}catch(Q){F(Q)}}function j(z){try{q(x.throw(z))}catch(Q){F(Q)}}function q(z){z.done?L(z.value):P(z.value).then(G,j)}q((x=x.apply(B,W||[])).next())})};const{close:u}=We(Tr),h=We(wt).chainId;let d=De(0),p=De(0),g=De(!1),m=De(!1),y=De({});const v=(B,W,M)=>l(void 0,void 0,void 0,function*(){let x=0,P=0;if(M){const G=new ar.Contract(B,rde,s());return x=yield G.getLicensePriceFiat(String(W),M).then(j=>Number(j)),P=yield G.getLicensePriceToken(String(W),M).then(j=>Number(j)),[x,P]}const{credenzaSellableMinAbi:L}=yield Promise.resolve().then(()=>kl),F=new ar.Contract(B,L,s());return x=yield F.getPriceFiat(W).then(G=>Number(G)),P=0,x===0?[x,P]=yield Promise.all([F.getPriceFiat(fE).then(G=>Number(G)),F.getPriceToken(fE).then(G=>Number(G))]):P=yield F.getPriceToken(W).then(G=>Number(G)),[x,P]}),A=B=>l(void 0,void 0,void 0,function*(){try{Re(g,!0);for(const W of B)if(W.contractAddress===o().erc20Cred.address)Re(d,H(d)+W.amount*100);else{const M=W.tokenId||W.typeId||W.contentTokenId||fE;let[x,P]=yield v(W.contractAddress,+M,W.licenseType);W?.amount&&W?.amount!==0&&(x*=W.amount,P*=W.amount),Re(d,H(d)+x),Re(p,H(p)+P),HD(y,H(y)[`${W.contractAddress}/${M}`]=P),console.log(H(y),H(p))}}catch(W){Ht(Ct.ERROR,W)}finally{Re(g,!1)}}),E=Ot.subscribe(B=>l(void 0,void 0,void 0,function*(){var W,M,x;!(!((W=B?.tokens)===null||W===void 0)&&W.length)&&!(!((M=B?.memberships)===null||M===void 0)&&M.length)&&!(!((x=B?.licenses)===null||x===void 0)&&x.length)||(yield A([...B?.tokens||[],...B?.memberships||[],...B?.licenses||[]]))}));$d(E),gt(()=>i(),()=>{i().chainId!==h&&u()}),mr(),Et();var w=sde(),C=He(w);{var O=B=>{var W=nt(),M=He(W);wn(M,()=>Promise.resolve().then(()=>RV),null,(x,P)=>{var L=nt(),F=He(L);dn(F,()=>H(P).default,(G,j)=>{j(G,{})}),Ee(x,L)}),Ee(B,W)};Je(C,B=>{H(m)&&B(O)})}var U=Me(C,2);{let B=bt(()=>(a(),c(),$e(jt),$e(Xe),H(d),H(g),Le(()=>({user:a(),title:c().title||"Order Summary",subtitle:c().subtitle,onBackClick:()=>jt.set(Xe.WALLET),isStripeDisabled:c().payments?.stripe?.disabled,isCredezaValueDisabled:!H(d)||c().payments?.credenzaStoredValue?.disabled,isPriceLoading:H(g),totalSumCents:H(d)}))));TF(U,{get options(){return H(B)},get isLoading(){return H(m)},set isLoading(W){Re(m,W)},$$slots:{"credit-card":(W,M)=>{var x=nde(),P=Ie(x);bV(P,{get priceCents(){return H(d)},get isPriceLoading(){return H(g)},get purchaseConfig(){return c()},get isLoading(){return H(m)},set isLoading(L){Re(m,L)},$$legacy:!0}),xe(x),Ee(W,x)},"cred-balance":(W,M)=>{var x=ide(),P=Ie(x);wV(P,{get pricesByToken(){return H(y)},get totalPriceToken(){return H(p)},get isPriceLoading(){return H(g)},get purchaseConfig(){return c()},get isLoading(){return H(m)},set isLoading(L){Re(m,L)},$$legacy:!0}),xe(x),Ee(W,x)}},$$legacy:!0})}Ee(t,w);var I=at({$set:ut,$on:(B,W)=>lt(e,B,W)});return n(),I}const ode=Object.freeze(Object.defineProperty({__proto__:null,default:kV},Symbol.toStringTag,{value:"Module"}));function EV(t,e){if(new.target)return dt({component:EV,...t});ot(e,!1);const[r,n]=kn(),i=()=>It(Ot,"$pageOptsStore",r);let s=We(wt);Et();{let a=bt(()=>({title:i()?.title||s.content?.paymentResult?.title||"Success!",subtitle:i()?.subtitle||s.content?.paymentResult?.subtitle||"Your payment was successful!",description:i()?.description||s.content?.paymentResult?.description,orders:i()?.orders||[],tokenImage:i()?.tokenImage||""}));gF(t,{get options(){return H(a)}})}var o=at({$set:ut,$on:(a,c)=>lt(e,a,c)});return n(),o}const ade=Object.freeze(Object.defineProperty({__proto__:null,default:EV},Symbol.toStringTag,{value:"Module"}));function AV(t,e){if(new.target)return dt({component:AV,...t});ot(e,!1);var r=this&&this.__awaiter||function(a,c,l,u){function h(d){return d instanceof l?d:new l(function(p){p(d)})}return new(l||(l=Promise))(function(d,p){function g(v){try{y(u.next(v))}catch(A){p(A)}}function m(v){try{y(u.throw(v))}catch(A){p(A)}}function y(v){v.done?d(v.value):h(v.value).then(g,m)}y((u=u.apply(a,c||[])).next())})};const{close:n}=We(Tr);let i,s=De(!1);const o=a=>r(void 0,[a],void 0,function*({message:c,sub:l,scanType:u}){switch(i.close(),u){case Xc.PASSPORT_ID_PASS:case Xc.PASSPORT_ID:{const h=JSON.parse(c),{address:d}=yield fL(l);Tse({userAddress:d,amount:h?.amount});break}case Xc.TOKENS_PURCHASE:{hL(JSON.parse(c));break}case Xc.AIR_DROP_ASSET:{yield Cse(JSON.parse(c));break}case Xc.REQUEST_LOYALTY_POINTS:{yield Sse(JSON.parse(c));break}default:n(),jt.set(null)}});zd(()=>r(void 0,void 0,void 0,function*(){const{Scanner:a}=yield Promise.resolve().then(()=>gV);i=new a({target:"#cpuiScanner"}),OE(Ct.UI_CLOSED,()=>{i.close(),jt.set(null)}),yield i.scan({isCloseButton:!1}),Re(s,!0),i.on(a.events.CAPTURE,o),i.on(a.events.ERROR,c=>{(c?.message||c).includes("Permission")&&alert("In order to scan please allow the current page to access your camera and try again.")})})),Et();{let a=bt(()=>({isScannerLoaded:H(s)}));vF(t,{get options(){return H(a)}})}return at({$set:ut,$on:(a,c)=>lt(e,a,c)})}const cde=Object.freeze(Object.defineProperty({__proto__:null,default:AV},Symbol.toStringTag,{value:"Module"})),lde="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2027.3.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20500%20500'%20style='enable-background:new%200%200%20500%20500;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23010101;}%20%3c/style%3e%3cpath%20class='st0'%20d='M454.1,479.5l-39.2-358c-0.5-7.2-6.7-12.4-13.9-12.4l-67.6,0V88.6c0-45.9-37.7-83.6-83.6-83.6%20s-83.6,37.7-83.6,83.6v20.6H98.2c-7.2,0-12.9,5.2-13.9,12.4L45,479.5c-0.5,4.1,1,7.7,3.6,10.8c2.6,3.1,6.2,4.6,10.3,4.6h381.7%20c4.1,0,7.7-1.5,10.3-4.6C453.6,487.3,454.6,483.6,454.1,479.5L454.1,479.5z%20M204.4,88.6c0-25.3,20.6-45.4,45.4-45.4%20c24.8,0,45.4,20.6,45.4,45.4v20.6l-90.8,0L204.4,88.6z%20M249.8,406.3c-57.3,0-104.2-46.4-104.2-104.2c0-57.3,46.4-104.2,104.2-104.2%20c57.3,0,104.2,46.4,104.2,104.2C354,359.3,307.1,406.3,249.8,406.3z'/%3e%3cpath%20class='st0'%20d='M295.2,256.7c-7.2-7.2-19.6-7.2-26.8,0l-18.6,18.6l-18.6-18.6c-7.2-7.2-19.6-7.2-26.8,0%20c-7.2,7.2-7.2,19.6,0,26.8l18.6,18.6l-18.6,18.6c-7.2,7.2-7.2,19.6,0,26.8c3.6,3.6,8.8,5.7,13.4,5.7c4.6,0,9.8-2.1,13.4-5.7%20l18.6-18.6l18.6,18.6c3.6,3.6,8.8,5.7,13.4,5.7c4.6,0,9.8-2.1,13.4-5.7c7.2-7.2,7.2-19.6,0-26.8l-18.6-18.6l18.6-18.6%20C302.4,276.3,302.4,264.4,295.2,256.7L295.2,256.7z'/%3e%3c/svg%3e",Al={titles:{DEFAULT_ERROR_TITLE:"Something went wrong",TRANSACTION_REVERTED_TITLE:"The transaction is reverted",SOLD_OUT_ERROR_TITLE:"Sold out",INVALID_TOKEN_ERROR_TITLE:"Invalid token ID"},desctiptions:{DEFAULT_ERROR_DESC:"An unexpected error occured and we are unable to complete your order.",SOLD_OUT_ERROR_DESC:"We are unable to complete your order as the item that you are trying to add is currently sold out.",INVALID_TOKEN_ERROR_DESC:"There is no token associated with provided ID.",HAS_MEMBERSHIP_ALREADY_ERROR_DESC:"This membership is already assosiated with your account."}},ude=t=>{let e={};return(t.includes("SOLD_OUT")||t.includes("Sold out"))&&(e={title:Al.titles.SOLD_OUT_ERROR_TITLE,description:Al.desctiptions.SOLD_OUT_ERROR_DESC,image:lde}),t.includes("invalid token ID")&&(e={title:Al.titles.INVALID_TOKEN_ERROR_TITLE,description:Al.desctiptions.INVALID_TOKEN_ERROR_DESC}),t.includes("ALREADY_HAS_MEMBERSHIP")&&(e={title:Al.titles.TRANSACTION_REVERTED_TITLE,description:Al.desctiptions.HAS_MEMBERSHIP_ALREADY_ERROR_DESC}),e};function _V(t,e){if(new.target)return dt({component:_V,...t});ot(e,!1);const r=()=>We(Tr).close(),{openUI:n}=We(Tr);let i=De();const s=Ot.subscribe(a=>{a.errorMessage?Re(i,Object.assign(Object.assign({},H(i)),ude(a.errorMessage))):a.title&&a.description&&Re(i,Object.assign(Object.assign({},H(i)),a))}),o=()=>{const{primaryAction:a}=H(i);let c={tokens:[{contractAddress:a?.contractAddress,tokenId:a?.tokenId}]},l={memberships:[{contractAddress:a?.contractAddress,typeId:a?.typeId}]};n(Xe.PAYMENT,Object.assign({title:a?.text,subtitle:""},a?.typeId?l:c))};$d(s),Et();{let a=bt(()=>({title:H(i)?.title||Al.titles.DEFAULT_ERROR_TITLE,description:H(i)?.description||Al.desctiptions.DEFAULT_ERROR_DESC,image:H(i)?.image,shouldRenderBackButton:H(i)?.shouldRenderBackButton,onCloseClick:r,secondaryAction:H(i)?.secondaryAction,primaryActionText:H(i)?.primaryAction?.text,openPaymentFunction:o}));oF(t,{get options(){return H(a)}})}return at({$set:ut,$on:(a,c)=>lt(e,a,c)})}const dde=Object.freeze(Object.defineProperty({__proto__:null,default:_V},Symbol.toStringTag,{value:"Module"}));var hde=Fe("<button> </button>"),fde=Fe(`<a class="crtw-flex crtw-justify-center crtw-items-center crtw-w-full crtw-h-[50px] crtw-cursor-pointer
688
+ `);if(t?.every(r=>r.status==="ERROR"))throw new Error("All transactions failed.}");return e},vV=async({hash:t,stripeChargeId:e,title:r,subtitle:n,amount:i,currency:s})=>{const{credenza:o,receiptTarget:a,clientId:c}=We(wt),l=[];a?l.push(...a):l.push(SI.EMAIL);let u=0;for(const h of l){const d=await fetch(`${o.evmApiUrl}/contracts/receipt`,{method:"POST",body:JSON.stringify({...t?{tx:t}:{charge_id:e},...i?{amount:i}:{},...s?{currency:s}:{},target:h,title:r,subtitle:n,source:A1(c).name}),headers:{Authorization:`Bearer ${We(gi)}`,"Content-Type":"application/json"}});d.ok?u++:console.warn(`Failed to send receipt to ${h}:`,d.status)}return u>0},que=async(t,e,r)=>{const{toastAlert:n}=We(Tr),i=We(wt),s=Kue(t.items);(r.tokens?.length||r.memberships?.length)&&Yue(t.chain_txs,s),Ht(Ct.PAYMENT,{type:Lv.STRIPE,results:{...t,tokens:r.tokens,memberships:r.memberships,licenses:r.licenses}}),n("Your payment was successful"),Ht(Ct.RECHECK_BALANCE,t.chain_txs);const o=We(Wn);o&&xn.track("cp_payment_fiat",{$email:o.email,$phone:o.phone,chain:i.chainId,clientId:i.clientId,address:await rn(),location:window.location.href,tokens:r?.tokens,memberships:r?.memberships,licenses:r?.licenses,total:e/100,description:(r?.title??"")+`(${r?.subtitle??""})`}),await gE(),e===0&&Ot.set({subtitle:"Your claim was successful!",receipt:!1}),s&&Ot.set({title:"Done!",subtitle:"Your payment was partly successful",orders:t.items}),jt.set(Xe.PAYMENT_RESULT)};var Xue=Fe("<!> <!>",1);function bV(t,e){if(new.target)return dt({component:bV,...t});ot(e,!1);const r=De(),n=De();var i=this&&this.__awaiter||function(U,I,B,W){function M(x){return x instanceof B?x:new B(function(P){P(x)})}return new(B||(B=Promise))(function(x,P){function L(j){try{G(W.next(j))}catch(q){P(q)}}function F(j){try{G(W.throw(j))}catch(q){P(q)}}function G(j){j.done?x(j.value):M(j.value).then(L,F)}G((W=W.apply(U,I||[])).next())})};let s=Ge(e,"priceCents",12),o=Ge(e,"isLoading",12),a=Ge(e,"purchaseConfig",12),c=Ge(e,"isPriceLoading",12);const{toastAlert:l}=We(Tr),u=We(wt);let h,d=De(),p=De(),g,m=De(),y=De(!1);zd(()=>i(void 0,void 0,void 0,function*(){var U;try{if(!h){if(!window.Stripe&&(yield Jue("https://js.stripe.com/v3/"),!window.Stripe))throw{};h=window.Stripe}}catch{return console.log("Please include stripe to use payments.")}if(H(d))return;const I=A1(u.clientId).name;Re(d,h((U=u.stripe.pk[I])!==null&&U!==void 0?U:u.stripe.pk.DEFAULT)),Re(p,H(d).elements()),g=H(p).create("card",{style:Zue}),g.mount("#cpui-card-element"),g.on("change",B=>{Re(m,B.complete&&!B.error)}),g.on("focus",()=>Re(y,!0)),g.on("blur",()=>Re(y,!1))}));const v=()=>i(void 0,void 0,void 0,function*(){try{if(!H(m))return;o(!0);const U=yield H(d).createToken(g);if(U.error)throw U.error;yield A(U.token.id)}catch(U){Ht(Ct.ERROR,{error:U})}o(!1)}),A=U=>i(void 0,void 0,void 0,function*(){try{const{processPayment:I}=yield Promise.resolve().then(()=>kde),B=yield I(U);yield que(B,s(),a())}catch(I){l(`Payment error: ${I.message||I}`,"failure"),Ot.set({errorMessage:I.message||I}),jt.set(Xe.ERROR),Ht(Ct.ERROR,{error:I})}});gt(()=>(H(m),$e(o()),$e(c())),()=>{Re(r,!H(m)||o()||c())}),gt(()=>$e(s()),()=>{Re(n,(s()/100).toFixed(2))}),mr(),Et();var E=Xue(),w=He(E);{let U=bt(()=>(H(y),$e(A1),Le(()=>({isCardFocused:H(y),onPay:v,currencySymbol:A1(u.clientId).currencySymbol}))));CF(w,{get options(){return H(U)},get isPaymentDisabled(){return H(r)},set isPaymentDisabled(I){Re(r,I)},get isLoading(){return o()},set isLoading(I){o(I)},get totalToPay(){return H(n)},set totalToPay(I){Re(n,I)},$$legacy:!0})}var C=Me(w,2);{var O=U=>{yV(U,{doPayment:A,get stripe(){return H(d)},get stripeElements(){return H(p)},get priceCents(){return s()},get isLoading(){return o()},set isLoading(I){o(I)},$$legacy:!0})};Je(C,U=>{H(d)&&H(p)&&U(O)})}return Ee(t,E),at({get priceCents(){return s()},set priceCents(U){s(U),je()},get isLoading(){return o()},set isLoading(U){o(U),je()},get purchaseConfig(){return a()},set purchaseConfig(U){a(U),je()},get isPriceLoading(){return c()},set isPriceLoading(U){c(U),je()},$set:ut,$on:(U,I)=>lt(e,U,I)})}const ede=JSON.parse('[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"priceToken","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"addAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"addOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"contentTokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"buyLicenseWithEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"contentTokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"buyLicenseWithToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"contentTokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"currencyTokenContract","type":"address"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"buyLicenseWithToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_requestedAmount","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"buyWithEther","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_requestedAmount","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address","name":"_currencyTokenContract","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_requestedAmount","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"clearOwners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contentNftContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableCurrencyTokenContractsList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeneficiaryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDefaultCurrencyTokenContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceFiat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenLicenseContentNftId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenLicenseExpiresAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenLicenseType","outputs":[{"internalType":"enum ContentNftTypes.LicenseType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTrustedForwarder","outputs":[{"internalType":"address","name":"forwarder","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"image","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"isAvailableCurrencyTokenContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"tokenURI","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintBatch","outputs":[{"internalType":"uint256[]","name":"arr","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"priceToken","type":"uint256"},{"internalType":"uint256","name":"contentNftId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"expiresAt","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"internalType":"struct LicenseNftContract.LicenseNFTVoucher","name":"voucher","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"removeAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"removeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"addr","type":"address"}],"name":"setBeneficiaryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"setContentNftContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"}],"name":"setDefaultCurrencyTokenContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newImage","type":"string"}],"name":"setImage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceFiat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newSymbol","type":"string"}],"name":"setSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURIByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_forwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenURIByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]');var tde=Fe('<div class="crtw-w-full crtw-justify-items-center crtw-my-5"><!></div>');function wV(t,e){if(new.target)return dt({component:wV,...t});ot(e,!1);const[r,n]=kn(),i=()=>It(Mo,"$clientPublicStore",r);var s=this&&this.__awaiter||function(j,q,z,Q){function K(te){return te instanceof z?te:new z(function(oe){oe(te)})}return new(z||(z=Promise))(function(te,oe){function ye(ie){try{Ce(Q.next(ie))}catch(le){oe(le)}}function _e(ie){try{Ce(Q.throw(ie))}catch(le){oe(le)}}function Ce(ie){ie.done?te(ie.value):K(ie.value).then(ye,_e)}Ce((Q=Q.apply(j,q||[])).next())})};let o=Ge(e,"totalPriceToken",12),a=Ge(e,"purchaseConfig",12),c=Ge(e,"isLoading",12),l=Ge(e,"isPriceLoading",12),u=Ge(e,"pricesByToken",12);const{getCREDContract:h,toastAlert:d}=We(Tr),{chainId:p,clientId:g}=We(wt);let m=De(!1),y=De(BigInt(0)),v=De(),A="",E,w=De(),C,O,U;const I=(j,q,z)=>s(void 0,void 0,void 0,function*(){d(`<a href="${qU(q.hash)}" target="_blank">Purchase TX #${j}</a> was created`),Ht(Ct.PAYMENT,{type:Lv.ERC20,data:q}),Ht(Ct.RECHECK_BALANCE),yield vV({hash:q.hash,title:a().title,subtitle:a().subtitle,currency:"CRED",amount:+ar.formatUnits(z,H(w))}),Ht(Ct.RECEIPT,{hash:q.hash})}),B=(j,q)=>s(void 0,void 0,void 0,function*(){try{const{credenzaSellableMinAbi:z}=yield Promise.resolve().then(()=>kl),Q=new ar.Contract(j.contractAddress,z,O),K=j.tokenId?j.tokenId:j.typeId,te=u()[`${j.contractAddress}/${K}`],oe=yield E.approve.populateTransaction(yield Q.getAddress(),te);yield md(oe,E);const ye=yield Q.buyWithToken.populateTransaction(K,j.amount||1,C),_e=yield md(ye,Q);yield I(q,_e,te)}catch(z){d(`Payment error: ${z.message||z}`,"failure"),Ot.set({errorMessage:z.message}),jt.set(Xe.ERROR),Ht(Ct.ERROR,{error:z})}}),W=(j,q)=>s(void 0,void 0,void 0,function*(){if(j.licenseContractAddress)try{const z=new ar.Contract(j.licenseContractAddress,ede,O),Q=u()[`${j.contractAddress}/${j.contentTokenId}`],K=yield E.approve.populateTransaction(yield z.getAddress(),Q);yield md(K,E),yield new Promise(_e=>setTimeout(_e,3e3));const te=z.interface.getFunction("buyLicenseWithToken",["uint","address","uint"]);if(!te)throw new Error("buyLicenseWithToken function not found");const oe=yield z[te.format()].populateTransaction(j.contentTokenId,C,j.licenseType),ye=yield md(oe,z);yield I(q,ye,Q)}catch(z){d(`Payment error: ${z.message||z}`,"failure"),Ot.set({errorMessage:z.message}),jt.set(Xe.ERROR),Ht(Ct.ERROR,{error:z})}}),M=()=>s(void 0,void 0,void 0,function*(){var j,q;try{if(BigInt(o())>H(y))return;c(!0);const z=[...a().tokens||[],...a().memberships||[]].map((te,oe)=>B(te,oe+1)),Q=[...a().licenses||[]].map((te,oe)=>W(te,oe+1));yield Promise.all([...z,...Q]);const K=We(Wn);K&&xn.track("cp_payment_stored_value",{$email:K.email,$phone:K.phone,chain:p,clientId:g,address:C,location:window.location.href,tokens:a().tokens,memberships:a().memberships,total:o(),description:((j=a()===null||a()===void 0?void 0:a().title)!==null&&j!==void 0?j:"")+`(${(q=a()===null||a()===void 0?void 0:a().subtitle)!==null&&q!==void 0?q:""})`}),yield gE(),o()===0&&Ot.set({subtitle:"Your claim was successful!",receipt:!1}),jt.set(Xe.PAYMENT_RESULT)}catch(z){d(`Payment error: ${z.message||z}`,"failure"),Ot.set({errorMessage:z.message}),jt.set(Xe.ERROR),Ht(Ct.ERROR,{error:z})}finally{c(!1)}});zd(()=>s(void 0,void 0,void 0,function*(){try{Re(m,!0),U=yield h();const j=We(Wr);if(!j)return;O=yield j.getSigner(),E=U.contract,Re(w,U.decimals),[C,A]=yield Promise.all([rn(),E.symbol()]),Re(y,yield E.balanceOf(C)),Re(v,`${ar.formatUnits(BigInt(H(y))-BigInt(o()),H(w))} ${_1(A,"cred")}`)}catch(j){console.log(j)}finally{Re(m,!1)}})),Et();var x=nt(),P=He(x);{var L=j=>{var q=tde(),z=Ie(q);El(z,{}),xe(q),Ee(j,q)},F=j=>{{let q=bt(()=>(H(v),$e(ar),H(y),H(w),i(),$e(jt),$e(Xe),$e(o()),$e(c()),$e(l()),Le(()=>({formattedBalance:H(v),balance:Number((+ar.formatUnits(BigInt(H(y)),H(w))).toFixed(2)),credAlias:i()?.ui_settings.cred_alias,onPay:M,onGetCred:()=>jt.set(Xe.WALLET),totalToPay:(+ar.formatUnits(o(),H(w))).toFixed(2),isLoading:c(),isPaymentDisabled:!Number(H(y))||BigInt(o())>H(y)||l()}))));SF(j,{get options(){return H(q)}})}};Je(P,j=>{H(m)?j(L):j(F,!1)})}Ee(t,x);var G=at({get totalPriceToken(){return o()},set totalPriceToken(j){o(j),je()},get purchaseConfig(){return a()},set purchaseConfig(j){a(j),je()},get isLoading(){return c()},set isLoading(j){c(j),je()},get isPriceLoading(){return l()},set isPriceLoading(j){l(j),je()},get pricesByToken(){return u()},set pricesByToken(j){u(j),je()},$set:ut,$on:(j,q)=>lt(e,j,q)});return n(),G}const rde=JSON.parse('[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"priceToken","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"addAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"addOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"buyWithEther","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"currencyTokenContract","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"clearOwners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableCurrencyTokenContractsList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeneficiaryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDefaultCurrencyTokenContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceFiat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceFiat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenLicenseInfo","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTrustedForwarder","outputs":[{"internalType":"address","name":"forwarder","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"image","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"isAvailableCurrencyTokenContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"tokenURI","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintBatch","outputs":[{"internalType":"uint256[]","name":"arr","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"string","name":"licenseInfo","type":"string"},{"internalType":"uint256","name":"fullLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"fullLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"fullLicensePriceEther","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceEther","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceEther","type":"uint256"}],"name":"mintWithPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"priceToken","type":"uint256"},{"internalType":"string","name":"licenseInfo","type":"string"},{"internalType":"string","name":"uri","type":"string"}],"internalType":"struct ContentNftContract.ContentNFTVoucher","name":"voucher","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"removeAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"removeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"addr","type":"address"}],"name":"setBeneficiaryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"}],"name":"setDefaultCurrencyTokenContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newImage","type":"string"}],"name":"setImage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceEther","type":"uint256"}],"name":"setLicensePriceEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceFiat","type":"uint256"}],"name":"setLicensePriceFiat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceToken","type":"uint256"}],"name":"setLicensePriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceFiat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newSymbol","type":"string"}],"name":"setSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"licenseInfo","type":"string"}],"name":"setTokenLicenseInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURIByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_forwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenURIByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]');var nde=Fe('<div slot="credit-card"><!></div>'),ide=Fe('<div slot="cred-balance"><!></div>'),sde=Fe("<!> <!>",1);function kV(t,e){if(new.target)return dt({component:kV,...t});ot(e,!1);const[r,n]=kn(),i=()=>It(wt,"$configStore",r),s=()=>It(Wr,"$providerStore",r),o=()=>It(Gf,"$contractsStore",r),a=()=>It(Wn,"$userStore",r),c=()=>It(Ot,"$pageOptsStore",r);var l=this&&this.__awaiter||function(B,W,M,x){function P(L){return L instanceof M?L:new M(function(F){F(L)})}return new(M||(M=Promise))(function(L,F){function G(z){try{q(x.next(z))}catch(Q){F(Q)}}function j(z){try{q(x.throw(z))}catch(Q){F(Q)}}function q(z){z.done?L(z.value):P(z.value).then(G,j)}q((x=x.apply(B,W||[])).next())})};const{close:u}=We(Tr),h=We(wt).chainId;let d=De(0),p=De(0),g=De(!1),m=De(!1),y=De({});const v=(B,W,M)=>l(void 0,void 0,void 0,function*(){let x=0,P=0;if(M){const G=new ar.Contract(B,rde,s());return x=yield G.getLicensePriceFiat(String(W),M).then(j=>Number(j)),P=yield G.getLicensePriceToken(String(W),M).then(j=>Number(j)),[x,P]}const{credenzaSellableMinAbi:L}=yield Promise.resolve().then(()=>kl),F=new ar.Contract(B,L,s());return x=yield F.getPriceFiat(W).then(G=>Number(G)),P=0,x===0?[x,P]=yield Promise.all([F.getPriceFiat(fE).then(G=>Number(G)),F.getPriceToken(fE).then(G=>Number(G))]):P=yield F.getPriceToken(W).then(G=>Number(G)),[x,P]}),A=B=>l(void 0,void 0,void 0,function*(){try{Re(g,!0);for(const W of B)if(W.contractAddress===o().erc20Cred.address)Re(d,H(d)+W.amount*100);else{const M=W.tokenId||W.typeId||W.contentTokenId||fE;let[x,P]=yield v(W.contractAddress,+M,W.licenseType);W?.amount&&W?.amount!==0&&(x*=W.amount,P*=W.amount),Re(d,H(d)+x),Re(p,H(p)+P),HD(y,H(y)[`${W.contractAddress}/${M}`]=P),console.log(H(y),H(p))}}catch(W){Ht(Ct.ERROR,W)}finally{Re(g,!1)}}),E=Ot.subscribe(B=>l(void 0,void 0,void 0,function*(){var W,M,x;!(!((W=B?.tokens)===null||W===void 0)&&W.length)&&!(!((M=B?.memberships)===null||M===void 0)&&M.length)&&!(!((x=B?.licenses)===null||x===void 0)&&x.length)||(yield A([...B?.tokens||[],...B?.memberships||[],...B?.licenses||[]]))}));$d(E),gt(()=>i(),()=>{i().chainId!==h&&u()}),mr(),Et();var w=sde(),C=He(w);{var O=B=>{var W=nt(),M=He(W);wn(M,()=>Promise.resolve().then(()=>RV),null,(x,P)=>{var L=nt(),F=He(L);dn(F,()=>H(P).default,(G,j)=>{j(G,{})}),Ee(x,L)}),Ee(B,W)};Je(C,B=>{H(m)&&B(O)})}var U=Me(C,2);{let B=bt(()=>(a(),c(),$e(jt),$e(Xe),H(d),H(g),Le(()=>({user:a(),title:c().title||"Order Summary",subtitle:c().subtitle,onBackClick:()=>jt.set(Xe.WALLET),isStripeDisabled:c().payments?.stripe?.disabled,isCredezaValueDisabled:!H(d)||c().payments?.credenzaStoredValue?.disabled,isPriceLoading:H(g),totalSumCents:H(d)}))));TF(U,{get options(){return H(B)},get isLoading(){return H(m)},set isLoading(W){Re(m,W)},$$slots:{"credit-card":(W,M)=>{var x=nde(),P=Ie(x);bV(P,{get priceCents(){return H(d)},get isPriceLoading(){return H(g)},get purchaseConfig(){return c()},get isLoading(){return H(m)},set isLoading(L){Re(m,L)},$$legacy:!0}),xe(x),Ee(W,x)},"cred-balance":(W,M)=>{var x=ide(),P=Ie(x);wV(P,{get pricesByToken(){return H(y)},get totalPriceToken(){return H(p)},get isPriceLoading(){return H(g)},get purchaseConfig(){return c()},get isLoading(){return H(m)},set isLoading(L){Re(m,L)},$$legacy:!0}),xe(x),Ee(W,x)}},$$legacy:!0})}Ee(t,w);var I=at({$set:ut,$on:(B,W)=>lt(e,B,W)});return n(),I}const ode=Object.freeze(Object.defineProperty({__proto__:null,default:kV},Symbol.toStringTag,{value:"Module"}));function EV(t,e){if(new.target)return dt({component:EV,...t});ot(e,!1);const[r,n]=kn(),i=()=>It(Ot,"$pageOptsStore",r);let s=We(wt);Et();{let a=bt(()=>({title:i()?.title||s.content?.paymentResult?.title||"Success!",subtitle:i()?.subtitle||s.content?.paymentResult?.subtitle||"Your payment was successful!",description:i()?.description||s.content?.paymentResult?.description,orders:i()?.orders||[],tokenImage:i()?.tokenImage||""}));gF(t,{get options(){return H(a)}})}var o=at({$set:ut,$on:(a,c)=>lt(e,a,c)});return n(),o}const ade=Object.freeze(Object.defineProperty({__proto__:null,default:EV},Symbol.toStringTag,{value:"Module"}));function AV(t,e){if(new.target)return dt({component:AV,...t});ot(e,!1);var r=this&&this.__awaiter||function(a,c,l,u){function h(d){return d instanceof l?d:new l(function(p){p(d)})}return new(l||(l=Promise))(function(d,p){function g(v){try{y(u.next(v))}catch(A){p(A)}}function m(v){try{y(u.throw(v))}catch(A){p(A)}}function y(v){v.done?d(v.value):h(v.value).then(g,m)}y((u=u.apply(a,c||[])).next())})};const{close:n}=We(Tr);let i,s=De(!1);const o=a=>r(void 0,[a],void 0,function*({message:c,sub:l,scanType:u}){switch(i.close(),u){case Xc.PASSPORT_ID_PASS:case Xc.PASSPORT_ID:{const h=JSON.parse(c),{address:d}=yield fL(l);Tse({userAddress:d,amount:h?.amount});break}case Xc.TOKENS_PURCHASE:{hL(JSON.parse(c));break}case Xc.AIR_DROP_ASSET:{yield Cse(JSON.parse(c));break}case Xc.REQUEST_LOYALTY_POINTS:{yield Sse(JSON.parse(c));break}default:n(),jt.set(null)}});zd(()=>r(void 0,void 0,void 0,function*(){const{Scanner:a}=yield Promise.resolve().then(()=>gV);i=new a({target:"#cpuiScanner"}),OE(Ct.UI_CLOSED,()=>{i.close(),jt.set(null)}),yield i.scan({isCloseButton:!1}),Re(s,!0),i.on(a.events.CAPTURE,o),i.on(a.events.ERROR,c=>{(c?.message||c).includes("Permission")&&alert("In order to scan please allow the current page to access your camera and try again.")})})),Et();{let a=bt(()=>({isScannerLoaded:H(s)}));vF(t,{get options(){return H(a)}})}return at({$set:ut,$on:(a,c)=>lt(e,a,c)})}const cde=Object.freeze(Object.defineProperty({__proto__:null,default:AV},Symbol.toStringTag,{value:"Module"})),lde="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2027.3.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20500%20500'%20style='enable-background:new%200%200%20500%20500;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23010101;}%20%3c/style%3e%3cpath%20class='st0'%20d='M454.1,479.5l-39.2-358c-0.5-7.2-6.7-12.4-13.9-12.4l-67.6,0V88.6c0-45.9-37.7-83.6-83.6-83.6%20s-83.6,37.7-83.6,83.6v20.6H98.2c-7.2,0-12.9,5.2-13.9,12.4L45,479.5c-0.5,4.1,1,7.7,3.6,10.8c2.6,3.1,6.2,4.6,10.3,4.6h381.7%20c4.1,0,7.7-1.5,10.3-4.6C453.6,487.3,454.6,483.6,454.1,479.5L454.1,479.5z%20M204.4,88.6c0-25.3,20.6-45.4,45.4-45.4%20c24.8,0,45.4,20.6,45.4,45.4v20.6l-90.8,0L204.4,88.6z%20M249.8,406.3c-57.3,0-104.2-46.4-104.2-104.2c0-57.3,46.4-104.2,104.2-104.2%20c57.3,0,104.2,46.4,104.2,104.2C354,359.3,307.1,406.3,249.8,406.3z'/%3e%3cpath%20class='st0'%20d='M295.2,256.7c-7.2-7.2-19.6-7.2-26.8,0l-18.6,18.6l-18.6-18.6c-7.2-7.2-19.6-7.2-26.8,0%20c-7.2,7.2-7.2,19.6,0,26.8l18.6,18.6l-18.6,18.6c-7.2,7.2-7.2,19.6,0,26.8c3.6,3.6,8.8,5.7,13.4,5.7c4.6,0,9.8-2.1,13.4-5.7%20l18.6-18.6l18.6,18.6c3.6,3.6,8.8,5.7,13.4,5.7c4.6,0,9.8-2.1,13.4-5.7c7.2-7.2,7.2-19.6,0-26.8l-18.6-18.6l18.6-18.6%20C302.4,276.3,302.4,264.4,295.2,256.7L295.2,256.7z'/%3e%3c/svg%3e",Al={titles:{DEFAULT_ERROR_TITLE:"Something went wrong",TRANSACTION_REVERTED_TITLE:"The transaction is reverted",SOLD_OUT_ERROR_TITLE:"Sold out",INVALID_TOKEN_ERROR_TITLE:"Invalid token ID"},desctiptions:{DEFAULT_ERROR_DESC:"An unexpected error occured and we are unable to complete your order.",SOLD_OUT_ERROR_DESC:"We are unable to complete your order as the item that you are trying to add is currently sold out.",INVALID_TOKEN_ERROR_DESC:"There is no token associated with provided ID.",HAS_MEMBERSHIP_ALREADY_ERROR_DESC:"This membership is already assosiated with your account."}},ude=t=>{let e={};return(t.includes("SOLD_OUT")||t.includes("Sold out"))&&(e={title:Al.titles.SOLD_OUT_ERROR_TITLE,description:Al.desctiptions.SOLD_OUT_ERROR_DESC,image:lde}),t.includes("invalid token ID")&&(e={title:Al.titles.INVALID_TOKEN_ERROR_TITLE,description:Al.desctiptions.INVALID_TOKEN_ERROR_DESC}),t.includes("ALREADY_HAS_MEMBERSHIP")&&(e={title:Al.titles.TRANSACTION_REVERTED_TITLE,description:Al.desctiptions.HAS_MEMBERSHIP_ALREADY_ERROR_DESC}),e};function _V(t,e){if(new.target)return dt({component:_V,...t});ot(e,!1);const r=()=>We(Tr).close(),{openUI:n}=We(Tr);let i=De();const s=Ot.subscribe(a=>{a.errorMessage?Re(i,Object.assign(Object.assign({},H(i)),ude(a.errorMessage))):a.title&&a.description&&Re(i,Object.assign(Object.assign({},H(i)),a))}),o=()=>{const{primaryAction:a}=H(i);let c={tokens:[{contractAddress:a?.contractAddress,tokenId:a?.tokenId}]},l={memberships:[{contractAddress:a?.contractAddress,typeId:a?.typeId}]};n(Xe.PAYMENT,Object.assign({title:a?.text,subtitle:""},a?.typeId?l:c))};$d(s),Et();{let a=bt(()=>({title:H(i)?.title||Al.titles.DEFAULT_ERROR_TITLE,description:H(i)?.description||Al.desctiptions.DEFAULT_ERROR_DESC,image:H(i)?.image,shouldRenderBackButton:H(i)?.shouldRenderBackButton,onCloseClick:r,secondaryAction:H(i)?.secondaryAction,primaryActionText:H(i)?.primaryAction?.text,openPaymentFunction:o}));oF(t,{get options(){return H(a)}})}return at({$set:ut,$on:(a,c)=>lt(e,a,c)})}const dde=Object.freeze(Object.defineProperty({__proto__:null,default:_V},Symbol.toStringTag,{value:"Module"}));var hde=Fe("<button> </button>"),fde=Fe(`<a class="crtw-flex crtw-justify-center crtw-items-center crtw-w-full crtw-h-[50px] crtw-cursor-pointer
689
689
  crtw-border-2 crtw-border-black crtw-rounded crtw-font-['Poppins'] crtw-text-base crtw-font-medium"> </a>`),pde=Fe(`<div class="crtw-flex crtw-flex-col crtw-justify-start crtw-items-start crtw-w-full crtw-mx-[50px]"><img alt="credenza-logo" class="crtw-w-[200px] crtw-mx-auto"/> <div class="crtw-flex crtw-flex-col crtw-justify-start crtw-items-start crtw-font-['Poppins'] crtw-w-full crtw-mt-[36px]"><span class="crtw-text-[24px] crtw-text-[#313a2c] crtw-font-medium"> </span> <span class="crtw-text-base crtw-text-[#747474] crtw-mb-1"> </span></div> <div class="crtw-flex crtw-flex crtw-gap-[6px] crtw-w-full crtw-items-center crtw-mb-[100px] crtw-mt-[30px]"><!> <button> </button></div></div>`);function TV(t,e){if(new.target)return dt({component:TV,...t});ot(e,!1);let r=Ge(e,"options",12),n=De(),i=De(),s=De();const{close:o}=We(Tr),a=`crtw-px-[36px] crtw-flex crtw-justify-center crtw-items-center crtw-bg-black crtw-text-white crtw-h-[50px] crtw-cursor-pointer
690
690
  crtw-border-0 crtw-rounded crtw-font-['Poppins'] crtw-text-sm crtw-font-medium`;gt(()=>($e(r()),H(n),H(i),H(s)),()=>{r()&&(w=>{Re(n,w.title),Re(i,w.description),Re(s,w.action)})(r())}),mr(),Et();var c=pde(),l=Ie(c),u=Me(l,2),h=Ie(u),d=Ie(h,!0);xe(h);var p=Me(h,2),g=Ie(p,!0);xe(p),xe(u);var m=Me(u,2),y=Ie(m);{var v=w=>{var C=nt(),O=He(C);{var U=B=>{var W=hde();Fr(W,1,A3(a));var M=Ie(W,!0);xe(W),Ye(()=>pt(M,(H(s),Le(()=>H(s).text)))),un("click",W,function(...x){H(s).onClick?.apply(this,x)}),Ee(B,W)},I=B=>{var W=nt(),M=He(W);{var x=P=>{var L=fde(),F=Ie(L,!0);xe(L),Ye(()=>{kt(L,"href",(H(s),Le(()=>H(s)?.link))),pt(F,(H(s),Le(()=>H(s)?.text)))}),Ee(P,L)};Je(M,P=>{H(s),Le(()=>H(s)?.link)&&P(x)},!0)}Ee(B,W)};Je(O,B=>{H(s),Le(()=>H(s)?.onClick)?B(U):B(I,!1)})}Ee(w,C)};Je(y,w=>{H(s)&&w(v)})}var A=Me(y,2);Fr(A,1,A3(a));var E=Ie(A,!0);return xe(A),xe(m),xe(c),Ye(()=>{kt(l,"src",tF),pt(d,H(n)),pt(g,H(i)),pt(E,($e(r()),Le(()=>r().closeButtonText||"Close")))}),un("click",A,o),Ee(t,c),at({get options(){return r()},set options(w){r(w),je()},$set:ut,$on:(w,C)=>lt(e,w,C)})}function CV(t,e){if(new.target)return dt({component:CV,...t});ot(e,!1);let r=De();const n=Ot.subscribe(i=>{Re(r,Object.assign(Object.assign({},H(r)),i.richAlertData))});$d(n),Et();{let i=bt(()=>({title:H(r).title||"Notification",description:H(r).description||"Choose your next steps",action:H(r).action,closeButtonText:H(r).closeButtonText}));TV(t,{get options(){return H(i)}})}return at({$set:ut,$on:(i,s)=>lt(e,i,s)})}const gde=Object.freeze(Object.defineProperty({__proto__:null,default:CV},Symbol.toStringTag,{value:"Module"}));function SV(t,e){if(new.target)return dt({component:SV,...t});ot(e,!1);const[r,n]=kn(),i=()=>It(Ot,"$pageOptsStore",r);var s,o,a,c;const l=((s=We(Ot))===null||s===void 0?void 0:s.loaderText)||NU,u=((o=We(Ot))===null||o===void 0?void 0:o.progressVideos)||((c=(a=We(wt))===null||a===void 0?void 0:a.content)===null||c===void 0?void 0:c.progressVideos)||[pE];let h=De(pE);zd(()=>{const p=Math.floor(Math.random()*u.length);Re(h,Kce(u[p].src)?u[p]:pE)}),Et();{let p=bt(()=>({text:l,selected:H(h),onSetVideoEnded:Nne}));iF(t,{get options(){return H(p)},get isProgressFinished(){return i().isProgressFinished},set isProgressFinished(g){EW(Ot,Le(i).isProgressFinished=g,Le(i))},$$legacy:!0})}var d=at({$set:ut,$on:(p,g)=>lt(e,p,g)});return n(),d}const RV=Object.freeze(Object.defineProperty({__proto__:null,default:SV},Symbol.toStringTag,{value:"Module"})),mde=t=>{const{chainId:e}=We(wt);switch(e){case Qe.POLYGON_AMOY:return{scanName:"Polygonscan",scanIcon:"https://amoy.polygonscan.com/assets/poly/images/svg/logos/polygon-chain.svg?v=23.11.1.0",scanLink:Kt[Qe.POLYGON_AMOY].scanUrl+"/address/"+t,nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://testnets.opensea.io/"+t,passportLink:"https://passport.testnets.credenza3.com"};case Qe.CHILIZ_SPICY:return{scanName:"Explorer",scanIcon:"https://cloudflare-ipfs.com/ipfs/bafkreic5h74pwuf3ony3c5zmqoenps4pxj7l5q5j3o2mdcflfpb7g5tivy",scanLink:Kt[Qe.CHILIZ_SPICY].scanUrl+"/address/"+t,passportLink:"https://passport.testnets.credenza3.com"};case Qe.CHILIZ:return{scanName:"Explorer",scanIcon:"https://cloudflare-ipfs.com/ipfs/bafkreic5h74pwuf3ony3c5zmqoenps4pxj7l5q5j3o2mdcflfpb7g5tivy",scanLink:Kt[Qe.CHILIZ].scanUrl+"/address/"+t,passportLink:"https://passport.credenza3.com"};case Qe.AVALANCHE_FUJI:return{scanName:"Explorer",scanIcon:"https://cryptologos.cc/logos/avalanche-avax-logo.svg?v=040",scanLink:Kt[Qe.AVALANCHE_FUJI].scanUrl+"/address/"+t,passportLink:"https://passport.testnets.credenza3.com",nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://testnets.opensea.io/"+t};case Qe.AVALANCHE:return{scanName:"Explorer",scanIcon:"https://cryptologos.cc/logos/avalanche-avax-logo.svg?v=040",scanLink:Kt[Qe.AVALANCHE].scanUrl+"/address/"+t,passportLink:"https://passport.credenza3.com",nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://opensea.io/"+t};case Qe.BASE:return{scanName:"Explorer",scanIcon:"https://cdn.brandfetch.io/id6XsSOVVS/theme/dark/logo.svg?c=1dxbfHSJFAPEGdCLU4o5B",scanLink:Kt[Qe.BASE].scanUrl+"/address/"+t,passportLink:"https://passport.credenza3.com",nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://opensea.io/"+t};case Qe.BASE_SEPOLIA:return{scanName:"Explorer",scanIcon:"https://cdn.brandfetch.io/id6XsSOVVS/theme/dark/logo.svg?c=1dxbfHSJFAPEGdCLU4o5B",scanLink:Kt[Qe.BASE_SEPOLIA].scanUrl+"/address/"+t,passportLink:"https://passport.testnets.credenza3.com",nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://testnets.opensea.io/"+t};case Qe.POLYGON:default:return{scanName:"Polygonscan",scanIcon:Kt[Qe.POLYGON].scanUrl+"/assets/poly/images/svg/logos/polygon-chain.svg?v=23.11.1.0",scanLink:Kt[Qe.POLYGON].scanUrl+"/address/"+t,nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://opensea.io/"+t,passportLink:"https://passport.credenza3.com"}}};function PV(t,e){if(new.target)return dt({component:PV,...t});ot(e,!1);const[r,n]=kn(),i=()=>It(wt,"$configStore",r),s=()=>It(Mo,"$clientPublicStore",r),o=()=>It(Wn,"$userStore",r);var a=this&&this.__awaiter||function(m,y,v,A){function E(w){return w instanceof v?w:new v(function(C){C(w)})}return new(v||(v=Promise))(function(w,C){function O(B){try{I(A.next(B))}catch(W){C(W)}}function U(B){try{I(A.throw(B))}catch(W){C(W)}}function I(B){B.done?w(B.value):E(B.value).then(O,U)}I((A=A.apply(m,y||[])).next())})};const{getCREDContract:c,checkMembership:l}=We(Tr);let u=De({}),h=De(null),d=De(null);const p=()=>a(void 0,void 0,void 0,function*(){const m=yield rn();Re(u,mde(m));try{const{isMember:y}=yield l(m);y&&Re(d,yield Ise())}catch{Re(d,null)}if(i().buyTokens!==!1)try{const{contract:y,decimals:v,address:A}=yield c(),[E,w]=yield Promise.all([y.balanceOf(m).then(C=>ar.formatUnits(C,v)),y.symbol()]);Re(h,`${E} ${w}`),xn.track("cp_profile_balance_read",{chain:i().chainId,contract:A,decimals:v,balance:E,symbol:w})}catch{Re(h,"-")}});gt(()=>i(),()=>{i().chainId&&p()}),mr(),Et();{let m=bt(()=>(H(u),H(d),$e(We),$e(wt),$e(jt),$e(Xe),$e(Za),H(h),s(),o(),$e(rn),Le(()=>({links:H(u),gitbookToken:H(d),gitbookUrl:We(wt).credenza.gitbookUrl,onSignOut:()=>jt.set(Xe.LOGOUT),onUpdateProfile:()=>Za.set(Xe.UPDATE_PROFILE),balance:H(h),storedValueAlias:s()?.ui_settings.stored_value_alias,userData:o(),userAddress:rn()}))));yF(t,{get options(){return H(m)}})}var g=at({$set:ut,$on:(m,y)=>lt(e,m,y)});return n(),g}const yde=Object.freeze(Object.defineProperty({__proto__:null,default:PV},Symbol.toStringTag,{value:"Module"})),vde=Object.freeze(Object.defineProperty({__proto__:null,createWorker:()=>new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
691
691
  class A{constructor(a,b,c){this.width=a;a*=b;if(c&&c.length!==a)throw Error("Wrong buffer size");this.data=c||new Uint8ClampedArray(a)}get(a,b){return this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c}}