promptfoo 0.87.1 → 0.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/README.md +3 -3
  2. package/dist/package.json +29 -29
  3. package/dist/src/__mocks__/esm.d.ts.map +1 -1
  4. package/dist/src/__mocks__/esm.js +1 -0
  5. package/dist/src/__mocks__/esm.js.map +1 -1
  6. package/dist/src/app/assets/index-DQ5S2Ye6.js +782 -0
  7. package/dist/src/app/assets/index-Dl-FhnW1.css +1 -0
  8. package/dist/src/app/assets/index.es-DR-0y8vm.js +18 -0
  9. package/dist/src/app/assets/purify.es-DGIRlouP.js +3 -0
  10. package/dist/src/app/assets/sync-D_jwcTYY.js +4 -0
  11. package/dist/src/app/favicon.png +0 -0
  12. package/dist/src/app/index.html +16 -0
  13. package/dist/src/assertions/AssertionsResult.d.ts.map +1 -1
  14. package/dist/src/assertions/AssertionsResult.js +7 -0
  15. package/dist/src/assertions/AssertionsResult.js.map +1 -1
  16. package/dist/src/assertions.d.ts.map +1 -1
  17. package/dist/src/assertions.js +19 -4
  18. package/dist/src/assertions.js.map +1 -1
  19. package/dist/src/cache.js +1 -1
  20. package/dist/src/cache.js.map +1 -1
  21. package/dist/src/commands/cache.js +2 -2
  22. package/dist/src/commands/cache.js.map +1 -1
  23. package/dist/src/commands/delete.js +2 -2
  24. package/dist/src/commands/delete.js.map +1 -1
  25. package/dist/src/commands/eval.d.ts +1 -1
  26. package/dist/src/commands/eval.d.ts.map +1 -1
  27. package/dist/src/commands/eval.js +17 -3
  28. package/dist/src/commands/eval.js.map +1 -1
  29. package/dist/src/commands/generate/dataset.js +1 -1
  30. package/dist/src/commands/generate/dataset.js.map +1 -1
  31. package/dist/src/commands/list.js +3 -3
  32. package/dist/src/commands/list.js.map +1 -1
  33. package/dist/src/commands/share.js +2 -2
  34. package/dist/src/commands/share.js.map +1 -1
  35. package/dist/src/commands/show.js +1 -1
  36. package/dist/src/commands/show.js.map +1 -1
  37. package/dist/src/commands/view.js +2 -2
  38. package/dist/src/commands/view.js.map +1 -1
  39. package/dist/src/config.d.ts.map +1 -1
  40. package/dist/src/config.js +47 -57
  41. package/dist/src/config.js.map +1 -1
  42. package/dist/src/csv.d.ts.map +1 -1
  43. package/dist/src/csv.js +40 -15
  44. package/dist/src/csv.js.map +1 -1
  45. package/dist/src/database/tables.d.ts +18 -18
  46. package/dist/src/envars.d.ts +1 -0
  47. package/dist/src/envars.d.ts.map +1 -1
  48. package/dist/src/envars.js.map +1 -1
  49. package/dist/src/evaluator.d.ts.map +1 -1
  50. package/dist/src/evaluator.js +32 -0
  51. package/dist/src/evaluator.js.map +1 -1
  52. package/dist/src/evaluatorHelpers.js +1 -1
  53. package/dist/src/evaluatorHelpers.js.map +1 -1
  54. package/dist/src/globalConfig.js +1 -1
  55. package/dist/src/globalConfig.js.map +1 -1
  56. package/dist/src/golang/wrapper.go +53 -0
  57. package/dist/src/main.d.ts.map +1 -1
  58. package/dist/src/main.js +5 -11
  59. package/dist/src/main.js.map +1 -1
  60. package/dist/src/onboarding.d.ts +1 -1
  61. package/dist/src/onboarding.d.ts.map +1 -1
  62. package/dist/src/onboarding.js +4 -2
  63. package/dist/src/onboarding.js.map +1 -1
  64. package/dist/src/providers/ai21.d.ts.map +1 -1
  65. package/dist/src/providers/ai21.js +3 -12
  66. package/dist/src/providers/ai21.js.map +1 -1
  67. package/dist/src/providers/anthropic.d.ts +3 -3
  68. package/dist/src/providers/anthropic.d.ts.map +1 -1
  69. package/dist/src/providers/anthropic.js +44 -34
  70. package/dist/src/providers/anthropic.js.map +1 -1
  71. package/dist/src/providers/azureopenai.d.ts +3 -2
  72. package/dist/src/providers/azureopenai.d.ts.map +1 -1
  73. package/dist/src/providers/azureopenai.js +129 -3
  74. package/dist/src/providers/azureopenai.js.map +1 -1
  75. package/dist/src/providers/bedrock.js +2 -2
  76. package/dist/src/providers/bedrock.js.map +1 -1
  77. package/dist/src/providers/cloudflare-ai.d.ts +2 -2
  78. package/dist/src/providers/cloudflare-ai.d.ts.map +1 -1
  79. package/dist/src/providers/cloudflare-ai.js.map +1 -1
  80. package/dist/src/providers/cohere.js +1 -1
  81. package/dist/src/providers/cohere.js.map +1 -1
  82. package/dist/src/providers/golangCompletion.d.ts +19 -0
  83. package/dist/src/providers/golangCompletion.d.ts.map +1 -0
  84. package/dist/src/providers/golangCompletion.js +105 -0
  85. package/dist/src/providers/golangCompletion.js.map +1 -0
  86. package/dist/src/providers/http.js +1 -1
  87. package/dist/src/providers/http.js.map +1 -1
  88. package/dist/src/providers/mistral.d.ts.map +1 -1
  89. package/dist/src/providers/mistral.js +8 -18
  90. package/dist/src/providers/mistral.js.map +1 -1
  91. package/dist/src/providers/openai.d.ts +13 -0
  92. package/dist/src/providers/openai.d.ts.map +1 -1
  93. package/dist/src/providers/openai.js +28 -24
  94. package/dist/src/providers/openai.js.map +1 -1
  95. package/dist/src/providers/openaiUtil.d.ts.map +1 -1
  96. package/dist/src/providers/openaiUtil.js +1 -1
  97. package/dist/src/providers/openaiUtil.js.map +1 -1
  98. package/dist/src/providers/shared.d.ts +41 -0
  99. package/dist/src/providers/shared.d.ts.map +1 -1
  100. package/dist/src/providers/shared.js +44 -0
  101. package/dist/src/providers/shared.js.map +1 -1
  102. package/dist/src/providers/vertexUtil.js +2 -2
  103. package/dist/src/providers/vertexUtil.js.map +1 -1
  104. package/dist/src/providers.d.ts.map +1 -1
  105. package/dist/src/providers.js +5 -0
  106. package/dist/src/providers.js.map +1 -1
  107. package/dist/src/python/execAsync.d.ts +10 -0
  108. package/dist/src/python/execAsync.d.ts.map +1 -0
  109. package/dist/src/python/execAsync.js +17 -0
  110. package/dist/src/python/execAsync.js.map +1 -0
  111. package/dist/src/python/pythonUtils.d.ts +29 -0
  112. package/dist/src/python/pythonUtils.d.ts.map +1 -1
  113. package/dist/src/python/pythonUtils.js +85 -6
  114. package/dist/src/python/pythonUtils.js.map +1 -1
  115. package/dist/src/python/wrapper.d.ts.map +1 -1
  116. package/dist/src/python/wrapper.js +8 -5
  117. package/dist/src/python/wrapper.js.map +1 -1
  118. package/dist/src/{commands/redteam → redteam/commands}/generate.d.ts +1 -1
  119. package/dist/src/redteam/commands/generate.d.ts.map +1 -0
  120. package/dist/src/{commands/redteam → redteam/commands}/generate.js +14 -14
  121. package/dist/src/redteam/commands/generate.js.map +1 -0
  122. package/dist/src/redteam/commands/init.d.ts.map +1 -0
  123. package/dist/src/{commands/redteam → redteam/commands}/init.js +23 -15
  124. package/dist/src/redteam/commands/init.js.map +1 -0
  125. package/dist/src/{commands/redteam → redteam/commands}/plugins.d.ts.map +1 -1
  126. package/dist/src/{commands/redteam → redteam/commands}/plugins.js +1 -1
  127. package/dist/src/{commands/redteam → redteam/commands}/plugins.js.map +1 -1
  128. package/dist/src/redteam/constants.d.ts.map +1 -1
  129. package/dist/src/redteam/constants.js +16 -22
  130. package/dist/src/redteam/constants.js.map +1 -1
  131. package/dist/src/redteam/index.d.ts +1 -1
  132. package/dist/src/redteam/index.d.ts.map +1 -1
  133. package/dist/src/redteam/index.js.map +1 -1
  134. package/dist/src/redteam/providers/crescendo/index.js +2 -2
  135. package/dist/src/redteam/providers/crescendo/index.js.map +1 -1
  136. package/dist/src/redteam/providers/prompts.d.ts.map +1 -1
  137. package/dist/src/redteam/providers/prompts.js +23 -0
  138. package/dist/src/redteam/providers/prompts.js.map +1 -1
  139. package/dist/src/{types/redteam.d.ts → redteam/types.d.ts} +1 -1
  140. package/dist/src/redteam/types.d.ts.map +1 -0
  141. package/dist/src/{types/redteam.js → redteam/types.js} +1 -1
  142. package/dist/src/redteam/types.js.map +1 -0
  143. package/dist/src/server/server.d.ts.map +1 -1
  144. package/dist/src/server/server.js +10 -3
  145. package/dist/src/server/server.js.map +1 -1
  146. package/dist/src/share.js +1 -1
  147. package/dist/src/share.js.map +1 -1
  148. package/dist/src/suggestions.js +1 -1
  149. package/dist/src/suggestions.js.map +1 -1
  150. package/dist/src/telemetry.d.ts.map +1 -1
  151. package/dist/src/telemetry.js +3 -1
  152. package/dist/src/telemetry.js.map +1 -1
  153. package/dist/src/testCases.d.ts.map +1 -1
  154. package/dist/src/testCases.js +4 -3
  155. package/dist/src/testCases.js.map +1 -1
  156. package/dist/src/types/index.d.ts +413 -231
  157. package/dist/src/types/index.d.ts.map +1 -1
  158. package/dist/src/types/index.js +12 -2
  159. package/dist/src/types/index.js.map +1 -1
  160. package/dist/src/util/index.d.ts +19 -5
  161. package/dist/src/util/index.d.ts.map +1 -1
  162. package/dist/src/util/index.js +5 -3
  163. package/dist/src/util/index.js.map +1 -1
  164. package/dist/src/util/json.js +2 -2
  165. package/dist/src/util/json.js.map +1 -1
  166. package/dist/src/validators/prompts.d.ts +2 -2
  167. package/dist/src/validators/providers.d.ts +166 -20
  168. package/dist/src/validators/providers.d.ts.map +1 -1
  169. package/dist/src/validators/providers.js +5 -5
  170. package/dist/src/validators/providers.js.map +1 -1
  171. package/dist/src/validators/redteam.d.ts +15 -15
  172. package/dist/test/assertions.test.js +49 -0
  173. package/dist/test/assertions.test.js.map +1 -1
  174. package/dist/test/config.test.js +192 -48
  175. package/dist/test/config.test.js.map +1 -1
  176. package/dist/test/csv.test.js +84 -0
  177. package/dist/test/csv.test.js.map +1 -1
  178. package/dist/test/envars.test.js +103 -0
  179. package/dist/test/envars.test.js.map +1 -1
  180. package/dist/test/matchers.test.js +5 -5
  181. package/dist/test/matchers.test.js.map +1 -1
  182. package/dist/test/providers.anthropic.test.js +93 -23
  183. package/dist/test/providers.anthropic.test.js.map +1 -1
  184. package/dist/test/providers.azure.test.js +42 -0
  185. package/dist/test/providers.azure.test.js.map +1 -1
  186. package/dist/test/providers.bedrock.test.js +2 -1
  187. package/dist/test/providers.bedrock.test.js.map +1 -1
  188. package/dist/test/providers.shared.test.d.ts +2 -0
  189. package/dist/test/providers.shared.test.d.ts.map +1 -0
  190. package/dist/test/providers.shared.test.js +92 -0
  191. package/dist/test/providers.shared.test.js.map +1 -0
  192. package/dist/test/providers.test.js +112 -7
  193. package/dist/test/providers.test.js.map +1 -1
  194. package/dist/test/python/pythonUtils.test.d.ts +2 -0
  195. package/dist/test/python/pythonUtils.test.d.ts.map +1 -0
  196. package/dist/test/python/pythonUtils.test.js +224 -0
  197. package/dist/test/python/pythonUtils.test.js.map +1 -0
  198. package/dist/test/python/wrapper.test.d.ts +2 -0
  199. package/dist/test/python/wrapper.test.d.ts.map +1 -0
  200. package/dist/test/python/wrapper.test.js +71 -0
  201. package/dist/test/python/wrapper.test.js.map +1 -0
  202. package/dist/test/rateLimit.test.js.map +1 -1
  203. package/dist/test/redteam/commands/generate.test.d.ts.map +1 -0
  204. package/dist/test/{commands/redteam → redteam/commands}/generate.test.js +1 -1
  205. package/dist/test/{commands/redteam → redteam/commands}/generate.test.js.map +1 -1
  206. package/dist/test/redteam/validators.test.js +2 -2
  207. package/dist/test/redteam/validators.test.js.map +1 -1
  208. package/dist/test/testCases.test.js +75 -27
  209. package/dist/test/testCases.test.js.map +1 -1
  210. package/dist/test/types.test.js +17 -10
  211. package/dist/test/types.test.js.map +1 -1
  212. package/dist/test/util.test.js +10 -0
  213. package/dist/test/util.test.js.map +1 -1
  214. package/package.json +29 -29
  215. package/dist/src/commands/redteam/generate.d.ts.map +0 -1
  216. package/dist/src/commands/redteam/generate.js.map +0 -1
  217. package/dist/src/commands/redteam/init.d.ts.map +0 -1
  218. package/dist/src/commands/redteam/init.js.map +0 -1
  219. package/dist/src/types/redteam.d.ts.map +0 -1
  220. package/dist/src/types/redteam.js.map +0 -1
  221. package/dist/src/web/nextui/404/index.html +0 -1
  222. package/dist/src/web/nextui/404.html +0 -1
  223. package/dist/src/web/nextui/_next/static/chunks/113-c691bf7d3a37d865.js +0 -1
  224. package/dist/src/web/nextui/_next/static/chunks/132-d6bea93785831786.js +0 -6
  225. package/dist/src/web/nextui/_next/static/chunks/15.306496fdcef5f880.js +0 -52
  226. package/dist/src/web/nextui/_next/static/chunks/167-744b9f585d2d97f7.js +0 -54
  227. package/dist/src/web/nextui/_next/static/chunks/189-f9d565af9a2b91cb.js +0 -1
  228. package/dist/src/web/nextui/_next/static/chunks/1a53ab81-5e1a018996226f61.js +0 -6
  229. package/dist/src/web/nextui/_next/static/chunks/235-2bbcbc3cd37eef0f.js +0 -1
  230. package/dist/src/web/nextui/_next/static/chunks/285-1e2a6158b5f0e918.js +0 -32
  231. package/dist/src/web/nextui/_next/static/chunks/407.42b5daf65ab5dde9.js +0 -1
  232. package/dist/src/web/nextui/_next/static/chunks/417-cbf95fe2bc362650.js +0 -2
  233. package/dist/src/web/nextui/_next/static/chunks/461-77257ab6b1bb209d.js +0 -1
  234. package/dist/src/web/nextui/_next/static/chunks/565431e5-7b9122ac20f7a0ae.js +0 -140
  235. package/dist/src/web/nextui/_next/static/chunks/631-d005608c3710a99c.js +0 -6
  236. package/dist/src/web/nextui/_next/static/chunks/640-0f757e2fe135173d.js +0 -1
  237. package/dist/src/web/nextui/_next/static/chunks/646-62a1d1d5b397d18f.js +0 -28
  238. package/dist/src/web/nextui/_next/static/chunks/730-3eb7255cd813a727.js +0 -25
  239. package/dist/src/web/nextui/_next/static/chunks/782-910eb0e09b818816.js +0 -35
  240. package/dist/src/web/nextui/_next/static/chunks/840.58dde6630f088da4.js +0 -1
  241. package/dist/src/web/nextui/_next/static/chunks/854-c18aaae33bccdc36.js +0 -1
  242. package/dist/src/web/nextui/_next/static/chunks/86-fcb0efd0a19bac7d.js +0 -1
  243. package/dist/src/web/nextui/_next/static/chunks/874-66f90697795eddbc.js +0 -1
  244. package/dist/src/web/nextui/_next/static/chunks/88-f3a7a858d5f4e9a0.js +0 -17
  245. package/dist/src/web/nextui/_next/static/chunks/887.028187fb318c3e59.js +0 -1
  246. package/dist/src/web/nextui/_next/static/chunks/906-70c43cd62b2efac1.js +0 -97
  247. package/dist/src/web/nextui/_next/static/chunks/972-15d1ab608a24eebf.js +0 -1
  248. package/dist/src/web/nextui/_next/static/chunks/975-db84f98b8dd028ab.js +0 -1
  249. package/dist/src/web/nextui/_next/static/chunks/a5c829b0-07a2c92898a6780c.js +0 -14
  250. package/dist/src/web/nextui/_next/static/chunks/app/auth/login/page-c1dbf0abc580796f.js +0 -1
  251. package/dist/src/web/nextui/_next/static/chunks/app/auth/signup/page-93b80ab19bdaf2cc.js +0 -1
  252. package/dist/src/web/nextui/_next/static/chunks/app/datasets/page-17e6d3f57945f88a.js +0 -1
  253. package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/not-found-dc8b4f57fd363c1b.js +0 -1
  254. package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/page-1e54704d75f36e25.js +0 -1
  255. package/dist/src/web/nextui/_next/static/chunks/app/eval/page-5295461188ef9b43.js +0 -1
  256. package/dist/src/web/nextui/_next/static/chunks/app/layout-e465aaafbfe88e82.js +0 -1
  257. package/dist/src/web/nextui/_next/static/chunks/app/page-81e3b8fee37eaf67.js +0 -1
  258. package/dist/src/web/nextui/_next/static/chunks/app/progress/page-ac2f99c11e76f5a5.js +0 -1
  259. package/dist/src/web/nextui/_next/static/chunks/app/prompts/page-296c32f480e84a57.js +0 -1
  260. package/dist/src/web/nextui/_next/static/chunks/app/report/page-f7c9e46492061e19.js +0 -1
  261. package/dist/src/web/nextui/_next/static/chunks/app/setup/page-35c95dd67114a045.js +0 -1
  262. package/dist/src/web/nextui/_next/static/chunks/b6261da7-e9d81a4364ddd0c0.js +0 -9
  263. package/dist/src/web/nextui/_next/static/chunks/fd57813c.8f0e3582250c76c5.js +0 -1
  264. package/dist/src/web/nextui/_next/static/chunks/framework-c3d480eb9ad30ba5.js +0 -25
  265. package/dist/src/web/nextui/_next/static/chunks/main-6b1ff2291a752212.js +0 -1
  266. package/dist/src/web/nextui/_next/static/chunks/main-app-0dc90092cd7acaaf.js +0 -1
  267. package/dist/src/web/nextui/_next/static/chunks/pages/_app-998b254a061422d4.js +0 -1
  268. package/dist/src/web/nextui/_next/static/chunks/pages/_error-94f0db477e27e000.js +0 -1
  269. package/dist/src/web/nextui/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js +0 -1
  270. package/dist/src/web/nextui/_next/static/chunks/webpack-452ae8c28379ed4c.js +0 -1
  271. package/dist/src/web/nextui/_next/static/css/48d388184a2f4ce3.css +0 -1
  272. package/dist/src/web/nextui/_next/static/css/4d76d7cdd9492e1d.css +0 -1
  273. package/dist/src/web/nextui/_next/static/css/8119d8bd13a8adab.css +0 -1
  274. package/dist/src/web/nextui/_next/static/css/87b5e6e04efd27e5.css +0 -1
  275. package/dist/src/web/nextui/_next/static/css/de0307797e31a3e6.css +0 -1
  276. package/dist/src/web/nextui/_next/static/css/eb523daddb89dfc1.css +0 -1
  277. package/dist/src/web/nextui/_next/static/css/edcd6f0b6c902fde.css +0 -1
  278. package/dist/src/web/nextui/_next/static/gtTJhFvE95U20UjbnSnMr/_buildManifest.js +0 -1
  279. package/dist/src/web/nextui/_next/static/gtTJhFvE95U20UjbnSnMr/_ssgManifest.js +0 -1
  280. package/dist/src/web/nextui/_next/static/media/26a46d62cd723877-s.woff2 +0 -0
  281. package/dist/src/web/nextui/_next/static/media/55c55f0601d81cf3-s.woff2 +0 -0
  282. package/dist/src/web/nextui/_next/static/media/581909926a08bbc8-s.woff2 +0 -0
  283. package/dist/src/web/nextui/_next/static/media/6d93bde91c0c2823-s.woff2 +0 -0
  284. package/dist/src/web/nextui/_next/static/media/97e0cb1ae144a2a9-s.woff2 +0 -0
  285. package/dist/src/web/nextui/_next/static/media/a34f9d1faa5f3315-s.p.woff2 +0 -0
  286. package/dist/src/web/nextui/_next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
  287. package/dist/src/web/nextui/android-chrome-192x192.png +0 -0
  288. package/dist/src/web/nextui/android-chrome-512x512.png +0 -0
  289. package/dist/src/web/nextui/apple-touch-icon.png +0 -0
  290. package/dist/src/web/nextui/auth/callback +0 -1
  291. package/dist/src/web/nextui/auth/login/index.html +0 -1
  292. package/dist/src/web/nextui/auth/login/index.txt +0 -10
  293. package/dist/src/web/nextui/auth/signup/index.html +0 -1
  294. package/dist/src/web/nextui/auth/signup/index.txt +0 -10
  295. package/dist/src/web/nextui/browserconfig.xml +0 -9
  296. package/dist/src/web/nextui/datasets/index.html +0 -1
  297. package/dist/src/web/nextui/datasets/index.txt +0 -10
  298. package/dist/src/web/nextui/eval/index.html +0 -1
  299. package/dist/src/web/nextui/eval/index.txt +0 -12
  300. package/dist/src/web/nextui/index.html +0 -1
  301. package/dist/src/web/nextui/index.txt +0 -11
  302. package/dist/src/web/nextui/logo.svg +0 -30
  303. package/dist/src/web/nextui/mstile-144x144.png +0 -0
  304. package/dist/src/web/nextui/mstile-150x150.png +0 -0
  305. package/dist/src/web/nextui/mstile-310x150.png +0 -0
  306. package/dist/src/web/nextui/mstile-310x310.png +0 -0
  307. package/dist/src/web/nextui/mstile-70x70.png +0 -0
  308. package/dist/src/web/nextui/progress/index.html +0 -1
  309. package/dist/src/web/nextui/progress/index.txt +0 -10
  310. package/dist/src/web/nextui/prompts/index.html +0 -1
  311. package/dist/src/web/nextui/prompts/index.txt +0 -10
  312. package/dist/src/web/nextui/report/index.html +0 -1
  313. package/dist/src/web/nextui/report/index.txt +0 -12
  314. package/dist/src/web/nextui/safari-pinned-tab.svg +0 -68
  315. package/dist/src/web/nextui/setup/index.html +0 -1
  316. package/dist/src/web/nextui/setup/index.txt +0 -12
  317. package/dist/src/web/nextui/site.webmanifest +0 -19
  318. package/dist/test/commands/redteam/generate.test.d.ts.map +0 -1
  319. package/dist/test/pythonWrapper.test.d.ts +0 -2
  320. package/dist/test/pythonWrapper.test.d.ts.map +0 -1
  321. package/dist/test/pythonWrapper.test.js +0 -99
  322. package/dist/test/pythonWrapper.test.js.map +0 -1
  323. /package/dist/src/{web/nextui/logo-panda.svg → app/assets/logo-panda-BuYvzEyb.svg} +0 -0
  324. /package/dist/src/{web/nextui → app}/favicon-16x16.png +0 -0
  325. /package/dist/src/{web/nextui → app}/favicon-32x32.png +0 -0
  326. /package/dist/src/{web/nextui → app}/favicon.ico +0 -0
  327. /package/dist/src/{commands/redteam → redteam/commands}/init.d.ts +0 -0
  328. /package/dist/src/{commands/redteam → redteam/commands}/plugins.d.ts +0 -0
  329. /package/dist/test/{commands/redteam → redteam/commands}/generate.test.d.ts +0 -0
