@jesec/flood 0.0.0-master.e66b6b6 → 0.0.0-master.e69eca8

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 (322) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/assets/index.html +1 -1
  3. package/dist/assets/static/css/{185.bc338a685eec2e79b3a6.css → 118.bc338a685eec2e79b3a6.css} +0 -0
  4. package/dist/assets/static/css/main.cc7cdab8b2d46d0bb950.css +1 -0
  5. package/dist/assets/static/js/118.c689ccfd.chunk.js +1 -0
  6. package/dist/assets/static/js/183.a691ac57.chunk.js +1 -0
  7. package/dist/assets/static/js/296.e4c2cc36.chunk.js +1 -0
  8. package/dist/assets/static/js/90.6b060553.chunk.js +1 -0
  9. package/dist/assets/static/js/about.066630d4.chunk.js +1 -0
  10. package/dist/assets/static/js/flag0.e30133a9.chunk.js +1 -0
  11. package/dist/assets/static/js/flag1.8a6ca159.chunk.js +1 -0
  12. package/dist/assets/static/js/flag4.dd2ddc49.chunk.js +1 -0
  13. package/dist/assets/static/js/flag8.81d490c4.chunk.js +1 -0
  14. package/dist/assets/static/js/i18n1.c8f7738f.chunk.js +1 -0
  15. package/dist/assets/static/js/i18n10.adef5404.chunk.js +1 -0
  16. package/dist/assets/static/js/{i18n12.3e2fd780.chunk.js → i18n12.4d985810.chunk.js} +1 -1
  17. package/dist/assets/static/js/i18n13.9bf4b5fb.chunk.js +1 -0
  18. package/dist/assets/static/js/i18n14.bf1a02ab.chunk.js +1 -0
  19. package/dist/assets/static/js/{i18n15.c0bdc55a.chunk.js → i18n15.d50322a6.chunk.js} +1 -1
  20. package/dist/assets/static/js/{i18n16.b6410859.chunk.js → i18n16.46a74565.chunk.js} +0 -0
  21. package/dist/assets/static/js/i18n17.8674e5b2.chunk.js +1 -0
  22. package/dist/assets/static/js/i18n18.90827d52.chunk.js +1 -0
  23. package/dist/assets/static/js/{i18n19.5b80c024.chunk.js → i18n19.e6354407.chunk.js} +0 -0
  24. package/dist/assets/static/js/{i18n20.aefcd4d9.chunk.js → i18n20.44d80a64.chunk.js} +0 -0
  25. package/dist/assets/static/js/i18n21.a19f244b.chunk.js +1 -0
  26. package/dist/assets/static/js/{i18n23.5ffc6722.chunk.js → i18n23.986abf0f.chunk.js} +0 -0
  27. package/dist/assets/static/js/{i18n25.1413f7a6.chunk.js → i18n25.19d1a68c.chunk.js} +0 -0
  28. package/dist/assets/static/js/i18n27.2130486a.chunk.js +1 -0
  29. package/dist/assets/static/js/{i18n28.14eece75.chunk.js → i18n28.a0b98732.chunk.js} +0 -0
  30. package/dist/assets/static/js/i18n3.51e1856d.chunk.js +1 -0
  31. package/dist/assets/static/js/{i18n4.0aeea795.chunk.js → i18n4.8aa41b5e.chunk.js} +0 -0
  32. package/dist/assets/static/js/i18n5.bb561158.chunk.js +1 -0
  33. package/dist/assets/static/js/i18n8.7aa357b8.chunk.js +1 -0
  34. package/dist/assets/static/js/i18n9.d8c2a3c6.chunk.js +1 -0
  35. package/dist/assets/static/js/main.f1e803bd.js +1 -0
  36. package/dist/assets/static/media/ad.1b24595d.png +0 -0
  37. package/dist/assets/static/media/ae.4dd8f55e.png +0 -0
  38. package/dist/assets/static/media/af.4ce660eb.png +0 -0
  39. package/dist/assets/static/media/ag.fd9409e4.png +0 -0
  40. package/dist/assets/static/media/al.a297aacf.png +0 -0
  41. package/dist/assets/static/media/am.c84ee0cf.png +0 -0
  42. package/dist/assets/static/media/ao.a7c9214e.png +0 -0
  43. package/dist/assets/static/media/ar.7e57ef92.png +0 -0
  44. package/dist/assets/static/media/at.5aa9728a.png +0 -0
  45. package/dist/assets/static/media/au.155b51d8.png +0 -0
  46. package/dist/assets/static/media/az.63afef5b.png +0 -0
  47. package/dist/assets/static/media/ba.5ce8f273.png +0 -0
  48. package/dist/assets/static/media/bb.f369fc62.png +0 -0
  49. package/dist/assets/static/media/bd.516278fc.png +0 -0
  50. package/dist/assets/static/media/be.08ec4a8d.png +0 -0
  51. package/dist/assets/static/media/bf.50bfcb31.png +0 -0
  52. package/dist/assets/static/media/bg.d9346b96.png +0 -0
  53. package/dist/assets/static/media/bh.f06d5914.png +0 -0
  54. package/dist/assets/static/media/bi.4923e3a3.png +0 -0
  55. package/dist/assets/static/media/bj.019fa79b.png +0 -0
  56. package/dist/assets/static/media/bn.077671e2.png +0 -0
  57. package/dist/assets/static/media/bo.8fb15fc6.png +0 -0
  58. package/dist/assets/static/media/br.ec051f0c.png +0 -0
  59. package/dist/assets/static/media/bs.a74a126f.png +0 -0
  60. package/dist/assets/static/media/bt.4217b804.png +0 -0
  61. package/dist/assets/static/media/bw.21fe1567.png +0 -0
  62. package/dist/assets/static/media/by.d247fe16.png +0 -0
  63. package/dist/assets/static/media/bz.98ec59f6.png +0 -0
  64. package/dist/assets/static/media/ca.25743e11.png +0 -0
  65. package/dist/assets/static/media/cd.a5bfda53.png +0 -0
  66. package/dist/assets/static/media/cf.de7d5d92.png +0 -0
  67. package/dist/assets/static/media/cg.a47b626b.png +0 -0
  68. package/dist/assets/static/media/ch.445f47a1.png +0 -0
  69. package/dist/assets/static/media/ci.a6009c5b.png +0 -0
  70. package/dist/assets/static/media/cl.de1d715e.png +0 -0
  71. package/dist/assets/static/media/cm.3ce8a86a.png +0 -0
  72. package/dist/assets/static/media/cn.e6a26073.png +0 -0
  73. package/dist/assets/static/media/co.e9244faa.png +0 -0
  74. package/dist/assets/static/media/cr.c895e035.png +0 -0
  75. package/dist/assets/static/media/cu.e486c055.png +0 -0
  76. package/dist/assets/static/media/cv.a9585acf.png +0 -0
  77. package/dist/assets/static/media/cw.df13039d.png +0 -0
  78. package/dist/assets/static/media/cy.b31f43a9.png +0 -0
  79. package/dist/assets/static/media/cz.8ec5948b.png +0 -0
  80. package/dist/assets/static/media/de.d12f391a.png +0 -0
  81. package/dist/assets/static/media/dj.154c3580.png +0 -0
  82. package/dist/assets/static/media/dk.da382fe2.png +0 -0
  83. package/dist/assets/static/media/dm.f452e6cd.png +0 -0
  84. package/dist/assets/static/media/do.c6bd7637.png +0 -0
  85. package/dist/assets/static/media/dz.672a69c0.png +0 -0
  86. package/dist/assets/static/media/ec.349d9bd7.png +0 -0
  87. package/dist/assets/static/media/ee.2396205f.png +0 -0
  88. package/dist/assets/static/media/eg.ccbf3f45.png +0 -0
  89. package/dist/assets/static/media/eh.af65674a.png +0 -0
  90. package/dist/assets/static/media/er.21afb638.png +0 -0
  91. package/dist/assets/static/media/es.2a6eaee4.png +0 -0
  92. package/dist/assets/static/media/et.8beb65c8.png +0 -0
  93. package/dist/assets/static/media/fi.331f70fd.png +0 -0
  94. package/dist/assets/static/media/fj.7724d800.png +0 -0
  95. package/dist/assets/static/media/fm.eeaf71e9.png +0 -0
  96. package/dist/assets/static/media/fr.5d5ab008.png +0 -0
  97. package/dist/assets/static/media/ga.77ed474c.png +0 -0
  98. package/dist/assets/static/media/gb.e00065bf.png +0 -0
  99. package/dist/assets/static/media/gd.b4522267.png +0 -0
  100. package/dist/assets/static/media/ge.91a7654d.png +0 -0
  101. package/dist/assets/static/media/gh.4759f92f.png +0 -0
  102. package/dist/assets/static/media/gm.81cd9f75.png +0 -0
  103. package/dist/assets/static/media/gn.9f3d376e.png +0 -0
  104. package/dist/assets/static/media/gq.e8ad58be.png +0 -0
  105. package/dist/assets/static/media/gr.26f3ac0b.png +0 -0
  106. package/dist/assets/static/media/gt.9d81c52e.png +0 -0
  107. package/dist/assets/static/media/gw.dc906982.png +0 -0
  108. package/dist/assets/static/media/gy.a4f62b6c.png +0 -0
  109. package/dist/assets/static/media/hk.56555c3f.png +0 -0
  110. package/dist/assets/static/media/hn.64ee6aad.png +0 -0
  111. package/dist/assets/static/media/hr.93ebecd3.png +0 -0
  112. package/dist/assets/static/media/ht.42ca1596.png +0 -0
  113. package/dist/assets/static/media/hu.bb30f05d.png +0 -0
  114. package/dist/assets/static/media/id.2cb49f2d.png +0 -0
  115. package/dist/assets/static/media/ie.b4dd1f19.png +0 -0
  116. package/dist/assets/static/media/il.cd1d1faf.png +0 -0
  117. package/dist/assets/static/media/in.2df03847.png +0 -0
  118. package/dist/assets/static/media/iq.a9b670ab.png +0 -0
  119. package/dist/assets/static/media/ir.9a3de085.png +0 -0
  120. package/dist/assets/static/media/is.d88f4fc9.png +0 -0
  121. package/dist/assets/static/media/it.b73713e3.png +0 -0
  122. package/dist/assets/static/media/je.0353f56a.png +0 -0
  123. package/dist/assets/static/media/jm.20330ef4.png +0 -0
  124. package/dist/assets/static/media/jo.eb66f1d1.png +0 -0
  125. package/dist/assets/static/media/jp.63e382ae.png +0 -0
  126. package/dist/assets/static/media/ke.ab2e43b8.png +0 -0
  127. package/dist/assets/static/media/kg.2c47c2af.png +0 -0
  128. package/dist/assets/static/media/kh.4732c810.png +0 -0
  129. package/dist/assets/static/media/ki.5fba09fd.png +0 -0
  130. package/dist/assets/static/media/km.7bbed3e9.png +0 -0
  131. package/dist/assets/static/media/kn.a9595a16.png +0 -0
  132. package/dist/assets/static/media/kp.8a4dc30a.png +0 -0
  133. package/dist/assets/static/media/kr.5273be1d.png +0 -0
  134. package/dist/assets/static/media/ks.99f78645.png +0 -0
  135. package/dist/assets/static/media/kw.af3521bc.png +0 -0
  136. package/dist/assets/static/media/kz.ea47ef79.png +0 -0
  137. package/dist/assets/static/media/la.78a598d7.png +0 -0
  138. package/dist/assets/static/media/lb.7a7c15a9.png +0 -0
  139. package/dist/assets/static/media/lc.6083a4ff.png +0 -0
  140. package/dist/assets/static/media/li.61c564a4.png +0 -0
  141. package/dist/assets/static/media/lk.6fa85802.png +0 -0
  142. package/dist/assets/static/media/lr.8063f7db.png +0 -0
  143. package/dist/assets/static/media/ls.901ddb71.png +0 -0
  144. package/dist/assets/static/media/lt.9209ace3.png +0 -0
  145. package/dist/assets/static/media/lu.c9872bc1.png +0 -0
  146. package/dist/assets/static/media/lv.7bcacf0a.png +0 -0
  147. package/dist/assets/static/media/ly.2830aa63.png +0 -0
  148. package/dist/assets/static/media/ma.ce5f697b.png +0 -0
  149. package/dist/assets/static/media/mc.4bd5d57a.png +0 -0
  150. package/dist/assets/static/media/md.fb4b5bdf.png +0 -0
  151. package/dist/assets/static/media/me.1f1d1772.png +0 -0
  152. package/dist/assets/static/media/mg.89101bd2.png +0 -0
  153. package/dist/assets/static/media/mh.ff11dff7.png +0 -0
  154. package/dist/assets/static/media/mk.8420e604.png +0 -0
  155. package/dist/assets/static/media/ml.4db47c66.png +0 -0
  156. package/dist/assets/static/media/mm.8e4ac30a.png +0 -0
  157. package/dist/assets/static/media/mn.dc1daa04.png +0 -0
  158. package/dist/assets/static/media/mr.7cbca6d0.png +0 -0
  159. package/dist/assets/static/media/mt.28a4b863.png +0 -0
  160. package/dist/assets/static/media/mu.d93db6c7.png +0 -0
  161. package/dist/assets/static/media/mv.7d026bf1.png +0 -0
  162. package/dist/assets/static/media/mw.960cd4fb.png +0 -0
  163. package/dist/assets/static/media/mx.39b78eb2.png +0 -0
  164. package/dist/assets/static/media/my.916a8392.png +0 -0
  165. package/dist/assets/static/media/mz.facb4ea3.png +0 -0
  166. package/dist/assets/static/media/na.472666a9.png +0 -0
  167. package/dist/assets/static/media/ne.d774701f.png +0 -0
  168. package/dist/assets/static/media/ng.7b06a49f.png +0 -0
  169. package/dist/assets/static/media/ni.7140131c.png +0 -0
  170. package/dist/assets/static/media/nl.4c04aa96.png +0 -0
  171. package/dist/assets/static/media/no.c19eb00d.png +0 -0
  172. package/dist/assets/static/media/np.54fb4f2f.png +0 -0
  173. package/dist/assets/static/media/nr.7527cc38.png +0 -0
  174. package/dist/assets/static/media/nz.738be05b.png +0 -0
  175. package/dist/assets/static/media/om.b25e0a17.png +0 -0
  176. package/dist/assets/static/media/pa.b28a9059.png +0 -0
  177. package/dist/assets/static/media/pe.c1fc1d96.png +0 -0
  178. package/dist/assets/static/media/pg.380115db.png +0 -0
  179. package/dist/assets/static/media/ph.02199ddc.png +0 -0
  180. package/dist/assets/static/media/pk.094f9517.png +0 -0
  181. package/dist/assets/static/media/pl.41521283.png +0 -0
  182. package/dist/assets/static/media/pt.1f82dc04.png +0 -0
  183. package/dist/assets/static/media/pw.a26c2316.png +0 -0
  184. package/dist/assets/static/media/py.926c65ed.png +0 -0
  185. package/dist/assets/static/media/qa.c6a3c20e.png +0 -0
  186. package/dist/assets/static/media/ro.a36876c9.png +0 -0
  187. package/dist/assets/static/media/rs.c6629de8.png +0 -0
  188. package/dist/assets/static/media/ru.a9b948c1.png +0 -0
  189. package/dist/assets/static/media/rw.e8aecba0.png +0 -0
  190. package/dist/assets/static/media/sa.859049c8.png +0 -0
  191. package/dist/assets/static/media/sb.4ad27b27.png +0 -0
  192. package/dist/assets/static/media/sc.3293efde.png +0 -0
  193. package/dist/assets/static/media/sd.19c94faa.png +0 -0
  194. package/dist/assets/static/media/se.195b3f93.png +0 -0
  195. package/dist/assets/static/media/sg.19d81907.png +0 -0
  196. package/dist/assets/static/media/si.367c5443.png +0 -0
  197. package/dist/assets/static/media/sk.4e5b8a39.png +0 -0
  198. package/dist/assets/static/media/sl.4b174b1c.png +0 -0
  199. package/dist/assets/static/media/sm.2cba3dac.png +0 -0
  200. package/dist/assets/static/media/sn.a4c1041d.png +0 -0
  201. package/dist/assets/static/media/so.b455e3bf.png +0 -0
  202. package/dist/assets/static/media/sr.5adc1c00.png +0 -0
  203. package/dist/assets/static/media/st.5ae44155.png +0 -0
  204. package/dist/assets/static/media/sv.43aa6cdf.png +0 -0
  205. package/dist/assets/static/media/sy.0fbd24f7.png +0 -0
  206. package/dist/assets/static/media/sz.ff204912.png +0 -0
  207. package/dist/assets/static/media/td.c7aa2a4e.png +0 -0
  208. package/dist/assets/static/media/tg.857c3bec.png +0 -0
  209. package/dist/assets/static/media/th.683600c7.png +0 -0
  210. package/dist/assets/static/media/tj.d20c5570.png +0 -0
  211. package/dist/assets/static/media/tl.5edd8ea7.png +0 -0
  212. package/dist/assets/static/media/tm.15960215.png +0 -0
  213. package/dist/assets/static/media/tn.40df718e.png +0 -0
  214. package/dist/assets/static/media/to.c3b054df.png +0 -0
  215. package/dist/assets/static/media/tr.adeace6d.png +0 -0
  216. package/dist/assets/static/media/tt.839bd7f1.png +0 -0
  217. package/dist/assets/static/media/tv.628cae3e.png +0 -0
  218. package/dist/assets/static/media/tw.4e885914.png +0 -0
  219. package/dist/assets/static/media/tz.b2f0dc37.png +0 -0
  220. package/dist/assets/static/media/ua.6b103313.png +0 -0
  221. package/dist/assets/static/media/ug.c84042fc.png +0 -0
  222. package/dist/assets/static/media/us.8523c31d.png +0 -0
  223. package/dist/assets/static/media/uy.a943f85e.png +0 -0
  224. package/dist/assets/static/media/uz.25552673.png +0 -0
  225. package/dist/assets/static/media/va.a29e1b53.png +0 -0
  226. package/dist/assets/static/media/vc.7480bd37.png +0 -0
  227. package/dist/assets/static/media/ve.fd4273c2.png +0 -0
  228. package/dist/assets/static/media/vn.7d2eff1b.png +0 -0
  229. package/dist/assets/static/media/vu.48b64cf3.png +0 -0
  230. package/dist/assets/static/media/ws.f3d9202f.png +0 -0
  231. package/dist/assets/static/media/ye.311a0e50.png +0 -0
  232. package/dist/assets/static/media/za.090a856f.png +0 -0
  233. package/dist/assets/static/media/zm.8371e197.png +0 -0
  234. package/dist/assets/static/media/zw.a6809447.png +0 -0
  235. package/dist/index.js +1 -450
  236. package/node_modules/{geoip-country/node_modules/colors → colors}/LICENSE +0 -0
  237. package/node_modules/{geoip-country/node_modules/colors → colors}/README.md +0 -0
  238. package/node_modules/{geoip-country/node_modules/colors → colors}/examples/normal-usage.js +0 -0
  239. package/node_modules/{geoip-country/node_modules/colors → colors}/examples/safe-string.js +0 -0
  240. package/node_modules/{geoip-country/node_modules/colors → colors}/index.d.ts +0 -0
  241. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/colors.js +0 -0
  242. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/custom/trap.js +0 -0
  243. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/custom/zalgo.js +0 -0
  244. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/extendStringPrototype.js +0 -0
  245. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/index.js +0 -0
  246. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/maps/america.js +0 -0
  247. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/maps/rainbow.js +0 -0
  248. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/maps/random.js +0 -0
  249. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/maps/zebra.js +0 -0
  250. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/styles.js +0 -0
  251. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/system/has-flag.js +0 -0
  252. package/node_modules/{geoip-country/node_modules/colors → colors}/lib/system/supports-colors.js +0 -0
  253. package/node_modules/{geoip-country/node_modules/colors → colors}/package.json +0 -0
  254. package/node_modules/{geoip-country/node_modules/colors → colors}/safe.d.ts +0 -0
  255. package/node_modules/{geoip-country/node_modules/colors → colors}/safe.js +0 -0
  256. package/node_modules/{geoip-country/node_modules/colors → colors}/themes/generic-logging.js +0 -0
  257. package/node_modules/geoip-country/data/geoip-country.dat +0 -0
  258. package/node_modules/geoip-country/data/geoip-country6.dat +0 -0
  259. package/node_modules/geoip-country/package.json +1 -1
  260. package/node_modules/glob/README.md +3 -0
  261. package/node_modules/glob/common.js +2 -0
  262. package/node_modules/glob/glob.js +4 -5
  263. package/node_modules/glob/package.json +2 -1
  264. package/node_modules/glob/sync.js +4 -5
  265. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/Changelog.md +0 -0
  266. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/LICENSE +0 -0
  267. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/README.md +0 -0
  268. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/dbcs-codec.js +0 -0
  269. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/dbcs-data.js +0 -0
  270. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/index.js +0 -0
  271. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/internal.js +0 -0
  272. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/sbcs-codec.js +0 -0
  273. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/sbcs-data-generated.js +0 -0
  274. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/sbcs-data.js +0 -0
  275. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/tables/big5-added.json +0 -0
  276. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/tables/cp936.json +0 -0
  277. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/tables/cp949.json +0 -0
  278. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/tables/cp950.json +0 -0
  279. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/tables/eucjp.json +0 -0
  280. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/tables/gb18030-ranges.json +0 -0
  281. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/tables/gbk-added.json +0 -0
  282. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/tables/shiftjis.json +0 -0
  283. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/utf16.js +0 -0
  284. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/utf32.js +0 -0
  285. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/encodings/utf7.js +0 -0
  286. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/lib/bom-handling.js +0 -0
  287. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/lib/extend-node.js +0 -0
  288. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/lib/index.d.ts +0 -0
  289. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/lib/index.js +0 -0
  290. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/lib/streams.js +0 -0
  291. package/node_modules/{geoip-country/node_modules/iconv-lite → iconv-lite}/package.json +0 -0
  292. package/node_modules/{geoip-country/node_modules/rimraf → rimraf}/LICENSE +0 -0
  293. package/node_modules/{geoip-country/node_modules/rimraf → rimraf}/README.md +0 -0
  294. package/node_modules/{geoip-country/node_modules/rimraf → rimraf}/bin.js +0 -0
  295. package/node_modules/{geoip-country/node_modules/rimraf → rimraf}/package.json +0 -0
  296. package/node_modules/{geoip-country/node_modules/rimraf → rimraf}/rimraf.js +0 -0
  297. package/package.json +117 -127
  298. package/dist/assets/static/css/main.463bcf9156a39399d487.css +0 -1
  299. package/dist/assets/static/js/185.3f7610b5.chunk.js +0 -1
  300. package/dist/assets/static/js/770.557cc03f.chunk.js +0 -1
  301. package/dist/assets/static/js/834.2085fddc.chunk.js +0 -1
  302. package/dist/assets/static/js/90.8e999991.chunk.js +0 -1
  303. package/dist/assets/static/js/about.814469bf.chunk.js +0 -1
  304. package/dist/assets/static/js/flag1.35ae4d5d.chunk.js +0 -1
  305. package/dist/assets/static/js/flag2.79d43a88.chunk.js +0 -1
  306. package/dist/assets/static/js/flag3.2ea8d341.chunk.js +0 -1
  307. package/dist/assets/static/js/flag6.e50dfe44.chunk.js +0 -1
  308. package/dist/assets/static/js/i18n1.03af2dd6.chunk.js +0 -1
  309. package/dist/assets/static/js/i18n10.94299e1a.chunk.js +0 -1
  310. package/dist/assets/static/js/i18n13.8654302f.chunk.js +0 -1
  311. package/dist/assets/static/js/i18n14.2aa83906.chunk.js +0 -1
  312. package/dist/assets/static/js/i18n17.c98a5231.chunk.js +0 -1
  313. package/dist/assets/static/js/i18n18.996aa4ce.chunk.js +0 -1
  314. package/dist/assets/static/js/i18n21.e2a310c1.chunk.js +0 -1
  315. package/dist/assets/static/js/i18n27.8078109a.chunk.js +0 -1
  316. package/dist/assets/static/js/i18n3.e5a2ca1d.chunk.js +0 -1
  317. package/dist/assets/static/js/i18n5.1393919f.chunk.js +0 -1
  318. package/dist/assets/static/js/i18n6.c72d14dc.chunk.js +0 -1
  319. package/dist/assets/static/js/i18n8.abd68ece.chunk.js +0 -1
  320. package/dist/assets/static/js/i18n9.1a744100.chunk.js +0 -1
  321. package/dist/assets/static/js/main.c85b0cd2.js +0 -1
  322. package/node_modules/glob/changelog.md +0 -67
