satis 1.0.75 → 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (720) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/gem-push.yml +11 -0
  3. data/.gitignore +15 -0
  4. data/.nvmrc +1 -0
  5. data/.rubocop.yml +18 -0
  6. data/Gemfile +27 -0
  7. data/Procfile +2 -0
  8. data/README.md +47 -25
  9. data/TODO.md +26 -0
  10. data/app/assets/config/satis_manifest.js +8 -1
  11. data/app/assets/fontawesome/brands.js +6 -0
  12. data/app/assets/fontawesome/fontawesome.js +6 -0
  13. data/app/assets/fontawesome/solid.js +6 -0
  14. data/app/assets/images/satis/flags/1x1/ac.svg +81 -0
  15. data/app/assets/images/satis/flags/1x1/ad.svg +148 -0
  16. data/app/assets/images/satis/flags/1x1/ae.svg +6 -0
  17. data/app/assets/images/satis/flags/1x1/af.svg +81 -0
  18. data/app/assets/images/satis/flags/1x1/ag.svg +14 -0
  19. data/app/assets/images/satis/flags/1x1/ai.svg +763 -0
  20. data/app/assets/images/satis/flags/1x1/al.svg +5 -0
  21. data/app/assets/images/satis/flags/1x1/am.svg +5 -0
  22. data/app/assets/images/satis/flags/1x1/ao.svg +13 -0
  23. data/app/assets/images/satis/flags/1x1/aq.svg +5 -0
  24. data/app/assets/images/satis/flags/1x1/ar.svg +31 -0
  25. data/app/assets/images/satis/flags/1x1/as.svg +33 -0
  26. data/app/assets/images/satis/flags/1x1/at.svg +6 -0
  27. data/app/assets/images/satis/flags/1x1/au.svg +11 -0
  28. data/app/assets/images/satis/flags/1x1/aw.svg +186 -0
  29. data/app/assets/images/satis/flags/1x1/ax.svg +18 -0
  30. data/app/assets/images/satis/flags/1x1/az.svg +8 -0
  31. data/app/assets/images/satis/flags/1x1/ba.svg +12 -0
  32. data/app/assets/images/satis/flags/1x1/bb.svg +6 -0
  33. data/app/assets/images/satis/flags/1x1/bd.svg +4 -0
  34. data/app/assets/images/satis/flags/1x1/be.svg +7 -0
  35. data/app/assets/images/satis/flags/1x1/bf.svg +7 -0
  36. data/app/assets/images/satis/flags/1x1/bg.svg +7 -0
  37. data/app/assets/images/satis/flags/1x1/bh.svg +9 -0
  38. data/app/assets/images/satis/flags/1x1/bi.svg +15 -0
  39. data/app/assets/images/satis/flags/1x1/bj.svg +14 -0
  40. data/app/assets/images/satis/flags/1x1/bl.svg +7 -0
  41. data/app/assets/images/satis/flags/1x1/bm.svg +99 -0
  42. data/app/assets/images/satis/flags/1x1/bn.svg +36 -0
  43. data/app/assets/images/satis/flags/1x1/bo.svg +678 -0
  44. data/app/assets/images/satis/flags/1x1/bq.svg +5 -0
  45. data/app/assets/images/satis/flags/1x1/br.svg +45 -0
  46. data/app/assets/images/satis/flags/1x1/bs.svg +13 -0
  47. data/app/assets/images/satis/flags/1x1/bt.svg +89 -0
  48. data/app/assets/images/satis/flags/1x1/bv.svg +13 -0
  49. data/app/assets/images/satis/flags/1x1/bw.svg +7 -0
  50. data/app/assets/images/satis/flags/1x1/by.svg +22 -0
  51. data/app/assets/images/satis/flags/1x1/bz.svg +145 -0
  52. data/app/assets/images/satis/flags/1x1/ca.svg +4 -0
  53. data/app/assets/images/satis/flags/1x1/cc.svg +19 -0
  54. data/app/assets/images/satis/flags/1x1/cd.svg +12 -0
  55. data/app/assets/images/satis/flags/1x1/cf.svg +15 -0
  56. data/app/assets/images/satis/flags/1x1/cg.svg +12 -0
  57. data/app/assets/images/satis/flags/1x1/ch.svg +9 -0
  58. data/app/assets/images/satis/flags/1x1/ci.svg +7 -0
  59. data/app/assets/images/satis/flags/1x1/ck.svg +11 -0
  60. data/app/assets/images/satis/flags/1x1/cl.svg +13 -0
  61. data/app/assets/images/satis/flags/1x1/cm.svg +15 -0
  62. data/app/assets/images/satis/flags/1x1/cn.svg +11 -0
  63. data/app/assets/images/satis/flags/1x1/co.svg +7 -0
  64. data/app/assets/images/satis/flags/1x1/cp.svg +7 -0
  65. data/app/assets/images/satis/flags/1x1/cr.svg +7 -0
  66. data/app/assets/images/satis/flags/1x1/cu.svg +13 -0
  67. data/app/assets/images/satis/flags/1x1/cv.svg +13 -0
  68. data/app/assets/images/satis/flags/1x1/cw.svg +14 -0
  69. data/app/assets/images/satis/flags/1x1/cx.svg +15 -0
  70. data/app/assets/images/satis/flags/1x1/cy.svg +6 -0
  71. data/app/assets/images/satis/flags/1x1/cz.svg +5 -0
  72. data/app/assets/images/satis/flags/1x1/de.svg +5 -0
  73. data/app/assets/images/satis/flags/1x1/dg.svg +140 -0
  74. data/app/assets/images/satis/flags/1x1/dj.svg +13 -0
  75. data/app/assets/images/satis/flags/1x1/dk.svg +5 -0
  76. data/app/assets/images/satis/flags/1x1/dm.svg +152 -0
  77. data/app/assets/images/satis/flags/1x1/do.svg +6745 -0
  78. data/app/assets/images/satis/flags/1x1/dz.svg +5 -0
  79. data/app/assets/images/satis/flags/1x1/ea.svg +547 -0
  80. data/app/assets/images/satis/flags/1x1/ec.svg +138 -0
  81. data/app/assets/images/satis/flags/1x1/ee.svg +7 -0
  82. data/app/assets/images/satis/flags/1x1/eg.svg +38 -0
  83. data/app/assets/images/satis/flags/1x1/eh.svg +16 -0
  84. data/app/assets/images/satis/flags/1x1/er.svg +13 -0
  85. data/app/assets/images/satis/flags/1x1/es-ct.svg +4 -0
  86. data/app/assets/images/satis/flags/1x1/es-ga.svg +189 -0
  87. data/app/assets/images/satis/flags/1x1/es.svg +547 -0
  88. data/app/assets/images/satis/flags/1x1/et.svg +14 -0
  89. data/app/assets/images/satis/flags/1x1/eu.svg +28 -0
  90. data/app/assets/images/satis/flags/1x1/fi.svg +5 -0
  91. data/app/assets/images/satis/flags/1x1/fj.svg +125 -0
  92. data/app/assets/images/satis/flags/1x1/fk.svg +93 -0
  93. data/app/assets/images/satis/flags/1x1/fm.svg +11 -0
  94. data/app/assets/images/satis/flags/1x1/fo.svg +12 -0
  95. data/app/assets/images/satis/flags/1x1/fr.svg +7 -0
  96. data/app/assets/images/satis/flags/1x1/ga.svg +7 -0
  97. data/app/assets/images/satis/flags/1x1/gb-eng.svg +5 -0
  98. data/app/assets/images/satis/flags/1x1/gb-nir.svg +131 -0
  99. data/app/assets/images/satis/flags/1x1/gb-sct.svg +4 -0
  100. data/app/assets/images/satis/flags/1x1/gb-wls.svg +9 -0
  101. data/app/assets/images/satis/flags/1x1/gb.svg +7 -0
  102. data/app/assets/images/satis/flags/1x1/gd.svg +27 -0
  103. data/app/assets/images/satis/flags/1x1/ge.svg +6 -0
  104. data/app/assets/images/satis/flags/1x1/gf.svg +7 -0
  105. data/app/assets/images/satis/flags/1x1/gg.svg +9 -0
  106. data/app/assets/images/satis/flags/1x1/gh.svg +6 -0
  107. data/app/assets/images/satis/flags/1x1/gi.svg +32 -0
  108. data/app/assets/images/satis/flags/1x1/gl.svg +4 -0
  109. data/app/assets/images/satis/flags/1x1/gm.svg +9 -0
  110. data/app/assets/images/satis/flags/1x1/gn.svg +7 -0
  111. data/app/assets/images/satis/flags/1x1/gp.svg +7 -0
  112. data/app/assets/images/satis/flags/1x1/gq.svg +23 -0
  113. data/app/assets/images/satis/flags/1x1/gr.svg +16 -0
  114. data/app/assets/images/satis/flags/1x1/gs.svg +245 -0
  115. data/app/assets/images/satis/flags/1x1/gt.svg +204 -0
  116. data/app/assets/images/satis/flags/1x1/gu.svg +39 -0
  117. data/app/assets/images/satis/flags/1x1/gw.svg +15 -0
  118. data/app/assets/images/satis/flags/1x1/gy.svg +9 -0
  119. data/app/assets/images/satis/flags/1x1/hk.svg +30 -0
  120. data/app/assets/images/satis/flags/1x1/hm.svg +11 -0
  121. data/app/assets/images/satis/flags/1x1/hn.svg +18 -0
  122. data/app/assets/images/satis/flags/1x1/hr.svg +56 -0
  123. data/app/assets/images/satis/flags/1x1/ht.svg +116 -0
  124. data/app/assets/images/satis/flags/1x1/hu.svg +7 -0
  125. data/app/assets/images/satis/flags/1x1/ic.svg +7 -0
  126. data/app/assets/images/satis/flags/1x1/id.svg +6 -0
  127. data/app/assets/images/satis/flags/1x1/ie.svg +7 -0
  128. data/app/assets/images/satis/flags/1x1/il.svg +14 -0
  129. data/app/assets/images/satis/flags/1x1/im.svg +36 -0
  130. data/app/assets/images/satis/flags/1x1/in.svg +25 -0
  131. data/app/assets/images/satis/flags/1x1/io.svg +140 -0
  132. data/app/assets/images/satis/flags/1x1/iq.svg +10 -0
  133. data/app/assets/images/satis/flags/1x1/ir.svg +219 -0
  134. data/app/assets/images/satis/flags/1x1/is.svg +12 -0
  135. data/app/assets/images/satis/flags/1x1/it.svg +7 -0
  136. data/app/assets/images/satis/flags/1x1/je.svg +47 -0
  137. data/app/assets/images/satis/flags/1x1/jm.svg +8 -0
  138. data/app/assets/images/satis/flags/1x1/jo.svg +16 -0
  139. data/app/assets/images/satis/flags/1x1/jp.svg +11 -0
  140. data/app/assets/images/satis/flags/1x1/ke.svg +23 -0
  141. data/app/assets/images/satis/flags/1x1/kg.svg +15 -0
  142. data/app/assets/images/satis/flags/1x1/kh.svg +61 -0
  143. data/app/assets/images/satis/flags/1x1/ki.svg +36 -0
  144. data/app/assets/images/satis/flags/1x1/km.svg +16 -0
  145. data/app/assets/images/satis/flags/1x1/kn.svg +14 -0
  146. data/app/assets/images/satis/flags/1x1/kp.svg +15 -0
  147. data/app/assets/images/satis/flags/1x1/kr.svg +24 -0
  148. data/app/assets/images/satis/flags/1x1/kw.svg +13 -0
  149. data/app/assets/images/satis/flags/1x1/ky.svg +225 -0
  150. data/app/assets/images/satis/flags/1x1/kz.svg +23 -0
  151. data/app/assets/images/satis/flags/1x1/la.svg +12 -0
  152. data/app/assets/images/satis/flags/1x1/lb.svg +15 -0
  153. data/app/assets/images/satis/flags/1x1/lc.svg +8 -0
  154. data/app/assets/images/satis/flags/1x1/li.svg +43 -0
  155. data/app/assets/images/satis/flags/1x1/lk.svg +22 -0
  156. data/app/assets/images/satis/flags/1x1/lr.svg +14 -0
  157. data/app/assets/images/satis/flags/1x1/ls.svg +8 -0
  158. data/app/assets/images/satis/flags/1x1/lt.svg +7 -0
  159. data/app/assets/images/satis/flags/1x1/lu.svg +5 -0
  160. data/app/assets/images/satis/flags/1x1/lv.svg +6 -0
  161. data/app/assets/images/satis/flags/1x1/ly.svg +13 -0
  162. data/app/assets/images/satis/flags/1x1/ma.svg +4 -0
  163. data/app/assets/images/satis/flags/1x1/mc.svg +6 -0
  164. data/app/assets/images/satis/flags/1x1/md.svg +71 -0
  165. data/app/assets/images/satis/flags/1x1/me.svg +118 -0
  166. data/app/assets/images/satis/flags/1x1/mf.svg +7 -0
  167. data/app/assets/images/satis/flags/1x1/mg.svg +7 -0
  168. data/app/assets/images/satis/flags/1x1/mh.svg +8 -0
  169. data/app/assets/images/satis/flags/1x1/mk.svg +5 -0
  170. data/app/assets/images/satis/flags/1x1/ml.svg +7 -0
  171. data/app/assets/images/satis/flags/1x1/mm.svg +16 -0
  172. data/app/assets/images/satis/flags/1x1/mn.svg +13 -0
  173. data/app/assets/images/satis/flags/1x1/mo.svg +9 -0
  174. data/app/assets/images/satis/flags/1x1/mp.svg +86 -0
  175. data/app/assets/images/satis/flags/1x1/mq.svg +7 -0
  176. data/app/assets/images/satis/flags/1x1/mr.svg +6 -0
  177. data/app/assets/images/satis/flags/1x1/ms.svg +70 -0
  178. data/app/assets/images/satis/flags/1x1/mt.svg +50 -0
  179. data/app/assets/images/satis/flags/1x1/mu.svg +8 -0
  180. data/app/assets/images/satis/flags/1x1/mv.svg +6 -0
  181. data/app/assets/images/satis/flags/1x1/mw.svg +15 -0
  182. data/app/assets/images/satis/flags/1x1/mx.svg +378 -0
  183. data/app/assets/images/satis/flags/1x1/my.svg +11 -0
  184. data/app/assets/images/satis/flags/1x1/mz.svg +21 -0
  185. data/app/assets/images/satis/flags/1x1/na.svg +16 -0
  186. data/app/assets/images/satis/flags/1x1/nc.svg +14 -0
  187. data/app/assets/images/satis/flags/1x1/ne.svg +6 -0
  188. data/app/assets/images/satis/flags/1x1/nf.svg +11 -0
  189. data/app/assets/images/satis/flags/1x1/ng.svg +6 -0
  190. data/app/assets/images/satis/flags/1x1/ni.svg +129 -0
  191. data/app/assets/images/satis/flags/1x1/nl.svg +5 -0
  192. data/app/assets/images/satis/flags/1x1/no.svg +7 -0
  193. data/app/assets/images/satis/flags/1x1/np.svg +19 -0
  194. data/app/assets/images/satis/flags/1x1/nr.svg +12 -0
  195. data/app/assets/images/satis/flags/1x1/nu.svg +26 -0
  196. data/app/assets/images/satis/flags/1x1/nz.svg +42 -0
  197. data/app/assets/images/satis/flags/1x1/om.svg +115 -0
  198. data/app/assets/images/satis/flags/1x1/pa.svg +13 -0
  199. data/app/assets/images/satis/flags/1x1/pe.svg +244 -0
  200. data/app/assets/images/satis/flags/1x1/pf.svg +18 -0
  201. data/app/assets/images/satis/flags/1x1/pg.svg +16 -0
  202. data/app/assets/images/satis/flags/1x1/ph.svg +9 -0
  203. data/app/assets/images/satis/flags/1x1/pk.svg +15 -0
  204. data/app/assets/images/satis/flags/1x1/pl.svg +6 -0
  205. data/app/assets/images/satis/flags/1x1/pm.svg +7 -0
  206. data/app/assets/images/satis/flags/1x1/pn.svg +100 -0
  207. data/app/assets/images/satis/flags/1x1/pr.svg +13 -0
  208. data/app/assets/images/satis/flags/1x1/ps.svg +15 -0
  209. data/app/assets/images/satis/flags/1x1/pt.svg +57 -0
  210. data/app/assets/images/satis/flags/1x1/pw.svg +11 -0
  211. data/app/assets/images/satis/flags/1x1/py.svg +156 -0
  212. data/app/assets/images/satis/flags/1x1/qa.svg +4 -0
  213. data/app/assets/images/satis/flags/1x1/re.svg +7 -0
  214. data/app/assets/images/satis/flags/1x1/ro.svg +7 -0
  215. data/app/assets/images/satis/flags/1x1/rs.svg +296 -0
  216. data/app/assets/images/satis/flags/1x1/ru.svg +7 -0
  217. data/app/assets/images/satis/flags/1x1/rw.svg +13 -0
  218. data/app/assets/images/satis/flags/1x1/sa.svg +26 -0
  219. data/app/assets/images/satis/flags/1x1/sb.svg +13 -0
  220. data/app/assets/images/satis/flags/1x1/sc.svg +14 -0
  221. data/app/assets/images/satis/flags/1x1/sd.svg +13 -0
  222. data/app/assets/images/satis/flags/1x1/se.svg +5 -0
  223. data/app/assets/images/satis/flags/1x1/sg.svg +13 -0
  224. data/app/assets/images/satis/flags/1x1/sh.svg +81 -0
  225. data/app/assets/images/satis/flags/1x1/si.svg +18 -0
  226. data/app/assets/images/satis/flags/1x1/sj.svg +7 -0
  227. data/app/assets/images/satis/flags/1x1/sk.svg +9 -0
  228. data/app/assets/images/satis/flags/1x1/sl.svg +12 -0
  229. data/app/assets/images/satis/flags/1x1/sm.svg +89 -0
  230. data/app/assets/images/satis/flags/1x1/sn.svg +8 -0
  231. data/app/assets/images/satis/flags/1x1/so.svg +11 -0
  232. data/app/assets/images/satis/flags/1x1/sr.svg +6 -0
  233. data/app/assets/images/satis/flags/1x1/ss.svg +8 -0
  234. data/app/assets/images/satis/flags/1x1/st.svg +16 -0
  235. data/app/assets/images/satis/flags/1x1/sv.svg +594 -0
  236. data/app/assets/images/satis/flags/1x1/sx.svg +56 -0
  237. data/app/assets/images/satis/flags/1x1/sy.svg +6 -0
  238. data/app/assets/images/satis/flags/1x1/sz.svg +45 -0
  239. data/app/assets/images/satis/flags/1x1/ta.svg +81 -0
  240. data/app/assets/images/satis/flags/1x1/tc.svg +52 -0
  241. data/app/assets/images/satis/flags/1x1/td.svg +7 -0
  242. data/app/assets/images/satis/flags/1x1/tf.svg +15 -0
  243. data/app/assets/images/satis/flags/1x1/tg.svg +14 -0
  244. data/app/assets/images/satis/flags/1x1/th.svg +7 -0
  245. data/app/assets/images/satis/flags/1x1/tj.svg +26 -0
  246. data/app/assets/images/satis/flags/1x1/tk.svg +5 -0
  247. data/app/assets/images/satis/flags/1x1/tl.svg +13 -0
  248. data/app/assets/images/satis/flags/1x1/tm.svg +203 -0
  249. data/app/assets/images/satis/flags/1x1/tn.svg +13 -0
  250. data/app/assets/images/satis/flags/1x1/to.svg +10 -0
  251. data/app/assets/images/satis/flags/1x1/tr.svg +8 -0
  252. data/app/assets/images/satis/flags/1x1/tt.svg +7 -0
  253. data/app/assets/images/satis/flags/1x1/tv.svg +16 -0
  254. data/app/assets/images/satis/flags/1x1/tw.svg +32 -0
  255. data/app/assets/images/satis/flags/1x1/tz.svg +15 -0
  256. data/app/assets/images/satis/flags/1x1/ua.svg +6 -0
  257. data/app/assets/images/satis/flags/1x1/ug.svg +30 -0
  258. data/app/assets/images/satis/flags/1x1/um.svg +15 -0
  259. data/app/assets/images/satis/flags/1x1/un.svg +16 -0
  260. data/app/assets/images/satis/flags/1x1/us.svg +10 -0
  261. data/app/assets/images/satis/flags/1x1/uy.svg +28 -0
  262. data/app/assets/images/satis/flags/1x1/uz.svg +30 -0
  263. data/app/assets/images/satis/flags/1x1/va.svg +479 -0
  264. data/app/assets/images/satis/flags/1x1/vc.svg +8 -0
  265. data/app/assets/images/satis/flags/1x1/ve.svg +26 -0
  266. data/app/assets/images/satis/flags/1x1/vg.svg +127 -0
  267. data/app/assets/images/satis/flags/1x1/vi.svg +28 -0
  268. data/app/assets/images/satis/flags/1x1/vn.svg +11 -0
  269. data/app/assets/images/satis/flags/1x1/vu.svg +18 -0
  270. data/app/assets/images/satis/flags/1x1/wf.svg +7 -0
  271. data/app/assets/images/satis/flags/1x1/ws.svg +7 -0
  272. data/app/assets/images/satis/flags/1x1/xk.svg +16 -0
  273. data/app/assets/images/satis/flags/1x1/xx.svg +5 -0
  274. data/app/assets/images/satis/flags/1x1/ye.svg +7 -0
  275. data/app/assets/images/satis/flags/1x1/yt.svg +7 -0
  276. data/app/assets/images/satis/flags/1x1/za.svg +17 -0
  277. data/app/assets/images/satis/flags/1x1/zm.svg +27 -0
  278. data/app/assets/images/satis/flags/1x1/zw.svg +21 -0
  279. data/app/assets/images/satis/flags/4x3/ac.svg +76 -0
  280. data/app/assets/images/satis/flags/4x3/ad.svg +150 -0
  281. data/app/assets/images/satis/flags/4x3/ae.svg +6 -0
  282. data/app/assets/images/satis/flags/4x3/af.svg +81 -0
  283. data/app/assets/images/satis/flags/4x3/ag.svg +14 -0
  284. data/app/assets/images/satis/flags/4x3/ai.svg +763 -0
  285. data/app/assets/images/satis/flags/4x3/al.svg +5 -0
  286. data/app/assets/images/satis/flags/4x3/am.svg +5 -0
  287. data/app/assets/images/satis/flags/4x3/ao.svg +13 -0
  288. data/app/assets/images/satis/flags/4x3/aq.svg +5 -0
  289. data/app/assets/images/satis/flags/4x3/ar.svg +31 -0
  290. data/app/assets/images/satis/flags/4x3/as.svg +33 -0
  291. data/app/assets/images/satis/flags/4x3/at.svg +6 -0
  292. data/app/assets/images/satis/flags/4x3/au.svg +9 -0
  293. data/app/assets/images/satis/flags/4x3/aw.svg +186 -0
  294. data/app/assets/images/satis/flags/4x3/ax.svg +18 -0
  295. data/app/assets/images/satis/flags/4x3/az.svg +8 -0
  296. data/app/assets/images/satis/flags/4x3/ba.svg +12 -0
  297. data/app/assets/images/satis/flags/4x3/bb.svg +6 -0
  298. data/app/assets/images/satis/flags/4x3/bd.svg +4 -0
  299. data/app/assets/images/satis/flags/4x3/be.svg +7 -0
  300. data/app/assets/images/satis/flags/4x3/bf.svg +7 -0
  301. data/app/assets/images/satis/flags/4x3/bg.svg +7 -0
  302. data/app/assets/images/satis/flags/4x3/bh.svg +9 -0
  303. data/app/assets/images/satis/flags/4x3/bi.svg +15 -0
  304. data/app/assets/images/satis/flags/4x3/bj.svg +14 -0
  305. data/app/assets/images/satis/flags/4x3/bl.svg +7 -0
  306. data/app/assets/images/satis/flags/4x3/bm.svg +99 -0
  307. data/app/assets/images/satis/flags/4x3/bn.svg +36 -0
  308. data/app/assets/images/satis/flags/4x3/bo.svg +676 -0
  309. data/app/assets/images/satis/flags/4x3/bq.svg +5 -0
  310. data/app/assets/images/satis/flags/4x3/br.svg +45 -0
  311. data/app/assets/images/satis/flags/4x3/bs.svg +13 -0
  312. data/app/assets/images/satis/flags/4x3/bt.svg +89 -0
  313. data/app/assets/images/satis/flags/4x3/bv.svg +13 -0
  314. data/app/assets/images/satis/flags/4x3/bw.svg +7 -0
  315. data/app/assets/images/satis/flags/4x3/by.svg +20 -0
  316. data/app/assets/images/satis/flags/4x3/bz.svg +145 -0
  317. data/app/assets/images/satis/flags/4x3/ca.svg +4 -0
  318. data/app/assets/images/satis/flags/4x3/cc.svg +19 -0
  319. data/app/assets/images/satis/flags/4x3/cd.svg +5 -0
  320. data/app/assets/images/satis/flags/4x3/cf.svg +15 -0
  321. data/app/assets/images/satis/flags/4x3/cg.svg +12 -0
  322. data/app/assets/images/satis/flags/4x3/ch.svg +9 -0
  323. data/app/assets/images/satis/flags/4x3/ci.svg +7 -0
  324. data/app/assets/images/satis/flags/4x3/ck.svg +9 -0
  325. data/app/assets/images/satis/flags/4x3/cl.svg +13 -0
  326. data/app/assets/images/satis/flags/4x3/cm.svg +15 -0
  327. data/app/assets/images/satis/flags/4x3/cn.svg +11 -0
  328. data/app/assets/images/satis/flags/4x3/co.svg +7 -0
  329. data/app/assets/images/satis/flags/4x3/cp.svg +7 -0
  330. data/app/assets/images/satis/flags/4x3/cr.svg +7 -0
  331. data/app/assets/images/satis/flags/4x3/cu.svg +13 -0
  332. data/app/assets/images/satis/flags/4x3/cv.svg +13 -0
  333. data/app/assets/images/satis/flags/4x3/cw.svg +14 -0
  334. data/app/assets/images/satis/flags/4x3/cx.svg +15 -0
  335. data/app/assets/images/satis/flags/4x3/cy.svg +6 -0
  336. data/app/assets/images/satis/flags/4x3/cz.svg +5 -0
  337. data/app/assets/images/satis/flags/4x3/de.svg +5 -0
  338. data/app/assets/images/satis/flags/4x3/dg.svg +138 -0
  339. data/app/assets/images/satis/flags/4x3/dj.svg +13 -0
  340. data/app/assets/images/satis/flags/4x3/dk.svg +5 -0
  341. data/app/assets/images/satis/flags/4x3/dm.svg +152 -0
  342. data/app/assets/images/satis/flags/4x3/do.svg +6745 -0
  343. data/app/assets/images/satis/flags/4x3/dz.svg +5 -0
  344. data/app/assets/images/satis/flags/4x3/ea.svg +544 -0
  345. data/app/assets/images/satis/flags/4x3/ec.svg +138 -0
  346. data/app/assets/images/satis/flags/4x3/ee.svg +7 -0
  347. data/app/assets/images/satis/flags/4x3/eg.svg +38 -0
  348. data/app/assets/images/satis/flags/4x3/eh.svg +16 -0
  349. data/app/assets/images/satis/flags/4x3/er.svg +8 -0
  350. data/app/assets/images/satis/flags/4x3/es-ct.svg +4 -0
  351. data/app/assets/images/satis/flags/4x3/es-ga.svg +189 -0
  352. data/app/assets/images/satis/flags/4x3/es.svg +544 -0
  353. data/app/assets/images/satis/flags/4x3/et.svg +14 -0
  354. data/app/assets/images/satis/flags/4x3/eu.svg +28 -0
  355. data/app/assets/images/satis/flags/4x3/fi.svg +5 -0
  356. data/app/assets/images/satis/flags/4x3/fj.svg +122 -0
  357. data/app/assets/images/satis/flags/4x3/fk.svg +90 -0
  358. data/app/assets/images/satis/flags/4x3/fm.svg +11 -0
  359. data/app/assets/images/satis/flags/4x3/fo.svg +12 -0
  360. data/app/assets/images/satis/flags/4x3/fr.svg +7 -0
  361. data/app/assets/images/satis/flags/4x3/ga.svg +7 -0
  362. data/app/assets/images/satis/flags/4x3/gb-eng.svg +5 -0
  363. data/app/assets/images/satis/flags/4x3/gb-nir.svg +132 -0
  364. data/app/assets/images/satis/flags/4x3/gb-sct.svg +4 -0
  365. data/app/assets/images/satis/flags/4x3/gb-wls.svg +9 -0
  366. data/app/assets/images/satis/flags/4x3/gb.svg +7 -0
  367. data/app/assets/images/satis/flags/4x3/gd.svg +27 -0
  368. data/app/assets/images/satis/flags/4x3/ge.svg +6 -0
  369. data/app/assets/images/satis/flags/4x3/gf.svg +7 -0
  370. data/app/assets/images/satis/flags/4x3/gg.svg +9 -0
  371. data/app/assets/images/satis/flags/4x3/gh.svg +6 -0
  372. data/app/assets/images/satis/flags/4x3/gi.svg +32 -0
  373. data/app/assets/images/satis/flags/4x3/gl.svg +4 -0
  374. data/app/assets/images/satis/flags/4x3/gm.svg +14 -0
  375. data/app/assets/images/satis/flags/4x3/gn.svg +7 -0
  376. data/app/assets/images/satis/flags/4x3/gp.svg +7 -0
  377. data/app/assets/images/satis/flags/4x3/gq.svg +23 -0
  378. data/app/assets/images/satis/flags/4x3/gr.svg +16 -0
  379. data/app/assets/images/satis/flags/4x3/gs.svg +242 -0
  380. data/app/assets/images/satis/flags/4x3/gt.svg +204 -0
  381. data/app/assets/images/satis/flags/4x3/gu.svg +39 -0
  382. data/app/assets/images/satis/flags/4x3/gw.svg +13 -0
  383. data/app/assets/images/satis/flags/4x3/gy.svg +9 -0
  384. data/app/assets/images/satis/flags/4x3/hk.svg +30 -0
  385. data/app/assets/images/satis/flags/4x3/hm.svg +9 -0
  386. data/app/assets/images/satis/flags/4x3/hn.svg +18 -0
  387. data/app/assets/images/satis/flags/4x3/hr.svg +58 -0
  388. data/app/assets/images/satis/flags/4x3/ht.svg +116 -0
  389. data/app/assets/images/satis/flags/4x3/hu.svg +7 -0
  390. data/app/assets/images/satis/flags/4x3/ic.svg +7 -0
  391. data/app/assets/images/satis/flags/4x3/id.svg +6 -0
  392. data/app/assets/images/satis/flags/4x3/ie.svg +7 -0
  393. data/app/assets/images/satis/flags/4x3/il.svg +14 -0
  394. data/app/assets/images/satis/flags/4x3/im.svg +36 -0
  395. data/app/assets/images/satis/flags/4x3/in.svg +25 -0
  396. data/app/assets/images/satis/flags/4x3/io.svg +138 -0
  397. data/app/assets/images/satis/flags/4x3/iq.svg +10 -0
  398. data/app/assets/images/satis/flags/4x3/ir.svg +219 -0
  399. data/app/assets/images/satis/flags/4x3/is.svg +12 -0
  400. data/app/assets/images/satis/flags/4x3/it.svg +7 -0
  401. data/app/assets/images/satis/flags/4x3/je.svg +47 -0
  402. data/app/assets/images/satis/flags/4x3/jm.svg +8 -0
  403. data/app/assets/images/satis/flags/4x3/jo.svg +16 -0
  404. data/app/assets/images/satis/flags/4x3/jp.svg +11 -0
  405. data/app/assets/images/satis/flags/4x3/ke.svg +23 -0
  406. data/app/assets/images/satis/flags/4x3/kg.svg +15 -0
  407. data/app/assets/images/satis/flags/4x3/kh.svg +61 -0
  408. data/app/assets/images/satis/flags/4x3/ki.svg +36 -0
  409. data/app/assets/images/satis/flags/4x3/km.svg +16 -0
  410. data/app/assets/images/satis/flags/4x3/kn.svg +14 -0
  411. data/app/assets/images/satis/flags/4x3/kp.svg +15 -0
  412. data/app/assets/images/satis/flags/4x3/kr.svg +24 -0
  413. data/app/assets/images/satis/flags/4x3/kw.svg +13 -0
  414. data/app/assets/images/satis/flags/4x3/ky.svg +225 -0
  415. data/app/assets/images/satis/flags/4x3/kz.svg +23 -0
  416. data/app/assets/images/satis/flags/4x3/la.svg +12 -0
  417. data/app/assets/images/satis/flags/4x3/lb.svg +15 -0
  418. data/app/assets/images/satis/flags/4x3/lc.svg +8 -0
  419. data/app/assets/images/satis/flags/4x3/li.svg +43 -0
  420. data/app/assets/images/satis/flags/4x3/lk.svg +22 -0
  421. data/app/assets/images/satis/flags/4x3/lr.svg +14 -0
  422. data/app/assets/images/satis/flags/4x3/ls.svg +8 -0
  423. data/app/assets/images/satis/flags/4x3/lt.svg +7 -0
  424. data/app/assets/images/satis/flags/4x3/lu.svg +5 -0
  425. data/app/assets/images/satis/flags/4x3/lv.svg +6 -0
  426. data/app/assets/images/satis/flags/4x3/ly.svg +13 -0
  427. data/app/assets/images/satis/flags/4x3/ma.svg +4 -0
  428. data/app/assets/images/satis/flags/4x3/mc.svg +6 -0
  429. data/app/assets/images/satis/flags/4x3/md.svg +70 -0
  430. data/app/assets/images/satis/flags/4x3/me.svg +116 -0
  431. data/app/assets/images/satis/flags/4x3/mf.svg +7 -0
  432. data/app/assets/images/satis/flags/4x3/mg.svg +7 -0
  433. data/app/assets/images/satis/flags/4x3/mh.svg +7 -0
  434. data/app/assets/images/satis/flags/4x3/mk.svg +5 -0
  435. data/app/assets/images/satis/flags/4x3/ml.svg +7 -0
  436. data/app/assets/images/satis/flags/4x3/mm.svg +16 -0
  437. data/app/assets/images/satis/flags/4x3/mn.svg +13 -0
  438. data/app/assets/images/satis/flags/4x3/mo.svg +9 -0
  439. data/app/assets/images/satis/flags/4x3/mp.svg +86 -0
  440. data/app/assets/images/satis/flags/4x3/mq.svg +7 -0
  441. data/app/assets/images/satis/flags/4x3/mr.svg +6 -0
  442. data/app/assets/images/satis/flags/4x3/ms.svg +78 -0
  443. data/app/assets/images/satis/flags/4x3/mt.svg +49 -0
  444. data/app/assets/images/satis/flags/4x3/mu.svg +8 -0
  445. data/app/assets/images/satis/flags/4x3/mv.svg +6 -0
  446. data/app/assets/images/satis/flags/4x3/mw.svg +10 -0
  447. data/app/assets/images/satis/flags/4x3/mx.svg +382 -0
  448. data/app/assets/images/satis/flags/4x3/my.svg +11 -0
  449. data/app/assets/images/satis/flags/4x3/mz.svg +21 -0
  450. data/app/assets/images/satis/flags/4x3/na.svg +16 -0
  451. data/app/assets/images/satis/flags/4x3/nc.svg +14 -0
  452. data/app/assets/images/satis/flags/4x3/ne.svg +6 -0
  453. data/app/assets/images/satis/flags/4x3/nf.svg +9 -0
  454. data/app/assets/images/satis/flags/4x3/ng.svg +6 -0
  455. data/app/assets/images/satis/flags/4x3/ni.svg +129 -0
  456. data/app/assets/images/satis/flags/4x3/nl.svg +5 -0
  457. data/app/assets/images/satis/flags/4x3/no.svg +7 -0
  458. data/app/assets/images/satis/flags/4x3/np.svg +14 -0
  459. data/app/assets/images/satis/flags/4x3/nr.svg +12 -0
  460. data/app/assets/images/satis/flags/4x3/nu.svg +26 -0
  461. data/app/assets/images/satis/flags/4x3/nz.svg +42 -0
  462. data/app/assets/images/satis/flags/4x3/om.svg +115 -0
  463. data/app/assets/images/satis/flags/4x3/pa.svg +14 -0
  464. data/app/assets/images/satis/flags/4x3/pe.svg +244 -0
  465. data/app/assets/images/satis/flags/4x3/pf.svg +19 -0
  466. data/app/assets/images/satis/flags/4x3/pg.svg +9 -0
  467. data/app/assets/images/satis/flags/4x3/ph.svg +9 -0
  468. data/app/assets/images/satis/flags/4x3/pk.svg +15 -0
  469. data/app/assets/images/satis/flags/4x3/pl.svg +6 -0
  470. data/app/assets/images/satis/flags/4x3/pm.svg +7 -0
  471. data/app/assets/images/satis/flags/4x3/pn.svg +97 -0
  472. data/app/assets/images/satis/flags/4x3/pr.svg +13 -0
  473. data/app/assets/images/satis/flags/4x3/ps.svg +15 -0
  474. data/app/assets/images/satis/flags/4x3/pt.svg +57 -0
  475. data/app/assets/images/satis/flags/4x3/pw.svg +11 -0
  476. data/app/assets/images/satis/flags/4x3/py.svg +157 -0
  477. data/app/assets/images/satis/flags/4x3/qa.svg +4 -0
  478. data/app/assets/images/satis/flags/4x3/re.svg +7 -0
  479. data/app/assets/images/satis/flags/4x3/ro.svg +7 -0
  480. data/app/assets/images/satis/flags/4x3/rs.svg +292 -0
  481. data/app/assets/images/satis/flags/4x3/ru.svg +7 -0
  482. data/app/assets/images/satis/flags/4x3/rw.svg +13 -0
  483. data/app/assets/images/satis/flags/4x3/sa.svg +26 -0
  484. data/app/assets/images/satis/flags/4x3/sb.svg +13 -0
  485. data/app/assets/images/satis/flags/4x3/sc.svg +14 -0
  486. data/app/assets/images/satis/flags/4x3/sd.svg +13 -0
  487. data/app/assets/images/satis/flags/4x3/se.svg +5 -0
  488. data/app/assets/images/satis/flags/4x3/sg.svg +13 -0
  489. data/app/assets/images/satis/flags/4x3/sh.svg +76 -0
  490. data/app/assets/images/satis/flags/4x3/si.svg +18 -0
  491. data/app/assets/images/satis/flags/4x3/sj.svg +7 -0
  492. data/app/assets/images/satis/flags/4x3/sk.svg +9 -0
  493. data/app/assets/images/satis/flags/4x3/sl.svg +7 -0
  494. data/app/assets/images/satis/flags/4x3/sm.svg +91 -0
  495. data/app/assets/images/satis/flags/4x3/sn.svg +8 -0
  496. data/app/assets/images/satis/flags/4x3/so.svg +11 -0
  497. data/app/assets/images/satis/flags/4x3/sr.svg +6 -0
  498. data/app/assets/images/satis/flags/4x3/ss.svg +8 -0
  499. data/app/assets/images/satis/flags/4x3/st.svg +16 -0
  500. data/app/assets/images/satis/flags/4x3/sv.svg +594 -0
  501. data/app/assets/images/satis/flags/4x3/sx.svg +56 -0
  502. data/app/assets/images/satis/flags/4x3/sy.svg +6 -0
  503. data/app/assets/images/satis/flags/4x3/sz.svg +45 -0
  504. data/app/assets/images/satis/flags/4x3/ta.svg +76 -0
  505. data/app/assets/images/satis/flags/4x3/tc.svg +52 -0
  506. data/app/assets/images/satis/flags/4x3/td.svg +7 -0
  507. data/app/assets/images/satis/flags/4x3/tf.svg +15 -0
  508. data/app/assets/images/satis/flags/4x3/tg.svg +14 -0
  509. data/app/assets/images/satis/flags/4x3/th.svg +7 -0
  510. data/app/assets/images/satis/flags/4x3/tj.svg +22 -0
  511. data/app/assets/images/satis/flags/4x3/tk.svg +5 -0
  512. data/app/assets/images/satis/flags/4x3/tl.svg +13 -0
  513. data/app/assets/images/satis/flags/4x3/tm.svg +206 -0
  514. data/app/assets/images/satis/flags/4x3/tn.svg +13 -0
  515. data/app/assets/images/satis/flags/4x3/to.svg +10 -0
  516. data/app/assets/images/satis/flags/4x3/tr.svg +8 -0
  517. data/app/assets/images/satis/flags/4x3/tt.svg +5 -0
  518. data/app/assets/images/satis/flags/4x3/tv.svg +16 -0
  519. data/app/assets/images/satis/flags/4x3/tw.svg +34 -0
  520. data/app/assets/images/satis/flags/4x3/tz.svg +13 -0
  521. data/app/assets/images/satis/flags/4x3/ua.svg +6 -0
  522. data/app/assets/images/satis/flags/4x3/ug.svg +30 -0
  523. data/app/assets/images/satis/flags/4x3/um.svg +15 -0
  524. data/app/assets/images/satis/flags/4x3/un.svg +16 -0
  525. data/app/assets/images/satis/flags/4x3/us.svg +10 -0
  526. data/app/assets/images/satis/flags/4x3/uy.svg +28 -0
  527. data/app/assets/images/satis/flags/4x3/uz.svg +30 -0
  528. data/app/assets/images/satis/flags/4x3/va.svg +479 -0
  529. data/app/assets/images/satis/flags/4x3/vc.svg +8 -0
  530. data/app/assets/images/satis/flags/4x3/ve.svg +26 -0
  531. data/app/assets/images/satis/flags/4x3/vg.svg +127 -0
  532. data/app/assets/images/satis/flags/4x3/vi.svg +28 -0
  533. data/app/assets/images/satis/flags/4x3/vn.svg +11 -0
  534. data/app/assets/images/satis/flags/4x3/vu.svg +18 -0
  535. data/app/assets/images/satis/flags/4x3/wf.svg +7 -0
  536. data/app/assets/images/satis/flags/4x3/ws.svg +7 -0
  537. data/app/assets/images/satis/flags/4x3/xk.svg +16 -0
  538. data/app/assets/images/satis/flags/4x3/xx.svg +5 -0
  539. data/app/assets/images/satis/flags/4x3/ye.svg +7 -0
  540. data/app/assets/images/satis/flags/4x3/yt.svg +7 -0
  541. data/app/assets/images/satis/flags/4x3/za.svg +17 -0
  542. data/app/assets/images/satis/flags/4x3/zm.svg +27 -0
  543. data/app/assets/images/satis/flags/4x3/zw.svg +21 -0
  544. data/app/assets/images/satis/intl-tel-input/flags.png +0 -0
  545. data/app/assets/images/satis/intl-tel-input/flags@2x.png +0 -0
  546. data/app/assets/images/satis/leaflet/layers-2x.png +0 -0
  547. data/app/assets/images/satis/leaflet/layers.png +0 -0
  548. data/app/assets/images/satis/leaflet/marker-icon-2x.png +0 -0
  549. data/app/assets/images/satis/leaflet/marker-icon.png +0 -0
  550. data/app/assets/images/satis/leaflet/marker-shadow.png +0 -0
  551. data/app/assets/stylesheets/satis/application.css +68 -15
  552. data/app/assets/stylesheets/satis/components/diffy.css +74 -0
  553. data/app/assets/stylesheets/satis/components/flag-icons.min.css +1 -0
  554. data/app/assets/stylesheets/satis/components/form.css +158 -0
  555. data/app/assets/stylesheets/satis/components/intlTelInput.min.css +1 -0
  556. data/app/assets/stylesheets/satis/components/leaflet.css +661 -0
  557. data/app/assets/stylesheets/satis/components/phone-number.css +30 -0
  558. data/app/assets/stylesheets/satis/components/tippyjs.css +8 -0
  559. data/app/assets/stylesheets/satis/components/trix.css +412 -0
  560. data/app/components/satis/appearance_switcher/{component.scss → component.css} +1 -1
  561. data/app/components/satis/appearance_switcher/component.html.slim +1 -1
  562. data/app/components/satis/appearance_switcher/component_controller.js +3 -4
  563. data/app/components/satis/application_component.rb +8 -42
  564. data/app/components/satis/avatar/component.rb +3 -1
  565. data/app/components/satis/calendar_month/component.html.slim +522 -0
  566. data/app/components/satis/calendar_month/component.rb +9 -0
  567. data/app/components/satis/card/component.css +19 -0
  568. data/app/components/satis/card/component.html.slim +8 -32
  569. data/app/components/satis/card/component.rb +35 -8
  570. data/app/components/satis/date_time_picker/component.rb +10 -10
  571. data/app/components/satis/date_time_picker/component_controller.js +61 -45
  572. data/app/components/satis/dialog/component.css +0 -0
  573. data/app/components/satis/dialog/component.html.slim +26 -0
  574. data/app/components/satis/dialog/component.rb +22 -0
  575. data/app/components/satis/dialog/component_controller.js +16 -0
  576. data/app/components/satis/dropdown/{component.scss → component.css} +5 -1
  577. data/app/components/satis/dropdown/component.html.slim +28 -14
  578. data/app/components/satis/dropdown/component.rb +44 -7
  579. data/app/components/satis/dropdown/component_controller.js +568 -172
  580. data/app/components/satis/editor/component.css +3 -0
  581. data/app/components/satis/editor/component.html.slim +5 -0
  582. data/app/components/satis/editor/component.rb +45 -0
  583. data/app/components/satis/editor/component_controller.js +90 -0
  584. data/app/components/satis/flash_messages/{component.scss → component.css} +5 -4
  585. data/app/components/satis/info_item/component.html.slim +2 -2
  586. data/app/components/satis/info_item/component.rb +10 -2
  587. data/app/components/satis/input/component_controller.js +20 -0
  588. data/app/components/satis/input_array/component.css +3 -0
  589. data/app/components/satis/input_array/component.html.slim +33 -0
  590. data/app/components/satis/input_array/component.rb +18 -0
  591. data/app/components/satis/input_array/component_controller.js +54 -0
  592. data/app/components/satis/map/{component.scss → component.css} +1 -1
  593. data/app/components/satis/map/component.html.slim +1 -1
  594. data/app/components/satis/map/component_controller.js +14 -12
  595. data/app/components/satis/menu/component.html.slim +4 -5
  596. data/app/components/satis/menu/component.rb +8 -3
  597. data/app/components/satis/menu/component_controller.js +139 -17
  598. data/app/components/satis/menu_item/component.html.slim +13 -8
  599. data/app/components/satis/menu_item/component.rb +1 -0
  600. data/app/components/satis/page/component.html.slim +30 -12
  601. data/app/components/satis/page/component_controller.js +2 -2
  602. data/app/components/satis/progress_bar/component.html.slim +4 -0
  603. data/app/components/satis/progress_bar/component.rb +57 -0
  604. data/app/components/satis/sidebar_menu/component.css +0 -0
  605. data/app/components/satis/sidebar_menu/component.html.slim +2 -3
  606. data/app/components/satis/sidebar_menu/component_controller.js +3 -4
  607. data/app/components/satis/sidebar_menu/mobile/component.html.slim +1 -2
  608. data/app/components/satis/sidebar_menu_item/component.html.slim +8 -5
  609. data/app/components/satis/sidebar_menu_item/component.rb +1 -0
  610. data/app/components/satis/sidebar_menu_item/component_controller.js +13 -4
  611. data/app/components/satis/switch/component_controller.js +3 -4
  612. data/app/components/satis/tab/component.rb +41 -17
  613. data/app/components/satis/tabs/{component.scss → component.css} +17 -1
  614. data/app/components/satis/tabs/component.html.slim +23 -9
  615. data/app/components/satis/tabs/component.rb +9 -2
  616. data/app/components/satis/tabs/component_controller.js +34 -19
  617. data/app/controllers/satis/dialogs_controller.rb +20 -0
  618. data/app/controllers/satis/documentation/avatars_controller.rb +7 -0
  619. data/app/controllers/satis/documentation/cards_controller.rb +6 -0
  620. data/app/controllers/satis/documentation/editors_controller.rb +12 -0
  621. data/app/controllers/satis/documentation/forms_controller.rb +14 -0
  622. data/app/controllers/satis/documentation/tabs_controller.rb +7 -0
  623. data/app/controllers/satis/documentation_controller.rb +6 -0
  624. data/app/controllers/satis/user_data_controller.rb +5 -4
  625. data/app/helpers/satis/showcases/avatars_helper.rb +4 -0
  626. data/app/javascript/satis/application.js +8 -0
  627. data/app/javascript/satis/controllers/application.js +12 -0
  628. data/app/javascript/satis/controllers/application_controller.js +71 -0
  629. data/app/javascript/satis/controllers/fields_for_controller.js +74 -0
  630. data/app/javascript/satis/controllers/file_controller.js +26 -0
  631. data/app/javascript/satis/controllers/form_controller.js +77 -0
  632. data/app/javascript/satis/controllers/index.js +70 -0
  633. data/app/javascript/satis/controllers/link_controller.js +34 -0
  634. data/app/javascript/satis/controllers/phone_number_controller.js +30 -0
  635. data/app/javascript/satis/elements/copyable_element.js +57 -0
  636. data/app/javascript/satis/utility_controllers/draggable_controller.js +144 -0
  637. data/app/javascript/satis/utility_controllers/help_controller.js +18 -0
  638. data/app/javascript/satis/utility_controllers/index.js +14 -0
  639. data/app/javascript/satis/utility_controllers/show_hide_controller.js +71 -0
  640. data/app/javascript/satis/utility_controllers/toggle_controller.js +100 -0
  641. data/app/javascript/satis/utils.js +41 -0
  642. data/app/models/satis/user_data.rb +3 -1
  643. data/app/views/satis/documentation/avatars/index.html.slim +39 -0
  644. data/app/views/satis/documentation/cards/index.html.slim +72 -0
  645. data/app/views/satis/documentation/editors/index.html.slim +44 -0
  646. data/app/views/satis/documentation/forms/index.html.slim +109 -0
  647. data/app/views/satis/documentation/forms/select.html.slim +7 -0
  648. data/app/views/satis/documentation/index.html.slim +6 -0
  649. data/app/views/satis/documentation/tabs/index.html.slim +31 -0
  650. data/app/views/shared/_fields_for.html.slim +3 -3
  651. data/bin/importmap +4 -0
  652. data/bin/rails +14 -0
  653. data/config/importmap.rb +49 -0
  654. data/config/locales/en.yml +9 -0
  655. data/config/routes.rb +14 -0
  656. data/db/migrate/20221212083110_change_satis_user_data.rb +2 -2
  657. data/db/migrate/20230918115448_add_type_to_satis_user_data.rb +10 -0
  658. data/lib/generators/satis/install_generator.rb +22 -0
  659. data/lib/generators/satis/tailwind_config_generator.rb +24 -0
  660. data/lib/generators/satis/templates/config/initializers/satis.rb +13 -0
  661. data/lib/satis/concerns/contextual_translations.rb +58 -0
  662. data/lib/satis/configuration.rb +51 -30
  663. data/lib/satis/engine.rb +25 -10
  664. data/lib/satis/forms/builder.rb +130 -87
  665. data/lib/satis/forms/concerns/buttons.rb +2 -2
  666. data/lib/satis/forms/concerns/file.rb +1 -1
  667. data/lib/satis/helpers/container.rb +9 -7
  668. data/lib/satis/menus/item.rb +1 -1
  669. data/lib/satis/menus/menu.rb +3 -2
  670. data/lib/satis/version.rb +1 -1
  671. data/lib/satis.rb +2 -10
  672. data/lib/tasks/satis_tasks.rake +13 -4
  673. data/package.json +9 -0
  674. data/satis.gemspec +39 -0
  675. data/vendor/javascript/@codemirror--autocomplete.js +2 -0
  676. data/vendor/javascript/@codemirror--commands.js +2 -0
  677. data/vendor/javascript/@codemirror--lang-css.js +2 -0
  678. data/vendor/javascript/@codemirror--lang-html.js +2 -0
  679. data/vendor/javascript/@codemirror--lang-javascript.js +2 -0
  680. data/vendor/javascript/@codemirror--lang-json.js +2 -0
  681. data/vendor/javascript/@codemirror--lang-liquid.js +2 -0
  682. data/vendor/javascript/@codemirror--lang-markdown.js +2 -0
  683. data/vendor/javascript/@codemirror--lang-yaml.js +2 -0
  684. data/vendor/javascript/@codemirror--language.js +2 -0
  685. data/vendor/javascript/@codemirror--lint.js +2 -0
  686. data/vendor/javascript/@codemirror--search.js +2 -0
  687. data/vendor/javascript/@codemirror--state.js +2 -0
  688. data/vendor/javascript/@codemirror--view.js +2 -0
  689. data/vendor/javascript/@lezer--common.js +2 -0
  690. data/vendor/javascript/@lezer--css.js +2 -0
  691. data/vendor/javascript/@lezer--highlight.js +2 -0
  692. data/vendor/javascript/@lezer--html.js +2 -0
  693. data/vendor/javascript/@lezer--javascript.js +2 -0
  694. data/vendor/javascript/@lezer--json.js +2 -0
  695. data/vendor/javascript/@lezer--lr.js +2 -0
  696. data/vendor/javascript/@lezer--markdown.js +2 -0
  697. data/vendor/javascript/@lezer--yaml.js +2 -0
  698. data/vendor/javascript/@rails--actiontext.js +2 -0
  699. data/vendor/javascript/codemirror.js +2 -0
  700. data/vendor/javascript/crelt.js +2 -0
  701. data/vendor/javascript/data.min.js +7 -0
  702. data/vendor/javascript/intl-tel-input-utils.js +520 -0
  703. data/vendor/javascript/intl-tel-input.js +1782 -0
  704. data/vendor/javascript/leaflet.js +6 -0
  705. data/vendor/javascript/popper.js.js +1805 -0
  706. data/vendor/javascript/sortablejs.js +134 -0
  707. data/vendor/javascript/style-mod.js +2 -0
  708. data/vendor/javascript/tippy.js.js +2 -0
  709. data/vendor/javascript/trix.js +2 -0
  710. data/vendor/javascript/w3c-keyname.js +2 -0
  711. data/yarn.lock +821 -0
  712. metadata +755 -20
  713. data/app/components/satis/card/component.md +0 -14
  714. data/app/components/satis/card/component.scss +0 -15
  715. /data/app/{components/satis/sidebar_menu/component.scss → assets/images/satis/.keep} +0 -0
  716. /data/app/components/satis/breadcrumbs/{component.scss → component.css} +0 -0
  717. /data/app/components/satis/date_time_picker/{component.scss → component.css} +0 -0
  718. /data/app/components/satis/input/{component.scss → component.css} +0 -0
  719. /data/app/components/satis/menu/{component.scss → component.css} +0 -0
  720. /data/app/components/satis/sidebar_menu_item/{component.scss → component.css} +0 -0
