django-handyhelpers 0.3.20__py3-none-any.whl → 0.3.35__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (571) hide show
  1. {django_handyhelpers-0.3.20.dist-info → django_handyhelpers-0.3.35.dist-info}/METADATA +16 -6
  2. {django_handyhelpers-0.3.20.dist-info → django_handyhelpers-0.3.35.dist-info}/RECORD +562 -75
  3. {django_handyhelpers-0.3.20.dist-info → django_handyhelpers-0.3.35.dist-info}/WHEEL +1 -1
  4. handyhelpers/__init__.py +6 -6
  5. handyhelpers/forms.py +9 -1
  6. handyhelpers/mixins/form_mixins.py +61 -0
  7. handyhelpers/mixins/model_mixins.py +21 -0
  8. handyhelpers/mixins/serializer_mixins.py +35 -0
  9. handyhelpers/mixins/view_mixins.py +5 -2
  10. handyhelpers/serializers.py +23 -3
  11. handyhelpers/static/handyhelpers/css/table_sortable.css +17 -0
  12. handyhelpers/static/handyhelpers/js/sidebar.js +8 -4
  13. handyhelpers/static/handyhelpers/js/table_sortable.js +119 -0
  14. handyhelpers/static/node_modules/.bin/acorn +4 -0
  15. handyhelpers/static/node_modules/.bin/css-b64-images +13 -0
  16. handyhelpers/static/node_modules/.bin/esbuild +0 -0
  17. handyhelpers/static/node_modules/.bin/html-minifier-terser +308 -0
  18. handyhelpers/static/node_modules/.bin/minify +98 -0
  19. handyhelpers/static/node_modules/.bin/terser +21 -0
  20. handyhelpers/static/node_modules/.bin/uglifyjs +624 -0
  21. handyhelpers/static/node_modules/.package-lock.json +750 -0
  22. handyhelpers/static/node_modules/@esbuild/linux-x64/README.md +3 -0
  23. handyhelpers/static/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  24. handyhelpers/static/node_modules/@esbuild/linux-x64/package.json +20 -0
  25. handyhelpers/static/node_modules/@jridgewell/gen-mapping/LICENSE +19 -0
  26. handyhelpers/static/node_modules/@jridgewell/gen-mapping/README.md +227 -0
  27. handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs +230 -0
  28. handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map +1 -0
  29. handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js +246 -0
  30. handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map +1 -0
  31. handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts +88 -0
  32. handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +12 -0
  33. handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts +36 -0
  34. handyhelpers/static/node_modules/@jridgewell/gen-mapping/package.json +76 -0
  35. handyhelpers/static/node_modules/@jridgewell/resolve-uri/LICENSE +19 -0
  36. handyhelpers/static/node_modules/@jridgewell/resolve-uri/README.md +40 -0
  37. handyhelpers/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs +232 -0
  38. handyhelpers/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +1 -0
  39. handyhelpers/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js +240 -0
  40. handyhelpers/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +1 -0
  41. handyhelpers/static/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +4 -0
  42. handyhelpers/static/node_modules/@jridgewell/resolve-uri/package.json +69 -0
  43. handyhelpers/static/node_modules/@jridgewell/set-array/LICENSE +19 -0
  44. handyhelpers/static/node_modules/@jridgewell/set-array/README.md +37 -0
  45. handyhelpers/static/node_modules/@jridgewell/set-array/dist/set-array.mjs +69 -0
  46. handyhelpers/static/node_modules/@jridgewell/set-array/dist/set-array.mjs.map +1 -0
  47. handyhelpers/static/node_modules/@jridgewell/set-array/dist/set-array.umd.js +83 -0
  48. handyhelpers/static/node_modules/@jridgewell/set-array/dist/set-array.umd.js.map +1 -0
  49. handyhelpers/static/node_modules/@jridgewell/set-array/dist/types/set-array.d.ts +32 -0
  50. handyhelpers/static/node_modules/@jridgewell/set-array/package.json +65 -0
  51. handyhelpers/static/node_modules/@jridgewell/source-map/LICENSE +19 -0
  52. handyhelpers/static/node_modules/@jridgewell/source-map/README.md +184 -0
  53. handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.cjs +95 -0
  54. handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.cjs.map +1 -0
  55. handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.mjs +90 -0
  56. handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.mjs.map +1 -0
  57. handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.umd.js +1242 -0
  58. handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.umd.js.map +1 -0
  59. handyhelpers/static/node_modules/@jridgewell/source-map/dist/types/source-map.d.ts +35 -0
  60. handyhelpers/static/node_modules/@jridgewell/source-map/package.json +71 -0
  61. handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/LICENSE +21 -0
  62. handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/README.md +264 -0
  63. handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +424 -0
  64. handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -0
  65. handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +439 -0
  66. handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +1 -0
  67. handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts +49 -0
  68. handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts +8 -0
  69. handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts +15 -0
  70. handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts +6 -0
  71. handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/package.json +75 -0
  72. handyhelpers/static/node_modules/@jridgewell/trace-mapping/LICENSE +19 -0
  73. handyhelpers/static/node_modules/@jridgewell/trace-mapping/README.md +257 -0
  74. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +580 -0
  75. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +1 -0
  76. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +600 -0
  77. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +1 -0
  78. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +8 -0
  79. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts +32 -0
  80. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts +7 -0
  81. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +1 -0
  82. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts +2 -0
  83. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +16 -0
  84. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts +4 -0
  85. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +79 -0
  86. handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts +99 -0
  87. handyhelpers/static/node_modules/@jridgewell/trace-mapping/package.json +77 -0
  88. handyhelpers/static/node_modules/@popperjs/core/dist/cjs/enums.js +1 -1
  89. handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper-base.js +12 -170
  90. handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper-base.js.map +1 -1
  91. handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper-lite.js +14 -184
  92. handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper-lite.js.map +1 -1
  93. handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper.js +14 -197
  94. handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper.js.map +1 -1
  95. handyhelpers/static/node_modules/@popperjs/core/dist/esm/createPopper.js +6 -66
  96. handyhelpers/static/node_modules/@popperjs/core/dist/esm/modifiers/arrow.js +1 -12
  97. handyhelpers/static/node_modules/@popperjs/core/dist/esm/modifiers/computeStyles.js +2 -14
  98. handyhelpers/static/node_modules/@popperjs/core/dist/esm/utils/computeAutoPlacement.js +0 -4
  99. handyhelpers/static/node_modules/@popperjs/core/dist/esm/utils/userAgent.js +1 -1
  100. handyhelpers/static/node_modules/@popperjs/core/dist/umd/enums.js +1 -1
  101. handyhelpers/static/node_modules/@popperjs/core/dist/umd/enums.min.js +1 -1
  102. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-base.js +12 -170
  103. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-base.js.map +1 -1
  104. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-base.min.js +2 -2
  105. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-base.min.js.map +1 -1
  106. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-lite.js +14 -184
  107. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-lite.js.map +1 -1
  108. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-lite.min.js +2 -2
  109. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-lite.min.js.map +1 -1
  110. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper.js +14 -197
  111. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper.js.map +1 -1
  112. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper.min.js +2 -2
  113. handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper.min.js.map +1 -1
  114. handyhelpers/static/node_modules/@popperjs/core/lib/createPopper.js +6 -66
  115. handyhelpers/static/node_modules/@popperjs/core/lib/createPopper.js.flow +2 -80
  116. handyhelpers/static/node_modules/@popperjs/core/lib/modifiers/arrow.js +1 -12
  117. handyhelpers/static/node_modules/@popperjs/core/lib/modifiers/arrow.js.flow +0 -22
  118. handyhelpers/static/node_modules/@popperjs/core/lib/modifiers/computeStyles.js +2 -14
  119. handyhelpers/static/node_modules/@popperjs/core/lib/modifiers/computeStyles.js.flow +3 -33
  120. handyhelpers/static/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +0 -4
  121. handyhelpers/static/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js.flow +0 -12
  122. handyhelpers/static/node_modules/@popperjs/core/lib/utils/userAgent.js +1 -1
  123. handyhelpers/static/node_modules/@popperjs/core/lib/utils/userAgent.js.flow +1 -1
  124. handyhelpers/static/node_modules/@popperjs/core/package.json +1 -1
  125. handyhelpers/static/node_modules/@putout/minify/LICENSE +21 -0
  126. handyhelpers/static/node_modules/@putout/minify/README.md +110 -0
  127. handyhelpers/static/node_modules/@putout/minify/bundle/minify.min.js +52 -0
  128. handyhelpers/static/node_modules/@putout/minify/package.json +112 -0
  129. handyhelpers/static/node_modules/@swc/core/Visitor.d.ts +218 -0
  130. handyhelpers/static/node_modules/@swc/core/Visitor.js +1407 -0
  131. handyhelpers/static/node_modules/@swc/core/binding.d.ts +56 -0
  132. handyhelpers/static/node_modules/@swc/core/binding.js +351 -0
  133. handyhelpers/static/node_modules/@swc/core/index.d.ts +118 -0
  134. handyhelpers/static/node_modules/@swc/core/index.js +439 -0
  135. handyhelpers/static/node_modules/@swc/core/package.json +114 -0
  136. handyhelpers/static/node_modules/@swc/core/postinstall.js +148 -0
  137. handyhelpers/static/node_modules/@swc/core/spack.d.ts +51 -0
  138. handyhelpers/static/node_modules/@swc/core/spack.js +87 -0
  139. handyhelpers/static/node_modules/@swc/core/util.d.ts +1 -0
  140. handyhelpers/static/node_modules/@swc/core/util.js +104 -0
  141. handyhelpers/static/node_modules/@swc/core-linux-x64-gnu/README.md +3 -0
  142. handyhelpers/static/node_modules/@swc/core-linux-x64-gnu/package.json +45 -0
  143. handyhelpers/static/node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node +0 -0
  144. handyhelpers/static/node_modules/@swc/counter/CHANGELOG.md +7 -0
  145. handyhelpers/static/node_modules/@swc/counter/README.md +7 -0
  146. handyhelpers/static/node_modules/@swc/counter/index.js +1 -0
  147. handyhelpers/static/node_modules/@swc/counter/package.json +27 -0
  148. handyhelpers/static/node_modules/@swc/types/LICENSE +201 -0
  149. handyhelpers/static/node_modules/@swc/types/README.md +4 -0
  150. handyhelpers/static/node_modules/@swc/types/assumptions.d.ts +92 -0
  151. handyhelpers/static/node_modules/@swc/types/assumptions.js +2 -0
  152. handyhelpers/static/node_modules/@swc/types/index.d.ts +1977 -0
  153. handyhelpers/static/node_modules/@swc/types/index.js +2 -0
  154. handyhelpers/static/node_modules/@swc/types/package.json +39 -0
  155. handyhelpers/static/node_modules/acorn/CHANGELOG.md +928 -0
  156. handyhelpers/static/node_modules/acorn/LICENSE +21 -0
  157. handyhelpers/static/node_modules/acorn/README.md +282 -0
  158. handyhelpers/static/node_modules/acorn/bin/acorn +4 -0
  159. handyhelpers/static/node_modules/acorn/dist/acorn.d.mts +866 -0
  160. handyhelpers/static/node_modules/acorn/dist/acorn.d.ts +866 -0
  161. handyhelpers/static/node_modules/acorn/dist/acorn.js +6174 -0
  162. handyhelpers/static/node_modules/acorn/dist/acorn.mjs +6145 -0
  163. handyhelpers/static/node_modules/acorn/dist/bin.js +90 -0
  164. handyhelpers/static/node_modules/acorn/package.json +50 -0
  165. handyhelpers/static/node_modules/buffer-from/LICENSE +21 -0
  166. handyhelpers/static/node_modules/buffer-from/index.js +72 -0
  167. handyhelpers/static/node_modules/buffer-from/package.json +19 -0
  168. handyhelpers/static/node_modules/buffer-from/readme.md +69 -0
  169. handyhelpers/static/node_modules/camel-case/LICENSE +21 -0
  170. handyhelpers/static/node_modules/camel-case/README.md +47 -0
  171. handyhelpers/static/node_modules/camel-case/dist/index.d.ts +5 -0
  172. handyhelpers/static/node_modules/camel-case/dist/index.js +23 -0
  173. handyhelpers/static/node_modules/camel-case/dist/index.js.map +1 -0
  174. handyhelpers/static/node_modules/camel-case/dist/index.spec.d.ts +1 -0
  175. handyhelpers/static/node_modules/camel-case/dist/index.spec.js +26 -0
  176. handyhelpers/static/node_modules/camel-case/dist/index.spec.js.map +1 -0
  177. handyhelpers/static/node_modules/camel-case/dist.es2015/index.d.ts +5 -0
  178. handyhelpers/static/node_modules/camel-case/dist.es2015/index.js +17 -0
  179. handyhelpers/static/node_modules/camel-case/dist.es2015/index.js.map +1 -0
  180. handyhelpers/static/node_modules/camel-case/dist.es2015/index.spec.d.ts +1 -0
  181. handyhelpers/static/node_modules/camel-case/dist.es2015/index.spec.js +24 -0
  182. handyhelpers/static/node_modules/camel-case/dist.es2015/index.spec.js.map +1 -0
  183. handyhelpers/static/node_modules/camel-case/package.json +89 -0
  184. handyhelpers/static/node_modules/clean-css/History.md +1504 -0
  185. handyhelpers/static/node_modules/clean-css/LICENSE +19 -0
  186. handyhelpers/static/node_modules/clean-css/README.md +987 -0
  187. handyhelpers/static/node_modules/clean-css/index.js +1 -0
  188. handyhelpers/static/node_modules/clean-css/package.json +48 -0
  189. handyhelpers/static/node_modules/commander/LICENSE +22 -0
  190. handyhelpers/static/node_modules/commander/Readme.md +1134 -0
  191. handyhelpers/static/node_modules/commander/esm.mjs +16 -0
  192. handyhelpers/static/node_modules/commander/index.js +27 -0
  193. handyhelpers/static/node_modules/commander/package-support.json +16 -0
  194. handyhelpers/static/node_modules/commander/package.json +80 -0
  195. handyhelpers/static/node_modules/commander/typings/index.d.ts +889 -0
  196. handyhelpers/static/node_modules/css-b64-images/.npmignore +15 -0
  197. handyhelpers/static/node_modules/css-b64-images/.travis.yml +5 -0
  198. handyhelpers/static/node_modules/css-b64-images/README.md +78 -0
  199. handyhelpers/static/node_modules/css-b64-images/bin/css-b64-images +13 -0
  200. handyhelpers/static/node_modules/css-b64-images/draft.png +0 -0
  201. handyhelpers/static/node_modules/css-b64-images/draft.xcf +0 -0
  202. handyhelpers/static/node_modules/css-b64-images/package.json +30 -0
  203. handyhelpers/static/node_modules/css-b64-images/test/css-b64-images-test.js +38 -0
  204. handyhelpers/static/node_modules/css-b64-images/test/fixture/css/style.css +52 -0
  205. handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/callunasansregular-webfont.eot +0 -0
  206. handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/callunasansregular-webfont.svg +248 -0
  207. handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/callunasansregular-webfont.ttf +0 -0
  208. handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/callunasansregular-webfont.woff +0 -0
  209. handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/maven_pro_medium-webfont.eot +0 -0
  210. handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/maven_pro_medium-webfont.svg +245 -0
  211. handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/maven_pro_medium-webfont.ttf +0 -0
  212. handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/maven_pro_medium-webfont.woff +0 -0
  213. handyhelpers/static/node_modules/css-b64-images/test/fixture/img/background-pattern.gif +0 -0
  214. handyhelpers/static/node_modules/css-b64-images/test/fixture/img/dots.svg +6 -0
  215. handyhelpers/static/node_modules/css-b64-images/test/fixture/img/mixit-banner.png +0 -0
  216. handyhelpers/static/node_modules/debug/LICENSE +20 -0
  217. handyhelpers/static/node_modules/debug/README.md +481 -0
  218. handyhelpers/static/node_modules/debug/package.json +65 -0
  219. handyhelpers/static/node_modules/debug/src/browser.js +272 -0
  220. handyhelpers/static/node_modules/debug/src/common.js +292 -0
  221. handyhelpers/static/node_modules/debug/src/index.js +10 -0
  222. handyhelpers/static/node_modules/debug/src/node.js +263 -0
  223. handyhelpers/static/node_modules/dot-case/LICENSE +21 -0
  224. handyhelpers/static/node_modules/dot-case/README.md +37 -0
  225. handyhelpers/static/node_modules/dot-case/dist/index.d.ts +3 -0
  226. handyhelpers/static/node_modules/dot-case/dist/index.js +11 -0
  227. handyhelpers/static/node_modules/dot-case/dist/index.js.map +1 -0
  228. handyhelpers/static/node_modules/dot-case/dist/index.spec.d.ts +1 -0
  229. handyhelpers/static/node_modules/dot-case/dist/index.spec.js +26 -0
  230. handyhelpers/static/node_modules/dot-case/dist/index.spec.js.map +1 -0
  231. handyhelpers/static/node_modules/dot-case/dist.es2015/index.d.ts +3 -0
  232. handyhelpers/static/node_modules/dot-case/dist.es2015/index.js +7 -0
  233. handyhelpers/static/node_modules/dot-case/dist.es2015/index.js.map +1 -0
  234. handyhelpers/static/node_modules/dot-case/dist.es2015/index.spec.d.ts +1 -0
  235. handyhelpers/static/node_modules/dot-case/dist.es2015/index.spec.js +24 -0
  236. handyhelpers/static/node_modules/dot-case/dist.es2015/index.spec.js.map +1 -0
  237. handyhelpers/static/node_modules/dot-case/package.json +89 -0
  238. handyhelpers/static/node_modules/entities/LICENSE +11 -0
  239. handyhelpers/static/node_modules/entities/package.json +90 -0
  240. handyhelpers/static/node_modules/entities/readme.md +122 -0
  241. handyhelpers/static/node_modules/esbuild/LICENSE.md +21 -0
  242. handyhelpers/static/node_modules/esbuild/README.md +3 -0
  243. handyhelpers/static/node_modules/esbuild/bin/esbuild +0 -0
  244. handyhelpers/static/node_modules/esbuild/install.js +286 -0
  245. handyhelpers/static/node_modules/esbuild/package.json +47 -0
  246. handyhelpers/static/node_modules/find-up/index.d.ts +247 -0
  247. handyhelpers/static/node_modules/find-up/index.js +107 -0
  248. handyhelpers/static/node_modules/find-up/license +9 -0
  249. handyhelpers/static/node_modules/find-up/package.json +61 -0
  250. handyhelpers/static/node_modules/find-up/readme.md +160 -0
  251. handyhelpers/static/node_modules/fun-effects/LICENSE +674 -0
  252. handyhelpers/static/node_modules/fun-effects/README.md +10 -0
  253. handyhelpers/static/node_modules/fun-effects/dist/css/background_icons.min.css +1 -0
  254. handyhelpers/static/node_modules/fun-effects/dist/css/blur_group.min.css +1 -0
  255. handyhelpers/static/node_modules/fun-effects/dist/css/fades.min.css +1 -0
  256. handyhelpers/static/node_modules/fun-effects/dist/css/marquee.min.css +1 -0
  257. handyhelpers/static/node_modules/fun-effects/dist/css/scroller.min.css +1 -0
  258. handyhelpers/static/node_modules/fun-effects/dist/index.js +15 -0
  259. handyhelpers/static/node_modules/fun-effects/dist/js/background_icons.min.js +1 -0
  260. handyhelpers/static/node_modules/fun-effects/dist/js/marquee.min.js +1 -0
  261. handyhelpers/static/node_modules/fun-effects/dist/js/scroller.min.js +1 -0
  262. handyhelpers/static/node_modules/fun-effects/package.json +39 -0
  263. handyhelpers/static/node_modules/fun-effects/src/css/background_icons.css +39 -0
  264. handyhelpers/static/node_modules/fun-effects/src/css/blur_group.css +22 -0
  265. handyhelpers/static/node_modules/fun-effects/src/css/fades.css +94 -0
  266. handyhelpers/static/node_modules/fun-effects/src/css/marquee.css +45 -0
  267. handyhelpers/static/node_modules/fun-effects/src/css/scroller.css +144 -0
  268. handyhelpers/static/node_modules/fun-effects/src/index.js +15 -0
  269. handyhelpers/static/node_modules/fun-effects/src/js/background_icons.js +101 -0
  270. handyhelpers/static/node_modules/fun-effects/src/js/marquee.js +81 -0
  271. handyhelpers/static/node_modules/fun-effects/src/js/scroller.js +37 -0
  272. handyhelpers/static/node_modules/html-minifier-terser/LICENSE +22 -0
  273. handyhelpers/static/node_modules/html-minifier-terser/README.md +168 -0
  274. handyhelpers/static/node_modules/html-minifier-terser/cli.js +308 -0
  275. handyhelpers/static/node_modules/html-minifier-terser/dist/htmlminifier.cjs +1857 -0
  276. handyhelpers/static/node_modules/html-minifier-terser/dist/htmlminifier.esm.bundle.js +57509 -0
  277. handyhelpers/static/node_modules/html-minifier-terser/dist/htmlminifier.umd.bundle.js +57520 -0
  278. handyhelpers/static/node_modules/html-minifier-terser/dist/htmlminifier.umd.bundle.min.js +9 -0
  279. handyhelpers/static/node_modules/html-minifier-terser/package.json +105 -0
  280. handyhelpers/static/node_modules/html-minifier-terser/src/htmlminifier.js +1366 -0
  281. handyhelpers/static/node_modules/html-minifier-terser/src/htmlparser.js +565 -0
  282. handyhelpers/static/node_modules/html-minifier-terser/src/tokenchain.js +68 -0
  283. handyhelpers/static/node_modules/html-minifier-terser/src/utils.js +11 -0
  284. handyhelpers/static/node_modules/jju/LICENSE +21 -0
  285. handyhelpers/static/node_modules/jju/Makefile +20 -0
  286. handyhelpers/static/node_modules/jju/README.md +249 -0
  287. handyhelpers/static/node_modules/jju/index.js +32 -0
  288. handyhelpers/static/node_modules/jju/package.json +34 -0
  289. handyhelpers/static/node_modules/jju/package.yaml +36 -0
  290. handyhelpers/static/node_modules/locate-path/index.d.ts +92 -0
  291. handyhelpers/static/node_modules/locate-path/index.js +77 -0
  292. handyhelpers/static/node_modules/locate-path/license +9 -0
  293. handyhelpers/static/node_modules/locate-path/package.json +48 -0
  294. handyhelpers/static/node_modules/locate-path/readme.md +123 -0
  295. handyhelpers/static/node_modules/lower-case/LICENSE +21 -0
  296. handyhelpers/static/node_modules/lower-case/README.md +35 -0
  297. handyhelpers/static/node_modules/lower-case/dist/index.d.ts +8 -0
  298. handyhelpers/static/node_modules/lower-case/dist/index.js +53 -0
  299. handyhelpers/static/node_modules/lower-case/dist/index.js.map +1 -0
  300. handyhelpers/static/node_modules/lower-case/dist/index.spec.d.ts +1 -0
  301. handyhelpers/static/node_modules/lower-case/dist/index.spec.js +36 -0
  302. handyhelpers/static/node_modules/lower-case/dist/index.spec.js.map +1 -0
  303. handyhelpers/static/node_modules/lower-case/dist.es2015/index.d.ts +8 -0
  304. handyhelpers/static/node_modules/lower-case/dist.es2015/index.js +48 -0
  305. handyhelpers/static/node_modules/lower-case/dist.es2015/index.js.map +1 -0
  306. handyhelpers/static/node_modules/lower-case/dist.es2015/index.spec.d.ts +1 -0
  307. handyhelpers/static/node_modules/lower-case/dist.es2015/index.spec.js +34 -0
  308. handyhelpers/static/node_modules/lower-case/dist.es2015/index.spec.js.map +1 -0
  309. handyhelpers/static/node_modules/lower-case/package.json +87 -0
  310. handyhelpers/static/node_modules/minify/ChangeLog +1307 -0
  311. handyhelpers/static/node_modules/minify/LICENSE +22 -0
  312. handyhelpers/static/node_modules/minify/README.md +177 -0
  313. handyhelpers/static/node_modules/minify/bin/minify.js +98 -0
  314. handyhelpers/static/node_modules/minify/deno.json +5 -0
  315. handyhelpers/static/node_modules/minify/help.json +8 -0
  316. handyhelpers/static/node_modules/minify/package.json +65 -0
  317. handyhelpers/static/node_modules/ms/index.js +162 -0
  318. handyhelpers/static/node_modules/ms/license.md +21 -0
  319. handyhelpers/static/node_modules/ms/package.json +38 -0
  320. handyhelpers/static/node_modules/ms/readme.md +59 -0
  321. handyhelpers/static/node_modules/no-case/LICENSE +21 -0
  322. handyhelpers/static/node_modules/no-case/README.md +37 -0
  323. handyhelpers/static/node_modules/no-case/dist/index.d.ts +10 -0
  324. handyhelpers/static/node_modules/no-case/dist/index.js +35 -0
  325. handyhelpers/static/node_modules/no-case/dist/index.js.map +1 -0
  326. handyhelpers/static/node_modules/no-case/dist/index.spec.d.ts +1 -0
  327. handyhelpers/static/node_modules/no-case/dist/index.spec.js +59 -0
  328. handyhelpers/static/node_modules/no-case/dist/index.spec.js.map +1 -0
  329. handyhelpers/static/node_modules/no-case/dist.es2015/index.d.ts +10 -0
  330. handyhelpers/static/node_modules/no-case/dist.es2015/index.js +31 -0
  331. handyhelpers/static/node_modules/no-case/dist.es2015/index.js.map +1 -0
  332. handyhelpers/static/node_modules/no-case/dist.es2015/index.spec.d.ts +1 -0
  333. handyhelpers/static/node_modules/no-case/dist.es2015/index.spec.js +57 -0
  334. handyhelpers/static/node_modules/no-case/dist.es2015/index.spec.js.map +1 -0
  335. handyhelpers/static/node_modules/no-case/package.json +85 -0
  336. handyhelpers/static/node_modules/p-limit/index.d.ts +40 -0
  337. handyhelpers/static/node_modules/p-limit/index.js +68 -0
  338. handyhelpers/static/node_modules/p-limit/license +9 -0
  339. handyhelpers/static/node_modules/p-limit/package.json +54 -0
  340. handyhelpers/static/node_modules/p-limit/readme.md +99 -0
  341. handyhelpers/static/node_modules/p-locate/index.d.ts +49 -0
  342. handyhelpers/static/node_modules/p-locate/index.js +48 -0
  343. handyhelpers/static/node_modules/p-locate/license +9 -0
  344. handyhelpers/static/node_modules/p-locate/package.json +56 -0
  345. handyhelpers/static/node_modules/p-locate/readme.md +91 -0
  346. handyhelpers/static/node_modules/param-case/LICENSE +21 -0
  347. handyhelpers/static/node_modules/param-case/README.md +37 -0
  348. handyhelpers/static/node_modules/param-case/dist/index.d.ts +3 -0
  349. handyhelpers/static/node_modules/param-case/dist/index.js +11 -0
  350. handyhelpers/static/node_modules/param-case/dist/index.js.map +1 -0
  351. handyhelpers/static/node_modules/param-case/dist/index.spec.d.ts +1 -0
  352. handyhelpers/static/node_modules/param-case/dist/index.spec.js +24 -0
  353. handyhelpers/static/node_modules/param-case/dist/index.spec.js.map +1 -0
  354. handyhelpers/static/node_modules/param-case/dist.es2015/index.d.ts +3 -0
  355. handyhelpers/static/node_modules/param-case/dist.es2015/index.js +7 -0
  356. handyhelpers/static/node_modules/param-case/dist.es2015/index.js.map +1 -0
  357. handyhelpers/static/node_modules/param-case/dist.es2015/index.spec.d.ts +1 -0
  358. handyhelpers/static/node_modules/param-case/dist.es2015/index.spec.js +22 -0
  359. handyhelpers/static/node_modules/param-case/dist.es2015/index.spec.js.map +1 -0
  360. handyhelpers/static/node_modules/param-case/package.json +91 -0
  361. handyhelpers/static/node_modules/pascal-case/LICENSE +21 -0
  362. handyhelpers/static/node_modules/pascal-case/README.md +47 -0
  363. handyhelpers/static/node_modules/pascal-case/dist/index.d.ts +5 -0
  364. handyhelpers/static/node_modules/pascal-case/dist/index.js +24 -0
  365. handyhelpers/static/node_modules/pascal-case/dist/index.js.map +1 -0
  366. handyhelpers/static/node_modules/pascal-case/dist/index.spec.d.ts +1 -0
  367. handyhelpers/static/node_modules/pascal-case/dist/index.spec.js +25 -0
  368. handyhelpers/static/node_modules/pascal-case/dist/index.spec.js.map +1 -0
  369. handyhelpers/static/node_modules/pascal-case/dist.es2015/index.d.ts +5 -0
  370. handyhelpers/static/node_modules/pascal-case/dist.es2015/index.js +18 -0
  371. handyhelpers/static/node_modules/pascal-case/dist.es2015/index.js.map +1 -0
  372. handyhelpers/static/node_modules/pascal-case/dist.es2015/index.spec.d.ts +1 -0
  373. handyhelpers/static/node_modules/pascal-case/dist.es2015/index.spec.js +23 -0
  374. handyhelpers/static/node_modules/pascal-case/dist.es2015/index.spec.js.map +1 -0
  375. handyhelpers/static/node_modules/pascal-case/package.json +90 -0
  376. handyhelpers/static/node_modules/path-exists/index.d.ts +31 -0
  377. handyhelpers/static/node_modules/path-exists/index.js +19 -0
  378. handyhelpers/static/node_modules/path-exists/license +9 -0
  379. handyhelpers/static/node_modules/path-exists/package.json +41 -0
  380. handyhelpers/static/node_modules/path-exists/readme.md +52 -0
  381. handyhelpers/static/node_modules/readjson/ChangeLog +110 -0
  382. handyhelpers/static/node_modules/readjson/LICENSE +21 -0
  383. handyhelpers/static/node_modules/readjson/README.md +36 -0
  384. handyhelpers/static/node_modules/readjson/package.json +46 -0
  385. handyhelpers/static/node_modules/relateurl/README.md +159 -0
  386. handyhelpers/static/node_modules/relateurl/license +21 -0
  387. handyhelpers/static/node_modules/relateurl/package.json +46 -0
  388. handyhelpers/static/node_modules/simport/ChangeLog +77 -0
  389. handyhelpers/static/node_modules/simport/LICENSE +21 -0
  390. handyhelpers/static/node_modules/simport/README.md +81 -0
  391. handyhelpers/static/node_modules/simport/fixture/context.js +3 -0
  392. handyhelpers/static/node_modules/simport/fixture/default-frozen-function.mjs +2 -0
  393. handyhelpers/static/node_modules/simport/fixture/default-frozen-object.mjs +2 -0
  394. handyhelpers/static/node_modules/simport/package.json +65 -0
  395. handyhelpers/static/node_modules/simport/simport.js +84 -0
  396. handyhelpers/static/node_modules/simport/simport.mjs +22 -0
  397. handyhelpers/static/node_modules/source-map/CHANGELOG.md +301 -0
  398. handyhelpers/static/node_modules/source-map/LICENSE +28 -0
  399. handyhelpers/static/node_modules/source-map/README.md +742 -0
  400. handyhelpers/static/node_modules/source-map/dist/source-map.debug.js +3234 -0
  401. handyhelpers/static/node_modules/source-map/dist/source-map.js +3233 -0
  402. handyhelpers/static/node_modules/source-map/dist/source-map.min.js +2 -0
  403. handyhelpers/static/node_modules/source-map/dist/source-map.min.js.map +1 -0
  404. handyhelpers/static/node_modules/source-map/package.json +73 -0
  405. handyhelpers/static/node_modules/source-map/source-map.d.ts +98 -0
  406. handyhelpers/static/node_modules/source-map/source-map.js +8 -0
  407. handyhelpers/static/node_modules/source-map-support/LICENSE.md +21 -0
  408. handyhelpers/static/node_modules/source-map-support/README.md +284 -0
  409. handyhelpers/static/node_modules/source-map-support/browser-source-map-support.js +114 -0
  410. handyhelpers/static/node_modules/source-map-support/package.json +31 -0
  411. handyhelpers/static/node_modules/source-map-support/register-hook-require.js +1 -0
  412. handyhelpers/static/node_modules/source-map-support/register.js +1 -0
  413. handyhelpers/static/node_modules/source-map-support/source-map-support.js +625 -0
  414. handyhelpers/static/node_modules/terser/CHANGELOG.md +783 -0
  415. handyhelpers/static/node_modules/terser/LICENSE +27 -0
  416. handyhelpers/static/node_modules/terser/PATRONS.md +15 -0
  417. handyhelpers/static/node_modules/terser/README.md +1421 -0
  418. handyhelpers/static/node_modules/terser/bin/package.json +10 -0
  419. handyhelpers/static/node_modules/terser/bin/terser +21 -0
  420. handyhelpers/static/node_modules/terser/bin/uglifyjs +10 -0
  421. handyhelpers/static/node_modules/terser/dist/.gitkeep +0 -0
  422. handyhelpers/static/node_modules/terser/dist/bundle.min.js +32962 -0
  423. handyhelpers/static/node_modules/terser/dist/package.json +10 -0
  424. handyhelpers/static/node_modules/terser/main.js +27 -0
  425. handyhelpers/static/node_modules/terser/node_modules/commander/CHANGELOG.md +419 -0
  426. handyhelpers/static/node_modules/terser/node_modules/commander/LICENSE +22 -0
  427. handyhelpers/static/node_modules/terser/node_modules/commander/Readme.md +428 -0
  428. handyhelpers/static/node_modules/terser/node_modules/commander/index.js +1224 -0
  429. handyhelpers/static/node_modules/terser/node_modules/commander/package.json +38 -0
  430. handyhelpers/static/node_modules/terser/node_modules/commander/typings/index.d.ts +310 -0
  431. handyhelpers/static/node_modules/terser/package.json +153 -0
  432. handyhelpers/static/node_modules/terser/tools/domprops.js +9026 -0
  433. handyhelpers/static/node_modules/terser/tools/exit.cjs +7 -0
  434. handyhelpers/static/node_modules/terser/tools/props.html +68 -0
  435. handyhelpers/static/node_modules/terser/tools/terser.d.ts +216 -0
  436. handyhelpers/static/node_modules/tippy.js/LICENSE +21 -0
  437. handyhelpers/static/node_modules/tippy.js/README.md +63 -0
  438. handyhelpers/static/node_modules/tippy.js/animations/perspective-extreme.css +1 -0
  439. handyhelpers/static/node_modules/tippy.js/animations/perspective-subtle.css +1 -0
  440. handyhelpers/static/node_modules/tippy.js/animations/perspective.css +1 -0
  441. handyhelpers/static/node_modules/tippy.js/animations/scale-extreme.css +1 -0
  442. handyhelpers/static/node_modules/tippy.js/animations/scale-subtle.css +1 -0
  443. handyhelpers/static/node_modules/tippy.js/animations/scale.css +1 -0
  444. handyhelpers/static/node_modules/tippy.js/animations/shift-away-extreme.css +1 -0
  445. handyhelpers/static/node_modules/tippy.js/animations/shift-away-subtle.css +1 -0
  446. handyhelpers/static/node_modules/tippy.js/animations/shift-away.css +1 -0
  447. handyhelpers/static/node_modules/tippy.js/animations/shift-toward-extreme.css +1 -0
  448. handyhelpers/static/node_modules/tippy.js/animations/shift-toward-subtle.css +1 -0
  449. handyhelpers/static/node_modules/tippy.js/animations/shift-toward.css +1 -0
  450. handyhelpers/static/node_modules/tippy.js/dist/backdrop.css +1 -0
  451. handyhelpers/static/node_modules/tippy.js/dist/border.css +1 -0
  452. handyhelpers/static/node_modules/tippy.js/dist/svg-arrow.css +1 -0
  453. handyhelpers/static/node_modules/tippy.js/dist/tippy-bundle.umd.js +2516 -0
  454. handyhelpers/static/node_modules/tippy.js/dist/tippy-bundle.umd.js.map +1 -0
  455. handyhelpers/static/node_modules/tippy.js/dist/tippy-bundle.umd.min.js +2 -0
  456. handyhelpers/static/node_modules/tippy.js/dist/tippy-bundle.umd.min.js.map +1 -0
  457. handyhelpers/static/node_modules/tippy.js/dist/tippy.cjs.js +2497 -0
  458. handyhelpers/static/node_modules/tippy.js/dist/tippy.cjs.js.map +1 -0
  459. handyhelpers/static/node_modules/tippy.js/dist/tippy.css +1 -0
  460. handyhelpers/static/node_modules/tippy.js/dist/tippy.esm.js +2486 -0
  461. handyhelpers/static/node_modules/tippy.js/dist/tippy.esm.js.map +1 -0
  462. handyhelpers/static/node_modules/tippy.js/dist/tippy.umd.js +2496 -0
  463. handyhelpers/static/node_modules/tippy.js/dist/tippy.umd.js.map +1 -0
  464. handyhelpers/static/node_modules/tippy.js/dist/tippy.umd.min.js +2 -0
  465. handyhelpers/static/node_modules/tippy.js/dist/tippy.umd.min.js.map +1 -0
  466. handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.cjs.js +2388 -0
  467. handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.cjs.js.map +1 -0
  468. handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.esm.js +2377 -0
  469. handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.esm.js.map +1 -0
  470. handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.umd.js +2382 -0
  471. handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.umd.js.map +1 -0
  472. handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.umd.min.js +2 -0
  473. handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.umd.min.js.map +1 -0
  474. handyhelpers/static/node_modules/tippy.js/headless/package.json +16 -0
  475. handyhelpers/static/node_modules/tippy.js/index.d.ts +260 -0
  476. handyhelpers/static/node_modules/tippy.js/package.json +157 -0
  477. handyhelpers/static/node_modules/tippy.js/themes/light-border.css +1 -0
  478. handyhelpers/static/node_modules/tippy.js/themes/light.css +1 -0
  479. handyhelpers/static/node_modules/tippy.js/themes/material.css +1 -0
  480. handyhelpers/static/node_modules/tippy.js/themes/translucent.css +1 -0
  481. handyhelpers/static/node_modules/try-catch/ChangeLog +55 -0
  482. handyhelpers/static/node_modules/try-catch/LICENSE +21 -0
  483. handyhelpers/static/node_modules/try-catch/README.md +38 -0
  484. handyhelpers/static/node_modules/try-catch/package.json +34 -0
  485. handyhelpers/static/node_modules/try-to-catch/ChangeLog +64 -0
  486. handyhelpers/static/node_modules/try-to-catch/LICENSE +21 -0
  487. handyhelpers/static/node_modules/try-to-catch/README.md +74 -0
  488. handyhelpers/static/node_modules/try-to-catch/package.json +47 -0
  489. handyhelpers/static/node_modules/tslib/CopyrightNotice.txt +15 -0
  490. handyhelpers/static/node_modules/tslib/LICENSE.txt +12 -0
  491. handyhelpers/static/node_modules/tslib/README.md +164 -0
  492. handyhelpers/static/node_modules/tslib/SECURITY.md +41 -0
  493. handyhelpers/static/node_modules/tslib/modules/index.d.ts +38 -0
  494. handyhelpers/static/node_modules/tslib/modules/index.js +70 -0
  495. handyhelpers/static/node_modules/tslib/modules/package.json +3 -0
  496. handyhelpers/static/node_modules/tslib/package.json +47 -0
  497. handyhelpers/static/node_modules/tslib/tslib.d.ts +460 -0
  498. handyhelpers/static/node_modules/tslib/tslib.es6.html +1 -0
  499. handyhelpers/static/node_modules/tslib/tslib.es6.js +402 -0
  500. handyhelpers/static/node_modules/tslib/tslib.es6.mjs +401 -0
  501. handyhelpers/static/node_modules/tslib/tslib.html +1 -0
  502. handyhelpers/static/node_modules/tslib/tslib.js +484 -0
  503. handyhelpers/static/node_modules/uglify-js/LICENSE +29 -0
  504. handyhelpers/static/node_modules/uglify-js/README.md +1479 -0
  505. handyhelpers/static/node_modules/uglify-js/bin/uglifyjs +624 -0
  506. handyhelpers/static/node_modules/uglify-js/package.json +56 -0
  507. handyhelpers/static/node_modules/uglify-js/tools/domprops.html +456 -0
  508. handyhelpers/static/node_modules/uglify-js/tools/domprops.json +8327 -0
  509. handyhelpers/static/node_modules/uglify-js/tools/exports.js +8 -0
  510. handyhelpers/static/node_modules/uglify-js/tools/node.js +115 -0
  511. handyhelpers/static/node_modules/uglify-js/tools/tty.js +22 -0
  512. handyhelpers/static/node_modules/unicorn-magic/default.js +14 -0
  513. handyhelpers/static/node_modules/unicorn-magic/index.d.ts +29 -0
  514. handyhelpers/static/node_modules/unicorn-magic/license +9 -0
  515. handyhelpers/static/node_modules/unicorn-magic/node.js +7 -0
  516. handyhelpers/static/node_modules/unicorn-magic/package.json +49 -0
  517. handyhelpers/static/node_modules/unicorn-magic/readme.md +25 -0
  518. handyhelpers/static/node_modules/yocto-queue/index.d.ts +61 -0
  519. handyhelpers/static/node_modules/yocto-queue/index.js +78 -0
  520. handyhelpers/static/node_modules/yocto-queue/license +9 -0
  521. handyhelpers/static/node_modules/yocto-queue/package.json +48 -0
  522. handyhelpers/static/node_modules/yocto-queue/readme.md +70 -0
  523. handyhelpers/static/package.json +3 -1
  524. handyhelpers/static/yarn.lock +393 -20
  525. handyhelpers/templates/handyhelpers/generic/bs5/generic_index.html +5 -8
  526. handyhelpers/templates/handyhelpers/handyhelpers_base_bs5.htm +5 -1
  527. handyhelpers/templates/handyhelpers/handyhelpers_with_sidebar.htm +50 -3
  528. handyhelpers/templates/handyhelpers/htmx/bs5/filter_form/generic_modal_swap.htm +48 -0
  529. handyhelpers/templates/handyhelpers/htmx/bs5/form/form_wrapper.htm +48 -0
  530. handyhelpers/templates/handyhelpers/htmx/bs5/form/inline_form.htm +166 -0
  531. handyhelpers/templates/handyhelpers/htmx/bs5/form/inline_form_disabled.htm +125 -0
  532. handyhelpers/templates/handyhelpers/htmx/bs5/generic_modal_swap.htm +2 -3
  533. handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/content_title.htm +38 -0
  534. handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/controls.htm +21 -0
  535. handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/examples/card.htm +17 -0
  536. handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/examples/list.htm +11 -0
  537. handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/examples/table.htm +21 -0
  538. handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/filter_form_modal_swap.htm +48 -0
  539. handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/full.html +6 -0
  540. handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/wrapper_card.htm +7 -0
  541. handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/wrapper_list.htm +7 -0
  542. handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/wrapper_minimal.htm +7 -0
  543. handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/wrapper_table.htm +18 -0
  544. handyhelpers/templates/handyhelpers/htmx/bs5/index.htm +34 -0
  545. handyhelpers/templates/handyhelpers/report/annual_stats.html +6 -0
  546. handyhelpers/templates/handyhelpers/report/annual_stats_content.htm +43 -0
  547. handyhelpers/templates/handyhelpers/report/chartjs/annual_progress_chart.htm +1 -1
  548. handyhelpers/templates/handyhelpers/report/chartjs/annual_progress_content.htm +40 -39
  549. handyhelpers/templates/handyhelpers/report/chartjs/annual_stats.html +25 -36
  550. handyhelpers/templates/handyhelpers/report/chartjs/annual_trends_content.htm +35 -34
  551. handyhelpers/templates/handyhelpers/report/chartjs/day_count_chart.htm +1 -1
  552. handyhelpers/templates/handyhelpers/report/chartjs/month_count_chart.htm +1 -1
  553. handyhelpers/templates/handyhelpers/report/chartjs/week_count_chart.htm +1 -1
  554. handyhelpers/templates/handyhelpers/report/chartjs/year_count_chart.htm +1 -1
  555. handyhelpers/templatetags/form_tags.py +47 -0
  556. handyhelpers/templatetags/htmx_tags.py +21 -0
  557. handyhelpers/views/action.py +3 -1
  558. handyhelpers/views/calendar.py +33 -14
  559. handyhelpers/views/htmx.py +396 -4
  560. handyhelpers/views/report.py +12 -5
  561. handyhelpers/management/commands/generate_admin.py +0 -110
  562. handyhelpers/static/node_modules/@popperjs/core/dist/esm/utils/format.js +0 -9
  563. handyhelpers/static/node_modules/@popperjs/core/dist/esm/utils/validateModifiers.js +0 -81
  564. handyhelpers/static/node_modules/@popperjs/core/lib/utils/format.d.ts +0 -1
  565. handyhelpers/static/node_modules/@popperjs/core/lib/utils/format.js +0 -9
  566. handyhelpers/static/node_modules/@popperjs/core/lib/utils/format.js.flow +0 -5
  567. handyhelpers/static/node_modules/@popperjs/core/lib/utils/validateModifiers.d.ts +0 -1
  568. handyhelpers/static/node_modules/@popperjs/core/lib/utils/validateModifiers.js +0 -81
  569. handyhelpers/static/node_modules/@popperjs/core/lib/utils/validateModifiers.js.flow +0 -151
  570. {django_handyhelpers-0.3.20.dist-info → django_handyhelpers-0.3.35.dist-info}/LICENSE +0 -0
  571. {django_handyhelpers-0.3.20.dist-info → django_handyhelpers-0.3.35.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2382 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core')) :
3
+ typeof define === 'function' && define.amd ? define(['@popperjs/core'], factory) :
4
+ (global = global || self, global.tippy = factory(global.Popper));
5
+ }(this, (function (core) { 'use strict';
6
+
7
+ var ROUND_ARROW = '<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>';
8
+ var CONTENT_CLASS = "tippy-content";
9
+ var BACKDROP_CLASS = "tippy-backdrop";
10
+ var ARROW_CLASS = "tippy-arrow";
11
+ var SVG_ARROW_CLASS = "tippy-svg-arrow";
12
+ var TOUCH_OPTIONS = {
13
+ passive: true,
14
+ capture: true
15
+ };
16
+ var TIPPY_DEFAULT_APPEND_TO = function TIPPY_DEFAULT_APPEND_TO() {
17
+ return document.body;
18
+ };
19
+
20
+ function hasOwnProperty(obj, key) {
21
+ return {}.hasOwnProperty.call(obj, key);
22
+ }
23
+ function getValueAtIndexOrReturn(value, index, defaultValue) {
24
+ if (Array.isArray(value)) {
25
+ var v = value[index];
26
+ return v == null ? Array.isArray(defaultValue) ? defaultValue[index] : defaultValue : v;
27
+ }
28
+
29
+ return value;
30
+ }
31
+ function isType(value, type) {
32
+ var str = {}.toString.call(value);
33
+ return str.indexOf('[object') === 0 && str.indexOf(type + "]") > -1;
34
+ }
35
+ function invokeWithArgsOrReturn(value, args) {
36
+ return typeof value === 'function' ? value.apply(void 0, args) : value;
37
+ }
38
+ function debounce(fn, ms) {
39
+ // Avoid wrapping in `setTimeout` if ms is 0 anyway
40
+ if (ms === 0) {
41
+ return fn;
42
+ }
43
+
44
+ var timeout;
45
+ return function (arg) {
46
+ clearTimeout(timeout);
47
+ timeout = setTimeout(function () {
48
+ fn(arg);
49
+ }, ms);
50
+ };
51
+ }
52
+ function removeProperties(obj, keys) {
53
+ var clone = Object.assign({}, obj);
54
+ keys.forEach(function (key) {
55
+ delete clone[key];
56
+ });
57
+ return clone;
58
+ }
59
+ function splitBySpaces(value) {
60
+ return value.split(/\s+/).filter(Boolean);
61
+ }
62
+ function normalizeToArray(value) {
63
+ return [].concat(value);
64
+ }
65
+ function pushIfUnique(arr, value) {
66
+ if (arr.indexOf(value) === -1) {
67
+ arr.push(value);
68
+ }
69
+ }
70
+ function unique(arr) {
71
+ return arr.filter(function (item, index) {
72
+ return arr.indexOf(item) === index;
73
+ });
74
+ }
75
+ function getBasePlacement(placement) {
76
+ return placement.split('-')[0];
77
+ }
78
+ function arrayFrom(value) {
79
+ return [].slice.call(value);
80
+ }
81
+ function removeUndefinedProps(obj) {
82
+ return Object.keys(obj).reduce(function (acc, key) {
83
+ if (obj[key] !== undefined) {
84
+ acc[key] = obj[key];
85
+ }
86
+
87
+ return acc;
88
+ }, {});
89
+ }
90
+
91
+ function div() {
92
+ return document.createElement('div');
93
+ }
94
+ function isElement(value) {
95
+ return ['Element', 'Fragment'].some(function (type) {
96
+ return isType(value, type);
97
+ });
98
+ }
99
+ function isNodeList(value) {
100
+ return isType(value, 'NodeList');
101
+ }
102
+ function isMouseEvent(value) {
103
+ return isType(value, 'MouseEvent');
104
+ }
105
+ function isReferenceElement(value) {
106
+ return !!(value && value._tippy && value._tippy.reference === value);
107
+ }
108
+ function getArrayOfElements(value) {
109
+ if (isElement(value)) {
110
+ return [value];
111
+ }
112
+
113
+ if (isNodeList(value)) {
114
+ return arrayFrom(value);
115
+ }
116
+
117
+ if (Array.isArray(value)) {
118
+ return value;
119
+ }
120
+
121
+ return arrayFrom(document.querySelectorAll(value));
122
+ }
123
+ function setTransitionDuration(els, value) {
124
+ els.forEach(function (el) {
125
+ if (el) {
126
+ el.style.transitionDuration = value + "ms";
127
+ }
128
+ });
129
+ }
130
+ function setVisibilityState(els, state) {
131
+ els.forEach(function (el) {
132
+ if (el) {
133
+ el.setAttribute('data-state', state);
134
+ }
135
+ });
136
+ }
137
+ function getOwnerDocument(elementOrElements) {
138
+ var _element$ownerDocumen;
139
+
140
+ var _normalizeToArray = normalizeToArray(elementOrElements),
141
+ element = _normalizeToArray[0]; // Elements created via a <template> have an ownerDocument with no reference to the body
142
+
143
+
144
+ return element != null && (_element$ownerDocumen = element.ownerDocument) != null && _element$ownerDocumen.body ? element.ownerDocument : document;
145
+ }
146
+ function isCursorOutsideInteractiveBorder(popperTreeData, event) {
147
+ var clientX = event.clientX,
148
+ clientY = event.clientY;
149
+ return popperTreeData.every(function (_ref) {
150
+ var popperRect = _ref.popperRect,
151
+ popperState = _ref.popperState,
152
+ props = _ref.props;
153
+ var interactiveBorder = props.interactiveBorder;
154
+ var basePlacement = getBasePlacement(popperState.placement);
155
+ var offsetData = popperState.modifiersData.offset;
156
+
157
+ if (!offsetData) {
158
+ return true;
159
+ }
160
+
161
+ var topDistance = basePlacement === 'bottom' ? offsetData.top.y : 0;
162
+ var bottomDistance = basePlacement === 'top' ? offsetData.bottom.y : 0;
163
+ var leftDistance = basePlacement === 'right' ? offsetData.left.x : 0;
164
+ var rightDistance = basePlacement === 'left' ? offsetData.right.x : 0;
165
+ var exceedsTop = popperRect.top - clientY + topDistance > interactiveBorder;
166
+ var exceedsBottom = clientY - popperRect.bottom - bottomDistance > interactiveBorder;
167
+ var exceedsLeft = popperRect.left - clientX + leftDistance > interactiveBorder;
168
+ var exceedsRight = clientX - popperRect.right - rightDistance > interactiveBorder;
169
+ return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight;
170
+ });
171
+ }
172
+ function updateTransitionEndListener(box, action, listener) {
173
+ var method = action + "EventListener"; // some browsers apparently support `transition` (unprefixed) but only fire
174
+ // `webkitTransitionEnd`...
175
+
176
+ ['transitionend', 'webkitTransitionEnd'].forEach(function (event) {
177
+ box[method](event, listener);
178
+ });
179
+ }
180
+ /**
181
+ * Compared to xxx.contains, this function works for dom structures with shadow
182
+ * dom
183
+ */
184
+
185
+ function actualContains(parent, child) {
186
+ var target = child;
187
+
188
+ while (target) {
189
+ var _target$getRootNode;
190
+
191
+ if (parent.contains(target)) {
192
+ return true;
193
+ }
194
+
195
+ target = target.getRootNode == null ? void 0 : (_target$getRootNode = target.getRootNode()) == null ? void 0 : _target$getRootNode.host;
196
+ }
197
+
198
+ return false;
199
+ }
200
+
201
+ var currentInput = {
202
+ isTouch: false
203
+ };
204
+ var lastMouseMoveTime = 0;
205
+ /**
206
+ * When a `touchstart` event is fired, it's assumed the user is using touch
207
+ * input. We'll bind a `mousemove` event listener to listen for mouse input in
208
+ * the future. This way, the `isTouch` property is fully dynamic and will handle
209
+ * hybrid devices that use a mix of touch + mouse input.
210
+ */
211
+
212
+ function onDocumentTouchStart() {
213
+ if (currentInput.isTouch) {
214
+ return;
215
+ }
216
+
217
+ currentInput.isTouch = true;
218
+
219
+ if (window.performance) {
220
+ document.addEventListener('mousemove', onDocumentMouseMove);
221
+ }
222
+ }
223
+ /**
224
+ * When two `mousemove` event are fired consecutively within 20ms, it's assumed
225
+ * the user is using mouse input again. `mousemove` can fire on touch devices as
226
+ * well, but very rarely that quickly.
227
+ */
228
+
229
+ function onDocumentMouseMove() {
230
+ var now = performance.now();
231
+
232
+ if (now - lastMouseMoveTime < 20) {
233
+ currentInput.isTouch = false;
234
+ document.removeEventListener('mousemove', onDocumentMouseMove);
235
+ }
236
+
237
+ lastMouseMoveTime = now;
238
+ }
239
+ /**
240
+ * When an element is in focus and has a tippy, leaving the tab/window and
241
+ * returning causes it to show again. For mouse users this is unexpected, but
242
+ * for keyboard use it makes sense.
243
+ * TODO: find a better technique to solve this problem
244
+ */
245
+
246
+ function onWindowBlur() {
247
+ var activeElement = document.activeElement;
248
+
249
+ if (isReferenceElement(activeElement)) {
250
+ var instance = activeElement._tippy;
251
+
252
+ if (activeElement.blur && !instance.state.isVisible) {
253
+ activeElement.blur();
254
+ }
255
+ }
256
+ }
257
+ function bindGlobalEventListeners() {
258
+ document.addEventListener('touchstart', onDocumentTouchStart, TOUCH_OPTIONS);
259
+ window.addEventListener('blur', onWindowBlur);
260
+ }
261
+
262
+ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
263
+ var isIE11 = isBrowser ? // @ts-ignore
264
+ !!window.msCrypto : false;
265
+
266
+ function createMemoryLeakWarning(method) {
267
+ var txt = method === 'destroy' ? 'n already-' : ' ';
268
+ return [method + "() was called on a" + txt + "destroyed instance. This is a no-op but", 'indicates a potential memory leak.'].join(' ');
269
+ }
270
+ function clean(value) {
271
+ var spacesAndTabs = /[ \t]{2,}/g;
272
+ var lineStartWithSpaces = /^[ \t]*/gm;
273
+ return value.replace(spacesAndTabs, ' ').replace(lineStartWithSpaces, '').trim();
274
+ }
275
+
276
+ function getDevMessage(message) {
277
+ return clean("\n %ctippy.js\n\n %c" + clean(message) + "\n\n %c\uD83D\uDC77\u200D This is a development-only message. It will be removed in production.\n ");
278
+ }
279
+
280
+ function getFormattedMessage(message) {
281
+ return [getDevMessage(message), // title
282
+ 'color: #00C584; font-size: 1.3em; font-weight: bold;', // message
283
+ 'line-height: 1.5', // footer
284
+ 'color: #a6a095;'];
285
+ } // Assume warnings and errors never have the same message
286
+
287
+ var visitedMessages;
288
+
289
+ {
290
+ resetVisitedMessages();
291
+ }
292
+
293
+ function resetVisitedMessages() {
294
+ visitedMessages = new Set();
295
+ }
296
+ function warnWhen(condition, message) {
297
+ if (condition && !visitedMessages.has(message)) {
298
+ var _console;
299
+
300
+ visitedMessages.add(message);
301
+
302
+ (_console = console).warn.apply(_console, getFormattedMessage(message));
303
+ }
304
+ }
305
+ function errorWhen(condition, message) {
306
+ if (condition && !visitedMessages.has(message)) {
307
+ var _console2;
308
+
309
+ visitedMessages.add(message);
310
+
311
+ (_console2 = console).error.apply(_console2, getFormattedMessage(message));
312
+ }
313
+ }
314
+ function validateTargets(targets) {
315
+ var didPassFalsyValue = !targets;
316
+ var didPassPlainObject = Object.prototype.toString.call(targets) === '[object Object]' && !targets.addEventListener;
317
+ errorWhen(didPassFalsyValue, ['tippy() was passed', '`' + String(targets) + '`', 'as its targets (first) argument. Valid types are: String, Element,', 'Element[], or NodeList.'].join(' '));
318
+ errorWhen(didPassPlainObject, ['tippy() was passed a plain object which is not supported as an argument', 'for virtual positioning. Use props.getReferenceClientRect instead.'].join(' '));
319
+ }
320
+
321
+ var pluginProps = {
322
+ animateFill: false,
323
+ followCursor: false,
324
+ inlinePositioning: false,
325
+ sticky: false
326
+ };
327
+ var renderProps = {
328
+ allowHTML: false,
329
+ animation: 'fade',
330
+ arrow: true,
331
+ content: '',
332
+ inertia: false,
333
+ maxWidth: 350,
334
+ role: 'tooltip',
335
+ theme: '',
336
+ zIndex: 9999
337
+ };
338
+ var defaultProps = Object.assign({
339
+ appendTo: TIPPY_DEFAULT_APPEND_TO,
340
+ aria: {
341
+ content: 'auto',
342
+ expanded: 'auto'
343
+ },
344
+ delay: 0,
345
+ duration: [300, 250],
346
+ getReferenceClientRect: null,
347
+ hideOnClick: true,
348
+ ignoreAttributes: false,
349
+ interactive: false,
350
+ interactiveBorder: 2,
351
+ interactiveDebounce: 0,
352
+ moveTransition: '',
353
+ offset: [0, 10],
354
+ onAfterUpdate: function onAfterUpdate() {},
355
+ onBeforeUpdate: function onBeforeUpdate() {},
356
+ onCreate: function onCreate() {},
357
+ onDestroy: function onDestroy() {},
358
+ onHidden: function onHidden() {},
359
+ onHide: function onHide() {},
360
+ onMount: function onMount() {},
361
+ onShow: function onShow() {},
362
+ onShown: function onShown() {},
363
+ onTrigger: function onTrigger() {},
364
+ onUntrigger: function onUntrigger() {},
365
+ onClickOutside: function onClickOutside() {},
366
+ placement: 'top',
367
+ plugins: [],
368
+ popperOptions: {},
369
+ render: null,
370
+ showOnCreate: false,
371
+ touch: true,
372
+ trigger: 'mouseenter focus',
373
+ triggerTarget: null
374
+ }, pluginProps, renderProps);
375
+ var defaultKeys = Object.keys(defaultProps);
376
+ var setDefaultProps = function setDefaultProps(partialProps) {
377
+ /* istanbul ignore else */
378
+ {
379
+ validateProps(partialProps, []);
380
+ }
381
+
382
+ var keys = Object.keys(partialProps);
383
+ keys.forEach(function (key) {
384
+ defaultProps[key] = partialProps[key];
385
+ });
386
+ };
387
+ function getExtendedPassedProps(passedProps) {
388
+ var plugins = passedProps.plugins || [];
389
+ var pluginProps = plugins.reduce(function (acc, plugin) {
390
+ var name = plugin.name,
391
+ defaultValue = plugin.defaultValue;
392
+
393
+ if (name) {
394
+ var _name;
395
+
396
+ acc[name] = passedProps[name] !== undefined ? passedProps[name] : (_name = defaultProps[name]) != null ? _name : defaultValue;
397
+ }
398
+
399
+ return acc;
400
+ }, {});
401
+ return Object.assign({}, passedProps, pluginProps);
402
+ }
403
+ function getDataAttributeProps(reference, plugins) {
404
+ var propKeys = plugins ? Object.keys(getExtendedPassedProps(Object.assign({}, defaultProps, {
405
+ plugins: plugins
406
+ }))) : defaultKeys;
407
+ var props = propKeys.reduce(function (acc, key) {
408
+ var valueAsString = (reference.getAttribute("data-tippy-" + key) || '').trim();
409
+
410
+ if (!valueAsString) {
411
+ return acc;
412
+ }
413
+
414
+ if (key === 'content') {
415
+ acc[key] = valueAsString;
416
+ } else {
417
+ try {
418
+ acc[key] = JSON.parse(valueAsString);
419
+ } catch (e) {
420
+ acc[key] = valueAsString;
421
+ }
422
+ }
423
+
424
+ return acc;
425
+ }, {});
426
+ return props;
427
+ }
428
+ function evaluateProps(reference, props) {
429
+ var out = Object.assign({}, props, {
430
+ content: invokeWithArgsOrReturn(props.content, [reference])
431
+ }, props.ignoreAttributes ? {} : getDataAttributeProps(reference, props.plugins));
432
+ out.aria = Object.assign({}, defaultProps.aria, out.aria);
433
+ out.aria = {
434
+ expanded: out.aria.expanded === 'auto' ? props.interactive : out.aria.expanded,
435
+ content: out.aria.content === 'auto' ? props.interactive ? null : 'describedby' : out.aria.content
436
+ };
437
+ return out;
438
+ }
439
+ function validateProps(partialProps, plugins) {
440
+ if (partialProps === void 0) {
441
+ partialProps = {};
442
+ }
443
+
444
+ if (plugins === void 0) {
445
+ plugins = [];
446
+ }
447
+
448
+ var keys = Object.keys(partialProps);
449
+ keys.forEach(function (prop) {
450
+ var nonPluginProps = removeProperties(defaultProps, Object.keys(pluginProps));
451
+ var didPassUnknownProp = !hasOwnProperty(nonPluginProps, prop); // Check if the prop exists in `plugins`
452
+
453
+ if (didPassUnknownProp) {
454
+ didPassUnknownProp = plugins.filter(function (plugin) {
455
+ return plugin.name === prop;
456
+ }).length === 0;
457
+ }
458
+
459
+ warnWhen(didPassUnknownProp, ["`" + prop + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", 'a plugin, forgot to pass it in an array as props.plugins.', '\n\n', 'All props: https://atomiks.github.io/tippyjs/v6/all-props/\n', 'Plugins: https://atomiks.github.io/tippyjs/v6/plugins/'].join(' '));
460
+ });
461
+ }
462
+
463
+ function getChildren(popper) {
464
+ var box = popper.firstElementChild;
465
+ var boxChildren = arrayFrom(box.children);
466
+ return {
467
+ box: box,
468
+ content: boxChildren.find(function (node) {
469
+ return node.classList.contains(CONTENT_CLASS);
470
+ }),
471
+ arrow: boxChildren.find(function (node) {
472
+ return node.classList.contains(ARROW_CLASS) || node.classList.contains(SVG_ARROW_CLASS);
473
+ }),
474
+ backdrop: boxChildren.find(function (node) {
475
+ return node.classList.contains(BACKDROP_CLASS);
476
+ })
477
+ };
478
+ }
479
+
480
+ var idCounter = 1;
481
+ var mouseMoveListeners = []; // Used by `hideAll()`
482
+
483
+ var mountedInstances = [];
484
+ function createTippy(reference, passedProps) {
485
+ var props = evaluateProps(reference, Object.assign({}, defaultProps, getExtendedPassedProps(removeUndefinedProps(passedProps)))); // ===========================================================================
486
+ // 🔒 Private members
487
+ // ===========================================================================
488
+
489
+ var showTimeout;
490
+ var hideTimeout;
491
+ var scheduleHideAnimationFrame;
492
+ var isVisibleFromClick = false;
493
+ var didHideDueToDocumentMouseDown = false;
494
+ var didTouchMove = false;
495
+ var ignoreOnFirstUpdate = false;
496
+ var lastTriggerEvent;
497
+ var currentTransitionEndListener;
498
+ var onFirstUpdate;
499
+ var listeners = [];
500
+ var debouncedOnMouseMove = debounce(onMouseMove, props.interactiveDebounce);
501
+ var currentTarget; // ===========================================================================
502
+ // 🔑 Public members
503
+ // ===========================================================================
504
+
505
+ var id = idCounter++;
506
+ var popperInstance = null;
507
+ var plugins = unique(props.plugins);
508
+ var state = {
509
+ // Is the instance currently enabled?
510
+ isEnabled: true,
511
+ // Is the tippy currently showing and not transitioning out?
512
+ isVisible: false,
513
+ // Has the instance been destroyed?
514
+ isDestroyed: false,
515
+ // Is the tippy currently mounted to the DOM?
516
+ isMounted: false,
517
+ // Has the tippy finished transitioning in?
518
+ isShown: false
519
+ };
520
+ var instance = {
521
+ // properties
522
+ id: id,
523
+ reference: reference,
524
+ popper: div(),
525
+ popperInstance: popperInstance,
526
+ props: props,
527
+ state: state,
528
+ plugins: plugins,
529
+ // methods
530
+ clearDelayTimeouts: clearDelayTimeouts,
531
+ setProps: setProps,
532
+ setContent: setContent,
533
+ show: show,
534
+ hide: hide,
535
+ hideWithInteractivity: hideWithInteractivity,
536
+ enable: enable,
537
+ disable: disable,
538
+ unmount: unmount,
539
+ destroy: destroy
540
+ }; // TODO: Investigate why this early return causes a TDZ error in the tests —
541
+ // it doesn't seem to happen in the browser
542
+
543
+ /* istanbul ignore if */
544
+
545
+ if (!props.render) {
546
+ {
547
+ errorWhen(true, 'render() function has not been supplied.');
548
+ }
549
+
550
+ return instance;
551
+ } // ===========================================================================
552
+ // Initial mutations
553
+ // ===========================================================================
554
+
555
+
556
+ var _props$render = props.render(instance),
557
+ popper = _props$render.popper,
558
+ onUpdate = _props$render.onUpdate;
559
+
560
+ popper.setAttribute('data-tippy-root', '');
561
+ popper.id = "tippy-" + instance.id;
562
+ instance.popper = popper;
563
+ reference._tippy = instance;
564
+ popper._tippy = instance;
565
+ var pluginsHooks = plugins.map(function (plugin) {
566
+ return plugin.fn(instance);
567
+ });
568
+ var hasAriaExpanded = reference.hasAttribute('aria-expanded');
569
+ addListeners();
570
+ handleAriaExpandedAttribute();
571
+ handleStyles();
572
+ invokeHook('onCreate', [instance]);
573
+
574
+ if (props.showOnCreate) {
575
+ scheduleShow();
576
+ } // Prevent a tippy with a delay from hiding if the cursor left then returned
577
+ // before it started hiding
578
+
579
+
580
+ popper.addEventListener('mouseenter', function () {
581
+ if (instance.props.interactive && instance.state.isVisible) {
582
+ instance.clearDelayTimeouts();
583
+ }
584
+ });
585
+ popper.addEventListener('mouseleave', function () {
586
+ if (instance.props.interactive && instance.props.trigger.indexOf('mouseenter') >= 0) {
587
+ getDocument().addEventListener('mousemove', debouncedOnMouseMove);
588
+ }
589
+ });
590
+ return instance; // ===========================================================================
591
+ // 🔒 Private methods
592
+ // ===========================================================================
593
+
594
+ function getNormalizedTouchSettings() {
595
+ var touch = instance.props.touch;
596
+ return Array.isArray(touch) ? touch : [touch, 0];
597
+ }
598
+
599
+ function getIsCustomTouchBehavior() {
600
+ return getNormalizedTouchSettings()[0] === 'hold';
601
+ }
602
+
603
+ function getIsDefaultRenderFn() {
604
+ var _instance$props$rende;
605
+
606
+ // @ts-ignore
607
+ return !!((_instance$props$rende = instance.props.render) != null && _instance$props$rende.$$tippy);
608
+ }
609
+
610
+ function getCurrentTarget() {
611
+ return currentTarget || reference;
612
+ }
613
+
614
+ function getDocument() {
615
+ var parent = getCurrentTarget().parentNode;
616
+ return parent ? getOwnerDocument(parent) : document;
617
+ }
618
+
619
+ function getDefaultTemplateChildren() {
620
+ return getChildren(popper);
621
+ }
622
+
623
+ function getDelay(isShow) {
624
+ // For touch or keyboard input, force `0` delay for UX reasons
625
+ // Also if the instance is mounted but not visible (transitioning out),
626
+ // ignore delay
627
+ if (instance.state.isMounted && !instance.state.isVisible || currentInput.isTouch || lastTriggerEvent && lastTriggerEvent.type === 'focus') {
628
+ return 0;
629
+ }
630
+
631
+ return getValueAtIndexOrReturn(instance.props.delay, isShow ? 0 : 1, defaultProps.delay);
632
+ }
633
+
634
+ function handleStyles(fromHide) {
635
+ if (fromHide === void 0) {
636
+ fromHide = false;
637
+ }
638
+
639
+ popper.style.pointerEvents = instance.props.interactive && !fromHide ? '' : 'none';
640
+ popper.style.zIndex = "" + instance.props.zIndex;
641
+ }
642
+
643
+ function invokeHook(hook, args, shouldInvokePropsHook) {
644
+ if (shouldInvokePropsHook === void 0) {
645
+ shouldInvokePropsHook = true;
646
+ }
647
+
648
+ pluginsHooks.forEach(function (pluginHooks) {
649
+ if (pluginHooks[hook]) {
650
+ pluginHooks[hook].apply(pluginHooks, args);
651
+ }
652
+ });
653
+
654
+ if (shouldInvokePropsHook) {
655
+ var _instance$props;
656
+
657
+ (_instance$props = instance.props)[hook].apply(_instance$props, args);
658
+ }
659
+ }
660
+
661
+ function handleAriaContentAttribute() {
662
+ var aria = instance.props.aria;
663
+
664
+ if (!aria.content) {
665
+ return;
666
+ }
667
+
668
+ var attr = "aria-" + aria.content;
669
+ var id = popper.id;
670
+ var nodes = normalizeToArray(instance.props.triggerTarget || reference);
671
+ nodes.forEach(function (node) {
672
+ var currentValue = node.getAttribute(attr);
673
+
674
+ if (instance.state.isVisible) {
675
+ node.setAttribute(attr, currentValue ? currentValue + " " + id : id);
676
+ } else {
677
+ var nextValue = currentValue && currentValue.replace(id, '').trim();
678
+
679
+ if (nextValue) {
680
+ node.setAttribute(attr, nextValue);
681
+ } else {
682
+ node.removeAttribute(attr);
683
+ }
684
+ }
685
+ });
686
+ }
687
+
688
+ function handleAriaExpandedAttribute() {
689
+ if (hasAriaExpanded || !instance.props.aria.expanded) {
690
+ return;
691
+ }
692
+
693
+ var nodes = normalizeToArray(instance.props.triggerTarget || reference);
694
+ nodes.forEach(function (node) {
695
+ if (instance.props.interactive) {
696
+ node.setAttribute('aria-expanded', instance.state.isVisible && node === getCurrentTarget() ? 'true' : 'false');
697
+ } else {
698
+ node.removeAttribute('aria-expanded');
699
+ }
700
+ });
701
+ }
702
+
703
+ function cleanupInteractiveMouseListeners() {
704
+ getDocument().removeEventListener('mousemove', debouncedOnMouseMove);
705
+ mouseMoveListeners = mouseMoveListeners.filter(function (listener) {
706
+ return listener !== debouncedOnMouseMove;
707
+ });
708
+ }
709
+
710
+ function onDocumentPress(event) {
711
+ // Moved finger to scroll instead of an intentional tap outside
712
+ if (currentInput.isTouch) {
713
+ if (didTouchMove || event.type === 'mousedown') {
714
+ return;
715
+ }
716
+ }
717
+
718
+ var actualTarget = event.composedPath && event.composedPath()[0] || event.target; // Clicked on interactive popper
719
+
720
+ if (instance.props.interactive && actualContains(popper, actualTarget)) {
721
+ return;
722
+ } // Clicked on the event listeners target
723
+
724
+
725
+ if (normalizeToArray(instance.props.triggerTarget || reference).some(function (el) {
726
+ return actualContains(el, actualTarget);
727
+ })) {
728
+ if (currentInput.isTouch) {
729
+ return;
730
+ }
731
+
732
+ if (instance.state.isVisible && instance.props.trigger.indexOf('click') >= 0) {
733
+ return;
734
+ }
735
+ } else {
736
+ invokeHook('onClickOutside', [instance, event]);
737
+ }
738
+
739
+ if (instance.props.hideOnClick === true) {
740
+ instance.clearDelayTimeouts();
741
+ instance.hide(); // `mousedown` event is fired right before `focus` if pressing the
742
+ // currentTarget. This lets a tippy with `focus` trigger know that it
743
+ // should not show
744
+
745
+ didHideDueToDocumentMouseDown = true;
746
+ setTimeout(function () {
747
+ didHideDueToDocumentMouseDown = false;
748
+ }); // The listener gets added in `scheduleShow()`, but this may be hiding it
749
+ // before it shows, and hide()'s early bail-out behavior can prevent it
750
+ // from being cleaned up
751
+
752
+ if (!instance.state.isMounted) {
753
+ removeDocumentPress();
754
+ }
755
+ }
756
+ }
757
+
758
+ function onTouchMove() {
759
+ didTouchMove = true;
760
+ }
761
+
762
+ function onTouchStart() {
763
+ didTouchMove = false;
764
+ }
765
+
766
+ function addDocumentPress() {
767
+ var doc = getDocument();
768
+ doc.addEventListener('mousedown', onDocumentPress, true);
769
+ doc.addEventListener('touchend', onDocumentPress, TOUCH_OPTIONS);
770
+ doc.addEventListener('touchstart', onTouchStart, TOUCH_OPTIONS);
771
+ doc.addEventListener('touchmove', onTouchMove, TOUCH_OPTIONS);
772
+ }
773
+
774
+ function removeDocumentPress() {
775
+ var doc = getDocument();
776
+ doc.removeEventListener('mousedown', onDocumentPress, true);
777
+ doc.removeEventListener('touchend', onDocumentPress, TOUCH_OPTIONS);
778
+ doc.removeEventListener('touchstart', onTouchStart, TOUCH_OPTIONS);
779
+ doc.removeEventListener('touchmove', onTouchMove, TOUCH_OPTIONS);
780
+ }
781
+
782
+ function onTransitionedOut(duration, callback) {
783
+ onTransitionEnd(duration, function () {
784
+ if (!instance.state.isVisible && popper.parentNode && popper.parentNode.contains(popper)) {
785
+ callback();
786
+ }
787
+ });
788
+ }
789
+
790
+ function onTransitionedIn(duration, callback) {
791
+ onTransitionEnd(duration, callback);
792
+ }
793
+
794
+ function onTransitionEnd(duration, callback) {
795
+ var box = getDefaultTemplateChildren().box;
796
+
797
+ function listener(event) {
798
+ if (event.target === box) {
799
+ updateTransitionEndListener(box, 'remove', listener);
800
+ callback();
801
+ }
802
+ } // Make callback synchronous if duration is 0
803
+ // `transitionend` won't fire otherwise
804
+
805
+
806
+ if (duration === 0) {
807
+ return callback();
808
+ }
809
+
810
+ updateTransitionEndListener(box, 'remove', currentTransitionEndListener);
811
+ updateTransitionEndListener(box, 'add', listener);
812
+ currentTransitionEndListener = listener;
813
+ }
814
+
815
+ function on(eventType, handler, options) {
816
+ if (options === void 0) {
817
+ options = false;
818
+ }
819
+
820
+ var nodes = normalizeToArray(instance.props.triggerTarget || reference);
821
+ nodes.forEach(function (node) {
822
+ node.addEventListener(eventType, handler, options);
823
+ listeners.push({
824
+ node: node,
825
+ eventType: eventType,
826
+ handler: handler,
827
+ options: options
828
+ });
829
+ });
830
+ }
831
+
832
+ function addListeners() {
833
+ if (getIsCustomTouchBehavior()) {
834
+ on('touchstart', onTrigger, {
835
+ passive: true
836
+ });
837
+ on('touchend', onMouseLeave, {
838
+ passive: true
839
+ });
840
+ }
841
+
842
+ splitBySpaces(instance.props.trigger).forEach(function (eventType) {
843
+ if (eventType === 'manual') {
844
+ return;
845
+ }
846
+
847
+ on(eventType, onTrigger);
848
+
849
+ switch (eventType) {
850
+ case 'mouseenter':
851
+ on('mouseleave', onMouseLeave);
852
+ break;
853
+
854
+ case 'focus':
855
+ on(isIE11 ? 'focusout' : 'blur', onBlurOrFocusOut);
856
+ break;
857
+
858
+ case 'focusin':
859
+ on('focusout', onBlurOrFocusOut);
860
+ break;
861
+ }
862
+ });
863
+ }
864
+
865
+ function removeListeners() {
866
+ listeners.forEach(function (_ref) {
867
+ var node = _ref.node,
868
+ eventType = _ref.eventType,
869
+ handler = _ref.handler,
870
+ options = _ref.options;
871
+ node.removeEventListener(eventType, handler, options);
872
+ });
873
+ listeners = [];
874
+ }
875
+
876
+ function onTrigger(event) {
877
+ var _lastTriggerEvent;
878
+
879
+ var shouldScheduleClickHide = false;
880
+
881
+ if (!instance.state.isEnabled || isEventListenerStopped(event) || didHideDueToDocumentMouseDown) {
882
+ return;
883
+ }
884
+
885
+ var wasFocused = ((_lastTriggerEvent = lastTriggerEvent) == null ? void 0 : _lastTriggerEvent.type) === 'focus';
886
+ lastTriggerEvent = event;
887
+ currentTarget = event.currentTarget;
888
+ handleAriaExpandedAttribute();
889
+
890
+ if (!instance.state.isVisible && isMouseEvent(event)) {
891
+ // If scrolling, `mouseenter` events can be fired if the cursor lands
892
+ // over a new target, but `mousemove` events don't get fired. This
893
+ // causes interactive tooltips to get stuck open until the cursor is
894
+ // moved
895
+ mouseMoveListeners.forEach(function (listener) {
896
+ return listener(event);
897
+ });
898
+ } // Toggle show/hide when clicking click-triggered tooltips
899
+
900
+
901
+ if (event.type === 'click' && (instance.props.trigger.indexOf('mouseenter') < 0 || isVisibleFromClick) && instance.props.hideOnClick !== false && instance.state.isVisible) {
902
+ shouldScheduleClickHide = true;
903
+ } else {
904
+ scheduleShow(event);
905
+ }
906
+
907
+ if (event.type === 'click') {
908
+ isVisibleFromClick = !shouldScheduleClickHide;
909
+ }
910
+
911
+ if (shouldScheduleClickHide && !wasFocused) {
912
+ scheduleHide(event);
913
+ }
914
+ }
915
+
916
+ function onMouseMove(event) {
917
+ var target = event.target;
918
+ var isCursorOverReferenceOrPopper = getCurrentTarget().contains(target) || popper.contains(target);
919
+
920
+ if (event.type === 'mousemove' && isCursorOverReferenceOrPopper) {
921
+ return;
922
+ }
923
+
924
+ var popperTreeData = getNestedPopperTree().concat(popper).map(function (popper) {
925
+ var _instance$popperInsta;
926
+
927
+ var instance = popper._tippy;
928
+ var state = (_instance$popperInsta = instance.popperInstance) == null ? void 0 : _instance$popperInsta.state;
929
+
930
+ if (state) {
931
+ return {
932
+ popperRect: popper.getBoundingClientRect(),
933
+ popperState: state,
934
+ props: props
935
+ };
936
+ }
937
+
938
+ return null;
939
+ }).filter(Boolean);
940
+
941
+ if (isCursorOutsideInteractiveBorder(popperTreeData, event)) {
942
+ cleanupInteractiveMouseListeners();
943
+ scheduleHide(event);
944
+ }
945
+ }
946
+
947
+ function onMouseLeave(event) {
948
+ var shouldBail = isEventListenerStopped(event) || instance.props.trigger.indexOf('click') >= 0 && isVisibleFromClick;
949
+
950
+ if (shouldBail) {
951
+ return;
952
+ }
953
+
954
+ if (instance.props.interactive) {
955
+ instance.hideWithInteractivity(event);
956
+ return;
957
+ }
958
+
959
+ scheduleHide(event);
960
+ }
961
+
962
+ function onBlurOrFocusOut(event) {
963
+ if (instance.props.trigger.indexOf('focusin') < 0 && event.target !== getCurrentTarget()) {
964
+ return;
965
+ } // If focus was moved to within the popper
966
+
967
+
968
+ if (instance.props.interactive && event.relatedTarget && popper.contains(event.relatedTarget)) {
969
+ return;
970
+ }
971
+
972
+ scheduleHide(event);
973
+ }
974
+
975
+ function isEventListenerStopped(event) {
976
+ return currentInput.isTouch ? getIsCustomTouchBehavior() !== event.type.indexOf('touch') >= 0 : false;
977
+ }
978
+
979
+ function createPopperInstance() {
980
+ destroyPopperInstance();
981
+ var _instance$props2 = instance.props,
982
+ popperOptions = _instance$props2.popperOptions,
983
+ placement = _instance$props2.placement,
984
+ offset = _instance$props2.offset,
985
+ getReferenceClientRect = _instance$props2.getReferenceClientRect,
986
+ moveTransition = _instance$props2.moveTransition;
987
+ var arrow = getIsDefaultRenderFn() ? getChildren(popper).arrow : null;
988
+ var computedReference = getReferenceClientRect ? {
989
+ getBoundingClientRect: getReferenceClientRect,
990
+ contextElement: getReferenceClientRect.contextElement || getCurrentTarget()
991
+ } : reference;
992
+ var tippyModifier = {
993
+ name: '$$tippy',
994
+ enabled: true,
995
+ phase: 'beforeWrite',
996
+ requires: ['computeStyles'],
997
+ fn: function fn(_ref2) {
998
+ var state = _ref2.state;
999
+
1000
+ if (getIsDefaultRenderFn()) {
1001
+ var _getDefaultTemplateCh = getDefaultTemplateChildren(),
1002
+ box = _getDefaultTemplateCh.box;
1003
+
1004
+ ['placement', 'reference-hidden', 'escaped'].forEach(function (attr) {
1005
+ if (attr === 'placement') {
1006
+ box.setAttribute('data-placement', state.placement);
1007
+ } else {
1008
+ if (state.attributes.popper["data-popper-" + attr]) {
1009
+ box.setAttribute("data-" + attr, '');
1010
+ } else {
1011
+ box.removeAttribute("data-" + attr);
1012
+ }
1013
+ }
1014
+ });
1015
+ state.attributes.popper = {};
1016
+ }
1017
+ }
1018
+ };
1019
+ var modifiers = [{
1020
+ name: 'offset',
1021
+ options: {
1022
+ offset: offset
1023
+ }
1024
+ }, {
1025
+ name: 'preventOverflow',
1026
+ options: {
1027
+ padding: {
1028
+ top: 2,
1029
+ bottom: 2,
1030
+ left: 5,
1031
+ right: 5
1032
+ }
1033
+ }
1034
+ }, {
1035
+ name: 'flip',
1036
+ options: {
1037
+ padding: 5
1038
+ }
1039
+ }, {
1040
+ name: 'computeStyles',
1041
+ options: {
1042
+ adaptive: !moveTransition
1043
+ }
1044
+ }, tippyModifier];
1045
+
1046
+ if (getIsDefaultRenderFn() && arrow) {
1047
+ modifiers.push({
1048
+ name: 'arrow',
1049
+ options: {
1050
+ element: arrow,
1051
+ padding: 3
1052
+ }
1053
+ });
1054
+ }
1055
+
1056
+ modifiers.push.apply(modifiers, (popperOptions == null ? void 0 : popperOptions.modifiers) || []);
1057
+ instance.popperInstance = core.createPopper(computedReference, popper, Object.assign({}, popperOptions, {
1058
+ placement: placement,
1059
+ onFirstUpdate: onFirstUpdate,
1060
+ modifiers: modifiers
1061
+ }));
1062
+ }
1063
+
1064
+ function destroyPopperInstance() {
1065
+ if (instance.popperInstance) {
1066
+ instance.popperInstance.destroy();
1067
+ instance.popperInstance = null;
1068
+ }
1069
+ }
1070
+
1071
+ function mount() {
1072
+ var appendTo = instance.props.appendTo;
1073
+ var parentNode; // By default, we'll append the popper to the triggerTargets's parentNode so
1074
+ // it's directly after the reference element so the elements inside the
1075
+ // tippy can be tabbed to
1076
+ // If there are clipping issues, the user can specify a different appendTo
1077
+ // and ensure focus management is handled correctly manually
1078
+
1079
+ var node = getCurrentTarget();
1080
+
1081
+ if (instance.props.interactive && appendTo === TIPPY_DEFAULT_APPEND_TO || appendTo === 'parent') {
1082
+ parentNode = node.parentNode;
1083
+ } else {
1084
+ parentNode = invokeWithArgsOrReturn(appendTo, [node]);
1085
+ } // The popper element needs to exist on the DOM before its position can be
1086
+ // updated as Popper needs to read its dimensions
1087
+
1088
+
1089
+ if (!parentNode.contains(popper)) {
1090
+ parentNode.appendChild(popper);
1091
+ }
1092
+
1093
+ instance.state.isMounted = true;
1094
+ createPopperInstance();
1095
+ /* istanbul ignore else */
1096
+
1097
+ {
1098
+ // Accessibility check
1099
+ warnWhen(instance.props.interactive && appendTo === defaultProps.appendTo && node.nextElementSibling !== popper, ['Interactive tippy element may not be accessible via keyboard', 'navigation because it is not directly after the reference element', 'in the DOM source order.', '\n\n', 'Using a wrapper <div> or <span> tag around the reference element', 'solves this by creating a new parentNode context.', '\n\n', 'Specifying `appendTo: document.body` silences this warning, but it', 'assumes you are using a focus management solution to handle', 'keyboard navigation.', '\n\n', 'See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity'].join(' '));
1100
+ }
1101
+ }
1102
+
1103
+ function getNestedPopperTree() {
1104
+ return arrayFrom(popper.querySelectorAll('[data-tippy-root]'));
1105
+ }
1106
+
1107
+ function scheduleShow(event) {
1108
+ instance.clearDelayTimeouts();
1109
+
1110
+ if (event) {
1111
+ invokeHook('onTrigger', [instance, event]);
1112
+ }
1113
+
1114
+ addDocumentPress();
1115
+ var delay = getDelay(true);
1116
+
1117
+ var _getNormalizedTouchSe = getNormalizedTouchSettings(),
1118
+ touchValue = _getNormalizedTouchSe[0],
1119
+ touchDelay = _getNormalizedTouchSe[1];
1120
+
1121
+ if (currentInput.isTouch && touchValue === 'hold' && touchDelay) {
1122
+ delay = touchDelay;
1123
+ }
1124
+
1125
+ if (delay) {
1126
+ showTimeout = setTimeout(function () {
1127
+ instance.show();
1128
+ }, delay);
1129
+ } else {
1130
+ instance.show();
1131
+ }
1132
+ }
1133
+
1134
+ function scheduleHide(event) {
1135
+ instance.clearDelayTimeouts();
1136
+ invokeHook('onUntrigger', [instance, event]);
1137
+
1138
+ if (!instance.state.isVisible) {
1139
+ removeDocumentPress();
1140
+ return;
1141
+ } // For interactive tippies, scheduleHide is added to a document.body handler
1142
+ // from onMouseLeave so must intercept scheduled hides from mousemove/leave
1143
+ // events when trigger contains mouseenter and click, and the tip is
1144
+ // currently shown as a result of a click.
1145
+
1146
+
1147
+ if (instance.props.trigger.indexOf('mouseenter') >= 0 && instance.props.trigger.indexOf('click') >= 0 && ['mouseleave', 'mousemove'].indexOf(event.type) >= 0 && isVisibleFromClick) {
1148
+ return;
1149
+ }
1150
+
1151
+ var delay = getDelay(false);
1152
+
1153
+ if (delay) {
1154
+ hideTimeout = setTimeout(function () {
1155
+ if (instance.state.isVisible) {
1156
+ instance.hide();
1157
+ }
1158
+ }, delay);
1159
+ } else {
1160
+ // Fixes a `transitionend` problem when it fires 1 frame too
1161
+ // late sometimes, we don't want hide() to be called.
1162
+ scheduleHideAnimationFrame = requestAnimationFrame(function () {
1163
+ instance.hide();
1164
+ });
1165
+ }
1166
+ } // ===========================================================================
1167
+ // 🔑 Public methods
1168
+ // ===========================================================================
1169
+
1170
+
1171
+ function enable() {
1172
+ instance.state.isEnabled = true;
1173
+ }
1174
+
1175
+ function disable() {
1176
+ // Disabling the instance should also hide it
1177
+ // https://github.com/atomiks/tippy.js-react/issues/106
1178
+ instance.hide();
1179
+ instance.state.isEnabled = false;
1180
+ }
1181
+
1182
+ function clearDelayTimeouts() {
1183
+ clearTimeout(showTimeout);
1184
+ clearTimeout(hideTimeout);
1185
+ cancelAnimationFrame(scheduleHideAnimationFrame);
1186
+ }
1187
+
1188
+ function setProps(partialProps) {
1189
+ /* istanbul ignore else */
1190
+ {
1191
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('setProps'));
1192
+ }
1193
+
1194
+ if (instance.state.isDestroyed) {
1195
+ return;
1196
+ }
1197
+
1198
+ invokeHook('onBeforeUpdate', [instance, partialProps]);
1199
+ removeListeners();
1200
+ var prevProps = instance.props;
1201
+ var nextProps = evaluateProps(reference, Object.assign({}, prevProps, removeUndefinedProps(partialProps), {
1202
+ ignoreAttributes: true
1203
+ }));
1204
+ instance.props = nextProps;
1205
+ addListeners();
1206
+
1207
+ if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {
1208
+ cleanupInteractiveMouseListeners();
1209
+ debouncedOnMouseMove = debounce(onMouseMove, nextProps.interactiveDebounce);
1210
+ } // Ensure stale aria-expanded attributes are removed
1211
+
1212
+
1213
+ if (prevProps.triggerTarget && !nextProps.triggerTarget) {
1214
+ normalizeToArray(prevProps.triggerTarget).forEach(function (node) {
1215
+ node.removeAttribute('aria-expanded');
1216
+ });
1217
+ } else if (nextProps.triggerTarget) {
1218
+ reference.removeAttribute('aria-expanded');
1219
+ }
1220
+
1221
+ handleAriaExpandedAttribute();
1222
+ handleStyles();
1223
+
1224
+ if (onUpdate) {
1225
+ onUpdate(prevProps, nextProps);
1226
+ }
1227
+
1228
+ if (instance.popperInstance) {
1229
+ createPopperInstance(); // Fixes an issue with nested tippies if they are all getting re-rendered,
1230
+ // and the nested ones get re-rendered first.
1231
+ // https://github.com/atomiks/tippyjs-react/issues/177
1232
+ // TODO: find a cleaner / more efficient solution(!)
1233
+
1234
+ getNestedPopperTree().forEach(function (nestedPopper) {
1235
+ // React (and other UI libs likely) requires a rAF wrapper as it flushes
1236
+ // its work in one
1237
+ requestAnimationFrame(nestedPopper._tippy.popperInstance.forceUpdate);
1238
+ });
1239
+ }
1240
+
1241
+ invokeHook('onAfterUpdate', [instance, partialProps]);
1242
+ }
1243
+
1244
+ function setContent(content) {
1245
+ instance.setProps({
1246
+ content: content
1247
+ });
1248
+ }
1249
+
1250
+ function show() {
1251
+ /* istanbul ignore else */
1252
+ {
1253
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('show'));
1254
+ } // Early bail-out
1255
+
1256
+
1257
+ var isAlreadyVisible = instance.state.isVisible;
1258
+ var isDestroyed = instance.state.isDestroyed;
1259
+ var isDisabled = !instance.state.isEnabled;
1260
+ var isTouchAndTouchDisabled = currentInput.isTouch && !instance.props.touch;
1261
+ var duration = getValueAtIndexOrReturn(instance.props.duration, 0, defaultProps.duration);
1262
+
1263
+ if (isAlreadyVisible || isDestroyed || isDisabled || isTouchAndTouchDisabled) {
1264
+ return;
1265
+ } // Normalize `disabled` behavior across browsers.
1266
+ // Firefox allows events on disabled elements, but Chrome doesn't.
1267
+ // Using a wrapper element (i.e. <span>) is recommended.
1268
+
1269
+
1270
+ if (getCurrentTarget().hasAttribute('disabled')) {
1271
+ return;
1272
+ }
1273
+
1274
+ invokeHook('onShow', [instance], false);
1275
+
1276
+ if (instance.props.onShow(instance) === false) {
1277
+ return;
1278
+ }
1279
+
1280
+ instance.state.isVisible = true;
1281
+
1282
+ if (getIsDefaultRenderFn()) {
1283
+ popper.style.visibility = 'visible';
1284
+ }
1285
+
1286
+ handleStyles();
1287
+ addDocumentPress();
1288
+
1289
+ if (!instance.state.isMounted) {
1290
+ popper.style.transition = 'none';
1291
+ } // If flipping to the opposite side after hiding at least once, the
1292
+ // animation will use the wrong placement without resetting the duration
1293
+
1294
+
1295
+ if (getIsDefaultRenderFn()) {
1296
+ var _getDefaultTemplateCh2 = getDefaultTemplateChildren(),
1297
+ box = _getDefaultTemplateCh2.box,
1298
+ content = _getDefaultTemplateCh2.content;
1299
+
1300
+ setTransitionDuration([box, content], 0);
1301
+ }
1302
+
1303
+ onFirstUpdate = function onFirstUpdate() {
1304
+ var _instance$popperInsta2;
1305
+
1306
+ if (!instance.state.isVisible || ignoreOnFirstUpdate) {
1307
+ return;
1308
+ }
1309
+
1310
+ ignoreOnFirstUpdate = true; // reflow
1311
+
1312
+ void popper.offsetHeight;
1313
+ popper.style.transition = instance.props.moveTransition;
1314
+
1315
+ if (getIsDefaultRenderFn() && instance.props.animation) {
1316
+ var _getDefaultTemplateCh3 = getDefaultTemplateChildren(),
1317
+ _box = _getDefaultTemplateCh3.box,
1318
+ _content = _getDefaultTemplateCh3.content;
1319
+
1320
+ setTransitionDuration([_box, _content], duration);
1321
+ setVisibilityState([_box, _content], 'visible');
1322
+ }
1323
+
1324
+ handleAriaContentAttribute();
1325
+ handleAriaExpandedAttribute();
1326
+ pushIfUnique(mountedInstances, instance); // certain modifiers (e.g. `maxSize`) require a second update after the
1327
+ // popper has been positioned for the first time
1328
+
1329
+ (_instance$popperInsta2 = instance.popperInstance) == null ? void 0 : _instance$popperInsta2.forceUpdate();
1330
+ invokeHook('onMount', [instance]);
1331
+
1332
+ if (instance.props.animation && getIsDefaultRenderFn()) {
1333
+ onTransitionedIn(duration, function () {
1334
+ instance.state.isShown = true;
1335
+ invokeHook('onShown', [instance]);
1336
+ });
1337
+ }
1338
+ };
1339
+
1340
+ mount();
1341
+ }
1342
+
1343
+ function hide() {
1344
+ /* istanbul ignore else */
1345
+ {
1346
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('hide'));
1347
+ } // Early bail-out
1348
+
1349
+
1350
+ var isAlreadyHidden = !instance.state.isVisible;
1351
+ var isDestroyed = instance.state.isDestroyed;
1352
+ var isDisabled = !instance.state.isEnabled;
1353
+ var duration = getValueAtIndexOrReturn(instance.props.duration, 1, defaultProps.duration);
1354
+
1355
+ if (isAlreadyHidden || isDestroyed || isDisabled) {
1356
+ return;
1357
+ }
1358
+
1359
+ invokeHook('onHide', [instance], false);
1360
+
1361
+ if (instance.props.onHide(instance) === false) {
1362
+ return;
1363
+ }
1364
+
1365
+ instance.state.isVisible = false;
1366
+ instance.state.isShown = false;
1367
+ ignoreOnFirstUpdate = false;
1368
+ isVisibleFromClick = false;
1369
+
1370
+ if (getIsDefaultRenderFn()) {
1371
+ popper.style.visibility = 'hidden';
1372
+ }
1373
+
1374
+ cleanupInteractiveMouseListeners();
1375
+ removeDocumentPress();
1376
+ handleStyles(true);
1377
+
1378
+ if (getIsDefaultRenderFn()) {
1379
+ var _getDefaultTemplateCh4 = getDefaultTemplateChildren(),
1380
+ box = _getDefaultTemplateCh4.box,
1381
+ content = _getDefaultTemplateCh4.content;
1382
+
1383
+ if (instance.props.animation) {
1384
+ setTransitionDuration([box, content], duration);
1385
+ setVisibilityState([box, content], 'hidden');
1386
+ }
1387
+ }
1388
+
1389
+ handleAriaContentAttribute();
1390
+ handleAriaExpandedAttribute();
1391
+
1392
+ if (instance.props.animation) {
1393
+ if (getIsDefaultRenderFn()) {
1394
+ onTransitionedOut(duration, instance.unmount);
1395
+ }
1396
+ } else {
1397
+ instance.unmount();
1398
+ }
1399
+ }
1400
+
1401
+ function hideWithInteractivity(event) {
1402
+ /* istanbul ignore else */
1403
+ {
1404
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('hideWithInteractivity'));
1405
+ }
1406
+
1407
+ getDocument().addEventListener('mousemove', debouncedOnMouseMove);
1408
+ pushIfUnique(mouseMoveListeners, debouncedOnMouseMove);
1409
+ debouncedOnMouseMove(event);
1410
+ }
1411
+
1412
+ function unmount() {
1413
+ /* istanbul ignore else */
1414
+ {
1415
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('unmount'));
1416
+ }
1417
+
1418
+ if (instance.state.isVisible) {
1419
+ instance.hide();
1420
+ }
1421
+
1422
+ if (!instance.state.isMounted) {
1423
+ return;
1424
+ }
1425
+
1426
+ destroyPopperInstance(); // If a popper is not interactive, it will be appended outside the popper
1427
+ // tree by default. This seems mainly for interactive tippies, but we should
1428
+ // find a workaround if possible
1429
+
1430
+ getNestedPopperTree().forEach(function (nestedPopper) {
1431
+ nestedPopper._tippy.unmount();
1432
+ });
1433
+
1434
+ if (popper.parentNode) {
1435
+ popper.parentNode.removeChild(popper);
1436
+ }
1437
+
1438
+ mountedInstances = mountedInstances.filter(function (i) {
1439
+ return i !== instance;
1440
+ });
1441
+ instance.state.isMounted = false;
1442
+ invokeHook('onHidden', [instance]);
1443
+ }
1444
+
1445
+ function destroy() {
1446
+ /* istanbul ignore else */
1447
+ {
1448
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('destroy'));
1449
+ }
1450
+
1451
+ if (instance.state.isDestroyed) {
1452
+ return;
1453
+ }
1454
+
1455
+ instance.clearDelayTimeouts();
1456
+ instance.unmount();
1457
+ removeListeners();
1458
+ delete reference._tippy;
1459
+ instance.state.isDestroyed = true;
1460
+ invokeHook('onDestroy', [instance]);
1461
+ }
1462
+ }
1463
+
1464
+ function tippy(targets, optionalProps) {
1465
+ if (optionalProps === void 0) {
1466
+ optionalProps = {};
1467
+ }
1468
+
1469
+ var plugins = defaultProps.plugins.concat(optionalProps.plugins || []);
1470
+ /* istanbul ignore else */
1471
+
1472
+ {
1473
+ validateTargets(targets);
1474
+ validateProps(optionalProps, plugins);
1475
+ }
1476
+
1477
+ bindGlobalEventListeners();
1478
+ var passedProps = Object.assign({}, optionalProps, {
1479
+ plugins: plugins
1480
+ });
1481
+ var elements = getArrayOfElements(targets);
1482
+ /* istanbul ignore else */
1483
+
1484
+ {
1485
+ var isSingleContentElement = isElement(passedProps.content);
1486
+ var isMoreThanOneReferenceElement = elements.length > 1;
1487
+ warnWhen(isSingleContentElement && isMoreThanOneReferenceElement, ['tippy() was passed an Element as the `content` prop, but more than', 'one tippy instance was created by this invocation. This means the', 'content element will only be appended to the last tippy instance.', '\n\n', 'Instead, pass the .innerHTML of the element, or use a function that', 'returns a cloned version of the element instead.', '\n\n', '1) content: element.innerHTML\n', '2) content: () => element.cloneNode(true)'].join(' '));
1488
+ }
1489
+
1490
+ var instances = elements.reduce(function (acc, reference) {
1491
+ var instance = reference && createTippy(reference, passedProps);
1492
+
1493
+ if (instance) {
1494
+ acc.push(instance);
1495
+ }
1496
+
1497
+ return acc;
1498
+ }, []);
1499
+ return isElement(targets) ? instances[0] : instances;
1500
+ }
1501
+
1502
+ tippy.defaultProps = defaultProps;
1503
+ tippy.setDefaultProps = setDefaultProps;
1504
+ tippy.currentInput = currentInput;
1505
+ var hideAll = function hideAll(_temp) {
1506
+ var _ref = _temp === void 0 ? {} : _temp,
1507
+ excludedReferenceOrInstance = _ref.exclude,
1508
+ duration = _ref.duration;
1509
+
1510
+ mountedInstances.forEach(function (instance) {
1511
+ var isExcluded = false;
1512
+
1513
+ if (excludedReferenceOrInstance) {
1514
+ isExcluded = isReferenceElement(excludedReferenceOrInstance) ? instance.reference === excludedReferenceOrInstance : instance.popper === excludedReferenceOrInstance.popper;
1515
+ }
1516
+
1517
+ if (!isExcluded) {
1518
+ var originalDuration = instance.props.duration;
1519
+ instance.setProps({
1520
+ duration: duration
1521
+ });
1522
+ instance.hide();
1523
+
1524
+ if (!instance.state.isDestroyed) {
1525
+ instance.setProps({
1526
+ duration: originalDuration
1527
+ });
1528
+ }
1529
+ }
1530
+ });
1531
+ };
1532
+
1533
+ // every time the popper is destroyed (i.e. a new target), removing the styles
1534
+ // and causing transitions to break for singletons when the console is open, but
1535
+ // most notably for non-transform styles being used, `gpuAcceleration: false`.
1536
+
1537
+ var applyStylesModifier = Object.assign({}, core.applyStyles, {
1538
+ effect: function effect(_ref) {
1539
+ var state = _ref.state;
1540
+ var initialStyles = {
1541
+ popper: {
1542
+ position: state.options.strategy,
1543
+ left: '0',
1544
+ top: '0',
1545
+ margin: '0'
1546
+ },
1547
+ arrow: {
1548
+ position: 'absolute'
1549
+ },
1550
+ reference: {}
1551
+ };
1552
+ Object.assign(state.elements.popper.style, initialStyles.popper);
1553
+ state.styles = initialStyles;
1554
+
1555
+ if (state.elements.arrow) {
1556
+ Object.assign(state.elements.arrow.style, initialStyles.arrow);
1557
+ } // intentionally return no cleanup function
1558
+ // return () => { ... }
1559
+
1560
+ }
1561
+ });
1562
+
1563
+ var createSingleton = function createSingleton(tippyInstances, optionalProps) {
1564
+ var _optionalProps$popper;
1565
+
1566
+ if (optionalProps === void 0) {
1567
+ optionalProps = {};
1568
+ }
1569
+
1570
+ /* istanbul ignore else */
1571
+ {
1572
+ errorWhen(!Array.isArray(tippyInstances), ['The first argument passed to createSingleton() must be an array of', 'tippy instances. The passed value was', String(tippyInstances)].join(' '));
1573
+ }
1574
+
1575
+ var individualInstances = tippyInstances;
1576
+ var references = [];
1577
+ var triggerTargets = [];
1578
+ var currentTarget;
1579
+ var overrides = optionalProps.overrides;
1580
+ var interceptSetPropsCleanups = [];
1581
+ var shownOnCreate = false;
1582
+
1583
+ function setTriggerTargets() {
1584
+ triggerTargets = individualInstances.map(function (instance) {
1585
+ return normalizeToArray(instance.props.triggerTarget || instance.reference);
1586
+ }).reduce(function (acc, item) {
1587
+ return acc.concat(item);
1588
+ }, []);
1589
+ }
1590
+
1591
+ function setReferences() {
1592
+ references = individualInstances.map(function (instance) {
1593
+ return instance.reference;
1594
+ });
1595
+ }
1596
+
1597
+ function enableInstances(isEnabled) {
1598
+ individualInstances.forEach(function (instance) {
1599
+ if (isEnabled) {
1600
+ instance.enable();
1601
+ } else {
1602
+ instance.disable();
1603
+ }
1604
+ });
1605
+ }
1606
+
1607
+ function interceptSetProps(singleton) {
1608
+ return individualInstances.map(function (instance) {
1609
+ var originalSetProps = instance.setProps;
1610
+
1611
+ instance.setProps = function (props) {
1612
+ originalSetProps(props);
1613
+
1614
+ if (instance.reference === currentTarget) {
1615
+ singleton.setProps(props);
1616
+ }
1617
+ };
1618
+
1619
+ return function () {
1620
+ instance.setProps = originalSetProps;
1621
+ };
1622
+ });
1623
+ } // have to pass singleton, as it maybe undefined on first call
1624
+
1625
+
1626
+ function prepareInstance(singleton, target) {
1627
+ var index = triggerTargets.indexOf(target); // bail-out
1628
+
1629
+ if (target === currentTarget) {
1630
+ return;
1631
+ }
1632
+
1633
+ currentTarget = target;
1634
+ var overrideProps = (overrides || []).concat('content').reduce(function (acc, prop) {
1635
+ acc[prop] = individualInstances[index].props[prop];
1636
+ return acc;
1637
+ }, {});
1638
+ singleton.setProps(Object.assign({}, overrideProps, {
1639
+ getReferenceClientRect: typeof overrideProps.getReferenceClientRect === 'function' ? overrideProps.getReferenceClientRect : function () {
1640
+ var _references$index;
1641
+
1642
+ return (_references$index = references[index]) == null ? void 0 : _references$index.getBoundingClientRect();
1643
+ }
1644
+ }));
1645
+ }
1646
+
1647
+ enableInstances(false);
1648
+ setReferences();
1649
+ setTriggerTargets();
1650
+ var plugin = {
1651
+ fn: function fn() {
1652
+ return {
1653
+ onDestroy: function onDestroy() {
1654
+ enableInstances(true);
1655
+ },
1656
+ onHidden: function onHidden() {
1657
+ currentTarget = null;
1658
+ },
1659
+ onClickOutside: function onClickOutside(instance) {
1660
+ if (instance.props.showOnCreate && !shownOnCreate) {
1661
+ shownOnCreate = true;
1662
+ currentTarget = null;
1663
+ }
1664
+ },
1665
+ onShow: function onShow(instance) {
1666
+ if (instance.props.showOnCreate && !shownOnCreate) {
1667
+ shownOnCreate = true;
1668
+ prepareInstance(instance, references[0]);
1669
+ }
1670
+ },
1671
+ onTrigger: function onTrigger(instance, event) {
1672
+ prepareInstance(instance, event.currentTarget);
1673
+ }
1674
+ };
1675
+ }
1676
+ };
1677
+ var singleton = tippy(div(), Object.assign({}, removeProperties(optionalProps, ['overrides']), {
1678
+ plugins: [plugin].concat(optionalProps.plugins || []),
1679
+ triggerTarget: triggerTargets,
1680
+ popperOptions: Object.assign({}, optionalProps.popperOptions, {
1681
+ modifiers: [].concat(((_optionalProps$popper = optionalProps.popperOptions) == null ? void 0 : _optionalProps$popper.modifiers) || [], [applyStylesModifier])
1682
+ })
1683
+ }));
1684
+ var originalShow = singleton.show;
1685
+
1686
+ singleton.show = function (target) {
1687
+ originalShow(); // first time, showOnCreate or programmatic call with no params
1688
+ // default to showing first instance
1689
+
1690
+ if (!currentTarget && target == null) {
1691
+ return prepareInstance(singleton, references[0]);
1692
+ } // triggered from event (do nothing as prepareInstance already called by onTrigger)
1693
+ // programmatic call with no params when already visible (do nothing again)
1694
+
1695
+
1696
+ if (currentTarget && target == null) {
1697
+ return;
1698
+ } // target is index of instance
1699
+
1700
+
1701
+ if (typeof target === 'number') {
1702
+ return references[target] && prepareInstance(singleton, references[target]);
1703
+ } // target is a child tippy instance
1704
+
1705
+
1706
+ if (individualInstances.indexOf(target) >= 0) {
1707
+ var ref = target.reference;
1708
+ return prepareInstance(singleton, ref);
1709
+ } // target is a ReferenceElement
1710
+
1711
+
1712
+ if (references.indexOf(target) >= 0) {
1713
+ return prepareInstance(singleton, target);
1714
+ }
1715
+ };
1716
+
1717
+ singleton.showNext = function () {
1718
+ var first = references[0];
1719
+
1720
+ if (!currentTarget) {
1721
+ return singleton.show(0);
1722
+ }
1723
+
1724
+ var index = references.indexOf(currentTarget);
1725
+ singleton.show(references[index + 1] || first);
1726
+ };
1727
+
1728
+ singleton.showPrevious = function () {
1729
+ var last = references[references.length - 1];
1730
+
1731
+ if (!currentTarget) {
1732
+ return singleton.show(last);
1733
+ }
1734
+
1735
+ var index = references.indexOf(currentTarget);
1736
+ var target = references[index - 1] || last;
1737
+ singleton.show(target);
1738
+ };
1739
+
1740
+ var originalSetProps = singleton.setProps;
1741
+
1742
+ singleton.setProps = function (props) {
1743
+ overrides = props.overrides || overrides;
1744
+ originalSetProps(props);
1745
+ };
1746
+
1747
+ singleton.setInstances = function (nextInstances) {
1748
+ enableInstances(true);
1749
+ interceptSetPropsCleanups.forEach(function (fn) {
1750
+ return fn();
1751
+ });
1752
+ individualInstances = nextInstances;
1753
+ enableInstances(false);
1754
+ setReferences();
1755
+ setTriggerTargets();
1756
+ interceptSetPropsCleanups = interceptSetProps(singleton);
1757
+ singleton.setProps({
1758
+ triggerTarget: triggerTargets
1759
+ });
1760
+ };
1761
+
1762
+ interceptSetPropsCleanups = interceptSetProps(singleton);
1763
+ return singleton;
1764
+ };
1765
+
1766
+ var BUBBLING_EVENTS_MAP = {
1767
+ mouseover: 'mouseenter',
1768
+ focusin: 'focus',
1769
+ click: 'click'
1770
+ };
1771
+ /**
1772
+ * Creates a delegate instance that controls the creation of tippy instances
1773
+ * for child elements (`target` CSS selector).
1774
+ */
1775
+
1776
+ function delegate(targets, props) {
1777
+ /* istanbul ignore else */
1778
+ {
1779
+ errorWhen(!(props && props.target), ['You must specity a `target` prop indicating a CSS selector string matching', 'the target elements that should receive a tippy.'].join(' '));
1780
+ }
1781
+
1782
+ var listeners = [];
1783
+ var childTippyInstances = [];
1784
+ var disabled = false;
1785
+ var target = props.target;
1786
+ var nativeProps = removeProperties(props, ['target']);
1787
+ var parentProps = Object.assign({}, nativeProps, {
1788
+ trigger: 'manual',
1789
+ touch: false
1790
+ });
1791
+ var childProps = Object.assign({
1792
+ touch: defaultProps.touch
1793
+ }, nativeProps, {
1794
+ showOnCreate: true
1795
+ });
1796
+ var returnValue = tippy(targets, parentProps);
1797
+ var normalizedReturnValue = normalizeToArray(returnValue);
1798
+
1799
+ function onTrigger(event) {
1800
+ if (!event.target || disabled) {
1801
+ return;
1802
+ }
1803
+
1804
+ var targetNode = event.target.closest(target);
1805
+
1806
+ if (!targetNode) {
1807
+ return;
1808
+ } // Get relevant trigger with fallbacks:
1809
+ // 1. Check `data-tippy-trigger` attribute on target node
1810
+ // 2. Fallback to `trigger` passed to `delegate()`
1811
+ // 3. Fallback to `defaultProps.trigger`
1812
+
1813
+
1814
+ var trigger = targetNode.getAttribute('data-tippy-trigger') || props.trigger || defaultProps.trigger; // @ts-ignore
1815
+
1816
+ if (targetNode._tippy) {
1817
+ return;
1818
+ }
1819
+
1820
+ if (event.type === 'touchstart' && typeof childProps.touch === 'boolean') {
1821
+ return;
1822
+ }
1823
+
1824
+ if (event.type !== 'touchstart' && trigger.indexOf(BUBBLING_EVENTS_MAP[event.type]) < 0) {
1825
+ return;
1826
+ }
1827
+
1828
+ var instance = tippy(targetNode, childProps);
1829
+
1830
+ if (instance) {
1831
+ childTippyInstances = childTippyInstances.concat(instance);
1832
+ }
1833
+ }
1834
+
1835
+ function on(node, eventType, handler, options) {
1836
+ if (options === void 0) {
1837
+ options = false;
1838
+ }
1839
+
1840
+ node.addEventListener(eventType, handler, options);
1841
+ listeners.push({
1842
+ node: node,
1843
+ eventType: eventType,
1844
+ handler: handler,
1845
+ options: options
1846
+ });
1847
+ }
1848
+
1849
+ function addEventListeners(instance) {
1850
+ var reference = instance.reference;
1851
+ on(reference, 'touchstart', onTrigger, TOUCH_OPTIONS);
1852
+ on(reference, 'mouseover', onTrigger);
1853
+ on(reference, 'focusin', onTrigger);
1854
+ on(reference, 'click', onTrigger);
1855
+ }
1856
+
1857
+ function removeEventListeners() {
1858
+ listeners.forEach(function (_ref) {
1859
+ var node = _ref.node,
1860
+ eventType = _ref.eventType,
1861
+ handler = _ref.handler,
1862
+ options = _ref.options;
1863
+ node.removeEventListener(eventType, handler, options);
1864
+ });
1865
+ listeners = [];
1866
+ }
1867
+
1868
+ function applyMutations(instance) {
1869
+ var originalDestroy = instance.destroy;
1870
+ var originalEnable = instance.enable;
1871
+ var originalDisable = instance.disable;
1872
+
1873
+ instance.destroy = function (shouldDestroyChildInstances) {
1874
+ if (shouldDestroyChildInstances === void 0) {
1875
+ shouldDestroyChildInstances = true;
1876
+ }
1877
+
1878
+ if (shouldDestroyChildInstances) {
1879
+ childTippyInstances.forEach(function (instance) {
1880
+ instance.destroy();
1881
+ });
1882
+ }
1883
+
1884
+ childTippyInstances = [];
1885
+ removeEventListeners();
1886
+ originalDestroy();
1887
+ };
1888
+
1889
+ instance.enable = function () {
1890
+ originalEnable();
1891
+ childTippyInstances.forEach(function (instance) {
1892
+ return instance.enable();
1893
+ });
1894
+ disabled = false;
1895
+ };
1896
+
1897
+ instance.disable = function () {
1898
+ originalDisable();
1899
+ childTippyInstances.forEach(function (instance) {
1900
+ return instance.disable();
1901
+ });
1902
+ disabled = true;
1903
+ };
1904
+
1905
+ addEventListeners(instance);
1906
+ }
1907
+
1908
+ normalizedReturnValue.forEach(applyMutations);
1909
+ return returnValue;
1910
+ }
1911
+
1912
+ var animateFill = {
1913
+ name: 'animateFill',
1914
+ defaultValue: false,
1915
+ fn: function fn(instance) {
1916
+ var _instance$props$rende;
1917
+
1918
+ // @ts-ignore
1919
+ if (!((_instance$props$rende = instance.props.render) != null && _instance$props$rende.$$tippy)) {
1920
+ {
1921
+ errorWhen(instance.props.animateFill, 'The `animateFill` plugin requires the default render function.');
1922
+ }
1923
+
1924
+ return {};
1925
+ }
1926
+
1927
+ var _getChildren = getChildren(instance.popper),
1928
+ box = _getChildren.box,
1929
+ content = _getChildren.content;
1930
+
1931
+ var backdrop = instance.props.animateFill ? createBackdropElement() : null;
1932
+ return {
1933
+ onCreate: function onCreate() {
1934
+ if (backdrop) {
1935
+ box.insertBefore(backdrop, box.firstElementChild);
1936
+ box.setAttribute('data-animatefill', '');
1937
+ box.style.overflow = 'hidden';
1938
+ instance.setProps({
1939
+ arrow: false,
1940
+ animation: 'shift-away'
1941
+ });
1942
+ }
1943
+ },
1944
+ onMount: function onMount() {
1945
+ if (backdrop) {
1946
+ var transitionDuration = box.style.transitionDuration;
1947
+ var duration = Number(transitionDuration.replace('ms', '')); // The content should fade in after the backdrop has mostly filled the
1948
+ // tooltip element. `clip-path` is the other alternative but is not
1949
+ // well-supported and is buggy on some devices.
1950
+
1951
+ content.style.transitionDelay = Math.round(duration / 10) + "ms";
1952
+ backdrop.style.transitionDuration = transitionDuration;
1953
+ setVisibilityState([backdrop], 'visible');
1954
+ }
1955
+ },
1956
+ onShow: function onShow() {
1957
+ if (backdrop) {
1958
+ backdrop.style.transitionDuration = '0ms';
1959
+ }
1960
+ },
1961
+ onHide: function onHide() {
1962
+ if (backdrop) {
1963
+ setVisibilityState([backdrop], 'hidden');
1964
+ }
1965
+ }
1966
+ };
1967
+ }
1968
+ };
1969
+
1970
+ function createBackdropElement() {
1971
+ var backdrop = div();
1972
+ backdrop.className = BACKDROP_CLASS;
1973
+ setVisibilityState([backdrop], 'hidden');
1974
+ return backdrop;
1975
+ }
1976
+
1977
+ var mouseCoords = {
1978
+ clientX: 0,
1979
+ clientY: 0
1980
+ };
1981
+ var activeInstances = [];
1982
+
1983
+ function storeMouseCoords(_ref) {
1984
+ var clientX = _ref.clientX,
1985
+ clientY = _ref.clientY;
1986
+ mouseCoords = {
1987
+ clientX: clientX,
1988
+ clientY: clientY
1989
+ };
1990
+ }
1991
+
1992
+ function addMouseCoordsListener(doc) {
1993
+ doc.addEventListener('mousemove', storeMouseCoords);
1994
+ }
1995
+
1996
+ function removeMouseCoordsListener(doc) {
1997
+ doc.removeEventListener('mousemove', storeMouseCoords);
1998
+ }
1999
+
2000
+ var followCursor = {
2001
+ name: 'followCursor',
2002
+ defaultValue: false,
2003
+ fn: function fn(instance) {
2004
+ var reference = instance.reference;
2005
+ var doc = getOwnerDocument(instance.props.triggerTarget || reference);
2006
+ var isInternalUpdate = false;
2007
+ var wasFocusEvent = false;
2008
+ var isUnmounted = true;
2009
+ var prevProps = instance.props;
2010
+
2011
+ function getIsInitialBehavior() {
2012
+ return instance.props.followCursor === 'initial' && instance.state.isVisible;
2013
+ }
2014
+
2015
+ function addListener() {
2016
+ doc.addEventListener('mousemove', onMouseMove);
2017
+ }
2018
+
2019
+ function removeListener() {
2020
+ doc.removeEventListener('mousemove', onMouseMove);
2021
+ }
2022
+
2023
+ function unsetGetReferenceClientRect() {
2024
+ isInternalUpdate = true;
2025
+ instance.setProps({
2026
+ getReferenceClientRect: null
2027
+ });
2028
+ isInternalUpdate = false;
2029
+ }
2030
+
2031
+ function onMouseMove(event) {
2032
+ // If the instance is interactive, avoid updating the position unless it's
2033
+ // over the reference element
2034
+ var isCursorOverReference = event.target ? reference.contains(event.target) : true;
2035
+ var followCursor = instance.props.followCursor;
2036
+ var clientX = event.clientX,
2037
+ clientY = event.clientY;
2038
+ var rect = reference.getBoundingClientRect();
2039
+ var relativeX = clientX - rect.left;
2040
+ var relativeY = clientY - rect.top;
2041
+
2042
+ if (isCursorOverReference || !instance.props.interactive) {
2043
+ instance.setProps({
2044
+ // @ts-ignore - unneeded DOMRect properties
2045
+ getReferenceClientRect: function getReferenceClientRect() {
2046
+ var rect = reference.getBoundingClientRect();
2047
+ var x = clientX;
2048
+ var y = clientY;
2049
+
2050
+ if (followCursor === 'initial') {
2051
+ x = rect.left + relativeX;
2052
+ y = rect.top + relativeY;
2053
+ }
2054
+
2055
+ var top = followCursor === 'horizontal' ? rect.top : y;
2056
+ var right = followCursor === 'vertical' ? rect.right : x;
2057
+ var bottom = followCursor === 'horizontal' ? rect.bottom : y;
2058
+ var left = followCursor === 'vertical' ? rect.left : x;
2059
+ return {
2060
+ width: right - left,
2061
+ height: bottom - top,
2062
+ top: top,
2063
+ right: right,
2064
+ bottom: bottom,
2065
+ left: left
2066
+ };
2067
+ }
2068
+ });
2069
+ }
2070
+ }
2071
+
2072
+ function create() {
2073
+ if (instance.props.followCursor) {
2074
+ activeInstances.push({
2075
+ instance: instance,
2076
+ doc: doc
2077
+ });
2078
+ addMouseCoordsListener(doc);
2079
+ }
2080
+ }
2081
+
2082
+ function destroy() {
2083
+ activeInstances = activeInstances.filter(function (data) {
2084
+ return data.instance !== instance;
2085
+ });
2086
+
2087
+ if (activeInstances.filter(function (data) {
2088
+ return data.doc === doc;
2089
+ }).length === 0) {
2090
+ removeMouseCoordsListener(doc);
2091
+ }
2092
+ }
2093
+
2094
+ return {
2095
+ onCreate: create,
2096
+ onDestroy: destroy,
2097
+ onBeforeUpdate: function onBeforeUpdate() {
2098
+ prevProps = instance.props;
2099
+ },
2100
+ onAfterUpdate: function onAfterUpdate(_, _ref2) {
2101
+ var followCursor = _ref2.followCursor;
2102
+
2103
+ if (isInternalUpdate) {
2104
+ return;
2105
+ }
2106
+
2107
+ if (followCursor !== undefined && prevProps.followCursor !== followCursor) {
2108
+ destroy();
2109
+
2110
+ if (followCursor) {
2111
+ create();
2112
+
2113
+ if (instance.state.isMounted && !wasFocusEvent && !getIsInitialBehavior()) {
2114
+ addListener();
2115
+ }
2116
+ } else {
2117
+ removeListener();
2118
+ unsetGetReferenceClientRect();
2119
+ }
2120
+ }
2121
+ },
2122
+ onMount: function onMount() {
2123
+ if (instance.props.followCursor && !wasFocusEvent) {
2124
+ if (isUnmounted) {
2125
+ onMouseMove(mouseCoords);
2126
+ isUnmounted = false;
2127
+ }
2128
+
2129
+ if (!getIsInitialBehavior()) {
2130
+ addListener();
2131
+ }
2132
+ }
2133
+ },
2134
+ onTrigger: function onTrigger(_, event) {
2135
+ if (isMouseEvent(event)) {
2136
+ mouseCoords = {
2137
+ clientX: event.clientX,
2138
+ clientY: event.clientY
2139
+ };
2140
+ }
2141
+
2142
+ wasFocusEvent = event.type === 'focus';
2143
+ },
2144
+ onHidden: function onHidden() {
2145
+ if (instance.props.followCursor) {
2146
+ unsetGetReferenceClientRect();
2147
+ removeListener();
2148
+ isUnmounted = true;
2149
+ }
2150
+ }
2151
+ };
2152
+ }
2153
+ };
2154
+
2155
+ function getProps(props, modifier) {
2156
+ var _props$popperOptions;
2157
+
2158
+ return {
2159
+ popperOptions: Object.assign({}, props.popperOptions, {
2160
+ modifiers: [].concat((((_props$popperOptions = props.popperOptions) == null ? void 0 : _props$popperOptions.modifiers) || []).filter(function (_ref) {
2161
+ var name = _ref.name;
2162
+ return name !== modifier.name;
2163
+ }), [modifier])
2164
+ })
2165
+ };
2166
+ }
2167
+
2168
+ var inlinePositioning = {
2169
+ name: 'inlinePositioning',
2170
+ defaultValue: false,
2171
+ fn: function fn(instance) {
2172
+ var reference = instance.reference;
2173
+
2174
+ function isEnabled() {
2175
+ return !!instance.props.inlinePositioning;
2176
+ }
2177
+
2178
+ var placement;
2179
+ var cursorRectIndex = -1;
2180
+ var isInternalUpdate = false;
2181
+ var triedPlacements = [];
2182
+ var modifier = {
2183
+ name: 'tippyInlinePositioning',
2184
+ enabled: true,
2185
+ phase: 'afterWrite',
2186
+ fn: function fn(_ref2) {
2187
+ var state = _ref2.state;
2188
+
2189
+ if (isEnabled()) {
2190
+ if (triedPlacements.indexOf(state.placement) !== -1) {
2191
+ triedPlacements = [];
2192
+ }
2193
+
2194
+ if (placement !== state.placement && triedPlacements.indexOf(state.placement) === -1) {
2195
+ triedPlacements.push(state.placement);
2196
+ instance.setProps({
2197
+ // @ts-ignore - unneeded DOMRect properties
2198
+ getReferenceClientRect: function getReferenceClientRect() {
2199
+ return _getReferenceClientRect(state.placement);
2200
+ }
2201
+ });
2202
+ }
2203
+
2204
+ placement = state.placement;
2205
+ }
2206
+ }
2207
+ };
2208
+
2209
+ function _getReferenceClientRect(placement) {
2210
+ return getInlineBoundingClientRect(getBasePlacement(placement), reference.getBoundingClientRect(), arrayFrom(reference.getClientRects()), cursorRectIndex);
2211
+ }
2212
+
2213
+ function setInternalProps(partialProps) {
2214
+ isInternalUpdate = true;
2215
+ instance.setProps(partialProps);
2216
+ isInternalUpdate = false;
2217
+ }
2218
+
2219
+ function addModifier() {
2220
+ if (!isInternalUpdate) {
2221
+ setInternalProps(getProps(instance.props, modifier));
2222
+ }
2223
+ }
2224
+
2225
+ return {
2226
+ onCreate: addModifier,
2227
+ onAfterUpdate: addModifier,
2228
+ onTrigger: function onTrigger(_, event) {
2229
+ if (isMouseEvent(event)) {
2230
+ var rects = arrayFrom(instance.reference.getClientRects());
2231
+ var cursorRect = rects.find(function (rect) {
2232
+ return rect.left - 2 <= event.clientX && rect.right + 2 >= event.clientX && rect.top - 2 <= event.clientY && rect.bottom + 2 >= event.clientY;
2233
+ });
2234
+ var index = rects.indexOf(cursorRect);
2235
+ cursorRectIndex = index > -1 ? index : cursorRectIndex;
2236
+ }
2237
+ },
2238
+ onHidden: function onHidden() {
2239
+ cursorRectIndex = -1;
2240
+ }
2241
+ };
2242
+ }
2243
+ };
2244
+ function getInlineBoundingClientRect(currentBasePlacement, boundingRect, clientRects, cursorRectIndex) {
2245
+ // Not an inline element, or placement is not yet known
2246
+ if (clientRects.length < 2 || currentBasePlacement === null) {
2247
+ return boundingRect;
2248
+ } // There are two rects and they are disjoined
2249
+
2250
+
2251
+ if (clientRects.length === 2 && cursorRectIndex >= 0 && clientRects[0].left > clientRects[1].right) {
2252
+ return clientRects[cursorRectIndex] || boundingRect;
2253
+ }
2254
+
2255
+ switch (currentBasePlacement) {
2256
+ case 'top':
2257
+ case 'bottom':
2258
+ {
2259
+ var firstRect = clientRects[0];
2260
+ var lastRect = clientRects[clientRects.length - 1];
2261
+ var isTop = currentBasePlacement === 'top';
2262
+ var top = firstRect.top;
2263
+ var bottom = lastRect.bottom;
2264
+ var left = isTop ? firstRect.left : lastRect.left;
2265
+ var right = isTop ? firstRect.right : lastRect.right;
2266
+ var width = right - left;
2267
+ var height = bottom - top;
2268
+ return {
2269
+ top: top,
2270
+ bottom: bottom,
2271
+ left: left,
2272
+ right: right,
2273
+ width: width,
2274
+ height: height
2275
+ };
2276
+ }
2277
+
2278
+ case 'left':
2279
+ case 'right':
2280
+ {
2281
+ var minLeft = Math.min.apply(Math, clientRects.map(function (rects) {
2282
+ return rects.left;
2283
+ }));
2284
+ var maxRight = Math.max.apply(Math, clientRects.map(function (rects) {
2285
+ return rects.right;
2286
+ }));
2287
+ var measureRects = clientRects.filter(function (rect) {
2288
+ return currentBasePlacement === 'left' ? rect.left === minLeft : rect.right === maxRight;
2289
+ });
2290
+ var _top = measureRects[0].top;
2291
+ var _bottom = measureRects[measureRects.length - 1].bottom;
2292
+ var _left = minLeft;
2293
+ var _right = maxRight;
2294
+
2295
+ var _width = _right - _left;
2296
+
2297
+ var _height = _bottom - _top;
2298
+
2299
+ return {
2300
+ top: _top,
2301
+ bottom: _bottom,
2302
+ left: _left,
2303
+ right: _right,
2304
+ width: _width,
2305
+ height: _height
2306
+ };
2307
+ }
2308
+
2309
+ default:
2310
+ {
2311
+ return boundingRect;
2312
+ }
2313
+ }
2314
+ }
2315
+
2316
+ var sticky = {
2317
+ name: 'sticky',
2318
+ defaultValue: false,
2319
+ fn: function fn(instance) {
2320
+ var reference = instance.reference,
2321
+ popper = instance.popper;
2322
+
2323
+ function getReference() {
2324
+ return instance.popperInstance ? instance.popperInstance.state.elements.reference : reference;
2325
+ }
2326
+
2327
+ function shouldCheck(value) {
2328
+ return instance.props.sticky === true || instance.props.sticky === value;
2329
+ }
2330
+
2331
+ var prevRefRect = null;
2332
+ var prevPopRect = null;
2333
+
2334
+ function updatePosition() {
2335
+ var currentRefRect = shouldCheck('reference') ? getReference().getBoundingClientRect() : null;
2336
+ var currentPopRect = shouldCheck('popper') ? popper.getBoundingClientRect() : null;
2337
+
2338
+ if (currentRefRect && areRectsDifferent(prevRefRect, currentRefRect) || currentPopRect && areRectsDifferent(prevPopRect, currentPopRect)) {
2339
+ if (instance.popperInstance) {
2340
+ instance.popperInstance.update();
2341
+ }
2342
+ }
2343
+
2344
+ prevRefRect = currentRefRect;
2345
+ prevPopRect = currentPopRect;
2346
+
2347
+ if (instance.state.isMounted) {
2348
+ requestAnimationFrame(updatePosition);
2349
+ }
2350
+ }
2351
+
2352
+ return {
2353
+ onMount: function onMount() {
2354
+ if (instance.props.sticky) {
2355
+ updatePosition();
2356
+ }
2357
+ }
2358
+ };
2359
+ }
2360
+ };
2361
+
2362
+ function areRectsDifferent(rectA, rectB) {
2363
+ if (rectA && rectB) {
2364
+ return rectA.top !== rectB.top || rectA.right !== rectB.right || rectA.bottom !== rectB.bottom || rectA.left !== rectB.left;
2365
+ }
2366
+
2367
+ return true;
2368
+ }
2369
+
2370
+ tippy.setDefaultProps({
2371
+ plugins: [animateFill, followCursor, inlinePositioning, sticky],
2372
+ animation: false
2373
+ });
2374
+ tippy.createSingleton = createSingleton;
2375
+ tippy.delegate = delegate;
2376
+ tippy.hideAll = hideAll;
2377
+ tippy.roundArrow = ROUND_ARROW;
2378
+
2379
+ return tippy;
2380
+
2381
+ })));
2382
+ //# sourceMappingURL=tippy-headless.umd.js.map