@@ -0,0 +1 @@
1
+ (globalThis.webpackChunk_jesec_flood=globalThis.webpackChunk_jesec_flood||[]).push([[183],{917:(e,t,r)=>{"use strict";r.d(t,{iv:()=>o});r(7294),r(6898),r(8679);var n=r(9984);function o(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.O)(t)}},8195:(e,t,r)=>{"use strict";function n(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];if(!e){var i;if(void 0===t)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;(i=new Error(t.replace(/%s/g,(function(){return n[a++]})))).name="Invariant Violation"}throw i.framesToPop=1,i}}r.d(t,{k:()=>n})},5047:(e,t,r)=>{"use strict";function n(e,t,r,n){var o=r?r.call(n,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(t),s=0;s<i.length;s++){var c=i[s];if(!u(c))return!1;var l=e[c],f=t[c];if(!1===(o=r?r.call(n,l,f,c):void 0)||void 0===o&&l!==f)return!1}return!0}r.d(t,{w:()=>n})},4967:(e,t,r)=>{"use strict";function n(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return u=e.done,e},e:function(e){s=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,s(e,t,"get"))}function u(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,s(e,t,"set"),r),r}function s(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{Am:()=>x,Tb:()=>_,R:()=>j});var c=new WeakMap,l=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c.set(this,{writable:!0,value:void 0}),i(this,"register",(function(e){a(t,c).push(e)})),i(this,"unregister",(function(e){for(var r;-1!==(r=a(t,c).indexOf(e));)a(t,c).splice(r,1)})),i(this,"backendChanged",(function(e){var r,o=n(a(t,c));try{for(o.s();!(r=o.n()).done;){r.value.backendChanged(e)}}catch(e){o.e(e)}finally{o.f()}})),u(this,c,[])};function f(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,v(e,t,"get"))}function g(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,v(e,t,"set"),r),r}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var y=new WeakMap,b=new WeakMap,m=new WeakMap,w=new WeakMap,O=new WeakMap,S=new WeakMap,D=new WeakMap,k=new WeakMap,T=new WeakMap,I=new WeakMap,E=new WeakMap,C=function e(t,r,n){var o=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),y.set(this,{writable:!0,value:void 0}),b.set(this,{writable:!0,value:void 0}),m.set(this,{writable:!0,value:void 0}),w.set(this,{writable:!0,value:void 0}),O.set(this,{writable:!0,value:void 0}),S.set(this,{writable:!0,value:function(e,t,r){var n,i;if(!r.backend)throw new Error("You must specify a 'backend' property in your Backend entry: ".concat(JSON.stringify(r)));var a=r.backend(e,t,r.options),u=r.id,s=!r.id&&a&&a.constructor;if(s&&(u=a.constructor.name),!u)throw new Error("You must specify an 'id' property in your Backend entry: ".concat(JSON.stringify(r),"\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx"));if(s&&console.warn("Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.\n This might be unsupported in the future, please specify 'id' explicitely for every backend."),h(o,m)[u])throw new Error("You must specify a unique 'id' property in your Backend entry:\n ".concat(JSON.stringify(r)," (conflicts with: ").concat(JSON.stringify(h(o,m)[u]),")"));return{id:u,instance:a,preview:null!==(n=r.preview)&&void 0!==n&&n,transition:r.transition,skipDispatchOnTransition:null!==(i=r.skipDispatchOnTransition)&&void 0!==i&&i}}}),p(this,"setup",(function(){if("undefined"!=typeof window){if(e.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");e.isSetUp=!0,h(o,D).call(o,window),h(o,m)[h(o,y)].instance.setup()}})),p(this,"teardown",(function(){"undefined"!=typeof window&&(e.isSetUp=!1,h(o,k).call(o,window),h(o,m)[h(o,y)].instance.teardown())})),p(this,"connectDragSource",(function(e,t,r){return h(o,E).call(o,"connectDragSource",e,t,r)})),p(this,"connectDragPreview",(function(e,t,r){return h(o,E).call(o,"connectDragPreview",e,t,r)})),p(this,"connectDropTarget",(function(e,t,r){return h(o,E).call(o,"connectDropTarget",e,t,r)})),p(this,"profile",(function(){return h(o,m)[h(o,y)].instance.profile()})),p(this,"previewEnabled",(function(){return h(o,m)[h(o,y)].preview})),p(this,"previewsList",(function(){return h(o,b)})),p(this,"backendsList",(function(){return h(o,w)})),D.set(this,{writable:!0,value:function(e){h(o,w).forEach((function(t){t.transition&&e.addEventListener(t.transition.event,h(o,T))}))}}),k.set(this,{writable:!0,value:function(e){h(o,w).forEach((function(t){t.transition&&e.removeEventListener(t.transition.event,h(o,T))}))}}),T.set(this,{writable:!0,value:function(e){var t=h(o,y);if(h(o,w).some((function(t){return!(t.id===h(o,y)||!t.transition||!t.transition.check(e))&&(g(o,y,t.id),!0)})),h(o,y)!==t){var r;h(o,m)[t].instance.teardown(),Object.keys(h(o,O)).forEach((function(e){var t,r=h(o,O)[e];r.unsubscribe(),r.unsubscribe=(t=h(o,I)).call.apply(t,[o,r.func].concat(f(r.args)))})),h(o,b).backendChanged(o);var n=h(o,m)[h(o,y)];if(n.instance.setup(),n.skipDispatchOnTransition)return;var i=null;try{i=e.constructor(e.type,e)}catch(t){(i=document.createEvent("Event")).initEvent(e.type,e.bubbles,e.cancelable)}null===(r=e.target)||void 0===r||r.dispatchEvent(i)}}}),I.set(this,{writable:!0,value:function(e,t,r,n){return h(o,m)[h(o,y)].instance[e](t,r,n)}}),E.set(this,{writable:!0,value:function(e,t,r,n){var i="".concat(e,"_").concat(t),a=h(o,I).call(o,e,t,r,n);return h(o,O)[i]={func:e,args:[t,r,n],unsubscribe:a},function(){h(o,O)[i].unsubscribe(),delete h(o,O)[i]}}}),!n||!n.backends||n.backends.length<1)throw new Error("You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx");g(this,b,new l),g(this,m,{}),g(this,w,[]),n.backends.forEach((function(e){var n=h(o,S).call(o,t,r,e);h(o,m)[n.id]=n,h(o,w).push(n)})),g(this,y,h(this,w)[0].id),g(this,O,{})};p(C,"isSetUp",!1);var x=function(e,t,r){return new C(e,t,r)},P=function(e,t){return{event:e,check:t}},j=P("touchstart",(function(e){var t=e;return null!==t.touches&&void 0!==t.touches})),_=(P("dragstart",(function(e){return-1!==e.type.indexOf("drag")||-1!==e.type.indexOf("drop")})),P("mousedown",(function(e){return-1===e.type.indexOf("touch")&&-1!==e.type.indexOf("mouse")})),P("pointerdown",(function(e){return"mouse"==e.pointerType})))},6425:(e,t,r)=>{var n=r(3118),o=r(456);function i(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}i.prototype=n(o.prototype),i.prototype.constructor=i,e.exports=i},7548:(e,t,r)=>{var n=r(3118),o=r(456);function i(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}i.prototype=n(o.prototype),i.prototype.constructor=i,e.exports=i},577:(e,t,r)=>{var n=r(852)(r(5639),"WeakMap");e.exports=n},6874:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},2488:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},3118:(e,t,r)=>{var n=r(3218),o=Object.create,i=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=i},1078:(e,t,r)=>{var n=r(2488),o=r(5708);e.exports=function e(t,r,i,a,u){var s=-1,c=t.length;for(i||(i=o),u||(u=[]);++s<c;){var l=t[s];r>0&&i(l)?r>1?e(l,r-1,i,a,u):n(u,l):a||(u[u.length]=l)}return u}},9454:(e,t,r)=>{var n=r(4239),o=r(7005);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},8458:(e,t,r)=>{var n=r(3560),o=r(5346),i=r(3218),a=r(346),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?d:u).test(a(e))}},456:e=>{e.exports=function(){}},6560:(e,t,r)=>{var n=r(5703),o=r(8777),i=r(6557),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},7561:(e,t,r)=>{var n=r(7990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},6450:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},4429:(e,t,r)=>{var n=r(5639)["__core-js_shared__"];e.exports=n},3468:(e,t,r)=>{var n=r(7548),o=r(9021),i=r(6833),a=r(7658),u=r(1469),s=r(6528);e.exports=function(e){return o((function(t){var r=t.length,o=r,c=n.prototype.thru;for(e&&t.reverse();o--;){var l=t[o];if("function"!=typeof l)throw new TypeError("Expected a function");if(c&&!f&&"wrapper"==a(l))var f=new n([],!0)}for(o=f?o:r;++o<r;){l=t[o];var d=a(l),p="wrapper"==d?i(l):void 0;f=p&&s(p[0])&&424==p[1]&&!p[4].length&&1==p[9]?f[a(p[0])].apply(f,p[3]):1==l.length&&s(l)?f[d]():f.thru(l)}return function(){var e=arguments,n=e[0];if(f&&1==e.length&&u(n))return f.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}}))}},8777:(e,t,r)=>{var n=r(852),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},9021:(e,t,r)=>{var n=r(5564),o=r(5357),i=r(61);e.exports=function(e){return i(o(e,void 0,n),e+"")}},6833:(e,t,r)=>{var n=r(9250),o=r(308),i=n?function(e){return n.get(e)}:o;e.exports=i},7658:(e,t,r)=>{var n=r(2060),o=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",r=n[t],i=o.call(n,t)?r.length:0;i--;){var a=r[i],u=a.func;if(null==u||u==e)return a.name}return t}},852:(e,t,r)=>{var n=r(8458),o=r(7801);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},5708:(e,t,r)=>{var n=r(2705),o=r(5694),i=r(1469),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},6528:(e,t,r)=>{var n=r(6425),o=r(6833),i=r(7658),a=r(2170);e.exports=function(e){var t=i(e),r=a[t];if("function"!=typeof r||!(t in n.prototype))return!1;if(e===r)return!0;var u=o(r);return!!u&&e===u[0]}},5346:(e,t,r)=>{var n,o=r(4429),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},9250:(e,t,r)=>{var n=r(577),o=n&&new n;e.exports=o},5357:(e,t,r)=>{var n=r(6874),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,u=o(i.length-t,0),s=Array(u);++a<u;)s[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=r(s),n(e,this,c)}}},2060:e=>{e.exports={}},61:(e,t,r)=>{var n=r(6560),o=r(1275)(n);e.exports=o},1275:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},1913:(e,t,r)=>{var n=r(6425),o=r(7548),i=r(6450);e.exports=function(e){if(e instanceof n)return e.clone();var t=new o(e.__wrapped__,e.__chain__);return t.__actions__=i(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},5703:e=>{e.exports=function(e){return function(){return e}}},3279:(e,t,r)=>{var n=r(3218),o=r(7771),i=r(4841),a=Math.max,u=Math.min;e.exports=function(e,t,r){var s,c,l,f,d,p,h=0,g=!1,v=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var r=s,n=c;return s=c=void 0,h=t,f=e.apply(n,r)}function m(e){return h=e,d=setTimeout(O,t),g?b(e):f}function w(e){var r=e-p;return void 0===p||r>=t||r<0||v&&e-h>=l}function O(){var e=o();if(w(e))return S(e);d=setTimeout(O,function(e){var r=t-(e-p);return v?u(r,l-(e-h)):r}(e))}function S(e){return d=void 0,y&&s?b(e):(s=c=void 0,f)}function D(){var e=o(),r=w(e);if(s=arguments,c=this,p=e,r){if(void 0===d)return m(p);if(v)return clearTimeout(d),d=setTimeout(O,t),b(p)}return void 0===d&&(d=setTimeout(O,t)),f}return t=i(t)||0,n(r)&&(g=!!r.leading,l=(v="maxWait"in r)?a(i(r.maxWait)||0,t):l,y="trailing"in r?!!r.trailing:y),D.cancel=function(){void 0!==d&&clearTimeout(d),h=0,s=p=c=d=void 0},D.flush=function(){return void 0===d?f:S(o())},D}},5564:(e,t,r)=>{var n=r(1078);e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},9242:(e,t,r)=>{var n=r(3468)();e.exports=n},5694:(e,t,r)=>{var n=r(9454),o=r(7005),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},3560:(e,t,r)=>{var n=r(4239),o=r(3218);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},308:e=>{e.exports=function(){}},7771:(e,t,r)=>{var n=r(5639);e.exports=function(){return n.Date.now()}},4841:(e,t,r)=>{var n=r(7561),o=r(3218),i=r(3448),a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=u.test(e);return r||s.test(e)?c(e.slice(2),r?2:8):a.test(e)?NaN:+e}},2170:(e,t,r)=>{var n=r(6425),o=r(7548),i=r(456),a=r(1469),u=r(7005),s=r(1913),c=Object.prototype.hasOwnProperty;function l(e){if(u(e)&&!a(e)&&!(e instanceof n)){if(e instanceof o)return e;if(c.call(e,"__wrapped__"))return s(e)}return new o(e)}l.prototype=i.prototype,l.prototype.constructor=l,e.exports=l},4166:(e,t,r)=>{"use strict";r.d(t,{_j:()=>F,$n:()=>W,m4:()=>N,p_:()=>Y});var n=r(7462),o=r(7326),i=r(4578),a=r(1120),u=r(9611);function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function c(e,t,r){return c=s()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&(0,u.Z)(o,r.prototype),o},c.apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,(0,a.Z)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,u.Z)(n,e)},l(e)}var f=function(e){function t(t){var r;return r=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this,(0,o.Z)(r)}return(0,i.Z)(t,e),t}(l(Error));function d(e){return Math.round(255*e)}function p(e,t,r){return d(e)+","+d(t)+","+d(r)}function h(e,t,r,n){if(void 0===n&&(n=p),0===t)return n(r,r,r);var o=(e%360+360)%360/60,i=(1-Math.abs(2*r-1))*t,a=i*(1-Math.abs(o%2-1)),u=0,s=0,c=0;o>=0&&o<1?(u=i,s=a):o>=1&&o<2?(u=a,s=i):o>=2&&o<3?(s=i,c=a):o>=3&&o<4?(s=a,c=i):o>=4&&o<5?(u=a,c=i):o>=5&&o<6&&(u=i,c=a);var l=r-i/2;return n(u+l,s+l,c+l)}var g={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",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",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",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",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",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:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var v=/^#[a-fA-F0-9]{6}$/,y=/^#[a-fA-F0-9]{8}$/,b=/^#[a-fA-F0-9]{3}$/,m=/^#[a-fA-F0-9]{4}$/,w=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,O=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,S=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,D=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function k(e){if("string"!=typeof e)throw new f(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return g[t]?"#"+g[t]:e}(e);if(t.match(v))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(y)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(b))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(m)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var o=w.exec(t);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var i=O.exec(t.substring(0,50));if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10),alpha:parseFloat(""+i[4])};var a=S.exec(t);if(a){var u="rgb("+h(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",s=w.exec(u);if(!s)throw new f(4,t,u);return{red:parseInt(""+s[1],10),green:parseInt(""+s[2],10),blue:parseInt(""+s[3],10)}}var c=D.exec(t.substring(0,50));if(c){var l="rgb("+h(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",d=w.exec(l);if(!d)throw new f(4,t,l);return{red:parseInt(""+d[1],10),green:parseInt(""+d[2],10),blue:parseInt(""+d[3],10),alpha:parseFloat(""+c[4])}}throw new f(5)}function T(e){return function(e){var t,r=e.red/255,n=e.green/255,o=e.blue/255,i=Math.max(r,n,o),a=Math.min(r,n,o),u=(i+a)/2;if(i===a)return void 0!==e.alpha?{hue:0,saturation:0,lightness:u,alpha:e.alpha}:{hue:0,saturation:0,lightness:u};var s=i-a,c=u>.5?s/(2-i-a):s/(i+a);switch(i){case r:t=(n-o)/s+(n<o?6:0);break;case n:t=(o-r)/s+2;break;default:t=(r-n)/s+4}return t*=60,void 0!==e.alpha?{hue:t,saturation:c,lightness:u,alpha:e.alpha}:{hue:t,saturation:c,lightness:u}}(k(e))}var I=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function E(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function C(e){return E(Math.round(255*e))}function x(e,t,r){return I("#"+C(e)+C(t)+C(r))}function P(e,t,r){return h(e,t,r,x)}function j(e,t,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof r)return P(e,t,r);if("object"==typeof e&&void 0===t&&void 0===r)return P(e.hue,e.saturation,e.lightness);throw new f(1)}function _(e,t,r,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof r&&"number"==typeof n)return n>=1?P(e,t,r):"rgba("+h(e,t,r)+","+n+")";if("object"==typeof e&&void 0===t&&void 0===r&&void 0===n)return e.alpha>=1?P(e.hue,e.saturation,e.lightness):"rgba("+h(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new f(2)}function M(e,t,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof r)return I("#"+E(e)+E(t)+E(r));if("object"==typeof e&&void 0===t&&void 0===r)return I("#"+E(e.red)+E(e.green)+E(e.blue));throw new f(6)}function N(e,t,r,n){if("string"==typeof e&&"number"==typeof t){var o=k(e);return"rgba("+o.red+","+o.green+","+o.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof r&&"number"==typeof n)return n>=1?M(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if("object"==typeof e&&void 0===t&&void 0===r&&void 0===n)return e.alpha>=1?M(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new f(7)}function A(e){if("object"!=typeof e)throw new f(8);if(function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha}(e))return N(e);if(function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)}(e))return M(e);if(function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha}(e))return _(e);if(function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)}(e))return j(e);throw new f(8)}function R(e,t,r){return function(){var n=r.concat(Array.prototype.slice.call(arguments));return n.length>=t?e.apply(this,n):R(e,t,n)}}function L(e){return R(e,e.length,[])}function H(e,t,r){return Math.max(e,Math.min(t,r))}function U(e,t){if("transparent"===t)return t;var r=T(t);return A((0,n.Z)({},r,{lightness:H(0,1,r.lightness-parseFloat(e))}))}var F=L(U);function B(e,t){if("transparent"===t)return t;var r=T(t);return A((0,n.Z)({},r,{lightness:H(0,1,r.lightness+parseFloat(e))}))}var W=L(B);function $(e,t){if("transparent"===t)return t;var r=T(t);return A((0,n.Z)({},r,{saturation:H(0,1,r.saturation+parseFloat(e))}))}var Y=L($)},4920:(e,t,r)=>{"use strict";r.d(t,{r:()=>X});var n={};function o(e){var t=null;return function(){return null==t&&(t=e()),t}}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}r.r(n),r.d(n,{FILE:()=>g,HTML:()=>b,TEXT:()=>y,URL:()=>v});var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.entered=[],this.isNodeInDocument=t}var t,r,n;return t=e,(r=[{key:"enter",value:function(e){var t=this,r=this.entered.length;return this.entered=function(e,t){var r=new Set,n=function(e){return r.add(e)};e.forEach(n),t.forEach(n);var o=[];return r.forEach((function(e){return o.push(e)})),o}(this.entered.filter((function(r){return t.isNodeInDocument(r)&&(!r.contains||r.contains(e))})),[e]),0===r&&this.entered.length>0}},{key:"leave",value:function(e){var t,r,n=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),r=e,t.filter((function(e){return e!==r}))),n>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&i(t.prototype,r),n&&i(t,n),e}(),u=o((function(){return/firefox/i.test(navigator.userAgent)})),s=o((function(){return Boolean(window.safari)}));function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var l=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=t.length,o=[],i=0;i<n;i++)o.push(i);o.sort((function(e,r){return t[e]<t[r]?-1:1}));for(var a,u,s=[],c=[],l=[],f=0;f<n-1;f++)a=t[f+1]-t[f],u=r[f+1]-r[f],c.push(a),s.push(u),l.push(u/a);for(var d=[l[0]],p=0;p<c.length-1;p++){var h=l[p],g=l[p+1];if(h*g<=0)d.push(0);else{a=c[p];var v=c[p+1],y=a+v;d.push(3*y/((y+v)/h+(y+a)/g))}}d.push(l[l.length-1]);for(var b,m=[],w=[],O=0;O<d.length-1;O++){b=l[O];var S=d[O],D=1/c[O],k=S+d[O+1]-b-b;m.push((b-S-k)*D),w.push(k*D*D)}this.xs=t,this.ys=r,this.c1s=d,this.c2s=m,this.c3s=w}var t,r,n;return t=e,(r=[{key:"interpolate",value:function(e){var t=this.xs,r=this.ys,n=this.c1s,o=this.c2s,i=this.c3s,a=t.length-1;if(e===t[a])return r[a];for(var u,s=0,c=i.length-1;s<=c;){var l=t[u=Math.floor(.5*(s+c))];if(l<e)s=u+1;else{if(!(l>e))return r[u];c=u-1}}var f=e-t[a=Math.max(0,c)],d=f*f;return r[a]+n[a]*f+o[a]*d+i[a]*f*d}}])&&c(t.prototype,r),n&&c(t,n),e}();function f(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var r=t.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}function d(e){return{x:e.clientX,y:e.clientY}}function p(e,t,r,n,o){var i,a,c,d="IMG"===(i=t).nodeName&&(u()||!(null!==(a=document.documentElement)&&void 0!==a&&a.contains(i))),p=f(d?e:t),h={x:r.x-p.x,y:r.y-p.y},g=e.offsetWidth,v=e.offsetHeight,y=n.anchorX,b=n.anchorY,m=function(e,t,r,n){var o=e?t.width:r,i=e?t.height:n;return s()&&e&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i}}(d,t,g,v),w=m.dragPreviewWidth,O=m.dragPreviewHeight,S=o.offsetX,D=o.offsetY,k=0===D||D;return{x:0===S||S?S:new l([0,.5,1],[h.x,h.x/g*w,h.x+w-g]).interpolate(y),y:k?D:(c=new l([0,.5,1],[h.y,h.y/v*O,h.y+O-v]).interpolate(b),s()&&d&&(c+=(window.devicePixelRatio-1)*O),c)}}var h,g="__NATIVE_FILE__",v="__NATIVE_URL__",y="__NATIVE_TEXT__",b="__NATIVE_HTML__";function m(e,t,r){var n=t.reduce((function(t,r){return t||e.getData(r)}),"");return null!=n?n:r}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O=(w(h={},g,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),w(h,b,{exposeProperties:{html:function(e,t){return m(e,t,"")}},matchesTypes:["Html","text/html"]}),w(h,v,{exposeProperties:{urls:function(e,t){return m(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),w(h,y,{exposeProperties:{text:function(e,t){return m(e,t,"")}},matchesTypes:["Text","text/plain"]}),h);function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var D=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.item={},this.initializeExposedProperties()}var t,r,n;return t=e,(r=[{key:"initializeExposedProperties",value:function(){var e=this;Object.keys(this.config.exposeProperties).forEach((function(t){Object.defineProperty(e.item,t,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(t,'" until the drop event.')),null}})}))}},{key:"loadDataTransfer",value:function(e){var t=this;if(e){var r={};Object.keys(this.config.exposeProperties).forEach((function(n){r[n]={value:t.config.exposeProperties[n](e,t.config.matchesTypes),configurable:!0,enumerable:!0}})),Object.defineProperties(this.item,r)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}])&&S(t.prototype,r),n&&S(t,n),e}();function k(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(O).filter((function(e){return O[e].matchesTypes.some((function(e){return t.indexOf(e)>-1}))}))[0]||null}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ownerDocument=null,this.globalContext=t,this.optionsArgs=r}var t,r,n;return t=e,(r=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){var e;return null!==(e=this.globalContext)&&void 0!==e&&e.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}}])&&T(t.prototype,r),n&&T(t,n),e}();function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){x(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var j,_=function(){function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.getSourceClientOffset=function(e){var t=o.sourceNodes.get(e);return t&&f(t)||null},this.endDragNativeItem=function(){o.isDraggingNativeItem()&&(o.actions.endDrag(),o.currentNativeHandle&&o.registry.removeSource(o.currentNativeHandle),o.currentNativeHandle=null,o.currentNativeSource=null)},this.isNodeInDocument=function(e){return Boolean(e&&o.document&&o.document.body&&document.body.contains(e))},this.endDragIfSourceWasRemovedFromDOM=function(){var e=o.currentDragSourceNode;null==e||o.isNodeInDocument(e)||o.clearCurrentDragSourceNode()&&o.monitor.isDragging()&&o.actions.endDrag()},this.handleTopDragStartCapture=function(){o.clearCurrentDragSourceNode(),o.dragStartSourceIds=[]},this.handleTopDragStart=function(e){if(!e.defaultPrevented){var t=o.dragStartSourceIds;o.dragStartSourceIds=null;var r=d(e);o.monitor.isDragging()&&o.actions.endDrag(),o.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:o.getSourceClientOffset,clientOffset:r});var n=e.dataTransfer,i=k(n);if(o.monitor.isDragging()){if(n&&"function"==typeof n.setDragImage){var a=o.monitor.getSourceId(),u=o.sourceNodes.get(a),s=o.sourcePreviewNodes.get(a)||u;if(s){var c=o.getCurrentSourcePreviewNodeOptions(),l=p(u,s,r,{anchorX:c.anchorX,anchorY:c.anchorY},{offsetX:c.offsetX,offsetY:c.offsetY});n.setDragImage(s,l.x,l.y)}}try{null==n||n.setData("application/json",{})}catch(e){}o.setCurrentDragSourceNode(e.target),o.getCurrentSourcePreviewNodeOptions().captureDraggingState?o.actions.publishDragSource():setTimeout((function(){return o.actions.publishDragSource()}),0)}else if(i)o.beginDragNativeItem(i);else{if(n&&!n.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}}},this.handleTopDragEndCapture=function(){o.clearCurrentDragSourceNode()&&o.monitor.isDragging()&&o.actions.endDrag()},this.handleTopDragEnterCapture=function(e){if(o.dragEnterTargetIds=[],o.enterLeaveCounter.enter(e.target)&&!o.monitor.isDragging()){var t=e.dataTransfer,r=k(t);r&&o.beginDragNativeItem(r,t)}},this.handleTopDragEnter=function(e){var t=o.dragEnterTargetIds;(o.dragEnterTargetIds=[],o.monitor.isDragging())&&(o.altKeyPressed=e.altKey,t.length>0&&o.actions.hover(t,{clientOffset:d(e)}),t.some((function(e){return o.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())))},this.handleTopDragOverCapture=function(){o.dragOverTargetIds=[]},this.handleTopDragOver=function(e){var t=o.dragOverTargetIds;if(o.dragOverTargetIds=[],!o.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));o.altKeyPressed=e.altKey,o.actions.hover(t||[],{clientOffset:d(e)}),(t||[]).some((function(e){return o.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())):o.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(e){o.isDraggingNativeItem()&&e.preventDefault(),o.enterLeaveCounter.leave(e.target)&&o.isDraggingNativeItem()&&setTimeout((function(){return o.endDragNativeItem()}),0)},this.handleTopDropCapture=function(e){var t;(o.dropTargetIds=[],o.isDraggingNativeItem())&&(e.preventDefault(),null===(t=o.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));o.enterLeaveCounter.reset()},this.handleTopDrop=function(e){var t=o.dropTargetIds;o.dropTargetIds=[],o.actions.hover(t,{clientOffset:d(e)}),o.actions.drop({dropEffect:o.getCurrentDropEffect()}),o.isDraggingNativeItem()?o.endDragNativeItem():o.monitor.isDragging()&&o.actions.endDrag()},this.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new I(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new a(this.isNodeInDocument)}var t,r,o;return t=e,(r=[{key:"profile",value:function(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}},{key:"teardown",value:function(){var e,t=this.rootElement;void 0!==t&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(e=this.window)||void 0===e||e.cancelAnimationFrame(this.asyncEndDragFrameId)))}},{key:"connectDragPreview",value:function(e,t,r){var n=this;return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),function(){n.sourcePreviewNodes.delete(e),n.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,r){var n=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);var o=function(t){return n.handleDragStart(t,e)},i=function(e){return n.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",o),t.addEventListener("selectstart",i),function(){n.sourceNodes.delete(e),n.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var r=this,n=function(t){return r.handleDragEnter(t,e)},o=function(t){return r.handleDragOver(t,e)},i=function(t){return r.handleDrop(t,e)};return t.addEventListener("dragenter",n),t.addEventListener("dragover",o),t.addEventListener("drop",i),function(){t.removeEventListener("dragenter",n),t.removeEventListener("dragover",o),t.removeEventListener("drop",i)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return C({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return C({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(n).some((function(t){return n[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var r=new D(O[e]);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){var e;return null===(e=t.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){var e;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}}])&&P(t.prototype,r),o&&P(t,o),e}(),M=r(8195);!function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"}(j||(j={}));var N=1,A=0;function R(e){return void 0===e.button||e.button===A}function L(e){return!!e.targetTouches}function H(e,t){return L(e)?function(e,t){return 1===e.targetTouches.length?H(e.targetTouches[0]):t&&1===e.touches.length&&e.touches[0].target===t.target?H(e.touches[0]):void 0}(e,t):{x:e.clientX,y:e.clientY}}var U=function(){var e=!1;try{addEventListener("test",(function(){}),Object.defineProperty({},"passive",{get:function(){return e=!0,!0}}))}catch(e){}return e}();function F(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var B,W=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.enableTouchEvents=!0,this.enableMouseEvents=!1,this.enableKeyboardEvents=!1,this.ignoreContextMenu=!1,this.enableHoverOutsideTarget=!1,this.touchSlop=0,this.scrollAngleRanges=void 0,this.context=r,this.delayTouchStart=t.delayTouchStart||t.delay||0,this.delayMouseStart=t.delayMouseStart||t.delay||0,Object.keys(t).forEach((function(e){null!=t[e]&&(n[e]=t[e])}))}var t,r,n;return t=e,(r=[{key:"window",get:function(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){var e;return null!==(e=this.context)&&void 0!==e&&e.document?this.context.document:this.window?this.window.document:void 0}}])&&F(t.prototype,r),n&&F(t,n),e}();function $(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var q=(Y(B={},j.mouse,{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"}),Y(B,j.touch,{start:"touchstart",move:"touchmove",end:"touchend"}),Y(B,j.keyboard,{keydown:"keydown"}),B),G=function(){function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getSourceClientOffset=function(e){var t=o.sourceNodes.get(e);return t&&function(e){var t=1===e.nodeType?e:e.parentElement;if(t){var r=t.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}}(t)},this.handleTopMoveStartCapture=function(e){R(e)&&(o.moveStartSourceIds=[])},this.handleMoveStart=function(e){Array.isArray(o.moveStartSourceIds)&&o.moveStartSourceIds.unshift(e)},this.handleTopMoveStart=function(e){if(R(e)){var t=H(e);t&&(L(e)&&(o.lastTargetTouchFallback=e.targetTouches[0]),o._mouseClientOffset=t),o.waitingForDelay=!1}},this.handleTopMoveStartDelay=function(e){if(R(e)){var t=e.type===q.touch.start?o.options.delayTouchStart:o.options.delayMouseStart;o.timeout=setTimeout(o.handleTopMoveStart.bind(o,e),t),o.waitingForDelay=!0}},this.handleTopMoveCapture=function(){o.dragOverTargetIds=[]},this.handleMove=function(e,t){o.dragOverTargetIds&&o.dragOverTargetIds.unshift(t)},this.handleTopMove=function(e){if(o.timeout&&clearTimeout(o.timeout),o.document&&!o.waitingForDelay){var t,r,n,i,a=o.moveStartSourceIds,u=o.dragOverTargetIds,s=o.options.enableHoverOutsideTarget,c=H(e,o.lastTargetTouchFallback);if(c)if(o._isScrolling||!o.monitor.isDragging()&&function(e,t,r,n,o){if(!o)return!1;for(var i=180*Math.atan2(n-t,r-e)/Math.PI+180,a=0;a<o.length;++a)if((null==o[a].start||i>=o[a].start)&&(null==o[a].end||i<=o[a].end))return!0;return!1}(o._mouseClientOffset.x||0,o._mouseClientOffset.y||0,c.x,c.y,o.options.scrollAngleRanges))o._isScrolling=!0;else if(!o.monitor.isDragging()&&o._mouseClientOffset.hasOwnProperty("x")&&a&&(t=o._mouseClientOffset.x||0,r=o._mouseClientOffset.y||0,n=c.x,i=c.y,Math.sqrt(Math.pow(Math.abs(n-t),2)+Math.pow(Math.abs(i-r),2))>(o.options.touchSlop?o.options.touchSlop:0))&&(o.moveStartSourceIds=void 0,o.actions.beginDrag(a,{clientOffset:o._mouseClientOffset,getSourceClientOffset:o.getSourceClientOffset,publishSource:!1})),o.monitor.isDragging()){var l=o.sourceNodes.get(o.monitor.getSourceId());o.installSourceNodeRemovalObserver(l),o.actions.publishDragSource(),e.cancelable&&e.preventDefault();var f=(u||[]).map((function(e){return o.targetNodes.get(e)})).filter((function(e){return!!e})),d=o.options.getDropTargetElementsAtPoint?o.options.getDropTargetElementsAtPoint(c.x,c.y,f):o.document.elementsFromPoint(c.x,c.y),p=[];for(var h in d)if(d.hasOwnProperty(h)){var g=d[h];for(p.push(g);g;)(g=g.parentElement)&&-1===p.indexOf(g)&&p.push(g)}var v=p.filter((function(e){return f.indexOf(e)>-1})).map((function(e){return o._getDropTargetId(e)})).filter((function(e){return!!e})).filter((function(e,t,r){return r.indexOf(e)===t}));if(s)for(var y in o.targetNodes){var b=o.targetNodes.get(y);if(l&&b&&b.contains(l)&&-1===v.indexOf(y)){v.unshift(y);break}}v.reverse(),o.actions.hover(v,{clientOffset:c})}}},this._getDropTargetId=function(e){for(var t=o.targetNodes.keys(),r=t.next();!1===r.done;){var n=r.value;if(e===o.targetNodes.get(n))return n;r=t.next()}},this.handleTopMoveEndCapture=function(e){o._isScrolling=!1,o.lastTargetTouchFallback=void 0,function(e){return void 0===e.buttons||0==(e.buttons&N)}(e)&&(o.monitor.isDragging()&&!o.monitor.didDrop()?(e.cancelable&&e.preventDefault(),o._mouseClientOffset={},o.uninstallSourceNodeRemovalObserver(),o.actions.drop(),o.actions.endDrag()):o.moveStartSourceIds=void 0)},this.handleCancelOnEscape=function(e){"Escape"===e.key&&o.monitor.isDragging()&&(o._mouseClientOffset={},o.uninstallSourceNodeRemovalObserver(),o.actions.endDrag())},this.options=new W(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(j.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(j.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(j.keyboard)}var t,r,n;return t=e,(r=[{key:"profile",value:function(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(null===(e=this.dragOverTargetIds)||void 0===e?void 0:e.length)||0}}},{key:"document",get:function(){return this.options.document}},{key:"setup",value:function(){this.document&&((0,M.k)(!e.isSetUp,"Cannot have two Touch backends at the same time."),e.isSetUp=!0,this.addEventListener(this.document,"start",this.getTopMoveStartHandler()),this.addEventListener(this.document,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(this.document,"move",this.handleTopMove),this.addEventListener(this.document,"move",this.handleTopMoveCapture,!0),this.addEventListener(this.document,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(this.document,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(this.document,"keydown",this.handleCancelOnEscape,!0))}},{key:"teardown",value:function(){this.document&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(this.document,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(this.document,"start",this.handleTopMoveStart),this.removeEventListener(this.document,"move",this.handleTopMoveCapture,!0),this.removeEventListener(this.document,"move",this.handleTopMove),this.removeEventListener(this.document,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(this.document,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(this.document,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}},{key:"addEventListener",value:function(e,t,r,n){var o=U?{capture:n,passive:!1}:n;this.listenerTypes.forEach((function(n){var i=q[n][t];i&&e.addEventListener(i,r,o)}))}},{key:"removeEventListener",value:function(e,t,r,n){var o=U?{capture:n,passive:!1}:n;this.listenerTypes.forEach((function(n){var i=q[n][t];i&&e.removeEventListener(i,r,o)}))}},{key:"connectDragSource",value:function(e,t){var r=this,n=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,"start",n),function(){r.sourceNodes.delete(e),r.removeEventListener(t,"start",n)}}},{key:"connectDragPreview",value:function(e,t,r){var n=this;return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),function(){n.sourcePreviewNodes.delete(e),n.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDropTarget",value:function(e,t){var r=this;if(!this.document)return function(){};var n=function(n){if(r.document&&r.monitor.isDragging()){var o;switch(n.type){case q.mouse.move:o={x:n.clientX,y:n.clientY};break;case q.touch.move:o={x:n.touches[0].clientX,y:n.touches[0].clientY}}var i=null!=o?r.document.elementFromPoint(o.x,o.y):void 0,a=i&&t.contains(i);return i===t||a?r.handleMove(n,e):void 0}};return this.addEventListener(this.document.body,"move",n),this.targetNodes.set(e,t),function(){r.document&&(r.targetNodes.delete(e),r.removeEventListener(r.document.body,"move",n))}}},{key:"getTopMoveStartHandler",value:function(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}},{key:"installSourceNodeRemovalObserver",value:function(e){var t=this;this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver((function(){e&&!e.parentElement&&(t.resurrectSourceNode(),t.uninstallSourceNodeRemovalObserver())})),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}},{key:"resurrectSourceNode",value:function(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}},{key:"uninstallSourceNodeRemovalObserver",value:function(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}}])&&$(t.prototype,r),n&&$(t,n),e}(),K=r(4967),X={backends:[{id:"html5",backend:function(e,t,r){return new _(e,t,r)},transition:K.Tb},{id:"touch",backend:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new G(e,t,r)},options:{enableMouseEvents:!0},preview:!0,transition:K.R}]}},6408:(e,t,r)=>{"use strict";var n;function o(){return n||((n=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),n}r.d(t,{r:()=>o})},3928:(e,t,r)=>{"use strict";r.d(t,{WG:()=>dt});var n=r(4967),o=r(7294),i=r(5893),a=r(8195),u="dnd-core/INIT_COORDS",s="dnd-core/BEGIN_DRAG",c="dnd-core/PUBLISH_DRAG_SOURCE",l="dnd-core/HOVER",f="dnd-core/DROP",d="dnd-core/END_DRAG";function p(e,t){return{type:u,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function g(e,t,r){return t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:r||null}),e)}function v(e,t){return e.filter((function(e){return e!==t}))}function y(e){return"object"===h(e)}function b(e,t){var r=new Map,n=function(e){r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);var o=[];return r.forEach((function(e,t){1===e&&o.push(t)})),o}var m={type:u,payload:{clientOffset:null,sourceClientOffset:null}};function w(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},n=r.publishSource,o=void 0===n||n,i=r.clientOffset,a=r.getSourceClientOffset,u=e.getMonitor(),c=e.getRegistry();e.dispatch(p(i)),O(t,u,c);var l=k(t,u);if(null!==l){var f=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");S(a),f=a(l)}e.dispatch(p(i,f));var d=c.getSource(l),h=d.beginDrag(u,l);D(h),c.pinSource(l);var g=c.getSourceType(l);return{type:s,payload:{itemType:g,item:h,sourceId:l,clientOffset:i||null,sourceClientOffset:f||null,isSourcePublic:!!o}}}e.dispatch(m)}}function O(e,t,r){(0,a.k)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){(0,a.k)(r.getSource(e),"Expected sourceIds to be registered.")}))}function S(e){(0,a.k)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function D(e){(0,a.k)(y(e),"Item must be an object.")}function k(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function T(e){return function(){if(e.getMonitor().isDragging())return{type:c}}}function I(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function E(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.clientOffset;C(t);var o=t.slice(0),i=e.getMonitor(),a=e.getRegistry();x(o,i,a);var u=i.getItemType();return P(o,a,u),j(o,i,a),{type:l,payload:{targetIds:o,clientOffset:n||null}}}}function C(e){(0,a.k)(Array.isArray(e),"Expected targetIds to be an array.")}function x(e,t,r){(0,a.k)(t.isDragging(),"Cannot call hover while not dragging."),(0,a.k)(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var o=e[n];(0,a.k)(e.lastIndexOf(o)===n,"Expected targetIds to be unique in the passed array.");var i=r.getTarget(o);(0,a.k)(i,"Expected targetIds to be registered.")}}function P(e,t,r){for(var n=e.length-1;n>=0;n--){var o=e[n];I(t.getTargetType(o),r)||e.splice(n,1)}}function j(e,t,r){e.forEach((function(e){r.getTarget(e).hover(t,e)}))}function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){N(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.getMonitor(),n=e.getRegistry();R(r);var o=H(r);o.forEach((function(o,i){var a=L(o,i,n,r),u={type:f,payload:{dropResult:M(M({},t),a)}};e.dispatch(u)}))}}function R(e){(0,a.k)(e.isDragging(),"Cannot call drop while not dragging."),(0,a.k)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function L(e,t,r,n){var o=r.getTarget(e),i=o?o.drop(n,e):void 0;return function(e){(0,a.k)(void 0===e||y(e),"Drop result must either be an object or undefined.")}(i),void 0===i&&(i=0===t?{}:n.getDropResult()),i}function H(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function U(e){return function(){var t=e.getMonitor(),r=e.getRegistry();!function(e){(0,a.k)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var n=t.getSourceId();null!=n&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource());return{type:d}}}function F(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var B=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isSetUp=!1,this.handleRefCountChange=function(){var e=n.store.getState().refCount>0;n.backend&&(e&&!n.isSetUp?(n.backend.setup(),n.isSetUp=!0):!e&&n.isSetUp&&(n.backend.teardown(),n.isSetUp=!1))},this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}var t,r,n;return t=e,r=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,r=function(e){return{beginDrag:w(e),publishDragSource:T(e),hover:E(e),drop:A(e),endDrag:U(e)}}(this);return Object.keys(r).reduce((function(n,o){var i,a=r[o];return n[o]=(i=a,function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var a=i.apply(e,n);void 0!==a&&t(a)}),n}),{})}},{key:"dispatch",value:function(e){this.store.dispatch(e)}}],r&&F(t.prototype,r),n&&F(t,n),e}();function W(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var $="function"==typeof Symbol&&Symbol.observable||"@@observable",Y=function(){return Math.random().toString(36).substring(7).split("").join(".")},q={INIT:"@@redux/INIT"+Y(),REPLACE:"@@redux/REPLACE"+Y(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Y()}};function G(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function K(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(W(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(W(1));return r(K)(e,t)}if("function"!=typeof e)throw new Error(W(2));var o=e,i=t,a=[],u=a,s=!1;function c(){u===a&&(u=a.slice())}function l(){if(s)throw new Error(W(3));return i}function f(e){if("function"!=typeof e)throw new Error(W(4));if(s)throw new Error(W(5));var t=!0;return c(),u.push(e),function(){if(t){if(s)throw new Error(W(6));t=!1,c();var r=u.indexOf(e);u.splice(r,1),a=null}}}function d(e){if(!G(e))throw new Error(W(7));if(void 0===e.type)throw new Error(W(8));if(s)throw new Error(W(9));try{s=!0,i=o(i,e)}finally{s=!1}for(var t=a=u,r=0;r<t.length;r++){(0,t[r])()}return e}function p(e){if("function"!=typeof e)throw new Error(W(10));o=e,d({type:q.REPLACE})}function h(){var e,t=f;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(W(11));function r(){e.next&&e.next(l())}return r(),{unsubscribe:t(r)}}})[$]=function(){return this},e}return d({type:q.INIT}),(n={dispatch:d,subscribe:f,getState:l,replaceReducer:p})[$]=h,n}var X=function(e,t){return e===t};function Z(e,t){return!e&&!t||!(!e||!t)&&(e.x===t.x&&e.y===t.y)}function z(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:X;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){Q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ee={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case u:case s:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case l:return Z(e.clientOffset,r.clientOffset)?e:J(J({},e),{},{clientOffset:r.clientOffset});case d:case f:return ee;default:return e}}var re="dnd-core/ADD_SOURCE",ne="dnd-core/ADD_TARGET",oe="dnd-core/REMOVE_SOURCE",ie="dnd-core/REMOVE_TARGET";function ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(r),!0).forEach((function(t){se(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function se(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ce={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case s:return ue(ue({},e),{},{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case c:return ue(ue({},e),{},{isSourcePublic:!0});case l:return ue(ue({},e),{},{targetIds:r.targetIds});case ie:return-1===e.targetIds.indexOf(r.targetId)?e:ue(ue({},e),{},{targetIds:v(e.targetIds,r.targetId)});case f:return ue(ue({},e),{},{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case d:return ue(ue({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case re:case ne:return e+1;case oe:case ie:return e-1;default:return e}}var de=[],pe=[];function he(e,t){return e!==de&&(e===pe||void 0===t||(r=e,t.filter((function(e){return r.indexOf(e)>-1}))).length>0);var r}function ge(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case l:break;case re:case ne:case ie:case oe:return de;default:return pe}var t=e.payload,r=t.targetIds,n=void 0===r?[]:r,o=t.prevTargetIds,i=void 0===o?[]:o,a=b(n,i),u=a.length>0||!z(n,i);if(!u)return de;var s=i[i.length-1],c=n[n.length-1];return s!==c&&(s&&a.push(s),c&&a.push(c)),a}function ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}function ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(r),!0).forEach((function(t){me(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function me(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function we(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:ge(e.dirtyHandlerIds,{type:t.type,payload:be(be({},t.payload),{},{prevTargetIds:g(e,"dragOperation.targetIds",[])})}),dragOffset:te(e.dragOffset,t),refCount:fe(e.refCount,t),dragOperation:le(e.dragOperation,t),stateId:ve(e.stateId)}}function Oe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Se(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}de.__IS_NONE__=!0,pe.__IS_ALL__=!0;var De,ke=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t,this.registry=r}var t,r,n;return t=e,r=[{key:"subscribeToStateChange",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},n=r.handlerIds;(0,a.k)("function"==typeof e,"listener must be a function."),(0,a.k)(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId,i=function(){var r=t.store.getState(),i=r.stateId;try{i===o||i===o+1&&!he(r.dirtyHandlerIds,n)||e()}finally{o=i}};return this.store.subscribe(i)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,a.k)("function"==typeof e,"listener must be a function.");var r=this.store.getState().dragOffset;return this.store.subscribe((function(){var n=t.store.getState().dragOffset;n!==r&&(r=n,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return(0,a.k)(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return(0,a.k)(t,"Expected to find a valid target. targetId=".concat(e)),!(!this.isDragging()||this.didDrop())&&I(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return(0,a.k)(t,"Expected to find a valid source. sourceId=".concat(e)),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var r=t.shallow;if(!this.isDragging())return!1;var n=this.registry.getTargetType(e),o=this.getItemType();if(o&&!I(n,o))return!1;var i=this.getTargetIds();if(!i.length)return!1;var a=i.indexOf(e);return r?a===i.length-1:a>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return e=this.store.getState().dragOffset,n=e.clientOffset,o=e.initialClientOffset,i=e.initialSourceClientOffset,n&&o&&i?Oe((r=i,{x:(t=n).x+r.x,y:t.y+r.y}),o):null;var e,t,r,n,o,i}},{key:"getDifferenceFromInitialOffset",value:function(){return e=this.store.getState().dragOffset,t=e.clientOffset,r=e.initialClientOffset,t&&r?Oe(t,r):null;var e,t,r}}],r&&Se(t.prototype,r),n&&Se(t,n),e}(),Te=0;function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Ee(e,t){t&&Array.isArray(e)?e.forEach((function(e){return Ee(e,!1)})):(0,a.k)("string"==typeof e||"symbol"===Ie(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}function Ce(e){Pe.length||(xe(),!0),Pe[Pe.length]=e}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(De||(De={}));var xe,Pe=[],je=0;function _e(){for(;je<Pe.length;){var e=je;if(je+=1,Pe[e].call(),je>1024){for(var t=0,r=Pe.length-je;t<r;t++)Pe[t]=Pe[t+je];Pe.length-=je,je=0}}Pe.length=0,je=0,!1}var Me,Ne,Ae,Re=void 0!==r.g?r.g:self,Le=Re.MutationObserver||Re.WebKitMutationObserver;function He(e){return function(){var t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}"function"==typeof Le?(Me=1,Ne=new Le(_e),Ae=document.createTextNode(""),Ne.observe(Ae,{characterData:!0}),xe=function(){Me=-Me,Ae.data=Me}):xe=He(_e),Ce.requestFlush=xe,Ce.makeRequestCallFromTimer=He;var Ue=[],Fe=[],Be=Ce.makeRequestCallFromTimer((function(){if(Fe.length)throw Fe.shift()}));function We(e){var t;(t=Ue.length?Ue.pop():new $e).task=e,Ce(t)}var $e=function(){function e(){}return e.prototype.call=function(){try{this.task.call()}catch(e){We.onerror?We.onerror(e):(Fe.push(e),Be())}finally{this.task=null,Ue[Ue.length]=this}},e}();function Ye(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ge(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ge(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ke(e){var t=(Te++).toString();switch(e){case De.SOURCE:return"S".concat(t);case De.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}function Xe(e){switch(e[0]){case"S":return De.SOURCE;case"T":return De.TARGET;default:(0,a.k)(!1,"Cannot parse handler ID: ".concat(e))}}function Ze(e,t){var r=e.entries(),n=!1;do{var o=r.next(),i=o.done;if(qe(o.value,2)[1]===t)return!0;n=!!i}while(!n);return!1}var ze=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}var t,r,n;return t=e,r=[{key:"addSource",value:function(e,t){Ee(e),function(e){(0,a.k)("function"==typeof e.canDrag,"Expected canDrag to be a function."),(0,a.k)("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),(0,a.k)("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);var r=this.addHandler(De.SOURCE,e,t);return this.store.dispatch(function(e){return{type:re,payload:{sourceId:e}}}(r)),r}},{key:"addTarget",value:function(e,t){Ee(e,!0),function(e){(0,a.k)("function"==typeof e.canDrop,"Expected canDrop to be a function."),(0,a.k)("function"==typeof e.hover,"Expected hover to be a function."),(0,a.k)("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);var r=this.addHandler(De.TARGET,e,t);return this.store.dispatch(function(e){return{type:ne,payload:{targetId:e}}}(r)),r}},{key:"containsHandler",value:function(e){return Ze(this.dragSources,e)||Ze(this.dropTargets,e)}},{key:"getSource",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,a.k)(this.isSourceId(e),"Expected a valid source ID.");var r=t&&e===this.pinnedSourceId,n=r?this.pinnedSource:this.dragSources.get(e);return n}},{key:"getTarget",value:function(e){return(0,a.k)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return(0,a.k)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return(0,a.k)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return Xe(e)===De.SOURCE}},{key:"isTargetId",value:function(e){return Xe(e)===De.TARGET}},{key:"removeSource",value:function(e){var t=this;(0,a.k)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:oe,payload:{sourceId:e}}}(e)),We((function(){t.dragSources.delete(e),t.types.delete(e)}))}},{key:"removeTarget",value:function(e){(0,a.k)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:ie,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);(0,a.k)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){(0,a.k)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,r){var n=Ke(e);return this.types.set(n,t),e===De.SOURCE?this.dragSources.set(n,r):e===De.TARGET&&this.dropTargets.set(n,r),n}}],r&&Ye(t.prototype,r),n&&Ye(t,n),e}();function Ve(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Je(n),i=new ke(o,new ze(o)),a=new B(o,i),u=e(a,t,r);return a.receiveBackend(u),a}function Je(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return K(we,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var Qe=r(4566);function et(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rt(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var nt=0,ot=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),it=(0,o.memo)((function(e){var t=e.children,r=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:at(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=t;o[ot]||(o[ot]={dragDropManager:Ve(e,t,r,n)});return o[ot]}(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}(rt(e,["children"])),n=et(r,2),a=n[0],u=n[1];return(0,o.useEffect)((function(){if(u){var e=at();return++nt,function(){0==--nt&&(e[ot]=null)}}}),[]),(0,i.jsx)(Qe.L.Provider,Object.assign({value:a},{children:t}),void 0)}));function at(){return void 0!==r.g?r.g:window}function ut(){return ut=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ut.apply(this,arguments)}function st(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ct(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ct(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lt(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var ft=(0,o.createContext)(null),dt=function(e){var t=e.portal,r=lt(e,["portal"]),i=st((0,o.useState)(null),2),a=i[0],u=i[1];return o.createElement(ft.Provider,{value:null!=t?t:a},o.createElement(it,ut({backend:n.Am},r)),t?null:o.createElement("div",{ref:u}))},pt=r(3935);var ht=r(5047),gt="undefined"!=typeof window?o.useLayoutEffect:o.useEffect;function vt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wt(e){var t=function(){var e=(0,o.useContext)(Qe.L).dragDropManager;return(0,a.k)(null!=e,"Expected drag drop context"),e}().getMonitor(),r=function(e,t,r){var n=vt((0,o.useState)((function(){return t(e)})),2),i=n[0],a=n[1],u=(0,o.useCallback)((function(){var n=t(e);(0,ht.w)(i,n)||(a(n),r&&r())}),[i,e,r]);return gt(u,[]),[i,u]}(t,e),n=bt(r,2),i=n[0],u=n[1];return(0,o.useEffect)((function(){return t.subscribeToOffsetChange(u)})),(0,o.useEffect)((function(){return t.subscribeToStateChange(u)})),i}var Ot=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},St=function(e,t){var r=e.getClientOffset();if(null===r)return null;if(!t.current||!t.current.getBoundingClientRect)return Ot(r,function(e){var t=e.getInitialClientOffset(),r=e.getInitialSourceClientOffset();return null===t||null===r||void 0===t.x||void 0===t.y?{x:0,y:0}:Ot(t,r)}(e));var n=t.current.getBoundingClientRect(),o={x:n.width/2,y:n.height/2};return Ot(r,o)},Dt=(0,o.createContext)(void 0);function kt(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Tt=function(e){var t=function(){var e,t,r=(0,o.useRef)(null),n=wt((function(e){return{currentOffset:St(e,r),isDragging:e.isDragging(),itemType:e.getItemType(),item:e.getItem(),monitor:e}}));return n.isDragging&&null!==n.currentOffset?{display:!0,itemType:n.itemType,item:n.item,style:(e=n.currentOffset,t="translate(".concat(e.x,"px, ").concat(e.y,"px)"),{pointerEvents:"none",position:"fixed",top:0,left:0,transform:t,WebkitTransform:t}),monitor:n.monitor,ref:r}:{display:!1}}();if(!t.display)return null;t.display;var r,n=kt(t,["display"]);return r="children"in e&&"function"==typeof e.children?e.children(n):"children"in e?e.children:e.generator(n),o.createElement(Dt.Provider,{value:n},r)};function It(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Et(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Et(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Et(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}(function(e){var t=function(){var e=It((0,o.useState)(!1),2),t=e[0],r=e[1],n=(0,o.useContext)(Qe.L);return(0,o.useEffect)((function(){var e,t=null==n||null===(e=n.dragDropManager)||void 0===e?void 0:e.getBackend(),o={backendChanged:function(e){r(e.previewEnabled())}};return r(t.previewEnabled()),t.previewsList().register(o),function(){t.previewsList().unregister(o)}}),[n,n.dragDropManager]),t}(),r=(0,o.useContext)(ft);if(!t)return null;var n=o.createElement(Tt,e);return null!==r?(0,pt.createPortal)(n,r):n}).Context=Dt},4566:(e,t,r)=>{"use strict";r.d(t,{L:()=>n});var n=(0,r(7294).createContext)({dragDropManager:void 0})},6436:(e,t,r)=>{"use strict";r.d(t,{E:()=>O});var n=r(8195),o=r(898),i=r(1618),a=r(5047);function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=(0,o.p)({dragSource:function(e,t){r.clearDragSource(),r.dragSourceOptions=t||null,(0,i.d)(e)?r.dragSourceRef=e:r.dragSourceNode=e,r.reconnectDragSource()},dragPreview:function(e,t){r.clearDragPreview(),r.dragPreviewOptions=t||null,(0,i.d)(e)?r.dragPreviewRef=e:r.dragPreviewNode=e,r.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t,r,n;return t=e,(r=[{key:"receiveHandlerId",value:function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();t&&this.disconnectDragSource(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)):this.lastConnectedDragSource=e)}},{key:"reconnectDragPreview",value:function(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();t&&this.disconnectDragPreview(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.lastConnectedDragPreview=e)}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!(0,a.w)(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!(0,a.w)(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}])&&u(t.prototype,r),n&&u(t,n),e}();function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var l=!1,f=!1,d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t,r,o;return t=e,(r=[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){(0,n.k)(!l,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return l=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{l=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;(0,n.k)(!f,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return f=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{f=!1}}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"isDraggingSource",value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:"isOverTarget",value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:"canDragSource",value:function(e){return this.internalMonitor.canDragSource(e)}},{key:"canDropOnTarget",value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&c(t.prototype,r),o&&c(t,o),e}(),p=r(5934),h=r(9396),g=r(14);function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var y=["canDrag","beginDrag","isDragging","endDrag"],b=["beginDrag"],m=function(){function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=null,this.beginDrag=function(){if(o.props)return o.spec.beginDrag(o.props,o.monitor,o.ref.current)},this.spec=t,this.monitor=r,this.ref=n}var t,r,n;return t=e,(r=[{key:"receiveProps",value:function(e){this.props=e}},{key:"canDrag",value:function(){return!!this.props&&(!this.spec.canDrag||this.spec.canDrag(this.props,this.monitor))}},{key:"isDragging",value:function(e,t){return!!this.props&&(this.spec.isDragging?this.spec.isDragging(this.props,this.monitor):t===e.getSourceId())}},{key:"endDrag",value:function(){this.props&&this.spec.endDrag&&this.spec.endDrag(this.props,this.monitor,(0,h.Al)(this.ref))}}])&&v(t.prototype,r),n&&v(t,n),e}();function w(e){return Object.keys(e).forEach((function(t){(0,n.k)(y.indexOf(t)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',y.join(", "),t),(0,n.k)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),b.forEach((function(t){(0,n.k)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),function(t,r){return new m(e,t,r)}}function O(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};(0,h.U9)("DragSource","type, spec, collect[, options]",e,t,r,o);var i=e;"function"!=typeof e&&((0,n.k)((0,h.m5)(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',e),i=function(){return e}),(0,n.k)((0,h.PO)(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',t);var a=w(t);return(0,n.k)("function"==typeof r,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',r),(0,n.k)((0,h.PO)(o),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',r),function(e){return(0,g.K)({containerDisplayName:"DragSource",createHandler:a,registerHandler:p.w,createConnector:function(e){return new s(e)},createMonitor:function(e){return new d(e)},DecoratedComponent:e,getType:i,collect:r,options:o})}}},4387:(e,t,r)=>{"use strict";r.d(t,{G:()=>m});var n=r(8195);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=!1,a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t,r,a;return t=e,(r=[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;(0,n.k)(!i,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return i=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{i=!1}}},{key:"isOver",value:function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&o(t.prototype,r),a&&o(t,a),e}(),u=r(5047),s=r(898),c=r(1618);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var f=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=(0,s.p)({dropTarget:function(e,t){r.clearDropTarget(),r.dropTargetOptions=t,(0,c.d)(e)?r.dropTargetRef=e:r.dropTargetNode=e,r.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t,r,n;return t=e,(r=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}},{key:"receiveHandlerId",value:function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!(0,u.w)(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}])&&l(t.prototype,r),n&&l(t,n),e}(),d=r(5934),p=r(9396),h=r(14);function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var v=["canDrop","hover","drop"],y=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=null,this.spec=t,this.monitor=r,this.ref=n}var t,r,n;return t=e,(r=[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"canDrop",value:function(){return!this.spec.canDrop||this.spec.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){this.spec.hover&&this.props&&this.spec.hover(this.props,this.monitor,(0,p.Al)(this.ref))}},{key:"drop",value:function(){if(this.spec.drop)return this.spec.drop(this.props,this.monitor,this.ref.current)}}])&&g(t.prototype,r),n&&g(t,n),e}();function b(e){return Object.keys(e).forEach((function(t){(0,n.k)(v.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',v.join(", "),t),(0,n.k)("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target",t,t,e[t])})),function(t,r){return new y(e,t,r)}}function m(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};(0,p.U9)("DropTarget","type, spec, collect[, options]",e,t,r,o);var i=e;"function"!=typeof e&&((0,n.k)((0,p.m5)(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',e),i=function(){return e}),(0,n.k)((0,p.PO)(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',t);var u=b(t);return(0,n.k)("function"==typeof r,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',r),(0,n.k)((0,p.PO)(o),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',r),function(e){return(0,h.K)({containerDisplayName:"DropTarget",createHandler:u,registerHandler:d.n,createMonitor:function(e){return new a(e)},createConnector:function(e){return new f(e)},DecoratedComponent:e,getType:i,collect:r,options:o})}}},14:(e,t,r)=>{"use strict";r.d(t,{K:()=>T});var n=r(5893),o=r(7294),i=r(5047),a=r(8195),u=r(4566),s=r(9396);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}var d=function(){function e(t){c(this,e),this.isDisposed=!1,this.action=(0,s.mf)(t)?t:s.ZT}return f(e,[{key:"dispose",value:function(){this.isDisposed||(this.action(),this.isDisposed=!0)}}],[{key:"isDisposable",value:function(e){return Boolean(e&&(0,s.mf)(e.dispose))}},{key:"_fixup",value:function(t){return e.isDisposable(t)?t:e.empty}},{key:"create",value:function(t){return new e(t)}}]),e}();d.empty={dispose:s.ZT};var p=function(){function e(){c(this,e),this.isDisposed=!1;for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.disposables=r}return f(e,[{key:"add",value:function(e){this.isDisposed?e.dispose():this.disposables.push(e)}},{key:"remove",value:function(e){var t=!1;if(!this.isDisposed){var r=this.disposables.indexOf(e);-1!==r&&(t=!0,this.disposables.splice(r,1),e.dispose())}return t}},{key:"clear",value:function(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),r=0;r<e;r++)t[r]=this.disposables[r];this.disposables=[];for(var n=0;n<e;n++)t[n].dispose()}}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;for(var e=this.disposables.length,t=new Array(e),r=0;r<e;r++)t[r]=this.disposables[r];this.disposables=[];for(var n=0;n<e;n++)t[n].dispose()}}}]),e}(),h=function(){function e(){c(this,e),this.isDisposed=!1}return f(e,[{key:"getDisposable",value:function(){return this.current}},{key:"setDisposable",value:function(e){var t=this.isDisposed;if(!t){var r=this.current;this.current=e,r&&r.dispose()}t&&e&&e.dispose()}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=void 0,e&&e.dispose()}}}]),e}(),g=r(8679),v=r.n(g);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function O(e,t){return O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},O(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=k(e);if(t){var o=k(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return D(this,r)}}function D(e,t){return!t||"object"!==y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function T(e){var t=e.DecoratedComponent,r=e.createHandler,c=e.createMonitor,l=e.createConnector,f=e.registerHandler,g=e.containerDisplayName,y=e.getType,m=e.collect,D=e.options.arePropsEqual,k=void 0===D?i.w:D,T=t,I=t.displayName||t.name||"Component",E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}(E,e);var t,g,v,D=S(E);function E(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),(t=D.call(this,e)).decoratedRef=(0,o.createRef)(),t.handleChange=function(){var e=t.getCurrentState();(0,i.w)(e,t.state)||t.setState(e)},t.disposable=new h,t.receiveProps(e),t.dispose(),t}return t=E,(g=[{key:"getHandlerId",value:function(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function(){return(0,a.k)(this.decoratedRef.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.decoratedRef.current}},{key:"shouldComponentUpdate",value:function(e,t){return!k(e,this.props)||!(0,i.w)(t,this.state)}},{key:"componentDidMount",value:function(){this.disposable=new h,this.currentType=void 0,this.receiveProps(this.props),this.handleChange()}},{key:"componentDidUpdate",value:function(e){k(this.props,e)||(this.receiveProps(this.props),this.handleChange())}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"receiveProps",value:function(e){this.handler&&(this.handler.receiveProps(e),this.receiveType(y(e)))}},{key:"receiveType",value:function(e){if(this.handlerMonitor&&this.manager&&this.handlerConnector&&e!==this.currentType){this.currentType=e;var t=b(f(e,this.handler,this.manager),2),r=t[0],n=t[1];this.handlerId=r,this.handlerMonitor.receiveHandlerId(r),this.handlerConnector.receiveHandlerId(r);var o=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[r]});this.disposable.setDisposable(new p(new d(o),new d(n)))}}},{key:"dispose",value:function(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)}},{key:"getCurrentState",value:function(){return this.handlerConnector?m(this.handlerConnector.hooks,this.handlerMonitor,this.props):{}}},{key:"render",value:function(){var e=this;return(0,n.jsx)(u.L.Consumer,{children:function(t){var r=t.dragDropManager;return e.receiveDragDropManager(r),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame((function(){var t;return null===(t=e.handlerConnector)||void 0===t?void 0:t.reconnect()})),(0,n.jsx)(T,Object.assign({},e.props,e.getCurrentState(),{ref:(0,s.J7)(T)?e.decoratedRef:null}),void 0)}},void 0)}},{key:"receiveDragDropManager",value:function(e){void 0===this.manager&&((0,a.k)(void 0!==e,"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",I,I),void 0!==e&&(this.manager=e,this.handlerMonitor=c(e),this.handlerConnector=l(e.getBackend()),this.handler=r(this.handlerMonitor,this.decoratedRef)))}}])&&w(t.prototype,g),v&&w(t,v),E}(o.Component);return E.DecoratedComponent=t,E.displayName="".concat(g,"(").concat(I,")"),v()(E,t)}},9396:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){var t=e.current;return null==t?null:t.decoratedRef?t.decoratedRef.current:t}function i(e){return(t=e)&&t.prototype&&"function"==typeof t.prototype.render||function(e){var t,r=e;return"Symbol(react.forward_ref)"===(null==r||null===(t=r.$$typeof)||void 0===t?void 0:t.toString())}(e);var t}function a(e,t){}function u(e){return"function"==typeof e}function s(){}function c(e){if(!function(e){return"object"===n(e)&&null!==e}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function l(e,t){return"string"==typeof e||"symbol"===n(e)||!!t&&Array.isArray(e)&&e.every((function(e){return l(e,!1)}))}r.d(t,{Al:()=>o,J7:()=>i,U9:()=>a,mf:()=>u,ZT:()=>s,PO:()=>c,m5:()=>l})},1618:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){return null!==e&&"object"===n(e)&&Object.prototype.hasOwnProperty.call(e,"current")}r.d(t,{d:()=>o})},5934:(e,t,r)=>{"use strict";function n(e,t,r){var n=r.getRegistry(),o=n.addTarget(e,t);return[o,function(){return n.removeTarget(o)}]}function o(e,t,r){var n=r.getRegistry(),o=n.addSource(e,t);return[o,function(){return n.removeSource(o)}]}r.d(t,{n:()=>n,w:()=>o})},898:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});var n=r(8195),o=r(7294);function i(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function a(e){var t={};return Object.keys(e).forEach((function(r){var n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{var a=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,o.isValidElement)(t)){var n=t;return e(n,r),n}var a=t;i(a);var u=r?function(t){return e(t,r)}:e;return s(a,u)}}(n);t[r]=function(){return a}}})),t}function u(e,t){"function"==typeof e?e(t):e.current=t}function s(e,t){var r=e.ref;return(0,n.k)("string"!=typeof r,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,o.cloneElement)(e,{ref:function(e){u(r,e),u(t,e)}}):(0,o.cloneElement)(e,{ref:t})}},3337:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(7294);const o=function(e,t){var r=(0,n.useRef)((function(){}));(0,n.useEffect)((function(){r.current=e})),(0,n.useEffect)((function(){if(null!==t){var e=setInterval((function(){return r.current()}),t||0);return function(){return clearInterval(e)}}}),[t])}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_jesec_flood=globalThis.webpackChunk_jesec_flood||[]).push([[296],{7296:(e,t,n)=>{n.r(t),n.d(t,{default:()=>An});var i=n(8983),r=n(4537),l=n(1647),a=n(7264),s=n(3799),o=n(7294),d=n(8441),c=n(1540),u=n(879);const h=e=>{let{start:t,destination:n,tags:i,tab:r}=e;const l={};null!=t&&(l.startTorrentsOnLoad=t),null!=n&&""!==n&&(null==l.torrentDestinations&&(l.torrentDestinations=u.Z.floodSettings.torrentDestinations||{}),"string"==typeof(null==i?void 0:i[0])?l.torrentDestinations[i[0]]=n:l.torrentDestinations[""]=n),null!=r&&(l.UITorrentsAddTab=r),c.Z.saveSettings(l)};var m=n(9335),_=n(3529),p=n(5954);const g=e=>{const{actions:t}=e,n=t.map(((e,t)=>{let n=()=>{};return e.triggerDismiss&&(n=()=>{_.Z.setActiveModal(null)}),"checkbox"===e.type?(0,p.tZ)(d.XZ,{defaultChecked:e.checked,id:e.id,onClick:t=>{null!=e.clickHandler&&e.clickHandler(t),n()},children:e.content},t):(0,p.tZ)(d.zx,{isLoading:e.isLoading,onClick:t=>{null!=e.clickHandler&&e.clickHandler(t),n()},priority:e.type,type:e.submit?"submit":"button",children:e.content},t)})),i=(0,p.tZ)("div",{className:"modal__button-group",children:n});return(0,p.tZ)("div",{className:"modal__actions",children:i})},f=e=>{let{isAddingTorrents:t,onAddTorrentsClick:n}=e;const{i18n:i}=(0,s.mV)();return(0,p.tZ)(g,{actions:[{checked:Boolean(u.Z.floodSettings.startTorrentsOnLoad),clickHandler:null,content:i._("torrents.add.start.label"),id:"start",triggerDismiss:!1,type:"checkbox"},{clickHandler:null,content:i._("button.cancel"),triggerDismiss:!0,type:"tertiary"},{clickHandler:n,content:i._("torrents.add.button.add"),isLoading:t,submit:!0,triggerDismiss:!1,type:"primary"}]})};var b=n(3279),Z=n.n(b),v=n(4656),y=n(4916),C=n(917),w=n(4166),k=n(6281),N=n(4557),S=n(5051),O=n(932);const P="#5E728C",x={name:"1pkdvdx",styles:"padding:3px 9px"},D=(0,C.iv)({borderBottom:`1px solid ${(0,w.$n)(.43,P)}`,marginBottom:"3px",paddingBottom:"3px",opacity:.75,"&:last-child":{marginBottom:0}},"",""),j=(0,C.iv)({opacity:.5,transition:"color 0.25s",whiteSpace:"nowrap",button:[x,{width:"100%",height:"100%",padding:"3px 9px",textAlign:"left","&:disabled":{pointerEvents:"none"}}]},"",""),B=(0,C.iv)({color:(0,w.p_)(.1,(0,w._j)(.15,P)),background:(0,w.m4)(P,.1),button:{":focus":{outline:"none",WebkitTapHighlightColor:"transparent"}}},"",""),X=(0,C.iv)({opacity:1,cursor:"pointer",transition:"background 0.25s, color 0.25s",userSelect:"none","&:hover":B,"&:focus-within":B},"",""),T={EACCES:"filesystem.error.eacces",ENOENT:"filesystem.error.enoent"};var E={name:"kol7nt",styles:"transform:scale(0.75) rotate(180deg)"},M={name:"1089mxj",styles:"white-space:pre-wrap"},V={name:"1ityoz",styles:"font-weight:lighter"};const I=(0,o.memo)((e=>{let{directory:t,selectable:n,onItemSelection:i,onYieldFocus:r}=e;const[l,a]=(0,o.useState)(null),[d,c]=(0,o.useState)(null),[u,h]=(0,o.useState)(t.includes("/")?"/":"\\"),[m,_]=(0,o.useState)(null),[g,f]=(0,o.useState)(null),b=(0,o.useRef)(null),Z=t.lastIndexOf(u)+1,v=Z>0?t.substr(0,Z):t,w=t.substr(Z);(0,o.useEffect)((()=>{v&&(a(null),_(null),f(null),S.Z.fetchDirectoryList(v).then((e=>{let{files:t,directories:n,separator:i}=e;_(n),f(t),h(i),c(null)})).catch((e=>{let{response:t}=e;c(t)})))}),[v]),(0,o.useEffect)((()=>{if(null!=b.current&&null!=l){var e;const t=null===(e=b.current.children[l])||void 0===e?void 0:e.children[0];0===(null==t?void 0:t.tabIndex)?t.focus():a(Array.from(b.current.children).findIndex((e=>0===e.children[0].tabIndex)))}}),[l]),(0,N.Z)("ArrowUp",(e=>{e.preventDefault(),a((e=>null==e||e-1<0?(null==r||r(),null):e-1))})),(0,N.Z)("ArrowDown",(e=>{e.preventDefault(),a((e=>null!=e?e+1:0))}));let B=null,I=[];if((null==m&&"directories"===n||null==g&&"files"===n)&&(B="filesystem.fetching"),d&&d.data&&d.data.code&&(B=T[d.data.code]||"filesystem.error.unknown"),t){const e=`${v.split(u).slice(0,-2).join(u)}${u}`,t=(0,p.tZ)("li",{css:[j,X,{"@media (max-width: 720px)":D},"",""],children:(0,p.BX)("button",{type:"button",onClick:()=>null==i?void 0:i(e,!0),children:[(0,p.tZ)(y.Eh,{css:E}),".."]})},e),r="files"!==n,l=w?(0,O.Z)(m,(e=>e),w):[],a=l.includes(w)||"directories"!==n||!w||B?[]:(()=>{const e=`${v}${w}${u}`;return[(0,p.tZ)("li",{css:[j,X,"font-weight:bold;@media (max-width: 720px){display:none;}",""],children:(0,p.BX)("button",{type:"button",onClick:()=>null==i?void 0:i(e,!1),children:[(0,p.tZ)(y.Pl,{}),(0,p.tZ)("span",{css:M,children:w}),(0,p.BX)("em",{css:V,children:[" - ",(0,p.tZ)(s.cC,{id:"filesystem.error.enoent"})]})]})},e)]})(),o=(null==m?void 0:m.length)&&(0,k.DY)(m.slice()).desc((e=>l.includes(e))).map((e=>{const t=`${v}${e}${u}`;return(0,p.tZ)("li",{css:[j,r?X:void 0,l.includes(e)?{fontWeight:"bold"}:void 0,"",""],children:(0,p.BX)("button",{type:"button",disabled:!r,tabIndex:r?0:-1,onClick:r?()=>null==i?void 0:i(t,!0):void 0,children:[(0,p.tZ)(y.Bm,{}),e]})},t)}))||[],d="directories"!==n,c=w?(0,O.Z)(g,(e=>e),w):[],h=(null==g?void 0:g.length)&&(0,k.DY)(g.slice()).desc((e=>c.includes(e))).map((e=>{const t=`${v}${e}`;return(0,p.tZ)("li",{css:[j,d?X:void 0,c.includes(e)?{fontWeight:"bold"}:void 0,"",""],children:(0,p.BX)("button",{type:"button",disabled:!d,tabIndex:d?0:-1,onClick:d?()=>null==i?void 0:i(t,!1):void 0,children:[(0,p.tZ)(y.$B,{}),e]})},t)}))||[];0!==o.length||0!==h.length||B||(B="filesystem.empty.directory"),I=[t,...a,...o,...h]}else B="filesystem.error.no.input";return(0,p.BX)("div",{css:(0,C.iv)({color:P,listStyle:"none",padding:"3px 0px",".icon":{fill:"currentColor",height:"14px",width:"14px",marginRight:"5px",marginTop:"-3px",verticalAlign:"middle"}},"",""),children:[v&&(0,p.BX)("li",{css:[j,D,x,"white-space:pre-wrap;.icon{transform:scale(0.9);margin-top:-2px !important;}@media (max-width: 720px){display:none;}",""],children:[(0,p.tZ)(y.DB,{}),v]}),(0,p.tZ)("ul",{ref:b,children:I}),B&&(0,p.tZ)("div",{css:[j,x,"opacity:1;",""],children:(0,p.tZ)("em",{children:(0,p.tZ)(s.cC,{id:B})})})]})}));I.defaultProps={selectable:void 0,onItemSelection:void 0,onYieldFocus:void 0};const R=I,L=(0,o.forwardRef)(((e,t)=>{var n,i;let{id:r,label:l,selectable:a,suggested:c,showBasePathToggle:h,showCompletedToggle:m,showSequentialToggle:_,onChange:g}=e;const[f,b]=(0,o.useState)(c||(null===(n=u.Z.floodSettings.torrentDestinations)||void 0===n?void 0:n[""])||(null===(i=u.Z.clientSettings)||void 0===i?void 0:i.directoryDefault)||""),[C,w]=(0,o.useState)(!1),k=(0,o.useRef)(null),N=(0,v.Z)(t),{i18n:S}=(0,s.mV)();(0,o.useEffect)((()=>{const e=()=>{w(!1)},t=t=>{var n;null!==(n=k.current)&&void 0!==n&&n.contains(t.target)||e()};return document.addEventListener("click",t),window.addEventListener("resize",e),()=>{document.removeEventListener("click",t),window.removeEventListener("resize",e)}}),[]);const O=[];return h&&O.push((0,p.tZ)(d.XZ,{grow:!1,id:"isBasePath",children:(0,p.tZ)(s.cC,{id:"torrents.destination.base_path"})},"isBasePath")),m&&O.push((0,p.tZ)(d.XZ,{grow:!1,id:"isCompleted",children:(0,p.tZ)(s.cC,{id:"torrents.destination.completed"})},"isCompleted")),_&&O.push((0,p.tZ)(d.XZ,{grow:!1,id:"isSequential",children:(0,p.tZ)(s.cC,{id:"torrents.destination.sequential"})},"isSequential")),(0,p.BX)(d.y1,{ref:k,children:[(0,p.tZ)(d.p7,{children:(0,p.BX)(d.fE,{autoComplete:C?"off":void 0,addonPlacement:"after",defaultValue:f,id:r,label:l,onChange:Z()((()=>{if(null==N.current)return;const e=N.current.value;g&&g(e),b(e)}),100,{leading:!0}),onClick:e=>e.nativeEvent.stopImmediatePropagation(),placeholder:S._("torrents.add.destination.placeholder"),ref:N,children:[(0,p.tZ)(d.G5,{onClick:()=>{null!=N.current&&b(N.current.value),w(!C)},children:(0,p.tZ)(y.ol,{})}),(0,p.tZ)(d.h_,{children:(0,p.tZ)(d.xV,{isIn:C,onClick:e=>e.nativeEvent.stopImmediatePropagation(),overlayProps:{isInteractive:!1},padding:!1,triggerRef:N,children:(0,p.tZ)(R,{directory:f,selectable:a,onItemSelection:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];null!=N.current&&(N.current.value=e),w(t),b(e)},onYieldFocus:()=>{var e;null===(e=N.current)||void 0===e||e.focus()}})})})]})}),O.length>0?(0,p.tZ)(d.p7,{children:O}):null]})}));L.defaultProps={label:void 0,selectable:void 0,suggested:void 0,showBasePathToggle:!1,showCompletedToggle:!1,showSequentialToggle:!1,onChange:void 0};const F=L;var $=n(4184),U=n.n($),z=n(8232);const A=e=>{let{defaultValue:t,placeholder:n,id:i,label:r,onTagSelected:l}=e;const[c,h]=(0,o.useState)(!1),[m,_]=(0,o.useState)(t??[]),g=(0,o.useRef)(null),f=(0,o.useRef)(null),b=(0,o.useRef)(null),Z=U()("select form__element",{"select--is-open":c});return(0,a.Z)("Escape",(e=>{e.preventDefault(),h(!1)})),(0,o.useEffect)((()=>{const e=e=>{var t;null!==(t=g.current)&&void 0!==t&&t.contains(e.target)||h(!1)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}),[]),(0,o.useEffect)((()=>{null!=b.current&&(b.current.value=m.join()),l&&l(m)}),[m,l]),(0,p.tZ)(d.U2,{ref:g,children:(0,p.tZ)("div",{className:Z,children:(0,p.BX)(d.fE,{autoComplete:c?"off":void 0,id:i||"tags",addonPlacement:"after",defaultValue:t,label:r,onChange:()=>{if(null!=b.current){let e=b.current.value.split(",").map((e=>e.trim())).filter((e=>e.length>0));b.current.value.trimEnd().endsWith(",")&&(e.push(""),e=[...new Set(e)]),_(e)}},placeholder:n,ref:b,children:[(0,p.tZ)(d.G5,{onClick:()=>{h(!c)},className:"select__indicator",children:(0,p.tZ)(y.Tt,{})}),(0,p.tZ)(d.h_,{children:(0,p.tZ)(d.xV,{isIn:c,onClick:e=>{"single"!==u.Z.floodSettings.UITagSelectorMode&&e.nativeEvent.stopImmediatePropagation()},overlayProps:{isInteractive:!1},ref:f,triggerRef:b,children:[...new Set(["untagged",...(0,k.DY)(Object.keys(z.Z.taxonomy.tagCounts)).asc(),...m])].reduce(((e,t)=>(""===t||e.push((0,p.tZ)(d.Ql,{id:t,isSelected:m.includes(t),onClick:()=>{"untagged"===t?_([]):m.includes(t)?_(m.filter((e=>e!==t&&""!==e))):_([...m.filter((e=>""!==e)),t])},children:"untagged"===t?(0,p.tZ)(s.cC,{id:"filter.untagged"}):t},t)),e)),[])})})]})})})};A.defaultProps={id:"tags",label:void 0,defaultValue:void 0,placeholder:void 0,onTagSelected:void 0};const H=A,q=(e,t)=>Object.keys(e).reduce(((n,i)=>{if(i.startsWith(t)){const t=e[i];null!=t&&n.push(t)}return n}),[]),G=e=>{let{defaultValues:t,id:n,label:i,placeholder:r}=e;const l=(0,o.useRef)(0),[a,s]=(0,o.useState)(t??[{id:0,value:""}]);return(0,p.tZ)(d.y1,{children:a.map(((e,t)=>{let o=null;return t>0&&(o=(0,p.tZ)(d.G5,{onClick:()=>{const e=a.slice();e.splice(t,1),s(e)},children:(0,p.tZ)(y.eJ,{})})),(0,p.tZ)(d.p7,{children:(0,p.BX)(d.fE,{addonPlacement:"after",id:`${n}-${e.id}`,defaultValue:e.value,label:0===t&&i,placeholder:r,wrapperClassName:"textbox-repeater",children:[(0,p.tZ)(d.G5,{onClick:()=>{l.current+=1;const e=a.slice();e.splice(t+1,0,{id:l.current,value:""}),s(e)},children:(0,p.tZ)(y.Rb,{})}),o]})},e.id)}))})};G.defaultProps={defaultValues:void 0,label:void 0,placeholder:void 0};const Q=G,W=()=>{const e=(0,o.useRef)(null),{i18n:t}=(0,s.mV)(),[n,i]=(0,o.useState)(!1);return(0,p.BX)(d.l0,{className:"inverse",ref:e,children:[(0,p.tZ)(F,{id:"sourcePath",label:t._("torrents.create.source.path.label")}),(0,p.tZ)(Q,{id:"trackers",label:t._("torrents.create.trackers.label"),placeholder:t._("torrents.create.tracker.input.placeholder"),defaultValues:[{id:0,value:""}]}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.fE,{id:"name",label:t._("torrents.create.base.name.label"),placeholder:t._("torrents.create.base.name.input.placeholder")})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.fE,{id:"comment",label:t._("torrents.create.comment.label"),placeholder:t._("torrents.create.comment.input.placeholder")})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.fE,{id:"infoSource",label:t._("torrents.create.info.source.label"),placeholder:t._("torrents.create.info.source.input.placeholder")})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.XZ,{grow:!1,id:"isPrivate",children:t._("torrents.create.is.private.label")})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(H,{id:"tags",label:t._("torrents.add.tags"),placeholder:t._("torrents.create.tags.input.placeholder")})}),(0,p.tZ)(f,{onAddTorrentsClick:()=>{if(null==e.current)return;const t=e.current.getFormData();i(!0),null!=t.sourcePath&&(m.Z.createTorrent({name:t.name,sourcePath:t.sourcePath,trackers:q(t,"trackers"),comment:t.comment,infoSource:t.infoSource,isPrivate:t.isPrivate||!1,start:t.start||!1,tags:null!=t.tags?t.tags.split(","):void 0}).then((()=>{_.Z.setActiveModal(null)})),h({start:t.start,destination:t.sourcePath,tab:"by-creation"}))},isAddingTorrents:n})]})};var Y=n(463);function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const te=e=>{let{onFilesChanged:t}=e;const[n,i]=(0,o.useState)([]);return(0,o.useEffect)((()=>{t(n)}),[n,t]),(0,p.BX)(d.U2,{children:[(0,p.tZ)("span",{className:"form__element__label",children:(0,p.tZ)(s.cC,{id:"torrents.add.torrents.label"})}),n.length>0?(0,p.tZ)("div",{onClick:e=>{e.stopPropagation()},role:"none",children:(0,p.tZ)("ul",{className:"dropzone__selected-files interactive-list",children:n.map(((e,t)=>(0,p.BX)("li",{className:"dropzone__selected-files__file interactive-list__item",title:e.name,children:[(0,p.tZ)("span",{className:"interactive-list__icon",children:(0,p.tZ)(y.$B,{})}),(0,p.tZ)("span",{className:"interactive-list__label",children:e.name}),(0,p.tZ)("button",{className:"interactive-list__icon interactive-list__icon--action interactive-list__icon--action--warning",type:"button",onClick:()=>{const e=n.slice();e.splice(t,1),i(e)},children:(0,p.tZ)(y.x8,{})})]},e.name)))})}):null,(0,p.tZ)(Y.ZP,{onDrop:e=>{const t=[];e.forEach((r=>{const l=new FileReader;l.onload=l=>{var a;null!=(null===(a=l.target)||void 0===a?void 0:a.result)&&"string"==typeof l.target.result&&t.push({name:r.name,data:l.target.result.split("base64,")[1]}),t.length===e.length&&i(n.concat(t))},l.readAsDataURL(r)}))},children:e=>{let{getRootProps:t,getInputProps:n,isDragActive:i}=e;return(0,p.BX)("div",K(K({},t()),{},{className:"form__dropzone dropzone interactive-list "+(i?"dropzone--is-dragging":""),children:[(0,p.tZ)("input",K({},n())),(0,p.BX)("div",{className:"dropzone__copy",children:[(0,p.tZ)("div",{className:"dropzone__icon",children:(0,p.tZ)(y.hv,{})}),(0,p.tZ)(s.cC,{id:"torrents.add.tab.file.drop"})," ",(0,p.tZ)("span",{className:"dropzone__browse-button",children:(0,p.tZ)(s.cC,{id:"torrents.add.tab.file.browse"})}),"."]})]}))}})]})},ne=()=>{const e=(0,o.useRef)([]),t=(0,o.useRef)(null),n=(0,o.useRef)(null),[i,r]=(0,o.useState)(!1),{i18n:l}=(0,s.mV)();return(0,p.BX)(d.l0,{className:"inverse",ref:t,children:[(0,p.tZ)(d.p7,{children:(0,p.tZ)(te,{onFilesChanged:t=>{e.current=t}})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(H,{label:l._("torrents.add.tags"),id:"tags",onTagSelected:e=>{if(null!=n.current){var t;const i=null===(t=u.Z.floodSettings.torrentDestinations)||void 0===t?void 0:t[e[0]];"string"==typeof i&&null!=n.current&&(n.current.value=i,n.current.dispatchEvent(new Event("input",{bubbles:!0})))}}})}),(0,p.tZ)(F,{id:"destination",label:l._("torrents.add.destination.label"),ref:n,selectable:"directories",showBasePathToggle:!0,showCompletedToggle:!0,showSequentialToggle:!0}),(0,p.tZ)(f,{onAddTorrentsClick:()=>{var n;if(null==t.current)return;const i=null===(n=t.current)||void 0===n?void 0:n.getFormData();r(!0);const{destination:l,start:a,tags:s,isBasePath:o,isCompleted:d,isSequential:c}=i,u=[];if(e.current.forEach((e=>{u.push(e.data)})),0===u.length||null==l)return void r(!1);const p=null!=s?s.split(",").filter((e=>e.length>0)):void 0;m.Z.addTorrentsByFiles({files:u,destination:l,tags:p,isBasePath:o,isCompleted:d,isSequential:c,start:a}).then((()=>{_.Z.setActiveModal(null)})),h({start:a,destination:l,tags:p,tab:"by-file"})},isAddingTorrents:i})]})};var ie=n(4355);var re={name:"izrr19",styles:"float:right;:focus{outline:none;-webkit-tap-highlight-color:transparent;}:focus-visible{outline:dashed;}"},le={name:"1rawn5e",styles:"font-size:0.8em"};const ae=()=>{var e,t;const n=(0,o.useRef)(null),i=(0,o.useRef)(null),[r,l]=(0,o.useState)(!1),{i18n:a}=(0,s.mV)();return(0,p.BX)(d.l0,{className:"inverse",ref:n,children:[(0,p.tZ)(Q,{id:"urls",label:(0,p.BX)("div",{children:[a._("torrents.add.torrents.label"),"function"==typeof navigator.registerProtocolHandler&&(0,p.tZ)("button",{css:re,type:"button",onClick:()=>{"function"==typeof navigator.registerProtocolHandler&&navigator.registerProtocolHandler("magnet",`${ie.Z.baseURI}?action=add-urls&url=%s`)},children:(0,p.tZ)("em",{css:le,children:a._("torrents.add.tab.url.register.magnet.handler")})})]}),placeholder:a._("torrents.add.tab.url.input.placeholder"),defaultValues:"add-torrents"===(null===(e=_.Z.activeModal)||void 0===e?void 0:e.id)&&(null===(t=_.Z.activeModal)||void 0===t?void 0:t.initialURLs)||[{id:0,value:""}]}),(0,p.tZ)(Q,{id:"cookies",label:a._("torrents.add.cookies.label"),placeholder:a._("torrents.add.cookies.input.placeholder")}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(H,{id:"tags",label:a._("torrents.add.tags"),onTagSelected:e=>{if(null!=i.current){var t;const n=null===(t=u.Z.floodSettings.torrentDestinations)||void 0===t?void 0:t[e[0]];"string"==typeof n&&null!=i.current&&(i.current.value=n,i.current.dispatchEvent(new Event("input",{bubbles:!0})))}}})}),(0,p.tZ)(F,{id:"destination",label:a._("torrents.add.destination.label"),ref:i,selectable:"directories",showBasePathToggle:!0,showCompletedToggle:!0,showSequentialToggle:!0}),(0,p.tZ)(f,{onAddTorrentsClick:()=>{if(null==n.current)return;const e=n.current.getFormData();l(!0);const t=q(e,"urls").filter((e=>""!==e));if(0===t.length||null==e.destination)return void l(!1);const i=q(e,"cookies"),r=t[0].startsWith("http")&&t[0].split("/")[2],a=r?{[r]:i}:void 0,s=null!=e.tags?e.tags.split(",").filter((e=>e.length>0)):void 0;m.Z.addTorrentsByUrls({urls:t,cookies:a,destination:e.destination,isBasePath:e.isBasePath,isCompleted:e.isCompleted,isSequential:e.isSequential,start:e.start,tags:s}).then((()=>{_.Z.setActiveModal(null)})),h({start:e.start,destination:e.destination,tags:s,tab:"by-url"})},isAddingTorrents:r})]})};var se={name:"1gxvag8",styles:":focus{outline:none;-webkit-tap-highlight-color:transparent;}:focus-visible{outline:dashed;}"};const oe=e=>{const{activeTabId:t,tabs:n={},onTabChange:i}=e;return(0,p.tZ)("ul",{className:"modal__tabs",children:Object.keys(n).map((e=>{const r=n[e];r.id=e;const l=U()("modal__tab",{"is-active":e===t});return(0,p.tZ)("li",{className:l,children:(0,p.tZ)("button",{css:se,type:"button",onClick:()=>{i&&i(r)},children:r.label})},e)}))})};oe.defaultProps={tabs:{}};const de=oe;function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){he(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const me=e=>{const{alignment:t,size:n,orientation:i,tabsInBody:r,inverse:l,initialTabId:a,className:s,content:d,heading:c,tabs:u,actions:h}=e,m=U()("modal__content__wrapper",`modal--align-${t}`,`modal--size-${n}`,{"modal--horizontal":"horizontal"===i,"modal--vertical":"vertical"===i,"modal--tabs-in-header":!r,"modal--tabs-in-body":r,inverse:l},s);let _=d;const f=c,b=U()("modal__header",{"has-tabs":u});let Z,v,y;const[C,w]=(0,o.useState)(a??Object.keys(u||{})[0]);if(u){const e=u[C],t=U()("modal__content",e.modalContentClasses),n=e.content,i=e.props,l=(0,p.tZ)(de,{activeTabId:C,onTabChange:e=>{null!=e.id&&w(e.id)},tabs:u},"modal-tabs");r?Z=l:y=l,_=[Z,(0,p.tZ)("div",{className:t,children:(0,p.tZ)(n,ue({},i))},"modal-content")]}return h&&(v=(0,p.tZ)("div",{className:"modal__footer",children:(0,p.tZ)(g,{actions:h})})),(0,p.BX)("div",{className:m,children:[(0,p.BX)("div",{className:b,children:[f,y]}),(0,p.BX)("div",{className:"modal__body",children:[_,v]})]})};me.defaultProps={alignment:"left",className:null,inverse:!0,size:"medium",orientation:"horizontal",tabsInBody:!1,content:void 0,actions:void 0,tabs:void 0,initialTabId:void 0};const _e=me,pe=()=>{var e,t;const{i18n:n}=(0,s.mV)(),i={"by-url":{content:ae,label:n._("torrents.add.tab.url.title")},"by-file":{content:ne,label:n._("torrents.add.tab.file.title")},"by-creation":{content:W,label:n._("torrents.add.tab.create.title")}};if("add-torrents"!==(null===(e=_.Z.activeModal)||void 0===e?void 0:e.id))return null;let r="by-url";return null!==(t=_.Z.activeModal.initialURLs)&&void 0!==t&&t.length||(r=u.Z.floodSettings.UITorrentsAddTab??r),(0,p.tZ)(_e,{heading:n._("torrents.add.heading"),tabs:i,initialTabId:r})},ge=(0,l.Pi)((()=>{var e;if("confirm"!==(null===(e=_.Z.activeModal)||void 0===e?void 0:e.id))return null;const{actions:t,content:n,heading:i}=_.Z.activeModal||{};return(0,p.tZ)(_e,{actions:t,content:(0,p.tZ)("div",{className:"modal__content",children:n}),heading:i})}));var fe=n(9669),be=n.n(fe),Ze=n(8949);function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ye=new class{constructor(){ve(this,"feeds",[]),ve(this,"rules",[]),ve(this,"items",[]),(0,Ze.ky)(this)}setFeeds(e){this.feeds=null!=e?[...e].sort(((e,t)=>e.label.localeCompare(t.label))):[]}setRules(e){this.rules=null!=e?[...e].sort(((e,t)=>e.label.localeCompare(t.label))):[]}handleFeedMonitorsFetchSuccess(e){this.setFeeds(e.feeds),this.setRules(e.rules)}handleItemsFetchSuccess(e){this.items=e}},{baseURI:Ce}=ie.Z,we={addFeed:e=>be().put(`${Ce}api/feed-monitor/feeds`,e).then((()=>we.fetchFeedMonitors())),modifyFeed:(e,t)=>be().patch(`${Ce}api/feed-monitor/feeds/${e}`,t).then((()=>we.fetchFeedMonitors())),addRule:e=>be().put(`${Ce}api/feed-monitor/rules`,e).then((()=>we.fetchFeedMonitors())),fetchFeedMonitors:()=>be().get(`${Ce}api/feed-monitor`).then((e=>{let{data:t}=e;ye.handleFeedMonitorsFetchSuccess(t)}),(()=>{})),fetchItems:e=>{let{id:t,search:n}=e;return be().get(`${Ce}api/feed-monitor/feeds/${t}/items`,{params:{search:n}}).then((e=>{let{data:t}=e;ye.handleItemsFetchSuccess(t)}),(()=>{}))},removeFeedMonitor:e=>be().delete(`${Ce}api/feed-monitor/${e}`).then((()=>we.fetchFeedMonitors()),(()=>{}))},ke=we,Ne=/^(?:https?|ftp):\/\/.{1,}\.{1}.{1,}/,Se=e=>null!=e&&""!==e,Oe=e=>{try{new RegExp(e)}catch(e){return!1}return!0},Pe=e=>{var t;let{rule:n,isSubmitting:i,isPatternMatched:r,onCancel:l}=e;const{feeds:a}=ye,{i18n:o}=(0,s.mV)();return(0,p.BX)(d.y1,{children:[(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{id:"label",label:o._("feeds.label"),defaultValue:n.label}),(0,p.tZ)(d.Ph,{disabled:!a.length,id:"feedID",label:o._("feeds.applicable.feed"),defaultID:null===(t=n.feedIDs)||void 0===t?void 0:t[0],children:0===a.length?[(0,p.tZ)(d.Ql,{id:"placeholder",isPlaceholder:!0,children:(0,p.tZ)("em",{children:(0,p.tZ)(s.cC,{id:"feeds.no.feeds.available"})})},"empty")]:a.reduce(((e,t)=>e.concat((0,p.tZ)(d.Ql,{id:`${t._id}`,children:t.label},t._id))),[(0,p.tZ)(d.Ql,{id:"placeholder",isPlaceholder:!0,children:(0,p.tZ)("em",{children:(0,p.tZ)(s.cC,{id:"feeds.select.feed"})})},"select-feed")])})]}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{id:"match",label:o._("feeds.match.pattern"),placeholder:o._("feeds.regEx"),defaultValue:n.match,width:"three-eighths"}),(0,p.tZ)(d.fE,{id:"exclude",label:o._("feeds.exclude.pattern"),placeholder:o._("feeds.regEx"),defaultValue:n.exclude,width:"three-eighths"})]}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.fE,{addonPlacement:"after",id:"check",label:o._("feeds.test.match"),placeholder:o._("feeds.check"),children:r&&(0,p.tZ)(d.G5,{children:(0,p.tZ)(y.FV,{})})})}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.U2,{children:(0,p.tZ)(F,{id:"destination",label:o._("feeds.torrent.destination"),selectable:"directories",suggested:n.destination,showBasePathToggle:!0})}),(0,p.tZ)(H,{id:"tags",label:o._("feeds.apply.tags"),placeholder:o._("feeds.tags"),defaultValue:n.tags})]}),(0,p.BX)(d.p7,{align:"end",justify:"end",children:[(0,p.tZ)("br",{}),(0,p.tZ)(d.XZ,{id:"startOnLoad",defaultChecked:n.startOnLoad,matchTextboxHeight:!0,children:(0,p.tZ)(s.cC,{id:"feeds.start.on.load"})}),(0,p.tZ)(d.zx,{onClick:l,children:(0,p.tZ)(s.cC,{id:"button.cancel"})}),(0,p.tZ)(d.zx,{type:"submit",isLoading:i,children:(0,p.tZ)(s.cC,{id:"button.save.feed"})})]})]})},xe=e=>{let{children:t}=e;return(0,p.tZ)("h2",{className:"h4",children:t})},De=(0,l.Pi)((e=>{let{currentRule:t,onSelect:n,onRemove:i}=e;const{rules:r}=ye;return 0===r.length?(0,p.tZ)("ul",{className:"interactive-list",children:(0,p.tZ)("li",{className:"interactive-list__item",children:(0,p.tZ)(s.cC,{id:"feeds.no.rules.defined"})})}):(0,p.tZ)("ul",{className:"interactive-list",children:r.map((e=>{const r=e.count||0;let l=null,a=null;if(e.exclude&&(l=(0,p.BX)("li",{className:"interactive-list__detail-list__item interactive-list__detail interactive-list__detail--tertiary",children:[(0,p.tZ)(s.cC,{id:"feeds.exclude"}),": ",e.exclude]})),e.tags&&e.tags.length>0){const t=e.tags.map((e=>(0,p.tZ)("span",{className:"tag",children:e},e)));a=(0,p.BX)("li",{className:"interactive-list__detail-list__item interactive-list__detail interactive-list__detail--tertiary",children:[(0,p.tZ)(s.cC,{id:"feeds.tags"}),": ",t]})}return(0,p.BX)("li",{className:"interactive-list__item interactive-list__item--stacked-content",children:[(0,p.BX)("div",{className:"interactive-list__label",children:[(0,p.BX)("ul",{className:"interactive-list__detail-list",children:[(0,p.tZ)("li",{className:"interactive-list__detail-list__item interactive-list__detail--primary",children:e.label}),(0,p.tZ)("li",{className:"interactive-list__detail-list__item interactive-list__detail-list__item--overflow interactive-list__detail interactive-list__detail--secondary",children:(0,p.tZ)(s.cC,{id:"feeds.match.count",values:{count:r}})}),e===t&&(0,p.tZ)("li",{className:"interactive-list__detail-list__item interactive-list__detail--primary",children:"Modifying"})]}),(0,p.BX)("ul",{className:"interactive-list__detail-list",children:[(0,p.BX)("li",{className:"interactive-list__detail-list__item interactive-list__detail interactive-list__detail--tertiary",style:{maxWidth:"50%",overflow:"hidden",textOverflow:"ellipsis"},children:[(0,p.tZ)(s.cC,{id:"feeds.match"}),": ",e.match]}),(0,p.tZ)("div",{style:{width:"100%"}}),l,a]})]}),(0,p.tZ)("button",{className:"interactive-list__icon interactive-list__icon--action",type:"button",onClick:()=>n(e),children:(0,p.tZ)(y.I8,{})}),(0,p.tZ)("button",{className:"interactive-list__icon interactive-list__icon--action interactive-list__icon--action--warning",type:"button",onClick:()=>i(e),children:(0,p.tZ)(y.x8,{})})]},e._id)}))})})),je=De;function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){Te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ee={label:"",feedIDs:[],match:"",exclude:"",tags:[],destination:"",startOnLoad:!1},Me={destination:{isValid:Se,error:"feeds.validation.must.specify.destination"},feedID:{isValid:e=>Se(e)&&"placeholder"!==e,error:"feeds.validation.must.select.feed"},label:{isValid:Se,error:"feeds.validation.must.specify.label"},match:{isValid:e=>Se(e)&&Oe(e),error:"feeds.validation.invalid.regular.expression"},exclude:{isValid:e=>!Se(e)||Oe(e),error:"feeds.validation.invalid.regular.expression"}},Ve=(e,t)=>{var n,i;return null!==(n=Me[e])&&void 0!==n&&n.isValid(t)||null===(i=Me[e])||void 0===i?void 0:i.error},Ie=()=>{const e=(0,o.useRef)(null),{i18n:t}=(0,s.mV)(),[n,i]=(0,o.useState)(null),[r,l]=(0,o.useState)({}),[a,c]=(0,o.useState)(!1),[u,h]=(0,o.useState)(!1),[m,_]=(0,o.useState)(!1),[g,f]=(0,o.useState)(!1);return(0,p.BX)(d.l0,{className:"inverse",onChange:e=>{let{event:t,formData:n}=e;const i=t.target.name,a=n;l(Xe(Xe({},r),{},{[i]:Ve(i,a[i])})),f((()=>{const{check:e,match:t="",exclude:n=""}=a;if(Se(e)&&Oe(t)&&Oe(n)){const i=new RegExp(t,"gi").test(e),r=""!==n&&new RegExp(n,"gi").test(e);return i&&!r}return!1})()),_(!0)},onSubmit:async()=>{if(null==e.current)return;const t=e.current.getFormData(),r=Object.keys(Me).reduce(((e,n)=>{const i=n;return Xe(Xe({},e),{},{[i]:Ve(i,t[i])})}),{});l(r);const a=Object.keys(r).every((e=>void 0===r[e]));var s;m&&a&&(h(!0),null!=(null==n?void 0:n._id)&&await ke.removeFeedMonitor(n._id),await ke.addRule({label:t.label??Ee.label,feedIDs:[t.feedID??""],field:t.field,match:t.match??Ee.match,exclude:t.exclude??Ee.exclude,destination:t.destination??Ee.destination,tags:(null===(s=t.tags)||void 0===s?void 0:s.split(","))??Ee.tags,startOnLoad:t.startOnLoad??Ee.startOnLoad,isBasePath:t.isBasePath??!1}).then((()=>{var t;null===(t=e.current)||void 0===t||t.resetForm(),l({}),i(null),c(!1)}),(()=>{l({backend:"general.error.unknown"})})),h(!1))},ref:e,children:[(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"feeds.existing.rules"})}),Object.keys(r).reduce(((e,n)=>(null!=r[n]&&e.push((0,p.tZ)(d.p7,{children:(0,p.tZ)(d.Xq,{children:t._(null==r?void 0:r[n])})},`error-${n}`)),e)),[]),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.U2,{children:(0,p.tZ)(je,{currentRule:n,onSelect:e=>{i(e),c(!0)},onRemove:e=>{null!=e._id&&ke.removeFeedMonitor(e._id),e===n&&(i(null),c(!1))}})})}),a?(0,p.tZ)(Pe,{rule:n??Ee,isPatternMatched:g,isSubmitting:u,onCancel:()=>{i(null),c(!1)}},(null==n?void 0:n._id)||"initial"):(0,p.BX)(d.p7,{align:"end",justify:"end",children:[(0,p.tZ)("br",{}),(0,p.tZ)(d.zx,{onClick:()=>{c(!0)},children:(0,p.tZ)(s.cC,{id:"button.new"})})]})]})},Re=e=>{let{currentFeed:t,defaultFeed:n,intervalMultipliers:i,isSubmitting:r,onCancel:l}=e;const{i18n:a}=(0,s.mV)(),o=(null==t?void 0:t.interval)??n.interval;let c=o,u=1;return i.forEach((e=>{const t=e.value;o%t==0&&(c=o/t,u=t)})),(0,p.BX)(d.y1,{children:[(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{id:"label",label:a._("feeds.label"),placeholder:a._("feeds.label"),defaultValue:(null==t?void 0:t.label)??n.label}),(0,p.tZ)(d.fE,{id:"interval",label:a._("feeds.select.interval"),placeholder:a._("feeds.interval"),defaultValue:c,width:"one-eighth"}),(0,p.tZ)(d.Ph,{labelOffset:!0,defaultID:u,id:"intervalMultiplier",width:"one-eighth",children:i.map((e=>(0,p.tZ)(d.Ql,{id:e.value,children:a._(e.message)},e.value)))})]}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{id:"url",label:a._("feeds.url"),placeholder:a._("feeds.url"),defaultValue:(null==t?void 0:t.url)??(null==n?void 0:n.url)}),(0,p.tZ)(d.zx,{labelOffset:!0,onClick:l,children:(0,p.tZ)(s.cC,{id:"button.cancel"})}),(0,p.tZ)(d.zx,{labelOffset:!0,type:"submit",isLoading:r,children:(0,p.tZ)(s.cC,{id:"button.save.feed"})})]})]})},Le=(0,l.Pi)((e=>{let{selectedFeedID:t}=e;const{items:n}=ye,i=[];if(t){const e={};n.forEach(((t,n)=>{let{title:r}=t;const l=e[r];null==l?e[r]=2:(r=`${r} #${l}`,e[r]+=1),i.push((0,p.BX)("li",{className:"interactive-list__item interactive-list__item--stacked-content feed-list__feed",children:[(0,p.tZ)("div",{className:"interactive-list__label feed-list__feed-label",children:r}),(0,p.tZ)(d.XZ,{id:`${n}`})]},r))}))}return(0,p.tZ)(d.p7,{children:0===i.length?(0,p.tZ)("ul",{className:"interactive-list",children:(0,p.tZ)("li",{className:"interactive-list__item",children:(0,p.tZ)("div",{className:"interactive-list__label",children:(0,p.tZ)(s.cC,{id:"feeds.no.items.matching"})})})}):(0,p.tZ)("ul",{className:"interactive-list feed-list",children:i})})})),Fe=Le,$e=(0,l.Pi)((()=>{const{i18n:e}=(0,s.mV)(),t=(0,o.useRef)(null),[n,i]=(0,o.useState)(null),{feeds:r}=ye;return null!=n&&(r.some((e=>e._id===n))||i(null)),(0,p.BX)(d.l0,{className:"inverse",onChange:e=>{let{event:t,formData:n}=e;const r=n;"checkbox"!==t.target.type&&(i(r.feedID),ke.fetchItems({id:r.feedID,search:r.search}))},onSubmit:()=>{if(null==t.current)return;const e=t.current.getFormData(),n=ye.items.filter(((t,n)=>e[n])).map(((e,t)=>({id:t,value:e.urls[0]})));_.Z.setActiveModal({id:"add-torrents",initialURLs:n})},ref:t,children:[(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"feeds.browse.feeds"})}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.Ph,{disabled:!r.length,grow:!1,id:"feedID",label:e._("feeds.select.feed"),width:"three-eighths",children:r.length?r.reduce(((e,t)=>null==t._id?e:e.concat((0,p.tZ)(d.Ql,{id:t._id,children:t.label},t._id))),[(0,p.tZ)(d.Ql,{id:"placeholder",isPlaceholder:!0,children:(0,p.tZ)("em",{children:(0,p.tZ)(s.cC,{id:"feeds.select.feed"})})},"select-feed")]):[(0,p.tZ)(d.Ql,{id:"placeholder",isPlaceholder:!0,children:(0,p.tZ)("em",{children:(0,p.tZ)(s.cC,{id:"feeds.no.feeds.available"})})},"empty")]}),n&&(0,p.tZ)(d.fE,{id:"search",label:e._("feeds.search.term"),placeholder:e._("feeds.search")}),n&&(0,p.tZ)(d.zx,{type:"submit",labelOffset:!0,children:(0,p.tZ)(s.cC,{id:"button.download"})},"button")]}),n&&(0,p.tZ)(Fe,{selectedFeedID:n})]})})),Ue=$e,ze=(0,l.Pi)((e=>{let{currentFeed:t,intervalMultipliers:n,onSelect:i,onRemove:r}=e;const{feeds:l}=ye,{i18n:a}=(0,s.mV)();return 0===l.length?(0,p.tZ)("ul",{className:"interactive-list",children:(0,p.tZ)("li",{className:"interactive-list__item",children:(0,p.tZ)(s.cC,{id:"feeds.no.feeds.defined"})})}):(0,p.tZ)("ul",{className:"interactive-list feed-list",children:l.map((e=>{const l=e.count||0;let o=`${e.interval}`,d=n[0].message;return n.forEach((t=>{e.interval%t.value==0&&(o=""+e.interval/t.value,d=t.message)})),(0,p.BX)("li",{className:"interactive-list__item interactive-list__item--stacked-content feed-list__feed",children:[(0,p.BX)("div",{className:"interactive-list__label",children:[(0,p.BX)("ul",{className:"interactive-list__detail-list",children:[(0,p.tZ)("li",{className:"interactive-list__detail-list__item interactive-list__detail--primary",children:e.label}),(0,p.tZ)("li",{className:"interactive-list__detail-list__item interactive-list__detail-list__item--overflow interactive-list__detail interactive-list__detail--secondary",children:(0,p.tZ)(s.cC,{id:"feeds.match.count",values:{count:l}})}),e===t&&(0,p.tZ)("li",{className:"interactive-list__detail-list__item interactive-list__detail--primary",children:"Modifying"})]}),(0,p.BX)("ul",{className:"interactive-list__detail-list",children:[(0,p.tZ)("li",{className:"interactive-list__detail-list__item interactive-list__detail interactive-list__detail--tertiary",children:`${o} ${a._(d)}`}),(0,p.tZ)("li",{className:"interactive-list__detail-list__item interactive-list__detail-list__item--overflow interactive-list__detail interactive-list__detail--tertiary",children:(0,p.tZ)("a",{href:e.url,rel:"noopener noreferrer",target:"_blank",children:e.url})})]})]}),(0,p.tZ)("button",{className:"interactive-list__icon interactive-list__icon--action",type:"button",onClick:()=>i(e),children:(0,p.tZ)(y.I8,{})}),(0,p.tZ)("button",{className:"interactive-list__icon interactive-list__icon--action interactive-list__icon--action--warning",type:"button",onClick:()=>r(e),children:(0,p.tZ)(y.x8,{})})]},e._id)}))})})),Ae=ze;function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(Object(n),!0).forEach((function(t){Ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Qe={url:{isValid:e=>null!=e&&""!==e&&null!==e.match(Ne),error:"feeds.validation.must.specify.valid.feed.url"},label:{isValid:Se,error:"feeds.validation.must.specify.label"},interval:{isValid:e=>{if(null===e||""===e)return!1;const t=parseInt(`${e}`,10);return!Number.isNaN(t)&&t>0},error:"feeds.validation.interval.not.positive"}},We=(e,t)=>{var n,i;return null!==(n=Qe[e])&&void 0!==n&&n.isValid(t)||null===(i=Qe[e])||void 0===i?void 0:i.error},Ye=[{message:"feeds.time.min",value:1},{message:"feeds.time.hr",value:60},{message:"feeds.time.day",value:1440}],Je={label:"",interval:5,url:""},Ke=()=>{const e=(0,o.useRef)(null),{i18n:t}=(0,s.mV)(),[n,i]=(0,o.useState)(null),[r,l]=(0,o.useState)({}),[a,c]=(0,o.useState)(!1),[u,h]=(0,o.useState)(!1);return(0,p.BX)("div",{children:[(0,p.BX)(d.l0,{className:"inverse",onChange:e=>{let{event:t,formData:n}=e;const i=t.target.name,a=n;l(qe(qe({},r),{},{[i]:We(i,a[i])}))},onSubmit:async()=>{var t;const r=null===(t=e.current)||void 0===t?void 0:t.getFormData();if(null==e.current||null==r)return;h(!0);const a=Object.keys(Qe).reduce(((e,t)=>{const n=t;return qe(qe({},e),{},{[n]:We(n,r[n])})}),{});l(a);if(Object.keys(a).every((e=>void 0===a[e]))){const t={label:r.label,url:r.url,interval:Number(r.interval)*Number(r.intervalMultiplier)};let a=!0;try{null===n?await ke.addFeed(t):null!=(null==n?void 0:n._id)&&await ke.modifyFeed(n._id,t)}catch{a=!1}a?(e.current.resetForm(),l({}),i(null),c(!1)):l({backend:"general.error.unknown"})}h(!1)},ref:e,children:[(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"feeds.existing.feeds"})}),Object.keys(r).reduce(((e,n)=>(null!=r[n]&&e.push((0,p.tZ)(d.p7,{children:(0,p.tZ)(d.Xq,{children:t._(null==r?void 0:r[n])})},`error-${n}`)),e)),[]),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.U2,{children:(0,p.tZ)(Ae,{currentFeed:n,intervalMultipliers:Ye,onSelect:e=>{i(e),c(!0)},onRemove:e=>{e===n&&(a&&(l({}),c(!1)),i(null)),null!=e._id&&ke.removeFeedMonitor(e._id)}})})}),a?(0,p.tZ)(Re,{currentFeed:n,defaultFeed:Je,intervalMultipliers:Ye,isSubmitting:u,onCancel:()=>{l({}),c(!1),i(null)}},(null==n?void 0:n._id)||"initial"):(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.U2,{width:"auto"}),(0,p.tZ)(d.zx,{onClick:()=>{c(!0)},children:(0,p.tZ)(s.cC,{id:"button.new"})})]})]}),(0,p.tZ)(Ue,{})]})},et=()=>{const{i18n:e}=(0,s.mV)();(0,o.useEffect)((()=>{ke.fetchFeedMonitors()}),[]);const t={feeds:{content:Ke,label:e._("feeds.tabs.feeds")},downloadRules:{content:Ie,label:e._("feeds.tabs.download.rules")}};return(0,p.tZ)(_e,{heading:e._("feeds.tabs.heading"),orientation:"horizontal",size:"large",tabs:t})};var tt=n(4936);let nt;!function(e){e[e.HTTP=1]="HTTP",e[e.UDP=2]="UDP",e[e.DHT=3]="DHT"}(nt||(nt={}));const it=(e,t)=>{let n=`magnet:?xt=urn:btih:${e}`;return null!=t&&t.length&&t.forEach((e=>{n=`${n}&tr=${encodeURI(e)}`})),n},rt=()=>{var e;const t=(0,o.useRef)(null),n=(0,o.useRef)(null),{i18n:i}=(0,s.mV)(),[r,l]=(0,o.useState)(!1),[a,c]=(0,o.useState)(!1),[u,h]=(0,o.useState)({isLoadingTrackers:!0,magnetTrackersLink:""});(0,o.useEffect)((()=>{m.Z.fetchTorrentTrackers(tt.Z.selectedTorrents[0]).then((e=>{null!=e&&h({isLoadingTrackers:!1,magnetTrackersLink:it(tt.Z.selectedTorrents[0],e.filter((e=>e.type!==nt.DHT)).map((e=>e.url)))})}))}),[]);const _=it(tt.Z.selectedTorrents[0]);return(0,p.tZ)(_e,{heading:i._("torrents.generate.magnet.heading"),content:(0,p.tZ)("div",{className:"modal__content inverse",children:(0,p.BX)(d.l0,{children:[null!==(e=tt.Z.torrents[tt.Z.selectedTorrents[0]])&&void 0!==e&&e.isPrivate?(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.Xq,{children:i._("torrents.generate.magnet.private.torrent")})}):null,(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.fE,{id:"magnet",ref:t,addonPlacement:"after",label:i._("torrents.generate.magnet.magnet"),defaultValue:_,readOnly:!0,children:(0,p.tZ)(d.G5,{onClick:()=>{var e;if("function"==typeof(null===(e=navigator.clipboard)||void 0===e?void 0:e.writeText))navigator.clipboard.writeText(_).then((()=>{l(!0)}));else if(null!=t.current){var n;null===(n=t.current)||void 0===n||n.select(),document.execCommand("copy"),l(!0)}},children:r?(0,p.tZ)(y.FV,{}):(0,p.tZ)(y.TU,{})})})}),(0,p.tZ)(d.p7,{children:u.isLoadingTrackers?(0,p.tZ)(d.fE,{id:"loading",label:i._("torrents.generate.magnet.magnet.with.trackers"),placeholder:i._("torrents.generate.magnet.loading.trackers"),disabled:!0}):(0,p.tZ)(d.fE,{id:"magnet-trackers",ref:n,addonPlacement:"after",label:i._("torrents.generate.magnet.magnet.with.trackers"),defaultValue:u.magnetTrackersLink,readOnly:!0,children:(0,p.tZ)(d.G5,{onClick:()=>{var e;if("function"==typeof(null===(e=navigator.clipboard)||void 0===e?void 0:e.writeText))navigator.clipboard.writeText(u.magnetTrackersLink).then((()=>{c(!0)}));else if(null!=n.current){var t;null===(t=n.current)||void 0===t||t.select(),document.execCommand("copy"),c(!0)}},children:a?(0,p.tZ)(y.FV,{}):(0,p.tZ)(y.TU,{})})})})]})}),actions:[{clickHandler:null,content:i._("button.close"),triggerDismiss:!0,type:"tertiary"}]})},lt=e=>{const t=e[0];if(!e.some((e=>!e.includes(t))))return t},at=()=>{const{i18n:e}=(0,s.mV)(),[t,n]=(0,o.useState)(!1);return(0,p.tZ)(_e,{heading:e._("torrents.move.heading"),content:(0,p.tZ)("div",{className:"modal__content",children:(0,p.BX)(d.l0,{className:"inverse",onSubmit:e=>{let{formData:t}=e;const i=tt.Z.selectedTorrents;i.length>0&&(n(!0),m.Z.moveTorrents({hashes:i,destination:t.destination,isBasePath:t.isBasePath,moveFiles:t.moveFiles,isCheckHash:t.isCheckHash}).then((()=>{_.Z.setActiveModal(null),n(!1)})))},children:[(0,p.tZ)(F,{id:"destination",selectable:"directories",suggested:lt(tt.Z.selectedTorrents.map((e=>tt.Z.torrents[e].directory))),showBasePathToggle:!0}),(0,p.tZ)(g,{actions:[{checked:!0,content:e._("torrents.move.data.label"),id:"moveFiles",type:"checkbox"},{checked:!1,content:e._("torrents.move.check_hash.label"),id:"isCheckHash",type:"checkbox"},{content:e._("button.cancel"),triggerDismiss:!0,type:"tertiary"},{content:e._("torrents.move.button.set.location"),isLoading:t,submit:!0,type:"primary"}]})]})})})},st=()=>{const{i18n:e}=(0,s.mV)(),[t,n]=(0,o.useState)(!1),{selectedTorrents:i}=tt.Z;return 0===i.length?(0,p.tZ)(_e,{heading:e._("torrents.remove"),content:(0,p.tZ)("div",{className:"modal__content inverse",children:(0,p.tZ)(d.l0,{children:(0,p.tZ)(d.p7,{children:(0,p.tZ)(s.cC,{id:"torrents.remove.error.no.torrents.selected"})})})}),actions:[{clickHandler:null,content:e._("button.ok"),triggerDismiss:!0,type:"primary"}]}):(0,p.tZ)(_e,{heading:e._("torrents.remove"),content:(0,p.tZ)("div",{className:"modal__content",children:(0,p.BX)(d.l0,{className:"inverse",onSubmit:e=>{let{formData:t}=e;n(!0);const i=t.deleteData;m.Z.deleteTorrents({hashes:tt.Z.selectedTorrents,deleteData:i}).then((()=>{n(!1),(e=>{let{deleteData:t}=e;null!=t&&c.Z.saveSetting("deleteTorrentData",t)})({deleteData:i}),_.Z.setActiveModal(null)}))},children:[(0,p.tZ)(d.p7,{children:(0,p.tZ)(s.cC,{id:"torrents.remove.are.you.sure",values:{count:i.length}})}),(0,p.tZ)(g,{actions:[{checked:u.Z.floodSettings.deleteTorrentData,content:e._("torrents.remove.delete.data"),id:"deleteData",type:"checkbox"},{content:e._("button.no"),triggerDismiss:!0,type:"tertiary"},{content:e._("button.yes"),isLoading:t,submit:!0,type:"primary"}]})]})})})},ot=()=>{const e=(0,o.useRef)(null),{i18n:t}=(0,s.mV)(),[n,i]=(0,o.useState)(!1);return(0,p.tZ)(_e,{heading:t._("torrents.set.tags.heading"),content:(0,p.tZ)("div",{className:"modal__content inverse",children:(0,p.tZ)(d.l0,{ref:e,children:(0,p.tZ)(d.p7,{children:(0,p.tZ)(H,{defaultValue:tt.Z.selectedTorrents.map((e=>tt.Z.torrents[e].tags))[0].slice(),id:"tags",placeholder:t._("torrents.set.tags.enter.tags")})})})}),actions:[{content:t._("button.cancel"),clickHandler:null,triggerDismiss:!0,type:"tertiary"},{content:t._("torrents.set.tags.button.set"),clickHandler:()=>{if(null==e.current)return;const{selectedTorrents:t}=tt.Z,n=e.current.getFormData(),r=n.tags?n.tags.split(","):[];i(!0),(null==t?void 0:t.length)>0&&m.Z.setTags({hashes:t,tags:r})},isLoading:n,triggerDismiss:!1,type:"primary"}]})},dt=()=>{const e=(0,o.useRef)(null),{i18n:t}=(0,s.mV)(),[n,i]=(0,o.useState)(!1),[r,l]=(0,o.useState)({isLoadingTrackers:!0,trackerURLs:[]});return(0,o.useEffect)((()=>{m.Z.fetchTorrentTrackers(tt.Z.selectedTorrents[0]).then((e=>{null!=e&&l({isLoadingTrackers:!1,trackerURLs:e.filter((e=>e.type!==nt.DHT)).map((e=>e.url))})}))}),[]),(0,p.tZ)(_e,{heading:t._("torrents.set.trackers.heading"),content:(0,p.tZ)("div",{className:"modal__content inverse",children:(0,p.tZ)(d.l0,{ref:e,children:r.isLoadingTrackers?(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.fE,{id:"loading",placeholder:t._("torrents.set.trackers.loading.trackers"),disabled:!0})}):(0,p.tZ)(Q,{id:"trackers",placeholder:t._("torrents.set.trackers.enter.tracker"),defaultValues:0===r.trackerURLs.length?void 0:r.trackerURLs.map(((e,t)=>({id:t,value:e})))})})}),actions:[{clickHandler:null,content:t._("button.cancel"),triggerDismiss:!0,type:"tertiary"},{clickHandler:()=>{if(null==e.current||n||r.isLoadingTrackers)return;i(!0);const t=e.current.getFormData(),l=q(t,"trackers").filter((e=>""!==e));m.Z.setTrackers({hashes:tt.Z.selectedTorrents,trackers:l}).then((()=>{i(!1),_.Z.setActiveModal(null)}))},content:t._("torrents.set.trackers.button.set"),isLoading:n||r.isLoadingTrackers,triggerDismiss:!1,type:"primary"}]})},ct=JSON.parse('{"i8":"0.0.0-master.e69eca8"}'),ut=(0,o.lazy)((()=>n.e(443).then(n.t.bind(n,6641,23)).then((e=>({default:e.react}))))),ht="https://github.com/jesec/flood",mt=()=>(0,p.tZ)(o.Suspense,{fallback:null,children:(0,p.tZ)(ut,{FloodVersion:()=>ct.i8,CommitBadge:()=>ct.i8.length>8?(0,p.tZ)("a",{href:ht,children:(0,p.tZ)("img",{alt:"Latest version of rolling build",src:"https://img.shields.io/npm/v/@jesec/flood?label=HEAD"})}):(0,p.tZ)("a",{href:ht,children:(0,p.tZ)("img",{alt:"Commits since user's version",src:`https://img.shields.io/github/commits-since/jesec/flood/v${ct.i8}`})})})});var _t=n(8111),pt=n(2552),gt=n(2809),ft=n(4982);const bt=(0,l.Pi)((()=>{const e=(0,o.useRef)(null),t=(0,o.useRef)(null),[n,l]=(0,o.useState)(null),[a,c]=(0,o.useState)(!1),[u,h]=(0,o.useState)(!1),{i18n:m}=(0,s.mV)();if((0,o.useEffect)((()=>{pt.Z.currentUser.isAdmin&&_t.Z.fetchUsers().then((()=>{c(!0)}))}),[]),!pt.Z.currentUser.isAdmin)return(0,p.BX)(d.l0,{children:[(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"auth.user.accounts"})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.Xq,{children:(0,p.tZ)(s.cC,{id:"auth.message.not.admin"})})})]});const _=!a&&0===pt.Z.users.length,g=U()("interactive-list",{"interactive-list--loading":_});return(0,p.BX)(d.l0,{onSubmit:()=>{if(null==e.current||null==t.current)return;const n=e.current.getFormData();if(null==n.username||""===n.username)l("auth.error.username.empty");else if(null==n.password||""===n.password)l("auth.error.password.empty");else{h(!0);const i=t.current;if(null==i)return l("connection.settings.error.empty"),void h(!1);_t.Z.createUser({username:n.username,password:n.password,client:i,level:!0===n.isAdmin?gt.u.ADMINISTRATOR:gt.u.USER}).then((()=>{null!=e.current&&e.current.resetForm(),l(null),h(!1)}),(()=>{l("general.error.unknown"),h(!1)})).then(_t.Z.fetchUsers)}},ref:e,children:[(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"auth.user.accounts"})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.U2,{children:(0,p.BX)("ul",{className:g,children:[(0,p.tZ)(r.Z,{children:_&&(0,p.tZ)(i.Z,{classNames:"interactive-list__loading-indicator",timeout:{enter:250,exit:250},children:(0,p.tZ)("div",{className:"interactive-list__loading-indicator",children:(0,p.tZ)(d.$z,{})},"loading-indicator")})}),pt.Z.users.slice().sort(((e,t)=>e.username.localeCompare(t.username))).map((e=>{const t=e.username===pt.Z.currentUser.username;let n=null,i=null;t?n=(0,p.tZ)("span",{className:"interactive-list__label__tag tag",children:(0,p.tZ)(s.cC,{id:"auth.current.user"})}):i=(0,p.tZ)("button",{className:"interactive-list__icon interactive-list__icon--action interactive-list__icon--action--warning",type:"button",onClick:()=>_t.Z.deleteUser(e.username).then(_t.Z.fetchUsers),children:(0,p.tZ)(y.x8,{})});const r=U()("interactive-list__item",{"interactive-list__item--disabled":t});return(0,p.BX)("li",{className:r,children:[(0,p.BX)("span",{className:"interactive-list__label",children:[(0,p.tZ)("div",{className:"interactive-list__label__text",children:e.username}),n]}),i]},e.username)}))]})})}),(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"auth.add.user"})}),n&&(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.Xq,{children:m._(n)})}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{id:"username",label:(0,p.tZ)(s.cC,{id:"auth.username"}),placeholder:m._("auth.username"),autoComplete:"username"}),(0,p.tZ)(d.fE,{id:"password",label:(0,p.tZ)(s.cC,{id:"auth.password"}),placeholder:m._("auth.password"),autoComplete:"new-password"}),(0,p.tZ)(d.XZ,{grow:!1,id:"isAdmin",labelOffset:!0,matchTextboxHeight:!0,children:(0,p.tZ)(s.cC,{id:"auth.admin"})})]}),(0,p.tZ)(ft.Z,{onSettingsChange:e=>{t.current=e}}),(0,p.tZ)("p",{}),(0,p.tZ)(d.p7,{justify:"end",children:(0,p.tZ)(d.zx,{isLoading:u,priority:"primary",type:"submit",children:(0,p.tZ)(s.cC,{id:"button.add"})})})]})})),Zt=(e,t)=>{var n;return null!=e[t]?e[t]:null===(n=u.Z.clientSettings)||void 0===n?void 0:n[t]},vt=e=>{const t=e.target,n=t.name,{value:i,type:r,checked:l}=t;let a={};return a="checkbox"===r?{[n]:l}:{[n]:i},a};function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ct(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(n),!0).forEach((function(t){wt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const kt=e=>{if(e&&0!==e.length)return e.join(", ")},Nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return""===e?[]:e.replace(/\s/g,"").split(",").map((e=>Number(e)))},St=e=>{let{onSettingsChange:t,onClientSettingsChange:n}=e;const[i,r]=(0,o.useState)({});return(0,p.BX)(d.l0,{onChange:e=>{let{event:l,formData:a}=e;const s=l.target;if("dropdownPresetDownload"===s.name||"dropdownPresetUpload"===s.name)return void t({speedLimits:{download:Nt(a.dropdownPresetDownload),upload:Nt(a.dropdownPresetUpload)}});const o=Ct(Ct({},i),vt(l));r(o),n(o)},children:[(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.bandwidth.transferrate.heading"})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.fE,{defaultValue:null!=u.Z.floodSettings.speedLimits?kt(u.Z.floodSettings.speedLimits.download):0,label:(0,p.tZ)(s.cC,{id:"settings.bandwidth.transferrate.dropdown.preset.download.label"}),id:"dropdownPresetDownload"})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.fE,{defaultValue:null!=u.Z.floodSettings.speedLimits?kt(u.Z.floodSettings.speedLimits.upload):0,label:(0,p.tZ)(s.cC,{id:"settings.bandwidth.transferrate.dropdown.preset.upload.label"}),id:"dropdownPresetUpload"})}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{defaultValue:Zt(i,"throttleGlobalDownSpeed"),label:(0,p.tZ)(s.cC,{id:"settings.bandwidth.transferrate.global.throttle.download"}),id:"throttleGlobalDownSpeed"}),(0,p.tZ)(d.fE,{defaultValue:Zt(i,"throttleGlobalUpSpeed"),label:(0,p.tZ)(s.cC,{id:"settings.bandwidth.transferrate.global.throttle.upload"}),id:"throttleGlobalUpSpeed"})]}),(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.bandwidth.slots.heading"})}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{defaultValue:Zt(i,"throttleMaxUploads"),label:(0,p.tZ)(s.cC,{id:"settings.bandwidth.slots.upload.label"}),id:"throttleMaxUploads"}),(0,p.tZ)(d.fE,{defaultValue:Zt(i,"throttleMaxUploadsGlobal"),label:(0,p.tZ)(s.cC,{id:"settings.bandwidth.slots.upload.global.label"}),id:"throttleMaxUploadsGlobal"})]}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{defaultValue:Zt(i,"throttleMaxDownloads"),label:(0,p.tZ)(s.cC,{id:"settings.bandwidth.slots.download.label"}),id:"throttleMaxDownloads"}),(0,p.tZ)(d.fE,{defaultValue:Zt(i,"throttleMaxDownloadsGlobal"),label:(0,p.tZ)(s.cC,{id:"settings.bandwidth.slots.download.global.label"}),id:"throttleMaxDownloadsGlobal"})]})]})};function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){xt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Dt=e=>{let{onClientSettingsChange:t}=e;const[n,i]=(0,o.useState)({});return(0,p.BX)(d.l0,{onChange:e=>{let{event:r}=e;const l=Pt(Pt({},n),vt(r));i(l),t(l)},children:[(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.connectivity.incoming.heading"})}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{defaultValue:Zt(n,"networkPortRange"),id:"networkPortRange",label:(0,p.tZ)(s.cC,{id:"settings.connectivity.port.range.label"}),width:"one-quarter"}),(0,p.tZ)(d.XZ,{defaultChecked:Zt(n,"networkPortRandom"),grow:!1,id:"networkPortRandom",labelOffset:!0,matchTextboxHeight:!0,children:(0,p.tZ)(s.cC,{id:"settings.connectivity.port.randomize.label"})}),(0,p.tZ)(d.XZ,{defaultChecked:Zt(n,"networkPortOpen"),grow:!1,id:"networkPortOpen",labelOffset:!0,matchTextboxHeight:!0,children:(0,p.tZ)(s.cC,{id:"settings.connectivity.port.open.label"})})]}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{defaultValue:Zt(n,"networkLocalAddress"),id:"networkLocalAddress",label:(0,p.tZ)(s.cC,{id:"settings.connectivity.ip.hostname.label"})}),(0,p.tZ)(d.fE,{defaultValue:Zt(n,"networkHttpMaxOpen"),id:"networkHttpMaxOpen",label:(0,p.tZ)(s.cC,{id:"settings.connectivity.max.http.connections"})})]}),(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.connectivity.dpd.heading"})}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{defaultValue:Zt(n,"dhtPort"),id:"dhtPort",label:(0,p.tZ)(s.cC,{id:"settings.connectivity.dht.port.label"}),width:"one-quarter"}),(0,p.tZ)(d.XZ,{defaultChecked:Zt(n,"dht"),grow:!1,id:"dht",labelOffset:!0,matchTextboxHeight:!0,children:(0,p.tZ)(s.cC,{id:"settings.connectivity.dht.label"})}),(0,p.tZ)(d.XZ,{defaultChecked:Zt(n,"protocolPex"),grow:!1,id:"protocolPex",labelOffset:!0,matchTextboxHeight:!0,children:(0,p.tZ)(s.cC,{id:"settings.connectivity.peer.exchange.label"})})]}),(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.connectivity.peers.heading"})}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{defaultValue:Zt(n,"throttleMinPeersNormal"),id:"throttleMinPeersNormal",label:(0,p.tZ)(s.cC,{id:"settings.connectivity.peers.min.label"})}),(0,p.tZ)(d.fE,{defaultValue:Zt(n,"throttleMaxPeersNormal"),id:"throttleMaxPeersNormal",label:(0,p.tZ)(s.cC,{id:"settings.connectivity.peers.max.label"})})]}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{defaultValue:Zt(n,"throttleMinPeersSeed"),id:"throttleMinPeersSeed",label:(0,p.tZ)(s.cC,{id:"settings.connectivity.peers.seeding.min.label"})}),(0,p.tZ)(d.fE,{defaultValue:Zt(n,"throttleMaxPeersSeed"),id:"throttleMaxPeersSeed",label:(0,p.tZ)(s.cC,{id:"settings.connectivity.peers.seeding.max.label"})})]}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.fE,{defaultValue:Zt(n,"trackersNumWant"),id:"trackersNumWant",label:(0,p.tZ)(s.cC,{id:"settings.connectivity.peers.desired.label"}),width:"one-half"})})]})};var jt=n(5181),Bt=n(8826),Xt=n(4920),Tt=n(3928),Et=n(6436),Mt=n(4387),Vt=n(9242),It=n.n(Vt),Rt=n(6408);const Lt=It()([(0,Et.E)("globally-draggable-item",{beginDrag(e){let{list:t,id:n,index:i,isVisible:r}=e;return{list:t,id:n,index:i,isVisible:r}},canDrag(e){let{isLocked:t}=e;return!t}},((e,t)=>({connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}))),(0,Mt.G)("globally-draggable-item",{drop(e){let{onDrop:t}=e;t&&t()},hover(e,t){const n=t.getItem();e.isLocked||n.index===e.index||n.list===e.list&&(e.onMove(n.index,e.index),n.index=e.index)}},(e=>({connectDropTarget:e.dropTarget()})))])((e=>{const{children:t,isDragging:n,isLocked:i,connectDragPreview:r,connectDragSource:l,connectDropTarget:a}=e;return(0,o.useEffect)((()=>{r((0,Rt.r)(),{captureDraggingState:!0})})),l(a((0,p.BX)("div",{className:U()("sortable-list__item",{"sortable-list__item--is-dragging":n,"sortable-list__item--is-locked":i}),children:[i?(0,p.tZ)(y.HE,{}):null,t]})))}));var Ft={name:"1d3w5wq",styles:"width:100%"};const $t=e=>{let{className:t,id:n,items:i,lockedIDs:r,renderItem:l,onMouseDown:a,onMove:s,onDrop:d}=e;const[c,u]=(0,o.useState)(i),h=U()("sortable-list",t);return(0,p.tZ)("div",{css:Ft,role:"none",onMouseDown:e=>{a&&a(e)},children:(0,p.tZ)(Tt.WG,{options:Xt.r,children:(0,p.tZ)("ul",{className:h,children:c.map(((e,t)=>{const{id:i,visible:a}=e;return(0,p.tZ)(Lt,{list:n,id:i,index:t,isLocked:r.includes(i),isVisible:a,onDrop:()=>{d&&d(c)},onMove:(e,t)=>{const n=c[e],i=c.slice();i.splice(e,1),i.splice(t,0,n),u(i),s&&s(i)},children:l(e,t)},i)}))})})})};$t.defaultProps={onMouseDown:void 0,onMove:void 0,onDrop:void 0};const Ut=$t;function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zt(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const qt=e=>{let{onSettingsChange:t}=e;const[n,i]=(0,o.useState)((()=>{const{mountPoints:e}=u.Z.floodSettings,t=Object.assign({},...Bt.Z.disks.map((e=>({[e.target]:e}))));return e.filter((e=>e in t)).map((e=>({id:e,visible:!0}))).concat(Object.keys(t).filter((t=>!e.includes(t))).map((e=>({id:e,visible:!1}))))})());return(0,p.tZ)(Ut,{id:"disks",className:"sortable-list--disks",items:n.slice(),lockedIDs:[],onDrop:e=>{i(e)},renderItem:e=>{const{id:r,visible:l}=e,a=(0,p.tZ)("span",{className:"sortable-list__content sortable-list__content--secondary",children:(0,p.tZ)(d.XZ,{defaultChecked:l,id:r,onClick:e=>{const l=n.map((t=>t.id===r?At(At({},t),{},{visible:e.target.checked}):t));t({mountPoints:l.filter((e=>e.visible)).map((e=>e.id))}),i(l)},children:(0,p.tZ)(s.cC,{id:"settings.diskusage.show"})})});return(0,p.BX)("div",{className:"sortable-list__content sortable-list__content__wrapper",children:[(0,p.tZ)("span",{className:"sortable-list__content sortable-list__content--primary",children:(0,p.tZ)("div",{children:r})}),a]})}})},Gt=e=>{let{onSettingsChange:t}=e;return(0,p.BX)(d.l0,{children:[(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.diskusage.mount.points"})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(qt,{onSettingsChange:t})})]})};function Qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(n),!0).forEach((function(t){Yt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Jt=e=>{let{onClientSettingsChange:t}=e;const[n,i]=(0,o.useState)({});return(0,p.BX)(d.l0,{onChange:e=>{let{event:r}=e;const l=Wt(Wt({},n),vt(r));i(l),t(l)},children:[(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.resources.disk.heading"})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.fE,{defaultValue:Zt(n,"directoryDefault"),id:"directoryDefault",label:(0,p.tZ)(s.cC,{id:"settings.resources.disk.download.location.label"})})}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.fE,{defaultValue:Zt(n,"networkMaxOpenFiles"),id:"networkMaxOpenFiles",label:(0,p.tZ)(s.cC,{id:"settings.resources.max.open.files"}),width:"one-half"}),(0,p.tZ)(d.XZ,{defaultChecked:Zt(n,"piecesHashOnCompletion"),grow:!1,id:"piecesHashOnCompletion",labelOffset:!0,matchTextboxHeight:!0,children:(0,p.tZ)(s.cC,{id:"settings.resources.disk.check.hash.label"})})]}),(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.resources.memory.heading"})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.fE,{defaultValue:Zt(n,"piecesMemoryMax"),id:"piecesMemoryMax",label:(0,p.BX)("div",{children:[(0,p.tZ)(s.cC,{id:"settings.resources.memory.max.label"})," ",(0,p.tZ)("em",{className:"unit",children:"(MB)"})]}),width:"one-half"})})]})};var Kt=n(7731);var en={name:"1d3w5wq",styles:"width:100%"},tn={name:"15rw530",styles:".sortable-list__item{cursor:default;}"};const nn=e=>{let{className:t,checkboxLabel:n,items:i}=e;return(0,p.tZ)("div",{css:en,role:"none",children:(0,p.tZ)("ul",{className:U()("sortable-list",t),css:tn,children:i.map((e=>{const{id:t,label:i,isLocked:r=!1,defaultChecked:l,onClick:a}=e;return(0,p.BX)("li",{className:U()("sortable-list__item",{"sortable-list__item--is-locked":r}),children:[r?(0,p.tZ)(y.HE,{}):null,(0,p.BX)("div",{className:"sortable-list__content sortable-list__content__wrapper",children:[(0,p.tZ)("span",{className:"sortable-list__content sortable-list__content--primary",children:(0,p.tZ)(s.cC,{id:i})}),r?null:(0,p.tZ)("span",{className:"sortable-list__content sortable-list__content--secondary",children:(0,p.tZ)(d.XZ,{defaultChecked:l,id:t,onClick:e=>null==a?void 0:a(e.target.checked),children:n&&(0,p.tZ)(s.cC,{id:n})})})]})]},t||i)}))})})};nn.defaultProps={className:void 0,checkboxLabel:void 0};const rn=nn,ln=e=>{let{onSettingsChange:t}=e;const n=(0,o.useRef)(u.Z.floodSettings.UIPageTitleSpeedEnabled);return(0,p.tZ)(rn,{items:[{label:"settings.ui.page.title.speed",defaultChecked:n.current,onClick:()=>{n.current=!n.current,t({UIPageTitleSpeedEnabled:n.current})}}]})};var an=n(8737),sn=n(2433);const on=e=>{let{onSettingsChange:t}=e;const n=(0,o.useRef)(sn.Z.torrentContextMenuActions.map((e=>{var t;let{id:n,visible:i}=e;return{id:n,visible:(null===(t=u.Z.floodSettings.torrentContextMenuActions.find((e=>e.id===n)))||void 0===t?void 0:t.visible)??i}})));return(0,p.tZ)(rn,{checkboxLabel:"settings.ui.torrent.context.menu.items.show",items:Object.keys(an.Z).map((e=>({label:an.Z[e],isLocked:"start"===e||"stop"===e||"setTaxonomy"===e||"torrentDetails"===e,defaultChecked:n.current.some((t=>t.id===e&&t.visible)),onClick:()=>{const i=n.current.find((t=>t.id===e));null!=i&&(i.visible=!i.visible),t({torrentContextMenuActions:n.current})}})))})};var dn=n(882),cn=n(9097);const un=e=>{let{torrentListViewSize:t,onSettingsChange:n}=e;const i=(0,o.useRef)(null),[r,l]=(0,o.useState)([...u.Z.floodSettings.torrentListColumns.filter((e=>null!=dn.Z[e.id])).slice(),...Object.keys(dn.Z).filter((e=>u.Z.floodSettings.torrentListColumns.every((t=>t.id!==e)))).map((e=>({id:e,visible:!1})))]),a="expanded"===t?["name","eta","downRate","percentComplete","downTotal","upRate"]:[];return(0,p.tZ)(Ut,{id:"torrent-details",className:"sortable-list--torrent-details",items:r,lockedIDs:a,onMouseDown:()=>{var e;null===(e=i.current)||void 0===e||e.dismissTooltip()},onDrop:e=>{const t=e.slice();n({torrentListColumns:t}),l(t)},renderItem:(e,o)=>{const{id:c,visible:u}=e;let h=null,m=null;if(a.includes(c)||(h=(0,p.tZ)("span",{className:"sortable-list__content sortable-list__content--secondary",children:(0,p.tZ)(d.XZ,{defaultChecked:u,id:c,onClick:e=>{const t=r.map((t=>({id:t.id,visible:t.id===c?e.target.checked:t.visible})));n({torrentListColumns:t}),l(t)},children:(0,p.tZ)(s.cC,{id:"settings.ui.torrent.details.enabled"})})})),"tags"===c&&"expanded"===t&&o<r.length-1){const e=(0,p.tZ)(s.cC,{id:"settings.ui.torrent.details.tags.placement"});m=(0,p.tZ)(cn.Z,{className:"tooltip tooltip--is-error",content:e,offset:-5,ref:i,width:200,wrapperClassName:"sortable-list__content sortable-list__content--secondary tooltip__wrapper",wrapText:!0,children:(0,p.tZ)(y.jj,{})})}return(0,p.BX)("div",{className:"sortable-list__content sortable-list__content__wrapper",children:[m,(0,p.tZ)("span",{className:"sortable-list__content sortable-list__content--primary",children:(0,p.tZ)(s.cC,{id:dn.Z[c]})}),h]})}})},hn=e=>{let{onSettingsChange:t}=e;const{i18n:n}=(0,s.mV)(),[i,r]=(0,o.useState)(u.Z.floodSettings.torrentListViewSize),[l,a]=(0,o.useState)(u.Z.floodSettings.language),[c,h]=(0,o.useState)(u.Z.floodSettings.UITagSelectorMode);return(0,p.BX)(d.l0,{onChange:e=>{let{event:n,formData:l}=e;const s=n.target;if("radio"===s.type&&(r(l["ui-torrent-size"]),h(l["ui-tag-selector-mode"]),t({torrentListViewSize:i,UITagSelectorMode:c})),"language"===s.name){const e=l.language;a(e),t({language:e})}},children:[(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.ui.language"})},"locale-header"),(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.Ph,{defaultID:l,id:"language",children:Object.keys(Kt.Z).map((e=>(0,p.tZ)(d.Ql,{id:e,children:null!=Kt.Z[e].id?n._(Kt.Z[e].id):Kt.Z[e]},e)))})},"locale-selection"),(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.ui.tag.selector.mode"})}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.Y8,{defaultChecked:"single"===c,groupID:"ui-tag-selector-mode",id:"single",width:"auto",children:(0,p.tZ)(s.cC,{id:"settings.ui.tag.selector.mode.single"})}),(0,p.tZ)(d.Y8,{defaultChecked:"multi"===c,groupID:"ui-tag-selector-mode",id:"multi",width:"auto",children:(0,p.tZ)(s.cC,{id:"settings.ui.tag.selector.mode.multi"})})]}),(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.ui.torrent.list"})}),(0,p.BX)(d.p7,{children:[(0,p.tZ)(d.Y8,{defaultChecked:"expanded"===i,groupID:"ui-torrent-size",id:"expanded",width:"auto",children:(0,p.tZ)(s.cC,{id:"settings.ui.torrent.size.expanded"})}),(0,p.tZ)(d.Y8,{defaultChecked:"condensed"===i,groupID:"ui-torrent-size",id:"condensed",width:"auto",children:(0,p.tZ)(s.cC,{id:"settings.ui.torrent.size.condensed"})})]}),(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.ui.displayed.details"})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(un,{torrentListViewSize:i,onSettingsChange:t})}),(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.ui.displayed.context.menu.items"})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(on,{onSettingsChange:t})}),(0,p.tZ)(xe,{children:(0,p.tZ)(s.cC,{id:"settings.ui.misc"})}),(0,p.tZ)(d.p7,{children:(0,p.tZ)(ln,{onSettingsChange:t})})]})};function mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){pn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const gn=(0,l.Pi)((()=>{const{i18n:e}=(0,s.mV)(),[t,n]=(0,o.useState)({}),[i,r]=(0,o.useState)({}),[l,a]=(0,o.useState)(!1),d=e=>{n(_n(_n({},t),e))},u=e=>{r(_n(_n({},i),e))},h=_n(_n({bandwidth:{content:St,props:{onClientSettingsChange:d,onSettingsChange:u},label:e._("settings.tabs.bandwidth")},connectivity:{content:Dt,props:{onClientSettingsChange:d},label:e._("settings.tabs.connectivity")},resources:{content:Jt,props:{onClientSettingsChange:d},label:e._("settings.tabs.resources")}},"none"!==ie.Z.authMethod?{authentication:{content:bt,label:e._("settings.tabs.authentication")}}:{}),{},{ui:{content:hn,label:e._("settings.tabs.userinterface"),props:{onSettingsChange:u}},diskusage:{content:Gt,label:e._("settings.tabs.diskusage"),props:{onSettingsChange:u}},about:{content:mt,label:e._("settings.tabs.about")}});return(0,p.tZ)(_e,{actions:[{clickHandler:null,content:e._("button.cancel"),triggerDismiss:!0,type:"tertiary"},{clickHandler:()=>{a(!0),Promise.all([c.Z.saveSettings(i,{alert:!0}),jt.Z.saveSettings(t,{alert:!0})]).then((()=>{a(!1),_.Z.setActiveModal(null)}))},isLoading:l,content:e._("button.save"),triggerDismiss:!1,type:"primary"}],size:"large",heading:e._("settings.tabs.heading"),orientation:ie.Z.isSmallScreen?"horizontal":"vertical",tabs:h})})),fn=()=>{const{i18n:e}=(0,s.mV)(),t=(0,o.useRef)(be().CancelToken.source()),n=(0,o.useRef)(null),[i,r]=(0,o.useState)(null),[l,a]=(0,o.useState)(null),[c,u]=(0,o.useState)(!0),[h,g]=(0,o.useState)(!1);(0,o.useEffect)((()=>{var e;const{current:n}=t;var i;"torrent-details"===(null===(e=_.Z.activeModal)||void 0===e?void 0:e.id)&&m.Z.fetchMediainfo(null===(i=_.Z.activeModal)||void 0===i?void 0:i.hash,t.current.token).then((e=>{r(e.output),u(!1)}),(e=>{be().isCancel(e)||(a(e.response.data),u(!1))}));return()=>{n.cancel()}}),[]);let f="mediainfo.heading";return c?f="mediainfo.fetching":l&&(f="mediainfo.execError"),(0,p.BX)("div",{className:"torrent-details__section mediainfo modal__content--nested-scroll__content",children:[(0,p.BX)("div",{className:"mediainfo__toolbar",children:[(0,p.tZ)("div",{className:"mediainfo__toolbar__item",children:(0,p.tZ)("span",{className:"torrent-details__table__heading--tertiary",children:(0,p.tZ)(s.cC,{id:f})})}),i&&(0,p.tZ)(cn.Z,{content:e._(h?"general.clipboard.copied":"general.clipboard.copy"),wrapperClassName:"tooltip__wrapper mediainfo__toolbar__item",children:(0,p.tZ)(d.zx,{priority:"tertiary",onClick:()=>{var e;null!=i&&("function"==typeof(null===(e=navigator.clipboard)||void 0===e?void 0:e.writeText)?navigator.clipboard.writeText(i).then((()=>{g(!0)})):null!=n.current&&(n.current.value=i,n.current.select(),document.execCommand("copy"),g(!0)))},children:h?(0,p.tZ)(y.MC,{}):(0,p.tZ)(y.TU,{})})})]}),(0,p.tZ)("input",{ref:n,style:{width:"0.1px",height:"1px",position:"absolute",right:0}}),l?(0,p.tZ)("pre",{className:"mediainfo__output mediainfo__output--error",children:l.message}):(0,p.tZ)("pre",{className:"mediainfo__output",children:i})]})};function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Zn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bn(Object(n),!0).forEach((function(t){vn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yn=(e,t)=>Zn(Zn(Zn(Zn({},e),null!=e.directories?{directories:Object.assign({},...Object.keys(e.directories).map((n=>null!=e.directories?{[n]:yn(e.directories[n],t)}:{})))}:{}),null!=e.files?{files:Object.assign({},...Object.keys(e.files).map((n=>null!=e.files?{[n]:Zn(Zn({},e.files[n]),{},{isSelected:t})}:{})))}:{}),{},{isSelected:t}),Cn=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const{depth:i,path:r,select:l,type:a}=t,s=r[n];if(n===i-1){var o;if("file"===a&&null!=(null===(o=e.files)||void 0===o?void 0:o[s])){const t=Zn(Zn({},e.files),{},{[s]:Zn(Zn({},e.files[s]),{},{isSelected:l})});return Zn(Zn({},e),{},{files:t,isSelected:Object.values(t).every((e=>{let{isSelected:t}=e;return t}))&&(null==e.directories||Object.values(e.directories).every((e=>{let{isSelected:t}=e;return t})))})}if("directory"===a&&null!=e.directories){const t=Zn(Zn({},e.directories),{},{[s]:yn(e.directories[s],l)});return Zn(Zn({},e),{},{directories:t,isSelected:Object.values(t).every((e=>{let{isSelected:t}=e;return t}))&&(null==e.files||Object.values(e.files).every((e=>{let{isSelected:t}=e;return t})))})}return e}if(null!=e.directories){const i=e.directories;return Object.keys(i).forEach((e=>{e===s&&(i[e]=Cn(i[e],t,n+1))})),Zn(Zn({},e),{},{directories:i,isSelected:Object.values(i).every((e=>{let{isSelected:t}=e;return t}))})}return e},wn=e=>{const t=[];if(null!=e.files){const{files:n}=e;Object.keys(n).forEach((e=>{const i=n[e];i.isSelected&&t.push(i.index)}))}if(null!=e.directories){const{directories:n}=e;Object.keys(n).forEach((e=>{t.push(...wn(n[e]))}))}return t},kn={selectAll:yn,applySelection:Cn,getSelectedItems:wn,getSelectionTree:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n={isSelected:t};return e.forEach((e=>{const i=e.path.split("/");let r=n;for(;i.length-1;){const e=i.shift();null==r.directories&&(r.directories={}),null==r.directories[e]&&(r.directories[e]={isSelected:t}),r=r.directories[e]}null==r.files&&(r.files={}),r.files[e.filename]=Zn(Zn({},e),{},{isSelected:t})})),n}};var Nn=n(2036),Sn=n(2104);const On=e=>{let{depth:t,items:n,hash:i,path:r,onItemSelect:l}=e;const[a,s]=(0,o.useState)(null),c=(0,o.useRef)({});if(null==n)return null;const u=Object.values(n).sort(((e,t)=>e.filename.localeCompare(t.filename))).map((e=>{var o;const u=n&&n[e.filename]&&n[e.filename].isSelected||!1,h=U()("directory-tree__node file","directory-tree__node--file directory-tree__node--selectable",{"directory-tree__node--selected":u});return(0,p.BX)("div",{className:h,title:e.filename,children:[(0,p.BX)("div",{className:"file__label file__detail",children:[(0,p.BX)("div",{className:"file__checkbox directory-tree__checkbox",children:[(0,p.tZ)("div",{className:"directory-tree__checkbox__item directory-tree__checkbox__item--checkbox",children:(0,p.tZ)(d.XZ,{checked:u,id:`${e.index}`,onClick:()=>l({type:"file",depth:t,path:[...r,e.filename],select:!u})})}),(0,p.tZ)("div",{className:"directory-tree__checkbox__item directory-tree__checkbox__item--icon",children:(0,p.tZ)(y.$B,{})})]}),(0,p.tZ)("div",{className:"file__name",children:(0,p.tZ)("a",{href:`${ie.Z.baseURI}api/torrents/${i}/contents/${e.index}/data`,style:{textDecoration:"none"},target:"_blank",rel:"noreferrer",children:e.filename})})]}),(0,p.tZ)("div",{className:"file__detail file__detail--secondary",children:(0,p.tZ)(Sn.Z,{value:e.sizeBytes,precision:1})}),(0,p.BX)("div",{className:"file__detail file__detail--secondary",children:[Math.trunc(e.percentComplete),"%"]}),(0,p.tZ)("div",{className:"file__detail file__detail--secondary file__detail--priority",children:(0,p.tZ)(Nn.Z,{level:e.priority,id:e.index,maxLevel:2,onChange:(e,t)=>m.Z.setFilePriority(i,{indices:[Number(e)],priority:t}),priorityType:"file"},`${e.index}-${e.filename}`)}),"function"==typeof(null===(o=navigator.clipboard)||void 0===o?void 0:o.writeText)&&(0,p.tZ)("button",{className:"file__detail file__detail--secondary file__detail--clipboard",type:"button",onClick:()=>{const t=t=>{""!==t&&("function"==typeof navigator.share?navigator.share({title:e.filename,url:t}).then((()=>s(e.index))):navigator.clipboard.writeText(t).then((()=>s(e.index))))},n=c.current[e.index];null!=n?t(n):(c.current[e.index]="",m.Z.getTorrentContentsDataPermalink(i,[e.index]).then((n=>{c.current[e.index]=n,t(n)}),(()=>{c.current[e.index]=null})))},children:a===e.index?(0,p.tZ)(y.MC,{}):(0,p.tZ)(y.TU,{})})]},e.filename)}));return(0,p.tZ)("div",{className:"directory-tree__node directory-tree__node--file-list",children:u})};var Pn={name:"r5l0s9",styles:"width:100%;text-align:left;:focus{outline:none;-webkit-tap-highlight-color:transparent;}:focus-visible{outline:dashed;}"};const xn=e=>{let{depth:t,directoryName:n,id:i,itemsTree:r,hash:l,path:a,isSelected:s,onItemSelect:c}=e;const[u,h]=(0,o.useState)(!1),m=[...a,n];return(0,p.BX)("div",{className:U()("directory-tree__branch",`directory-tree__branch--depth-${t}`,{"directory-tree__node--selected":s}),children:[(0,p.tZ)("button",{className:U()("directory-tree__node","directory-tree__node--selectable directory-tree__node--directory",{"is-expanded":u}),css:Pn,type:"button",onClick:()=>h(!u),title:n,children:(0,p.BX)("div",{className:"file__label",children:[(0,p.BX)("div",{className:"file__checkbox directory-tree__checkbox",children:[(0,p.tZ)("div",{className:"directory-tree__checkbox__item directory-tree__checkbox__item--checkbox",children:(0,p.tZ)(d.XZ,{checked:s,id:i,onClick:()=>c({type:"directory",depth:t,path:m,select:!s})})}),(0,p.tZ)("div",{className:"directory-tree__checkbox__item directory-tree__checkbox__item--icon",children:u?(0,p.tZ)(y.DB,{}):(0,p.tZ)(y.Bm,{})})]}),(0,p.tZ)("div",{className:"file__name",children:n})]})}),u?(0,p.tZ)("div",{className:"directory-tree__node directory-tree__node--group",children:(0,p.tZ)(Dn,{depth:t,hash:l,onItemSelect:c,path:m,itemsTree:r},`${u}-${t}`)}):null]})},Dn=e=>{const{depth:t=0,itemsTree:n,hash:i,path:r,onItemSelect:l}=e,{files:a,directories:s}=n,o=t+1,d=null!=s?Object.keys(s).sort(((e,t)=>e.localeCompare(t))).map(((e,t)=>{const a=n.directories&&n.directories[e],s=`${t}${o}${e}`,d=a&&a.isSelected||!1;return null==a?null:(0,p.tZ)(xn,{depth:o,directoryName:e,hash:i,id:s,isSelected:d,itemsTree:a,onItemSelect:l,path:r},s)})):[],c=null!=a&&Object.keys(a).length>0?(0,p.tZ)(On,{depth:o,hash:i,onItemSelect:l,path:r,items:n.files},`files-${o}`):null;return(0,p.tZ)("div",{className:"directory-tree__tree",children:d.concat(c)})},jn=(0,l.Pi)((()=>{var e,t;const[n,i]=(0,o.useState)([]),[r,l]=(0,o.useState)({}),[a,c]=(0,o.useState)([]),{i18n:u}=(0,s.mV)();if((0,o.useEffect)((()=>{var e,t;"torrent-details"===(null===(e=_.Z.activeModal)||void 0===e?void 0:e.id)&&m.Z.fetchTorrentContents(null===(t=_.Z.activeModal)||void 0===t?void 0:t.hash).then((e=>{null!=e&&(i(e),l(kn.getSelectionTree(e)))}))}),[]),"torrent-details"!==(null===(e=_.Z.activeModal)||void 0===e?void 0:e.id))return null;const{hash:h}=null===_.Z||void 0===_.Z?void 0:_.Z.activeModal;let g=null,f=null,b=!1;(null==n?void 0:n.length)>0?(b=a.length>=n.length,g=(0,p.BX)("div",{className:"file__checkbox directory-tree__checkbox",children:[(0,p.tZ)("div",{className:"directory-tree__checkbox__item directory-tree__checkbox__item--checkbox",children:(0,p.tZ)(d.p7,{children:(0,p.tZ)(d.XZ,{checked:b,id:"select-all",onClick:()=>{const e=kn.getSelectionTree(n,a.length<n.length);l(e),c(kn.getSelectedItems(e))}})})}),(0,p.tZ)("div",{className:"directory-tree__checkbox__item directory-tree__checkbox__item--icon",children:(0,p.tZ)(y.Zz,{})})]}),f=(0,p.tZ)(Dn,{depth:0,onItemSelect:e=>{const t=kn.applySelection(r,e);l(t),c(kn.getSelectedItems(t))},hash:h,path:[],itemsTree:r})):(g=(0,p.tZ)(y.Zz,{}),f=(0,p.tZ)("div",{className:"directory-tree__node directory-tree__node--file",children:(0,p.tZ)(s.cC,{id:"torrents.details.files.loading"})}));const Z=U()("directory-tree__node","directory-tree__parent-directory torrent-details__section__heading",{"directory-tree__node--selected":b}),v=(0,p.tZ)("div",{className:Z,children:(0,p.BX)("div",{className:"file__label",children:[g,(0,p.tZ)("div",{className:"file__name",children:null===(t=tt.Z.torrents)||void 0===t?void 0:t[h].directory})]})}),C=U()("inverse directory-tree__wrapper",{"directory-tree__wrapper--toolbar-visible":a.length>0});return(0,p.BX)(d.l0,{className:C,onChange:e=>{let{event:t}=e;if(null!=t.target&&"file-priority"===t.target.name){const e=t.target;e.value&&m.Z.setFilePriority(h,{indices:a,priority:Number(e.value)})}},children:[(0,p.tZ)("div",{className:"directory-tree__selection-toolbar",children:(0,p.BX)(d.p7,{align:"center",children:[(0,p.tZ)(d.U2,{width:"one-quarter",grow:!1,shrink:!1,children:(0,p.tZ)(s.cC,{id:"torrents.details.selected.files",values:{count:a.length,countElement:(0,p.tZ)("span",{className:"directory-tree__selection-toolbar__item-count",children:a.length})}})}),(0,p.tZ)(d.zx,{onClick:e=>{e.preventDefault();const{baseURI:t}=ie.Z,n=document.createElement("a");n.download="",n.href=`${t}api/torrents/${h}/contents/${a.join(",")}/data`,n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)},grow:!1,shrink:!1,children:(0,p.tZ)(s.cC,{id:"torrents.details.files.download.file",values:{count:a.length}})}),(0,p.BX)(d.Ph,{id:"file-priority",persistentPlaceholder:!0,shrink:!1,defaultID:"",children:[(0,p.tZ)(d.Ql,{id:-1,isPlaceholder:!0,children:(0,p.tZ)(s.cC,{id:"torrents.details.selected.files.set.priority"})}),(0,p.tZ)(d.Ql,{id:0,children:u._("priority.dont.download")}),(0,p.tZ)(d.Ql,{id:1,children:u._("priority.normal")}),(0,p.tZ)(d.Ql,{id:2,children:u._("priority.high")})]})]})}),(0,p.BX)("div",{className:"directory-tree torrent-details__section torrent-details__section--file-tree modal__content--nested-scroll__content",children:[v,f]})]})})),Bn=jn,Xn=(0,l.Pi)((()=>{var e;const{i18n:t}=(0,s.mV)();if("torrent-details"!==(null===(e=_.Z.activeModal)||void 0===e?void 0:e.id))return null;const n=tt.Z.torrents[_.Z.activeModal.hash];if(null==n)return null;const i=(0,p.tZ)("span",{className:"not-available",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.none"})});return(0,p.tZ)("div",{className:"torrent-details__section torrent-details__section--general",children:(0,p.tZ)("table",{className:"torrent-details__table table",children:(0,p.BX)("tbody",{children:[(0,p.tZ)("tr",{className:"torrent-details__table__heading",children:(0,p.tZ)("td",{className:"torrent-details__table__heading--tertiary",colSpan:2,children:(0,p.tZ)(s.cC,{id:"torrents.details.general.heading.general"})})}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--dateAdded",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.date.added"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:n.dateAdded>0?t.date(new Date(1e3*n.dateAdded),{year:"numeric",month:"long",day:"2-digit",hour:"numeric",minute:"numeric"}):i})]}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--location",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.location"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:n.directory})]}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--tags",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.tags"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:n.tags.length?(r=n.tags,r.map((e=>(0,p.tZ)("span",{className:"tag",children:e},e)))):i})]}),(0,p.tZ)("tr",{className:"torrent-details__table__heading",children:(0,p.tZ)("td",{className:"torrent-details__table__heading--tertiary",colSpan:2,children:(0,p.tZ)(s.cC,{id:"torrents.details.general.heading.transfer"})})}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--dateFinished",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.date.finished"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:n.dateFinished>0?t.date(new Date(1e3*n.dateFinished),{year:"numeric",month:"long",day:"2-digit",hour:"numeric",minute:"numeric"}):i})]}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--downloaded",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.downloaded"})}),(0,p.BX)("td",{className:"torrent-details__detail__value",children:[t.number(n.percentComplete),(0,p.tZ)("em",{className:"unit",children:"%"})]})]}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--peers",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.peers"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.connected",values:{connectedCount:n.peersConnected,connected:t.number(n.peersConnected),total:t.number(n.peersTotal)}})})]}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--seeds",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.seeds"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.connected",values:{connectedCount:n.seedsConnected,connected:t.number(n.seedsConnected),total:t.number(n.seedsTotal)}})})]}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--dateActive",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.date.active"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:0===n.dateActive?i:-1===n.dateActive?t._("torrents.details.general.date.active.now"):t.date(new Date(1e3*n.dateActive),{year:"numeric",month:"long",day:"2-digit",hour:"numeric",minute:"numeric"})})]}),(0,p.tZ)("tr",{className:"torrent-details__table__heading",children:(0,p.tZ)("td",{className:"torrent-details__table__heading--tertiary",colSpan:2,children:(0,p.tZ)(s.cC,{id:"torrents.details.general.heading.torrent"})})}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--created",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.date.created"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:n.dateCreated>0?t.date(new Date(1e3*n.dateCreated),{year:"numeric",month:"long",day:"2-digit",hour:"numeric",minute:"numeric"}):i})]}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--hash",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.hash"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:n.hash})]}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--size",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.size"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:(0,p.tZ)(Sn.Z,{value:n.sizeBytes})})]}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--type",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.type"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:n.isPrivate?t._("torrents.details.general.type.private"):t._("torrents.details.general.type.public")})]}),(0,p.tZ)("tr",{className:"torrent-details__table__heading",children:(0,p.tZ)("td",{className:"torrent-details__table__heading--tertiary",colSpan:2,children:(0,p.tZ)(s.cC,{id:"torrents.details.general.heading.tracker"})})}),(0,p.BX)("tr",{className:"torrent-details__detail torrent-details__detail--tracker-message",children:[(0,p.tZ)("td",{className:"torrent-details__detail__label",children:(0,p.tZ)(s.cC,{id:"torrents.details.general.tracker.message"})}),(0,p.tZ)("td",{className:"torrent-details__detail__value",children:n.message?n.message:i})]})]})})});var r}));var Tn=n(1109),En=n(228),Mn=n(6882);const Vn=(0,l.Pi)((()=>{var e;const{i18n:t}=(0,s.mV)(),n="torrent-details"===(null===(e=_.Z.activeModal)||void 0===e?void 0:e.id)?tt.Z.torrents[_.Z.activeModal.hash]:void 0,[i,r]=(0,o.useState)("stop");if((0,o.useEffect)((()=>{null!=n&&n.status.includes("stopped")?r("stop"):r("start")}),[null==n?void 0:n.status]),null==n)return null;const l=(0,Tn.T)({status:n.status,upRate:n.upRate,downRate:n.downRate},"torrent-details__header");return(0,p.BX)("div",{className:l,children:[(0,p.tZ)("h1",{className:"torrent-details__heading torrent-details--name",children:n.name}),(0,p.BX)("div",{className:"torrent-details__sub-heading",children:[(0,p.BX)("ul",{className:"torrent-details__sub-heading__secondary",children:[(0,p.BX)("li",{className:"torrent-details__sub-heading__tertiary torrent-details__sub-heading__tertiary--download",children:[(0,p.tZ)(y.ki,{}),(0,p.tZ)(Sn.Z,{value:n.downRate,isSpeed:!0})," — ",(0,p.tZ)(Sn.Z,{value:n.bytesDone})]}),(0,p.BX)("li",{className:"torrent-details__sub-heading__tertiary torrent-details__sub-heading__tertiary--upload",children:[(0,p.tZ)(y.u3,{}),(0,p.tZ)(Sn.Z,{value:n.upRate,isSpeed:!0})," — ",(0,p.tZ)(Sn.Z,{value:n.upTotal})]}),(0,p.BX)("li",{className:"torrent-details__sub-heading__tertiary",children:[(0,p.tZ)(y.T_,{}),t.number(n.ratio)]}),(0,p.BX)("li",{className:"torrent-details__sub-heading__tertiary",children:[(0,p.tZ)(y.SU,{}),(0,p.tZ)(En.Z,{value:n.eta})]})]}),(0,p.BX)("ul",{className:"torrent-details__sub-heading__secondary",children:[(0,p.tZ)("li",{className:"torrent-details__sub-heading__tertiary",children:(0,p.tZ)(Nn.Z,{id:n.hash,level:n.priority,maxLevel:3,priorityType:"torrent",onChange:(e,t)=>{m.Z.setPriority({hashes:[`${e}`],priority:t})}})},"priority-meter"),(0,p.tZ)("li",{className:"torrent-details__sub-heading__tertiary",children:(0,p.BX)("button",{className:U()("torrent-details__action",{"is-active":"start"===i}),type:"button",onClick:()=>{r("start"),m.Z.startTorrents({hashes:[n.hash]})},children:[(0,p.tZ)(y.zf,{}),(0,p.tZ)(s.cC,{id:"torrents.details.actions.start"})]})},"start"),(0,p.tZ)("li",{className:"torrent-details__sub-heading__tertiary",children:(0,p.BX)("button",{className:U()("torrent-details__action",{"is-active":"stop"===i}),type:"button",onClick:()=>{r("stop"),m.Z.stopTorrents({hashes:[n.hash]})},children:[(0,p.tZ)(y.dV,{}),(0,p.tZ)(s.cC,{id:"torrents.details.actions.stop"})]})},"stop")]})]}),(0,p.tZ)(Mn.Z,{percent:(0,Ze.Fl)((()=>Math.ceil(n.percentComplete))).get(),status:(0,Ze.Fl)((()=>(0,Tn.o)(n.status))).get()})]})}));var In=n(3337),Rn=n(8447);var Ln={name:"17lw7on",styles:"td{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"};const Fn=()=>{const[e,t]=(0,o.useState)([]),[n,i]=(0,o.useState)(null),r=()=>{var e,n;(i(null),"torrent-details"===(null===(e=_.Z.activeModal)||void 0===e?void 0:e.id))&&m.Z.fetchTorrentPeers(null===(n=_.Z.activeModal)||void 0===n?void 0:n.hash).then((e=>{null!=e&&t(e)}));i(ie.Z.pollInterval)};return(0,o.useEffect)((()=>r()),[]),(0,In.Z)((()=>r()),n),(0,p.tZ)("div",{className:"torrent-details__section torrent-details__section--peers",children:(0,p.BX)("table",{className:"torrent-details__table table",css:Ln,children:[(0,p.tZ)("thead",{className:"torrent-details__table__heading",children:(0,p.BX)("tr",{children:[(0,p.BX)("th",{className:"torrent-details__table__heading--primary",children:[(0,p.tZ)(s.cC,{id:"torrents.details.peers"}),(0,p.tZ)(Rn.Z,{children:e.length})]}),(0,p.tZ)("th",{className:"torrent-details__table__heading--secondary",children:"DL"}),(0,p.tZ)("th",{className:"torrent-details__table__heading--secondary",children:"UL"}),(0,p.tZ)("th",{className:"torrent-details__table__heading--secondary",children:"%"}),(0,p.tZ)("th",{className:"torrent-details__table__heading--secondary",children:"Client"}),(0,p.tZ)("th",{className:"torrent-details__table__heading--secondary",children:"Enc"}),(0,p.tZ)("th",{className:"torrent-details__table__heading--secondary",children:"In"})]})}),(0,p.tZ)("tbody",{children:e.map((e=>{const{country:t}=e,n=e.isEncrypted?(0,p.tZ)(y.HE,{}):null,i=e.isIncoming?(0,p.tZ)(y.FV,{}):null;return(0,p.BX)("tr",{children:[(0,p.BX)("td",{children:[(0,p.BX)("span",{className:"peers-list__flag",children:[(0,p.tZ)(o.Suspense,{fallback:(0,p.tZ)(y.$j,{}),children:(0,p.tZ)(y.AW,{countryCode:t})}),(0,p.tZ)("span",{className:"peers-list__flag__text",children:t})]}),e.address]}),(0,p.tZ)("td",{children:(0,p.tZ)(Sn.Z,{value:e.downloadRate,isSpeed:!0})}),(0,p.tZ)("td",{children:(0,p.tZ)(Sn.Z,{value:e.uploadRate,isSpeed:!0})}),(0,p.tZ)("td",{children:`${Math.ceil(e.completedPercent)}%`}),(0,p.tZ)("td",{children:e.clientVersion}),(0,p.tZ)("td",{className:"peers-list__encryption",children:n}),(0,p.tZ)("td",{className:"peers-list__incoming",children:i})]},e.address)}))})]})})},$n=()=>{const[e,t]=(0,o.useState)([]),n=e.length,i=["http","udp","dht"],r=e.map((e=>(0,p.BX)("tr",{children:[(0,p.tZ)("td",{children:e.url}),(0,p.tZ)("td",{children:i[e.type-1]})]},e.url)));return(0,o.useEffect)((()=>{var e,n;"torrent-details"===(null===(e=_.Z.activeModal)||void 0===e?void 0:e.id)&&m.Z.fetchTorrentTrackers(null===(n=_.Z.activeModal)||void 0===n?void 0:n.hash).then((e=>{null!=e&&t(e)}))}),[]),(0,p.tZ)("div",{className:"torrent-details__trackers torrent-details__section",children:(0,p.BX)("table",{className:"torrent-details__table table",children:[(0,p.tZ)("thead",{className:"torrent-details__table__heading",children:(0,p.BX)("tr",{children:[(0,p.BX)("th",{className:"torrent-details__table__heading--primary",children:[(0,p.tZ)(s.cC,{id:"torrents.details.trackers"}),(0,p.tZ)(Rn.Z,{children:n})]}),(0,p.tZ)("th",{className:"torrent-details__table__heading--secondary",children:(0,p.tZ)(s.cC,{id:"torrents.details.trackers.type"})})]})}),(0,p.tZ)("tbody",{children:r})]})})},Un=(0,l.Pi)((()=>{const{i18n:e}=(0,s.mV)(),{isSmallScreen:t}=ie.Z,n={"torrent-details":{content:Xn,label:e._("torrents.details.details")},"torrent-contents":{content:Bn,label:e._("torrents.details.files"),modalContentClasses:"modal__content--nested-scroll"},"torrent-peers":{content:Fn,label:e._("torrents.details.peers")},"torrent-trackers":{content:$n,label:e._("torrents.details.trackers")},"torrent-mediainfo":{content:fn,label:e._("torrents.details.mediainfo"),modalContentClasses:"modal__content--nested-scroll"}};return(0,p.tZ)(_e,{heading:(0,p.tZ)(Vn,{},"torrent-heading"),size:"large",tabs:n,orientation:t?"horizontal":"vertical",tabsInBody:!t})})),zn=e=>{switch(e){case"add-torrents":return(0,p.tZ)(pe,{});case"confirm":return(0,p.tZ)(ge,{});case"feeds":return(0,p.tZ)(et,{});case"generate-magnet":return(0,p.tZ)(rt,{});case"move-torrents":return(0,p.tZ)(at,{});case"remove-torrents":return(0,p.tZ)(st,{});case"set-taxonomy":return(0,p.tZ)(ot,{});case"set-trackers":return(0,p.tZ)(dt,{});case"settings":return(0,p.tZ)(gn,{});case"torrent-details":return(0,p.tZ)(Un,{});default:return null}},An=(0,l.Pi)((()=>{const{id:e}=_.Z.activeModal||{};let t;return(0,a.Z)("Escape",(()=>_.Z.setActiveModal(null))),null!=e&&(t=(0,p.tZ)(i.Z,{classNames:"modal__animation",timeout:{enter:500,exit:500},children:(0,p.BX)("div",{className:"modal",children:[(0,p.tZ)("div",{className:"modal__overlay",role:"none",onClick:()=>{_.Z.setActiveModal(null)}}),zn(e)]})},e)),(0,p.tZ)(r.Z,{children:t})}))}}]);