@soonspacejs/plugin-cps-soonmanager 2.8.9 → 2.8.10

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.
package/dist/index.esm.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import{Vector4 as t,TextureLoader as e,Object3D as i,Vector2 as r,OrthographicCamera as n,MeshBasicMaterial as o,Mesh as s,PlaneGeometry as h,RepeatWrapping as a,Box3 as u,Vector3 as f,Matrix4 as l}from"three";function d(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)}function c(t,e,i,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(t,i):n?n.value=i:e.set(t,i),i}"function"==typeof SuppressedError&&SuppressedError;const p="/SceneMetadata.json",m="/db/sign",g="/db/tree_models.json",v="/db/topology_paths.json",b="/db/properties.json",y="/db/animations.json",w="/db/model_visions.json",M="properties";var _={verifyKey:"",debugKey:"NJHgNB1HDTrHTJc4ERFCBRVBB5HOBEDCjRLChRDIdn8K7EUJD,Vm4C6vC8BpZ6n6G,hxOjYZ{,wYhnJize2rlm9m,6bUcRVbP6sjNbKU8juOWUpukkcV6Cw,Bk2io7{YWJcPnG{1o3GUTpnO:z{kCYHL14HjO8noH1sp[J78k3Y3IcbOSSk97evccx0MdW2uR0f5qhZFQV8e2JCRxxJEBRBC",key:""};const S="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO0AAAC9CAYAAABfw/p4AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAA7aADAAQAAAABAAAAvQAAAABwZIxcAAAzEUlEQVR4Ae2dd5tUVdb27abJGZogNthNThIkCIZRHwOvDoKogHr5PtfM+898jfkm/jOiCIKigzAYUBGQICBRcpbYhKbJ0O/vPlOnPFV1UuXq7nWuq+qEnda+z773WjueRx6xwxAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAqMQFWB47PoDIE2gcD3339fc/78+Ulk5sG77767q5IyVVNJwpgshkAlIPDZZ58Nv3z58lM1NTU9WlpabvLbXVVV9bASZJMMRtpKeRMmR9kRWLJkSW2HDh1mQ9LBrjCQtduXX375OPfH3Gfu+dNPPx2waNGii+59qc5G2lIhbelULAKQryvknP7w4cOxkDZDztu3b4/nYZK0+O/B/czq6uoRaOWv3n777T8yAhXxgZG2iOBa1JWPwMcff1yPlC9A2o5+hFUOIOeQlStX9uG40djYOOn+/ftT8OuwG6KL0CUlbbWEssMQaK8IdOrU6Q6k7BiV/3v37j1z8eLFRZjO01zCJsI0YD53iwpfSHcjbSHRtLhaHQIJ07YxSnBpW37d0/2hoavu3r07Nv15Me+NtMVE1+KuKARoi/b2Ewhzd5/f87jPMJHHoYFLxqWSJRQXAPNnCBQDAQg7BU05xy/ukSNHHub5XT+3qGeQtQXSHl+/fn3JuGSTK6Leirm3egRWrFgxEWLNVkY4r2aY5kx6pvAzG7eJ6c8j7s8QZjPxRZrXEfFk5Wy9x1nBZZ5bGwLLly8f6xI2Ibt6e1NI+9VXX/W9detWf5qnsbJHfNfpjNpMe/hErAAF9hRPygInatEZAqVAAMKOevDgwQuJ0RknSZmzXbp0WfLGG2/cXL16defm5uZpOIxXh1IcmRS+trb2Xy+++OLtOP6L4SeWoMVI2OI0BIqJAG3YBnj4UgAZd6Atb+I2nV/nbOUg7M+YxBmdV6TZdfjw4fenT59+L9s4s/FfssZzNkKZX0MgLgK0RQcyK0nTDJMH5BkWQlj5m0qn1DO5EFaB0dwysZMHyrf6888/f4IHi48ePToq6VCkC2vTFglYi7a4CGhCA9MLZ6L1RvHb7KYGYR+DkC9zXzQrEpL2/eKLL4bMnz//LGQdSqWhTq7epPsIFYEInaGFXfkKcS5axgohnMVhCKQjACk7dOzY8QnGVqdCEEfpcL2B5XP7cRvMs9fc5+lh49zTBn6QNuPJNxgVxVkcHkDUoekeSL+o85HNPE5H3O4rFgFI2QAhFsKrGV5isoTuPutfuyD4//E+zzYjaNCjhP+U8+mosJBVM6QyCKtwEDrFfI6KK1t3I222iJn/kiMAWfstW7ZsLiR5GVL1TBcAktxXby5uzeluce4h6WXi+HLhwoXf0sF0g/u9ccKF+CnqfGRr04Ygb07lRUDak0n66uEdyy+wKcek//uSFA28H63rTKKIKzmm9abFixfvJfoWNwzkPcVwURPPMioI10/E+SImdtG4ZZo2An1zLg8CdPT0hLDz0a7jwggr6SCrQ1r8HuT6QTYSy7T2ElZhdc8v684kNPRNgq9/5513Vr3++uvXs5EjG79G2mzQMr8lQ4Ce2SY03jLIk1x8HpS4S1pM27uQUPOIYx+YxePSPW/btq0jFUDGip50f557VRQ7GhoaPoWwh9IrAY+/glwaaQsCo0VSDAQo/A8hZOREhW7dujmaVjJgKjsaUgqX360ouSBnLW3mAfKHpqzSLKpjx44tgsyx5yHjdzVk3VbsSRVuXoy0LhJ2rkgEaBtGLlB3Na0ywPTES5DvAuHWc94eJ1P4HadJGhB2Hv61i0W3OOFcPxC/zr32nqkMuvLT1jQFPYy0BYXTIis0AhAyskPnzp07SU2r9Lt3775GZqqW3EHASE2NphzNbz5+B+Yo/1gqiCSXdE0FoO1XF1MhTM4xzsBgyYQCfZiDIVBGBCBSJGk139crIp1Ad3QvcxXSH/a6+V2TRmDPtJ9/n2ddmRnVoOeaUsnw1EIun0IDy0oYhbbtJLdCHUbaQiFp8RQFgTiknTZtWgpp0wTJuhc4LbzaxumPMu4ZOpoMWV9Dy74KWXu5HrjvSDt7pHtfiLORthAoWhxFQwCzNVTT4v4QYifHWCWIen9pozq9wlqgDnEu5CjgNXqj1/D7PSo8Mmg9bp2fP0hf0BlSRlo/lO1ZwRFQOy+XSKM0LfEmtSzXVZB19JEjRxZDlORQDnFkq201dKRF7svffPPNU26PdC7yKwxy9cVsfjTX8OnhQmuxdM92bwhki4Dac3TGPEnHTF/Cfp1t+CjSYoo6pGUyxiDM06e511cCRJQmN63+/fsfu3Tp0mziilw7i5/D/fr12+Rd5K4eaeK+gFtOHVUYA1eQJVm5uHLles6p9ss1MQvXfhCQ1vvkk0+k7RZz/QQFvg4C++6GGIYK4UIVi6xjtNiL7Es8T4T1xJVsiELA+7gd9LgFXorsXsK6HpEjW22tikMdYhv37du3AjO9YJ8PCQXEFdjOhkA2CMgU5Pc0JmY/bziNh3KfXPvqdQu6hpQ1ECbIWQvSu0KOkT4ekqSVG6Q9gMmsheqhB340fPMraSY/uKU28okTJ/rzPDSs64g/edzH0NN2tyfbdSvE2UhbCBQtDgcBzRemF/Upyqwz/JEOCwQczSKAbdJ86W5+92jmDpAnmLF+gRLPkCEljQULFlwlvrOQd0hIMKcSoF1cj5+jxFG1dOnSUbSRZ6pyCAvndcPvj2+99VYsze4NF/faSBsXKfMXiIA00fHjxydjompCQeYXrBIh4V9nvvk6nNtYBbpHjx41N2/eDEw3wiFF08ovG7rt42sAoaSVPyqeCVRAzVgLs7EWnCmOeh73QFsPxW9GHlUJ8bwHpvK1uHH5+bM2rR8q9iwWAtJE7lxdAkzlF0hYN8KEiezehp7xm49SySAtHUonIFTkfGTSHaw2MsJlTVhlCFzqIWiKZua+gUprIb/nQjMdw9FIGwMk85KJQK5zdSm0AwnbPzPGzCfXrl3LmbQQL8U8Vuyk/ZDnBzJTKuwTTPBqNQUUK2Ttx++vPHIW8CPDo3qWT4o5g5JPoha29SLg3VCNAphTRtB2mmzwU4zAN/AjzZiitWKEk5cMTauHkOkAmnAq5NVt0Q7iHwc5e4KR3wJ+5X9Drombps0VuXYWjgLYgW+0TmEHxMUUxHy3CR1JfJHzcWn7PSCtyNlIfq8C89aXtMR5A0Kd9AsT9QzCNxP2O9q8O6P8IndPtKvvAn7iiJX/oDSMtEHI2PMkAhCsgUKYsaFa0kOWF8RVE3c+Llp5P5ox3lhLqhy+pJUXyLc/1Wv4HTJoh8ZfBwwY8Cm90EcgY64yOQmRnbzmIxtpw99Xu3aFrKEbqqWDAxlO8dua/tzvnl7cWPNxpRkVrxsH1zqOu/dBZ3p9M9q0rl/tAcW1TO/Ig7ROUcmIrNvdoSrJBPFORAYO8KBKCG2dc9PUSBsAbHt+rA3VIOyzFNa3+MWZM+tMrKcwr4EQv6GYInto0VZ9SWNwHJw7d+7szkaSWbscrbcnRrgMTUu+akizB3mS5o7VIYXfZpE0Pb2uXbu6MqU7hd6rEqBCWc56399CPYY4GmlDwGlvTiiAanp2J164cGFxUHssDZO7FMLkxHq5Uciz6aGNpW3ZL+o0G5T/m4K+FgJpjDOyPYyfFNIy5jr88uXLCyH8LMlJRfC7NJ6uI46M9ifBqlh4n+1OjcmKTRM9ItIMdc5ZRYfGao6tDgF93oIx11mQrg8FO5b8EGkNhDqf7hkiHyCeKfyiupcbpNX95vp64yQakeus+wxNro3X3Nugs0PaJUuW1NJ+ng3RHK2ObN3VA66v5rEI4BiBhwdFoOekXQMeGr5xtLusA3B6muexhq1I7x7pbwcnbdOanBoZlmaUm5E2CqE27k4h1DdoZtHG0kerssot2kYFPoO0MichxEncHg+LkHSrr1y5MgY/u8L8pbtBhEjSyg8yPMd5rDc8eZSWVJo7INN+eplDSauwxDGeGVInaIfPJHikf4WhYnHmO3O5jeV9kc0FhYl7GGnjItUG/UFYEfVVspYdWxNYoL00l3ir20HjhQg+7sM9lLTyT+Eeh7/fkEPaNNZBmzByszfSf0aRBVgNWhSwkzTPojVlbketPuoNYTXUFQsnSH6eHSI3aklfVIZ4B87SRaI+ynzlC1H+5V4dx5P5aZsI0JkSWajCcg4hOrGh+Ag/PxTAMxTeyA27Kaw90WJ1fnGEPIvTpg0J/kgPN01kjDX8E4ewxOWM42JprIoiLJVGytJF7lMsgjDhjbRh6LRxN7Xr0EjH88ymb2cShbyFuGMRAnPVN44guSBHpKYNCqvn3t5tFiVoYn9Kp1VYWD834lP4He44rp8f7zMtXUTDL8BiUL43aLIGHWO70bqxZn4Zab1ottFrCkM/CskczhkT4ClvfsS6CDGOx4EDYiY3+073j0mZ7DxKd/PeE8dQZIu9PzAaPifSkid1BMkU/1TbyEgGrXdFyx31ypPNtcIqPm1W7tdM8MYl7ap7zs8RRntKbYPopyDsw+bm5gU4xaq8rE3rRbWNXX/44YddaFtNo3CMI2sqMAMhx6rEsImTW67PuO06CtNNSLyVD1Idoje5N9f1jqeIP0ik+JM7M2g8FLN5MvFNjgjqOCOfDpmH2+L4l6bFfxyvST/k5WTPnj03+X1jJ9EhNSrpOcYFebtMZbMJsv4R5V14MNw0hY6xvvhdh/z7CTsLmZ4Ep2e4bgJDrR0e889//nMHv9BeZtO0UYi3QndeujbLnoDpt4iyMF6MUDYoHF24fE1DHt5sUYj28HxnA9+i4ePMB7lu0Vgiz2NpSsy7katXr3b2X2KLmREUxEWk9aQKojedsGsKcMqG32F+cbsb4Z50Ji9X0GSrqYjW+hFWHjVsJRImA4Vc4O8OedsAWVey8VskYakkRzY2Ni4i3BTC1YNTL5nk5FcfpJbFsIF4vgLr6/jpPnXq1AxrKF2c7Kqr9NB2X3EIQMjHMEs1Lqla3ffA7TK/r9CyoYWfAtdAwXrZN5K0h5BjH+WwP/4HpTnFviWObynAkaaqlgVSyOeHRUz+7hDf9j179uz301zkrROyTiA99SK3EOc44nw2KE7iU+927C1kiH8A8Wo8tzNt101UbEMIP4n73aS5GffHmD32B+kOIt3ZuPXGbSfy7vKT1yuXaVovGq34WoUQ8+tVOnVep3wFElZZpHBoYsArhAnVhBSqE8QVa+sI/I3Ph7CSC9LLzI48NDRCer6akectxLPvxo0bamfuTScAzsleWxKaDmmGKcFhw4YFfkKEMKfpaf8MPDZG7fkkU1hpEKUmlwyErMfUfubaaT5A0O5Kj7bsZayhl/Grj2Vf6dWrl+SNNI0V1jStUGgjByR8lgIQq+AryxSgH9G2v4dln+V40yDBk2F+CumGRb0szjQ/P81IfmTObyJPjX4ySbuBj6YxJhehi5CQ8Wv5J85niSOJH9fXkUfTNE/4xed9lqgAtXGcfkshay/ayguIX+b0Kc4jeX6O7VzXuTPAqGSfxs8Rv1ll3rjTr4206Yi04nsKRhUF4WUKSX1YNiiMl2jnbYxTWNauXdv9+vXr76Epci4rIgY/DQENDZNLbvjZgybd5Pr7+OOP62lnnyD5lMkX2peKT1J+wHNptiZIsvm999477obzniGUTM+n+PlO9qCzbqnau5C2P9hokcQ9fjuIcw8VQORwkGTEBJ5F2Gamdm5EfscKIF1t6zpI8vHrwnVHzjoOId+GOHF78+Fe5/wi3AjsXFkIqManULyOhnDm2nqlQ2PeolBtQZOlfPiYMNpsLGMlixsW91cocPXufRbnaxTkzcR9EkJEtkMVLzLeHThw4EdUFP1pm2su9EAIscYdovGmjXmpj1zdDiIXcjuzjYhzAv4Cm4Kk4bQzFTdhpmAKH9QYtjctv2t1+D3xxBP/A94N/PbKfGbSxhCmRg7F1P1FixR4/hLxX2ED9M/poFOl1ZsPhu3N51u2Rlq/t9HKn6mwUkbfIBuOGQhxNISwm8Kyw1tYMH37UODVCdKPQvYxhUv+Mg5pEsj+SoZDwAOSu0f6v2JWqlc6GSdWgLRY5ER7Cvplrz9Id1K9vwHJZTwWmcaPH68hpGnI0SXDQ9oD0rtTW1u7JGqc1Q2moTSGj0TMQ/SWT6RSEYaN5FszwAaT5lbctK2NVk29y7k7FdDK999/P68ZaG76Nk7rItGGzmi2u/Qif02n1HwK0iWGGH7xDndoeIZtY56EsBMgh1NxQyiZjse8MKjwT5kyZSyaY7r3edg16T3s3bv3sjlz5jSn+yMprUF9Lv15+r2XsHKDBM7kizBrwI1Dvee3bt2aTZjQzjjXP+JKzi1xCCsSoj01V3oav06kdQaL5lBTU5P2RVYFKVIuhbB30bjqRb+Iv62kcbNQhCVO64gSCG31UE+mtzCKhJMmTRqD5poBMZxxVTfvFKyzkOLf7j3a+jGuYxd+N5zOxO07dJOYdPEBhMp6RhMVzE7atoG7YshqIF9PkfwwryxB15BJnwrZhdn6mxejIP+QtQ6M9D2ge5yvE3YE19uxJn4Fq+e5H839bmTQEj6tBqpDA6+K06kWlGbQ80A7PyiAPW89CHgLo9paEydOXECB044UKYRVjih0Q1TwdU0B/Qv3r/OLpa0UxnuQhu90PMlD2prrm/UBAcZAtIzyCmE68JsNqd8h0riEPaQhFhHOi5GfUEqT+NVufQ33M4T5gvMWyKned2ndaiwZZxcL3eP2Dnm8zSdBlhaDsJIxAwQ9tKPtIPCvf/2rF4XuFUzcv5Kr5FCHXw4pgM5wB2S97ece9xmF9lG3AkgPQyfP/vRnMe+78omOhnS/dP7o+7SP84vsn4FUWjL3OWHW+5nv6XHrnmjVJneGkMCnL/ctMtPB6DTX3TCRH6fpobnal7hX/F+oQypqPNcvrbjPjLRxkWpl/jQkgsacwacw3qGA1ccRH2JrfWwNw0EH4vgP84Pm89W2c+fOvULhj5z+5xP3RbTXtfTnIhFaOEreG8jzHWRbJYKlx+G9R7Yq/bzPmAih+DXtcAgVoLP2ljSdyocOptEJv2toy65W/rxhi3FtpC0GqhUQJ195G0rhm4IoobOevKLSmdKJoZYR6rRCc2TMO05ok1iFkrSdCsAbv3tN4XfMSfc+7Ew8GnpZL7OUDqbOGktN9w+BDuIvZRxXfnikHRm3MaFhGe3hI+nh0u8h5GA65N7kp6GZ5IEJfZu8O+GRfSz+ulLBPc6ze3g6Ko9UCLeSAYp8YaQtMsDlip4B/uOknXVBcte2QuCkGUv77RYF9EfMvs/RbL/FyROFuyMrWzQLKOOQbIozwyH1gTYqdxYxYHKeh0iaNPI6ZNFHvlIOv3XByHsQK0M9uTui2q0ioSJkWGsYadTyc5oJ3kSoGNTB5LRjcddCDFUSil8TJUp6GGlLCndqYmgNfTpiHsvgNPWtoAcFXm290CmKfgmq0DIkNEDEouA389tFPJ+iSX7n3NK3b199AvKOX9j0Z/jzNZElG4U+0KQlzeMQaBnE3nXq1KmpzCNeiFz1ip9wzmZw6Wnh161kzhH+c+T9IWqCBNirE0vDN+999dVXffv06aMKiageDKPjrqc3DczrJu7P8Wuk+fBvNL+mgEZVPN4oCnZtpC0YlNlFRGEZQ+HSXOFBFIhZ3Mfq+cwmFbX1KIDZBHH8QhIt53uonRgomFv4JVcDSWsRZ6weYOLonxivzJCBvGvyQbpJ2whZ/41G/4YAQ6TRSGsyZ2857YAGd9uRyXgJc5Y416L5vkTe0HarAomk+NOXA7rz64DpPU5mMDIf5lafu9TkDMcfM680w+wZyPotYSK3klG4Yh5eMIqZjsXtQYAOoke5TVkGRrmcRRku6PtgbnEThVC7/t8mvVhmrcREjhGagBFkViKrq9XkPfSgoybD1FQACv8NTid1TXrOGlW01wrI0gJJFmAG/wUnx2yVH+9BfjTUktJZRD7Vq+vE5/Wbfk3l2JX434Ckb6jTjUrBNXtH6Z549ioM8Y/BJH+a7+Nqgsp5xnN/itLc6WkV676ghaRYQraleLUImkKgubzp2PeGzBMLnVc012biVNvrFwqiM5E9Kg1pHk+vaIZ3yHGNuE5nOPg8gATDIYPvVELanHuBYY/GNEnyNM2Fl4h3LmEyOpu8UROmF341+SP2IULKM7Krfa6mQ2e2bx3OvaYfniX9TmjwhsRkf5nBXZFFci/HT/KTIIqj3Ed6wSm3PG06fWr5TuwFNEcFJiCjU6UJAtxyeqwBfgqdY96iVWJrSDRehjbzCgBx4vYAd+Dr72O8Yd1rNNcZ1rFuo8d6Epp1ISTJGId1/aadpaVj2f3EqV08Jl26dOl9xlSdHTsgqdOeJo8TFC+4ONqVy7G6p6Jbjx+1izVMpLQq6jDSluh1aAohhz4s7Mw6Cki2E+7TA9zyfjxy5MjDFEYNU8Q5etPuGxLkcffu3TK7m4Pcvc/RYhkVAGRKfkWetnesoSnCwLP72zWEgykdOdarCR7giZgPNSmiMz3jTuXBe1An223OTqeblv4h7w3I21sVq5oVkDWyXezNYymvjbQlQpslXFoJEmnSUZjGYvqFmoe5iqwVPhTeWJ1ISoN2n2/vr9yohB5S6GNpbtLsSfuwVuF0qHOKpoC2i3kBN0f7OQ4hfxDqsKYeQrDIqYfqZFLnESb+W2qbE61rFWgfqioIqYkSDg5YPlo00YJ2/Y6zOt4cqyRElLI72SqfErwCCtAECksgAbwioJUewVR8mmdfep8X6lrTCFnh45iFUXFSiB/XIvigKX/0pv5OXNrtMaVTyBsv+dZ+VBuludBiPcjfDPLnO37rDee5vgjBNtImv+B55nspgkLCaXQejSbMTdLqwPUY0v6NtC/xrJYKcRjynGSY7Q4VgeJxJp/E2RDAN9EyPDRNW2TQ9WErCom0bOyDsjYYTTQ8doAsPGqaHYVVHS2Rh8hIoXfaeX6eE72pKcv5PP40hvkTZFvJ0NElSKPxUO1KGIuw+LuJKfyDZkLRORRKWPxWgfN4CLuY616kuxzRf5EsnPvLnUtH23I9Fa3/JhbNSNy+ZqjoW/lrTYeRtohvS2YaJpp2LgjUREHJU7iecns8g/zk+py4XXMxMgqIE7q1KdorJS7I8JAwuzlpo7IDECSrLVUVnmNXg2c71yghgbcFnLWlTGcqPE38GMzvGX4PyOtIzPE6Ko4jXGtj8l7IfJCKYAUVwumouCvR3UhbpLeiYQ7ahHMoIFmvHU2I1INe14wpe4UQl10gpB2lCSMPiOCsZAnyqA4h/LjzkU/ibzntzs0sV+sNYeeT/xf5dQ8K730OWY9DvmWYs1u8O2x4/YRc74aQOkaS3pNYE/rcxib5J86xGnOmw2uVu0sjMmv1Tqs8jLRFeG2Ygh3YD+hVCkbKVLhsk0JrTFabMttwUf5VYCnQv0f5c91pt4a2xyHIduL8Gs26ll0r7kPWFzCr3+TZQDeOiLMzEwqyrvvggw+uh/nV6iXwnZk+04qwNyCseoF1HOBeFYjTaIWsTgWl4a+///3vmmjSqg8jbRFeH4X1OWr7QflGTTw1aIaZ+cbjFx759ic6YvycU57hN7lAPsUhcQNBjjFj6BwdblMZc12E3KP8/KU/g2R30K4/s0H3SjqCMlYVpfvX/dGjR7WZ22QqnYyKhEpuj/wQ50TW3r7B/ZN0eq3DFN6g523lyLqtVeyMU4t2pVdyGGD35LyvUqaOxc038uvzDzPi+o/jj+GIVcXo3YRkc0g/1pxn8pSytalXbnWaQcCneNbD+zzoGr+acxx7t35pVUjaHVP8KPj2oFLQZmkttFM/0nxhbzrk6W3ce1Ih7eT5biqUWJMwvHFU+nVNuQQE8+qvv/56CGbUYwA8kELRi2faG7YawjpiMRg+iW78j4q5C0Ah80+B0mc0CkpYyQce+szHFxTG9An2eYmP2bgPMsQiLdor4wPSzDCq5R1JNnX8xDrwe5p0N8XZikVNA1ka5H8k6T8kvetU4uqJPgHO9e5X5ImzGmJPUGcUFdwG3JpaW2UfC7yEp5Jo2o8++qgvWlNDH4MpeH04d+cd1GC+RMrKCziFebMm0mOZPagAUwHNI0+hmSLvLWBwlorqmrAgf0PiiI6/H8DBmRAQx38cPxIFzaQvnMdqe0OIH9H4v2s6IASZDuHHRGTXK0ZyD2Tvw6BriCkctetGR8rKz8j4Evdqt64gTQ3jzOXXxG8jfrTYQj3DznhwUJxt5XlBSbt3795Ohw8f1uD1o7zU2kRh0NS8vNLhpaygwMaa7F6OF5PYhV8dL93C0qfw3aby+o/X1MW0rAOvVwkXSnZIfmvEiBFLc+hVDRNJn8KYjFyx2s3IeRk5jvA+popMoREnHInbdw/koLAiq2vS0qH1KuHruP8QnDTVcTr3x7lfJzOY+35g3oxMWj54OCjOtvY8J/OYl1fFy5ZJVAdg6iHsza8rHQrVbs3LS42NFXFolwING2gDrUbCaurZVDcCnF/h+hP3vpLOGktVTzEyhxIWmR9gFq6FsBcocBrc11RF7e63hntNBNAsqMADXLvSCSNMtgR6ysGBRe2/I/905I98Ybyj/uQh1hRL3pl2eDyASNvoVY4cXlqyZEkteZyNNleH1HZlhfSu8exxJk48TpmTMtDUyXrw0tfnNpLGINq1e4KWECqOtnhEasANGzb0PHfunAATSftx7s6vo0vObEEhbBNhGgHd+fESGvnkg0zFlPYaNW76pyjW8/IPZZteMf2Tl1jfzpEMkPR7aQPytYA8O/NwVbBZnvbLjh079rAj/ls87xsmL3E8xIJZFjUsEhaHnxta7EXyMtLPLcdn55BzUzYbdKMEnM+GgMktcFpCeXgIVmPAROtq75L1XzlrfHkBZe80ltf69DKTo6ytLlhS0/LSqjFH6sjBMMBQm6EX584Q1iE2107m3HNUTgmvmSmO5iSMtGcjy7CuxDXveOm/UKCHEodjNhLfs7zEo7zQiukNpKBJQ9VHYUEh+5UK5zDDENpPODlxXhUf+ZzJ5HvNjdVEgNfD4iJsNV9ZUy/tujB/2bpBFH2ZvBCk1a6HW+Jsoqbylug80neENkFCWSAXwWRAYqvUIzQlrqpTEsJuxc8+5QuclmKd3M02j23Jv7NdJGDNg1gyc7M+VPvzwq/y4ht5EY0QrZFJ6Y1Bk8yzSYDvpMzAHFNbxjmIfy9zRTe69+U8g5nGIl+IkgGZj0LY7yiIY8lLym4VnrAn8bOWApluXXi8/HmJCflvzOxY45p/hgq/Ij9OGzHcl78r716m/864u/WTT1XEGh56B3xa+C6OM0KADJrn/By/c+DxpRYA0Ln3vxSxXZC2oM0C0mi1Rw2FaTiAxyXsDXKqlf5XKDiXqQWvQKKrEL4oU8JY/7mTzxmOJn6nvUi6E3jhO3iBkW2kYr4RZBiMLNKaUclc5MNOPzC0pU65IMJqEfawjRs3dr169eovDHEMI97QiBlmeRrtvELL46IEiOtOfqRtNV83q4NwR8jbFrSfykboofWtaGJ9auQ8/n/FsjvO9XDyPJqAu+vr64+w9at6ggeDcT+G+hox3dW+3RMacTtzrBGAFBrtcpeSdYBzv7btmLg4NkKWkpolMqWpfVXDviDhEjK+zOWXui/HgUnXE9L4bReTIg6FuRmL4z908lRTqOen4+v1LLczZ87MpwL8hMK6G7fJXvf0a95Z38RX4RyTMd09l3tkPU6+YpOW/MX+xq00JsTUB7/GgsVuaWTJSD72Uc6Gcx7H7e5p06bdp5I+jx810x7j1yhyc7bDg4DTUKWgpJtljnni8Ve2S15qFbXtfAQY4AqBli/KDCE3/qAzOOl7p/OQKbTDCPf7+FulYSrC/I1CGWt4BItnTV1d3bkjR44sJnzotjOkcUd7KxVq4glydkDO/xeUd/c5FfwtSLWVCuYg55TOQ9ePe9a7Q7uOhazTudbEmRaaT0u8Ex94tzKRhaf2sGogzs7gsMnve7RuvO397JphPwBY8gXwYvpplUolgKOCwctOaccygV1DQCU9MEWlMbXxWChhZbUg73ciLFbCIq5jEVaZobnxsqwLKqXI9psKtxZ8FwoErCgtY0uWgfR40azaq3gX6Wp3B2cP5HQ/3ntNPaRZ0IlgIwn3DeFkRlehzcd4/ZHk/sT9VPwdQbMuN8J6Ecq8dkgrsxc8nbExeQG8Thq7y/RenifqWeTlHnJTRz5tgxlr9wU3TL7nCRMm6KvkMttCD2T7hYJ3Ag0iM17j17EP4q8h3Aym+B2S+Rkj4Hit2Y3hL64X3+YP2J9gqd0y5ErZA9kvUjUflHcqoHksTRygDiXw+ANcHHKSr3GqAN2w7Pf0OxXbJs5Lec8pH6F2/dg5FYEkeAC7k5ejYRrnoADpmyX93Ptyn9kfaCvy3Xfl4OXPKtYicTcN9wwO2rw7spJApoMU0t/o9Z6MrA1u+GzOxOG0ZxnuSLEu/OJApiqIMcvPLcdnKaRFliv8VmMK/0ff9wmLU0vm1NuPJn2bMI6VhlmcxEzEVXwQtDv7ZWkozzk0MUJkTZ/477rbOROBJGl5/9rc6nvXiwoE17Pd+3KfNYSESFq54Ry8/GqsgdgdJ264bM/Ms32MdJ+OCgdJ/6Bw/4SmGUKbbGaU/yB34Y4V8VdNdeTycJA/9zl+6iSje5/PmbjuKXyi8t64b9++FVhhZ6LiRLPW0YGkpsAoytDn9JivoZmgCmCY5im74XF3tC1kHu4+s3P2CCRJq6BqS/DCknN8AVmf9stJY2QvSnQITCjtTtDk+uR6tMwx977QZw1RoDm07anTYRcUPxrkOr2j32CqdmGyxOtB/uI+J7lH9V1ZTNIt5DFpXQSFR8ZHg9yyeU5amnS/Vx1cWAx7o4aUNIuJ8tEVgmrzti7I3Q2z+D6V6Qily/1x8pDU3uAks38rz3/MRi7zm4pACmnlxIybdepMcQ8AfooXkzoe5DqW+CxTisLhbNilpGkn6ZsrajsW5aCATSXiThGR30W7rP3b3/52hw4yrZgJJXhEXElnhmDmyrrgXexKPvS5AA911B3zccr6EWRdh7UQ64PIlImZ4DOfvGu3Q/UoOx1NiPM28vwFa6OK3w0IXMszBxP1nfDbye/PApa1lBYgg7SYZU28iIMuNLwMabIn3Ptyn3nhxygEf7hycF1bKPPQjdM9UyhDtRxpt+DnG60NxUR8F6xq3LD5nom6O23EEYMGDdKYZuDEBdLcoJ7qfNNT+KjhI1Xe/JzeXyp35x1QaTp7CTOU40yAgLDqLd+G/FfBZiL3s5hEUcjOskJktVXHkUFa5YaVHz8DeHK2DQVjqrdtUu4co2E3iTCuHGg4DcUURMO5ceqMppA5nkzH66ZrnLR+8wyzymQSx9q1IT2OsHtwf17WBeekdeH1z/PdmLFaSVOSg/T0nR2nfU/lfppEtdCjJ2byY1qcDh4XuNd7uIVcn1OEPqYD6gsw0gQdOwqEgC9pVVCoITe7afAeaiBGzp0rbjyFOkuzQNxkYUW+zizfCp1FlEva0qDg4DuFjgK6l8K4Dw07A1kK0hGULiPxSrM9S8E/itu5NPeT4OBL5jR/ed16N5YTITlqkElrpFWZ7U1EPlZnTHlhpXnITrkCnxsJfwlvdioEAr6kVcTqiOCUnOML+KOYjpaclVSIxPOJA2tgG+GTnRyYadNVmPKJ0y8sBfFXNMZtrxuEPc2C/82k18B1ckGD10+hrolfH57WV+w2efoaGuvr6/UZi0ArIN/0SVdrpmezUdt7mOmjFR/PburMl9mdHSLBRR1L9/jVyxLT1qw0rZbRoVmw6ZVKz45UBAJJK2+8jG+83pmB87RepvdZua41rod8yXmpFOAqFNNfCi0P2kJrOVVBOAfXV8DgW+b+9uRctE4wNz3ypMt5WpuK1pd1oU81ro27xNGNJ9uzKgR+GlutIt3nsCjUQ+1U4uTbGcYRNvjRdMYrjBd35PxQfSLZpmX+s0MglLS8FJlkSbOMlzKQlzcyuySK55ueTlkD19wU0LYNGqZx7wt1RoMcoKBepgBru5i1pKsOqncShCpUMoHxQJraNWvWaAOCbVz/R2ZnoOcCOtA8OE4efyHNavL+Cuk7UzIZ1nE0rZKSTNoCFZmS76GAIlhUPgiEklb+KaTfeswyjb3NKNVMJB95Ux6pZqf9tMl9KBJB3Ffc+0KdSYey2bIRLLS/UxMV1/sqyIWKP048mKl/hRi3aMdeiOO/UH5oJv1G3g+AQWey7I6/OppWaSDT3ajx3ELJYvH8F4HIgpdYkZFso/ACu/PF7KK247J5OZoQghY45YahcPVRW9O9L9SZwnkOwp5n+EIrjkJX4BQqTW88EKYL7cZh3meluoa4P5PWGaXH+z+Npj1WqrQtnUwEIkmrIBBhM9rWOyA+qZgzkTLFDH9C58dmCpO3U+Z5bmPlLTzmVFc6ZiaDxcDUp6W7owf/hdKl9mdK5Jl68eE3WDVraBp8babwn9iU4yp2pxIFdjQv7nlXSF7kMYYiUjqqXLdynNGuz6KNxrlpI99O5Nvq3ud7pue8rqmp6bVStWND5N2B5kt2jIX4M6c2ikBsbURbSrOkkh0gaLKGRI9i2aHRzgiQtLNXECqYyR9++GEX77Ncr7Ujpb6AVwGEldUzuVL6FHLF08Llh0BW0+7oiFnHRlvawtJJFWLokxArKUhe0zQ/iUJCy+SlTaneYS0ZTP6QqTsypITkvoq5tNN5uCHFIcsbEYStYN4iz7EruCyTyMq7MKBP4SUCrc0qoHluMwiklvQY2YI0r8GHOtcrvbUb2DLTWXLlPivEGXO3B/Nb+1IxaKjD+XGtz2jEJg9e92Mh5EVa8ruQ/BZ8GCkfjNS9QIW0XF91zyceC9s6EchK0yqLLEH7nuVWH0iT6R5iaCbSEXX96z7bQ4un0WT9MD/1iYd+aLR+FMp+xNuJCiElujh8heCaxH+bTpPDjDPmNc2POcVzKo2wAkSWDp1SGtr6NAUgu2kXCGStaYUKbdkZcCM57EPB3k2nz+YwxLTFyOTJk3t5NSf+RdSc18MSVlPomvlpltI5lrOdKNSMHBaiy7SeGpancrtB3nWaAFFuOSz90iKQE2khiNqW/4vm6yhxuW9Bsy3XBHvdax4qc2Vdk7Yv5OrPTybmfxvD8hTzkClIWG0qdotrfdtFkwv0WYhzPC9KW5pKaTha/iXSiillebyBxzFma1VMD355UGh/qeZEWsGkCQyQ9mUXMgrQLe6vwt++nHPqtRX5ie8uJ33C8DJrNM+yYflJNlXLyfR2ZYt7Jk9acDAT+ZNDR3HDlsMfHYOrmfziTHooR/qWZnkQyJm0EjfXThppT4ihXShuoqH1xYLzaLWTrqYuBRSao4ymHopFMBhZ+iKLeqCzbuOXQla/NMBsP/0IeXWy+cVrzyofgbwKKYRbR6FfGGZGQgZpT61Muc7lRXZVPP3aa6+dlclbCnikPUl7KDIOIf3kN3OpOJwKC8I6YiBPKcQpVBrnjLCFgrL1xZN3SYUU0yDDk8o6xJAZe4P7y9qOhA3HTlK4kmtyiwkPaVatWrVqIPNitT2nPpuoNnRXnie/mVvM9EsVN5VLM+35jzkXpT1fqnxYOrkjkDdpc08695BMeOjBhmH6JOejMm2JqQfkdDrFco+18kOSx/uMzy6J2sup8nNiEuaDQEWTVrOR+JJcHeQcggYdwFkLz7VVZ0XLnc8LCQpLvluwZFaiZQuyiVtQOva88hGomMKPmT0ArVmHWTsITqqTqBvtTsppZQ+7lOoVg8N3dNQdKVV6lk7lIpBXR1Q+2YKkmjv8PAqkF+dOboeQe1bcRlih4OCwywj7Xyzsn11CywUCmlTbcaaszCmXLJWcLpbHKZbibalkGU220iIQe/J9EcQyuzcCVAh7nd73NRHezLmdIVA20lIgtT7XjmAE7l65cmVFsLO5tFcEytoRRbs29lfS29MLUk8xxzK0rO1w2J5efMy8lk3TSj5mVG2MKWe78aYpnsy51japRth289azy2hZScuY40G127ITuW37pnNuK4sATrbtXFru8kGgrKRNCL4unwy0pbCYxEfRsDvbUp4sL4VHoOykpZA2UlhPFz5rrS7GRrYn/bbVSW0ClxyBspNWOYa03/JrtxPgyfoddv5YWfK3bwm2SgQqgrRo27vMhNrVKhHMU2ja9A9ZrvgZbdmSLFXMU1wLXgEIVARphYM2FpfGqQBMSiaCeoqZqrl6zpw5zSVL1BJq9QhUDGmFJENAP6ogt4dD+US7/kxl9Ud7yK/lsXAIVBRpmRR/nILcLvbypTlwgGZB8sNmhXulFlNbR6CiSJsAe11b17Y0Ay7QU/xTWy9clr/iIFBxpEX7XMNMPlac7JY/Vgh7k1U7q8oviUnQWhGoONIKSDTt9+pVba2gBslNvh7U1taqp7jdDm8FYWPP4yNQkaRF2z7gm7Pb42ej8n2iYVsg65cvvvji7cqX1iSsZAQqkrQCjE6pnSimkuzkWIoXBGF/oDK6WIq0LI22jUDFklawU9C/h7ht4Q38Rjv2UFvIiOWh/AhUNGnRTGeYfNDatdMZCJvX1/vKX0xMgkpCoKJJK6B69uy5Tu3BSgItriyI3QRhV8f1b/4MgTgIVDxpNcWPwt/qTEtkvsPPtouJUwrNT1YIlHW7mbiSUvirtTUNpnJFbwan9jdjzPpm7lmGdr6jpzj1q9hxM2z+DIEQBFoFaSU/pB3P1L9nQvJSMieRk06y5DdzSfgin508PW/evD943ipN+ZKBZwnljUCrIa1yytfZ3+PUI+9cZxGBCEplodVHzofFuD7brVu3k/Y9nSxANK8FRaBsm5XnkgsI8y3f9JlfLCsZgj5AU6oNfZXzech5Yu7cue1iAUMu78PClAeBVqVpBREfstaXCR7NBy5I2UK78zbkv0ZcFzmfmT9//hmu29zUyXxwsrCViUCr0rSCkE89rmtubv6/ECyywpFpCyGdb+Zy3cj1H5cvXz75j3/842Zlvg6TyhCIRiCy4EdHUXofn3zyyQx6aae4KSfI+QDz+eb9+/evokUvcH3Kpg26CNm5LSHQKkmrF0BvcgOnASwsuNCnT5/TNrzSloql5cUQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBNorAv8ffdoYPNOFmuYAAAAASUVORK5CYII=",E=237,A=189,k=new t,R=new e;class I extends i{get size(){var t;return null!==(t=this._size)&&void 0!==t?t:this.size=new r(100,100)}set size(t){this._size=t;const{x:e,y:i}=t,{camera:r,currViewport:n}=this;n.set(e*Math.random(),i*Math.random(),e,i),r.left=r.right=e/2,r.left=-r.left,r.top=r.bottom=i/2,r.bottom=-r.bottom,r.updateProjectionMatrix()}get velocity(){var t;return null!==(t=this._velocity)&&void 0!==t?t:this._velocity=this.direction.clone().multiplyScalar(this.speed)}set velocity(t){this._velocity=t}constructor(e){super(),this.viewport=e,this.fontSize=50,this.imageWidth=200,this.camera=new n(-1.6,1.6,.8,-.8,0,4),this.direction=(new r).random().normalize(),this.speed=2,this.currViewport=new t,this.lastRenderTime=0,this.autoRender=t=>{t-this.lastRenderTime>30&&this.render(),requestAnimationFrame(this.autoRender)},this.camera.position.z=2,this._generateMarkForImage()}_generateMark(){}_generateMarkForString(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[28145,22323,36805,32500,25968,23383,23402,29983,25216,26415,26377,38480,20844,21496];const e=Array.isArray(t)?String.fromCodePoint(...t):t,i=e.length,{fontSize:n}=this,a=n/4,u=2*a,{x:f,y:l}=this.size=new r(n*i+u,n+u),d=document.createElement("canvas");d.width=f,d.height=l;const c=d.getContext("2d");if(!c)return;const p=c.createLinearGradient(0,0,f,l);p.addColorStop(0,"#ff3653"),p.addColorStop(.5,"#8adb00"),p.addColorStop(1,"#2c8fff"),c.fillStyle=p,c.font=`bold ${n}px/1 serif`,c.fillText(e,a,l-1.5*a);const m=R.load(d.toDataURL()),g=new o({map:m,toneMapped:!1,transparent:!0}),v=new s(new h(f,l),g);this.add(v)}_generateMarkForImage(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A;const{renderer:n}=this.viewport,{width:u,height:f}=n.domElement,{renderWidth:l,renderHeight:d}=this._calculateImageSize(u,f,e,i);this.size=new r(n.domElement.width,n.domElement.height);const c=R.load(t);c.wrapS=a,c.wrapT=a,c.repeat.set(l/e,d/i);const p=new o({map:c,toneMapped:!1,transparent:!0}),m=new s(new h(l,d),p);this.add(m)}_calculateImageSize(t,e,i,r){let n=0,o=0;return n=t,o=n*(r/i),o<e/2&&(o=e,n=o*(i/r)),{renderWidth:n,renderHeight:o}}render(){const{renderer:t}=this.viewport;t.getViewport(k),t.clearDepth(),t.render(this,this.camera)}addToViewport(){this.viewport.postRender.set("cps-water-mark",(()=>this.render()))}removeFromViewport(){this.viewport.postRender.delete("cps-water-mark")}}var O="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},T=[],B=[],P="undefined"!=typeof Uint8Array?Uint8Array:Array,N=!1;function x(){N=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)T[e]=t[e],B[t.charCodeAt(e)]=e;B["-".charCodeAt(0)]=62,B["_".charCodeAt(0)]=63}function L(t,e,i){for(var r,n,o=[],s=e;s<i;s+=3)r=(t[s]<<16)+(t[s+1]<<8)+t[s+2],o.push(T[(n=r)>>18&63]+T[n>>12&63]+T[n>>6&63]+T[63&n]);return o.join("")}function D(t){var e;N||x();for(var i=t.length,r=i%3,n="",o=[],s=16383,h=0,a=i-r;h<a;h+=s)o.push(L(t,h,h+s>a?a:h+s));return 1===r?(e=t[i-1],n+=T[e>>2],n+=T[e<<4&63],n+="=="):2===r&&(e=(t[i-2]<<8)+t[i-1],n+=T[e>>10],n+=T[e>>4&63],n+=T[e<<2&63],n+="="),o.push(n),o.join("")}function C(t,e,i,r,n){var o,s,h=8*n-r-1,a=(1<<h)-1,u=a>>1,f=-7,l=i?n-1:0,d=i?-1:1,c=t[e+l];for(l+=d,o=c&(1<<-f)-1,c>>=-f,f+=h;f>0;o=256*o+t[e+l],l+=d,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[e+l],l+=d,f-=8);if(0===o)o=1-u;else{if(o===a)return s?NaN:1/0*(c?-1:1);s+=Math.pow(2,r),o-=u}return(c?-1:1)*s*Math.pow(2,o-r)}function q(t,e,i,r,n,o){var s,h,a,u=8*o-n-1,f=(1<<u)-1,l=f>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(h=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+l>=1?d/a:d*Math.pow(2,1-l))*a>=2&&(s++,a/=2),s+l>=f?(h=0,s=f):s+l>=1?(h=(e*a-1)*Math.pow(2,n),s+=l):(h=e*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;t[i+c]=255&h,c+=p,h/=256,n-=8);for(s=s<<n|h,u+=n;u>0;t[i+c]=255&s,c+=p,s/=256,u-=8);t[i+c-p]|=128*m}var U={}.toString,j=Array.isArray||function(t){return"[object Array]"==U.call(t)};K.TYPED_ARRAY_SUPPORT=void 0===O.TYPED_ARRAY_SUPPORT||O.TYPED_ARRAY_SUPPORT;var z=F();function F(){return K.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function H(t,e){if(F()<e)throw new RangeError("Invalid typed array length");return K.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=K.prototype:(null===t&&(t=new K(e)),t.length=e),t}function K(t,e,i){if(!(K.TYPED_ARRAY_SUPPORT||this instanceof K))return new K(t,e,i);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return V(this,t)}return G(this,t,e,i)}function G(t,e,i,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,i,r){if(e.byteLength,i<0||e.byteLength<i)throw new RangeError("'offset' is out of bounds");if(e.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===i&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,i):new Uint8Array(e,i,r);K.TYPED_ARRAY_SUPPORT?(t=e).__proto__=K.prototype:t=Z(t,e);return t}(t,e,i,r):"string"==typeof e?function(t,e,i){"string"==typeof i&&""!==i||(i="utf8");if(!K.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|Q(e,i);t=H(t,r);var n=t.write(e,i);n!==r&&(t=t.slice(0,n));return t}(t,e,i):function(t,e){if(X(e)){var i=0|W(e.length);return 0===(t=H(t,i)).length||e.copy(t,0,0,i),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?H(t,0):Z(t,e);if("Buffer"===e.type&&j(e.data))return Z(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Y(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function V(t,e){if(Y(e),t=H(t,e<0?0:0|W(e)),!K.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function Z(t,e){var i=e.length<0?0:0|W(e.length);t=H(t,i);for(var r=0;r<i;r+=1)t[r]=255&e[r];return t}function W(t){if(t>=F())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+F().toString(16)+" bytes");return 0|t}function X(t){return!(null==t||!t._isBuffer)}function Q(t,e){if(X(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var i=t.length;if(0===i)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return Et(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return At(t).length;default:if(r)return Et(t).length;e=(""+e).toLowerCase(),r=!0}}function J(t,e,i){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return ct(this,e,i);case"utf8":case"utf-8":return ut(this,e,i);case"ascii":return lt(this,e,i);case"latin1":case"binary":return dt(this,e,i);case"base64":return at(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pt(this,e,i);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function $(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function tt(t,e,i,r,n){if(0===t.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(n)return-1;i=t.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof e&&(e=K.from(e,r)),X(e))return 0===e.length?-1:et(t,e,i,r,n);if("number"==typeof e)return e&=255,K.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):et(t,[e],i,r,n);throw new TypeError("val must be string, number or Buffer")}function et(t,e,i,r,n){var o,s=1,h=t.length,a=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,h/=2,a/=2,i/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var f=-1;for(o=i;o<h;o++)if(u(t,o)===u(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===a)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(i+a>h&&(i=h-a),o=i;o>=0;o--){for(var l=!0,d=0;d<a;d++)if(u(t,o+d)!==u(e,d)){l=!1;break}if(l)return o}return-1}function it(t,e,i,r){i=Number(i)||0;var n=t.length-i;r?(r=Number(r))>n&&(r=n):r=n;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var h=parseInt(e.substr(2*s,2),16);if(isNaN(h))return s;t[i+s]=h}return s}function rt(t,e,i,r){return kt(Et(e,t.length-i),t,i,r)}function nt(t,e,i,r){return kt(function(t){for(var e=[],i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(e),t,i,r)}function ot(t,e,i,r){return nt(t,e,i,r)}function st(t,e,i,r){return kt(At(e),t,i,r)}function ht(t,e,i,r){return kt(function(t,e){for(var i,r,n,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(i=t.charCodeAt(s))>>8,n=i%256,o.push(n),o.push(r);return o}(e,t.length-i),t,i,r)}function at(t,e,i){return 0===e&&i===t.length?D(t):D(t.slice(e,i))}function ut(t,e,i){i=Math.min(t.length,i);for(var r=[],n=e;n<i;){var o,s,h,a,u=t[n],f=null,l=u>239?4:u>223?3:u>191?2:1;if(n+l<=i)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[n+1]))&&(a=(31&u)<<6|63&o)>127&&(f=a);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&(a=(15&u)<<12|(63&o)<<6|63&s)>2047&&(a<55296||a>57343)&&(f=a);break;case 4:o=t[n+1],s=t[n+2],h=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&h)&&(a=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&h)>65535&&a<1114112&&(f=a)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),n+=l}return function(t){var e=t.length;if(e<=ft)return String.fromCharCode.apply(String,t);var i="",r=0;for(;r<e;)i+=String.fromCharCode.apply(String,t.slice(r,r+=ft));return i}(r)}K.poolSize=8192,K._augment=function(t){return t.__proto__=K.prototype,t},K.from=function(t,e,i){return G(null,t,e,i)},K.TYPED_ARRAY_SUPPORT&&(K.prototype.__proto__=Uint8Array.prototype,K.__proto__=Uint8Array),K.alloc=function(t,e,i){return function(t,e,i,r){return Y(e),e<=0?H(t,e):void 0!==i?"string"==typeof r?H(t,e).fill(i,r):H(t,e).fill(i):H(t,e)}(null,t,e,i)},K.allocUnsafe=function(t){return V(null,t)},K.allocUnsafeSlow=function(t){return V(null,t)},K.isBuffer=Rt,K.compare=function(t,e){if(!X(t)||!X(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var i=t.length,r=e.length,n=0,o=Math.min(i,r);n<o;++n)if(t[n]!==e[n]){i=t[n],r=e[n];break}return i<r?-1:r<i?1:0},K.isEncoding=function(t){switch(String(t).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}},K.concat=function(t,e){if(!j(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return K.alloc(0);var i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var r=K.allocUnsafe(e),n=0;for(i=0;i<t.length;++i){var o=t[i];if(!X(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,n),n+=o.length}return r},K.byteLength=Q,K.prototype._isBuffer=!0,K.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)$(this,e,e+1);return this},K.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)$(this,e,e+3),$(this,e+1,e+2);return this},K.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)$(this,e,e+7),$(this,e+1,e+6),$(this,e+2,e+5),$(this,e+3,e+4);return this},K.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?ut(this,0,t):J.apply(this,arguments)},K.prototype.equals=function(t){if(!X(t))throw new TypeError("Argument must be a Buffer");return this===t||0===K.compare(this,t)},K.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},K.prototype.compare=function(t,e,i,r,n){if(!X(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),e<0||i>t.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&e>=i)return 0;if(r>=n)return-1;if(e>=i)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(r>>>=0),s=(i>>>=0)-(e>>>=0),h=Math.min(o,s),a=this.slice(r,n),u=t.slice(e,i),f=0;f<h;++f)if(a[f]!==u[f]){o=a[f],s=u[f];break}return o<s?-1:s<o?1:0},K.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},K.prototype.indexOf=function(t,e,i){return tt(this,t,e,i,!0)},K.prototype.lastIndexOf=function(t,e,i){return tt(this,t,e,i,!1)},K.prototype.write=function(t,e,i,r){if(void 0===e)r="utf8",i=this.length,e=0;else if(void 0===i&&"string"==typeof e)r=e,i=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-e;if((void 0===i||i>n)&&(i=n),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return it(this,t,e,i);case"utf8":case"utf-8":return rt(this,t,e,i);case"ascii":return nt(this,t,e,i);case"latin1":case"binary":return ot(this,t,e,i);case"base64":return st(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ht(this,t,e,i);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},K.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ft=4096;function lt(t,e,i){var r="";i=Math.min(t.length,i);for(var n=e;n<i;++n)r+=String.fromCharCode(127&t[n]);return r}function dt(t,e,i){var r="";i=Math.min(t.length,i);for(var n=e;n<i;++n)r+=String.fromCharCode(t[n]);return r}function ct(t,e,i){var r=t.length;(!e||e<0)&&(e=0),(!i||i<0||i>r)&&(i=r);for(var n="",o=e;o<i;++o)n+=St(t[o]);return n}function pt(t,e,i){for(var r=t.slice(e,i),n="",o=0;o<r.length;o+=2)n+=String.fromCharCode(r[o]+256*r[o+1]);return n}function mt(t,e,i){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>i)throw new RangeError("Trying to access beyond buffer length")}function gt(t,e,i,r,n,o){if(!X(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<o)throw new RangeError('"value" argument is out of bounds');if(i+r>t.length)throw new RangeError("Index out of range")}function vt(t,e,i,r){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(t.length-i,2);n<o;++n)t[i+n]=(e&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function bt(t,e,i,r){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(t.length-i,4);n<o;++n)t[i+n]=e>>>8*(r?n:3-n)&255}function yt(t,e,i,r,n,o){if(i+r>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function wt(t,e,i,r,n){return n||yt(t,0,i,4),q(t,e,i,r,23,4),i+4}function Mt(t,e,i,r,n){return n||yt(t,0,i,8),q(t,e,i,r,52,8),i+8}K.prototype.slice=function(t,e){var i,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),K.TYPED_ARRAY_SUPPORT)(i=this.subarray(t,e)).__proto__=K.prototype;else{var n=e-t;i=new K(n,void 0);for(var o=0;o<n;++o)i[o]=this[o+t]}return i},K.prototype.readUIntLE=function(t,e,i){t|=0,e|=0,i||mt(t,e,this.length);for(var r=this[t],n=1,o=0;++o<e&&(n*=256);)r+=this[t+o]*n;return r},K.prototype.readUIntBE=function(t,e,i){t|=0,e|=0,i||mt(t,e,this.length);for(var r=this[t+--e],n=1;e>0&&(n*=256);)r+=this[t+--e]*n;return r},K.prototype.readUInt8=function(t,e){return e||mt(t,1,this.length),this[t]},K.prototype.readUInt16LE=function(t,e){return e||mt(t,2,this.length),this[t]|this[t+1]<<8},K.prototype.readUInt16BE=function(t,e){return e||mt(t,2,this.length),this[t]<<8|this[t+1]},K.prototype.readUInt32LE=function(t,e){return e||mt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},K.prototype.readUInt32BE=function(t,e){return e||mt(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},K.prototype.readIntLE=function(t,e,i){t|=0,e|=0,i||mt(t,e,this.length);for(var r=this[t],n=1,o=0;++o<e&&(n*=256);)r+=this[t+o]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*e)),r},K.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||mt(t,e,this.length);for(var r=e,n=1,o=this[t+--r];r>0&&(n*=256);)o+=this[t+--r]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},K.prototype.readInt8=function(t,e){return e||mt(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},K.prototype.readInt16LE=function(t,e){e||mt(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},K.prototype.readInt16BE=function(t,e){e||mt(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},K.prototype.readInt32LE=function(t,e){return e||mt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},K.prototype.readInt32BE=function(t,e){return e||mt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},K.prototype.readFloatLE=function(t,e){return e||mt(t,4,this.length),C(this,t,!0,23,4)},K.prototype.readFloatBE=function(t,e){return e||mt(t,4,this.length),C(this,t,!1,23,4)},K.prototype.readDoubleLE=function(t,e){return e||mt(t,8,this.length),C(this,t,!0,52,8)},K.prototype.readDoubleBE=function(t,e){return e||mt(t,8,this.length),C(this,t,!1,52,8)},K.prototype.writeUIntLE=function(t,e,i,r){(t=+t,e|=0,i|=0,r)||gt(this,t,e,i,Math.pow(2,8*i)-1,0);var n=1,o=0;for(this[e]=255&t;++o<i&&(n*=256);)this[e+o]=t/n&255;return e+i},K.prototype.writeUIntBE=function(t,e,i,r){(t=+t,e|=0,i|=0,r)||gt(this,t,e,i,Math.pow(2,8*i)-1,0);var n=i-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+i},K.prototype.writeUInt8=function(t,e,i){return t=+t,e|=0,i||gt(this,t,e,1,255,0),K.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},K.prototype.writeUInt16LE=function(t,e,i){return t=+t,e|=0,i||gt(this,t,e,2,65535,0),K.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):vt(this,t,e,!0),e+2},K.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||gt(this,t,e,2,65535,0),K.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):vt(this,t,e,!1),e+2},K.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||gt(this,t,e,4,4294967295,0),K.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):bt(this,t,e,!0),e+4},K.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||gt(this,t,e,4,4294967295,0),K.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):bt(this,t,e,!1),e+4},K.prototype.writeIntLE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);gt(this,t,e,i,n-1,-n)}var o=0,s=1,h=0;for(this[e]=255&t;++o<i&&(s*=256);)t<0&&0===h&&0!==this[e+o-1]&&(h=1),this[e+o]=(t/s>>0)-h&255;return e+i},K.prototype.writeIntBE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);gt(this,t,e,i,n-1,-n)}var o=i-1,s=1,h=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===h&&0!==this[e+o+1]&&(h=1),this[e+o]=(t/s>>0)-h&255;return e+i},K.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||gt(this,t,e,1,127,-128),K.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},K.prototype.writeInt16LE=function(t,e,i){return t=+t,e|=0,i||gt(this,t,e,2,32767,-32768),K.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):vt(this,t,e,!0),e+2},K.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||gt(this,t,e,2,32767,-32768),K.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):vt(this,t,e,!1),e+2},K.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||gt(this,t,e,4,2147483647,-2147483648),K.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):bt(this,t,e,!0),e+4},K.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||gt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),K.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):bt(this,t,e,!1),e+4},K.prototype.writeFloatLE=function(t,e,i){return wt(this,t,e,!0,i)},K.prototype.writeFloatBE=function(t,e,i){return wt(this,t,e,!1,i)},K.prototype.writeDoubleLE=function(t,e,i){return Mt(this,t,e,!0,i)},K.prototype.writeDoubleBE=function(t,e,i){return Mt(this,t,e,!1,i)},K.prototype.copy=function(t,e,i,r){if(i||(i=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-i&&(r=t.length-e+i);var n,o=r-i;if(this===t&&i<e&&e<r)for(n=o-1;n>=0;--n)t[n+e]=this[n+i];else if(o<1e3||!K.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)t[n+e]=this[n+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+o),e);return o},K.prototype.fill=function(t,e,i,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!K.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;var o;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(o=e;o<i;++o)this[o]=t;else{var s=X(t)?t:Et(new K(t,r).toString()),h=s.length;for(o=0;o<i-e;++o)this[o+e]=s[o%h]}return this};var _t=/[^+\/0-9A-Za-z-_]/g;function St(t){return t<16?"0"+t.toString(16):t.toString(16)}function Et(t,e){var i;e=e||1/0;for(var r=t.length,n=null,o=[],s=0;s<r;++s){if((i=t.charCodeAt(s))>55295&&i<57344){if(!n){if(i>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}n=i;continue}if(i<56320){(e-=3)>-1&&o.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,i<128){if((e-=1)<0)break;o.push(i)}else if(i<2048){if((e-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function At(t){return function(t){var e,i,r,n,o,s;N||x();var h=t.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[h-2]?2:"="===t[h-1]?1:0,s=new P(3*h/4-o),r=o>0?h-4:h;var a=0;for(e=0,i=0;e<r;e+=4,i+=3)n=B[t.charCodeAt(e)]<<18|B[t.charCodeAt(e+1)]<<12|B[t.charCodeAt(e+2)]<<6|B[t.charCodeAt(e+3)],s[a++]=n>>16&255,s[a++]=n>>8&255,s[a++]=255&n;return 2===o?(n=B[t.charCodeAt(e)]<<2|B[t.charCodeAt(e+1)]>>4,s[a++]=255&n):1===o&&(n=B[t.charCodeAt(e)]<<10|B[t.charCodeAt(e+1)]<<4|B[t.charCodeAt(e+2)]>>2,s[a++]=n>>8&255,s[a++]=255&n),s}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(_t,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function kt(t,e,i,r){for(var n=0;n<r&&!(n+i>=e.length||n>=t.length);++n)e[n+i]=t[n];return n}function Rt(t){return null!=t&&(!!t._isBuffer||It(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&It(t.slice(0,0))}(t))}function It(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var Ot=Object.freeze({__proto__:null,Buffer:K,INSPECT_MAX_BYTES:50,SlowBuffer:function(t){return+t!=t&&(t=0),K.alloc(+t)},isBuffer:Rt,kMaxLength:z}),Tt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Bt(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){if(this instanceof t){var i=[null];return i.push.apply(i,arguments),new(Function.bind.apply(e,i))}return e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})})),i}var Pt=131072,Nt=1048576,xt=4194304,Lt=2097152,Dt=269488175,Ct=2147485780,qt=262144,Ut=4194304,jt=2147483648,zt=131072,Ft=33554432,Ht=67108864,Kt=268435456,Gt=134217728,Yt=8388608,Vt="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA",Zt="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA",Wt={RTLD_LAZY:1,RTLD_NOW:2,RTLD_GLOBAL:8,RTLD_LOCAL:4,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,PRIORITY_LOW:19,PRIORITY_BELOW_NORMAL:10,PRIORITY_NORMAL:0,PRIORITY_ABOVE_NORMAL:-7,PRIORITY_HIGH:-14,PRIORITY_HIGHEST:-20,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGINFO:29,SIGSYS:12,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,O_RDONLY:0,O_WRONLY:1,O_RDWR:2,UV_DIRENT_UNKNOWN:0,UV_DIRENT_FILE:1,UV_DIRENT_DIR:2,UV_DIRENT_LINK:3,UV_DIRENT_FIFO:4,UV_DIRENT_SOCKET:5,UV_DIRENT_CHAR:6,UV_DIRENT_BLOCK:7,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:Pt,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:Nt,O_NOFOLLOW:256,O_SYNC:128,O_DSYNC:xt,O_SYMLINK:Lt,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_COPYFILE_EXCL:1,COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,COPYFILE_FICLONE_FORCE:4,OPENSSL_VERSION_NUMBER:Dt,SSL_OP_ALL:Ct,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:qt,SSL_OP_CIPHER_SERVER_PREFERENCE:Ut,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:jt,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:0,SSL_OP_MICROSOFT_SESS_ID_BUG:0,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:0,SSL_OP_NETSCAPE_CHALLENGE_BUG:0,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:0,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:0,SSL_OP_NO_COMPRESSION:zt,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:0,SSL_OP_NO_SSLv3:Ft,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:Ht,SSL_OP_NO_TLSv1_1:Kt,SSL_OP_NO_TLSv1_2:Gt,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:0,SSL_OP_SINGLE_ECDH_USE:0,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:0,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:0,SSL_OP_TLS_D5_BUG:0,SSL_OP_TLS_ROLLBACK_BUG:Yt,ENGINE_METHOD_RSA:1,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_EC:2048,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,RSA_PSS_SALTLEN_DIGEST:-1,RSA_PSS_SALTLEN_MAX_SIGN:-2,RSA_PSS_SALTLEN_AUTO:-2,defaultCoreCipherList:Vt,TLS1_VERSION:769,TLS1_1_VERSION:770,TLS1_2_VERSION:771,TLS1_3_VERSION:772,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,defaultCipherList:Zt},Xt=Bt(Object.freeze({__proto__:null,ALPN_ENABLED:1,COPYFILE_EXCL:1,COPYFILE_FICLONE:2,COPYFILE_FICLONE_FORCE:4,DH_CHECK_P_NOT_PRIME:1,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_NOT_SUITABLE_GENERATOR:8,DH_UNABLE_TO_CHECK_GENERATOR:4,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DH:4,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_DSA:2,ENGINE_METHOD_EC:2048,ENGINE_METHOD_NONE:0,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_RAND:8,ENGINE_METHOD_RSA:1,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,F_OK:0,OPENSSL_VERSION_NUMBER:Dt,O_APPEND:8,O_CREAT:512,O_DIRECTORY:Nt,O_DSYNC:xt,O_EXCL:2048,O_NOCTTY:Pt,O_NOFOLLOW:256,O_NONBLOCK:4,O_RDONLY:0,O_RDWR:2,O_SYMLINK:Lt,O_SYNC:128,O_TRUNC:1024,O_WRONLY:1,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_HYBRID:6,POINT_CONVERSION_UNCOMPRESSED:4,PRIORITY_ABOVE_NORMAL:-7,PRIORITY_BELOW_NORMAL:10,PRIORITY_HIGH:-14,PRIORITY_HIGHEST:-20,PRIORITY_LOW:19,PRIORITY_NORMAL:0,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_PKCS1_PADDING:1,RSA_PKCS1_PSS_PADDING:6,RSA_PSS_SALTLEN_AUTO:-2,RSA_PSS_SALTLEN_DIGEST:-1,RSA_PSS_SALTLEN_MAX_SIGN:-2,RSA_SSLV23_PADDING:2,RSA_X931_PADDING:5,RTLD_GLOBAL:8,RTLD_LAZY:1,RTLD_LOCAL:4,RTLD_NOW:2,R_OK:4,SIGABRT:6,SIGALRM:14,SIGBUS:10,SIGCHLD:20,SIGCONT:19,SIGFPE:8,SIGHUP:1,SIGILL:4,SIGINFO:29,SIGINT:2,SIGIO:23,SIGIOT:6,SIGKILL:9,SIGPIPE:13,SIGPROF:27,SIGQUIT:3,SIGSEGV:11,SIGSTOP:17,SIGSYS:12,SIGTERM:15,SIGTRAP:5,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGUSR1:30,SIGUSR2:31,SIGVTALRM:26,SIGWINCH:28,SIGXCPU:24,SIGXFSZ:25,SSL_OP_ALL:Ct,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:qt,SSL_OP_CIPHER_SERVER_PREFERENCE:Ut,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:jt,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:0,SSL_OP_MICROSOFT_SESS_ID_BUG:0,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:0,SSL_OP_NETSCAPE_CHALLENGE_BUG:0,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:0,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:0,SSL_OP_NO_COMPRESSION:zt,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:0,SSL_OP_NO_SSLv3:Ft,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:Ht,SSL_OP_NO_TLSv1_1:Kt,SSL_OP_NO_TLSv1_2:Gt,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:0,SSL_OP_SINGLE_ECDH_USE:0,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:0,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:0,SSL_OP_TLS_D5_BUG:0,SSL_OP_TLS_ROLLBACK_BUG:Yt,S_IFBLK:24576,S_IFCHR:8192,S_IFDIR:16384,S_IFIFO:4096,S_IFLNK:40960,S_IFMT:61440,S_IFREG:32768,S_IFSOCK:49152,S_IRGRP:32,S_IROTH:4,S_IRUSR:256,S_IRWXG:56,S_IRWXO:7,S_IRWXU:448,S_IWGRP:16,S_IWOTH:2,S_IWUSR:128,S_IXGRP:8,S_IXOTH:1,S_IXUSR:64,TLS1_1_VERSION:770,TLS1_2_VERSION:771,TLS1_3_VERSION:772,TLS1_VERSION:769,UV_DIRENT_BLOCK:7,UV_DIRENT_CHAR:6,UV_DIRENT_DIR:2,UV_DIRENT_FIFO:4,UV_DIRENT_FILE:1,UV_DIRENT_LINK:3,UV_DIRENT_SOCKET:5,UV_DIRENT_UNKNOWN:0,UV_FS_COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,W_OK:2,X_OK:1,default:Wt,defaultCipherList:Zt,defaultCoreCipherList:Vt})),Qt={};function Jt(){throw new Error("setTimeout has not been defined")}function $t(){throw new Error("clearTimeout has not been defined")}var te=Jt,ee=$t;function ie(t){if(te===setTimeout)return setTimeout(t,0);if((te===Jt||!te)&&setTimeout)return te=setTimeout,setTimeout(t,0);try{return te(t,0)}catch(e){try{return te.call(null,t,0)}catch(e){return te.call(this,t,0)}}}"function"==typeof O.setTimeout&&(te=setTimeout),"function"==typeof O.clearTimeout&&(ee=clearTimeout);var re,ne=[],oe=!1,se=-1;function he(){oe&&re&&(oe=!1,re.length?ne=re.concat(ne):se=-1,ne.length&&ae())}function ae(){if(!oe){var t=ie(he);oe=!0;for(var e=ne.length;e;){for(re=ne,ne=[];++se<e;)re&&re[se].run();se=-1,e=ne.length}re=null,oe=!1,function(t){if(ee===clearTimeout)return clearTimeout(t);if((ee===$t||!ee)&&clearTimeout)return ee=clearTimeout,clearTimeout(t);try{return ee(t)}catch(e){try{return ee.call(null,t)}catch(e){return ee.call(this,t)}}}(t)}}function ue(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];ne.push(new fe(t,e)),1!==ne.length||oe||ie(ae)}function fe(t,e){this.fun=t,this.array=e}fe.prototype.run=function(){this.fun.apply(null,this.array)};function le(){}var de=le,ce=le,pe=le,me=le,ge=le,ve=le,be=le;var ye=O.performance||{},we=ye.now||ye.mozNow||ye.msNow||ye.oNow||ye.webkitNow||function(){return(new Date).getTime()};var Me=new Date;var _e={nextTick:ue,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:de,addListener:ce,once:pe,off:me,removeListener:ge,removeAllListeners:ve,emit:be,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*we.call(ye),i=Math.floor(e),r=Math.floor(e%1*1e9);return t&&(i-=t[0],(r-=t[1])<0&&(i--,r+=1e9)),[i,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Me)/1e3}},Se={},Ee={},Ae={},ke={get exports(){return Ae},set exports(t){Ae=t}},Re={},Ie={get exports(){return Re},set exports(t){Re=t}},Oe=Bt(Ot);
2
2
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
3
- !function(t,e){var i=Oe,r=i.Buffer;function n(t,e){for(var i in t)e[i]=t[i]}function o(t,e,i){return r(t,e,i)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=i:(n(i,e),e.Buffer=o),o.prototype=Object.create(r.prototype),n(r,o),o.from=function(t,e,i){if("number"==typeof t)throw new TypeError("Argument must not be a number");return r(t,e,i)},o.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=r(t);return void 0!==e?"string"==typeof i?n.fill(e,i):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}}(Ie,Re);var Te=65536,Be=4294967295;var Pe=Re.Buffer,Ne=Tt.crypto||Tt.msCrypto;Ne&&Ne.getRandomValues?ke.exports=function(t,e){if(t>Be)throw new RangeError("requested too many random bytes");var i=Pe.allocUnsafe(t);if(t>0)if(t>Te)for(var r=0;r<t;r+=Te)Ne.getRandomValues(i.slice(r,r+Te));else Ne.getRandomValues(i);if("function"==typeof e)return _e.nextTick((function(){e(null,i)}));return i}:ke.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")};var xe={},Le={get exports(){return xe},set exports(t){xe=t}};"function"==typeof Object.create?Le.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Le.exports=function(t,e){if(e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}};var De={},Ce={get exports(){return De},set exports(t){De=t}};function qe(){}function Ue(){Ue.init.call(this)}function je(t){return void 0===t._maxListeners?Ue.defaultMaxListeners:t._maxListeners}function ze(t,e,i,r){var n,o,s,h;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((o=t._events)?(o.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),o=t._events),s=o[e]):(o=t._events=new qe,t._eventsCount=0),s){if("function"==typeof s?s=o[e]=r?[i,s]:[s,i]:r?s.unshift(i):s.push(i),!s.warned&&(n=je(t))&&n>0&&s.length>n){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,h=a,"function"==typeof console.warn?console.warn(h):console.log(h)}}else s=o[e]=i,++t._eventsCount;return t}function Fe(t,e,i){var r=!1;function n(){t.removeListener(e,n),r||(r=!0,i.apply(t,arguments))}return n.listener=i,n}function He(t){var e=this._events;if(e){var i=e[t];if("function"==typeof i)return 1;if(i)return i.length}return 0}function Ke(t,e){for(var i=new Array(e);e--;)i[e]=t[e];return i}qe.prototype=Object.create(null),Ue.EventEmitter=Ue,Ue.usingDomains=!1,Ue.prototype.domain=void 0,Ue.prototype._events=void 0,Ue.prototype._maxListeners=void 0,Ue.defaultMaxListeners=10,Ue.init=function(){this.domain=null,Ue.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new qe,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ue.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},Ue.prototype.getMaxListeners=function(){return je(this)},Ue.prototype.emit=function(t){var e,i,r,n,o,s,h,a="error"===t;if(s=this._events)a=a&&null==s.error;else if(!a)return!1;if(h=this.domain,a){if(e=arguments[1],!h){if(e instanceof Error)throw e;var u=new Error('Uncaught, unspecified "error" event. ('+e+")");throw u.context=e,u}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=h,e.domainThrown=!1,h.emit("error",e),!1}if(!(i=s[t]))return!1;var f="function"==typeof i;switch(r=arguments.length){case 1:!function(t,e,i){if(e)t.call(i);else for(var r=t.length,n=Ke(t,r),o=0;o<r;++o)n[o].call(i)}(i,f,this);break;case 2:!function(t,e,i,r){if(e)t.call(i,r);else for(var n=t.length,o=Ke(t,n),s=0;s<n;++s)o[s].call(i,r)}(i,f,this,arguments[1]);break;case 3:!function(t,e,i,r,n){if(e)t.call(i,r,n);else for(var o=t.length,s=Ke(t,o),h=0;h<o;++h)s[h].call(i,r,n)}(i,f,this,arguments[1],arguments[2]);break;case 4:!function(t,e,i,r,n,o){if(e)t.call(i,r,n,o);else for(var s=t.length,h=Ke(t,s),a=0;a<s;++a)h[a].call(i,r,n,o)}(i,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),o=1;o<r;o++)n[o-1]=arguments[o];!function(t,e,i,r){if(e)t.apply(i,r);else for(var n=t.length,o=Ke(t,n),s=0;s<n;++s)o[s].apply(i,r)}(i,f,this,n)}return!0},Ue.prototype.addListener=function(t,e){return ze(this,t,e,!1)},Ue.prototype.on=Ue.prototype.addListener,Ue.prototype.prependListener=function(t,e){return ze(this,t,e,!0)},Ue.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Fe(this,t,e)),this},Ue.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Fe(this,t,e)),this},Ue.prototype.removeListener=function(t,e){var i,r,n,o,s;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(i=r[t]))return this;if(i===e||i.listener&&i.listener===e)0==--this._eventsCount?this._events=new qe:(delete r[t],r.removeListener&&this.emit("removeListener",t,i.listener||e));else if("function"!=typeof i){for(n=-1,o=i.length;o-- >0;)if(i[o]===e||i[o].listener&&i[o].listener===e){s=i[o].listener,n=o;break}if(n<0)return this;if(1===i.length){if(i[0]=void 0,0==--this._eventsCount)return this._events=new qe,this;delete r[t]}else!function(t,e){for(var i=e,r=i+1,n=t.length;r<n;i+=1,r+=1)t[i]=t[r];t.pop()}(i,n);r.removeListener&&this.emit("removeListener",t,s||e)}return this},Ue.prototype.removeAllListeners=function(t){var e,i;if(!(i=this._events))return this;if(!i.removeListener)return 0===arguments.length?(this._events=new qe,this._eventsCount=0):i[t]&&(0==--this._eventsCount?this._events=new qe:delete i[t]),this;if(0===arguments.length){for(var r,n=Object.keys(i),o=0;o<n.length;++o)"removeListener"!==(r=n[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new qe,this._eventsCount=0,this}if("function"==typeof(e=i[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},Ue.prototype.listeners=function(t){var e,i=this._events;return i&&(e=i[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),i=0;i<e.length;++i)e[i]=t[i].listener||t[i];return e}(e):[]},Ue.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):He.call(t,e)},Ue.prototype.listenerCount=He,Ue.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Ge=Bt(Object.freeze({__proto__:null,EventEmitter:Ue,default:Ue})),Ye=Ge.EventEmitter,Ve="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t},Ze=/%[sdj%]/g;function We(t){if(!li(t)){for(var e=[],i=0;i<arguments.length;i++)e.push(ti(arguments[i]));return e.join(" ")}i=1;for(var r=arguments,n=r.length,o=String(t).replace(Ze,(function(t){if("%%"===t)return"%";if(i>=n)return t;switch(t){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch(t){return"[Circular]"}default:return t}})),s=r[i];i<n;s=r[++i])ai(s)||!mi(s)?o+=" "+s:o+=" "+ti(s);return o}function Xe(t,e){if(ci(O.process))return function(){return Xe(t,e).apply(this,arguments)};if(!0===_e.noDeprecation)return t;var i=!1;return function(){if(!i){if(_e.throwDeprecation)throw new Error(e);_e.traceDeprecation?console.trace(e):console.error(e),i=!0}return t.apply(this,arguments)}}var Qe,Je={};function $e(t){if(ci(Qe)&&(Qe=_e.env.NODE_DEBUG||""),t=t.toUpperCase(),!Je[t])if(new RegExp("\\b"+t+"\\b","i").test(Qe)){Je[t]=function(){var e=We.apply(null,arguments);console.error("%s %d: %s",t,0,e)}}else Je[t]=function(){};return Je[t]}function ti(t,e){var i={seen:[],stylize:ii};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),hi(e)?i.showHidden=e:e&&Ai(i,e),ci(i.showHidden)&&(i.showHidden=!1),ci(i.depth)&&(i.depth=2),ci(i.colors)&&(i.colors=!1),ci(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=ei),ri(i,t,i.depth)}function ei(t,e){var i=ti.styles[e];return i?"["+ti.colors[i][0]+"m"+t+"["+ti.colors[i][1]+"m":t}function ii(t,e){return t}function ri(t,e,i){if(t.customInspect&&e&&bi(e.inspect)&&e.inspect!==ti&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(i,t);return li(r)||(r=ri(t,r,i)),r}var n=function(t,e){if(ci(e))return t.stylize("undefined","undefined");if(li(e)){var i="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(i,"string")}if(fi(e))return t.stylize(""+e,"number");if(hi(e))return t.stylize(""+e,"boolean");if(ai(e))return t.stylize("null","null")}(t,e);if(n)return n;var o=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,i){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),vi(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return ni(e);if(0===o.length){if(bi(e)){var h=e.name?": "+e.name:"";return t.stylize("[Function"+h+"]","special")}if(pi(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(gi(e))return t.stylize(Date.prototype.toString.call(e),"date");if(vi(e))return ni(e)}var a,u="",f=!1,l=["{","}"];(si(e)&&(f=!0,l=["[","]"]),bi(e))&&(u=" [Function"+(e.name?": "+e.name:"")+"]");return pi(e)&&(u=" "+RegExp.prototype.toString.call(e)),gi(e)&&(u=" "+Date.prototype.toUTCString.call(e)),vi(e)&&(u=" "+ni(e)),0!==o.length||f&&0!=e.length?i<0?pi(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),a=f?function(t,e,i,r,n){for(var o=[],s=0,h=e.length;s<h;++s)ki(e,String(s))?o.push(oi(t,e,i,r,String(s),!0)):o.push("");return n.forEach((function(n){n.match(/^\d+$/)||o.push(oi(t,e,i,r,n,!0))})),o}(t,e,i,s,o):o.map((function(r){return oi(t,e,i,s,r,f)})),t.seen.pop(),function(t,e,i){var r=t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return i[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+i[1];return i[0]+e+" "+t.join(", ")+" "+i[1]}(a,u,l)):l[0]+u+l[1]}function ni(t){return"["+Error.prototype.toString.call(t)+"]"}function oi(t,e,i,r,n,o){var s,h,a;if((a=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?h=a.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):a.set&&(h=t.stylize("[Setter]","special")),ki(r,n)||(s="["+n+"]"),h||(t.seen.indexOf(a.value)<0?(h=ai(i)?ri(t,a.value,null):ri(t,a.value,i-1)).indexOf("\n")>-1&&(h=o?h.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+h.split("\n").map((function(t){return" "+t})).join("\n")):h=t.stylize("[Circular]","special")),ci(s)){if(o&&n.match(/^\d+$/))return h;(s=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+h}function si(t){return Array.isArray(t)}function hi(t){return"boolean"==typeof t}function ai(t){return null===t}function ui(t){return null==t}function fi(t){return"number"==typeof t}function li(t){return"string"==typeof t}function di(t){return"symbol"==typeof t}function ci(t){return void 0===t}function pi(t){return mi(t)&&"[object RegExp]"===Mi(t)}function mi(t){return"object"==typeof t&&null!==t}function gi(t){return mi(t)&&"[object Date]"===Mi(t)}function vi(t){return mi(t)&&("[object Error]"===Mi(t)||t instanceof Error)}function bi(t){return"function"==typeof t}function yi(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function wi(t){return K.isBuffer(t)}function Mi(t){return Object.prototype.toString.call(t)}function _i(t){return t<10?"0"+t.toString(10):t.toString(10)}ti.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ti.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Si=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ei(){var t,e;console.log("%s - %s",(t=new Date,e=[_i(t.getHours()),_i(t.getMinutes()),_i(t.getSeconds())].join(":"),[t.getDate(),Si[t.getMonth()],e].join(" ")),We.apply(null,arguments))}function Ai(t,e){if(!e||!mi(e))return t;for(var i=Object.keys(e),r=i.length;r--;)t[i[r]]=e[i[r]];return t}function ki(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Ri,Ii,Oi={inherits:Ve,_extend:Ai,log:Ei,isBuffer:wi,isPrimitive:yi,isFunction:bi,isError:vi,isDate:gi,isObject:mi,isRegExp:pi,isUndefined:ci,isSymbol:di,isString:li,isNumber:fi,isNullOrUndefined:ui,isNull:ai,isBoolean:hi,isArray:si,inspect:ti,deprecate:Xe,format:We,debuglog:$e},Ti=Bt(Object.freeze({__proto__:null,_extend:Ai,debuglog:$e,default:Oi,deprecate:Xe,format:We,inherits:Ve,inspect:ti,isArray:si,isBoolean:hi,isBuffer:wi,isDate:gi,isError:vi,isFunction:bi,isNull:ai,isNullOrUndefined:ui,isNumber:fi,isObject:mi,isPrimitive:yi,isRegExp:pi,isString:li,isSymbol:di,isUndefined:ci,log:Ei}));function Bi(){if(Ii)return Ri;function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,n(r.key),r)}}function n(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}Ii=1;var o=Oe.Buffer,s=Ti.inspect,h=s&&s.custom||"inspect";return Ri=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var i,n,a;return i=t,n=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,i,r,n=o.allocUnsafe(t>>>0),s=this.head,h=0;s;)e=s.data,i=n,r=h,o.prototype.copy.call(e,i,r),h+=s.data.length,s=s.next;return n}},{key:"consume",value:function(t,e){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):i=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,i=1,r=e.data;for(t-=r.length;e=e.next;){var n=e.data,o=t>n.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),0==(t-=o)){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),i=this.head,r=1;for(i.data.copy(e),t-=i.data.length;i=i.next;){var n=i.data,s=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,s),0==(t-=s)){s===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(s));break}++r}return this.length-=r,e}},{key:h,value:function(t,i){return s(this,e(e({},i),{},{depth:0,customInspect:!1}))}}],n&&r(i.prototype,n),a&&r(i,a),Object.defineProperty(i,"prototype",{writable:!1}),t}(),Ri}function Pi(t,e){xi(t,e),Ni(t)}function Ni(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function xi(t,e){t.emit("error",e)}var Li={destroy:function(t,e){var i=this,r=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return r||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,_e.nextTick(xi,this,t)):_e.nextTick(xi,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?i._writableState?i._writableState.errorEmitted?_e.nextTick(Ni,i):(i._writableState.errorEmitted=!0,_e.nextTick(Pi,i,t)):_e.nextTick(Pi,i,t):e?(_e.nextTick(Ni,i),e(t)):_e.nextTick(Ni,i)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var i=t._readableState,r=t._writableState;i&&i.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}},Di={};var Ci={};function qi(t,e,i){i||(i=Error);var r=function(t){var i,r;function n(i,r,n){return t.call(this,function(t,i,r){return"string"==typeof e?e:e(t,i,r)}(i,r,n))||this}return r=t,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r,n}(i);r.prototype.name=i.name,r.prototype.code=t,Ci[t]=r}function Ui(t,e){if(Array.isArray(t)){var i=t.length;return t=t.map((function(t){return String(t)})),i>2?"one of ".concat(e," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}qi("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),qi("ERR_INVALID_ARG_TYPE",(function(t,e,i){var r,n,o,s;if("string"==typeof e&&(n="not ",e.substr(!o||o<0?0:+o,n.length)===n)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-e.length,i)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(Ui(e,"type"));else{var h=function(t,e,i){return"number"!=typeof i&&(i=0),!(i+e.length>t.length)&&-1!==t.indexOf(e,i)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(h," ").concat(r," ").concat(Ui(e,"type"))}return s+=". Received type ".concat(typeof i)}),TypeError),qi("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),qi("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),qi("ERR_STREAM_PREMATURE_CLOSE","Premature close"),qi("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),qi("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),qi("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),qi("ERR_STREAM_WRITE_AFTER_END","write after end"),qi("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),qi("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),qi("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Di.codes=Ci;var ji=Di.codes.ERR_INVALID_OPT_VALUE;var zi,Fi,Hi,Ki,Gi={getHighWaterMark:function(t,e,i,r){var n=function(t,e,i){return null!=t.highWaterMark?t.highWaterMark:e?t[i]:null}(e,r,i);if(null!=n){if(!isFinite(n)||Math.floor(n)!==n||n<0)throw new ji(r?i:"highWaterMark",n);return Math.floor(n)}return t.objectMode?16:16384}},Yi=function(t,e){if(Vi("noDeprecation"))return t;var i=!1;return function(){if(!i){if(Vi("throwDeprecation"))throw new Error(e);Vi("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}};function Vi(t){try{if(!Tt.localStorage)return!1}catch(t){return!1}var e=Tt.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}function Zi(){if(Fi)return zi;function t(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,i){var r=t.entry;t.entry=null;for(;r;){var n=r.callback;e.pendingcb--,n(i),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var e;Fi=1,zi=M,M.WritableState=w;var i={deprecate:Yi},r=Ye,n=Oe.Buffer,o=(void 0!==Tt?Tt:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,h=Li,a=Gi.getHighWaterMark,u=Di.codes,f=u.ERR_INVALID_ARG_TYPE,l=u.ERR_METHOD_NOT_IMPLEMENTED,d=u.ERR_MULTIPLE_CALLBACK,c=u.ERR_STREAM_CANNOT_PIPE,p=u.ERR_STREAM_DESTROYED,m=u.ERR_STREAM_NULL_VALUES,g=u.ERR_STREAM_WRITE_AFTER_END,v=u.ERR_UNKNOWN_ENCODING,b=h.errorOrDestroy;function y(){}function w(i,r,n){e=e||Wi(),i=i||{},"boolean"!=typeof n&&(n=r instanceof e),this.objectMode=!!i.objectMode,n&&(this.objectMode=this.objectMode||!!i.writableObjectMode),this.highWaterMark=a(this,i,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===i.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,r=i.sync,n=i.writecb;if("function"!=typeof n)throw new d;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,r,n){--e.pendingcb,i?(_e.nextTick(n,r),_e.nextTick(R,t,e),t._writableState.errorEmitted=!0,b(t,r)):(n(r),t._writableState.errorEmitted=!0,b(t,r),R(t,e))}(t,i,r,e,n);else{var o=A(i)||t.destroyed;o||i.corked||i.bufferProcessing||!i.bufferedRequest||E(t,i),r?_e.nextTick(S,t,i,o,n):S(t,i,o,n)}}(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==i.emitClose,this.autoDestroy=!!i.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function M(t){var i=this instanceof(e=e||Wi());if(!i&&!s.call(M,this))return new M(t);this._writableState=new w(t,this,i),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),r.call(this)}function _(t,e,i,r,n,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new p("write")):i?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function S(t,e,i,r){i||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),R(t,e)}function E(e,i){i.bufferProcessing=!0;var r=i.bufferedRequest;if(e._writev&&r&&r.next){var n=i.bufferedRequestCount,o=new Array(n),s=i.corkedRequestsFree;s.entry=r;for(var h=0,a=!0;r;)o[h]=r,r.isBuf||(a=!1),r=r.next,h+=1;o.allBuffers=a,_(e,i,!0,i.length,o,"",s.finish),i.pendingcb++,i.lastBufferedRequest=null,s.next?(i.corkedRequestsFree=s.next,s.next=null):i.corkedRequestsFree=new t(i),i.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(_(e,i,!1,i.objectMode?1:u.length,u,f,l),r=r.next,i.bufferedRequestCount--,i.writing)break}null===r&&(i.lastBufferedRequest=null)}i.bufferedRequest=r,i.bufferProcessing=!1}function A(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final((function(i){e.pendingcb--,i&&b(t,i),e.prefinished=!0,t.emit("prefinish"),R(t,e)}))}function R(t,e){var i=A(e);if(i&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,_e.nextTick(k,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var r=t._readableState;(!r||r.autoDestroy&&r.endEmitted)&&t.destroy()}return i}return xe(M,r),w.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(w.prototype,"buffer",{get:i.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===M&&(t&&t._writableState instanceof w)}})):s=function(t){return t instanceof this},M.prototype.pipe=function(){b(this,new c)},M.prototype.write=function(t,e,i){var r,s=this._writableState,h=!1,a=!s.objectMode&&(r=t,n.isBuffer(r)||r instanceof o);return a&&!n.isBuffer(t)&&(t=function(t){return n.from(t)}(t)),"function"==typeof e&&(i=e,e=null),a?e="buffer":e||(e=s.defaultEncoding),"function"!=typeof i&&(i=y),s.ending?function(t,e){var i=new g;b(t,i),_e.nextTick(e,i)}(this,i):(a||function(t,e,i,r){var n;return null===i?n=new m:"string"==typeof i||e.objectMode||(n=new f("chunk",["string","Buffer"],i)),!n||(b(t,n),_e.nextTick(r,n),!1)}(this,s,t,i))&&(s.pendingcb++,h=function(t,e,i,r,o,s){if(!i){var h=function(t,e,i){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=n.from(e,i));return e}(e,r,o);r!==h&&(i=!0,o="buffer",r=h)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:o,isBuf:i,callback:s,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else _(t,e,!1,a,r,o,s);return u}(this,s,a,t,e,i)),h},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||E(this,t))},M.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(t,e,i){i(new l("_write()"))},M.prototype._writev=null,M.prototype.end=function(t,e,i){var r=this._writableState;return"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,i){e.ending=!0,R(t,e),i&&(e.finished?_e.nextTick(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,r,i),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),M.prototype.destroy=h.destroy,M.prototype._undestroy=h.undestroy,M.prototype._destroy=function(t,e){e(t)},zi}function Wi(){if(Ki)return Hi;Ki=1;var t=Object.keys||function(t){var e=[];for(var i in t)e.push(i);return e};Hi=s;var e=ur(),i=Zi();xe(s,e);for(var r=t(i.prototype),n=0;n<r.length;n++){var o=r[n];s.prototype[o]||(s.prototype[o]=i.prototype[o])}function s(t){if(!(this instanceof s))return new s(t);e.call(this,t),i.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||_e.nextTick(a,this)}function a(t){t.end()}return Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),Hi}var Xi,Qi={};function Ji(){if(Xi)return Qi;Xi=1;var t=Re.Buffer,e=t.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(i){var r;switch(this.encoding=function(i){var r=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(i);if("string"!=typeof r&&(t.isEncoding===e||!e(i)))throw new Error("Unknown encoding: "+i);return r||i}(i),this.encoding){case"utf16le":this.text=o,this.end=s,r=4;break;case"utf8":this.fillLast=n,r=4;break;case"base64":this.text=h,this.end=a,r=3;break;default:return this.write=u,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(r)}function r(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function n(t){var e=this.lastTotal-this.lastNeed,i=function(t,e,i){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==i?i:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function o(t,e){if((t.length-e)%2==0){var i=t.toString("utf16le",e);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function s(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,i)}return e}function h(t,e){var i=(t.length-e)%3;return 0===i?t.toString("base64",e):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-i))}function a(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}return Qi.StringDecoder=i,i.prototype.write=function(t){if(0===t.length)return"";var e,i;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<t.length?e?e+this.text(t,i):this.text(t,i):e||""},i.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},i.prototype.text=function(t,e){var i=function(t,e,i){var n=e.length-1;if(n<i)return 0;var o=r(e[n]);if(o>=0)return o>0&&(t.lastNeed=o-1),o;if(--n<i||-2===o)return 0;if(o=r(e[n]),o>=0)return o>0&&(t.lastNeed=o-2),o;if(--n<i||-2===o)return 0;if(o=r(e[n]),o>=0)return o>0&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=i;var n=t.length-(i-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},i.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},Qi}var $i=Di.codes.ERR_STREAM_PREMATURE_CLOSE;function tr(){}var er,ir,rr,nr,or,sr,hr=function t(e,i,r){if("function"==typeof i)return t(e,null,i);i||(i={}),r=function(t){var e=!1;return function(){if(!e){e=!0;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];t.apply(this,r)}}}(r||tr);var n=i.readable||!1!==i.readable&&e.readable,o=i.writable||!1!==i.writable&&e.writable,s=function(){e.writable||a()},h=e._writableState&&e._writableState.finished,a=function(){o=!1,h=!0,n||r.call(e)},u=e._readableState&&e._readableState.endEmitted,f=function(){n=!1,u=!0,o||r.call(e)},l=function(t){r.call(e,t)},d=function(){var t;return n&&!u?(e._readableState&&e._readableState.ended||(t=new $i),r.call(e,t)):o&&!h?(e._writableState&&e._writableState.ended||(t=new $i),r.call(e,t)):void 0},c=function(){e.req.on("finish",a)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?o&&!e._writableState&&(e.on("end",s),e.on("close",s)):(e.on("complete",a),e.on("abort",d),e.req?c():e.on("request",c)),e.on("end",f),e.on("finish",a),!1!==i.error&&e.on("error",l),e.on("close",d),function(){e.removeListener("complete",a),e.removeListener("abort",d),e.removeListener("request",c),e.req&&e.req.removeListener("finish",a),e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",a),e.removeListener("end",f),e.removeListener("error",l),e.removeListener("close",d)}};function ar(){if(ir)return er;var t;function e(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}ir=1;var i=hr,r=Symbol("lastResolve"),n=Symbol("lastReject"),o=Symbol("error"),s=Symbol("ended"),h=Symbol("lastPromise"),a=Symbol("handlePromise"),u=Symbol("stream");function f(t,e){return{value:t,done:e}}function l(t){var e=t[r];if(null!==e){var i=t[u].read();null!==i&&(t[h]=null,t[r]=null,t[n]=null,e(f(i,!1)))}}function d(t){_e.nextTick(l,t)}var c=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((e(t={get stream(){return this[u]},next:function(){var t=this,e=this[o];if(null!==e)return Promise.reject(e);if(this[s])return Promise.resolve(f(void 0,!0));if(this[u].destroyed)return new Promise((function(e,i){_e.nextTick((function(){t[o]?i(t[o]):e(f(void 0,!0))}))}));var i,r=this[h];if(r)i=new Promise(function(t,e){return function(i,r){t.then((function(){e[s]?i(f(void 0,!0)):e[a](i,r)}),r)}}(r,this));else{var n=this[u].read();if(null!==n)return Promise.resolve(f(n,!1));i=new Promise(this[a])}return this[h]=i,i}},Symbol.asyncIterator,(function(){return this})),e(t,"return",(function(){var t=this;return new Promise((function(e,i){t[u].destroy(null,(function(t){t?i(t):e(f(void 0,!0))}))}))})),t),c);return er=function(t){var l,c=Object.create(p,(e(l={},u,{value:t,writable:!0}),e(l,r,{value:null,writable:!0}),e(l,n,{value:null,writable:!0}),e(l,o,{value:null,writable:!0}),e(l,s,{value:t._readableState.endEmitted,writable:!0}),e(l,a,{value:function(t,e){var i=c[u].read();i?(c[h]=null,c[r]=null,c[n]=null,t(f(i,!1))):(c[r]=t,c[n]=e)},writable:!0}),l));return c[h]=null,i(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=c[n];return null!==e&&(c[h]=null,c[r]=null,c[n]=null,e(t)),void(c[o]=t)}var i=c[r];null!==i&&(c[h]=null,c[r]=null,c[n]=null,i(f(void 0,!0))),c[s]=!0})),t.on("readable",d.bind(null,c)),c},er}function ur(){if(sr)return or;var t;sr=1,or=M,M.ReadableState=w,Ge.EventEmitter;var e=function(t,e){return t.listeners(e).length},i=Ye,r=Oe.Buffer,n=(void 0!==Tt?Tt:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var o,s=Ti;o=s&&s.debuglog?s.debuglog("stream"):function(){};var h,a,u,f=Bi(),l=Li,d=Gi.getHighWaterMark,c=Di.codes,p=c.ERR_INVALID_ARG_TYPE,m=c.ERR_STREAM_PUSH_AFTER_EOF,g=c.ERR_METHOD_NOT_IMPLEMENTED,v=c.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;xe(M,i);var b=l.errorOrDestroy,y=["error","close","destroy","pause","resume"];function w(e,i,r){t=t||Wi(),e=e||{},"boolean"!=typeof r&&(r=i instanceof t),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=d(this,e,"readableHighWaterMark",r),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=Ji().StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function M(e){if(t=t||Wi(),!(this instanceof M))return new M(e);var r=this instanceof t;this._readableState=new w(e,this,r),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function _(t,e,i,s,h){o("readableAddChunk",e);var a,u=t._readableState;if(null===e)u.reading=!1,function(t,e){if(o("onEofChunk"),e.ended)return;if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}(t,u);else if(h||(a=function(t,e){var i;o=e,r.isBuffer(o)||o instanceof n||"string"==typeof e||void 0===e||t.objectMode||(i=new p("chunk",["string","Buffer","Uint8Array"],e));var o;return i}(u,e)),a)b(t,a);else if(u.objectMode||e&&e.length>0)if("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===r.prototype||(e=function(t){return r.from(t)}(e)),s)u.endEmitted?b(t,new v):S(t,u,e,!0);else if(u.ended)b(t,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!i?(e=u.decoder.write(e),u.objectMode||0!==e.length?S(t,u,e,!1):I(t,u)):S(t,u,e,!1)}else s||(u.reading=!1,I(t,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function S(t,e,i,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",i)):(e.length+=e.objectMode?1:i.length,r?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&k(t)),I(t,e)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),M.prototype.destroy=l.destroy,M.prototype._undestroy=l.undestroy,M.prototype._destroy=function(t,e){e(t)},M.prototype.push=function(t,e){var i,n=this._readableState;return n.objectMode?i=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=r.from(t,e),e=""),i=!0),_(this,t,e,!1,i)},M.prototype.unshift=function(t){return _(this,t,null,!0,!1)},M.prototype.isPaused=function(){return!1===this._readableState.flowing},M.prototype.setEncoding=function(t){h||(h=Ji().StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,r="";null!==i;)r+=e.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var E=1073741824;function A(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,_e.nextTick(R,t))}function R(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,N(t)}function I(t,e){e.readingMore||(e.readingMore=!0,_e.nextTick(O,t,e))}function O(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var i=e.length;if(o("maybeReadMore read 0"),t.read(0),i===e.length)break}e.readingMore=!1}function T(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function B(t){o("readable nexttick read 0"),t.read(0)}function P(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),N(t),e.flowing&&!e.reading&&t.read(0)}function N(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function x(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function L(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,_e.nextTick(D,e,t))}function D(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var i=e._writableState;(!i||i.autoDestroy&&i.finished)&&e.destroy()}}function C(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}return M.prototype.read=function(t){o("read",t),t=parseInt(t,10);var e=this._readableState,i=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):k(this),null;if(0===(t=A(t,e))&&e.ended)return 0===e.length&&L(this),null;var r,n=e.needReadable;return o("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&o("length less than watermark",n=!0),e.ended||e.reading?o("reading or ended",n=!1):n&&(o("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=A(i,e))),null===(r=t>0?x(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&L(this)),null!==r&&this.emit("data",r),r},M.prototype._read=function(t){b(this,new g("_read()"))},M.prototype.pipe=function(t,i){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,i);var s=(!i||!1!==i.end)&&t!==_e.stdout&&t!==_e.stderr?a:m;function h(e,i){o("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,o("cleanup"),t.removeListener("close",c),t.removeListener("finish",p),t.removeListener("drain",u),t.removeListener("error",d),t.removeListener("unpipe",h),r.removeListener("end",a),r.removeListener("end",m),r.removeListener("data",l),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function a(){o("onend"),t.end()}n.endEmitted?_e.nextTick(s):r.once("end",s),t.on("unpipe",h);var u=function(t){return function(){var i=t._readableState;o("pipeOnDrain",i.awaitDrain),i.awaitDrain&&i.awaitDrain--,0===i.awaitDrain&&e(t,"data")&&(i.flowing=!0,N(t))}}(r);t.on("drain",u);var f=!1;function l(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==C(n.pipes,t))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(i){o("onerror",i),m(),t.removeListener("error",d),0===e(t,"error")&&b(t,i)}function c(){t.removeListener("finish",p),m()}function p(){o("onfinish"),t.removeListener("close",c),m()}function m(){o("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",d),t.once("close",c),t.once("finish",p),t.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),t},M.prototype.unpipe=function(t){var e=this._readableState,i={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<n;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=C(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,i)),this},M.prototype.on=function(t,e){var r=i.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?k(this):n.reading||_e.nextTick(B,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(t,e){var r=i.prototype.removeListener.call(this,t,e);return"readable"===t&&_e.nextTick(T,this),r},M.prototype.removeAllListeners=function(t){var e=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||_e.nextTick(T,this),e},M.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,_e.nextTick(P,t,e))}(this,t)),t.paused=!1,this},M.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(t){var e=this,i=this._readableState,r=!1;for(var n in t.on("end",(function(){if(o("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(o("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(e.push(n)||(r=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<y.length;s++)t.on(y[s],this.emit.bind(this,y[s]));return this._read=function(e){o("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(M.prototype[Symbol.asyncIterator]=function(){return void 0===a&&(a=ar()),a(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),M._fromList=x,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(M.from=function(t,e){return void 0===u&&(u=nr?rr:(nr=1,rr=function(){throw new Error("Readable.from is not available in the browser")})),u(M,t,e)}),or}var fr=br,lr=Di.codes,dr=lr.ERR_METHOD_NOT_IMPLEMENTED,cr=lr.ERR_MULTIPLE_CALLBACK,pr=lr.ERR_TRANSFORM_ALREADY_TRANSFORMING,mr=lr.ERR_TRANSFORM_WITH_LENGTH_0,gr=Wi();function vr(t,e){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new cr);i.writechunk=null,i.writecb=null,null!=e&&this.push(e),r(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function br(t){if(!(this instanceof br))return new br(t);gr.call(this,t),this._transformState={afterTransform:vr.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",yr)}function yr(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?wr(this,null,null):this._flush((function(e,i){wr(t,e,i)}))}function wr(t,e,i){if(e)return t.emit("error",e);if(null!=i&&t.push(i),t._writableState.length)throw new mr;if(t._transformState.transforming)throw new pr;return t.push(null)}xe(br,gr),br.prototype.push=function(t,e){return this._transformState.needTransform=!1,gr.prototype.push.call(this,t,e)},br.prototype._transform=function(t,e,i){i(new dr("_transform()"))},br.prototype._write=function(t,e,i){var r=this._transformState;if(r.writecb=i,r.writechunk=t,r.writeencoding=e,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},br.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},br.prototype._destroy=function(t,e){gr.prototype._destroy.call(this,t,(function(t){e(t)}))};var Mr,_r=Er,Sr=fr;function Er(t){if(!(this instanceof Er))return new Er(t);Sr.call(this,t)}xe(Er,Sr),Er.prototype._transform=function(t,e,i){i(null,t)};var Ar=Di.codes,kr=Ar.ERR_MISSING_ARGS,Rr=Ar.ERR_STREAM_DESTROYED;function Ir(t){if(t)throw t}function Or(t){t()}function Tr(t,e){return t.pipe(e)}var Br=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var r,n=function(t){return t.length?"function"!=typeof t[t.length-1]?Ir:t.pop():Ir}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new kr("streams");var o=e.map((function(t,i){var s=i<e.length-1;return function(t,e,i,r){r=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(r);var n=!1;t.on("close",(function(){n=!0})),void 0===Mr&&(Mr=hr),Mr(t,{readable:e,writable:i},(function(t){if(t)return r(t);n=!0,r()}));var o=!1;return function(e){if(!n&&!o)return o=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void r(e||new Rr("pipe"))}}(t,s,i>0,(function(t){r||(r=t),t&&o.forEach(Or),s||(o.forEach(Or),n(r))}))}));return e.reduce(Tr)};!function(t,e){(e=Ce.exports=ur()).Stream=e,e.Readable=e,e.Writable=Zi(),e.Duplex=Wi(),e.Transform=fr,e.PassThrough=_r,e.finished=hr,e.pipeline=Br}(0,De);var Pr=Re.Buffer,Nr=De.Transform;function xr(t){Nr.call(this),this._block=Pr.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}xe(xr,Nr),xr.prototype._transform=function(t,e,i){var r=null;try{this.update(t,e)}catch(t){r=t}i(r)},xr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},xr.prototype.update=function(t,e){if(function(t,e){if(!Pr.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");Pr.isBuffer(t)||(t=Pr.from(t,e));for(var i=this._block,r=0;this._blockOffset+t.length-r>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)i[n++]=t[r++];this._update(),this._blockOffset=0}for(;r<t.length;)i[this._blockOffset++]=t[r++];for(var o=0,s=8*t.length;s>0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},xr.prototype._update=function(){throw new Error("_update is not implemented")},xr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return e},xr.prototype._digest=function(){throw new Error("_digest is not implemented")};var Lr=xr,Dr=xe,Cr=Lr,qr=Re.Buffer,Ur=new Array(16);function jr(){Cr.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function zr(t,e){return t<<e|t>>>32-e}function Fr(t,e,i,r,n,o,s){return zr(t+(e&i|~e&r)+n+o|0,s)+e|0}function Hr(t,e,i,r,n,o,s){return zr(t+(e&r|i&~r)+n+o|0,s)+e|0}function Kr(t,e,i,r,n,o,s){return zr(t+(e^i^r)+n+o|0,s)+e|0}function Gr(t,e,i,r,n,o,s){return zr(t+(i^(e|~r))+n+o|0,s)+e|0}Dr(jr,Cr),jr.prototype._update=function(){for(var t=Ur,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var i=this._a,r=this._b,n=this._c,o=this._d;i=Fr(i,r,n,o,t[0],3614090360,7),o=Fr(o,i,r,n,t[1],3905402710,12),n=Fr(n,o,i,r,t[2],606105819,17),r=Fr(r,n,o,i,t[3],3250441966,22),i=Fr(i,r,n,o,t[4],4118548399,7),o=Fr(o,i,r,n,t[5],1200080426,12),n=Fr(n,o,i,r,t[6],2821735955,17),r=Fr(r,n,o,i,t[7],4249261313,22),i=Fr(i,r,n,o,t[8],1770035416,7),o=Fr(o,i,r,n,t[9],2336552879,12),n=Fr(n,o,i,r,t[10],4294925233,17),r=Fr(r,n,o,i,t[11],2304563134,22),i=Fr(i,r,n,o,t[12],1804603682,7),o=Fr(o,i,r,n,t[13],4254626195,12),n=Fr(n,o,i,r,t[14],2792965006,17),i=Hr(i,r=Fr(r,n,o,i,t[15],1236535329,22),n,o,t[1],4129170786,5),o=Hr(o,i,r,n,t[6],3225465664,9),n=Hr(n,o,i,r,t[11],643717713,14),r=Hr(r,n,o,i,t[0],3921069994,20),i=Hr(i,r,n,o,t[5],3593408605,5),o=Hr(o,i,r,n,t[10],38016083,9),n=Hr(n,o,i,r,t[15],3634488961,14),r=Hr(r,n,o,i,t[4],3889429448,20),i=Hr(i,r,n,o,t[9],568446438,5),o=Hr(o,i,r,n,t[14],3275163606,9),n=Hr(n,o,i,r,t[3],4107603335,14),r=Hr(r,n,o,i,t[8],1163531501,20),i=Hr(i,r,n,o,t[13],2850285829,5),o=Hr(o,i,r,n,t[2],4243563512,9),n=Hr(n,o,i,r,t[7],1735328473,14),i=Kr(i,r=Hr(r,n,o,i,t[12],2368359562,20),n,o,t[5],4294588738,4),o=Kr(o,i,r,n,t[8],2272392833,11),n=Kr(n,o,i,r,t[11],1839030562,16),r=Kr(r,n,o,i,t[14],4259657740,23),i=Kr(i,r,n,o,t[1],2763975236,4),o=Kr(o,i,r,n,t[4],1272893353,11),n=Kr(n,o,i,r,t[7],4139469664,16),r=Kr(r,n,o,i,t[10],3200236656,23),i=Kr(i,r,n,o,t[13],681279174,4),o=Kr(o,i,r,n,t[0],3936430074,11),n=Kr(n,o,i,r,t[3],3572445317,16),r=Kr(r,n,o,i,t[6],76029189,23),i=Kr(i,r,n,o,t[9],3654602809,4),o=Kr(o,i,r,n,t[12],3873151461,11),n=Kr(n,o,i,r,t[15],530742520,16),i=Gr(i,r=Kr(r,n,o,i,t[2],3299628645,23),n,o,t[0],4096336452,6),o=Gr(o,i,r,n,t[7],1126891415,10),n=Gr(n,o,i,r,t[14],2878612391,15),r=Gr(r,n,o,i,t[5],4237533241,21),i=Gr(i,r,n,o,t[12],1700485571,6),o=Gr(o,i,r,n,t[3],2399980690,10),n=Gr(n,o,i,r,t[10],4293915773,15),r=Gr(r,n,o,i,t[1],2240044497,21),i=Gr(i,r,n,o,t[8],1873313359,6),o=Gr(o,i,r,n,t[15],4264355552,10),n=Gr(n,o,i,r,t[6],2734768916,15),r=Gr(r,n,o,i,t[13],1309151649,21),i=Gr(i,r,n,o,t[4],4149444226,6),o=Gr(o,i,r,n,t[11],3174756917,10),n=Gr(n,o,i,r,t[2],718787259,15),r=Gr(r,n,o,i,t[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+o|0},jr.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=qr.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};var Yr=jr,Vr=Oe.Buffer,Zr=xe,Wr=Lr,Xr=new Array(16),Qr=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Jr=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],$r=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],tn=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],en=[0,1518500249,1859775393,2400959708,2840853838],rn=[1352829926,1548603684,1836072691,2053994217,0];function nn(){Wr.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function on(t,e){return t<<e|t>>>32-e}function sn(t,e,i,r,n,o,s,h){return on(t+(e^i^r)+o+s|0,h)+n|0}function hn(t,e,i,r,n,o,s,h){return on(t+(e&i|~e&r)+o+s|0,h)+n|0}function an(t,e,i,r,n,o,s,h){return on(t+((e|~i)^r)+o+s|0,h)+n|0}function un(t,e,i,r,n,o,s,h){return on(t+(e&r|i&~r)+o+s|0,h)+n|0}function fn(t,e,i,r,n,o,s,h){return on(t+(e^(i|~r))+o+s|0,h)+n|0}Zr(nn,Wr),nn.prototype._update=function(){for(var t=Xr,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,s=0|this._e,h=0|this._a,a=0|this._b,u=0|this._c,f=0|this._d,l=0|this._e,d=0;d<80;d+=1){var c,p;d<16?(c=sn(i,r,n,o,s,t[Qr[d]],en[0],$r[d]),p=fn(h,a,u,f,l,t[Jr[d]],rn[0],tn[d])):d<32?(c=hn(i,r,n,o,s,t[Qr[d]],en[1],$r[d]),p=un(h,a,u,f,l,t[Jr[d]],rn[1],tn[d])):d<48?(c=an(i,r,n,o,s,t[Qr[d]],en[2],$r[d]),p=an(h,a,u,f,l,t[Jr[d]],rn[2],tn[d])):d<64?(c=un(i,r,n,o,s,t[Qr[d]],en[3],$r[d]),p=hn(h,a,u,f,l,t[Jr[d]],rn[3],tn[d])):(c=fn(i,r,n,o,s,t[Qr[d]],en[4],$r[d]),p=sn(h,a,u,f,l,t[Jr[d]],rn[4],tn[d])),i=s,s=o,o=on(n,10),n=r,r=c,h=l,l=f,f=on(u,10),u=a,a=p}var m=this._b+n+f|0;this._b=this._c+o+l|0,this._c=this._d+s+h|0,this._d=this._e+i+a|0,this._e=this._a+r+u|0,this._a=m},nn.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Vr.alloc?Vr.alloc(20):new Vr(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};var ln=nn,dn={},cn={get exports(){return dn},set exports(t){dn=t}},pn=Re.Buffer;function mn(t,e){this._block=pn.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}mn.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=pn.from(t,e));for(var i=this._block,r=this._blockSize,n=t.length,o=this._len,s=0;s<n;){for(var h=o%r,a=Math.min(n-s,r-h),u=0;u<a;u++)i[h+u]=t[s+u];s+=a,(o+=a)%r==0&&this._update(i)}return this._len+=n,this},mn.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},mn.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var gn=mn,vn=xe,bn=gn,yn=Re.Buffer,wn=[1518500249,1859775393,-1894007588,-899497514],Mn=new Array(80);function _n(){this.init(),this._w=Mn,bn.call(this,64,56)}function Sn(t){return t<<30|t>>>2}function En(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}vn(_n,bn),_n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},_n.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0;a<16;++a)i[a]=t.readInt32BE(4*a);for(;a<80;++a)i[a]=i[a-3]^i[a-8]^i[a-14]^i[a-16];for(var u=0;u<80;++u){var f=~~(u/20),l=0|((e=r)<<5|e>>>27)+En(f,n,o,s)+h+i[u]+wn[f];h=s,s=o,o=Sn(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0},_n.prototype._hash=function(){var t=yn.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var An=_n,kn=xe,Rn=gn,In=Re.Buffer,On=[1518500249,1859775393,-1894007588,-899497514],Tn=new Array(80);function Bn(){this.init(),this._w=Tn,Rn.call(this,64,56)}function Pn(t){return t<<5|t>>>27}function Nn(t){return t<<30|t>>>2}function xn(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}kn(Bn,Rn),Bn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Bn.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0;a<16;++a)i[a]=t.readInt32BE(4*a);for(;a<80;++a)i[a]=(e=i[a-3]^i[a-8]^i[a-14]^i[a-16])<<1|e>>>31;for(var u=0;u<80;++u){var f=~~(u/20),l=Pn(r)+xn(f,n,o,s)+h+i[u]+On[f]|0;h=s,s=o,o=Nn(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0},Bn.prototype._hash=function(){var t=In.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var Ln=Bn,Dn=xe,Cn=gn,qn=Re.Buffer,Un=[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],jn=new Array(64);function zn(){this.init(),this._w=jn,Cn.call(this,64,56)}function Fn(t,e,i){return i^t&(e^i)}function Hn(t,e,i){return t&e|i&(t|e)}function Kn(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function Gn(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Yn(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}Dn(zn,Cn),zn.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},zn.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0|this._f,u=0|this._g,f=0|this._h,l=0;l<16;++l)i[l]=t.readInt32BE(4*l);for(;l<64;++l)i[l]=0|(((e=i[l-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+i[l-7]+Yn(i[l-15])+i[l-16];for(var d=0;d<64;++d){var c=f+Gn(h)+Fn(h,a,u)+Un[d]+i[d]|0,p=Kn(r)+Hn(r,n,o)|0;f=u,u=a,a=h,h=s+c|0,s=o,o=n,n=r,r=c+p|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0,this._f=a+this._f|0,this._g=u+this._g|0,this._h=f+this._h|0},zn.prototype._hash=function(){var t=qn.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var Vn=zn,Zn=xe,Wn=Vn,Xn=gn,Qn=Re.Buffer,Jn=new Array(64);function $n(){this.init(),this._w=Jn,Xn.call(this,64,56)}Zn($n,Wn),$n.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},$n.prototype._hash=function(){var t=Qn.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var to=$n,eo=xe,io=gn,ro=Re.Buffer,no=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],oo=new Array(160);function so(){this.init(),this._w=oo,io.call(this,128,112)}function ho(t,e,i){return i^t&(e^i)}function ao(t,e,i){return t&e|i&(t|e)}function uo(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function fo(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function lo(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function co(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function po(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function mo(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function go(t,e){return t>>>0<e>>>0?1:0}eo(so,io),so.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},so.prototype._update=function(t){for(var e=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,h=0|this._fh,a=0|this._gh,u=0|this._hh,f=0|this._al,l=0|this._bl,d=0|this._cl,c=0|this._dl,p=0|this._el,m=0|this._fl,g=0|this._gl,v=0|this._hl,b=0;b<32;b+=2)e[b]=t.readInt32BE(4*b),e[b+1]=t.readInt32BE(4*b+4);for(;b<160;b+=2){var y=e[b-30],w=e[b-30+1],M=lo(y,w),_=co(w,y),S=po(y=e[b-4],w=e[b-4+1]),E=mo(w,y),A=e[b-14],k=e[b-14+1],R=e[b-32],I=e[b-32+1],O=_+k|0,T=M+A+go(O,_)|0;T=(T=T+S+go(O=O+E|0,E)|0)+R+go(O=O+I|0,I)|0,e[b]=T,e[b+1]=O}for(var B=0;B<160;B+=2){T=e[B],O=e[B+1];var P=ao(i,r,n),N=ao(f,l,d),x=uo(i,f),L=uo(f,i),D=fo(s,p),C=fo(p,s),q=no[B],U=no[B+1],j=ho(s,h,a),z=ho(p,m,g),F=v+C|0,H=u+D+go(F,v)|0;H=(H=(H=H+j+go(F=F+z|0,z)|0)+q+go(F=F+U|0,U)|0)+T+go(F=F+O|0,O)|0;var K=L+N|0,G=x+P+go(K,L)|0;u=a,v=g,a=h,g=m,h=s,m=p,s=o+H+go(p=c+F|0,c)|0,o=n,c=d,n=r,d=l,r=i,l=f,i=H+G+go(f=F+K|0,F)|0}this._al=this._al+f|0,this._bl=this._bl+l|0,this._cl=this._cl+d|0,this._dl=this._dl+c|0,this._el=this._el+p|0,this._fl=this._fl+m|0,this._gl=this._gl+g|0,this._hl=this._hl+v|0,this._ah=this._ah+i+go(this._al,f)|0,this._bh=this._bh+r+go(this._bl,l)|0,this._ch=this._ch+n+go(this._cl,d)|0,this._dh=this._dh+o+go(this._dl,c)|0,this._eh=this._eh+s+go(this._el,p)|0,this._fh=this._fh+h+go(this._fl,m)|0,this._gh=this._gh+a+go(this._gl,g)|0,this._hh=this._hh+u+go(this._hl,v)|0},so.prototype._hash=function(){var t=ro.allocUnsafe(64);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var vo=so,bo=xe,yo=vo,wo=gn,Mo=Re.Buffer,_o=new Array(160);function So(){this.init(),this._w=_o,wo.call(this,128,112)}bo(So,yo),So.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},So.prototype._hash=function(){var t=Mo.allocUnsafe(48);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var Eo=So,Ao=cn.exports=function(t){t=t.toLowerCase();var e=Ao[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};function ko(){this.head=null,this.tail=null,this.length=0}Ao.sha=An,Ao.sha1=Ln,Ao.sha224=to,Ao.sha256=Vn,Ao.sha384=Eo,Ao.sha512=vo,ko.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},ko.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},ko.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},ko.prototype.clear=function(){this.head=this.tail=null,this.length=0},ko.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i},ko.prototype.concat=function(t){if(0===this.length)return K.alloc(0);if(1===this.length)return this.head.data;for(var e=K.allocUnsafe(t>>>0),i=this.head,r=0;i;)i.data.copy(e,r),r+=i.data.length,i=i.next;return e};var Ro=K.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Io(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!Ro(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=To;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Bo;break;default:return void(this.write=Oo)}this.charBuffer=new K(6),this.charReceived=0,this.charLength=0}function Oo(t){return t.toString(this.encoding)}function To(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function Bo(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}Io.prototype.write=function(t){for(var e="";this.charLength;){var i=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";if(t=t.slice(i,t.length),!((n=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var r=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived);var n;r=(e+=t.toString(this.encoding,0,r)).length-1;if((n=e.charCodeAt(r))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,r)}return e},Io.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var i=t[t.length-e];if(1==e&&i>>5==6){this.charLength=2;break}if(e<=2&&i>>4==14){this.charLength=3;break}if(e<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=e},Io.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var i=this.charReceived,r=this.charBuffer,n=this.encoding;e+=r.slice(0,i).toString(n)}return e};var Po=Object.freeze({__proto__:null,StringDecoder:Io});Lo.ReadableState=xo;var No=$e("stream");function xo(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof us&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new ko,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new Io(t.encoding),this.encoding=t.encoding)}function Lo(t){if(!(this instanceof Lo))return new Lo(t);this._readableState=new xo(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),Ue.call(this)}function Do(t,e,i,r,n){var o=function(t,e){var i=null;K.isBuffer(e)||"string"==typeof e||null==e||t.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));return i}(e,i);if(o)t.emit("error",o);else if(null===i)e.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,Uo(t)}(t,e);else if(e.objectMode||i&&i.length>0)if(e.ended&&!n){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&n){var h=new Error("stream.unshift() after end event");t.emit("error",h)}else{var a;!e.decoder||n||r||(i=e.decoder.write(i),a=!e.objectMode&&0===i.length),n||(e.reading=!1),a||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",i),t.read(0)):(e.length+=e.objectMode?1:i.length,n?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&Uo(t))),function(t,e){e.readingMore||(e.readingMore=!0,ue(zo,t,e))}(t,e)}else n||(e.reading=!1);return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(e)}Ve(Lo,Ue),Lo.prototype.push=function(t,e){var i=this._readableState;return i.objectMode||"string"!=typeof t||(e=e||i.defaultEncoding)!==i.encoding&&(t=K.from(t,e),e=""),Do(this,i,t,e,!1)},Lo.prototype.unshift=function(t){return Do(this,this._readableState,t,"",!0)},Lo.prototype.isPaused=function(){return!1===this._readableState.flowing},Lo.prototype.setEncoding=function(t){return this._readableState.decoder=new Io(t),this._readableState.encoding=t,this};var Co=8388608;function qo(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=Co?t=Co:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function Uo(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(No("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?ue(jo,t):jo(t))}function jo(t){No("emit readable"),t.emit("readable"),Ko(t)}function zo(t,e){for(var i=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(No("maybeReadMore read 0"),t.read(0),i!==e.length);)i=e.length;e.readingMore=!1}function Fo(t){No("readable nexttick read 0"),t.read(0)}function Ho(t,e){e.reading||(No("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Ko(t),e.flowing&&!e.reading&&t.read(0)}function Ko(t){var e=t._readableState;for(No("flow",e.flowing);e.flowing&&null!==t.read(););}function Go(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):i=function(t,e,i){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():i?function(t,e){var i=e.head,r=1,n=i.data;t-=n.length;for(;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(s===o.length?n+=o:n+=o.slice(0,t),0===(t-=s)){s===o.length?(++r,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(s));break}++r}return e.length-=r,n}(t,e):function(t,e){var i=K.allocUnsafe(t),r=e.head,n=1;r.data.copy(i),t-=r.data.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(i,i.length-t,0,s),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e);return r}(t,e.buffer,e.decoder),i);var i}function Yo(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,ue(Vo,e,t))}function Vo(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Zo(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}function Wo(){}function Xo(t,e,i){this.chunk=t,this.encoding=e,this.callback=i,this.next=null}function Qo(t,e){Object.defineProperty(this,"buffer",{get:Xe((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof us&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=!1===t.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,r=i.sync,n=i.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,r,n){--e.pendingcb,i?ue(n,r):n(r);t._writableState.errorEmitted=!0,t.emit("error",r)}(t,i,r,e,n);else{var o=is(i);o||i.corked||i.bufferProcessing||!i.bufferedRequest||es(t,i),r?ue(ts,t,i,o,n):ts(t,i,o,n)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new os(this)}function Jo(t){if(!(this instanceof Jo||this instanceof us))return new Jo(t);this._writableState=new Qo(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),Ue.call(this)}function $o(t,e,i,r,n,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,i?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function ts(t,e,i,r){i||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),ns(t,e)}function es(t,e){e.bufferProcessing=!0;var i=e.bufferedRequest;if(t._writev&&i&&i.next){var r=e.bufferedRequestCount,n=new Array(r),o=e.corkedRequestsFree;o.entry=i;for(var s=0;i;)n[s]=i,i=i.next,s+=1;$o(t,e,!0,e.length,n,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new os(e)}else{for(;i;){var h=i.chunk,a=i.encoding,u=i.callback;if($o(t,e,!1,e.objectMode?1:h.length,h,a,u),i=i.next,e.writing)break}null===i&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=i,e.bufferProcessing=!1}function is(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function rs(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function ns(t,e){var i=is(e);return i&&(0===e.pendingcb?(rs(t,e),e.finished=!0,t.emit("finish")):rs(t,e)),i}function os(t){var e=this;this.next=null,this.entry=null,this.finish=function(i){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(i),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}Lo.prototype.read=function(t){No("read",t),t=parseInt(t,10);var e=this._readableState,i=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return No("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?Yo(this):Uo(this),null;if(0===(t=qo(t,e))&&e.ended)return 0===e.length&&Yo(this),null;var r,n=e.needReadable;return No("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&No("length less than watermark",n=!0),e.ended||e.reading?No("reading or ended",n=!1):n&&(No("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=qo(i,e))),null===(r=t>0?Go(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&Yo(this)),null!==r&&this.emit("data",r),r},Lo.prototype._read=function(t){this.emit("error",new Error("not implemented"))},Lo.prototype.pipe=function(t,e){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,No("pipe count=%d opts=%j",r.pipesCount,e);var n=!e||!1!==e.end?s:u;function o(t){No("onunpipe"),t===i&&u()}function s(){No("onend"),t.end()}r.endEmitted?ue(n):i.once("end",n),t.on("unpipe",o);var h=function(t){return function(){var e=t._readableState;No("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,Ko(t))}}(i);t.on("drain",h);var a=!1;function u(){No("cleanup"),t.removeListener("close",c),t.removeListener("finish",p),t.removeListener("drain",h),t.removeListener("error",d),t.removeListener("unpipe",o),i.removeListener("end",s),i.removeListener("end",u),i.removeListener("data",l),a=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||h()}var f=!1;function l(e){No("ondata"),f=!1,!1!==t.write(e)||f||((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==Zo(r.pipes,t))&&!a&&(No("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,f=!0),i.pause())}function d(e){var i;No("onerror",e),m(),t.removeListener("error",d),0===(i="error",t.listeners(i).length)&&t.emit("error",e)}function c(){t.removeListener("finish",p),m()}function p(){No("onfinish"),t.removeListener("close",c),m()}function m(){No("unpipe"),i.unpipe(t)}return i.on("data",l),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",d),t.once("close",c),t.once("finish",p),t.emit("pipe",i),r.flowing||(No("pipe resume"),i.resume()),t},Lo.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this)),this;if(!t){var i=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n<r;n++)i[n].emit("unpipe",this);return this}var o=Zo(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this)),this},Lo.prototype.on=function(t,e){var i=Ue.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&Uo(this):ue(Fo,this))}return i},Lo.prototype.addListener=Lo.prototype.on,Lo.prototype.resume=function(){var t=this._readableState;return t.flowing||(No("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,ue(Ho,t,e))}(this,t)),this},Lo.prototype.pause=function(){return No("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(No("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Lo.prototype.wrap=function(t){var e=this._readableState,i=!1,r=this;for(var n in t.on("end",(function(){if(No("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)})),t.on("data",(function(n){(No("wrapped data"),e.decoder&&(n=e.decoder.write(n)),e.objectMode&&null==n)||(e.objectMode||n&&n.length)&&(r.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));return function(t,e){for(var i=0,r=t.length;i<r;i++)e(t[i],i)}(["error","close","destroy","pause","resume"],(function(e){t.on(e,r.emit.bind(r,e))})),r._read=function(e){No("wrapped _read",e),i&&(i=!1,t.resume())},r},Lo._fromList=Go,Jo.WritableState=Qo,Ve(Jo,Ue),Qo.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},Jo.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Jo.prototype.write=function(t,e,i){var r=this._writableState,n=!1;return"function"==typeof e&&(i=e,e=null),K.isBuffer(t)?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof i&&(i=Wo),r.ended?function(t,e){var i=new Error("write after end");t.emit("error",i),ue(e,i)}(this,i):function(t,e,i,r){var n=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):K.isBuffer(i)||"string"==typeof i||void 0===i||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),ue(r,o),n=!1),n}(this,r,t,i)&&(r.pendingcb++,n=function(t,e,i,r,n){i=function(t,e,i){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=K.from(e,i));return e}(e,i,r),K.isBuffer(i)&&(r="buffer");var o=e.objectMode?1:i.length;e.length+=o;var s=e.length<e.highWaterMark;s||(e.needDrain=!0);if(e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest=new Xo(i,r,n),h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else $o(t,e,!1,o,i,r,n);return s}(this,r,t,e,i)),n},Jo.prototype.cork=function(){this._writableState.corked++},Jo.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||es(this,t))},Jo.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Jo.prototype._write=function(t,e,i){i(new Error("not implemented"))},Jo.prototype._writev=null,Jo.prototype.end=function(t,e,i){var r=this._writableState;"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,i){e.ending=!0,ns(t,e),i&&(e.finished?ue(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,r,i)},Ve(us,Lo);for(var ss=Object.keys(Jo.prototype),hs=0;hs<ss.length;hs++){var as=ss[hs];us.prototype[as]||(us.prototype[as]=Jo.prototype[as])}function us(t){if(!(this instanceof us))return new us(t);Lo.call(this,t),Jo.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",fs)}function fs(){this.allowHalfOpen||this._writableState.ended||ue(ls,this)}function ls(t){t.end()}function ds(t){this.afterTransform=function(e,i){return function(t,e,i){var r=t._transformState;r.transforming=!1;var n=r.writecb;if(!n)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=i&&t.push(i);n(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}(t,e,i)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function cs(t){if(!(this instanceof cs))return new cs(t);us.call(this,t),this._transformState=new ds(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(t){ps(e,t)})):ps(e)}))}function ps(t,e){if(e)return t.emit("error",e);var i=t._writableState,r=t._transformState;if(i.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}function ms(t){if(!(this instanceof ms))return new ms(t);cs.call(this,t)}function gs(){Ue.call(this)}Ve(cs,us),cs.prototype.push=function(t,e){return this._transformState.needTransform=!1,us.prototype.push.call(this,t,e)},cs.prototype._transform=function(t,e,i){throw new Error("Not implemented")},cs.prototype._write=function(t,e,i){var r=this._transformState;if(r.writecb=i,r.writechunk=t,r.writeencoding=e,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},cs.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},Ve(ms,cs),ms.prototype._transform=function(t,e,i){i(null,t)},Ve(gs,Ue),gs.Readable=Lo,gs.Writable=Jo,gs.Duplex=us,gs.Transform=cs,gs.PassThrough=ms,gs.Stream=gs,gs.prototype.pipe=function(t,e){var i=this;function r(e){t.writable&&!1===t.write(e)&&i.pause&&i.pause()}function n(){i.readable&&i.resume&&i.resume()}i.on("data",r),t.on("drain",n),t._isStdio||e&&!1===e.end||(i.on("end",s),i.on("close",h));var o=!1;function s(){o||(o=!0,t.end())}function h(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===Ue.listenerCount(this,"error"))throw t}function u(){i.removeListener("data",r),t.removeListener("drain",n),i.removeListener("end",s),i.removeListener("close",h),i.removeListener("error",a),t.removeListener("error",a),i.removeListener("end",u),i.removeListener("close",u),t.removeListener("close",u)}return i.on("error",a),t.on("error",a),i.on("end",u),i.on("close",u),t.on("close",u),t.emit("pipe",i),t};var vs=Bt(Object.freeze({__proto__:null,Duplex:us,PassThrough:ms,Readable:Lo,Stream:gs,Transform:cs,Writable:Jo,default:gs})),bs=Bt(Po),ys=Re.Buffer,ws=vs.Transform,Ms=bs.StringDecoder;function _s(t){ws.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}xe(_s,ws),_s.prototype.update=function(t,e,i){"string"==typeof t&&(t=ys.from(t,e));var r=this._update(t);return this.hashMode?this:(i&&(r=this._toString(r,i)),r)},_s.prototype.setAutoPadding=function(){},_s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},_s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},_s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},_s.prototype._transform=function(t,e,i){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{i(r)}},_s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},_s.prototype._finalOrDigest=function(t){var e=this.__final()||ys.alloc(0);return t&&(e=this._toString(e,t,!0)),e},_s.prototype._toString=function(t,e,i){if(this._decoder||(this._decoder=new Ms(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return i&&(r+=this._decoder.end()),r};var Ss=_s,Es=Yr,As=ln,ks=dn,Rs=Ss;function Is(t){Rs.call(this,"digest"),this._hash=t}xe(Is,Rs),Is.prototype._update=function(t){this._hash.update(t)},Is.prototype._final=function(){return this._hash.digest()};var Os=function(t){return"md5"===(t=t.toLowerCase())?new Es:"rmd160"===t||"ripemd160"===t?new As:new Is(ks(t))},Ts=xe,Bs=Re.Buffer,Ps=Ss,Ns=Bs.alloc(128),xs=64;function Ls(t,e){Ps.call(this,"digest"),"string"==typeof e&&(e=Bs.from(e)),this._alg=t,this._key=e,e.length>xs?e=t(e):e.length<xs&&(e=Bs.concat([e,Ns],xs));for(var i=this._ipad=Bs.allocUnsafe(xs),r=this._opad=Bs.allocUnsafe(xs),n=0;n<xs;n++)i[n]=54^e[n],r[n]=92^e[n];this._hash=[i]}Ts(Ls,Ps),Ls.prototype._update=function(t){this._hash.push(t)},Ls.prototype._final=function(){var t=this._alg(Bs.concat(this._hash));return this._alg(Bs.concat([this._opad,t]))};var Ds=Yr,Cs=function(t){return(new Ds).update(t).digest()},qs=xe,Us=Ls,js=Ss,zs=Re.Buffer,Fs=Cs,Hs=ln,Ks=dn,Gs=zs.alloc(128);function Ys(t,e){js.call(this,"digest"),"string"==typeof e&&(e=zs.from(e));var i="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>i)?e=("rmd160"===t?new Hs:Ks(t)).update(e).digest():e.length<i&&(e=zs.concat([e,Gs],i));for(var r=this._ipad=zs.allocUnsafe(i),n=this._opad=zs.allocUnsafe(i),o=0;o<i;o++)r[o]=54^e[o],n[o]=92^e[o];this._hash="rmd160"===t?new Hs:Ks(t),this._hash.update(r)}qs(Ys,js),Ys.prototype._update=function(t){this._hash.update(t)},Ys.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new Hs:Ks(this._alg)).update(this._opad).update(t).digest()};var Vs=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new Ys("rmd160",e):"md5"===t?new Us(Fs,e):new Ys(t,e)},Zs={},Ws={get exports(){return Zs},set exports(t){Zs=t}};var Xs={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};Ws.exports=Xs;var Qs,Js={},$s=Math.pow(2,30)-1,th=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>$s||e!=e)throw new TypeError("Bad key length")};if(Tt.process&&Tt.process.browser)Qs="utf-8";else if(Tt.process&&Tt.process.version){Qs=parseInt(_e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else Qs="utf-8";var eh=Qs,ih=Re.Buffer,rh=function(t,e,i){if(ih.isBuffer(t))return t;if("string"==typeof t)return ih.from(t,e);if(ArrayBuffer.isView(t))return ih.from(t.buffer);throw new TypeError(i+" must be a string, a Buffer, a typed array or a DataView")},nh=Cs,oh=ln,sh=dn,hh=Re.Buffer,ah=th,uh=eh,fh=rh,lh=hh.alloc(128),dh={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function ch(t,e,i){var r=function(t){function e(e){return sh(t).update(e).digest()}function i(t){return(new oh).update(t).digest()}return"rmd160"===t||"ripemd160"===t?i:"md5"===t?nh:e}(t),n="sha512"===t||"sha384"===t?128:64;e.length>n?e=r(e):e.length<n&&(e=hh.concat([e,lh],n));for(var o=hh.allocUnsafe(n+dh[t]),s=hh.allocUnsafe(n+dh[t]),h=0;h<n;h++)o[h]=54^e[h],s[h]=92^e[h];var a=hh.allocUnsafe(n+i+4);o.copy(a,0,0,n),this.ipad1=a,this.ipad2=o,this.opad=s,this.alg=t,this.blocksize=n,this.hash=r,this.size=dh[t]}ch.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)};var ph,mh,gh=function(t,e,i,r,n){ah(i,r);var o=new ch(n=n||"sha1",t=fh(t,uh,"Password"),(e=fh(e,uh,"Salt")).length),s=hh.allocUnsafe(r),h=hh.allocUnsafe(e.length+4);e.copy(h,0,0,e.length);for(var a=0,u=dh[n],f=Math.ceil(r/u),l=1;l<=f;l++){h.writeUInt32BE(l,e.length);for(var d=o.run(h,o.ipad1),c=d,p=1;p<i;p++){c=o.run(c,o.ipad2);for(var m=0;m<u;m++)d[m]^=c[m]}d.copy(s,a),a+=u}return s},vh=Re.Buffer,bh=th,yh=eh,wh=gh,Mh=rh,_h=Tt.crypto&&Tt.crypto.subtle,Sh={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},Eh=[];function Ah(){return mh||(mh=Tt.process&&Tt.process.nextTick?Tt.process.nextTick:Tt.queueMicrotask?Tt.queueMicrotask:Tt.setImmediate?Tt.setImmediate:Tt.setTimeout)}function kh(t,e,i,r,n){return _h.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return _h.deriveBits({name:"PBKDF2",salt:e,iterations:i,hash:{name:n}},t,r<<3)})).then((function(t){return vh.from(t)}))}Js.pbkdf2=function(t,e,i,r,n,o){"function"==typeof n&&(o=n,n=void 0);var s=Sh[(n=n||"sha1").toLowerCase()];if(s&&"function"==typeof Tt.Promise){if(bh(i,r),t=Mh(t,yh,"Password"),e=Mh(e,yh,"Salt"),"function"!=typeof o)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){Ah()((function(){e(null,t)}))}),(function(t){Ah()((function(){e(t)}))}))}(function(t){if(Tt.process&&!Tt.process.browser)return Promise.resolve(!1);if(!_h||!_h.importKey||!_h.deriveBits)return Promise.resolve(!1);if(void 0!==Eh[t])return Eh[t];var e=kh(ph=ph||vh.alloc(8),ph,10,128,t).then((function(){return!0})).catch((function(){return!1}));return Eh[t]=e,e}(s).then((function(o){return o?kh(t,e,i,r,s):wh(t,e,i,r,n)})),o)}else Ah()((function(){var s;try{s=wh(t,e,i,r,n)}catch(t){return o(t)}o(null,s)}))},Js.pbkdf2Sync=gh;var Rh={},Ih={},Oh={readUInt32BE:function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},writeUInt32BE:function(t,e,i){t[0+i]=e>>>24,t[1+i]=e>>>16&255,t[2+i]=e>>>8&255,t[3+i]=255&e},ip:function(t,e,i,r){for(var n=0,o=0,s=6;s>=0;s-=2){for(var h=0;h<=24;h+=8)n<<=1,n|=e>>>h+s&1;for(h=0;h<=24;h+=8)n<<=1,n|=t>>>h+s&1}for(s=6;s>=0;s-=2){for(h=1;h<=25;h+=8)o<<=1,o|=e>>>h+s&1;for(h=1;h<=25;h+=8)o<<=1,o|=t>>>h+s&1}i[r+0]=n>>>0,i[r+1]=o>>>0},rip:function(t,e,i,r){for(var n=0,o=0,s=0;s<4;s++)for(var h=24;h>=0;h-=8)n<<=1,n|=e>>>h+s&1,n<<=1,n|=t>>>h+s&1;for(s=4;s<8;s++)for(h=24;h>=0;h-=8)o<<=1,o|=e>>>h+s&1,o<<=1,o|=t>>>h+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},pc1:function(t,e,i,r){for(var n=0,o=0,s=7;s>=5;s--){for(var h=0;h<=24;h+=8)n<<=1,n|=e>>h+s&1;for(h=0;h<=24;h+=8)n<<=1,n|=t>>h+s&1}for(h=0;h<=24;h+=8)n<<=1,n|=e>>h+s&1;for(s=1;s<=3;s++){for(h=0;h<=24;h+=8)o<<=1,o|=e>>h+s&1;for(h=0;h<=24;h+=8)o<<=1,o|=t>>h+s&1}for(h=0;h<=24;h+=8)o<<=1,o|=t>>h+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},r28shl:function(t,e){return t<<e&268435455|t>>>28-e}},Th=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Oh.pc2=function(t,e,i,r){for(var n=0,o=0,s=Th.length>>>1,h=0;h<s;h++)n<<=1,n|=t>>>Th[h]&1;for(h=s;h<Th.length;h++)o<<=1,o|=e>>>Th[h]&1;i[r+0]=n>>>0,i[r+1]=o>>>0},Oh.expand=function(t,e,i){var r=0,n=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[i+0]=r>>>0,e[i+1]=n>>>0};var Bh=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Oh.substitute=function(t,e){for(var i=0,r=0;r<4;r++){i<<=4,i|=Bh[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){i<<=4,i|=Bh[256+64*r+(e>>>18-6*r&63)]}return i>>>0};var Ph=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Oh.permute=function(t){for(var e=0,i=0;i<Ph.length;i++)e<<=1,e|=t>>>Ph[i]&1;return e>>>0},Oh.padSplit=function(t,e,i){for(var r=t.toString(2);r.length<e;)r="0"+r;for(var n=[],o=0;o<e;o+=i)n.push(r.slice(o,o+i));return n.join(" ")};var Nh=xh;function xh(t,e){if(!t)throw new Error(e||"Assertion failed")}xh.equal=function(t,e,i){if(t!=e)throw new Error(i||"Assertion failed: "+t+" != "+e)};var Lh=Nh;function Dh(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}var Ch=Dh;Dh.prototype._init=function(){},Dh.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},Dh.prototype._buffer=function(t,e){for(var i=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r<i;r++)this.buffer[this.bufferOff+r]=t[e+r];return this.bufferOff+=i,i},Dh.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},Dh.prototype._updateEncrypt=function(t){var e=0,i=0,r=(this.bufferOff+t.length)/this.blockSize|0,n=new Array(r*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(n,i)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,n,i),i+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return n},Dh.prototype._updateDecrypt=function(t){for(var e=0,i=0,r=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,n=new Array(r*this.blockSize);r>0;r--)e+=this._buffer(t,e),i+=this._flushBuffer(n,i);return e+=this._buffer(t,e),n},Dh.prototype.final=function(t){var e,i;return t&&(e=this.update(t)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(i):i},Dh.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},Dh.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},Dh.prototype._unpad=function(t){return t},Dh.prototype._finalDecrypt=function(){Lh.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)};var qh=Nh,Uh=Oh,jh=Ch;function zh(){this.tmp=new Array(2),this.keys=null}function Fh(t){jh.call(this,t);var e=new zh;this._desState=e,this.deriveKeys(e,t.key)}xe(Fh,jh);var Hh=Fh;Fh.create=function(t){return new Fh(t)};var Kh=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Fh.prototype.deriveKeys=function(t,e){t.keys=new Array(32),qh.equal(e.length,this.blockSize,"Invalid key length");var i=Uh.readUInt32BE(e,0),r=Uh.readUInt32BE(e,4);Uh.pc1(i,r,t.tmp,0),i=t.tmp[0],r=t.tmp[1];for(var n=0;n<t.keys.length;n+=2){var o=Kh[n>>>1];i=Uh.r28shl(i,o),r=Uh.r28shl(r,o),Uh.pc2(i,r,t.keys,n)}},Fh.prototype._update=function(t,e,i,r){var n=this._desState,o=Uh.readUInt32BE(t,e),s=Uh.readUInt32BE(t,e+4);Uh.ip(o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,s,n.tmp,0):this._decrypt(n,o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],Uh.writeUInt32BE(i,o,r),Uh.writeUInt32BE(i,s,r+4)},Fh.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var i=t.length-e,r=e;r<t.length;r++)t[r]=i;return!0},Fh.prototype._unpad=function(t){if(!1===this.padding)return t;for(var e=t[t.length-1],i=t.length-e;i<t.length;i++)qh.equal(t[i],e);return t.slice(0,t.length-e)},Fh.prototype._encrypt=function(t,e,i,r,n){for(var o=e,s=i,h=0;h<t.keys.length;h+=2){var a=t.keys[h],u=t.keys[h+1];Uh.expand(s,t.tmp,0),a^=t.tmp[0],u^=t.tmp[1];var f=Uh.substitute(a,u),l=s;s=(o^Uh.permute(f))>>>0,o=l}Uh.rip(s,o,r,n)},Fh.prototype._decrypt=function(t,e,i,r,n){for(var o=i,s=e,h=t.keys.length-2;h>=0;h-=2){var a=t.keys[h],u=t.keys[h+1];Uh.expand(o,t.tmp,0),a^=t.tmp[0],u^=t.tmp[1];var f=Uh.substitute(a,u),l=o;o=(s^Uh.permute(f))>>>0,s=l}Uh.rip(o,s,r,n)};var Gh={},Yh=Nh,Vh=xe,Zh={};function Wh(t){Yh.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}Gh.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}Vh(e,t);for(var i=Object.keys(Zh),r=0;r<i.length;r++){var n=i[r];e.prototype[n]=Zh[n]}return e.create=function(t){return new e(t)},e},Zh._cbcInit=function(){var t=new Wh(this.options.iv);this._cbcState=t},Zh._update=function(t,e,i,r){var n=this._cbcState,o=this.constructor.super_.prototype,s=n.iv;if("encrypt"===this.type){for(var h=0;h<this.blockSize;h++)s[h]^=t[e+h];o._update.call(this,s,0,i,r);for(h=0;h<this.blockSize;h++)s[h]=i[r+h]}else{o._update.call(this,t,e,i,r);for(h=0;h<this.blockSize;h++)i[r+h]^=s[h];for(h=0;h<this.blockSize;h++)s[h]=t[e+h]}};var Xh=Nh,Qh=Ch,Jh=Hh;function $h(t,e){Xh.equal(e.length,24,"Invalid key length");var i=e.slice(0,8),r=e.slice(8,16),n=e.slice(16,24);this.ciphers="encrypt"===t?[Jh.create({type:"encrypt",key:i}),Jh.create({type:"decrypt",key:r}),Jh.create({type:"encrypt",key:n})]:[Jh.create({type:"decrypt",key:n}),Jh.create({type:"encrypt",key:r}),Jh.create({type:"decrypt",key:i})]}function ta(t){Qh.call(this,t);var e=new $h(this.type,this.options.key);this._edeState=e}xe(ta,Qh);var ea=ta;ta.create=function(t){return new ta(t)},ta.prototype._update=function(t,e,i,r){var n=this._edeState;n.ciphers[0]._update(t,e,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r)},ta.prototype._pad=Jh.prototype._pad,ta.prototype._unpad=Jh.prototype._unpad,Ih.utils=Oh,Ih.Cipher=Ch,Ih.DES=Hh,Ih.CBC=Gh,Ih.EDE=ea;var ia=Ss,ra=Ih,na=xe,oa=Re.Buffer,sa={"des-ede3-cbc":ra.CBC.instantiate(ra.EDE),"des-ede3":ra.EDE,"des-ede-cbc":ra.CBC.instantiate(ra.EDE),"des-ede":ra.EDE,"des-cbc":ra.CBC.instantiate(ra.DES),"des-ecb":ra.DES};sa.des=sa["des-cbc"],sa.des3=sa["des-ede3-cbc"];var ha=aa;function aa(t){ia.call(this);var e,i=t.mode.toLowerCase(),r=sa[i];e=t.decrypt?"decrypt":"encrypt";var n=t.key;oa.isBuffer(n)||(n=oa.from(n)),"des-ede"!==i&&"des-ede-cbc"!==i||(n=oa.concat([n,n.slice(0,8)]));var o=t.iv;oa.isBuffer(o)||(o=oa.from(o)),this._des=r.create({key:n,iv:o,type:e})}na(aa,ia),aa.prototype._update=function(t){return oa.from(this._des.update(t))},aa.prototype._final=function(){return oa.from(this._des.final())};var ua={},fa={},la={encrypt:function(t,e){return t._cipher.encryptBlock(e)},decrypt:function(t,e){return t._cipher.decryptBlock(e)}},da={},ca=function(t,e){for(var i=Math.min(t.length,e.length),r=new K(i),n=0;n<i;++n)r[n]=t[n]^e[n];return r},pa=ca;da.encrypt=function(t,e){var i=pa(e,t._prev);return t._prev=t._cipher.encryptBlock(i),t._prev},da.decrypt=function(t,e){var i=t._prev;t._prev=e;var r=t._cipher.decryptBlock(e);return pa(r,i)};var ma={},ga=Re.Buffer,va=ca;function ba(t,e,i){var r=e.length,n=va(e,t._cache);return t._cache=t._cache.slice(r),t._prev=ga.concat([t._prev,i?e:n]),n}ma.encrypt=function(t,e,i){for(var r,n=ga.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=ga.allocUnsafe(0)),!(t._cache.length<=e.length)){n=ga.concat([n,ba(t,e,i)]);break}r=t._cache.length,n=ga.concat([n,ba(t,e.slice(0,r),i)]),e=e.slice(r)}return n};var ya={},wa=Re.Buffer;function Ma(t,e,i){var r=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=wa.concat([t._prev.slice(1),wa.from([i?e:r])]),r}ya.encrypt=function(t,e,i){for(var r=e.length,n=wa.allocUnsafe(r),o=-1;++o<r;)n[o]=Ma(t,e[o],i);return n};var _a={},Sa=Re.Buffer;function Ea(t,e,i){for(var r,n,o=-1,s=0;++o<8;)r=e&1<<7-o?128:0,s+=(128&(n=t._cipher.encryptBlock(t._prev)[0]^r))>>o%8,t._prev=Aa(t._prev,i?r:n);return s}function Aa(t,e){var i=t.length,r=-1,n=Sa.allocUnsafe(t.length);for(t=Sa.concat([t,Sa.from([e])]);++r<i;)n[r]=t[r]<<1|t[r+1]>>7;return n}_a.encrypt=function(t,e,i){for(var r=e.length,n=Sa.allocUnsafe(r),o=-1;++o<r;)n[o]=Ea(t,e[o],i);return n};var ka={},Ra=ca;function Ia(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}ka.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=K.concat([t._cache,Ia(t)]);var i=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),Ra(e,i)};var Oa={};var Ta=function(t){for(var e,i=t.length;i--;){if(255!==(e=t.readUInt8(i))){e++,t.writeUInt8(e,i);break}t.writeUInt8(0,i)}},Ba=ca,Pa=Re.Buffer,Na=Ta;function xa(t){var e=t._cipher.encryptBlockRaw(t._prev);return Na(t._prev),e}Oa.encrypt=function(t,e){var i=Math.ceil(e.length/16),r=t._cache.length;t._cache=Pa.concat([t._cache,Pa.allocUnsafe(16*i)]);for(var n=0;n<i;n++){var o=xa(t),s=r+16*n;t._cache.writeUInt32BE(o[0],s+0),t._cache.writeUInt32BE(o[1],s+4),t._cache.writeUInt32BE(o[2],s+8),t._cache.writeUInt32BE(o[3],s+12)}var h=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),Ba(e,h)};var La={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},Da={ECB:la,CBC:da,CFB:ma,CFB8:ya,CFB1:_a,OFB:ka,CTR:Oa,GCM:Oa},Ca=La;for(var qa in Ca)Ca[qa].module=Da[Ca[qa].mode];var Ua=Ca,ja={},za=Re.Buffer;function Fa(t){za.isBuffer(t)||(t=za.from(t));for(var e=t.length/4|0,i=new Array(e),r=0;r<e;r++)i[r]=t.readUInt32BE(4*r);return i}function Ha(t){for(;0<t.length;t++)t[0]=0}function Ka(t,e,i,r,n){for(var o,s,h,a,u=i[0],f=i[1],l=i[2],d=i[3],c=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],g=t[3]^e[3],v=4,b=1;b<n;b++)o=u[c>>>24]^f[p>>>16&255]^l[m>>>8&255]^d[255&g]^e[v++],s=u[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^d[255&c]^e[v++],h=u[m>>>24]^f[g>>>16&255]^l[c>>>8&255]^d[255&p]^e[v++],a=u[g>>>24]^f[c>>>16&255]^l[p>>>8&255]^d[255&m]^e[v++],c=o,p=s,m=h,g=a;return o=(r[c>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^e[v++],s=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&c])^e[v++],h=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[c>>>8&255]<<8|r[255&p])^e[v++],a=(r[g>>>24]<<24|r[c>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[v++],[o>>>=0,s>>>=0,h>>>=0,a>>>=0]}var Ga=[0,1,2,4,8,16,32,64,128,27,54],Ya=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var i=[],r=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,h=0,a=0;a<256;++a){var u=h^h<<1^h<<2^h<<3^h<<4;u=u>>>8^255&u^99,i[s]=u,r[u]=s;var f=t[s],l=t[f],d=t[l],c=257*t[u]^16843008*u;n[0][s]=c<<24|c>>>8,n[1][s]=c<<16|c>>>16,n[2][s]=c<<8|c>>>24,n[3][s]=c,c=16843009*d^65537*l^257*f^16843008*s,o[0][u]=c<<24|c>>>8,o[1][u]=c<<16|c>>>16,o[2][u]=c<<8|c>>>24,o[3][u]=c,0===s?s=h=1:(s=f^t[t[t[d^f]]],h^=t[t[h]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:o}}();function Va(t){this._key=Fa(t),this._reset()}Va.blockSize=16,Va.keySize=32,Va.prototype.blockSize=Va.blockSize,Va.prototype.keySize=Va.keySize,Va.prototype._reset=function(){for(var t=this._key,e=t.length,i=e+6,r=4*(i+1),n=[],o=0;o<e;o++)n[o]=t[o];for(o=e;o<r;o++){var s=n[o-1];o%e==0?(s=s<<8|s>>>24,s=Ya.SBOX[s>>>24]<<24|Ya.SBOX[s>>>16&255]<<16|Ya.SBOX[s>>>8&255]<<8|Ya.SBOX[255&s],s^=Ga[o/e|0]<<24):e>6&&o%e==4&&(s=Ya.SBOX[s>>>24]<<24|Ya.SBOX[s>>>16&255]<<16|Ya.SBOX[s>>>8&255]<<8|Ya.SBOX[255&s]),n[o]=n[o-e]^s}for(var h=[],a=0;a<r;a++){var u=r-a,f=n[u-(a%4?0:4)];h[a]=a<4||u<=4?f:Ya.INV_SUB_MIX[0][Ya.SBOX[f>>>24]]^Ya.INV_SUB_MIX[1][Ya.SBOX[f>>>16&255]]^Ya.INV_SUB_MIX[2][Ya.SBOX[f>>>8&255]]^Ya.INV_SUB_MIX[3][Ya.SBOX[255&f]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=h},Va.prototype.encryptBlockRaw=function(t){return Ka(t=Fa(t),this._keySchedule,Ya.SUB_MIX,Ya.SBOX,this._nRounds)},Va.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),i=za.allocUnsafe(16);return i.writeUInt32BE(e[0],0),i.writeUInt32BE(e[1],4),i.writeUInt32BE(e[2],8),i.writeUInt32BE(e[3],12),i},Va.prototype.decryptBlock=function(t){var e=(t=Fa(t))[1];t[1]=t[3],t[3]=e;var i=Ka(t,this._invKeySchedule,Ya.INV_SUB_MIX,Ya.INV_SBOX,this._nRounds),r=za.allocUnsafe(16);return r.writeUInt32BE(i[0],0),r.writeUInt32BE(i[3],4),r.writeUInt32BE(i[2],8),r.writeUInt32BE(i[1],12),r},Va.prototype.scrub=function(){Ha(this._keySchedule),Ha(this._invKeySchedule),Ha(this._key)},ja.AES=Va;var Za=Re.Buffer,Wa=Za.alloc(16,0);function Xa(t){var e=Za.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function Qa(t){this.h=t,this.state=Za.alloc(16,0),this.cache=Za.allocUnsafe(0)}Qa.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},Qa.prototype._multiply=function(){for(var t,e,i,r=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],n=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),i=0!=(1&r[3]),e=3;e>0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=Xa(n)},Qa.prototype.update=function(t){var e;for(this.cache=Za.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},Qa.prototype.final=function(t,e){return this.cache.length&&this.ghash(Za.concat([this.cache,Wa],16)),this.ghash(Xa([0,t,0,e])),this.state};var Ja=Qa,$a=ja,tu=Re.Buffer,eu=Ss,iu=Ja,ru=ca,nu=Ta;function ou(t,e,i,r){eu.call(this);var n=tu.alloc(4,0);this._cipher=new $a.AES(e);var o=this._cipher.encryptBlock(n);this._ghash=new iu(o),i=function(t,e,i){if(12===e.length)return t._finID=tu.concat([e,tu.from([0,0,0,1])]),tu.concat([e,tu.from([0,0,0,2])]);var r=new iu(i),n=e.length,o=n%16;r.update(e),o&&(o=16-o,r.update(tu.alloc(o,0))),r.update(tu.alloc(8,0));var s=8*n,h=tu.alloc(8);h.writeUIntBE(s,0,8),r.update(h),t._finID=r.state;var a=tu.from(t._finID);return nu(a),a}(this,i,o),this._prev=tu.from(i),this._cache=tu.allocUnsafe(0),this._secCache=tu.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}xe(ou,eu),ou.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=tu.alloc(e,0),this._ghash.update(e))}this._called=!0;var i=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(i),this._len+=t.length,i},ou.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=ru(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var i=0;t.length!==e.length&&i++;for(var r=Math.min(t.length,e.length),n=0;n<r;++n)i+=t[n]^e[n];return i}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},ou.prototype.getAuthTag=function(){if(this._decrypt||!tu.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},ou.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},ou.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length};var su=ou,hu=ja,au=Re.Buffer,uu=Ss;function fu(t,e,i,r){uu.call(this),this._cipher=new hu.AES(e),this._prev=au.from(i),this._cache=au.allocUnsafe(0),this._secCache=au.allocUnsafe(0),this._decrypt=r,this._mode=t}xe(fu,uu),fu.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},fu.prototype._final=function(){this._cipher.scrub()};var lu=fu,du=Re.Buffer,cu=Yr;var pu=function(t,e,i,r){if(du.isBuffer(t)||(t=du.from(t,"binary")),e&&(du.isBuffer(e)||(e=du.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=i/8,o=du.alloc(n),s=du.alloc(r||0),h=du.alloc(0);n>0||r>0;){var a=new cu;a.update(h),a.update(t),e&&a.update(e),h=a.digest();var u=0;if(n>0){var f=o.length-n;u=Math.min(n,h.length),h.copy(o,f,0,u),n-=u}if(u<h.length&&r>0){var l=s.length-r,d=Math.min(r,h.length-u);h.copy(s,l,u,u+d),r-=d}}return h.fill(0),{key:o,iv:s}},mu=Ua,gu=su,vu=Re.Buffer,bu=lu,yu=Ss,wu=ja,Mu=pu;function _u(t,e,i){yu.call(this),this._cache=new Eu,this._cipher=new wu.AES(e),this._prev=vu.from(i),this._mode=t,this._autopadding=!0}xe(_u,yu),_u.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get();)i=this._mode.encrypt(this,e),r.push(i);return vu.concat(r)};var Su=vu.alloc(16,16);function Eu(){this.cache=vu.allocUnsafe(0)}function Au(t,e,i){var r=mu[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=vu.from(e)),e.length!==r.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof i&&(i=vu.from(i)),"GCM"!==r.mode&&i.length!==r.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===r.type?new bu(r.module,e,i):"auth"===r.type?new gu(r.module,e,i):new _u(r.module,e,i)}_u.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(Su))throw this._cipher.scrub(),new Error("data not multiple of block length")},_u.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},Eu.prototype.add=function(t){this.cache=vu.concat([this.cache,t])},Eu.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},Eu.prototype.flush=function(){for(var t=16-this.cache.length,e=vu.allocUnsafe(t),i=-1;++i<t;)e.writeUInt8(t,i);return vu.concat([this.cache,e])},fa.createCipheriv=Au,fa.createCipher=function(t,e){var i=mu[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=Mu(e,!1,i.key,i.iv);return Au(t,r.key,r.iv)};var ku={},Ru=su,Iu=Re.Buffer,Ou=Ua,Tu=lu,Bu=Ss,Pu=ja,Nu=pu;function xu(t,e,i){Bu.call(this),this._cache=new Lu,this._last=void 0,this._cipher=new Pu.AES(e),this._prev=Iu.from(i),this._mode=t,this._autopadding=!0}function Lu(){this.cache=Iu.allocUnsafe(0)}function Du(t,e,i){var r=Ou[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=Iu.from(i)),"GCM"!==r.mode&&i.length!==r.iv)throw new TypeError("invalid iv length "+i.length);if("string"==typeof e&&(e=Iu.from(e)),e.length!==r.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===r.type?new Tu(r.module,e,i,!0):"auth"===r.type?new Ru(r.module,e,i,!0):new xu(r.module,e,i)}xe(xu,Bu),xu.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,e),r.push(i);return Iu.concat(r)},xu.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var i=-1;for(;++i<e;)if(t[i+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},xu.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},Lu.prototype.add=function(t){this.cache=Iu.concat([this.cache,t])},Lu.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},Lu.prototype.flush=function(){if(this.cache.length)return this.cache},ku.createDecipher=function(t,e){var i=Ou[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=Nu(e,!1,i.key,i.iv);return Du(t,r.key,r.iv)},ku.createDecipheriv=Du;var Cu=fa,qu=ku,Uu=La;ua.createCipher=ua.Cipher=Cu.createCipher,ua.createCipheriv=ua.Cipheriv=Cu.createCipheriv,ua.createDecipher=ua.Decipher=qu.createDecipher,ua.createDecipheriv=ua.Decipheriv=qu.createDecipheriv,ua.listCiphers=ua.getCiphers=function(){return Object.keys(Uu)};var ju={};!function(t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}}(ju);var zu=ha,Fu=ua,Hu=Ua,Ku=ju,Gu=pu;function Yu(t,e,i){if(t=t.toLowerCase(),Hu[t])return Fu.createCipheriv(t,e,i);if(Ku[t])return new zu({key:e,iv:i,mode:t});throw new TypeError("invalid suite type")}function Vu(t,e,i){if(t=t.toLowerCase(),Hu[t])return Fu.createDecipheriv(t,e,i);if(Ku[t])return new zu({key:e,iv:i,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}Rh.createCipher=Rh.Cipher=function(t,e){var i,r;if(t=t.toLowerCase(),Hu[t])i=Hu[t].key,r=Hu[t].iv;else{if(!Ku[t])throw new TypeError("invalid suite type");i=8*Ku[t].key,r=Ku[t].iv}var n=Gu(e,!1,i,r);return Yu(t,n.key,n.iv)},Rh.createCipheriv=Rh.Cipheriv=Yu,Rh.createDecipher=Rh.Decipher=function(t,e){var i,r;if(t=t.toLowerCase(),Hu[t])i=Hu[t].key,r=Hu[t].iv;else{if(!Ku[t])throw new TypeError("invalid suite type");i=8*Ku[t].key,r=Ku[t].iv}var n=Gu(e,!1,i,r);return Vu(t,n.key,n.iv)},Rh.createDecipheriv=Rh.Decipheriv=Vu,Rh.listCiphers=Rh.getCiphers=function(){return Object.keys(Ku).concat(Fu.getCiphers())};var Zu={},Wu={},Xu={get exports(){return Wu},set exports(t){Wu=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Xu,Tt);var Qu={},Ju={get exports(){return Qu},set exports(t){Qu=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Ju,Tt);var $u,tf,ef,rf,nf,of={},sf={get exports(){return of},set exports(t){of=t}};function hf(){if($u)return of;var t;function e(t){this.rand=t}if($u=1,sf.exports=function(i){return t||(t=new e(null)),t.generate(i)},of.Rand=e,e.prototype.generate=function(t){return this._rand(t)},e.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),i=0;i<e.length;i++)e[i]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(e.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var i=Ug();if("function"!=typeof i.randomBytes)throw new Error("Not supported");e.prototype._rand=function(t){return i.randomBytes(t)}}catch(t){}return of}function af(){if(ef)return tf;ef=1;var t=Qu,e=hf();function i(t){this.rand=t||new e.Rand}return tf=i,i.create=function(t){return new i(t)},i.prototype._randbelow=function(e){var i=e.bitLength(),r=Math.ceil(i/8);do{var n=new t(this.rand.generate(r))}while(n.cmp(e)>=0);return n},i.prototype._randrange=function(t,e){var i=e.sub(t);return t.add(this._randbelow(i))},i.prototype.test=function(e,i,r){var n=e.bitLength(),o=t.mont(e),s=new t(1).toRed(o);i||(i=Math.max(1,n/48|0));for(var h=e.subn(1),a=0;!h.testn(a);a++);for(var u=e.shrn(a),f=h.toRed(o);i>0;i--){var l=this._randrange(new t(2),h);r&&r(l);var d=l.toRed(o).redPow(u);if(0!==d.cmp(s)&&0!==d.cmp(f)){for(var c=1;c<a;c++){if(0===(d=d.redSqr()).cmp(s))return!1;if(0===d.cmp(f))break}if(c===a)return!1}}return!0},i.prototype.getDivisor=function(e,i){var r=e.bitLength(),n=t.mont(e),o=new t(1).toRed(n);i||(i=Math.max(1,r/48|0));for(var s=e.subn(1),h=0;!s.testn(h);h++);for(var a=e.shrn(h),u=s.toRed(n);i>0;i--){var f=this._randrange(new t(2),s),l=e.gcd(f);if(0!==l.cmpn(1))return l;var d=f.toRed(n).redPow(a);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var c=1;c<h;c++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(e);if(0===d.cmp(u))break}if(c===h)return(d=d.redSqr()).fromRed().subn(1).gcd(e)}}return!1},tf}function uf(){if(nf)return rf;nf=1;var t=Ae;rf=m,m.simpleSieve=c,m.fermatTest=p;var e=Wu,i=new e(24),r=new(af()),n=new e(1),o=new e(2),s=new e(5);new e(16),new e(8);var h=new e(10),a=new e(3);new e(7);var u=new e(11),f=new e(4);new e(12);var l=null;function d(){if(null!==l)return l;var t=[];t[0]=2;for(var e=1,i=3;i<1048576;i+=2){for(var r=Math.ceil(Math.sqrt(i)),n=0;n<e&&t[n]<=r&&i%t[n]!=0;n++);e!==n&&t[n]<=r||(t[e++]=i)}return l=t,t}function c(t){for(var e=d(),i=0;i<e.length;i++)if(0===t.modn(e[i]))return 0===t.cmpn(e[i]);return!0}function p(t){var i=e.mont(t);return 0===o.toRed(i).redPow(t.subn(1)).fromRed().cmpn(1)}function m(l,d){if(l<16)return new e(2===d||5===d?[140,123]:[140,39]);var m,g;for(d=new e(d);;){for(m=new e(t(Math.ceil(l/8)));m.bitLength()>l;)m.ishrn(1);if(m.isEven()&&m.iadd(n),m.testn(1)||m.iadd(o),d.cmp(o)){if(!d.cmp(s))for(;m.mod(h).cmp(a);)m.iadd(f)}else for(;m.mod(i).cmp(u);)m.iadd(f);if(c(g=m.shrn(1))&&c(m)&&p(g)&&p(m)&&r.test(g)&&r.test(m))return m}}return rf}var ff,lf,df,cf={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};function pf(){if(lf)return ff;lf=1;var t=Wu,e=new(af()),i=new t(24),r=new t(11),n=new t(10),o=new t(3),s=new t(7),h=uf(),a=Ae;function u(e,i){return i=i||"utf8",K.isBuffer(e)||(e=new K(e,i)),this._pub=new t(e),this}function f(e,i){return i=i||"utf8",K.isBuffer(e)||(e=new K(e,i)),this._priv=new t(e),this}ff=d;var l={};function d(e,i,r){this.setGenerator(i),this.__prime=new t(e),this._prime=t.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=u,this.setPrivateKey=f):this._primeCode=8}function c(t,e){var i=new K(t.toArray());return e?i.toString(e):i}return Object.defineProperty(d.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,a){var u=a.toString("hex"),f=[u,t.toString(16)].join("_");if(f in l)return l[f];var d,c=0;if(t.isEven()||!h.simpleSieve||!h.fermatTest(t)||!e.test(t))return c+=1,c+="02"===u||"05"===u?8:4,l[f]=c,c;switch(e.test(t.shrn(1))||(c+=2),u){case"02":t.mod(i).cmp(r)&&(c+=8);break;case"05":(d=t.mod(n)).cmp(o)&&d.cmp(s)&&(c+=8);break;default:c+=4}return l[f]=c,c}(this.__prime,this.__gen)),this._primeCode}}),d.prototype.generateKeys=function(){return this._priv||(this._priv=new t(a(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},d.prototype.computeSecret=function(e){var i=new K((e=(e=new t(e)).toRed(this._prime)).redPow(this._priv).fromRed().toArray()),r=this.getPrime();if(i.length<r.length){var n=new K(r.length-i.length);n.fill(0),i=K.concat([n,i])}return i},d.prototype.getPublicKey=function(t){return c(this._pub,t)},d.prototype.getPrivateKey=function(t){return c(this._priv,t)},d.prototype.getPrime=function(t){return c(this.__prime,t)},d.prototype.getGenerator=function(t){return c(this._gen,t)},d.prototype.setGenerator=function(e,i){return i=i||"utf8",K.isBuffer(e)||(e=new K(e,i)),this.__gen=e,this._gen=new t(e),this},ff}var mf={},gf={get exports(){return mf},set exports(t){mf=t}},vf={},bf={get exports(){return vf},set exports(t){vf=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+t)}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,r,n){for(var o=0,s=0,h=Math.min(t.length,r),a=e;a<h;a++){var u=t.charCodeAt(a)-48;o*=n,s=u>=49?u-49+10:u>=17?u-17+10:u,i(u>=0&&s<n,"Invalid character"),o+=s}return o}function u(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this._strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype._move=function(t){u(t,this)},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(t){n.prototype.inspect=f}else n.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i._strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);o=h>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==o||s!==this.length-1?l[6-a.length]+a+r:a+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],f=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(f).toString(t);r=(p=p.idivn(f)).isZero()?m+r:l[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,n),s},n.prototype._toArrayLikeLE=function(t,e){for(var i=0,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;t[i++]=255&s,i<t.length&&(t[i++]=s>>8&255),i<t.length&&(t[i++]=s>>16&255),6===o?(i<t.length&&(t[i++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i<t.length)for(t[i++]=r;i<t.length;)t[i++]=0},n.prototype._toArrayLikeBE=function(t,e){for(var i=t.length-1,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;t[i--]=255&s,i>=0&&(t[i--]=s>>8&255),i>=0&&(t[i--]=s>>16&255),6===o?(i>=0&&(t[i--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i>=0)for(t[i--]=r;i>=0;)t[i--]=0},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this._strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var m=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function g(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i._strip()}function v(t,e,i){return g(t,e,i)}Math.imul||(m=p),n.prototype.mulTo=function(t,e){var i=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):i<63?p(this,t,e):i<1024?g(this,t,e):v(this,t,e)},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),v(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i("number"==typeof t),i(t<67108864);for(var r=0,n=0;n<this.length;n++){var o=(0|this.words[n])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[n]=67108863&s}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=t.words[r]>>>n&1}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this._strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this._strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this._strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h._strip(),r._strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modrn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%t;return e?-n:n},n.prototype.modn=function(t){return this.modrn(t)},n.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new E(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},r(w,y),w.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},w.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(M,y),r(_,y),r(S,y),S.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new M;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return b[t]=e,e},E.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new A(t)},r(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(bf,Tt);var yf=vf,wf=Ae;function Mf(t){var e,i=t.modulus.byteLength();do{e=new yf(wf(i))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function _f(t,e){var i=function(t){var e=Mf(t);return{blinder:e.toRed(yf.mont(t.modulus)).redPow(new yf(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),r=e.modulus.byteLength(),n=new yf(t).mul(i.blinder).umod(e.modulus),o=n.toRed(yf.mont(e.prime1)),s=n.toRed(yf.mont(e.prime2)),h=e.coefficient,a=e.prime1,u=e.prime2,f=o.redPow(e.exponent1).fromRed(),l=s.redPow(e.exponent2).fromRed(),d=f.isub(l).imul(h).umod(a).imul(u);return l.iadd(d).imul(i.unblinder).umod(e.modulus).toArrayLike(K,"be",r)}_f.getr=Mf;var Sf=_f,Ef={};var Af={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}},kf={},Rf={},If={get exports(){return Rf},set exports(t){Rf=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(If,Tt);var Of={};!function(t){var e=Of;function i(t){return 1===t.length?"0"+t:t}function r(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"!=typeof t){for(var r=0;r<t.length;r++)i[r]=0|t[r];return i}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(r=0;r<t.length;r+=2)i.push(parseInt(t[r]+t[r+1],16))}else for(r=0;r<t.length;r++){var n=t.charCodeAt(r),o=n>>8,s=255&n;o?i.push(o,s):i.push(s)}return i},e.zero2=i,e.toHex=r,e.encode=function(t,e){return"hex"===e?r(t):t}}(),function(t){var e=kf,i=Rf,r=Nh,n=Of;e.assert=r,e.toArray=n.toArray,e.zero2=n.zero2,e.toHex=n.toHex,e.encode=n.encode,e.getNAF=function(t,e,i){var r=new Array(Math.max(t.bitLength(),i)+1);r.fill(0);for(var n=1<<e+1,o=t.clone(),s=0;s<r.length;s++){var h,a=o.andln(n-1);o.isOdd()?(h=a>(n>>1)-1?(n>>1)-a:a,o.isubn(h)):h=0,r[s]=h,o.iushrn(1)}return r},e.getJSF=function(t,e){var i=[[],[]];t=t.clone(),e=e.clone();for(var r,n=0,o=0;t.cmpn(-n)>0||e.cmpn(-o)>0;){var s,h,a=t.andln(3)+n&3,u=e.andln(3)+o&3;3===a&&(a=-1),3===u&&(u=-1),s=0==(1&a)?0:3!==(r=t.andln(7)+n&7)&&5!==r||2!==u?a:-a,i[0].push(s),h=0==(1&u)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==a?u:-u,i[1].push(h),2*n===s+1&&(n=1-n),2*o===h+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return i},e.cachedProperty=function(t,e,i){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(t){return new i(t,"hex","le")}}();var Tf={},Bf=Rf,Pf=kf,Nf=Pf.getNAF,xf=Pf.getJSF,Lf=Pf.assert;function Df(t,e){this.type=t,this.p=new Bf(e.p,16),this.red=e.prime?Bf.red(e.prime):Bf.mont(this.p),this.zero=new Bf(0).toRed(this.red),this.one=new Bf(1).toRed(this.red),this.two=new Bf(2).toRed(this.red),this.n=e.n&&new Bf(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Cf=Df;function qf(t,e){this.curve=t,this.type=e,this.precomputed=null}Df.prototype.point=function(){throw new Error("Not implemented")},Df.prototype.validate=function(){throw new Error("Not implemented")},Df.prototype._fixedNafMul=function(t,e){Lf(t.precomputed);var i=t._getDoubles(),r=Nf(e,1,this._bitLength),n=(1<<i.step+1)-(i.step%2==0?2:1);n/=3;var o,s,h=[];for(o=0;o<r.length;o+=i.step){s=0;for(var a=o+i.step-1;a>=o;a--)s=(s<<1)+r[a];h.push(s)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=n;l>0;l--){for(o=0;o<h.length;o++)(s=h[o])===l?f=f.mixedAdd(i.points[o]):s===-l&&(f=f.mixedAdd(i.points[o].neg()));u=u.add(f)}return u.toP()},Df.prototype._wnafMul=function(t,e){var i=4,r=t._getNAFPoints(i);i=r.wnd;for(var n=r.points,o=Nf(e,i,this._bitLength),s=this.jpoint(null,null,null),h=o.length-1;h>=0;h--){for(var a=0;h>=0&&0===o[h];h--)a++;if(h>=0&&a++,s=s.dblp(a),h<0)break;var u=o[h];Lf(0!==u),s="affine"===t.type?u>0?s.mixedAdd(n[u-1>>1]):s.mixedAdd(n[-u-1>>1].neg()):u>0?s.add(n[u-1>>1]):s.add(n[-u-1>>1].neg())}return"affine"===t.type?s.toP():s},Df.prototype._wnafMulAdd=function(t,e,i,r,n){var o,s,h,a=this._wnafT1,u=this._wnafT2,f=this._wnafT3,l=0;for(o=0;o<r;o++){var d=(h=e[o])._getNAFPoints(t);a[o]=d.wnd,u[o]=d.points}for(o=r-1;o>=1;o-=2){var c=o-1,p=o;if(1===a[c]&&1===a[p]){var m=[e[c],null,null,e[p]];0===e[c].y.cmp(e[p].y)?(m[1]=e[c].add(e[p]),m[2]=e[c].toJ().mixedAdd(e[p].neg())):0===e[c].y.cmp(e[p].y.redNeg())?(m[1]=e[c].toJ().mixedAdd(e[p]),m[2]=e[c].add(e[p].neg())):(m[1]=e[c].toJ().mixedAdd(e[p]),m[2]=e[c].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=xf(i[c],i[p]);for(l=Math.max(v[0].length,l),f[c]=new Array(l),f[p]=new Array(l),s=0;s<l;s++){var b=0|v[0][s],y=0|v[1][s];f[c][s]=g[3*(b+1)+(y+1)],f[p][s]=0,u[c]=m}}else f[c]=Nf(i[c],a[c],this._bitLength),f[p]=Nf(i[p],a[p],this._bitLength),l=Math.max(f[c].length,l),l=Math.max(f[p].length,l)}var w=this.jpoint(null,null,null),M=this._wnafT4;for(o=l;o>=0;o--){for(var _=0;o>=0;){var S=!0;for(s=0;s<r;s++)M[s]=0|f[s][o],0!==M[s]&&(S=!1);if(!S)break;_++,o--}if(o>=0&&_++,w=w.dblp(_),o<0)break;for(s=0;s<r;s++){var E=M[s];0!==E&&(E>0?h=u[s][E-1>>1]:E<0&&(h=u[s][-E-1>>1].neg()),w="affine"===h.type?w.mixedAdd(h):w.add(h))}}for(o=0;o<r;o++)u[o]=null;return n?w:w.toP()},Df.BasePoint=qf,qf.prototype.eq=function(){throw new Error("Not implemented")},qf.prototype.validate=function(){return this.curve.validate(this)},Df.prototype.decodePoint=function(t,e){t=Pf.toArray(t,e);var i=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*i)return 6===t[0]?Lf(t[t.length-1]%2==0):7===t[0]&&Lf(t[t.length-1]%2==1),this.point(t.slice(1,1+i),t.slice(1+i,1+2*i));if((2===t[0]||3===t[0])&&t.length-1===i)return this.pointFromX(t.slice(1,1+i),3===t[0]);throw new Error("Unknown point format")},qf.prototype.encodeCompressed=function(t){return this.encode(t,!0)},qf.prototype._encode=function(t){var e=this.curve.p.byteLength(),i=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",e))},qf.prototype.encode=function(t,e){return Pf.encode(this._encode(e),t)},qf.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},qf.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},qf.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n<e;n+=t){for(var o=0;o<t;o++)r=r.dbl();i.push(r)}return{step:t,points:i}},qf.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],i=(1<<t)-1,r=1===i?null:this.dbl(),n=1;n<i;n++)e[n]=e[n-1].add(r);return{wnd:t,points:e}},qf.prototype._getBeta=function(){return null},qf.prototype.dblp=function(t){for(var e=this,i=0;i<t;i++)e=e.dbl();return e};var Uf=Rf,jf=xe,zf=Cf,Ff=kf.assert;function Hf(t){zf.call(this,"short",t),this.a=new Uf(t.a,16).toRed(this.red),this.b=new Uf(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}jf(Hf,zf);var Kf=Hf;function Gf(t,e,i,r){zf.BasePoint.call(this,t,"affine"),null===e&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new Uf(e,16),this.y=new Uf(i,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Yf(t,e,i,r){zf.BasePoint.call(this,t,"jacobian"),null===e&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Uf(0)):(this.x=new Uf(e,16),this.y=new Uf(i,16),this.z=new Uf(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Hf.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,i;if(t.beta)e=new Uf(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=(e=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(t.lambda)i=new Uf(t.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(e))?i=n[0]:(i=n[1],Ff(0===this.g.mul(i).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:i,basis:t.basis?t.basis.map((function(t){return{a:new Uf(t.a,16),b:new Uf(t.b,16)}})):this._getEndoBasis(i)}}},Hf.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:Uf.mont(t),i=new Uf(2).toRed(e).redInvm(),r=i.redNeg(),n=new Uf(3).toRed(e).redNeg().redSqrt().redMul(i);return[r.redAdd(n).fromRed(),r.redSub(n).fromRed()]},Hf.prototype._getEndoBasis=function(t){for(var e,i,r,n,o,s,h,a,u,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,d=this.n.clone(),c=new Uf(1),p=new Uf(0),m=new Uf(0),g=new Uf(1),v=0;0!==l.cmpn(0);){var b=d.div(l);a=d.sub(b.mul(l)),u=m.sub(b.mul(c));var y=g.sub(b.mul(p));if(!r&&a.cmp(f)<0)e=h.neg(),i=c,r=a.neg(),n=u;else if(r&&2==++v)break;h=a,d=l,l=a,m=c,c=u,g=p,p=y}o=a.neg(),s=u;var w=r.sqr().add(n.sqr());return o.sqr().add(s.sqr()).cmp(w)>=0&&(o=e,s=i),r.negative&&(r=r.neg(),n=n.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:r,b:n},{a:o,b:s}]},Hf.prototype._endoSplit=function(t){var e=this.endo.basis,i=e[0],r=e[1],n=r.b.mul(t).divRound(this.n),o=i.b.neg().mul(t).divRound(this.n),s=n.mul(i.a),h=o.mul(r.a),a=n.mul(i.b),u=o.mul(r.b);return{k1:t.sub(s).sub(h),k2:a.add(u).neg()}},Hf.prototype.pointFromX=function(t,e){(t=new Uf(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var n=r.fromRed().isOdd();return(e&&!n||!e&&n)&&(r=r.redNeg()),this.point(t,r)},Hf.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,i=t.y,r=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},Hf.prototype._endoWnafMulAdd=function(t,e,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),h=t[o],a=h._getBeta();s.k1.negative&&(s.k1.ineg(),h=h.neg(!0)),s.k2.negative&&(s.k2.ineg(),a=a.neg(!0)),r[2*o]=h,r[2*o+1]=a,n[2*o]=s.k1,n[2*o+1]=s.k2}for(var u=this._wnafMulAdd(1,r,n,2*o,i),f=0;f<2*o;f++)r[f]=null,n[f]=null;return u},jf(Gf,zf.BasePoint),Hf.prototype.point=function(t,e,i){return new Gf(this,t,e,i)},Hf.prototype.pointFromJSON=function(t,e){return Gf.fromJSON(this,t,e)},Gf.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var i=this.curve,r=function(t){return i.point(t.x.redMul(i.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e}},Gf.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Gf.fromJSON=function(t,e,i){"string"==typeof e&&(e=JSON.parse(e));var r=t.point(e[0],e[1],i);if(!e[2])return r;function n(e){return t.point(e[0],e[1],i)}var o=e[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(n))}},r},Gf.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Gf.prototype.isInfinity=function(){return this.inf},Gf.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var i=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},Gf.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,i=this.x.redSqr(),r=t.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(e).redMul(r),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},Gf.prototype.getX=function(){return this.x.fromRed()},Gf.prototype.getY=function(){return this.y.fromRed()},Gf.prototype.mul=function(t){return t=new Uf(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},Gf.prototype.mulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},Gf.prototype.jmulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},Gf.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},Gf.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,r=function(t){return t.neg()};e.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return e},Gf.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},jf(Yf,zf.BasePoint),Hf.prototype.jpoint=function(t,e,i){return new Yf(this,t,e,i)},Yf.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),i=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(i,r)},Yf.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Yf.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(e),n=t.x.redMul(i),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(i.redMul(this.z)),h=r.redSub(n),a=o.redSub(s);if(0===h.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=h.redSqr(),f=u.redMul(h),l=r.redMul(u),d=a.redSqr().redIAdd(f).redISub(l).redISub(l),c=a.redMul(l.redISub(d)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(h);return this.curve.jpoint(d,c,p)},Yf.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),i=this.x,r=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),s=i.redSub(r),h=n.redSub(o);if(0===s.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var a=s.redSqr(),u=a.redMul(s),f=i.redMul(a),l=h.redSqr().redIAdd(u).redISub(f).redISub(f),d=h.redMul(f.redISub(l)).redISub(n.redMul(u)),c=this.z.redMul(s);return this.curve.jpoint(l,d,c)},Yf.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var i=this;for(e=0;e<t;e++)i=i.dbl();return i}var r=this.curve.a,n=this.curve.tinv,o=this.x,s=this.y,h=this.z,a=h.redSqr().redSqr(),u=s.redAdd(s);for(e=0;e<t;e++){var f=o.redSqr(),l=u.redSqr(),d=l.redSqr(),c=f.redAdd(f).redIAdd(f).redIAdd(r.redMul(a)),p=o.redMul(l),m=c.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=c.redMul(g);v=v.redIAdd(v).redISub(d);var b=u.redMul(h);e+1<t&&(a=a.redMul(d)),o=m,h=b,u=v}return this.curve.jpoint(o,u.redMul(n),h)},Yf.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Yf.prototype._zeroDbl=function(){var t,e,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var h=r.redAdd(r).redIAdd(r),a=h.redSqr().redISub(s).redISub(s),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=a,e=h.redMul(s.redISub(a)).redISub(u),i=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),d=l.redSqr(),c=this.x.redAdd(l).redSqr().redISub(f).redISub(d);c=c.redIAdd(c);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(c).redISub(c),e=p.redMul(c.redISub(t)).redISub(g),i=(i=this.y.redMul(this.z)).redIAdd(i)}return this.curve.jpoint(t,e,i)},Yf.prototype._threeDbl=function(){var t,e,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var h=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),a=h.redSqr().redISub(s).redISub(s);t=a;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=h.redMul(s.redISub(a)).redISub(u),i=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),d=this.x.redMul(l),c=this.x.redSub(f).redMul(this.x.redAdd(f));c=c.redAdd(c).redIAdd(c);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);t=c.redSqr().redISub(m),i=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=c.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,i)},Yf.prototype._dbl=function(){var t=this.curve.a,e=this.x,i=this.y,r=this.z,n=r.redSqr().redSqr(),o=e.redSqr(),s=i.redSqr(),h=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(n)),a=e.redAdd(e),u=(a=a.redIAdd(a)).redMul(s),f=h.redSqr().redISub(u.redAdd(u)),l=u.redISub(f),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var c=h.redMul(l).redISub(d),p=i.redAdd(i).redMul(r);return this.curve.jpoint(f,c,p)},Yf.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),i=this.z.redSqr(),r=e.redSqr(),n=t.redAdd(t).redIAdd(t),o=n.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(r),h=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),a=r.redIAdd(r);a=(a=(a=a.redIAdd(a)).redIAdd(a)).redIAdd(a);var u=n.redIAdd(s).redSqr().redISub(o).redISub(h).redISub(a),f=e.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(h).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.y.redMul(u.redMul(a.redISub(u)).redISub(s.redMul(h)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var c=this.z.redAdd(s).redSqr().redISub(i).redISub(h);return this.curve.jpoint(l,d,c)},Yf.prototype.mul=function(t,e){return t=new Uf(t,e),this.curve._wnafMul(this,t)},Yf.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),i=t.z.redSqr();if(0!==this.x.redMul(i).redISub(t.x.redMul(e)).cmpn(0))return!1;var r=e.redMul(this.z),n=i.redMul(t.z);return 0===this.y.redMul(n).redISub(t.y.redMul(r)).cmpn(0)},Yf.prototype.eqXToP=function(t){var e=this.z.redSqr(),i=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(i))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},Yf.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Yf.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Vf=Rf,Zf=xe,Wf=Cf,Xf=kf;function Qf(t){Wf.call(this,"mont",t),this.a=new Vf(t.a,16).toRed(this.red),this.b=new Vf(t.b,16).toRed(this.red),this.i4=new Vf(4).toRed(this.red).redInvm(),this.two=new Vf(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Zf(Qf,Wf);var Jf=Qf;function $f(t,e,i){Wf.BasePoint.call(this,t,"projective"),null===e&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Vf(e,16),this.z=new Vf(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Qf.prototype.validate=function(t){var e=t.normalize().x,i=e.redSqr(),r=i.redMul(e).redAdd(i.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},Zf($f,Wf.BasePoint),Qf.prototype.decodePoint=function(t,e){return this.point(Xf.toArray(t,e),1)},Qf.prototype.point=function(t,e){return new $f(this,t,e)},Qf.prototype.pointFromJSON=function(t){return $f.fromJSON(this,t)},$f.prototype.precompute=function(){},$f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},$f.fromJSON=function(t,e){return new $f(t,e[0],e[1]||t.one)},$f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},$f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},$f.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),i=t.redSub(e),r=t.redMul(e),n=i.redMul(e.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},$f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},$f.prototype.diffAdd=function(t,e){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(i),s=n.redMul(r),h=e.z.redMul(o.redAdd(s).redSqr()),a=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(h,a)},$f.prototype.mul=function(t){for(var e=t.clone(),i=this,r=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},$f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},$f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},$f.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},$f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},$f.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var tl=Rf,el=xe,il=Cf,rl=kf.assert;function nl(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,il.call(this,"edwards",t),this.a=new tl(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new tl(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new tl(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),rl(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}el(nl,il);var ol=nl;function sl(t,e,i,r,n){il.BasePoint.call(this,t,"projective"),null===e&&null===i&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new tl(e,16),this.y=new tl(i,16),this.z=r?new tl(r,16):this.curve.one,this.t=n&&new tl(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}nl.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},nl.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},nl.prototype.jpoint=function(t,e,i,r){return this.point(t,e,i,r)},nl.prototype.pointFromX=function(t,e){(t=new tl(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr(),r=this.c2.redSub(this.a.redMul(i)),n=this.one.redSub(this.c2.redMul(this.d).redMul(i)),o=r.redMul(n.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var h=s.fromRed().isOdd();return(e&&!h||!e&&h)&&(s=s.redNeg()),this.point(t,s)},nl.prototype.pointFromY=function(t,e){(t=new tl(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr(),r=i.redSub(this.c2),n=i.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(n.redInvm());if(0===o.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},nl.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),i=t.y.redSqr(),r=e.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(i)));return 0===r.cmp(n)},el(sl,il.BasePoint),nl.prototype.pointFromJSON=function(t){return sl.fromJSON(this,t)},nl.prototype.point=function(t,e,i,r){return new sl(this,t,e,i,r)},sl.fromJSON=function(t,e){return new sl(t,e[0],e[1],e[2])},sl.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},sl.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},sl.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=r.redAdd(e),s=o.redSub(i),h=r.redSub(e),a=n.redMul(s),u=o.redMul(h),f=n.redMul(h),l=s.redMul(o);return this.curve.point(a,u,l,f)},sl.prototype._projDbl=function(){var t,e,i,r,n,o,s=this.x.redAdd(this.y).redSqr(),h=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(h)).redAdd(a);this.zOne?(t=s.redSub(h).redSub(a).redMul(u.redSub(this.curve.two)),e=u.redMul(r.redSub(a)),i=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),o=u.redSub(n).redISub(n),t=s.redSub(h).redISub(a).redMul(o),e=u.redMul(r.redSub(a)),i=u.redMul(o))}else r=h.redAdd(a),n=this.curve._mulC(this.z).redSqr(),o=r.redSub(n).redSub(n),t=this.curve._mulC(s.redISub(r)).redMul(o),e=this.curve._mulC(r).redMul(h.redISub(a)),i=r.redMul(o);return this.curve.point(t,e,i)},sl.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},sl.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),o=i.redSub(e),s=n.redSub(r),h=n.redAdd(r),a=i.redAdd(e),u=o.redMul(s),f=h.redMul(a),l=o.redMul(a),d=s.redMul(h);return this.curve.point(u,f,d,l)},sl.prototype._projAdd=function(t){var e,i,r=this.z.redMul(t.z),n=r.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),h=this.curve.d.redMul(o).redMul(s),a=n.redSub(h),u=n.redAdd(h),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),l=r.redMul(a).redMul(f);return this.curve.twisted?(e=r.redMul(u).redMul(s.redSub(this.curve._mulA(o))),i=a.redMul(u)):(e=r.redMul(u).redMul(s.redSub(o)),i=this.curve._mulC(a).redMul(u)),this.curve.point(l,e,i)},sl.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},sl.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},sl.prototype.mulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!1)},sl.prototype.jmulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!0)},sl.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},sl.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},sl.prototype.getX=function(){return this.normalize(),this.x.fromRed()},sl.prototype.getY=function(){return this.normalize(),this.y.fromRed()},sl.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},sl.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var i=t.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},sl.prototype.toP=sl.prototype.normalize,sl.prototype.mixedAdd=sl.prototype.add,function(t){var e=t;e.base=Cf,e.short=Kf,e.mont=Jf,e.edwards=ol}(Tf);var hl={},al={},ul={},fl=Nh,ll=xe;function dl(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function cl(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function pl(t){return 1===t.length?"0"+t:t}function ml(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}ul.inherits=ll,ul.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)i.push(parseInt(t[n]+t[n+1],16))}else for(var r=0,n=0;n<t.length;n++){var o=t.charCodeAt(n);o<128?i[r++]=o:o<2048?(i[r++]=o>>6|192,i[r++]=63&o|128):dl(t,n)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++n)),i[r++]=o>>18|240,i[r++]=o>>12&63|128,i[r++]=o>>6&63|128,i[r++]=63&o|128):(i[r++]=o>>12|224,i[r++]=o>>6&63|128,i[r++]=63&o|128)}else for(n=0;n<t.length;n++)i[n]=0|t[n];return i},ul.toHex=function(t){for(var e="",i=0;i<t.length;i++)e+=pl(t[i].toString(16));return e},ul.htonl=cl,ul.toHex32=function(t,e){for(var i="",r=0;r<t.length;r++){var n=t[r];"little"===e&&(n=cl(n)),i+=ml(n.toString(16))}return i},ul.zero2=pl,ul.zero8=ml,ul.join32=function(t,e,i,r){var n=i-e;fl(n%4==0);for(var o=new Array(n/4),s=0,h=e;s<o.length;s++,h+=4){var a;a="big"===r?t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3]:t[h+3]<<24|t[h+2]<<16|t[h+1]<<8|t[h],o[s]=a>>>0}return o},ul.split32=function(t,e){for(var i=new Array(4*t.length),r=0,n=0;r<t.length;r++,n+=4){var o=t[r];"big"===e?(i[n]=o>>>24,i[n+1]=o>>>16&255,i[n+2]=o>>>8&255,i[n+3]=255&o):(i[n+3]=o>>>24,i[n+2]=o>>>16&255,i[n+1]=o>>>8&255,i[n]=255&o)}return i},ul.rotr32=function(t,e){return t>>>e|t<<32-e},ul.rotl32=function(t,e){return t<<e|t>>>32-e},ul.sum32=function(t,e){return t+e>>>0},ul.sum32_3=function(t,e,i){return t+e+i>>>0},ul.sum32_4=function(t,e,i,r){return t+e+i+r>>>0},ul.sum32_5=function(t,e,i,r,n){return t+e+i+r+n>>>0},ul.sum64=function(t,e,i,r){var n=t[e],o=r+t[e+1]>>>0,s=(o<r?1:0)+i+n;t[e]=s>>>0,t[e+1]=o},ul.sum64_hi=function(t,e,i,r){return(e+r>>>0<e?1:0)+t+i>>>0},ul.sum64_lo=function(t,e,i,r){return e+r>>>0},ul.sum64_4_hi=function(t,e,i,r,n,o,s,h){var a=0,u=e;return a+=(u=u+r>>>0)<e?1:0,a+=(u=u+o>>>0)<o?1:0,t+i+n+s+(a+=(u=u+h>>>0)<h?1:0)>>>0},ul.sum64_4_lo=function(t,e,i,r,n,o,s,h){return e+r+o+h>>>0},ul.sum64_5_hi=function(t,e,i,r,n,o,s,h,a,u){var f=0,l=e;return f+=(l=l+r>>>0)<e?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+h>>>0)<h?1:0,t+i+n+s+a+(f+=(l=l+u>>>0)<u?1:0)>>>0},ul.sum64_5_lo=function(t,e,i,r,n,o,s,h,a,u){return e+r+o+h+u>>>0},ul.rotr64_hi=function(t,e,i){return(e<<32-i|t>>>i)>>>0},ul.rotr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0},ul.shr64_hi=function(t,e,i){return t>>>i},ul.shr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0};var gl={},vl=ul,bl=Nh;function yl(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}gl.BlockHash=yl,yl.prototype.update=function(t,e){if(t=vl.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var i=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-i,t.length),0===this.pending.length&&(this.pending=null),t=vl.join32(t,0,t.length-i,this.endian);for(var r=0;r<t.length;r+=this._delta32)this._update(t,r,r+this._delta32)}return this},yl.prototype.digest=function(t){return this.update(this._pad()),bl(null===this.pending),this._digest(t)},yl.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,i=e-(t+this.padLength)%e,r=new Array(i+this.padLength);r[0]=128;for(var n=1;n<i;n++)r[n]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[n++]=0;r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=t>>>24&255,r[n++]=t>>>16&255,r[n++]=t>>>8&255,r[n++]=255&t}else for(r[n++]=255&t,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n++]=t>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,o=8;o<this.padLength;o++)r[n++]=0;return r};var wl={},Ml={},_l=ul.rotr32;function Sl(t,e,i){return t&e^~t&i}function El(t,e,i){return t&e^t&i^e&i}function Al(t,e,i){return t^e^i}Ml.ft_1=function(t,e,i,r){return 0===t?Sl(e,i,r):1===t||3===t?Al(e,i,r):2===t?El(e,i,r):void 0},Ml.ch32=Sl,Ml.maj32=El,Ml.p32=Al,Ml.s0_256=function(t){return _l(t,2)^_l(t,13)^_l(t,22)},Ml.s1_256=function(t){return _l(t,6)^_l(t,11)^_l(t,25)},Ml.g0_256=function(t){return _l(t,7)^_l(t,18)^t>>>3},Ml.g1_256=function(t){return _l(t,17)^_l(t,19)^t>>>10};var kl=ul,Rl=gl,Il=Ml,Ol=kl.rotl32,Tl=kl.sum32,Bl=kl.sum32_5,Pl=Il.ft_1,Nl=Rl.BlockHash,xl=[1518500249,1859775393,2400959708,3395469782];function Ll(){if(!(this instanceof Ll))return new Ll;Nl.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}kl.inherits(Ll,Nl);var Dl=Ll;Ll.blockSize=512,Ll.outSize=160,Ll.hmacStrength=80,Ll.padLength=64,Ll.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;r<i.length;r++)i[r]=Ol(i[r-3]^i[r-8]^i[r-14]^i[r-16],1);var n=this.h[0],o=this.h[1],s=this.h[2],h=this.h[3],a=this.h[4];for(r=0;r<i.length;r++){var u=~~(r/20),f=Bl(Ol(n,5),Pl(u,o,s,h),a,i[r],xl[u]);a=h,h=s,s=Ol(o,30),o=n,n=f}this.h[0]=Tl(this.h[0],n),this.h[1]=Tl(this.h[1],o),this.h[2]=Tl(this.h[2],s),this.h[3]=Tl(this.h[3],h),this.h[4]=Tl(this.h[4],a)},Ll.prototype._digest=function(t){return"hex"===t?kl.toHex32(this.h,"big"):kl.split32(this.h,"big")};var Cl=ul,ql=gl,Ul=Ml,jl=Nh,zl=Cl.sum32,Fl=Cl.sum32_4,Hl=Cl.sum32_5,Kl=Ul.ch32,Gl=Ul.maj32,Yl=Ul.s0_256,Vl=Ul.s1_256,Zl=Ul.g0_256,Wl=Ul.g1_256,Xl=ql.BlockHash,Ql=[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];function Jl(){if(!(this instanceof Jl))return new Jl;Xl.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Ql,this.W=new Array(64)}Cl.inherits(Jl,Xl);var $l=Jl;Jl.blockSize=512,Jl.outSize=256,Jl.hmacStrength=192,Jl.padLength=64,Jl.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;r<i.length;r++)i[r]=Fl(Wl(i[r-2]),i[r-7],Zl(i[r-15]),i[r-16]);var n=this.h[0],o=this.h[1],s=this.h[2],h=this.h[3],a=this.h[4],u=this.h[5],f=this.h[6],l=this.h[7];for(jl(this.k.length===i.length),r=0;r<i.length;r++){var d=Hl(l,Vl(a),Kl(a,u,f),this.k[r],i[r]),c=zl(Yl(n),Gl(n,o,s));l=f,f=u,u=a,a=zl(h,d),h=s,s=o,o=n,n=zl(d,c)}this.h[0]=zl(this.h[0],n),this.h[1]=zl(this.h[1],o),this.h[2]=zl(this.h[2],s),this.h[3]=zl(this.h[3],h),this.h[4]=zl(this.h[4],a),this.h[5]=zl(this.h[5],u),this.h[6]=zl(this.h[6],f),this.h[7]=zl(this.h[7],l)},Jl.prototype._digest=function(t){return"hex"===t?Cl.toHex32(this.h,"big"):Cl.split32(this.h,"big")};var td=ul,ed=$l;function id(){if(!(this instanceof id))return new id;ed.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}td.inherits(id,ed);var rd=id;id.blockSize=512,id.outSize=224,id.hmacStrength=192,id.padLength=64,id.prototype._digest=function(t){return"hex"===t?td.toHex32(this.h.slice(0,7),"big"):td.split32(this.h.slice(0,7),"big")};var nd=ul,od=gl,sd=Nh,hd=nd.rotr64_hi,ad=nd.rotr64_lo,ud=nd.shr64_hi,fd=nd.shr64_lo,ld=nd.sum64,dd=nd.sum64_hi,cd=nd.sum64_lo,pd=nd.sum64_4_hi,md=nd.sum64_4_lo,gd=nd.sum64_5_hi,vd=nd.sum64_5_lo,bd=od.BlockHash,yd=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function wd(){if(!(this instanceof wd))return new wd;bd.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=yd,this.W=new Array(160)}nd.inherits(wd,bd);var Md=wd;function _d(t,e,i,r,n){var o=t&i^~t&n;return o<0&&(o+=4294967296),o}function Sd(t,e,i,r,n,o){var s=e&r^~e&o;return s<0&&(s+=4294967296),s}function Ed(t,e,i,r,n){var o=t&i^t&n^i&n;return o<0&&(o+=4294967296),o}function Ad(t,e,i,r,n,o){var s=e&r^e&o^r&o;return s<0&&(s+=4294967296),s}function kd(t,e){var i=hd(t,e,28)^hd(e,t,2)^hd(e,t,7);return i<0&&(i+=4294967296),i}function Rd(t,e){var i=ad(t,e,28)^ad(e,t,2)^ad(e,t,7);return i<0&&(i+=4294967296),i}function Id(t,e){var i=hd(t,e,14)^hd(t,e,18)^hd(e,t,9);return i<0&&(i+=4294967296),i}function Od(t,e){var i=ad(t,e,14)^ad(t,e,18)^ad(e,t,9);return i<0&&(i+=4294967296),i}function Td(t,e){var i=hd(t,e,1)^hd(t,e,8)^ud(t,e,7);return i<0&&(i+=4294967296),i}function Bd(t,e){var i=ad(t,e,1)^ad(t,e,8)^fd(t,e,7);return i<0&&(i+=4294967296),i}function Pd(t,e){var i=hd(t,e,19)^hd(e,t,29)^ud(t,e,6);return i<0&&(i+=4294967296),i}function Nd(t,e){var i=ad(t,e,19)^ad(e,t,29)^fd(t,e,6);return i<0&&(i+=4294967296),i}wd.blockSize=1024,wd.outSize=512,wd.hmacStrength=192,wd.padLength=128,wd.prototype._prepareBlock=function(t,e){for(var i=this.W,r=0;r<32;r++)i[r]=t[e+r];for(;r<i.length;r+=2){var n=Pd(i[r-4],i[r-3]),o=Nd(i[r-4],i[r-3]),s=i[r-14],h=i[r-13],a=Td(i[r-30],i[r-29]),u=Bd(i[r-30],i[r-29]),f=i[r-32],l=i[r-31];i[r]=pd(n,o,s,h,a,u,f,l),i[r+1]=md(n,o,s,h,a,u,f,l)}},wd.prototype._update=function(t,e){this._prepareBlock(t,e);var i=this.W,r=this.h[0],n=this.h[1],o=this.h[2],s=this.h[3],h=this.h[4],a=this.h[5],u=this.h[6],f=this.h[7],l=this.h[8],d=this.h[9],c=this.h[10],p=this.h[11],m=this.h[12],g=this.h[13],v=this.h[14],b=this.h[15];sd(this.k.length===i.length);for(var y=0;y<i.length;y+=2){var w=v,M=b,_=Id(l,d),S=Od(l,d),E=_d(l,d,c,p,m),A=Sd(l,d,c,p,m,g),k=this.k[y],R=this.k[y+1],I=i[y],O=i[y+1],T=gd(w,M,_,S,E,A,k,R,I,O),B=vd(w,M,_,S,E,A,k,R,I,O);w=kd(r,n),M=Rd(r,n),_=Ed(r,n,o,s,h),S=Ad(r,n,o,s,h,a);var P=dd(w,M,_,S),N=cd(w,M,_,S);v=m,b=g,m=c,g=p,c=l,p=d,l=dd(u,f,T,B),d=cd(f,f,T,B),u=h,f=a,h=o,a=s,o=r,s=n,r=dd(T,B,P,N),n=cd(T,B,P,N)}ld(this.h,0,r,n),ld(this.h,2,o,s),ld(this.h,4,h,a),ld(this.h,6,u,f),ld(this.h,8,l,d),ld(this.h,10,c,p),ld(this.h,12,m,g),ld(this.h,14,v,b)},wd.prototype._digest=function(t){return"hex"===t?nd.toHex32(this.h,"big"):nd.split32(this.h,"big")};var xd=ul,Ld=Md;function Dd(){if(!(this instanceof Dd))return new Dd;Ld.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}xd.inherits(Dd,Ld);var Cd=Dd;Dd.blockSize=1024,Dd.outSize=384,Dd.hmacStrength=192,Dd.padLength=128,Dd.prototype._digest=function(t){return"hex"===t?xd.toHex32(this.h.slice(0,12),"big"):xd.split32(this.h.slice(0,12),"big")},wl.sha1=Dl,wl.sha224=rd,wl.sha256=$l,wl.sha384=Cd,wl.sha512=Md;var qd={},Ud=ul,jd=gl,zd=Ud.rotl32,Fd=Ud.sum32,Hd=Ud.sum32_3,Kd=Ud.sum32_4,Gd=jd.BlockHash;function Yd(){if(!(this instanceof Yd))return new Yd;Gd.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Vd(t,e,i,r){return t<=15?e^i^r:t<=31?e&i|~e&r:t<=47?(e|~i)^r:t<=63?e&r|i&~r:e^(i|~r)}function Zd(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function Wd(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}Ud.inherits(Yd,Gd),qd.ripemd160=Yd,Yd.blockSize=512,Yd.outSize=160,Yd.hmacStrength=192,Yd.padLength=64,Yd.prototype._update=function(t,e){for(var i=this.h[0],r=this.h[1],n=this.h[2],o=this.h[3],s=this.h[4],h=i,a=r,u=n,f=o,l=s,d=0;d<80;d++){var c=Fd(zd(Kd(i,Vd(d,r,n,o),t[Xd[d]+e],Zd(d)),Jd[d]),s);i=s,s=o,o=zd(n,10),n=r,r=c,c=Fd(zd(Kd(h,Vd(79-d,a,u,f),t[Qd[d]+e],Wd(d)),$d[d]),l),h=l,l=f,f=zd(u,10),u=a,a=c}c=Hd(this.h[1],n,f),this.h[1]=Hd(this.h[2],o,l),this.h[2]=Hd(this.h[3],s,h),this.h[3]=Hd(this.h[4],i,a),this.h[4]=Hd(this.h[0],r,u),this.h[0]=c},Yd.prototype._digest=function(t){return"hex"===t?Ud.toHex32(this.h,"little"):Ud.split32(this.h,"little")};var Xd=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Qd=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Jd=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],$d=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],tc=ul,ec=Nh;function ic(t,e,i){if(!(this instanceof ic))return new ic(t,e,i);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(tc.toArray(e,i))}var rc,nc,oc=ic;ic.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),ec(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},ic.prototype.update=function(t,e){return this.inner.update(t,e),this},ic.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)},function(t){var e=al;e.utils=ul,e.common=gl,e.sha=wl,e.ripemd=qd,e.hmac=oc,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}(),function(t){var e,i=hl,r=al,n=Tf,o=kf.assert;function s(t){"short"===t.type?this.curve=new n.short(t):"edwards"===t.type?this.curve=new n.edwards(t):this.curve=new n.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function h(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new s(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=s,h("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),h("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),h("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{e=nc?rc:(nc=1,rc={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(t){e=void 0}h("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",e]})}();var sc=al,hc=Of,ac=Nh;function uc(t){if(!(this instanceof uc))return new uc(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=hc.toArray(t.entropy,t.entropyEnc||"hex"),i=hc.toArray(t.nonce,t.nonceEnc||"hex"),r=hc.toArray(t.pers,t.persEnc||"hex");ac(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,i,r)}var fc=uc;uc.prototype._init=function(t,e,i){var r=t.concat(e).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},uc.prototype._hmac=function(){return new sc.hmac(this.hash,this.K)},uc.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},uc.prototype.reseed=function(t,e,i,r){"string"!=typeof e&&(r=i,i=e,e=null),t=hc.toArray(t,e),i=hc.toArray(i,r),ac(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1},uc.prototype.generate=function(t,e,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=i,i=e,e=null),i&&(i=hc.toArray(i,r||"hex"),this._update(i));for(var n=[];n.length<t;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,t);return this._update(i),this._reseed++,hc.encode(o,e)};var lc=Rf,dc=kf.assert;function cc(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var pc=cc;cc.fromPublic=function(t,e,i){return e instanceof cc?e:new cc(t,{pub:e,pubEnc:i})},cc.fromPrivate=function(t,e,i){return e instanceof cc?e:new cc(t,{priv:e,privEnc:i})},cc.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},cc.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},cc.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},cc.prototype._importPrivate=function(t,e){this.priv=new lc(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},cc.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?dc(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||dc(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},cc.prototype.derive=function(t){return t.validate()||dc(t.validate(),"public point not validated"),t.mul(this.priv).getX()},cc.prototype.sign=function(t,e,i){return this.ec.sign(t,this,e,i)},cc.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},cc.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var mc=Rf,gc=kf,vc=gc.assert;function bc(t,e){if(t instanceof bc)return t;this._importDER(t,e)||(vc(t.r&&t.s,"Signature without r or s"),this.r=new mc(t.r,16),this.s=new mc(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var yc,wc,Mc=bc;function _c(){this.place=0}function Sc(t,e){var i=t[e.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,o=0,s=e.place;o<r;o++,s++)n<<=8,n|=t[s],n>>>=0;return!(n<=127)&&(e.place=s,n)}function Ec(t){for(var e=0,i=t.length-1;!t[e]&&!(128&t[e+1])&&e<i;)e++;return 0===e?t:t.slice(e)}function Ac(t,e){if(e<128)t.push(e);else{var i=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|i);--i;)t.push(e>>>(i<<3)&255);t.push(e)}}bc.prototype._importDER=function(t,e){t=gc.toArray(t,e);var i=new _c;if(48!==t[i.place++])return!1;var r=Sc(t,i);if(!1===r)return!1;if(r+i.place!==t.length)return!1;if(2!==t[i.place++])return!1;var n=Sc(t,i);if(!1===n)return!1;var o=t.slice(i.place,n+i.place);if(i.place+=n,2!==t[i.place++])return!1;var s=Sc(t,i);if(!1===s)return!1;if(t.length!==s+i.place)return!1;var h=t.slice(i.place,s+i.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new mc(o),this.s=new mc(h),this.recoveryParam=null,!0},bc.prototype.toDER=function(t){var e=this.r.toArray(),i=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&i[0]&&(i=[0].concat(i)),e=Ec(e),i=Ec(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];Ac(r,e.length),(r=r.concat(e)).push(2),Ac(r,i.length);var n=r.concat(i),o=[48];return Ac(o,n.length),o=o.concat(n),gc.encode(o,t)};var kc=kf,Rc=kc.assert,Ic=kc.parseBytes,Oc=kc.cachedProperty;function Tc(t,e){this.eddsa=t,this._secret=Ic(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Ic(e.pub)}Tc.fromPublic=function(t,e){return e instanceof Tc?e:new Tc(t,{pub:e})},Tc.fromSecret=function(t,e){return e instanceof Tc?e:new Tc(t,{secret:e})},Tc.prototype.secret=function(){return this._secret},Oc(Tc,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Oc(Tc,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Oc(Tc,"privBytes",(function(){var t=this.eddsa,e=this.hash(),i=t.encodingLength-1,r=e.slice(0,t.encodingLength);return r[0]&=248,r[i]&=127,r[i]|=64,r})),Oc(Tc,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Oc(Tc,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Oc(Tc,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Tc.prototype.sign=function(t){return Rc(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},Tc.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},Tc.prototype.getSecret=function(t){return Rc(this._secret,"KeyPair is public only"),kc.encode(this.secret(),t)},Tc.prototype.getPublic=function(t){return kc.encode(this.pubBytes(),t)};var Bc=Tc,Pc=Rf,Nc=kf,xc=Nc.assert,Lc=Nc.cachedProperty,Dc=Nc.parseBytes;function Cc(t,e){this.eddsa=t,"object"!=typeof e&&(e=Dc(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),xc(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof Pc&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Lc(Cc,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Lc(Cc,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Lc(Cc,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Lc(Cc,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Cc.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Cc.prototype.toHex=function(){return Nc.encode(this.toBytes(),"hex").toUpperCase()};var qc=Cc,Uc=al,jc=hl,zc=kf,Fc=zc.assert,Hc=zc.parseBytes,Kc=Bc,Gc=qc;function Yc(t){if(Fc("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof Yc))return new Yc(t);t=jc[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=Uc.sha512}var Vc,Zc=Yc;function Wc(){return Vc||(Vc=1,function(t){var e=t;e.version=Af.version,e.utils=kf,e.rand=hf(),e.curve=Tf,e.curves=hl,e.ec=function(){if(wc)return yc;wc=1;var t=Rf,e=fc,i=kf,r=hl,n=hf(),o=i.assert,s=pc,h=Mc;function a(t){if(!(this instanceof a))return new a(t);"string"==typeof t&&(o(Object.prototype.hasOwnProperty.call(r,t),"Unknown curve "+t),t=r[t]),t instanceof r.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}return yc=a,a.prototype.keyPair=function(t){return new s(this,t)},a.prototype.keyFromPrivate=function(t,e){return s.fromPrivate(this,t,e)},a.prototype.keyFromPublic=function(t,e){return s.fromPublic(this,t,e)},a.prototype.genKeyPair=function(i){i||(i={});for(var r=new e({hash:this.hash,pers:i.pers,persEnc:i.persEnc||"utf8",entropy:i.entropy||n(this.hash.hmacStrength),entropyEnc:i.entropy&&i.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),s=this.n.sub(new t(2));;){var h=new t(r.generate(o));if(!(h.cmp(s)>0))return h.iaddn(1),this.keyFromPrivate(h)}},a.prototype._truncateToN=function(t,e){var i=8*t.byteLength()-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},a.prototype.sign=function(i,r,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),r=this.keyFromPrivate(r,n),i=this._truncateToN(new t(i,16));for(var s=this.n.byteLength(),a=r.getPrivate().toArray("be",s),u=i.toArray("be",s),f=new e({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new t(1)),d=0;;d++){var c=o.k?o.k(d):new t(f.generate(this.n.byteLength()));if(!((c=this._truncateToN(c,!0)).cmpn(1)<=0||c.cmp(l)>=0)){var p=this.g.mul(c);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=c.invm(this.n).mul(g.mul(r.getPrivate()).iadd(i));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new h({r:g,s:v,recoveryParam:b})}}}}}},a.prototype.verify=function(e,i,r,n){e=this._truncateToN(new t(e,16)),r=this.keyFromPublic(r,n);var o=(i=new h(i,"hex")).r,s=i.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),f=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(f,r.getPublic(),l)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(f,r.getPublic(),l)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},a.prototype.recoverPubKey=function(e,i,r,n){o((3&r)===r,"The recovery param is more than two bits"),i=new h(i,n);var s=this.n,a=new t(e),u=i.r,f=i.s,l=1&r,d=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");u=d?this.curve.pointFromX(u.add(this.curve.n),l):this.curve.pointFromX(u,l);var c=i.r.invm(s),p=s.sub(a).mul(c).umod(s),m=f.mul(c).umod(s);return this.g.mulAdd(p,u,m)},a.prototype.getKeyRecoveryParam=function(t,e,i,r){if(null!==(e=new h(e,r)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(t,e,n)}catch(t){continue}if(o.eq(i))return n}throw new Error("Unable to find valid recovery factor")},yc}(),e.eddsa=Zc}(Ef)),Ef}Yc.prototype.sign=function(t,e){t=Hc(t);var i=this.keyFromSecret(e),r=this.hashInt(i.messagePrefix(),t),n=this.g.mul(r),o=this.encodePoint(n),s=this.hashInt(o,i.pubBytes(),t).mul(i.priv()),h=r.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:h,Rencoded:o})},Yc.prototype.verify=function(t,e,i){t=Hc(t),e=this.makeSignature(e);var r=this.keyFromPublic(i),n=this.hashInt(e.Rencoded(),r.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(r.pub().mul(n)).eq(o)},Yc.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return zc.intFromLE(t.digest()).umod(this.curve.n)},Yc.prototype.keyFromPublic=function(t){return Kc.fromPublic(this,t)},Yc.prototype.keyFromSecret=function(t){return Kc.fromSecret(this,t)},Yc.prototype.makeSignature=function(t){return t instanceof Gc?t:new Gc(this,t)},Yc.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},Yc.prototype.decodePoint=function(t){var e=(t=zc.parseBytes(t)).length-1,i=t.slice(0,e).concat(-129&t[e]),r=0!=(128&t[e]),n=zc.intFromLE(i);return this.curve.pointFromY(n,r)},Yc.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},Yc.prototype.decodeInt=function(t){return zc.intFromLE(t)},Yc.prototype.isPoint=function(t){return t instanceof this.pointClass};var Xc={},Qc={},Jc={},$c={get exports(){return Jc},set exports(t){Jc=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}($c,Tt);var tp,ep={},ip={},rp=Oe,np=rp.Buffer,op={};for(tp in rp)rp.hasOwnProperty(tp)&&"SlowBuffer"!==tp&&"Buffer"!==tp&&(op[tp]=rp[tp]);var sp=op.Buffer={};for(tp in np)np.hasOwnProperty(tp)&&"allocUnsafe"!==tp&&"allocUnsafeSlow"!==tp&&(sp[tp]=np[tp]);if(op.Buffer.prototype=np.prototype,sp.from&&sp.from!==Uint8Array.from||(sp.from=function(t,e,i){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return np(t,e,i)}),sp.alloc||(sp.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=np(t);return e&&0!==e.length?"string"==typeof i?r.fill(e,i):r.fill(e):r.fill(0),r}),!op.kStringMaxLength)try{op.kStringMaxLength=_e.binding("buffer").kStringMaxLength}catch(t){}op.constants||(op.constants={MAX_LENGTH:op.kMaxLength},op.kStringMaxLength&&(op.constants.MAX_STRING_LENGTH=op.kStringMaxLength));var hp=op,ap={};const up=xe;function fp(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function lp(t,e){this.path=t,this.rethrow(e)}ap.Reporter=fp,fp.prototype.isError=function(t){return t instanceof lp},fp.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},fp.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},fp.prototype.enterKey=function(t){return this._reporterState.path.push(t)},fp.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},fp.prototype.leaveKey=function(t,e,i){const r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=i)},fp.prototype.path=function(){return this._reporterState.path.join("/")},fp.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},fp.prototype.leaveObject=function(t){const e=this._reporterState,i=e.obj;return e.obj=t,i},fp.prototype.error=function(t){let e;const i=this._reporterState,r=t instanceof lp;if(e=r?t:new lp(i.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!i.options.partial)throw e;return r||i.errors.push(e),e},fp.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},up(lp,Error),lp.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,lp),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this};var dp={};const cp=xe,pp=ap.Reporter,mp=hp.Buffer;function gp(t,e){pp.call(this,e),mp.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function vp(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return vp.isEncoderBuffer(t)||(t=new vp(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=mp.byteLength(t);else{if(!mp.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}cp(gp,pp),dp.DecoderBuffer=gp,gp.isDecoderBuffer=function(t){if(t instanceof gp)return!0;return"object"==typeof t&&mp.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},gp.prototype.save=function(){return{offset:this.offset,reporter:pp.prototype.save.call(this)}},gp.prototype.restore=function(t){const e=new gp(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,pp.prototype.restore.call(this,t.reporter),e},gp.prototype.isEmpty=function(){return this.offset===this.length},gp.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},gp.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");const i=new gp(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+t,this.offset+=t,i},gp.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},dp.EncoderBuffer=vp,vp.isEncoderBuffer=function(t){if(t instanceof vp)return!0;return"object"==typeof t&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},vp.prototype.join=function(t,e){return t||(t=mp.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(t,e),e+=i.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):mp.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t};const bp=ap.Reporter,yp=dp.EncoderBuffer,wp=dp.DecoderBuffer,Mp=Nh,_p=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],Sp=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(_p);function Ep(t,e,i){const r={};this._baseState=r,r.name=i,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var Ap=Ep;const kp=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Ep.prototype.clone=function(){const t=this._baseState,e={};kp.forEach((function(i){e[i]=t[i]}));const i=new this.constructor(e.parent);return i._baseState=e,i},Ep.prototype._wrap=function(){const t=this._baseState;Sp.forEach((function(e){this[e]=function(){const i=new this.constructor(this);return t.children.push(i),i[e].apply(i,arguments)}}),this)},Ep.prototype._init=function(t){const e=this._baseState;Mp(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),Mp.equal(e.children.length,1,"Root node can have only one child")},Ep.prototype._useArgs=function(t){const e=this._baseState,i=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==i.length&&(Mp(null===e.children),e.children=i,i.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(Mp(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(i){i==(0|i)&&(i|=0);const r=t[i];e[r]=i})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){Ep.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),_p.forEach((function(t){Ep.prototype[t]=function(){const e=this._baseState,i=Array.prototype.slice.call(arguments);return Mp(null===e.tag),e.tag=t,this._useArgs(i),this}})),Ep.prototype.use=function(t){Mp(t);const e=this._baseState;return Mp(null===e.use),e.use=t,this},Ep.prototype.optional=function(){return this._baseState.optional=!0,this},Ep.prototype.def=function(t){const e=this._baseState;return Mp(null===e.default),e.default=t,e.optional=!0,this},Ep.prototype.explicit=function(t){const e=this._baseState;return Mp(null===e.explicit&&null===e.implicit),e.explicit=t,this},Ep.prototype.implicit=function(t){const e=this._baseState;return Mp(null===e.explicit&&null===e.implicit),e.implicit=t,this},Ep.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},Ep.prototype.key=function(t){const e=this._baseState;return Mp(null===e.key),e.key=t,this},Ep.prototype.any=function(){return this._baseState.any=!0,this},Ep.prototype.choice=function(t){const e=this._baseState;return Mp(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},Ep.prototype.contains=function(t){const e=this._baseState;return Mp(null===e.use),e.contains=t,this},Ep.prototype._decode=function(t,e){const i=this._baseState;if(null===i.parent)return t.wrapResult(i.children[0]._decode(t,e));let r,n=i.default,o=!0,s=null;if(null!==i.key&&(s=t.enterKey(i.key)),i.optional){let r=null;if(null!==i.explicit?r=i.explicit:null!==i.implicit?r=i.implicit:null!==i.tag&&(r=i.tag),null!==r||i.any){if(o=this._peekTag(t,r,i.any),t.isError(o))return o}else{const r=t.save();try{null===i.choice?this._decodeGeneric(i.tag,t,e):this._decodeChoice(t,e),o=!0}catch(t){o=!1}t.restore(r)}}if(i.obj&&o&&(r=t.enterObject()),o){if(null!==i.explicit){const e=this._decodeTag(t,i.explicit);if(t.isError(e))return e;t=e}const r=t.offset;if(null===i.use&&null===i.choice){let e;i.any&&(e=t.save());const r=this._decodeTag(t,null!==i.implicit?i.implicit:i.tag,i.any);if(t.isError(r))return r;i.any?n=t.raw(e):t=r}if(e&&e.track&&null!==i.tag&&e.track(t.path(),r,t.length,"tagged"),e&&e.track&&null!==i.tag&&e.track(t.path(),t.offset,t.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,t,e):this._decodeChoice(t,e)),t.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(i){i._decode(t,e)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){const r=new wp(n);n=this._getUse(i.contains,t._reporterState.obj)._decode(r,e)}}return i.obj&&o&&(n=t.leaveObject(r)),null===i.key||null===n&&!0!==o?null!==s&&t.exitKey(s):t.leaveKey(s,i.key,n),n},Ep.prototype._decodeGeneric=function(t,e,i){const r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],i):/str$/.test(t)?this._decodeStr(e,t,i):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],i):"objid"===t?this._decodeObjid(e,null,null,i):"gentime"===t||"utctime"===t?this._decodeTime(e,t,i):"null_"===t?this._decodeNull(e,i):"bool"===t?this._decodeBool(e,i):"objDesc"===t?this._decodeStr(e,t,i):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,i):e.error("unknown tag: "+t)},Ep.prototype._getUse=function(t,e){const i=this._baseState;return i.useDecoder=this._use(t,e),Mp(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},Ep.prototype._decodeChoice=function(t,e){const i=this._baseState;let r=null,n=!1;return Object.keys(i.choice).some((function(o){const s=t.save(),h=i.choice[o];try{const i=h._decode(t,e);if(t.isError(i))return!1;r={type:o,value:i},n=!0}catch(e){return t.restore(s),!1}return!0}),this),n?r:t.error("Choice not matched")},Ep.prototype._createEncoderBuffer=function(t){return new yp(t,this.reporter)},Ep.prototype._encode=function(t,e,i){const r=this._baseState;if(null!==r.default&&r.default===t)return;const n=this._encodeValue(t,e,i);return void 0===n||this._skipDefault(n,e,i)?void 0:n},Ep.prototype._encodeValue=function(t,e,i){const r=this._baseState;if(null===r.parent)return r.children[0]._encode(t,e||new bp);let n=null;if(this.reporter=e,r.optional&&void 0===t){if(null===r.default)return;t=r.default}let o=null,s=!1;if(r.any)n=this._createEncoderBuffer(t);else if(r.choice)n=this._encodeChoice(t,e);else if(r.contains)o=this._getUse(r.contains,i)._encode(t,e),s=!0;else if(r.children)o=r.children.map((function(i){if("null_"===i._baseState.tag)return i._encode(null,e,t);if(null===i._baseState.key)return e.error("Child should have a key");const r=e.enterKey(i._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const n=i._encode(t[i._baseState.key],e,t);return e.leaveKey(r),n}),this).filter((function(t){return t})),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return e.error("Too many args for : "+r.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const i=this.clone();i._baseState.implicit=null,o=this._createEncoderBuffer(t.map((function(i){const r=this._baseState;return this._getUse(r.args[0],t)._encode(i,e)}),i))}else null!==r.use?n=this._getUse(r.use,i)._encode(t,e):(o=this._encodePrimitive(r.tag,t),s=!0);if(!r.any&&null===r.choice){const t=null!==r.implicit?r.implicit:r.tag,i=null===r.implicit?"universal":"context";null===t?null===r.use&&e.error("Tag could be omitted only for .use()"):null===r.use&&(n=this._encodeComposite(t,s,i,o))}return null!==r.explicit&&(n=this._encodeComposite(r.explicit,!1,"context",n)),n},Ep.prototype._encodeChoice=function(t,e){const i=this._baseState,r=i.choice[t.type];return r||Mp(!1,t.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(t.value,e)},Ep.prototype._encodePrimitive=function(t,e){const i=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&i.args)return this._encodeObjid(e,i.reverseArgs[0],i.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,i.args&&i.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},Ep.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},Ep.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)};var Rp={};!function(t){function e(t){const e={};return Object.keys(t).forEach((function(i){(0|i)==i&&(i|=0);const r=t[i];e[r]=i})),e}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e(t.tag)}(Rp);const Ip=xe,Op=hp.Buffer,Tp=Ap,Bp=Rp;function Pp(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new xp,this.tree._init(t.body)}var Np=Pp;function xp(t){Tp.call(this,"der",t)}function Lp(t){return t<10?"0"+t:t}Pp.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},Ip(xp,Tp),xp.prototype._encodeComposite=function(t,e,i,r){const n=function(t,e,i,r){let n;"seqof"===t?t="seq":"setof"===t&&(t="set");if(Bp.tagByName.hasOwnProperty(t))n=Bp.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);n=t}if(n>=31)return r.error("Multi-octet tag encoding unsupported");e||(n|=32);return n|=Bp.tagClassByName[i||"universal"]<<6,n}(t,e,i,this.reporter);if(r.length<128){const t=Op.alloc(2);return t[0]=n,t[1]=r.length,this._createEncoderBuffer([t,r])}let o=1;for(let t=r.length;t>=256;t>>=8)o++;const s=Op.alloc(2+o);s[0]=n,s[1]=128|o;for(let t=1+o,e=r.length;e>0;t--,e>>=8)s[t]=255&e;return this._createEncoderBuffer([s,r])},xp.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=Op.alloc(2*t.length);for(let i=0;i<t.length;i++)e.writeUInt16BE(t.charCodeAt(i),2*i);return this._createEncoderBuffer(e)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},xp.prototype._encodeObjid=function(t,e,i){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s.]+/g);for(let e=0;e<t.length;e++)t[e]|=0}else if(Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!i){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let r=0;for(let e=0;e<t.length;e++){let i=t[e];for(r++;i>=128;i>>=7)r++}const n=Op.alloc(r);let o=n.length-1;for(let e=t.length-1;e>=0;e--){let i=t[e];for(n[o--]=127&i;(i>>=7)>0;)n[o--]=128|127&i}return this._createEncoderBuffer(n)},xp.prototype._encodeTime=function(t,e){let i;const r=new Date(t);return"gentime"===e?i=[Lp(r.getUTCFullYear()),Lp(r.getUTCMonth()+1),Lp(r.getUTCDate()),Lp(r.getUTCHours()),Lp(r.getUTCMinutes()),Lp(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?i=[Lp(r.getUTCFullYear()%100),Lp(r.getUTCMonth()+1),Lp(r.getUTCDate()),Lp(r.getUTCHours()),Lp(r.getUTCMinutes()),Lp(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(i,"octstr")},xp.prototype._encodeNull=function(){return this._createEncoderBuffer("")},xp.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!Op.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=Op.from(e)}if(Op.isBuffer(t)){let e=t.length;0===t.length&&e++;const i=Op.alloc(e);return t.copy(i),0===t.length&&(i[0]=0),this._createEncoderBuffer(i)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let i=1;for(let e=t;e>=256;e>>=8)i++;const r=new Array(i);for(let e=r.length-1;e>=0;e--)r[e]=255&t,t>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(Op.from(r))},xp.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},xp.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},xp.prototype._skipDefault=function(t,e,i){const r=this._baseState;let n;if(null===r.default)return!1;const o=t.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,e,i).join()),o.length!==r.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==r.defaultBuffer[n])return!1;return!0};const Dp=Np;function Cp(t){Dp.call(this,t),this.enc="pem"}xe(Cp,Dp);var qp=Cp;Cp.prototype.encode=function(t,e){const i=Dp.prototype.encode.call(this,t).toString("base64"),r=["-----BEGIN "+e.label+"-----"];for(let t=0;t<i.length;t+=64)r.push(i.slice(t,t+64));return r.push("-----END "+e.label+"-----"),r.join("\n")},function(t){const e=t;e.der=Np,e.pem=qp}(ip);var Up={};const jp=xe,zp=Jc,Fp=dp.DecoderBuffer,Hp=Ap,Kp=Rp;function Gp(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Vp,this.tree._init(t.body)}var Yp=Gp;function Vp(t){Hp.call(this,"der",t)}function Zp(t,e){let i=t.readUInt8(e);if(t.isError(i))return i;const r=Kp.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){let r=i;for(i=0;128==(128&r);){if(r=t.readUInt8(e),t.isError(r))return r;i<<=7,i|=127&r}}else i&=31;return{cls:r,primitive:n,tag:i,tagStr:Kp.tag[i]}}function Wp(t,e,i){let r=t.readUInt8(i);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;const n=127&r;if(n>4)return t.error("length octect is too long");r=0;for(let e=0;e<n;e++){r<<=8;const e=t.readUInt8(i);if(t.isError(e))return e;r|=e}return r}Gp.prototype.decode=function(t,e){return Fp.isDecoderBuffer(t)||(t=new Fp(t,e)),this.tree._decode(t,e)},jp(Vp,Hp),Vp.prototype._peekTag=function(t,e,i){if(t.isEmpty())return!1;const r=t.save(),n=Zp(t,'Failed to peek tag: "'+e+'"');return t.isError(n)?n:(t.restore(r),n.tag===e||n.tagStr===e||n.tagStr+"of"===e||i)},Vp.prototype._decodeTag=function(t,e,i){const r=Zp(t,'Failed to decode tag of "'+e+'"');if(t.isError(r))return r;let n=Wp(t,r.primitive,'Failed to get length of "'+e+'"');if(t.isError(n))return n;if(!i&&r.tag!==e&&r.tagStr!==e&&r.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(r.primitive||null!==n)return t.skip(n,'Failed to match body of: "'+e+'"');const o=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(n=t.offset-o.offset,t.restore(o),t.skip(n,'Failed to match body of: "'+e+'"'))},Vp.prototype._skipUntilEnd=function(t,e){for(;;){const i=Zp(t,e);if(t.isError(i))return i;const r=Wp(t,i.primitive,e);if(t.isError(r))return r;let n;if(n=i.primitive||null!==r?t.skip(r):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===i.tagStr)break}},Vp.prototype._decodeList=function(t,e,i,r){const n=[];for(;!t.isEmpty();){const e=this._peekTag(t,"end");if(t.isError(e))return e;const o=i.decode(t,"der",r);if(t.isError(o)&&e)break;n.push(o)}return n},Vp.prototype._decodeStr=function(t,e){if("bitstr"===e){const e=t.readUInt8();return t.isError(e)?e:{unused:e,data:t.raw()}}if("bmpstr"===e){const e=t.raw();if(e.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");let i="";for(let t=0;t<e.length/2;t++)i+=String.fromCharCode(e.readUInt16BE(2*t));return i}if("numstr"===e){const e=t.raw().toString("ascii");return this._isNumstr(e)?e:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){const e=t.raw().toString("ascii");return this._isPrintstr(e)?e:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},Vp.prototype._decodeObjid=function(t,e,i){let r;const n=[];let o=0,s=0;for(;!t.isEmpty();)s=t.readUInt8(),o<<=7,o|=127&s,0==(128&s)&&(n.push(o),o=0);128&s&&n.push(o);const h=n[0]/40|0,a=n[0]%40;if(r=i?n:[h,a].concat(n.slice(1)),e){let t=e[r.join(" ")];void 0===t&&(t=e[r.join(".")]),void 0!==t&&(r=t)}return r},Vp.prototype._decodeTime=function(t,e){const i=t.raw().toString();let r,n,o,s,h,a;if("gentime"===e)r=0|i.slice(0,4),n=0|i.slice(4,6),o=0|i.slice(6,8),s=0|i.slice(8,10),h=0|i.slice(10,12),a=0|i.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");r=0|i.slice(0,2),n=0|i.slice(2,4),o=0|i.slice(4,6),s=0|i.slice(6,8),h=0|i.slice(8,10),a=0|i.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,n-1,o,s,h,a,0)},Vp.prototype._decodeNull=function(){return null},Vp.prototype._decodeBool=function(t){const e=t.readUInt8();return t.isError(e)?e:0!==e},Vp.prototype._decodeInt=function(t,e){const i=t.raw();let r=new zp(i);return e&&(r=e[r.toString(10)]||r),r},Vp.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree};const Xp=xe,Qp=hp.Buffer,Jp=Yp;function $p(t){Jp.call(this,t),this.enc="pem"}Xp($p,Jp);var tm=$p;$p.prototype.decode=function(t,e){const i=t.toString().split(/[\r\n]+/g),r=e.label.toUpperCase(),n=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,s=-1;for(let t=0;t<i.length;t++){const e=i[t].match(n);if(null!==e&&e[2]===r){if(-1!==o){if("END"!==e[1])break;s=t;break}if("BEGIN"!==e[1])break;o=t}}if(-1===o||-1===s)throw new Error("PEM section not found for: "+r);const h=i.slice(o+1,s).join("");h.replace(/[^a-z0-9+/=]+/gi,"");const a=Qp.from(h,"base64");return Jp.prototype.decode.call(this,a,e)},function(t){const e=t;e.der=Yp,e.pem=tm}(Up),function(t){const e=ip,i=Up,r=xe;function n(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}t.define=function(t,e){return new n(t,e)},n.prototype._createNamed=function(t){const e=this.name;function i(t){this._initNamed(t,e)}return r(i,t),i.prototype._initNamed=function(e,i){t.call(this,e,i)},new i(this)},n.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i[t])),this.decoders[t]},n.prototype.decode=function(t,e,i){return this._getDecoder(e).decode(t,i)},n.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(e[t])),this.encoders[t]},n.prototype.encode=function(t,e,i){return this._getEncoder(e).encode(t,i)}}(ep);var em={};!function(t){const e=t;e.Reporter=ap.Reporter,e.DecoderBuffer=dp.DecoderBuffer,e.EncoderBuffer=dp.EncoderBuffer,e.Node=Ap}(em);var im={};!function(t){const e=im;e._reverse=function(t){const e={};return Object.keys(t).forEach((function(i){(0|i)==i&&(i|=0);const r=t[i];e[r]=i})),e},e.der=Rp}(),function(t){const e=Qc;e.bignum=Jc,e.define=ep.define,e.base=em,e.constants=im,e.decoders=Up,e.encoders=ip}();var rm=Qc,nm=rm.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),om=rm.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),sm=rm.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),hm=rm.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(sm),this.key("subjectPublicKey").bitstr())})),am=rm.define("RelativeDistinguishedName",(function(){this.setof(om)})),um=rm.define("RDNSequence",(function(){this.seqof(am)})),fm=rm.define("Name",(function(){this.choice({rdnSequence:this.use(um)})})),lm=rm.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(nm),this.key("notAfter").use(nm))})),dm=rm.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),cm=rm.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(sm),this.key("issuer").use(fm),this.key("validity").use(lm),this.key("subject").use(fm),this.key("subjectPublicKeyInfo").use(hm),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(dm).optional())})),pm=rm.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(cm),this.key("signatureAlgorithm").use(sm),this.key("signatureValue").bitstr())})),mm=Qc;Xc.certificate=pm;var gm=mm.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));Xc.RSAPrivateKey=gm;var vm=mm.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));Xc.RSAPublicKey=vm;var bm=mm.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(ym),this.key("subjectPublicKey").bitstr())}));Xc.PublicKey=bm;var ym=mm.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),wm=mm.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(ym),this.key("subjectPrivateKey").octstr())}));Xc.PrivateKey=wm;var Mm=mm.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));Xc.EncryptedPrivateKey=Mm;var _m=mm.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));Xc.DSAPrivateKey=_m,Xc.DSAparam=mm.define("DSAparam",(function(){this.int()}));var Sm=mm.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(Em),this.key("publicKey").optional().explicit(1).bitstr())}));Xc.ECPrivateKey=Sm;var Em=mm.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));Xc.signature=mm.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}));var Am=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,km=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,Rm=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,Im=pu,Om=ua,Tm=Re.Buffer,Bm=Xc,Pm={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"},Nm=function(t,e){var i,r=t.toString(),n=r.match(Am);if(n){var o="aes"+n[1],s=Tm.from(n[2],"hex"),h=Tm.from(n[3].replace(/[\r\n]/g,""),"base64"),a=Im(e,s.slice(0,8),parseInt(n[1],10)).key,u=[],f=Om.createDecipheriv(o,a,s);u.push(f.update(h)),u.push(f.final()),i=Tm.concat(u)}else{var l=r.match(Rm);i=Tm.from(l[2].replace(/[\r\n]/g,""),"base64")}return{tag:r.match(km)[1],data:i}},xm=ua,Lm=Js,Dm=Re.Buffer,Cm=qm;function qm(t){var e;"object"!=typeof t||Dm.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=Dm.from(t));var i,r,n=Nm(t,e),o=n.tag,s=n.data;switch(o){case"CERTIFICATE":r=Bm.certificate.decode(s,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(r||(r=Bm.PublicKey.decode(s,"der")),i=r.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Bm.RSAPublicKey.decode(r.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return r.subjectPrivateKey=r.subjectPublicKey,{type:"ec",data:r};case"1.2.840.10040.4.1":return r.algorithm.params.pub_key=Bm.DSAparam.decode(r.subjectPublicKey.data,"der"),{type:"dsa",data:r.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":s=function(t,e){var i=t.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=Pm[t.algorithm.decrypt.cipher.algo.join(".")],o=t.algorithm.decrypt.cipher.iv,s=t.subjectPrivateKey,h=parseInt(n.split("-")[1],10)/8,a=Lm.pbkdf2Sync(e,i,r,h,"sha1"),u=xm.createDecipheriv(n,a,o),f=[];return f.push(u.update(s)),f.push(u.final()),Dm.concat(f)}(s=Bm.EncryptedPrivateKey.decode(s,"der"),e);case"PRIVATE KEY":switch(i=(r=Bm.PrivateKey.decode(s,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Bm.RSAPrivateKey.decode(r.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:r.algorithm.curve,privateKey:Bm.ECPrivateKey.decode(r.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return r.algorithm.params.priv_key=Bm.DSAparam.decode(r.subjectPrivateKey,"der"),{type:"dsa",params:r.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return Bm.RSAPublicKey.decode(s,"der");case"RSA PRIVATE KEY":return Bm.RSAPrivateKey.decode(s,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Bm.DSAPrivateKey.decode(s,"der")};case"EC PRIVATE KEY":return{curve:(s=Bm.ECPrivateKey.decode(s,"der")).parameters.value,privateKey:s.privateKey};default:throw new Error("unknown key type "+o)}}qm.signature=Bm.signature;var Um,jm,zm,Fm,Hm,Km={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};function Gm(){if(Um)return mf;Um=1;var t=Re.Buffer,e=Vs,i=Sf,r=Wc().ec,n=vf,o=Cm,s=Km;function h(i,r,n,o){if((i=t.from(i.toArray())).length<r.byteLength()){var s=t.alloc(r.byteLength()-i.length);i=t.concat([s,i])}var h=n.length,u=function(e,i){e=a(e,i),e=e.mod(i);var r=t.from(e.toArray());if(r.length<i.byteLength()){var n=t.alloc(i.byteLength()-r.length);r=t.concat([n,r])}return r}(n,r),f=t.alloc(h);f.fill(1);var l=t.alloc(h);return l=e(o,l).update(f).update(t.from([0])).update(i).update(u).digest(),f=e(o,l).update(f).digest(),{k:l=e(o,l).update(f).update(t.from([1])).update(i).update(u).digest(),v:f=e(o,l).update(f).digest()}}function a(t,e){var i=new n(t),r=(t.length<<3)-e.bitLength();return r>0&&i.ishrn(r),i}function u(i,r,n){var o,s;do{for(o=t.alloc(0);8*o.length<i.bitLength();)r.v=e(n,r.k).update(r.v).digest(),o=t.concat([o,r.v]);s=a(o,i),r.k=e(n,r.k).update(r.v).update(t.from([0])).digest(),r.v=e(n,r.k).update(r.v).digest()}while(-1!==s.cmp(i));return s}function f(t,e,i,r){return t.toRed(n.mont(i)).redPow(e).fromRed().mod(r)}return gf.exports=function(e,l,d,c,p){var m=o(l);if(m.curve){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong private key type");return function(e,i){var n=s[i.curve.join(".")];if(!n)throw new Error("unknown curve "+i.curve.join("."));var o=new r(n),h=o.keyFromPrivate(i.privateKey),a=h.sign(e);return t.from(a.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==c)throw new Error("wrong private key type");return function(e,i,r){var o,s=i.params.priv_key,l=i.params.p,d=i.params.q,c=i.params.g,p=new n(0),m=a(e,d).mod(d),g=!1,v=h(s,d,e,r);for(;!1===g;)p=f(c,o=u(d,v,r),l,d),0===(g=o.invm(d).imul(m.add(s.mul(p))).mod(d)).cmpn(0)&&(g=!1,p=new n(0));return function(e,i){e=e.toArray(),i=i.toArray(),128&e[0]&&(e=[0].concat(e));128&i[0]&&(i=[0].concat(i));var r=e.length+i.length+4,n=[48,r,2,e.length];return n=n.concat(e,[2,i.length],i),t.from(n)}(p,g)}(e,m,d)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong private key type");e=t.concat([p,e]);for(var g=m.modulus.byteLength(),v=[0,1];e.length+v.length+1<g;)v.push(255);v.push(0);for(var b=-1;++b<e.length;)v.push(e[b]);return i(v,m)},mf.getKey=h,mf.makeKey=u,mf}function Ym(){if(zm)return jm;zm=1;var t=Re.Buffer,e=vf,i=Wc().ec,r=Cm,n=Km;function o(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}return jm=function(s,h,a,u,f){var l=r(a);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,r){var o=n[r.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var s=new i(o),h=r.data.subjectPrivateKey.data;return s.verify(e,t,h)}(s,h,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,i,n){var s=n.data.p,h=n.data.q,a=n.data.g,u=n.data.pub_key,f=r.signature.decode(t,"der"),l=f.s,d=f.r;o(l,h),o(d,h);var c=e.mont(s),p=l.invm(h),m=a.toRed(c).redPow(new e(i).mul(p).mod(h)).fromRed().mul(u.toRed(c).redPow(d.mul(p).mod(h)).fromRed()).mod(s).mod(h);return 0===m.cmp(d)}(s,h,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");h=t.concat([f,h]);for(var d=l.modulus.byteLength(),c=[1],p=0;h.length+c.length+2<d;)c.push(255),p++;c.push(0);for(var m=-1;++m<h.length;)c.push(h[m]);c=t.from(c);var g=e.mont(l.modulus);s=(s=new e(s).toRed(g)).redPow(new e(l.publicExponent)),s=t.from(s.fromRed().toArray());var v=p<8?1:0;for(d=Math.min(s.length,c.length),s.length!==c.length&&(v=1),m=-1;++m<d;)v|=s[m]^c[m];return 0===v},jm}var Vm,Zm,Wm={},Xm={get exports(){return Wm},set exports(t){Wm=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Xm,Tt);var Qm={},Jm=Os,$m=Re.Buffer,tg=function(t,e){for(var i,r=$m.alloc(0),n=0;r.length<e;)i=eg(n++),r=$m.concat([r,Jm("sha1").update(t).update(i).digest()]);return r.slice(0,e)};function eg(t){var e=$m.allocUnsafe(4);return e.writeUInt32BE(t,0),e}var ig=function(t,e){for(var i=t.length,r=-1;++r<i;)t[r]^=e[r];return t},rg={},ng={get exports(){return rg},set exports(t){rg=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(ng,Tt);var og=rg,sg=Re.Buffer;var hg=function(t,e){return sg.from(t.toRed(og.mont(e.modulus)).redPow(new og(e.publicExponent)).fromRed().toArray())},ag=Cm,ug=Ae,fg=Os,lg=tg,dg=ig,cg=rg,pg=hg,mg=Sf,gg=Re.Buffer,vg=function(t,e,i){var r;r=t.padding?t.padding:i?1:4;var n,o=ag(t);if(4===r)n=function(t,e){var i=t.modulus.byteLength(),r=e.length,n=fg("sha1").update(gg.alloc(0)).digest(),o=n.length,s=2*o;if(r>i-s-2)throw new Error("message too long");var h=gg.alloc(i-r-s-2),a=i-o-1,u=ug(o),f=dg(gg.concat([n,h,gg.alloc(1,1),e],a),lg(u,a)),l=dg(u,lg(f,o));return new cg(gg.concat([gg.alloc(1),l,f],i))}(o,e);else if(1===r)n=function(t,e,i){var r,n=e.length,o=t.modulus.byteLength();if(n>o-11)throw new Error("message too long");r=i?gg.alloc(o-n-3,255):function(t){var e,i=gg.allocUnsafe(t),r=0,n=ug(2*t),o=0;for(;r<t;)o===n.length&&(n=ug(2*t),o=0),(e=n[o++])&&(i[r++]=e);return i}(o-n-3);return new cg(gg.concat([gg.from([0,i?1:2]),r,gg.alloc(1),e],o))}(o,e,i);else{if(3!==r)throw new Error("unknown padding");if((n=new cg(e)).cmp(o.modulus)>=0)throw new Error("data too long for modulus")}return i?mg(n,o):pg(n,o)};var bg=Cm,yg=tg,wg=ig,Mg=rg,_g=Sf,Sg=Os,Eg=hg,Ag=Re.Buffer,kg=function(t,e,i){var r;r=t.padding?t.padding:i?1:4;var n,o=bg(t),s=o.modulus.byteLength();if(e.length>s||new Mg(e).cmp(o.modulus)>=0)throw new Error("decryption error");n=i?Eg(new Mg(e),o):_g(e,o);var h=Ag.alloc(s-n.length);if(n=Ag.concat([h,n],s),4===r)return function(t,e){var i=t.modulus.byteLength(),r=Sg("sha1").update(Ag.alloc(0)).digest(),n=r.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,n+1),s=e.slice(n+1),h=wg(o,yg(s,n)),a=wg(s,yg(h,i-n-1));if(function(t,e){t=Ag.from(t),e=Ag.from(e);var i=0,r=t.length;t.length!==e.length&&(i++,r=Math.min(t.length,e.length));var n=-1;for(;++n<r;)i+=t[n]^e[n];return i}(r,a.slice(0,n)))throw new Error("decryption error");var u=n;for(;0===a[u];)u++;if(1!==a[u++])throw new Error("decryption error");return a.slice(u)}(o,n);if(1===r)return function(t,e,i){var r=e.slice(0,2),n=2,o=0;for(;0!==e[n++];)if(n>=e.length){o++;break}var s=e.slice(2,n-1);("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(n)}(0,n,i);if(3===r)return n;throw new Error("unknown padding")};!function(t){t.publicEncrypt=vg,t.privateDecrypt=kg,t.privateEncrypt=function(e,i){return t.publicEncrypt(e,i,!0)},t.publicDecrypt=function(e,i){return t.privateDecrypt(e,i,!0)}}(Qm);var Rg={};function Ig(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var Og,Tg=Re,Bg=Ae,Pg=Tg.Buffer,Ng=Tg.kMaxLength,xg=Tt.crypto||Tt.msCrypto,Lg=Math.pow(2,32)-1;function Dg(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>Lg||t<0)throw new TypeError("offset must be a uint32");if(t>Ng||t>e)throw new RangeError("offset out of range")}function Cg(t,e,i){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>Lg||t<0)throw new TypeError("size must be a uint32");if(t+e>i||t>Ng)throw new RangeError("buffer too small")}function qg(t,e,i,r){if(_e.browser){var n=t.buffer,o=new Uint8Array(n,e,i);return xg.getRandomValues(o),r?void _e.nextTick((function(){r(null,t)})):t}if(!r)return Bg(i).copy(t,e),t;Bg(i,(function(i,n){if(i)return r(i);n.copy(t,e),r(null,t)}))}function Ug(){if(Og)return Ee;Og=1,Ee.randomBytes=Ee.rng=Ee.pseudoRandomBytes=Ee.prng=Ae,Ee.createHash=Ee.Hash=Os,Ee.createHmac=Ee.Hmac=Vs;var t=Zs,e=Object.keys(t),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);Ee.getHashes=function(){return i};var r=Js;Ee.pbkdf2=r.pbkdf2,Ee.pbkdf2Sync=r.pbkdf2Sync;var n=Rh;Ee.Cipher=n.Cipher,Ee.createCipher=n.createCipher,Ee.Cipheriv=n.Cipheriv,Ee.createCipheriv=n.createCipheriv,Ee.Decipher=n.Decipher,Ee.createDecipher=n.createDecipher,Ee.Decipheriv=n.Decipheriv,Ee.createDecipheriv=n.createDecipheriv,Ee.getCiphers=n.getCiphers,Ee.listCiphers=n.listCiphers;var o=function(){if(df)return Zu;df=1;var t=uf(),e=cf,i=pf(),r={binary:!0,hex:!0,base64:!0};return Zu.DiffieHellmanGroup=Zu.createDiffieHellmanGroup=Zu.getDiffieHellman=function(t){var r=new K(e[t].prime,"hex"),n=new K(e[t].gen,"hex");return new i(r,n)},Zu.createDiffieHellman=Zu.DiffieHellman=function e(n,o,s,h){return K.isBuffer(o)||void 0===r[o]?e(n,"binary",o,s):(o=o||"binary",h=h||"binary",s=s||new K([2]),K.isBuffer(s)||(s=new K(s,h)),"number"==typeof n?new i(t(n,s),s,!0):(K.isBuffer(n)||(n=new K(n,o)),new i(n,s,!0)))},Zu}();Ee.DiffieHellmanGroup=o.DiffieHellmanGroup,Ee.createDiffieHellmanGroup=o.createDiffieHellmanGroup,Ee.getDiffieHellman=o.getDiffieHellman,Ee.createDiffieHellman=o.createDiffieHellman,Ee.DiffieHellman=o.DiffieHellman;var s=function(){if(Hm)return Fm;Hm=1;var t=Re.Buffer,e=Os,i=De,r=xe,n=Gm(),o=Ym(),s=Xs;function h(t){i.Writable.call(this);var r=s[t];if(!r)throw new Error("Unknown message digest");this._hashType=r.hash,this._hash=e(r.hash),this._tag=r.id,this._signType=r.sign}function a(t){i.Writable.call(this);var r=s[t];if(!r)throw new Error("Unknown message digest");this._hash=e(r.hash),this._tag=r.id,this._signType=r.sign}function u(t){return new h(t)}function f(t){return new a(t)}return Object.keys(s).forEach((function(e){s[e].id=t.from(s[e].id,"hex"),s[e.toLowerCase()]=s[e]})),r(h,i.Writable),h.prototype._write=function(t,e,i){this._hash.update(t),i()},h.prototype.update=function(e,i){return"string"==typeof e&&(e=t.from(e,i)),this._hash.update(e),this},h.prototype.sign=function(t,e){this.end();var i=this._hash.digest(),r=n(i,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},r(a,i.Writable),a.prototype._write=function(t,e,i){this._hash.update(t),i()},a.prototype.update=function(e,i){return"string"==typeof e&&(e=t.from(e,i)),this._hash.update(e),this},a.prototype.verify=function(e,i,r){"string"==typeof i&&(i=t.from(i,r)),this.end();var n=this._hash.digest();return o(i,n,e,this._signType,this._tag)},Fm={Sign:u,Verify:f,createSign:u,createVerify:f}}();Ee.createSign=s.createSign,Ee.Sign=s.Sign,Ee.createVerify=s.createVerify,Ee.Verify=s.Verify,Ee.createECDH=function(){if(Zm)return Vm;Zm=1;var t=Wc(),e=Wm;Vm=function(t){return new r(t)};var i={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function r(e){this.curveType=i[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function n(t,e,i){Array.isArray(t)||(t=t.toArray());var r=new K(t);if(i&&r.length<i){var n=new K(i-r.length);n.fill(0),r=K.concat([n,r])}return e?r.toString(e):r}return i.p224=i.secp224r1,i.p256=i.secp256r1=i.prime256v1,i.p192=i.secp192r1=i.prime192v1,i.p384=i.secp384r1,i.p521=i.secp521r1,r.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},r.prototype.computeSecret=function(t,e,i){return e=e||"utf8",K.isBuffer(t)||(t=new K(t,e)),n(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),i,this.curveType.byteLength)},r.prototype.getPublicKey=function(t,e){var i=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(i[i.length-1]%2?i[0]=7:i[0]=6),n(i,t)},r.prototype.getPrivateKey=function(t){return n(this.keys.getPrivate(),t)},r.prototype.setPublicKey=function(t,e){return e=e||"utf8",K.isBuffer(t)||(t=new K(t,e)),this.keys._importPublic(t),this},r.prototype.setPrivateKey=function(t,i){i=i||"utf8",K.isBuffer(t)||(t=new K(t,i));var r=new e(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this},Vm}();var h=Qm;Ee.publicEncrypt=h.publicEncrypt,Ee.privateEncrypt=h.privateEncrypt,Ee.publicDecrypt=h.publicDecrypt,Ee.privateDecrypt=h.privateDecrypt;var a=Rg;return Ee.randomFill=a.randomFill,Ee.randomFillSync=a.randomFillSync,Ee.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},Ee.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},Ee}xg&&xg.getRandomValues||!_e.browser?(Rg.randomFill=function(t,e,i,r){if(!(Pg.isBuffer(t)||t instanceof Tt.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)r=e,e=0,i=t.length;else if("function"==typeof i)r=i,i=t.length-e;else if("function"!=typeof r)throw new TypeError('"cb" argument must be a function');return Dg(e,t.length),Cg(i,e,t.length),qg(t,e,i,r)},Rg.randomFillSync=function(t,e,i){void 0===e&&(e=0);if(!(Pg.isBuffer(t)||t instanceof Tt.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');Dg(e,t.length),void 0===i&&(i=t.length-e);return Cg(i,e,t.length),qg(t,e,i)}):(Rg.randomFill=Ig,Rg.randomFillSync=Ig),Ug(),Se.linebrk=function(t,e){for(var i="",r=0;r+e<t.length;)i+=t.substring(r,r+e)+"\n",r+=e;return i+t.substring(r,t.length)},Se.detectEnvironment=function(){return"undefined"==typeof window||!window||_e&&"node"===_e.title?"node":"browser"},Se.get32IntFromBuffer=function(t,e){e=e||0;var i;if((i=t.length-e)>0){if(i>=4)return t.readUIntBE(e,i);for(var r=0,n=e+i,o=0;n>e;n--,o+=2)r+=t[n-1]*Math.pow(16,o);return r}return NaN},Se._={isObject:function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)},isString:function(t){return"string"==typeof t||t instanceof String},isNumber:function(t){return"number"==typeof t||!isNaN(parseFloat(t))&&isFinite(t)},omit:function(t,e){var i={};for(var r in t)t.hasOwnProperty(r)&&r!==e&&(i[r]=t[r]);return i}},Se.trimSurroundingText=function(t,e,i){var r=0,n=t.length,o=t.indexOf(e);o>=0&&(r=o+e.length);var s=t.indexOf(i,o);return s>=0&&(n=s),t.substring(r,n)};var jg=Ug(),zg=Se._;function Fg(t,e){null!=t&&("number"==typeof t?this.fromNumber(t,e):K.isBuffer(t)?this.fromBuffer(t):null==e&&"string"!=typeof t?this.fromByteArray(t):this.fromString(t,e))}function Hg(){return new Fg(null)}Fg.prototype.am=function(t,e,i,r,n,o){for(var s=16383&e,h=e>>14;--o>=0;){var a=16383&this[t],u=this[t++]>>14,f=h*a+u*s;n=((a=s*a+((16383&f)<<14)+i[r]+n)>>28)+(f>>14)+h*u,i[r++]=268435455&a}return n},Fg.prototype.DB=28,Fg.prototype.DM=268435455,Fg.prototype.DV=1<<28;Fg.prototype.FV=Math.pow(2,52),Fg.prototype.F1=24,Fg.prototype.F2=4;var Kg,Gg,Yg="0123456789abcdefghijklmnopqrstuvwxyz",Vg=new Array;for(Kg="0".charCodeAt(0),Gg=0;Gg<=9;++Gg)Vg[Kg++]=Gg;for(Kg="a".charCodeAt(0),Gg=10;Gg<36;++Gg)Vg[Kg++]=Gg;for(Kg="A".charCodeAt(0),Gg=10;Gg<36;++Gg)Vg[Kg++]=Gg;function Zg(t){return Yg.charAt(t)}function Wg(t,e){var i=Vg[t.charCodeAt(e)];return null==i?-1:i}function Xg(t){var e=Hg();return e.fromInt(t),e}function Qg(t){var e,i=1;return 0!=(e=t>>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=(e=t>>1)&&(t=e,i+=1),i}function Jg(t){this.m=t}function $g(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function tv(t,e){return t&e}function ev(t,e){return t|e}function iv(t,e){return t^e}function rv(t,e){return t&~e}function nv(t){if(0===t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function ov(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function sv(){}function hv(t){return t}function av(t){this.r2=Hg(),this.q3=Hg(),Fg.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}Jg.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},Jg.prototype.revert=function(t){return t},Jg.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},Jg.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},Jg.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},$g.prototype.convert=function(t){var e=Hg();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(Fg.ZERO)>0&&this.m.subTo(e,e),e},$g.prototype.revert=function(t){var e=Hg();return t.copyTo(e),this.reduce(e),e},$g.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var i=32767&t[e],r=i*this.mpl+((i*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},$g.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},$g.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},sv.prototype.convert=hv,sv.prototype.revert=hv,sv.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i)},sv.prototype.sqrTo=function(t,e){t.squareTo(e)},av.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=Hg();return t.copyTo(e),this.reduce(e),e},av.prototype.revert=function(t){return t},av.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},av.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},av.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var uv=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],fv=(1<<26)/uv[uv.length-1];Fg.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},Fg.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0},Fg.prototype.fromString=function(t,e,i){var r;switch(e){case 2:r=1;break;case 4:r=2;break;case 8:r=3;break;case 16:r=4;break;case 32:r=5;break;case 256:r=8;break;default:return void this.fromRadix(t,e)}this.t=0,this.s=0;for(var n=t.length,o=!1,s=0;--n>=0;){var h=8==r?255&t[n]:Wg(t,n);h<0?"-"==t.charAt(n)&&(o=!0):(o=!1,0===s?this[this.t++]=h:s+r>this.DB?(this[this.t-1]|=(h&(1<<this.DB-s)-1)<<s,this[this.t++]=h>>this.DB-s):this[this.t-1]|=h<<s,(s+=r)>=this.DB&&(s-=this.DB))}i||8!=r||0==(128&t[0])||(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&Fg.ZERO.subTo(this,this)},Fg.prototype.fromByteArray=function(t,e){this.fromString(t,256,e)},Fg.prototype.fromBuffer=function(t){this.fromString(t,256,!0)},Fg.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},Fg.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s},Fg.prototype.drShiftTo=function(t,e){for(var i=t;i<this.t;++i)e[i-t]=this[i];e.t=Math.max(this.t-t,0),e.s=this.s},Fg.prototype.lShiftTo=function(t,e){var i,r=t%this.DB,n=this.DB-r,o=(1<<n)-1,s=Math.floor(t/this.DB),h=this.s<<r&this.DM;for(i=this.t-1;i>=0;--i)e[i+s+1]=this[i]>>n|h,h=(this[i]&o)<<r;for(i=s-1;i>=0;--i)e[i]=0;e[s]=h,e.t=this.t+s+1,e.s=this.s,e.clamp()},Fg.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var r=t%this.DB,n=this.DB-r,o=(1<<r)-1;e[0]=this[i]>>r;for(var s=i+1;s<this.t;++s)e[s-i-1]|=(this[s]&o)<<n,e[s-i]=this[s]>>r;r>0&&(e[this.t-i-1]|=(this.s&o)<<n),e.t=this.t-i,e.clamp()}},Fg.prototype.subTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]-t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r-=t[i],e[i++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[i++]=this.DV+r:r>0&&(e[i++]=r),e.t=i,e.clamp()},Fg.prototype.multiplyTo=function(t,e){var i=this.abs(),r=t.abs(),n=i.t;for(e.t=n+r.t;--n>=0;)e[n]=0;for(n=0;n<r.t;++n)e[n+i.t]=i.am(0,r[n],e,n,0,i.t);e.s=0,e.clamp(),this.s!=t.s&&Fg.ZERO.subTo(e,e)},Fg.prototype.squareTo=function(t){for(var e=this.abs(),i=t.t=2*e.t;--i>=0;)t[i]=0;for(i=0;i<e.t-1;++i){var r=e.am(i,e[i],t,2*i,0,1);(t[i+e.t]+=e.am(i+1,2*e[i],t,2*i+1,r,e.t-i-1))>=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},Fg.prototype.divRemTo=function(t,e,i){var r=t.abs();if(!(r.t<=0)){var n=this.abs();if(n.t<r.t)return null!=e&&e.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=Hg());var o=Hg(),s=this.s,h=t.s,a=this.DB-Qg(r[r.t-1]);a>0?(r.lShiftTo(a,o),n.lShiftTo(a,i)):(r.copyTo(o),n.copyTo(i));var u=o.t,f=o[u-1];if(0!==f){var l=f*(1<<this.F1)+(u>1?o[u-2]>>this.F2:0),d=this.FV/l,c=(1<<this.F1)/l,p=1<<this.F2,m=i.t,g=m-u,v=null==e?Hg():e;for(o.dlShiftTo(g,v),i.compareTo(v)>=0&&(i[i.t++]=1,i.subTo(v,i)),Fg.ONE.dlShiftTo(u,v),v.subTo(o,o);o.t<u;)o[o.t++]=0;for(;--g>=0;){var b=i[--m]==f?this.DM:Math.floor(i[m]*d+(i[m-1]+p)*c);if((i[m]+=o.am(0,b,i,g,0,u))<b)for(o.dlShiftTo(g,v),i.subTo(v,i);i[m]<--b;)i.subTo(v,i)}null!=e&&(i.drShiftTo(u,e),s!=h&&Fg.ZERO.subTo(e,e)),i.t=u,i.clamp(),a>0&&i.rShiftTo(a,i),s<0&&Fg.ZERO.subTo(i,i)}}},Fg.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},Fg.prototype.isEven=function(){return 0===(this.t>0?1&this[0]:this.s)},Fg.prototype.exp=function(t,e){if(t>4294967295||t<1)return Fg.ONE;var i=Hg(),r=Hg(),n=e.convert(this),o=Qg(t)-1;for(n.copyTo(i);--o>=0;)if(e.sqrTo(i,r),(t&1<<o)>0)e.mulTo(r,n,i);else{var s=i;i=r,r=s}return e.revert(i)},Fg.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},Fg.prototype.toRadix=function(t){if(null==t&&(t=10),0===this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),r=Xg(i),n=Hg(),o=Hg(),s="";for(this.divRemTo(r,n,o);n.signum()>0;)s=(i+o.intValue()).toString(t).substr(1)+s,n.divRemTo(r,n,o);return o.intValue().toString(t)+s},Fg.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var i=this.chunkSize(e),r=Math.pow(e,i),n=!1,o=0,s=0,h=0;h<t.length;++h){var a=Wg(t,h);a<0?"-"==t.charAt(h)&&0===this.signum()&&(n=!0):(s=e*s+a,++o>=i&&(this.dMultiply(r),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),n&&Fg.ZERO.subTo(this,this)},Fg.prototype.fromNumber=function(t,e){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t),this.testBit(t-1)||this.bitwiseTo(Fg.ONE.shiftLeft(t-1),ev,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(Fg.ONE.shiftLeft(t-1),this);else{var i=jg.randomBytes(1+(t>>3)),r=7&t;r>0?i[0]&=(1<<r)-1:i[0]=0,this.fromByteArray(i)}},Fg.prototype.bitwiseTo=function(t,e,i){var r,n,o=Math.min(t.t,this.t);for(r=0;r<o;++r)i[r]=e(this[r],t[r]);if(t.t<this.t){for(n=t.s&this.DM,r=o;r<this.t;++r)i[r]=e(this[r],n);i.t=this.t}else{for(n=this.s&this.DM,r=o;r<t.t;++r)i[r]=e(n,t[r]);i.t=t.t}i.s=e(this.s,t.s),i.clamp()},Fg.prototype.changeBit=function(t,e){var i=Fg.ONE.shiftLeft(t);return this.bitwiseTo(i,e,i),i},Fg.prototype.addTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]+t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r+=t[i],e[i++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[i++]=r:r<-1&&(e[i++]=this.DV+r),e.t=i,e.clamp()},Fg.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},Fg.prototype.dAddOffset=function(t,e){if(0!==t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},Fg.prototype.multiplyLowerTo=function(t,e,i){var r,n=Math.min(this.t+t.t,e);for(i.s=0,i.t=n;n>0;)i[--n]=0;for(r=i.t-this.t;n<r;++n)i[n+this.t]=this.am(0,t[n],i,n,0,this.t);for(r=Math.min(t.t,e);n<r;++n)this.am(0,t[n],i,n,0,e-n);i.clamp()},Fg.prototype.multiplyUpperTo=function(t,e,i){--e;var r=i.t=this.t+t.t-e;for(i.s=0;--r>=0;)i[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)i[this.t+r-e]=this.am(e-r,t[r],i,0,0,this.t+r-e);i.clamp(),i.drShiftTo(1,i)},Fg.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,i=this.s<0?t-1:0;if(this.t>0)if(0===e)i=this[0]%t;else for(var r=this.t-1;r>=0;--r)i=(e*i+this[r])%t;return i},Fg.prototype.millerRabin=function(t){var e=this.subtract(Fg.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var r=e.shiftRight(i);(t=t+1>>1)>uv.length&&(t=uv.length);for(var n=Hg(),o=0;o<t;++o){n.fromInt(uv[Math.floor(Math.random()*uv.length)]);var s=n.modPow(r,this);if(0!=s.compareTo(Fg.ONE)&&0!=s.compareTo(e)){for(var h=1;h++<i&&0!=s.compareTo(e);)if(0===(s=s.modPowInt(2,this)).compareTo(Fg.ONE))return!1;if(0!=s.compareTo(e))return!1}}return!0},Fg.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var i,r=(1<<e)-1,n=!1,o="",s=this.t,h=this.DB-s*this.DB%e;if(s-- >0)for(h<this.DB&&(i=this[s]>>h)>0&&(n=!0,o=Zg(i));s>=0;)h<e?(i=(this[s]&(1<<h)-1)<<e-h,i|=this[--s]>>(h+=this.DB-e)):(i=this[s]>>(h-=e)&r,h<=0&&(h+=this.DB,--s)),i>0&&(n=!0),n&&(o+=Zg(i));return n?o:"0"},Fg.prototype.negate=function(){var t=Hg();return Fg.ZERO.subTo(this,t),t},Fg.prototype.abs=function(){return this.s<0?this.negate():this},Fg.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var i=this.t;if(0!=(e=i-t.t))return this.s<0?-e:e;for(;--i>=0;)if(0!=(e=this[i]-t[i]))return e;return 0},Fg.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Qg(this[this.t-1]^this.s&this.DM)},Fg.prototype.mod=function(t){var e=Hg();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Fg.ZERO)>0&&t.subTo(e,e),e},Fg.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new Jg(e):new $g(e),this.exp(t,i)},Fg.prototype.clone=function(){var t=Hg();return this.copyTo(t),t},Fg.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0===this.t)return-1}else{if(1==this.t)return this[0];if(0===this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},Fg.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},Fg.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},Fg.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},Fg.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var i,r=this.DB-t*this.DB%8,n=0;if(t-- >0)for(r<this.DB&&(i=this[t]>>r)!=(this.s&this.DM)>>r&&(e[n++]=i|this.s<<this.DB-r);t>=0;)r<8?(i=(this[t]&(1<<r)-1)<<8-r,i|=this[--t]>>(r+=this.DB-8)):(i=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&i)&&(i|=-256),0===n&&(128&this.s)!=(128&i)&&++n,(n>0||i!=this.s)&&(e[n++]=i);return e},Fg.prototype.toBuffer=function(t){var e=K.from(this.toByteArray());if(!0===t&&0===e[0])e=e.slice(1);else if(zg.isNumber(t)){if(e.length>t){for(var i=0;i<e.length-t;i++)if(0!==e[i])return null;return e.slice(e.length-t)}if(e.length<t){var r=K.alloc(t);return r.fill(0,0,t-e.length),e.copy(r,t-e.length),r}}return e},Fg.prototype.equals=function(t){return 0==this.compareTo(t)},Fg.prototype.min=function(t){return this.compareTo(t)<0?this:t},Fg.prototype.max=function(t){return this.compareTo(t)>0?this:t},Fg.prototype.and=function(t){var e=Hg();return this.bitwiseTo(t,tv,e),e},Fg.prototype.or=function(t){var e=Hg();return this.bitwiseTo(t,ev,e),e},Fg.prototype.xor=function(t){var e=Hg();return this.bitwiseTo(t,iv,e),e},Fg.prototype.andNot=function(t){var e=Hg();return this.bitwiseTo(t,rv,e),e},Fg.prototype.not=function(){for(var t=Hg(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},Fg.prototype.shiftLeft=function(t){var e=Hg();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},Fg.prototype.shiftRight=function(t){var e=Hg();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},Fg.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+nv(this[t]);return this.s<0?this.t*this.DB:-1},Fg.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,i=0;i<this.t;++i)t+=ov(this[i]^e);return t},Fg.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},Fg.prototype.setBit=function(t){return this.changeBit(t,ev)},Fg.prototype.clearBit=function(t){return this.changeBit(t,rv)},Fg.prototype.flipBit=function(t){return this.changeBit(t,iv)},Fg.prototype.add=function(t){var e=Hg();return this.addTo(t,e),e},Fg.prototype.subtract=function(t){var e=Hg();return this.subTo(t,e),e},Fg.prototype.multiply=function(t){var e=Hg();return this.multiplyTo(t,e),e},Fg.prototype.divide=function(t){var e=Hg();return this.divRemTo(t,e,null),e},Fg.prototype.remainder=function(t){var e=Hg();return this.divRemTo(t,null,e),e},Fg.prototype.divideAndRemainder=function(t){var e=Hg(),i=Hg();return this.divRemTo(t,e,i),new Array(e,i)},Fg.prototype.modPow=function(t,e){var i,r,n=t.bitLength(),o=Xg(1);if(n<=0)return o;i=n<18?1:n<48?3:n<144?4:n<768?5:6,r=n<8?new Jg(e):e.isEven()?new av(e):new $g(e);var s=new Array,h=3,a=i-1,u=(1<<i)-1;if(s[1]=r.convert(this),i>1){var f=Hg();for(r.sqrTo(s[1],f);h<=u;)s[h]=Hg(),r.mulTo(f,s[h-2],s[h]),h+=2}var l,d,c=t.t-1,p=!0,m=Hg();for(n=Qg(t[c])-1;c>=0;){for(n>=a?l=t[c]>>n-a&u:(l=(t[c]&(1<<n+1)-1)<<a-n,c>0&&(l|=t[c-1]>>this.DB+n-a)),h=i;0==(1&l);)l>>=1,--h;if((n-=h)<0&&(n+=this.DB,--c),p)s[l].copyTo(o),p=!1;else{for(;h>1;)r.sqrTo(o,m),r.sqrTo(m,o),h-=2;h>0?r.sqrTo(o,m):(d=o,o=m,m=d),r.mulTo(m,s[l],o)}for(;c>=0&&0==(t[c]&1<<n);)r.sqrTo(o,m),d=o,o=m,m=d,--n<0&&(n=this.DB-1,--c)}return r.revert(o)},Fg.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0===t.signum())return Fg.ZERO;for(var i=t.clone(),r=this.clone(),n=Xg(1),o=Xg(0),s=Xg(0),h=Xg(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),e?(n.isEven()&&o.isEven()||(n.addTo(this,n),o.subTo(t,o)),n.rShiftTo(1,n)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),e?(s.isEven()&&h.isEven()||(s.addTo(this,s),h.subTo(t,h)),s.rShiftTo(1,s)):h.isEven()||h.subTo(t,h),h.rShiftTo(1,h);i.compareTo(r)>=0?(i.subTo(r,i),e&&n.subTo(s,n),o.subTo(h,o)):(r.subTo(i,r),e&&s.subTo(n,s),h.subTo(o,h))}return 0!=r.compareTo(Fg.ONE)?Fg.ZERO:h.compareTo(t)>=0?h.subtract(t):h.signum()<0?(h.addTo(t,h),h.signum()<0?h.add(t):h):h},Fg.prototype.pow=function(t){return this.exp(t,new sv)},Fg.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var r=e;e=i,i=r}var n=e.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)return e;for(n<o&&(o=n),o>0&&(e.rShiftTo(o,e),i.rShiftTo(o,i));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=i.getLowestSetBit())>0&&i.rShiftTo(n,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return o>0&&i.lShiftTo(o,i),i},Fg.prototype.isProbablePrime=function(t){var e,i=this.abs();if(1==i.t&&i[0]<=uv[uv.length-1]){for(e=0;e<uv.length;++e)if(i[0]==uv[e])return!0;return!1}if(i.isEven())return!1;for(e=1;e<uv.length;){for(var r=uv[e],n=e+1;n<uv.length&&r<fv;)r*=uv[n++];for(r=i.modInt(r);e<n;)if(r%uv[e++]==0)return!1}return i.millerRabin(t)},Fg.int2char=Zg,Fg.ZERO=Xg(0),Fg.ONE=Xg(1),Fg.prototype.square=function(){var t=Hg();return this.squareTo(t),t};var lv=Fg,dv={},cv={get exports(){return dv},set exports(t){dv=t}},pv={},mv={get exports(){return pv},set exports(t){pv=t}},gv=lv,vv=Ug(),bv=Xt,yv={md2:K.from("3020300c06082a864886f70d020205000410","hex"),md5:K.from("3020300c06082a864886f70d020505000410","hex"),sha1:K.from("3021300906052b0e03021a05000414","hex"),sha224:K.from("302d300d06096086480165030402040500041c","hex"),sha256:K.from("3031300d060960864801650304020105000420","hex"),sha384:K.from("3041300d060960864801650304020205000430","hex"),sha512:K.from("3051300d060960864801650304020305000440","hex"),ripemd160:K.from("3021300906052b2403020105000414","hex"),rmd160:K.from("3021300906052b2403020105000414","hex")},wv={ripemd160:"rmd160"},Mv="sha256";mv.exports={isEncryption:!0,isSignature:!0},pv.makeScheme=function(t,e){function i(t,e){this.key=t,this.options=e}return i.prototype.maxMessageLength=function(){return this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==bv.RSA_NO_PADDING?this.key.encryptedDataLength:this.key.encryptedDataLength-11},i.prototype.encPad=function(t,e){var i;if(e=e||{},t.length>this.key.maxMessageLength)throw new Error("Message too long for RSA (n="+this.key.encryptedDataLength+", l="+t.length+")");if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==bv.RSA_NO_PADDING)return(i=K.alloc(this.key.maxMessageLength-t.length)).fill(0),K.concat([i,t]);if(1===e.type)return(i=K.alloc(this.key.encryptedDataLength-t.length-1)).fill(255,0,i.length-1),i[0]=1,i[i.length-1]=0,K.concat([i,t]);(i=K.alloc(this.key.encryptedDataLength-t.length))[0]=0,i[1]=2;for(var r=vv.randomBytes(i.length-3),n=0;n<r.length;n++){for(var o=r[n];0===o;)o=vv.randomBytes(1)[0];i[n+2]=o}return i[i.length-1]=0,K.concat([i,t])},i.prototype.encUnPad=function(t,e){e=e||{};var i=0;if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==bv.RSA_NO_PADDING)return"function"==typeof t.lastIndexOf?t.slice(t.lastIndexOf("\0")+1,t.length):t.slice(String.prototype.lastIndexOf.call(t,"\0")+1,t.length);if(t.length<4)return null;if(1===e.type){if(0!==t[0]||1!==t[1])return null;for(i=3;0!==t[i];)if(255!=t[i]||++i>=t.length)return null}else{if(0!==t[0]||2!==t[1])return null;for(i=3;0!==t[i];)if(++i>=t.length)return null}return t.slice(i+1,t.length)},i.prototype.sign=function(t){var e=this.options.signingSchemeOptions.hash||Mv;if("browser"===this.options.environment){e=wv[e]||e;var i=vv.createHash(e);i.update(t);var r=this.pkcs1pad(i.digest(),e);return this.key.$doPrivate(new gv(r)).toBuffer(this.key.encryptedDataLength)}var n=vv.createSign("RSA-"+e.toUpperCase());return n.update(t),n.sign(this.options.rsaUtils.exportKey("private"))},i.prototype.verify=function(t,e,i){if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==bv.RSA_NO_PADDING)return!1;var r=this.options.signingSchemeOptions.hash||Mv;if("browser"===this.options.environment){r=wv[r]||r,i&&(e=K.from(e,i));var n=vv.createHash(r);n.update(t);var o=this.pkcs1pad(n.digest(),r);return this.key.$doPublic(new gv(e)).toBuffer().toString("hex")==o.toString("hex")}var s=vv.createVerify("RSA-"+r.toUpperCase());return s.update(t),s.verify(this.options.rsaUtils.exportKey("public"),e,i)},i.prototype.pkcs0pad=function(t){var e=K.alloc(this.key.maxMessageLength-t.length);return e.fill(0),K.concat([e,t])},i.prototype.pkcs0unpad=function(t){return"function"==typeof t.lastIndexOf?t.slice(t.lastIndexOf("\0")+1,t.length):t.slice(String.prototype.lastIndexOf.call(t,"\0")+1,t.length)},i.prototype.pkcs1pad=function(t,e){var i=yv[e];if(!i)throw Error("Unsupported hash algorithm");var r=K.concat([i,t]);if(r.length+10>this.key.encryptedDataLength)throw Error("Key is too short for signing algorithm ("+e+")");var n=K.alloc(this.key.encryptedDataLength-r.length-1);return n.fill(255,0,n.length-1),n[0]=1,n[n.length-1]=0,K.concat([n,r])},new i(t,e)};var _v={},Sv={get exports(){return _v},set exports(t){_v=t}};!function(t){var e=Ug();t.exports={isEncryption:!0,isSignature:!1},t.exports.digestLength={md4:16,md5:16,ripemd160:20,rmd160:20,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64};var i="sha1";t.exports.eme_oaep_mgf1=function(r,n,o){o=o||i;for(var s=t.exports.digestLength[o],h=Math.ceil(n/s),a=K.alloc(s*h),u=K.alloc(4),f=0;f<h;++f){var l=e.createHash(o);l.update(r),u.writeUInt32BE(f,0),l.update(u),l.digest().copy(a,f*s)}return a.slice(0,n)},t.exports.makeScheme=function(r,n){function o(t,e){this.key=t,this.options=e}return o.prototype.maxMessageLength=function(){return this.key.encryptedDataLength-2*t.exports.digestLength[this.options.encryptionSchemeOptions.hash||i]-2},o.prototype.encPad=function(r){var n=this.options.encryptionSchemeOptions.hash||i,o=this.options.encryptionSchemeOptions.mgf||t.exports.eme_oaep_mgf1,s=this.options.encryptionSchemeOptions.label||K.alloc(0),h=this.key.encryptedDataLength,a=t.exports.digestLength[n];if(r.length>h-2*a-2)throw new Error("Message is too long to encode into an encoded message with a length of "+h+" bytes, increaseemLen to fix this error (minimum value for given parameters and options: "+(h-2*a-2)+")");var u=e.createHash(n);u.update(s),u=u.digest();var f=K.alloc(h-r.length-2*a-1);f.fill(0),f[f.length-1]=1;for(var l=K.concat([u,f,r]),d=e.randomBytes(a),c=o(d,l.length,n),p=0;p<l.length;p++)l[p]^=c[p];for(c=o(l,a,n),p=0;p<d.length;p++)d[p]^=c[p];var m=K.alloc(1+d.length+l.length);return m[0]=0,d.copy(m,1),l.copy(m,1+d.length),m},o.prototype.encUnPad=function(r){var n=this.options.encryptionSchemeOptions.hash||i,o=this.options.encryptionSchemeOptions.mgf||t.exports.eme_oaep_mgf1,s=this.options.encryptionSchemeOptions.label||K.alloc(0),h=t.exports.digestLength[n];if(r.length<2*h+2)throw new Error("Error decoding message, the supplied message is not long enough to be a valid OAEP encoded message");for(var a=r.slice(1,h+1),u=r.slice(1+h),f=o(u,h,n),l=0;l<a.length;l++)a[l]^=f[l];for(f=o(a,u.length,n),l=0;l<u.length;l++)u[l]^=f[l];var d=e.createHash(n);if(d.update(s),d=d.digest(),u.slice(0,h).toString("hex")!=d.toString("hex"))throw new Error("Error decoding message, the lHash calculated from the label provided and the lHash in the encrypted data do not match.");for(l=h;0===u[l++]&&l<u.length;);if(1!=u[l-1])throw new Error("Error decoding message, there is no padding message separator byte");return u.slice(l)},new o(r,n)}}(Sv);var Ev,Av,kv,Rv,Iv,Ov,Tv,Bv,Pv={},Nv={get exports(){return Pv},set exports(t){Pv=t}};function xv(){if(Ev)return Pv;Ev=1;var t=lv,e=Ug();Nv.exports={isEncryption:!1,isSignature:!0};var i="sha1";return Pv.makeScheme=function(r,n){var o=Lv().pkcs1_oaep;function s(t,e){this.key=t,this.options=e}return s.prototype.sign=function(r){var n=e.createHash(this.options.signingSchemeOptions.hash||i);n.update(r);var o=this.emsa_pss_encode(n.digest(),this.key.keySize-1);return this.key.$doPrivate(new t(o)).toBuffer(this.key.encryptedDataLength)},s.prototype.verify=function(r,n,o){o&&(n=K.from(n,o)),n=new t(n);var s=Math.ceil((this.key.keySize-1)/8),h=this.key.$doPublic(n).toBuffer(s),a=e.createHash(this.options.signingSchemeOptions.hash||i);return a.update(r),this.emsa_pss_verify(a.digest(),h,this.key.keySize-1)},s.prototype.emsa_pss_encode=function(t,r){var n=this.options.signingSchemeOptions.hash||i,s=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,h=this.options.signingSchemeOptions.saltLength||20,a=o.digestLength[n],u=Math.ceil(r/8);if(u<a+h+2)throw new Error("Output length passed to emBits("+r+") is too small for the options specified("+n+", "+h+"). To fix this issue increase the value of emBits. (minimum size: "+(8*a+8*h+9)+")");var f=e.randomBytes(h),l=K.alloc(8+a+h);l.fill(0,0,8),t.copy(l,8),f.copy(l,8+t.length);var d=e.createHash(n);d.update(l),d=d.digest();var c=K.alloc(u-f.length-a-2);c.fill(0);var p=K.alloc(c.length+1+f.length);c.copy(p),p[c.length]=1,f.copy(p,c.length+1);for(var m=s(d,p.length,n),g=K.alloc(p.length),v=0;v<m.length;v++)g[v]=p[v]^m[v];var b=8*u-r,y=255^255>>8-b<<8-b;g[0]=g[0]&y;var w=K.alloc(g.length+d.length+1);return g.copy(w,0),d.copy(w,g.length),w[w.length-1]=188,w},s.prototype.emsa_pss_verify=function(t,r,n){var s=this.options.signingSchemeOptions.hash||i,h=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,a=this.options.signingSchemeOptions.saltLength||20,u=o.digestLength[s],f=Math.ceil(n/8);if(f<u+a+2||188!=r[r.length-1])return!1;var l=K.alloc(f-u-1);r.copy(l,0,0,f-u-1);for(var d=0,c=0,p=8*f-n;c<p;c++)d|=1<<7-c;if(0!=(l[0]&d))return!1;var m=r.slice(f-u-1,f-1),g=h(m,l.length,s);for(c=0;c<l.length;c++)l[c]^=g[c];for(d=255^255>>8-(p=8*f-n)<<8-p,l[0]=l[0]&d,c=0;0===l[c]&&c<l.length;c++);if(1!=l[c])return!1;var v=l.slice(l.length-a),b=K.alloc(8+u+a);b.fill(0,0,8),t.copy(b,8),v.copy(b,8+t.length);var y=e.createHash(s);return y.update(b),y=y.digest(),m.toString("hex")===y.toString("hex")},new s(r,n)},Pv}function Lv(){return Av||(Av=1,(t=cv).exports={pkcs1:pv,pkcs1_oaep:_v,pss:xv(),isEncryption:function(e){return t.exports[e]&&t.exports[e].isEncryption},isSignature:function(e){return t.exports[e]&&t.exports[e].isSignature}}),dv;var t}function Dv(){if(Rv)return kv;Rv=1;var t=lv,e=Lv();return kv=function(i,r){var n=e.pkcs1.makeScheme(i,r);return{encrypt:function(e,r){var o,s;return r?(o=new t(n.encPad(e,{type:1})),s=i.$doPrivate(o)):(o=new t(i.encryptionScheme.encPad(e)),s=i.$doPublic(o)),s.toBuffer(i.encryptedDataLength)},decrypt:function(e,r){var o,s=new t(e);return r?(o=i.$doPublic(s),n.encUnPad(o.toBuffer(i.encryptedDataLength),{type:1})):(o=i.$doPrivate(s),i.encryptionScheme.encUnPad(o.toBuffer(i.encryptedDataLength)))}}},kv}var Cv=Ug(),qv={getEngine:function(t,e){var i=Dv();return"node"===e.environment&&"function"==typeof Cv.publicEncrypt&&"function"==typeof Cv.privateDecrypt&&(i="function"==typeof Cv.privateEncrypt&&"function"==typeof Cv.publicDecrypt?function(){if(Ov)return Iv;Ov=1;var t=Ug(),e=Xt,i=Lv();return Iv=function(r,n){var o=i.pkcs1.makeScheme(r,n);return{encrypt:function(i,r){var s;if(r)return s=e.RSA_PKCS1_PADDING,n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding),t.privateEncrypt({key:n.rsaUtils.exportKey("private"),padding:s},i);s=e.RSA_PKCS1_OAEP_PADDING,"pkcs1"===n.encryptionScheme&&(s=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding);var h=i;return s===e.RSA_NO_PADDING&&(h=o.pkcs0pad(i)),t.publicEncrypt({key:n.rsaUtils.exportKey("public"),padding:s},h)},decrypt:function(i,r){var s;if(r)return s=e.RSA_PKCS1_PADDING,n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding),t.publicDecrypt({key:n.rsaUtils.exportKey("public"),padding:s},i);s=e.RSA_PKCS1_OAEP_PADDING,"pkcs1"===n.encryptionScheme&&(s=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding);var h=t.privateDecrypt({key:n.rsaUtils.exportKey("private"),padding:s},i);return s===e.RSA_NO_PADDING?o.pkcs0unpad(h):h}}},Iv}():function(){if(Bv)return Tv;Bv=1;var t=Ug(),e=Xt,i=Lv();return Tv=function(r,n){var o=Dv()(r,n),s=i.pkcs1.makeScheme(r,n);return{encrypt:function(i,r){if(r)return o.encrypt(i,r);var h=e.RSA_PKCS1_OAEP_PADDING;"pkcs1"===n.encryptionScheme&&(h=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(h=n.encryptionSchemeOptions.padding);var a=i;return h===e.RSA_NO_PADDING&&(a=s.pkcs0pad(i)),t.publicEncrypt({key:n.rsaUtils.exportKey("public"),padding:h},a)},decrypt:function(i,r){if(r)return o.decrypt(i,r);var h=e.RSA_PKCS1_OAEP_PADDING;"pkcs1"===n.encryptionScheme&&(h=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(h=n.encryptionSchemeOptions.padding);var a=t.privateDecrypt({key:n.rsaUtils.exportKey("private"),padding:h},i);return h===e.RSA_NO_PADDING?s.pkcs0unpad(a):a}}},Tv}()),i(t,e)}},Uv=Se._;Ug();var jv=lv,zv=Se,Fv=Lv(),Hv=qv;Qt.BigInteger=jv,Qt.Key=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.setOptions=function(t){var e=Fv[t.signingScheme],i=Fv[t.encryptionScheme];e===i?this.signingScheme=this.encryptionScheme=i.makeScheme(this,t):(this.encryptionScheme=i.makeScheme(this,t),this.signingScheme=e.makeScheme(this,t)),this.encryptEngine=Hv.getEngine(this,t)},t.prototype.generate=function(t,e){var i=t>>1;this.e=parseInt(e,16);for(var r=new jv(e,16);;){for(;this.p=new jv(t-i,1),0!==this.p.subtract(jv.ONE).gcd(r).compareTo(jv.ONE)||!this.p.isProbablePrime(10););for(;this.q=new jv(i,1),0!==this.q.subtract(jv.ONE).gcd(r).compareTo(jv.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var n=this.p;this.p=this.q,this.q=n}var o=this.p.subtract(jv.ONE),s=this.q.subtract(jv.ONE),h=o.multiply(s);if(0===h.gcd(r).compareTo(jv.ONE)){if(this.n=this.p.multiply(this.q),this.n.bitLength()<t)continue;this.d=r.modInverse(h),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}this.$$recalculateCache()},t.prototype.setPrivate=function(t,e,i,r,n,o,s,h){if(!(t&&e&&i&&t.length>0&&(Uv.isNumber(e)||e.length>0)&&i.length>0))throw Error("Invalid RSA private key");this.n=new jv(t),this.e=Uv.isNumber(e)?e:zv.get32IntFromBuffer(e,0),this.d=new jv(i),r&&n&&o&&s&&h&&(this.p=new jv(r),this.q=new jv(n),this.dmp1=new jv(o),this.dmq1=new jv(s),this.coeff=new jv(h)),this.$$recalculateCache()},t.prototype.setPublic=function(t,e){if(!(t&&e&&t.length>0&&(Uv.isNumber(e)||e.length>0)))throw Error("Invalid RSA public key");this.n=new jv(t),this.e=Uv.isNumber(e)?e:zv.get32IntFromBuffer(e,0),this.$$recalculateCache()},t.prototype.$doPrivate=function(t){if(this.p||this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),i=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(i)<0;)e=e.add(this.p);return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i)},t.prototype.$doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.encrypt=function(t,e){var i=[],r=[],n=t.length,o=Math.ceil(n/this.maxMessageLength)||1,s=Math.ceil(n/o||1);if(1==o)i.push(t);else for(var h=0;h<o;h++)i.push(t.slice(h*s,(h+1)*s));for(var a=0;a<i.length;a++)r.push(this.encryptEngine.encrypt(i[a],e));return K.concat(r)},t.prototype.decrypt=function(t,e){if(t.length%this.encryptedDataLength>0)throw Error("Incorrect data or key");for(var i=[],r=0,n=0,o=t.length/this.encryptedDataLength,s=0;s<o;s++)n=(r=s*this.encryptedDataLength)+this.encryptedDataLength,i.push(this.encryptEngine.decrypt(t.slice(r,Math.min(n,t.length)),e));return K.concat(i)},t.prototype.sign=function(t){return this.signingScheme.sign.apply(this.signingScheme,arguments)},t.prototype.verify=function(t,e,i){return this.signingScheme.verify.apply(this.signingScheme,arguments)},t.prototype.isPrivate=function(){return!!(this.n&&this.e&&this.d)},t.prototype.isPublic=function(t){return this.n&&this.e&&!(t&&this.d)||!1},Object.defineProperty(t.prototype,"keySize",{get:function(){return this.cache.keyBitLength}}),Object.defineProperty(t.prototype,"encryptedDataLength",{get:function(){return this.cache.keyByteLength}}),Object.defineProperty(t.prototype,"maxMessageLength",{get:function(){return this.encryptionScheme.maxMessageLength()}}),t.prototype.$$recalculateCache=function(){this.cache=this.cache||{},this.cache.keyBitLength=this.n.bitLength(),this.cache.keyByteLength=this.cache.keyBitLength+6>>3},t}();var Kv={},Gv={get exports(){return Kv},set exports(t){Kv=t}},Yv={newInvalidAsn1Error:function(t){var e=new Error;return e.name="InvalidAsn1Error",e.message=t||"",e}},Vv={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128};function Zv(t,e){if(t===e)return 0;for(var i=t.length,r=e.length,n=0,o=Math.min(i,r);n<o;++n)if(t[n]!==e[n]){i=t[n],r=e[n];break}return i<r?-1:r<i?1:0}var Wv,Xv=Object.prototype.hasOwnProperty,Qv=Object.keys||function(t){var e=[];for(var i in t)Xv.call(t,i)&&e.push(i);return e},Jv=Array.prototype.slice;function $v(){return void 0!==Wv?Wv:Wv="foo"===function(){}.name}function tb(t){return Object.prototype.toString.call(t)}function eb(t){return!Rt(t)&&("function"==typeof O.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function ib(t,e){t||ab(t,!0,e,"==",ub)}var rb=/\s*function\s+([^\(\s]*)\s*/;function nb(t){if(bi(t)){if($v())return t.name;var e=t.toString().match(rb);return e&&e[1]}}function ob(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return sb(hb(t.actual),128)+" "+t.operator+" "+sb(hb(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||ab;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var i=new Error;if(i.stack){var r=i.stack,n=nb(e),o=r.indexOf("\n"+n);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}}function sb(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function hb(t){if($v()||!bi(t))return ti(t);var e=nb(t);return"[Function"+(e?": "+e:"")+"]"}function ab(t,e,i,r,n){throw new ob({message:i,actual:t,expected:e,operator:r,stackStartFunction:n})}function ub(t,e){t||ab(t,!0,e,"==",ub)}function fb(t,e,i){t!=e&&ab(t,e,i,"==",fb)}function lb(t,e,i){t==e&&ab(t,e,i,"!=",lb)}function db(t,e,i){pb(t,e,!1)||ab(t,e,i,"deepEqual",db)}function cb(t,e,i){pb(t,e,!0)||ab(t,e,i,"deepStrictEqual",cb)}function pb(t,e,i,r){if(t===e)return!0;if(Rt(t)&&Rt(e))return 0===Zv(t,e);if(gi(t)&&gi(e))return t.getTime()===e.getTime();if(pi(t)&&pi(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(eb(t)&&eb(e)&&tb(t)===tb(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===Zv(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(Rt(t)!==Rt(e))return!1;var n=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==n&&n===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,i,r){if(null==t||null==e)return!1;if(yi(t)||yi(e))return t===e;if(i&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var n=mb(t),o=mb(e);if(n&&!o||!n&&o)return!1;if(n)return pb(t=Jv.call(t),e=Jv.call(e),i);var s,h,a=Qv(t),u=Qv(e);if(a.length!==u.length)return!1;for(a.sort(),u.sort(),h=a.length-1;h>=0;h--)if(a[h]!==u[h])return!1;for(h=a.length-1;h>=0;h--)if(!pb(t[s=a[h]],e[s],i,r))return!1;return!0}(t,e,i,r))}return i?t===e:t==e}function mb(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function gb(t,e,i){pb(t,e,!1)&&ab(t,e,i,"notDeepEqual",gb)}function vb(t,e,i){pb(t,e,!0)&&ab(t,e,i,"notDeepStrictEqual",vb)}function bb(t,e,i){t!==e&&ab(t,e,i,"===",bb)}function yb(t,e,i){t===e&&ab(t,e,i,"!==",yb)}function wb(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function Mb(t,e,i,r){var n;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof i&&(r=i,i=null),n=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(i&&i.name?" ("+i.name+").":".")+(r?" "+r:"."),t&&!n&&ab(n,i,"Missing expected exception"+r);var o="string"==typeof r,s=!t&&n&&!i;if((!t&&vi(n)&&o&&wb(n,i)||s)&&ab(n,i,"Got unwanted exception"+r),t&&n&&i&&!wb(n,i)||!t&&n)throw n}function _b(t,e,i){Mb(!0,t,e,i)}function Sb(t,e,i){Mb(!1,t,e,i)}function Eb(t){if(t)throw t}ib.AssertionError=ob,Ve(ob,Error),ib.fail=ab,ib.ok=ub,ib.equal=fb,ib.notEqual=lb,ib.deepEqual=db,ib.deepStrictEqual=cb,ib.notDeepEqual=gb,ib.notDeepStrictEqual=vb,ib.strictEqual=bb,ib.notStrictEqual=yb,ib.throws=_b,ib.doesNotThrow=Sb,ib.ifError=Eb;var Ab=Bt(Object.freeze({__proto__:null,AssertionError:ob,assert:ub,deepEqual:db,deepStrictEqual:cb,default:ib,doesNotThrow:Sb,equal:fb,fail:ab,ifError:Eb,notDeepEqual:gb,notDeepStrictEqual:vb,notEqual:lb,notStrictEqual:yb,ok:ub,strictEqual:bb,throws:_b})),kb=Ab,Rb=hp.Buffer,Ib=Vv,Ob=Yv.newInvalidAsn1Error;function Tb(t){if(!t||!Rb.isBuffer(t))throw new TypeError("data must be a node Buffer");this._buf=t,this._size=t.length,this._len=0,this._offset=0}Object.defineProperty(Tb.prototype,"length",{enumerable:!0,get:function(){return this._len}}),Object.defineProperty(Tb.prototype,"offset",{enumerable:!0,get:function(){return this._offset}}),Object.defineProperty(Tb.prototype,"remain",{get:function(){return this._size-this._offset}}),Object.defineProperty(Tb.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}}),Tb.prototype.readByte=function(t){if(this._size-this._offset<1)return null;var e=255&this._buf[this._offset];return t||(this._offset+=1),e},Tb.prototype.peek=function(){return this.readByte(!0)},Tb.prototype.readLength=function(t){if(void 0===t&&(t=this._offset),t>=this._size)return null;var e=255&this._buf[t++];if(null===e)return null;if(128==(128&e)){if(0===(e&=127))throw Ob("Indefinite length not supported");if(e>4)throw Ob("encoding too long");if(this._size-t<e)return null;this._len=0;for(var i=0;i<e;i++)this._len=(this._len<<8)+(255&this._buf[t++])}else this._len=e;return t},Tb.prototype.readSequence=function(t){var e=this.peek();if(null===e)return null;if(void 0!==t&&t!==e)throw Ob("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var i=this.readLength(this._offset+1);return null===i?null:(this._offset=i,e)},Tb.prototype.readInt=function(){return this._readTag(Ib.Integer)},Tb.prototype.readBoolean=function(){return 0!==this._readTag(Ib.Boolean)},Tb.prototype.readEnumeration=function(){return this._readTag(Ib.Enumeration)},Tb.prototype.readString=function(t,e){t||(t=Ib.OctetString);var i=this.peek();if(null===i)return null;if(i!==t)throw Ob("Expected 0x"+t.toString(16)+": got 0x"+i.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>this._size-r)return null;if(this._offset=r,0===this.length)return e?Rb.alloc(0):"";var n=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,e?n:n.toString("utf8")},Tb.prototype.readOID=function(t){t||(t=Ib.OID);var e=this.readString(t,!0);if(null===e)return null;for(var i=[],r=0,n=0;n<e.length;n++){var o=255&e[n];r<<=7,r+=127&o,0==(128&o)&&(i.push(r),r=0)}return r=i.shift(),i.unshift(r%40),i.unshift(r/40>>0),i.join(".")},Tb.prototype._readTag=function(t){kb.ok(void 0!==t);var e=this.peek();if(null===e)return null;if(e!==t)throw Ob("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var i=this.readLength(this._offset+1);if(null===i)return null;if(this.length>4)throw Ob("Integer too long: "+this.length);if(this.length>this._size-i)return null;this._offset=i;for(var r=this._buf[this._offset],n=0,o=0;o<this.length;o++)n<<=8,n|=255&this._buf[this._offset++];return 128==(128&r)&&4!==o&&(n-=1<<8*o),n>>0};var Bb=Tb,Pb=Ab,Nb=hp.Buffer,xb=Vv,Lb=Yv.newInvalidAsn1Error,Db={size:1024,growthFactor:8};function Cb(t){t=function(t,e){return Pb.ok(t),Pb.equal(typeof t,"object"),Pb.ok(e),Pb.equal(typeof e,"object"),Object.getOwnPropertyNames(t).forEach((function(i){if(!e[i]){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r)}})),e}(Db,t||{}),this._buf=Nb.alloc(t.size||1024),this._size=this._buf.length,this._offset=0,this._options=t,this._seq=[]}Object.defineProperty(Cb.prototype,"buffer",{get:function(){if(this._seq.length)throw Lb(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),Cb.prototype.writeByte=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=t},Cb.prototype.writeInt=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");"number"!=typeof e&&(e=xb.Integer);for(var i=4;(0==(4286578688&t)||-8388608==(4286578688&t))&&i>1;)i--,t<<=8;if(i>4)throw Lb("BER ints cannot be > 0xffffffff");for(this._ensure(2+i),this._buf[this._offset++]=e,this._buf[this._offset++]=i;i-- >0;)this._buf[this._offset++]=(4278190080&t)>>>24,t<<=8},Cb.prototype.writeNull=function(){this.writeByte(xb.Null),this.writeByte(0)},Cb.prototype.writeEnumeration=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");return"number"!=typeof e&&(e=xb.Enumeration),this.writeInt(t,e)},Cb.prototype.writeBoolean=function(t,e){if("boolean"!=typeof t)throw new TypeError("argument must be a Boolean");"number"!=typeof e&&(e=xb.Boolean),this._ensure(3),this._buf[this._offset++]=e,this._buf[this._offset++]=1,this._buf[this._offset++]=t?255:0},Cb.prototype.writeString=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string (was: "+typeof t+")");"number"!=typeof e&&(e=xb.OctetString);var i=Nb.byteLength(t);this.writeByte(e),this.writeLength(i),i&&(this._ensure(i),this._buf.write(t,this._offset),this._offset+=i)},Cb.prototype.writeBuffer=function(t,e){if("number"!=typeof e)throw new TypeError("tag must be a number");if(!Nb.isBuffer(t))throw new TypeError("argument must be a buffer");this.writeByte(e),this.writeLength(t.length),this._ensure(t.length),t.copy(this._buf,this._offset,0,t.length),this._offset+=t.length},Cb.prototype.writeStringArray=function(t){if(!t instanceof Array)throw new TypeError("argument must be an Array[String]");var e=this;t.forEach((function(t){e.writeString(t)}))},Cb.prototype.writeOID=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string");if("number"!=typeof e&&(e=xb.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(t))throw new Error("argument is not a valid OID string");var i=t.split("."),r=[];r.push(40*parseInt(i[0],10)+parseInt(i[1],10)),i.slice(2).forEach((function(t){!function(t,e){e<128?t.push(e):e<16384?(t.push(e>>>7|128),t.push(127&e)):e<2097152?(t.push(e>>>14|128),t.push(255&(e>>>7|128)),t.push(127&e)):e<268435456?(t.push(e>>>21|128),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e)):(t.push(255&(e>>>28|128)),t.push(255&(e>>>21|128)),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e))}(r,parseInt(t,10))}));var n=this;this._ensure(2+r.length),this.writeByte(e),this.writeLength(r.length),r.forEach((function(t){n.writeByte(t)}))},Cb.prototype.writeLength=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");if(this._ensure(4),t<=127)this._buf[this._offset++]=t;else if(t<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=t;else if(t<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t;else{if(!(t<=16777215))throw Lb("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=t>>16,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t}},Cb.prototype.startSequence=function(t){"number"!=typeof t&&(t=xb.Sequence|xb.Constructor),this.writeByte(t),this._seq.push(this._offset),this._ensure(3),this._offset+=3},Cb.prototype.endSequence=function(){var t=this._seq.pop(),e=t+3,i=this._offset-e;if(i<=127)this._shift(e,i,-2),this._buf[t]=i;else if(i<=255)this._shift(e,i,-1),this._buf[t]=129,this._buf[t+1]=i;else if(i<=65535)this._buf[t]=130,this._buf[t+1]=i>>8,this._buf[t+2]=i;else{if(!(i<=16777215))throw Lb("Sequence too long");this._shift(e,i,1),this._buf[t]=131,this._buf[t+1]=i>>16,this._buf[t+2]=i>>8,this._buf[t+3]=i}},Cb.prototype._shift=function(t,e,i){Pb.ok(void 0!==t),Pb.ok(void 0!==e),Pb.ok(i),this._buf.copy(this._buf,t+i,t,t+e),this._offset+=i},Cb.prototype._ensure=function(t){if(Pb.ok(t),this._size-this._offset<t){var e=this._size*this._options.growthFactor;e-this._offset<t&&(e+=t);var i=Nb.alloc(e);this._buf.copy(i,0,0,this._offset),this._buf=i,this._size=e}};var qb=Cb;!function(t){var e=Yv,i=Vv,r=Bb,n=qb;for(var o in t.exports={Reader:r,Writer:n},i)i.hasOwnProperty(o)&&(t.exports[o]=i[o]);for(var s in e)e.hasOwnProperty(s)&&(t.exports[s]=e[s])}(Gv);var Ub=Kv,jb={Ber:Ub,BerReader:Ub.Reader,BerWriter:Ub.Writer},zb={},Fb={get exports(){return zb},set exports(t){zb=t}},Hb={},Kb={get exports(){return Hb},set exports(t){Hb=t}};!function(t){var e=jb.Ber,i=Se._,r=Se;const n="-----BEGIN RSA PRIVATE KEY-----",o="-----END RSA PRIVATE KEY-----",s="-----BEGIN RSA PUBLIC KEY-----",h="-----END RSA PUBLIC KEY-----";t.exports={privateExport:function(t,i){i=i||{};var s=t.n.toBuffer(),h=t.d.toBuffer(),a=t.p.toBuffer(),u=t.q.toBuffer(),f=t.dmp1.toBuffer(),l=t.dmq1.toBuffer(),d=t.coeff.toBuffer(),c=s.length+h.length+a.length+u.length+f.length+l.length+d.length+512,p=new e.Writer({size:c});return p.startSequence(),p.writeInt(0),p.writeBuffer(s,2),p.writeInt(t.e),p.writeBuffer(h,2),p.writeBuffer(a,2),p.writeBuffer(u,2),p.writeBuffer(f,2),p.writeBuffer(l,2),p.writeBuffer(d,2),p.endSequence(),"der"===i.type?p.buffer:n+"\n"+r.linebrk(p.buffer.toString("base64"),64)+"\n"+o},privateImport:function(t,s,h){var a;if("der"!==(h=h||{}).type){if(K.isBuffer(s)&&(s=s.toString("utf8")),!i.isString(s))throw Error("Unsupported key format");var u=r.trimSurroundingText(s,n,o).replace(/\s+|\n\r|\n|\r$/gm,"");a=K.from(u,"base64")}else{if(!K.isBuffer(s))throw Error("Unsupported key format");a=s}var f=new e.Reader(a);f.readSequence(),f.readString(2,!0),t.setPrivate(f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0))},publicExport:function(t,i){i=i||{};var n=t.n.toBuffer(),o=n.length+512,a=new e.Writer({size:o});return a.startSequence(),a.writeBuffer(n,2),a.writeInt(t.e),a.endSequence(),"der"===i.type?a.buffer:s+"\n"+r.linebrk(a.buffer.toString("base64"),64)+"\n"+h},publicImport:function(t,n,o){var a;if("der"!==(o=o||{}).type){if(K.isBuffer(n)&&(n=n.toString("utf8")),i.isString(n)){var u=r.trimSurroundingText(n,s,h).replace(/\s+|\n\r|\n|\r$/gm,"");a=K.from(u,"base64")}}else{if(!K.isBuffer(n))throw Error("Unsupported key format");a=n}var f=new e.Reader(a);f.readSequence(),t.setPublic(f.readString(2,!0),f.readString(2,!0))},autoImport:function(e,i){return/^[\S\s]*-----BEGIN RSA PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*-----BEGIN RSA PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PUBLIC KEY-----[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(Kb);var Gb={},Yb={get exports(){return Gb},set exports(t){Gb=t}};!function(t){var e=jb.Ber,i=Se._,r="1.2.840.113549.1.1.1",n=Se;const o="-----BEGIN PRIVATE KEY-----",s="-----END PRIVATE KEY-----",h="-----BEGIN PUBLIC KEY-----",a="-----END PUBLIC KEY-----";t.exports={privateExport:function(t,i){i=i||{};var h=t.n.toBuffer(),a=t.d.toBuffer(),u=t.p.toBuffer(),f=t.q.toBuffer(),l=t.dmp1.toBuffer(),d=t.dmq1.toBuffer(),c=t.coeff.toBuffer(),p=h.length+a.length+u.length+f.length+l.length+d.length+c.length+512,m=new e.Writer({size:p});m.startSequence(),m.writeInt(0),m.writeBuffer(h,2),m.writeInt(t.e),m.writeBuffer(a,2),m.writeBuffer(u,2),m.writeBuffer(f,2),m.writeBuffer(l,2),m.writeBuffer(d,2),m.writeBuffer(c,2),m.endSequence();var g=new e.Writer({size:p});return g.startSequence(),g.writeInt(0),g.startSequence(),g.writeOID(r),g.writeNull(),g.endSequence(),g.writeBuffer(m.buffer,4),g.endSequence(),"der"===i.type?g.buffer:o+"\n"+n.linebrk(g.buffer.toString("base64"),64)+"\n"+s},privateImport:function(t,h,a){var u;if("der"!==(a=a||{}).type){if(K.isBuffer(h)&&(h=h.toString("utf8")),!i.isString(h))throw Error("Unsupported key format");var f=n.trimSurroundingText(h,o,s).replace("-----END PRIVATE KEY-----","").replace(/\s+|\n\r|\n|\r$/gm,"");u=K.from(f,"base64")}else{if(!K.isBuffer(h))throw Error("Unsupported key format");u=h}var l=new e.Reader(u);if(l.readSequence(),l.readInt(0),new e.Reader(l.readString(48,!0)).readOID(6,!0)!==r)throw Error("Invalid Public key format");var d=new e.Reader(l.readString(4,!0));d.readSequence(),d.readString(2,!0),t.setPrivate(d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0))},publicExport:function(t,i){i=i||{};var o=t.n.toBuffer(),s=o.length+512,u=new e.Writer({size:s});u.writeByte(0),u.startSequence(),u.writeBuffer(o,2),u.writeInt(t.e),u.endSequence();var f=new e.Writer({size:s});return f.startSequence(),f.startSequence(),f.writeOID(r),f.writeNull(),f.endSequence(),f.writeBuffer(u.buffer,3),f.endSequence(),"der"===i.type?f.buffer:h+"\n"+n.linebrk(f.buffer.toString("base64"),64)+"\n"+a},publicImport:function(t,o,s){var u;if("der"!==(s=s||{}).type){if(K.isBuffer(o)&&(o=o.toString("utf8")),i.isString(o)){var f=n.trimSurroundingText(o,h,a).replace(/\s+|\n\r|\n|\r$/gm,"");u=K.from(f,"base64")}}else{if(!K.isBuffer(o))throw Error("Unsupported key format");u=o}var l=new e.Reader(u);if(l.readSequence(),new e.Reader(l.readString(48,!0)).readOID(6,!0)!==r)throw Error("Invalid Public key format");var d=new e.Reader(l.readString(3,!0));d.readByte(),d.readSequence(),t.setPublic(d.readString(2,!0),d.readString(2,!0))},autoImport:function(e,i){return/^[\S\s]*-----BEGIN PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*-----BEGIN PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PUBLIC KEY-----[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(Yb);var Vb,Zb={},Wb={get exports(){return Zb},set exports(t){Zb=t}};Vb=Wb,Se._,Vb.exports={privateExport:function(t,e){return{n:t.n.toBuffer(),e:t.e,d:t.d.toBuffer(),p:t.p.toBuffer(),q:t.q.toBuffer(),dmp1:t.dmp1.toBuffer(),dmq1:t.dmq1.toBuffer(),coeff:t.coeff.toBuffer()}},privateImport:function(t,e,i){if(!(e.n&&e.e&&e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff))throw Error("Invalid key data");t.setPrivate(e.n,e.e,e.d,e.p,e.q,e.dmp1,e.dmq1,e.coeff)},publicExport:function(t,e){return{n:t.n.toBuffer(),e:t.e}},publicImport:function(t,e,i){if(!e.n||!e.e)throw Error("Invalid key data");t.setPublic(e.n,e.e)},autoImport:function(t,e){return!(!e.n||!e.e||(e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff?(Vb.exports.privateImport(t,e),0):(Vb.exports.publicImport(t,e),0)))}};var Xb={},Qb={get exports(){return Xb},set exports(t){Xb=t}};!function(t){var e=Se._,i=Se,r=lv;const n="-----BEGIN OPENSSH PRIVATE KEY-----",o="-----END OPENSSH PRIVATE KEY-----";function s(t){const e=t.buf.readInt32BE(t.off);t.off+=4;const i=t.buf.slice(t.off,t.off+e);return t.off+=e,i}function h(t,e){t.buf.writeInt32BE(e.byteLength,t.off),t.off+=4,t.off+=e.copy(t.buf,t.off)}t.exports={privateExport:function(t,e){const r=t.n.toBuffer();let s=K.alloc(4);for(s.writeUInt32BE(t.e,0);0===s[0];)s=s.slice(1);const a=t.d.toBuffer(),u=t.coeff.toBuffer(),f=t.p.toBuffer(),l=t.q.toBuffer();let d;d=void 0!==t.sshcomment?K.from(t.sshcomment):K.from([]);const c=15+s.byteLength+4+r.byteLength,p=23+r.byteLength+4+s.byteLength+4+a.byteLength+4+u.byteLength+4+f.byteLength+4+l.byteLength+4+d.byteLength;let m=43+c+4+p;m+=8*Math.ceil(p/8)-p;const g=K.alloc(m),v={buf:g,off:0};g.write("openssh-key-v1","utf8"),g.writeUInt8(0,14),v.off+=15,h(v,K.from("none")),h(v,K.from("none")),h(v,K.from("")),v.off=v.buf.writeUInt32BE(1,v.off),v.off=v.buf.writeUInt32BE(c,v.off),h(v,K.from("ssh-rsa")),h(v,s),h(v,r),v.off=v.buf.writeUInt32BE(m-47-c,v.off),v.off+=8,h(v,K.from("ssh-rsa")),h(v,r),h(v,s),h(v,a),h(v,u),h(v,f),h(v,l),h(v,d);let b=1;for(;v.off<m;)v.off=v.buf.writeUInt8(b++,v.off);return"der"===e.type?v.buf:n+"\n"+i.linebrk(g.toString("base64"),70)+"\n"+o+"\n"},privateImport:function(t,h,a){var u;if("der"!==(a=a||{}).type){if(K.isBuffer(h)&&(h=h.toString("utf8")),!e.isString(h))throw Error("Unsupported key format");var f=i.trimSurroundingText(h,n,o).replace(/\s+|\n\r|\n|\r$/gm,"");u=K.from(f,"base64")}else{if(!K.isBuffer(h))throw Error("Unsupported key format");u=h}const l={buf:u,off:0};if("openssh-key-v1"!==u.slice(0,14).toString("ascii"))throw"Invalid file format.";if(l.off+=15,"none"!==s(l).toString("ascii"))throw Error("Unsupported key type");if("none"!==s(l).toString("ascii"))throw Error("Unsupported key type");if(""!==s(l).toString("ascii"))throw Error("Unsupported key type");if(l.off+=4,l.off+=4,"ssh-rsa"!==s(l).toString("ascii"))throw Error("Unsupported key type");if(s(l),s(l),l.off+=12,"ssh-rsa"!==s(l).toString("ascii"))throw Error("Unsupported key type");const d=s(l),c=s(l),p=s(l),m=s(l),g=s(l),v=s(l),b=new r(p),y=new r(v),w=new r(g),M=b.mod(w.subtract(r.ONE)),_=b.mod(y.subtract(r.ONE));t.setPrivate(d,c,p,g,v,M.toBuffer(),_.toBuffer(),m),t.sshcomment=s(l).toString("ascii")},publicExport:function(t,e){let i=K.alloc(4);for(i.writeUInt32BE(t.e,0);0===i[0];)i=i.slice(1);const r=t.n.toBuffer(),n=K.alloc(i.byteLength+4+r.byteLength+4+7+4),o={buf:n,off:0};h(o,K.from("ssh-rsa")),h(o,i),h(o,r);let s=t.sshcomment||"";return"der"===e.type?o.buf:"ssh-rsa "+n.toString("base64")+" "+s+"\n"},publicImport:function(t,i,r){var n;if("der"!==(r=r||{}).type){if(K.isBuffer(i)&&(i=i.toString("utf8")),!e.isString(i))throw Error("Unsupported key format");{if("ssh-rsa "!==i.substring(0,8))throw Error("Unsupported key format");let e=i.indexOf(" ",8);-1===e?e=i.length:t.sshcomment=i.substring(e+1).replace(/\s+|\n\r|\n|\r$/gm,"");const r=i.substring(8,e).replace(/\s+|\n\r|\n|\r$/gm,"");n=K.from(r,"base64")}}else{if(!K.isBuffer(i))throw Error("Unsupported key format");n=i}const o={buf:n,off:0},h=s(o).toString("ascii");if("ssh-rsa"!==h)throw Error("Invalid key type: "+h);const a=s(o),u=s(o);t.setPublic(u,a)},autoImport:function(e,i){return/^[\S\s]*-----BEGIN OPENSSH PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END OPENSSH PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*ssh-rsa \s*(?=(([A-Za-z0-9+/=]+\s*)+))\1[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(Qb),function(t){function e(t){t=t.split("-");for(var e="private",i={type:"default"},r=1;r<t.length;r++)if(t[r])switch(t[r]){case"public":case"private":e=t[r];break;case"pem":case"der":i.type=t[r]}return{scheme:t[0],keyType:e,keyOpt:i}}Se._,t.exports={pkcs1:Hb,pkcs8:Gb,components:Zb,openssh:Xb,isPrivateExport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].privateExport},isPrivateImport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].privateImport},isPublicExport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].publicExport},isPublicImport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].publicImport},detectAndImport:function(i,r,n){if(void 0===n){for(var o in t.exports)if("function"==typeof t.exports[o].autoImport&&t.exports[o].autoImport(i,r))return!0}else if(n){var s=e(n);if(!t.exports[s.scheme])throw Error("Unsupported key format");"private"===s.keyType?t.exports[s.scheme].privateImport(i,r,s.keyOpt):t.exports[s.scheme].publicImport(i,r,s.keyOpt)}return!1},detectAndExport:function(i,r){if(r){var n=e(r);if(t.exports[n.scheme]){if("private"===n.keyType){if(!i.isPrivate())throw Error("This is not private key");return t.exports[n.scheme].privateExport(i,n.keyOpt)}if(!i.isPublic())throw Error("This is not public key");return t.exports[n.scheme].publicExport(i,n.keyOpt)}throw Error("Unsupported key format")}}}}(Fb);var Jb=Xt,$b=Qt;Ug();var ty=Se._,ey=Se,iy=Lv(),ry=zb;void 0===Jb.RSA_NO_PADDING&&(Jb.RSA_NO_PADDING=3);var ny,oy,sy,hy,ay,uy,fy,ly,dy,cy,py,my,gy,vy,by=function(){var t={node10:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],node:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],iojs:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],browser:["md5","ripemd160","sha1","sha256","sha512"]},e="pkcs1_oaep",i="pkcs1",r={private:"pkcs1-private-pem","private-der":"pkcs1-private-der",public:"pkcs8-public-pem","public-der":"pkcs8-public-der"};function n(t,r,o){if(!(this instanceof n))return new n(t,r,o);ty.isObject(r)&&(o=r,r=void 0),this.$options={signingScheme:i,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:e,encryptionSchemeOptions:{hash:"sha1",label:null},environment:ey.detectEnvironment(),rsaUtils:this},this.keyPair=new $b.Key,this.$cache={},K.isBuffer(t)||ty.isString(t)?this.importKey(t,r):ty.isObject(t)&&this.generateKeyPair(t.b,t.e),this.setOptions(o)}return n.prototype.setOptions=function(r){if((r=r||{}).environment&&(this.$options.environment=r.environment),r.signingScheme){if(ty.isString(r.signingScheme)){var n=r.signingScheme.toLowerCase().split("-");1==n.length?t.node.indexOf(n[0])>-1?(this.$options.signingSchemeOptions={hash:n[0]},this.$options.signingScheme=i):(this.$options.signingScheme=n[0],this.$options.signingSchemeOptions={hash:null}):(this.$options.signingSchemeOptions={hash:n[1]},this.$options.signingScheme=n[0])}else ty.isObject(r.signingScheme)&&(this.$options.signingScheme=r.signingScheme.scheme||i,this.$options.signingSchemeOptions=ty.omit(r.signingScheme,"scheme"));if(!iy.isSignature(this.$options.signingScheme))throw Error("Unsupported signing scheme");if(this.$options.signingSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.signingSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}if(r.encryptionScheme){if(ty.isString(r.encryptionScheme)?(this.$options.encryptionScheme=r.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={}):ty.isObject(r.encryptionScheme)&&(this.$options.encryptionScheme=r.encryptionScheme.scheme||e,this.$options.encryptionSchemeOptions=ty.omit(r.encryptionScheme,"scheme")),!iy.isEncryption(this.$options.encryptionScheme))throw Error("Unsupported encryption scheme");if(this.$options.encryptionSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.encryptionSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}this.keyPair.setOptions(this.$options)},n.prototype.generateKeyPair=function(t,e){if(e=e||65537,(t=t||2048)%8!=0)throw Error("Key size must be a multiple of 8.");return this.keyPair.generate(t,e.toString(16)),this.$cache={},this},n.prototype.importKey=function(t,e){if(!t)throw Error("Empty key given");if(e&&(e=r[e]||e),!ry.detectAndImport(this.keyPair,t,e)&&void 0===e)throw Error("Key format must be specified");return this.$cache={},this},n.prototype.exportKey=function(t){return t=r[t=t||"private"]||t,this.$cache[t]||(this.$cache[t]=ry.detectAndExport(this.keyPair,t)),this.$cache[t]},n.prototype.isPrivate=function(){return this.keyPair.isPrivate()},n.prototype.isPublic=function(t){return this.keyPair.isPublic(t)},n.prototype.isEmpty=function(t){return!(this.keyPair.n||this.keyPair.e||this.keyPair.d)},n.prototype.encrypt=function(t,e,i){return this.$$encryptKey(!1,t,e,i)},n.prototype.decrypt=function(t,e){return this.$$decryptKey(!1,t,e)},n.prototype.encryptPrivate=function(t,e,i){return this.$$encryptKey(!0,t,e,i)},n.prototype.decryptPublic=function(t,e){return this.$$decryptKey(!0,t,e)},n.prototype.$$encryptKey=function(t,e,i,r){try{var n=this.keyPair.encrypt(this.$getDataForEncrypt(e,r),t);return"buffer"!=i&&i?n.toString(i):n}catch(t){throw Error("Error during encryption. Original error: "+t)}},n.prototype.$$decryptKey=function(t,e,i){try{e=ty.isString(e)?K.from(e,"base64"):e;var r=this.keyPair.decrypt(e,t);if(null===r)throw Error("Key decrypt method returns null.");return this.$getDecryptedData(r,i)}catch(t){throw Error("Error during decryption (probably incorrect key). Original error: "+t)}},n.prototype.sign=function(t,e,i){if(!this.isPrivate())throw Error("This is not private key");var r=this.keyPair.sign(this.$getDataForEncrypt(t,i));return e&&"buffer"!=e&&(r=r.toString(e)),r},n.prototype.verify=function(t,e,i,r){if(!this.isPublic())throw Error("This is not public key");return r=r&&"buffer"!=r?r:null,this.keyPair.verify(this.$getDataForEncrypt(t,i),e,r)},n.prototype.getKeySize=function(){return this.keyPair.keySize},n.prototype.getMaxMessageSize=function(){return this.keyPair.maxMessageLength},n.prototype.$getDataForEncrypt=function(t,e){if(ty.isString(t)||ty.isNumber(t))return K.from(""+t,e||"utf8");if(K.isBuffer(t))return t;if(ty.isObject(t))return K.from(JSON.stringify(t));throw Error("Unexpected data type")},n.prototype.$getDecryptedData=function(t,e){return"buffer"==(e=e||"buffer")?t:"json"==e?JSON.parse(t.toString()):t.toString(e)},n}();!function(t){t[t.BIDIRECTION=0]="BIDIRECTION",t[t.POSITIVE=1]="POSITIVE",t[t.OPPOSITE=2]="OPPOSITE",t[t.FORBID=3]="FORBID"}(ny||(ny={}));class yy{get path(){return this._path}set path(t){this._path=t}constructor(t,e){this.ssp=t,oy.add(this),this._path="",this.metaData=null,this.treeData=null,this.topologyData=null,this.propertiesData=null,this.animationsData=null,this.modelVisionsData=null,sy.set(this,_),hy.set(this,new I(this.ssp.viewport)),ay.set(this,!1),uy.set(this,!1),fy.set(this,!1),(null==e?void 0:e.key)&&this.setKey(e.key)}setKey(t){t!==d(this,oy,"m",ly).call(this,d(this,sy,"f").debugKey)&&(d(this,sy,"f").key=t)}_resolvePath(t){return`${this._path}${t}`}async _fetchData(t){const{utils:e}=this.ssp;return e.fetchFile(this._resolvePath(t),"json")}async fetchMetaData(){const t=await this._fetchData(p);return this.metaData=t,t}async fetchTreeData(){const t=await this._fetchData(g);return this.treeData=t,t}async fetchTopologyData(){const t=await this._fetchData(v).then((t=>{const e={linkWidth:.1,linkColor:["#00ff00"],nodeRadius:.05,nodeColor:"#0000ff"};return t.map((t=>{const i=Object.assign(Object.assign({},e),t);return i.imgUrl&&(i.imgUrl=`${this.path}${i.imgUrl}`),i}))}));return this.topologyData=t,t}async fetchPropertiesData(){const t=await this._fetchData(b).then((t=>wy(t,"modelId")));return this.propertiesData=t,t}async fetchAnimationsData(){const t=await this._fetchData(y).then((t=>wy(t,"modelId")));return this.animationsData=t,t}async fetchModelVisionsData(){const t=await this._fetchData(w).then((t=>new Map(Object.entries(t))));return this.modelVisionsData=t,t}async loadObjects(t){if(!this.treeData)return void console.error("treeData is null");const{syncProperties:e}=t,i=async(t,r)=>{const{ssp:n}=this,{id:o,name:s,renderType:h,path:a,matrix:u}=t,f=(new l).fromArray(u);let d=null;if("3D"===h)if(a)try{const e=Object.assign({},t);Reflect.deleteProperty(e,"children");const i=a.replaceAll(/#/g,"%23");d=await n.loadModel({id:o,name:s,url:this._resolvePath(i),userData:e})}catch(t){console.error(t)}else n.utils.warn(`id: ${o} path 为空`);else"GROUP"!==h&&"STUB"!==h||(d=n.createGroup({id:o,name:s,userData:Object.assign({},t)}));if(d&&(f.decompose(d.position,d.quaternion,d.scale),r&&n.addObject(d,r),e&&this.propertiesData)){const t=this.propertiesData.get(o);t&&(d.userData[M]=t)}t.children.length>0&&await Promise.allSettled(t.children.map((t=>i(t,d))))};await Promise.allSettled(this.treeData.map((t=>i(t,null))))}setPath(t){this.path=t}async loadScene(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{version:e}=await this.fetchMetaData();if(e>=1.2){if(await d(this,oy,"m",dy).call(this),!d(this,ay,"f")&&!d(this,uy,"f")){const{utils:t}=this.ssp;return void t.error(`未授权的场景包:${this.path}`)}!d(this,ay,"f")&&d(this,uy,"f")&&(d(this,fy,"f")?d(this,hy,"f").removeFromViewport():d(this,hy,"f").addToViewport())}else this.treeData=await this.fetchTreeData();t=Object.assign({syncProperties:!0,syncModelVisions:!0,needsModelsBoundsTree:!0,applyPresetEffects:!1},t),await Promise.allSettled([(async()=>{t.syncProperties&&await this.fetchPropertiesData()})(),(async()=>{t.syncModelVisions&&await this.fetchModelVisionsData()})()]),await this.loadObjects(t),t.needsModelsBoundsTree&&this.ssp.computeModelsBoundsTree(),t.applyPresetEffects&&this.presetEffects()}async presetEffects(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{hdr:e=!0,ssao:i=!0,directionalLightShadow:r=!0}=t;if(await this.ssp.render(),e){const{environment:t}=await this.fetchMetaData();t&&this.ssp.setEnvironment({file:`${this.path}${t}`})}if(i&&this.ssp.setSSAO(),r){const t=this.ssp.getAllModel().reduce(((t,e)=>t.union(this.ssp.utils.getBoundingBox(e.children[0]))),new u),{min:e,max:i}=t,n=new f;t.getSize(n);let o=45;this.ssp.utils.isObject(r)&&"number"==typeof r.angle&&(o=r.angle);const s=Math.tan(Math.PI/180*o)*n.x;this.ssp.createDirectionalLight({id:"directionalLight",name:"directionalLight",position:{x:i.x,y:s,z:i.z},target:{x:e.x,y:e.y,z:e.z},openShadow:!0,shadowAutoUpdate:!1,intensity:2,mapSize:this.ssp.viewport.renderer.capabilities.maxTextureSize/2})}}async getTopologies(){return this.fetchTopologyData()}async playAnimationById(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{utils:{error:n},animation:o}=this.ssp,{onStart:s,onUpdate:h}=r,a=await this.fetchAnimationsData(),u=this.ssp.getObjectById(t);if(!u)return void n(`playAnimationById: id 为 ${t} 场景对象未找到`);const f=a.get(t);if(f){const r=f[e];if(r)for(let t=0,e=r.keyframes.length;t<e;t++){let e;if(r.keyframes[t-1]){const i=r.keyframes[t-1];e={x:i.x,y:i.y,z:i.z,rotationX:i.rotationX,rotationY:i.rotationY,rotationZ:i.rotationZ,scaleX:i.scaleX,scaleY:i.scaleY,scaleZ:i.scaleZ}}else{const t=new i,r=(new l).fromArray(u.userData.matrix);t.applyMatrix4(r),e={x:t.position.x,y:t.position.y,z:t.position.z,rotationX:t.rotation.x,rotationY:t.rotation.y,rotationZ:t.rotation.z,scaleX:t.scale.x,scaleY:t.scale.y,scaleZ:t.scale.z}}const n=r.keyframes[t],{delay:a,duration:f,easing:d,repeat:c,yoyo:p}=n,m={x:n.x,y:n.y,z:n.z,rotationX:n.rotationX,rotationY:n.rotationY,rotationZ:n.rotationZ,scaleX:n.scaleX,scaleY:n.scaleY,scaleZ:n.scaleZ};await o(e,m,{delay:a,duration:f,mode:d,repeat:-1===c?1/0:c,yoyo:p},((t,e)=>{u.position.set(t.x,t.y,t.z),u.rotation.set(t.rotationX,t.rotationY,t.rotationZ),u.scale.set(t.scaleX,t.scaleY,t.scaleZ),null==h||h(t,e)}),(t=>{null==s||s(t)}))}else n(`id: ${t} 未找到索引为 ${e} 的动画`)}else n(`id: ${t} 未找到动画`)}}function wy(t,e){const i=new Map;return t.reduce(((t,i)=>{const r=t.get(i[e]);return r?r.push(i):t.set(i[e],[i]),t}),i),i}sy=new WeakMap,hy=new WeakMap,ay=new WeakMap,uy=new WeakMap,fy=new WeakMap,oy=new WeakSet,ly=function(t){let e="";for(let i=0;i<t.length;i++){const r=t.charCodeAt(i)-1;e+=String.fromCharCode(r)}return e},dy=async function(){let t;const{resource:e}=await this.fetchMetaData();if(d(this,sy,"f").verifyKey){if(t=await d(this,oy,"m",cy).call(this,e),"forbid"===t)return void c(this,ay,!1,"f");if("noServerEnc"===t)await d(this,oy,"m",gy).call(this,e);else{const{verifiedRes:e,dec:i}=d(this,oy,"m",my).call(this,t.content,t.sign,"verifyKey");c(this,ay,e,"f"),d(this,ay,"f")&&(this.treeData=i)}}else if(d(this,sy,"f").key){const{verifiedRes:t}=await d(this,oy,"m",vy).call(this,e);t||await d(this,oy,"m",gy).call(this,e)}else d(this,sy,"f").debugKey?await d(this,oy,"m",gy).call(this,e):console.error("许可证密钥不存在")},cy=async function(t){const e=Math.random().toString(36).substring(2),{verifyKey:i}=d(this,sy,"f"),r=new by(i,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"}),n=r.encrypt(e,"base64"),o=await d(this,oy,"m",py).call(this,this._resolvePath(t),n),{license:s,serverEnc:h}=o;if(!h)return"noServerEnc";return r.decryptPublic(h,"utf8")!==e?"forbid":s},py=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{const i=await fetch(t,{headers:{token:e}}),r=i.headers,n=await i.json();return{license:n,serverEnc:r.get("token")}}catch(t){return{license:{content:"",sign:""},serverEnc:""}}},my=function(t,e,i){let r="";r="debugKey"===i?d(this,oy,"m",ly).call(this,d(this,sy,"f").debugKey):d(this,sy,"f")[i];let n=[],o=!1;try{const i=new by(r,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"});n=i.decryptPublic(t,"json"),o=i.verify(t,e,"base64","base64")}catch(t){this.ssp.utils.error("秘钥 key 验证失败")}return{verifiedRes:o,dec:n}},gy=async function(t){const{content:e,sign:i}=await this._fetchData(t),{verifiedRes:r,dec:n}=d(this,oy,"m",my).call(this,e,i,"debugKey");c(this,uy,r,"f"),d(this,uy,"f")&&(this.treeData=n)},vy=async function(t){const{content:e,sign:i}=await this._fetchData(t),{verifiedRes:r,dec:n}=d(this,oy,"m",my).call(this,e,i,"key");return c(this,fy,r,"f"),c(this,uy,r,"f"),d(this,fy,"f")&&(this.treeData=n),{verifiedRes:r,dec:n}};export{y as ANIMATIONS_DATA_FILE_PATH,p as META_DATA_FILE_PATH,w as MODEL_VISIONS_DATA_FILE_PATH,b as PROPERTIES_DATA_FLEE_PATH,M as PROPERTIES_KEY,m as SIGN_PATH,v as TOPOLOGY_DATA_FILE_PATH,g as TREE_DATA_FILE_PATH,yy as default};
3
+ !function(t,e){var i=Oe,r=i.Buffer;function n(t,e){for(var i in t)e[i]=t[i]}function o(t,e,i){return r(t,e,i)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=i:(n(i,e),e.Buffer=o),o.prototype=Object.create(r.prototype),n(r,o),o.from=function(t,e,i){if("number"==typeof t)throw new TypeError("Argument must not be a number");return r(t,e,i)},o.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=r(t);return void 0!==e?"string"==typeof i?n.fill(e,i):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}}(Ie,Re);var Te=65536,Be=4294967295;var Pe=Re.Buffer,Ne=Tt.crypto||Tt.msCrypto;Ne&&Ne.getRandomValues?ke.exports=function(t,e){if(t>Be)throw new RangeError("requested too many random bytes");var i=Pe.allocUnsafe(t);if(t>0)if(t>Te)for(var r=0;r<t;r+=Te)Ne.getRandomValues(i.slice(r,r+Te));else Ne.getRandomValues(i);if("function"==typeof e)return _e.nextTick((function(){e(null,i)}));return i}:ke.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")};var xe={},Le={get exports(){return xe},set exports(t){xe=t}};"function"==typeof Object.create?Le.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Le.exports=function(t,e){if(e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}};var De={},Ce={get exports(){return De},set exports(t){De=t}};function qe(){}function Ue(){Ue.init.call(this)}function je(t){return void 0===t._maxListeners?Ue.defaultMaxListeners:t._maxListeners}function ze(t,e,i,r){var n,o,s,h;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((o=t._events)?(o.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),o=t._events),s=o[e]):(o=t._events=new qe,t._eventsCount=0),s){if("function"==typeof s?s=o[e]=r?[i,s]:[s,i]:r?s.unshift(i):s.push(i),!s.warned&&(n=je(t))&&n>0&&s.length>n){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,h=a,"function"==typeof console.warn?console.warn(h):console.log(h)}}else s=o[e]=i,++t._eventsCount;return t}function Fe(t,e,i){var r=!1;function n(){t.removeListener(e,n),r||(r=!0,i.apply(t,arguments))}return n.listener=i,n}function He(t){var e=this._events;if(e){var i=e[t];if("function"==typeof i)return 1;if(i)return i.length}return 0}function Ke(t,e){for(var i=new Array(e);e--;)i[e]=t[e];return i}qe.prototype=Object.create(null),Ue.EventEmitter=Ue,Ue.usingDomains=!1,Ue.prototype.domain=void 0,Ue.prototype._events=void 0,Ue.prototype._maxListeners=void 0,Ue.defaultMaxListeners=10,Ue.init=function(){this.domain=null,Ue.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new qe,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ue.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},Ue.prototype.getMaxListeners=function(){return je(this)},Ue.prototype.emit=function(t){var e,i,r,n,o,s,h,a="error"===t;if(s=this._events)a=a&&null==s.error;else if(!a)return!1;if(h=this.domain,a){if(e=arguments[1],!h){if(e instanceof Error)throw e;var u=new Error('Uncaught, unspecified "error" event. ('+e+")");throw u.context=e,u}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=h,e.domainThrown=!1,h.emit("error",e),!1}if(!(i=s[t]))return!1;var f="function"==typeof i;switch(r=arguments.length){case 1:!function(t,e,i){if(e)t.call(i);else for(var r=t.length,n=Ke(t,r),o=0;o<r;++o)n[o].call(i)}(i,f,this);break;case 2:!function(t,e,i,r){if(e)t.call(i,r);else for(var n=t.length,o=Ke(t,n),s=0;s<n;++s)o[s].call(i,r)}(i,f,this,arguments[1]);break;case 3:!function(t,e,i,r,n){if(e)t.call(i,r,n);else for(var o=t.length,s=Ke(t,o),h=0;h<o;++h)s[h].call(i,r,n)}(i,f,this,arguments[1],arguments[2]);break;case 4:!function(t,e,i,r,n,o){if(e)t.call(i,r,n,o);else for(var s=t.length,h=Ke(t,s),a=0;a<s;++a)h[a].call(i,r,n,o)}(i,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),o=1;o<r;o++)n[o-1]=arguments[o];!function(t,e,i,r){if(e)t.apply(i,r);else for(var n=t.length,o=Ke(t,n),s=0;s<n;++s)o[s].apply(i,r)}(i,f,this,n)}return!0},Ue.prototype.addListener=function(t,e){return ze(this,t,e,!1)},Ue.prototype.on=Ue.prototype.addListener,Ue.prototype.prependListener=function(t,e){return ze(this,t,e,!0)},Ue.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Fe(this,t,e)),this},Ue.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Fe(this,t,e)),this},Ue.prototype.removeListener=function(t,e){var i,r,n,o,s;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(i=r[t]))return this;if(i===e||i.listener&&i.listener===e)0==--this._eventsCount?this._events=new qe:(delete r[t],r.removeListener&&this.emit("removeListener",t,i.listener||e));else if("function"!=typeof i){for(n=-1,o=i.length;o-- >0;)if(i[o]===e||i[o].listener&&i[o].listener===e){s=i[o].listener,n=o;break}if(n<0)return this;if(1===i.length){if(i[0]=void 0,0==--this._eventsCount)return this._events=new qe,this;delete r[t]}else!function(t,e){for(var i=e,r=i+1,n=t.length;r<n;i+=1,r+=1)t[i]=t[r];t.pop()}(i,n);r.removeListener&&this.emit("removeListener",t,s||e)}return this},Ue.prototype.removeAllListeners=function(t){var e,i;if(!(i=this._events))return this;if(!i.removeListener)return 0===arguments.length?(this._events=new qe,this._eventsCount=0):i[t]&&(0==--this._eventsCount?this._events=new qe:delete i[t]),this;if(0===arguments.length){for(var r,n=Object.keys(i),o=0;o<n.length;++o)"removeListener"!==(r=n[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new qe,this._eventsCount=0,this}if("function"==typeof(e=i[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},Ue.prototype.listeners=function(t){var e,i=this._events;return i&&(e=i[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),i=0;i<e.length;++i)e[i]=t[i].listener||t[i];return e}(e):[]},Ue.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):He.call(t,e)},Ue.prototype.listenerCount=He,Ue.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Ge=Bt(Object.freeze({__proto__:null,EventEmitter:Ue,default:Ue})),Ye=Ge.EventEmitter,Ve="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t},Ze=/%[sdj%]/g;function We(t){if(!li(t)){for(var e=[],i=0;i<arguments.length;i++)e.push(ti(arguments[i]));return e.join(" ")}i=1;for(var r=arguments,n=r.length,o=String(t).replace(Ze,(function(t){if("%%"===t)return"%";if(i>=n)return t;switch(t){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch(t){return"[Circular]"}default:return t}})),s=r[i];i<n;s=r[++i])ai(s)||!mi(s)?o+=" "+s:o+=" "+ti(s);return o}function Xe(t,e){if(ci(O.process))return function(){return Xe(t,e).apply(this,arguments)};if(!0===_e.noDeprecation)return t;var i=!1;return function(){if(!i){if(_e.throwDeprecation)throw new Error(e);_e.traceDeprecation?console.trace(e):console.error(e),i=!0}return t.apply(this,arguments)}}var Qe,Je={};function $e(t){if(ci(Qe)&&(Qe=_e.env.NODE_DEBUG||""),t=t.toUpperCase(),!Je[t])if(new RegExp("\\b"+t+"\\b","i").test(Qe)){Je[t]=function(){var e=We.apply(null,arguments);console.error("%s %d: %s",t,0,e)}}else Je[t]=function(){};return Je[t]}function ti(t,e){var i={seen:[],stylize:ii};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),hi(e)?i.showHidden=e:e&&Ai(i,e),ci(i.showHidden)&&(i.showHidden=!1),ci(i.depth)&&(i.depth=2),ci(i.colors)&&(i.colors=!1),ci(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=ei),ri(i,t,i.depth)}function ei(t,e){var i=ti.styles[e];return i?"["+ti.colors[i][0]+"m"+t+"["+ti.colors[i][1]+"m":t}function ii(t,e){return t}function ri(t,e,i){if(t.customInspect&&e&&bi(e.inspect)&&e.inspect!==ti&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(i,t);return li(r)||(r=ri(t,r,i)),r}var n=function(t,e){if(ci(e))return t.stylize("undefined","undefined");if(li(e)){var i="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(i,"string")}if(fi(e))return t.stylize(""+e,"number");if(hi(e))return t.stylize(""+e,"boolean");if(ai(e))return t.stylize("null","null")}(t,e);if(n)return n;var o=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,i){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),vi(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return ni(e);if(0===o.length){if(bi(e)){var h=e.name?": "+e.name:"";return t.stylize("[Function"+h+"]","special")}if(pi(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(gi(e))return t.stylize(Date.prototype.toString.call(e),"date");if(vi(e))return ni(e)}var a,u="",f=!1,l=["{","}"];(si(e)&&(f=!0,l=["[","]"]),bi(e))&&(u=" [Function"+(e.name?": "+e.name:"")+"]");return pi(e)&&(u=" "+RegExp.prototype.toString.call(e)),gi(e)&&(u=" "+Date.prototype.toUTCString.call(e)),vi(e)&&(u=" "+ni(e)),0!==o.length||f&&0!=e.length?i<0?pi(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),a=f?function(t,e,i,r,n){for(var o=[],s=0,h=e.length;s<h;++s)ki(e,String(s))?o.push(oi(t,e,i,r,String(s),!0)):o.push("");return n.forEach((function(n){n.match(/^\d+$/)||o.push(oi(t,e,i,r,n,!0))})),o}(t,e,i,s,o):o.map((function(r){return oi(t,e,i,s,r,f)})),t.seen.pop(),function(t,e,i){var r=t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return i[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+i[1];return i[0]+e+" "+t.join(", ")+" "+i[1]}(a,u,l)):l[0]+u+l[1]}function ni(t){return"["+Error.prototype.toString.call(t)+"]"}function oi(t,e,i,r,n,o){var s,h,a;if((a=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?h=a.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):a.set&&(h=t.stylize("[Setter]","special")),ki(r,n)||(s="["+n+"]"),h||(t.seen.indexOf(a.value)<0?(h=ai(i)?ri(t,a.value,null):ri(t,a.value,i-1)).indexOf("\n")>-1&&(h=o?h.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+h.split("\n").map((function(t){return" "+t})).join("\n")):h=t.stylize("[Circular]","special")),ci(s)){if(o&&n.match(/^\d+$/))return h;(s=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+h}function si(t){return Array.isArray(t)}function hi(t){return"boolean"==typeof t}function ai(t){return null===t}function ui(t){return null==t}function fi(t){return"number"==typeof t}function li(t){return"string"==typeof t}function di(t){return"symbol"==typeof t}function ci(t){return void 0===t}function pi(t){return mi(t)&&"[object RegExp]"===Mi(t)}function mi(t){return"object"==typeof t&&null!==t}function gi(t){return mi(t)&&"[object Date]"===Mi(t)}function vi(t){return mi(t)&&("[object Error]"===Mi(t)||t instanceof Error)}function bi(t){return"function"==typeof t}function yi(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function wi(t){return K.isBuffer(t)}function Mi(t){return Object.prototype.toString.call(t)}function _i(t){return t<10?"0"+t.toString(10):t.toString(10)}ti.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ti.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Si=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ei(){var t,e;console.log("%s - %s",(t=new Date,e=[_i(t.getHours()),_i(t.getMinutes()),_i(t.getSeconds())].join(":"),[t.getDate(),Si[t.getMonth()],e].join(" ")),We.apply(null,arguments))}function Ai(t,e){if(!e||!mi(e))return t;for(var i=Object.keys(e),r=i.length;r--;)t[i[r]]=e[i[r]];return t}function ki(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Ri,Ii,Oi={inherits:Ve,_extend:Ai,log:Ei,isBuffer:wi,isPrimitive:yi,isFunction:bi,isError:vi,isDate:gi,isObject:mi,isRegExp:pi,isUndefined:ci,isSymbol:di,isString:li,isNumber:fi,isNullOrUndefined:ui,isNull:ai,isBoolean:hi,isArray:si,inspect:ti,deprecate:Xe,format:We,debuglog:$e},Ti=Bt(Object.freeze({__proto__:null,_extend:Ai,debuglog:$e,default:Oi,deprecate:Xe,format:We,inherits:Ve,inspect:ti,isArray:si,isBoolean:hi,isBuffer:wi,isDate:gi,isError:vi,isFunction:bi,isNull:ai,isNullOrUndefined:ui,isNumber:fi,isObject:mi,isPrimitive:yi,isRegExp:pi,isString:li,isSymbol:di,isUndefined:ci,log:Ei}));function Bi(){if(Ii)return Ri;function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,n(r.key),r)}}function n(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}Ii=1;var o=Oe.Buffer,s=Ti.inspect,h=s&&s.custom||"inspect";return Ri=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var i,n,a;return i=t,n=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,i,r,n=o.allocUnsafe(t>>>0),s=this.head,h=0;s;)e=s.data,i=n,r=h,o.prototype.copy.call(e,i,r),h+=s.data.length,s=s.next;return n}},{key:"consume",value:function(t,e){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):i=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,i=1,r=e.data;for(t-=r.length;e=e.next;){var n=e.data,o=t>n.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),0==(t-=o)){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),i=this.head,r=1;for(i.data.copy(e),t-=i.data.length;i=i.next;){var n=i.data,s=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,s),0==(t-=s)){s===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(s));break}++r}return this.length-=r,e}},{key:h,value:function(t,i){return s(this,e(e({},i),{},{depth:0,customInspect:!1}))}}],n&&r(i.prototype,n),a&&r(i,a),Object.defineProperty(i,"prototype",{writable:!1}),t}(),Ri}function Pi(t,e){xi(t,e),Ni(t)}function Ni(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function xi(t,e){t.emit("error",e)}var Li={destroy:function(t,e){var i=this,r=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return r||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,_e.nextTick(xi,this,t)):_e.nextTick(xi,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?i._writableState?i._writableState.errorEmitted?_e.nextTick(Ni,i):(i._writableState.errorEmitted=!0,_e.nextTick(Pi,i,t)):_e.nextTick(Pi,i,t):e?(_e.nextTick(Ni,i),e(t)):_e.nextTick(Ni,i)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var i=t._readableState,r=t._writableState;i&&i.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}},Di={};var Ci={};function qi(t,e,i){i||(i=Error);var r=function(t){var i,r;function n(i,r,n){return t.call(this,function(t,i,r){return"string"==typeof e?e:e(t,i,r)}(i,r,n))||this}return r=t,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r,n}(i);r.prototype.name=i.name,r.prototype.code=t,Ci[t]=r}function Ui(t,e){if(Array.isArray(t)){var i=t.length;return t=t.map((function(t){return String(t)})),i>2?"one of ".concat(e," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}qi("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),qi("ERR_INVALID_ARG_TYPE",(function(t,e,i){var r,n,o,s;if("string"==typeof e&&(n="not ",e.substr(!o||o<0?0:+o,n.length)===n)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-e.length,i)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(Ui(e,"type"));else{var h=function(t,e,i){return"number"!=typeof i&&(i=0),!(i+e.length>t.length)&&-1!==t.indexOf(e,i)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(h," ").concat(r," ").concat(Ui(e,"type"))}return s+=". Received type ".concat(typeof i)}),TypeError),qi("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),qi("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),qi("ERR_STREAM_PREMATURE_CLOSE","Premature close"),qi("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),qi("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),qi("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),qi("ERR_STREAM_WRITE_AFTER_END","write after end"),qi("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),qi("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),qi("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Di.codes=Ci;var ji=Di.codes.ERR_INVALID_OPT_VALUE;var zi,Fi,Hi,Ki,Gi,Yi,Vi={getHighWaterMark:function(t,e,i,r){var n=function(t,e,i){return null!=t.highWaterMark?t.highWaterMark:e?t[i]:null}(e,r,i);if(null!=n){if(!isFinite(n)||Math.floor(n)!==n||n<0)throw new ji(r?i:"highWaterMark",n);return Math.floor(n)}return t.objectMode?16:16384}};function Zi(){if(Fi)return zi;function t(t){try{if(!Tt.localStorage)return!1}catch(t){return!1}var e=Tt.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}return Fi=1,zi=function(e,i){if(t("noDeprecation"))return e;var r=!1;return function(){if(!r){if(t("throwDeprecation"))throw new Error(i);t("traceDeprecation")?console.trace(i):console.warn(i),r=!0}return e.apply(this,arguments)}},zi}function Wi(){if(Ki)return Hi;function t(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,i){var r=t.entry;t.entry=null;for(;r;){var n=r.callback;e.pendingcb--,n(i),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var e;Ki=1,Hi=M,M.WritableState=w;var i={deprecate:Zi()},r=Ye,n=Oe.Buffer,o=(void 0!==Tt?Tt:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,h=Li,a=Vi.getHighWaterMark,u=Di.codes,f=u.ERR_INVALID_ARG_TYPE,l=u.ERR_METHOD_NOT_IMPLEMENTED,d=u.ERR_MULTIPLE_CALLBACK,c=u.ERR_STREAM_CANNOT_PIPE,p=u.ERR_STREAM_DESTROYED,m=u.ERR_STREAM_NULL_VALUES,g=u.ERR_STREAM_WRITE_AFTER_END,v=u.ERR_UNKNOWN_ENCODING,b=h.errorOrDestroy;function y(){}function w(i,r,n){e=e||Xi(),i=i||{},"boolean"!=typeof n&&(n=r instanceof e),this.objectMode=!!i.objectMode,n&&(this.objectMode=this.objectMode||!!i.writableObjectMode),this.highWaterMark=a(this,i,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===i.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,r=i.sync,n=i.writecb;if("function"!=typeof n)throw new d;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,r,n){--e.pendingcb,i?(_e.nextTick(n,r),_e.nextTick(R,t,e),t._writableState.errorEmitted=!0,b(t,r)):(n(r),t._writableState.errorEmitted=!0,b(t,r),R(t,e))}(t,i,r,e,n);else{var o=A(i)||t.destroyed;o||i.corked||i.bufferProcessing||!i.bufferedRequest||E(t,i),r?_e.nextTick(S,t,i,o,n):S(t,i,o,n)}}(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==i.emitClose,this.autoDestroy=!!i.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function M(t){var i=this instanceof(e=e||Xi());if(!i&&!s.call(M,this))return new M(t);this._writableState=new w(t,this,i),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),r.call(this)}function _(t,e,i,r,n,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new p("write")):i?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function S(t,e,i,r){i||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),R(t,e)}function E(e,i){i.bufferProcessing=!0;var r=i.bufferedRequest;if(e._writev&&r&&r.next){var n=i.bufferedRequestCount,o=new Array(n),s=i.corkedRequestsFree;s.entry=r;for(var h=0,a=!0;r;)o[h]=r,r.isBuf||(a=!1),r=r.next,h+=1;o.allBuffers=a,_(e,i,!0,i.length,o,"",s.finish),i.pendingcb++,i.lastBufferedRequest=null,s.next?(i.corkedRequestsFree=s.next,s.next=null):i.corkedRequestsFree=new t(i),i.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(_(e,i,!1,i.objectMode?1:u.length,u,f,l),r=r.next,i.bufferedRequestCount--,i.writing)break}null===r&&(i.lastBufferedRequest=null)}i.bufferedRequest=r,i.bufferProcessing=!1}function A(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final((function(i){e.pendingcb--,i&&b(t,i),e.prefinished=!0,t.emit("prefinish"),R(t,e)}))}function R(t,e){var i=A(e);if(i&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,_e.nextTick(k,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var r=t._readableState;(!r||r.autoDestroy&&r.endEmitted)&&t.destroy()}return i}return xe(M,r),w.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(w.prototype,"buffer",{get:i.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===M&&(t&&t._writableState instanceof w)}})):s=function(t){return t instanceof this},M.prototype.pipe=function(){b(this,new c)},M.prototype.write=function(t,e,i){var r,s=this._writableState,h=!1,a=!s.objectMode&&(r=t,n.isBuffer(r)||r instanceof o);return a&&!n.isBuffer(t)&&(t=function(t){return n.from(t)}(t)),"function"==typeof e&&(i=e,e=null),a?e="buffer":e||(e=s.defaultEncoding),"function"!=typeof i&&(i=y),s.ending?function(t,e){var i=new g;b(t,i),_e.nextTick(e,i)}(this,i):(a||function(t,e,i,r){var n;return null===i?n=new m:"string"==typeof i||e.objectMode||(n=new f("chunk",["string","Buffer"],i)),!n||(b(t,n),_e.nextTick(r,n),!1)}(this,s,t,i))&&(s.pendingcb++,h=function(t,e,i,r,o,s){if(!i){var h=function(t,e,i){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=n.from(e,i));return e}(e,r,o);r!==h&&(i=!0,o="buffer",r=h)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:o,isBuf:i,callback:s,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else _(t,e,!1,a,r,o,s);return u}(this,s,a,t,e,i)),h},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||E(this,t))},M.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(t,e,i){i(new l("_write()"))},M.prototype._writev=null,M.prototype.end=function(t,e,i){var r=this._writableState;return"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,i){e.ending=!0,R(t,e),i&&(e.finished?_e.nextTick(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,r,i),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),M.prototype.destroy=h.destroy,M.prototype._undestroy=h.undestroy,M.prototype._destroy=function(t,e){e(t)},Hi}function Xi(){if(Yi)return Gi;Yi=1;var t=Object.keys||function(t){var e=[];for(var i in t)e.push(i);return e};Gi=s;var e=fr(),i=Wi();xe(s,e);for(var r=t(i.prototype),n=0;n<r.length;n++){var o=r[n];s.prototype[o]||(s.prototype[o]=i.prototype[o])}function s(t){if(!(this instanceof s))return new s(t);e.call(this,t),i.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||_e.nextTick(a,this)}function a(t){t.end()}return Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),Gi}var Qi,Ji={};function $i(){if(Qi)return Ji;Qi=1;var t=Re.Buffer,e=t.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(i){var r;switch(this.encoding=function(i){var r=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(i);if("string"!=typeof r&&(t.isEncoding===e||!e(i)))throw new Error("Unknown encoding: "+i);return r||i}(i),this.encoding){case"utf16le":this.text=o,this.end=s,r=4;break;case"utf8":this.fillLast=n,r=4;break;case"base64":this.text=h,this.end=a,r=3;break;default:return this.write=u,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(r)}function r(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function n(t){var e=this.lastTotal-this.lastNeed,i=function(t,e,i){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==i?i:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function o(t,e){if((t.length-e)%2==0){var i=t.toString("utf16le",e);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function s(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,i)}return e}function h(t,e){var i=(t.length-e)%3;return 0===i?t.toString("base64",e):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-i))}function a(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}return Ji.StringDecoder=i,i.prototype.write=function(t){if(0===t.length)return"";var e,i;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<t.length?e?e+this.text(t,i):this.text(t,i):e||""},i.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},i.prototype.text=function(t,e){var i=function(t,e,i){var n=e.length-1;if(n<i)return 0;var o=r(e[n]);if(o>=0)return o>0&&(t.lastNeed=o-1),o;if(--n<i||-2===o)return 0;if(o=r(e[n]),o>=0)return o>0&&(t.lastNeed=o-2),o;if(--n<i||-2===o)return 0;if(o=r(e[n]),o>=0)return o>0&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=i;var n=t.length-(i-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},i.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},Ji}var tr=Di.codes.ERR_STREAM_PREMATURE_CLOSE;function er(){}var ir,rr,nr,or,sr,hr,ar=function t(e,i,r){if("function"==typeof i)return t(e,null,i);i||(i={}),r=function(t){var e=!1;return function(){if(!e){e=!0;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];t.apply(this,r)}}}(r||er);var n=i.readable||!1!==i.readable&&e.readable,o=i.writable||!1!==i.writable&&e.writable,s=function(){e.writable||a()},h=e._writableState&&e._writableState.finished,a=function(){o=!1,h=!0,n||r.call(e)},u=e._readableState&&e._readableState.endEmitted,f=function(){n=!1,u=!0,o||r.call(e)},l=function(t){r.call(e,t)},d=function(){var t;return n&&!u?(e._readableState&&e._readableState.ended||(t=new tr),r.call(e,t)):o&&!h?(e._writableState&&e._writableState.ended||(t=new tr),r.call(e,t)):void 0},c=function(){e.req.on("finish",a)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?o&&!e._writableState&&(e.on("end",s),e.on("close",s)):(e.on("complete",a),e.on("abort",d),e.req?c():e.on("request",c)),e.on("end",f),e.on("finish",a),!1!==i.error&&e.on("error",l),e.on("close",d),function(){e.removeListener("complete",a),e.removeListener("abort",d),e.removeListener("request",c),e.req&&e.req.removeListener("finish",a),e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",a),e.removeListener("end",f),e.removeListener("error",l),e.removeListener("close",d)}};function ur(){if(rr)return ir;var t;function e(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}rr=1;var i=ar,r=Symbol("lastResolve"),n=Symbol("lastReject"),o=Symbol("error"),s=Symbol("ended"),h=Symbol("lastPromise"),a=Symbol("handlePromise"),u=Symbol("stream");function f(t,e){return{value:t,done:e}}function l(t){var e=t[r];if(null!==e){var i=t[u].read();null!==i&&(t[h]=null,t[r]=null,t[n]=null,e(f(i,!1)))}}function d(t){_e.nextTick(l,t)}var c=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((e(t={get stream(){return this[u]},next:function(){var t=this,e=this[o];if(null!==e)return Promise.reject(e);if(this[s])return Promise.resolve(f(void 0,!0));if(this[u].destroyed)return new Promise((function(e,i){_e.nextTick((function(){t[o]?i(t[o]):e(f(void 0,!0))}))}));var i,r=this[h];if(r)i=new Promise(function(t,e){return function(i,r){t.then((function(){e[s]?i(f(void 0,!0)):e[a](i,r)}),r)}}(r,this));else{var n=this[u].read();if(null!==n)return Promise.resolve(f(n,!1));i=new Promise(this[a])}return this[h]=i,i}},Symbol.asyncIterator,(function(){return this})),e(t,"return",(function(){var t=this;return new Promise((function(e,i){t[u].destroy(null,(function(t){t?i(t):e(f(void 0,!0))}))}))})),t),c);return ir=function(t){var l,c=Object.create(p,(e(l={},u,{value:t,writable:!0}),e(l,r,{value:null,writable:!0}),e(l,n,{value:null,writable:!0}),e(l,o,{value:null,writable:!0}),e(l,s,{value:t._readableState.endEmitted,writable:!0}),e(l,a,{value:function(t,e){var i=c[u].read();i?(c[h]=null,c[r]=null,c[n]=null,t(f(i,!1))):(c[r]=t,c[n]=e)},writable:!0}),l));return c[h]=null,i(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=c[n];return null!==e&&(c[h]=null,c[r]=null,c[n]=null,e(t)),void(c[o]=t)}var i=c[r];null!==i&&(c[h]=null,c[r]=null,c[n]=null,i(f(void 0,!0))),c[s]=!0})),t.on("readable",d.bind(null,c)),c},ir}function fr(){if(hr)return sr;var t;hr=1,sr=M,M.ReadableState=w,Ge.EventEmitter;var e=function(t,e){return t.listeners(e).length},i=Ye,r=Oe.Buffer,n=(void 0!==Tt?Tt:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var o,s=Ti;o=s&&s.debuglog?s.debuglog("stream"):function(){};var h,a,u,f=Bi(),l=Li,d=Vi.getHighWaterMark,c=Di.codes,p=c.ERR_INVALID_ARG_TYPE,m=c.ERR_STREAM_PUSH_AFTER_EOF,g=c.ERR_METHOD_NOT_IMPLEMENTED,v=c.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;xe(M,i);var b=l.errorOrDestroy,y=["error","close","destroy","pause","resume"];function w(e,i,r){t=t||Xi(),e=e||{},"boolean"!=typeof r&&(r=i instanceof t),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=d(this,e,"readableHighWaterMark",r),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=$i().StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function M(e){if(t=t||Xi(),!(this instanceof M))return new M(e);var r=this instanceof t;this._readableState=new w(e,this,r),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function _(t,e,i,s,h){o("readableAddChunk",e);var a,u=t._readableState;if(null===e)u.reading=!1,function(t,e){if(o("onEofChunk"),e.ended)return;if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}(t,u);else if(h||(a=function(t,e){var i;o=e,r.isBuffer(o)||o instanceof n||"string"==typeof e||void 0===e||t.objectMode||(i=new p("chunk",["string","Buffer","Uint8Array"],e));var o;return i}(u,e)),a)b(t,a);else if(u.objectMode||e&&e.length>0)if("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===r.prototype||(e=function(t){return r.from(t)}(e)),s)u.endEmitted?b(t,new v):S(t,u,e,!0);else if(u.ended)b(t,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!i?(e=u.decoder.write(e),u.objectMode||0!==e.length?S(t,u,e,!1):I(t,u)):S(t,u,e,!1)}else s||(u.reading=!1,I(t,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function S(t,e,i,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",i)):(e.length+=e.objectMode?1:i.length,r?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&k(t)),I(t,e)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),M.prototype.destroy=l.destroy,M.prototype._undestroy=l.undestroy,M.prototype._destroy=function(t,e){e(t)},M.prototype.push=function(t,e){var i,n=this._readableState;return n.objectMode?i=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=r.from(t,e),e=""),i=!0),_(this,t,e,!1,i)},M.prototype.unshift=function(t){return _(this,t,null,!0,!1)},M.prototype.isPaused=function(){return!1===this._readableState.flowing},M.prototype.setEncoding=function(t){h||(h=$i().StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,r="";null!==i;)r+=e.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var E=1073741824;function A(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,_e.nextTick(R,t))}function R(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,N(t)}function I(t,e){e.readingMore||(e.readingMore=!0,_e.nextTick(O,t,e))}function O(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var i=e.length;if(o("maybeReadMore read 0"),t.read(0),i===e.length)break}e.readingMore=!1}function T(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function B(t){o("readable nexttick read 0"),t.read(0)}function P(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),N(t),e.flowing&&!e.reading&&t.read(0)}function N(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function x(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function L(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,_e.nextTick(D,e,t))}function D(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var i=e._writableState;(!i||i.autoDestroy&&i.finished)&&e.destroy()}}function C(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}return M.prototype.read=function(t){o("read",t),t=parseInt(t,10);var e=this._readableState,i=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):k(this),null;if(0===(t=A(t,e))&&e.ended)return 0===e.length&&L(this),null;var r,n=e.needReadable;return o("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&o("length less than watermark",n=!0),e.ended||e.reading?o("reading or ended",n=!1):n&&(o("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=A(i,e))),null===(r=t>0?x(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&L(this)),null!==r&&this.emit("data",r),r},M.prototype._read=function(t){b(this,new g("_read()"))},M.prototype.pipe=function(t,i){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,i);var s=(!i||!1!==i.end)&&t!==_e.stdout&&t!==_e.stderr?a:m;function h(e,i){o("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,o("cleanup"),t.removeListener("close",c),t.removeListener("finish",p),t.removeListener("drain",u),t.removeListener("error",d),t.removeListener("unpipe",h),r.removeListener("end",a),r.removeListener("end",m),r.removeListener("data",l),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function a(){o("onend"),t.end()}n.endEmitted?_e.nextTick(s):r.once("end",s),t.on("unpipe",h);var u=function(t){return function(){var i=t._readableState;o("pipeOnDrain",i.awaitDrain),i.awaitDrain&&i.awaitDrain--,0===i.awaitDrain&&e(t,"data")&&(i.flowing=!0,N(t))}}(r);t.on("drain",u);var f=!1;function l(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==C(n.pipes,t))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(i){o("onerror",i),m(),t.removeListener("error",d),0===e(t,"error")&&b(t,i)}function c(){t.removeListener("finish",p),m()}function p(){o("onfinish"),t.removeListener("close",c),m()}function m(){o("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",d),t.once("close",c),t.once("finish",p),t.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),t},M.prototype.unpipe=function(t){var e=this._readableState,i={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<n;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=C(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,i)),this},M.prototype.on=function(t,e){var r=i.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?k(this):n.reading||_e.nextTick(B,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(t,e){var r=i.prototype.removeListener.call(this,t,e);return"readable"===t&&_e.nextTick(T,this),r},M.prototype.removeAllListeners=function(t){var e=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||_e.nextTick(T,this),e},M.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,_e.nextTick(P,t,e))}(this,t)),t.paused=!1,this},M.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(t){var e=this,i=this._readableState,r=!1;for(var n in t.on("end",(function(){if(o("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(o("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(e.push(n)||(r=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<y.length;s++)t.on(y[s],this.emit.bind(this,y[s]));return this._read=function(e){o("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(M.prototype[Symbol.asyncIterator]=function(){return void 0===a&&(a=ur()),a(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),M._fromList=x,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(M.from=function(t,e){return void 0===u&&(u=or?nr:(or=1,nr=function(){throw new Error("Readable.from is not available in the browser")})),u(M,t,e)}),sr}var lr=yr,dr=Di.codes,cr=dr.ERR_METHOD_NOT_IMPLEMENTED,pr=dr.ERR_MULTIPLE_CALLBACK,mr=dr.ERR_TRANSFORM_ALREADY_TRANSFORMING,gr=dr.ERR_TRANSFORM_WITH_LENGTH_0,vr=Xi();function br(t,e){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new pr);i.writechunk=null,i.writecb=null,null!=e&&this.push(e),r(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function yr(t){if(!(this instanceof yr))return new yr(t);vr.call(this,t),this._transformState={afterTransform:br.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",wr)}function wr(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?Mr(this,null,null):this._flush((function(e,i){Mr(t,e,i)}))}function Mr(t,e,i){if(e)return t.emit("error",e);if(null!=i&&t.push(i),t._writableState.length)throw new gr;if(t._transformState.transforming)throw new mr;return t.push(null)}xe(yr,vr),yr.prototype.push=function(t,e){return this._transformState.needTransform=!1,vr.prototype.push.call(this,t,e)},yr.prototype._transform=function(t,e,i){i(new cr("_transform()"))},yr.prototype._write=function(t,e,i){var r=this._transformState;if(r.writecb=i,r.writechunk=t,r.writeencoding=e,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},yr.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},yr.prototype._destroy=function(t,e){vr.prototype._destroy.call(this,t,(function(t){e(t)}))};var _r,Sr=Ar,Er=lr;function Ar(t){if(!(this instanceof Ar))return new Ar(t);Er.call(this,t)}xe(Ar,Er),Ar.prototype._transform=function(t,e,i){i(null,t)};var kr=Di.codes,Rr=kr.ERR_MISSING_ARGS,Ir=kr.ERR_STREAM_DESTROYED;function Or(t){if(t)throw t}function Tr(t){t()}function Br(t,e){return t.pipe(e)}var Pr=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var r,n=function(t){return t.length?"function"!=typeof t[t.length-1]?Or:t.pop():Or}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Rr("streams");var o=e.map((function(t,i){var s=i<e.length-1;return function(t,e,i,r){r=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(r);var n=!1;t.on("close",(function(){n=!0})),void 0===_r&&(_r=ar),_r(t,{readable:e,writable:i},(function(t){if(t)return r(t);n=!0,r()}));var o=!1;return function(e){if(!n&&!o)return o=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void r(e||new Ir("pipe"))}}(t,s,i>0,(function(t){r||(r=t),t&&o.forEach(Tr),s||(o.forEach(Tr),n(r))}))}));return e.reduce(Br)};!function(t,e){(e=Ce.exports=fr()).Stream=e,e.Readable=e,e.Writable=Wi(),e.Duplex=Xi(),e.Transform=lr,e.PassThrough=Sr,e.finished=ar,e.pipeline=Pr}(0,De);var Nr=Re.Buffer,xr=De.Transform;function Lr(t){xr.call(this),this._block=Nr.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}xe(Lr,xr),Lr.prototype._transform=function(t,e,i){var r=null;try{this.update(t,e)}catch(t){r=t}i(r)},Lr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},Lr.prototype.update=function(t,e){if(function(t,e){if(!Nr.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");Nr.isBuffer(t)||(t=Nr.from(t,e));for(var i=this._block,r=0;this._blockOffset+t.length-r>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)i[n++]=t[r++];this._update(),this._blockOffset=0}for(;r<t.length;)i[this._blockOffset++]=t[r++];for(var o=0,s=8*t.length;s>0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},Lr.prototype._update=function(){throw new Error("_update is not implemented")},Lr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return e},Lr.prototype._digest=function(){throw new Error("_digest is not implemented")};var Dr=Lr,Cr=xe,qr=Dr,Ur=Re.Buffer,jr=new Array(16);function zr(){qr.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function Fr(t,e){return t<<e|t>>>32-e}function Hr(t,e,i,r,n,o,s){return Fr(t+(e&i|~e&r)+n+o|0,s)+e|0}function Kr(t,e,i,r,n,o,s){return Fr(t+(e&r|i&~r)+n+o|0,s)+e|0}function Gr(t,e,i,r,n,o,s){return Fr(t+(e^i^r)+n+o|0,s)+e|0}function Yr(t,e,i,r,n,o,s){return Fr(t+(i^(e|~r))+n+o|0,s)+e|0}Cr(zr,qr),zr.prototype._update=function(){for(var t=jr,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var i=this._a,r=this._b,n=this._c,o=this._d;i=Hr(i,r,n,o,t[0],3614090360,7),o=Hr(o,i,r,n,t[1],3905402710,12),n=Hr(n,o,i,r,t[2],606105819,17),r=Hr(r,n,o,i,t[3],3250441966,22),i=Hr(i,r,n,o,t[4],4118548399,7),o=Hr(o,i,r,n,t[5],1200080426,12),n=Hr(n,o,i,r,t[6],2821735955,17),r=Hr(r,n,o,i,t[7],4249261313,22),i=Hr(i,r,n,o,t[8],1770035416,7),o=Hr(o,i,r,n,t[9],2336552879,12),n=Hr(n,o,i,r,t[10],4294925233,17),r=Hr(r,n,o,i,t[11],2304563134,22),i=Hr(i,r,n,o,t[12],1804603682,7),o=Hr(o,i,r,n,t[13],4254626195,12),n=Hr(n,o,i,r,t[14],2792965006,17),i=Kr(i,r=Hr(r,n,o,i,t[15],1236535329,22),n,o,t[1],4129170786,5),o=Kr(o,i,r,n,t[6],3225465664,9),n=Kr(n,o,i,r,t[11],643717713,14),r=Kr(r,n,o,i,t[0],3921069994,20),i=Kr(i,r,n,o,t[5],3593408605,5),o=Kr(o,i,r,n,t[10],38016083,9),n=Kr(n,o,i,r,t[15],3634488961,14),r=Kr(r,n,o,i,t[4],3889429448,20),i=Kr(i,r,n,o,t[9],568446438,5),o=Kr(o,i,r,n,t[14],3275163606,9),n=Kr(n,o,i,r,t[3],4107603335,14),r=Kr(r,n,o,i,t[8],1163531501,20),i=Kr(i,r,n,o,t[13],2850285829,5),o=Kr(o,i,r,n,t[2],4243563512,9),n=Kr(n,o,i,r,t[7],1735328473,14),i=Gr(i,r=Kr(r,n,o,i,t[12],2368359562,20),n,o,t[5],4294588738,4),o=Gr(o,i,r,n,t[8],2272392833,11),n=Gr(n,o,i,r,t[11],1839030562,16),r=Gr(r,n,o,i,t[14],4259657740,23),i=Gr(i,r,n,o,t[1],2763975236,4),o=Gr(o,i,r,n,t[4],1272893353,11),n=Gr(n,o,i,r,t[7],4139469664,16),r=Gr(r,n,o,i,t[10],3200236656,23),i=Gr(i,r,n,o,t[13],681279174,4),o=Gr(o,i,r,n,t[0],3936430074,11),n=Gr(n,o,i,r,t[3],3572445317,16),r=Gr(r,n,o,i,t[6],76029189,23),i=Gr(i,r,n,o,t[9],3654602809,4),o=Gr(o,i,r,n,t[12],3873151461,11),n=Gr(n,o,i,r,t[15],530742520,16),i=Yr(i,r=Gr(r,n,o,i,t[2],3299628645,23),n,o,t[0],4096336452,6),o=Yr(o,i,r,n,t[7],1126891415,10),n=Yr(n,o,i,r,t[14],2878612391,15),r=Yr(r,n,o,i,t[5],4237533241,21),i=Yr(i,r,n,o,t[12],1700485571,6),o=Yr(o,i,r,n,t[3],2399980690,10),n=Yr(n,o,i,r,t[10],4293915773,15),r=Yr(r,n,o,i,t[1],2240044497,21),i=Yr(i,r,n,o,t[8],1873313359,6),o=Yr(o,i,r,n,t[15],4264355552,10),n=Yr(n,o,i,r,t[6],2734768916,15),r=Yr(r,n,o,i,t[13],1309151649,21),i=Yr(i,r,n,o,t[4],4149444226,6),o=Yr(o,i,r,n,t[11],3174756917,10),n=Yr(n,o,i,r,t[2],718787259,15),r=Yr(r,n,o,i,t[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+o|0},zr.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Ur.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};var Vr=zr,Zr=Oe.Buffer,Wr=xe,Xr=Dr,Qr=new Array(16),Jr=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],$r=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],tn=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],en=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],rn=[0,1518500249,1859775393,2400959708,2840853838],nn=[1352829926,1548603684,1836072691,2053994217,0];function on(){Xr.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function sn(t,e){return t<<e|t>>>32-e}function hn(t,e,i,r,n,o,s,h){return sn(t+(e^i^r)+o+s|0,h)+n|0}function an(t,e,i,r,n,o,s,h){return sn(t+(e&i|~e&r)+o+s|0,h)+n|0}function un(t,e,i,r,n,o,s,h){return sn(t+((e|~i)^r)+o+s|0,h)+n|0}function fn(t,e,i,r,n,o,s,h){return sn(t+(e&r|i&~r)+o+s|0,h)+n|0}function ln(t,e,i,r,n,o,s,h){return sn(t+(e^(i|~r))+o+s|0,h)+n|0}Wr(on,Xr),on.prototype._update=function(){for(var t=Qr,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,s=0|this._e,h=0|this._a,a=0|this._b,u=0|this._c,f=0|this._d,l=0|this._e,d=0;d<80;d+=1){var c,p;d<16?(c=hn(i,r,n,o,s,t[Jr[d]],rn[0],tn[d]),p=ln(h,a,u,f,l,t[$r[d]],nn[0],en[d])):d<32?(c=an(i,r,n,o,s,t[Jr[d]],rn[1],tn[d]),p=fn(h,a,u,f,l,t[$r[d]],nn[1],en[d])):d<48?(c=un(i,r,n,o,s,t[Jr[d]],rn[2],tn[d]),p=un(h,a,u,f,l,t[$r[d]],nn[2],en[d])):d<64?(c=fn(i,r,n,o,s,t[Jr[d]],rn[3],tn[d]),p=an(h,a,u,f,l,t[$r[d]],nn[3],en[d])):(c=ln(i,r,n,o,s,t[Jr[d]],rn[4],tn[d]),p=hn(h,a,u,f,l,t[$r[d]],nn[4],en[d])),i=s,s=o,o=sn(n,10),n=r,r=c,h=l,l=f,f=sn(u,10),u=a,a=p}var m=this._b+n+f|0;this._b=this._c+o+l|0,this._c=this._d+s+h|0,this._d=this._e+i+a|0,this._e=this._a+r+u|0,this._a=m},on.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Zr.alloc?Zr.alloc(20):new Zr(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};var dn=on,cn={},pn={get exports(){return cn},set exports(t){cn=t}},mn=Re.Buffer;function gn(t,e){this._block=mn.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}gn.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=mn.from(t,e));for(var i=this._block,r=this._blockSize,n=t.length,o=this._len,s=0;s<n;){for(var h=o%r,a=Math.min(n-s,r-h),u=0;u<a;u++)i[h+u]=t[s+u];s+=a,(o+=a)%r==0&&this._update(i)}return this._len+=n,this},gn.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},gn.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var vn=gn,bn=xe,yn=vn,wn=Re.Buffer,Mn=[1518500249,1859775393,-1894007588,-899497514],_n=new Array(80);function Sn(){this.init(),this._w=_n,yn.call(this,64,56)}function En(t){return t<<30|t>>>2}function An(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}bn(Sn,yn),Sn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sn.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0;a<16;++a)i[a]=t.readInt32BE(4*a);for(;a<80;++a)i[a]=i[a-3]^i[a-8]^i[a-14]^i[a-16];for(var u=0;u<80;++u){var f=~~(u/20),l=0|((e=r)<<5|e>>>27)+An(f,n,o,s)+h+i[u]+Mn[f];h=s,s=o,o=En(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0},Sn.prototype._hash=function(){var t=wn.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var kn=Sn,Rn=xe,In=vn,On=Re.Buffer,Tn=[1518500249,1859775393,-1894007588,-899497514],Bn=new Array(80);function Pn(){this.init(),this._w=Bn,In.call(this,64,56)}function Nn(t){return t<<5|t>>>27}function xn(t){return t<<30|t>>>2}function Ln(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}Rn(Pn,In),Pn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Pn.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0;a<16;++a)i[a]=t.readInt32BE(4*a);for(;a<80;++a)i[a]=(e=i[a-3]^i[a-8]^i[a-14]^i[a-16])<<1|e>>>31;for(var u=0;u<80;++u){var f=~~(u/20),l=Nn(r)+Ln(f,n,o,s)+h+i[u]+Tn[f]|0;h=s,s=o,o=xn(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0},Pn.prototype._hash=function(){var t=On.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var Dn=Pn,Cn=xe,qn=vn,Un=Re.Buffer,jn=[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],zn=new Array(64);function Fn(){this.init(),this._w=zn,qn.call(this,64,56)}function Hn(t,e,i){return i^t&(e^i)}function Kn(t,e,i){return t&e|i&(t|e)}function Gn(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function Yn(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Vn(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}Cn(Fn,qn),Fn.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Fn.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0|this._f,u=0|this._g,f=0|this._h,l=0;l<16;++l)i[l]=t.readInt32BE(4*l);for(;l<64;++l)i[l]=0|(((e=i[l-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+i[l-7]+Vn(i[l-15])+i[l-16];for(var d=0;d<64;++d){var c=f+Yn(h)+Hn(h,a,u)+jn[d]+i[d]|0,p=Gn(r)+Kn(r,n,o)|0;f=u,u=a,a=h,h=s+c|0,s=o,o=n,n=r,r=c+p|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0,this._f=a+this._f|0,this._g=u+this._g|0,this._h=f+this._h|0},Fn.prototype._hash=function(){var t=Un.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var Zn=Fn,Wn=xe,Xn=Zn,Qn=vn,Jn=Re.Buffer,$n=new Array(64);function to(){this.init(),this._w=$n,Qn.call(this,64,56)}Wn(to,Xn),to.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},to.prototype._hash=function(){var t=Jn.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var eo=to,io=xe,ro=vn,no=Re.Buffer,oo=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],so=new Array(160);function ho(){this.init(),this._w=so,ro.call(this,128,112)}function ao(t,e,i){return i^t&(e^i)}function uo(t,e,i){return t&e|i&(t|e)}function fo(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function lo(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function co(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function po(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function mo(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function go(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function vo(t,e){return t>>>0<e>>>0?1:0}io(ho,ro),ho.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},ho.prototype._update=function(t){for(var e=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,h=0|this._fh,a=0|this._gh,u=0|this._hh,f=0|this._al,l=0|this._bl,d=0|this._cl,c=0|this._dl,p=0|this._el,m=0|this._fl,g=0|this._gl,v=0|this._hl,b=0;b<32;b+=2)e[b]=t.readInt32BE(4*b),e[b+1]=t.readInt32BE(4*b+4);for(;b<160;b+=2){var y=e[b-30],w=e[b-30+1],M=co(y,w),_=po(w,y),S=mo(y=e[b-4],w=e[b-4+1]),E=go(w,y),A=e[b-14],k=e[b-14+1],R=e[b-32],I=e[b-32+1],O=_+k|0,T=M+A+vo(O,_)|0;T=(T=T+S+vo(O=O+E|0,E)|0)+R+vo(O=O+I|0,I)|0,e[b]=T,e[b+1]=O}for(var B=0;B<160;B+=2){T=e[B],O=e[B+1];var P=uo(i,r,n),N=uo(f,l,d),x=fo(i,f),L=fo(f,i),D=lo(s,p),C=lo(p,s),q=oo[B],U=oo[B+1],j=ao(s,h,a),z=ao(p,m,g),F=v+C|0,H=u+D+vo(F,v)|0;H=(H=(H=H+j+vo(F=F+z|0,z)|0)+q+vo(F=F+U|0,U)|0)+T+vo(F=F+O|0,O)|0;var K=L+N|0,G=x+P+vo(K,L)|0;u=a,v=g,a=h,g=m,h=s,m=p,s=o+H+vo(p=c+F|0,c)|0,o=n,c=d,n=r,d=l,r=i,l=f,i=H+G+vo(f=F+K|0,F)|0}this._al=this._al+f|0,this._bl=this._bl+l|0,this._cl=this._cl+d|0,this._dl=this._dl+c|0,this._el=this._el+p|0,this._fl=this._fl+m|0,this._gl=this._gl+g|0,this._hl=this._hl+v|0,this._ah=this._ah+i+vo(this._al,f)|0,this._bh=this._bh+r+vo(this._bl,l)|0,this._ch=this._ch+n+vo(this._cl,d)|0,this._dh=this._dh+o+vo(this._dl,c)|0,this._eh=this._eh+s+vo(this._el,p)|0,this._fh=this._fh+h+vo(this._fl,m)|0,this._gh=this._gh+a+vo(this._gl,g)|0,this._hh=this._hh+u+vo(this._hl,v)|0},ho.prototype._hash=function(){var t=no.allocUnsafe(64);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var bo=ho,yo=xe,wo=bo,Mo=vn,_o=Re.Buffer,So=new Array(160);function Eo(){this.init(),this._w=So,Mo.call(this,128,112)}yo(Eo,wo),Eo.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Eo.prototype._hash=function(){var t=_o.allocUnsafe(48);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var Ao=Eo,ko=pn.exports=function(t){t=t.toLowerCase();var e=ko[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};function Ro(){this.head=null,this.tail=null,this.length=0}ko.sha=kn,ko.sha1=Dn,ko.sha224=eo,ko.sha256=Zn,ko.sha384=Ao,ko.sha512=bo,Ro.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},Ro.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},Ro.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},Ro.prototype.clear=function(){this.head=this.tail=null,this.length=0},Ro.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i},Ro.prototype.concat=function(t){if(0===this.length)return K.alloc(0);if(1===this.length)return this.head.data;for(var e=K.allocUnsafe(t>>>0),i=this.head,r=0;i;)i.data.copy(e,r),r+=i.data.length,i=i.next;return e};var Io=K.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Oo(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!Io(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Bo;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Po;break;default:return void(this.write=To)}this.charBuffer=new K(6),this.charReceived=0,this.charLength=0}function To(t){return t.toString(this.encoding)}function Bo(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function Po(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}Oo.prototype.write=function(t){for(var e="";this.charLength;){var i=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";if(t=t.slice(i,t.length),!((n=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var r=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived);var n;r=(e+=t.toString(this.encoding,0,r)).length-1;if((n=e.charCodeAt(r))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,r)}return e},Oo.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var i=t[t.length-e];if(1==e&&i>>5==6){this.charLength=2;break}if(e<=2&&i>>4==14){this.charLength=3;break}if(e<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=e},Oo.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var i=this.charReceived,r=this.charBuffer,n=this.encoding;e+=r.slice(0,i).toString(n)}return e};var No=Object.freeze({__proto__:null,StringDecoder:Oo});Do.ReadableState=Lo;var xo=$e("stream");function Lo(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof fs&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new Ro,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new Oo(t.encoding),this.encoding=t.encoding)}function Do(t){if(!(this instanceof Do))return new Do(t);this._readableState=new Lo(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),Ue.call(this)}function Co(t,e,i,r,n){var o=function(t,e){var i=null;K.isBuffer(e)||"string"==typeof e||null==e||t.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));return i}(e,i);if(o)t.emit("error",o);else if(null===i)e.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,jo(t)}(t,e);else if(e.objectMode||i&&i.length>0)if(e.ended&&!n){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&n){var h=new Error("stream.unshift() after end event");t.emit("error",h)}else{var a;!e.decoder||n||r||(i=e.decoder.write(i),a=!e.objectMode&&0===i.length),n||(e.reading=!1),a||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",i),t.read(0)):(e.length+=e.objectMode?1:i.length,n?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&jo(t))),function(t,e){e.readingMore||(e.readingMore=!0,ue(Fo,t,e))}(t,e)}else n||(e.reading=!1);return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(e)}Ve(Do,Ue),Do.prototype.push=function(t,e){var i=this._readableState;return i.objectMode||"string"!=typeof t||(e=e||i.defaultEncoding)!==i.encoding&&(t=K.from(t,e),e=""),Co(this,i,t,e,!1)},Do.prototype.unshift=function(t){return Co(this,this._readableState,t,"",!0)},Do.prototype.isPaused=function(){return!1===this._readableState.flowing},Do.prototype.setEncoding=function(t){return this._readableState.decoder=new Oo(t),this._readableState.encoding=t,this};var qo=8388608;function Uo(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=qo?t=qo:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function jo(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(xo("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?ue(zo,t):zo(t))}function zo(t){xo("emit readable"),t.emit("readable"),Go(t)}function Fo(t,e){for(var i=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(xo("maybeReadMore read 0"),t.read(0),i!==e.length);)i=e.length;e.readingMore=!1}function Ho(t){xo("readable nexttick read 0"),t.read(0)}function Ko(t,e){e.reading||(xo("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Go(t),e.flowing&&!e.reading&&t.read(0)}function Go(t){var e=t._readableState;for(xo("flow",e.flowing);e.flowing&&null!==t.read(););}function Yo(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):i=function(t,e,i){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():i?function(t,e){var i=e.head,r=1,n=i.data;t-=n.length;for(;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(s===o.length?n+=o:n+=o.slice(0,t),0===(t-=s)){s===o.length?(++r,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(s));break}++r}return e.length-=r,n}(t,e):function(t,e){var i=K.allocUnsafe(t),r=e.head,n=1;r.data.copy(i),t-=r.data.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(i,i.length-t,0,s),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e);return r}(t,e.buffer,e.decoder),i);var i}function Vo(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,ue(Zo,e,t))}function Zo(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Wo(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}function Xo(){}function Qo(t,e,i){this.chunk=t,this.encoding=e,this.callback=i,this.next=null}function Jo(t,e){Object.defineProperty(this,"buffer",{get:Xe((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof fs&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=!1===t.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,r=i.sync,n=i.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,r,n){--e.pendingcb,i?ue(n,r):n(r);t._writableState.errorEmitted=!0,t.emit("error",r)}(t,i,r,e,n);else{var o=rs(i);o||i.corked||i.bufferProcessing||!i.bufferedRequest||is(t,i),r?ue(es,t,i,o,n):es(t,i,o,n)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new ss(this)}function $o(t){if(!(this instanceof $o||this instanceof fs))return new $o(t);this._writableState=new Jo(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),Ue.call(this)}function ts(t,e,i,r,n,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,i?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function es(t,e,i,r){i||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),os(t,e)}function is(t,e){e.bufferProcessing=!0;var i=e.bufferedRequest;if(t._writev&&i&&i.next){var r=e.bufferedRequestCount,n=new Array(r),o=e.corkedRequestsFree;o.entry=i;for(var s=0;i;)n[s]=i,i=i.next,s+=1;ts(t,e,!0,e.length,n,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new ss(e)}else{for(;i;){var h=i.chunk,a=i.encoding,u=i.callback;if(ts(t,e,!1,e.objectMode?1:h.length,h,a,u),i=i.next,e.writing)break}null===i&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=i,e.bufferProcessing=!1}function rs(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function ns(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function os(t,e){var i=rs(e);return i&&(0===e.pendingcb?(ns(t,e),e.finished=!0,t.emit("finish")):ns(t,e)),i}function ss(t){var e=this;this.next=null,this.entry=null,this.finish=function(i){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(i),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}Do.prototype.read=function(t){xo("read",t),t=parseInt(t,10);var e=this._readableState,i=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return xo("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?Vo(this):jo(this),null;if(0===(t=Uo(t,e))&&e.ended)return 0===e.length&&Vo(this),null;var r,n=e.needReadable;return xo("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&xo("length less than watermark",n=!0),e.ended||e.reading?xo("reading or ended",n=!1):n&&(xo("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Uo(i,e))),null===(r=t>0?Yo(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&Vo(this)),null!==r&&this.emit("data",r),r},Do.prototype._read=function(t){this.emit("error",new Error("not implemented"))},Do.prototype.pipe=function(t,e){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,xo("pipe count=%d opts=%j",r.pipesCount,e);var n=!e||!1!==e.end?s:u;function o(t){xo("onunpipe"),t===i&&u()}function s(){xo("onend"),t.end()}r.endEmitted?ue(n):i.once("end",n),t.on("unpipe",o);var h=function(t){return function(){var e=t._readableState;xo("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,Go(t))}}(i);t.on("drain",h);var a=!1;function u(){xo("cleanup"),t.removeListener("close",c),t.removeListener("finish",p),t.removeListener("drain",h),t.removeListener("error",d),t.removeListener("unpipe",o),i.removeListener("end",s),i.removeListener("end",u),i.removeListener("data",l),a=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||h()}var f=!1;function l(e){xo("ondata"),f=!1,!1!==t.write(e)||f||((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==Wo(r.pipes,t))&&!a&&(xo("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,f=!0),i.pause())}function d(e){var i;xo("onerror",e),m(),t.removeListener("error",d),0===(i="error",t.listeners(i).length)&&t.emit("error",e)}function c(){t.removeListener("finish",p),m()}function p(){xo("onfinish"),t.removeListener("close",c),m()}function m(){xo("unpipe"),i.unpipe(t)}return i.on("data",l),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",d),t.once("close",c),t.once("finish",p),t.emit("pipe",i),r.flowing||(xo("pipe resume"),i.resume()),t},Do.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this)),this;if(!t){var i=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n<r;n++)i[n].emit("unpipe",this);return this}var o=Wo(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this)),this},Do.prototype.on=function(t,e){var i=Ue.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&jo(this):ue(Ho,this))}return i},Do.prototype.addListener=Do.prototype.on,Do.prototype.resume=function(){var t=this._readableState;return t.flowing||(xo("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,ue(Ko,t,e))}(this,t)),this},Do.prototype.pause=function(){return xo("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(xo("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Do.prototype.wrap=function(t){var e=this._readableState,i=!1,r=this;for(var n in t.on("end",(function(){if(xo("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)})),t.on("data",(function(n){(xo("wrapped data"),e.decoder&&(n=e.decoder.write(n)),e.objectMode&&null==n)||(e.objectMode||n&&n.length)&&(r.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));return function(t,e){for(var i=0,r=t.length;i<r;i++)e(t[i],i)}(["error","close","destroy","pause","resume"],(function(e){t.on(e,r.emit.bind(r,e))})),r._read=function(e){xo("wrapped _read",e),i&&(i=!1,t.resume())},r},Do._fromList=Yo,$o.WritableState=Jo,Ve($o,Ue),Jo.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},$o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},$o.prototype.write=function(t,e,i){var r=this._writableState,n=!1;return"function"==typeof e&&(i=e,e=null),K.isBuffer(t)?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof i&&(i=Xo),r.ended?function(t,e){var i=new Error("write after end");t.emit("error",i),ue(e,i)}(this,i):function(t,e,i,r){var n=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):K.isBuffer(i)||"string"==typeof i||void 0===i||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),ue(r,o),n=!1),n}(this,r,t,i)&&(r.pendingcb++,n=function(t,e,i,r,n){i=function(t,e,i){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=K.from(e,i));return e}(e,i,r),K.isBuffer(i)&&(r="buffer");var o=e.objectMode?1:i.length;e.length+=o;var s=e.length<e.highWaterMark;s||(e.needDrain=!0);if(e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest=new Qo(i,r,n),h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else ts(t,e,!1,o,i,r,n);return s}(this,r,t,e,i)),n},$o.prototype.cork=function(){this._writableState.corked++},$o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||is(this,t))},$o.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},$o.prototype._write=function(t,e,i){i(new Error("not implemented"))},$o.prototype._writev=null,$o.prototype.end=function(t,e,i){var r=this._writableState;"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,i){e.ending=!0,os(t,e),i&&(e.finished?ue(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,r,i)},Ve(fs,Do);for(var hs=Object.keys($o.prototype),as=0;as<hs.length;as++){var us=hs[as];fs.prototype[us]||(fs.prototype[us]=$o.prototype[us])}function fs(t){if(!(this instanceof fs))return new fs(t);Do.call(this,t),$o.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",ls)}function ls(){this.allowHalfOpen||this._writableState.ended||ue(ds,this)}function ds(t){t.end()}function cs(t){this.afterTransform=function(e,i){return function(t,e,i){var r=t._transformState;r.transforming=!1;var n=r.writecb;if(!n)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=i&&t.push(i);n(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}(t,e,i)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function ps(t){if(!(this instanceof ps))return new ps(t);fs.call(this,t),this._transformState=new cs(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(t){ms(e,t)})):ms(e)}))}function ms(t,e){if(e)return t.emit("error",e);var i=t._writableState,r=t._transformState;if(i.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}function gs(t){if(!(this instanceof gs))return new gs(t);ps.call(this,t)}function vs(){Ue.call(this)}Ve(ps,fs),ps.prototype.push=function(t,e){return this._transformState.needTransform=!1,fs.prototype.push.call(this,t,e)},ps.prototype._transform=function(t,e,i){throw new Error("Not implemented")},ps.prototype._write=function(t,e,i){var r=this._transformState;if(r.writecb=i,r.writechunk=t,r.writeencoding=e,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},ps.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},Ve(gs,ps),gs.prototype._transform=function(t,e,i){i(null,t)},Ve(vs,Ue),vs.Readable=Do,vs.Writable=$o,vs.Duplex=fs,vs.Transform=ps,vs.PassThrough=gs,vs.Stream=vs,vs.prototype.pipe=function(t,e){var i=this;function r(e){t.writable&&!1===t.write(e)&&i.pause&&i.pause()}function n(){i.readable&&i.resume&&i.resume()}i.on("data",r),t.on("drain",n),t._isStdio||e&&!1===e.end||(i.on("end",s),i.on("close",h));var o=!1;function s(){o||(o=!0,t.end())}function h(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===Ue.listenerCount(this,"error"))throw t}function u(){i.removeListener("data",r),t.removeListener("drain",n),i.removeListener("end",s),i.removeListener("close",h),i.removeListener("error",a),t.removeListener("error",a),i.removeListener("end",u),i.removeListener("close",u),t.removeListener("close",u)}return i.on("error",a),t.on("error",a),i.on("end",u),i.on("close",u),t.on("close",u),t.emit("pipe",i),t};var bs=Bt(Object.freeze({__proto__:null,Duplex:fs,PassThrough:gs,Readable:Do,Stream:vs,Transform:ps,Writable:$o,default:vs})),ys=Bt(No),ws=Re.Buffer,Ms=bs.Transform,_s=ys.StringDecoder;function Ss(t){Ms.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}xe(Ss,Ms),Ss.prototype.update=function(t,e,i){"string"==typeof t&&(t=ws.from(t,e));var r=this._update(t);return this.hashMode?this:(i&&(r=this._toString(r,i)),r)},Ss.prototype.setAutoPadding=function(){},Ss.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},Ss.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},Ss.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},Ss.prototype._transform=function(t,e,i){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{i(r)}},Ss.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},Ss.prototype._finalOrDigest=function(t){var e=this.__final()||ws.alloc(0);return t&&(e=this._toString(e,t,!0)),e},Ss.prototype._toString=function(t,e,i){if(this._decoder||(this._decoder=new _s(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return i&&(r+=this._decoder.end()),r};var Es=Ss,As=Vr,ks=dn,Rs=cn,Is=Es;function Os(t){Is.call(this,"digest"),this._hash=t}xe(Os,Is),Os.prototype._update=function(t){this._hash.update(t)},Os.prototype._final=function(){return this._hash.digest()};var Ts=function(t){return"md5"===(t=t.toLowerCase())?new As:"rmd160"===t||"ripemd160"===t?new ks:new Os(Rs(t))},Bs=xe,Ps=Re.Buffer,Ns=Es,xs=Ps.alloc(128),Ls=64;function Ds(t,e){Ns.call(this,"digest"),"string"==typeof e&&(e=Ps.from(e)),this._alg=t,this._key=e,e.length>Ls?e=t(e):e.length<Ls&&(e=Ps.concat([e,xs],Ls));for(var i=this._ipad=Ps.allocUnsafe(Ls),r=this._opad=Ps.allocUnsafe(Ls),n=0;n<Ls;n++)i[n]=54^e[n],r[n]=92^e[n];this._hash=[i]}Bs(Ds,Ns),Ds.prototype._update=function(t){this._hash.push(t)},Ds.prototype._final=function(){var t=this._alg(Ps.concat(this._hash));return this._alg(Ps.concat([this._opad,t]))};var Cs=Vr,qs=function(t){return(new Cs).update(t).digest()},Us=xe,js=Ds,zs=Es,Fs=Re.Buffer,Hs=qs,Ks=dn,Gs=cn,Ys=Fs.alloc(128);function Vs(t,e){zs.call(this,"digest"),"string"==typeof e&&(e=Fs.from(e));var i="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>i)?e=("rmd160"===t?new Ks:Gs(t)).update(e).digest():e.length<i&&(e=Fs.concat([e,Ys],i));for(var r=this._ipad=Fs.allocUnsafe(i),n=this._opad=Fs.allocUnsafe(i),o=0;o<i;o++)r[o]=54^e[o],n[o]=92^e[o];this._hash="rmd160"===t?new Ks:Gs(t),this._hash.update(r)}Us(Vs,zs),Vs.prototype._update=function(t){this._hash.update(t)},Vs.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new Ks:Gs(this._alg)).update(this._opad).update(t).digest()};var Zs=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new Vs("rmd160",e):"md5"===t?new js(Hs,e):new Vs(t,e)},Ws={},Xs={get exports(){return Ws},set exports(t){Ws=t}};var Qs={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};Xs.exports=Qs;var Js,$s={},th=Math.pow(2,30)-1,eh=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>th||e!=e)throw new TypeError("Bad key length")};if(Tt.process&&Tt.process.browser)Js="utf-8";else if(Tt.process&&Tt.process.version){Js=parseInt(_e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else Js="utf-8";var ih=Js,rh=Re.Buffer,nh=function(t,e,i){if(rh.isBuffer(t))return t;if("string"==typeof t)return rh.from(t,e);if(ArrayBuffer.isView(t))return rh.from(t.buffer);throw new TypeError(i+" must be a string, a Buffer, a typed array or a DataView")},oh=qs,sh=dn,hh=cn,ah=Re.Buffer,uh=eh,fh=ih,lh=nh,dh=ah.alloc(128),ch={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function ph(t,e,i){var r=function(t){function e(e){return hh(t).update(e).digest()}function i(t){return(new sh).update(t).digest()}return"rmd160"===t||"ripemd160"===t?i:"md5"===t?oh:e}(t),n="sha512"===t||"sha384"===t?128:64;e.length>n?e=r(e):e.length<n&&(e=ah.concat([e,dh],n));for(var o=ah.allocUnsafe(n+ch[t]),s=ah.allocUnsafe(n+ch[t]),h=0;h<n;h++)o[h]=54^e[h],s[h]=92^e[h];var a=ah.allocUnsafe(n+i+4);o.copy(a,0,0,n),this.ipad1=a,this.ipad2=o,this.opad=s,this.alg=t,this.blocksize=n,this.hash=r,this.size=ch[t]}ph.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)};var mh,gh,vh=function(t,e,i,r,n){uh(i,r);var o=new ph(n=n||"sha1",t=lh(t,fh,"Password"),(e=lh(e,fh,"Salt")).length),s=ah.allocUnsafe(r),h=ah.allocUnsafe(e.length+4);e.copy(h,0,0,e.length);for(var a=0,u=ch[n],f=Math.ceil(r/u),l=1;l<=f;l++){h.writeUInt32BE(l,e.length);for(var d=o.run(h,o.ipad1),c=d,p=1;p<i;p++){c=o.run(c,o.ipad2);for(var m=0;m<u;m++)d[m]^=c[m]}d.copy(s,a),a+=u}return s},bh=Re.Buffer,yh=eh,wh=ih,Mh=vh,_h=nh,Sh=Tt.crypto&&Tt.crypto.subtle,Eh={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},Ah=[];function kh(){return gh||(gh=Tt.process&&Tt.process.nextTick?Tt.process.nextTick:Tt.queueMicrotask?Tt.queueMicrotask:Tt.setImmediate?Tt.setImmediate:Tt.setTimeout)}function Rh(t,e,i,r,n){return Sh.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return Sh.deriveBits({name:"PBKDF2",salt:e,iterations:i,hash:{name:n}},t,r<<3)})).then((function(t){return bh.from(t)}))}$s.pbkdf2=function(t,e,i,r,n,o){"function"==typeof n&&(o=n,n=void 0);var s=Eh[(n=n||"sha1").toLowerCase()];if(s&&"function"==typeof Tt.Promise){if(yh(i,r),t=_h(t,wh,"Password"),e=_h(e,wh,"Salt"),"function"!=typeof o)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){kh()((function(){e(null,t)}))}),(function(t){kh()((function(){e(t)}))}))}(function(t){if(Tt.process&&!Tt.process.browser)return Promise.resolve(!1);if(!Sh||!Sh.importKey||!Sh.deriveBits)return Promise.resolve(!1);if(void 0!==Ah[t])return Ah[t];var e=Rh(mh=mh||bh.alloc(8),mh,10,128,t).then((function(){return!0})).catch((function(){return!1}));return Ah[t]=e,e}(s).then((function(o){return o?Rh(t,e,i,r,s):Mh(t,e,i,r,n)})),o)}else kh()((function(){var s;try{s=Mh(t,e,i,r,n)}catch(t){return o(t)}o(null,s)}))},$s.pbkdf2Sync=vh;var Ih={},Oh={},Th={readUInt32BE:function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},writeUInt32BE:function(t,e,i){t[0+i]=e>>>24,t[1+i]=e>>>16&255,t[2+i]=e>>>8&255,t[3+i]=255&e},ip:function(t,e,i,r){for(var n=0,o=0,s=6;s>=0;s-=2){for(var h=0;h<=24;h+=8)n<<=1,n|=e>>>h+s&1;for(h=0;h<=24;h+=8)n<<=1,n|=t>>>h+s&1}for(s=6;s>=0;s-=2){for(h=1;h<=25;h+=8)o<<=1,o|=e>>>h+s&1;for(h=1;h<=25;h+=8)o<<=1,o|=t>>>h+s&1}i[r+0]=n>>>0,i[r+1]=o>>>0},rip:function(t,e,i,r){for(var n=0,o=0,s=0;s<4;s++)for(var h=24;h>=0;h-=8)n<<=1,n|=e>>>h+s&1,n<<=1,n|=t>>>h+s&1;for(s=4;s<8;s++)for(h=24;h>=0;h-=8)o<<=1,o|=e>>>h+s&1,o<<=1,o|=t>>>h+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},pc1:function(t,e,i,r){for(var n=0,o=0,s=7;s>=5;s--){for(var h=0;h<=24;h+=8)n<<=1,n|=e>>h+s&1;for(h=0;h<=24;h+=8)n<<=1,n|=t>>h+s&1}for(h=0;h<=24;h+=8)n<<=1,n|=e>>h+s&1;for(s=1;s<=3;s++){for(h=0;h<=24;h+=8)o<<=1,o|=e>>h+s&1;for(h=0;h<=24;h+=8)o<<=1,o|=t>>h+s&1}for(h=0;h<=24;h+=8)o<<=1,o|=t>>h+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},r28shl:function(t,e){return t<<e&268435455|t>>>28-e}},Bh=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Th.pc2=function(t,e,i,r){for(var n=0,o=0,s=Bh.length>>>1,h=0;h<s;h++)n<<=1,n|=t>>>Bh[h]&1;for(h=s;h<Bh.length;h++)o<<=1,o|=e>>>Bh[h]&1;i[r+0]=n>>>0,i[r+1]=o>>>0},Th.expand=function(t,e,i){var r=0,n=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[i+0]=r>>>0,e[i+1]=n>>>0};var Ph=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Th.substitute=function(t,e){for(var i=0,r=0;r<4;r++){i<<=4,i|=Ph[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){i<<=4,i|=Ph[256+64*r+(e>>>18-6*r&63)]}return i>>>0};var Nh=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Th.permute=function(t){for(var e=0,i=0;i<Nh.length;i++)e<<=1,e|=t>>>Nh[i]&1;return e>>>0},Th.padSplit=function(t,e,i){for(var r=t.toString(2);r.length<e;)r="0"+r;for(var n=[],o=0;o<e;o+=i)n.push(r.slice(o,o+i));return n.join(" ")};var xh=Lh;function Lh(t,e){if(!t)throw new Error(e||"Assertion failed")}Lh.equal=function(t,e,i){if(t!=e)throw new Error(i||"Assertion failed: "+t+" != "+e)};var Dh=xh;function Ch(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}var qh=Ch;Ch.prototype._init=function(){},Ch.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},Ch.prototype._buffer=function(t,e){for(var i=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r<i;r++)this.buffer[this.bufferOff+r]=t[e+r];return this.bufferOff+=i,i},Ch.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},Ch.prototype._updateEncrypt=function(t){var e=0,i=0,r=(this.bufferOff+t.length)/this.blockSize|0,n=new Array(r*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(n,i)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,n,i),i+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return n},Ch.prototype._updateDecrypt=function(t){for(var e=0,i=0,r=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,n=new Array(r*this.blockSize);r>0;r--)e+=this._buffer(t,e),i+=this._flushBuffer(n,i);return e+=this._buffer(t,e),n},Ch.prototype.final=function(t){var e,i;return t&&(e=this.update(t)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(i):i},Ch.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},Ch.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},Ch.prototype._unpad=function(t){return t},Ch.prototype._finalDecrypt=function(){Dh.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)};var Uh=xh,jh=Th,zh=qh;function Fh(){this.tmp=new Array(2),this.keys=null}function Hh(t){zh.call(this,t);var e=new Fh;this._desState=e,this.deriveKeys(e,t.key)}xe(Hh,zh);var Kh=Hh;Hh.create=function(t){return new Hh(t)};var Gh=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Hh.prototype.deriveKeys=function(t,e){t.keys=new Array(32),Uh.equal(e.length,this.blockSize,"Invalid key length");var i=jh.readUInt32BE(e,0),r=jh.readUInt32BE(e,4);jh.pc1(i,r,t.tmp,0),i=t.tmp[0],r=t.tmp[1];for(var n=0;n<t.keys.length;n+=2){var o=Gh[n>>>1];i=jh.r28shl(i,o),r=jh.r28shl(r,o),jh.pc2(i,r,t.keys,n)}},Hh.prototype._update=function(t,e,i,r){var n=this._desState,o=jh.readUInt32BE(t,e),s=jh.readUInt32BE(t,e+4);jh.ip(o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,s,n.tmp,0):this._decrypt(n,o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],jh.writeUInt32BE(i,o,r),jh.writeUInt32BE(i,s,r+4)},Hh.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var i=t.length-e,r=e;r<t.length;r++)t[r]=i;return!0},Hh.prototype._unpad=function(t){if(!1===this.padding)return t;for(var e=t[t.length-1],i=t.length-e;i<t.length;i++)Uh.equal(t[i],e);return t.slice(0,t.length-e)},Hh.prototype._encrypt=function(t,e,i,r,n){for(var o=e,s=i,h=0;h<t.keys.length;h+=2){var a=t.keys[h],u=t.keys[h+1];jh.expand(s,t.tmp,0),a^=t.tmp[0],u^=t.tmp[1];var f=jh.substitute(a,u),l=s;s=(o^jh.permute(f))>>>0,o=l}jh.rip(s,o,r,n)},Hh.prototype._decrypt=function(t,e,i,r,n){for(var o=i,s=e,h=t.keys.length-2;h>=0;h-=2){var a=t.keys[h],u=t.keys[h+1];jh.expand(o,t.tmp,0),a^=t.tmp[0],u^=t.tmp[1];var f=jh.substitute(a,u),l=o;o=(s^jh.permute(f))>>>0,s=l}jh.rip(o,s,r,n)};var Yh={},Vh=xh,Zh=xe,Wh={};function Xh(t){Vh.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}Yh.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}Zh(e,t);for(var i=Object.keys(Wh),r=0;r<i.length;r++){var n=i[r];e.prototype[n]=Wh[n]}return e.create=function(t){return new e(t)},e},Wh._cbcInit=function(){var t=new Xh(this.options.iv);this._cbcState=t},Wh._update=function(t,e,i,r){var n=this._cbcState,o=this.constructor.super_.prototype,s=n.iv;if("encrypt"===this.type){for(var h=0;h<this.blockSize;h++)s[h]^=t[e+h];o._update.call(this,s,0,i,r);for(h=0;h<this.blockSize;h++)s[h]=i[r+h]}else{o._update.call(this,t,e,i,r);for(h=0;h<this.blockSize;h++)i[r+h]^=s[h];for(h=0;h<this.blockSize;h++)s[h]=t[e+h]}};var Qh=xh,Jh=qh,$h=Kh;function ta(t,e){Qh.equal(e.length,24,"Invalid key length");var i=e.slice(0,8),r=e.slice(8,16),n=e.slice(16,24);this.ciphers="encrypt"===t?[$h.create({type:"encrypt",key:i}),$h.create({type:"decrypt",key:r}),$h.create({type:"encrypt",key:n})]:[$h.create({type:"decrypt",key:n}),$h.create({type:"encrypt",key:r}),$h.create({type:"decrypt",key:i})]}function ea(t){Jh.call(this,t);var e=new ta(this.type,this.options.key);this._edeState=e}xe(ea,Jh);var ia=ea;ea.create=function(t){return new ea(t)},ea.prototype._update=function(t,e,i,r){var n=this._edeState;n.ciphers[0]._update(t,e,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r)},ea.prototype._pad=$h.prototype._pad,ea.prototype._unpad=$h.prototype._unpad,Oh.utils=Th,Oh.Cipher=qh,Oh.DES=Kh,Oh.CBC=Yh,Oh.EDE=ia;var ra=Es,na=Oh,oa=xe,sa=Re.Buffer,ha={"des-ede3-cbc":na.CBC.instantiate(na.EDE),"des-ede3":na.EDE,"des-ede-cbc":na.CBC.instantiate(na.EDE),"des-ede":na.EDE,"des-cbc":na.CBC.instantiate(na.DES),"des-ecb":na.DES};ha.des=ha["des-cbc"],ha.des3=ha["des-ede3-cbc"];var aa=ua;function ua(t){ra.call(this);var e,i=t.mode.toLowerCase(),r=ha[i];e=t.decrypt?"decrypt":"encrypt";var n=t.key;sa.isBuffer(n)||(n=sa.from(n)),"des-ede"!==i&&"des-ede-cbc"!==i||(n=sa.concat([n,n.slice(0,8)]));var o=t.iv;sa.isBuffer(o)||(o=sa.from(o)),this._des=r.create({key:n,iv:o,type:e})}oa(ua,ra),ua.prototype._update=function(t){return sa.from(this._des.update(t))},ua.prototype._final=function(){return sa.from(this._des.final())};var fa={},la={},da={encrypt:function(t,e){return t._cipher.encryptBlock(e)},decrypt:function(t,e){return t._cipher.decryptBlock(e)}},ca={},pa=function(t,e){for(var i=Math.min(t.length,e.length),r=new K(i),n=0;n<i;++n)r[n]=t[n]^e[n];return r},ma=pa;ca.encrypt=function(t,e){var i=ma(e,t._prev);return t._prev=t._cipher.encryptBlock(i),t._prev},ca.decrypt=function(t,e){var i=t._prev;t._prev=e;var r=t._cipher.decryptBlock(e);return ma(r,i)};var ga={},va=Re.Buffer,ba=pa;function ya(t,e,i){var r=e.length,n=ba(e,t._cache);return t._cache=t._cache.slice(r),t._prev=va.concat([t._prev,i?e:n]),n}ga.encrypt=function(t,e,i){for(var r,n=va.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=va.allocUnsafe(0)),!(t._cache.length<=e.length)){n=va.concat([n,ya(t,e,i)]);break}r=t._cache.length,n=va.concat([n,ya(t,e.slice(0,r),i)]),e=e.slice(r)}return n};var wa={},Ma=Re.Buffer;function _a(t,e,i){var r=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=Ma.concat([t._prev.slice(1),Ma.from([i?e:r])]),r}wa.encrypt=function(t,e,i){for(var r=e.length,n=Ma.allocUnsafe(r),o=-1;++o<r;)n[o]=_a(t,e[o],i);return n};var Sa={},Ea=Re.Buffer;function Aa(t,e,i){for(var r,n,o=-1,s=0;++o<8;)r=e&1<<7-o?128:0,s+=(128&(n=t._cipher.encryptBlock(t._prev)[0]^r))>>o%8,t._prev=ka(t._prev,i?r:n);return s}function ka(t,e){var i=t.length,r=-1,n=Ea.allocUnsafe(t.length);for(t=Ea.concat([t,Ea.from([e])]);++r<i;)n[r]=t[r]<<1|t[r+1]>>7;return n}Sa.encrypt=function(t,e,i){for(var r=e.length,n=Ea.allocUnsafe(r),o=-1;++o<r;)n[o]=Aa(t,e[o],i);return n};var Ra={},Ia=pa;function Oa(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}Ra.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=K.concat([t._cache,Oa(t)]);var i=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),Ia(e,i)};var Ta={};var Ba=function(t){for(var e,i=t.length;i--;){if(255!==(e=t.readUInt8(i))){e++,t.writeUInt8(e,i);break}t.writeUInt8(0,i)}},Pa=pa,Na=Re.Buffer,xa=Ba;function La(t){var e=t._cipher.encryptBlockRaw(t._prev);return xa(t._prev),e}Ta.encrypt=function(t,e){var i=Math.ceil(e.length/16),r=t._cache.length;t._cache=Na.concat([t._cache,Na.allocUnsafe(16*i)]);for(var n=0;n<i;n++){var o=La(t),s=r+16*n;t._cache.writeUInt32BE(o[0],s+0),t._cache.writeUInt32BE(o[1],s+4),t._cache.writeUInt32BE(o[2],s+8),t._cache.writeUInt32BE(o[3],s+12)}var h=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),Pa(e,h)};var Da={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},Ca={ECB:da,CBC:ca,CFB:ga,CFB8:wa,CFB1:Sa,OFB:Ra,CTR:Ta,GCM:Ta},qa=Da;for(var Ua in qa)qa[Ua].module=Ca[qa[Ua].mode];var ja=qa,za={},Fa=Re.Buffer;function Ha(t){Fa.isBuffer(t)||(t=Fa.from(t));for(var e=t.length/4|0,i=new Array(e),r=0;r<e;r++)i[r]=t.readUInt32BE(4*r);return i}function Ka(t){for(;0<t.length;t++)t[0]=0}function Ga(t,e,i,r,n){for(var o,s,h,a,u=i[0],f=i[1],l=i[2],d=i[3],c=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],g=t[3]^e[3],v=4,b=1;b<n;b++)o=u[c>>>24]^f[p>>>16&255]^l[m>>>8&255]^d[255&g]^e[v++],s=u[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^d[255&c]^e[v++],h=u[m>>>24]^f[g>>>16&255]^l[c>>>8&255]^d[255&p]^e[v++],a=u[g>>>24]^f[c>>>16&255]^l[p>>>8&255]^d[255&m]^e[v++],c=o,p=s,m=h,g=a;return o=(r[c>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^e[v++],s=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&c])^e[v++],h=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[c>>>8&255]<<8|r[255&p])^e[v++],a=(r[g>>>24]<<24|r[c>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[v++],[o>>>=0,s>>>=0,h>>>=0,a>>>=0]}var Ya=[0,1,2,4,8,16,32,64,128,27,54],Va=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var i=[],r=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,h=0,a=0;a<256;++a){var u=h^h<<1^h<<2^h<<3^h<<4;u=u>>>8^255&u^99,i[s]=u,r[u]=s;var f=t[s],l=t[f],d=t[l],c=257*t[u]^16843008*u;n[0][s]=c<<24|c>>>8,n[1][s]=c<<16|c>>>16,n[2][s]=c<<8|c>>>24,n[3][s]=c,c=16843009*d^65537*l^257*f^16843008*s,o[0][u]=c<<24|c>>>8,o[1][u]=c<<16|c>>>16,o[2][u]=c<<8|c>>>24,o[3][u]=c,0===s?s=h=1:(s=f^t[t[t[d^f]]],h^=t[t[h]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:o}}();function Za(t){this._key=Ha(t),this._reset()}Za.blockSize=16,Za.keySize=32,Za.prototype.blockSize=Za.blockSize,Za.prototype.keySize=Za.keySize,Za.prototype._reset=function(){for(var t=this._key,e=t.length,i=e+6,r=4*(i+1),n=[],o=0;o<e;o++)n[o]=t[o];for(o=e;o<r;o++){var s=n[o-1];o%e==0?(s=s<<8|s>>>24,s=Va.SBOX[s>>>24]<<24|Va.SBOX[s>>>16&255]<<16|Va.SBOX[s>>>8&255]<<8|Va.SBOX[255&s],s^=Ya[o/e|0]<<24):e>6&&o%e==4&&(s=Va.SBOX[s>>>24]<<24|Va.SBOX[s>>>16&255]<<16|Va.SBOX[s>>>8&255]<<8|Va.SBOX[255&s]),n[o]=n[o-e]^s}for(var h=[],a=0;a<r;a++){var u=r-a,f=n[u-(a%4?0:4)];h[a]=a<4||u<=4?f:Va.INV_SUB_MIX[0][Va.SBOX[f>>>24]]^Va.INV_SUB_MIX[1][Va.SBOX[f>>>16&255]]^Va.INV_SUB_MIX[2][Va.SBOX[f>>>8&255]]^Va.INV_SUB_MIX[3][Va.SBOX[255&f]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=h},Za.prototype.encryptBlockRaw=function(t){return Ga(t=Ha(t),this._keySchedule,Va.SUB_MIX,Va.SBOX,this._nRounds)},Za.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),i=Fa.allocUnsafe(16);return i.writeUInt32BE(e[0],0),i.writeUInt32BE(e[1],4),i.writeUInt32BE(e[2],8),i.writeUInt32BE(e[3],12),i},Za.prototype.decryptBlock=function(t){var e=(t=Ha(t))[1];t[1]=t[3],t[3]=e;var i=Ga(t,this._invKeySchedule,Va.INV_SUB_MIX,Va.INV_SBOX,this._nRounds),r=Fa.allocUnsafe(16);return r.writeUInt32BE(i[0],0),r.writeUInt32BE(i[3],4),r.writeUInt32BE(i[2],8),r.writeUInt32BE(i[1],12),r},Za.prototype.scrub=function(){Ka(this._keySchedule),Ka(this._invKeySchedule),Ka(this._key)},za.AES=Za;var Wa=Re.Buffer,Xa=Wa.alloc(16,0);function Qa(t){var e=Wa.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function Ja(t){this.h=t,this.state=Wa.alloc(16,0),this.cache=Wa.allocUnsafe(0)}Ja.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},Ja.prototype._multiply=function(){for(var t,e,i,r=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],n=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),i=0!=(1&r[3]),e=3;e>0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=Qa(n)},Ja.prototype.update=function(t){var e;for(this.cache=Wa.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},Ja.prototype.final=function(t,e){return this.cache.length&&this.ghash(Wa.concat([this.cache,Xa],16)),this.ghash(Qa([0,t,0,e])),this.state};var $a=Ja,tu=za,eu=Re.Buffer,iu=Es,ru=$a,nu=pa,ou=Ba;function su(t,e,i,r){iu.call(this);var n=eu.alloc(4,0);this._cipher=new tu.AES(e);var o=this._cipher.encryptBlock(n);this._ghash=new ru(o),i=function(t,e,i){if(12===e.length)return t._finID=eu.concat([e,eu.from([0,0,0,1])]),eu.concat([e,eu.from([0,0,0,2])]);var r=new ru(i),n=e.length,o=n%16;r.update(e),o&&(o=16-o,r.update(eu.alloc(o,0))),r.update(eu.alloc(8,0));var s=8*n,h=eu.alloc(8);h.writeUIntBE(s,0,8),r.update(h),t._finID=r.state;var a=eu.from(t._finID);return ou(a),a}(this,i,o),this._prev=eu.from(i),this._cache=eu.allocUnsafe(0),this._secCache=eu.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}xe(su,iu),su.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=eu.alloc(e,0),this._ghash.update(e))}this._called=!0;var i=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(i),this._len+=t.length,i},su.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=nu(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var i=0;t.length!==e.length&&i++;for(var r=Math.min(t.length,e.length),n=0;n<r;++n)i+=t[n]^e[n];return i}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},su.prototype.getAuthTag=function(){if(this._decrypt||!eu.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},su.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},su.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length};var hu=su,au=za,uu=Re.Buffer,fu=Es;function lu(t,e,i,r){fu.call(this),this._cipher=new au.AES(e),this._prev=uu.from(i),this._cache=uu.allocUnsafe(0),this._secCache=uu.allocUnsafe(0),this._decrypt=r,this._mode=t}xe(lu,fu),lu.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},lu.prototype._final=function(){this._cipher.scrub()};var du=lu,cu=Re.Buffer,pu=Vr;var mu=function(t,e,i,r){if(cu.isBuffer(t)||(t=cu.from(t,"binary")),e&&(cu.isBuffer(e)||(e=cu.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=i/8,o=cu.alloc(n),s=cu.alloc(r||0),h=cu.alloc(0);n>0||r>0;){var a=new pu;a.update(h),a.update(t),e&&a.update(e),h=a.digest();var u=0;if(n>0){var f=o.length-n;u=Math.min(n,h.length),h.copy(o,f,0,u),n-=u}if(u<h.length&&r>0){var l=s.length-r,d=Math.min(r,h.length-u);h.copy(s,l,u,u+d),r-=d}}return h.fill(0),{key:o,iv:s}},gu=ja,vu=hu,bu=Re.Buffer,yu=du,wu=Es,Mu=za,_u=mu;function Su(t,e,i){wu.call(this),this._cache=new Au,this._cipher=new Mu.AES(e),this._prev=bu.from(i),this._mode=t,this._autopadding=!0}xe(Su,wu),Su.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get();)i=this._mode.encrypt(this,e),r.push(i);return bu.concat(r)};var Eu=bu.alloc(16,16);function Au(){this.cache=bu.allocUnsafe(0)}function ku(t,e,i){var r=gu[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=bu.from(e)),e.length!==r.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof i&&(i=bu.from(i)),"GCM"!==r.mode&&i.length!==r.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===r.type?new yu(r.module,e,i):"auth"===r.type?new vu(r.module,e,i):new Su(r.module,e,i)}Su.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(Eu))throw this._cipher.scrub(),new Error("data not multiple of block length")},Su.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},Au.prototype.add=function(t){this.cache=bu.concat([this.cache,t])},Au.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},Au.prototype.flush=function(){for(var t=16-this.cache.length,e=bu.allocUnsafe(t),i=-1;++i<t;)e.writeUInt8(t,i);return bu.concat([this.cache,e])},la.createCipheriv=ku,la.createCipher=function(t,e){var i=gu[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=_u(e,!1,i.key,i.iv);return ku(t,r.key,r.iv)};var Ru={},Iu=hu,Ou=Re.Buffer,Tu=ja,Bu=du,Pu=Es,Nu=za,xu=mu;function Lu(t,e,i){Pu.call(this),this._cache=new Du,this._last=void 0,this._cipher=new Nu.AES(e),this._prev=Ou.from(i),this._mode=t,this._autopadding=!0}function Du(){this.cache=Ou.allocUnsafe(0)}function Cu(t,e,i){var r=Tu[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=Ou.from(i)),"GCM"!==r.mode&&i.length!==r.iv)throw new TypeError("invalid iv length "+i.length);if("string"==typeof e&&(e=Ou.from(e)),e.length!==r.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===r.type?new Bu(r.module,e,i,!0):"auth"===r.type?new Iu(r.module,e,i,!0):new Lu(r.module,e,i)}xe(Lu,Pu),Lu.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,e),r.push(i);return Ou.concat(r)},Lu.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var i=-1;for(;++i<e;)if(t[i+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},Lu.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},Du.prototype.add=function(t){this.cache=Ou.concat([this.cache,t])},Du.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},Du.prototype.flush=function(){if(this.cache.length)return this.cache},Ru.createDecipher=function(t,e){var i=Tu[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=xu(e,!1,i.key,i.iv);return Cu(t,r.key,r.iv)},Ru.createDecipheriv=Cu;var qu=la,Uu=Ru,ju=Da;fa.createCipher=fa.Cipher=qu.createCipher,fa.createCipheriv=fa.Cipheriv=qu.createCipheriv,fa.createDecipher=fa.Decipher=Uu.createDecipher,fa.createDecipheriv=fa.Decipheriv=Uu.createDecipheriv,fa.listCiphers=fa.getCiphers=function(){return Object.keys(ju)};var zu={};!function(t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}}(zu);var Fu=aa,Hu=fa,Ku=ja,Gu=zu,Yu=mu;function Vu(t,e,i){if(t=t.toLowerCase(),Ku[t])return Hu.createCipheriv(t,e,i);if(Gu[t])return new Fu({key:e,iv:i,mode:t});throw new TypeError("invalid suite type")}function Zu(t,e,i){if(t=t.toLowerCase(),Ku[t])return Hu.createDecipheriv(t,e,i);if(Gu[t])return new Fu({key:e,iv:i,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}Ih.createCipher=Ih.Cipher=function(t,e){var i,r;if(t=t.toLowerCase(),Ku[t])i=Ku[t].key,r=Ku[t].iv;else{if(!Gu[t])throw new TypeError("invalid suite type");i=8*Gu[t].key,r=Gu[t].iv}var n=Yu(e,!1,i,r);return Vu(t,n.key,n.iv)},Ih.createCipheriv=Ih.Cipheriv=Vu,Ih.createDecipher=Ih.Decipher=function(t,e){var i,r;if(t=t.toLowerCase(),Ku[t])i=Ku[t].key,r=Ku[t].iv;else{if(!Gu[t])throw new TypeError("invalid suite type");i=8*Gu[t].key,r=Gu[t].iv}var n=Yu(e,!1,i,r);return Zu(t,n.key,n.iv)},Ih.createDecipheriv=Ih.Decipheriv=Zu,Ih.listCiphers=Ih.getCiphers=function(){return Object.keys(Gu).concat(Hu.getCiphers())};var Wu={},Xu={},Qu={get exports(){return Xu},set exports(t){Xu=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Qu,Tt);var Ju={},$u={get exports(){return Ju},set exports(t){Ju=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}($u,Tt);var tf,ef,rf,nf,of,sf={},hf={get exports(){return sf},set exports(t){sf=t}};function af(){if(tf)return sf;var t;function e(t){this.rand=t}if(tf=1,hf.exports=function(i){return t||(t=new e(null)),t.generate(i)},sf.Rand=e,e.prototype.generate=function(t){return this._rand(t)},e.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),i=0;i<e.length;i++)e[i]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(e.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var i=jg();if("function"!=typeof i.randomBytes)throw new Error("Not supported");e.prototype._rand=function(t){return i.randomBytes(t)}}catch(t){}return sf}function uf(){if(rf)return ef;rf=1;var t=Ju,e=af();function i(t){this.rand=t||new e.Rand}return ef=i,i.create=function(t){return new i(t)},i.prototype._randbelow=function(e){var i=e.bitLength(),r=Math.ceil(i/8);do{var n=new t(this.rand.generate(r))}while(n.cmp(e)>=0);return n},i.prototype._randrange=function(t,e){var i=e.sub(t);return t.add(this._randbelow(i))},i.prototype.test=function(e,i,r){var n=e.bitLength(),o=t.mont(e),s=new t(1).toRed(o);i||(i=Math.max(1,n/48|0));for(var h=e.subn(1),a=0;!h.testn(a);a++);for(var u=e.shrn(a),f=h.toRed(o);i>0;i--){var l=this._randrange(new t(2),h);r&&r(l);var d=l.toRed(o).redPow(u);if(0!==d.cmp(s)&&0!==d.cmp(f)){for(var c=1;c<a;c++){if(0===(d=d.redSqr()).cmp(s))return!1;if(0===d.cmp(f))break}if(c===a)return!1}}return!0},i.prototype.getDivisor=function(e,i){var r=e.bitLength(),n=t.mont(e),o=new t(1).toRed(n);i||(i=Math.max(1,r/48|0));for(var s=e.subn(1),h=0;!s.testn(h);h++);for(var a=e.shrn(h),u=s.toRed(n);i>0;i--){var f=this._randrange(new t(2),s),l=e.gcd(f);if(0!==l.cmpn(1))return l;var d=f.toRed(n).redPow(a);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var c=1;c<h;c++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(e);if(0===d.cmp(u))break}if(c===h)return(d=d.redSqr()).fromRed().subn(1).gcd(e)}}return!1},ef}function ff(){if(of)return nf;of=1;var t=Ae;nf=m,m.simpleSieve=c,m.fermatTest=p;var e=Xu,i=new e(24),r=new(uf()),n=new e(1),o=new e(2),s=new e(5);new e(16),new e(8);var h=new e(10),a=new e(3);new e(7);var u=new e(11),f=new e(4);new e(12);var l=null;function d(){if(null!==l)return l;var t=[];t[0]=2;for(var e=1,i=3;i<1048576;i+=2){for(var r=Math.ceil(Math.sqrt(i)),n=0;n<e&&t[n]<=r&&i%t[n]!=0;n++);e!==n&&t[n]<=r||(t[e++]=i)}return l=t,t}function c(t){for(var e=d(),i=0;i<e.length;i++)if(0===t.modn(e[i]))return 0===t.cmpn(e[i]);return!0}function p(t){var i=e.mont(t);return 0===o.toRed(i).redPow(t.subn(1)).fromRed().cmpn(1)}function m(l,d){if(l<16)return new e(2===d||5===d?[140,123]:[140,39]);var m,g;for(d=new e(d);;){for(m=new e(t(Math.ceil(l/8)));m.bitLength()>l;)m.ishrn(1);if(m.isEven()&&m.iadd(n),m.testn(1)||m.iadd(o),d.cmp(o)){if(!d.cmp(s))for(;m.mod(h).cmp(a);)m.iadd(f)}else for(;m.mod(i).cmp(u);)m.iadd(f);if(c(g=m.shrn(1))&&c(m)&&p(g)&&p(m)&&r.test(g)&&r.test(m))return m}}return nf}var lf,df,cf,pf={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};function mf(){if(df)return lf;df=1;var t=Xu,e=new(uf()),i=new t(24),r=new t(11),n=new t(10),o=new t(3),s=new t(7),h=ff(),a=Ae;function u(e,i){return i=i||"utf8",K.isBuffer(e)||(e=new K(e,i)),this._pub=new t(e),this}function f(e,i){return i=i||"utf8",K.isBuffer(e)||(e=new K(e,i)),this._priv=new t(e),this}lf=d;var l={};function d(e,i,r){this.setGenerator(i),this.__prime=new t(e),this._prime=t.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=u,this.setPrivateKey=f):this._primeCode=8}function c(t,e){var i=new K(t.toArray());return e?i.toString(e):i}return Object.defineProperty(d.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,a){var u=a.toString("hex"),f=[u,t.toString(16)].join("_");if(f in l)return l[f];var d,c=0;if(t.isEven()||!h.simpleSieve||!h.fermatTest(t)||!e.test(t))return c+=1,c+="02"===u||"05"===u?8:4,l[f]=c,c;switch(e.test(t.shrn(1))||(c+=2),u){case"02":t.mod(i).cmp(r)&&(c+=8);break;case"05":(d=t.mod(n)).cmp(o)&&d.cmp(s)&&(c+=8);break;default:c+=4}return l[f]=c,c}(this.__prime,this.__gen)),this._primeCode}}),d.prototype.generateKeys=function(){return this._priv||(this._priv=new t(a(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},d.prototype.computeSecret=function(e){var i=new K((e=(e=new t(e)).toRed(this._prime)).redPow(this._priv).fromRed().toArray()),r=this.getPrime();if(i.length<r.length){var n=new K(r.length-i.length);n.fill(0),i=K.concat([n,i])}return i},d.prototype.getPublicKey=function(t){return c(this._pub,t)},d.prototype.getPrivateKey=function(t){return c(this._priv,t)},d.prototype.getPrime=function(t){return c(this.__prime,t)},d.prototype.getGenerator=function(t){return c(this._gen,t)},d.prototype.setGenerator=function(e,i){return i=i||"utf8",K.isBuffer(e)||(e=new K(e,i)),this.__gen=e,this._gen=new t(e),this},lf}var gf={},vf={get exports(){return gf},set exports(t){gf=t}},bf={},yf={get exports(){return bf},set exports(t){bf=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+t)}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,r,n){for(var o=0,s=0,h=Math.min(t.length,r),a=e;a<h;a++){var u=t.charCodeAt(a)-48;o*=n,s=u>=49?u-49+10:u>=17?u-17+10:u,i(u>=0&&s<n,"Invalid character"),o+=s}return o}function u(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this._strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype._move=function(t){u(t,this)},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(t){n.prototype.inspect=f}else n.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i._strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);o=h>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==o||s!==this.length-1?l[6-a.length]+a+r:a+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],f=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(f).toString(t);r=(p=p.idivn(f)).isZero()?m+r:l[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,n),s},n.prototype._toArrayLikeLE=function(t,e){for(var i=0,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;t[i++]=255&s,i<t.length&&(t[i++]=s>>8&255),i<t.length&&(t[i++]=s>>16&255),6===o?(i<t.length&&(t[i++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i<t.length)for(t[i++]=r;i<t.length;)t[i++]=0},n.prototype._toArrayLikeBE=function(t,e){for(var i=t.length-1,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;t[i--]=255&s,i>=0&&(t[i--]=s>>8&255),i>=0&&(t[i--]=s>>16&255),6===o?(i>=0&&(t[i--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i>=0)for(t[i--]=r;i>=0;)t[i--]=0},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this._strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var m=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function g(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i._strip()}function v(t,e,i){return g(t,e,i)}Math.imul||(m=p),n.prototype.mulTo=function(t,e){var i=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):i<63?p(this,t,e):i<1024?g(this,t,e):v(this,t,e)},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),v(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i("number"==typeof t),i(t<67108864);for(var r=0,n=0;n<this.length;n++){var o=(0|this.words[n])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[n]=67108863&s}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=t.words[r]>>>n&1}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this._strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this._strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this._strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h._strip(),r._strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modrn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%t;return e?-n:n},n.prototype.modn=function(t){return this.modrn(t)},n.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new E(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},r(w,y),w.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},w.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(M,y),r(_,y),r(S,y),S.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new M;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return b[t]=e,e},E.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new A(t)},r(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(yf,Tt);var wf=bf,Mf=Ae;function _f(t){var e,i=t.modulus.byteLength();do{e=new wf(Mf(i))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function Sf(t,e){var i=function(t){var e=_f(t);return{blinder:e.toRed(wf.mont(t.modulus)).redPow(new wf(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),r=e.modulus.byteLength(),n=new wf(t).mul(i.blinder).umod(e.modulus),o=n.toRed(wf.mont(e.prime1)),s=n.toRed(wf.mont(e.prime2)),h=e.coefficient,a=e.prime1,u=e.prime2,f=o.redPow(e.exponent1).fromRed(),l=s.redPow(e.exponent2).fromRed(),d=f.isub(l).imul(h).umod(a).imul(u);return l.iadd(d).imul(i.unblinder).umod(e.modulus).toArrayLike(K,"be",r)}Sf.getr=_f;var Ef=Sf,Af={};var kf={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}},Rf={},If={},Of={get exports(){return If},set exports(t){If=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Of,Tt);var Tf={};!function(t){var e=Tf;function i(t){return 1===t.length?"0"+t:t}function r(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"!=typeof t){for(var r=0;r<t.length;r++)i[r]=0|t[r];return i}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(r=0;r<t.length;r+=2)i.push(parseInt(t[r]+t[r+1],16))}else for(r=0;r<t.length;r++){var n=t.charCodeAt(r),o=n>>8,s=255&n;o?i.push(o,s):i.push(s)}return i},e.zero2=i,e.toHex=r,e.encode=function(t,e){return"hex"===e?r(t):t}}(),function(t){var e=Rf,i=If,r=xh,n=Tf;e.assert=r,e.toArray=n.toArray,e.zero2=n.zero2,e.toHex=n.toHex,e.encode=n.encode,e.getNAF=function(t,e,i){var r=new Array(Math.max(t.bitLength(),i)+1);r.fill(0);for(var n=1<<e+1,o=t.clone(),s=0;s<r.length;s++){var h,a=o.andln(n-1);o.isOdd()?(h=a>(n>>1)-1?(n>>1)-a:a,o.isubn(h)):h=0,r[s]=h,o.iushrn(1)}return r},e.getJSF=function(t,e){var i=[[],[]];t=t.clone(),e=e.clone();for(var r,n=0,o=0;t.cmpn(-n)>0||e.cmpn(-o)>0;){var s,h,a=t.andln(3)+n&3,u=e.andln(3)+o&3;3===a&&(a=-1),3===u&&(u=-1),s=0==(1&a)?0:3!==(r=t.andln(7)+n&7)&&5!==r||2!==u?a:-a,i[0].push(s),h=0==(1&u)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==a?u:-u,i[1].push(h),2*n===s+1&&(n=1-n),2*o===h+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return i},e.cachedProperty=function(t,e,i){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(t){return new i(t,"hex","le")}}();var Bf={},Pf=If,Nf=Rf,xf=Nf.getNAF,Lf=Nf.getJSF,Df=Nf.assert;function Cf(t,e){this.type=t,this.p=new Pf(e.p,16),this.red=e.prime?Pf.red(e.prime):Pf.mont(this.p),this.zero=new Pf(0).toRed(this.red),this.one=new Pf(1).toRed(this.red),this.two=new Pf(2).toRed(this.red),this.n=e.n&&new Pf(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var qf=Cf;function Uf(t,e){this.curve=t,this.type=e,this.precomputed=null}Cf.prototype.point=function(){throw new Error("Not implemented")},Cf.prototype.validate=function(){throw new Error("Not implemented")},Cf.prototype._fixedNafMul=function(t,e){Df(t.precomputed);var i=t._getDoubles(),r=xf(e,1,this._bitLength),n=(1<<i.step+1)-(i.step%2==0?2:1);n/=3;var o,s,h=[];for(o=0;o<r.length;o+=i.step){s=0;for(var a=o+i.step-1;a>=o;a--)s=(s<<1)+r[a];h.push(s)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=n;l>0;l--){for(o=0;o<h.length;o++)(s=h[o])===l?f=f.mixedAdd(i.points[o]):s===-l&&(f=f.mixedAdd(i.points[o].neg()));u=u.add(f)}return u.toP()},Cf.prototype._wnafMul=function(t,e){var i=4,r=t._getNAFPoints(i);i=r.wnd;for(var n=r.points,o=xf(e,i,this._bitLength),s=this.jpoint(null,null,null),h=o.length-1;h>=0;h--){for(var a=0;h>=0&&0===o[h];h--)a++;if(h>=0&&a++,s=s.dblp(a),h<0)break;var u=o[h];Df(0!==u),s="affine"===t.type?u>0?s.mixedAdd(n[u-1>>1]):s.mixedAdd(n[-u-1>>1].neg()):u>0?s.add(n[u-1>>1]):s.add(n[-u-1>>1].neg())}return"affine"===t.type?s.toP():s},Cf.prototype._wnafMulAdd=function(t,e,i,r,n){var o,s,h,a=this._wnafT1,u=this._wnafT2,f=this._wnafT3,l=0;for(o=0;o<r;o++){var d=(h=e[o])._getNAFPoints(t);a[o]=d.wnd,u[o]=d.points}for(o=r-1;o>=1;o-=2){var c=o-1,p=o;if(1===a[c]&&1===a[p]){var m=[e[c],null,null,e[p]];0===e[c].y.cmp(e[p].y)?(m[1]=e[c].add(e[p]),m[2]=e[c].toJ().mixedAdd(e[p].neg())):0===e[c].y.cmp(e[p].y.redNeg())?(m[1]=e[c].toJ().mixedAdd(e[p]),m[2]=e[c].add(e[p].neg())):(m[1]=e[c].toJ().mixedAdd(e[p]),m[2]=e[c].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=Lf(i[c],i[p]);for(l=Math.max(v[0].length,l),f[c]=new Array(l),f[p]=new Array(l),s=0;s<l;s++){var b=0|v[0][s],y=0|v[1][s];f[c][s]=g[3*(b+1)+(y+1)],f[p][s]=0,u[c]=m}}else f[c]=xf(i[c],a[c],this._bitLength),f[p]=xf(i[p],a[p],this._bitLength),l=Math.max(f[c].length,l),l=Math.max(f[p].length,l)}var w=this.jpoint(null,null,null),M=this._wnafT4;for(o=l;o>=0;o--){for(var _=0;o>=0;){var S=!0;for(s=0;s<r;s++)M[s]=0|f[s][o],0!==M[s]&&(S=!1);if(!S)break;_++,o--}if(o>=0&&_++,w=w.dblp(_),o<0)break;for(s=0;s<r;s++){var E=M[s];0!==E&&(E>0?h=u[s][E-1>>1]:E<0&&(h=u[s][-E-1>>1].neg()),w="affine"===h.type?w.mixedAdd(h):w.add(h))}}for(o=0;o<r;o++)u[o]=null;return n?w:w.toP()},Cf.BasePoint=Uf,Uf.prototype.eq=function(){throw new Error("Not implemented")},Uf.prototype.validate=function(){return this.curve.validate(this)},Cf.prototype.decodePoint=function(t,e){t=Nf.toArray(t,e);var i=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*i)return 6===t[0]?Df(t[t.length-1]%2==0):7===t[0]&&Df(t[t.length-1]%2==1),this.point(t.slice(1,1+i),t.slice(1+i,1+2*i));if((2===t[0]||3===t[0])&&t.length-1===i)return this.pointFromX(t.slice(1,1+i),3===t[0]);throw new Error("Unknown point format")},Uf.prototype.encodeCompressed=function(t){return this.encode(t,!0)},Uf.prototype._encode=function(t){var e=this.curve.p.byteLength(),i=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",e))},Uf.prototype.encode=function(t,e){return Nf.encode(this._encode(e),t)},Uf.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},Uf.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},Uf.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n<e;n+=t){for(var o=0;o<t;o++)r=r.dbl();i.push(r)}return{step:t,points:i}},Uf.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],i=(1<<t)-1,r=1===i?null:this.dbl(),n=1;n<i;n++)e[n]=e[n-1].add(r);return{wnd:t,points:e}},Uf.prototype._getBeta=function(){return null},Uf.prototype.dblp=function(t){for(var e=this,i=0;i<t;i++)e=e.dbl();return e};var jf=If,zf=xe,Ff=qf,Hf=Rf.assert;function Kf(t){Ff.call(this,"short",t),this.a=new jf(t.a,16).toRed(this.red),this.b=new jf(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}zf(Kf,Ff);var Gf=Kf;function Yf(t,e,i,r){Ff.BasePoint.call(this,t,"affine"),null===e&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new jf(e,16),this.y=new jf(i,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Vf(t,e,i,r){Ff.BasePoint.call(this,t,"jacobian"),null===e&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new jf(0)):(this.x=new jf(e,16),this.y=new jf(i,16),this.z=new jf(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Kf.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,i;if(t.beta)e=new jf(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=(e=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(t.lambda)i=new jf(t.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(e))?i=n[0]:(i=n[1],Hf(0===this.g.mul(i).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:i,basis:t.basis?t.basis.map((function(t){return{a:new jf(t.a,16),b:new jf(t.b,16)}})):this._getEndoBasis(i)}}},Kf.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:jf.mont(t),i=new jf(2).toRed(e).redInvm(),r=i.redNeg(),n=new jf(3).toRed(e).redNeg().redSqrt().redMul(i);return[r.redAdd(n).fromRed(),r.redSub(n).fromRed()]},Kf.prototype._getEndoBasis=function(t){for(var e,i,r,n,o,s,h,a,u,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,d=this.n.clone(),c=new jf(1),p=new jf(0),m=new jf(0),g=new jf(1),v=0;0!==l.cmpn(0);){var b=d.div(l);a=d.sub(b.mul(l)),u=m.sub(b.mul(c));var y=g.sub(b.mul(p));if(!r&&a.cmp(f)<0)e=h.neg(),i=c,r=a.neg(),n=u;else if(r&&2==++v)break;h=a,d=l,l=a,m=c,c=u,g=p,p=y}o=a.neg(),s=u;var w=r.sqr().add(n.sqr());return o.sqr().add(s.sqr()).cmp(w)>=0&&(o=e,s=i),r.negative&&(r=r.neg(),n=n.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:r,b:n},{a:o,b:s}]},Kf.prototype._endoSplit=function(t){var e=this.endo.basis,i=e[0],r=e[1],n=r.b.mul(t).divRound(this.n),o=i.b.neg().mul(t).divRound(this.n),s=n.mul(i.a),h=o.mul(r.a),a=n.mul(i.b),u=o.mul(r.b);return{k1:t.sub(s).sub(h),k2:a.add(u).neg()}},Kf.prototype.pointFromX=function(t,e){(t=new jf(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var n=r.fromRed().isOdd();return(e&&!n||!e&&n)&&(r=r.redNeg()),this.point(t,r)},Kf.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,i=t.y,r=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},Kf.prototype._endoWnafMulAdd=function(t,e,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),h=t[o],a=h._getBeta();s.k1.negative&&(s.k1.ineg(),h=h.neg(!0)),s.k2.negative&&(s.k2.ineg(),a=a.neg(!0)),r[2*o]=h,r[2*o+1]=a,n[2*o]=s.k1,n[2*o+1]=s.k2}for(var u=this._wnafMulAdd(1,r,n,2*o,i),f=0;f<2*o;f++)r[f]=null,n[f]=null;return u},zf(Yf,Ff.BasePoint),Kf.prototype.point=function(t,e,i){return new Yf(this,t,e,i)},Kf.prototype.pointFromJSON=function(t,e){return Yf.fromJSON(this,t,e)},Yf.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var i=this.curve,r=function(t){return i.point(t.x.redMul(i.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e}},Yf.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Yf.fromJSON=function(t,e,i){"string"==typeof e&&(e=JSON.parse(e));var r=t.point(e[0],e[1],i);if(!e[2])return r;function n(e){return t.point(e[0],e[1],i)}var o=e[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(n))}},r},Yf.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Yf.prototype.isInfinity=function(){return this.inf},Yf.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var i=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},Yf.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,i=this.x.redSqr(),r=t.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(e).redMul(r),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},Yf.prototype.getX=function(){return this.x.fromRed()},Yf.prototype.getY=function(){return this.y.fromRed()},Yf.prototype.mul=function(t){return t=new jf(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},Yf.prototype.mulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},Yf.prototype.jmulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},Yf.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},Yf.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,r=function(t){return t.neg()};e.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return e},Yf.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},zf(Vf,Ff.BasePoint),Kf.prototype.jpoint=function(t,e,i){return new Vf(this,t,e,i)},Vf.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),i=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(i,r)},Vf.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Vf.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(e),n=t.x.redMul(i),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(i.redMul(this.z)),h=r.redSub(n),a=o.redSub(s);if(0===h.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=h.redSqr(),f=u.redMul(h),l=r.redMul(u),d=a.redSqr().redIAdd(f).redISub(l).redISub(l),c=a.redMul(l.redISub(d)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(h);return this.curve.jpoint(d,c,p)},Vf.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),i=this.x,r=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),s=i.redSub(r),h=n.redSub(o);if(0===s.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var a=s.redSqr(),u=a.redMul(s),f=i.redMul(a),l=h.redSqr().redIAdd(u).redISub(f).redISub(f),d=h.redMul(f.redISub(l)).redISub(n.redMul(u)),c=this.z.redMul(s);return this.curve.jpoint(l,d,c)},Vf.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var i=this;for(e=0;e<t;e++)i=i.dbl();return i}var r=this.curve.a,n=this.curve.tinv,o=this.x,s=this.y,h=this.z,a=h.redSqr().redSqr(),u=s.redAdd(s);for(e=0;e<t;e++){var f=o.redSqr(),l=u.redSqr(),d=l.redSqr(),c=f.redAdd(f).redIAdd(f).redIAdd(r.redMul(a)),p=o.redMul(l),m=c.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=c.redMul(g);v=v.redIAdd(v).redISub(d);var b=u.redMul(h);e+1<t&&(a=a.redMul(d)),o=m,h=b,u=v}return this.curve.jpoint(o,u.redMul(n),h)},Vf.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Vf.prototype._zeroDbl=function(){var t,e,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var h=r.redAdd(r).redIAdd(r),a=h.redSqr().redISub(s).redISub(s),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=a,e=h.redMul(s.redISub(a)).redISub(u),i=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),d=l.redSqr(),c=this.x.redAdd(l).redSqr().redISub(f).redISub(d);c=c.redIAdd(c);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(c).redISub(c),e=p.redMul(c.redISub(t)).redISub(g),i=(i=this.y.redMul(this.z)).redIAdd(i)}return this.curve.jpoint(t,e,i)},Vf.prototype._threeDbl=function(){var t,e,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var h=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),a=h.redSqr().redISub(s).redISub(s);t=a;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=h.redMul(s.redISub(a)).redISub(u),i=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),d=this.x.redMul(l),c=this.x.redSub(f).redMul(this.x.redAdd(f));c=c.redAdd(c).redIAdd(c);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);t=c.redSqr().redISub(m),i=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=c.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,i)},Vf.prototype._dbl=function(){var t=this.curve.a,e=this.x,i=this.y,r=this.z,n=r.redSqr().redSqr(),o=e.redSqr(),s=i.redSqr(),h=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(n)),a=e.redAdd(e),u=(a=a.redIAdd(a)).redMul(s),f=h.redSqr().redISub(u.redAdd(u)),l=u.redISub(f),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var c=h.redMul(l).redISub(d),p=i.redAdd(i).redMul(r);return this.curve.jpoint(f,c,p)},Vf.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),i=this.z.redSqr(),r=e.redSqr(),n=t.redAdd(t).redIAdd(t),o=n.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(r),h=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),a=r.redIAdd(r);a=(a=(a=a.redIAdd(a)).redIAdd(a)).redIAdd(a);var u=n.redIAdd(s).redSqr().redISub(o).redISub(h).redISub(a),f=e.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(h).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.y.redMul(u.redMul(a.redISub(u)).redISub(s.redMul(h)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var c=this.z.redAdd(s).redSqr().redISub(i).redISub(h);return this.curve.jpoint(l,d,c)},Vf.prototype.mul=function(t,e){return t=new jf(t,e),this.curve._wnafMul(this,t)},Vf.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),i=t.z.redSqr();if(0!==this.x.redMul(i).redISub(t.x.redMul(e)).cmpn(0))return!1;var r=e.redMul(this.z),n=i.redMul(t.z);return 0===this.y.redMul(n).redISub(t.y.redMul(r)).cmpn(0)},Vf.prototype.eqXToP=function(t){var e=this.z.redSqr(),i=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(i))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},Vf.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Vf.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Zf=If,Wf=xe,Xf=qf,Qf=Rf;function Jf(t){Xf.call(this,"mont",t),this.a=new Zf(t.a,16).toRed(this.red),this.b=new Zf(t.b,16).toRed(this.red),this.i4=new Zf(4).toRed(this.red).redInvm(),this.two=new Zf(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Wf(Jf,Xf);var $f=Jf;function tl(t,e,i){Xf.BasePoint.call(this,t,"projective"),null===e&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Zf(e,16),this.z=new Zf(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Jf.prototype.validate=function(t){var e=t.normalize().x,i=e.redSqr(),r=i.redMul(e).redAdd(i.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},Wf(tl,Xf.BasePoint),Jf.prototype.decodePoint=function(t,e){return this.point(Qf.toArray(t,e),1)},Jf.prototype.point=function(t,e){return new tl(this,t,e)},Jf.prototype.pointFromJSON=function(t){return tl.fromJSON(this,t)},tl.prototype.precompute=function(){},tl.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},tl.fromJSON=function(t,e){return new tl(t,e[0],e[1]||t.one)},tl.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},tl.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},tl.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),i=t.redSub(e),r=t.redMul(e),n=i.redMul(e.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},tl.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},tl.prototype.diffAdd=function(t,e){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(i),s=n.redMul(r),h=e.z.redMul(o.redAdd(s).redSqr()),a=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(h,a)},tl.prototype.mul=function(t){for(var e=t.clone(),i=this,r=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},tl.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},tl.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},tl.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},tl.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},tl.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var el=If,il=xe,rl=qf,nl=Rf.assert;function ol(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,rl.call(this,"edwards",t),this.a=new el(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new el(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new el(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),nl(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}il(ol,rl);var sl=ol;function hl(t,e,i,r,n){rl.BasePoint.call(this,t,"projective"),null===e&&null===i&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new el(e,16),this.y=new el(i,16),this.z=r?new el(r,16):this.curve.one,this.t=n&&new el(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}ol.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},ol.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},ol.prototype.jpoint=function(t,e,i,r){return this.point(t,e,i,r)},ol.prototype.pointFromX=function(t,e){(t=new el(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr(),r=this.c2.redSub(this.a.redMul(i)),n=this.one.redSub(this.c2.redMul(this.d).redMul(i)),o=r.redMul(n.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var h=s.fromRed().isOdd();return(e&&!h||!e&&h)&&(s=s.redNeg()),this.point(t,s)},ol.prototype.pointFromY=function(t,e){(t=new el(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr(),r=i.redSub(this.c2),n=i.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(n.redInvm());if(0===o.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},ol.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),i=t.y.redSqr(),r=e.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(i)));return 0===r.cmp(n)},il(hl,rl.BasePoint),ol.prototype.pointFromJSON=function(t){return hl.fromJSON(this,t)},ol.prototype.point=function(t,e,i,r){return new hl(this,t,e,i,r)},hl.fromJSON=function(t,e){return new hl(t,e[0],e[1],e[2])},hl.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},hl.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},hl.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=r.redAdd(e),s=o.redSub(i),h=r.redSub(e),a=n.redMul(s),u=o.redMul(h),f=n.redMul(h),l=s.redMul(o);return this.curve.point(a,u,l,f)},hl.prototype._projDbl=function(){var t,e,i,r,n,o,s=this.x.redAdd(this.y).redSqr(),h=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(h)).redAdd(a);this.zOne?(t=s.redSub(h).redSub(a).redMul(u.redSub(this.curve.two)),e=u.redMul(r.redSub(a)),i=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),o=u.redSub(n).redISub(n),t=s.redSub(h).redISub(a).redMul(o),e=u.redMul(r.redSub(a)),i=u.redMul(o))}else r=h.redAdd(a),n=this.curve._mulC(this.z).redSqr(),o=r.redSub(n).redSub(n),t=this.curve._mulC(s.redISub(r)).redMul(o),e=this.curve._mulC(r).redMul(h.redISub(a)),i=r.redMul(o);return this.curve.point(t,e,i)},hl.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},hl.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),o=i.redSub(e),s=n.redSub(r),h=n.redAdd(r),a=i.redAdd(e),u=o.redMul(s),f=h.redMul(a),l=o.redMul(a),d=s.redMul(h);return this.curve.point(u,f,d,l)},hl.prototype._projAdd=function(t){var e,i,r=this.z.redMul(t.z),n=r.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),h=this.curve.d.redMul(o).redMul(s),a=n.redSub(h),u=n.redAdd(h),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),l=r.redMul(a).redMul(f);return this.curve.twisted?(e=r.redMul(u).redMul(s.redSub(this.curve._mulA(o))),i=a.redMul(u)):(e=r.redMul(u).redMul(s.redSub(o)),i=this.curve._mulC(a).redMul(u)),this.curve.point(l,e,i)},hl.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},hl.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},hl.prototype.mulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!1)},hl.prototype.jmulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!0)},hl.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},hl.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},hl.prototype.getX=function(){return this.normalize(),this.x.fromRed()},hl.prototype.getY=function(){return this.normalize(),this.y.fromRed()},hl.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},hl.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var i=t.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},hl.prototype.toP=hl.prototype.normalize,hl.prototype.mixedAdd=hl.prototype.add,function(t){var e=t;e.base=qf,e.short=Gf,e.mont=$f,e.edwards=sl}(Bf);var al={},ul={},fl={},ll=xh,dl=xe;function cl(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function pl(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function ml(t){return 1===t.length?"0"+t:t}function gl(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}fl.inherits=dl,fl.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)i.push(parseInt(t[n]+t[n+1],16))}else for(var r=0,n=0;n<t.length;n++){var o=t.charCodeAt(n);o<128?i[r++]=o:o<2048?(i[r++]=o>>6|192,i[r++]=63&o|128):cl(t,n)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++n)),i[r++]=o>>18|240,i[r++]=o>>12&63|128,i[r++]=o>>6&63|128,i[r++]=63&o|128):(i[r++]=o>>12|224,i[r++]=o>>6&63|128,i[r++]=63&o|128)}else for(n=0;n<t.length;n++)i[n]=0|t[n];return i},fl.toHex=function(t){for(var e="",i=0;i<t.length;i++)e+=ml(t[i].toString(16));return e},fl.htonl=pl,fl.toHex32=function(t,e){for(var i="",r=0;r<t.length;r++){var n=t[r];"little"===e&&(n=pl(n)),i+=gl(n.toString(16))}return i},fl.zero2=ml,fl.zero8=gl,fl.join32=function(t,e,i,r){var n=i-e;ll(n%4==0);for(var o=new Array(n/4),s=0,h=e;s<o.length;s++,h+=4){var a;a="big"===r?t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3]:t[h+3]<<24|t[h+2]<<16|t[h+1]<<8|t[h],o[s]=a>>>0}return o},fl.split32=function(t,e){for(var i=new Array(4*t.length),r=0,n=0;r<t.length;r++,n+=4){var o=t[r];"big"===e?(i[n]=o>>>24,i[n+1]=o>>>16&255,i[n+2]=o>>>8&255,i[n+3]=255&o):(i[n+3]=o>>>24,i[n+2]=o>>>16&255,i[n+1]=o>>>8&255,i[n]=255&o)}return i},fl.rotr32=function(t,e){return t>>>e|t<<32-e},fl.rotl32=function(t,e){return t<<e|t>>>32-e},fl.sum32=function(t,e){return t+e>>>0},fl.sum32_3=function(t,e,i){return t+e+i>>>0},fl.sum32_4=function(t,e,i,r){return t+e+i+r>>>0},fl.sum32_5=function(t,e,i,r,n){return t+e+i+r+n>>>0},fl.sum64=function(t,e,i,r){var n=t[e],o=r+t[e+1]>>>0,s=(o<r?1:0)+i+n;t[e]=s>>>0,t[e+1]=o},fl.sum64_hi=function(t,e,i,r){return(e+r>>>0<e?1:0)+t+i>>>0},fl.sum64_lo=function(t,e,i,r){return e+r>>>0},fl.sum64_4_hi=function(t,e,i,r,n,o,s,h){var a=0,u=e;return a+=(u=u+r>>>0)<e?1:0,a+=(u=u+o>>>0)<o?1:0,t+i+n+s+(a+=(u=u+h>>>0)<h?1:0)>>>0},fl.sum64_4_lo=function(t,e,i,r,n,o,s,h){return e+r+o+h>>>0},fl.sum64_5_hi=function(t,e,i,r,n,o,s,h,a,u){var f=0,l=e;return f+=(l=l+r>>>0)<e?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+h>>>0)<h?1:0,t+i+n+s+a+(f+=(l=l+u>>>0)<u?1:0)>>>0},fl.sum64_5_lo=function(t,e,i,r,n,o,s,h,a,u){return e+r+o+h+u>>>0},fl.rotr64_hi=function(t,e,i){return(e<<32-i|t>>>i)>>>0},fl.rotr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0},fl.shr64_hi=function(t,e,i){return t>>>i},fl.shr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0};var vl={},bl=fl,yl=xh;function wl(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}vl.BlockHash=wl,wl.prototype.update=function(t,e){if(t=bl.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var i=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-i,t.length),0===this.pending.length&&(this.pending=null),t=bl.join32(t,0,t.length-i,this.endian);for(var r=0;r<t.length;r+=this._delta32)this._update(t,r,r+this._delta32)}return this},wl.prototype.digest=function(t){return this.update(this._pad()),yl(null===this.pending),this._digest(t)},wl.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,i=e-(t+this.padLength)%e,r=new Array(i+this.padLength);r[0]=128;for(var n=1;n<i;n++)r[n]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[n++]=0;r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=t>>>24&255,r[n++]=t>>>16&255,r[n++]=t>>>8&255,r[n++]=255&t}else for(r[n++]=255&t,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n++]=t>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,o=8;o<this.padLength;o++)r[n++]=0;return r};var Ml={},_l={},Sl=fl.rotr32;function El(t,e,i){return t&e^~t&i}function Al(t,e,i){return t&e^t&i^e&i}function kl(t,e,i){return t^e^i}_l.ft_1=function(t,e,i,r){return 0===t?El(e,i,r):1===t||3===t?kl(e,i,r):2===t?Al(e,i,r):void 0},_l.ch32=El,_l.maj32=Al,_l.p32=kl,_l.s0_256=function(t){return Sl(t,2)^Sl(t,13)^Sl(t,22)},_l.s1_256=function(t){return Sl(t,6)^Sl(t,11)^Sl(t,25)},_l.g0_256=function(t){return Sl(t,7)^Sl(t,18)^t>>>3},_l.g1_256=function(t){return Sl(t,17)^Sl(t,19)^t>>>10};var Rl=fl,Il=vl,Ol=_l,Tl=Rl.rotl32,Bl=Rl.sum32,Pl=Rl.sum32_5,Nl=Ol.ft_1,xl=Il.BlockHash,Ll=[1518500249,1859775393,2400959708,3395469782];function Dl(){if(!(this instanceof Dl))return new Dl;xl.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Rl.inherits(Dl,xl);var Cl=Dl;Dl.blockSize=512,Dl.outSize=160,Dl.hmacStrength=80,Dl.padLength=64,Dl.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;r<i.length;r++)i[r]=Tl(i[r-3]^i[r-8]^i[r-14]^i[r-16],1);var n=this.h[0],o=this.h[1],s=this.h[2],h=this.h[3],a=this.h[4];for(r=0;r<i.length;r++){var u=~~(r/20),f=Pl(Tl(n,5),Nl(u,o,s,h),a,i[r],Ll[u]);a=h,h=s,s=Tl(o,30),o=n,n=f}this.h[0]=Bl(this.h[0],n),this.h[1]=Bl(this.h[1],o),this.h[2]=Bl(this.h[2],s),this.h[3]=Bl(this.h[3],h),this.h[4]=Bl(this.h[4],a)},Dl.prototype._digest=function(t){return"hex"===t?Rl.toHex32(this.h,"big"):Rl.split32(this.h,"big")};var ql=fl,Ul=vl,jl=_l,zl=xh,Fl=ql.sum32,Hl=ql.sum32_4,Kl=ql.sum32_5,Gl=jl.ch32,Yl=jl.maj32,Vl=jl.s0_256,Zl=jl.s1_256,Wl=jl.g0_256,Xl=jl.g1_256,Ql=Ul.BlockHash,Jl=[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];function $l(){if(!(this instanceof $l))return new $l;Ql.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Jl,this.W=new Array(64)}ql.inherits($l,Ql);var td=$l;$l.blockSize=512,$l.outSize=256,$l.hmacStrength=192,$l.padLength=64,$l.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;r<i.length;r++)i[r]=Hl(Xl(i[r-2]),i[r-7],Wl(i[r-15]),i[r-16]);var n=this.h[0],o=this.h[1],s=this.h[2],h=this.h[3],a=this.h[4],u=this.h[5],f=this.h[6],l=this.h[7];for(zl(this.k.length===i.length),r=0;r<i.length;r++){var d=Kl(l,Zl(a),Gl(a,u,f),this.k[r],i[r]),c=Fl(Vl(n),Yl(n,o,s));l=f,f=u,u=a,a=Fl(h,d),h=s,s=o,o=n,n=Fl(d,c)}this.h[0]=Fl(this.h[0],n),this.h[1]=Fl(this.h[1],o),this.h[2]=Fl(this.h[2],s),this.h[3]=Fl(this.h[3],h),this.h[4]=Fl(this.h[4],a),this.h[5]=Fl(this.h[5],u),this.h[6]=Fl(this.h[6],f),this.h[7]=Fl(this.h[7],l)},$l.prototype._digest=function(t){return"hex"===t?ql.toHex32(this.h,"big"):ql.split32(this.h,"big")};var ed=fl,id=td;function rd(){if(!(this instanceof rd))return new rd;id.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}ed.inherits(rd,id);var nd=rd;rd.blockSize=512,rd.outSize=224,rd.hmacStrength=192,rd.padLength=64,rd.prototype._digest=function(t){return"hex"===t?ed.toHex32(this.h.slice(0,7),"big"):ed.split32(this.h.slice(0,7),"big")};var od=fl,sd=vl,hd=xh,ad=od.rotr64_hi,ud=od.rotr64_lo,fd=od.shr64_hi,ld=od.shr64_lo,dd=od.sum64,cd=od.sum64_hi,pd=od.sum64_lo,md=od.sum64_4_hi,gd=od.sum64_4_lo,vd=od.sum64_5_hi,bd=od.sum64_5_lo,yd=sd.BlockHash,wd=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Md(){if(!(this instanceof Md))return new Md;yd.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=wd,this.W=new Array(160)}od.inherits(Md,yd);var _d=Md;function Sd(t,e,i,r,n){var o=t&i^~t&n;return o<0&&(o+=4294967296),o}function Ed(t,e,i,r,n,o){var s=e&r^~e&o;return s<0&&(s+=4294967296),s}function Ad(t,e,i,r,n){var o=t&i^t&n^i&n;return o<0&&(o+=4294967296),o}function kd(t,e,i,r,n,o){var s=e&r^e&o^r&o;return s<0&&(s+=4294967296),s}function Rd(t,e){var i=ad(t,e,28)^ad(e,t,2)^ad(e,t,7);return i<0&&(i+=4294967296),i}function Id(t,e){var i=ud(t,e,28)^ud(e,t,2)^ud(e,t,7);return i<0&&(i+=4294967296),i}function Od(t,e){var i=ad(t,e,14)^ad(t,e,18)^ad(e,t,9);return i<0&&(i+=4294967296),i}function Td(t,e){var i=ud(t,e,14)^ud(t,e,18)^ud(e,t,9);return i<0&&(i+=4294967296),i}function Bd(t,e){var i=ad(t,e,1)^ad(t,e,8)^fd(t,e,7);return i<0&&(i+=4294967296),i}function Pd(t,e){var i=ud(t,e,1)^ud(t,e,8)^ld(t,e,7);return i<0&&(i+=4294967296),i}function Nd(t,e){var i=ad(t,e,19)^ad(e,t,29)^fd(t,e,6);return i<0&&(i+=4294967296),i}function xd(t,e){var i=ud(t,e,19)^ud(e,t,29)^ld(t,e,6);return i<0&&(i+=4294967296),i}Md.blockSize=1024,Md.outSize=512,Md.hmacStrength=192,Md.padLength=128,Md.prototype._prepareBlock=function(t,e){for(var i=this.W,r=0;r<32;r++)i[r]=t[e+r];for(;r<i.length;r+=2){var n=Nd(i[r-4],i[r-3]),o=xd(i[r-4],i[r-3]),s=i[r-14],h=i[r-13],a=Bd(i[r-30],i[r-29]),u=Pd(i[r-30],i[r-29]),f=i[r-32],l=i[r-31];i[r]=md(n,o,s,h,a,u,f,l),i[r+1]=gd(n,o,s,h,a,u,f,l)}},Md.prototype._update=function(t,e){this._prepareBlock(t,e);var i=this.W,r=this.h[0],n=this.h[1],o=this.h[2],s=this.h[3],h=this.h[4],a=this.h[5],u=this.h[6],f=this.h[7],l=this.h[8],d=this.h[9],c=this.h[10],p=this.h[11],m=this.h[12],g=this.h[13],v=this.h[14],b=this.h[15];hd(this.k.length===i.length);for(var y=0;y<i.length;y+=2){var w=v,M=b,_=Od(l,d),S=Td(l,d),E=Sd(l,d,c,p,m),A=Ed(l,d,c,p,m,g),k=this.k[y],R=this.k[y+1],I=i[y],O=i[y+1],T=vd(w,M,_,S,E,A,k,R,I,O),B=bd(w,M,_,S,E,A,k,R,I,O);w=Rd(r,n),M=Id(r,n),_=Ad(r,n,o,s,h),S=kd(r,n,o,s,h,a);var P=cd(w,M,_,S),N=pd(w,M,_,S);v=m,b=g,m=c,g=p,c=l,p=d,l=cd(u,f,T,B),d=pd(f,f,T,B),u=h,f=a,h=o,a=s,o=r,s=n,r=cd(T,B,P,N),n=pd(T,B,P,N)}dd(this.h,0,r,n),dd(this.h,2,o,s),dd(this.h,4,h,a),dd(this.h,6,u,f),dd(this.h,8,l,d),dd(this.h,10,c,p),dd(this.h,12,m,g),dd(this.h,14,v,b)},Md.prototype._digest=function(t){return"hex"===t?od.toHex32(this.h,"big"):od.split32(this.h,"big")};var Ld=fl,Dd=_d;function Cd(){if(!(this instanceof Cd))return new Cd;Dd.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Ld.inherits(Cd,Dd);var qd=Cd;Cd.blockSize=1024,Cd.outSize=384,Cd.hmacStrength=192,Cd.padLength=128,Cd.prototype._digest=function(t){return"hex"===t?Ld.toHex32(this.h.slice(0,12),"big"):Ld.split32(this.h.slice(0,12),"big")},Ml.sha1=Cl,Ml.sha224=nd,Ml.sha256=td,Ml.sha384=qd,Ml.sha512=_d;var Ud={},jd=fl,zd=vl,Fd=jd.rotl32,Hd=jd.sum32,Kd=jd.sum32_3,Gd=jd.sum32_4,Yd=zd.BlockHash;function Vd(){if(!(this instanceof Vd))return new Vd;Yd.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Zd(t,e,i,r){return t<=15?e^i^r:t<=31?e&i|~e&r:t<=47?(e|~i)^r:t<=63?e&r|i&~r:e^(i|~r)}function Wd(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function Xd(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}jd.inherits(Vd,Yd),Ud.ripemd160=Vd,Vd.blockSize=512,Vd.outSize=160,Vd.hmacStrength=192,Vd.padLength=64,Vd.prototype._update=function(t,e){for(var i=this.h[0],r=this.h[1],n=this.h[2],o=this.h[3],s=this.h[4],h=i,a=r,u=n,f=o,l=s,d=0;d<80;d++){var c=Hd(Fd(Gd(i,Zd(d,r,n,o),t[Qd[d]+e],Wd(d)),$d[d]),s);i=s,s=o,o=Fd(n,10),n=r,r=c,c=Hd(Fd(Gd(h,Zd(79-d,a,u,f),t[Jd[d]+e],Xd(d)),tc[d]),l),h=l,l=f,f=Fd(u,10),u=a,a=c}c=Kd(this.h[1],n,f),this.h[1]=Kd(this.h[2],o,l),this.h[2]=Kd(this.h[3],s,h),this.h[3]=Kd(this.h[4],i,a),this.h[4]=Kd(this.h[0],r,u),this.h[0]=c},Vd.prototype._digest=function(t){return"hex"===t?jd.toHex32(this.h,"little"):jd.split32(this.h,"little")};var Qd=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Jd=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],$d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],tc=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],ec=fl,ic=xh;function rc(t,e,i){if(!(this instanceof rc))return new rc(t,e,i);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(ec.toArray(e,i))}var nc,oc,sc=rc;rc.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),ic(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},rc.prototype.update=function(t,e){return this.inner.update(t,e),this},rc.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)},function(t){var e=ul;e.utils=fl,e.common=vl,e.sha=Ml,e.ripemd=Ud,e.hmac=sc,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}(),function(t){var e,i=al,r=ul,n=Bf,o=Rf.assert;function s(t){"short"===t.type?this.curve=new n.short(t):"edwards"===t.type?this.curve=new n.edwards(t):this.curve=new n.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function h(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new s(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=s,h("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),h("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),h("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{e=oc?nc:(oc=1,nc={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(t){e=void 0}h("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",e]})}();var hc=ul,ac=Tf,uc=xh;function fc(t){if(!(this instanceof fc))return new fc(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=ac.toArray(t.entropy,t.entropyEnc||"hex"),i=ac.toArray(t.nonce,t.nonceEnc||"hex"),r=ac.toArray(t.pers,t.persEnc||"hex");uc(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,i,r)}var lc=fc;fc.prototype._init=function(t,e,i){var r=t.concat(e).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},fc.prototype._hmac=function(){return new hc.hmac(this.hash,this.K)},fc.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},fc.prototype.reseed=function(t,e,i,r){"string"!=typeof e&&(r=i,i=e,e=null),t=ac.toArray(t,e),i=ac.toArray(i,r),uc(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1},fc.prototype.generate=function(t,e,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=i,i=e,e=null),i&&(i=ac.toArray(i,r||"hex"),this._update(i));for(var n=[];n.length<t;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,t);return this._update(i),this._reseed++,ac.encode(o,e)};var dc=If,cc=Rf.assert;function pc(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var mc=pc;pc.fromPublic=function(t,e,i){return e instanceof pc?e:new pc(t,{pub:e,pubEnc:i})},pc.fromPrivate=function(t,e,i){return e instanceof pc?e:new pc(t,{priv:e,privEnc:i})},pc.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},pc.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},pc.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},pc.prototype._importPrivate=function(t,e){this.priv=new dc(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},pc.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?cc(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||cc(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},pc.prototype.derive=function(t){return t.validate()||cc(t.validate(),"public point not validated"),t.mul(this.priv).getX()},pc.prototype.sign=function(t,e,i){return this.ec.sign(t,this,e,i)},pc.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},pc.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var gc=If,vc=Rf,bc=vc.assert;function yc(t,e){if(t instanceof yc)return t;this._importDER(t,e)||(bc(t.r&&t.s,"Signature without r or s"),this.r=new gc(t.r,16),this.s=new gc(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var wc,Mc,_c=yc;function Sc(){this.place=0}function Ec(t,e){var i=t[e.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,o=0,s=e.place;o<r;o++,s++)n<<=8,n|=t[s],n>>>=0;return!(n<=127)&&(e.place=s,n)}function Ac(t){for(var e=0,i=t.length-1;!t[e]&&!(128&t[e+1])&&e<i;)e++;return 0===e?t:t.slice(e)}function kc(t,e){if(e<128)t.push(e);else{var i=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|i);--i;)t.push(e>>>(i<<3)&255);t.push(e)}}yc.prototype._importDER=function(t,e){t=vc.toArray(t,e);var i=new Sc;if(48!==t[i.place++])return!1;var r=Ec(t,i);if(!1===r)return!1;if(r+i.place!==t.length)return!1;if(2!==t[i.place++])return!1;var n=Ec(t,i);if(!1===n)return!1;var o=t.slice(i.place,n+i.place);if(i.place+=n,2!==t[i.place++])return!1;var s=Ec(t,i);if(!1===s)return!1;if(t.length!==s+i.place)return!1;var h=t.slice(i.place,s+i.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new gc(o),this.s=new gc(h),this.recoveryParam=null,!0},yc.prototype.toDER=function(t){var e=this.r.toArray(),i=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&i[0]&&(i=[0].concat(i)),e=Ac(e),i=Ac(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];kc(r,e.length),(r=r.concat(e)).push(2),kc(r,i.length);var n=r.concat(i),o=[48];return kc(o,n.length),o=o.concat(n),vc.encode(o,t)};var Rc=Rf,Ic=Rc.assert,Oc=Rc.parseBytes,Tc=Rc.cachedProperty;function Bc(t,e){this.eddsa=t,this._secret=Oc(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Oc(e.pub)}Bc.fromPublic=function(t,e){return e instanceof Bc?e:new Bc(t,{pub:e})},Bc.fromSecret=function(t,e){return e instanceof Bc?e:new Bc(t,{secret:e})},Bc.prototype.secret=function(){return this._secret},Tc(Bc,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Tc(Bc,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Tc(Bc,"privBytes",(function(){var t=this.eddsa,e=this.hash(),i=t.encodingLength-1,r=e.slice(0,t.encodingLength);return r[0]&=248,r[i]&=127,r[i]|=64,r})),Tc(Bc,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Tc(Bc,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Tc(Bc,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Bc.prototype.sign=function(t){return Ic(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},Bc.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},Bc.prototype.getSecret=function(t){return Ic(this._secret,"KeyPair is public only"),Rc.encode(this.secret(),t)},Bc.prototype.getPublic=function(t){return Rc.encode(this.pubBytes(),t)};var Pc=Bc,Nc=If,xc=Rf,Lc=xc.assert,Dc=xc.cachedProperty,Cc=xc.parseBytes;function qc(t,e){this.eddsa=t,"object"!=typeof e&&(e=Cc(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),Lc(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof Nc&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Dc(qc,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Dc(qc,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Dc(qc,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Dc(qc,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),qc.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},qc.prototype.toHex=function(){return xc.encode(this.toBytes(),"hex").toUpperCase()};var Uc=qc,jc=ul,zc=al,Fc=Rf,Hc=Fc.assert,Kc=Fc.parseBytes,Gc=Pc,Yc=Uc;function Vc(t){if(Hc("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof Vc))return new Vc(t);t=zc[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=jc.sha512}var Zc,Wc=Vc;function Xc(){return Zc||(Zc=1,function(t){var e=t;e.version=kf.version,e.utils=Rf,e.rand=af(),e.curve=Bf,e.curves=al,e.ec=function(){if(Mc)return wc;Mc=1;var t=If,e=lc,i=Rf,r=al,n=af(),o=i.assert,s=mc,h=_c;function a(t){if(!(this instanceof a))return new a(t);"string"==typeof t&&(o(Object.prototype.hasOwnProperty.call(r,t),"Unknown curve "+t),t=r[t]),t instanceof r.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}return wc=a,a.prototype.keyPair=function(t){return new s(this,t)},a.prototype.keyFromPrivate=function(t,e){return s.fromPrivate(this,t,e)},a.prototype.keyFromPublic=function(t,e){return s.fromPublic(this,t,e)},a.prototype.genKeyPair=function(i){i||(i={});for(var r=new e({hash:this.hash,pers:i.pers,persEnc:i.persEnc||"utf8",entropy:i.entropy||n(this.hash.hmacStrength),entropyEnc:i.entropy&&i.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),s=this.n.sub(new t(2));;){var h=new t(r.generate(o));if(!(h.cmp(s)>0))return h.iaddn(1),this.keyFromPrivate(h)}},a.prototype._truncateToN=function(t,e){var i=8*t.byteLength()-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},a.prototype.sign=function(i,r,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),r=this.keyFromPrivate(r,n),i=this._truncateToN(new t(i,16));for(var s=this.n.byteLength(),a=r.getPrivate().toArray("be",s),u=i.toArray("be",s),f=new e({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new t(1)),d=0;;d++){var c=o.k?o.k(d):new t(f.generate(this.n.byteLength()));if(!((c=this._truncateToN(c,!0)).cmpn(1)<=0||c.cmp(l)>=0)){var p=this.g.mul(c);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=c.invm(this.n).mul(g.mul(r.getPrivate()).iadd(i));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new h({r:g,s:v,recoveryParam:b})}}}}}},a.prototype.verify=function(e,i,r,n){e=this._truncateToN(new t(e,16)),r=this.keyFromPublic(r,n);var o=(i=new h(i,"hex")).r,s=i.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),f=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(f,r.getPublic(),l)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(f,r.getPublic(),l)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},a.prototype.recoverPubKey=function(e,i,r,n){o((3&r)===r,"The recovery param is more than two bits"),i=new h(i,n);var s=this.n,a=new t(e),u=i.r,f=i.s,l=1&r,d=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");u=d?this.curve.pointFromX(u.add(this.curve.n),l):this.curve.pointFromX(u,l);var c=i.r.invm(s),p=s.sub(a).mul(c).umod(s),m=f.mul(c).umod(s);return this.g.mulAdd(p,u,m)},a.prototype.getKeyRecoveryParam=function(t,e,i,r){if(null!==(e=new h(e,r)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(t,e,n)}catch(t){continue}if(o.eq(i))return n}throw new Error("Unable to find valid recovery factor")},wc}(),e.eddsa=Wc}(Af)),Af}Vc.prototype.sign=function(t,e){t=Kc(t);var i=this.keyFromSecret(e),r=this.hashInt(i.messagePrefix(),t),n=this.g.mul(r),o=this.encodePoint(n),s=this.hashInt(o,i.pubBytes(),t).mul(i.priv()),h=r.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:h,Rencoded:o})},Vc.prototype.verify=function(t,e,i){t=Kc(t),e=this.makeSignature(e);var r=this.keyFromPublic(i),n=this.hashInt(e.Rencoded(),r.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(r.pub().mul(n)).eq(o)},Vc.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return Fc.intFromLE(t.digest()).umod(this.curve.n)},Vc.prototype.keyFromPublic=function(t){return Gc.fromPublic(this,t)},Vc.prototype.keyFromSecret=function(t){return Gc.fromSecret(this,t)},Vc.prototype.makeSignature=function(t){return t instanceof Yc?t:new Yc(this,t)},Vc.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},Vc.prototype.decodePoint=function(t){var e=(t=Fc.parseBytes(t)).length-1,i=t.slice(0,e).concat(-129&t[e]),r=0!=(128&t[e]),n=Fc.intFromLE(i);return this.curve.pointFromY(n,r)},Vc.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},Vc.prototype.decodeInt=function(t){return Fc.intFromLE(t)},Vc.prototype.isPoint=function(t){return t instanceof this.pointClass};var Qc={},Jc={},$c={},tp={get exports(){return $c},set exports(t){$c=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(tp,Tt);var ep,ip={},rp={},np=Oe,op=np.Buffer,sp={};for(ep in np)np.hasOwnProperty(ep)&&"SlowBuffer"!==ep&&"Buffer"!==ep&&(sp[ep]=np[ep]);var hp=sp.Buffer={};for(ep in op)op.hasOwnProperty(ep)&&"allocUnsafe"!==ep&&"allocUnsafeSlow"!==ep&&(hp[ep]=op[ep]);if(sp.Buffer.prototype=op.prototype,hp.from&&hp.from!==Uint8Array.from||(hp.from=function(t,e,i){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return op(t,e,i)}),hp.alloc||(hp.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=op(t);return e&&0!==e.length?"string"==typeof i?r.fill(e,i):r.fill(e):r.fill(0),r}),!sp.kStringMaxLength)try{sp.kStringMaxLength=_e.binding("buffer").kStringMaxLength}catch(t){}sp.constants||(sp.constants={MAX_LENGTH:sp.kMaxLength},sp.kStringMaxLength&&(sp.constants.MAX_STRING_LENGTH=sp.kStringMaxLength));var ap=sp,up={};const fp=xe;function lp(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function dp(t,e){this.path=t,this.rethrow(e)}up.Reporter=lp,lp.prototype.isError=function(t){return t instanceof dp},lp.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},lp.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},lp.prototype.enterKey=function(t){return this._reporterState.path.push(t)},lp.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},lp.prototype.leaveKey=function(t,e,i){const r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=i)},lp.prototype.path=function(){return this._reporterState.path.join("/")},lp.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},lp.prototype.leaveObject=function(t){const e=this._reporterState,i=e.obj;return e.obj=t,i},lp.prototype.error=function(t){let e;const i=this._reporterState,r=t instanceof dp;if(e=r?t:new dp(i.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!i.options.partial)throw e;return r||i.errors.push(e),e},lp.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},fp(dp,Error),dp.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,dp),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this};var cp={};const pp=xe,mp=up.Reporter,gp=ap.Buffer;function vp(t,e){mp.call(this,e),gp.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function bp(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return bp.isEncoderBuffer(t)||(t=new bp(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=gp.byteLength(t);else{if(!gp.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}pp(vp,mp),cp.DecoderBuffer=vp,vp.isDecoderBuffer=function(t){if(t instanceof vp)return!0;return"object"==typeof t&&gp.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},vp.prototype.save=function(){return{offset:this.offset,reporter:mp.prototype.save.call(this)}},vp.prototype.restore=function(t){const e=new vp(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,mp.prototype.restore.call(this,t.reporter),e},vp.prototype.isEmpty=function(){return this.offset===this.length},vp.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},vp.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");const i=new vp(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+t,this.offset+=t,i},vp.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},cp.EncoderBuffer=bp,bp.isEncoderBuffer=function(t){if(t instanceof bp)return!0;return"object"==typeof t&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},bp.prototype.join=function(t,e){return t||(t=gp.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(t,e),e+=i.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):gp.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t};const yp=up.Reporter,wp=cp.EncoderBuffer,Mp=cp.DecoderBuffer,_p=xh,Sp=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],Ep=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Sp);function Ap(t,e,i){const r={};this._baseState=r,r.name=i,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var kp=Ap;const Rp=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Ap.prototype.clone=function(){const t=this._baseState,e={};Rp.forEach((function(i){e[i]=t[i]}));const i=new this.constructor(e.parent);return i._baseState=e,i},Ap.prototype._wrap=function(){const t=this._baseState;Ep.forEach((function(e){this[e]=function(){const i=new this.constructor(this);return t.children.push(i),i[e].apply(i,arguments)}}),this)},Ap.prototype._init=function(t){const e=this._baseState;_p(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),_p.equal(e.children.length,1,"Root node can have only one child")},Ap.prototype._useArgs=function(t){const e=this._baseState,i=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==i.length&&(_p(null===e.children),e.children=i,i.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(_p(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(i){i==(0|i)&&(i|=0);const r=t[i];e[r]=i})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){Ap.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),Sp.forEach((function(t){Ap.prototype[t]=function(){const e=this._baseState,i=Array.prototype.slice.call(arguments);return _p(null===e.tag),e.tag=t,this._useArgs(i),this}})),Ap.prototype.use=function(t){_p(t);const e=this._baseState;return _p(null===e.use),e.use=t,this},Ap.prototype.optional=function(){return this._baseState.optional=!0,this},Ap.prototype.def=function(t){const e=this._baseState;return _p(null===e.default),e.default=t,e.optional=!0,this},Ap.prototype.explicit=function(t){const e=this._baseState;return _p(null===e.explicit&&null===e.implicit),e.explicit=t,this},Ap.prototype.implicit=function(t){const e=this._baseState;return _p(null===e.explicit&&null===e.implicit),e.implicit=t,this},Ap.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},Ap.prototype.key=function(t){const e=this._baseState;return _p(null===e.key),e.key=t,this},Ap.prototype.any=function(){return this._baseState.any=!0,this},Ap.prototype.choice=function(t){const e=this._baseState;return _p(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},Ap.prototype.contains=function(t){const e=this._baseState;return _p(null===e.use),e.contains=t,this},Ap.prototype._decode=function(t,e){const i=this._baseState;if(null===i.parent)return t.wrapResult(i.children[0]._decode(t,e));let r,n=i.default,o=!0,s=null;if(null!==i.key&&(s=t.enterKey(i.key)),i.optional){let r=null;if(null!==i.explicit?r=i.explicit:null!==i.implicit?r=i.implicit:null!==i.tag&&(r=i.tag),null!==r||i.any){if(o=this._peekTag(t,r,i.any),t.isError(o))return o}else{const r=t.save();try{null===i.choice?this._decodeGeneric(i.tag,t,e):this._decodeChoice(t,e),o=!0}catch(t){o=!1}t.restore(r)}}if(i.obj&&o&&(r=t.enterObject()),o){if(null!==i.explicit){const e=this._decodeTag(t,i.explicit);if(t.isError(e))return e;t=e}const r=t.offset;if(null===i.use&&null===i.choice){let e;i.any&&(e=t.save());const r=this._decodeTag(t,null!==i.implicit?i.implicit:i.tag,i.any);if(t.isError(r))return r;i.any?n=t.raw(e):t=r}if(e&&e.track&&null!==i.tag&&e.track(t.path(),r,t.length,"tagged"),e&&e.track&&null!==i.tag&&e.track(t.path(),t.offset,t.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,t,e):this._decodeChoice(t,e)),t.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(i){i._decode(t,e)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){const r=new Mp(n);n=this._getUse(i.contains,t._reporterState.obj)._decode(r,e)}}return i.obj&&o&&(n=t.leaveObject(r)),null===i.key||null===n&&!0!==o?null!==s&&t.exitKey(s):t.leaveKey(s,i.key,n),n},Ap.prototype._decodeGeneric=function(t,e,i){const r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],i):/str$/.test(t)?this._decodeStr(e,t,i):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],i):"objid"===t?this._decodeObjid(e,null,null,i):"gentime"===t||"utctime"===t?this._decodeTime(e,t,i):"null_"===t?this._decodeNull(e,i):"bool"===t?this._decodeBool(e,i):"objDesc"===t?this._decodeStr(e,t,i):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,i):e.error("unknown tag: "+t)},Ap.prototype._getUse=function(t,e){const i=this._baseState;return i.useDecoder=this._use(t,e),_p(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},Ap.prototype._decodeChoice=function(t,e){const i=this._baseState;let r=null,n=!1;return Object.keys(i.choice).some((function(o){const s=t.save(),h=i.choice[o];try{const i=h._decode(t,e);if(t.isError(i))return!1;r={type:o,value:i},n=!0}catch(e){return t.restore(s),!1}return!0}),this),n?r:t.error("Choice not matched")},Ap.prototype._createEncoderBuffer=function(t){return new wp(t,this.reporter)},Ap.prototype._encode=function(t,e,i){const r=this._baseState;if(null!==r.default&&r.default===t)return;const n=this._encodeValue(t,e,i);return void 0===n||this._skipDefault(n,e,i)?void 0:n},Ap.prototype._encodeValue=function(t,e,i){const r=this._baseState;if(null===r.parent)return r.children[0]._encode(t,e||new yp);let n=null;if(this.reporter=e,r.optional&&void 0===t){if(null===r.default)return;t=r.default}let o=null,s=!1;if(r.any)n=this._createEncoderBuffer(t);else if(r.choice)n=this._encodeChoice(t,e);else if(r.contains)o=this._getUse(r.contains,i)._encode(t,e),s=!0;else if(r.children)o=r.children.map((function(i){if("null_"===i._baseState.tag)return i._encode(null,e,t);if(null===i._baseState.key)return e.error("Child should have a key");const r=e.enterKey(i._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const n=i._encode(t[i._baseState.key],e,t);return e.leaveKey(r),n}),this).filter((function(t){return t})),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return e.error("Too many args for : "+r.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const i=this.clone();i._baseState.implicit=null,o=this._createEncoderBuffer(t.map((function(i){const r=this._baseState;return this._getUse(r.args[0],t)._encode(i,e)}),i))}else null!==r.use?n=this._getUse(r.use,i)._encode(t,e):(o=this._encodePrimitive(r.tag,t),s=!0);if(!r.any&&null===r.choice){const t=null!==r.implicit?r.implicit:r.tag,i=null===r.implicit?"universal":"context";null===t?null===r.use&&e.error("Tag could be omitted only for .use()"):null===r.use&&(n=this._encodeComposite(t,s,i,o))}return null!==r.explicit&&(n=this._encodeComposite(r.explicit,!1,"context",n)),n},Ap.prototype._encodeChoice=function(t,e){const i=this._baseState,r=i.choice[t.type];return r||_p(!1,t.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(t.value,e)},Ap.prototype._encodePrimitive=function(t,e){const i=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&i.args)return this._encodeObjid(e,i.reverseArgs[0],i.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,i.args&&i.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},Ap.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},Ap.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)};var Ip={};!function(t){function e(t){const e={};return Object.keys(t).forEach((function(i){(0|i)==i&&(i|=0);const r=t[i];e[r]=i})),e}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e(t.tag)}(Ip);const Op=xe,Tp=ap.Buffer,Bp=kp,Pp=Ip;function Np(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Lp,this.tree._init(t.body)}var xp=Np;function Lp(t){Bp.call(this,"der",t)}function Dp(t){return t<10?"0"+t:t}Np.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},Op(Lp,Bp),Lp.prototype._encodeComposite=function(t,e,i,r){const n=function(t,e,i,r){let n;"seqof"===t?t="seq":"setof"===t&&(t="set");if(Pp.tagByName.hasOwnProperty(t))n=Pp.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);n=t}if(n>=31)return r.error("Multi-octet tag encoding unsupported");e||(n|=32);return n|=Pp.tagClassByName[i||"universal"]<<6,n}(t,e,i,this.reporter);if(r.length<128){const t=Tp.alloc(2);return t[0]=n,t[1]=r.length,this._createEncoderBuffer([t,r])}let o=1;for(let t=r.length;t>=256;t>>=8)o++;const s=Tp.alloc(2+o);s[0]=n,s[1]=128|o;for(let t=1+o,e=r.length;e>0;t--,e>>=8)s[t]=255&e;return this._createEncoderBuffer([s,r])},Lp.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=Tp.alloc(2*t.length);for(let i=0;i<t.length;i++)e.writeUInt16BE(t.charCodeAt(i),2*i);return this._createEncoderBuffer(e)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},Lp.prototype._encodeObjid=function(t,e,i){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s.]+/g);for(let e=0;e<t.length;e++)t[e]|=0}else if(Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!i){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let r=0;for(let e=0;e<t.length;e++){let i=t[e];for(r++;i>=128;i>>=7)r++}const n=Tp.alloc(r);let o=n.length-1;for(let e=t.length-1;e>=0;e--){let i=t[e];for(n[o--]=127&i;(i>>=7)>0;)n[o--]=128|127&i}return this._createEncoderBuffer(n)},Lp.prototype._encodeTime=function(t,e){let i;const r=new Date(t);return"gentime"===e?i=[Dp(r.getUTCFullYear()),Dp(r.getUTCMonth()+1),Dp(r.getUTCDate()),Dp(r.getUTCHours()),Dp(r.getUTCMinutes()),Dp(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?i=[Dp(r.getUTCFullYear()%100),Dp(r.getUTCMonth()+1),Dp(r.getUTCDate()),Dp(r.getUTCHours()),Dp(r.getUTCMinutes()),Dp(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(i,"octstr")},Lp.prototype._encodeNull=function(){return this._createEncoderBuffer("")},Lp.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!Tp.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=Tp.from(e)}if(Tp.isBuffer(t)){let e=t.length;0===t.length&&e++;const i=Tp.alloc(e);return t.copy(i),0===t.length&&(i[0]=0),this._createEncoderBuffer(i)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let i=1;for(let e=t;e>=256;e>>=8)i++;const r=new Array(i);for(let e=r.length-1;e>=0;e--)r[e]=255&t,t>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(Tp.from(r))},Lp.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},Lp.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},Lp.prototype._skipDefault=function(t,e,i){const r=this._baseState;let n;if(null===r.default)return!1;const o=t.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,e,i).join()),o.length!==r.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==r.defaultBuffer[n])return!1;return!0};const Cp=xp;function qp(t){Cp.call(this,t),this.enc="pem"}xe(qp,Cp);var Up=qp;qp.prototype.encode=function(t,e){const i=Cp.prototype.encode.call(this,t).toString("base64"),r=["-----BEGIN "+e.label+"-----"];for(let t=0;t<i.length;t+=64)r.push(i.slice(t,t+64));return r.push("-----END "+e.label+"-----"),r.join("\n")},function(t){const e=t;e.der=xp,e.pem=Up}(rp);var jp={};const zp=xe,Fp=$c,Hp=cp.DecoderBuffer,Kp=kp,Gp=Ip;function Yp(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Zp,this.tree._init(t.body)}var Vp=Yp;function Zp(t){Kp.call(this,"der",t)}function Wp(t,e){let i=t.readUInt8(e);if(t.isError(i))return i;const r=Gp.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){let r=i;for(i=0;128==(128&r);){if(r=t.readUInt8(e),t.isError(r))return r;i<<=7,i|=127&r}}else i&=31;return{cls:r,primitive:n,tag:i,tagStr:Gp.tag[i]}}function Xp(t,e,i){let r=t.readUInt8(i);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;const n=127&r;if(n>4)return t.error("length octect is too long");r=0;for(let e=0;e<n;e++){r<<=8;const e=t.readUInt8(i);if(t.isError(e))return e;r|=e}return r}Yp.prototype.decode=function(t,e){return Hp.isDecoderBuffer(t)||(t=new Hp(t,e)),this.tree._decode(t,e)},zp(Zp,Kp),Zp.prototype._peekTag=function(t,e,i){if(t.isEmpty())return!1;const r=t.save(),n=Wp(t,'Failed to peek tag: "'+e+'"');return t.isError(n)?n:(t.restore(r),n.tag===e||n.tagStr===e||n.tagStr+"of"===e||i)},Zp.prototype._decodeTag=function(t,e,i){const r=Wp(t,'Failed to decode tag of "'+e+'"');if(t.isError(r))return r;let n=Xp(t,r.primitive,'Failed to get length of "'+e+'"');if(t.isError(n))return n;if(!i&&r.tag!==e&&r.tagStr!==e&&r.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(r.primitive||null!==n)return t.skip(n,'Failed to match body of: "'+e+'"');const o=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(n=t.offset-o.offset,t.restore(o),t.skip(n,'Failed to match body of: "'+e+'"'))},Zp.prototype._skipUntilEnd=function(t,e){for(;;){const i=Wp(t,e);if(t.isError(i))return i;const r=Xp(t,i.primitive,e);if(t.isError(r))return r;let n;if(n=i.primitive||null!==r?t.skip(r):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===i.tagStr)break}},Zp.prototype._decodeList=function(t,e,i,r){const n=[];for(;!t.isEmpty();){const e=this._peekTag(t,"end");if(t.isError(e))return e;const o=i.decode(t,"der",r);if(t.isError(o)&&e)break;n.push(o)}return n},Zp.prototype._decodeStr=function(t,e){if("bitstr"===e){const e=t.readUInt8();return t.isError(e)?e:{unused:e,data:t.raw()}}if("bmpstr"===e){const e=t.raw();if(e.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");let i="";for(let t=0;t<e.length/2;t++)i+=String.fromCharCode(e.readUInt16BE(2*t));return i}if("numstr"===e){const e=t.raw().toString("ascii");return this._isNumstr(e)?e:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){const e=t.raw().toString("ascii");return this._isPrintstr(e)?e:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},Zp.prototype._decodeObjid=function(t,e,i){let r;const n=[];let o=0,s=0;for(;!t.isEmpty();)s=t.readUInt8(),o<<=7,o|=127&s,0==(128&s)&&(n.push(o),o=0);128&s&&n.push(o);const h=n[0]/40|0,a=n[0]%40;if(r=i?n:[h,a].concat(n.slice(1)),e){let t=e[r.join(" ")];void 0===t&&(t=e[r.join(".")]),void 0!==t&&(r=t)}return r},Zp.prototype._decodeTime=function(t,e){const i=t.raw().toString();let r,n,o,s,h,a;if("gentime"===e)r=0|i.slice(0,4),n=0|i.slice(4,6),o=0|i.slice(6,8),s=0|i.slice(8,10),h=0|i.slice(10,12),a=0|i.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");r=0|i.slice(0,2),n=0|i.slice(2,4),o=0|i.slice(4,6),s=0|i.slice(6,8),h=0|i.slice(8,10),a=0|i.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,n-1,o,s,h,a,0)},Zp.prototype._decodeNull=function(){return null},Zp.prototype._decodeBool=function(t){const e=t.readUInt8();return t.isError(e)?e:0!==e},Zp.prototype._decodeInt=function(t,e){const i=t.raw();let r=new Fp(i);return e&&(r=e[r.toString(10)]||r),r},Zp.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree};const Qp=xe,Jp=ap.Buffer,$p=Vp;function tm(t){$p.call(this,t),this.enc="pem"}Qp(tm,$p);var em=tm;tm.prototype.decode=function(t,e){const i=t.toString().split(/[\r\n]+/g),r=e.label.toUpperCase(),n=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,s=-1;for(let t=0;t<i.length;t++){const e=i[t].match(n);if(null!==e&&e[2]===r){if(-1!==o){if("END"!==e[1])break;s=t;break}if("BEGIN"!==e[1])break;o=t}}if(-1===o||-1===s)throw new Error("PEM section not found for: "+r);const h=i.slice(o+1,s).join("");h.replace(/[^a-z0-9+/=]+/gi,"");const a=Jp.from(h,"base64");return $p.prototype.decode.call(this,a,e)},function(t){const e=t;e.der=Vp,e.pem=em}(jp),function(t){const e=rp,i=jp,r=xe;function n(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}t.define=function(t,e){return new n(t,e)},n.prototype._createNamed=function(t){const e=this.name;function i(t){this._initNamed(t,e)}return r(i,t),i.prototype._initNamed=function(e,i){t.call(this,e,i)},new i(this)},n.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i[t])),this.decoders[t]},n.prototype.decode=function(t,e,i){return this._getDecoder(e).decode(t,i)},n.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(e[t])),this.encoders[t]},n.prototype.encode=function(t,e,i){return this._getEncoder(e).encode(t,i)}}(ip);var im={};!function(t){const e=t;e.Reporter=up.Reporter,e.DecoderBuffer=cp.DecoderBuffer,e.EncoderBuffer=cp.EncoderBuffer,e.Node=kp}(im);var rm={};!function(t){const e=rm;e._reverse=function(t){const e={};return Object.keys(t).forEach((function(i){(0|i)==i&&(i|=0);const r=t[i];e[r]=i})),e},e.der=Ip}(),function(t){const e=Jc;e.bignum=$c,e.define=ip.define,e.base=im,e.constants=rm,e.decoders=jp,e.encoders=rp}();var nm=Jc,om=nm.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),sm=nm.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),hm=nm.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),am=nm.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(hm),this.key("subjectPublicKey").bitstr())})),um=nm.define("RelativeDistinguishedName",(function(){this.setof(sm)})),fm=nm.define("RDNSequence",(function(){this.seqof(um)})),lm=nm.define("Name",(function(){this.choice({rdnSequence:this.use(fm)})})),dm=nm.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(om),this.key("notAfter").use(om))})),cm=nm.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),pm=nm.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(hm),this.key("issuer").use(lm),this.key("validity").use(dm),this.key("subject").use(lm),this.key("subjectPublicKeyInfo").use(am),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(cm).optional())})),mm=nm.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(pm),this.key("signatureAlgorithm").use(hm),this.key("signatureValue").bitstr())})),gm=Jc;Qc.certificate=mm;var vm=gm.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));Qc.RSAPrivateKey=vm;var bm=gm.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));Qc.RSAPublicKey=bm;var ym=gm.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(wm),this.key("subjectPublicKey").bitstr())}));Qc.PublicKey=ym;var wm=gm.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),Mm=gm.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(wm),this.key("subjectPrivateKey").octstr())}));Qc.PrivateKey=Mm;var _m=gm.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));Qc.EncryptedPrivateKey=_m;var Sm=gm.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));Qc.DSAPrivateKey=Sm,Qc.DSAparam=gm.define("DSAparam",(function(){this.int()}));var Em=gm.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(Am),this.key("publicKey").optional().explicit(1).bitstr())}));Qc.ECPrivateKey=Em;var Am=gm.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));Qc.signature=gm.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}));var km=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,Rm=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,Im=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,Om=mu,Tm=fa,Bm=Re.Buffer,Pm=Qc,Nm={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"},xm=function(t,e){var i,r=t.toString(),n=r.match(km);if(n){var o="aes"+n[1],s=Bm.from(n[2],"hex"),h=Bm.from(n[3].replace(/[\r\n]/g,""),"base64"),a=Om(e,s.slice(0,8),parseInt(n[1],10)).key,u=[],f=Tm.createDecipheriv(o,a,s);u.push(f.update(h)),u.push(f.final()),i=Bm.concat(u)}else{var l=r.match(Im);i=Bm.from(l[2].replace(/[\r\n]/g,""),"base64")}return{tag:r.match(Rm)[1],data:i}},Lm=fa,Dm=$s,Cm=Re.Buffer,qm=Um;function Um(t){var e;"object"!=typeof t||Cm.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=Cm.from(t));var i,r,n=xm(t,e),o=n.tag,s=n.data;switch(o){case"CERTIFICATE":r=Pm.certificate.decode(s,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(r||(r=Pm.PublicKey.decode(s,"der")),i=r.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Pm.RSAPublicKey.decode(r.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return r.subjectPrivateKey=r.subjectPublicKey,{type:"ec",data:r};case"1.2.840.10040.4.1":return r.algorithm.params.pub_key=Pm.DSAparam.decode(r.subjectPublicKey.data,"der"),{type:"dsa",data:r.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":s=function(t,e){var i=t.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=Nm[t.algorithm.decrypt.cipher.algo.join(".")],o=t.algorithm.decrypt.cipher.iv,s=t.subjectPrivateKey,h=parseInt(n.split("-")[1],10)/8,a=Dm.pbkdf2Sync(e,i,r,h,"sha1"),u=Lm.createDecipheriv(n,a,o),f=[];return f.push(u.update(s)),f.push(u.final()),Cm.concat(f)}(s=Pm.EncryptedPrivateKey.decode(s,"der"),e);case"PRIVATE KEY":switch(i=(r=Pm.PrivateKey.decode(s,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Pm.RSAPrivateKey.decode(r.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:r.algorithm.curve,privateKey:Pm.ECPrivateKey.decode(r.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return r.algorithm.params.priv_key=Pm.DSAparam.decode(r.subjectPrivateKey,"der"),{type:"dsa",params:r.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return Pm.RSAPublicKey.decode(s,"der");case"RSA PRIVATE KEY":return Pm.RSAPrivateKey.decode(s,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Pm.DSAPrivateKey.decode(s,"der")};case"EC PRIVATE KEY":return{curve:(s=Pm.ECPrivateKey.decode(s,"der")).parameters.value,privateKey:s.privateKey};default:throw new Error("unknown key type "+o)}}Um.signature=Pm.signature;var jm,zm,Fm,Hm,Km,Gm={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};function Ym(){if(jm)return gf;jm=1;var t=Re.Buffer,e=Zs,i=Ef,r=Xc().ec,n=bf,o=qm,s=Gm;function h(i,r,n,o){if((i=t.from(i.toArray())).length<r.byteLength()){var s=t.alloc(r.byteLength()-i.length);i=t.concat([s,i])}var h=n.length,u=function(e,i){e=a(e,i),e=e.mod(i);var r=t.from(e.toArray());if(r.length<i.byteLength()){var n=t.alloc(i.byteLength()-r.length);r=t.concat([n,r])}return r}(n,r),f=t.alloc(h);f.fill(1);var l=t.alloc(h);return l=e(o,l).update(f).update(t.from([0])).update(i).update(u).digest(),f=e(o,l).update(f).digest(),{k:l=e(o,l).update(f).update(t.from([1])).update(i).update(u).digest(),v:f=e(o,l).update(f).digest()}}function a(t,e){var i=new n(t),r=(t.length<<3)-e.bitLength();return r>0&&i.ishrn(r),i}function u(i,r,n){var o,s;do{for(o=t.alloc(0);8*o.length<i.bitLength();)r.v=e(n,r.k).update(r.v).digest(),o=t.concat([o,r.v]);s=a(o,i),r.k=e(n,r.k).update(r.v).update(t.from([0])).digest(),r.v=e(n,r.k).update(r.v).digest()}while(-1!==s.cmp(i));return s}function f(t,e,i,r){return t.toRed(n.mont(i)).redPow(e).fromRed().mod(r)}return vf.exports=function(e,l,d,c,p){var m=o(l);if(m.curve){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong private key type");return function(e,i){var n=s[i.curve.join(".")];if(!n)throw new Error("unknown curve "+i.curve.join("."));var o=new r(n),h=o.keyFromPrivate(i.privateKey),a=h.sign(e);return t.from(a.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==c)throw new Error("wrong private key type");return function(e,i,r){var o,s=i.params.priv_key,l=i.params.p,d=i.params.q,c=i.params.g,p=new n(0),m=a(e,d).mod(d),g=!1,v=h(s,d,e,r);for(;!1===g;)p=f(c,o=u(d,v,r),l,d),0===(g=o.invm(d).imul(m.add(s.mul(p))).mod(d)).cmpn(0)&&(g=!1,p=new n(0));return function(e,i){e=e.toArray(),i=i.toArray(),128&e[0]&&(e=[0].concat(e));128&i[0]&&(i=[0].concat(i));var r=e.length+i.length+4,n=[48,r,2,e.length];return n=n.concat(e,[2,i.length],i),t.from(n)}(p,g)}(e,m,d)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong private key type");e=t.concat([p,e]);for(var g=m.modulus.byteLength(),v=[0,1];e.length+v.length+1<g;)v.push(255);v.push(0);for(var b=-1;++b<e.length;)v.push(e[b]);return i(v,m)},gf.getKey=h,gf.makeKey=u,gf}function Vm(){if(Fm)return zm;Fm=1;var t=Re.Buffer,e=bf,i=Xc().ec,r=qm,n=Gm;function o(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}return zm=function(s,h,a,u,f){var l=r(a);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,r){var o=n[r.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var s=new i(o),h=r.data.subjectPrivateKey.data;return s.verify(e,t,h)}(s,h,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,i,n){var s=n.data.p,h=n.data.q,a=n.data.g,u=n.data.pub_key,f=r.signature.decode(t,"der"),l=f.s,d=f.r;o(l,h),o(d,h);var c=e.mont(s),p=l.invm(h),m=a.toRed(c).redPow(new e(i).mul(p).mod(h)).fromRed().mul(u.toRed(c).redPow(d.mul(p).mod(h)).fromRed()).mod(s).mod(h);return 0===m.cmp(d)}(s,h,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");h=t.concat([f,h]);for(var d=l.modulus.byteLength(),c=[1],p=0;h.length+c.length+2<d;)c.push(255),p++;c.push(0);for(var m=-1;++m<h.length;)c.push(h[m]);c=t.from(c);var g=e.mont(l.modulus);s=(s=new e(s).toRed(g)).redPow(new e(l.publicExponent)),s=t.from(s.fromRed().toArray());var v=p<8?1:0;for(d=Math.min(s.length,c.length),s.length!==c.length&&(v=1),m=-1;++m<d;)v|=s[m]^c[m];return 0===v},zm}var Zm,Wm,Xm={},Qm={get exports(){return Xm},set exports(t){Xm=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Qm,Tt);var Jm={},$m=Ts,tg=Re.Buffer,eg=function(t,e){for(var i,r=tg.alloc(0),n=0;r.length<e;)i=ig(n++),r=tg.concat([r,$m("sha1").update(t).update(i).digest()]);return r.slice(0,e)};function ig(t){var e=tg.allocUnsafe(4);return e.writeUInt32BE(t,0),e}var rg=function(t,e){for(var i=t.length,r=-1;++r<i;)t[r]^=e[r];return t},ng={},og={get exports(){return ng},set exports(t){ng=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Oe.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},m.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},m.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(og,Tt);var sg=ng,hg=Re.Buffer;var ag=function(t,e){return hg.from(t.toRed(sg.mont(e.modulus)).redPow(new sg(e.publicExponent)).fromRed().toArray())},ug=qm,fg=Ae,lg=Ts,dg=eg,cg=rg,pg=ng,mg=ag,gg=Ef,vg=Re.Buffer,bg=function(t,e,i){var r;r=t.padding?t.padding:i?1:4;var n,o=ug(t);if(4===r)n=function(t,e){var i=t.modulus.byteLength(),r=e.length,n=lg("sha1").update(vg.alloc(0)).digest(),o=n.length,s=2*o;if(r>i-s-2)throw new Error("message too long");var h=vg.alloc(i-r-s-2),a=i-o-1,u=fg(o),f=cg(vg.concat([n,h,vg.alloc(1,1),e],a),dg(u,a)),l=cg(u,dg(f,o));return new pg(vg.concat([vg.alloc(1),l,f],i))}(o,e);else if(1===r)n=function(t,e,i){var r,n=e.length,o=t.modulus.byteLength();if(n>o-11)throw new Error("message too long");r=i?vg.alloc(o-n-3,255):function(t){var e,i=vg.allocUnsafe(t),r=0,n=fg(2*t),o=0;for(;r<t;)o===n.length&&(n=fg(2*t),o=0),(e=n[o++])&&(i[r++]=e);return i}(o-n-3);return new pg(vg.concat([vg.from([0,i?1:2]),r,vg.alloc(1),e],o))}(o,e,i);else{if(3!==r)throw new Error("unknown padding");if((n=new pg(e)).cmp(o.modulus)>=0)throw new Error("data too long for modulus")}return i?gg(n,o):mg(n,o)};var yg=qm,wg=eg,Mg=rg,_g=ng,Sg=Ef,Eg=Ts,Ag=ag,kg=Re.Buffer,Rg=function(t,e,i){var r;r=t.padding?t.padding:i?1:4;var n,o=yg(t),s=o.modulus.byteLength();if(e.length>s||new _g(e).cmp(o.modulus)>=0)throw new Error("decryption error");n=i?Ag(new _g(e),o):Sg(e,o);var h=kg.alloc(s-n.length);if(n=kg.concat([h,n],s),4===r)return function(t,e){var i=t.modulus.byteLength(),r=Eg("sha1").update(kg.alloc(0)).digest(),n=r.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,n+1),s=e.slice(n+1),h=Mg(o,wg(s,n)),a=Mg(s,wg(h,i-n-1));if(function(t,e){t=kg.from(t),e=kg.from(e);var i=0,r=t.length;t.length!==e.length&&(i++,r=Math.min(t.length,e.length));var n=-1;for(;++n<r;)i+=t[n]^e[n];return i}(r,a.slice(0,n)))throw new Error("decryption error");var u=n;for(;0===a[u];)u++;if(1!==a[u++])throw new Error("decryption error");return a.slice(u)}(o,n);if(1===r)return function(t,e,i){var r=e.slice(0,2),n=2,o=0;for(;0!==e[n++];)if(n>=e.length){o++;break}var s=e.slice(2,n-1);("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(n)}(0,n,i);if(3===r)return n;throw new Error("unknown padding")};!function(t){t.publicEncrypt=bg,t.privateDecrypt=Rg,t.privateEncrypt=function(e,i){return t.publicEncrypt(e,i,!0)},t.publicDecrypt=function(e,i){return t.privateDecrypt(e,i,!0)}}(Jm);var Ig={};function Og(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var Tg,Bg=Re,Pg=Ae,Ng=Bg.Buffer,xg=Bg.kMaxLength,Lg=Tt.crypto||Tt.msCrypto,Dg=Math.pow(2,32)-1;function Cg(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>Dg||t<0)throw new TypeError("offset must be a uint32");if(t>xg||t>e)throw new RangeError("offset out of range")}function qg(t,e,i){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>Dg||t<0)throw new TypeError("size must be a uint32");if(t+e>i||t>xg)throw new RangeError("buffer too small")}function Ug(t,e,i,r){if(_e.browser){var n=t.buffer,o=new Uint8Array(n,e,i);return Lg.getRandomValues(o),r?void _e.nextTick((function(){r(null,t)})):t}if(!r)return Pg(i).copy(t,e),t;Pg(i,(function(i,n){if(i)return r(i);n.copy(t,e),r(null,t)}))}function jg(){if(Tg)return Ee;Tg=1,Ee.randomBytes=Ee.rng=Ee.pseudoRandomBytes=Ee.prng=Ae,Ee.createHash=Ee.Hash=Ts,Ee.createHmac=Ee.Hmac=Zs;var t=Ws,e=Object.keys(t),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);Ee.getHashes=function(){return i};var r=$s;Ee.pbkdf2=r.pbkdf2,Ee.pbkdf2Sync=r.pbkdf2Sync;var n=Ih;Ee.Cipher=n.Cipher,Ee.createCipher=n.createCipher,Ee.Cipheriv=n.Cipheriv,Ee.createCipheriv=n.createCipheriv,Ee.Decipher=n.Decipher,Ee.createDecipher=n.createDecipher,Ee.Decipheriv=n.Decipheriv,Ee.createDecipheriv=n.createDecipheriv,Ee.getCiphers=n.getCiphers,Ee.listCiphers=n.listCiphers;var o=function(){if(cf)return Wu;cf=1;var t=ff(),e=pf,i=mf(),r={binary:!0,hex:!0,base64:!0};return Wu.DiffieHellmanGroup=Wu.createDiffieHellmanGroup=Wu.getDiffieHellman=function(t){var r=new K(e[t].prime,"hex"),n=new K(e[t].gen,"hex");return new i(r,n)},Wu.createDiffieHellman=Wu.DiffieHellman=function e(n,o,s,h){return K.isBuffer(o)||void 0===r[o]?e(n,"binary",o,s):(o=o||"binary",h=h||"binary",s=s||new K([2]),K.isBuffer(s)||(s=new K(s,h)),"number"==typeof n?new i(t(n,s),s,!0):(K.isBuffer(n)||(n=new K(n,o)),new i(n,s,!0)))},Wu}();Ee.DiffieHellmanGroup=o.DiffieHellmanGroup,Ee.createDiffieHellmanGroup=o.createDiffieHellmanGroup,Ee.getDiffieHellman=o.getDiffieHellman,Ee.createDiffieHellman=o.createDiffieHellman,Ee.DiffieHellman=o.DiffieHellman;var s=function(){if(Km)return Hm;Km=1;var t=Re.Buffer,e=Ts,i=De,r=xe,n=Ym(),o=Vm(),s=Qs;function h(t){i.Writable.call(this);var r=s[t];if(!r)throw new Error("Unknown message digest");this._hashType=r.hash,this._hash=e(r.hash),this._tag=r.id,this._signType=r.sign}function a(t){i.Writable.call(this);var r=s[t];if(!r)throw new Error("Unknown message digest");this._hash=e(r.hash),this._tag=r.id,this._signType=r.sign}function u(t){return new h(t)}function f(t){return new a(t)}return Object.keys(s).forEach((function(e){s[e].id=t.from(s[e].id,"hex"),s[e.toLowerCase()]=s[e]})),r(h,i.Writable),h.prototype._write=function(t,e,i){this._hash.update(t),i()},h.prototype.update=function(e,i){return"string"==typeof e&&(e=t.from(e,i)),this._hash.update(e),this},h.prototype.sign=function(t,e){this.end();var i=this._hash.digest(),r=n(i,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},r(a,i.Writable),a.prototype._write=function(t,e,i){this._hash.update(t),i()},a.prototype.update=function(e,i){return"string"==typeof e&&(e=t.from(e,i)),this._hash.update(e),this},a.prototype.verify=function(e,i,r){"string"==typeof i&&(i=t.from(i,r)),this.end();var n=this._hash.digest();return o(i,n,e,this._signType,this._tag)},Hm={Sign:u,Verify:f,createSign:u,createVerify:f}}();Ee.createSign=s.createSign,Ee.Sign=s.Sign,Ee.createVerify=s.createVerify,Ee.Verify=s.Verify,Ee.createECDH=function(){if(Wm)return Zm;Wm=1;var t=Xc(),e=Xm;Zm=function(t){return new r(t)};var i={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function r(e){this.curveType=i[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function n(t,e,i){Array.isArray(t)||(t=t.toArray());var r=new K(t);if(i&&r.length<i){var n=new K(i-r.length);n.fill(0),r=K.concat([n,r])}return e?r.toString(e):r}return i.p224=i.secp224r1,i.p256=i.secp256r1=i.prime256v1,i.p192=i.secp192r1=i.prime192v1,i.p384=i.secp384r1,i.p521=i.secp521r1,r.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},r.prototype.computeSecret=function(t,e,i){return e=e||"utf8",K.isBuffer(t)||(t=new K(t,e)),n(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),i,this.curveType.byteLength)},r.prototype.getPublicKey=function(t,e){var i=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(i[i.length-1]%2?i[0]=7:i[0]=6),n(i,t)},r.prototype.getPrivateKey=function(t){return n(this.keys.getPrivate(),t)},r.prototype.setPublicKey=function(t,e){return e=e||"utf8",K.isBuffer(t)||(t=new K(t,e)),this.keys._importPublic(t),this},r.prototype.setPrivateKey=function(t,i){i=i||"utf8",K.isBuffer(t)||(t=new K(t,i));var r=new e(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this},Zm}();var h=Jm;Ee.publicEncrypt=h.publicEncrypt,Ee.privateEncrypt=h.privateEncrypt,Ee.publicDecrypt=h.publicDecrypt,Ee.privateDecrypt=h.privateDecrypt;var a=Ig;return Ee.randomFill=a.randomFill,Ee.randomFillSync=a.randomFillSync,Ee.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},Ee.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},Ee}Lg&&Lg.getRandomValues||!_e.browser?(Ig.randomFill=function(t,e,i,r){if(!(Ng.isBuffer(t)||t instanceof Tt.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)r=e,e=0,i=t.length;else if("function"==typeof i)r=i,i=t.length-e;else if("function"!=typeof r)throw new TypeError('"cb" argument must be a function');return Cg(e,t.length),qg(i,e,t.length),Ug(t,e,i,r)},Ig.randomFillSync=function(t,e,i){void 0===e&&(e=0);if(!(Ng.isBuffer(t)||t instanceof Tt.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');Cg(e,t.length),void 0===i&&(i=t.length-e);return qg(i,e,t.length),Ug(t,e,i)}):(Ig.randomFill=Og,Ig.randomFillSync=Og),jg(),Se.linebrk=function(t,e){for(var i="",r=0;r+e<t.length;)i+=t.substring(r,r+e)+"\n",r+=e;return i+t.substring(r,t.length)},Se.detectEnvironment=function(){return"undefined"==typeof window||!window||_e&&"node"===_e.title?"node":"browser"},Se.get32IntFromBuffer=function(t,e){e=e||0;var i;if((i=t.length-e)>0){if(i>=4)return t.readUIntBE(e,i);for(var r=0,n=e+i,o=0;n>e;n--,o+=2)r+=t[n-1]*Math.pow(16,o);return r}return NaN},Se._={isObject:function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)},isString:function(t){return"string"==typeof t||t instanceof String},isNumber:function(t){return"number"==typeof t||!isNaN(parseFloat(t))&&isFinite(t)},omit:function(t,e){var i={};for(var r in t)t.hasOwnProperty(r)&&r!==e&&(i[r]=t[r]);return i}},Se.trimSurroundingText=function(t,e,i){var r=0,n=t.length,o=t.indexOf(e);o>=0&&(r=o+e.length);var s=t.indexOf(i,o);return s>=0&&(n=s),t.substring(r,n)};var zg=jg(),Fg=Se._;function Hg(t,e){null!=t&&("number"==typeof t?this.fromNumber(t,e):K.isBuffer(t)?this.fromBuffer(t):null==e&&"string"!=typeof t?this.fromByteArray(t):this.fromString(t,e))}function Kg(){return new Hg(null)}Hg.prototype.am=function(t,e,i,r,n,o){for(var s=16383&e,h=e>>14;--o>=0;){var a=16383&this[t],u=this[t++]>>14,f=h*a+u*s;n=((a=s*a+((16383&f)<<14)+i[r]+n)>>28)+(f>>14)+h*u,i[r++]=268435455&a}return n},Hg.prototype.DB=28,Hg.prototype.DM=268435455,Hg.prototype.DV=1<<28;Hg.prototype.FV=Math.pow(2,52),Hg.prototype.F1=24,Hg.prototype.F2=4;var Gg,Yg,Vg="0123456789abcdefghijklmnopqrstuvwxyz",Zg=new Array;for(Gg="0".charCodeAt(0),Yg=0;Yg<=9;++Yg)Zg[Gg++]=Yg;for(Gg="a".charCodeAt(0),Yg=10;Yg<36;++Yg)Zg[Gg++]=Yg;for(Gg="A".charCodeAt(0),Yg=10;Yg<36;++Yg)Zg[Gg++]=Yg;function Wg(t){return Vg.charAt(t)}function Xg(t,e){var i=Zg[t.charCodeAt(e)];return null==i?-1:i}function Qg(t){var e=Kg();return e.fromInt(t),e}function Jg(t){var e,i=1;return 0!=(e=t>>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=(e=t>>1)&&(t=e,i+=1),i}function $g(t){this.m=t}function tv(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function ev(t,e){return t&e}function iv(t,e){return t|e}function rv(t,e){return t^e}function nv(t,e){return t&~e}function ov(t){if(0===t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function sv(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function hv(){}function av(t){return t}function uv(t){this.r2=Kg(),this.q3=Kg(),Hg.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}$g.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},$g.prototype.revert=function(t){return t},$g.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},$g.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},$g.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},tv.prototype.convert=function(t){var e=Kg();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(Hg.ZERO)>0&&this.m.subTo(e,e),e},tv.prototype.revert=function(t){var e=Kg();return t.copyTo(e),this.reduce(e),e},tv.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var i=32767&t[e],r=i*this.mpl+((i*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},tv.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},tv.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},hv.prototype.convert=av,hv.prototype.revert=av,hv.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i)},hv.prototype.sqrTo=function(t,e){t.squareTo(e)},uv.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=Kg();return t.copyTo(e),this.reduce(e),e},uv.prototype.revert=function(t){return t},uv.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},uv.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},uv.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var fv=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lv=(1<<26)/fv[fv.length-1];Hg.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},Hg.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0},Hg.prototype.fromString=function(t,e,i){var r;switch(e){case 2:r=1;break;case 4:r=2;break;case 8:r=3;break;case 16:r=4;break;case 32:r=5;break;case 256:r=8;break;default:return void this.fromRadix(t,e)}this.t=0,this.s=0;for(var n=t.length,o=!1,s=0;--n>=0;){var h=8==r?255&t[n]:Xg(t,n);h<0?"-"==t.charAt(n)&&(o=!0):(o=!1,0===s?this[this.t++]=h:s+r>this.DB?(this[this.t-1]|=(h&(1<<this.DB-s)-1)<<s,this[this.t++]=h>>this.DB-s):this[this.t-1]|=h<<s,(s+=r)>=this.DB&&(s-=this.DB))}i||8!=r||0==(128&t[0])||(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&Hg.ZERO.subTo(this,this)},Hg.prototype.fromByteArray=function(t,e){this.fromString(t,256,e)},Hg.prototype.fromBuffer=function(t){this.fromString(t,256,!0)},Hg.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},Hg.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s},Hg.prototype.drShiftTo=function(t,e){for(var i=t;i<this.t;++i)e[i-t]=this[i];e.t=Math.max(this.t-t,0),e.s=this.s},Hg.prototype.lShiftTo=function(t,e){var i,r=t%this.DB,n=this.DB-r,o=(1<<n)-1,s=Math.floor(t/this.DB),h=this.s<<r&this.DM;for(i=this.t-1;i>=0;--i)e[i+s+1]=this[i]>>n|h,h=(this[i]&o)<<r;for(i=s-1;i>=0;--i)e[i]=0;e[s]=h,e.t=this.t+s+1,e.s=this.s,e.clamp()},Hg.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var r=t%this.DB,n=this.DB-r,o=(1<<r)-1;e[0]=this[i]>>r;for(var s=i+1;s<this.t;++s)e[s-i-1]|=(this[s]&o)<<n,e[s-i]=this[s]>>r;r>0&&(e[this.t-i-1]|=(this.s&o)<<n),e.t=this.t-i,e.clamp()}},Hg.prototype.subTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]-t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r-=t[i],e[i++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[i++]=this.DV+r:r>0&&(e[i++]=r),e.t=i,e.clamp()},Hg.prototype.multiplyTo=function(t,e){var i=this.abs(),r=t.abs(),n=i.t;for(e.t=n+r.t;--n>=0;)e[n]=0;for(n=0;n<r.t;++n)e[n+i.t]=i.am(0,r[n],e,n,0,i.t);e.s=0,e.clamp(),this.s!=t.s&&Hg.ZERO.subTo(e,e)},Hg.prototype.squareTo=function(t){for(var e=this.abs(),i=t.t=2*e.t;--i>=0;)t[i]=0;for(i=0;i<e.t-1;++i){var r=e.am(i,e[i],t,2*i,0,1);(t[i+e.t]+=e.am(i+1,2*e[i],t,2*i+1,r,e.t-i-1))>=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},Hg.prototype.divRemTo=function(t,e,i){var r=t.abs();if(!(r.t<=0)){var n=this.abs();if(n.t<r.t)return null!=e&&e.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=Kg());var o=Kg(),s=this.s,h=t.s,a=this.DB-Jg(r[r.t-1]);a>0?(r.lShiftTo(a,o),n.lShiftTo(a,i)):(r.copyTo(o),n.copyTo(i));var u=o.t,f=o[u-1];if(0!==f){var l=f*(1<<this.F1)+(u>1?o[u-2]>>this.F2:0),d=this.FV/l,c=(1<<this.F1)/l,p=1<<this.F2,m=i.t,g=m-u,v=null==e?Kg():e;for(o.dlShiftTo(g,v),i.compareTo(v)>=0&&(i[i.t++]=1,i.subTo(v,i)),Hg.ONE.dlShiftTo(u,v),v.subTo(o,o);o.t<u;)o[o.t++]=0;for(;--g>=0;){var b=i[--m]==f?this.DM:Math.floor(i[m]*d+(i[m-1]+p)*c);if((i[m]+=o.am(0,b,i,g,0,u))<b)for(o.dlShiftTo(g,v),i.subTo(v,i);i[m]<--b;)i.subTo(v,i)}null!=e&&(i.drShiftTo(u,e),s!=h&&Hg.ZERO.subTo(e,e)),i.t=u,i.clamp(),a>0&&i.rShiftTo(a,i),s<0&&Hg.ZERO.subTo(i,i)}}},Hg.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},Hg.prototype.isEven=function(){return 0===(this.t>0?1&this[0]:this.s)},Hg.prototype.exp=function(t,e){if(t>4294967295||t<1)return Hg.ONE;var i=Kg(),r=Kg(),n=e.convert(this),o=Jg(t)-1;for(n.copyTo(i);--o>=0;)if(e.sqrTo(i,r),(t&1<<o)>0)e.mulTo(r,n,i);else{var s=i;i=r,r=s}return e.revert(i)},Hg.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},Hg.prototype.toRadix=function(t){if(null==t&&(t=10),0===this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),r=Qg(i),n=Kg(),o=Kg(),s="";for(this.divRemTo(r,n,o);n.signum()>0;)s=(i+o.intValue()).toString(t).substr(1)+s,n.divRemTo(r,n,o);return o.intValue().toString(t)+s},Hg.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var i=this.chunkSize(e),r=Math.pow(e,i),n=!1,o=0,s=0,h=0;h<t.length;++h){var a=Xg(t,h);a<0?"-"==t.charAt(h)&&0===this.signum()&&(n=!0):(s=e*s+a,++o>=i&&(this.dMultiply(r),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),n&&Hg.ZERO.subTo(this,this)},Hg.prototype.fromNumber=function(t,e){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t),this.testBit(t-1)||this.bitwiseTo(Hg.ONE.shiftLeft(t-1),iv,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(Hg.ONE.shiftLeft(t-1),this);else{var i=zg.randomBytes(1+(t>>3)),r=7&t;r>0?i[0]&=(1<<r)-1:i[0]=0,this.fromByteArray(i)}},Hg.prototype.bitwiseTo=function(t,e,i){var r,n,o=Math.min(t.t,this.t);for(r=0;r<o;++r)i[r]=e(this[r],t[r]);if(t.t<this.t){for(n=t.s&this.DM,r=o;r<this.t;++r)i[r]=e(this[r],n);i.t=this.t}else{for(n=this.s&this.DM,r=o;r<t.t;++r)i[r]=e(n,t[r]);i.t=t.t}i.s=e(this.s,t.s),i.clamp()},Hg.prototype.changeBit=function(t,e){var i=Hg.ONE.shiftLeft(t);return this.bitwiseTo(i,e,i),i},Hg.prototype.addTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]+t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r+=t[i],e[i++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[i++]=r:r<-1&&(e[i++]=this.DV+r),e.t=i,e.clamp()},Hg.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},Hg.prototype.dAddOffset=function(t,e){if(0!==t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},Hg.prototype.multiplyLowerTo=function(t,e,i){var r,n=Math.min(this.t+t.t,e);for(i.s=0,i.t=n;n>0;)i[--n]=0;for(r=i.t-this.t;n<r;++n)i[n+this.t]=this.am(0,t[n],i,n,0,this.t);for(r=Math.min(t.t,e);n<r;++n)this.am(0,t[n],i,n,0,e-n);i.clamp()},Hg.prototype.multiplyUpperTo=function(t,e,i){--e;var r=i.t=this.t+t.t-e;for(i.s=0;--r>=0;)i[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)i[this.t+r-e]=this.am(e-r,t[r],i,0,0,this.t+r-e);i.clamp(),i.drShiftTo(1,i)},Hg.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,i=this.s<0?t-1:0;if(this.t>0)if(0===e)i=this[0]%t;else for(var r=this.t-1;r>=0;--r)i=(e*i+this[r])%t;return i},Hg.prototype.millerRabin=function(t){var e=this.subtract(Hg.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var r=e.shiftRight(i);(t=t+1>>1)>fv.length&&(t=fv.length);for(var n=Kg(),o=0;o<t;++o){n.fromInt(fv[Math.floor(Math.random()*fv.length)]);var s=n.modPow(r,this);if(0!=s.compareTo(Hg.ONE)&&0!=s.compareTo(e)){for(var h=1;h++<i&&0!=s.compareTo(e);)if(0===(s=s.modPowInt(2,this)).compareTo(Hg.ONE))return!1;if(0!=s.compareTo(e))return!1}}return!0},Hg.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var i,r=(1<<e)-1,n=!1,o="",s=this.t,h=this.DB-s*this.DB%e;if(s-- >0)for(h<this.DB&&(i=this[s]>>h)>0&&(n=!0,o=Wg(i));s>=0;)h<e?(i=(this[s]&(1<<h)-1)<<e-h,i|=this[--s]>>(h+=this.DB-e)):(i=this[s]>>(h-=e)&r,h<=0&&(h+=this.DB,--s)),i>0&&(n=!0),n&&(o+=Wg(i));return n?o:"0"},Hg.prototype.negate=function(){var t=Kg();return Hg.ZERO.subTo(this,t),t},Hg.prototype.abs=function(){return this.s<0?this.negate():this},Hg.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var i=this.t;if(0!=(e=i-t.t))return this.s<0?-e:e;for(;--i>=0;)if(0!=(e=this[i]-t[i]))return e;return 0},Hg.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Jg(this[this.t-1]^this.s&this.DM)},Hg.prototype.mod=function(t){var e=Kg();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Hg.ZERO)>0&&t.subTo(e,e),e},Hg.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new $g(e):new tv(e),this.exp(t,i)},Hg.prototype.clone=function(){var t=Kg();return this.copyTo(t),t},Hg.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0===this.t)return-1}else{if(1==this.t)return this[0];if(0===this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},Hg.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},Hg.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},Hg.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},Hg.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var i,r=this.DB-t*this.DB%8,n=0;if(t-- >0)for(r<this.DB&&(i=this[t]>>r)!=(this.s&this.DM)>>r&&(e[n++]=i|this.s<<this.DB-r);t>=0;)r<8?(i=(this[t]&(1<<r)-1)<<8-r,i|=this[--t]>>(r+=this.DB-8)):(i=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&i)&&(i|=-256),0===n&&(128&this.s)!=(128&i)&&++n,(n>0||i!=this.s)&&(e[n++]=i);return e},Hg.prototype.toBuffer=function(t){var e=K.from(this.toByteArray());if(!0===t&&0===e[0])e=e.slice(1);else if(Fg.isNumber(t)){if(e.length>t){for(var i=0;i<e.length-t;i++)if(0!==e[i])return null;return e.slice(e.length-t)}if(e.length<t){var r=K.alloc(t);return r.fill(0,0,t-e.length),e.copy(r,t-e.length),r}}return e},Hg.prototype.equals=function(t){return 0==this.compareTo(t)},Hg.prototype.min=function(t){return this.compareTo(t)<0?this:t},Hg.prototype.max=function(t){return this.compareTo(t)>0?this:t},Hg.prototype.and=function(t){var e=Kg();return this.bitwiseTo(t,ev,e),e},Hg.prototype.or=function(t){var e=Kg();return this.bitwiseTo(t,iv,e),e},Hg.prototype.xor=function(t){var e=Kg();return this.bitwiseTo(t,rv,e),e},Hg.prototype.andNot=function(t){var e=Kg();return this.bitwiseTo(t,nv,e),e},Hg.prototype.not=function(){for(var t=Kg(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},Hg.prototype.shiftLeft=function(t){var e=Kg();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},Hg.prototype.shiftRight=function(t){var e=Kg();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},Hg.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+ov(this[t]);return this.s<0?this.t*this.DB:-1},Hg.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,i=0;i<this.t;++i)t+=sv(this[i]^e);return t},Hg.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},Hg.prototype.setBit=function(t){return this.changeBit(t,iv)},Hg.prototype.clearBit=function(t){return this.changeBit(t,nv)},Hg.prototype.flipBit=function(t){return this.changeBit(t,rv)},Hg.prototype.add=function(t){var e=Kg();return this.addTo(t,e),e},Hg.prototype.subtract=function(t){var e=Kg();return this.subTo(t,e),e},Hg.prototype.multiply=function(t){var e=Kg();return this.multiplyTo(t,e),e},Hg.prototype.divide=function(t){var e=Kg();return this.divRemTo(t,e,null),e},Hg.prototype.remainder=function(t){var e=Kg();return this.divRemTo(t,null,e),e},Hg.prototype.divideAndRemainder=function(t){var e=Kg(),i=Kg();return this.divRemTo(t,e,i),new Array(e,i)},Hg.prototype.modPow=function(t,e){var i,r,n=t.bitLength(),o=Qg(1);if(n<=0)return o;i=n<18?1:n<48?3:n<144?4:n<768?5:6,r=n<8?new $g(e):e.isEven()?new uv(e):new tv(e);var s=new Array,h=3,a=i-1,u=(1<<i)-1;if(s[1]=r.convert(this),i>1){var f=Kg();for(r.sqrTo(s[1],f);h<=u;)s[h]=Kg(),r.mulTo(f,s[h-2],s[h]),h+=2}var l,d,c=t.t-1,p=!0,m=Kg();for(n=Jg(t[c])-1;c>=0;){for(n>=a?l=t[c]>>n-a&u:(l=(t[c]&(1<<n+1)-1)<<a-n,c>0&&(l|=t[c-1]>>this.DB+n-a)),h=i;0==(1&l);)l>>=1,--h;if((n-=h)<0&&(n+=this.DB,--c),p)s[l].copyTo(o),p=!1;else{for(;h>1;)r.sqrTo(o,m),r.sqrTo(m,o),h-=2;h>0?r.sqrTo(o,m):(d=o,o=m,m=d),r.mulTo(m,s[l],o)}for(;c>=0&&0==(t[c]&1<<n);)r.sqrTo(o,m),d=o,o=m,m=d,--n<0&&(n=this.DB-1,--c)}return r.revert(o)},Hg.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0===t.signum())return Hg.ZERO;for(var i=t.clone(),r=this.clone(),n=Qg(1),o=Qg(0),s=Qg(0),h=Qg(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),e?(n.isEven()&&o.isEven()||(n.addTo(this,n),o.subTo(t,o)),n.rShiftTo(1,n)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),e?(s.isEven()&&h.isEven()||(s.addTo(this,s),h.subTo(t,h)),s.rShiftTo(1,s)):h.isEven()||h.subTo(t,h),h.rShiftTo(1,h);i.compareTo(r)>=0?(i.subTo(r,i),e&&n.subTo(s,n),o.subTo(h,o)):(r.subTo(i,r),e&&s.subTo(n,s),h.subTo(o,h))}return 0!=r.compareTo(Hg.ONE)?Hg.ZERO:h.compareTo(t)>=0?h.subtract(t):h.signum()<0?(h.addTo(t,h),h.signum()<0?h.add(t):h):h},Hg.prototype.pow=function(t){return this.exp(t,new hv)},Hg.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var r=e;e=i,i=r}var n=e.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)return e;for(n<o&&(o=n),o>0&&(e.rShiftTo(o,e),i.rShiftTo(o,i));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=i.getLowestSetBit())>0&&i.rShiftTo(n,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return o>0&&i.lShiftTo(o,i),i},Hg.prototype.isProbablePrime=function(t){var e,i=this.abs();if(1==i.t&&i[0]<=fv[fv.length-1]){for(e=0;e<fv.length;++e)if(i[0]==fv[e])return!0;return!1}if(i.isEven())return!1;for(e=1;e<fv.length;){for(var r=fv[e],n=e+1;n<fv.length&&r<lv;)r*=fv[n++];for(r=i.modInt(r);e<n;)if(r%fv[e++]==0)return!1}return i.millerRabin(t)},Hg.int2char=Wg,Hg.ZERO=Qg(0),Hg.ONE=Qg(1),Hg.prototype.square=function(){var t=Kg();return this.squareTo(t),t};var dv=Hg,cv={},pv={get exports(){return cv},set exports(t){cv=t}},mv={},gv={get exports(){return mv},set exports(t){mv=t}},vv=dv,bv=jg(),yv=Xt,wv={md2:K.from("3020300c06082a864886f70d020205000410","hex"),md5:K.from("3020300c06082a864886f70d020505000410","hex"),sha1:K.from("3021300906052b0e03021a05000414","hex"),sha224:K.from("302d300d06096086480165030402040500041c","hex"),sha256:K.from("3031300d060960864801650304020105000420","hex"),sha384:K.from("3041300d060960864801650304020205000430","hex"),sha512:K.from("3051300d060960864801650304020305000440","hex"),ripemd160:K.from("3021300906052b2403020105000414","hex"),rmd160:K.from("3021300906052b2403020105000414","hex")},Mv={ripemd160:"rmd160"},_v="sha256";gv.exports={isEncryption:!0,isSignature:!0},mv.makeScheme=function(t,e){function i(t,e){this.key=t,this.options=e}return i.prototype.maxMessageLength=function(){return this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==yv.RSA_NO_PADDING?this.key.encryptedDataLength:this.key.encryptedDataLength-11},i.prototype.encPad=function(t,e){var i;if(e=e||{},t.length>this.key.maxMessageLength)throw new Error("Message too long for RSA (n="+this.key.encryptedDataLength+", l="+t.length+")");if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==yv.RSA_NO_PADDING)return(i=K.alloc(this.key.maxMessageLength-t.length)).fill(0),K.concat([i,t]);if(1===e.type)return(i=K.alloc(this.key.encryptedDataLength-t.length-1)).fill(255,0,i.length-1),i[0]=1,i[i.length-1]=0,K.concat([i,t]);(i=K.alloc(this.key.encryptedDataLength-t.length))[0]=0,i[1]=2;for(var r=bv.randomBytes(i.length-3),n=0;n<r.length;n++){for(var o=r[n];0===o;)o=bv.randomBytes(1)[0];i[n+2]=o}return i[i.length-1]=0,K.concat([i,t])},i.prototype.encUnPad=function(t,e){e=e||{};var i=0;if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==yv.RSA_NO_PADDING)return"function"==typeof t.lastIndexOf?t.slice(t.lastIndexOf("\0")+1,t.length):t.slice(String.prototype.lastIndexOf.call(t,"\0")+1,t.length);if(t.length<4)return null;if(1===e.type){if(0!==t[0]||1!==t[1])return null;for(i=3;0!==t[i];)if(255!=t[i]||++i>=t.length)return null}else{if(0!==t[0]||2!==t[1])return null;for(i=3;0!==t[i];)if(++i>=t.length)return null}return t.slice(i+1,t.length)},i.prototype.sign=function(t){var e=this.options.signingSchemeOptions.hash||_v;if("browser"===this.options.environment){e=Mv[e]||e;var i=bv.createHash(e);i.update(t);var r=this.pkcs1pad(i.digest(),e);return this.key.$doPrivate(new vv(r)).toBuffer(this.key.encryptedDataLength)}var n=bv.createSign("RSA-"+e.toUpperCase());return n.update(t),n.sign(this.options.rsaUtils.exportKey("private"))},i.prototype.verify=function(t,e,i){if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==yv.RSA_NO_PADDING)return!1;var r=this.options.signingSchemeOptions.hash||_v;if("browser"===this.options.environment){r=Mv[r]||r,i&&(e=K.from(e,i));var n=bv.createHash(r);n.update(t);var o=this.pkcs1pad(n.digest(),r);return this.key.$doPublic(new vv(e)).toBuffer().toString("hex")==o.toString("hex")}var s=bv.createVerify("RSA-"+r.toUpperCase());return s.update(t),s.verify(this.options.rsaUtils.exportKey("public"),e,i)},i.prototype.pkcs0pad=function(t){var e=K.alloc(this.key.maxMessageLength-t.length);return e.fill(0),K.concat([e,t])},i.prototype.pkcs0unpad=function(t){return"function"==typeof t.lastIndexOf?t.slice(t.lastIndexOf("\0")+1,t.length):t.slice(String.prototype.lastIndexOf.call(t,"\0")+1,t.length)},i.prototype.pkcs1pad=function(t,e){var i=wv[e];if(!i)throw Error("Unsupported hash algorithm");var r=K.concat([i,t]);if(r.length+10>this.key.encryptedDataLength)throw Error("Key is too short for signing algorithm ("+e+")");var n=K.alloc(this.key.encryptedDataLength-r.length-1);return n.fill(255,0,n.length-1),n[0]=1,n[n.length-1]=0,K.concat([n,r])},new i(t,e)};var Sv={},Ev={get exports(){return Sv},set exports(t){Sv=t}};!function(t){var e=jg();t.exports={isEncryption:!0,isSignature:!1},t.exports.digestLength={md4:16,md5:16,ripemd160:20,rmd160:20,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64};var i="sha1";t.exports.eme_oaep_mgf1=function(r,n,o){o=o||i;for(var s=t.exports.digestLength[o],h=Math.ceil(n/s),a=K.alloc(s*h),u=K.alloc(4),f=0;f<h;++f){var l=e.createHash(o);l.update(r),u.writeUInt32BE(f,0),l.update(u),l.digest().copy(a,f*s)}return a.slice(0,n)},t.exports.makeScheme=function(r,n){function o(t,e){this.key=t,this.options=e}return o.prototype.maxMessageLength=function(){return this.key.encryptedDataLength-2*t.exports.digestLength[this.options.encryptionSchemeOptions.hash||i]-2},o.prototype.encPad=function(r){var n=this.options.encryptionSchemeOptions.hash||i,o=this.options.encryptionSchemeOptions.mgf||t.exports.eme_oaep_mgf1,s=this.options.encryptionSchemeOptions.label||K.alloc(0),h=this.key.encryptedDataLength,a=t.exports.digestLength[n];if(r.length>h-2*a-2)throw new Error("Message is too long to encode into an encoded message with a length of "+h+" bytes, increaseemLen to fix this error (minimum value for given parameters and options: "+(h-2*a-2)+")");var u=e.createHash(n);u.update(s),u=u.digest();var f=K.alloc(h-r.length-2*a-1);f.fill(0),f[f.length-1]=1;for(var l=K.concat([u,f,r]),d=e.randomBytes(a),c=o(d,l.length,n),p=0;p<l.length;p++)l[p]^=c[p];for(c=o(l,a,n),p=0;p<d.length;p++)d[p]^=c[p];var m=K.alloc(1+d.length+l.length);return m[0]=0,d.copy(m,1),l.copy(m,1+d.length),m},o.prototype.encUnPad=function(r){var n=this.options.encryptionSchemeOptions.hash||i,o=this.options.encryptionSchemeOptions.mgf||t.exports.eme_oaep_mgf1,s=this.options.encryptionSchemeOptions.label||K.alloc(0),h=t.exports.digestLength[n];if(r.length<2*h+2)throw new Error("Error decoding message, the supplied message is not long enough to be a valid OAEP encoded message");for(var a=r.slice(1,h+1),u=r.slice(1+h),f=o(u,h,n),l=0;l<a.length;l++)a[l]^=f[l];for(f=o(a,u.length,n),l=0;l<u.length;l++)u[l]^=f[l];var d=e.createHash(n);if(d.update(s),d=d.digest(),u.slice(0,h).toString("hex")!=d.toString("hex"))throw new Error("Error decoding message, the lHash calculated from the label provided and the lHash in the encrypted data do not match.");for(l=h;0===u[l++]&&l<u.length;);if(1!=u[l-1])throw new Error("Error decoding message, there is no padding message separator byte");return u.slice(l)},new o(r,n)}}(Ev);var Av,kv,Rv,Iv,Ov,Tv,Bv,Pv,Nv={},xv={get exports(){return Nv},set exports(t){Nv=t}};function Lv(){if(Av)return Nv;Av=1;var t=dv,e=jg();xv.exports={isEncryption:!1,isSignature:!0};var i="sha1";return Nv.makeScheme=function(r,n){var o=Dv().pkcs1_oaep;function s(t,e){this.key=t,this.options=e}return s.prototype.sign=function(r){var n=e.createHash(this.options.signingSchemeOptions.hash||i);n.update(r);var o=this.emsa_pss_encode(n.digest(),this.key.keySize-1);return this.key.$doPrivate(new t(o)).toBuffer(this.key.encryptedDataLength)},s.prototype.verify=function(r,n,o){o&&(n=K.from(n,o)),n=new t(n);var s=Math.ceil((this.key.keySize-1)/8),h=this.key.$doPublic(n).toBuffer(s),a=e.createHash(this.options.signingSchemeOptions.hash||i);return a.update(r),this.emsa_pss_verify(a.digest(),h,this.key.keySize-1)},s.prototype.emsa_pss_encode=function(t,r){var n=this.options.signingSchemeOptions.hash||i,s=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,h=this.options.signingSchemeOptions.saltLength||20,a=o.digestLength[n],u=Math.ceil(r/8);if(u<a+h+2)throw new Error("Output length passed to emBits("+r+") is too small for the options specified("+n+", "+h+"). To fix this issue increase the value of emBits. (minimum size: "+(8*a+8*h+9)+")");var f=e.randomBytes(h),l=K.alloc(8+a+h);l.fill(0,0,8),t.copy(l,8),f.copy(l,8+t.length);var d=e.createHash(n);d.update(l),d=d.digest();var c=K.alloc(u-f.length-a-2);c.fill(0);var p=K.alloc(c.length+1+f.length);c.copy(p),p[c.length]=1,f.copy(p,c.length+1);for(var m=s(d,p.length,n),g=K.alloc(p.length),v=0;v<m.length;v++)g[v]=p[v]^m[v];var b=8*u-r,y=255^255>>8-b<<8-b;g[0]=g[0]&y;var w=K.alloc(g.length+d.length+1);return g.copy(w,0),d.copy(w,g.length),w[w.length-1]=188,w},s.prototype.emsa_pss_verify=function(t,r,n){var s=this.options.signingSchemeOptions.hash||i,h=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,a=this.options.signingSchemeOptions.saltLength||20,u=o.digestLength[s],f=Math.ceil(n/8);if(f<u+a+2||188!=r[r.length-1])return!1;var l=K.alloc(f-u-1);r.copy(l,0,0,f-u-1);for(var d=0,c=0,p=8*f-n;c<p;c++)d|=1<<7-c;if(0!=(l[0]&d))return!1;var m=r.slice(f-u-1,f-1),g=h(m,l.length,s);for(c=0;c<l.length;c++)l[c]^=g[c];for(d=255^255>>8-(p=8*f-n)<<8-p,l[0]=l[0]&d,c=0;0===l[c]&&c<l.length;c++);if(1!=l[c])return!1;var v=l.slice(l.length-a),b=K.alloc(8+u+a);b.fill(0,0,8),t.copy(b,8),v.copy(b,8+t.length);var y=e.createHash(s);return y.update(b),y=y.digest(),m.toString("hex")===y.toString("hex")},new s(r,n)},Nv}function Dv(){return kv||(kv=1,(t=pv).exports={pkcs1:mv,pkcs1_oaep:Sv,pss:Lv(),isEncryption:function(e){return t.exports[e]&&t.exports[e].isEncryption},isSignature:function(e){return t.exports[e]&&t.exports[e].isSignature}}),cv;var t}function Cv(){if(Iv)return Rv;Iv=1;var t=dv,e=Dv();return Rv=function(i,r){var n=e.pkcs1.makeScheme(i,r);return{encrypt:function(e,r){var o,s;return r?(o=new t(n.encPad(e,{type:1})),s=i.$doPrivate(o)):(o=new t(i.encryptionScheme.encPad(e)),s=i.$doPublic(o)),s.toBuffer(i.encryptedDataLength)},decrypt:function(e,r){var o,s=new t(e);return r?(o=i.$doPublic(s),n.encUnPad(o.toBuffer(i.encryptedDataLength),{type:1})):(o=i.$doPrivate(s),i.encryptionScheme.encUnPad(o.toBuffer(i.encryptedDataLength)))}}},Rv}var qv=jg(),Uv={getEngine:function(t,e){var i=Cv();return"node"===e.environment&&"function"==typeof qv.publicEncrypt&&"function"==typeof qv.privateDecrypt&&(i="function"==typeof qv.privateEncrypt&&"function"==typeof qv.publicDecrypt?function(){if(Tv)return Ov;Tv=1;var t=jg(),e=Xt,i=Dv();return Ov=function(r,n){var o=i.pkcs1.makeScheme(r,n);return{encrypt:function(i,r){var s;if(r)return s=e.RSA_PKCS1_PADDING,n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding),t.privateEncrypt({key:n.rsaUtils.exportKey("private"),padding:s},i);s=e.RSA_PKCS1_OAEP_PADDING,"pkcs1"===n.encryptionScheme&&(s=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding);var h=i;return s===e.RSA_NO_PADDING&&(h=o.pkcs0pad(i)),t.publicEncrypt({key:n.rsaUtils.exportKey("public"),padding:s},h)},decrypt:function(i,r){var s;if(r)return s=e.RSA_PKCS1_PADDING,n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding),t.publicDecrypt({key:n.rsaUtils.exportKey("public"),padding:s},i);s=e.RSA_PKCS1_OAEP_PADDING,"pkcs1"===n.encryptionScheme&&(s=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding);var h=t.privateDecrypt({key:n.rsaUtils.exportKey("private"),padding:s},i);return s===e.RSA_NO_PADDING?o.pkcs0unpad(h):h}}},Ov}():function(){if(Pv)return Bv;Pv=1;var t=jg(),e=Xt,i=Dv();return Bv=function(r,n){var o=Cv()(r,n),s=i.pkcs1.makeScheme(r,n);return{encrypt:function(i,r){if(r)return o.encrypt(i,r);var h=e.RSA_PKCS1_OAEP_PADDING;"pkcs1"===n.encryptionScheme&&(h=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(h=n.encryptionSchemeOptions.padding);var a=i;return h===e.RSA_NO_PADDING&&(a=s.pkcs0pad(i)),t.publicEncrypt({key:n.rsaUtils.exportKey("public"),padding:h},a)},decrypt:function(i,r){if(r)return o.decrypt(i,r);var h=e.RSA_PKCS1_OAEP_PADDING;"pkcs1"===n.encryptionScheme&&(h=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(h=n.encryptionSchemeOptions.padding);var a=t.privateDecrypt({key:n.rsaUtils.exportKey("private"),padding:h},i);return h===e.RSA_NO_PADDING?s.pkcs0unpad(a):a}}},Bv}()),i(t,e)}},jv=Se._;jg();var zv=dv,Fv=Se,Hv=Dv(),Kv=Uv;Qt.BigInteger=zv,Qt.Key=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.setOptions=function(t){var e=Hv[t.signingScheme],i=Hv[t.encryptionScheme];e===i?this.signingScheme=this.encryptionScheme=i.makeScheme(this,t):(this.encryptionScheme=i.makeScheme(this,t),this.signingScheme=e.makeScheme(this,t)),this.encryptEngine=Kv.getEngine(this,t)},t.prototype.generate=function(t,e){var i=t>>1;this.e=parseInt(e,16);for(var r=new zv(e,16);;){for(;this.p=new zv(t-i,1),0!==this.p.subtract(zv.ONE).gcd(r).compareTo(zv.ONE)||!this.p.isProbablePrime(10););for(;this.q=new zv(i,1),0!==this.q.subtract(zv.ONE).gcd(r).compareTo(zv.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var n=this.p;this.p=this.q,this.q=n}var o=this.p.subtract(zv.ONE),s=this.q.subtract(zv.ONE),h=o.multiply(s);if(0===h.gcd(r).compareTo(zv.ONE)){if(this.n=this.p.multiply(this.q),this.n.bitLength()<t)continue;this.d=r.modInverse(h),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}this.$$recalculateCache()},t.prototype.setPrivate=function(t,e,i,r,n,o,s,h){if(!(t&&e&&i&&t.length>0&&(jv.isNumber(e)||e.length>0)&&i.length>0))throw Error("Invalid RSA private key");this.n=new zv(t),this.e=jv.isNumber(e)?e:Fv.get32IntFromBuffer(e,0),this.d=new zv(i),r&&n&&o&&s&&h&&(this.p=new zv(r),this.q=new zv(n),this.dmp1=new zv(o),this.dmq1=new zv(s),this.coeff=new zv(h)),this.$$recalculateCache()},t.prototype.setPublic=function(t,e){if(!(t&&e&&t.length>0&&(jv.isNumber(e)||e.length>0)))throw Error("Invalid RSA public key");this.n=new zv(t),this.e=jv.isNumber(e)?e:Fv.get32IntFromBuffer(e,0),this.$$recalculateCache()},t.prototype.$doPrivate=function(t){if(this.p||this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),i=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(i)<0;)e=e.add(this.p);return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i)},t.prototype.$doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.encrypt=function(t,e){var i=[],r=[],n=t.length,o=Math.ceil(n/this.maxMessageLength)||1,s=Math.ceil(n/o||1);if(1==o)i.push(t);else for(var h=0;h<o;h++)i.push(t.slice(h*s,(h+1)*s));for(var a=0;a<i.length;a++)r.push(this.encryptEngine.encrypt(i[a],e));return K.concat(r)},t.prototype.decrypt=function(t,e){if(t.length%this.encryptedDataLength>0)throw Error("Incorrect data or key");for(var i=[],r=0,n=0,o=t.length/this.encryptedDataLength,s=0;s<o;s++)n=(r=s*this.encryptedDataLength)+this.encryptedDataLength,i.push(this.encryptEngine.decrypt(t.slice(r,Math.min(n,t.length)),e));return K.concat(i)},t.prototype.sign=function(t){return this.signingScheme.sign.apply(this.signingScheme,arguments)},t.prototype.verify=function(t,e,i){return this.signingScheme.verify.apply(this.signingScheme,arguments)},t.prototype.isPrivate=function(){return!!(this.n&&this.e&&this.d)},t.prototype.isPublic=function(t){return this.n&&this.e&&!(t&&this.d)||!1},Object.defineProperty(t.prototype,"keySize",{get:function(){return this.cache.keyBitLength}}),Object.defineProperty(t.prototype,"encryptedDataLength",{get:function(){return this.cache.keyByteLength}}),Object.defineProperty(t.prototype,"maxMessageLength",{get:function(){return this.encryptionScheme.maxMessageLength()}}),t.prototype.$$recalculateCache=function(){this.cache=this.cache||{},this.cache.keyBitLength=this.n.bitLength(),this.cache.keyByteLength=this.cache.keyBitLength+6>>3},t}();var Gv={},Yv={get exports(){return Gv},set exports(t){Gv=t}},Vv={newInvalidAsn1Error:function(t){var e=new Error;return e.name="InvalidAsn1Error",e.message=t||"",e}},Zv={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128};function Wv(t,e){if(t===e)return 0;for(var i=t.length,r=e.length,n=0,o=Math.min(i,r);n<o;++n)if(t[n]!==e[n]){i=t[n],r=e[n];break}return i<r?-1:r<i?1:0}var Xv,Qv=Object.prototype.hasOwnProperty,Jv=Object.keys||function(t){var e=[];for(var i in t)Qv.call(t,i)&&e.push(i);return e},$v=Array.prototype.slice;function tb(){return void 0!==Xv?Xv:Xv="foo"===function(){}.name}function eb(t){return Object.prototype.toString.call(t)}function ib(t){return!Rt(t)&&("function"==typeof O.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function rb(t,e){t||ub(t,!0,e,"==",fb)}var nb=/\s*function\s+([^\(\s]*)\s*/;function ob(t){if(bi(t)){if(tb())return t.name;var e=t.toString().match(nb);return e&&e[1]}}function sb(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return hb(ab(t.actual),128)+" "+t.operator+" "+hb(ab(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||ub;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var i=new Error;if(i.stack){var r=i.stack,n=ob(e),o=r.indexOf("\n"+n);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}}function hb(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function ab(t){if(tb()||!bi(t))return ti(t);var e=ob(t);return"[Function"+(e?": "+e:"")+"]"}function ub(t,e,i,r,n){throw new sb({message:i,actual:t,expected:e,operator:r,stackStartFunction:n})}function fb(t,e){t||ub(t,!0,e,"==",fb)}function lb(t,e,i){t!=e&&ub(t,e,i,"==",lb)}function db(t,e,i){t==e&&ub(t,e,i,"!=",db)}function cb(t,e,i){mb(t,e,!1)||ub(t,e,i,"deepEqual",cb)}function pb(t,e,i){mb(t,e,!0)||ub(t,e,i,"deepStrictEqual",pb)}function mb(t,e,i,r){if(t===e)return!0;if(Rt(t)&&Rt(e))return 0===Wv(t,e);if(gi(t)&&gi(e))return t.getTime()===e.getTime();if(pi(t)&&pi(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(ib(t)&&ib(e)&&eb(t)===eb(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===Wv(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(Rt(t)!==Rt(e))return!1;var n=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==n&&n===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,i,r){if(null==t||null==e)return!1;if(yi(t)||yi(e))return t===e;if(i&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var n=gb(t),o=gb(e);if(n&&!o||!n&&o)return!1;if(n)return mb(t=$v.call(t),e=$v.call(e),i);var s,h,a=Jv(t),u=Jv(e);if(a.length!==u.length)return!1;for(a.sort(),u.sort(),h=a.length-1;h>=0;h--)if(a[h]!==u[h])return!1;for(h=a.length-1;h>=0;h--)if(!mb(t[s=a[h]],e[s],i,r))return!1;return!0}(t,e,i,r))}return i?t===e:t==e}function gb(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function vb(t,e,i){mb(t,e,!1)&&ub(t,e,i,"notDeepEqual",vb)}function bb(t,e,i){mb(t,e,!0)&&ub(t,e,i,"notDeepStrictEqual",bb)}function yb(t,e,i){t!==e&&ub(t,e,i,"===",yb)}function wb(t,e,i){t===e&&ub(t,e,i,"!==",wb)}function Mb(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _b(t,e,i,r){var n;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof i&&(r=i,i=null),n=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(i&&i.name?" ("+i.name+").":".")+(r?" "+r:"."),t&&!n&&ub(n,i,"Missing expected exception"+r);var o="string"==typeof r,s=!t&&n&&!i;if((!t&&vi(n)&&o&&Mb(n,i)||s)&&ub(n,i,"Got unwanted exception"+r),t&&n&&i&&!Mb(n,i)||!t&&n)throw n}function Sb(t,e,i){_b(!0,t,e,i)}function Eb(t,e,i){_b(!1,t,e,i)}function Ab(t){if(t)throw t}rb.AssertionError=sb,Ve(sb,Error),rb.fail=ub,rb.ok=fb,rb.equal=lb,rb.notEqual=db,rb.deepEqual=cb,rb.deepStrictEqual=pb,rb.notDeepEqual=vb,rb.notDeepStrictEqual=bb,rb.strictEqual=yb,rb.notStrictEqual=wb,rb.throws=Sb,rb.doesNotThrow=Eb,rb.ifError=Ab;var kb=Bt(Object.freeze({__proto__:null,AssertionError:sb,assert:fb,deepEqual:cb,deepStrictEqual:pb,default:rb,doesNotThrow:Eb,equal:lb,fail:ub,ifError:Ab,notDeepEqual:vb,notDeepStrictEqual:bb,notEqual:db,notStrictEqual:wb,ok:fb,strictEqual:yb,throws:Sb})),Rb=kb,Ib=ap.Buffer,Ob=Zv,Tb=Vv.newInvalidAsn1Error;function Bb(t){if(!t||!Ib.isBuffer(t))throw new TypeError("data must be a node Buffer");this._buf=t,this._size=t.length,this._len=0,this._offset=0}Object.defineProperty(Bb.prototype,"length",{enumerable:!0,get:function(){return this._len}}),Object.defineProperty(Bb.prototype,"offset",{enumerable:!0,get:function(){return this._offset}}),Object.defineProperty(Bb.prototype,"remain",{get:function(){return this._size-this._offset}}),Object.defineProperty(Bb.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}}),Bb.prototype.readByte=function(t){if(this._size-this._offset<1)return null;var e=255&this._buf[this._offset];return t||(this._offset+=1),e},Bb.prototype.peek=function(){return this.readByte(!0)},Bb.prototype.readLength=function(t){if(void 0===t&&(t=this._offset),t>=this._size)return null;var e=255&this._buf[t++];if(null===e)return null;if(128==(128&e)){if(0===(e&=127))throw Tb("Indefinite length not supported");if(e>4)throw Tb("encoding too long");if(this._size-t<e)return null;this._len=0;for(var i=0;i<e;i++)this._len=(this._len<<8)+(255&this._buf[t++])}else this._len=e;return t},Bb.prototype.readSequence=function(t){var e=this.peek();if(null===e)return null;if(void 0!==t&&t!==e)throw Tb("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var i=this.readLength(this._offset+1);return null===i?null:(this._offset=i,e)},Bb.prototype.readInt=function(){return this._readTag(Ob.Integer)},Bb.prototype.readBoolean=function(){return 0!==this._readTag(Ob.Boolean)},Bb.prototype.readEnumeration=function(){return this._readTag(Ob.Enumeration)},Bb.prototype.readString=function(t,e){t||(t=Ob.OctetString);var i=this.peek();if(null===i)return null;if(i!==t)throw Tb("Expected 0x"+t.toString(16)+": got 0x"+i.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>this._size-r)return null;if(this._offset=r,0===this.length)return e?Ib.alloc(0):"";var n=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,e?n:n.toString("utf8")},Bb.prototype.readOID=function(t){t||(t=Ob.OID);var e=this.readString(t,!0);if(null===e)return null;for(var i=[],r=0,n=0;n<e.length;n++){var o=255&e[n];r<<=7,r+=127&o,0==(128&o)&&(i.push(r),r=0)}return r=i.shift(),i.unshift(r%40),i.unshift(r/40>>0),i.join(".")},Bb.prototype._readTag=function(t){Rb.ok(void 0!==t);var e=this.peek();if(null===e)return null;if(e!==t)throw Tb("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var i=this.readLength(this._offset+1);if(null===i)return null;if(this.length>4)throw Tb("Integer too long: "+this.length);if(this.length>this._size-i)return null;this._offset=i;for(var r=this._buf[this._offset],n=0,o=0;o<this.length;o++)n<<=8,n|=255&this._buf[this._offset++];return 128==(128&r)&&4!==o&&(n-=1<<8*o),n>>0};var Pb=Bb,Nb=kb,xb=ap.Buffer,Lb=Zv,Db=Vv.newInvalidAsn1Error,Cb={size:1024,growthFactor:8};function qb(t){t=function(t,e){return Nb.ok(t),Nb.equal(typeof t,"object"),Nb.ok(e),Nb.equal(typeof e,"object"),Object.getOwnPropertyNames(t).forEach((function(i){if(!e[i]){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r)}})),e}(Cb,t||{}),this._buf=xb.alloc(t.size||1024),this._size=this._buf.length,this._offset=0,this._options=t,this._seq=[]}Object.defineProperty(qb.prototype,"buffer",{get:function(){if(this._seq.length)throw Db(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),qb.prototype.writeByte=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=t},qb.prototype.writeInt=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");"number"!=typeof e&&(e=Lb.Integer);for(var i=4;(0==(4286578688&t)||-8388608==(4286578688&t))&&i>1;)i--,t<<=8;if(i>4)throw Db("BER ints cannot be > 0xffffffff");for(this._ensure(2+i),this._buf[this._offset++]=e,this._buf[this._offset++]=i;i-- >0;)this._buf[this._offset++]=(4278190080&t)>>>24,t<<=8},qb.prototype.writeNull=function(){this.writeByte(Lb.Null),this.writeByte(0)},qb.prototype.writeEnumeration=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");return"number"!=typeof e&&(e=Lb.Enumeration),this.writeInt(t,e)},qb.prototype.writeBoolean=function(t,e){if("boolean"!=typeof t)throw new TypeError("argument must be a Boolean");"number"!=typeof e&&(e=Lb.Boolean),this._ensure(3),this._buf[this._offset++]=e,this._buf[this._offset++]=1,this._buf[this._offset++]=t?255:0},qb.prototype.writeString=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string (was: "+typeof t+")");"number"!=typeof e&&(e=Lb.OctetString);var i=xb.byteLength(t);this.writeByte(e),this.writeLength(i),i&&(this._ensure(i),this._buf.write(t,this._offset),this._offset+=i)},qb.prototype.writeBuffer=function(t,e){if("number"!=typeof e)throw new TypeError("tag must be a number");if(!xb.isBuffer(t))throw new TypeError("argument must be a buffer");this.writeByte(e),this.writeLength(t.length),this._ensure(t.length),t.copy(this._buf,this._offset,0,t.length),this._offset+=t.length},qb.prototype.writeStringArray=function(t){if(!t instanceof Array)throw new TypeError("argument must be an Array[String]");var e=this;t.forEach((function(t){e.writeString(t)}))},qb.prototype.writeOID=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string");if("number"!=typeof e&&(e=Lb.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(t))throw new Error("argument is not a valid OID string");var i=t.split("."),r=[];r.push(40*parseInt(i[0],10)+parseInt(i[1],10)),i.slice(2).forEach((function(t){!function(t,e){e<128?t.push(e):e<16384?(t.push(e>>>7|128),t.push(127&e)):e<2097152?(t.push(e>>>14|128),t.push(255&(e>>>7|128)),t.push(127&e)):e<268435456?(t.push(e>>>21|128),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e)):(t.push(255&(e>>>28|128)),t.push(255&(e>>>21|128)),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e))}(r,parseInt(t,10))}));var n=this;this._ensure(2+r.length),this.writeByte(e),this.writeLength(r.length),r.forEach((function(t){n.writeByte(t)}))},qb.prototype.writeLength=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");if(this._ensure(4),t<=127)this._buf[this._offset++]=t;else if(t<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=t;else if(t<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t;else{if(!(t<=16777215))throw Db("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=t>>16,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t}},qb.prototype.startSequence=function(t){"number"!=typeof t&&(t=Lb.Sequence|Lb.Constructor),this.writeByte(t),this._seq.push(this._offset),this._ensure(3),this._offset+=3},qb.prototype.endSequence=function(){var t=this._seq.pop(),e=t+3,i=this._offset-e;if(i<=127)this._shift(e,i,-2),this._buf[t]=i;else if(i<=255)this._shift(e,i,-1),this._buf[t]=129,this._buf[t+1]=i;else if(i<=65535)this._buf[t]=130,this._buf[t+1]=i>>8,this._buf[t+2]=i;else{if(!(i<=16777215))throw Db("Sequence too long");this._shift(e,i,1),this._buf[t]=131,this._buf[t+1]=i>>16,this._buf[t+2]=i>>8,this._buf[t+3]=i}},qb.prototype._shift=function(t,e,i){Nb.ok(void 0!==t),Nb.ok(void 0!==e),Nb.ok(i),this._buf.copy(this._buf,t+i,t,t+e),this._offset+=i},qb.prototype._ensure=function(t){if(Nb.ok(t),this._size-this._offset<t){var e=this._size*this._options.growthFactor;e-this._offset<t&&(e+=t);var i=xb.alloc(e);this._buf.copy(i,0,0,this._offset),this._buf=i,this._size=e}};var Ub=qb;!function(t){var e=Vv,i=Zv,r=Pb,n=Ub;for(var o in t.exports={Reader:r,Writer:n},i)i.hasOwnProperty(o)&&(t.exports[o]=i[o]);for(var s in e)e.hasOwnProperty(s)&&(t.exports[s]=e[s])}(Yv);var jb=Gv,zb={Ber:jb,BerReader:jb.Reader,BerWriter:jb.Writer},Fb={},Hb={get exports(){return Fb},set exports(t){Fb=t}},Kb={},Gb={get exports(){return Kb},set exports(t){Kb=t}};!function(t){var e=zb.Ber,i=Se._,r=Se;const n="-----BEGIN RSA PRIVATE KEY-----",o="-----END RSA PRIVATE KEY-----",s="-----BEGIN RSA PUBLIC KEY-----",h="-----END RSA PUBLIC KEY-----";t.exports={privateExport:function(t,i){i=i||{};var s=t.n.toBuffer(),h=t.d.toBuffer(),a=t.p.toBuffer(),u=t.q.toBuffer(),f=t.dmp1.toBuffer(),l=t.dmq1.toBuffer(),d=t.coeff.toBuffer(),c=s.length+h.length+a.length+u.length+f.length+l.length+d.length+512,p=new e.Writer({size:c});return p.startSequence(),p.writeInt(0),p.writeBuffer(s,2),p.writeInt(t.e),p.writeBuffer(h,2),p.writeBuffer(a,2),p.writeBuffer(u,2),p.writeBuffer(f,2),p.writeBuffer(l,2),p.writeBuffer(d,2),p.endSequence(),"der"===i.type?p.buffer:n+"\n"+r.linebrk(p.buffer.toString("base64"),64)+"\n"+o},privateImport:function(t,s,h){var a;if("der"!==(h=h||{}).type){if(K.isBuffer(s)&&(s=s.toString("utf8")),!i.isString(s))throw Error("Unsupported key format");var u=r.trimSurroundingText(s,n,o).replace(/\s+|\n\r|\n|\r$/gm,"");a=K.from(u,"base64")}else{if(!K.isBuffer(s))throw Error("Unsupported key format");a=s}var f=new e.Reader(a);f.readSequence(),f.readString(2,!0),t.setPrivate(f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0))},publicExport:function(t,i){i=i||{};var n=t.n.toBuffer(),o=n.length+512,a=new e.Writer({size:o});return a.startSequence(),a.writeBuffer(n,2),a.writeInt(t.e),a.endSequence(),"der"===i.type?a.buffer:s+"\n"+r.linebrk(a.buffer.toString("base64"),64)+"\n"+h},publicImport:function(t,n,o){var a;if("der"!==(o=o||{}).type){if(K.isBuffer(n)&&(n=n.toString("utf8")),i.isString(n)){var u=r.trimSurroundingText(n,s,h).replace(/\s+|\n\r|\n|\r$/gm,"");a=K.from(u,"base64")}}else{if(!K.isBuffer(n))throw Error("Unsupported key format");a=n}var f=new e.Reader(a);f.readSequence(),t.setPublic(f.readString(2,!0),f.readString(2,!0))},autoImport:function(e,i){return/^[\S\s]*-----BEGIN RSA PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*-----BEGIN RSA PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PUBLIC KEY-----[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(Gb);var Yb={},Vb={get exports(){return Yb},set exports(t){Yb=t}};!function(t){var e=zb.Ber,i=Se._,r="1.2.840.113549.1.1.1",n=Se;const o="-----BEGIN PRIVATE KEY-----",s="-----END PRIVATE KEY-----",h="-----BEGIN PUBLIC KEY-----",a="-----END PUBLIC KEY-----";t.exports={privateExport:function(t,i){i=i||{};var h=t.n.toBuffer(),a=t.d.toBuffer(),u=t.p.toBuffer(),f=t.q.toBuffer(),l=t.dmp1.toBuffer(),d=t.dmq1.toBuffer(),c=t.coeff.toBuffer(),p=h.length+a.length+u.length+f.length+l.length+d.length+c.length+512,m=new e.Writer({size:p});m.startSequence(),m.writeInt(0),m.writeBuffer(h,2),m.writeInt(t.e),m.writeBuffer(a,2),m.writeBuffer(u,2),m.writeBuffer(f,2),m.writeBuffer(l,2),m.writeBuffer(d,2),m.writeBuffer(c,2),m.endSequence();var g=new e.Writer({size:p});return g.startSequence(),g.writeInt(0),g.startSequence(),g.writeOID(r),g.writeNull(),g.endSequence(),g.writeBuffer(m.buffer,4),g.endSequence(),"der"===i.type?g.buffer:o+"\n"+n.linebrk(g.buffer.toString("base64"),64)+"\n"+s},privateImport:function(t,h,a){var u;if("der"!==(a=a||{}).type){if(K.isBuffer(h)&&(h=h.toString("utf8")),!i.isString(h))throw Error("Unsupported key format");var f=n.trimSurroundingText(h,o,s).replace("-----END PRIVATE KEY-----","").replace(/\s+|\n\r|\n|\r$/gm,"");u=K.from(f,"base64")}else{if(!K.isBuffer(h))throw Error("Unsupported key format");u=h}var l=new e.Reader(u);if(l.readSequence(),l.readInt(0),new e.Reader(l.readString(48,!0)).readOID(6,!0)!==r)throw Error("Invalid Public key format");var d=new e.Reader(l.readString(4,!0));d.readSequence(),d.readString(2,!0),t.setPrivate(d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0))},publicExport:function(t,i){i=i||{};var o=t.n.toBuffer(),s=o.length+512,u=new e.Writer({size:s});u.writeByte(0),u.startSequence(),u.writeBuffer(o,2),u.writeInt(t.e),u.endSequence();var f=new e.Writer({size:s});return f.startSequence(),f.startSequence(),f.writeOID(r),f.writeNull(),f.endSequence(),f.writeBuffer(u.buffer,3),f.endSequence(),"der"===i.type?f.buffer:h+"\n"+n.linebrk(f.buffer.toString("base64"),64)+"\n"+a},publicImport:function(t,o,s){var u;if("der"!==(s=s||{}).type){if(K.isBuffer(o)&&(o=o.toString("utf8")),i.isString(o)){var f=n.trimSurroundingText(o,h,a).replace(/\s+|\n\r|\n|\r$/gm,"");u=K.from(f,"base64")}}else{if(!K.isBuffer(o))throw Error("Unsupported key format");u=o}var l=new e.Reader(u);if(l.readSequence(),new e.Reader(l.readString(48,!0)).readOID(6,!0)!==r)throw Error("Invalid Public key format");var d=new e.Reader(l.readString(3,!0));d.readByte(),d.readSequence(),t.setPublic(d.readString(2,!0),d.readString(2,!0))},autoImport:function(e,i){return/^[\S\s]*-----BEGIN PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*-----BEGIN PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PUBLIC KEY-----[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(Vb);var Zb,Wb={},Xb={get exports(){return Wb},set exports(t){Wb=t}};Zb=Xb,Se._,Zb.exports={privateExport:function(t,e){return{n:t.n.toBuffer(),e:t.e,d:t.d.toBuffer(),p:t.p.toBuffer(),q:t.q.toBuffer(),dmp1:t.dmp1.toBuffer(),dmq1:t.dmq1.toBuffer(),coeff:t.coeff.toBuffer()}},privateImport:function(t,e,i){if(!(e.n&&e.e&&e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff))throw Error("Invalid key data");t.setPrivate(e.n,e.e,e.d,e.p,e.q,e.dmp1,e.dmq1,e.coeff)},publicExport:function(t,e){return{n:t.n.toBuffer(),e:t.e}},publicImport:function(t,e,i){if(!e.n||!e.e)throw Error("Invalid key data");t.setPublic(e.n,e.e)},autoImport:function(t,e){return!(!e.n||!e.e||(e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff?(Zb.exports.privateImport(t,e),0):(Zb.exports.publicImport(t,e),0)))}};var Qb={},Jb={get exports(){return Qb},set exports(t){Qb=t}};!function(t){var e=Se._,i=Se,r=dv;const n="-----BEGIN OPENSSH PRIVATE KEY-----",o="-----END OPENSSH PRIVATE KEY-----";function s(t){const e=t.buf.readInt32BE(t.off);t.off+=4;const i=t.buf.slice(t.off,t.off+e);return t.off+=e,i}function h(t,e){t.buf.writeInt32BE(e.byteLength,t.off),t.off+=4,t.off+=e.copy(t.buf,t.off)}t.exports={privateExport:function(t,e){const r=t.n.toBuffer();let s=K.alloc(4);for(s.writeUInt32BE(t.e,0);0===s[0];)s=s.slice(1);const a=t.d.toBuffer(),u=t.coeff.toBuffer(),f=t.p.toBuffer(),l=t.q.toBuffer();let d;d=void 0!==t.sshcomment?K.from(t.sshcomment):K.from([]);const c=15+s.byteLength+4+r.byteLength,p=23+r.byteLength+4+s.byteLength+4+a.byteLength+4+u.byteLength+4+f.byteLength+4+l.byteLength+4+d.byteLength;let m=43+c+4+p;m+=8*Math.ceil(p/8)-p;const g=K.alloc(m),v={buf:g,off:0};g.write("openssh-key-v1","utf8"),g.writeUInt8(0,14),v.off+=15,h(v,K.from("none")),h(v,K.from("none")),h(v,K.from("")),v.off=v.buf.writeUInt32BE(1,v.off),v.off=v.buf.writeUInt32BE(c,v.off),h(v,K.from("ssh-rsa")),h(v,s),h(v,r),v.off=v.buf.writeUInt32BE(m-47-c,v.off),v.off+=8,h(v,K.from("ssh-rsa")),h(v,r),h(v,s),h(v,a),h(v,u),h(v,f),h(v,l),h(v,d);let b=1;for(;v.off<m;)v.off=v.buf.writeUInt8(b++,v.off);return"der"===e.type?v.buf:n+"\n"+i.linebrk(g.toString("base64"),70)+"\n"+o+"\n"},privateImport:function(t,h,a){var u;if("der"!==(a=a||{}).type){if(K.isBuffer(h)&&(h=h.toString("utf8")),!e.isString(h))throw Error("Unsupported key format");var f=i.trimSurroundingText(h,n,o).replace(/\s+|\n\r|\n|\r$/gm,"");u=K.from(f,"base64")}else{if(!K.isBuffer(h))throw Error("Unsupported key format");u=h}const l={buf:u,off:0};if("openssh-key-v1"!==u.slice(0,14).toString("ascii"))throw"Invalid file format.";if(l.off+=15,"none"!==s(l).toString("ascii"))throw Error("Unsupported key type");if("none"!==s(l).toString("ascii"))throw Error("Unsupported key type");if(""!==s(l).toString("ascii"))throw Error("Unsupported key type");if(l.off+=4,l.off+=4,"ssh-rsa"!==s(l).toString("ascii"))throw Error("Unsupported key type");if(s(l),s(l),l.off+=12,"ssh-rsa"!==s(l).toString("ascii"))throw Error("Unsupported key type");const d=s(l),c=s(l),p=s(l),m=s(l),g=s(l),v=s(l),b=new r(p),y=new r(v),w=new r(g),M=b.mod(w.subtract(r.ONE)),_=b.mod(y.subtract(r.ONE));t.setPrivate(d,c,p,g,v,M.toBuffer(),_.toBuffer(),m),t.sshcomment=s(l).toString("ascii")},publicExport:function(t,e){let i=K.alloc(4);for(i.writeUInt32BE(t.e,0);0===i[0];)i=i.slice(1);const r=t.n.toBuffer(),n=K.alloc(i.byteLength+4+r.byteLength+4+7+4),o={buf:n,off:0};h(o,K.from("ssh-rsa")),h(o,i),h(o,r);let s=t.sshcomment||"";return"der"===e.type?o.buf:"ssh-rsa "+n.toString("base64")+" "+s+"\n"},publicImport:function(t,i,r){var n;if("der"!==(r=r||{}).type){if(K.isBuffer(i)&&(i=i.toString("utf8")),!e.isString(i))throw Error("Unsupported key format");{if("ssh-rsa "!==i.substring(0,8))throw Error("Unsupported key format");let e=i.indexOf(" ",8);-1===e?e=i.length:t.sshcomment=i.substring(e+1).replace(/\s+|\n\r|\n|\r$/gm,"");const r=i.substring(8,e).replace(/\s+|\n\r|\n|\r$/gm,"");n=K.from(r,"base64")}}else{if(!K.isBuffer(i))throw Error("Unsupported key format");n=i}const o={buf:n,off:0},h=s(o).toString("ascii");if("ssh-rsa"!==h)throw Error("Invalid key type: "+h);const a=s(o),u=s(o);t.setPublic(u,a)},autoImport:function(e,i){return/^[\S\s]*-----BEGIN OPENSSH PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END OPENSSH PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*ssh-rsa \s*(?=(([A-Za-z0-9+/=]+\s*)+))\1[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(Jb),function(t){function e(t){t=t.split("-");for(var e="private",i={type:"default"},r=1;r<t.length;r++)if(t[r])switch(t[r]){case"public":case"private":e=t[r];break;case"pem":case"der":i.type=t[r]}return{scheme:t[0],keyType:e,keyOpt:i}}Se._,t.exports={pkcs1:Kb,pkcs8:Yb,components:Wb,openssh:Qb,isPrivateExport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].privateExport},isPrivateImport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].privateImport},isPublicExport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].publicExport},isPublicImport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].publicImport},detectAndImport:function(i,r,n){if(void 0===n){for(var o in t.exports)if("function"==typeof t.exports[o].autoImport&&t.exports[o].autoImport(i,r))return!0}else if(n){var s=e(n);if(!t.exports[s.scheme])throw Error("Unsupported key format");"private"===s.keyType?t.exports[s.scheme].privateImport(i,r,s.keyOpt):t.exports[s.scheme].publicImport(i,r,s.keyOpt)}return!1},detectAndExport:function(i,r){if(r){var n=e(r);if(t.exports[n.scheme]){if("private"===n.keyType){if(!i.isPrivate())throw Error("This is not private key");return t.exports[n.scheme].privateExport(i,n.keyOpt)}if(!i.isPublic())throw Error("This is not public key");return t.exports[n.scheme].publicExport(i,n.keyOpt)}throw Error("Unsupported key format")}}}}(Hb);var $b=Xt,ty=Qt;jg();var ey=Se._,iy=Se,ry=Dv(),ny=Fb;void 0===$b.RSA_NO_PADDING&&($b.RSA_NO_PADDING=3);var oy,sy,hy,ay,uy,fy,ly,dy,cy,py,my,gy,vy,by,yy=function(){var t={node10:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],node:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],iojs:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],browser:["md5","ripemd160","sha1","sha256","sha512"]},e="pkcs1_oaep",i="pkcs1",r={private:"pkcs1-private-pem","private-der":"pkcs1-private-der",public:"pkcs8-public-pem","public-der":"pkcs8-public-der"};function n(t,r,o){if(!(this instanceof n))return new n(t,r,o);ey.isObject(r)&&(o=r,r=void 0),this.$options={signingScheme:i,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:e,encryptionSchemeOptions:{hash:"sha1",label:null},environment:iy.detectEnvironment(),rsaUtils:this},this.keyPair=new ty.Key,this.$cache={},K.isBuffer(t)||ey.isString(t)?this.importKey(t,r):ey.isObject(t)&&this.generateKeyPair(t.b,t.e),this.setOptions(o)}return n.prototype.setOptions=function(r){if((r=r||{}).environment&&(this.$options.environment=r.environment),r.signingScheme){if(ey.isString(r.signingScheme)){var n=r.signingScheme.toLowerCase().split("-");1==n.length?t.node.indexOf(n[0])>-1?(this.$options.signingSchemeOptions={hash:n[0]},this.$options.signingScheme=i):(this.$options.signingScheme=n[0],this.$options.signingSchemeOptions={hash:null}):(this.$options.signingSchemeOptions={hash:n[1]},this.$options.signingScheme=n[0])}else ey.isObject(r.signingScheme)&&(this.$options.signingScheme=r.signingScheme.scheme||i,this.$options.signingSchemeOptions=ey.omit(r.signingScheme,"scheme"));if(!ry.isSignature(this.$options.signingScheme))throw Error("Unsupported signing scheme");if(this.$options.signingSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.signingSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}if(r.encryptionScheme){if(ey.isString(r.encryptionScheme)?(this.$options.encryptionScheme=r.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={}):ey.isObject(r.encryptionScheme)&&(this.$options.encryptionScheme=r.encryptionScheme.scheme||e,this.$options.encryptionSchemeOptions=ey.omit(r.encryptionScheme,"scheme")),!ry.isEncryption(this.$options.encryptionScheme))throw Error("Unsupported encryption scheme");if(this.$options.encryptionSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.encryptionSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}this.keyPair.setOptions(this.$options)},n.prototype.generateKeyPair=function(t,e){if(e=e||65537,(t=t||2048)%8!=0)throw Error("Key size must be a multiple of 8.");return this.keyPair.generate(t,e.toString(16)),this.$cache={},this},n.prototype.importKey=function(t,e){if(!t)throw Error("Empty key given");if(e&&(e=r[e]||e),!ny.detectAndImport(this.keyPair,t,e)&&void 0===e)throw Error("Key format must be specified");return this.$cache={},this},n.prototype.exportKey=function(t){return t=r[t=t||"private"]||t,this.$cache[t]||(this.$cache[t]=ny.detectAndExport(this.keyPair,t)),this.$cache[t]},n.prototype.isPrivate=function(){return this.keyPair.isPrivate()},n.prototype.isPublic=function(t){return this.keyPair.isPublic(t)},n.prototype.isEmpty=function(t){return!(this.keyPair.n||this.keyPair.e||this.keyPair.d)},n.prototype.encrypt=function(t,e,i){return this.$$encryptKey(!1,t,e,i)},n.prototype.decrypt=function(t,e){return this.$$decryptKey(!1,t,e)},n.prototype.encryptPrivate=function(t,e,i){return this.$$encryptKey(!0,t,e,i)},n.prototype.decryptPublic=function(t,e){return this.$$decryptKey(!0,t,e)},n.prototype.$$encryptKey=function(t,e,i,r){try{var n=this.keyPair.encrypt(this.$getDataForEncrypt(e,r),t);return"buffer"!=i&&i?n.toString(i):n}catch(t){throw Error("Error during encryption. Original error: "+t)}},n.prototype.$$decryptKey=function(t,e,i){try{e=ey.isString(e)?K.from(e,"base64"):e;var r=this.keyPair.decrypt(e,t);if(null===r)throw Error("Key decrypt method returns null.");return this.$getDecryptedData(r,i)}catch(t){throw Error("Error during decryption (probably incorrect key). Original error: "+t)}},n.prototype.sign=function(t,e,i){if(!this.isPrivate())throw Error("This is not private key");var r=this.keyPair.sign(this.$getDataForEncrypt(t,i));return e&&"buffer"!=e&&(r=r.toString(e)),r},n.prototype.verify=function(t,e,i,r){if(!this.isPublic())throw Error("This is not public key");return r=r&&"buffer"!=r?r:null,this.keyPair.verify(this.$getDataForEncrypt(t,i),e,r)},n.prototype.getKeySize=function(){return this.keyPair.keySize},n.prototype.getMaxMessageSize=function(){return this.keyPair.maxMessageLength},n.prototype.$getDataForEncrypt=function(t,e){if(ey.isString(t)||ey.isNumber(t))return K.from(""+t,e||"utf8");if(K.isBuffer(t))return t;if(ey.isObject(t))return K.from(JSON.stringify(t));throw Error("Unexpected data type")},n.prototype.$getDecryptedData=function(t,e){return"buffer"==(e=e||"buffer")?t:"json"==e?JSON.parse(t.toString()):t.toString(e)},n}();!function(t){t[t.BIDIRECTION=0]="BIDIRECTION",t[t.POSITIVE=1]="POSITIVE",t[t.OPPOSITE=2]="OPPOSITE",t[t.FORBID=3]="FORBID"}(oy||(oy={}));class wy{get path(){return this._path}set path(t){this._path=t}constructor(t,e){this.ssp=t,sy.add(this),this._path="",this.metaData=null,this.treeData=null,this.topologyData=null,this.propertiesData=null,this.animationsData=null,this.modelVisionsData=null,hy.set(this,_),ay.set(this,new I(this.ssp.viewport)),uy.set(this,!1),fy.set(this,!1),ly.set(this,!1),(null==e?void 0:e.key)&&this.setKey(e.key)}setKey(t){t!==d(this,sy,"m",dy).call(this,d(this,hy,"f").debugKey)&&(d(this,hy,"f").key=t)}_resolvePath(t){return`${this._path}${t}`}async _fetchData(t){const{utils:e}=this.ssp;return e.fetchFile(this._resolvePath(t),"json")}async fetchMetaData(){const t=await this._fetchData(p);return this.metaData=t,t}async fetchTreeData(){const t=await this._fetchData(g);return this.treeData=t,t}async fetchTopologyData(){const t=await this._fetchData(v).then((t=>{const e={linkWidth:.1,linkColor:["#00ff00"],nodeRadius:.05,nodeColor:"#0000ff"};return t.map((t=>{const i=Object.assign(Object.assign({},e),t);return i.imgUrl&&(i.imgUrl=`${this.path}${i.imgUrl}`),i}))}));return this.topologyData=t,t}async fetchPropertiesData(){const t=await this._fetchData(b).then((t=>My(t,"modelId")));return this.propertiesData=t,t}async fetchAnimationsData(){const t=await this._fetchData(y).then((t=>My(t,"modelId")));return this.animationsData=t,t}async fetchModelVisionsData(){const t=await this._fetchData(w).then((t=>new Map(Object.entries(t))));return this.modelVisionsData=t,t}async loadObjects(t){if(!this.treeData)return void console.error("treeData is null");const{syncProperties:e}=t,i=async(t,r)=>{const{ssp:n}=this,{id:o,name:s,renderType:h,path:a,matrix:u}=t,f=(new l).fromArray(u);let d=null;if("3D"===h)if(a)try{const e=Object.assign({},t);Reflect.deleteProperty(e,"children");const i=a.replaceAll(/#/g,"%23");d=await n.loadModel({id:o,name:s,url:this._resolvePath(i),userData:e})}catch(t){console.error(t)}else n.utils.warn(`id: ${o} path 为空`);else"GROUP"!==h&&"STUB"!==h||(d=n.createGroup({id:o,name:s,userData:Object.assign({},t)}));if(d&&(f.decompose(d.position,d.quaternion,d.scale),r&&n.addObject(d,r),e&&this.propertiesData)){const t=this.propertiesData.get(o);t&&(d.userData[M]=t)}t.children.length>0&&await Promise.allSettled(t.children.map((t=>i(t,d))))};await Promise.allSettled(this.treeData.map((t=>i(t,null))))}setPath(t){this.path=t}async loadScene(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{version:e}=await this.fetchMetaData();if(e>=1.2){if(await d(this,sy,"m",cy).call(this),!d(this,uy,"f")&&!d(this,fy,"f")){const{utils:t}=this.ssp;return void t.error(`未授权的场景包:${this.path}`)}!d(this,uy,"f")&&d(this,fy,"f")&&(d(this,ly,"f")?d(this,ay,"f").removeFromViewport():d(this,ay,"f").addToViewport())}else this.treeData=await this.fetchTreeData();t=Object.assign({syncProperties:!0,syncModelVisions:!0,needsModelsBoundsTree:!0,applyPresetEffects:!1},t),await Promise.allSettled([(async()=>{t.syncProperties&&await this.fetchPropertiesData()})(),(async()=>{t.syncModelVisions&&await this.fetchModelVisionsData()})()]),await this.loadObjects(t),t.needsModelsBoundsTree&&this.ssp.computeModelsBoundsTree(),t.applyPresetEffects&&this.presetEffects()}async presetEffects(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{hdr:e=!0,ssao:i=!0,directionalLightShadow:r=!0}=t;if(await this.ssp.render(),e){const{environment:t}=await this.fetchMetaData();t&&this.ssp.setEnvironment({file:`${this.path}${t}`})}if(i&&this.ssp.setSSAO(),r){const t=this.ssp.getAllModel().reduce(((t,e)=>t.union(this.ssp.utils.getBoundingBox(e.children[0]))),new u),{min:e,max:i}=t,n=new f;t.getSize(n);let o=45;this.ssp.utils.isObject(r)&&"number"==typeof r.angle&&(o=r.angle);const s=Math.tan(Math.PI/180*o)*n.x;this.ssp.createDirectionalLight({id:"directionalLight",name:"directionalLight",position:{x:i.x,y:s,z:i.z},target:{x:e.x,y:e.y,z:e.z},openShadow:!0,shadowAutoUpdate:!1,intensity:2,mapSize:this.ssp.viewport.renderer.capabilities.maxTextureSize/2})}}async getTopologies(){return this.fetchTopologyData()}async playAnimationById(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{utils:{error:n},animation:o}=this.ssp,{onStart:s,onUpdate:h}=r,a=await this.fetchAnimationsData(),u=this.ssp.getObjectById(t);if(!u)return void n(`playAnimationById: id 为 ${t} 场景对象未找到`);const f=a.get(t);if(f){const r=f[e];if(r)for(let t=0,e=r.keyframes.length;t<e;t++){let e;if(r.keyframes[t-1]){const i=r.keyframes[t-1];e={x:i.x,y:i.y,z:i.z,rotationX:i.rotationX,rotationY:i.rotationY,rotationZ:i.rotationZ,scaleX:i.scaleX,scaleY:i.scaleY,scaleZ:i.scaleZ}}else{const t=new i,r=(new l).fromArray(u.userData.matrix);t.applyMatrix4(r),e={x:t.position.x,y:t.position.y,z:t.position.z,rotationX:t.rotation.x,rotationY:t.rotation.y,rotationZ:t.rotation.z,scaleX:t.scale.x,scaleY:t.scale.y,scaleZ:t.scale.z}}const n=r.keyframes[t],{delay:a,duration:f,easing:d,repeat:c,yoyo:p}=n,m={x:n.x,y:n.y,z:n.z,rotationX:n.rotationX,rotationY:n.rotationY,rotationZ:n.rotationZ,scaleX:n.scaleX,scaleY:n.scaleY,scaleZ:n.scaleZ};await o(e,m,{delay:a,duration:f,mode:d,repeat:-1===c?1/0:c,yoyo:p},((t,e)=>{u.position.set(t.x,t.y,t.z),u.rotation.set(t.rotationX,t.rotationY,t.rotationZ),u.scale.set(t.scaleX,t.scaleY,t.scaleZ),null==h||h(t,e)}),(t=>{null==s||s(t)}))}else n(`id: ${t} 未找到索引为 ${e} 的动画`)}else n(`id: ${t} 未找到动画`)}}function My(t,e){const i=new Map;return t.reduce(((t,i)=>{const r=t.get(i[e]);return r?r.push(i):t.set(i[e],[i]),t}),i),i}hy=new WeakMap,ay=new WeakMap,uy=new WeakMap,fy=new WeakMap,ly=new WeakMap,sy=new WeakSet,dy=function(t){let e="";for(let i=0;i<t.length;i++){const r=t.charCodeAt(i)-1;e+=String.fromCharCode(r)}return e},cy=async function(){let t;const{resource:e}=await this.fetchMetaData();if(d(this,hy,"f").verifyKey){if(t=await d(this,sy,"m",py).call(this,e),"forbid"===t)return void c(this,uy,!1,"f");if("noServerEnc"===t)await d(this,sy,"m",vy).call(this,e);else{const{verifiedRes:e,dec:i}=d(this,sy,"m",gy).call(this,t.content,t.sign,"verifyKey");c(this,uy,e,"f"),d(this,uy,"f")&&(this.treeData=i)}}else if(d(this,hy,"f").key){const{verifiedRes:t}=await d(this,sy,"m",by).call(this,e);t||await d(this,sy,"m",vy).call(this,e)}else d(this,hy,"f").debugKey?await d(this,sy,"m",vy).call(this,e):console.error("许可证密钥不存在")},py=async function(t){const e=Math.random().toString(36).substring(2),{verifyKey:i}=d(this,hy,"f"),r=new yy(i,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"}),n=r.encrypt(e,"base64"),o=await d(this,sy,"m",my).call(this,this._resolvePath(t),n),{license:s,serverEnc:h}=o;if(!h)return"noServerEnc";return r.decryptPublic(h,"utf8")!==e?"forbid":s},my=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{const i=await fetch(t,{headers:{token:e}}),r=i.headers,n=await i.json();return{license:n,serverEnc:r.get("token")}}catch(t){return{license:{content:"",sign:""},serverEnc:""}}},gy=function(t,e,i){let r="";r="debugKey"===i?d(this,sy,"m",dy).call(this,d(this,hy,"f").debugKey):d(this,hy,"f")[i];let n=[],o=!1;try{const i=new yy(r,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"});n=i.decryptPublic(t,"json"),o=i.verify(t,e,"base64","base64")}catch(t){this.ssp.utils.error("秘钥 key 验证失败")}return{verifiedRes:o,dec:n}},vy=async function(t){const{content:e,sign:i}=await this._fetchData(t),{verifiedRes:r,dec:n}=d(this,sy,"m",gy).call(this,e,i,"debugKey");c(this,fy,r,"f"),d(this,fy,"f")&&(this.treeData=n)},by=async function(t){const{content:e,sign:i}=await this._fetchData(t),{verifiedRes:r,dec:n}=d(this,sy,"m",gy).call(this,e,i,"key");return c(this,ly,r,"f"),c(this,fy,r,"f"),d(this,ly,"f")&&(this.treeData=n),{verifiedRes:r,dec:n}};export{y as ANIMATIONS_DATA_FILE_PATH,p as META_DATA_FILE_PATH,w as MODEL_VISIONS_DATA_FILE_PATH,b as PROPERTIES_DATA_FLEE_PATH,M as PROPERTIES_KEY,m as SIGN_PATH,v as TOPOLOGY_DATA_FILE_PATH,g as TREE_DATA_FILE_PATH,wy as default};