@@ -1,6 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[132],{12594:function(e,t,s){"use strict";var r,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,l={};((e,t)=>{for(var s in t)i(e,s,{get:t[s],enumerable:!0})})(l,{createBrowserSupabaseClient:()=>j,createClientComponentClient:()=>c,createMiddlewareClient:()=>_,createMiddlewareSupabaseClient:()=>P,createPagesBrowserClient:()=>u,createPagesServerClient:()=>g,createRouteHandlerClient:()=>E,createServerActionClient:()=>O,createServerComponentClient:()=>k,createServerSupabaseClient:()=>C}),e.exports=((e,t,s,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))o.call(e,s)||void 0===s||i(e,s,{get:()=>t[s],enumerable:!(r=n(t,s))||r.enumerable});return e})(i({},"__esModule",{value:!0}),l);var h=s(39386);function c({supabaseUrl:e="https://placeholder.promptfoo.dev",supabaseKey:t="abc123",options:s,cookieOptions:i,isSingleton:n=!0}={}){if(!e||!t)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");let a=()=>{var r;return(0,h.createSupabaseClient)(e,t,{...s,global:{...null==s?void 0:s.global,headers:{...null==(r=null==s?void 0:s.global)?void 0:r.headers,"X-Client-Info":"@supabase/auth-helpers-nextjs@0.7.4"}},auth:{storageKey:null==i?void 0:i.name,storage:new h.BrowserCookieAuthStorageAdapter(i)}})};if(n){let e=r??a();return"undefined"==typeof window?e:(r||(r=e),r)}return a()}var u=c,d=s(39386),f=s(76051),p=class extends d.CookieAuthStorageAdapter{constructor(e,t){super(t),this.context=e}getCookie(e){var t;let s=(0,f.splitCookiesString)((null==(t=this.context.res.getHeader("set-cookie"))?void 0:t.toString())??"").map(t=>(0,d.parseCookies)(t)[e]).find(e=>!!e),r=s??this.context.req.cookies[e];return r}setCookie(e,t){this._setCookie(e,t)}deleteCookie(e){this._setCookie(e,"",{maxAge:0})}_setCookie(e,t,s){var r;let i=(0,f.splitCookiesString)((null==(r=this.context.res.getHeader("set-cookie"))?void 0:r.toString())??"").filter(t=>!(e in(0,d.parseCookies)(t))),n=(0,d.serializeCookie)(e,t,{...this.cookieOptions,...s,httpOnly:!1});this.context.res.setHeader("set-cookie",[...i,n])}};function g(e,{supabaseUrl:t="https://placeholder.promptfoo.dev",supabaseKey:s="abc123",options:r,cookieOptions:i}={}){var n;if(!t||!s)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,d.createSupabaseClient)(t,s,{...r,global:{...null==r?void 0:r.global,headers:{...null==(n=null==r?void 0:r.global)?void 0:n.headers,"X-Client-Info":"@supabase/auth-helpers-nextjs@0.7.4"}},auth:{storageKey:null==i?void 0:i.name,storage:new p(e,i)}})}var v=s(39386),y=s(76051),m=class extends v.CookieAuthStorageAdapter{constructor(e,t){super(t),this.context=e}getCookie(e){var t;let s=(0,y.splitCookiesString)((null==(t=this.context.res.headers.get("set-cookie"))?void 0:t.toString())??"").map(t=>(0,v.parseCookies)(t)[e]).find(e=>!!e);return s||(0,v.parseCookies)(this.context.req.headers.get("cookie")??"")[e]}setCookie(e,t){this._setCookie(e,t)}deleteCookie(e){this._setCookie(e,"",{maxAge:0})}_setCookie(e,t,s){let r=(0,v.serializeCookie)(e,t,{...this.cookieOptions,...s,httpOnly:!1});this.context.res.headers&&(this.context.res.headers.append("set-cookie",r),this.context.res.headers.append("cookie",r))}};function _(e,{supabaseUrl:t="https://placeholder.promptfoo.dev",supabaseKey:s="abc123",options:r,cookieOptions:i}={}){var n;if(!t||!s)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,v.createSupabaseClient)(t,s,{...r,global:{...null==r?void 0:r.global,headers:{...null==(n=null==r?void 0:r.global)?void 0:n.headers,"X-Client-Info":"@supabase/auth-helpers-nextjs@0.7.4"}},auth:{storageKey:null==i?void 0:i.name,storage:new m(e,i)}})}var w=s(39386),b=class extends w.CookieAuthStorageAdapter{constructor(e,t){super(t),this.context=e}getCookie(e){var t;let s=this.context.cookies();return null==(t=s.get(e))?void 0:t.value}setCookie(e,t){}deleteCookie(e){}};function k(e,{supabaseUrl:t="https://placeholder.promptfoo.dev",supabaseKey:s="abc123",options:r,cookieOptions:i}={}){var n;if(!t||!s)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,w.createSupabaseClient)(t,s,{...r,global:{...null==r?void 0:r.global,headers:{...null==(n=null==r?void 0:r.global)?void 0:n.headers,"X-Client-Info":"@supabase/auth-helpers-nextjs@0.7.4"}},auth:{storageKey:null==i?void 0:i.name,storage:new b(e,i)}})}var S=s(39386),T=class extends S.CookieAuthStorageAdapter{constructor(e,t){super(t),this.context=e}getCookie(e){var t;let s=this.context.cookies();return null==(t=s.get(e))?void 0:t.value}setCookie(e,t){let s=this.context.cookies();s.set(e,t,this.cookieOptions)}deleteCookie(e){let t=this.context.cookies();t.set(e,"",{maxAge:0})}};function E(e,{supabaseUrl:t="https://placeholder.promptfoo.dev",supabaseKey:s="abc123",options:r,cookieOptions:i}={}){var n;if(!t||!s)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,S.createSupabaseClient)(t,s,{...r,global:{...null==r?void 0:r.global,headers:{...null==(n=null==r?void 0:r.global)?void 0:n.headers,"X-Client-Info":"@supabase/auth-helpers-nextjs@0.7.4"}},auth:{storageKey:null==i?void 0:i.name,storage:new T(e,i)}})}var O=E;function j({supabaseUrl:e="https://placeholder.promptfoo.dev",supabaseKey:t="abc123",options:s,cookieOptions:r}={}){return console.warn("Please utilize the `createPagesBrowserClient` function instead of the deprecated `createBrowserSupabaseClient` function. Learn more: https://supabase.com/docs/guides/auth/auth-helpers/nextjs-pages"),u({supabaseUrl:e,supabaseKey:t,options:s,cookieOptions:r})}function C(e,{supabaseUrl:t="https://placeholder.promptfoo.dev",supabaseKey:s="abc123",options:r,cookieOptions:i}={}){return console.warn("Please utilize the `createPagesServerClient` function instead of the deprecated `createServerSupabaseClient` function. Learn more: https://supabase.com/docs/guides/auth/auth-helpers/nextjs-pages"),g(e,{supabaseUrl:t,supabaseKey:s,options:r,cookieOptions:i})}function P(e,{supabaseUrl:t="https://placeholder.promptfoo.dev",supabaseKey:s="abc123",options:r,cookieOptions:i}={}){return console.warn("Please utilize the `createMiddlewareClient` function instead of the deprecated `createMiddlewareSupabaseClient` function. Learn more: https://supabase.com/docs/guides/auth/auth-helpers/nextjs#middleware"),_(e,{supabaseUrl:t,supabaseKey:s,options:r,cookieOptions:i})}},87407:function(e,t,s){"use strict";s.r(t),s.d(t,{Headers:function(){return n},Request:function(){return a},Response:function(){return o},fetch:function(){return i}});var r=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==s.g)return s.g;throw Error("unable to locate global object")}();let i=r.fetch;t.default=r.fetch.bind(r);let n=r.Headers,a=r.Request,o=r.Response},53405:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=r(s(87407)),n=r(s(88236));t.default=class{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:"undefined"==typeof fetch?this.fetch=i.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(e,t){void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),"GET"!==this.method&&"HEAD"!==this.method&&(this.headers["Content-Type"]="application/json");let s=this.fetch,r=s(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async e=>{var t,s,r;let i=null,a=null,o=null,l=e.status,h=e.statusText;if(e.ok){if("HEAD"!==this.method){let t=await e.text();""===t||(a="text/csv"===this.headers.Accept?t:this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?t:JSON.parse(t))}let r=null===(t=this.headers.Prefer)||void 0===t?void 0:t.match(/count=(exact|planned|estimated)/),n=null===(s=e.headers.get("content-range"))||void 0===s?void 0:s.split("/");r&&n&&n.length>1&&(o=parseInt(n[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(a)&&(a.length>1?(i={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,o=null,l=406,h="Not Acceptable"):a=1===a.length?a[0]:null)}else{let t=await e.text();try{i=JSON.parse(t),Array.isArray(i)&&404===e.status&&(a=[],i=null,l=200,h="OK")}catch(s){404===e.status&&""===t?(l=204,h="No Content"):i={message:t}}if(i&&this.isMaybeSingle&&(null===(r=null==i?void 0:i.details)||void 0===r?void 0:r.includes("0 rows"))&&(i=null,l=200,h="OK"),i&&this.shouldThrowOnError)throw new n.default(i)}let c={error:i,data:a,count:o,status:l,statusText:h};return c});return this.shouldThrowOnError||(r=r.catch(e=>{var t,s,r;return{error:{message:`${null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError"}: ${null==e?void 0:e.message}`,details:`${null!==(s=null==e?void 0:e.stack)&&void 0!==s?s:""}`,hint:"",code:`${null!==(r=null==e?void 0:e.code)&&void 0!==r?r:""}`},data:null,count:null,status:0,statusText:""}})),r.then(e,t)}}},29122:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=r(s(46907)),n=r(s(1844)),a=s(20448);class o{constructor(e,{headers:t={},schema:s,fetch:r}={}){this.url=e,this.headers=Object.assign(Object.assign({},a.DEFAULT_HEADERS),t),this.schemaName=s,this.fetch=r}from(e){let t=new URL(`${this.url}/${e}`);return new i.default(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new o(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:s=!1,get:r=!1,count:i}={}){let a,o;let l=new URL(`${this.url}/rpc/${e}`);s||r?(a=s?"HEAD":"GET",Object.entries(t).filter(([e,t])=>void 0!==t).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(",")}}`:`${t}`]).forEach(([e,t])=>{l.searchParams.append(e,t)})):(a="POST",o=t);let h=Object.assign({},this.headers);return i&&(h.Prefer=`count=${i}`),new n.default({method:a,url:l,headers:h,schema:this.schemaName,body:o,fetch:this.fetch,allowEmpty:!1})}}t.default=o},88236:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}},1844:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=r(s(53172));class n extends i.default{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){let s=Array.from(new Set(t)).map(e=>"string"==typeof e&&RegExp("[,()]").test(e)?`"${e}"`:`${e}`).join(",");return this.url.searchParams.append(e,`in.(${s})`),this}contains(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return"string"==typeof t?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:s,type:r}={}){let i="";"plain"===r?i="pl":"phrase"===r?i="ph":"websearch"===r&&(i="w");let n=void 0===s?"":`(${s})`;return this.url.searchParams.append(e,`${i}fts${n}.${t}`),this}match(e){return Object.entries(e).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,s){return this.url.searchParams.append(e,`not.${t}.${s}`),this}or(e,{foreignTable:t,referencedTable:s=t}={}){let r=s?`${s}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,s){return this.url.searchParams.append(e,`${t}.${s}`),this}}t.default=n},46907:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=r(s(1844));t.default=class{constructor(e,{headers:t={},schema:s,fetch:r}){this.url=e,this.headers=t,this.schema=s,this.fetch=r}select(e,{head:t=!1,count:s}={}){let r=!1,n=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!r?"":('"'===e&&(r=!r),e)).join("");return this.url.searchParams.set("select",n),s&&(this.headers.Prefer=`count=${s}`),new i.default({method:t?"HEAD":"GET",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:s=!0}={}){let r=[];if(this.headers.Prefer&&r.push(this.headers.Prefer),t&&r.push(`count=${t}`),s||r.push("missing=default"),this.headers.Prefer=r.join(","),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);this.url.searchParams.set("columns",e.join(","))}}return new i.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:s=!1,count:r,defaultToNull:n=!0}={}){let a=[`resolution=${s?"ignore":"merge"}-duplicates`];if(void 0!==t&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&a.push(this.headers.Prefer),r&&a.push(`count=${r}`),n||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);this.url.searchParams.set("columns",e.join(","))}}return new i.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){let s=[];return this.headers.Prefer&&s.push(this.headers.Prefer),t&&s.push(`count=${t}`),this.headers.Prefer=s.join(","),new i.default({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){let t=[];return e&&t.push(`count=${e}`),this.headers.Prefer&&t.unshift(this.headers.Prefer),this.headers.Prefer=t.join(","),new i.default({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}},53172:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=r(s(53405));class n extends i.default{select(e){let t=!1,s=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)).join("");return this.url.searchParams.set("select",s),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:s,foreignTable:r,referencedTable:i=r}={}){let n=i?`${i}.order`:"order",a=this.url.searchParams.get(n);return this.url.searchParams.set(n,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${void 0===s?"":s?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:s=t}={}){let r=void 0===s?"limit":`${s}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:s,referencedTable:r=s}={}){let i=void 0===r?"offset":`${r}.offset`,n=void 0===r?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(n,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return"GET"===this.method?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:s=!1,buffers:r=!1,wal:i=!1,format:n="text"}={}){var a;let o=[e?"analyze":null,t?"verbose":null,s?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=null!==(a=this.headers.Accept)&&void 0!==a?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${n}; for="${l}"; options=${o};`,this}rollback(){var e;return(null!==(e=this.headers.Prefer)&&void 0!==e?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}t.default=n},20448:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_HEADERS=void 0;let r=s(1194);t.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${r.version}`}},23022:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PostgrestBuilder=t.PostgrestTransformBuilder=t.PostgrestFilterBuilder=t.PostgrestQueryBuilder=t.PostgrestClient=void 0;let i=r(s(29122));t.PostgrestClient=i.default;let n=r(s(46907));t.PostgrestQueryBuilder=n.default;let a=r(s(1844));t.PostgrestFilterBuilder=a.default;let o=r(s(53172));t.PostgrestTransformBuilder=o.default;let l=r(s(53405));t.PostgrestBuilder=l.default,t.default={PostgrestClient:i.default,PostgrestQueryBuilder:n.default,PostgrestFilterBuilder:a.default,PostgrestTransformBuilder:o.default,PostgrestBuilder:l.default}},1194:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="0.0.0-automated"},28891:function(e,t,s){e.exports=s(98556)},76051:function(e){"use strict";var t={decodeValues:!0,map:!1,silent:!1};function s(e){return"string"==typeof e&&!!e.trim()}function r(e,r){var i,n,a,o,l=e.split(";").filter(s),h=(i=l.shift(),n="",a="",(o=i.split("=")).length>1?(n=o.shift(),a=o.join("=")):a=i,{name:n,value:a}),c=h.name,u=h.value;r=r?Object.assign({},t,r):t;try{u=r.decodeValues?decodeURIComponent(u):u}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+u+"'. Set options.decodeValues to false to disable this feature.",e)}var d={name:c,value:u};return l.forEach(function(e){var t=e.split("="),s=t.shift().trimLeft().toLowerCase(),r=t.join("=");"expires"===s?d.expires=new Date(r):"max-age"===s?d.maxAge=parseInt(r,10):"secure"===s?d.secure=!0:"httponly"===s?d.httpOnly=!0:"samesite"===s?d.sameSite=r:d[s]=r}),d}function i(e,i){if(i=i?Object.assign({},t,i):t,!e)return i.map?{}:[];if(e.headers){if("function"==typeof e.headers.getSetCookie)e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var n=e.headers[Object.keys(e.headers).find(function(e){return"set-cookie"===e.toLowerCase()})];n||!e.headers.cookie||i.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=n}}return(Array.isArray(e)||(e=[e]),(i=i?Object.assign({},t,i):t).map)?e.filter(s).reduce(function(e,t){var s=r(t,i);return e[s.name]=s,e},{}):e.filter(s).map(function(e){return r(e,i)})}e.exports=i,e.exports.parse=i,e.exports.parseString=r,e.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,s,r,i,n,a=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,n=!1;l();)if(","===(s=e.charAt(o))){for(r=o,o+=1,l(),i=o;o<e.length&&"="!==(s=e.charAt(o))&&";"!==s&&","!==s;)o+=1;o<e.length&&"="===e.charAt(o)?(n=!0,o=i,a.push(e.substring(t,r)),t=o):o=r+1}else o+=1;(!n||o>=e.length)&&a.push(e.substring(t,e.length))}return a}},72303:function(e,t,s){"use strict";s.d(t,{Z:function(){return m}});var r=s(79042),i=s(94312),n=s(70574),a=s(70237),o=s(68062),l=s(87947);let h=["ownerState"],c=["variants"],u=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function d(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}let f=(0,o.Z)(),p=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function g({defaultTheme:e,theme:t,themeId:s}){return 0===Object.keys(t).length?e:t[s]||t}function v(e,t){let{ownerState:s}=t,n=(0,i.Z)(t,h),a="function"==typeof e?e((0,r.Z)({ownerState:s},n)):e;if(Array.isArray(a))return a.flatMap(e=>v(e,(0,r.Z)({ownerState:s},n)));if(a&&"object"==typeof a&&Array.isArray(a.variants)){let{variants:e=[]}=a,t=(0,i.Z)(a,c),o=t;return e.forEach(e=>{let t=!0;"function"==typeof e.props?t=e.props((0,r.Z)({ownerState:s},n,s)):Object.keys(e.props).forEach(r=>{(null==s?void 0:s[r])!==e.props[r]&&n[r]!==e.props[r]&&(t=!1)}),t&&(Array.isArray(o)||(o=[o]),o.push("function"==typeof e.style?e.style((0,r.Z)({ownerState:s},n,s)):e.style))}),o}return a}let y=function(e={}){let{themeId:t,defaultTheme:s=f,rootShouldForwardProp:o=d,slotShouldForwardProp:h=d}=e,c=e=>(0,l.Z)((0,r.Z)({},e,{theme:g((0,r.Z)({},e,{defaultTheme:s,themeId:t}))}));return c.__mui_systemSx=!0,(e,l={})=>{var f;let y;(0,n.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));let{name:m,slot:_,skipVariantsResolver:w,skipSx:b,overridesResolver:k=(f=p(_))?(e,t)=>t[f]:null}=l,S=(0,i.Z)(l,u),T=void 0!==w?w:_&&"Root"!==_&&"root"!==_||!1,E=b||!1,O=d;"Root"===_||"root"===_?O=o:_?O=h:"string"==typeof e&&e.charCodeAt(0)>96&&(O=void 0);let j=(0,n.default)(e,(0,r.Z)({shouldForwardProp:O,label:y},S)),C=e=>"function"==typeof e&&e.__emotion_real!==e||(0,a.P)(e)?i=>v(e,(0,r.Z)({},i,{theme:g({theme:i.theme,defaultTheme:s,themeId:t})})):e,P=(i,...n)=>{let a=C(i),o=n?n.map(C):[];m&&k&&o.push(e=>{let i=g((0,r.Z)({},e,{defaultTheme:s,themeId:t}));if(!i.components||!i.components[m]||!i.components[m].styleOverrides)return null;let n=i.components[m].styleOverrides,a={};return Object.entries(n).forEach(([t,s])=>{a[t]=v(s,(0,r.Z)({},e,{theme:i}))}),k(e,a)}),m&&!T&&o.push(e=>{var i;let n=g((0,r.Z)({},e,{defaultTheme:s,themeId:t})),a=null==n||null==(i=n.components)||null==(i=i[m])?void 0:i.variants;return v({variants:a},(0,r.Z)({},e,{theme:n}))}),E||o.push(c);let l=o.length-n.length;if(Array.isArray(i)&&l>0){let e=Array(l).fill("");(a=[...i,...e]).raw=[...i.raw,...e]}let h=j(a,...o);return e.muiName&&(h.muiName=e.muiName),h};return j.withConfig&&(P.withConfig=j.withConfig),P}}();var m=y},51529:function(e,t,s){"use strict";s.d(t,{Z:function(){return i}});var r=s(73938);function i(e){let{theme:t,name:s,props:i}=e;return t&&t.components&&t.components[s]&&t.components[s].defaultProps?(0,r.Z)(t.components[s].defaultProps,i):i}},48153:function(e,t,s){"use strict";s.d(t,{Z:function(){return n}});var r=s(51529),i=s(95270);function n({props:e,name:t,defaultTheme:s,themeId:n}){let a=(0,i.Z)(s);n&&(a=a[n]||a);let o=(0,r.Z)({theme:a,name:t,props:e});return o}},39386:function(e,t,s){"use strict";s.r(t),s.d(t,{BrowserCookieAuthStorageAdapter:function(){return tQ},CookieAuthStorageAdapter:function(){return tY},DEFAULT_COOKIE_OPTIONS:function(){return tX},createSupabaseClient:function(){return t0},isBrowser:function(){return tZ},parseCookies:function(){return t1},parseSupabaseCookie:function(){return tW},serializeCookie:function(){return t2},stringifySupabaseSession:function(){return tV}}),new TextEncoder;let r=new TextDecoder,i=e=>{let t=atob(e),s=new Uint8Array(t.length);for(let e=0;e<t.length;e++)s[e]=t.charCodeAt(e);return s},n=e=>{let t=e;t instanceof Uint8Array&&(t=r.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return i(t)}catch(e){throw TypeError("The input to be decoded is not correctly encoded.")}},a=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(s.bind(s,87407)).then(({default:t})=>t(...e)):fetch),(...e)=>t(...e)};class o extends Error{constructor(e,t="FunctionsError",s){super(e),this.name=t,this.context=s}}class l extends o{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class h extends o{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class c extends o{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}(d=f||(f={})).Any="any",d.ApNortheast1="ap-northeast-1",d.ApNortheast2="ap-northeast-2",d.ApSouth1="ap-south-1",d.ApSoutheast1="ap-southeast-1",d.ApSoutheast2="ap-southeast-2",d.CaCentral1="ca-central-1",d.EuCentral1="eu-central-1",d.EuWest1="eu-west-1",d.EuWest2="eu-west-2",d.EuWest3="eu-west-3",d.SaEast1="sa-east-1",d.UsEast1="us-east-1",d.UsWest1="us-west-1",d.UsWest2="us-west-2";class u{constructor(e,{headers:t={},customFetch:s,region:r=f.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=a(s)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var s,r,i,n,a;return r=this,i=void 0,n=void 0,a=function*(){try{let r;let{headers:i,method:n,body:a}=t,o={},{region:u}=t;u||(u=this.region),u&&"any"!==u&&(o["x-region"]=u),a&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&("undefined"!=typeof Blob&&a instanceof Blob||a instanceof ArrayBuffer?(o["Content-Type"]="application/octet-stream",r=a):"string"==typeof a?(o["Content-Type"]="text/plain",r=a):"undefined"!=typeof FormData&&a instanceof FormData?r=a:(o["Content-Type"]="application/json",r=JSON.stringify(a)));let d=yield this.fetch(`${this.url}/${e}`,{method:n||"POST",headers:Object.assign(Object.assign(Object.assign({},o),this.headers),i),body:r}).catch(e=>{throw new l(e)}),f=d.headers.get("x-relay-error");if(f&&"true"===f)throw new h(d);if(!d.ok)throw new c(d);let p=(null!==(s=d.headers.get("Content-Type"))&&void 0!==s?s:"text/plain").split(";")[0].trim();return{data:"application/json"===p?yield d.json():"application/octet-stream"===p?yield d.blob():"text/event-stream"===p?d:"multipart/form-data"===p?yield d.formData():yield d.text(),error:null}}catch(e){return{data:null,error:e}}},new(n||(n=Promise))(function(e,t){function s(e){try{l(a.next(e))}catch(e){t(e)}}function o(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(s,o)}l((a=a.apply(r,i||[])).next())})}}var d,f,p,g,v,y,m,_,w,b,k,S,T,E,O,j,C,P,A,x,$,R,I,U=s(23022);let{PostgrestClient:L,PostgrestQueryBuilder:N,PostgrestFilterBuilder:D,PostgrestTransformBuilder:B,PostgrestBuilder:M}=U,q={"X-Client-Info":"realtime-js/2.10.2"};(T=p||(p={}))[T.connecting=0]="connecting",T[T.open=1]="open",T[T.closing=2]="closing",T[T.closed=3]="closed",(E=g||(g={})).closed="closed",E.errored="errored",E.joined="joined",E.joining="joining",E.leaving="leaving",(O=v||(v={})).close="phx_close",O.error="phx_error",O.join="phx_join",O.reply="phx_reply",O.leave="phx_leave",O.access_token="access_token",(y||(y={})).websocket="websocket",(j=m||(m={})).Connecting="connecting",j.Open="open",j.Closing="closing",j.Closed="closed";class F{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):"string"==typeof e?t(JSON.parse(e)):t({})}_binaryDecode(e){let t=new DataView(e),s=new TextDecoder;return this._decodeBroadcast(e,t,s)}_decodeBroadcast(e,t,s){let r=t.getUint8(1),i=t.getUint8(2),n=this.HEADER_LENGTH+2,a=s.decode(e.slice(n,n+r));n+=r;let o=s.decode(e.slice(n,n+i));n+=i;let l=JSON.parse(s.decode(e.slice(n,e.byteLength)));return{ref:null,topic:a,event:o,payload:l}}}class z{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}(C=_||(_={})).abstime="abstime",C.bool="bool",C.date="date",C.daterange="daterange",C.float4="float4",C.float8="float8",C.int2="int2",C.int4="int4",C.int4range="int4range",C.int8="int8",C.int8range="int8range",C.json="json",C.jsonb="jsonb",C.money="money",C.numeric="numeric",C.oid="oid",C.reltime="reltime",C.text="text",C.time="time",C.timestamp="timestamp",C.timestamptz="timestamptz",C.timetz="timetz",C.tsrange="tsrange",C.tstzrange="tstzrange";let K=(e,t,s={})=>{var r;let i=null!==(r=s.skipTypes)&&void 0!==r?r:[];return Object.keys(t).reduce((s,r)=>(s[r]=J(r,e,t,i),s),{})},J=(e,t,s,r)=>{let i=t.find(t=>t.name===e),n=null==i?void 0:i.type,a=s[e];return n&&!r.includes(n)?H(n,a):G(a)},H=(e,t)=>{if("_"===e.charAt(0)){let s=e.slice(1,e.length);return X(t,s)}switch(e){case _.bool:return W(t);case _.float4:case _.float8:case _.int2:case _.int4:case _.int8:case _.numeric:case _.oid:return V(t);case _.json:case _.jsonb:return Z(t);case _.timestamp:return Y(t);case _.abstime:case _.date:case _.daterange:case _.int4range:case _.int8range:case _.money:case _.reltime:case _.text:case _.time:case _.timestamptz:case _.timetz:case _.tsrange:case _.tstzrange:default:return G(t)}},G=e=>e,W=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},V=e=>{if("string"==typeof e){let t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Z=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){console.log(`JSON parse error: ${e}`)}return e},X=(e,t)=>{if("string"!=typeof e)return e;let s=e.length-1,r=e[s],i=e[0];if("{"===i&&"}"===r){let r;let i=e.slice(1,s);try{r=JSON.parse("["+i+"]")}catch(e){r=i?i.split(","):[]}return r.map(e=>H(t,e))}return e},Y=e=>"string"==typeof e?e.replace(" ","T"):e,Q=e=>{let t=e;return(t=(t=t.replace(/^ws/i,"http")).replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,"")).replace(/\/+$/,"")};class ee{constructor(e,t,s={},r=1e4){this.channel=e,this.event=t,this.payload=s,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var s;return this._hasReceived(e)&&t(null===(s=this.receivedResp)||void 0===s?void 0:s.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){this.timeoutTimer||(this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref),this.channel._on(this.refEvent,{},e=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=e,this._matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout))}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}(P=w||(w={})).SYNC="sync",P.JOIN="join",P.LEAVE="leave";class et{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};let s=(null==t?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(s.state,{},e=>{let{onJoin:t,onLeave:s,onSync:r}=this.caller;this.joinRef=this.channel._joinRef(),this.state=et.syncState(this.state,e,t,s),this.pendingDiffs.forEach(e=>{this.state=et.syncDiff(this.state,e,t,s)}),this.pendingDiffs=[],r()}),this.channel._on(s.diff,{},e=>{let{onJoin:t,onLeave:s,onSync:r}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(e):(this.state=et.syncDiff(this.state,e,t,s),r())}),this.onJoin((e,t,s)=>{this.channel._trigger("presence",{event:"join",key:e,currentPresences:t,newPresences:s})}),this.onLeave((e,t,s)=>{this.channel._trigger("presence",{event:"leave",key:e,currentPresences:t,leftPresences:s})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,s,r){let i=this.cloneDeep(e),n=this.transformState(t),a={},o={};return this.map(i,(e,t)=>{n[e]||(o[e]=t)}),this.map(n,(e,t)=>{let s=i[e];if(s){let r=t.map(e=>e.presence_ref),i=s.map(e=>e.presence_ref),n=t.filter(e=>0>i.indexOf(e.presence_ref)),l=s.filter(e=>0>r.indexOf(e.presence_ref));n.length>0&&(a[e]=n),l.length>0&&(o[e]=l)}else a[e]=t}),this.syncDiff(i,{joins:a,leaves:o},s,r)}static syncDiff(e,t,s,r){let{joins:i,leaves:n}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return s||(s=()=>{}),r||(r=()=>{}),this.map(i,(t,r)=>{var i;let n=null!==(i=e[t])&&void 0!==i?i:[];if(e[t]=this.cloneDeep(r),n.length>0){let s=e[t].map(e=>e.presence_ref),r=n.filter(e=>0>s.indexOf(e.presence_ref));e[t].unshift(...r)}s(t,n,r)}),this.map(n,(t,s)=>{let i=e[t];if(!i)return;let n=s.map(e=>e.presence_ref);i=i.filter(e=>0>n.indexOf(e.presence_ref)),e[t]=i,r(t,i,s),0===i.length&&delete e[t]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(s=>t(s,e[s]))}static transformState(e){return Object.getOwnPropertyNames(e=this.cloneDeep(e)).reduce((t,s)=>{let r=e[s];return"metas"in r?t[s]=r.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e)):t[s]=r,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}(A=b||(b={})).ALL="*",A.INSERT="INSERT",A.UPDATE="UPDATE",A.DELETE="DELETE",(x=k||(k={})).BROADCAST="broadcast",x.PRESENCE="presence",x.POSTGRES_CHANGES="postgres_changes",($=S||(S={})).SUBSCRIBED="SUBSCRIBED",$.TIMED_OUT="TIMED_OUT",$.CLOSED="CLOSED",$.CHANNEL_ERROR="CHANNEL_ERROR";class es{constructor(e,t={config:{}},s){this.topic=e,this.params=t,this.socket=s,this.bindings={},this.state=g.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},t.config),this.timeout=this.socket.timeout,this.joinPush=new ee(this,v.join,this.params,this.timeout),this.rejoinTimer=new z(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=g.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=g.closed,this.socket._remove(this)}),this._onError(e=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,e),this.state=g.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=g.errored,this.rejoinTimer.scheduleTimeout())}),this._on(v.reply,{},(e,t)=>{this._trigger(this._replyEventName(t),e)}),this.presence=new et(this),this.broadcastEndpointURL=Q(this.socket.endPoint)+"/api/broadcast"}subscribe(e,t=this.timeout){var s,r;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{let{config:{broadcast:i,presence:n,private:a}}=this.params;this._onError(t=>e&&e("CHANNEL_ERROR",t)),this._onClose(()=>e&&e("CLOSED"));let o={},l={broadcast:i,presence:n,postgres_changes:null!==(r=null===(s=this.bindings.postgres_changes)||void 0===s?void 0:s.map(e=>e.filter))&&void 0!==r?r:[],private:a};this.socket.accessToken&&(o.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:l},o)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",({postgres_changes:t})=>{var s;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),void 0===t){e&&e("SUBSCRIBED");return}{let r=this.bindings.postgres_changes,i=null!==(s=null==r?void 0:r.length)&&void 0!==s?s:0,n=[];for(let s=0;s<i;s++){let i=r[s],{filter:{event:a,schema:o,table:l,filter:h}}=i,c=t&&t[s];if(c&&c.event===a&&c.schema===o&&c.table===l&&c.filter===h)n.push(Object.assign(Object.assign({},i),{id:c.id}));else{this.unsubscribe(),e&&e("CHANNEL_ERROR",Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=n,e&&e("SUBSCRIBED");return}}).receive("error",t=>{e&&e("CHANNEL_ERROR",Error(JSON.stringify(Object.values(t).join(", ")||"error")))}).receive("timeout",()=>{e&&e("TIMED_OUT")})}return this}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,t,s){return this._on(e,t,s)}async send(e,t={}){var s,r;if(this._canPush()||"broadcast"!==e.type)return new Promise(s=>{var r,i,n;let a=this._push(e.type,e,t.timeout||this.timeout);"broadcast"!==e.type||(null===(n=null===(i=null===(r=this.params)||void 0===r?void 0:r.config)||void 0===i?void 0:i.broadcast)||void 0===n?void 0:n.ack)||s("ok"),a.receive("ok",()=>s("ok")),a.receive("error",()=>s("error")),a.receive("timeout",()=>s("timed out"))});{let{event:i,payload:n}=e,a={method:"POST",headers:{Authorization:this.socket.accessToken?`Bearer ${this.socket.accessToken}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:n}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,a,null!==(s=t.timeout)&&void 0!==s?s:this.timeout);return await (null===(r=e.body)||void 0===r?void 0:r.cancel()),e.ok?"ok":"error"}catch(e){if("AbortError"===e.name)return"timed out";return"error"}}}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=g.leaving;let t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(v.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(s=>{let r=new ee(this,v.leave,{},e);r.receive("ok",()=>{t(),s("ok")}).receive("timeout",()=>{t(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})})}async _fetchWithTimeout(e,t,s){let r=new AbortController,i=setTimeout(()=>r.abort(),s),n=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),n}_push(e,t,s=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let r=new ee(this,e,t,s);return this._canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}_onMessage(e,t,s){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,s){var r,i;let n=e.toLocaleLowerCase(),{close:a,error:o,leave:l,join:h}=v;if(s&&[a,o,l,h].indexOf(n)>=0&&s!==this._joinRef())return;let c=this._onMessage(n,t,s);if(t&&!c)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(n)?null===(r=this.bindings.postgres_changes)||void 0===r||r.filter(e=>{var t,s,r;return(null===(t=e.filter)||void 0===t?void 0:t.event)==="*"||(null===(r=null===(s=e.filter)||void 0===s?void 0:s.event)||void 0===r?void 0:r.toLocaleLowerCase())===n}).map(e=>e.callback(c,s)):null===(i=this.bindings[n])||void 0===i||i.filter(e=>{var s,r,i,a,o,l;if(!["broadcast","presence","postgres_changes"].includes(n))return e.type.toLocaleLowerCase()===n;if("id"in e){let n=e.id,a=null===(s=e.filter)||void 0===s?void 0:s.event;return n&&(null===(r=t.ids)||void 0===r?void 0:r.includes(n))&&("*"===a||(null==a?void 0:a.toLocaleLowerCase())===(null===(i=t.data)||void 0===i?void 0:i.type.toLocaleLowerCase()))}{let s=null===(o=null===(a=null==e?void 0:e.filter)||void 0===a?void 0:a.event)||void 0===o?void 0:o.toLocaleLowerCase();return"*"===s||s===(null===(l=null==t?void 0:t.event)||void 0===l?void 0:l.toLocaleLowerCase())}}).map(e=>{if("object"==typeof c&&"ids"in c){let e=c.data,{schema:t,table:s,commit_timestamp:r,type:i,errors:n}=e;c=Object.assign(Object.assign({},{schema:t,table:s,commit_timestamp:r,eventType:i,new:{},old:{},errors:n}),this._getPayloadRecords(e))}e.callback(c,s)})}_isClosed(){return this.state===g.closed}_isJoined(){return this.state===g.joined}_isJoining(){return this.state===g.joining}_isLeaving(){return this.state===g.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,s){let r=e.toLocaleLowerCase(),i={type:r,filter:t,callback:s};return this.bindings[r]?this.bindings[r].push(i):this.bindings[r]=[i],this}_off(e,t){let s=e.toLocaleLowerCase();return this.bindings[s]=this.bindings[s].filter(e=>{var r;return!((null===(r=e.type)||void 0===r?void 0:r.toLocaleLowerCase())===s&&es.isEqual(e.filter,t))}),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let s in e)if(e[s]!==t[s])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(v.close,{},e)}_onError(e){this._on(v.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=g.joining,this.joinPush.resend(e))}_getPayloadRecords(e){let t={new:{},old:{}};return("INSERT"===e.type||"UPDATE"===e.type)&&(t.new=K(e.columns,e.record)),("UPDATE"===e.type||"DELETE"===e.type)&&(t.old=K(e.columns,e.old_record)),t}}let er=()=>{},ei="undefined"!=typeof WebSocket;class en{constructor(e,t){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=q,this.params={},this.timeout=1e4,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=er,this.conn=null,this.sendBuffer=[],this.serializer=new F,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(s.bind(s,87407)).then(({default:t})=>t(...e)):fetch),(...e)=>t(...e)},this.endPoint=`${e}/${y.websocket}`,this.httpEndpoint=Q(e),(null==t?void 0:t.transport)?this.transport=t.transport:this.transport=null,(null==t?void 0:t.params)&&(this.params=t.params),(null==t?void 0:t.headers)&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),(null==t?void 0:t.timeout)&&(this.timeout=t.timeout),(null==t?void 0:t.logger)&&(this.logger=t.logger),(null==t?void 0:t.heartbeatIntervalMs)&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);let i=null===(r=null==t?void 0:t.params)||void 0===r?void 0:r.apikey;i&&(this.accessToken=i,this.apiKey=i),this.reconnectAfterMs=(null==t?void 0:t.reconnectAfterMs)?t.reconnectAfterMs:e=>[1e3,2e3,5e3,1e4][e-1]||1e4,this.encode=(null==t?void 0:t.encode)?t.encode:(e,t)=>t(JSON.stringify(e)),this.decode=(null==t?void 0:t.decode)?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new z(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(null==t?void 0:t.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(ei){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new ea(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),s.e(407).then(s.t.bind(s,39407,23)).then(({default:e})=>{this.conn=new e(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,null!=t?t:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(e){let t=await e.unsubscribe();return 0===this.channels.length&&this.disconnect(),t}async removeAllChannels(){let e=await Promise.all(this.channels.map(e=>e.unsubscribe()));return this.disconnect(),e}log(e,t,s){this.logger(e,t,s)}connectionState(){switch(this.conn&&this.conn.readyState){case p.connecting:return m.Connecting;case p.open:return m.Open;case p.closing:return m.Closing;default:return m.Closed}}isConnected(){return this.connectionState()===m.Open}channel(e,t={config:{}}){let s=new es(`realtime:${e}`,t,this);return this.channels.push(s),s}push(e){let{topic:t,event:s,payload:r,ref:i}=e,n=()=>{this.encode(e,e=>{var t;null===(t=this.conn)||void 0===t||t.send(e)})};this.log("push",`${t} ${s} (${i})`,r),this.isConnected()?n():this.sendBuffer.push(n)}setAuth(e){this.accessToken=e,this.channels.forEach(t=>{e&&t.updateJoinPayload({access_token:e}),t.joinedOnce&&t._isJoined()&&t._push(v.access_token,{access_token:e})})}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t._isJoined()||t._isJoining()));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t._joinRef()!==e._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:"1.0.0"}))}_onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:s,payload:r,ref:i}=e;(i&&i===this.pendingHeartbeatRef||s===(null==r?void 0:r.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${r.status||""} ${t} ${s} ${i&&"("+i+")"||""}`,r),this.channels.filter(e=>e._isMember(t)).forEach(e=>e._trigger(s,r,i)),this.stateChangeCallbacks.message.forEach(t=>t(e))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(e=>e())}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(t=>t(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(t=>t(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(v.error))}_appendParams(e,t){if(0===Object.keys(t).length)return e;let s=e.match(/\?/)?"&":"?",r=new URLSearchParams(t);return`${e}${s}${r}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),null===(e=this.conn)||void 0===e||e.close(1e3,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class ea{constructor(e,t,s){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=p.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=s.close}}class eo extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function el(e){return"object"==typeof e&&null!==e&&"__isStorageError"in e}class eh extends eo{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class ec extends eo{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}let eu=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(s.bind(s,87407)).then(({default:t})=>t(...e)):fetch),(...e)=>t(...e)},ed=()=>{var e,t,r,i;return e=void 0,t=void 0,r=void 0,i=function*(){return"undefined"==typeof Response?(yield Promise.resolve().then(s.bind(s,87407))).Response:Response},new(r||(r=Promise))(function(s,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function o(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((i=i.apply(e,t||[])).next())})};var ef=function(e,t,s,r){return new(s||(s=Promise))(function(i,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function o(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};let ep=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),eg=(e,t)=>ef(void 0,void 0,void 0,function*(){let s=yield ed();e instanceof s?e.json().then(s=>{t(new eh(ep(s),e.status||500))}).catch(e=>{t(new ec(ep(e),e))}):t(new ec(ep(e),e))}),ev=(e,t,s,r)=>{let i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json"},null==t?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),s))};function ey(e,t,s,r,i,n){return ef(this,void 0,void 0,function*(){return new Promise((a,o)=>{e(s,ev(t,r,i,n)).then(e=>{if(!e.ok)throw e;return(null==r?void 0:r.noResolveJson)?e:e.json()}).then(e=>a(e)).catch(e=>eg(e,o))})})}function em(e,t,s,r){return ef(this,void 0,void 0,function*(){return ey(e,"GET",t,s,r)})}function e_(e,t,s,r,i){return ef(this,void 0,void 0,function*(){return ey(e,"POST",t,r,i,s)})}function ew(e,t,s,r,i){return ef(this,void 0,void 0,function*(){return ey(e,"DELETE",t,r,i,s)})}var eb=function(e,t,s,r){return new(s||(s=Promise))(function(i,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function o(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};let ek={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},eS={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class eT{constructor(e,t={},s,r){this.url=e,this.headers=t,this.bucketId=s,this.fetch=eu(r)}uploadOrUpdate(e,t,s,r){return eb(this,void 0,void 0,function*(){try{let i;let n=Object.assign(Object.assign({},eS),r),a=Object.assign(Object.assign({},this.headers),"POST"===e&&{"x-upsert":String(n.upsert)});"undefined"!=typeof Blob&&s instanceof Blob?((i=new FormData).append("cacheControl",n.cacheControl),i.append("",s)):"undefined"!=typeof FormData&&s instanceof FormData?(i=s).append("cacheControl",n.cacheControl):(i=s,a["cache-control"]=`max-age=${n.cacheControl}`,a["content-type"]=n.contentType);let o=this._removeEmptyFolders(t),l=this._getFinalPath(o),h=yield this.fetch(`${this.url}/object/${l}`,Object.assign({method:e,body:i,headers:a},(null==n?void 0:n.duplex)?{duplex:n.duplex}:{})),c=yield h.json();if(h.ok)return{data:{path:o,id:c.Id,fullPath:c.Key},error:null};return{data:null,error:c}}catch(e){if(el(e))return{data:null,error:e};throw e}})}upload(e,t,s){return eb(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,s)})}uploadToSignedUrl(e,t,s,r){return eb(this,void 0,void 0,function*(){let i=this._removeEmptyFolders(e),n=this._getFinalPath(i),a=new URL(this.url+`/object/upload/sign/${n}`);a.searchParams.set("token",t);try{let e;let t=Object.assign({upsert:eS.upsert},r),n=Object.assign(Object.assign({},this.headers),{"x-upsert":String(t.upsert)});"undefined"!=typeof Blob&&s instanceof Blob?((e=new FormData).append("cacheControl",t.cacheControl),e.append("",s)):"undefined"!=typeof FormData&&s instanceof FormData?(e=s).append("cacheControl",t.cacheControl):(e=s,n["cache-control"]=`max-age=${t.cacheControl}`,n["content-type"]=t.contentType);let o=yield this.fetch(a.toString(),{method:"PUT",body:e,headers:n}),l=yield o.json();if(o.ok)return{data:{path:i,fullPath:l.Key},error:null};return{data:null,error:l}}catch(e){if(el(e))return{data:null,error:e};throw e}})}createSignedUploadUrl(e,t){return eb(this,void 0,void 0,function*(){try{let s=this._getFinalPath(e),r=Object.assign({},this.headers);(null==t?void 0:t.upsert)&&(r["x-upsert"]="true");let i=yield e_(this.fetch,`${this.url}/object/upload/sign/${s}`,{},{headers:r}),n=new URL(this.url+i.url),a=n.searchParams.get("token");if(!a)throw new eo("No token returned by API");return{data:{signedUrl:n.toString(),path:e,token:a},error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}update(e,t,s){return eb(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,s)})}move(e,t,s){return eb(this,void 0,void 0,function*(){try{let r=yield e_(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==s?void 0:s.destinationBucket},{headers:this.headers});return{data:r,error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}copy(e,t,s){return eb(this,void 0,void 0,function*(){try{let r=yield e_(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==s?void 0:s.destinationBucket},{headers:this.headers});return{data:{path:r.Key},error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}createSignedUrl(e,t,s){return eb(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e),i=yield e_(this.fetch,`${this.url}/object/sign/${r}`,Object.assign({expiresIn:t},(null==s?void 0:s.transform)?{transform:s.transform}:{}),{headers:this.headers}),n=(null==s?void 0:s.download)?`&download=${!0===s.download?"":s.download}`:"",a=encodeURI(`${this.url}${i.signedURL}${n}`);return{data:i={signedUrl:a},error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}createSignedUrls(e,t,s){return eb(this,void 0,void 0,function*(){try{let r=yield e_(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),i=(null==s?void 0:s.download)?`&download=${!0===s.download?"":s.download}`:"";return{data:r.map(e=>Object.assign(Object.assign({},e),{signedUrl:e.signedURL?encodeURI(`${this.url}${e.signedURL}${i}`):null})),error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}download(e,t){return eb(this,void 0,void 0,function*(){let s=void 0!==(null==t?void 0:t.transform),r=this.transformOptsToQueryString((null==t?void 0:t.transform)||{}),i=r?`?${r}`:"";try{let t=this._getFinalPath(e),r=yield em(this.fetch,`${this.url}/${s?"render/image/authenticated":"object"}/${t}${i}`,{headers:this.headers,noResolveJson:!0}),n=yield r.blob();return{data:n,error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}getPublicUrl(e,t){let s=this._getFinalPath(e),r=[],i=(null==t?void 0:t.download)?`download=${!0===t.download?"":t.download}`:"";""!==i&&r.push(i);let n=void 0!==(null==t?void 0:t.transform),a=this.transformOptsToQueryString((null==t?void 0:t.transform)||{});""!==a&&r.push(a);let o=r.join("&");return""!==o&&(o=`?${o}`),{data:{publicUrl:encodeURI(`${this.url}/${n?"render/image":"object"}/public/${s}${o}`)}}}remove(e){return eb(this,void 0,void 0,function*(){try{let t=yield ew(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers});return{data:t,error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}list(e,t,s){return eb(this,void 0,void 0,function*(){try{let r=Object.assign(Object.assign(Object.assign({},ek),t),{prefix:e||""}),i=yield e_(this.fetch,`${this.url}/object/list/${this.bucketId}`,r,{headers:this.headers},s);return{data:i,error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){let t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}let eE={"X-Client-Info":"storage-js/2.6.0"};var eO=function(e,t,s,r){return new(s||(s=Promise))(function(i,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function o(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};class ej{constructor(e,t={},s){this.url=e,this.headers=Object.assign(Object.assign({},eE),t),this.fetch=eu(s)}listBuckets(){return eO(this,void 0,void 0,function*(){try{let e=yield em(this.fetch,`${this.url}/bucket`,{headers:this.headers});return{data:e,error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}getBucket(e){return eO(this,void 0,void 0,function*(){try{let t=yield em(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers});return{data:t,error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}createBucket(e,t={public:!1}){return eO(this,void 0,void 0,function*(){try{let s=yield e_(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers});return{data:s,error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}updateBucket(e,t){return eO(this,void 0,void 0,function*(){try{let s=yield function(e,t,s,r,i){return ef(this,void 0,void 0,function*(){return ey(e,"PUT",t,r,void 0,s)})}(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers});return{data:s,error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}emptyBucket(e){return eO(this,void 0,void 0,function*(){try{let t=yield e_(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers});return{data:t,error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}deleteBucket(e){return eO(this,void 0,void 0,function*(){try{let t=yield ew(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers});return{data:t,error:null}}catch(e){if(el(e))return{data:null,error:e};throw e}})}}class eC extends ej{constructor(e,t={},s){super(e,t,s)}from(e){return new eT(this.url,this.headers,e,this.fetch)}}let eP="";eP="undefined"!=typeof Deno?"deno":"undefined"!=typeof document?"web":"undefined"!=typeof navigator&&"ReactNative"===navigator.product?"react-native":"node";let eA={"X-Client-Info":`supabase-js-${eP}/2.44.4`},ex={headers:eA},e$={schema:"public"},eR={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},eI={};var eU=s(87407);let eL=e=>{let t;return t=e||("undefined"==typeof fetch?eU.default:fetch),(...e)=>t(...e)},eN=()=>"undefined"==typeof Headers?eU.Headers:Headers,eD=(e,t,s)=>{let r=eL(s),i=eN();return(s,n)=>{var a,o,l,h;return a=void 0,o=void 0,l=void 0,h=function*(){var a;let o=null!==(a=yield t())&&void 0!==a?a:e,l=new i(null==n?void 0:n.headers);return l.has("apikey")||l.set("apikey",e),l.has("Authorization")||l.set("Authorization",`Bearer ${o}`),r(s,Object.assign(Object.assign({},n),{headers:l}))},new(l||(l=Promise))(function(e,t){function s(e){try{i(h.next(e))}catch(e){t(e)}}function r(e){try{i(h.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):((i=t.value)instanceof l?i:new l(function(e){e(i)})).then(s,r)}i((h=h.apply(a,o||[])).next())})}},eB="2.64.4",eM={"X-Client-Info":`gotrue-js/${eB}`},eq="X-Supabase-Api-Version",eF={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},ez=()=>"undefined"!=typeof document,eK={tested:!1,writable:!1},eJ=()=>{if(!ez())return!1;try{if("object"!=typeof globalThis.localStorage)return!1}catch(e){return!1}if(eK.tested)return eK.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),eK.tested=!0,eK.writable=!0}catch(e){eK.tested=!0,eK.writable=!1}return eK.writable};function eH(e){let t={},s=new URL(e);if(s.hash&&"#"===s.hash[0])try{let e=new URLSearchParams(s.hash.substring(1));e.forEach((e,s)=>{t[s]=e})}catch(e){}return s.searchParams.forEach((e,s)=>{t[s]=e}),t}let eG=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(s.bind(s,87407)).then(({default:t})=>t(...e)):fetch),(...e)=>t(...e)},eW=e=>"object"==typeof e&&null!==e&&"status"in e&&"ok"in e&&"json"in e&&"function"==typeof e.json,eV=async(e,t,s)=>{await e.setItem(t,JSON.stringify(s))},eZ=async(e,t)=>{let s=await e.getItem(t);if(!s)return null;try{return JSON.parse(s)}catch(e){return s}},eX=async(e,t)=>{await e.removeItem(t)};class eY{constructor(){this.promise=new eY.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}function eQ(e){let t=e.split(".");if(3!==t.length)throw Error("JWT is not valid: not a JWT structure");if(!/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i.test(t[1]))throw Error("JWT is not valid: payload is not in base64url format");let s=t[1];return JSON.parse(function(e){let t,s,r,i,n,a,o;let l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h="",c=0;for(e=e.replace("-","+").replace("_","/");c<e.length;)i=l.indexOf(e.charAt(c++)),n=l.indexOf(e.charAt(c++)),a=l.indexOf(e.charAt(c++)),o=l.indexOf(e.charAt(c++)),t=i<<2|n>>4,s=(15&n)<<4|a>>2,r=(3&a)<<6|o,h+=String.fromCharCode(t),64!=a&&0!=s&&(h+=String.fromCharCode(s)),64!=o&&0!=r&&(h+=String.fromCharCode(r));return h}(s))}async function e0(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function e1(e){return("0"+e.toString(16)).substr(-2)}async function e2(e){let t=new TextEncoder,s=t.encode(e),r=await crypto.subtle.digest("SHA-256",s),i=new Uint8Array(r);return Array.from(i).map(e=>String.fromCharCode(e)).join("")}async function e4(e){let t="undefined"!=typeof crypto&&void 0!==crypto.subtle&&"undefined"!=typeof TextEncoder;if(!t)return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;let s=await e2(e);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function e3(e,t,s=!1){let r=function(){let e=new Uint32Array(56);if("undefined"==typeof crypto){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",t=e.length,s="";for(let r=0;r<56;r++)s+=e.charAt(Math.floor(Math.random()*t));return s}return crypto.getRandomValues(e),Array.from(e,e1).join("")}(),i=r;s&&(i+="/PASSWORD_RECOVERY"),await eV(e,`${t}-code-verifier`,i);let n=await e4(r),a=r===n?"plain":"s256";return[n,a]}eY.promiseConstructor=Promise;let e8=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;class e7 extends Error{constructor(e,t,s){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=s}}function e5(e){return"object"==typeof e&&null!==e&&"__isAuthError"in e}class e9 extends e7{constructor(e,t,s){super(e,t,s),this.name="AuthApiError",this.status=t,this.code=s}}class e6 extends e7{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class te extends e7{constructor(e,t,s,r){super(e,s,r),this.name=t,this.status=s}}class tt extends te{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class ts extends te{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class tr extends te{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ti extends te{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class tn extends te{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class ta extends te{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function to(e){return e5(e)&&"AuthRetryableFetchError"===e.name}class tl extends te{constructor(e,t,s){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=s}}var th=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(s[r[i]]=e[r[i]]);return s};let tc=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),tu=[502,503,504];async function td(e){var t;let s,r;if(!eW(e))throw new ta(tc(e),0);if(tu.includes(e.status))throw new ta(tc(e),e.status);try{s=await e.json()}catch(e){throw new e6(tc(e),e)}let i=function(e){let t=e.headers.get(eq);if(!t||!t.match(e8))return null;try{let e=new Date(`${t}T00:00:00.0Z`);return e}catch(e){return null}}(e);if(i&&i.getTime()>=eF["2024-01-01"].timestamp&&"object"==typeof s&&s&&"string"==typeof s.code?r=s.code:"object"==typeof s&&s&&"string"==typeof s.error_code&&(r=s.error_code),r){if("weak_password"===r)throw new tl(tc(s),e.status,(null===(t=s.weak_password)||void 0===t?void 0:t.reasons)||[])}else if("object"==typeof s&&s&&"object"==typeof s.weak_password&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((e,t)=>e&&"string"==typeof t,!0))throw new tl(tc(s),e.status,s.weak_password.reasons);throw new e9(tc(s),e.status||500,r)}let tf=(e,t,s,r)=>{let i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},null==t?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),s))};async function tp(e,t,s,r){var i;let n=Object.assign({},null==r?void 0:r.headers);n[eq]||(n[eq]=eF["2024-01-01"].name),(null==r?void 0:r.jwt)&&(n.Authorization=`Bearer ${r.jwt}`);let a=null!==(i=null==r?void 0:r.query)&&void 0!==i?i:{};(null==r?void 0:r.redirectTo)&&(a.redirect_to=r.redirectTo);let o=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",l=await tg(e,t,s+o,{headers:n,noResolveJson:null==r?void 0:r.noResolveJson},{},null==r?void 0:r.body);return(null==r?void 0:r.xform)?null==r?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function tg(e,t,s,r,i,n){let a;let o=tf(t,r,i,n);try{a=await e(s,Object.assign({},o))}catch(e){throw console.error(e),new ta(tc(e),0)}if(a.ok||await td(a),null==r?void 0:r.noResolveJson)return a;try{return await a.json()}catch(e){await td(e)}}function tv(e){var t;let s=null;e.access_token&&e.refresh_token&&e.expires_in&&(s=Object.assign({},e),e.expires_at||(s.expires_at=function(e){let t=Math.round(Date.now()/1e3);return t+e}(e.expires_in)));let r=null!==(t=e.user)&&void 0!==t?t:e;return{data:{session:s,user:r},error:null}}function ty(e){let t=tv(e);return!t.error&&e.weak_password&&"object"==typeof e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&"string"==typeof e.weak_password.message&&e.weak_password.reasons.reduce((e,t)=>e&&"string"==typeof t,!0)&&(t.data.weak_password=e.weak_password),t}function tm(e){var t;let s=null!==(t=e.user)&&void 0!==t?t:e;return{data:{user:s},error:null}}function t_(e){return{data:e,error:null}}function tw(e){let{action_link:t,email_otp:s,hashed_token:r,redirect_to:i,verification_type:n}=e,a=th(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o=Object.assign({},a);return{data:{properties:{action_link:t,email_otp:s,hashed_token:r,redirect_to:i,verification_type:n},user:o},error:null}}function tb(e){return e}var tk=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(s[r[i]]=e[r[i]]);return s};class tS{constructor({url:e="",headers:t={},fetch:s}){this.url=e,this.headers=t,this.fetch=eG(s),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,t="global"){try{return await tp(this.fetch,"POST",`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(e5(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await tp(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:tm})}catch(e){if(e5(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,s=tk(e,["options"]),r=Object.assign(Object.assign({},s),t);return"newEmail"in s&&(r.new_email=null==s?void 0:s.newEmail,delete r.newEmail),await tp(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:tw,redirectTo:null==t?void 0:t.redirectTo})}catch(e){if(e5(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await tp(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:tm})}catch(e){if(e5(e))return{data:{user:null},error:e};throw e}}async listUsers(e){var t,s,r,i,n,a,o;try{let l={nextPage:null,lastPage:0,total:0},h=await tp(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:null!==(s=null===(t=null==e?void 0:e.page)||void 0===t?void 0:t.toString())&&void 0!==s?s:"",per_page:null!==(i=null===(r=null==e?void 0:e.perPage)||void 0===r?void 0:r.toString())&&void 0!==i?i:""},xform:tb});if(h.error)throw h.error;let c=await h.json(),u=null!==(n=h.headers.get("x-total-count"))&&void 0!==n?n:0,d=null!==(o=null===(a=h.headers.get("link"))||void 0===a?void 0:a.split(","))&&void 0!==o?o:[];return d.length>0&&(d.forEach(e=>{let t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),s=JSON.parse(e.split(";")[1].split("=")[1]);l[`${s}Page`]=t}),l.total=parseInt(u)),{data:Object.assign(Object.assign({},c),l),error:null}}catch(e){if(e5(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){try{return await tp(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:tm})}catch(e){if(e5(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){try{return await tp(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:tm})}catch(e){if(e5(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){try{return await tp(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:tm})}catch(e){if(e5(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){try{let{data:t,error:s}=await tp(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:s}}catch(e){if(e5(e))return{data:null,error:e};throw e}}async _deleteFactor(e){try{let t=await tp(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers});return{data:t,error:null}}catch(e){if(e5(e))return{data:null,error:e};throw e}}}let tT={getItem:e=>eJ()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{eJ()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{eJ()&&globalThis.localStorage.removeItem(e)}};function tE(e={}){return{getItem:t=>e[t]||null,setItem:(t,s)=>{e[t]=s},removeItem:t=>{delete e[t]}}}let tO={debug:!!(globalThis&&eJ()&&globalThis.localStorage&&"true"===globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug"))};class tj extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class tC extends tj{}async function tP(e,t,s){tO.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);let r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),tO.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await globalThis.navigator.locks.request(e,0===t?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async r=>{if(r){tO.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,r.name);try{return await s()}finally{tO.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,r.name)}}else{if(0===t)throw tO.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new tC(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(tO.debug)try{let e=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(e,null," "))}catch(e){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",e)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await s()}})}!function(){if("object"!=typeof globalThis)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(e){"undefined"!=typeof self&&(self.globalThis=self)}}();let tA={url:"http://localhost:9999",storageKey:"supabase.auth.token",autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:eM,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function tx(e,t,s){return await s()}class t${constructor(e){var t,s;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=t$.nextInstanceID,t$.nextInstanceID+=1,this.instanceID>0&&ez()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");let r=Object.assign(Object.assign({},tA),e);if(this.logDebugMessages=!!r.debug,"function"==typeof r.debug&&(this.logger=r.debug),this.persistSession=r.persistSession,this.storageKey=r.storageKey,this.autoRefreshToken=r.autoRefreshToken,this.admin=new tS({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=eG(r.fetch),this.lock=r.lock||tx,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,r.lock?this.lock=r.lock:ez()&&(null===(t=null==globalThis?void 0:globalThis.navigator)||void 0===t?void 0:t.locks)?this.lock=tP:this.lock=tx,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?r.storage?this.storage=r.storage:eJ()?this.storage=tT:(this.memoryStorage={},this.storage=tE(this.memoryStorage)):(this.memoryStorage={},this.storage=tE(this.memoryStorage)),ez()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",e)}null===(s=this.broadcastChannel)||void 0===s||s.addEventListener("message",async e=>{this._debug("received broadcast notification from other tab or client",e),await this._notifyAllSubscribers(e.data.event,e.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${eB}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise||(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))()),await this.initializePromise}async _initialize(){try{let e=!!ez()&&await this._isPKCEFlow();if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){let{data:t,error:s}=await this._getSessionFromURL(e);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),(null==s?void 0:s.message)==="Identity is already linked"||(null==s?void 0:s.message)==="Identity is already linked to another user")return{error:s};return await this._removeSession(),{error:s}}let{session:r,redirectType:i}=t;return this._debug("#_initialize()","detected session in URL",r,"redirect type",i),await this._saveSession(r),setTimeout(async()=>{"recovery"===i?await this._notifyAllSubscribers("PASSWORD_RECOVERY",r):await this._notifyAllSubscribers("SIGNED_IN",r)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){if(e5(e))return{error:e};return{error:new e6("Unexpected error during initialization",e)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var t,s,r;try{let i=await tp(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:null!==(s=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.data)&&void 0!==s?s:{},gotrue_meta_security:{captcha_token:null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken}},xform:tv}),{data:n,error:a}=i;if(a||!n)return{data:{user:null,session:null},error:a};let o=n.session,l=n.user;return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",o)),{data:{user:l,session:o},error:null}}catch(e){if(e5(e))return{data:{user:null,session:null},error:e};throw e}}async signUp(e){var t,s,r;try{let i;if("email"in e){let{email:s,password:r,options:n}=e,a=null,o=null;"pkce"===this.flowType&&([a,o]=await e3(this.storage,this.storageKey)),i=await tp(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:null==n?void 0:n.emailRedirectTo,body:{email:s,password:r,data:null!==(t=null==n?void 0:n.data)&&void 0!==t?t:{},gotrue_meta_security:{captcha_token:null==n?void 0:n.captchaToken},code_challenge:a,code_challenge_method:o},xform:tv})}else if("phone"in e){let{phone:t,password:n,options:a}=e;i=await tp(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:n,data:null!==(s=null==a?void 0:a.data)&&void 0!==s?s:{},channel:null!==(r=null==a?void 0:a.channel)&&void 0!==r?r:"sms",gotrue_meta_security:{captcha_token:null==a?void 0:a.captchaToken}},xform:tv})}else throw new tr("You must provide either an email or phone number and a password");let{data:n,error:a}=i;if(a||!n)return{data:{user:null,session:null},error:a};let o=n.session,l=n.user;return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",o)),{data:{user:l,session:o},error:null}}catch(e){if(e5(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithPassword(e){try{let t;if("email"in e){let{email:s,password:r,options:i}=e;t=await tp(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:ty})}else if("phone"in e){let{phone:s,password:r,options:i}=e;t=await tp(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:ty})}else throw new tr("You must provide either an email or phone number and a password");let{data:s,error:r}=t;if(r)return{data:{user:null,session:null},error:r};if(!s||!s.session||!s.user)return{data:{user:null,session:null},error:new ts};return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:r}}catch(e){if(e5(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOAuth(e){var t,s,r,i;return await this._handleProviderSignIn(e.provider,{redirectTo:null===(t=e.options)||void 0===t?void 0:t.redirectTo,scopes:null===(s=e.options)||void 0===s?void 0:s.scopes,queryParams:null===(r=e.options)||void 0===r?void 0:r.queryParams,skipBrowserRedirect:null===(i=e.options)||void 0===i?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async _exchangeCodeForSession(e){let t=await eZ(this.storage,`${this.storageKey}-code-verifier`),[s,r]=(null!=t?t:"").split("/"),{data:i,error:n}=await tp(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:s},xform:tv});return(await eX(this.storage,`${this.storageKey}-code-verifier`),n)?{data:{user:null,session:null,redirectType:null},error:n}:i&&i.session&&i.user?(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:null!=r?r:null}),error:n}):{data:{user:null,session:null,redirectType:null},error:new ts}}async signInWithIdToken(e){try{let{options:t,provider:s,token:r,access_token:i,nonce:n}=e,a=await tp(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:r,access_token:i,nonce:n,gotrue_meta_security:{captcha_token:null==t?void 0:t.captchaToken}},xform:tv}),{data:o,error:l}=a;if(l)return{data:{user:null,session:null},error:l};if(!o||!o.session||!o.user)return{data:{user:null,session:null},error:new ts};return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:o,error:l}}catch(e){if(e5(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOtp(e){var t,s,r,i,n;try{if("email"in e){let{email:r,options:i}=e,n=null,a=null;"pkce"===this.flowType&&([n,a]=await e3(this.storage,this.storageKey));let{error:o}=await tp(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:r,data:null!==(t=null==i?void 0:i.data)&&void 0!==t?t:{},create_user:null===(s=null==i?void 0:i.shouldCreateUser)||void 0===s||s,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken},code_challenge:n,code_challenge_method:a},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:o}}if("phone"in e){let{phone:t,options:s}=e,{data:a,error:o}=await tp(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:null!==(r=null==s?void 0:s.data)&&void 0!==r?r:{},create_user:null===(i=null==s?void 0:s.shouldCreateUser)||void 0===i||i,gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken},channel:null!==(n=null==s?void 0:s.channel)&&void 0!==n?n:"sms"}});return{data:{user:null,session:null,messageId:null==a?void 0:a.message_id},error:o}}throw new tr("You must provide either an email or phone number.")}catch(e){if(e5(e))return{data:{user:null,session:null},error:e};throw e}}async verifyOtp(e){var t,s;try{let r,i;"options"in e&&(r=null===(t=e.options)||void 0===t?void 0:t.redirectTo,i=null===(s=e.options)||void 0===s?void 0:s.captchaToken);let{data:n,error:a}=await tp(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:r,xform:tv});if(a)throw a;if(!n)throw Error("An error occurred on token verification.");let o=n.session,l=n.user;return(null==o?void 0:o.access_token)&&(await this._saveSession(o),await this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",o)),{data:{user:l,session:o},error:null}}catch(e){if(e5(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithSSO(e){var t,s,r;try{let i=null,n=null;return"pkce"===this.flowType&&([i,n]=await e3(this.storage,this.storageKey)),await tp(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:null!==(s=null===(t=e.options)||void 0===t?void 0:t.redirectTo)&&void 0!==s?s:void 0}),(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken)?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:n}),headers:this.headers,xform:t_})}catch(e){if(e5(e))return{data:null,error:e};throw e}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:s}=e;if(s)throw s;if(!t)throw new tt;let{error:r}=await tp(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:r}})}catch(e){if(e5(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{let t=`${this.url}/resend`;if("email"in e){let{email:s,type:r,options:i}=e,{error:n}=await tp(this.fetch,"POST",t,{headers:this.headers,body:{email:s,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:n}}if("phone"in e){let{phone:s,type:r,options:i}=e,{data:n,error:a}=await tp(this.fetch,"POST",t,{headers:this.headers,body:{phone:s,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:null==n?void 0:n.message_id},error:a}}throw new tr("You must provide either an email or phone number and a type")}catch(e){if(e5(e))return{data:{user:null,session:null},error:e};throw e}}async getSession(){await this.initializePromise;let e=await this._acquireLock(-1,async()=>this._useSession(async e=>e));return e}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await s}catch(e){}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch(e){}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{let t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",Error().stack);try{let e=null,t=await eZ(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),null!==t&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};let s=!!e.expires_at&&e.expires_at<=Date.now()/1e3;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",e.expires_at),!s){if(this.storage.isServer){let t=this.suppressGetSessionWarning,s=new Proxy(e,{get:(e,s,r)=>(t||"user"!==s||(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t=!0,this.suppressGetSessionWarning=!0),Reflect.get(e,s,r))});e=s}return{data:{session:e},error:null}}let{session:r,error:i}=await this._callRefreshToken(e.refresh_token);if(i)return{data:{session:null},error:i};return{data:{session:r},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let t=await this._acquireLock(-1,async()=>await this._getUser());return t}async _getUser(e){try{if(e)return await tp(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:tm});return await this._useSession(async e=>{var t,s,r;let{data:i,error:n}=e;if(n)throw n;return(null===(t=i.session)||void 0===t?void 0:t.access_token)||this.hasCustomAuthorizationHeader?await tp(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:null!==(r=null===(s=i.session)||void 0===s?void 0:s.access_token)&&void 0!==r?r:void 0,xform:tm}):{data:{user:null},error:new tt}})}catch(e){if(e5(e))return{data:{user:null},error:e};throw e}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async s=>{let{data:r,error:i}=s;if(i)throw i;if(!r.session)throw new tt;let n=r.session,a=null,o=null;"pkce"===this.flowType&&null!=e.email&&([a,o]=await e3(this.storage,this.storageKey));let{data:l,error:h}=await tp(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:null==t?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:o}),jwt:n.access_token,xform:tm});if(h)throw h;return n.user=l.user,await this._saveSession(n),await this._notifyAllSubscribers("USER_UPDATED",n),{data:{user:n.user},error:null}})}catch(e){if(e5(e))return{data:{user:null},error:e};throw e}}_decodeJWT(e){return eQ(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new tt;let t=Date.now()/1e3,s=t,r=!0,i=null,n=eQ(e.access_token);if(n.exp&&(r=(s=n.exp)<=t),r){let{session:t,error:s}=await this._callRefreshToken(e.refresh_token);if(s)return{data:{user:null,session:null},error:s};if(!t)return{data:{user:null,session:null},error:null};i=t}else{let{data:r,error:n}=await this._getUser(e.access_token);if(n)throw n;i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:"bearer",expires_in:s-t,expires_at:s},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(e){if(e5(e))return{data:{session:null,user:null},error:e};throw e}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{var s;if(!e){let{data:r,error:i}=t;if(i)throw i;e=null!==(s=r.session)&&void 0!==s?s:void 0}if(!(null==e?void 0:e.refresh_token))throw new tt;let{session:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{user:null,session:null},error:i}:r?{data:{user:r.user,session:r},error:null}:{data:{user:null,session:null},error:null}})}catch(e){if(e5(e))return{data:{user:null,session:null},error:e};throw e}}async _getSessionFromURL(e){try{if(!ez())throw new ti("No browser detected.");if("implicit"!==this.flowType||this._isImplicitGrantFlow()){if("pkce"==this.flowType&&!e)throw new tn("Not a valid PKCE flow url.")}else throw new ti("Not a valid implicit grant flow url.");let t=eH(window.location.href);if(e){if(!t.code)throw new tn("No code detected.");let{data:e,error:s}=await this._exchangeCodeForSession(t.code);if(s)throw s;let r=new URL(window.location.href);return r.searchParams.delete("code"),window.history.replaceState(window.history.state,"",r.toString()),{data:{session:e.session,redirectType:null},error:null}}if(t.error||t.error_description||t.error_code)throw new ti(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});let{provider_token:s,provider_refresh_token:r,access_token:i,refresh_token:n,expires_in:a,expires_at:o,token_type:l}=t;if(!i||!a||!n||!l)throw new ti("No session defined in URL");let h=Math.round(Date.now()/1e3),c=parseInt(a),u=h+c;o&&(u=parseInt(o));let d=u-h;1e3*d<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${d}s, should have been closer to ${c}s`);let f=u-c;h-f>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",f,u,h):h-f<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",f,u,h);let{data:p,error:g}=await this._getUser(i);if(g)throw g;let v={provider_token:s,provider_refresh_token:r,access_token:i,expires_in:c,expires_at:u,refresh_token:n,token_type:l,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:v,redirectType:t.type},error:null}}catch(e){if(e5(e))return{data:{session:null,redirectType:null},error:e};throw e}}_isImplicitGrantFlow(){let e=eH(window.location.href);return!!(ez()&&(e.access_token||e.error_description))}async _isPKCEFlow(){let e=eH(window.location.href),t=await eZ(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async t=>{var s;let{data:r,error:i}=t;if(i)return{error:i};let n=null===(s=r.session)||void 0===s?void 0:s.access_token;if(n){let{error:t}=await this.admin.signOut(n,e);if(t&&!(e5(t)&&"AuthApiError"===t.name&&(404===t.status||401===t.status||403===t.status)))return{error:t}}return"others"!==e&&(await this._removeSession(),await eX(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(e){let t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}),s={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,s),(async()=>{await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:s}}}async _emitInitialSession(e){return await this._useSession(async t=>{var s,r;try{let{data:{session:r},error:i}=t;if(i)throw i;await (null===(s=this.stateChangeEmitters.get(e))||void 0===s?void 0:s.callback("INITIAL_SESSION",r)),this._debug("INITIAL_SESSION","callback id",e,"session",r)}catch(t){await (null===(r=this.stateChangeEmitters.get(e))||void 0===r?void 0:r.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",t),console.error(t)}})}async resetPasswordForEmail(e,t={}){let s=null,r=null;"pkce"===this.flowType&&([s,r]=await e3(this.storage,this.storageKey,!0));try{return await tp(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:s,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(e){if(e5(e))return{data:null,error:e};throw e}}async getUserIdentities(){var e;try{let{data:t,error:s}=await this.getUser();if(s)throw s;return{data:{identities:null!==(e=t.user.identities)&&void 0!==e?e:[]},error:null}}catch(e){if(e5(e))return{data:null,error:e};throw e}}async linkIdentity(e){var t;try{let{data:s,error:r}=await this._useSession(async t=>{var s,r,i,n,a;let{data:o,error:l}=t;if(l)throw l;let h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:null===(s=e.options)||void 0===s?void 0:s.redirectTo,scopes:null===(r=e.options)||void 0===r?void 0:r.scopes,queryParams:null===(i=e.options)||void 0===i?void 0:i.queryParams,skipBrowserRedirect:!0});return await tp(this.fetch,"GET",h,{headers:this.headers,jwt:null!==(a=null===(n=o.session)||void 0===n?void 0:n.access_token)&&void 0!==a?a:void 0})});if(r)throw r;return!ez()||(null===(t=e.options)||void 0===t?void 0:t.skipBrowserRedirect)||window.location.assign(null==s?void 0:s.url),{data:{provider:e.provider,url:null==s?void 0:s.url},error:null}}catch(t){if(e5(t))return{data:{provider:e.provider,url:null},error:t};throw t}}async unlinkIdentity(e){try{return await this._useSession(async t=>{var s,r;let{data:i,error:n}=t;if(n)throw n;return await tp(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:null!==(r=null===(s=i.session)||void 0===s?void 0:s.access_token)&&void 0!==r?r:void 0})})}catch(e){if(e5(e))return{data:null,error:e};throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{let s=Date.now();return await function(e,t){let s=new Promise((s,r)=>{(async()=>{for(let i=0;i<1/0;i++)try{let r=await e(i);if(!t(i,null,r)){s(r);return}}catch(e){if(!t(i,e)){r(e);return}}})()});return s}(async s=>(s>0&&await e0(200*Math.pow(2,s-1)),this._debug(t,"refreshing attempt",s),await tp(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:tv})),(e,t)=>t&&to(t)&&Date.now()+200*Math.pow(2,e)-s<3e4)}catch(e){if(this._debug(t,"error",e),e5(e))return{data:{session:null,user:null},error:e};throw e}finally{this._debug(t,"end")}}_isValidSession(e){return"object"==typeof e&&null!==e&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,t){let s=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",s),ez()&&!t.skipBrowserRedirect&&window.location.assign(s),{data:{provider:e,url:s},error:null}}async _recoverAndRefresh(){var e;let t="#_recoverAndRefresh()";this._debug(t,"begin");try{let s=await eZ(this.storage,this.storageKey);if(this._debug(t,"session from storage",s),!this._isValidSession(s)){this._debug(t,"session is not valid"),null!==s&&await this._removeSession();return}let r=Math.round(Date.now()/1e3),i=(null!==(e=s.expires_at)&&void 0!==e?e:1/0)<r+10;if(this._debug(t,`session has${i?"":" not"} expired with margin of 10s`),i){if(this.autoRefreshToken&&s.refresh_token){let{error:e}=await this._callRefreshToken(s.refresh_token);e&&(console.error(e),to(e)||(this._debug(t,"refresh failed with a non-retryable error, removing the session",e),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(e){this._debug(t,"error",e),console.error(e);return}finally{this._debug(t,"end")}}async _callRefreshToken(e){var t,s;if(!e)throw new tt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;let r=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{this.refreshingDeferred=new eY;let{data:t,error:s}=await this._refreshAccessToken(e);if(s)throw s;if(!t.session)throw new tt;await this._saveSession(t.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",t.session);let r={session:t.session,error:null};return this.refreshingDeferred.resolve(r),r}catch(e){if(this._debug(r,"error",e),e5(e)){let s={session:null,error:e};return to(e)||(await this._removeSession(),await this._notifyAllSubscribers("SIGNED_OUT",null)),null===(t=this.refreshingDeferred)||void 0===t||t.resolve(s),s}throw null===(s=this.refreshingDeferred)||void 0===s||s.reject(e),e}finally{this.refreshingDeferred=null,this._debug(r,"end")}}async _notifyAllSubscribers(e,t,s=!0){let r=`#_notifyAllSubscribers(${e})`;this._debug(r,"begin",t,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:e,session:t});let r=[],i=Array.from(this.stateChangeEmitters.values()).map(async s=>{try{await s.callback(e,t)}catch(e){r.push(e)}});if(await Promise.all(i),r.length>0){for(let e=0;e<r.length;e+=1)console.error(r[e]);throw r[0]}}finally{this._debug(r,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await eV(this.storage,this.storageKey,e)}async _removeSession(){this._debug("#_removeSession()"),await eX(this.storage,this.storageKey)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&ez()&&(null==window?void 0:window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(e){console.error("removing visibilitychange callback failed",e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");let e=setInterval(()=>this._autoRefreshTokenTick(),3e4);this.autoRefreshTicker=e,e&&"object"==typeof e&&"function"==typeof e.unref?e.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:s}}=t;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}let r=Math.floor((1e3*s.expires_at-e)/3e4);this._debug("#_autoRefreshTokenTick()",`access token expires in ${r} ticks, a tick lasts 30000ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(s.refresh_token)})}catch(e){console.error("Auto refresh tick failed with error. This is likely a transient error.",e)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof tj)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!ez()||!(null==window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),null==window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){let t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if("visible"!==document.visibilityState){this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,s){let r=[`provider=${encodeURIComponent(t)}`];if((null==s?void 0:s.redirectTo)&&r.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),(null==s?void 0:s.scopes)&&r.push(`scopes=${encodeURIComponent(s.scopes)}`),"pkce"===this.flowType){let[e,t]=await e3(this.storage,this.storageKey),s=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});r.push(s.toString())}if(null==s?void 0:s.queryParams){let e=new URLSearchParams(s.queryParams);r.push(e.toString())}return(null==s?void 0:s.skipBrowserRedirect)&&r.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${e}?${r.join("&")}`}async _unenroll(e){try{return await this._useSession(async t=>{var s;let{data:r,error:i}=t;return i?{data:null,error:i}:await tp(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:null===(s=null==r?void 0:r.session)||void 0===s?void 0:s.access_token})})}catch(e){if(e5(e))return{data:null,error:e};throw e}}async _enroll(e){try{return await this._useSession(async t=>{var s,r;let{data:i,error:n}=t;if(n)return{data:null,error:n};let{data:a,error:o}=await tp(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:e.friendlyName,factor_type:e.factorType,issuer:e.issuer},headers:this.headers,jwt:null===(s=null==i?void 0:i.session)||void 0===s?void 0:s.access_token});return o?{data:null,error:o}:((null===(r=null==a?void 0:a.totp)||void 0===r?void 0:r.qr_code)&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),{data:a,error:null})})}catch(e){if(e5(e))return{data:null,error:e};throw e}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var s;let{data:r,error:i}=t;if(i)return{data:null,error:i};let{data:n,error:a}=await tp(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:null===(s=null==r?void 0:r.session)||void 0===s?void 0:s.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+n.expires_in},n)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",n),{data:n,error:a})})}catch(e){if(e5(e))return{data:null,error:e};throw e}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var s;let{data:r,error:i}=t;return i?{data:null,error:i}:await tp(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{headers:this.headers,jwt:null===(s=null==r?void 0:r.session)||void 0===s?void 0:s.access_token})})}catch(e){if(e5(e))return{data:null,error:e};throw e}})}async _challengeAndVerify(e){let{data:t,error:s}=await this._challenge({factorId:e.factorId});return s?{data:null,error:s}:await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){let{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};let s=(null==e?void 0:e.factors)||[],r=s.filter(e=>"totp"===e.factor_type&&"verified"===e.status);return{data:{all:s,totp:r},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var t,s;let{data:{session:r},error:i}=e;if(i)return{data:null,error:i};if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let n=this._decodeJWT(r.access_token),a=null;n.aal&&(a=n.aal);let o=a,l=null!==(s=null===(t=r.user.factors)||void 0===t?void 0:t.filter(e=>"verified"===e.status))&&void 0!==s?s:[];l.length>0&&(o="aal2");let h=n.amr||[];return{data:{currentLevel:a,nextLevel:o,currentAuthenticationMethods:h},error:null}}))}}t$.nextInstanceID=0;var tR=t$;class tI extends tR{constructor(e){super(e)}}class tU{constructor(e,t,s){var r,i,n;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw Error("supabaseUrl is required.");if(!t)throw Error("supabaseKey is required.");let a=e.replace(/\/$/,"");this.realtimeUrl=`${a}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${a}/auth/v1`,this.storageUrl=`${a}/storage/v1`,this.functionsUrl=`${a}/functions/v1`;let o=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,l={db:e$,realtime:eI,auth:Object.assign(Object.assign({},eR),{storageKey:o}),global:ex},h=function(e,t){let{db:s,auth:r,realtime:i,global:n}=e,{db:a,auth:o,realtime:l,global:h}=t;return{db:Object.assign(Object.assign({},a),s),auth:Object.assign(Object.assign({},o),r),realtime:Object.assign(Object.assign({},l),i),global:Object.assign(Object.assign({},h),n)}}(null!=s?s:{},l);this.storageKey=null!==(r=h.auth.storageKey)&&void 0!==r?r:"",this.headers=null!==(i=h.global.headers)&&void 0!==i?i:{},this.auth=this._initSupabaseAuthClient(null!==(n=h.auth)&&void 0!==n?n:{},this.headers,h.global.fetch),this.fetch=eD(t,this._getAccessToken.bind(this),h.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},h.realtime)),this.rest=new L(`${a}/rest/v1`,{headers:this.headers,schema:h.db.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new u(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new eC(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},s={}){return this.rest.rpc(e,t,s)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t,s,r,i,n;return s=this,r=void 0,i=void 0,n=function*(){let{data:s}=yield this.auth.getSession();return null!==(t=null===(e=s.session)||void 0===e?void 0:e.access_token)&&void 0!==t?t:null},new(i||(i=Promise))(function(e,t){function a(e){try{l(n.next(e))}catch(e){t(e)}}function o(e){try{l(n.throw(e))}catch(e){t(e)}}function l(t){var s;t.done?e(t.value):((s=t.value)instanceof i?s:new i(function(e){e(s)})).then(a,o)}l((n=n.apply(s,r||[])).next())})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:r,storageKey:i,flowType:n,debug:a},o,l){var h;let c={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new tI({url:this.authUrl,headers:Object.assign(Object.assign({},c),o),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:r,flowType:n,debug:a,fetch:l,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(e){return new en(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},null==e?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",null==t?void 0:t.access_token)})}_handleTokenChanged(e,t,s){("TOKEN_REFRESHED"===e||"SIGNED_IN"===e)&&this.changedAccessToken!==s?(this.realtime.setAuth(null!=s?s:null),this.changedAccessToken=s):"SIGNED_OUT"===e&&(this.realtime.setAuth(this.supabaseKey),"STORAGE"==t&&this.auth.signOut(),this.changedAccessToken=void 0)}}let tL=(e,t,s)=>new tU(e,t,s);var tN=Object.create,tD=Object.defineProperty,tB=Object.getOwnPropertyDescriptor,tM=Object.getOwnPropertyNames,tq=Object.getPrototypeOf,tF=Object.prototype.hasOwnProperty,tz=(e,t,s,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of tM(t))tF.call(e,i)||i===s||tD(e,i,{get:()=>t[i],enumerable:!(r=tB(t,i))||r.enumerable});return e},tK=(e,t,s)=>(s=null!=e?tN(tq(e)):{},tz(!t&&e&&e.__esModule?s:tD(s,"default",{value:e,enumerable:!0}),e)),tJ=(R={"../../node_modules/.pnpm/cookie@0.5.0/node_modules/cookie/index.js"(e){e.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var s={},i=(t||{}).decode||r,n=0;n<e.length;){var a=e.indexOf("=",n);if(-1===a)break;var o=e.indexOf(";",n);if(-1===o)o=e.length;else if(o<a){n=e.lastIndexOf(";",a-1)+1;continue}var l=e.slice(n,a).trim();if(void 0===s[l]){var h=e.slice(a+1,o).trim();34===h.charCodeAt(0)&&(h=h.slice(1,-1)),s[l]=function(e,t){try{return t(e)}catch(t){return e}}(h,i)}n=o+1}return s},e.serialize=function(e,r,n){var a=n||{},o=a.encode||i;if("function"!=typeof o)throw TypeError("option encode is invalid");if(!s.test(e))throw TypeError("argument name is invalid");var l=o(r);if(l&&!s.test(l))throw TypeError("argument val is invalid");var h=e+"="+l;if(null!=a.maxAge){var c=a.maxAge-0;if(isNaN(c)||!isFinite(c))throw TypeError("option maxAge is invalid");h+="; Max-Age="+Math.floor(c)}if(a.domain){if(!s.test(a.domain))throw TypeError("option domain is invalid");h+="; Domain="+a.domain}if(a.path){if(!s.test(a.path))throw TypeError("option path is invalid");h+="; Path="+a.path}if(a.expires){var u=a.expires;if("[object Date]"!==t.call(u)&&!(u instanceof Date)||isNaN(u.valueOf()))throw TypeError("option expires is invalid");h+="; Expires="+u.toUTCString()}if(a.httpOnly&&(h+="; HttpOnly"),a.secure&&(h+="; Secure"),a.priority)switch("string"==typeof a.priority?a.priority.toLowerCase():a.priority){case"low":h+="; Priority=Low";break;case"medium":h+="; Priority=Medium";break;case"high":h+="; Priority=High";break;default:throw TypeError("option priority is invalid")}if(a.sameSite)switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:case"strict":h+="; SameSite=Strict";break;case"lax":h+="; SameSite=Lax";break;case"none":h+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return h};var t=Object.prototype.toString,s=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function r(e){return -1!==e.indexOf("%")?decodeURIComponent(e):e}function i(e){return encodeURIComponent(e)}}},function(){return I||(0,R[tM(R)[0]])((I={exports:{}}).exports,I),I.exports}),tH=tK(tJ()),tG=tK(tJ());function tW(e){if(!e)return null;try{let t=JSON.parse(e);if(!t)return null;if("Object"===t.constructor.name)return t;if("Array"!==t.constructor.name)throw Error(`Unexpected format: ${t.constructor.name}`);let[s,r,i]=t[0].split("."),a=n(r),o=new TextDecoder,{exp:l,sub:h,...c}=JSON.parse(o.decode(a));return{expires_at:l,expires_in:l-Math.round(Date.now()/1e3),token_type:"bearer",access_token:t[0],refresh_token:t[1],provider_token:t[2],provider_refresh_token:t[3],user:{id:h,factors:t[4],...c}}}catch(e){return console.warn("Failed to parse cookie string:",e),null}}function tV(e){var t;return JSON.stringify([e.access_token,e.refresh_token,e.provider_token,e.provider_refresh_token,(null==(t=e.user)?void 0:t.factors)??null])}function tZ(){return"undefined"!=typeof window&&void 0!==window.document}var tX={path:"/",maxAge:31536e6},tY=class{constructor(e){this.cookieOptions={...tX,...e}}getItem(e){let t=this.getCookie(e);return t?e.endsWith("-code-verifier")?t:JSON.stringify(tW(t)):null}setItem(e,t){if(e.endsWith("-code-verifier")){this.setCookie(e,t);return}let s=JSON.parse(t),r=tV(s);this.setCookie(e,r)}removeItem(e){this.deleteCookie(e)}},tQ=class extends tY{constructor(e){super(e)}getCookie(e){if(!tZ())return null;let t=(0,tH.parse)(document.cookie);return t[e]}setCookie(e,t){if(!tZ())return null;document.cookie=(0,tH.serialize)(e,t,{...this.cookieOptions,httpOnly:!1})}deleteCookie(e){if(!tZ())return null;document.cookie=(0,tH.serialize)(e,"",{...this.cookieOptions,maxAge:0,httpOnly:!1})}};function t0(e,t,s){var r;let i=tZ();return tL(e,t,{...s,auth:{flowType:"pkce",autoRefreshToken:i,detectSessionInUrl:i,persistSession:!0,storage:s.auth.storage,...(null==(r=s.auth)?void 0:r.storageKey)?{storageKey:s.auth.storageKey}:{}}})}var t1=tG.parse,t2=tG.serialize;/*!
2
- * cookie
3
- * Copyright(c) 2012-2014 Roman Shtylman
4
- * Copyright(c) 2015 Douglas Christopher Wilson
5
- * MIT Licensed
6
- */}}]);
@@ -1,52 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[15],{66277:function(t,r,e){var n=e(77580);(function(){var r,e,i,o;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:null!=n&&n.hrtime?(t.exports=function(){return(r()-o)/1e6},e=n.hrtime,o=(r=function(){var t;return 1e9*(t=e())[0]+t[1]})()-1e9*n.uptime()):Date.now?(t.exports=function(){return Date.now()-i},i=Date.now()):(t.exports=function(){return new Date().getTime()-i},i=new Date().getTime())}).call(this)},77580:function(t){var r,e,n,i=t.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{e="function"==typeof clearTimeout?clearTimeout:a}catch(t){e=a}}();var c=[],s=!1,f=-1;function l(){s&&n&&(s=!1,n.length?c=n.concat(c):f=-1,c.length&&p())}function p(){if(!s){var t=u(l);s=!0;for(var r=c.length;r;){for(n=c,c=[];++f<r;)n&&n[f].run();f=-1,r=c.length}n=null,s=!1,function(t){if(e===clearTimeout)return clearTimeout(t);if((e===a||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{e(t)}catch(r){try{return e.call(null,t)}catch(r){return e.call(this,t)}}}(t)}}function h(t,r){this.fun=t,this.array=r}function v(){}i.nextTick=function(t){var r=Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];c.push(new h(t,r)),1!==c.length||s||u(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},17615:function(t,r,e){for(var n=e(66277),i="undefined"==typeof window?e.g:window,o=["moz","webkit"],a="AnimationFrame",u=i["request"+a],c=i["cancel"+a]||i["cancelRequest"+a],s=0;!u&&s<o.length;s++)u=i[o[s]+"Request"+a],c=i[o[s]+"Cancel"+a]||i[o[s]+"CancelRequest"+a];if(!u||!c){var f=0,l=0,p=[],h=1e3/60;u=function(t){if(0===p.length){var r=n(),e=Math.max(0,h-(r-f));f=e+r,setTimeout(function(){var t=p.slice(0);p.length=0;for(var r=0;r<t.length;r++)if(!t[r].cancelled)try{t[r].callback(f)}catch(t){setTimeout(function(){throw t},0)}},Math.round(e))}return p.push({handle:++l,callback:t,cancelled:!1}),l},c=function(t){for(var r=0;r<p.length;r++)p[r].handle===t&&(p[r].cancelled=!0)}}t.exports=function(t){return u.call(i,t)},t.exports.cancel=function(){c.apply(i,arguments)},t.exports.polyfill=function(t){t||(t=i),t.requestAnimationFrame=u,t.cancelAnimationFrame=c}},74312:function(t){t.exports=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6));var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=r[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var e=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],n=0;n<e.length;n++){var i=e[n].re,o=e[n].process,a=i.exec(t);if(a){var u=o(a);this.r=u[0],this.g=u[1],this.b=u[2],u.length>3&&(this.alpha=u[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),r=this.g.toString(16),e=this.b.toString(16);return 1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),1==e.length&&(e="0"+e),"#"+t+r+e},this.getHelpXML=function(){for(var t=[],n=0;n<e.length;n++)for(var i=e[n].example,o=0;o<i.length;o++)t[t.length]=i[o];for(var a in r)t[t.length]=a;var u=document.createElement("ul");u.setAttribute("id","rgbcolor-examples");for(var n=0;n<t.length;n++)try{var c=document.createElement("li"),s=new RGBColor(t[n]),f=document.createElement("div");f.style.cssText="margin: 3px; border: 1px solid black; background:"+s.toHex()+"; color:"+s.toHex(),f.appendChild(document.createTextNode("test"));var l=document.createTextNode(" "+t[n]+" -> "+s.toRGB()+" -> "+s.toHex());c.appendChild(f),c.appendChild(l),u.appendChild(c)}catch(t){}return u}}},61730:function(t,r,e){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.d(r,{vR:function(){return a}});/**
2
- * StackBlur - a fast almost Gaussian Blur For Canvas
3
- *
4
- * In case you find this class useful - especially in commercial projects -
5
- * I am not totally unhappy for a small donation to my PayPal account
6
- * mario@quasimondo.de
7
- *
8
- * Or support me on flattr:
9
- * {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.
10
- *
11
- * @module StackBlur
12
- * @author Mario Klingemann
13
- * Contact: mario@quasimondo.com
14
- * Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}
15
- * Twitter: @quasimondo
16
- *
17
- * @copyright (c) 2010 Mario Klingemann
18
- *
19
- * Permission is hereby granted, free of charge, to any person
20
- * obtaining a copy of this software and associated documentation
21
- * files (the "Software"), to deal in the Software without
22
- * restriction, including without limitation the rights to use,
23
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
24
- * copies of the Software, and to permit persons to whom the
25
- * Software is furnished to do so, subject to the following
26
- * conditions:
27
- *
28
- * The above copyright notice and this permission notice shall be
29
- * included in all copies or substantial portions of the Software.
30
- *
31
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38
- * OTHER DEALINGS IN THE SOFTWARE.
39
- */var i=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],o=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function a(t,r,e,a,c,s){if(!isNaN(s)&&!(s<1)){s|=0;var f=function(t,r,e,i,o){if("string"==typeof t&&(t=document.getElementById(t)),!t||"object"!==n(t)||!("getContext"in t))throw TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var a=t.getContext("2d");try{return a.getImageData(r,e,i,o)}catch(t){throw Error("unable to access image data: "+t)}}(t,r,e,a,c);f=function(t,r,e,n,a,c){for(var s,f=t.data,l=2*c+1,p=n-1,h=a-1,v=c+1,d=v*(v+1)/2,y=new u,m=y,g=1;g<l;g++)m=m.next=new u,g===v&&(s=m);m.next=y;for(var x=null,b=null,O=0,T=0,E=i[c],_=o[c],w=0;w<a;w++){m=y;for(var N=f[T],A=f[T+1],C=f[T+2],R=f[T+3],S=0;S<v;S++)m.r=N,m.g=A,m.b=C,m.a=R,m=m.next;for(var M=0,I=0,L=0,P=0,j=v*N,U=v*A,k=v*C,D=v*R,H=d*N,V=d*A,F=d*C,Y=d*R,X=1;X<v;X++){var q=T+((p<X?p:X)<<2),Q=f[q],Z=f[q+1],G=f[q+2],$=f[q+3],B=v-X;H+=(m.r=Q)*B,V+=(m.g=Z)*B,F+=(m.b=G)*B,Y+=(m.a=$)*B,M+=Q,I+=Z,L+=G,P+=$,m=m.next}x=y,b=s;for(var W=0;W<n;W++){var z=Y*E>>>_;if(f[T+3]=z,0!==z){var K=255/z;f[T]=(H*E>>>_)*K,f[T+1]=(V*E>>>_)*K,f[T+2]=(F*E>>>_)*K}else f[T]=f[T+1]=f[T+2]=0;H-=j,V-=U,F-=k,Y-=D,j-=x.r,U-=x.g,k-=x.b,D-=x.a;var J=W+c+1;J=O+(J<p?J:p)<<2,M+=x.r=f[J],I+=x.g=f[J+1],L+=x.b=f[J+2],P+=x.a=f[J+3],H+=M,V+=I,F+=L,Y+=P,x=x.next;var tt=b,tr=tt.r,te=tt.g,tn=tt.b,ti=tt.a;j+=tr,U+=te,k+=tn,D+=ti,M-=tr,I-=te,L-=tn,P-=ti,b=b.next,T+=4}O+=n}for(var to=0;to<n;to++){var ta=f[T=to<<2],tu=f[T+1],tc=f[T+2],ts=f[T+3],tf=v*ta,tl=v*tu,tp=v*tc,th=v*ts,tv=d*ta,td=d*tu,ty=d*tc,tm=d*ts;m=y;for(var tg=0;tg<v;tg++)m.r=ta,m.g=tu,m.b=tc,m.a=ts,m=m.next;for(var tx=n,tb=0,tO=0,tT=0,tE=0,t_=1;t_<=c;t_++){T=tx+to<<2;var tw=v-t_;tv+=(m.r=ta=f[T])*tw,td+=(m.g=tu=f[T+1])*tw,ty+=(m.b=tc=f[T+2])*tw,tm+=(m.a=ts=f[T+3])*tw,tE+=ta,tb+=tu,tO+=tc,tT+=ts,m=m.next,t_<h&&(tx+=n)}T=to,x=y,b=s;for(var tN=0;tN<a;tN++){var tA=T<<2;f[tA+3]=ts=tm*E>>>_,ts>0?(ts=255/ts,f[tA]=(tv*E>>>_)*ts,f[tA+1]=(td*E>>>_)*ts,f[tA+2]=(ty*E>>>_)*ts):f[tA]=f[tA+1]=f[tA+2]=0,tv-=tf,td-=tl,ty-=tp,tm-=th,tf-=x.r,tl-=x.g,tp-=x.b,th-=x.a,tA=to+((tA=tN+v)<h?tA:h)*n<<2,tv+=tE+=x.r=f[tA],td+=tb+=x.g=f[tA+1],ty+=tO+=x.b=f[tA+2],tm+=tT+=x.a=f[tA+3],x=x.next,tf+=ta=b.r,tl+=tu=b.g,tp+=tc=b.b,th+=ts=b.a,tE-=ta,tb-=tu,tO-=tc,tT-=ts,b=b.next,T+=n}}return t}(f,0,0,a,c,s),t.getContext("2d").putImageData(f,r,e)}}var u=function t(){!function(t,r){if(!(t instanceof r))throw TypeError("Cannot call a class as a function")}(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}},84935:function(t,r,e){"use strict";var n=e(79373),i=e(57960),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a function")}},18296:function(t,r,e){"use strict";var n=e(21146),i=e(57960),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a constructor")}},38210:function(t,r,e){"use strict";var n=e(13535),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o("Can't set "+i(t)+" as a prototype")}},73776:function(t,r,e){"use strict";var n=e(86743),i=e(59558),o=e(52272).f,a=n("unscopables"),u=Array.prototype;void 0===u[a]&&o(u,a,{configurable:!0,value:i(null)}),t.exports=function(t){u[a][t]=!0}},39608:function(t,r,e){"use strict";var n=e(79081).charAt;t.exports=function(t,r,e){return r+(e?n(t,r).length:1)}},17356:function(t,r,e){"use strict";var n=e(77698),i=TypeError;t.exports=function(t,r){if(n(r,t))return t;throw new i("Incorrect invocation")}},55530:function(t,r,e){"use strict";var n=e(67123),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not an object")}},33147:function(t,r,e){"use strict";var n=e(91952),i=e(5648),o=e(41522),a=function(t){return function(r,e,a){var u,c=n(r),s=o(c);if(0===s)return!t&&-1;var f=i(a,s);if(t&&e!=e){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===e)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},89615:function(t,r,e){"use strict";var n=e(51170);t.exports=function(t,r){var e=[][t];return!!e&&n(function(){e.call(null,r||function(){return 1},1)})}},91049:function(t,r,e){"use strict";var n=e(84935),i=e(42382),o=e(97676),a=e(41522),u=TypeError,c="Reduce of empty array with no initial value",s=function(t){return function(r,e,s,f){var l=i(r),p=o(l),h=a(l);if(n(e),0===h&&s<2)throw new u(c);var v=t?h-1:0,d=t?-1:1;if(s<2)for(;;){if(v in p){f=p[v],v+=d;break}if(v+=d,t?v<0:h<=v)throw new u(c)}for(;t?v>=0:h>v;v+=d)v in p&&(f=e(f,p[v],v,l));return f}};t.exports={left:s(!1),right:s(!0)}},67424:function(t,r,e){"use strict";var n=e(84883);t.exports=n([].slice)},91339:function(t,r,e){"use strict";var n=e(86743)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[n]=function(){return this},Array.from(a,function(){throw 2})}catch(t){}t.exports=function(t,r){try{if(!r&&!i)return!1}catch(t){return!1}var e=!1;try{var o={};o[n]=function(){return{next:function(){return{done:e=!0}}}},t(o)}catch(t){}return e}},824:function(t,r,e){"use strict";var n=e(84883),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},63169:function(t,r,e){"use strict";var n=e(12686),i=e(79373),o=e(824),a=e(86743)("toStringTag"),u=Object,c="Arguments"===o(function(){return arguments}()),s=function(t,r){try{return t[r]}catch(t){}};t.exports=n?o:function(t){var r,e,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=s(r=u(t),a))?e:c?o(r):"Object"===(n=o(r))&&i(r.callee)?"Arguments":n}},65811:function(t,r,e){"use strict";var n=e(52957),i=e(76959),o=e(30969),a=e(52272);t.exports=function(t,r,e){for(var u=i(r),c=a.f,s=o.f,f=0;f<u.length;f++){var l=u[f];n(t,l)||e&&n(e,l)||c(t,l,s(r,l))}}},25816:function(t,r,e){"use strict";var n=e(86743)("match");t.exports=function(t){var r=/./;try{"/./"[t](r)}catch(e){try{return r[n]=!1,"/./"[t](r)}catch(t){}}return!1}},4884:function(t,r,e){"use strict";var n=e(51170);t.exports=!n(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},93951:function(t){"use strict";t.exports=function(t,r){return{value:t,done:r}}},16696:function(t,r,e){"use strict";var n=e(92023),i=e(52272),o=e(55198);t.exports=n?function(t,r,e){return i.f(t,r,o(1,e))}:function(t,r,e){return t[r]=e,t}},55198:function(t){"use strict";t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},43428:function(t,r,e){"use strict";var n=e(60228),i=e(52272);t.exports=function(t,r,e){return e.get&&n(e.get,r,{getter:!0}),e.set&&n(e.set,r,{setter:!0}),i.f(t,r,e)}},28747:function(t,r,e){"use strict";var n=e(79373),i=e(52272),o=e(60228),a=e(87381);t.exports=function(t,r,e,u){u||(u={});var c=u.enumerable,s=void 0!==u.name?u.name:r;if(n(e)&&o(e,s,u),u.global)c?t[r]=e:a(r,e);else{try{u.unsafe?t[r]&&(c=!0):delete t[r]}catch(t){}c?t[r]=e:i.f(t,r,{value:e,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},87381:function(t,r,e){"use strict";var n=e(44448),i=Object.defineProperty;t.exports=function(t,r){try{i(n,t,{value:r,configurable:!0,writable:!0})}catch(e){n[t]=r}return r}},92023:function(t,r,e){"use strict";var n=e(51170);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},85276:function(t,r,e){"use strict";var n=e(44448),i=e(67123),o=n.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},46634:function(t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},30725:function(t,r,e){"use strict";var n=e(85276)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},12344:function(t,r,e){"use strict";var n=e(43538),i=e(99527);t.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},43538:function(t){"use strict";t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},36276:function(t,r,e){"use strict";var n=e(40076);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},46195:function(t,r,e){"use strict";var n=e(40076);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},99527:function(t,r,e){"use strict";var n=e(44448),i=e(824);t.exports="process"===i(n.process)},24386:function(t,r,e){"use strict";var n=e(40076);t.exports=/web0s(?!.*chrome)/i.test(n)},40076:function(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},92069:function(t,r,e){"use strict";var n,i,o=e(44448),a=e(40076),u=o.process,c=o.Deno,s=u&&u.versions||c&&c.version,f=s&&s.v8;f&&(i=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},51801:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},45654:function(t,r,e){"use strict";var n=e(44448),i=e(30969).f,o=e(16696),a=e(28747),u=e(87381),c=e(65811),s=e(28665);t.exports=function(t,r){var e,f,l,p,h,v=t.target,d=t.global,y=t.stat;if(e=d?n:y?n[v]||u(v,{}):n[v]&&n[v].prototype)for(f in r){if(p=r[f],l=t.dontCallGetSet?(h=i(e,f))&&h.value:e[f],!s(d?f:v+(y?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(t.sham||l&&l.sham)&&o(p,"sham",!0),a(e,f,p,t)}}},51170:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},56429:function(t,r,e){"use strict";e(17139);var n=e(74199),i=e(28747),o=e(91437),a=e(51170),u=e(86743),c=e(16696),s=u("species"),f=RegExp.prototype;t.exports=function(t,r,e,l){var p=u(t),h=!a(function(){var r={};return r[p]=function(){return 7},7!==""[t](r)}),v=h&&!a(function(){var r=!1,e=/a/;return"split"===t&&((e={}).constructor={},e.constructor[s]=function(){return e},e.flags="",e[p]=/./[p]),e.exec=function(){return r=!0,null},e[p](""),!r});if(!h||!v||e){var d=/./[p],y=r(p,""[t],function(t,r,e,i,a){var u=r.exec;return u===o||u===f.exec?h&&!a?{done:!0,value:n(d,r,e,i)}:{done:!0,value:n(t,e,r,i)}:{done:!1}});i(String.prototype,t,y[0]),i(f,p,y[1])}l&&c(f[p],"sham",!0)}},71086:function(t,r,e){"use strict";var n=e(50033),i=Function.prototype,o=i.apply,a=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(o):function(){return a.apply(o,arguments)})},80619:function(t,r,e){"use strict";var n=e(46527),i=e(84935),o=e(50033),a=n(n.bind);t.exports=function(t,r){return i(t),void 0===r?t:o?a(t,r):function(){return t.apply(r,arguments)}}},50033:function(t,r,e){"use strict";var n=e(51170);t.exports=!n(function(){var t=(function(){}).bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},74199:function(t,r,e){"use strict";var n=e(50033),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},78421:function(t,r,e){"use strict";var n=e(92023),i=e(52957),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,u=i(o,"name"),c=u&&(!n||n&&a(o,"name").configurable);t.exports={EXISTS:u,PROPER:u&&"something"===(function(){}).name,CONFIGURABLE:c}},1947:function(t,r,e){"use strict";var n=e(84883),i=e(84935);t.exports=function(t,r,e){try{return n(i(Object.getOwnPropertyDescriptor(t,r)[e]))}catch(t){}}},46527:function(t,r,e){"use strict";var n=e(824),i=e(84883);t.exports=function(t){if("Function"===n(t))return i(t)}},84883:function(t,r,e){"use strict";var n=e(50033),i=Function.prototype,o=i.call,a=n&&i.bind.bind(o,o);t.exports=n?a:function(t){return function(){return o.apply(t,arguments)}}},21616:function(t,r,e){"use strict";var n=e(44448),i=e(79373);t.exports=function(t,r){var e;return arguments.length<2?i(e=n[t])?e:void 0:n[t]&&n[t][r]}},19075:function(t,r,e){"use strict";var n=e(63169),i=e(83601),o=e(77914),a=e(91124),u=e(86743)("iterator");t.exports=function(t){if(!o(t))return i(t,u)||i(t,"@@iterator")||a[n(t)]}},13683:function(t,r,e){"use strict";var n=e(74199),i=e(84935),o=e(55530),a=e(57960),u=e(19075),c=TypeError;t.exports=function(t,r){var e=arguments.length<2?u(t):r;if(i(e))return o(n(e,t));throw new c(a(t)+" is not iterable")}},83601:function(t,r,e){"use strict";var n=e(84935),i=e(77914);t.exports=function(t,r){var e=t[r];return i(e)?void 0:n(e)}},65667:function(t,r,e){"use strict";var n=e(84883),i=e(42382),o=Math.floor,a=n("".charAt),u=n("".replace),c=n("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,f=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,r,e,n,l,p){var h=e+t.length,v=n.length,d=f;return void 0!==l&&(l=i(l),d=s),u(p,d,function(i,u){var s;switch(a(u,0)){case"$":return"$";case"&":return t;case"`":return c(r,0,e);case"'":return c(r,h);case"<":s=l[c(u,1,-1)];break;default:var f=+u;if(0===f)return i;if(f>v){var p=o(f/10);if(0===p)return i;if(p<=v)return void 0===n[p-1]?a(u,1):n[p-1]+a(u,1);return i}s=n[f-1]}return void 0===s?"":s})}},44448:function(t,r,e){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e.g&&e.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},52957:function(t,r,e){"use strict";var n=e(84883),i=e(42382),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return o(i(t),r)}},1730:function(t){"use strict";t.exports={}},55934:function(t){"use strict";t.exports=function(t,r){try{1==arguments.length?console.error(t):console.error(t,r)}catch(t){}}},12187:function(t,r,e){"use strict";var n=e(21616);t.exports=n("document","documentElement")},75683:function(t,r,e){"use strict";var n=e(92023),i=e(51170),o=e(85276);t.exports=!n&&!i(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},97676:function(t,r,e){"use strict";var n=e(84883),i=e(51170),o=e(824),a=Object,u=n("".split);t.exports=i(function(){return!a("z").propertyIsEnumerable(0)})?function(t){return"String"===o(t)?u(t,""):a(t)}:a},54179:function(t,r,e){"use strict";var n=e(84883),i=e(79373),o=e(59965),a=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return a(t)}),t.exports=o.inspectSource},29425:function(t,r,e){"use strict";var n,i,o,a=e(81884),u=e(44448),c=e(67123),s=e(16696),f=e(52957),l=e(59965),p=e(74666),h=e(1730),v="Object already initialized",d=u.TypeError,y=u.WeakMap;if(a||l.state){var m=l.state||(l.state=new y);m.get=m.get,m.has=m.has,m.set=m.set,n=function(t,r){if(m.has(t))throw new d(v);return r.facade=t,m.set(t,r),r},i=function(t){return m.get(t)||{}},o=function(t){return m.has(t)}}else{var g=p("state");h[g]=!0,n=function(t,r){if(f(t,g))throw new d(v);return r.facade=t,s(t,g,r),r},i=function(t){return f(t,g)?t[g]:{}},o=function(t){return f(t,g)}}t.exports={set:n,get:i,has:o,enforce:function(t){return o(t)?i(t):n(t,{})},getterFor:function(t){return function(r){var e;if(!c(r)||(e=i(r)).type!==t)throw new d("Incompatible receiver, "+t+" required");return e}}}},57289:function(t,r,e){"use strict";var n=e(86743),i=e(91124),o=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},86844:function(t,r,e){"use strict";var n=e(824);t.exports=Array.isArray||function(t){return"Array"===n(t)}},79373:function(t){"use strict";var r="object"==typeof document&&document.all;t.exports=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},21146:function(t,r,e){"use strict";var n=e(84883),i=e(51170),o=e(79373),a=e(63169),u=e(21616),c=e(54179),s=function(){},f=u("Reflect","construct"),l=/^\s*(?:class|function)\b/,p=n(l.exec),h=!l.test(s),v=function(t){if(!o(t))return!1;try{return f(s,[],t),!0}catch(t){return!1}},d=function(t){if(!o(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!p(l,c(t))}catch(t){return!0}};d.sham=!0,t.exports=!f||i(function(){var t;return v(v.call)||!v(Object)||!v(function(){t=!0})||t})?d:v},28665:function(t,r,e){"use strict";var n=e(51170),i=e(79373),o=/#|\.prototype\./,a=function(t,r){var e=c[u(t)];return e===f||e!==s&&(i(r)?n(r):!!r)},u=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},77914:function(t){"use strict";t.exports=function(t){return null==t}},67123:function(t,r,e){"use strict";var n=e(79373);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},13535:function(t,r,e){"use strict";var n=e(67123);t.exports=function(t){return n(t)||null===t}},77717:function(t){"use strict";t.exports=!1},47283:function(t,r,e){"use strict";var n=e(67123),i=e(824),o=e(86743)("match");t.exports=function(t){var r;return n(t)&&(void 0!==(r=t[o])?!!r:"RegExp"===i(t))}},9670:function(t,r,e){"use strict";var n=e(21616),i=e(79373),o=e(77698),a=e(12703),u=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var r=n("Symbol");return i(r)&&o(r.prototype,u(t))}},90485:function(t,r,e){"use strict";var n=e(80619),i=e(74199),o=e(55530),a=e(57960),u=e(57289),c=e(41522),s=e(77698),f=e(13683),l=e(19075),p=e(53901),h=TypeError,v=function(t,r){this.stopped=t,this.result=r},d=v.prototype;t.exports=function(t,r,e){var y,m,g,x,b,O,T,E=e&&e.that,_=!!(e&&e.AS_ENTRIES),w=!!(e&&e.IS_RECORD),N=!!(e&&e.IS_ITERATOR),A=!!(e&&e.INTERRUPTED),C=n(r,E),R=function(t){return y&&p(y,"normal",t),new v(!0,t)},S=function(t){return _?(o(t),A?C(t[0],t[1],R):C(t[0],t[1])):A?C(t,R):C(t)};if(w)y=t.iterator;else if(N)y=t;else{if(!(m=l(t)))throw new h(a(t)+" is not iterable");if(u(m)){for(g=0,x=c(t);x>g;g++)if((b=S(t[g]))&&s(d,b))return b;return new v(!1)}y=f(t,m)}for(O=w?t.next:y.next;!(T=i(O,y)).done;){try{b=S(T.value)}catch(t){p(y,"throw",t)}if("object"==typeof b&&b&&s(d,b))return b}return new v(!1)}},53901:function(t,r,e){"use strict";var n=e(74199),i=e(55530),o=e(83601);t.exports=function(t,r,e){var a,u;i(t);try{if(!(a=o(t,"return"))){if("throw"===r)throw e;return e}a=n(a,t)}catch(t){u=!0,a=t}if("throw"===r)throw e;if(u)throw a;return i(a),e}},31236:function(t,r,e){"use strict";var n=e(63327).IteratorPrototype,i=e(59558),o=e(55198),a=e(46150),u=e(91124),c=function(){return this};t.exports=function(t,r,e,s){var f=r+" Iterator";return t.prototype=i(n,{next:o(+!s,e)}),a(t,f,!1,!0),u[f]=c,t}},42628:function(t,r,e){"use strict";var n=e(45654),i=e(74199),o=e(77717),a=e(78421),u=e(79373),c=e(31236),s=e(35444),f=e(68485),l=e(46150),p=e(16696),h=e(28747),v=e(86743),d=e(91124),y=e(63327),m=a.PROPER,g=a.CONFIGURABLE,x=y.IteratorPrototype,b=y.BUGGY_SAFARI_ITERATORS,O=v("iterator"),T="keys",E="values",_="entries",w=function(){return this};t.exports=function(t,r,e,a,v,y,N){c(e,r,a);var A,C,R,S=function(t){if(t===v&&j)return j;if(!b&&t&&t in L)return L[t];switch(t){case T:case E:case _:return function(){return new e(this,t)}}return function(){return new e(this)}},M=r+" Iterator",I=!1,L=t.prototype,P=L[O]||L["@@iterator"]||v&&L[v],j=!b&&P||S(v),U="Array"===r&&L.entries||P;if(U&&(A=s(U.call(new t)))!==Object.prototype&&A.next&&(o||s(A)===x||(f?f(A,x):u(A[O])||h(A,O,w)),l(A,M,!0,!0),o&&(d[M]=w)),m&&v===E&&P&&P.name!==E&&(!o&&g?p(L,"name",E):(I=!0,j=function(){return i(P,this)})),v){if(C={values:S(E),keys:y?j:S(T),entries:S(_)},N)for(R in C)!b&&!I&&R in L||h(L,R,C[R]);else n({target:r,proto:!0,forced:b||I},C)}return(!o||N)&&L[O]!==j&&h(L,O,j,{name:v}),d[r]=j,C}},63327:function(t,r,e){"use strict";var n,i,o,a=e(51170),u=e(79373),c=e(67123),s=e(59558),f=e(35444),l=e(28747),p=e(86743),h=e(77717),v=p("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(i=f(f(o)))!==Object.prototype&&(n=i):d=!0),!c(n)||a(function(){var t={};return n[v].call(t)!==t})?n={}:h&&(n=s(n)),u(n[v])||l(n,v,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:d}},91124:function(t){"use strict";t.exports={}},41522:function(t,r,e){"use strict";var n=e(79720);t.exports=function(t){return n(t.length)}},60228:function(t,r,e){"use strict";var n=e(84883),i=e(51170),o=e(79373),a=e(52957),u=e(92023),c=e(78421).CONFIGURABLE,s=e(54179),f=e(29425),l=f.enforce,p=f.get,h=String,v=Object.defineProperty,d=n("".slice),y=n("".replace),m=n([].join),g=u&&!i(function(){return 8!==v(function(){},"length",{value:8}).length}),x=String(String).split("String"),b=t.exports=function(t,r,e){"Symbol("===d(h(r),0,7)&&(r="["+y(h(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!a(t,"name")||c&&t.name!==r)&&(u?v(t,"name",{value:r,configurable:!0}):t.name=r),g&&e&&a(e,"arity")&&t.length!==e.arity&&v(t,"length",{value:e.arity});try{e&&a(e,"constructor")&&e.constructor?u&&v(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=l(t);return a(n,"source")||(n.source=m(x,"string"==typeof r?r:"")),t};Function.prototype.toString=b(function(){return o(this)&&p(this).source||s(this)},"toString")},6347:function(t){"use strict";var r=Math.ceil,e=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?e:r)(n)}},3446:function(t,r,e){"use strict";var n,i,o,a,u,c=e(44448),s=e(95006),f=e(80619),l=e(14168).set,p=e(22876),h=e(46195),v=e(36276),d=e(24386),y=e(99527),m=c.MutationObserver||c.WebKitMutationObserver,g=c.document,x=c.process,b=c.Promise,O=s("queueMicrotask");if(!O){var T=new p,E=function(){var t,r;for(y&&(t=x.domain)&&t.exit();r=T.get();)try{r()}catch(t){throw T.head&&n(),t}t&&t.enter()};h||y||d||!m||!g?!v&&b&&b.resolve?((a=b.resolve(void 0)).constructor=b,u=f(a.then,a),n=function(){u(E)}):y?n=function(){x.nextTick(E)}:(l=f(l,c),n=function(){l(E)}):(i=!0,o=g.createTextNode(""),new m(E).observe(o,{characterData:!0}),n=function(){o.data=i=!i}),O=function(t){T.head||n(),T.add(t)}}t.exports=O},66079:function(t,r,e){"use strict";var n=e(84935),i=TypeError,o=function(t){var r,e;this.promise=new t(function(t,n){if(void 0!==r||void 0!==e)throw new i("Bad Promise constructor");r=t,e=n}),this.resolve=n(r),this.reject=n(e)};t.exports.f=function(t){return new o(t)}},4382:function(t,r,e){"use strict";var n=e(47283),i=TypeError;t.exports=function(t){if(n(t))throw new i("The method doesn't accept regular expressions");return t}},59558:function(t,r,e){"use strict";var n,i=e(55530),o=e(59666),a=e(51801),u=e(1730),c=e(12187),s=e(85276),f=e(74666),l="prototype",p="script",h=f("IE_PROTO"),v=function(){},d=function(t){return"<"+p+">"+t+"</"+p+">"},y=function(t){t.write(d("")),t.close();var r=t.parentWindow.Object;return t=null,r},m=function(){var t,r=s("iframe");return r.style.display="none",c.appendChild(r),r.src=String("java"+p+":"),(t=r.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}g="undefined"!=typeof document?document.domain&&n?y(n):m():y(n);for(var t=a.length;t--;)delete g[l][a[t]];return g()};u[h]=!0,t.exports=Object.create||function(t,r){var e;return null!==t?(v[l]=i(t),e=new v,v[l]=null,e[h]=t):e=g(),void 0===r?e:o.f(e,r)}},59666:function(t,r,e){"use strict";var n=e(92023),i=e(79942),o=e(52272),a=e(55530),u=e(91952),c=e(93394);r.f=n&&!i?Object.defineProperties:function(t,r){a(t);for(var e,n=u(r),i=c(r),s=i.length,f=0;s>f;)o.f(t,e=i[f++],n[e]);return t}},52272:function(t,r,e){"use strict";var n=e(92023),i=e(75683),o=e(79942),a=e(55530),u=e(65239),c=TypeError,s=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",h="writable";r.f=n?o?function(t,r,e){if(a(t),r=u(r),a(e),"function"==typeof t&&"prototype"===r&&"value"in e&&h in e&&!e[h]){var n=f(t,r);n&&n[h]&&(t[r]=e.value,e={configurable:p in e?e[p]:n[p],enumerable:l in e?e[l]:n[l],writable:!1})}return s(t,r,e)}:s:function(t,r,e){if(a(t),r=u(r),a(e),i)try{return s(t,r,e)}catch(t){}if("get"in e||"set"in e)throw new c("Accessors not supported");return"value"in e&&(t[r]=e.value),t}},30969:function(t,r,e){"use strict";var n=e(92023),i=e(74199),o=e(21373),a=e(55198),u=e(91952),c=e(65239),s=e(52957),f=e(75683),l=Object.getOwnPropertyDescriptor;r.f=n?l:function(t,r){if(t=u(t),r=c(r),f)try{return l(t,r)}catch(t){}if(s(t,r))return a(!i(o.f,t,r),t[r])}},20037:function(t,r,e){"use strict";var n=e(84515),i=e(51801).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},99306:function(t,r){"use strict";r.f=Object.getOwnPropertySymbols},35444:function(t,r,e){"use strict";var n=e(52957),i=e(79373),o=e(42382),a=e(74666),u=e(4884),c=a("IE_PROTO"),s=Object,f=s.prototype;t.exports=u?s.getPrototypeOf:function(t){var r=o(t);if(n(r,c))return r[c];var e=r.constructor;return i(e)&&r instanceof e?e.prototype:r instanceof s?f:null}},77698:function(t,r,e){"use strict";var n=e(84883);t.exports=n({}.isPrototypeOf)},84515:function(t,r,e){"use strict";var n=e(84883),i=e(52957),o=e(91952),a=e(33147).indexOf,u=e(1730),c=n([].push);t.exports=function(t,r){var e,n=o(t),s=0,f=[];for(e in n)!i(u,e)&&i(n,e)&&c(f,e);for(;r.length>s;)i(n,e=r[s++])&&(~a(f,e)||c(f,e));return f}},93394:function(t,r,e){"use strict";var n=e(84515),i=e(51801);t.exports=Object.keys||function(t){return n(t,i)}},21373:function(t,r){"use strict";var e={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!e.call({1:2},1);r.f=i?function(t){var r=n(this,t);return!!r&&r.enumerable}:e},68485:function(t,r,e){"use strict";var n=e(1947),i=e(67123),o=e(63547),a=e(38210);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,e={};try{(t=n(Object.prototype,"__proto__","set"))(e,[]),r=e instanceof Array}catch(t){}return function(e,n){return o(e),a(n),i(e)&&(r?t(e,n):e.__proto__=n),e}}():void 0)},565:function(t,r,e){"use strict";var n=e(74199),i=e(79373),o=e(67123),a=TypeError;t.exports=function(t,r){var e,u;if("string"===r&&i(e=t.toString)&&!o(u=n(e,t))||i(e=t.valueOf)&&!o(u=n(e,t))||"string"!==r&&i(e=t.toString)&&!o(u=n(e,t)))return u;throw new a("Can't convert object to primitive value")}},76959:function(t,r,e){"use strict";var n=e(21616),i=e(84883),o=e(20037),a=e(99306),u=e(55530),c=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var r=o.f(u(t)),e=a.f;return e?c(r,e(t)):r}},63577:function(t){"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},48244:function(t,r,e){"use strict";var n=e(44448),i=e(85833),o=e(79373),a=e(28665),u=e(54179),c=e(86743),s=e(12344),f=e(43538),l=e(77717),p=e(92069),h=i&&i.prototype,v=c("species"),d=!1,y=o(n.PromiseRejectionEvent),m=a("Promise",function(){var t=u(i),r=t!==String(i);if(!r&&66===p||l&&!(h.catch&&h.finally))return!0;if(!p||p<51||!/native code/.test(t)){var e=new i(function(t){t(1)}),n=function(t){t(function(){},function(){})};if((e.constructor={})[v]=n,!(d=e.then(function(){}) instanceof n))return!0}return!r&&(s||f)&&!y});t.exports={CONSTRUCTOR:m,REJECTION_EVENT:y,SUBCLASSING:d}},85833:function(t,r,e){"use strict";var n=e(44448);t.exports=n.Promise},77019:function(t,r,e){"use strict";var n=e(55530),i=e(67123),o=e(66079);t.exports=function(t,r){if(n(t),i(r)&&r.constructor===t)return r;var e=o.f(t);return(0,e.resolve)(r),e.promise}},12284:function(t,r,e){"use strict";var n=e(85833),i=e(91339),o=e(48244).CONSTRUCTOR;t.exports=o||!i(function(t){n.all(t).then(void 0,function(){})})},22876:function(t){"use strict";var r=function(){this.head=null,this.tail=null};r.prototype={add:function(t){var r={item:t,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=r},79135:function(t,r,e){"use strict";var n=e(74199),i=e(55530),o=e(79373),a=e(824),u=e(91437),c=TypeError;t.exports=function(t,r){var e=t.exec;if(o(e)){var s=n(e,t,r);return null!==s&&i(s),s}if("RegExp"===a(t))return n(u,t,r);throw new c("RegExp#exec called on incompatible receiver")}},91437:function(t,r,e){"use strict";var n,i,o=e(74199),a=e(84883),u=e(47949),c=e(35313),s=e(84853),f=e(15367),l=e(59558),p=e(29425).get,h=e(86690),v=e(29962),d=f("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,m=y,g=a("".charAt),x=a("".indexOf),b=a("".replace),O=a("".slice),T=(i=/b*/g,o(y,n=/a/,"a"),o(y,i,"a"),0!==n.lastIndex||0!==i.lastIndex),E=s.BROKEN_CARET,_=void 0!==/()??/.exec("")[1];(T||_||E||h||v)&&(m=function(t){var r,e,n,i,a,s,f,h=p(this),v=u(t),w=h.raw;if(w)return w.lastIndex=this.lastIndex,r=o(m,w,v),this.lastIndex=w.lastIndex,r;var N=h.groups,A=E&&this.sticky,C=o(c,this),R=this.source,S=0,M=v;if(A&&(-1===x(C=b(C,"y",""),"g")&&(C+="g"),M=O(v,this.lastIndex),this.lastIndex>0&&(!this.multiline||this.multiline&&"\n"!==g(v,this.lastIndex-1))&&(R="(?: "+R+")",M=" "+M,S++),e=RegExp("^(?:"+R+")",C)),_&&(e=RegExp("^"+R+"$(?!\\s)",C)),T&&(n=this.lastIndex),i=o(y,A?e:this,M),A?i?(i.input=O(i.input,S),i[0]=O(i[0],S),i.index=this.lastIndex,this.lastIndex+=i[0].length):this.lastIndex=0:T&&i&&(this.lastIndex=this.global?i.index+i[0].length:n),_&&i&&i.length>1&&o(d,i[0],e,function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)}),i&&N)for(a=0,i.groups=s=l(null);a<N.length;a++)s[(f=N[a])[0]]=i[f[1]];return i}),t.exports=m},35313:function(t,r,e){"use strict";var n=e(55530);t.exports=function(){var t=n(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r}},80648:function(t,r,e){"use strict";var n=e(74199),i=e(52957),o=e(77698),a=e(35313),u=RegExp.prototype;t.exports=function(t){var r=t.flags;return void 0===r&&!("flags"in u)&&!i(t,"flags")&&o(u,t)?n(a,t):r}},84853:function(t,r,e){"use strict";var n=e(51170),i=e(44448).RegExp,o=n(function(){var t=i("a","y");return t.lastIndex=2,null!==t.exec("abcd")}),a=o||n(function(){return!i("a","y").sticky}),u=o||n(function(){var t=i("^r","gy");return t.lastIndex=2,null!==t.exec("str")});t.exports={BROKEN_CARET:u,MISSED_STICKY:a,UNSUPPORTED_Y:o}},86690:function(t,r,e){"use strict";var n=e(51170),i=e(44448).RegExp;t.exports=n(function(){var t=i(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})},29962:function(t,r,e){"use strict";var n=e(51170),i=e(44448).RegExp;t.exports=n(function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})},63547:function(t,r,e){"use strict";var n=e(77914),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},95006:function(t,r,e){"use strict";var n=e(44448),i=e(92023),o=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!i)return n[t];var r=o(n,t);return r&&r.value}},5291:function(t,r,e){"use strict";var n=e(21616),i=e(43428),o=e(86743),a=e(92023),u=o("species");t.exports=function(t){var r=n(t);a&&r&&!r[u]&&i(r,u,{configurable:!0,get:function(){return this}})}},46150:function(t,r,e){"use strict";var n=e(52272).f,i=e(52957),o=e(86743)("toStringTag");t.exports=function(t,r,e){t&&!e&&(t=t.prototype),t&&!i(t,o)&&n(t,o,{configurable:!0,value:r})}},74666:function(t,r,e){"use strict";var n=e(15367),i=e(98246),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},59965:function(t,r,e){"use strict";var n=e(77717),i=e(44448),o=e(87381),a="__core-js_shared__",u=t.exports=i[a]||o(a,{});(u.versions||(u.versions=[])).push({version:"3.37.1",mode:n?"pure":"global",copyright:"\xa9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},15367:function(t,r,e){"use strict";var n=e(59965);t.exports=function(t,r){return n[t]||(n[t]=r||{})}},27909:function(t,r,e){"use strict";var n=e(55530),i=e(18296),o=e(77914),a=e(86743)("species");t.exports=function(t,r){var e,u=n(t).constructor;return void 0===u||o(e=n(u)[a])?r:i(e)}},79081:function(t,r,e){"use strict";var n=e(84883),i=e(43200),o=e(47949),a=e(63547),u=n("".charAt),c=n("".charCodeAt),s=n("".slice),f=function(t){return function(r,e){var n,f,l=o(a(r)),p=i(e),h=l.length;return p<0||p>=h?t?"":void 0:(n=c(l,p))<55296||n>56319||p+1===h||(f=c(l,p+1))<56320||f>57343?t?u(l,p):n:t?s(l,p,p+2):(n-55296<<10)+(f-56320)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},21014:function(t,r,e){"use strict";var n=e(78421).PROPER,i=e(51170),o=e(11395),a="​\x85᠎";t.exports=function(t){return i(function(){return!!o[t]()||a[t]()!==a||n&&o[t].name!==t})}},26031:function(t,r,e){"use strict";var n=e(84883),i=e(63547),o=e(47949),a=e(11395),u=n("".replace),c=RegExp("^["+a+"]+"),s=RegExp("(^|[^"+a+"])["+a+"]+$"),f=function(t){return function(r){var e=o(i(r));return 1&t&&(e=u(e,c,"")),2&t&&(e=u(e,s,"$1")),e}};t.exports={start:f(1),end:f(2),trim:f(3)}},63528:function(t,r,e){"use strict";var n=e(92069),i=e(51170),o=e(44448).String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t) instanceof Symbol)||!Symbol.sham&&n&&n<41})},14168:function(t,r,e){"use strict";var n,i,o,a,u=e(44448),c=e(71086),s=e(80619),f=e(79373),l=e(52957),p=e(51170),h=e(12187),v=e(67424),d=e(85276),y=e(56547),m=e(46195),g=e(99527),x=u.setImmediate,b=u.clearImmediate,O=u.process,T=u.Dispatch,E=u.Function,_=u.MessageChannel,w=u.String,N=0,A={},C="onreadystatechange";p(function(){n=u.location});var R=function(t){if(l(A,t)){var r=A[t];delete A[t],r()}},S=function(t){return function(){R(t)}},M=function(t){R(t.data)},I=function(t){u.postMessage(w(t),n.protocol+"//"+n.host)};x&&b||(x=function(t){y(arguments.length,1);var r=f(t)?t:E(t),e=v(arguments,1);return A[++N]=function(){c(r,void 0,e)},i(N),N},b=function(t){delete A[t]},g?i=function(t){O.nextTick(S(t))}:T&&T.now?i=function(t){T.now(S(t))}:_&&!m?(a=(o=new _).port2,o.port1.onmessage=M,i=s(a.postMessage,a)):u.addEventListener&&f(u.postMessage)&&!u.importScripts&&n&&"file:"!==n.protocol&&!p(I)?(i=I,u.addEventListener("message",M,!1)):i=C in d("script")?function(t){h.appendChild(d("script"))[C]=function(){h.removeChild(this),R(t)}}:function(t){setTimeout(S(t),0)}),t.exports={set:x,clear:b}},5648:function(t,r,e){"use strict";var n=e(43200),i=Math.max,o=Math.min;t.exports=function(t,r){var e=n(t);return e<0?i(e+r,0):o(e,r)}},91952:function(t,r,e){"use strict";var n=e(97676),i=e(63547);t.exports=function(t){return n(i(t))}},43200:function(t,r,e){"use strict";var n=e(6347);t.exports=function(t){var r=+t;return r!=r||0===r?0:n(r)}},79720:function(t,r,e){"use strict";var n=e(43200),i=Math.min;t.exports=function(t){var r=n(t);return r>0?i(r,9007199254740991):0}},42382:function(t,r,e){"use strict";var n=e(63547),i=Object;t.exports=function(t){return i(n(t))}},39221:function(t,r,e){"use strict";var n=e(74199),i=e(67123),o=e(9670),a=e(83601),u=e(565),c=e(86743),s=TypeError,f=c("toPrimitive");t.exports=function(t,r){if(!i(t)||o(t))return t;var e,c=a(t,f);if(c){if(void 0===r&&(r="default"),!i(e=n(c,t,r))||o(e))return e;throw new s("Can't convert object to primitive value")}return void 0===r&&(r="number"),u(t,r)}},65239:function(t,r,e){"use strict";var n=e(39221),i=e(9670);t.exports=function(t){var r=n(t,"string");return i(r)?r:r+""}},12686:function(t,r,e){"use strict";var n=e(86743)("toStringTag"),i={};i[n]="z",t.exports="[object z]"===String(i)},47949:function(t,r,e){"use strict";var n=e(63169),i=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},57960:function(t){"use strict";var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},98246:function(t,r,e){"use strict";var n=e(84883),i=0,o=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36)}},12703:function(t,r,e){"use strict";var n=e(63528);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},79942:function(t,r,e){"use strict";var n=e(92023),i=e(51170);t.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},56547:function(t){"use strict";var r=TypeError;t.exports=function(t,e){if(t<e)throw new r("Not enough arguments");return t}},81884:function(t,r,e){"use strict";var n=e(44448),i=e(79373),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},86743:function(t,r,e){"use strict";var n=e(44448),i=e(15367),o=e(52957),a=e(98246),u=e(63528),c=e(12703),s=n.Symbol,f=i("wks"),l=c?s.for||s:s&&s.withoutSetter||a;t.exports=function(t){return o(f,t)||(f[t]=u&&o(s,t)?s[t]:l("Symbol."+t)),f[t]}},11395:function(t){"use strict";t.exports=" \n\v\f\r \xa0               \u2028\u2029\uFEFF"},36314:function(t,r,e){"use strict";var n=e(45654),i=e(46527),o=e(33147).indexOf,a=e(89615),u=i([].indexOf),c=!!u&&1/u([1],1,-0)<0;n({target:"Array",proto:!0,forced:c||!a("indexOf")},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return c?u(this,t,r)||0:o(this,t,r)}})},3615:function(t,r,e){"use strict";var n=e(91952),i=e(73776),o=e(91124),a=e(29425),u=e(52272).f,c=e(42628),s=e(93951),f=e(77717),l=e(92023),p="Array Iterator",h=a.set,v=a.getterFor(p);t.exports=c(Array,"Array",function(t,r){h(this,{type:p,target:n(t),index:0,kind:r})},function(){var t=v(this),r=t.target,e=t.index++;if(!r||e>=r.length)return t.target=void 0,s(void 0,!0);switch(t.kind){case"keys":return s(e,!1);case"values":return s(r[e],!1)}return s([e,r[e]],!1)},"values");var d=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!f&&l&&"values"!==d.name)try{u(d,"name",{value:"values"})}catch(t){}},28454:function(t,r,e){"use strict";var n=e(45654),i=e(91049).left,o=e(89615),a=e(92069);n({target:"Array",proto:!0,forced:!e(99527)&&a>79&&a<83||!o("reduce")},{reduce:function(t){var r=arguments.length;return i(this,t,r,r>1?arguments[1]:void 0)}})},33940:function(t,r,e){"use strict";var n=e(45654),i=e(84883),o=e(86844),a=i([].reverse),u=[1,2];n({target:"Array",proto:!0,forced:String(u)===String(u.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),a(this)}})},3812:function(t,r,e){"use strict";var n=e(45654),i=e(74199),o=e(84935),a=e(66079),u=e(63577),c=e(90485);n({target:"Promise",stat:!0,forced:e(12284)},{all:function(t){var r=this,e=a.f(r),n=e.resolve,s=e.reject,f=u(function(){var e=o(r.resolve),a=[],u=0,f=1;c(t,function(t){var o=u++,c=!1;f++,i(e,r,t).then(function(t){!c&&(c=!0,a[o]=t,--f||n(a))},s)}),--f||n(a)});return f.error&&s(f.value),e.promise}})},43739:function(t,r,e){"use strict";var n=e(45654),i=e(77717),o=e(48244).CONSTRUCTOR,a=e(85833),u=e(21616),c=e(79373),s=e(28747),f=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&c(a)){var l=u("Promise").prototype.catch;f.catch!==l&&s(f,"catch",l,{unsafe:!0})}},63707:function(t,r,e){"use strict";var n,i,o,a,u=e(45654),c=e(77717),s=e(99527),f=e(44448),l=e(74199),p=e(28747),h=e(68485),v=e(46150),d=e(5291),y=e(84935),m=e(79373),g=e(67123),x=e(17356),b=e(27909),O=e(14168).set,T=e(3446),E=e(55934),_=e(63577),w=e(22876),N=e(29425),A=e(85833),C=e(48244),R=e(66079),S="Promise",M=C.CONSTRUCTOR,I=C.REJECTION_EVENT,L=C.SUBCLASSING,P=N.getterFor(S),j=N.set,U=A&&A.prototype,k=A,D=U,H=f.TypeError,V=f.document,F=f.process,Y=R.f,X=Y,q=!!(V&&V.createEvent&&f.dispatchEvent),Q="unhandledrejection",Z=function(t){var r;return!!(g(t)&&m(r=t.then))&&r},G=function(t,r){var e,n,i,o=r.value,a=1===r.state,u=a?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{u?(a||(2===r.rejection&&K(r),r.rejection=1),!0===u?e=o:(f&&f.enter(),e=u(o),f&&(f.exit(),i=!0)),e===t.promise?s(new H("Promise-chain cycle")):(n=Z(e))?l(n,e,c,s):c(e)):s(o)}catch(t){f&&!i&&f.exit(),s(t)}},$=function(t,r){t.notified||(t.notified=!0,T(function(){for(var e,n=t.reactions;e=n.get();)G(e,t);t.notified=!1,r&&!t.rejection&&W(t)}))},B=function(t,r,e){var n,i;q?((n=V.createEvent("Event")).promise=r,n.reason=e,n.initEvent(t,!1,!0),f.dispatchEvent(n)):n={promise:r,reason:e},!I&&(i=f["on"+t])?i(n):t===Q&&E("Unhandled promise rejection",e)},W=function(t){l(O,f,function(){var r,e=t.facade,n=t.value;if(z(t)&&(r=_(function(){s?F.emit("unhandledRejection",n,e):B(Q,e,n)}),t.rejection=s||z(t)?2:1,r.error))throw r.value})},z=function(t){return 1!==t.rejection&&!t.parent},K=function(t){l(O,f,function(){var r=t.facade;s?F.emit("rejectionHandled",r):B("rejectionhandled",r,t.value)})},J=function(t,r,e){return function(n){t(r,n,e)}},tt=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=2,$(t,!0))},tr=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw new H("Promise can't be resolved itself");var n=Z(r);n?T(function(){var e={done:!1};try{l(n,r,J(tr,e,t),J(tt,e,t))}catch(r){tt(e,r,t)}}):(t.value=r,t.state=1,$(t,!1))}catch(r){tt({done:!1},r,t)}}};if(M&&(D=(k=function(t){x(this,D),y(t),l(n,this);var r=P(this);try{t(J(tr,r),J(tt,r))}catch(t){tt(r,t)}}).prototype,(n=function(t){j(this,{type:S,done:!1,notified:!1,parent:!1,reactions:new w,rejection:!1,state:0,value:void 0})}).prototype=p(D,"then",function(t,r){var e=P(this),n=Y(b(this,k));return e.parent=!0,n.ok=!m(t)||t,n.fail=m(r)&&r,n.domain=s?F.domain:void 0,0===e.state?e.reactions.add(n):T(function(){G(n,e)}),n.promise}),i=function(){var t=new n,r=P(t);this.promise=t,this.resolve=J(tr,r),this.reject=J(tt,r)},R.f=Y=function(t){return t===k||t===o?new i(t):X(t)},!c&&m(A)&&U!==Object.prototype)){a=U.then,L||p(U,"then",function(t,r){var e=this;return new k(function(t,r){l(a,e,t,r)}).then(t,r)},{unsafe:!0});try{delete U.constructor}catch(t){}h&&h(U,D)}u({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:k}),v(k,S,!1,!0),d(S)},80974:function(t,r,e){"use strict";e(63707),e(3812),e(43739),e(70623),e(86537),e(93622)},70623:function(t,r,e){"use strict";var n=e(45654),i=e(74199),o=e(84935),a=e(66079),u=e(63577),c=e(90485);n({target:"Promise",stat:!0,forced:e(12284)},{race:function(t){var r=this,e=a.f(r),n=e.reject,s=u(function(){var a=o(r.resolve);c(t,function(t){i(a,r,t).then(e.resolve,n)})});return s.error&&n(s.value),e.promise}})},86537:function(t,r,e){"use strict";var n=e(45654),i=e(66079);n({target:"Promise",stat:!0,forced:e(48244).CONSTRUCTOR},{reject:function(t){var r=i.f(this);return(0,r.reject)(t),r.promise}})},93622:function(t,r,e){"use strict";var n=e(45654),i=e(21616),o=e(77717),a=e(85833),u=e(48244).CONSTRUCTOR,c=e(77019),s=i("Promise"),f=o&&!u;n({target:"Promise",stat:!0,forced:o||u},{resolve:function(t){return c(f&&this===s?a:this,t)}})},17139:function(t,r,e){"use strict";var n=e(45654),i=e(91437);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},49415:function(t,r,e){"use strict";var n=e(78421).PROPER,i=e(28747),o=e(55530),a=e(47949),u=e(51170),c=e(80648),s="toString",f=RegExp.prototype,l=f[s],p=u(function(){return"/a/b"!==l.call({source:"a",flags:"b"})}),h=n&&l.name!==s;(p||h)&&i(f,s,function(){var t=o(this);return"/"+a(t.source)+"/"+a(c(t))},{unsafe:!0})},75345:function(t,r,e){"use strict";var n,i=e(45654),o=e(46527),a=e(30969).f,u=e(79720),c=e(47949),s=e(4382),f=e(63547),l=e(25816),p=e(77717),h=o("".slice),v=Math.min,d=l("endsWith");i({target:"String",proto:!0,forced:!(!p&&!d&&(n=a(String.prototype,"endsWith"))&&!n.writable)&&!d},{endsWith:function(t){var r=c(f(this));s(t);var e=arguments.length>1?arguments[1]:void 0,n=r.length,i=void 0===e?n:v(u(e),n),o=c(t);return h(r,i-o.length,i)===o}})},90019:function(t,r,e){"use strict";var n=e(45654),i=e(84883),o=e(4382),a=e(63547),u=e(47949),c=e(25816),s=i("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~s(u(a(this)),u(o(t)),arguments.length>1?arguments[1]:void 0)}})},93936:function(t,r,e){"use strict";var n=e(74199),i=e(56429),o=e(55530),a=e(77914),u=e(79720),c=e(47949),s=e(63547),f=e(83601),l=e(39608),p=e(79135);i("match",function(t,r,e){return[function(r){var e=s(this),i=a(r)?void 0:f(r,t);return i?n(i,r,e):new RegExp(r)[t](c(e))},function(t){var n,i=o(this),a=c(t),s=e(r,i,a);if(s.done)return s.value;if(!i.global)return p(i,a);var f=i.unicode;i.lastIndex=0;for(var h=[],v=0;null!==(n=p(i,a));){var d=c(n[0]);h[v]=d,""===d&&(i.lastIndex=l(a,u(i.lastIndex),f)),v++}return 0===v?null:h}]})},92361:function(t,r,e){"use strict";var n=e(71086),i=e(74199),o=e(84883),a=e(56429),u=e(51170),c=e(55530),s=e(79373),f=e(77914),l=e(43200),p=e(79720),h=e(47949),v=e(63547),d=e(39608),y=e(83601),m=e(65667),g=e(79135),x=e(86743)("replace"),b=Math.max,O=Math.min,T=o([].concat),E=o([].push),_=o("".indexOf),w=o("".slice),N="$0"==="a".replace(/./,"$0"),A=!!/./[x]&&""===/./[x]("a","$0");a("replace",function(t,r,e){var o=A?"$":"$0";return[function(t,e){var n=v(this),o=f(t)?void 0:y(t,x);return o?i(o,t,n,e):i(r,h(n),t,e)},function(t,i){var a=c(this),u=h(t);if("string"==typeof i&&-1===_(i,o)&&-1===_(i,"$<")){var f=e(r,a,u,i);if(f.done)return f.value}var v=s(i);v||(i=h(i));var y=a.global;y&&(S=a.unicode,a.lastIndex=0);for(var x=[];null!==(M=g(a,u))&&(E(x,M),y);)""===h(M[0])&&(a.lastIndex=d(u,p(a.lastIndex),S));for(var N="",A=0,C=0;C<x.length;C++){for(var R,S,M,I,L=h((M=x[C])[0]),P=b(O(l(M.index),u.length),0),j=[],U=1;U<M.length;U++)E(j,void 0===(R=M[U])?R:String(R));var k=M.groups;if(v){var D=T([L],j,P,u);void 0!==k&&E(D,k),I=h(n(i,void 0,D))}else I=m(L,u,P,j,k,i);P>=A&&(N+=w(u,A,P)+I,A=P+L.length)}return N+w(u,A)}]},!!u(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!N||A)},40898:function(t,r,e){"use strict";var n=e(74199),i=e(84883),o=e(56429),a=e(55530),u=e(77914),c=e(63547),s=e(27909),f=e(39608),l=e(79720),p=e(47949),h=e(83601),v=e(79135),d=e(84853),y=e(51170),m=d.UNSUPPORTED_Y,g=Math.min,x=i([].push),b=i("".slice),O=!y(function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var e="ab".split(t);return 2!==e.length||"a"!==e[0]||"b"!==e[1]}),T="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;o("split",function(t,r,e){var i="0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n(r,this,t,e)}:r;return[function(r,e){var o=c(this),a=u(r)?void 0:h(r,t);return a?n(a,r,o,e):n(i,p(o),r,e)},function(t,n){var o=a(this),u=p(t);if(!T){var c=e(i,o,u,n,i!==r);if(c.done)return c.value}var h=s(o,RegExp),d=o.unicode,y=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(m?"g":"y"),O=new h(m?"^(?:"+o.source+")":o,y),E=void 0===n?4294967295:n>>>0;if(0===E)return[];if(0===u.length)return null===v(O,u)?[u]:[];for(var _=0,w=0,N=[];w<u.length;){O.lastIndex=m?0:w;var A,C=v(O,m?b(u,w):u);if(null===C||(A=g(l(O.lastIndex+(m?w:0)),u.length))===_)w=f(u,w,d);else{if(x(N,b(u,_,w)),N.length===E)return N;for(var R=1;R<=C.length-1;R++)if(x(N,C[R]),N.length===E)return N;w=_=A}}return x(N,b(u,_)),N}]},T||!O,m)},129:function(t,r,e){"use strict";var n,i=e(45654),o=e(46527),a=e(30969).f,u=e(79720),c=e(47949),s=e(4382),f=e(63547),l=e(25816),p=e(77717),h=o("".slice),v=Math.min,d=l("startsWith");i({target:"String",proto:!0,forced:!(!p&&!d&&(n=a(String.prototype,"startsWith"))&&!n.writable)&&!d},{startsWith:function(t){var r=c(f(this));s(t);var e=u(v(arguments.length>1?arguments[1]:void 0,r.length)),n=c(t);return h(r,e,e+n.length)===n}})},87547:function(t,r,e){"use strict";var n=e(45654),i=e(26031).trim;n({target:"String",proto:!0,forced:e(21014)("trim")},{trim:function(){return i(this)}})},50591:function(t,r,e){"use strict";var n=e(44448),i=e(46634),o=e(30725),a=e(3615),u=e(16696),c=e(46150),s=e(86743)("iterator"),f=a.values,l=function(t,r){if(t){if(t[s]!==f)try{u(t,s,f)}catch(r){t[s]=f}if(c(t,r,!0),i[r]){for(var e in a)if(t[e]!==a[e])try{u(t,e,a[e])}catch(r){t[e]=a[e]}}}};for(var p in i)l(n[p]&&n[p].prototype,p);l(o,"DOMTokenList")},7652:function(t,r,e){"use strict";function n(t,r,e,n,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,i)}function i(t){return function(){var r=this,e=arguments;return new Promise(function(i,o){var a=t.apply(r,e);function u(t){n(a,i,o,u,c,"next",t)}function c(t){n(a,i,o,u,c,"throw",t)}u(void 0)})}}e.d(r,{Z:function(){return i}})},53066:function(t,r,e){"use strict";e.d(r,{Z:function(){return i}});var n=e(8430);function i(t,r,e){var i;return(i=function(t,r){if("object"!=(0,n.Z)(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=(0,n.Z)(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(r,"string"),(r="symbol"==(0,n.Z)(i)?i:i+"")in t)?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}},82561:function(t,r,e){"use strict";e.d(r,{OU:function(){return x}});/*! *****************************************************************************
40
- Copyright (c) Microsoft Corporation.
41
-
42
- Permission to use, copy, modify, and/or distribute this software for any
43
- purpose with or without fee is hereby granted.
44
-
45
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
46
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
47
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
48
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
49
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
50
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
51
- PERFORMANCE OF THIS SOFTWARE.
52
- ***************************************************************************** */var n=function(t,r){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])})(t,r)};function i(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}function o(t,r){var e=t[0],n=t[1];return[e*Math.cos(r)-n*Math.sin(r),e*Math.sin(r)+n*Math.cos(r)]}function a(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=0;e<t.length;e++)if("number"!=typeof t[e])throw Error("assertNumbers arguments["+e+"] is not a number. "+typeof t[e]+" == typeof "+t[e]);return!0}var u=Math.PI;function c(t,r,e){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var n=t.rX,i=t.rY,a=t.x,c=t.y;n=Math.abs(t.rX),i=Math.abs(t.rY);var s=o([(r-a)/2,(e-c)/2],-t.xRot/180*u),f=s[0],l=s[1],p=Math.pow(f,2)/Math.pow(n,2)+Math.pow(l,2)/Math.pow(i,2);1<p&&(n*=Math.sqrt(p),i*=Math.sqrt(p)),t.rX=n,t.rY=i;var h=Math.pow(n,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(f,2),v=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(i,2)-h)/h)),d=n*l/i*v,y=-i*f/n*v,m=o([d,y],t.xRot/180*u);t.cX=m[0]+(r+a)/2,t.cY=m[1]+(e+c)/2,t.phi1=Math.atan2((l-y)/i,(f-d)/n),t.phi2=Math.atan2((-l-y)/i,(-f-d)/n),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*u),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*u),t.phi1*=180/u,t.phi2*=180/u}function s(t,r,e){a(t,r,e);var n=t*t+r*r-e*e;if(0>n)return[];if(0===n)return[[t*e/(t*t+r*r),r*e/(t*t+r*r)]];var i=Math.sqrt(n);return[[(t*e+r*i)/(t*t+r*r),(r*e-t*i)/(t*t+r*r)],[(t*e-r*i)/(t*t+r*r),(r*e+t*i)/(t*t+r*r)]]}var f,l=Math.PI/180;function p(t,r,e,n){return t+Math.cos(n/180*u)*r+Math.sin(n/180*u)*e}function h(t,r,e,n){var i=r-t,o=e-r,a=3*i+3*(n-e)-6*o,u=6*(o-i),c=3*i;return 1e-6>Math.abs(a)?[-c/u]:function(t,r,e){void 0===e&&(e=1e-6);var n=t*t/4-r;if(n<-e)return[];if(n<=e)return[-t/2];var i=Math.sqrt(n);return[-t/2-i,-t/2+i]}(u/a,c/a,1e-6)}function v(t,r,e,n,i){var o=1-i;return t*(o*o*o)+r*(3*o*o*i)+e*(3*o*i*i)+n*(i*i*i)}!function(t){function r(){return i(function(t,r,e){return t.relative&&(void 0!==t.x1&&(t.x1+=r),void 0!==t.y1&&(t.y1+=e),void 0!==t.x2&&(t.x2+=r),void 0!==t.y2&&(t.y2+=e),void 0!==t.x&&(t.x+=r),void 0!==t.y&&(t.y+=e),t.relative=!1),t})}function e(){var t=NaN,r=NaN,e=NaN,n=NaN;return i(function(i,o,a){return i.type&x.SMOOTH_CURVE_TO&&(i.type=x.CURVE_TO,t=isNaN(t)?o:t,r=isNaN(r)?a:r,i.x1=i.relative?o-t:2*o-t,i.y1=i.relative?a-r:2*a-r),i.type&x.CURVE_TO?(t=i.relative?o+i.x2:i.x2,r=i.relative?a+i.y2:i.y2):(t=NaN,r=NaN),i.type&x.SMOOTH_QUAD_TO&&(i.type=x.QUAD_TO,e=isNaN(e)?o:e,n=isNaN(n)?a:n,i.x1=i.relative?o-e:2*o-e,i.y1=i.relative?a-n:2*a-n),i.type&x.QUAD_TO?(e=i.relative?o+i.x1:i.x1,n=i.relative?a+i.y1:i.y1):(e=NaN,n=NaN),i})}function n(){var t=NaN,r=NaN;return i(function(e,n,i){if(e.type&x.SMOOTH_QUAD_TO&&(e.type=x.QUAD_TO,t=isNaN(t)?n:t,r=isNaN(r)?i:r,e.x1=e.relative?n-t:2*n-t,e.y1=e.relative?i-r:2*i-r),e.type&x.QUAD_TO){t=e.relative?n+e.x1:e.x1,r=e.relative?i+e.y1:e.y1;var o=e.x1,a=e.y1;e.type=x.CURVE_TO,e.x1=((e.relative?0:n)+2*o)/3,e.y1=((e.relative?0:i)+2*a)/3,e.x2=(e.x+2*o)/3,e.y2=(e.y+2*a)/3}else t=NaN,r=NaN;return e})}function i(t){var r=0,e=0,n=NaN,i=NaN;return function(o){if(isNaN(n)&&!(o.type&x.MOVE_TO))throw Error("path must start with moveto");var a=t(o,r,e,n,i);return o.type&x.CLOSE_PATH&&(r=n,e=i),void 0!==o.x&&(r=o.relative?r+o.x:o.x),void 0!==o.y&&(e=o.relative?e+o.y:o.y),o.type&x.MOVE_TO&&(n=r,i=e),a}}function u(t,r,e,n,o,u){return a(t,r,e,n,o,u),i(function(i,a,c,s){var f=i.x1,l=i.x2,p=i.relative&&!isNaN(s),h=void 0!==i.x?i.x:p?0:a,v=void 0!==i.y?i.y:p?0:c;i.type&x.HORIZ_LINE_TO&&0!==r&&(i.type=x.LINE_TO,i.y=i.relative?0:c),i.type&x.VERT_LINE_TO&&0!==e&&(i.type=x.LINE_TO,i.x=i.relative?0:a),void 0!==i.x&&(i.x=i.x*t+v*e+(p?0:o)),void 0!==i.y&&(i.y=h*r+i.y*n+(p?0:u)),void 0!==i.x1&&(i.x1=i.x1*t+i.y1*e+(p?0:o)),void 0!==i.y1&&(i.y1=f*r+i.y1*n+(p?0:u)),void 0!==i.x2&&(i.x2=i.x2*t+i.y2*e+(p?0:o)),void 0!==i.y2&&(i.y2=l*r+i.y2*n+(p?0:u));var d=t*n-r*e;if(void 0!==i.xRot&&(1!==t||0!==r||0!==e||1!==n)){if(0===d)delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag,i.type=x.LINE_TO;else{var y,m,g=i.xRot*Math.PI/180,b=Math.sin(g),O=Math.cos(g),T=1/((y=i.rX)*y),E=1/((m=i.rY)*m),_=O*O*T+b*b*E,w=2*b*O*(T-E),N=b*b*T+O*O*E,A=_*n*n-w*r*n+N*r*r,C=w*(t*n+r*e)-2*(_*e*n+N*t*r),R=_*e*e-w*t*e+N*t*t,S=(Math.atan2(C,A-R)+Math.PI)%Math.PI/2,M=Math.sin(S),I=Math.cos(S);i.rX=Math.abs(d)/Math.sqrt(A*(I*I)+C*M*I+R*(M*M)),i.rY=Math.abs(d)/Math.sqrt(A*(M*M)-C*M*I+R*(I*I)),i.xRot=180*S/Math.PI}}return void 0!==i.sweepFlag&&0>d&&(i.sweepFlag=+!i.sweepFlag),i})}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),a(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return i(function(t,r,e){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=e),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=e),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=e),t.relative=!0),t})},t.NORMALIZE_HVZ=function(t,r,e){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===e&&(e=!0),i(function(n,i,o,a,u){if(isNaN(a)&&!(n.type&x.MOVE_TO))throw Error("path must start with moveto");return r&&n.type&x.HORIZ_LINE_TO&&(n.type=x.LINE_TO,n.y=n.relative?0:o),e&&n.type&x.VERT_LINE_TO&&(n.type=x.LINE_TO,n.x=n.relative?0:i),t&&n.type&x.CLOSE_PATH&&(n.type=x.LINE_TO,n.x=n.relative?a-i:a,n.y=n.relative?u-o:u),n.type&x.ARC&&(0===n.rX||0===n.rY)&&(n.type=x.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n})},t.NORMALIZE_ST=e,t.QT_TO_C=n,t.INFO=i,t.SANITIZE=function(t){void 0===t&&(t=0),a(t);var r=NaN,e=NaN,n=NaN,o=NaN;return i(function(i,a,u,c,s){var f=Math.abs,l=!1,p=0,h=0;if(i.type&x.SMOOTH_CURVE_TO&&(p=isNaN(r)?0:a-r,h=isNaN(e)?0:u-e),i.type&(x.CURVE_TO|x.SMOOTH_CURVE_TO)?(r=i.relative?a+i.x2:i.x2,e=i.relative?u+i.y2:i.y2):(r=NaN,e=NaN),i.type&x.SMOOTH_QUAD_TO?(n=isNaN(n)?a:2*a-n,o=isNaN(o)?u:2*u-o):i.type&x.QUAD_TO?(n=i.relative?a+i.x1:i.x1,o=i.relative?u+i.y1:i.y2):(n=NaN,o=NaN),i.type&x.LINE_COMMANDS||i.type&x.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&x.CURVE_TO||i.type&x.SMOOTH_CURVE_TO||i.type&x.QUAD_TO||i.type&x.SMOOTH_QUAD_TO){var v=void 0===i.x?0:i.relative?i.x:i.x-a,d=void 0===i.y?0:i.relative?i.y:i.y-u;p=isNaN(n)?void 0===i.x1?p:i.relative?i.x:i.x1-a:n-a,h=isNaN(o)?void 0===i.y1?h:i.relative?i.y:i.y1-u:o-u;var y=void 0===i.x2?0:i.relative?i.x:i.x2-a,m=void 0===i.y2?0:i.relative?i.y:i.y2-u;f(v)<=t&&f(d)<=t&&f(p)<=t&&f(h)<=t&&f(y)<=t&&f(m)<=t&&(l=!0)}return i.type&x.CLOSE_PATH&&f(a-c)<=t&&f(u-s)<=t&&(l=!0),l?[]:i})},t.MATRIX=u,t.ROTATE=function(t,r,e){void 0===r&&(r=0),void 0===e&&(e=0),a(t,r,e);var n=Math.sin(t),i=Math.cos(t);return u(i,n,-n,i,r-r*i+e*n,e-r*n-e*i)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),a(t,r),u(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),a(t,r),u(t,0,0,r,0,0)},t.SKEW_X=function(t){return a(t),u(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return a(t),u(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),a(t),u(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),a(t),u(1,0,0,-1,0,t)},t.A_TO_C=function(){return i(function(t,r,e){return x.ARC===t.type?function(t,r,e){var n,i,a,u;t.cX||c(t,r,e);for(var s=Math.min(t.phi1,t.phi2),f=Math.max(t.phi1,t.phi2)-s,p=Math.ceil(f/90),h=Array(p),v=r,d=e,y=0;y<p;y++){var m,g,b,O,T,E,_=(m=t.phi1,g=t.phi2,(1-(b=y/p))*m+b*g),w=(O=t.phi1,T=t.phi2,(1-(E=(y+1)/p))*O+E*T),N=4/3*Math.tan((w-_)*l/4),A=[Math.cos(_*l)-N*Math.sin(_*l),Math.sin(_*l)+N*Math.cos(_*l)],C=A[0],R=A[1],S=[Math.cos(w*l),Math.sin(w*l)],M=S[0],I=S[1],L=[M+N*Math.sin(w*l),I-N*Math.cos(w*l)],P=L[0],j=L[1];h[y]={relative:t.relative,type:x.CURVE_TO};var U=function(r,e){var n=o([r*t.rX,e*t.rY],t.xRot),i=n[0],a=n[1];return[t.cX+i,t.cY+a]};n=U(C,R),h[y].x1=n[0],h[y].y1=n[1],i=U(P,j),h[y].x2=i[0],h[y].y2=i[1],a=U(M,I),h[y].x=a[0],h[y].y=a[1],t.relative&&(h[y].x1-=v,h[y].y1-=d,h[y].x2-=v,h[y].y2-=d,h[y].x-=v,h[y].y-=d),v=(u=[h[y].x,h[y].y])[0],d=u[1]}return h}(t,t.relative?0:r,t.relative?0:e):t})},t.ANNOTATE_ARCS=function(){return i(function(t,r,e){return t.relative&&(r=0,e=0),x.ARC===t.type&&c(t,r,e),t})},t.CLONE=function(){return function(t){var r={};for(var e in t)r[e]=t[e];return r}},t.CALCULATE_BOUNDS=function(){var t=function(t){var r={};for(var e in t)r[e]=t[e];return r},o=r(),a=n(),u=e(),f=i(function(r,e,n){var i=u(a(o(t(r))));function l(t){t>f.maxX&&(f.maxX=t),t<f.minX&&(f.minX=t)}function d(t){t>f.maxY&&(f.maxY=t),t<f.minY&&(f.minY=t)}if(i.type&x.DRAWING_COMMANDS&&(l(e),d(n)),i.type&x.HORIZ_LINE_TO&&l(i.x),i.type&x.VERT_LINE_TO&&d(i.y),i.type&x.LINE_TO&&(l(i.x),d(i.y)),i.type&x.CURVE_TO){l(i.x),d(i.y);for(var y=0,m=h(e,i.x1,i.x2,i.x);y<m.length;y++)0<(O=m[y])&&1>O&&l(v(e,i.x1,i.x2,i.x,O));for(var g=0,b=h(n,i.y1,i.y2,i.y);g<b.length;g++)0<(O=b[g])&&1>O&&d(v(n,i.y1,i.y2,i.y,O))}if(i.type&x.ARC){l(i.x),d(i.y),c(i,e,n);for(var O,T=i.xRot/180*Math.PI,E=Math.cos(T)*i.rX,_=Math.sin(T)*i.rX,w=-Math.sin(T)*i.rY,N=Math.cos(T)*i.rY,A=i.phi1<i.phi2?[i.phi1,i.phi2]:-180>i.phi2?[i.phi2+360,i.phi1+360]:[i.phi2,i.phi1],C=A[0],R=A[1],S=function(t){var r=t[0],e=180*Math.atan2(t[1],r)/Math.PI;return e<C?e+360:e},M=0,I=s(w,-E,0).map(S);M<I.length;M++)(O=I[M])>C&&O<R&&l(p(i.cX,E,w,O));for(var L=0,P=s(N,-_,0).map(S);L<P.length;L++)(O=P[L])>C&&O<R&&d(p(i.cY,_,N,O))}return r});return f.minX=1/0,f.maxX=-1/0,f.minY=1/0,f.maxY=-1/0,f}}(f||(f={}));var d,y=function(){function t(){}return t.prototype.round=function(t){return this.transform(f.ROUND(t))},t.prototype.toAbs=function(){return this.transform(f.TO_ABS())},t.prototype.toRel=function(){return this.transform(f.TO_REL())},t.prototype.normalizeHVZ=function(t,r,e){return this.transform(f.NORMALIZE_HVZ(t,r,e))},t.prototype.normalizeST=function(){return this.transform(f.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(f.QT_TO_C())},t.prototype.aToC=function(){return this.transform(f.A_TO_C())},t.prototype.sanitize=function(t){return this.transform(f.SANITIZE(t))},t.prototype.translate=function(t,r){return this.transform(f.TRANSLATE(t,r))},t.prototype.scale=function(t,r){return this.transform(f.SCALE(t,r))},t.prototype.rotate=function(t,r,e){return this.transform(f.ROTATE(t,r,e))},t.prototype.matrix=function(t,r,e,n,i,o){return this.transform(f.MATRIX(t,r,e,n,i,o))},t.prototype.skewX=function(t){return this.transform(f.SKEW_X(t))},t.prototype.skewY=function(t){return this.transform(f.SKEW_Y(t))},t.prototype.xSymmetry=function(t){return this.transform(f.X_AXIS_SYMMETRY(t))},t.prototype.ySymmetry=function(t){return this.transform(f.Y_AXIS_SYMMETRY(t))},t.prototype.annotateArcs=function(){return this.transform(f.ANNOTATE_ARCS())},t}(),m=function(t){return 48<=t.charCodeAt(0)&&57>=t.charCodeAt(0)},g=function(t){function r(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return i(r,t),r.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw SyntaxError("Unterminated command at the path end.");return t},r.prototype.parse=function(t,r){var e=this;void 0===r&&(r=[]);for(var n=function(t){r.push(t),e.curArgs.length=0,e.canParseCommandOrComma=!0},i=0;i<t.length;i++){var o=t[i],a=!(this.curCommandType!==x.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),u=m(o)&&("0"===this.curNumber&&"0"===o||a);if(!m(o)||u){if("e"!==o&&"E"!==o){if("-"!==o&&"+"!==o||!this.curNumberHasExp||this.curNumberHasExpDigits){if("."!==o||this.curNumberHasExp||this.curNumberHasDecimal||a){if(this.curNumber&&-1!==this.curCommandType){var c=Number(this.curNumber);if(isNaN(c))throw SyntaxError("Invalid number ending at "+i);if(this.curCommandType===x.ARC){if(0===this.curArgs.length||1===this.curArgs.length){if(0>c)throw SyntaxError('Expected positive number, got "'+c+'" at index "'+i+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"')}this.curArgs.push(c),this.curArgs.length===b[this.curCommandType]&&(x.HORIZ_LINE_TO===this.curCommandType?n({type:x.HORIZ_LINE_TO,relative:this.curCommandRelative,x:c}):x.VERT_LINE_TO===this.curCommandType?n({type:x.VERT_LINE_TO,relative:this.curCommandRelative,y:c}):this.curCommandType===x.MOVE_TO||this.curCommandType===x.LINE_TO||this.curCommandType===x.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),x.MOVE_TO===this.curCommandType&&(this.curCommandType=x.LINE_TO)):this.curCommandType===x.CURVE_TO?n({type:x.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===x.SMOOTH_CURVE_TO?n({type:x.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===x.QUAD_TO?n({type:x.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===x.ARC&&n({type:x.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!(" "===o||" "===o||"\r"===o||"\n"===o)){if(","===o&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==o&&"-"!==o&&"."!==o){if(u)this.curNumber=o,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw SyntaxError('Unexpected character "'+o+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==o&&"Z"!==o){if("h"===o||"H"===o)this.curCommandType=x.HORIZ_LINE_TO,this.curCommandRelative="h"===o;else if("v"===o||"V"===o)this.curCommandType=x.VERT_LINE_TO,this.curCommandRelative="v"===o;else if("m"===o||"M"===o)this.curCommandType=x.MOVE_TO,this.curCommandRelative="m"===o;else if("l"===o||"L"===o)this.curCommandType=x.LINE_TO,this.curCommandRelative="l"===o;else if("c"===o||"C"===o)this.curCommandType=x.CURVE_TO,this.curCommandRelative="c"===o;else if("s"===o||"S"===o)this.curCommandType=x.SMOOTH_CURVE_TO,this.curCommandRelative="s"===o;else if("q"===o||"Q"===o)this.curCommandType=x.QUAD_TO,this.curCommandRelative="q"===o;else if("t"===o||"T"===o)this.curCommandType=x.SMOOTH_QUAD_TO,this.curCommandRelative="t"===o;else{if("a"!==o&&"A"!==o)throw SyntaxError('Unexpected character "'+o+'" at index '+i+".");this.curCommandType=x.ARC,this.curCommandRelative="a"===o}}else r.push({type:x.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}}else this.curNumber=o,this.curNumberHasDecimal="."===o}}else this.curNumber+=o,this.curNumberHasDecimal=!0}else this.curNumber+=o}else this.curNumber+=o,this.curNumberHasExp=!0}else this.curNumber+=o,this.curNumberHasExpDigits=this.curNumberHasExp}return r},r.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,e){void 0===e&&(e=[]);for(var n=0,i=Object.getPrototypeOf(this).parse.call(this,r);n<i.length;n++){var o=t(i[n]);Array.isArray(o)?e.push.apply(e,o):e.push(o)}return e}}})},r}(y),x=function(t){function r(e){var n=t.call(this)||this;return n.commands="string"==typeof e?r.parse(e):e,n}return i(r,t),r.prototype.encode=function(){return r.encode(this.commands)},r.prototype.getBounds=function(){var t=f.CALCULATE_BOUNDS();return this.transform(t),t},r.prototype.transform=function(t){for(var r=[],e=0,n=this.commands;e<n.length;e++){var i=t(n[e]);Array.isArray(i)?r.push.apply(r,i):r.push(i)}return this.commands=r,this},r.encode=function(t){return function(t){var r="";Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var n=t[e];if(n.type===x.CLOSE_PATH)r+="z";else if(n.type===x.HORIZ_LINE_TO)r+=(n.relative?"h":"H")+n.x;else if(n.type===x.VERT_LINE_TO)r+=(n.relative?"v":"V")+n.y;else if(n.type===x.MOVE_TO)r+=(n.relative?"m":"M")+n.x+" "+n.y;else if(n.type===x.LINE_TO)r+=(n.relative?"l":"L")+n.x+" "+n.y;else if(n.type===x.CURVE_TO)r+=(n.relative?"c":"C")+n.x1+" "+n.y1+" "+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===x.SMOOTH_CURVE_TO)r+=(n.relative?"s":"S")+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===x.QUAD_TO)r+=(n.relative?"q":"Q")+n.x1+" "+n.y1+" "+n.x+" "+n.y;else if(n.type===x.SMOOTH_QUAD_TO)r+=(n.relative?"t":"T")+n.x+" "+n.y;else{if(n.type!==x.ARC)throw Error('Unexpected command type "'+n.type+'" at index '+e+".");r+=(n.relative?"a":"A")+n.rX+" "+n.rY+" "+n.xRot+" "+ +n.lArcFlag+" "+ +n.sweepFlag+" "+n.x+" "+n.y}}return r}(t)},r.parse=function(t){var r=new g,e=[];return r.parse(t,e),r.finish(e),e},r.CLOSE_PATH=1,r.MOVE_TO=2,r.HORIZ_LINE_TO=4,r.VERT_LINE_TO=8,r.LINE_TO=16,r.CURVE_TO=32,r.SMOOTH_CURVE_TO=64,r.QUAD_TO=128,r.SMOOTH_QUAD_TO=256,r.ARC=512,r.LINE_COMMANDS=r.LINE_TO|r.HORIZ_LINE_TO|r.VERT_LINE_TO,r.DRAWING_COMMANDS=r.HORIZ_LINE_TO|r.VERT_LINE_TO|r.LINE_TO|r.CURVE_TO|r.SMOOTH_CURVE_TO|r.QUAD_TO|r.SMOOTH_QUAD_TO|r.ARC,r}(y),b=((d={})[x.MOVE_TO]=2,d[x.LINE_TO]=2,d[x.HORIZ_LINE_TO]=1,d[x.VERT_LINE_TO]=1,d[x.CLOSE_PATH]=0,d[x.QUAD_TO]=4,d[x.SMOOTH_QUAD_TO]=2,d[x.CURVE_TO]=6,d[x.SMOOTH_CURVE_TO]=4,d[x.ARC]=7,d)}}]);