@@ -0,0 +1,1805 @@
1
+ var top = 'top';
2
+ var bottom = 'bottom';
3
+ var right = 'right';
4
+ var left = 'left';
5
+ var auto = 'auto';
6
+ var basePlacements = [top, bottom, right, left];
7
+ var start = 'start';
8
+ var end = 'end';
9
+ var clippingParents = 'clippingParents';
10
+ var viewport = 'viewport';
11
+ var popper = 'popper';
12
+ var reference = 'reference';
13
+ var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
14
+ return acc.concat([placement + "-" + start, placement + "-" + end]);
15
+ }, []);
16
+ var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
17
+ return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
18
+ }, []); // modifiers that need to read the DOM
19
+
20
+ var beforeRead = 'beforeRead';
21
+ var read = 'read';
22
+ var afterRead = 'afterRead'; // pure-logic modifiers
23
+
24
+ var beforeMain = 'beforeMain';
25
+ var main = 'main';
26
+ var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
27
+
28
+ var beforeWrite = 'beforeWrite';
29
+ var write = 'write';
30
+ var afterWrite = 'afterWrite';
31
+ var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
32
+
33
+ function getNodeName(element) {
34
+ return element ? (element.nodeName || '').toLowerCase() : null;
35
+ }
36
+
37
+ function getWindow(node) {
38
+ if (node == null) {
39
+ return window;
40
+ }
41
+
42
+ if (node.toString() !== '[object Window]') {
43
+ var ownerDocument = node.ownerDocument;
44
+ return ownerDocument ? ownerDocument.defaultView || window : window;
45
+ }
46
+
47
+ return node;
48
+ }
49
+
50
+ function isElement(node) {
51
+ var OwnElement = getWindow(node).Element;
52
+ return node instanceof OwnElement || node instanceof Element;
53
+ }
54
+
55
+ function isHTMLElement(node) {
56
+ var OwnElement = getWindow(node).HTMLElement;
57
+ return node instanceof OwnElement || node instanceof HTMLElement;
58
+ }
59
+
60
+ function isShadowRoot(node) {
61
+ // IE 11 has no ShadowRoot
62
+ if (typeof ShadowRoot === 'undefined') {
63
+ return false;
64
+ }
65
+
66
+ var OwnElement = getWindow(node).ShadowRoot;
67
+ return node instanceof OwnElement || node instanceof ShadowRoot;
68
+ }
69
+
70
+ // and applies them to the HTMLElements such as popper and arrow
71
+
72
+ function applyStyles(_ref) {
73
+ var state = _ref.state;
74
+ Object.keys(state.elements).forEach(function (name) {
75
+ var style = state.styles[name] || {};
76
+ var attributes = state.attributes[name] || {};
77
+ var element = state.elements[name]; // arrow is optional + virtual elements
78
+
79
+ if (!isHTMLElement(element) || !getNodeName(element)) {
80
+ return;
81
+ } // Flow doesn't support to extend this property, but it's the most
82
+ // effective way to apply styles to an HTMLElement
83
+ // $FlowFixMe[cannot-write]
84
+
85
+
86
+ Object.assign(element.style, style);
87
+ Object.keys(attributes).forEach(function (name) {
88
+ var value = attributes[name];
89
+
90
+ if (value === false) {
91
+ element.removeAttribute(name);
92
+ } else {
93
+ element.setAttribute(name, value === true ? '' : value);
94
+ }
95
+ });
96
+ });
97
+ }
98
+
99
+ function effect$2(_ref2) {
100
+ var state = _ref2.state;
101
+ var initialStyles = {
102
+ popper: {
103
+ position: state.options.strategy,
104
+ left: '0',
105
+ top: '0',
106
+ margin: '0'
107
+ },
108
+ arrow: {
109
+ position: 'absolute'
110
+ },
111
+ reference: {}
112
+ };
113
+ Object.assign(state.elements.popper.style, initialStyles.popper);
114
+ state.styles = initialStyles;
115
+
116
+ if (state.elements.arrow) {
117
+ Object.assign(state.elements.arrow.style, initialStyles.arrow);
118
+ }
119
+
120
+ return function () {
121
+ Object.keys(state.elements).forEach(function (name) {
122
+ var element = state.elements[name];
123
+ var attributes = state.attributes[name] || {};
124
+ var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
125
+
126
+ var style = styleProperties.reduce(function (style, property) {
127
+ style[property] = '';
128
+ return style;
129
+ }, {}); // arrow is optional + virtual elements
130
+
131
+ if (!isHTMLElement(element) || !getNodeName(element)) {
132
+ return;
133
+ }
134
+
135
+ Object.assign(element.style, style);
136
+ Object.keys(attributes).forEach(function (attribute) {
137
+ element.removeAttribute(attribute);
138
+ });
139
+ });
140
+ };
141
+ } // eslint-disable-next-line import/no-unused-modules
142
+
143
+
144
+ var applyStyles$1 = {
145
+ name: 'applyStyles',
146
+ enabled: true,
147
+ phase: 'write',
148
+ fn: applyStyles,
149
+ effect: effect$2,
150
+ requires: ['computeStyles']
151
+ };
152
+
153
+ function getBasePlacement(placement) {
154
+ return placement.split('-')[0];
155
+ }
156
+
157
+ var max = Math.max;
158
+ var min = Math.min;
159
+ var round = Math.round;
160
+
161
+ function getUAString() {
162
+ var uaData = navigator.userAgentData;
163
+
164
+ if (uaData != null && uaData.brands) {
165
+ return uaData.brands.map(function (item) {
166
+ return item.brand + "/" + item.version;
167
+ }).join(' ');
168
+ }
169
+
170
+ return navigator.userAgent;
171
+ }
172
+
173
+ function isLayoutViewport() {
174
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
175
+ }
176
+
177
+ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
178
+ if (includeScale === void 0) {
179
+ includeScale = false;
180
+ }
181
+
182
+ if (isFixedStrategy === void 0) {
183
+ isFixedStrategy = false;
184
+ }
185
+
186
+ var clientRect = element.getBoundingClientRect();
187
+ var scaleX = 1;
188
+ var scaleY = 1;
189
+
190
+ if (includeScale && isHTMLElement(element)) {
191
+ scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
192
+ scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
193
+ }
194
+
195
+ var _ref = isElement(element) ? getWindow(element) : window,
196
+ visualViewport = _ref.visualViewport;
197
+
198
+ var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
199
+ var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
200
+ var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
201
+ var width = clientRect.width / scaleX;
202
+ var height = clientRect.height / scaleY;
203
+ return {
204
+ width: width,
205
+ height: height,
206
+ top: y,
207
+ right: x + width,
208
+ bottom: y + height,
209
+ left: x,
210
+ x: x,
211
+ y: y
212
+ };
213
+ }
214
+
215
+ // means it doesn't take into account transforms.
216
+
217
+ function getLayoutRect(element) {
218
+ var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
219
+ // Fixes https://github.com/popperjs/popper-core/issues/1223
220
+
221
+ var width = element.offsetWidth;
222
+ var height = element.offsetHeight;
223
+
224
+ if (Math.abs(clientRect.width - width) <= 1) {
225
+ width = clientRect.width;
226
+ }
227
+
228
+ if (Math.abs(clientRect.height - height) <= 1) {
229
+ height = clientRect.height;
230
+ }
231
+
232
+ return {
233
+ x: element.offsetLeft,
234
+ y: element.offsetTop,
235
+ width: width,
236
+ height: height
237
+ };
238
+ }
239
+
240
+ function contains(parent, child) {
241
+ var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
242
+
243
+ if (parent.contains(child)) {
244
+ return true;
245
+ } // then fallback to custom implementation with Shadow DOM support
246
+ else if (rootNode && isShadowRoot(rootNode)) {
247
+ var next = child;
248
+
249
+ do {
250
+ if (next && parent.isSameNode(next)) {
251
+ return true;
252
+ } // $FlowFixMe[prop-missing]: need a better way to handle this...
253
+
254
+
255
+ next = next.parentNode || next.host;
256
+ } while (next);
257
+ } // Give up, the result is false
258
+
259
+
260
+ return false;
261
+ }
262
+
263
+ function getComputedStyle(element) {
264
+ return getWindow(element).getComputedStyle(element);
265
+ }
266
+
267
+ function isTableElement(element) {
268
+ return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
269
+ }
270
+
271
+ function getDocumentElement(element) {
272
+ // $FlowFixMe[incompatible-return]: assume body is always available
273
+ return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
274
+ element.document) || window.document).documentElement;
275
+ }
276
+
277
+ function getParentNode(element) {
278
+ if (getNodeName(element) === 'html') {
279
+ return element;
280
+ }
281
+
282
+ return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
283
+ // $FlowFixMe[incompatible-return]
284
+ // $FlowFixMe[prop-missing]
285
+ element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
286
+ element.parentNode || ( // DOM Element detected
287
+ isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
288
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
289
+ getDocumentElement(element) // fallback
290
+
291
+ );
292
+ }
293
+
294
+ function getTrueOffsetParent(element) {
295
+ if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
296
+ getComputedStyle(element).position === 'fixed') {
297
+ return null;
298
+ }
299
+
300
+ return element.offsetParent;
301
+ } // `.offsetParent` reports `null` for fixed elements, while absolute elements
302
+ // return the containing block
303
+
304
+
305
+ function getContainingBlock(element) {
306
+ var isFirefox = /firefox/i.test(getUAString());
307
+ var isIE = /Trident/i.test(getUAString());
308
+
309
+ if (isIE && isHTMLElement(element)) {
310
+ // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
311
+ var elementCss = getComputedStyle(element);
312
+
313
+ if (elementCss.position === 'fixed') {
314
+ return null;
315
+ }
316
+ }
317
+
318
+ var currentNode = getParentNode(element);
319
+
320
+ if (isShadowRoot(currentNode)) {
321
+ currentNode = currentNode.host;
322
+ }
323
+
324
+ while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
325
+ var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
326
+ // create a containing block.
327
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
328
+
329
+ if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
330
+ return currentNode;
331
+ } else {
332
+ currentNode = currentNode.parentNode;
333
+ }
334
+ }
335
+
336
+ return null;
337
+ } // Gets the closest ancestor positioned element. Handles some edge cases,
338
+ // such as table ancestors and cross browser bugs.
339
+
340
+
341
+ function getOffsetParent(element) {
342
+ var window = getWindow(element);
343
+ var offsetParent = getTrueOffsetParent(element);
344
+
345
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
346
+ offsetParent = getTrueOffsetParent(offsetParent);
347
+ }
348
+
349
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {
350
+ return window;
351
+ }
352
+
353
+ return offsetParent || getContainingBlock(element) || window;
354
+ }
355
+
356
+ function getMainAxisFromPlacement(placement) {
357
+ return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
358
+ }
359
+
360
+ function within(min$1, value, max$1) {
361
+ return max(min$1, min(value, max$1));
362
+ }
363
+ function withinMaxClamp(min, value, max) {
364
+ var v = within(min, value, max);
365
+ return v > max ? max : v;
366
+ }
367
+
368
+ function getFreshSideObject() {
369
+ return {
370
+ top: 0,
371
+ right: 0,
372
+ bottom: 0,
373
+ left: 0
374
+ };
375
+ }
376
+
377
+ function mergePaddingObject(paddingObject) {
378
+ return Object.assign({}, getFreshSideObject(), paddingObject);
379
+ }
380
+
381
+ function expandToHashMap(value, keys) {
382
+ return keys.reduce(function (hashMap, key) {
383
+ hashMap[key] = value;
384
+ return hashMap;
385
+ }, {});
386
+ }
387
+
388
+ var toPaddingObject = function toPaddingObject(padding, state) {
389
+ padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
390
+ placement: state.placement
391
+ })) : padding;
392
+ return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
393
+ };
394
+
395
+ function arrow(_ref) {
396
+ var _state$modifiersData$;
397
+
398
+ var state = _ref.state,
399
+ name = _ref.name,
400
+ options = _ref.options;
401
+ var arrowElement = state.elements.arrow;
402
+ var popperOffsets = state.modifiersData.popperOffsets;
403
+ var basePlacement = getBasePlacement(state.placement);
404
+ var axis = getMainAxisFromPlacement(basePlacement);
405
+ var isVertical = [left, right].indexOf(basePlacement) >= 0;
406
+ var len = isVertical ? 'height' : 'width';
407
+
408
+ if (!arrowElement || !popperOffsets) {
409
+ return;
410
+ }
411
+
412
+ var paddingObject = toPaddingObject(options.padding, state);
413
+ var arrowRect = getLayoutRect(arrowElement);
414
+ var minProp = axis === 'y' ? top : left;
415
+ var maxProp = axis === 'y' ? bottom : right;
416
+ var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
417
+ var startDiff = popperOffsets[axis] - state.rects.reference[axis];
418
+ var arrowOffsetParent = getOffsetParent(arrowElement);
419
+ var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
420
+ var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
421
+ // outside of the popper bounds
422
+
423
+ var min = paddingObject[minProp];
424
+ var max = clientSize - arrowRect[len] - paddingObject[maxProp];
425
+ var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
426
+ var offset = within(min, center, max); // Prevents breaking syntax highlighting...
427
+
428
+ var axisProp = axis;
429
+ state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
430
+ }
431
+
432
+ function effect$1(_ref2) {
433
+ var state = _ref2.state,
434
+ options = _ref2.options;
435
+ var _options$element = options.element,
436
+ arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
437
+
438
+ if (arrowElement == null) {
439
+ return;
440
+ } // CSS selector
441
+
442
+
443
+ if (typeof arrowElement === 'string') {
444
+ arrowElement = state.elements.popper.querySelector(arrowElement);
445
+
446
+ if (!arrowElement) {
447
+ return;
448
+ }
449
+ }
450
+
451
+ if (!contains(state.elements.popper, arrowElement)) {
452
+
453
+ return;
454
+ }
455
+
456
+ state.elements.arrow = arrowElement;
457
+ } // eslint-disable-next-line import/no-unused-modules
458
+
459
+
460
+ var arrow$1 = {
461
+ name: 'arrow',
462
+ enabled: true,
463
+ phase: 'main',
464
+ fn: arrow,
465
+ effect: effect$1,
466
+ requires: ['popperOffsets'],
467
+ requiresIfExists: ['preventOverflow']
468
+ };
469
+
470
+ function getVariation(placement) {
471
+ return placement.split('-')[1];
472
+ }
473
+
474
+ var unsetSides = {
475
+ top: 'auto',
476
+ right: 'auto',
477
+ bottom: 'auto',
478
+ left: 'auto'
479
+ }; // Round the offsets to the nearest suitable subpixel based on the DPR.
480
+ // Zooming can change the DPR, but it seems to report a value that will
481
+ // cleanly divide the values into the appropriate subpixels.
482
+
483
+ function roundOffsetsByDPR(_ref) {
484
+ var x = _ref.x,
485
+ y = _ref.y;
486
+ var win = window;
487
+ var dpr = win.devicePixelRatio || 1;
488
+ return {
489
+ x: round(x * dpr) / dpr || 0,
490
+ y: round(y * dpr) / dpr || 0
491
+ };
492
+ }
493
+
494
+ function mapToStyles(_ref2) {
495
+ var _Object$assign2;
496
+
497
+ var popper = _ref2.popper,
498
+ popperRect = _ref2.popperRect,
499
+ placement = _ref2.placement,
500
+ variation = _ref2.variation,
501
+ offsets = _ref2.offsets,
502
+ position = _ref2.position,
503
+ gpuAcceleration = _ref2.gpuAcceleration,
504
+ adaptive = _ref2.adaptive,
505
+ roundOffsets = _ref2.roundOffsets,
506
+ isFixed = _ref2.isFixed;
507
+ var _offsets$x = offsets.x,
508
+ x = _offsets$x === void 0 ? 0 : _offsets$x,
509
+ _offsets$y = offsets.y,
510
+ y = _offsets$y === void 0 ? 0 : _offsets$y;
511
+
512
+ var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
513
+ x: x,
514
+ y: y
515
+ }) : {
516
+ x: x,
517
+ y: y
518
+ };
519
+
520
+ x = _ref3.x;
521
+ y = _ref3.y;
522
+ var hasX = offsets.hasOwnProperty('x');
523
+ var hasY = offsets.hasOwnProperty('y');
524
+ var sideX = left;
525
+ var sideY = top;
526
+ var win = window;
527
+
528
+ if (adaptive) {
529
+ var offsetParent = getOffsetParent(popper);
530
+ var heightProp = 'clientHeight';
531
+ var widthProp = 'clientWidth';
532
+
533
+ if (offsetParent === getWindow(popper)) {
534
+ offsetParent = getDocumentElement(popper);
535
+
536
+ if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {
537
+ heightProp = 'scrollHeight';
538
+ widthProp = 'scrollWidth';
539
+ }
540
+ } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
541
+
542
+
543
+ offsetParent = offsetParent;
544
+
545
+ if (placement === top || (placement === left || placement === right) && variation === end) {
546
+ sideY = bottom;
547
+ var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
548
+ offsetParent[heightProp];
549
+ y -= offsetY - popperRect.height;
550
+ y *= gpuAcceleration ? 1 : -1;
551
+ }
552
+
553
+ if (placement === left || (placement === top || placement === bottom) && variation === end) {
554
+ sideX = right;
555
+ var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
556
+ offsetParent[widthProp];
557
+ x -= offsetX - popperRect.width;
558
+ x *= gpuAcceleration ? 1 : -1;
559
+ }
560
+ }
561
+
562
+ var commonStyles = Object.assign({
563
+ position: position
564
+ }, adaptive && unsetSides);
565
+
566
+ var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
567
+ x: x,
568
+ y: y
569
+ }) : {
570
+ x: x,
571
+ y: y
572
+ };
573
+
574
+ x = _ref4.x;
575
+ y = _ref4.y;
576
+
577
+ if (gpuAcceleration) {
578
+ var _Object$assign;
579
+
580
+ return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
581
+ }
582
+
583
+ return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
584
+ }
585
+
586
+ function computeStyles(_ref5) {
587
+ var state = _ref5.state,
588
+ options = _ref5.options;
589
+ var _options$gpuAccelerat = options.gpuAcceleration,
590
+ gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
591
+ _options$adaptive = options.adaptive,
592
+ adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
593
+ _options$roundOffsets = options.roundOffsets,
594
+ roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
595
+
596
+ var commonStyles = {
597
+ placement: getBasePlacement(state.placement),
598
+ variation: getVariation(state.placement),
599
+ popper: state.elements.popper,
600
+ popperRect: state.rects.popper,
601
+ gpuAcceleration: gpuAcceleration,
602
+ isFixed: state.options.strategy === 'fixed'
603
+ };
604
+
605
+ if (state.modifiersData.popperOffsets != null) {
606
+ state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
607
+ offsets: state.modifiersData.popperOffsets,
608
+ position: state.options.strategy,
609
+ adaptive: adaptive,
610
+ roundOffsets: roundOffsets
611
+ })));
612
+ }
613
+
614
+ if (state.modifiersData.arrow != null) {
615
+ state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
616
+ offsets: state.modifiersData.arrow,
617
+ position: 'absolute',
618
+ adaptive: false,
619
+ roundOffsets: roundOffsets
620
+ })));
621
+ }
622
+
623
+ state.attributes.popper = Object.assign({}, state.attributes.popper, {
624
+ 'data-popper-placement': state.placement
625
+ });
626
+ } // eslint-disable-next-line import/no-unused-modules
627
+
628
+
629
+ var computeStyles$1 = {
630
+ name: 'computeStyles',
631
+ enabled: true,
632
+ phase: 'beforeWrite',
633
+ fn: computeStyles,
634
+ data: {}
635
+ };
636
+
637
+ var passive = {
638
+ passive: true
639
+ };
640
+
641
+ function effect(_ref) {
642
+ var state = _ref.state,
643
+ instance = _ref.instance,
644
+ options = _ref.options;
645
+ var _options$scroll = options.scroll,
646
+ scroll = _options$scroll === void 0 ? true : _options$scroll,
647
+ _options$resize = options.resize,
648
+ resize = _options$resize === void 0 ? true : _options$resize;
649
+ var window = getWindow(state.elements.popper);
650
+ var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
651
+
652
+ if (scroll) {
653
+ scrollParents.forEach(function (scrollParent) {
654
+ scrollParent.addEventListener('scroll', instance.update, passive);
655
+ });
656
+ }
657
+
658
+ if (resize) {
659
+ window.addEventListener('resize', instance.update, passive);
660
+ }
661
+
662
+ return function () {
663
+ if (scroll) {
664
+ scrollParents.forEach(function (scrollParent) {
665
+ scrollParent.removeEventListener('scroll', instance.update, passive);
666
+ });
667
+ }
668
+
669
+ if (resize) {
670
+ window.removeEventListener('resize', instance.update, passive);
671
+ }
672
+ };
673
+ } // eslint-disable-next-line import/no-unused-modules
674
+
675
+
676
+ var eventListeners = {
677
+ name: 'eventListeners',
678
+ enabled: true,
679
+ phase: 'write',
680
+ fn: function fn() {},
681
+ effect: effect,
682
+ data: {}
683
+ };
684
+
685
+ var hash$1 = {
686
+ left: 'right',
687
+ right: 'left',
688
+ bottom: 'top',
689
+ top: 'bottom'
690
+ };
691
+ function getOppositePlacement(placement) {
692
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
693
+ return hash$1[matched];
694
+ });
695
+ }
696
+
697
+ var hash = {
698
+ start: 'end',
699
+ end: 'start'
700
+ };
701
+ function getOppositeVariationPlacement(placement) {
702
+ return placement.replace(/start|end/g, function (matched) {
703
+ return hash[matched];
704
+ });
705
+ }
706
+
707
+ function getWindowScroll(node) {
708
+ var win = getWindow(node);
709
+ var scrollLeft = win.pageXOffset;
710
+ var scrollTop = win.pageYOffset;
711
+ return {
712
+ scrollLeft: scrollLeft,
713
+ scrollTop: scrollTop
714
+ };
715
+ }
716
+
717
+ function getWindowScrollBarX(element) {
718
+ // If <html> has a CSS width greater than the viewport, then this will be
719
+ // incorrect for RTL.
720
+ // Popper 1 is broken in this case and never had a bug report so let's assume
721
+ // it's not an issue. I don't think anyone ever specifies width on <html>
722
+ // anyway.
723
+ // Browsers where the left scrollbar doesn't cause an issue report `0` for
724
+ // this (e.g. Edge 2019, IE11, Safari)
725
+ return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
726
+ }
727
+
728
+ function getViewportRect(element, strategy) {
729
+ var win = getWindow(element);
730
+ var html = getDocumentElement(element);
731
+ var visualViewport = win.visualViewport;
732
+ var width = html.clientWidth;
733
+ var height = html.clientHeight;
734
+ var x = 0;
735
+ var y = 0;
736
+
737
+ if (visualViewport) {
738
+ width = visualViewport.width;
739
+ height = visualViewport.height;
740
+ var layoutViewport = isLayoutViewport();
741
+
742
+ if (layoutViewport || !layoutViewport && strategy === 'fixed') {
743
+ x = visualViewport.offsetLeft;
744
+ y = visualViewport.offsetTop;
745
+ }
746
+ }
747
+
748
+ return {
749
+ width: width,
750
+ height: height,
751
+ x: x + getWindowScrollBarX(element),
752
+ y: y
753
+ };
754
+ }
755
+
756
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable
757
+
758
+ function getDocumentRect(element) {
759
+ var _element$ownerDocumen;
760
+
761
+ var html = getDocumentElement(element);
762
+ var winScroll = getWindowScroll(element);
763
+ var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
764
+ var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
765
+ var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
766
+ var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
767
+ var y = -winScroll.scrollTop;
768
+
769
+ if (getComputedStyle(body || html).direction === 'rtl') {
770
+ x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
771
+ }
772
+
773
+ return {
774
+ width: width,
775
+ height: height,
776
+ x: x,
777
+ y: y
778
+ };
779
+ }
780
+
781
+ function isScrollParent(element) {
782
+ // Firefox wants us to check `-x` and `-y` variations as well
783
+ var _getComputedStyle = getComputedStyle(element),
784
+ overflow = _getComputedStyle.overflow,
785
+ overflowX = _getComputedStyle.overflowX,
786
+ overflowY = _getComputedStyle.overflowY;
787
+
788
+ return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
789
+ }
790
+
791
+ function getScrollParent(node) {
792
+ if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
793
+ // $FlowFixMe[incompatible-return]: assume body is always available
794
+ return node.ownerDocument.body;
795
+ }
796
+
797
+ if (isHTMLElement(node) && isScrollParent(node)) {
798
+ return node;
799
+ }
800
+
801
+ return getScrollParent(getParentNode(node));
802
+ }
803
+
804
+ /*
805
+ given a DOM element, return the list of all scroll parents, up the list of ancesors
806
+ until we get to the top window object. This list is what we attach scroll listeners
807
+ to, because if any of these parent elements scroll, we'll need to re-calculate the
808
+ reference element's position.
809
+ */
810
+
811
+ function listScrollParents(element, list) {
812
+ var _element$ownerDocumen;
813
+
814
+ if (list === void 0) {
815
+ list = [];
816
+ }
817
+
818
+ var scrollParent = getScrollParent(element);
819
+ var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
820
+ var win = getWindow(scrollParent);
821
+ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
822
+ var updatedList = list.concat(target);
823
+ return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
824
+ updatedList.concat(listScrollParents(getParentNode(target)));
825
+ }
826
+
827
+ function rectToClientRect(rect) {
828
+ return Object.assign({}, rect, {
829
+ left: rect.x,
830
+ top: rect.y,
831
+ right: rect.x + rect.width,
832
+ bottom: rect.y + rect.height
833
+ });
834
+ }
835
+
836
+ function getInnerBoundingClientRect(element, strategy) {
837
+ var rect = getBoundingClientRect(element, false, strategy === 'fixed');
838
+ rect.top = rect.top + element.clientTop;
839
+ rect.left = rect.left + element.clientLeft;
840
+ rect.bottom = rect.top + element.clientHeight;
841
+ rect.right = rect.left + element.clientWidth;
842
+ rect.width = element.clientWidth;
843
+ rect.height = element.clientHeight;
844
+ rect.x = rect.left;
845
+ rect.y = rect.top;
846
+ return rect;
847
+ }
848
+
849
+ function getClientRectFromMixedType(element, clippingParent, strategy) {
850
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
851
+ } // A "clipping parent" is an overflowable container with the characteristic of
852
+ // clipping (or hiding) overflowing elements with a position different from
853
+ // `initial`
854
+
855
+
856
+ function getClippingParents(element) {
857
+ var clippingParents = listScrollParents(getParentNode(element));
858
+ var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;
859
+ var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
860
+
861
+ if (!isElement(clipperElement)) {
862
+ return [];
863
+ } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
864
+
865
+
866
+ return clippingParents.filter(function (clippingParent) {
867
+ return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
868
+ });
869
+ } // Gets the maximum area that the element is visible in due to any number of
870
+ // clipping parents
871
+
872
+
873
+ function getClippingRect(element, boundary, rootBoundary, strategy) {
874
+ var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
875
+ var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
876
+ var firstClippingParent = clippingParents[0];
877
+ var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
878
+ var rect = getClientRectFromMixedType(element, clippingParent, strategy);
879
+ accRect.top = max(rect.top, accRect.top);
880
+ accRect.right = min(rect.right, accRect.right);
881
+ accRect.bottom = min(rect.bottom, accRect.bottom);
882
+ accRect.left = max(rect.left, accRect.left);
883
+ return accRect;
884
+ }, getClientRectFromMixedType(element, firstClippingParent, strategy));
885
+ clippingRect.width = clippingRect.right - clippingRect.left;
886
+ clippingRect.height = clippingRect.bottom - clippingRect.top;
887
+ clippingRect.x = clippingRect.left;
888
+ clippingRect.y = clippingRect.top;
889
+ return clippingRect;
890
+ }
891
+
892
+ function computeOffsets(_ref) {
893
+ var reference = _ref.reference,
894
+ element = _ref.element,
895
+ placement = _ref.placement;
896
+ var basePlacement = placement ? getBasePlacement(placement) : null;
897
+ var variation = placement ? getVariation(placement) : null;
898
+ var commonX = reference.x + reference.width / 2 - element.width / 2;
899
+ var commonY = reference.y + reference.height / 2 - element.height / 2;
900
+ var offsets;
901
+
902
+ switch (basePlacement) {
903
+ case top:
904
+ offsets = {
905
+ x: commonX,
906
+ y: reference.y - element.height
907
+ };
908
+ break;
909
+
910
+ case bottom:
911
+ offsets = {
912
+ x: commonX,
913
+ y: reference.y + reference.height
914
+ };
915
+ break;
916
+
917
+ case right:
918
+ offsets = {
919
+ x: reference.x + reference.width,
920
+ y: commonY
921
+ };
922
+ break;
923
+
924
+ case left:
925
+ offsets = {
926
+ x: reference.x - element.width,
927
+ y: commonY
928
+ };
929
+ break;
930
+
931
+ default:
932
+ offsets = {
933
+ x: reference.x,
934
+ y: reference.y
935
+ };
936
+ }
937
+
938
+ var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
939
+
940
+ if (mainAxis != null) {
941
+ var len = mainAxis === 'y' ? 'height' : 'width';
942
+
943
+ switch (variation) {
944
+ case start:
945
+ offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
946
+ break;
947
+
948
+ case end:
949
+ offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
950
+ break;
951
+ }
952
+ }
953
+
954
+ return offsets;
955
+ }
956
+
957
+ function detectOverflow(state, options) {
958
+ if (options === void 0) {
959
+ options = {};
960
+ }
961
+
962
+ var _options = options,
963
+ _options$placement = _options.placement,
964
+ placement = _options$placement === void 0 ? state.placement : _options$placement,
965
+ _options$strategy = _options.strategy,
966
+ strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,
967
+ _options$boundary = _options.boundary,
968
+ boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
969
+ _options$rootBoundary = _options.rootBoundary,
970
+ rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
971
+ _options$elementConte = _options.elementContext,
972
+ elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
973
+ _options$altBoundary = _options.altBoundary,
974
+ altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
975
+ _options$padding = _options.padding,
976
+ padding = _options$padding === void 0 ? 0 : _options$padding;
977
+ var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
978
+ var altContext = elementContext === popper ? reference : popper;
979
+ var popperRect = state.rects.popper;
980
+ var element = state.elements[altBoundary ? altContext : elementContext];
981
+ var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
982
+ var referenceClientRect = getBoundingClientRect(state.elements.reference);
983
+ var popperOffsets = computeOffsets({
984
+ reference: referenceClientRect,
985
+ element: popperRect,
986
+ strategy: 'absolute',
987
+ placement: placement
988
+ });
989
+ var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
990
+ var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
991
+ // 0 or negative = within the clipping rect
992
+
993
+ var overflowOffsets = {
994
+ top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
995
+ bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
996
+ left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
997
+ right: elementClientRect.right - clippingClientRect.right + paddingObject.right
998
+ };
999
+ var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
1000
+
1001
+ if (elementContext === popper && offsetData) {
1002
+ var offset = offsetData[placement];
1003
+ Object.keys(overflowOffsets).forEach(function (key) {
1004
+ var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
1005
+ var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
1006
+ overflowOffsets[key] += offset[axis] * multiply;
1007
+ });
1008
+ }
1009
+
1010
+ return overflowOffsets;
1011
+ }
1012
+
1013
+ function computeAutoPlacement(state, options) {
1014
+ if (options === void 0) {
1015
+ options = {};
1016
+ }
1017
+
1018
+ var _options = options,
1019
+ placement = _options.placement,
1020
+ boundary = _options.boundary,
1021
+ rootBoundary = _options.rootBoundary,
1022
+ padding = _options.padding,
1023
+ flipVariations = _options.flipVariations,
1024
+ _options$allowedAutoP = _options.allowedAutoPlacements,
1025
+ allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
1026
+ var variation = getVariation(placement);
1027
+ var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
1028
+ return getVariation(placement) === variation;
1029
+ }) : basePlacements;
1030
+ var allowedPlacements = placements$1.filter(function (placement) {
1031
+ return allowedAutoPlacements.indexOf(placement) >= 0;
1032
+ });
1033
+
1034
+ if (allowedPlacements.length === 0) {
1035
+ allowedPlacements = placements$1;
1036
+ } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
1037
+
1038
+
1039
+ var overflows = allowedPlacements.reduce(function (acc, placement) {
1040
+ acc[placement] = detectOverflow(state, {
1041
+ placement: placement,
1042
+ boundary: boundary,
1043
+ rootBoundary: rootBoundary,
1044
+ padding: padding
1045
+ })[getBasePlacement(placement)];
1046
+ return acc;
1047
+ }, {});
1048
+ return Object.keys(overflows).sort(function (a, b) {
1049
+ return overflows[a] - overflows[b];
1050
+ });
1051
+ }
1052
+
1053
+ function getExpandedFallbackPlacements(placement) {
1054
+ if (getBasePlacement(placement) === auto) {
1055
+ return [];
1056
+ }
1057
+
1058
+ var oppositePlacement = getOppositePlacement(placement);
1059
+ return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
1060
+ }
1061
+
1062
+ function flip(_ref) {
1063
+ var state = _ref.state,
1064
+ options = _ref.options,
1065
+ name = _ref.name;
1066
+
1067
+ if (state.modifiersData[name]._skip) {
1068
+ return;
1069
+ }
1070
+
1071
+ var _options$mainAxis = options.mainAxis,
1072
+ checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
1073
+ _options$altAxis = options.altAxis,
1074
+ checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
1075
+ specifiedFallbackPlacements = options.fallbackPlacements,
1076
+ padding = options.padding,
1077
+ boundary = options.boundary,
1078
+ rootBoundary = options.rootBoundary,
1079
+ altBoundary = options.altBoundary,
1080
+ _options$flipVariatio = options.flipVariations,
1081
+ flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
1082
+ allowedAutoPlacements = options.allowedAutoPlacements;
1083
+ var preferredPlacement = state.options.placement;
1084
+ var basePlacement = getBasePlacement(preferredPlacement);
1085
+ var isBasePlacement = basePlacement === preferredPlacement;
1086
+ var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
1087
+ var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
1088
+ return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
1089
+ placement: placement,
1090
+ boundary: boundary,
1091
+ rootBoundary: rootBoundary,
1092
+ padding: padding,
1093
+ flipVariations: flipVariations,
1094
+ allowedAutoPlacements: allowedAutoPlacements
1095
+ }) : placement);
1096
+ }, []);
1097
+ var referenceRect = state.rects.reference;
1098
+ var popperRect = state.rects.popper;
1099
+ var checksMap = new Map();
1100
+ var makeFallbackChecks = true;
1101
+ var firstFittingPlacement = placements[0];
1102
+
1103
+ for (var i = 0; i < placements.length; i++) {
1104
+ var placement = placements[i];
1105
+
1106
+ var _basePlacement = getBasePlacement(placement);
1107
+
1108
+ var isStartVariation = getVariation(placement) === start;
1109
+ var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
1110
+ var len = isVertical ? 'width' : 'height';
1111
+ var overflow = detectOverflow(state, {
1112
+ placement: placement,
1113
+ boundary: boundary,
1114
+ rootBoundary: rootBoundary,
1115
+ altBoundary: altBoundary,
1116
+ padding: padding
1117
+ });
1118
+ var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
1119
+
1120
+ if (referenceRect[len] > popperRect[len]) {
1121
+ mainVariationSide = getOppositePlacement(mainVariationSide);
1122
+ }
1123
+
1124
+ var altVariationSide = getOppositePlacement(mainVariationSide);
1125
+ var checks = [];
1126
+
1127
+ if (checkMainAxis) {
1128
+ checks.push(overflow[_basePlacement] <= 0);
1129
+ }
1130
+
1131
+ if (checkAltAxis) {
1132
+ checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
1133
+ }
1134
+
1135
+ if (checks.every(function (check) {
1136
+ return check;
1137
+ })) {
1138
+ firstFittingPlacement = placement;
1139
+ makeFallbackChecks = false;
1140
+ break;
1141
+ }
1142
+
1143
+ checksMap.set(placement, checks);
1144
+ }
1145
+
1146
+ if (makeFallbackChecks) {
1147
+ // `2` may be desired in some cases – research later
1148
+ var numberOfChecks = flipVariations ? 3 : 1;
1149
+
1150
+ var _loop = function _loop(_i) {
1151
+ var fittingPlacement = placements.find(function (placement) {
1152
+ var checks = checksMap.get(placement);
1153
+
1154
+ if (checks) {
1155
+ return checks.slice(0, _i).every(function (check) {
1156
+ return check;
1157
+ });
1158
+ }
1159
+ });
1160
+
1161
+ if (fittingPlacement) {
1162
+ firstFittingPlacement = fittingPlacement;
1163
+ return "break";
1164
+ }
1165
+ };
1166
+
1167
+ for (var _i = numberOfChecks; _i > 0; _i--) {
1168
+ var _ret = _loop(_i);
1169
+
1170
+ if (_ret === "break") break;
1171
+ }
1172
+ }
1173
+
1174
+ if (state.placement !== firstFittingPlacement) {
1175
+ state.modifiersData[name]._skip = true;
1176
+ state.placement = firstFittingPlacement;
1177
+ state.reset = true;
1178
+ }
1179
+ } // eslint-disable-next-line import/no-unused-modules
1180
+
1181
+
1182
+ var flip$1 = {
1183
+ name: 'flip',
1184
+ enabled: true,
1185
+ phase: 'main',
1186
+ fn: flip,
1187
+ requiresIfExists: ['offset'],
1188
+ data: {
1189
+ _skip: false
1190
+ }
1191
+ };
1192
+
1193
+ function getSideOffsets(overflow, rect, preventedOffsets) {
1194
+ if (preventedOffsets === void 0) {
1195
+ preventedOffsets = {
1196
+ x: 0,
1197
+ y: 0
1198
+ };
1199
+ }
1200
+
1201
+ return {
1202
+ top: overflow.top - rect.height - preventedOffsets.y,
1203
+ right: overflow.right - rect.width + preventedOffsets.x,
1204
+ bottom: overflow.bottom - rect.height + preventedOffsets.y,
1205
+ left: overflow.left - rect.width - preventedOffsets.x
1206
+ };
1207
+ }
1208
+
1209
+ function isAnySideFullyClipped(overflow) {
1210
+ return [top, right, bottom, left].some(function (side) {
1211
+ return overflow[side] >= 0;
1212
+ });
1213
+ }
1214
+
1215
+ function hide(_ref) {
1216
+ var state = _ref.state,
1217
+ name = _ref.name;
1218
+ var referenceRect = state.rects.reference;
1219
+ var popperRect = state.rects.popper;
1220
+ var preventedOffsets = state.modifiersData.preventOverflow;
1221
+ var referenceOverflow = detectOverflow(state, {
1222
+ elementContext: 'reference'
1223
+ });
1224
+ var popperAltOverflow = detectOverflow(state, {
1225
+ altBoundary: true
1226
+ });
1227
+ var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
1228
+ var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
1229
+ var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
1230
+ var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
1231
+ state.modifiersData[name] = {
1232
+ referenceClippingOffsets: referenceClippingOffsets,
1233
+ popperEscapeOffsets: popperEscapeOffsets,
1234
+ isReferenceHidden: isReferenceHidden,
1235
+ hasPopperEscaped: hasPopperEscaped
1236
+ };
1237
+ state.attributes.popper = Object.assign({}, state.attributes.popper, {
1238
+ 'data-popper-reference-hidden': isReferenceHidden,
1239
+ 'data-popper-escaped': hasPopperEscaped
1240
+ });
1241
+ } // eslint-disable-next-line import/no-unused-modules
1242
+
1243
+
1244
+ var hide$1 = {
1245
+ name: 'hide',
1246
+ enabled: true,
1247
+ phase: 'main',
1248
+ requiresIfExists: ['preventOverflow'],
1249
+ fn: hide
1250
+ };
1251
+
1252
+ function distanceAndSkiddingToXY(placement, rects, offset) {
1253
+ var basePlacement = getBasePlacement(placement);
1254
+ var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
1255
+
1256
+ var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
1257
+ placement: placement
1258
+ })) : offset,
1259
+ skidding = _ref[0],
1260
+ distance = _ref[1];
1261
+
1262
+ skidding = skidding || 0;
1263
+ distance = (distance || 0) * invertDistance;
1264
+ return [left, right].indexOf(basePlacement) >= 0 ? {
1265
+ x: distance,
1266
+ y: skidding
1267
+ } : {
1268
+ x: skidding,
1269
+ y: distance
1270
+ };
1271
+ }
1272
+
1273
+ function offset(_ref2) {
1274
+ var state = _ref2.state,
1275
+ options = _ref2.options,
1276
+ name = _ref2.name;
1277
+ var _options$offset = options.offset,
1278
+ offset = _options$offset === void 0 ? [0, 0] : _options$offset;
1279
+ var data = placements.reduce(function (acc, placement) {
1280
+ acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
1281
+ return acc;
1282
+ }, {});
1283
+ var _data$state$placement = data[state.placement],
1284
+ x = _data$state$placement.x,
1285
+ y = _data$state$placement.y;
1286
+
1287
+ if (state.modifiersData.popperOffsets != null) {
1288
+ state.modifiersData.popperOffsets.x += x;
1289
+ state.modifiersData.popperOffsets.y += y;
1290
+ }
1291
+
1292
+ state.modifiersData[name] = data;
1293
+ } // eslint-disable-next-line import/no-unused-modules
1294
+
1295
+
1296
+ var offset$1 = {
1297
+ name: 'offset',
1298
+ enabled: true,
1299
+ phase: 'main',
1300
+ requires: ['popperOffsets'],
1301
+ fn: offset
1302
+ };
1303
+
1304
+ function popperOffsets(_ref) {
1305
+ var state = _ref.state,
1306
+ name = _ref.name;
1307
+ // Offsets are the actual position the popper needs to have to be
1308
+ // properly positioned near its reference element
1309
+ // This is the most basic placement, and will be adjusted by
1310
+ // the modifiers in the next step
1311
+ state.modifiersData[name] = computeOffsets({
1312
+ reference: state.rects.reference,
1313
+ element: state.rects.popper,
1314
+ strategy: 'absolute',
1315
+ placement: state.placement
1316
+ });
1317
+ } // eslint-disable-next-line import/no-unused-modules
1318
+
1319
+
1320
+ var popperOffsets$1 = {
1321
+ name: 'popperOffsets',
1322
+ enabled: true,
1323
+ phase: 'read',
1324
+ fn: popperOffsets,
1325
+ data: {}
1326
+ };
1327
+
1328
+ function getAltAxis(axis) {
1329
+ return axis === 'x' ? 'y' : 'x';
1330
+ }
1331
+
1332
+ function preventOverflow(_ref) {
1333
+ var state = _ref.state,
1334
+ options = _ref.options,
1335
+ name = _ref.name;
1336
+ var _options$mainAxis = options.mainAxis,
1337
+ checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
1338
+ _options$altAxis = options.altAxis,
1339
+ checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
1340
+ boundary = options.boundary,
1341
+ rootBoundary = options.rootBoundary,
1342
+ altBoundary = options.altBoundary,
1343
+ padding = options.padding,
1344
+ _options$tether = options.tether,
1345
+ tether = _options$tether === void 0 ? true : _options$tether,
1346
+ _options$tetherOffset = options.tetherOffset,
1347
+ tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
1348
+ var overflow = detectOverflow(state, {
1349
+ boundary: boundary,
1350
+ rootBoundary: rootBoundary,
1351
+ padding: padding,
1352
+ altBoundary: altBoundary
1353
+ });
1354
+ var basePlacement = getBasePlacement(state.placement);
1355
+ var variation = getVariation(state.placement);
1356
+ var isBasePlacement = !variation;
1357
+ var mainAxis = getMainAxisFromPlacement(basePlacement);
1358
+ var altAxis = getAltAxis(mainAxis);
1359
+ var popperOffsets = state.modifiersData.popperOffsets;
1360
+ var referenceRect = state.rects.reference;
1361
+ var popperRect = state.rects.popper;
1362
+ var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
1363
+ placement: state.placement
1364
+ })) : tetherOffset;
1365
+ var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
1366
+ mainAxis: tetherOffsetValue,
1367
+ altAxis: tetherOffsetValue
1368
+ } : Object.assign({
1369
+ mainAxis: 0,
1370
+ altAxis: 0
1371
+ }, tetherOffsetValue);
1372
+ var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
1373
+ var data = {
1374
+ x: 0,
1375
+ y: 0
1376
+ };
1377
+
1378
+ if (!popperOffsets) {
1379
+ return;
1380
+ }
1381
+
1382
+ if (checkMainAxis) {
1383
+ var _offsetModifierState$;
1384
+
1385
+ var mainSide = mainAxis === 'y' ? top : left;
1386
+ var altSide = mainAxis === 'y' ? bottom : right;
1387
+ var len = mainAxis === 'y' ? 'height' : 'width';
1388
+ var offset = popperOffsets[mainAxis];
1389
+ var min$1 = offset + overflow[mainSide];
1390
+ var max$1 = offset - overflow[altSide];
1391
+ var additive = tether ? -popperRect[len] / 2 : 0;
1392
+ var minLen = variation === start ? referenceRect[len] : popperRect[len];
1393
+ var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
1394
+ // outside the reference bounds
1395
+
1396
+ var arrowElement = state.elements.arrow;
1397
+ var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
1398
+ width: 0,
1399
+ height: 0
1400
+ };
1401
+ var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
1402
+ var arrowPaddingMin = arrowPaddingObject[mainSide];
1403
+ var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
1404
+ // to include its full size in the calculation. If the reference is small
1405
+ // and near the edge of a boundary, the popper can overflow even if the
1406
+ // reference is not overflowing as well (e.g. virtual elements with no
1407
+ // width or height)
1408
+
1409
+ var arrowLen = within(0, referenceRect[len], arrowRect[len]);
1410
+ var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
1411
+ var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
1412
+ var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
1413
+ var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
1414
+ var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
1415
+ var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
1416
+ var tetherMax = offset + maxOffset - offsetModifierValue;
1417
+ var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
1418
+ popperOffsets[mainAxis] = preventedOffset;
1419
+ data[mainAxis] = preventedOffset - offset;
1420
+ }
1421
+
1422
+ if (checkAltAxis) {
1423
+ var _offsetModifierState$2;
1424
+
1425
+ var _mainSide = mainAxis === 'x' ? top : left;
1426
+
1427
+ var _altSide = mainAxis === 'x' ? bottom : right;
1428
+
1429
+ var _offset = popperOffsets[altAxis];
1430
+
1431
+ var _len = altAxis === 'y' ? 'height' : 'width';
1432
+
1433
+ var _min = _offset + overflow[_mainSide];
1434
+
1435
+ var _max = _offset - overflow[_altSide];
1436
+
1437
+ var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
1438
+
1439
+ var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
1440
+
1441
+ var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
1442
+
1443
+ var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
1444
+
1445
+ var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
1446
+
1447
+ popperOffsets[altAxis] = _preventedOffset;
1448
+ data[altAxis] = _preventedOffset - _offset;
1449
+ }
1450
+
1451
+ state.modifiersData[name] = data;
1452
+ } // eslint-disable-next-line import/no-unused-modules
1453
+
1454
+
1455
+ var preventOverflow$1 = {
1456
+ name: 'preventOverflow',
1457
+ enabled: true,
1458
+ phase: 'main',
1459
+ fn: preventOverflow,
1460
+ requiresIfExists: ['offset']
1461
+ };
1462
+
1463
+ function getHTMLElementScroll(element) {
1464
+ return {
1465
+ scrollLeft: element.scrollLeft,
1466
+ scrollTop: element.scrollTop
1467
+ };
1468
+ }
1469
+
1470
+ function getNodeScroll(node) {
1471
+ if (node === getWindow(node) || !isHTMLElement(node)) {
1472
+ return getWindowScroll(node);
1473
+ } else {
1474
+ return getHTMLElementScroll(node);
1475
+ }
1476
+ }
1477
+
1478
+ function isElementScaled(element) {
1479
+ var rect = element.getBoundingClientRect();
1480
+ var scaleX = round(rect.width) / element.offsetWidth || 1;
1481
+ var scaleY = round(rect.height) / element.offsetHeight || 1;
1482
+ return scaleX !== 1 || scaleY !== 1;
1483
+ } // Returns the composite rect of an element relative to its offsetParent.
1484
+ // Composite means it takes into account transforms as well as layout.
1485
+
1486
+
1487
+ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
1488
+ if (isFixed === void 0) {
1489
+ isFixed = false;
1490
+ }
1491
+
1492
+ var isOffsetParentAnElement = isHTMLElement(offsetParent);
1493
+ var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
1494
+ var documentElement = getDocumentElement(offsetParent);
1495
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
1496
+ var scroll = {
1497
+ scrollLeft: 0,
1498
+ scrollTop: 0
1499
+ };
1500
+ var offsets = {
1501
+ x: 0,
1502
+ y: 0
1503
+ };
1504
+
1505
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1506
+ if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
1507
+ isScrollParent(documentElement)) {
1508
+ scroll = getNodeScroll(offsetParent);
1509
+ }
1510
+
1511
+ if (isHTMLElement(offsetParent)) {
1512
+ offsets = getBoundingClientRect(offsetParent, true);
1513
+ offsets.x += offsetParent.clientLeft;
1514
+ offsets.y += offsetParent.clientTop;
1515
+ } else if (documentElement) {
1516
+ offsets.x = getWindowScrollBarX(documentElement);
1517
+ }
1518
+ }
1519
+
1520
+ return {
1521
+ x: rect.left + scroll.scrollLeft - offsets.x,
1522
+ y: rect.top + scroll.scrollTop - offsets.y,
1523
+ width: rect.width,
1524
+ height: rect.height
1525
+ };
1526
+ }
1527
+
1528
+ function order(modifiers) {
1529
+ var map = new Map();
1530
+ var visited = new Set();
1531
+ var result = [];
1532
+ modifiers.forEach(function (modifier) {
1533
+ map.set(modifier.name, modifier);
1534
+ }); // On visiting object, check for its dependencies and visit them recursively
1535
+
1536
+ function sort(modifier) {
1537
+ visited.add(modifier.name);
1538
+ var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
1539
+ requires.forEach(function (dep) {
1540
+ if (!visited.has(dep)) {
1541
+ var depModifier = map.get(dep);
1542
+
1543
+ if (depModifier) {
1544
+ sort(depModifier);
1545
+ }
1546
+ }
1547
+ });
1548
+ result.push(modifier);
1549
+ }
1550
+
1551
+ modifiers.forEach(function (modifier) {
1552
+ if (!visited.has(modifier.name)) {
1553
+ // check for visited object
1554
+ sort(modifier);
1555
+ }
1556
+ });
1557
+ return result;
1558
+ }
1559
+
1560
+ function orderModifiers(modifiers) {
1561
+ // order based on dependencies
1562
+ var orderedModifiers = order(modifiers); // order based on phase
1563
+
1564
+ return modifierPhases.reduce(function (acc, phase) {
1565
+ return acc.concat(orderedModifiers.filter(function (modifier) {
1566
+ return modifier.phase === phase;
1567
+ }));
1568
+ }, []);
1569
+ }
1570
+
1571
+ function debounce(fn) {
1572
+ var pending;
1573
+ return function () {
1574
+ if (!pending) {
1575
+ pending = new Promise(function (resolve) {
1576
+ Promise.resolve().then(function () {
1577
+ pending = undefined;
1578
+ resolve(fn());
1579
+ });
1580
+ });
1581
+ }
1582
+
1583
+ return pending;
1584
+ };
1585
+ }
1586
+
1587
+ function mergeByName(modifiers) {
1588
+ var merged = modifiers.reduce(function (merged, current) {
1589
+ var existing = merged[current.name];
1590
+ merged[current.name] = existing ? Object.assign({}, existing, current, {
1591
+ options: Object.assign({}, existing.options, current.options),
1592
+ data: Object.assign({}, existing.data, current.data)
1593
+ }) : current;
1594
+ return merged;
1595
+ }, {}); // IE11 does not support Object.values
1596
+
1597
+ return Object.keys(merged).map(function (key) {
1598
+ return merged[key];
1599
+ });
1600
+ }
1601
+
1602
+ var DEFAULT_OPTIONS = {
1603
+ placement: 'bottom',
1604
+ modifiers: [],
1605
+ strategy: 'absolute'
1606
+ };
1607
+
1608
+ function areValidElements() {
1609
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1610
+ args[_key] = arguments[_key];
1611
+ }
1612
+
1613
+ return !args.some(function (element) {
1614
+ return !(element && typeof element.getBoundingClientRect === 'function');
1615
+ });
1616
+ }
1617
+
1618
+ function popperGenerator(generatorOptions) {
1619
+ if (generatorOptions === void 0) {
1620
+ generatorOptions = {};
1621
+ }
1622
+
1623
+ var _generatorOptions = generatorOptions,
1624
+ _generatorOptions$def = _generatorOptions.defaultModifiers,
1625
+ defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
1626
+ _generatorOptions$def2 = _generatorOptions.defaultOptions,
1627
+ defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
1628
+ return function createPopper(reference, popper, options) {
1629
+ if (options === void 0) {
1630
+ options = defaultOptions;
1631
+ }
1632
+
1633
+ var state = {
1634
+ placement: 'bottom',
1635
+ orderedModifiers: [],
1636
+ options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
1637
+ modifiersData: {},
1638
+ elements: {
1639
+ reference: reference,
1640
+ popper: popper
1641
+ },
1642
+ attributes: {},
1643
+ styles: {}
1644
+ };
1645
+ var effectCleanupFns = [];
1646
+ var isDestroyed = false;
1647
+ var instance = {
1648
+ state: state,
1649
+ setOptions: function setOptions(setOptionsAction) {
1650
+ var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
1651
+ cleanupModifierEffects();
1652
+ state.options = Object.assign({}, defaultOptions, state.options, options);
1653
+ state.scrollParents = {
1654
+ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
1655
+ popper: listScrollParents(popper)
1656
+ }; // Orders the modifiers based on their dependencies and `phase`
1657
+ // properties
1658
+
1659
+ var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
1660
+
1661
+ state.orderedModifiers = orderedModifiers.filter(function (m) {
1662
+ return m.enabled;
1663
+ }); // Validate the provided modifiers so that the consumer will get warned
1664
+
1665
+ runModifierEffects();
1666
+ return instance.update();
1667
+ },
1668
+ // Sync update – it will always be executed, even if not necessary. This
1669
+ // is useful for low frequency updates where sync behavior simplifies the
1670
+ // logic.
1671
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
1672
+ // prefer the async Popper#update method
1673
+ forceUpdate: function forceUpdate() {
1674
+ if (isDestroyed) {
1675
+ return;
1676
+ }
1677
+
1678
+ var _state$elements = state.elements,
1679
+ reference = _state$elements.reference,
1680
+ popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
1681
+ // anymore
1682
+
1683
+ if (!areValidElements(reference, popper)) {
1684
+
1685
+ return;
1686
+ } // Store the reference and popper rects to be read by modifiers
1687
+
1688
+
1689
+ state.rects = {
1690
+ reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
1691
+ popper: getLayoutRect(popper)
1692
+ }; // Modifiers have the ability to reset the current update cycle. The
1693
+ // most common use case for this is the `flip` modifier changing the
1694
+ // placement, which then needs to re-run all the modifiers, because the
1695
+ // logic was previously ran for the previous placement and is therefore
1696
+ // stale/incorrect
1697
+
1698
+ state.reset = false;
1699
+ state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
1700
+ // is filled with the initial data specified by the modifier. This means
1701
+ // it doesn't persist and is fresh on each update.
1702
+ // To ensure persistent data, use `${name}#persistent`
1703
+
1704
+ state.orderedModifiers.forEach(function (modifier) {
1705
+ return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
1706
+ });
1707
+
1708
+ for (var index = 0; index < state.orderedModifiers.length; index++) {
1709
+
1710
+ if (state.reset === true) {
1711
+ state.reset = false;
1712
+ index = -1;
1713
+ continue;
1714
+ }
1715
+
1716
+ var _state$orderedModifie = state.orderedModifiers[index],
1717
+ fn = _state$orderedModifie.fn,
1718
+ _state$orderedModifie2 = _state$orderedModifie.options,
1719
+ _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
1720
+ name = _state$orderedModifie.name;
1721
+
1722
+ if (typeof fn === 'function') {
1723
+ state = fn({
1724
+ state: state,
1725
+ options: _options,
1726
+ name: name,
1727
+ instance: instance
1728
+ }) || state;
1729
+ }
1730
+ }
1731
+ },
1732
+ // Async and optimistically optimized update – it will not be executed if
1733
+ // not necessary (debounced to run at most once-per-tick)
1734
+ update: debounce(function () {
1735
+ return new Promise(function (resolve) {
1736
+ instance.forceUpdate();
1737
+ resolve(state);
1738
+ });
1739
+ }),
1740
+ destroy: function destroy() {
1741
+ cleanupModifierEffects();
1742
+ isDestroyed = true;
1743
+ }
1744
+ };
1745
+
1746
+ if (!areValidElements(reference, popper)) {
1747
+
1748
+ return instance;
1749
+ }
1750
+
1751
+ instance.setOptions(options).then(function (state) {
1752
+ if (!isDestroyed && options.onFirstUpdate) {
1753
+ options.onFirstUpdate(state);
1754
+ }
1755
+ }); // Modifiers have the ability to execute arbitrary code before the first
1756
+ // update cycle runs. They will be executed in the same order as the update
1757
+ // cycle. This is useful when a modifier adds some persistent data that
1758
+ // other modifiers need to use, but the modifier is run after the dependent
1759
+ // one.
1760
+
1761
+ function runModifierEffects() {
1762
+ state.orderedModifiers.forEach(function (_ref3) {
1763
+ var name = _ref3.name,
1764
+ _ref3$options = _ref3.options,
1765
+ options = _ref3$options === void 0 ? {} : _ref3$options,
1766
+ effect = _ref3.effect;
1767
+
1768
+ if (typeof effect === 'function') {
1769
+ var cleanupFn = effect({
1770
+ state: state,
1771
+ name: name,
1772
+ instance: instance,
1773
+ options: options
1774
+ });
1775
+
1776
+ var noopFn = function noopFn() {};
1777
+
1778
+ effectCleanupFns.push(cleanupFn || noopFn);
1779
+ }
1780
+ });
1781
+ }
1782
+
1783
+ function cleanupModifierEffects() {
1784
+ effectCleanupFns.forEach(function (fn) {
1785
+ return fn();
1786
+ });
1787
+ effectCleanupFns = [];
1788
+ }
1789
+
1790
+ return instance;
1791
+ };
1792
+ }
1793
+ var createPopper$2 = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules
1794
+
1795
+ var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];
1796
+ var createPopper$1 = /*#__PURE__*/popperGenerator({
1797
+ defaultModifiers: defaultModifiers$1
1798
+ }); // eslint-disable-next-line import/no-unused-modules
1799
+
1800
+ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
1801
+ var createPopper = /*#__PURE__*/popperGenerator({
1802
+ defaultModifiers: defaultModifiers
1803
+ }); // eslint-disable-next-line import/no-unused-modules
1804
+
1805
+ export { afterMain, afterRead, afterWrite, applyStyles$1 as applyStyles, arrow$1 as arrow, auto, basePlacements, beforeMain, beforeRead, beforeWrite, bottom, clippingParents, computeStyles$1 as computeStyles, createPopper, createPopper$2 as createPopperBase, createPopper$1 as createPopperLite, detectOverflow, end, eventListeners, flip$1 as flip, hide$1 as hide, left, main, modifierPhases, offset$1 as offset, placements, popper, popperGenerator, popperOffsets$1 as popperOffsets, preventOverflow$1 as preventOverflow, read, reference, right, start, top, variationPlacements, viewport, write };