@sparkle-learning/core 0.0.57 → 0.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1100) hide show
  1. package/dist/cjs/PrivateRoute-f97245ce.js +217 -0
  2. package/dist/cjs/active-router-f9e18bd8.js +75 -0
  3. package/dist/cjs/animation-ee586546.js +986 -0
  4. package/dist/cjs/app-globals-33c9f31b.js +9 -0
  5. package/dist/cjs/appdata.service-c8d71e05.js +73 -0
  6. package/dist/cjs/assets.service-bfa75092.js +50 -0
  7. package/dist/cjs/assignment.service-690fb59c.js +19 -0
  8. package/dist/cjs/auth.store-1e630a7d.js +3392 -0
  9. package/dist/cjs/compass-svg.cjs.entry.js +132 -0
  10. package/dist/cjs/context-consumer.cjs.entry.js +29 -0
  11. package/dist/cjs/course-select.cjs.entry.js +30 -0
  12. package/dist/cjs/cubic-bezier-53d26d05.js +93 -0
  13. package/dist/cjs/dir-5af5259a.js +20 -0
  14. package/dist/cjs/environment-config.service-c8ff1f3d.js +28 -0
  15. package/dist/cjs/facilitator.service-ff0e1659.js +95 -0
  16. package/dist/cjs/feed.service-8eca4de6.js +57 -0
  17. package/dist/cjs/focus-visible-b0b07ba6.js +76 -0
  18. package/dist/cjs/framework-delegate-59a98abd.js +111 -0
  19. package/dist/cjs/gesture-controller-0eb5579e.js +196 -0
  20. package/dist/cjs/haptic-780f33c4.js +116 -0
  21. package/dist/cjs/hardware-back-button-92d97ff8.js +76 -0
  22. package/dist/cjs/header-mobile-collapse_61.cjs.entry.js +15124 -0
  23. package/dist/cjs/helpers-c2496722.js +425 -0
  24. package/dist/cjs/httpService-d2e7bf8f.js +687 -0
  25. package/dist/cjs/icons-fda820af.js +26 -0
  26. package/dist/cjs/index-12082cba.js +465 -0
  27. package/dist/cjs/index-15ea05f5.js +314 -0
  28. package/dist/cjs/index-51e8292e.js +1928 -0
  29. package/dist/cjs/index-787d4498.js +232 -0
  30. package/dist/cjs/index-8b5629a6.js +186 -0
  31. package/dist/cjs/index-975586fd.js +48 -0
  32. package/dist/cjs/index-9c7b27e4.js +140 -0
  33. package/dist/cjs/index-af080b50.js +139 -0
  34. package/dist/cjs/index-e56e09b8.js +38 -0
  35. package/dist/cjs/index.cjs.js +26 -0
  36. package/dist/cjs/index.es-38cbcdbe.js +10666 -0
  37. package/dist/cjs/input-shims-eff63b88.js +418 -0
  38. package/dist/cjs/ion-accordion-group.cjs.entry.js +205 -0
  39. package/dist/cjs/ion-accordion.cjs.entry.js +336 -0
  40. package/dist/cjs/ion-action-sheet_7.cjs.entry.js +2935 -0
  41. package/dist/cjs/ion-app.cjs.entry.js +79 -0
  42. package/dist/cjs/ion-back-button.cjs.entry.js +94 -0
  43. package/dist/cjs/ion-backdrop.cjs.entry.js +67 -0
  44. package/dist/cjs/ion-badge.cjs.entry.js +29 -0
  45. package/dist/cjs/ion-breadcrumb.cjs.entry.js +95 -0
  46. package/dist/cjs/ion-breadcrumbs.cjs.entry.js +133 -0
  47. package/dist/cjs/ion-buttons_3.cjs.entry.js +153 -0
  48. package/dist/cjs/ion-card-header.cjs.entry.js +37 -0
  49. package/dist/cjs/ion-card-subtitle.cjs.entry.js +30 -0
  50. package/dist/cjs/ion-card-title.cjs.entry.js +30 -0
  51. package/dist/cjs/ion-chip.cjs.entry.js +40 -0
  52. package/dist/cjs/ion-content_2.cjs.entry.js +659 -0
  53. package/dist/cjs/ion-datetime-button.cjs.entry.js +312 -0
  54. package/dist/cjs/ion-datetime.cjs.entry.js +1623 -0
  55. package/dist/cjs/ion-fab-button.cjs.entry.js +108 -0
  56. package/dist/cjs/ion-fab-list.cjs.entry.js +45 -0
  57. package/dist/cjs/ion-fab.cjs.entry.js +76 -0
  58. package/dist/cjs/ion-footer.cjs.entry.js +120 -0
  59. package/dist/cjs/ion-img.cjs.entry.js +101 -0
  60. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +37 -0
  61. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +206 -0
  62. package/dist/cjs/ion-item-divider.cjs.entry.js +40 -0
  63. package/dist/cjs/ion-item-group.cjs.entry.js +31 -0
  64. package/dist/cjs/ion-item-option.cjs.entry.js +60 -0
  65. package/dist/cjs/ion-item-options.cjs.entry.js +47 -0
  66. package/dist/cjs/ion-item-sliding.cjs.entry.js +398 -0
  67. package/dist/cjs/ion-loading.cjs.entry.js +215 -0
  68. package/dist/cjs/ion-menu-button.cjs.entry.js +76 -0
  69. package/dist/cjs/ion-menu-toggle.cjs.entry.js +47 -0
  70. package/dist/cjs/ion-menu.cjs.entry.js +575 -0
  71. package/dist/cjs/ion-modal.cjs.entry.js +1711 -0
  72. package/dist/cjs/ion-nav-link.cjs.entry.js +47 -0
  73. package/dist/cjs/ion-nav.cjs.entry.js +872 -0
  74. package/dist/cjs/ion-picker-column-internal_2.cjs.entry.js +808 -0
  75. package/dist/cjs/ion-picker-column.cjs.entry.js +331 -0
  76. package/dist/cjs/ion-picker.cjs.entry.js +221 -0
  77. package/dist/cjs/ion-progress-bar.cjs.entry.js +74 -0
  78. package/dist/cjs/ion-refresher-content.cjs.entry.js +35 -0
  79. package/dist/cjs/ion-refresher.cjs.entry.js +802 -0
  80. package/dist/cjs/ion-reorder-group.cjs.entry.js +281 -0
  81. package/dist/cjs/ion-reorder.cjs.entry.js +38 -0
  82. package/dist/cjs/ion-route-redirect.cjs.entry.js +24 -0
  83. package/dist/cjs/ion-route.cjs.entry.js +49 -0
  84. package/dist/cjs/ion-router-link.cjs.entry.js +38 -0
  85. package/dist/cjs/ion-router-outlet.cjs.entry.js +200 -0
  86. package/dist/cjs/ion-router.cjs.entry.js +831 -0
  87. package/dist/cjs/ion-searchbar.cjs.entry.js +370 -0
  88. package/dist/cjs/ion-segment-button.cjs.entry.js +102 -0
  89. package/dist/cjs/ion-segment.cjs.entry.js +417 -0
  90. package/dist/cjs/ion-skeleton-text.cjs.entry.js +33 -0
  91. package/dist/cjs/ion-slide.cjs.entry.js +25 -0
  92. package/dist/cjs/ion-slides.cjs.entry.js +391 -0
  93. package/dist/cjs/ion-split-pane.cjs.entry.js +154 -0
  94. package/dist/cjs/ion-tab-bar.cjs.entry.js +75 -0
  95. package/dist/cjs/ion-tab-button.cjs.entry.js +103 -0
  96. package/dist/cjs/ion-tab.cjs.entry.js +59 -0
  97. package/dist/cjs/ion-tabs.cjs.entry.js +154 -0
  98. package/dist/cjs/ion-thumbnail.cjs.entry.js +20 -0
  99. package/dist/cjs/ion-toast.cjs.entry.js +272 -0
  100. package/dist/cjs/ion-toggle.cjs.entry.js +177 -0
  101. package/dist/cjs/ion-virtual-scroll.cjs.entry.js +555 -0
  102. package/dist/cjs/ionic-global-2cde9d3a.js +231 -0
  103. package/dist/cjs/ios.transition-da235483.js +482 -0
  104. package/dist/cjs/keyboard-91096619.js +140 -0
  105. package/dist/cjs/loader.cjs.js +24 -0
  106. package/dist/cjs/localstorage.service-6346a41d.js +40 -0
  107. package/dist/cjs/md.transition-be429e07.js +57 -0
  108. package/dist/cjs/media.service-8a1b9bc5.js +40 -0
  109. package/dist/cjs/menu-toggle-util-7a01448c.js +14 -0
  110. package/dist/cjs/overlays-32df265a.js +507 -0
  111. package/dist/cjs/parse-d0071120.js +1237 -0
  112. package/dist/cjs/purify-fb9c107e.js +1468 -0
  113. package/dist/cjs/signalR.service-bd6b42f9.js +2985 -0
  114. package/dist/cjs/sparkle-animation-player.cjs.entry.js +515 -0
  115. package/dist/cjs/sparkle-assignment.cjs.entry.js +110 -0
  116. package/dist/cjs/sparkle-character-intro.cjs.entry.js +26 -0
  117. package/dist/cjs/sparkle-code.cjs.entry.js +43 -0
  118. package/dist/cjs/sparkle-compass-post.cjs.entry.js +133 -0
  119. package/dist/cjs/sparkle-compass.cjs.entry.js +126 -0
  120. package/dist/cjs/sparkle-core.cjs.js +22 -0
  121. package/dist/cjs/sparkle-discussion-questions_2.cjs.entry.js +281 -0
  122. package/dist/cjs/sparkle-discussion.cjs.entry.js +42 -0
  123. package/dist/cjs/sparkle-emoji.cjs.entry.js +80 -0
  124. package/dist/cjs/sparkle-facilitator-notes-form.cjs.entry.js +121 -0
  125. package/dist/cjs/sparkle-feed-post.cjs.entry.js +122 -0
  126. package/dist/cjs/sparkle-feedback.cjs.entry.js +101 -0
  127. package/dist/cjs/sparkle-file-upload.cjs.entry.js +53 -0
  128. package/dist/cjs/sparkle-goal-form.cjs.entry.js +179 -0
  129. package/dist/cjs/sparkle-gww-comment-list.cjs.entry.js +26 -0
  130. package/dist/cjs/sparkle-gww-graph.cjs.entry.js +19 -0
  131. package/dist/cjs/sparkle-input.cjs.entry.js +56 -0
  132. package/dist/cjs/sparkle-intro.cjs.entry.js +26 -0
  133. package/dist/cjs/sparkle-lower-content-nav.cjs.entry.js +22 -0
  134. package/dist/cjs/sparkle-menu-collapsible.cjs.entry.js +46 -0
  135. package/dist/cjs/sparkle-modal-image.cjs.entry.js +34 -0
  136. package/dist/cjs/sparkle-notfound-page.cjs.entry.js +25 -0
  137. package/dist/cjs/sparkle-overlay.cjs.entry.js +92 -0
  138. package/dist/cjs/sparkle-poll.cjs.entry.js +19 -0
  139. package/dist/cjs/sparkle-quiz-container.cjs.entry.js +47 -0
  140. package/dist/cjs/sparkle-quiz-feedback_5.cjs.entry.js +117 -0
  141. package/dist/cjs/sparkle-quiz-old.cjs.entry.js +120 -0
  142. package/dist/cjs/sparkle-quiz.cjs.entry.js +103 -0
  143. package/dist/cjs/sparkle-select.cjs.entry.js +61 -0
  144. package/dist/cjs/sparkle-sidebar.cjs.entry.js +43 -0
  145. package/dist/cjs/sparkle-tab.cjs.entry.js +26 -0
  146. package/dist/cjs/sparkle-table-of-contents.cjs.entry.js +71 -0
  147. package/dist/cjs/sparkle-tabs.cjs.entry.js +66 -0
  148. package/dist/cjs/sparkle-video-player.cjs.entry.js +22 -0
  149. package/dist/cjs/sparkle-youtube.cjs.entry.js +39 -0
  150. package/dist/cjs/spinner-configs-0ac05f2d.js +147 -0
  151. package/dist/cjs/status-tap-033befa2.js +42 -0
  152. package/dist/cjs/stencil-async-content.cjs.entry.js +32 -0
  153. package/dist/cjs/stencil-route-title.cjs.entry.js +32 -0
  154. package/dist/cjs/stencil-router-prompt.cjs.entry.js +59 -0
  155. package/dist/cjs/student.service-7e5385be.js +78 -0
  156. package/dist/cjs/swipe-back-4a826f9b.js +76 -0
  157. package/dist/cjs/swiper.bundle-8c897c07.js +6420 -0
  158. package/dist/cjs/theme-b0b295c1.js +48 -0
  159. package/dist/cjs/token.service-7a41953d.js +97 -0
  160. package/dist/cjs/util-47e320b2.js +2462 -0
  161. package/dist/collection/PrivateRoute.js +27 -0
  162. package/dist/collection/appconst.js +13 -0
  163. package/dist/collection/assets/img/forward.svg +5 -0
  164. package/dist/collection/assets/img/help/fitt-logo.svg +1 -0
  165. package/dist/collection/assets/img/home/big-white-wall.svg +15 -0
  166. package/dist/collection/assets/img/home/find-help.svg +23 -0
  167. package/dist/collection/assets/img/home/lessons.svg +26 -0
  168. package/dist/collection/assets/img/home/my-goals.svg +19 -0
  169. package/dist/collection/assets/img/home/my-health.svg +17 -0
  170. package/dist/collection/assets/img/home/my-mood.svg +26 -0
  171. package/dist/collection/assets/img/pause.svg +5 -0
  172. package/dist/collection/assets/img/play-symbol.svg +8 -0
  173. package/dist/collection/assets/img/play.svg +4 -0
  174. package/dist/collection/assets/img/rewind.svg +5 -0
  175. package/dist/collection/assets/lib/SignalRAspNetCoreHelper.js +17 -0
  176. package/dist/collection/assets/lib/sparkleUtility.js +8 -0
  177. package/dist/collection/assets/svg/profile.svg +2 -0
  178. package/dist/collection/collection-manifest.json +219 -0
  179. package/dist/collection/components/compass-svg/compass-svg.css +15 -0
  180. package/dist/collection/components/compass-svg/compass-svg.js +156 -0
  181. package/dist/collection/components/layout/facilitator/export-lessons/export-lessons.css +7 -0
  182. package/dist/collection/components/layout/facilitator/export-lessons/export-lessons.js +110 -0
  183. package/dist/collection/components/layout/facilitator/facilitator-dashboard/facilitator-dashboard.css +3 -0
  184. package/dist/collection/components/layout/facilitator/facilitator-dashboard/facilitator-dashboard.js +214 -0
  185. package/dist/collection/components/layout/facilitator/facilitator-header/facilitator-header-mobile-collapse/facilitator-header-mobile-collapse.js +0 -0
  186. package/dist/collection/components/layout/facilitator/facilitator-header/facilitator-header.css +172 -0
  187. package/dist/collection/components/layout/facilitator/facilitator-header/facilitator-header.js +104 -0
  188. package/dist/collection/components/layout/facilitator/facilitator-notes/facilitator-notes-form/facilitator-notes-form.css +3 -0
  189. package/dist/collection/components/layout/facilitator/facilitator-notes/facilitator-notes-form/facilitator-notes-form.js +144 -0
  190. package/dist/collection/components/layout/facilitator/facilitator-notes/facilitator-notes.css +14 -0
  191. package/dist/collection/components/layout/facilitator/facilitator-notes/facilitator-notes.js +64 -0
  192. package/dist/collection/components/layout/facilitator/facilitator-page.css +196 -0
  193. package/dist/collection/components/layout/facilitator/facilitator-page.js +281 -0
  194. package/dist/collection/components/layout/facilitator/online-students/online-students.css +0 -0
  195. package/dist/collection/components/layout/facilitator/online-students/online-students.js +70 -0
  196. package/dist/collection/components/layout/page/page.css +183 -0
  197. package/dist/collection/components/layout/page/page.js +321 -0
  198. package/dist/collection/components/layout/page/templates/default.js +9 -0
  199. package/dist/collection/components/layout/page/templates/error.js +33 -0
  200. package/dist/collection/components/layout/page/templates/index.js +8 -0
  201. package/dist/collection/components/layout/page/templates/pdf.js +8 -0
  202. package/dist/collection/components/layout/page/to-hypertext.js +27 -0
  203. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-form/sparkle-goal-form.css +3 -0
  204. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-form/sparkle-goal-form.js +252 -0
  205. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-item/sparkle-goal-item.css +12 -0
  206. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-item/sparkle-goal-item.js +59 -0
  207. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-progress/sparkle-goal-progress.css +33 -0
  208. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-progress/sparkle-goal-progress.js +37 -0
  209. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goals.css +8 -0
  210. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goals.js +40 -0
  211. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-comment-list/sparkle-gww-comment-list.css +7 -0
  212. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-comment-list/sparkle-gww-comment-list.js +52 -0
  213. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-graph/sparkle-gww-graph.css +3 -0
  214. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-graph/sparkle-gww-graph.js +14 -0
  215. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-item/sparkle-gww-item.css +30 -0
  216. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-item/sparkle-gww-item.js +187 -0
  217. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww.css +3 -0
  218. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww.js +43 -0
  219. package/dist/collection/components/mini-apps/sparkle-health/sparkle-health.css +10 -0
  220. package/dist/collection/components/mini-apps/sparkle-health/sparkle-health.js +111 -0
  221. package/dist/collection/components/mini-apps/sparkle-mood/sparkle-mood.css +11 -0
  222. package/dist/collection/components/mini-apps/sparkle-mood/sparkle-mood.js +127 -0
  223. package/dist/collection/components/modal-image/modal-image.css +61 -0
  224. package/dist/collection/components/modal-image/modal-image.js +159 -0
  225. package/dist/collection/components/sparkle-animation-player/assets/play-button-disabled-overlay.png +0 -0
  226. package/dist/collection/components/sparkle-animation-player/assets/play-button-overlay.png +0 -0
  227. package/dist/collection/components/sparkle-animation-player/caption-parser.js +94 -0
  228. package/dist/collection/components/sparkle-animation-player/sparkle-animation-player.css +157 -0
  229. package/dist/collection/components/sparkle-animation-player/sparkle-animation-player.js +598 -0
  230. package/dist/collection/components/sparkle-assignment/sparkle-assignment.css +30 -0
  231. package/dist/collection/components/sparkle-assignment/sparkle-assignment.js +159 -0
  232. package/dist/collection/components/sparkle-character-intro/assets/characters/character-img.jpg +0 -0
  233. package/dist/collection/components/sparkle-character-intro/assets/characters/jen.png +0 -0
  234. package/dist/collection/components/sparkle-character-intro/assets/characters/kimberly.png +0 -0
  235. package/dist/collection/components/sparkle-character-intro/assets/characters/valeria.png +0 -0
  236. package/dist/collection/components/sparkle-character-intro/assets/characters/yuna.png +0 -0
  237. package/dist/collection/components/sparkle-character-intro/assets/characters/zynab.png +0 -0
  238. package/dist/collection/components/sparkle-character-intro/sparkle-character-intro.css +74 -0
  239. package/dist/collection/components/sparkle-character-intro/sparkle-character-intro.js +68 -0
  240. package/dist/collection/components/sparkle-compass/sparkle-compass-post/sparkle-compass-post.css +35 -0
  241. package/dist/collection/components/sparkle-compass/sparkle-compass-post/sparkle-compass-post.js +171 -0
  242. package/dist/collection/components/sparkle-compass/sparkle-compass.css +25 -0
  243. package/dist/collection/components/sparkle-compass/sparkle-compass.js +283 -0
  244. package/dist/collection/components/sparkle-course-root/sparkle-course-root.css +3 -0
  245. package/dist/collection/components/sparkle-course-root/sparkle-course-root.js +196 -0
  246. package/dist/collection/components/sparkle-discussion/sparkle-discussion-questions/sparkle-discussion-questions.css +157 -0
  247. package/dist/collection/components/sparkle-discussion/sparkle-discussion-questions/sparkle-discussion-questions.js +232 -0
  248. package/dist/collection/components/sparkle-discussion/sparkle-discussion-results/sparkle-discussion-results.css +158 -0
  249. package/dist/collection/components/sparkle-discussion/sparkle-discussion-results/sparkle-discussion-results.js +274 -0
  250. package/dist/collection/components/sparkle-discussion/sparkle-discussion.css +5 -0
  251. package/dist/collection/components/sparkle-discussion/sparkle-discussion.js +112 -0
  252. package/dist/collection/components/sparkle-emoji/sparkle-emoji.css +16 -0
  253. package/dist/collection/components/sparkle-emoji/sparkle-emoji.js +116 -0
  254. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.css +35 -0
  255. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.js +199 -0
  256. package/dist/collection/components/sparkle-feedback/sparkle-feedback.css +3 -0
  257. package/dist/collection/components/sparkle-feedback/sparkle-feedback.js +118 -0
  258. package/dist/collection/components/sparkle-file-upload/sparkle-file-upload.css +0 -0
  259. package/dist/collection/components/sparkle-file-upload/sparkle-file-upload.js +105 -0
  260. package/dist/collection/components/sparkle-forgot-password/sparkle-forgot-password.css +4 -0
  261. package/dist/collection/components/sparkle-forgot-password/sparkle-forgot-password.js +107 -0
  262. package/dist/collection/components/sparkle-input/sparkle-input.css +0 -0
  263. package/dist/collection/components/sparkle-input/sparkle-input.js +212 -0
  264. package/dist/collection/components/sparkle-intro/sparkle-intro.css +15 -0
  265. package/dist/collection/components/sparkle-intro/sparkle-intro.js +35 -0
  266. package/dist/collection/components/sparkle-login/sparkle-login.css +4 -0
  267. package/dist/collection/components/sparkle-login/sparkle-login.js +173 -0
  268. package/dist/collection/components/sparkle-poll/sparkle-poll.css +3 -0
  269. package/dist/collection/components/sparkle-poll/sparkle-poll.js +15 -0
  270. package/dist/collection/components/sparkle-quiz/sparkle-quiz-feedback/sparkle-quiz-feedback.css +3 -0
  271. package/dist/collection/components/sparkle-quiz/sparkle-quiz-feedback/sparkle-quiz-feedback.js +69 -0
  272. package/dist/collection/components/sparkle-quiz/sparkle-quiz-input/sparkle-quiz-input.css +3 -0
  273. package/dist/collection/components/sparkle-quiz/sparkle-quiz-input/sparkle-quiz-input.js +59 -0
  274. package/dist/collection/components/sparkle-quiz/sparkle-quiz-old/sparkle-quiz-old.css +48 -0
  275. package/dist/collection/components/sparkle-quiz/sparkle-quiz-old/sparkle-quiz-old.js +327 -0
  276. package/dist/collection/components/sparkle-quiz/sparkle-quiz-opinion/sparkle-quiz-opinion.css +18 -0
  277. package/dist/collection/components/sparkle-quiz/sparkle-quiz-opinion/sparkle-quiz-opinion.js +106 -0
  278. package/dist/collection/components/sparkle-quiz/sparkle-quiz-poll/sparkle-quiz-poll.css +3 -0
  279. package/dist/collection/components/sparkle-quiz/sparkle-quiz-poll/sparkle-quiz-poll.js +59 -0
  280. package/dist/collection/components/sparkle-quiz/sparkle-quiz-select/sparkle-quiz-select.css +3 -0
  281. package/dist/collection/components/sparkle-quiz/sparkle-quiz-select/sparkle-quiz-select.js +100 -0
  282. package/dist/collection/components/sparkle-quiz/sparkle-quiz.css +48 -0
  283. package/dist/collection/components/sparkle-quiz/sparkle-quiz.js +221 -0
  284. package/dist/collection/components/sparkle-quiz-container/sparkle-quiz-container.css +3 -0
  285. package/dist/collection/components/sparkle-quiz-container/sparkle-quiz-container.js +98 -0
  286. package/dist/collection/components/sparkle-reset-password/sparkle-reset-password.css +3 -0
  287. package/dist/collection/components/sparkle-reset-password/sparkle-reset-password.js +126 -0
  288. package/dist/collection/components/sparkle-root/sparkle-root.css +61 -0
  289. package/dist/collection/components/sparkle-root/sparkle-root.js +86 -0
  290. package/dist/collection/components/sparkle-signup/sparkle-signup.css +6 -0
  291. package/dist/collection/components/sparkle-signup/sparkle-signup.js +197 -0
  292. package/dist/collection/components/sparkle-unauthorized/sparkle-unauthorized.css +13 -0
  293. package/dist/collection/components/sparkle-unauthorized/sparkle-unauthorized.js +18 -0
  294. package/dist/collection/components/sparkle-user-enrollment/sparkle-user-enrollment.css +3 -0
  295. package/dist/collection/components/sparkle-user-enrollment/sparkle-user-enrollment.js +93 -0
  296. package/dist/collection/components/sparkle-user-profile/sparkle-user-profile.css +54 -0
  297. package/dist/collection/components/sparkle-user-profile/sparkle-user-profile.js +151 -0
  298. package/dist/collection/components/sparkle-validation-error/sparkle-validation-error.css +11 -0
  299. package/dist/collection/components/sparkle-validation-error/sparkle-validation-error.js +44 -0
  300. package/dist/collection/components/sparkle-video-player/sparkle-video-player.css +0 -0
  301. package/dist/collection/components/sparkle-video-player/sparkle-video-player.js +92 -0
  302. package/dist/collection/components/sparkle-youtube/sparkle-youtube.css +24 -0
  303. package/dist/collection/components/sparkle-youtube/sparkle-youtube.js +99 -0
  304. package/dist/collection/global/app.js +4 -0
  305. package/dist/collection/helpers/utils.js +3 -0
  306. package/dist/collection/icons.js +36 -0
  307. package/dist/collection/index.js +3 -0
  308. package/dist/collection/l10n.js +18 -0
  309. package/dist/collection/models/api.model.js +7 -0
  310. package/dist/collection/models/assets.model.js +1 -0
  311. package/dist/collection/models/auth/auth.user.js +1 -0
  312. package/dist/collection/models/class.model.js +5 -0
  313. package/dist/collection/models/course.model.js +10 -0
  314. package/dist/collection/models/definitions.js +1 -0
  315. package/dist/collection/models/facilitator-dashboard.model.js +5 -0
  316. package/dist/collection/models/goal.model.js +1 -0
  317. package/dist/collection/models/index.js +1 -0
  318. package/dist/collection/models/markdown.model.js +1 -0
  319. package/dist/collection/models/page.model.js +1 -0
  320. package/dist/collection/models/quiz.model.js +3 -0
  321. package/dist/collection/models/user.model.js +1 -0
  322. package/dist/collection/pages/course/welcome-to-mind-body/introduction/animation/m4l1p1_part1.js +2727 -0
  323. package/dist/collection/pages/course/welcome-to-mind-body/introduction/animation/m4l1p1_part2.js +2042 -0
  324. package/dist/collection/services/account.service.js +61 -0
  325. package/dist/collection/services/appdata.service.js +60 -0
  326. package/dist/collection/services/assignment.service.js +14 -0
  327. package/dist/collection/services/auth/auth.service.js +64 -0
  328. package/dist/collection/services/core/assets.service.js +45 -0
  329. package/dist/collection/services/core/localstorage.service.js +34 -0
  330. package/dist/collection/services/environment/environment-config.js +24 -0
  331. package/dist/collection/services/environment/environment-config.service.js +24 -0
  332. package/dist/collection/services/facilitator.service.js +76 -0
  333. package/dist/collection/services/feed.service.js +43 -0
  334. package/dist/collection/services/httpService.js +103 -0
  335. package/dist/collection/services/index.js +4 -0
  336. package/dist/collection/services/media.service.js +29 -0
  337. package/dist/collection/services/signalR.service.js +83 -0
  338. package/dist/collection/services/store.service.js +13 -0
  339. package/dist/collection/services/student.service.js +56 -0
  340. package/dist/collection/services/token.service.js +79 -0
  341. package/dist/collection/stores/auth.store.js +12 -0
  342. package/dist/collection/stores/class.store.js +5 -0
  343. package/dist/collection/stores/error.store.js +5 -0
  344. package/dist/collection/stores/facilitator.store.js +15 -0
  345. package/dist/collection/stores/feed.store.js +8 -0
  346. package/dist/collection/stores/goal.store.js +7 -0
  347. package/dist/collection/stores/index.js +1 -0
  348. package/dist/collection/stores/media.store.js +5 -0
  349. package/dist/collection/stores/mood.store.js +5 -0
  350. package/dist/collection/stores/nav.store.js +11 -0
  351. package/dist/collection/stores/signalR.store.js +6 -0
  352. package/dist/collection/stores/theme.store.js +9 -0
  353. package/dist/collection/stores/toc.store.js +5 -0
  354. package/dist/collection/stores/user.store.js +16 -0
  355. package/dist/collection/util.js +55 -0
  356. package/dist/collection/utils.js +92 -0
  357. package/dist/esm/PrivateRoute-90ac95b8.js +212 -0
  358. package/dist/esm/active-router-fc9e4e06.js +73 -0
  359. package/dist/esm/animation-12377cb3.js +984 -0
  360. package/dist/esm/app-globals-3f0347b0.js +7 -0
  361. package/dist/esm/appdata.service-2e84e167.js +70 -0
  362. package/dist/esm/assets.service-def1d63c.js +48 -0
  363. package/dist/esm/assignment.service-8d31f141.js +17 -0
  364. package/dist/esm/auth.store-dba2c2da.js +3381 -0
  365. package/dist/esm/compass-svg.entry.js +128 -0
  366. package/dist/esm/context-consumer.entry.js +25 -0
  367. package/dist/esm/course-select.entry.js +26 -0
  368. package/dist/esm/dir-03012648.js +18 -0
  369. package/dist/esm/environment-config.service-b191f276.js +26 -0
  370. package/dist/esm/facilitator.service-18c47bdf.js +92 -0
  371. package/dist/esm/feed.service-b4f3cae4.js +54 -0
  372. package/dist/esm/framework-delegate-3e634a5c.js +107 -0
  373. package/dist/esm/gesture-controller-7be18351.js +194 -0
  374. package/dist/esm/haptic-522f76f2.js +110 -0
  375. package/dist/esm/header-mobile-collapse_61.entry.js +15060 -0
  376. package/dist/esm/helpers-bf0e23d6.js +403 -0
  377. package/dist/esm/httpService-7986aeed.js +685 -0
  378. package/dist/esm/icons-1c794c74.js +18 -0
  379. package/dist/esm/index-21661af2.js +463 -0
  380. package/dist/esm/index-2b84cad2.js +223 -0
  381. package/dist/esm/index-4044fde9.js +25 -0
  382. package/dist/esm/index-45fec1e7.js +184 -0
  383. package/dist/esm/index-5e8971ae.js +128 -0
  384. package/dist/esm/index-c04b9ed5.js +1888 -0
  385. package/dist/esm/index-cded2d87.js +312 -0
  386. package/dist/esm/index-dad75b83.js +34 -0
  387. package/dist/esm/index.es-e0c0f891.js +10580 -0
  388. package/dist/esm/index.js +12 -0
  389. package/dist/esm/input-shims-671d8d9f.js +416 -0
  390. package/dist/esm/ion-accordion-group.entry.js +201 -0
  391. package/dist/esm/ion-accordion.entry.js +332 -0
  392. package/dist/esm/ion-action-sheet_7.entry.js +2925 -0
  393. package/dist/esm/ion-app.entry.js +75 -0
  394. package/dist/esm/ion-back-button.entry.js +90 -0
  395. package/dist/esm/ion-backdrop.entry.js +63 -0
  396. package/dist/esm/ion-badge.entry.js +25 -0
  397. package/dist/esm/ion-breadcrumb.entry.js +91 -0
  398. package/dist/esm/ion-breadcrumbs.entry.js +129 -0
  399. package/dist/esm/ion-buttons_3.entry.js +147 -0
  400. package/dist/esm/ion-card-header.entry.js +33 -0
  401. package/dist/esm/ion-card-subtitle.entry.js +26 -0
  402. package/dist/esm/ion-card-title.entry.js +26 -0
  403. package/dist/esm/ion-chip.entry.js +36 -0
  404. package/dist/esm/ion-content_2.entry.js +654 -0
  405. package/dist/esm/ion-datetime-button.entry.js +308 -0
  406. package/dist/esm/ion-datetime.entry.js +1619 -0
  407. package/dist/esm/ion-fab-button.entry.js +104 -0
  408. package/dist/esm/ion-fab-list.entry.js +41 -0
  409. package/dist/esm/ion-fab.entry.js +72 -0
  410. package/dist/esm/ion-footer.entry.js +116 -0
  411. package/dist/esm/ion-img.entry.js +97 -0
  412. package/dist/esm/ion-infinite-scroll-content.entry.js +33 -0
  413. package/dist/esm/ion-infinite-scroll.entry.js +202 -0
  414. package/dist/esm/ion-item-divider.entry.js +36 -0
  415. package/dist/esm/ion-item-group.entry.js +27 -0
  416. package/dist/esm/ion-item-option.entry.js +56 -0
  417. package/dist/esm/ion-item-options.entry.js +43 -0
  418. package/dist/esm/ion-item-sliding.entry.js +394 -0
  419. package/dist/esm/ion-loading.entry.js +211 -0
  420. package/dist/esm/ion-menu-button.entry.js +72 -0
  421. package/dist/esm/ion-menu-toggle.entry.js +43 -0
  422. package/dist/esm/ion-menu.entry.js +571 -0
  423. package/dist/esm/ion-modal.entry.js +1707 -0
  424. package/dist/esm/ion-nav-link.entry.js +43 -0
  425. package/dist/esm/ion-nav.entry.js +868 -0
  426. package/dist/esm/ion-picker-column-internal_2.entry.js +803 -0
  427. package/dist/esm/ion-picker-column.entry.js +327 -0
  428. package/dist/esm/ion-picker.entry.js +217 -0
  429. package/dist/esm/ion-progress-bar.entry.js +70 -0
  430. package/dist/esm/ion-refresher-content.entry.js +31 -0
  431. package/dist/esm/ion-refresher.entry.js +798 -0
  432. package/dist/esm/ion-reorder-group.entry.js +277 -0
  433. package/dist/esm/ion-reorder.entry.js +34 -0
  434. package/dist/esm/ion-route-redirect.entry.js +20 -0
  435. package/dist/esm/ion-route.entry.js +45 -0
  436. package/dist/esm/ion-router-link.entry.js +34 -0
  437. package/dist/esm/ion-router-outlet.entry.js +196 -0
  438. package/dist/esm/ion-router.entry.js +827 -0
  439. package/dist/esm/ion-searchbar.entry.js +366 -0
  440. package/dist/esm/ion-segment-button.entry.js +98 -0
  441. package/dist/esm/ion-segment.entry.js +413 -0
  442. package/dist/esm/ion-skeleton-text.entry.js +29 -0
  443. package/dist/esm/ion-slide.entry.js +21 -0
  444. package/dist/esm/ion-slides.entry.js +387 -0
  445. package/dist/esm/ion-split-pane.entry.js +150 -0
  446. package/dist/esm/ion-tab-bar.entry.js +71 -0
  447. package/dist/esm/ion-tab-button.entry.js +99 -0
  448. package/dist/esm/ion-tab.entry.js +55 -0
  449. package/dist/esm/ion-tabs.entry.js +150 -0
  450. package/dist/esm/ion-thumbnail.entry.js +16 -0
  451. package/dist/esm/ion-toast.entry.js +268 -0
  452. package/dist/esm/ion-toggle.entry.js +173 -0
  453. package/dist/esm/ion-virtual-scroll.entry.js +551 -0
  454. package/dist/esm/ionic-global-4903e23e.js +226 -0
  455. package/dist/esm/ios.transition-131d64fe.js +479 -0
  456. package/dist/esm/loader.js +20 -0
  457. package/dist/esm/md.transition-f6126011.js +55 -0
  458. package/dist/esm/media.service-6e90bc41.js +37 -0
  459. package/dist/esm/menu-toggle-util-bace8ae6.js +12 -0
  460. package/dist/esm/overlays-4233a39d.js +491 -0
  461. package/dist/esm/parse-1ae3a9bb.js +1196 -0
  462. package/dist/esm/polyfills/core-js.js +11 -0
  463. package/dist/esm/polyfills/css-shim.js +1 -0
  464. package/dist/esm/polyfills/dom.js +79 -0
  465. package/dist/esm/polyfills/es5-html-element.js +1 -0
  466. package/dist/esm/polyfills/index.js +34 -0
  467. package/dist/esm/polyfills/system.js +6 -0
  468. package/dist/esm/purify-85bfcc69.js +1466 -0
  469. package/dist/esm/signalR.service-c33fba50.js +2982 -0
  470. package/dist/esm/sparkle-animation-player.entry.js +511 -0
  471. package/dist/esm/sparkle-assignment.entry.js +106 -0
  472. package/dist/esm/sparkle-character-intro.entry.js +22 -0
  473. package/dist/esm/sparkle-code.entry.js +39 -0
  474. package/dist/esm/sparkle-compass-post.entry.js +129 -0
  475. package/dist/esm/sparkle-compass.entry.js +122 -0
  476. package/dist/esm/sparkle-core.js +20 -0
  477. package/dist/esm/sparkle-discussion-questions_2.entry.js +276 -0
  478. package/dist/esm/sparkle-discussion.entry.js +38 -0
  479. package/dist/esm/sparkle-emoji.entry.js +76 -0
  480. package/dist/esm/sparkle-facilitator-notes-form.entry.js +117 -0
  481. package/dist/esm/sparkle-feed-post.entry.js +118 -0
  482. package/dist/esm/sparkle-feedback.entry.js +97 -0
  483. package/dist/esm/sparkle-file-upload.entry.js +49 -0
  484. package/dist/esm/sparkle-goal-form.entry.js +175 -0
  485. package/dist/esm/sparkle-gww-comment-list.entry.js +22 -0
  486. package/dist/esm/sparkle-gww-graph.entry.js +15 -0
  487. package/dist/esm/sparkle-input.entry.js +52 -0
  488. package/dist/esm/sparkle-intro.entry.js +22 -0
  489. package/dist/esm/sparkle-lower-content-nav.entry.js +18 -0
  490. package/dist/esm/sparkle-menu-collapsible.entry.js +42 -0
  491. package/dist/esm/sparkle-modal-image.entry.js +30 -0
  492. package/dist/esm/sparkle-notfound-page.entry.js +21 -0
  493. package/dist/esm/sparkle-overlay.entry.js +88 -0
  494. package/dist/esm/sparkle-poll.entry.js +15 -0
  495. package/dist/esm/sparkle-quiz-container.entry.js +43 -0
  496. package/dist/esm/sparkle-quiz-feedback_5.entry.js +109 -0
  497. package/dist/esm/sparkle-quiz-old.entry.js +116 -0
  498. package/dist/esm/sparkle-quiz.entry.js +99 -0
  499. package/dist/esm/sparkle-select.entry.js +57 -0
  500. package/dist/esm/sparkle-sidebar.entry.js +39 -0
  501. package/dist/esm/sparkle-tab.entry.js +22 -0
  502. package/dist/esm/sparkle-table-of-contents.entry.js +67 -0
  503. package/dist/esm/sparkle-tabs.entry.js +62 -0
  504. package/dist/esm/sparkle-video-player.entry.js +18 -0
  505. package/dist/esm/sparkle-youtube.entry.js +35 -0
  506. package/dist/esm/status-tap-dde52787.js +40 -0
  507. package/dist/esm/stencil-async-content.entry.js +28 -0
  508. package/dist/esm/stencil-route-title.entry.js +28 -0
  509. package/dist/esm/stencil-router-prompt.entry.js +55 -0
  510. package/dist/esm/student.service-08af124f.js +75 -0
  511. package/dist/esm/swipe-back-7847a0c1.js +74 -0
  512. package/dist/esm/swiper.bundle-b6a959de.js +6418 -0
  513. package/dist/esm/token.service-71a5d33f.js +94 -0
  514. package/dist/esm/util-57cc8006.js +2451 -0
  515. package/dist/index.cjs.js +1 -0
  516. package/dist/index.js +1 -0
  517. package/dist/loader/cdn.js +3 -0
  518. package/dist/loader/index.cjs.js +3 -0
  519. package/dist/loader/index.d.ts +12 -0
  520. package/dist/loader/index.es2017.js +3 -0
  521. package/dist/loader/index.js +4 -0
  522. package/dist/loader/package.json +10 -0
  523. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.ios.css +75 -0
  524. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.md.css +72 -0
  525. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.ios.css +25 -0
  526. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.md.css +59 -0
  527. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +357 -0
  528. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +290 -0
  529. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.ios.css +494 -0
  530. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +502 -0
  531. package/dist/node_modules/@ionic/core/dist/collection/components/app/app.css +17 -0
  532. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.ios.css +22 -0
  533. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.md.css +22 -0
  534. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +281 -0
  535. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +309 -0
  536. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.ios.css +26 -0
  537. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.md.css +26 -0
  538. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.ios.css +58 -0
  539. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.md.css +62 -0
  540. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.ios.css +234 -0
  541. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.md.css +237 -0
  542. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.ios.css +38 -0
  543. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.md.css +37 -0
  544. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +439 -0
  545. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +428 -0
  546. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.ios.css +128 -0
  547. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.md.css +151 -0
  548. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.ios.css +101 -0
  549. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.md.css +95 -0
  550. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.ios.css +61 -0
  551. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.md.css +63 -0
  552. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.ios.css +37 -0
  553. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.md.css +35 -0
  554. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.ios.css +28 -0
  555. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.md.css +26 -0
  556. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.ios.css +27 -0
  557. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.md.css +27 -0
  558. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.ios.css +169 -0
  559. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.md.css +172 -0
  560. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.ios.css +200 -0
  561. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.md.css +200 -0
  562. package/dist/node_modules/@ionic/core/dist/collection/components/col/col.css +108 -0
  563. package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +237 -0
  564. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +648 -0
  565. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +637 -0
  566. package/dist/node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.css +60 -0
  567. package/dist/node_modules/@ionic/core/dist/collection/components/fab/fab.css +61 -0
  568. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.ios.css +338 -0
  569. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.md.css +307 -0
  570. package/dist/node_modules/@ionic/core/dist/collection/components/fab-list/fab-list.css +116 -0
  571. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +37 -0
  572. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.md.css +37 -0
  573. package/dist/node_modules/@ionic/core/dist/collection/components/grid/grid.css +151 -0
  574. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +108 -0
  575. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.md.css +40 -0
  576. package/dist/node_modules/@ionic/core/dist/collection/components/img/img.css +12 -0
  577. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll/infinite-scroll.css +8 -0
  578. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +54 -0
  579. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +54 -0
  580. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +185 -0
  581. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +185 -0
  582. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +669 -0
  583. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +928 -0
  584. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.ios.css +204 -0
  585. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.md.css +297 -0
  586. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.ios.css +3 -0
  587. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.md.css +3 -0
  588. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +186 -0
  589. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +180 -0
  590. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +88 -0
  591. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +85 -0
  592. package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +42 -0
  593. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +156 -0
  594. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +250 -0
  595. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +91 -0
  596. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.md.css +114 -0
  597. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.ios.css +118 -0
  598. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.md.css +94 -0
  599. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +109 -0
  600. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +100 -0
  601. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +127 -0
  602. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +123 -0
  603. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.ios.css +175 -0
  604. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.md.css +178 -0
  605. package/dist/node_modules/@ionic/core/dist/collection/components/menu-toggle/menu-toggle.css +3 -0
  606. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +250 -0
  607. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +177 -0
  608. package/dist/node_modules/@ionic/core/dist/collection/components/nav/nav.css +10 -0
  609. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.ios.css +16 -0
  610. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.md.css +17 -0
  611. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.ios.css +217 -0
  612. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.md.css +204 -0
  613. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.ios.css +122 -0
  614. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.md.css +123 -0
  615. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +82 -0
  616. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +85 -0
  617. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +126 -0
  618. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +122 -0
  619. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +201 -0
  620. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +132 -0
  621. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +206 -0
  622. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +206 -0
  623. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.ios.css +177 -0
  624. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.md.css +178 -0
  625. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +275 -0
  626. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +320 -0
  627. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +189 -0
  628. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +210 -0
  629. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.ios.css +15 -0
  630. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.md.css +15 -0
  631. package/dist/node_modules/@ionic/core/dist/collection/components/reorder-group/reorder-group.css +33 -0
  632. package/dist/node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css +58 -0
  633. package/dist/node_modules/@ionic/core/dist/collection/components/router-link/router-link.css +29 -0
  634. package/dist/node_modules/@ionic/core/dist/collection/components/router-outlet/route-outlet.css +10 -0
  635. package/dist/node_modules/@ionic/core/dist/collection/components/row/row.css +4 -0
  636. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +348 -0
  637. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +279 -0
  638. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.ios.css +65 -0
  639. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.md.css +36 -0
  640. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +446 -0
  641. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +424 -0
  642. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +145 -0
  643. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +177 -0
  644. package/dist/node_modules/@ionic/core/dist/collection/components/select-option/select-option.css +3 -0
  645. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.ios.css +14 -0
  646. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.md.css +37 -0
  647. package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +53 -0
  648. package/dist/node_modules/@ionic/core/dist/collection/components/slide/slide.css +31 -0
  649. package/dist/node_modules/@ionic/core/dist/collection/components/slides/slides.ios.css +764 -0
  650. package/dist/node_modules/@ionic/core/dist/collection/components/slides/slides.md.css +764 -0
  651. package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +167 -0
  652. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.ios.css +108 -0
  653. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.md.css +108 -0
  654. package/dist/node_modules/@ionic/core/dist/collection/components/tab/tab.css +4 -0
  655. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +97 -0
  656. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +82 -0
  657. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.ios.css +308 -0
  658. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.md.css +331 -0
  659. package/dist/node_modules/@ionic/core/dist/collection/components/tabs/tabs.css +19 -0
  660. package/dist/node_modules/@ionic/core/dist/collection/components/text/text.css +3 -0
  661. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +175 -0
  662. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +179 -0
  663. package/dist/node_modules/@ionic/core/dist/collection/components/thumbnail/thumbnail.css +21 -0
  664. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +122 -0
  665. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.md.css +55 -0
  666. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +262 -0
  667. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +295 -0
  668. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +286 -0
  669. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +261 -0
  670. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +175 -0
  671. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +168 -0
  672. package/dist/node_modules/@ionic/core/dist/collection/components/virtual-scroll/virtual-scroll.css +21 -0
  673. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/button/button.css +49 -0
  674. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/card/card.css +208 -0
  675. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/cards.css +31 -0
  676. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/code/code.css +245 -0
  677. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/dropdown/dropdown.css +115 -0
  678. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header-mobile-collapse/header-mobile-collapse.css +255 -0
  679. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header.css +232 -0
  680. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/collapsible/collapsible.css +3 -0
  681. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu-toggle/menu-toggle.css +25 -0
  682. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu.css +71 -0
  683. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/nav/nav.css +194 -0
  684. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/notfound-page/notfound-page.css +4 -0
  685. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/overlay/overlay.css +67 -0
  686. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/page-footer/page-footer.css +25 -0
  687. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/pagination/pagination.css +93 -0
  688. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/select/select.css +52 -0
  689. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sidebar/sidebar.css +98 -0
  690. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sparkle-lower-content-nav/sparkle-lower-content-nav.css +8 -0
  691. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/table-of-contents/table-of-contents.css +37 -0
  692. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/tabs/tabs.css +64 -0
  693. package/dist/node_modules/@stencil/router/dist/collection/components/route/route.css +3 -0
  694. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +101 -0
  695. package/dist/sparkle-core/index.esm.js +1 -19
  696. package/dist/sparkle-core/p-00d10dc9.js +4 -0
  697. package/dist/sparkle-core/p-0147266a.js +1 -0
  698. package/dist/sparkle-core/p-04c7b276.entry.js +1 -0
  699. package/dist/sparkle-core/p-05c032dd.js +4 -0
  700. package/dist/sparkle-core/p-06642405.entry.js +1 -0
  701. package/dist/sparkle-core/p-0664370b.entry.js +1 -0
  702. package/dist/sparkle-core/p-06c7d0f2.entry.js +1 -0
  703. package/dist/sparkle-core/p-076f0239.js +4 -0
  704. package/dist/sparkle-core/p-077c732b.js +4 -0
  705. package/dist/sparkle-core/p-08420531.entry.js +1 -0
  706. package/dist/sparkle-core/p-0ad5c123.entry.js +1 -0
  707. package/dist/sparkle-core/p-0afa3a4d.entry.js +1 -0
  708. package/dist/sparkle-core/p-0c3f3ea6.entry.js +1 -0
  709. package/dist/sparkle-core/p-0e4de1d0.js +4 -0
  710. package/dist/sparkle-core/p-0e8e539f.entry.js +1 -0
  711. package/dist/sparkle-core/p-11356b03.entry.js +1 -0
  712. package/dist/sparkle-core/p-11a6c175.entry.js +1 -0
  713. package/dist/sparkle-core/p-12dd96d7.js +4 -0
  714. package/dist/sparkle-core/p-13ec39db.entry.js +1 -0
  715. package/dist/sparkle-core/p-1adc98f6.js +1 -0
  716. package/dist/sparkle-core/p-1b1ba156.entry.js +1 -0
  717. package/dist/sparkle-core/p-1e125ca5.entry.js +1 -0
  718. package/dist/sparkle-core/p-1e4782af.entry.js +1 -0
  719. package/dist/sparkle-core/p-2033cd86.js +7 -0
  720. package/dist/sparkle-core/p-214d1229.entry.js +1 -0
  721. package/dist/sparkle-core/p-23aca7ca.js +4 -0
  722. package/dist/sparkle-core/p-24cb9a33.entry.js +1 -0
  723. package/dist/sparkle-core/p-27fbabc3.entry.js +1 -0
  724. package/dist/sparkle-core/p-2ba70507.entry.js +1 -0
  725. package/dist/sparkle-core/p-2c1ca854.entry.js +1 -0
  726. package/dist/sparkle-core/p-2caed39f.entry.js +1 -0
  727. package/dist/sparkle-core/p-2d9659e2.entry.js +1 -0
  728. package/dist/sparkle-core/p-2f569553.js +1 -0
  729. package/dist/sparkle-core/p-30b810d1.entry.js +4 -0
  730. package/dist/sparkle-core/p-32f4e565.entry.js +1 -0
  731. package/dist/sparkle-core/p-352677e6.entry.js +1 -0
  732. package/dist/sparkle-core/p-38b7cf68.entry.js +1 -0
  733. package/dist/sparkle-core/p-38c842d5.entry.js +1 -0
  734. package/dist/sparkle-core/p-3963e02b.entry.js +1 -0
  735. package/dist/sparkle-core/p-39712c56.entry.js +4 -0
  736. package/dist/sparkle-core/p-39a31e43.js +1 -0
  737. package/dist/sparkle-core/p-3daf2915.entry.js +352 -0
  738. package/dist/sparkle-core/p-3de0e00c.js +4 -0
  739. package/dist/sparkle-core/p-4053ecdb.entry.js +1 -0
  740. package/dist/sparkle-core/p-408176ba.js +1 -0
  741. package/dist/sparkle-core/p-42ed7d5f.entry.js +1 -0
  742. package/dist/sparkle-core/p-48f72e63.js +4 -0
  743. package/dist/sparkle-core/p-4b4a8703.js +1 -0
  744. package/dist/sparkle-core/p-4c6a7e52.js +1 -0
  745. package/dist/sparkle-core/p-4d1cfcbe.entry.js +1 -0
  746. package/dist/sparkle-core/p-4d4077ea.js +4 -0
  747. package/dist/sparkle-core/p-4fba3e4c.js +1 -0
  748. package/dist/sparkle-core/p-506221fe.js +4 -0
  749. package/dist/sparkle-core/p-5096739e.entry.js +1 -0
  750. package/dist/sparkle-core/p-5322c920.entry.js +1 -0
  751. package/dist/sparkle-core/p-5893bbe5.entry.js +1 -0
  752. package/dist/sparkle-core/p-594a6982.entry.js +1 -0
  753. package/dist/sparkle-core/p-5c435d5a.entry.js +1 -0
  754. package/dist/sparkle-core/p-5cad23f1.js +3 -0
  755. package/dist/sparkle-core/p-5d409601.js +1 -0
  756. package/dist/sparkle-core/p-601397df.entry.js +1 -0
  757. package/dist/sparkle-core/p-604a7987.js +4 -0
  758. package/dist/sparkle-core/p-616941c6.entry.js +1 -0
  759. package/dist/sparkle-core/p-6316d124.entry.js +1 -0
  760. package/dist/sparkle-core/p-63f71ada.entry.js +1 -0
  761. package/dist/sparkle-core/p-69487d90.entry.js +1 -0
  762. package/dist/sparkle-core/p-6bde0192.entry.js +7 -0
  763. package/dist/sparkle-core/p-6d2f4093.entry.js +7 -0
  764. package/dist/sparkle-core/p-6ffd2420.entry.js +1 -0
  765. package/dist/sparkle-core/p-72053ae0.entry.js +1 -0
  766. package/dist/sparkle-core/p-73721c84.js +4 -0
  767. package/dist/sparkle-core/p-74864276.entry.js +1 -0
  768. package/dist/sparkle-core/p-7d8427eb.js +4 -0
  769. package/dist/sparkle-core/p-7dae0f0e.js +1 -0
  770. package/dist/sparkle-core/p-7dbfc316.js +1 -0
  771. package/dist/sparkle-core/p-7e7ce516.js +4 -0
  772. package/dist/sparkle-core/p-81714d94.entry.js +1 -0
  773. package/dist/sparkle-core/p-8492a765.entry.js +1 -0
  774. package/dist/sparkle-core/p-859563db.entry.js +1 -0
  775. package/dist/sparkle-core/p-85d4cd5c.entry.js +1 -0
  776. package/dist/sparkle-core/p-865f36a8.entry.js +1 -0
  777. package/dist/sparkle-core/p-86ed13f0.js +5 -0
  778. package/dist/sparkle-core/p-871106e0.js +4 -0
  779. package/dist/sparkle-core/p-894ff7e6.entry.js +1 -0
  780. package/dist/sparkle-core/p-8a41b502.entry.js +1 -0
  781. package/dist/sparkle-core/p-8b56f734.js +1 -0
  782. package/dist/sparkle-core/p-8c74cbb6.entry.js +1 -0
  783. package/dist/sparkle-core/p-924b2917.js +4 -0
  784. package/dist/sparkle-core/p-9289cdbc.entry.js +1 -0
  785. package/dist/sparkle-core/p-957715c5.entry.js +1 -0
  786. package/dist/sparkle-core/p-973fe404.entry.js +22 -0
  787. package/dist/sparkle-core/p-975b99ee.entry.js +1 -0
  788. package/dist/sparkle-core/p-98daeddb.entry.js +1 -0
  789. package/dist/sparkle-core/p-99ee9919.js +1 -0
  790. package/dist/sparkle-core/p-9abbd715.entry.js +1 -0
  791. package/dist/sparkle-core/p-9d894ed4.js +4 -0
  792. package/dist/sparkle-core/p-9e309b3e.entry.js +1 -0
  793. package/dist/sparkle-core/p-9e7fee8f.entry.js +1 -0
  794. package/dist/sparkle-core/p-9ebf0537.entry.js +1 -0
  795. package/dist/sparkle-core/p-a208ab2d.js +4 -0
  796. package/dist/sparkle-core/p-a2638250.entry.js +1 -0
  797. package/dist/sparkle-core/p-a2ebcf0a.entry.js +1 -0
  798. package/dist/sparkle-core/p-a98d7ebe.entry.js +1 -0
  799. package/dist/sparkle-core/p-add30d46.js +4 -0
  800. package/dist/sparkle-core/p-b0603d19.js +16 -0
  801. package/dist/sparkle-core/p-b06e2bef.js +1 -0
  802. package/dist/sparkle-core/p-b3f375fb.entry.js +1 -0
  803. package/dist/sparkle-core/p-b5f3e1bf.entry.js +1 -0
  804. package/dist/sparkle-core/p-b6fec622.entry.js +1 -0
  805. package/dist/sparkle-core/p-b8d71ff4.js +1 -0
  806. package/dist/sparkle-core/p-b96f3c84.entry.js +7 -0
  807. package/dist/sparkle-core/p-bd80ff43.js +4 -0
  808. package/dist/sparkle-core/p-bd90903e.js +1 -0
  809. package/dist/sparkle-core/p-be64105c.entry.js +1 -0
  810. package/dist/sparkle-core/p-c0533c23.entry.js +1 -0
  811. package/dist/sparkle-core/p-c2990b24.entry.js +1 -0
  812. package/dist/sparkle-core/p-c3cadfc6.entry.js +1 -0
  813. package/dist/sparkle-core/p-c60b29bd.entry.js +4 -0
  814. package/dist/sparkle-core/p-c64a34cd.entry.js +1 -0
  815. package/dist/sparkle-core/p-c7e21070.entry.js +1 -0
  816. package/dist/sparkle-core/p-c9f753a4.js +1 -0
  817. package/dist/sparkle-core/p-cabe9139.js +1 -0
  818. package/dist/sparkle-core/p-cabfbf22.entry.js +1 -0
  819. package/dist/sparkle-core/p-cc518c36.entry.js +1 -0
  820. package/dist/sparkle-core/p-cffd4817.entry.js +1 -0
  821. package/dist/sparkle-core/p-d0adf726.entry.js +1 -0
  822. package/dist/sparkle-core/p-d20e4fcf.entry.js +1 -0
  823. package/dist/sparkle-core/p-d24e53ab.entry.js +1 -0
  824. package/dist/sparkle-core/p-d288e6c1.entry.js +1 -0
  825. package/dist/sparkle-core/p-d601810e.entry.js +1 -0
  826. package/dist/sparkle-core/p-d68092b7.js +4 -0
  827. package/dist/sparkle-core/p-da391f3f.js +1 -0
  828. package/dist/sparkle-core/p-de4deb61.entry.js +1 -0
  829. package/dist/sparkle-core/p-e0cad1bb.js +1 -0
  830. package/dist/sparkle-core/p-e249aebf.entry.js +1 -0
  831. package/dist/sparkle-core/p-e3e36ce9.entry.js +1 -0
  832. package/dist/sparkle-core/p-e421d638.entry.js +1 -0
  833. package/dist/sparkle-core/p-e686d8b5.entry.js +4 -0
  834. package/dist/sparkle-core/p-e8988989.entry.js +1 -0
  835. package/dist/sparkle-core/p-e9431eeb.js +7 -0
  836. package/dist/sparkle-core/p-ea962e1b.entry.js +1 -0
  837. package/dist/sparkle-core/p-eaa8bbee.js +4 -0
  838. package/dist/sparkle-core/p-ebd4354b.entry.js +1 -0
  839. package/dist/sparkle-core/p-ee1e0eb4.js +2 -0
  840. package/dist/sparkle-core/p-ef4edc48.entry.js +4 -0
  841. package/dist/sparkle-core/p-f196c124.entry.js +7 -0
  842. package/dist/sparkle-core/p-f3cba72a.js +4 -0
  843. package/dist/sparkle-core/p-f47fe1fe.entry.js +1 -0
  844. package/dist/sparkle-core/p-f714f77a.entry.js +1 -0
  845. package/dist/sparkle-core/p-f891c79a.entry.js +1 -0
  846. package/dist/sparkle-core/p-fb0ca75e.entry.js +5 -0
  847. package/dist/sparkle-core/p-fb757951.entry.js +1 -0
  848. package/dist/sparkle-core/p-fd8d0738.entry.js +4 -0
  849. package/dist/sparkle-core/p-fda95b6e.entry.js +1 -0
  850. package/dist/sparkle-core/p-fe6dc976.entry.js +1 -0
  851. package/dist/sparkle-core/p-ff080f82.entry.js +10 -0
  852. package/dist/sparkle-core/p-ff7a8a71.js +4 -0
  853. package/dist/sparkle-core/sparkle-core.css +1 -2660
  854. package/dist/sparkle-core/sparkle-core.esm.js +1 -130
  855. package/package.json +1 -1
  856. package/dist/sparkle-core/PrivateRoute-a12e7ee5.js +0 -37
  857. package/dist/sparkle-core/account.service-e711795d.js +0 -63
  858. package/dist/sparkle-core/active-router-af86c9b4.js +0 -73
  859. package/dist/sparkle-core/animation-676a644d.js +0 -984
  860. package/dist/sparkle-core/app-globals-9ffa9ec3.js +0 -10
  861. package/dist/sparkle-core/appdata.service-703dff70.js +0 -69
  862. package/dist/sparkle-core/assets/user.png +0 -0
  863. package/dist/sparkle-core/assets.service-6508aae6.js +0 -71
  864. package/dist/sparkle-core/assignment.service-e42e9368.js +0 -17
  865. package/dist/sparkle-core/button-active-d68c5eb7.js +0 -67
  866. package/dist/sparkle-core/compass-svg.entry.js +0 -128
  867. package/dist/sparkle-core/context-consumer.entry.js +0 -25
  868. package/dist/sparkle-core/course-select.entry.js +0 -26
  869. package/dist/sparkle-core/css-shim-04165e59.js +0 -4
  870. package/dist/sparkle-core/dom-26e7cb2c.js +0 -73
  871. package/dist/sparkle-core/dom-utils-8e73e88b.js +0 -55
  872. package/dist/sparkle-core/facilitator.service-00a88935.js +0 -79
  873. package/dist/sparkle-core/facilitator.store-01be0386.js +0 -18
  874. package/dist/sparkle-core/feed.service-d495f3e1.js +0 -53
  875. package/dist/sparkle-core/framework-delegate-d3fa493f.js +0 -107
  876. package/dist/sparkle-core/haptic-a9e94599.js +0 -124
  877. package/dist/sparkle-core/header-mobile-collapse.entry.js +0 -86
  878. package/dist/sparkle-core/helpers-f11f0674.js +0 -406
  879. package/dist/sparkle-core/icons-758d1417.js +0 -41
  880. package/dist/sparkle-core/index-05b398c2.js +0 -34
  881. package/dist/sparkle-core/index-0af0deac.js +0 -312
  882. package/dist/sparkle-core/index-0df264ee.js +0 -4518
  883. package/dist/sparkle-core/index-183cda39.js +0 -223
  884. package/dist/sparkle-core/index-18a69883.js +0 -1336
  885. package/dist/sparkle-core/index-1d7a6fa0.js +0 -269
  886. package/dist/sparkle-core/index-1dec9544.js +0 -3064
  887. package/dist/sparkle-core/index-81dab78f.js +0 -85
  888. package/dist/sparkle-core/index-9b5bcea1.js +0 -22
  889. package/dist/sparkle-core/index-bb469fe3.js +0 -128
  890. package/dist/sparkle-core/index-d2990a48.js +0 -184
  891. package/dist/sparkle-core/index-dd414b33.js +0 -653
  892. package/dist/sparkle-core/index-faeec85a.js +0 -8
  893. package/dist/sparkle-core/index.es-1f6eedc5.js +0 -11066
  894. package/dist/sparkle-core/input-shims-0b2f5522.js +0 -418
  895. package/dist/sparkle-core/ion-accordion-group.entry.js +0 -201
  896. package/dist/sparkle-core/ion-accordion.entry.js +0 -332
  897. package/dist/sparkle-core/ion-action-sheet.entry.js +0 -263
  898. package/dist/sparkle-core/ion-alert.entry.js +0 -448
  899. package/dist/sparkle-core/ion-app.entry.js +0 -75
  900. package/dist/sparkle-core/ion-avatar.entry.js +0 -21
  901. package/dist/sparkle-core/ion-back-button.entry.js +0 -90
  902. package/dist/sparkle-core/ion-backdrop.entry.js +0 -63
  903. package/dist/sparkle-core/ion-badge.entry.js +0 -25
  904. package/dist/sparkle-core/ion-breadcrumb.entry.js +0 -91
  905. package/dist/sparkle-core/ion-breadcrumbs.entry.js +0 -129
  906. package/dist/sparkle-core/ion-button.entry.js +0 -125
  907. package/dist/sparkle-core/ion-buttons.entry.js +0 -38
  908. package/dist/sparkle-core/ion-card-content.entry.js +0 -26
  909. package/dist/sparkle-core/ion-card-header.entry.js +0 -33
  910. package/dist/sparkle-core/ion-card-subtitle.entry.js +0 -26
  911. package/dist/sparkle-core/ion-card-title.entry.js +0 -26
  912. package/dist/sparkle-core/ion-card.entry.js +0 -64
  913. package/dist/sparkle-core/ion-checkbox.entry.js +0 -109
  914. package/dist/sparkle-core/ion-chip.entry.js +0 -36
  915. package/dist/sparkle-core/ion-col.entry.js +0 -121
  916. package/dist/sparkle-core/ion-content.entry.js +0 -319
  917. package/dist/sparkle-core/ion-datetime-button.entry.js +0 -308
  918. package/dist/sparkle-core/ion-datetime.entry.js +0 -1619
  919. package/dist/sparkle-core/ion-fab-button.entry.js +0 -104
  920. package/dist/sparkle-core/ion-fab-list.entry.js +0 -41
  921. package/dist/sparkle-core/ion-fab.entry.js +0 -72
  922. package/dist/sparkle-core/ion-footer.entry.js +0 -116
  923. package/dist/sparkle-core/ion-grid.entry.js +0 -24
  924. package/dist/sparkle-core/ion-header.entry.js +0 -341
  925. package/dist/sparkle-core/ion-icon.entry.js +0 -200
  926. package/dist/sparkle-core/ion-img.entry.js +0 -97
  927. package/dist/sparkle-core/ion-infinite-scroll-content.entry.js +0 -33
  928. package/dist/sparkle-core/ion-infinite-scroll.entry.js +0 -202
  929. package/dist/sparkle-core/ion-input.entry.js +0 -293
  930. package/dist/sparkle-core/ion-item-divider.entry.js +0 -36
  931. package/dist/sparkle-core/ion-item-group.entry.js +0 -27
  932. package/dist/sparkle-core/ion-item-option.entry.js +0 -56
  933. package/dist/sparkle-core/ion-item-options.entry.js +0 -43
  934. package/dist/sparkle-core/ion-item-sliding.entry.js +0 -394
  935. package/dist/sparkle-core/ion-item.entry.js +0 -267
  936. package/dist/sparkle-core/ion-label.entry.js +0 -77
  937. package/dist/sparkle-core/ion-list-header.entry.js +0 -27
  938. package/dist/sparkle-core/ion-list.entry.js +0 -48
  939. package/dist/sparkle-core/ion-loading.entry.js +0 -211
  940. package/dist/sparkle-core/ion-menu-button.entry.js +0 -72
  941. package/dist/sparkle-core/ion-menu-toggle.entry.js +0 -43
  942. package/dist/sparkle-core/ion-menu.entry.js +0 -575
  943. package/dist/sparkle-core/ion-modal.entry.js +0 -1706
  944. package/dist/sparkle-core/ion-nav-link.entry.js +0 -43
  945. package/dist/sparkle-core/ion-nav.entry.js +0 -872
  946. package/dist/sparkle-core/ion-note.entry.js +0 -25
  947. package/dist/sparkle-core/ion-picker-column-internal.entry.js +0 -363
  948. package/dist/sparkle-core/ion-picker-column.entry.js +0 -327
  949. package/dist/sparkle-core/ion-picker-internal.entry.js +0 -454
  950. package/dist/sparkle-core/ion-picker.entry.js +0 -217
  951. package/dist/sparkle-core/ion-popover.entry.js +0 -1362
  952. package/dist/sparkle-core/ion-progress-bar.entry.js +0 -70
  953. package/dist/sparkle-core/ion-radio-group.entry.js +0 -121
  954. package/dist/sparkle-core/ion-radio.entry.js +0 -111
  955. package/dist/sparkle-core/ion-range.entry.js +0 -511
  956. package/dist/sparkle-core/ion-refresher-content.entry.js +0 -31
  957. package/dist/sparkle-core/ion-refresher.entry.js +0 -798
  958. package/dist/sparkle-core/ion-reorder-group.entry.js +0 -277
  959. package/dist/sparkle-core/ion-reorder.entry.js +0 -34
  960. package/dist/sparkle-core/ion-ripple-effect.entry.js +0 -89
  961. package/dist/sparkle-core/ion-route-redirect.entry.js +0 -20
  962. package/dist/sparkle-core/ion-route.entry.js +0 -45
  963. package/dist/sparkle-core/ion-router-link.entry.js +0 -34
  964. package/dist/sparkle-core/ion-router-outlet.entry.js +0 -196
  965. package/dist/sparkle-core/ion-router.entry.js +0 -827
  966. package/dist/sparkle-core/ion-row.entry.js +0 -16
  967. package/dist/sparkle-core/ion-searchbar.entry.js +0 -366
  968. package/dist/sparkle-core/ion-segment-button.entry.js +0 -98
  969. package/dist/sparkle-core/ion-segment.entry.js +0 -415
  970. package/dist/sparkle-core/ion-select-option.entry.js +0 -23
  971. package/dist/sparkle-core/ion-select-popover.entry.js +0 -96
  972. package/dist/sparkle-core/ion-select.entry.js +0 -510
  973. package/dist/sparkle-core/ion-skeleton-text.entry.js +0 -29
  974. package/dist/sparkle-core/ion-slide.entry.js +0 -21
  975. package/dist/sparkle-core/ion-slides.entry.js +0 -387
  976. package/dist/sparkle-core/ion-spinner.entry.js +0 -60
  977. package/dist/sparkle-core/ion-split-pane.entry.js +0 -156
  978. package/dist/sparkle-core/ion-tab-bar.entry.js +0 -71
  979. package/dist/sparkle-core/ion-tab-button.entry.js +0 -99
  980. package/dist/sparkle-core/ion-tab.entry.js +0 -63
  981. package/dist/sparkle-core/ion-tabs.entry.js +0 -150
  982. package/dist/sparkle-core/ion-text.entry.js +0 -20
  983. package/dist/sparkle-core/ion-textarea.entry.js +0 -244
  984. package/dist/sparkle-core/ion-thumbnail.entry.js +0 -16
  985. package/dist/sparkle-core/ion-title.entry.js +0 -48
  986. package/dist/sparkle-core/ion-toast.entry.js +0 -268
  987. package/dist/sparkle-core/ion-toggle.entry.js +0 -173
  988. package/dist/sparkle-core/ion-toolbar.entry.js +0 -70
  989. package/dist/sparkle-core/ion-virtual-scroll.entry.js +0 -551
  990. package/dist/sparkle-core/ionic-global-127576f6.js +0 -226
  991. package/dist/sparkle-core/ios.transition-02531dda.js +0 -479
  992. package/dist/sparkle-core/location-utils-fea12957.js +0 -229
  993. package/dist/sparkle-core/match-path-760e1797.js +0 -343
  994. package/dist/sparkle-core/md.transition-f8765467.js +0 -55
  995. package/dist/sparkle-core/media.service-2609406e.js +0 -36
  996. package/dist/sparkle-core/menu-toggle-util-6cc13cbd.js +0 -12
  997. package/dist/sparkle-core/overlays-fd3cfa13.js +0 -493
  998. package/dist/sparkle-core/parse-60474840.js +0 -1196
  999. package/dist/sparkle-core/purify-d9093094.js +0 -1469
  1000. package/dist/sparkle-core/quiz.model-1cff62e4.js +0 -5
  1001. package/dist/sparkle-core/shadow-css-1257b266.js +0 -387
  1002. package/dist/sparkle-core/signalR.service-2b7645c1.js +0 -2983
  1003. package/dist/sparkle-core/sparkle-animation-player.entry.js +0 -513
  1004. package/dist/sparkle-core/sparkle-assignment.entry.js +0 -114
  1005. package/dist/sparkle-core/sparkle-button.entry.js +0 -24
  1006. package/dist/sparkle-core/sparkle-card.entry.js +0 -61
  1007. package/dist/sparkle-core/sparkle-cards.entry.js +0 -15
  1008. package/dist/sparkle-core/sparkle-character-intro.entry.js +0 -22
  1009. package/dist/sparkle-core/sparkle-code.entry.js +0 -39
  1010. package/dist/sparkle-core/sparkle-compass-post.entry.js +0 -129
  1011. package/dist/sparkle-core/sparkle-compass.entry.js +0 -122
  1012. package/dist/sparkle-core/sparkle-course-root.entry.js +0 -155
  1013. package/dist/sparkle-core/sparkle-discussion-questions.entry.js +0 -122
  1014. package/dist/sparkle-core/sparkle-discussion-results.entry.js +0 -189
  1015. package/dist/sparkle-core/sparkle-discussion.entry.js +0 -52
  1016. package/dist/sparkle-core/sparkle-dropdown.entry.js +0 -57
  1017. package/dist/sparkle-core/sparkle-emoji.entry.js +0 -77
  1018. package/dist/sparkle-core/sparkle-export-lessons.entry.js +0 -10081
  1019. package/dist/sparkle-core/sparkle-facilitator-dashboard.entry.js +0 -93
  1020. package/dist/sparkle-core/sparkle-facilitator-header.entry.js +0 -60
  1021. package/dist/sparkle-core/sparkle-facilitator-notes-form.entry.js +0 -160
  1022. package/dist/sparkle-core/sparkle-facilitator-notes.entry.js +0 -65
  1023. package/dist/sparkle-core/sparkle-facilitator-page.entry.js +0 -198
  1024. package/dist/sparkle-core/sparkle-feed-post.entry.js +0 -131
  1025. package/dist/sparkle-core/sparkle-feedback.entry.js +0 -106
  1026. package/dist/sparkle-core/sparkle-file-upload.entry.js +0 -57
  1027. package/dist/sparkle-core/sparkle-forgot-password.entry.js +0 -80
  1028. package/dist/sparkle-core/sparkle-goal-form.entry.js +0 -182
  1029. package/dist/sparkle-core/sparkle-goal-item.entry.js +0 -15
  1030. package/dist/sparkle-core/sparkle-goal-progress.entry.js +0 -15
  1031. package/dist/sparkle-core/sparkle-goals.entry.js +0 -47
  1032. package/dist/sparkle-core/sparkle-gww-comment-list.entry.js +0 -22
  1033. package/dist/sparkle-core/sparkle-gww-graph.entry.js +0 -15
  1034. package/dist/sparkle-core/sparkle-gww-item.entry.js +0 -80
  1035. package/dist/sparkle-core/sparkle-gww.entry.js +0 -44
  1036. package/dist/sparkle-core/sparkle-header.entry.js +0 -97
  1037. package/dist/sparkle-core/sparkle-health.entry.js +0 -70
  1038. package/dist/sparkle-core/sparkle-input.entry.js +0 -52
  1039. package/dist/sparkle-core/sparkle-intro.entry.js +0 -22
  1040. package/dist/sparkle-core/sparkle-login.entry.js +0 -116
  1041. package/dist/sparkle-core/sparkle-lower-content-nav.entry.js +0 -18
  1042. package/dist/sparkle-core/sparkle-menu-collapsible.entry.js +0 -42
  1043. package/dist/sparkle-core/sparkle-menu-toggle.entry.js +0 -24
  1044. package/dist/sparkle-core/sparkle-menu.entry.js +0 -26
  1045. package/dist/sparkle-core/sparkle-modal-image.entry.js +0 -33
  1046. package/dist/sparkle-core/sparkle-mood.entry.js +0 -76
  1047. package/dist/sparkle-core/sparkle-nav.entry.js +0 -113
  1048. package/dist/sparkle-core/sparkle-notfound-page.entry.js +0 -25
  1049. package/dist/sparkle-core/sparkle-online-students.entry.js +0 -55
  1050. package/dist/sparkle-core/sparkle-overlay.entry.js +0 -90
  1051. package/dist/sparkle-core/sparkle-page-footer.entry.js +0 -24
  1052. package/dist/sparkle-core/sparkle-page.entry.js +0 -245
  1053. package/dist/sparkle-core/sparkle-pagination.entry.js +0 -67
  1054. package/dist/sparkle-core/sparkle-poll.entry.js +0 -15
  1055. package/dist/sparkle-core/sparkle-quiz-container.entry.js +0 -43
  1056. package/dist/sparkle-core/sparkle-quiz-feedback.entry.js +0 -18
  1057. package/dist/sparkle-core/sparkle-quiz-input.entry.js +0 -16
  1058. package/dist/sparkle-core/sparkle-quiz-old.entry.js +0 -116
  1059. package/dist/sparkle-core/sparkle-quiz-opinion.entry.js +0 -41
  1060. package/dist/sparkle-core/sparkle-quiz-poll.entry.js +0 -16
  1061. package/dist/sparkle-core/sparkle-quiz-select.entry.js +0 -29
  1062. package/dist/sparkle-core/sparkle-quiz.entry.js +0 -98
  1063. package/dist/sparkle-core/sparkle-reset-password.entry.js +0 -96
  1064. package/dist/sparkle-core/sparkle-root.entry.js +0 -79
  1065. package/dist/sparkle-core/sparkle-select.entry.js +0 -57
  1066. package/dist/sparkle-core/sparkle-sidebar.entry.js +0 -39
  1067. package/dist/sparkle-core/sparkle-signup.entry.js +0 -144
  1068. package/dist/sparkle-core/sparkle-tab.entry.js +0 -22
  1069. package/dist/sparkle-core/sparkle-table-of-contents.entry.js +0 -67
  1070. package/dist/sparkle-core/sparkle-tabs.entry.js +0 -62
  1071. package/dist/sparkle-core/sparkle-unauthorized.entry.js +0 -17
  1072. package/dist/sparkle-core/sparkle-user-enrollment.entry.js +0 -85
  1073. package/dist/sparkle-core/sparkle-user-profile.entry.js +0 -129
  1074. package/dist/sparkle-core/sparkle-validation-error.entry.js +0 -17
  1075. package/dist/sparkle-core/sparkle-video-player.entry.js +0 -18
  1076. package/dist/sparkle-core/sparkle-youtube.entry.js +0 -35
  1077. package/dist/sparkle-core/status-tap-52feb1b1.js +0 -40
  1078. package/dist/sparkle-core/stencil-async-content.entry.js +0 -28
  1079. package/dist/sparkle-core/stencil-route-link.entry.js +0 -74
  1080. package/dist/sparkle-core/stencil-route-switch.entry.js +0 -100
  1081. package/dist/sparkle-core/stencil-route-title.entry.js +0 -28
  1082. package/dist/sparkle-core/stencil-route.entry.js +0 -93
  1083. package/dist/sparkle-core/stencil-router-prompt.entry.js +0 -55
  1084. package/dist/sparkle-core/stencil-router-redirect.entry.js +0 -28
  1085. package/dist/sparkle-core/stencil-router.entry.js +0 -636
  1086. package/dist/sparkle-core/store.service-0f7d998b.js +0 -16
  1087. package/dist/sparkle-core/student.service-f0375229.js +0 -59
  1088. package/dist/sparkle-core/swipe-back-9a614189.js +0 -73
  1089. package/dist/sparkle-core/swiper.bundle-4274e115.js +0 -6418
  1090. package/dist/sparkle-core/user.store-3d052406.js +0 -19
  1091. package/dist/sparkle-core/util-ba470e54.js +0 -14683
  1092. package/dist/sparkle-core/utils-cae23bce.js +0 -114
  1093. /package/dist/{sparkle-core → esm}/cubic-bezier-4c0db14f.js +0 -0
  1094. /package/dist/{sparkle-core → esm}/focus-visible-4e9a0764.js +0 -0
  1095. /package/dist/{sparkle-core → esm}/hardware-back-button-fa04d6e9.js +0 -0
  1096. /package/dist/{sparkle-core → esm}/index-be6112f8.js +0 -0
  1097. /package/dist/{sparkle-core → esm}/keyboard-7e8329b3.js +0 -0
  1098. /package/dist/{sparkle-core → esm}/localstorage.service-4bf408c8.js +0 -0
  1099. /package/dist/{sparkle-core → esm}/spinner-configs-a37e628a.js +0 -0
  1100. /package/dist/{sparkle-core → esm}/theme-7ef00c83.js +0 -0
@@ -0,0 +1,2925 @@
1
+ import { w as writeTask, r as registerInstance, i as createEvent, j as readTask, h, H as Host, e as getElement, f as forceUpdate } from './index-c04b9ed5.js';
2
+ import { g as getIonMode, a as isPlatform } from './ionic-global-4903e23e.js';
3
+ import { c as hapticSelectionEnd, a as hapticSelectionStart, b as hapticSelectionChanged } from './haptic-522f76f2.js';
4
+ import { createGesture } from './index-21661af2.js';
5
+ import { B as BACKDROP, i as isCancel, b as present, p as prepareOverlay, d as dismiss, e as eventMethod, s as safeCall, f as focusFirstDescendant, h as popoverController, j as actionSheetController, a as alertController } from './overlays-4233a39d.js';
6
+ import { g as getClassMap, h as hostContext, c as createColorClasses } from './theme-7ef00c83.js';
7
+ import { c as createAnimation } from './animation-12377cb3.js';
8
+ import { s as sanitizeDOMString } from './index-be6112f8.js';
9
+ import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-3e634a5c.js';
10
+ import { l as raf, g as getElementRoot, a as addEventListener, f as focusElement, k as findItemLabel, b as getAriaLabel, d as renderHiddenInput, e as debounceEvent, i as inheritAriaAttributes, j as inheritAttributes } from './helpers-bf0e23d6.js';
11
+ import { d as deepReady } from './index-2b84cad2.js';
12
+ import './gesture-controller-7be18351.js';
13
+ import './hardware-back-button-fa04d6e9.js';
14
+
15
+ /*!
16
+ * (C) Ionic http://ionicframework.com - MIT License
17
+ */
18
+ const createButtonActiveGesture = (el, isButton) => {
19
+ let currentTouchedButton;
20
+ let initialTouchedButton;
21
+ const activateButtonAtPoint = (x, y, hapticFeedbackFn) => {
22
+ if (typeof document === 'undefined') {
23
+ return;
24
+ }
25
+ const target = document.elementFromPoint(x, y);
26
+ if (!target || !isButton(target)) {
27
+ clearActiveButton();
28
+ return;
29
+ }
30
+ if (target !== currentTouchedButton) {
31
+ clearActiveButton();
32
+ setActiveButton(target, hapticFeedbackFn);
33
+ }
34
+ };
35
+ const setActiveButton = (button, hapticFeedbackFn) => {
36
+ currentTouchedButton = button;
37
+ if (!initialTouchedButton) {
38
+ initialTouchedButton = currentTouchedButton;
39
+ }
40
+ const buttonToModify = currentTouchedButton;
41
+ writeTask(() => buttonToModify.classList.add('ion-activated'));
42
+ hapticFeedbackFn();
43
+ };
44
+ const clearActiveButton = (dispatchClick = false) => {
45
+ if (!currentTouchedButton) {
46
+ return;
47
+ }
48
+ const buttonToModify = currentTouchedButton;
49
+ writeTask(() => buttonToModify.classList.remove('ion-activated'));
50
+ /**
51
+ * Clicking on one button, but releasing on another button
52
+ * does not dispatch a click event in browsers, so we
53
+ * need to do it manually here. Some browsers will
54
+ * dispatch a click if clicking on one button, dragging over
55
+ * another button, and releasing on the original button. In that
56
+ * case, we need to make sure we do not cause a double click there.
57
+ */
58
+ if (dispatchClick && initialTouchedButton !== currentTouchedButton) {
59
+ currentTouchedButton.click();
60
+ }
61
+ currentTouchedButton = undefined;
62
+ };
63
+ return createGesture({
64
+ el,
65
+ gestureName: 'buttonActiveDrag',
66
+ threshold: 0,
67
+ onStart: (ev) => activateButtonAtPoint(ev.currentX, ev.currentY, hapticSelectionStart),
68
+ onMove: (ev) => activateButtonAtPoint(ev.currentX, ev.currentY, hapticSelectionChanged),
69
+ onEnd: () => {
70
+ clearActiveButton(true);
71
+ hapticSelectionEnd();
72
+ initialTouchedButton = undefined;
73
+ },
74
+ });
75
+ };
76
+
77
+ /*!
78
+ * (C) Ionic http://ionicframework.com - MIT License
79
+ */
80
+ /**
81
+ * iOS Action Sheet Enter Animation
82
+ */
83
+ const iosEnterAnimation$2 = (baseEl) => {
84
+ const baseAnimation = createAnimation();
85
+ const backdropAnimation = createAnimation();
86
+ const wrapperAnimation = createAnimation();
87
+ backdropAnimation
88
+ .addElement(baseEl.querySelector('ion-backdrop'))
89
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
90
+ .beforeStyles({
91
+ 'pointer-events': 'none',
92
+ })
93
+ .afterClearStyles(['pointer-events']);
94
+ wrapperAnimation
95
+ .addElement(baseEl.querySelector('.action-sheet-wrapper'))
96
+ .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
97
+ return baseAnimation
98
+ .addElement(baseEl)
99
+ .easing('cubic-bezier(.36,.66,.04,1)')
100
+ .duration(400)
101
+ .addAnimation([backdropAnimation, wrapperAnimation]);
102
+ };
103
+
104
+ /*!
105
+ * (C) Ionic http://ionicframework.com - MIT License
106
+ */
107
+ /**
108
+ * iOS Action Sheet Leave Animation
109
+ */
110
+ const iosLeaveAnimation$2 = (baseEl) => {
111
+ const baseAnimation = createAnimation();
112
+ const backdropAnimation = createAnimation();
113
+ const wrapperAnimation = createAnimation();
114
+ backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
115
+ wrapperAnimation
116
+ .addElement(baseEl.querySelector('.action-sheet-wrapper'))
117
+ .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
118
+ return baseAnimation
119
+ .addElement(baseEl)
120
+ .easing('cubic-bezier(.36,.66,.04,1)')
121
+ .duration(450)
122
+ .addAnimation([backdropAnimation, wrapperAnimation]);
123
+ };
124
+
125
+ /*!
126
+ * (C) Ionic http://ionicframework.com - MIT License
127
+ */
128
+ /**
129
+ * MD Action Sheet Enter Animation
130
+ */
131
+ const mdEnterAnimation$2 = (baseEl) => {
132
+ const baseAnimation = createAnimation();
133
+ const backdropAnimation = createAnimation();
134
+ const wrapperAnimation = createAnimation();
135
+ backdropAnimation
136
+ .addElement(baseEl.querySelector('ion-backdrop'))
137
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
138
+ .beforeStyles({
139
+ 'pointer-events': 'none',
140
+ })
141
+ .afterClearStyles(['pointer-events']);
142
+ wrapperAnimation
143
+ .addElement(baseEl.querySelector('.action-sheet-wrapper'))
144
+ .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
145
+ return baseAnimation
146
+ .addElement(baseEl)
147
+ .easing('cubic-bezier(.36,.66,.04,1)')
148
+ .duration(400)
149
+ .addAnimation([backdropAnimation, wrapperAnimation]);
150
+ };
151
+
152
+ /*!
153
+ * (C) Ionic http://ionicframework.com - MIT License
154
+ */
155
+ /**
156
+ * MD Action Sheet Leave Animation
157
+ */
158
+ const mdLeaveAnimation$2 = (baseEl) => {
159
+ const baseAnimation = createAnimation();
160
+ const backdropAnimation = createAnimation();
161
+ const wrapperAnimation = createAnimation();
162
+ backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
163
+ wrapperAnimation
164
+ .addElement(baseEl.querySelector('.action-sheet-wrapper'))
165
+ .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
166
+ return baseAnimation
167
+ .addElement(baseEl)
168
+ .easing('cubic-bezier(.36,.66,.04,1)')
169
+ .duration(450)
170
+ .addAnimation([backdropAnimation, wrapperAnimation]);
171
+ };
172
+
173
+ const actionSheetIosCss = ".sc-ion-action-sheet-ios-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:100%;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);touch-action:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-ios-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-ios{left:0;right:0;bottom:0;transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-ios{display:flex;position:relative;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-ios{display:flex;flex-flow:column;justify-content:flex-end;height:100%;max-height:100%}.action-sheet-group.sc-ion-action-sheet-ios{flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}.action-sheet-group.sc-ion-action-sheet-ios::-webkit-scrollbar{display:none}.action-sheet-group-cancel.sc-ion-action-sheet-ios{flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}.action-sheet-selected.sc-ion-action-sheet-ios{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-ios:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-ios:hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9));--backdrop-opacity:var(--ion-backdrop-opacity, 0.4);--button-background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent;--button-background-activated:var(--ion-text-color, #000);--button-background-activated-opacity:.08;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-background-selected:var(--ion-color-step-150, var(--ion-background-color, #fff));--button-background-selected-opacity:1;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-400, #999999);text-align:center}.action-sheet-wrapper.sc-ion-action-sheet-ios{margin-left:auto;margin-right:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:var(--ion-safe-area-bottom, 0)}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-wrapper.sc-ion-action-sheet-ios{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.action-sheet-container.sc-ion-action-sheet-ios{padding-left:8px;padding-right:8px;padding-top:0;padding-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-container.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.action-sheet-group.sc-ion-action-sheet-ios{border-radius:13px;margin-bottom:8px}.action-sheet-group.sc-ion-action-sheet-ios:first-child{margin-top:10px}.action-sheet-group.sc-ion-action-sheet-ios:last-child{margin-bottom:10px}@supports (backdrop-filter: blur(0)){.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-group.sc-ion-action-sheet-ios{background-color:transparent;backdrop-filter:saturate(280%) blur(20px)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-title.sc-ion-action-sheet-ios,.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.sc-ion-action-sheet-ios{background-color:transparent;background-image:linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%), linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4) 50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 50%);background-repeat:no-repeat;background-position:top, bottom;background-size:100% calc(100% - 1px), 100% 1px;backdrop-filter:saturate(120%)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.ion-activated.sc-ion-action-sheet-ios{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.7);background-image:none}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-cancel.sc-ion-action-sheet-ios{background:var(--button-background-selected)}}.action-sheet-title.sc-ion-action-sheet-ios{background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent}.action-sheet-title.sc-ion-action-sheet-ios{padding-left:10px;padding-right:10px;padding-top:14px;padding-bottom:13px;color:var(--color, var(--ion-color-step-400, #999999));font-size:13px;font-weight:400;text-align:center}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-title.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}.action-sheet-title.action-sheet-has-sub-title.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-sub-title.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:6px;padding-bottom:0;font-size:13px;font-weight:400}.action-sheet-button.sc-ion-action-sheet-ios{padding-left:18px;padding-right:18px;padding-top:18px;padding-bottom:18px;height:56px;font-size:20px;contain:strict}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-button.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:18px;padding-inline-start:18px;-webkit-padding-end:18px;padding-inline-end:18px}}.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{margin-right:0.3em;font-size:28px;pointer-events:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{margin-right:unset;-webkit-margin-end:0.3em;margin-inline-end:0.3em}}.action-sheet-button.sc-ion-action-sheet-ios:last-child{background-image:none}.action-sheet-selected.sc-ion-action-sheet-ios{font-weight:bold}.action-sheet-cancel.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-cancel.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-destructive.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-activated.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-focused.sc-ion-action-sheet-ios{color:var(--ion-color-danger, #eb445a)}@media (any-hover: hover){.action-sheet-destructive.sc-ion-action-sheet-ios:hover{color:var(--ion-color-danger, #eb445a)}}";
174
+
175
+ const actionSheetMdCss = ".sc-ion-action-sheet-md-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:100%;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);touch-action:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-md-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-md{left:0;right:0;bottom:0;transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-md{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-md{display:flex;position:relative;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-md{display:flex;flex-flow:column;justify-content:flex-end;height:100%;max-height:100%}.action-sheet-group.sc-ion-action-sheet-md{flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}.action-sheet-group.sc-ion-action-sheet-md::-webkit-scrollbar{display:none}.action-sheet-group-cancel.sc-ion-action-sheet-md{flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-md::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}.action-sheet-selected.sc-ion-action-sheet-md{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-md::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-md:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-md:hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);--button-background:transparent;--button-background-selected:currentColor;--button-background-selected-opacity:0;--button-background-activated:transparent;--button-background-activated-opacity:0;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-color:var(--ion-color-step-850, #262626);--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54)}.action-sheet-wrapper.sc-ion-action-sheet-md{margin-left:auto;margin-right:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-wrapper.sc-ion-action-sheet-md{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.action-sheet-title.sc-ion-action-sheet-md{padding-left:16px;padding-right:16px;padding-top:20px;padding-bottom:17px;min-height:60px;color:var(--color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54));font-size:16px;text-align:start}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-title.sc-ion-action-sheet-md{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.action-sheet-sub-title.sc-ion-action-sheet-md{padding-left:0;padding-right:0;padding-top:16px;padding-bottom:0;font-size:14px}.action-sheet-group.sc-ion-action-sheet-md:first-child{padding-top:0}.action-sheet-group.sc-ion-action-sheet-md:last-child{padding-bottom:var(--ion-safe-area-bottom)}.action-sheet-button.sc-ion-action-sheet-md{padding-left:16px;padding-right:16px;padding-top:0;padding-bottom:0;position:relative;height:52px;font-size:16px;text-align:start;contain:strict;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-button.sc-ion-action-sheet-md{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.action-sheet-icon.sc-ion-action-sheet-md{padding-bottom:4px;margin-left:0;margin-right:32px;margin-top:0;margin-bottom:0;color:var(--color);font-size:24px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-icon.sc-ion-action-sheet-md{margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:32px;margin-inline-end:32px}}.action-sheet-button-inner.sc-ion-action-sheet-md{justify-content:flex-start}.action-sheet-selected.sc-ion-action-sheet-md{font-weight:bold}";
176
+
177
+ const ActionSheet = class {
178
+ constructor(hostRef) {
179
+ registerInstance(this, hostRef);
180
+ this.didPresent = createEvent(this, "ionActionSheetDidPresent", 7);
181
+ this.willPresent = createEvent(this, "ionActionSheetWillPresent", 7);
182
+ this.willDismiss = createEvent(this, "ionActionSheetWillDismiss", 7);
183
+ this.didDismiss = createEvent(this, "ionActionSheetDidDismiss", 7);
184
+ this.presented = false;
185
+ /**
186
+ * If `true`, the keyboard will be automatically dismissed when the overlay is presented.
187
+ */
188
+ this.keyboardClose = true;
189
+ /**
190
+ * An array of buttons for the action sheet.
191
+ */
192
+ this.buttons = [];
193
+ /**
194
+ * If `true`, the action sheet will be dismissed when the backdrop is clicked.
195
+ */
196
+ this.backdropDismiss = true;
197
+ /**
198
+ * If `true`, the action sheet will be translucent.
199
+ * Only applies when the mode is `"ios"` and the device supports
200
+ * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
201
+ */
202
+ this.translucent = false;
203
+ /**
204
+ * If `true`, the action sheet will animate.
205
+ */
206
+ this.animated = true;
207
+ this.onBackdropTap = () => {
208
+ this.dismiss(undefined, BACKDROP);
209
+ };
210
+ this.dispatchCancelHandler = (ev) => {
211
+ const role = ev.detail.role;
212
+ if (isCancel(role)) {
213
+ const cancelButton = this.getButtons().find((b) => b.role === 'cancel');
214
+ this.callButtonHandler(cancelButton);
215
+ }
216
+ };
217
+ }
218
+ /**
219
+ * Present the action sheet overlay after it has been created.
220
+ */
221
+ present() {
222
+ return present(this, 'actionSheetEnter', iosEnterAnimation$2, mdEnterAnimation$2);
223
+ }
224
+ connectedCallback() {
225
+ prepareOverlay(this.el);
226
+ }
227
+ /**
228
+ * Dismiss the action sheet overlay after it has been presented.
229
+ *
230
+ * @param data Any data to emit in the dismiss events.
231
+ * @param role The role of the element that is dismissing the action sheet.
232
+ * This can be useful in a button handler for determining which button was
233
+ * clicked to dismiss the action sheet.
234
+ * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
235
+ */
236
+ dismiss(data, role) {
237
+ return dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation$2, mdLeaveAnimation$2);
238
+ }
239
+ /**
240
+ * Returns a promise that resolves when the action sheet did dismiss.
241
+ */
242
+ onDidDismiss() {
243
+ return eventMethod(this.el, 'ionActionSheetDidDismiss');
244
+ }
245
+ /**
246
+ * Returns a promise that resolves when the action sheet will dismiss.
247
+ *
248
+ */
249
+ onWillDismiss() {
250
+ return eventMethod(this.el, 'ionActionSheetWillDismiss');
251
+ }
252
+ async buttonClick(button) {
253
+ const role = button.role;
254
+ if (isCancel(role)) {
255
+ return this.dismiss(button.data, role);
256
+ }
257
+ const shouldDismiss = await this.callButtonHandler(button);
258
+ if (shouldDismiss) {
259
+ return this.dismiss(button.data, button.role);
260
+ }
261
+ return Promise.resolve();
262
+ }
263
+ async callButtonHandler(button) {
264
+ if (button) {
265
+ // a handler has been provided, execute it
266
+ // pass the handler the values from the inputs
267
+ const rtn = await safeCall(button.handler);
268
+ if (rtn === false) {
269
+ // if the return value of the handler is false then do not dismiss
270
+ return false;
271
+ }
272
+ }
273
+ return true;
274
+ }
275
+ getButtons() {
276
+ return this.buttons.map((b) => {
277
+ return typeof b === 'string' ? { text: b } : b;
278
+ });
279
+ }
280
+ disconnectedCallback() {
281
+ if (this.gesture) {
282
+ this.gesture.destroy();
283
+ this.gesture = undefined;
284
+ }
285
+ }
286
+ componentDidLoad() {
287
+ /**
288
+ * Do not create gesture if:
289
+ * 1. A gesture already exists
290
+ * 2. App is running in MD mode
291
+ * 3. A wrapper ref does not exist
292
+ */
293
+ const { groupEl, wrapperEl } = this;
294
+ if (this.gesture || getIonMode(this) === 'md' || !wrapperEl || !groupEl) {
295
+ return;
296
+ }
297
+ readTask(() => {
298
+ const isScrollable = groupEl.scrollHeight > groupEl.clientHeight;
299
+ if (!isScrollable) {
300
+ this.gesture = createButtonActiveGesture(wrapperEl, (refEl) => refEl.classList.contains('action-sheet-button'));
301
+ this.gesture.enable(true);
302
+ }
303
+ });
304
+ }
305
+ render() {
306
+ const { htmlAttributes } = this;
307
+ const mode = getIonMode(this);
308
+ const allButtons = this.getButtons();
309
+ const cancelButton = allButtons.find((b) => b.role === 'cancel');
310
+ const buttons = allButtons.filter((b) => b.role !== 'cancel');
311
+ return (h(Host, Object.assign({ role: "dialog", "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
312
+ zIndex: `${20000 + this.overlayIndex}`,
313
+ }, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { tappable: this.backdropDismiss }), h("div", { tabindex: "0" }), h("div", { class: "action-sheet-wrapper ion-overlay-wrapper", role: "dialog", ref: (el) => (this.wrapperEl = el) }, h("div", { class: "action-sheet-container" }, h("div", { class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, this.header !== undefined && (h("div", { class: {
314
+ 'action-sheet-title': true,
315
+ 'action-sheet-has-sub-title': this.subHeader !== undefined,
316
+ } }, this.header, this.subHeader && h("div", { class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (h("button", { type: "button", id: b.id, class: buttonClass$1(b), onClick: () => this.buttonClick(b) }, h("span", { class: "action-sheet-button-inner" }, b.icon && h("ion-icon", { icon: b.icon, lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && h("ion-ripple-effect", null))))), cancelButton && (h("div", { class: "action-sheet-group action-sheet-group-cancel" }, h("button", { type: "button", class: buttonClass$1(cancelButton), onClick: () => this.buttonClick(cancelButton) }, h("span", { class: "action-sheet-button-inner" }, cancelButton.icon && h("ion-icon", { icon: cancelButton.icon, lazy: false, class: "action-sheet-icon" }), cancelButton.text), mode === 'md' && h("ion-ripple-effect", null)))))), h("div", { tabindex: "0" })));
317
+ }
318
+ get el() { return getElement(this); }
319
+ };
320
+ const buttonClass$1 = (button) => {
321
+ return Object.assign({ 'action-sheet-button': true, 'ion-activatable': true, 'ion-focusable': true, [`action-sheet-${button.role}`]: button.role !== undefined }, getClassMap(button.cssClass));
322
+ };
323
+ ActionSheet.style = {
324
+ ios: actionSheetIosCss,
325
+ md: actionSheetMdCss
326
+ };
327
+
328
+ /*!
329
+ * (C) Ionic http://ionicframework.com - MIT License
330
+ */
331
+ /**
332
+ * iOS Alert Enter Animation
333
+ */
334
+ const iosEnterAnimation$1 = (baseEl) => {
335
+ const baseAnimation = createAnimation();
336
+ const backdropAnimation = createAnimation();
337
+ const wrapperAnimation = createAnimation();
338
+ backdropAnimation
339
+ .addElement(baseEl.querySelector('ion-backdrop'))
340
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
341
+ .beforeStyles({
342
+ 'pointer-events': 'none',
343
+ })
344
+ .afterClearStyles(['pointer-events']);
345
+ wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).keyframes([
346
+ { offset: 0, opacity: '0.01', transform: 'scale(1.1)' },
347
+ { offset: 1, opacity: '1', transform: 'scale(1)' },
348
+ ]);
349
+ return baseAnimation
350
+ .addElement(baseEl)
351
+ .easing('ease-in-out')
352
+ .duration(200)
353
+ .addAnimation([backdropAnimation, wrapperAnimation]);
354
+ };
355
+
356
+ /*!
357
+ * (C) Ionic http://ionicframework.com - MIT License
358
+ */
359
+ /**
360
+ * iOS Alert Leave Animation
361
+ */
362
+ const iosLeaveAnimation$1 = (baseEl) => {
363
+ const baseAnimation = createAnimation();
364
+ const backdropAnimation = createAnimation();
365
+ const wrapperAnimation = createAnimation();
366
+ backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
367
+ wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).keyframes([
368
+ { offset: 0, opacity: 0.99, transform: 'scale(1)' },
369
+ { offset: 1, opacity: 0, transform: 'scale(0.9)' },
370
+ ]);
371
+ return baseAnimation
372
+ .addElement(baseEl)
373
+ .easing('ease-in-out')
374
+ .duration(200)
375
+ .addAnimation([backdropAnimation, wrapperAnimation]);
376
+ };
377
+
378
+ /*!
379
+ * (C) Ionic http://ionicframework.com - MIT License
380
+ */
381
+ /**
382
+ * Md Alert Enter Animation
383
+ */
384
+ const mdEnterAnimation$1 = (baseEl) => {
385
+ const baseAnimation = createAnimation();
386
+ const backdropAnimation = createAnimation();
387
+ const wrapperAnimation = createAnimation();
388
+ backdropAnimation
389
+ .addElement(baseEl.querySelector('ion-backdrop'))
390
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
391
+ .beforeStyles({
392
+ 'pointer-events': 'none',
393
+ })
394
+ .afterClearStyles(['pointer-events']);
395
+ wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).keyframes([
396
+ { offset: 0, opacity: '0.01', transform: 'scale(0.9)' },
397
+ { offset: 1, opacity: '1', transform: 'scale(1)' },
398
+ ]);
399
+ return baseAnimation
400
+ .addElement(baseEl)
401
+ .easing('ease-in-out')
402
+ .duration(150)
403
+ .addAnimation([backdropAnimation, wrapperAnimation]);
404
+ };
405
+
406
+ /*!
407
+ * (C) Ionic http://ionicframework.com - MIT License
408
+ */
409
+ /**
410
+ * Md Alert Leave Animation
411
+ */
412
+ const mdLeaveAnimation$1 = (baseEl) => {
413
+ const baseAnimation = createAnimation();
414
+ const backdropAnimation = createAnimation();
415
+ const wrapperAnimation = createAnimation();
416
+ backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
417
+ wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).fromTo('opacity', 0.99, 0);
418
+ return baseAnimation
419
+ .addElement(baseEl)
420
+ .easing('ease-in-out')
421
+ .duration(150)
422
+ .addAnimation([backdropAnimation, wrapperAnimation]);
423
+ };
424
+
425
+ const alertIosCss = ".sc-ion-alert-ios-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:flex;position:absolute;align-items:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;touch-action:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-ios-h{display:none}.alert-top.sc-ion-alert-ios-h{padding-top:50px;align-items:flex-start}.alert-wrapper.sc-ion-alert-ios{display:flex;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-ios{box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-message.sc-ion-alert-ios::-webkit-scrollbar{display:none}.alert-input.sc-ion-alert-ios{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;box-sizing:border-box}.alert-button-group.sc-ion-alert-ios{display:flex;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-ios{flex-direction:column;flex-wrap:nowrap}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:14px;line-height:20px;z-index:0}.alert-button.ion-focused.sc-ion-alert-ios,.alert-tappable.ion-focused.sc-ion-alert-ios{background:var(--ion-color-step-100, #e6e6e6)}.alert-button-inner.sc-ion-alert-ios{display:flex;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%}.alert-input-disabled.sc-ion-alert-ios,.alert-checkbox-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios,.alert-radio-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;appearance:none;contain:strict}.alert-button.sc-ion-alert-ios,.alert-checkbox.sc-ion-alert-ios,.alert-input.sc-ion-alert-ios,.alert-radio.sc-ion-alert-ios{outline:none}.alert-radio-icon.sc-ion-alert-ios,.alert-checkbox-icon.sc-ion-alert-ios,.alert-checkbox-inner.sc-ion-alert-ios{box-sizing:border-box}textarea.alert-input.sc-ion-alert-ios{min-height:37px;resize:none}.sc-ion-alert-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9));--max-width:270px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);font-size:14px}.alert-wrapper.sc-ion-alert-ios{border-radius:13px;box-shadow:none;overflow:hidden}.alert-button.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{pointer-events:none}@supports (backdrop-filter: blur(0)){.alert-translucent.sc-ion-alert-ios-h .alert-wrapper.sc-ion-alert-ios{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.9);backdrop-filter:saturate(180%) blur(20px)}}.alert-head.sc-ion-alert-ios{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:7px;text-align:center}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-head.sc-ion-alert-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.alert-title.sc-ion-alert-ios{margin-top:8px;color:var(--ion-text-color, #000);font-size:17px;font-weight:600}.alert-sub-title.sc-ion-alert-ios{color:var(--ion-color-step-600, #666666);font-size:14px}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{padding-left:16px;padding-right:16px;padding-top:0;padding-bottom:21px;color:var(--ion-text-color, #000);font-size:13px;text-align:center}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.alert-message.sc-ion-alert-ios{max-height:240px}.alert-message.sc-ion-alert-ios:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:12px}.alert-input.sc-ion-alert-ios{border-radius:4px;margin-top:10px;padding-left:6px;padding-right:6px;padding-top:6px;padding-bottom:6px;border:0.55px solid var(--ion-color-step-250, #bfbfbf);background-color:var(--ion-background-color, #fff);appearance:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-input.sc-ion-alert-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:6px;padding-inline-start:6px;-webkit-padding-end:6px;padding-inline-end:6px}}.alert-input.sc-ion-alert-ios::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-clear{display:none}.alert-radio-group.sc-ion-alert-ios,.alert-checkbox-group.sc-ion-alert-ios{overscroll-behavior:contain;max-height:240px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);overflow-y:auto;-webkit-overflow-scrolling:touch}.alert-tappable.sc-ion-alert-ios{height:44px}.alert-radio-label.sc-ion-alert-ios{padding-left:13px;padding-right:13px;padding-top:13px;padding-bottom:13px;flex:1;order:0;color:var(--ion-text-color, #000);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-radio-label.sc-ion-alert-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px}}[aria-checked=true].sc-ion-alert-ios .alert-radio-label.sc-ion-alert-ios{color:var(--ion-color-primary, #3880ff)}.alert-radio-icon.sc-ion-alert-ios{position:relative;order:1;min-width:30px}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{left:7px;top:-7px;position:absolute;width:6px;height:12px;transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary, #3880ff)}[dir=rtl].sc-ion-alert-ios [aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios,[dir=rtl].sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios,[dir=rtl] .sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{left:unset;right:unset;right:7px}.alert-checkbox-label.sc-ion-alert-ios{padding-left:13px;padding-right:13px;padding-top:13px;padding-bottom:13px;flex:1;color:var(--ion-text-color, #000);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-checkbox-label.sc-ion-alert-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px}}.alert-checkbox-icon.sc-ion-alert-ios{border-radius:50%;margin-left:16px;margin-right:6px;margin-top:10px;margin-bottom:10px;position:relative;width:24px;height:24px;border-width:1px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)));background-color:var(--ion-item-background, var(--ion-background-color, #fff));contain:strict}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-checkbox-icon.sc-ion-alert-ios{margin-left:unset;margin-right:unset;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:6px;margin-inline-end:6px}}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-icon.sc-ion-alert-ios{border-color:var(--ion-color-primary, #3880ff);background-color:var(--ion-color-primary, #3880ff)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{left:9px;top:4px;position:absolute;width:5px;height:12px;transform:rotate(45deg);border-width:1px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-background-color, #fff)}[dir=rtl].sc-ion-alert-ios [aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios,[dir=rtl].sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios,[dir=rtl] .sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{left:unset;right:unset;right:9px}.alert-button-group.sc-ion-alert-ios{margin-right:-0.55px;flex-wrap:wrap}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-button-group.sc-ion-alert-ios{margin-right:unset;-webkit-margin-end:-0.55px;margin-inline-end:-0.55px}}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:0;flex:1 1 auto;min-width:50%;height:44px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);background-color:transparent;color:var(--ion-color-primary, #3880ff);font-size:17px;overflow:hidden}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:first-child,[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child{border-right:0}.alert-button.sc-ion-alert-ios:last-child{border-right:0;font-weight:bold}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child,[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}.alert-button.ion-activated.sc-ion-alert-ios{background-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1)}.alert-button-role-destructive.sc-ion-alert-ios,.alert-button-role-destructive.ion-activated.sc-ion-alert-ios,.alert-button-role-destructive.ion-focused.sc-ion-alert-ios{color:var(--ion-color-danger, #eb445a)}";
426
+
427
+ const alertMdCss = ".sc-ion-alert-md-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:flex;position:absolute;align-items:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;touch-action:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-md-h{display:none}.alert-top.sc-ion-alert-md-h{padding-top:50px;align-items:flex-start}.alert-wrapper.sc-ion-alert-md{display:flex;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-md{box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-group.sc-ion-alert-md::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-md::-webkit-scrollbar,.alert-message.sc-ion-alert-md::-webkit-scrollbar{display:none}.alert-input.sc-ion-alert-md{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;box-sizing:border-box}.alert-button-group.sc-ion-alert-md{display:flex;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-md{flex-direction:column;flex-wrap:nowrap}.alert-button.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:14px;line-height:20px;z-index:0}.alert-button.ion-focused.sc-ion-alert-md,.alert-tappable.ion-focused.sc-ion-alert-md{background:var(--ion-color-step-100, #e6e6e6)}.alert-button-inner.sc-ion-alert-md{display:flex;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%}.alert-input-disabled.sc-ion-alert-md,.alert-checkbox-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md,.alert-radio-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;appearance:none;contain:strict}.alert-button.sc-ion-alert-md,.alert-checkbox.sc-ion-alert-md,.alert-input.sc-ion-alert-md,.alert-radio.sc-ion-alert-md{outline:none}.alert-radio-icon.sc-ion-alert-md,.alert-checkbox-icon.sc-ion-alert-md,.alert-checkbox-inner.sc-ion-alert-md{box-sizing:border-box}textarea.alert-input.sc-ion-alert-md{min-height:37px;resize:none}.sc-ion-alert-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--max-width:280px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);font-size:14px}.alert-wrapper.sc-ion-alert-md{border-radius:4px;box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12)}.alert-head.sc-ion-alert-md{padding-left:23px;padding-right:23px;padding-top:20px;padding-bottom:15px;text-align:start}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-head.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:23px;padding-inline-start:23px;-webkit-padding-end:23px;padding-inline-end:23px}}.alert-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:20px;font-weight:500}.alert-sub-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:16px}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{padding-left:24px;padding-right:24px;padding-top:20px;padding-bottom:20px;color:var(--ion-color-step-550, #737373)}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px}}.alert-message.sc-ion-alert-md{max-height:266px;font-size:16px}.alert-message.sc-ion-alert-md:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-head.sc-ion-alert-md+.alert-message.sc-ion-alert-md{padding-top:0}.alert-input.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;border-bottom:1px solid var(--ion-color-step-150, #d9d9d9);color:var(--ion-text-color, #000)}.alert-input.sc-ion-alert-md::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-clear{display:none}.alert-input.sc-ion-alert-md:focus{margin-bottom:4px;border-bottom:2px solid var(--ion-color-primary, #3880ff)}.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{position:relative;max-height:266px;border-top:1px solid var(--ion-color-step-150, #d9d9d9);border-bottom:1px solid var(--ion-color-step-150, #d9d9d9);overflow:auto}.alert-tappable.sc-ion-alert-md{position:relative;height:48px;overflow:hidden}.alert-radio-label.sc-ion-alert-md{padding-left:52px;padding-right:26px;padding-top:13px;padding-bottom:13px;flex:1;color:var(--ion-color-step-850, #262626);font-size:16px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-radio-label.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:52px;padding-inline-start:52px;-webkit-padding-end:26px;padding-inline-end:26px}}.alert-radio-icon.sc-ion-alert-md{left:26px;top:0;border-radius:50%;display:block;position:relative;width:20px;height:20px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, #737373)}[dir=rtl].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md,[dir=rtl].sc-ion-alert-md-h .alert-radio-icon.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h .alert-radio-icon.sc-ion-alert-md{left:unset;right:unset;right:26px}.alert-radio-inner.sc-ion-alert-md{left:3px;top:3px;border-radius:50%;position:absolute;width:10px;height:10px;transform:scale3d(0, 0, 0);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--ion-color-primary, #3880ff)}[dir=rtl].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md,[dir=rtl].sc-ion-alert-md-h .alert-radio-inner.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h .alert-radio-inner.sc-ion-alert-md{left:unset;right:unset;right:3px}[aria-checked=true].sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{color:var(--ion-color-step-850, #262626)}[aria-checked=true].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #3880ff)}[aria-checked=true].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{transform:scale3d(1, 1, 1)}.alert-checkbox-label.sc-ion-alert-md{padding-left:53px;padding-right:26px;padding-top:13px;padding-bottom:13px;flex:1;color:var(--ion-color-step-850, #262626);font-size:16px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-checkbox-label.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:53px;padding-inline-start:53px;-webkit-padding-end:26px;padding-inline-end:26px}}.alert-checkbox-icon.sc-ion-alert-md{left:26px;top:0;border-radius:2px;position:relative;width:16px;height:16px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, #737373);contain:strict}[dir=rtl].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md,[dir=rtl].sc-ion-alert-md-h .alert-checkbox-icon.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h .alert-checkbox-icon.sc-ion-alert-md{left:unset;right:unset;right:26px}[aria-checked=true].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #3880ff);background-color:var(--ion-color-primary, #3880ff)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{left:3px;top:0;position:absolute;width:6px;height:10px;transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary-contrast, #fff)}[dir=rtl].sc-ion-alert-md [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md,[dir=rtl].sc-ion-alert-md-h [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{left:unset;right:unset;right:3px}.alert-button-group.sc-ion-alert-md{padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;box-sizing:border-box;flex-wrap:wrap-reverse;justify-content:flex-end}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-button-group.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.alert-button.sc-ion-alert-md{border-radius:2px;margin-left:0;margin-right:8px;margin-top:0;margin-bottom:0;padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;color:var(--ion-color-primary, #3880ff);font-weight:500;text-align:end;text-transform:uppercase;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-button.sc-ion-alert-md{margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-button.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}.alert-button-inner.sc-ion-alert-md{justify-content:flex-end}";
428
+
429
+ const Alert = class {
430
+ constructor(hostRef) {
431
+ registerInstance(this, hostRef);
432
+ this.didPresent = createEvent(this, "ionAlertDidPresent", 7);
433
+ this.willPresent = createEvent(this, "ionAlertWillPresent", 7);
434
+ this.willDismiss = createEvent(this, "ionAlertWillDismiss", 7);
435
+ this.didDismiss = createEvent(this, "ionAlertDidDismiss", 7);
436
+ this.processedInputs = [];
437
+ this.processedButtons = [];
438
+ this.presented = false;
439
+ /**
440
+ * If `true`, the keyboard will be automatically dismissed when the overlay is presented.
441
+ */
442
+ this.keyboardClose = true;
443
+ /**
444
+ * Array of buttons to be added to the alert.
445
+ */
446
+ this.buttons = [];
447
+ /**
448
+ * Array of input to show in the alert.
449
+ */
450
+ this.inputs = [];
451
+ /**
452
+ * If `true`, the alert will be dismissed when the backdrop is clicked.
453
+ */
454
+ this.backdropDismiss = true;
455
+ /**
456
+ * If `true`, the alert will be translucent.
457
+ * Only applies when the mode is `"ios"` and the device supports
458
+ * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
459
+ */
460
+ this.translucent = false;
461
+ /**
462
+ * If `true`, the alert will animate.
463
+ */
464
+ this.animated = true;
465
+ this.onBackdropTap = () => {
466
+ this.dismiss(undefined, BACKDROP);
467
+ };
468
+ this.dispatchCancelHandler = (ev) => {
469
+ const role = ev.detail.role;
470
+ if (isCancel(role)) {
471
+ const cancelButton = this.processedButtons.find((b) => b.role === 'cancel');
472
+ this.callButtonHandler(cancelButton);
473
+ }
474
+ };
475
+ }
476
+ onKeydown(ev) {
477
+ const inputTypes = new Set(this.processedInputs.map((i) => i.type));
478
+ // The only inputs we want to navigate between using arrow keys are the radios
479
+ // ignore the keydown event if it is not on a radio button
480
+ if (!inputTypes.has('radio') ||
481
+ (ev.target && !this.el.contains(ev.target)) ||
482
+ ev.target.classList.contains('alert-button')) {
483
+ return;
484
+ }
485
+ // Get all radios inside of the radio group and then
486
+ // filter out disabled radios since we need to skip those
487
+ const query = this.el.querySelectorAll('.alert-radio');
488
+ const radios = Array.from(query).filter((radio) => !radio.disabled);
489
+ // The focused radio is the one that shares the same id as
490
+ // the event target
491
+ const index = radios.findIndex((radio) => radio.id === ev.target.id);
492
+ // We need to know what the next radio element should
493
+ // be in order to change the focus
494
+ let nextEl;
495
+ // If hitting arrow down or arrow right, move to the next radio
496
+ // If we're on the last radio, move to the first radio
497
+ if (['ArrowDown', 'ArrowRight'].includes(ev.code)) {
498
+ nextEl = index === radios.length - 1 ? radios[0] : radios[index + 1];
499
+ }
500
+ // If hitting arrow up or arrow left, move to the previous radio
501
+ // If we're on the first radio, move to the last radio
502
+ if (['ArrowUp', 'ArrowLeft'].includes(ev.code)) {
503
+ nextEl = index === 0 ? radios[radios.length - 1] : radios[index - 1];
504
+ }
505
+ if (nextEl && radios.includes(nextEl)) {
506
+ const nextProcessed = this.processedInputs.find((input) => input.id === (nextEl === null || nextEl === void 0 ? void 0 : nextEl.id));
507
+ if (nextProcessed) {
508
+ this.rbClick(nextProcessed);
509
+ nextEl.focus();
510
+ }
511
+ }
512
+ }
513
+ buttonsChanged() {
514
+ const buttons = this.buttons;
515
+ this.processedButtons = buttons.map((btn) => {
516
+ return typeof btn === 'string' ? { text: btn, role: btn.toLowerCase() === 'cancel' ? 'cancel' : undefined } : btn;
517
+ });
518
+ }
519
+ inputsChanged() {
520
+ const inputs = this.inputs;
521
+ // Get the first input that is not disabled and the checked one
522
+ // If an enabled checked input exists, set it to be the focusable input
523
+ // otherwise we default to focus the first input
524
+ // This will only be used when the input is type radio
525
+ const first = inputs.find((input) => !input.disabled);
526
+ const checked = inputs.find((input) => input.checked && !input.disabled);
527
+ const focusable = checked || first;
528
+ // An alert can be created with several different inputs. Radios,
529
+ // checkboxes and inputs are all accepted, but they cannot be mixed.
530
+ const inputTypes = new Set(inputs.map((i) => i.type));
531
+ if (inputTypes.has('checkbox') && inputTypes.has('radio')) {
532
+ console.warn(`Alert cannot mix input types: ${Array.from(inputTypes.values()).join('/')}. Please see alert docs for more info.`);
533
+ }
534
+ this.inputType = inputTypes.values().next().value;
535
+ this.processedInputs = inputs.map((i, index) => ({
536
+ type: i.type || 'text',
537
+ name: i.name || `${index}`,
538
+ placeholder: i.placeholder || '',
539
+ value: i.value,
540
+ label: i.label,
541
+ checked: !!i.checked,
542
+ disabled: !!i.disabled,
543
+ id: i.id || `alert-input-${this.overlayIndex}-${index}`,
544
+ handler: i.handler,
545
+ min: i.min,
546
+ max: i.max,
547
+ cssClass: i.cssClass || '',
548
+ attributes: i.attributes || {},
549
+ tabindex: i.type === 'radio' && i !== focusable ? -1 : 0,
550
+ }));
551
+ }
552
+ connectedCallback() {
553
+ prepareOverlay(this.el);
554
+ }
555
+ componentWillLoad() {
556
+ this.inputsChanged();
557
+ this.buttonsChanged();
558
+ }
559
+ disconnectedCallback() {
560
+ if (this.gesture) {
561
+ this.gesture.destroy();
562
+ this.gesture = undefined;
563
+ }
564
+ }
565
+ componentDidLoad() {
566
+ /**
567
+ * Do not create gesture if:
568
+ * 1. A gesture already exists
569
+ * 2. App is running in MD mode
570
+ * 3. A wrapper ref does not exist
571
+ */
572
+ if (this.gesture || getIonMode(this) === 'md' || !this.wrapperEl) {
573
+ return;
574
+ }
575
+ this.gesture = createButtonActiveGesture(this.wrapperEl, (refEl) => refEl.classList.contains('alert-button'));
576
+ this.gesture.enable(true);
577
+ }
578
+ /**
579
+ * Present the alert overlay after it has been created.
580
+ */
581
+ present() {
582
+ return present(this, 'alertEnter', iosEnterAnimation$1, mdEnterAnimation$1);
583
+ }
584
+ /**
585
+ * Dismiss the alert overlay after it has been presented.
586
+ *
587
+ * @param data Any data to emit in the dismiss events.
588
+ * @param role The role of the element that is dismissing the alert.
589
+ * This can be useful in a button handler for determining which button was
590
+ * clicked to dismiss the alert.
591
+ * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
592
+ */
593
+ dismiss(data, role) {
594
+ return dismiss(this, data, role, 'alertLeave', iosLeaveAnimation$1, mdLeaveAnimation$1);
595
+ }
596
+ /**
597
+ * Returns a promise that resolves when the alert did dismiss.
598
+ */
599
+ onDidDismiss() {
600
+ return eventMethod(this.el, 'ionAlertDidDismiss');
601
+ }
602
+ /**
603
+ * Returns a promise that resolves when the alert will dismiss.
604
+ */
605
+ onWillDismiss() {
606
+ return eventMethod(this.el, 'ionAlertWillDismiss');
607
+ }
608
+ rbClick(selectedInput) {
609
+ for (const input of this.processedInputs) {
610
+ input.checked = input === selectedInput;
611
+ input.tabindex = input === selectedInput ? 0 : -1;
612
+ }
613
+ this.activeId = selectedInput.id;
614
+ safeCall(selectedInput.handler, selectedInput);
615
+ forceUpdate(this);
616
+ }
617
+ cbClick(selectedInput) {
618
+ selectedInput.checked = !selectedInput.checked;
619
+ safeCall(selectedInput.handler, selectedInput);
620
+ forceUpdate(this);
621
+ }
622
+ buttonClick(button) {
623
+ const role = button.role;
624
+ const values = this.getValues();
625
+ if (isCancel(role)) {
626
+ return this.dismiss({ values }, role);
627
+ }
628
+ const returnData = this.callButtonHandler(button, values);
629
+ if (returnData !== false) {
630
+ return this.dismiss(Object.assign({ values }, returnData), button.role);
631
+ }
632
+ return Promise.resolve(false);
633
+ }
634
+ callButtonHandler(button, data) {
635
+ if (button === null || button === void 0 ? void 0 : button.handler) {
636
+ // a handler has been provided, execute it
637
+ // pass the handler the values from the inputs
638
+ const returnData = safeCall(button.handler, data);
639
+ if (returnData === false) {
640
+ // if the return value of the handler is false then do not dismiss
641
+ return false;
642
+ }
643
+ if (typeof returnData === 'object') {
644
+ return returnData;
645
+ }
646
+ }
647
+ return {};
648
+ }
649
+ getValues() {
650
+ if (this.processedInputs.length === 0) {
651
+ // this is an alert without any options/inputs at all
652
+ return undefined;
653
+ }
654
+ if (this.inputType === 'radio') {
655
+ // this is an alert with radio buttons (single value select)
656
+ // return the one value which is checked, otherwise undefined
657
+ const checkedInput = this.processedInputs.find((i) => !!i.checked);
658
+ return checkedInput ? checkedInput.value : undefined;
659
+ }
660
+ if (this.inputType === 'checkbox') {
661
+ // this is an alert with checkboxes (multiple value select)
662
+ // return an array of all the checked values
663
+ return this.processedInputs.filter((i) => i.checked).map((i) => i.value);
664
+ }
665
+ // this is an alert with text inputs
666
+ // return an object of all the values with the input name as the key
667
+ const values = {};
668
+ this.processedInputs.forEach((i) => {
669
+ values[i.name] = i.value || '';
670
+ });
671
+ return values;
672
+ }
673
+ renderAlertInputs() {
674
+ switch (this.inputType) {
675
+ case 'checkbox':
676
+ return this.renderCheckbox();
677
+ case 'radio':
678
+ return this.renderRadio();
679
+ default:
680
+ return this.renderInput();
681
+ }
682
+ }
683
+ renderCheckbox() {
684
+ const inputs = this.processedInputs;
685
+ const mode = getIonMode(this);
686
+ if (inputs.length === 0) {
687
+ return null;
688
+ }
689
+ return (h("div", { class: "alert-checkbox-group" }, inputs.map((i) => (h("button", { type: "button", onClick: () => this.cbClick(i), "aria-checked": `${i.checked}`, id: i.id, disabled: i.disabled, tabIndex: i.tabindex, role: "checkbox", class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-tappable': true, 'alert-checkbox': true, 'alert-checkbox-button': true, 'ion-focusable': true, 'alert-checkbox-button-disabled': i.disabled || false }) }, h("div", { class: "alert-button-inner" }, h("div", { class: "alert-checkbox-icon" }, h("div", { class: "alert-checkbox-inner" })), h("div", { class: "alert-checkbox-label" }, i.label)), mode === 'md' && h("ion-ripple-effect", null))))));
690
+ }
691
+ renderRadio() {
692
+ const inputs = this.processedInputs;
693
+ if (inputs.length === 0) {
694
+ return null;
695
+ }
696
+ return (h("div", { class: "alert-radio-group", role: "radiogroup", "aria-activedescendant": this.activeId }, inputs.map((i) => (h("button", { type: "button", onClick: () => this.rbClick(i), "aria-checked": `${i.checked}`, disabled: i.disabled, id: i.id, tabIndex: i.tabindex, class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-radio-button': true, 'alert-tappable': true, 'alert-radio': true, 'ion-focusable': true, 'alert-radio-button-disabled': i.disabled || false }), role: "radio" }, h("div", { class: "alert-button-inner" }, h("div", { class: "alert-radio-icon" }, h("div", { class: "alert-radio-inner" })), h("div", { class: "alert-radio-label" }, i.label)))))));
697
+ }
698
+ renderInput() {
699
+ const inputs = this.processedInputs;
700
+ if (inputs.length === 0) {
701
+ return null;
702
+ }
703
+ return (h("div", { class: "alert-input-group" }, inputs.map((i) => {
704
+ var _a, _b, _c, _d;
705
+ if (i.type === 'textarea') {
706
+ return (h("div", { class: "alert-input-wrapper" }, h("textarea", Object.assign({ placeholder: i.placeholder, value: i.value, id: i.id, tabIndex: i.tabindex }, i.attributes, { disabled: (_b = (_a = i.attributes) === null || _a === void 0 ? void 0 : _a.disabled) !== null && _b !== void 0 ? _b : i.disabled, class: inputClass(i), onInput: (e) => {
707
+ var _a;
708
+ i.value = e.target.value;
709
+ if ((_a = i.attributes) === null || _a === void 0 ? void 0 : _a.onInput) {
710
+ i.attributes.onInput(e);
711
+ }
712
+ } }))));
713
+ }
714
+ else {
715
+ return (h("div", { class: "alert-input-wrapper" }, h("input", Object.assign({ placeholder: i.placeholder, type: i.type, min: i.min, max: i.max, value: i.value, id: i.id, tabIndex: i.tabindex }, i.attributes, { disabled: (_d = (_c = i.attributes) === null || _c === void 0 ? void 0 : _c.disabled) !== null && _d !== void 0 ? _d : i.disabled, class: inputClass(i), onInput: (e) => {
716
+ var _a;
717
+ i.value = e.target.value;
718
+ if ((_a = i.attributes) === null || _a === void 0 ? void 0 : _a.onInput) {
719
+ i.attributes.onInput(e);
720
+ }
721
+ } }))));
722
+ }
723
+ })));
724
+ }
725
+ renderAlertButtons() {
726
+ const buttons = this.processedButtons;
727
+ const mode = getIonMode(this);
728
+ const alertButtonGroupClass = {
729
+ 'alert-button-group': true,
730
+ 'alert-button-group-vertical': buttons.length > 2,
731
+ };
732
+ return (h("div", { class: alertButtonGroupClass }, buttons.map((button) => (h("button", { type: "button", id: button.id, class: buttonClass(button), tabIndex: 0, onClick: () => this.buttonClick(button) }, h("span", { class: "alert-button-inner" }, button.text), mode === 'md' && h("ion-ripple-effect", null))))));
733
+ }
734
+ render() {
735
+ const { overlayIndex, header, subHeader, htmlAttributes } = this;
736
+ const mode = getIonMode(this);
737
+ const hdrId = `alert-${overlayIndex}-hdr`;
738
+ const subHdrId = `alert-${overlayIndex}-sub-hdr`;
739
+ const msgId = `alert-${overlayIndex}-msg`;
740
+ const role = this.inputs.length > 0 || this.buttons.length > 0 ? 'alertdialog' : 'alert';
741
+ return (h(Host, Object.assign({ role: role, "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
742
+ zIndex: `${20000 + overlayIndex}`,
743
+ }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { tappable: this.backdropDismiss }), h("div", { tabindex: "0" }), h("div", { class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { class: "alert-head" }, header && (h("h2", { id: hdrId, class: "alert-title" }, header)), subHeader && (h("h2", { id: subHdrId, class: "alert-sub-title" }, subHeader))), h("div", { id: msgId, class: "alert-message", innerHTML: sanitizeDOMString(this.message) }), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { tabindex: "0" })));
744
+ }
745
+ get el() { return getElement(this); }
746
+ static get watchers() { return {
747
+ "buttons": ["buttonsChanged"],
748
+ "inputs": ["inputsChanged"]
749
+ }; }
750
+ };
751
+ const inputClass = (input) => {
752
+ var _a, _b, _c;
753
+ return Object.assign(Object.assign({ 'alert-input': true, 'alert-input-disabled': ((_b = (_a = input.attributes) === null || _a === void 0 ? void 0 : _a.disabled) !== null && _b !== void 0 ? _b : input.disabled) || false }, getClassMap(input.cssClass)), getClassMap(input.attributes ? (_c = input.attributes.class) === null || _c === void 0 ? void 0 : _c.toString() : ''));
754
+ };
755
+ const buttonClass = (button) => {
756
+ return Object.assign({ 'alert-button': true, 'ion-focusable': true, 'ion-activatable': true, [`alert-button-role-${button.role}`]: button.role !== undefined }, getClassMap(button.cssClass));
757
+ };
758
+ Alert.style = {
759
+ ios: alertIosCss,
760
+ md: alertMdCss
761
+ };
762
+
763
+ /*!
764
+ * (C) Ionic http://ionicframework.com - MIT License
765
+ */
766
+ /**
767
+ * Returns the dimensions of the popover
768
+ * arrow on `ios` mode. If arrow is disabled
769
+ * returns (0, 0).
770
+ */
771
+ const getArrowDimensions = (arrowEl) => {
772
+ if (!arrowEl) {
773
+ return { arrowWidth: 0, arrowHeight: 0 };
774
+ }
775
+ const { width, height } = arrowEl.getBoundingClientRect();
776
+ return { arrowWidth: width, arrowHeight: height };
777
+ };
778
+ /**
779
+ * Returns the recommended dimensions of the popover
780
+ * that takes into account whether or not the width
781
+ * should match the trigger width.
782
+ */
783
+ const getPopoverDimensions = (size, contentEl, triggerEl) => {
784
+ const contentDimentions = contentEl.getBoundingClientRect();
785
+ const contentHeight = contentDimentions.height;
786
+ let contentWidth = contentDimentions.width;
787
+ if (size === 'cover' && triggerEl) {
788
+ const triggerDimensions = triggerEl.getBoundingClientRect();
789
+ contentWidth = triggerDimensions.width;
790
+ }
791
+ return {
792
+ contentWidth,
793
+ contentHeight,
794
+ };
795
+ };
796
+ const configureDismissInteraction = (triggerEl, triggerAction, popoverEl, parentPopoverEl) => {
797
+ let dismissCallbacks = [];
798
+ const root = getElementRoot(parentPopoverEl);
799
+ const parentContentEl = root.querySelector('.popover-content');
800
+ switch (triggerAction) {
801
+ case 'hover':
802
+ dismissCallbacks = [
803
+ {
804
+ /**
805
+ * Do not use mouseover here
806
+ * as this will causes the event to
807
+ * be dispatched on each underlying
808
+ * element rather than on the popover
809
+ * content as a whole.
810
+ */
811
+ eventName: 'mouseenter',
812
+ callback: (ev) => {
813
+ /**
814
+ * Do not dismiss the popover is we
815
+ * are hovering over its trigger.
816
+ * This would be easier if we used mouseover
817
+ * but this would cause the event to be dispatched
818
+ * more often than we would like, potentially
819
+ * causing performance issues.
820
+ */
821
+ const element = document.elementFromPoint(ev.clientX, ev.clientY);
822
+ if (element === triggerEl) {
823
+ return;
824
+ }
825
+ popoverEl.dismiss(undefined, undefined, false);
826
+ },
827
+ },
828
+ ];
829
+ break;
830
+ case 'context-menu':
831
+ case 'click':
832
+ default:
833
+ dismissCallbacks = [
834
+ {
835
+ eventName: 'click',
836
+ callback: (ev) => {
837
+ /**
838
+ * Do not dismiss the popover is we
839
+ * are hovering over its trigger.
840
+ */
841
+ const target = ev.target;
842
+ const closestTrigger = target.closest('[data-ion-popover-trigger]');
843
+ if (closestTrigger === triggerEl) {
844
+ /**
845
+ * stopPropagation here so if the
846
+ * popover has dismissOnSelect="true"
847
+ * the popover does not dismiss since
848
+ * we just clicked a trigger element.
849
+ */
850
+ ev.stopPropagation();
851
+ return;
852
+ }
853
+ popoverEl.dismiss(undefined, undefined, false);
854
+ },
855
+ },
856
+ ];
857
+ break;
858
+ }
859
+ dismissCallbacks.forEach(({ eventName, callback }) => parentContentEl.addEventListener(eventName, callback));
860
+ return () => {
861
+ dismissCallbacks.forEach(({ eventName, callback }) => parentContentEl.removeEventListener(eventName, callback));
862
+ };
863
+ };
864
+ /**
865
+ * Configures the triggerEl to respond
866
+ * to user interaction based upon the triggerAction
867
+ * prop that devs have defined.
868
+ */
869
+ const configureTriggerInteraction = (triggerEl, triggerAction, popoverEl) => {
870
+ let triggerCallbacks = [];
871
+ /**
872
+ * Based upon the kind of trigger interaction
873
+ * the user wants, we setup the correct event
874
+ * listeners.
875
+ */
876
+ switch (triggerAction) {
877
+ case 'hover':
878
+ let hoverTimeout;
879
+ triggerCallbacks = [
880
+ {
881
+ eventName: 'mouseenter',
882
+ callback: async (ev) => {
883
+ ev.stopPropagation();
884
+ if (hoverTimeout) {
885
+ clearTimeout(hoverTimeout);
886
+ }
887
+ /**
888
+ * Hovering over a trigger should not
889
+ * immediately open the next popover.
890
+ */
891
+ hoverTimeout = setTimeout(() => {
892
+ raf(() => {
893
+ popoverEl.presentFromTrigger(ev);
894
+ hoverTimeout = undefined;
895
+ });
896
+ }, 100);
897
+ },
898
+ },
899
+ {
900
+ eventName: 'mouseleave',
901
+ callback: (ev) => {
902
+ if (hoverTimeout) {
903
+ clearTimeout(hoverTimeout);
904
+ }
905
+ /**
906
+ * If mouse is over another popover
907
+ * that is not this popover then we should
908
+ * close this popover.
909
+ */
910
+ const target = ev.relatedTarget;
911
+ if (!target) {
912
+ return;
913
+ }
914
+ if (target.closest('ion-popover') !== popoverEl) {
915
+ popoverEl.dismiss(undefined, undefined, false);
916
+ }
917
+ },
918
+ },
919
+ {
920
+ /**
921
+ * stopPropagation here prevents the popover
922
+ * from dismissing when dismiss-on-select="true".
923
+ */
924
+ eventName: 'click',
925
+ callback: (ev) => ev.stopPropagation(),
926
+ },
927
+ {
928
+ eventName: 'ionPopoverActivateTrigger',
929
+ callback: (ev) => popoverEl.presentFromTrigger(ev, true),
930
+ },
931
+ ];
932
+ break;
933
+ case 'context-menu':
934
+ triggerCallbacks = [
935
+ {
936
+ eventName: 'contextmenu',
937
+ callback: (ev) => {
938
+ /**
939
+ * Prevents the platform context
940
+ * menu from appearing.
941
+ */
942
+ ev.preventDefault();
943
+ popoverEl.presentFromTrigger(ev);
944
+ },
945
+ },
946
+ {
947
+ eventName: 'click',
948
+ callback: (ev) => ev.stopPropagation(),
949
+ },
950
+ {
951
+ eventName: 'ionPopoverActivateTrigger',
952
+ callback: (ev) => popoverEl.presentFromTrigger(ev, true),
953
+ },
954
+ ];
955
+ break;
956
+ case 'click':
957
+ default:
958
+ triggerCallbacks = [
959
+ {
960
+ /**
961
+ * Do not do a stopPropagation() here
962
+ * because if you had two click triggers
963
+ * then clicking the first trigger and then
964
+ * clicking the second trigger would not cause
965
+ * the first popover to dismiss.
966
+ */
967
+ eventName: 'click',
968
+ callback: (ev) => popoverEl.presentFromTrigger(ev),
969
+ },
970
+ {
971
+ eventName: 'ionPopoverActivateTrigger',
972
+ callback: (ev) => popoverEl.presentFromTrigger(ev, true),
973
+ },
974
+ ];
975
+ break;
976
+ }
977
+ triggerCallbacks.forEach(({ eventName, callback }) => triggerEl.addEventListener(eventName, callback));
978
+ triggerEl.setAttribute('data-ion-popover-trigger', 'true');
979
+ return () => {
980
+ triggerCallbacks.forEach(({ eventName, callback }) => triggerEl.removeEventListener(eventName, callback));
981
+ triggerEl.removeAttribute('data-ion-popover-trigger');
982
+ };
983
+ };
984
+ /**
985
+ * Returns the index of an ion-item in an array of ion-items.
986
+ */
987
+ const getIndexOfItem = (items, item) => {
988
+ if (!item || item.tagName !== 'ION-ITEM') {
989
+ return -1;
990
+ }
991
+ return items.findIndex((el) => el === item);
992
+ };
993
+ /**
994
+ * Given an array of elements and a currently focused ion-item
995
+ * returns the next ion-item relative to the focused one or
996
+ * undefined.
997
+ */
998
+ const getNextItem = (items, currentItem) => {
999
+ const currentItemIndex = getIndexOfItem(items, currentItem);
1000
+ return items[currentItemIndex + 1];
1001
+ };
1002
+ /**
1003
+ * Given an array of elements and a currently focused ion-item
1004
+ * returns the previous ion-item relative to the focused one or
1005
+ * undefined.
1006
+ */
1007
+ const getPrevItem = (items, currentItem) => {
1008
+ const currentItemIndex = getIndexOfItem(items, currentItem);
1009
+ return items[currentItemIndex - 1];
1010
+ };
1011
+ /** Focus the internal button of the ion-item */
1012
+ const focusItem = (item) => {
1013
+ const root = getElementRoot(item);
1014
+ const button = root.querySelector('button');
1015
+ if (button) {
1016
+ raf(() => button.focus());
1017
+ }
1018
+ };
1019
+ /**
1020
+ * Returns `true` if `el` has been designated
1021
+ * as a trigger element for an ion-popover.
1022
+ */
1023
+ const isTriggerElement = (el) => el.hasAttribute('data-ion-popover-trigger');
1024
+ const configureKeyboardInteraction = (popoverEl) => {
1025
+ const callback = async (ev) => {
1026
+ var _a;
1027
+ const activeElement = document.activeElement;
1028
+ let items = [];
1029
+ const targetTagName = (_a = ev.target) === null || _a === void 0 ? void 0 : _a.tagName;
1030
+ /**
1031
+ * Only handle custom keyboard interactions for the host popover element
1032
+ * and children ion-item elements.
1033
+ */
1034
+ if (targetTagName !== 'ION-POPOVER' && targetTagName !== 'ION-ITEM') {
1035
+ return;
1036
+ }
1037
+ /**
1038
+ * Complex selectors with :not() are :not supported
1039
+ * in older versions of Chromium so we need to do a
1040
+ * try/catch here so errors are not thrown.
1041
+ */
1042
+ try {
1043
+ /**
1044
+ * Select all ion-items that are not children of child popovers.
1045
+ * i.e. only select ion-item elements that are part of this popover
1046
+ */
1047
+ items = Array.from(popoverEl.querySelectorAll('ion-item:not(ion-popover ion-popover *):not([disabled])'));
1048
+ /* eslint-disable-next-line */
1049
+ }
1050
+ catch (_b) { }
1051
+ switch (ev.key) {
1052
+ /**
1053
+ * If we are in a child popover
1054
+ * then pressing the left arrow key
1055
+ * should close this popover and move
1056
+ * focus to the popover that presented
1057
+ * this one.
1058
+ */
1059
+ case 'ArrowLeft':
1060
+ const parentPopover = await popoverEl.getParentPopover();
1061
+ if (parentPopover) {
1062
+ popoverEl.dismiss(undefined, undefined, false);
1063
+ }
1064
+ break;
1065
+ /**
1066
+ * ArrowDown should move focus to the next focusable ion-item.
1067
+ */
1068
+ case 'ArrowDown':
1069
+ // Disable movement/scroll with keyboard
1070
+ ev.preventDefault();
1071
+ const nextItem = getNextItem(items, activeElement);
1072
+ if (nextItem !== undefined) {
1073
+ focusItem(nextItem);
1074
+ }
1075
+ break;
1076
+ /**
1077
+ * ArrowUp should move focus to the previous focusable ion-item.
1078
+ */
1079
+ case 'ArrowUp':
1080
+ // Disable movement/scroll with keyboard
1081
+ ev.preventDefault();
1082
+ const prevItem = getPrevItem(items, activeElement);
1083
+ if (prevItem !== undefined) {
1084
+ focusItem(prevItem);
1085
+ }
1086
+ break;
1087
+ /**
1088
+ * Home should move focus to the first focusable ion-item.
1089
+ */
1090
+ case 'Home':
1091
+ ev.preventDefault();
1092
+ const firstItem = items[0];
1093
+ if (firstItem !== undefined) {
1094
+ focusItem(firstItem);
1095
+ }
1096
+ break;
1097
+ /**
1098
+ * End should move focus to the last focusable ion-item.
1099
+ */
1100
+ case 'End':
1101
+ ev.preventDefault();
1102
+ const lastItem = items[items.length - 1];
1103
+ if (lastItem !== undefined) {
1104
+ focusItem(lastItem);
1105
+ }
1106
+ break;
1107
+ /**
1108
+ * ArrowRight, Spacebar, or Enter should activate
1109
+ * the currently focused trigger item to open a
1110
+ * popover if the element is a trigger item.
1111
+ */
1112
+ case 'ArrowRight':
1113
+ case ' ':
1114
+ case 'Enter':
1115
+ if (activeElement && isTriggerElement(activeElement)) {
1116
+ const rightEvent = new CustomEvent('ionPopoverActivateTrigger');
1117
+ activeElement.dispatchEvent(rightEvent);
1118
+ }
1119
+ break;
1120
+ }
1121
+ };
1122
+ popoverEl.addEventListener('keydown', callback);
1123
+ return () => popoverEl.removeEventListener('keydown', callback);
1124
+ };
1125
+ /**
1126
+ * Positions a popover by taking into account
1127
+ * the reference point, preferred side, alignment
1128
+ * and viewport dimensions.
1129
+ */
1130
+ const getPopoverPosition = (isRTL, contentWidth, contentHeight, arrowWidth, arrowHeight, reference, side, align, defaultPosition, triggerEl, event) => {
1131
+ var _a;
1132
+ let referenceCoordinates = {
1133
+ top: 0,
1134
+ left: 0,
1135
+ width: 0,
1136
+ height: 0,
1137
+ };
1138
+ /**
1139
+ * Calculate position relative to the
1140
+ * x-y coordinates in the event that
1141
+ * was passed in
1142
+ */
1143
+ switch (reference) {
1144
+ case 'event':
1145
+ if (!event) {
1146
+ return defaultPosition;
1147
+ }
1148
+ const mouseEv = event;
1149
+ referenceCoordinates = {
1150
+ top: mouseEv.clientY,
1151
+ left: mouseEv.clientX,
1152
+ width: 1,
1153
+ height: 1,
1154
+ };
1155
+ break;
1156
+ /**
1157
+ * Calculate position relative to the bounding
1158
+ * box on either the trigger element
1159
+ * specified via the `trigger` prop or
1160
+ * the target specified on the event
1161
+ * that was passed in.
1162
+ */
1163
+ case 'trigger':
1164
+ default:
1165
+ const customEv = event;
1166
+ /**
1167
+ * ionShadowTarget is used when we need to align the
1168
+ * popover with an element inside of the shadow root
1169
+ * of an Ionic component. Ex: Presenting a popover
1170
+ * by clicking on the collapsed indicator inside
1171
+ * of `ion-breadcrumb` and centering it relative
1172
+ * to the indicator rather than `ion-breadcrumb`
1173
+ * as a whole.
1174
+ */
1175
+ const actualTriggerEl = (triggerEl ||
1176
+ ((_a = customEv === null || customEv === void 0 ? void 0 : customEv.detail) === null || _a === void 0 ? void 0 : _a.ionShadowTarget) ||
1177
+ (customEv === null || customEv === void 0 ? void 0 : customEv.target));
1178
+ if (!actualTriggerEl) {
1179
+ return defaultPosition;
1180
+ }
1181
+ const triggerBoundingBox = actualTriggerEl.getBoundingClientRect();
1182
+ referenceCoordinates = {
1183
+ top: triggerBoundingBox.top,
1184
+ left: triggerBoundingBox.left,
1185
+ width: triggerBoundingBox.width,
1186
+ height: triggerBoundingBox.height,
1187
+ };
1188
+ break;
1189
+ }
1190
+ /**
1191
+ * Get top/left offset that would allow
1192
+ * popover to be positioned on the
1193
+ * preferred side of the reference.
1194
+ */
1195
+ const coordinates = calculatePopoverSide(side, referenceCoordinates, contentWidth, contentHeight, arrowWidth, arrowHeight, isRTL);
1196
+ /**
1197
+ * Get the top/left adjustments that
1198
+ * would allow the popover content
1199
+ * to have the correct alignment.
1200
+ */
1201
+ const alignedCoordinates = calculatePopoverAlign(align, side, referenceCoordinates, contentWidth, contentHeight);
1202
+ const top = coordinates.top + alignedCoordinates.top;
1203
+ const left = coordinates.left + alignedCoordinates.left;
1204
+ const { arrowTop, arrowLeft } = calculateArrowPosition(side, arrowWidth, arrowHeight, top, left, contentWidth, contentHeight, isRTL);
1205
+ const { originX, originY } = calculatePopoverOrigin(side, align, isRTL);
1206
+ return { top, left, referenceCoordinates, arrowTop, arrowLeft, originX, originY };
1207
+ };
1208
+ /**
1209
+ * Determines the transform-origin
1210
+ * of the popover animation so that it
1211
+ * is in line with what the side and alignment
1212
+ * prop values are. Currently only used
1213
+ * with the MD animation.
1214
+ */
1215
+ const calculatePopoverOrigin = (side, align, isRTL) => {
1216
+ switch (side) {
1217
+ case 'top':
1218
+ return { originX: getOriginXAlignment(align), originY: 'bottom' };
1219
+ case 'bottom':
1220
+ return { originX: getOriginXAlignment(align), originY: 'top' };
1221
+ case 'left':
1222
+ return { originX: 'right', originY: getOriginYAlignment(align) };
1223
+ case 'right':
1224
+ return { originX: 'left', originY: getOriginYAlignment(align) };
1225
+ case 'start':
1226
+ return { originX: isRTL ? 'left' : 'right', originY: getOriginYAlignment(align) };
1227
+ case 'end':
1228
+ return { originX: isRTL ? 'right' : 'left', originY: getOriginYAlignment(align) };
1229
+ }
1230
+ };
1231
+ const getOriginXAlignment = (align) => {
1232
+ switch (align) {
1233
+ case 'start':
1234
+ return 'left';
1235
+ case 'center':
1236
+ return 'center';
1237
+ case 'end':
1238
+ return 'right';
1239
+ }
1240
+ };
1241
+ const getOriginYAlignment = (align) => {
1242
+ switch (align) {
1243
+ case 'start':
1244
+ return 'top';
1245
+ case 'center':
1246
+ return 'center';
1247
+ case 'end':
1248
+ return 'bottom';
1249
+ }
1250
+ };
1251
+ /**
1252
+ * Calculates where the arrow positioning
1253
+ * should be relative to the popover content.
1254
+ */
1255
+ const calculateArrowPosition = (side, arrowWidth, arrowHeight, top, left, contentWidth, contentHeight, isRTL) => {
1256
+ /**
1257
+ * Note: When side is left, right, start, or end, the arrow is
1258
+ * been rotated using a `transform`, so to move the arrow up or down
1259
+ * by its dimension, you need to use `arrowWidth`.
1260
+ */
1261
+ const leftPosition = {
1262
+ arrowTop: top + contentHeight / 2 - arrowWidth / 2,
1263
+ arrowLeft: left + contentWidth - arrowWidth / 2,
1264
+ };
1265
+ /**
1266
+ * Move the arrow to the left by arrowWidth and then
1267
+ * again by half of its width because we have rotated
1268
+ * the arrow using a transform.
1269
+ */
1270
+ const rightPosition = { arrowTop: top + contentHeight / 2 - arrowWidth / 2, arrowLeft: left - arrowWidth * 1.5 };
1271
+ switch (side) {
1272
+ case 'top':
1273
+ return { arrowTop: top + contentHeight, arrowLeft: left + contentWidth / 2 - arrowWidth / 2 };
1274
+ case 'bottom':
1275
+ return { arrowTop: top - arrowHeight, arrowLeft: left + contentWidth / 2 - arrowWidth / 2 };
1276
+ case 'left':
1277
+ return leftPosition;
1278
+ case 'right':
1279
+ return rightPosition;
1280
+ case 'start':
1281
+ return isRTL ? rightPosition : leftPosition;
1282
+ case 'end':
1283
+ return isRTL ? leftPosition : rightPosition;
1284
+ default:
1285
+ return { arrowTop: 0, arrowLeft: 0 };
1286
+ }
1287
+ };
1288
+ /**
1289
+ * Calculates the required top/left
1290
+ * values needed to position the popover
1291
+ * content on the side specified in the
1292
+ * `side` prop.
1293
+ */
1294
+ const calculatePopoverSide = (side, triggerBoundingBox, contentWidth, contentHeight, arrowWidth, arrowHeight, isRTL) => {
1295
+ const sideLeft = {
1296
+ top: triggerBoundingBox.top,
1297
+ left: triggerBoundingBox.left - contentWidth - arrowWidth,
1298
+ };
1299
+ const sideRight = {
1300
+ top: triggerBoundingBox.top,
1301
+ left: triggerBoundingBox.left + triggerBoundingBox.width + arrowWidth,
1302
+ };
1303
+ switch (side) {
1304
+ case 'top':
1305
+ return {
1306
+ top: triggerBoundingBox.top - contentHeight - arrowHeight,
1307
+ left: triggerBoundingBox.left,
1308
+ };
1309
+ case 'right':
1310
+ return sideRight;
1311
+ case 'bottom':
1312
+ return {
1313
+ top: triggerBoundingBox.top + triggerBoundingBox.height + arrowHeight,
1314
+ left: triggerBoundingBox.left,
1315
+ };
1316
+ case 'left':
1317
+ return sideLeft;
1318
+ case 'start':
1319
+ return isRTL ? sideRight : sideLeft;
1320
+ case 'end':
1321
+ return isRTL ? sideLeft : sideRight;
1322
+ }
1323
+ };
1324
+ /**
1325
+ * Calculates the required top/left
1326
+ * offset values needed to provide the
1327
+ * correct alignment regardless while taking
1328
+ * into account the side the popover is on.
1329
+ */
1330
+ const calculatePopoverAlign = (align, side, triggerBoundingBox, contentWidth, contentHeight) => {
1331
+ switch (align) {
1332
+ case 'center':
1333
+ return calculatePopoverCenterAlign(side, triggerBoundingBox, contentWidth, contentHeight);
1334
+ case 'end':
1335
+ return calculatePopoverEndAlign(side, triggerBoundingBox, contentWidth, contentHeight);
1336
+ case 'start':
1337
+ default:
1338
+ return { top: 0, left: 0 };
1339
+ }
1340
+ };
1341
+ /**
1342
+ * Calculate the end alignment for
1343
+ * the popover. If side is on the x-axis
1344
+ * then the align values refer to the top
1345
+ * and bottom margins of the content.
1346
+ * If side is on the y-axis then the
1347
+ * align values refer to the left and right
1348
+ * margins of the content.
1349
+ */
1350
+ const calculatePopoverEndAlign = (side, triggerBoundingBox, contentWidth, contentHeight) => {
1351
+ switch (side) {
1352
+ case 'start':
1353
+ case 'end':
1354
+ case 'left':
1355
+ case 'right':
1356
+ return {
1357
+ top: -(contentHeight - triggerBoundingBox.height),
1358
+ left: 0,
1359
+ };
1360
+ case 'top':
1361
+ case 'bottom':
1362
+ default:
1363
+ return {
1364
+ top: 0,
1365
+ left: -(contentWidth - triggerBoundingBox.width),
1366
+ };
1367
+ }
1368
+ };
1369
+ /**
1370
+ * Calculate the center alignment for
1371
+ * the popover. If side is on the x-axis
1372
+ * then the align values refer to the top
1373
+ * and bottom margins of the content.
1374
+ * If side is on the y-axis then the
1375
+ * align values refer to the left and right
1376
+ * margins of the content.
1377
+ */
1378
+ const calculatePopoverCenterAlign = (side, triggerBoundingBox, contentWidth, contentHeight) => {
1379
+ switch (side) {
1380
+ case 'start':
1381
+ case 'end':
1382
+ case 'left':
1383
+ case 'right':
1384
+ return {
1385
+ top: -(contentHeight / 2 - triggerBoundingBox.height / 2),
1386
+ left: 0,
1387
+ };
1388
+ case 'top':
1389
+ case 'bottom':
1390
+ default:
1391
+ return {
1392
+ top: 0,
1393
+ left: -(contentWidth / 2 - triggerBoundingBox.width / 2),
1394
+ };
1395
+ }
1396
+ };
1397
+ /**
1398
+ * Adjusts popover positioning coordinates
1399
+ * such that popover does not appear offscreen
1400
+ * or overlapping safe area bounds.
1401
+ */
1402
+ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyWidth, bodyHeight, contentWidth, contentHeight, safeAreaMargin, contentOriginX, contentOriginY, triggerCoordinates, coordArrowTop = 0, coordArrowLeft = 0, arrowHeight = 0) => {
1403
+ let arrowTop = coordArrowTop;
1404
+ const arrowLeft = coordArrowLeft;
1405
+ let left = coordLeft;
1406
+ let top = coordTop;
1407
+ let bottom;
1408
+ let originX = contentOriginX;
1409
+ let originY = contentOriginY;
1410
+ let checkSafeAreaLeft = false;
1411
+ let checkSafeAreaRight = false;
1412
+ const triggerTop = triggerCoordinates
1413
+ ? triggerCoordinates.top + triggerCoordinates.height
1414
+ : bodyHeight / 2 - contentHeight / 2;
1415
+ const triggerHeight = triggerCoordinates ? triggerCoordinates.height : 0;
1416
+ let addPopoverBottomClass = false;
1417
+ /**
1418
+ * Adjust popover so it does not
1419
+ * go off the left of the screen.
1420
+ */
1421
+ if (left < bodyPadding + safeAreaMargin) {
1422
+ left = bodyPadding;
1423
+ checkSafeAreaLeft = true;
1424
+ originX = 'left';
1425
+ /**
1426
+ * Adjust popover so it does not
1427
+ * go off the right of the screen.
1428
+ */
1429
+ }
1430
+ else if (contentWidth + bodyPadding + left + safeAreaMargin > bodyWidth) {
1431
+ checkSafeAreaRight = true;
1432
+ left = bodyWidth - contentWidth - bodyPadding;
1433
+ originX = 'right';
1434
+ }
1435
+ /**
1436
+ * Adjust popover so it does not
1437
+ * go off the top of the screen.
1438
+ * If popover is on the left or the right of
1439
+ * the trigger, then we should not adjust top
1440
+ * margins.
1441
+ */
1442
+ if (triggerTop + triggerHeight + contentHeight > bodyHeight && (side === 'top' || side === 'bottom')) {
1443
+ if (triggerTop - contentHeight > 0) {
1444
+ /**
1445
+ * While we strive to align the popover with the trigger
1446
+ * on smaller screens this is not always possible. As a result,
1447
+ * we adjust the popover up so that it does not hang
1448
+ * off the bottom of the screen. However, we do not want to move
1449
+ * the popover up so much that it goes off the top of the screen.
1450
+ *
1451
+ * We chose 12 here so that the popover position looks a bit nicer as
1452
+ * it is not right up against the edge of the screen.
1453
+ */
1454
+ top = Math.max(12, triggerTop - contentHeight - triggerHeight - (arrowHeight - 1));
1455
+ arrowTop = top + contentHeight;
1456
+ originY = 'bottom';
1457
+ addPopoverBottomClass = true;
1458
+ /**
1459
+ * If not enough room for popover to appear
1460
+ * above trigger, then cut it off.
1461
+ */
1462
+ }
1463
+ else {
1464
+ bottom = bodyPadding;
1465
+ }
1466
+ }
1467
+ return {
1468
+ top,
1469
+ left,
1470
+ bottom,
1471
+ originX,
1472
+ originY,
1473
+ checkSafeAreaLeft,
1474
+ checkSafeAreaRight,
1475
+ arrowTop,
1476
+ arrowLeft,
1477
+ addPopoverBottomClass,
1478
+ };
1479
+ };
1480
+ const shouldShowArrow = (side, didAdjustBounds = false, ev, trigger) => {
1481
+ /**
1482
+ * If no event provided and
1483
+ * we do not have a trigger,
1484
+ * then this popover was likely
1485
+ * presented via the popoverController
1486
+ * or users called `present` manually.
1487
+ * In this case, the arrow should not be
1488
+ * shown as we do not have a reference.
1489
+ */
1490
+ if (!ev && !trigger) {
1491
+ return false;
1492
+ }
1493
+ /**
1494
+ * If popover is on the left or the right
1495
+ * of a trigger, but we needed to adjust the
1496
+ * popover due to screen bounds, then we should
1497
+ * hide the arrow as it will never be pointing
1498
+ * at the trigger.
1499
+ */
1500
+ if (side !== 'top' && side !== 'bottom' && didAdjustBounds) {
1501
+ return false;
1502
+ }
1503
+ return true;
1504
+ };
1505
+
1506
+ /*!
1507
+ * (C) Ionic http://ionicframework.com - MIT License
1508
+ */
1509
+ const POPOVER_IOS_BODY_PADDING = 5;
1510
+ /**
1511
+ * iOS Popover Enter Animation
1512
+ */
1513
+ const iosEnterAnimation = (baseEl, opts) => {
1514
+ var _a;
1515
+ const { event: ev, size, trigger, reference, side, align } = opts;
1516
+ const doc = baseEl.ownerDocument;
1517
+ const isRTL = doc.dir === 'rtl';
1518
+ const bodyWidth = doc.defaultView.innerWidth;
1519
+ const bodyHeight = doc.defaultView.innerHeight;
1520
+ const root = getElementRoot(baseEl);
1521
+ const contentEl = root.querySelector('.popover-content');
1522
+ const arrowEl = root.querySelector('.popover-arrow');
1523
+ const referenceSizeEl = trigger || ((_a = ev === null || ev === void 0 ? void 0 : ev.detail) === null || _a === void 0 ? void 0 : _a.ionShadowTarget) || (ev === null || ev === void 0 ? void 0 : ev.target);
1524
+ const { contentWidth, contentHeight } = getPopoverDimensions(size, contentEl, referenceSizeEl);
1525
+ const { arrowWidth, arrowHeight } = getArrowDimensions(arrowEl);
1526
+ const defaultPosition = {
1527
+ top: bodyHeight / 2 - contentHeight / 2,
1528
+ left: bodyWidth / 2 - contentWidth / 2,
1529
+ originX: isRTL ? 'right' : 'left',
1530
+ originY: 'top',
1531
+ };
1532
+ const results = getPopoverPosition(isRTL, contentWidth, contentHeight, arrowWidth, arrowHeight, reference, side, align, defaultPosition, trigger, ev);
1533
+ const padding = size === 'cover' ? 0 : POPOVER_IOS_BODY_PADDING;
1534
+ const margin = size === 'cover' ? 0 : 25;
1535
+ const { originX, originY, top, left, bottom, checkSafeAreaLeft, checkSafeAreaRight, arrowTop, arrowLeft, addPopoverBottomClass, } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, margin, results.originX, results.originY, results.referenceCoordinates, results.arrowTop, results.arrowLeft, arrowHeight);
1536
+ const baseAnimation = createAnimation();
1537
+ const backdropAnimation = createAnimation();
1538
+ const wrapperAnimation = createAnimation();
1539
+ backdropAnimation
1540
+ .addElement(root.querySelector('ion-backdrop'))
1541
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
1542
+ .beforeStyles({
1543
+ 'pointer-events': 'none',
1544
+ })
1545
+ .afterClearStyles(['pointer-events']);
1546
+ wrapperAnimation.addElement(root.querySelector('.popover-wrapper')).fromTo('opacity', 0.01, 1);
1547
+ return baseAnimation
1548
+ .easing('ease')
1549
+ .duration(100)
1550
+ .beforeAddWrite(() => {
1551
+ if (size === 'cover') {
1552
+ baseEl.style.setProperty('--width', `${contentWidth}px`);
1553
+ }
1554
+ if (addPopoverBottomClass) {
1555
+ baseEl.classList.add('popover-bottom');
1556
+ }
1557
+ if (bottom !== undefined) {
1558
+ contentEl.style.setProperty('bottom', `${bottom}px`);
1559
+ }
1560
+ const safeAreaLeft = ' + var(--ion-safe-area-left, 0)';
1561
+ const safeAreaRight = ' - var(--ion-safe-area-right, 0)';
1562
+ let leftValue = `${left}px`;
1563
+ if (checkSafeAreaLeft) {
1564
+ leftValue = `${left}px${safeAreaLeft}`;
1565
+ }
1566
+ if (checkSafeAreaRight) {
1567
+ leftValue = `${left}px${safeAreaRight}`;
1568
+ }
1569
+ contentEl.style.setProperty('top', `calc(${top}px + var(--offset-y, 0))`);
1570
+ contentEl.style.setProperty('left', `calc(${leftValue} + var(--offset-x, 0))`);
1571
+ contentEl.style.setProperty('transform-origin', `${originY} ${originX}`);
1572
+ if (arrowEl !== null) {
1573
+ const didAdjustBounds = results.top !== top || results.left !== left;
1574
+ const showArrow = shouldShowArrow(side, didAdjustBounds, ev, trigger);
1575
+ if (showArrow) {
1576
+ arrowEl.style.setProperty('top', `calc(${arrowTop}px + var(--offset-y, 0))`);
1577
+ arrowEl.style.setProperty('left', `calc(${arrowLeft}px + var(--offset-x, 0))`);
1578
+ }
1579
+ else {
1580
+ arrowEl.style.setProperty('display', 'none');
1581
+ }
1582
+ }
1583
+ })
1584
+ .addAnimation([backdropAnimation, wrapperAnimation]);
1585
+ };
1586
+
1587
+ /*!
1588
+ * (C) Ionic http://ionicframework.com - MIT License
1589
+ */
1590
+ /**
1591
+ * iOS Popover Leave Animation
1592
+ */
1593
+ const iosLeaveAnimation = (baseEl) => {
1594
+ const root = getElementRoot(baseEl);
1595
+ const contentEl = root.querySelector('.popover-content');
1596
+ const arrowEl = root.querySelector('.popover-arrow');
1597
+ const baseAnimation = createAnimation();
1598
+ const backdropAnimation = createAnimation();
1599
+ const wrapperAnimation = createAnimation();
1600
+ backdropAnimation.addElement(root.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
1601
+ wrapperAnimation.addElement(root.querySelector('.popover-wrapper')).fromTo('opacity', 0.99, 0);
1602
+ return baseAnimation
1603
+ .easing('ease')
1604
+ .afterAddWrite(() => {
1605
+ baseEl.style.removeProperty('--width');
1606
+ baseEl.classList.remove('popover-bottom');
1607
+ contentEl.style.removeProperty('top');
1608
+ contentEl.style.removeProperty('left');
1609
+ contentEl.style.removeProperty('bottom');
1610
+ contentEl.style.removeProperty('transform-origin');
1611
+ if (arrowEl) {
1612
+ arrowEl.style.removeProperty('top');
1613
+ arrowEl.style.removeProperty('left');
1614
+ arrowEl.style.removeProperty('display');
1615
+ }
1616
+ })
1617
+ .duration(300)
1618
+ .addAnimation([backdropAnimation, wrapperAnimation]);
1619
+ };
1620
+
1621
+ /*!
1622
+ * (C) Ionic http://ionicframework.com - MIT License
1623
+ */
1624
+ const POPOVER_MD_BODY_PADDING = 12;
1625
+ /**
1626
+ * Md Popover Enter Animation
1627
+ */
1628
+ const mdEnterAnimation = (baseEl, opts) => {
1629
+ var _a;
1630
+ const { event: ev, size, trigger, reference, side, align } = opts;
1631
+ const doc = baseEl.ownerDocument;
1632
+ const isRTL = doc.dir === 'rtl';
1633
+ const bodyWidth = doc.defaultView.innerWidth;
1634
+ const bodyHeight = doc.defaultView.innerHeight;
1635
+ const root = getElementRoot(baseEl);
1636
+ const contentEl = root.querySelector('.popover-content');
1637
+ const referenceSizeEl = trigger || ((_a = ev === null || ev === void 0 ? void 0 : ev.detail) === null || _a === void 0 ? void 0 : _a.ionShadowTarget) || (ev === null || ev === void 0 ? void 0 : ev.target);
1638
+ const { contentWidth, contentHeight } = getPopoverDimensions(size, contentEl, referenceSizeEl);
1639
+ const defaultPosition = {
1640
+ top: bodyHeight / 2 - contentHeight / 2,
1641
+ left: bodyWidth / 2 - contentWidth / 2,
1642
+ originX: isRTL ? 'right' : 'left',
1643
+ originY: 'top',
1644
+ };
1645
+ const results = getPopoverPosition(isRTL, contentWidth, contentHeight, 0, 0, reference, side, align, defaultPosition, trigger, ev);
1646
+ const padding = size === 'cover' ? 0 : POPOVER_MD_BODY_PADDING;
1647
+ const { originX, originY, top, left, bottom } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, 0, results.originX, results.originY, results.referenceCoordinates);
1648
+ const baseAnimation = createAnimation();
1649
+ const backdropAnimation = createAnimation();
1650
+ const wrapperAnimation = createAnimation();
1651
+ const contentAnimation = createAnimation();
1652
+ const viewportAnimation = createAnimation();
1653
+ backdropAnimation
1654
+ .addElement(root.querySelector('ion-backdrop'))
1655
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
1656
+ .beforeStyles({
1657
+ 'pointer-events': 'none',
1658
+ })
1659
+ .afterClearStyles(['pointer-events']);
1660
+ wrapperAnimation.addElement(root.querySelector('.popover-wrapper')).duration(150).fromTo('opacity', 0.01, 1);
1661
+ contentAnimation
1662
+ .addElement(contentEl)
1663
+ .beforeStyles({
1664
+ top: `calc(${top}px + var(--offset-y, 0px))`,
1665
+ left: `calc(${left}px + var(--offset-x, 0px))`,
1666
+ 'transform-origin': `${originY} ${originX}`,
1667
+ })
1668
+ .beforeAddWrite(() => {
1669
+ if (bottom !== undefined) {
1670
+ contentEl.style.setProperty('bottom', `${bottom}px`);
1671
+ }
1672
+ })
1673
+ .fromTo('transform', 'scale(0.8)', 'scale(1)');
1674
+ viewportAnimation.addElement(root.querySelector('.popover-viewport')).fromTo('opacity', 0.01, 1);
1675
+ return baseAnimation
1676
+ .easing('cubic-bezier(0.36,0.66,0.04,1)')
1677
+ .duration(300)
1678
+ .beforeAddWrite(() => {
1679
+ if (size === 'cover') {
1680
+ baseEl.style.setProperty('--width', `${contentWidth}px`);
1681
+ }
1682
+ if (originY === 'bottom') {
1683
+ baseEl.classList.add('popover-bottom');
1684
+ }
1685
+ })
1686
+ .addAnimation([backdropAnimation, wrapperAnimation, contentAnimation, viewportAnimation]);
1687
+ };
1688
+
1689
+ /*!
1690
+ * (C) Ionic http://ionicframework.com - MIT License
1691
+ */
1692
+ /**
1693
+ * Md Popover Leave Animation
1694
+ */
1695
+ const mdLeaveAnimation = (baseEl) => {
1696
+ const root = getElementRoot(baseEl);
1697
+ const contentEl = root.querySelector('.popover-content');
1698
+ const baseAnimation = createAnimation();
1699
+ const backdropAnimation = createAnimation();
1700
+ const wrapperAnimation = createAnimation();
1701
+ backdropAnimation.addElement(root.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
1702
+ wrapperAnimation.addElement(root.querySelector('.popover-wrapper')).fromTo('opacity', 0.99, 0);
1703
+ return baseAnimation
1704
+ .easing('ease')
1705
+ .afterAddWrite(() => {
1706
+ baseEl.style.removeProperty('--width');
1707
+ baseEl.classList.remove('popover-bottom');
1708
+ contentEl.style.removeProperty('top');
1709
+ contentEl.style.removeProperty('left');
1710
+ contentEl.style.removeProperty('bottom');
1711
+ contentEl.style.removeProperty('transform-origin');
1712
+ })
1713
+ .duration(150)
1714
+ .addAnimation([backdropAnimation, wrapperAnimation]);
1715
+ };
1716
+
1717
+ const popoverIosCss = ":host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:flex;position:fixed;align-items:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{opacity:0;z-index:10}.popover-content{display:flex;position:absolute;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);box-shadow:var(--box-shadow);overflow:auto;z-index:10}.popover-viewport{--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:flex;flex-direction:column;overflow:hidden}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}:host{--width:200px;--max-height:90%;--box-shadow:none;--backdrop-opacity:var(--ion-backdrop-opacity, 0.08)}:host(.popover-desktop){--box-shadow:0px 4px 16px 0px rgba(0, 0, 0, 0.12)}.popover-content{border-radius:10px}:host(.popover-desktop) .popover-content{border:0.5px solid var(--ion-color-step-100, #e6e6e6)}.popover-arrow{display:block;position:absolute;width:20px;height:10px;overflow:hidden}.popover-arrow::after{left:3px;top:3px;border-radius:3px;position:absolute;width:14px;height:14px;transform:rotate(45deg);background:var(--background);content:\"\";z-index:10}[dir=rtl] .popover-arrow::after,:host-context([dir=rtl]) .popover-arrow::after{left:unset;right:unset;right:3px}:host(.popover-bottom) .popover-arrow{top:auto;bottom:-10px}:host(.popover-bottom) .popover-arrow::after{top:-6px}:host(.popover-side-left) .popover-arrow{transform:rotate(90deg)}:host(.popover-side-right) .popover-arrow{transform:rotate(-90deg)}:host(.popover-side-top) .popover-arrow{transform:rotate(180deg)}:host(.popover-side-start) .popover-arrow{transform:rotate(90deg)}:host-context([dir=rtl]):host(.popover-side-start) .popover-arrow,:host-context([dir=rtl]).popover-side-start .popover-arrow{transform:rotate(-90deg)}:host(.popover-side-end) .popover-arrow{transform:rotate(-90deg)}:host-context([dir=rtl]):host(.popover-side-end) .popover-arrow,:host-context([dir=rtl]).popover-side-end .popover-arrow{transform:rotate(90deg)}@supports (backdrop-filter: blur(0)){:host(.popover-translucent) .popover-content,:host(.popover-translucent) .popover-arrow::after{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);backdrop-filter:saturate(180%) blur(20px)}}";
1718
+
1719
+ const popoverMdCss = ":host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:flex;position:fixed;align-items:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{opacity:0;z-index:10}.popover-content{display:flex;position:absolute;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);box-shadow:var(--box-shadow);overflow:auto;z-index:10}.popover-viewport{--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:flex;flex-direction:column;overflow:hidden}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}:host{--width:250px;--max-height:90%;--box-shadow:0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}.popover-content{border-radius:4px;transform-origin:left top}[dir=rtl] .popover-content,:host-context([dir=rtl]) .popover-content{transform-origin:right top}.popover-viewport{transition-delay:100ms}";
1720
+
1721
+ const Popover = class {
1722
+ constructor(hostRef) {
1723
+ registerInstance(this, hostRef);
1724
+ this.didPresent = createEvent(this, "ionPopoverDidPresent", 7);
1725
+ this.willPresent = createEvent(this, "ionPopoverWillPresent", 7);
1726
+ this.willDismiss = createEvent(this, "ionPopoverWillDismiss", 7);
1727
+ this.didDismiss = createEvent(this, "ionPopoverDidDismiss", 7);
1728
+ this.didPresentShorthand = createEvent(this, "didPresent", 7);
1729
+ this.willPresentShorthand = createEvent(this, "willPresent", 7);
1730
+ this.willDismissShorthand = createEvent(this, "willDismiss", 7);
1731
+ this.didDismissShorthand = createEvent(this, "didDismiss", 7);
1732
+ this.parentPopover = null;
1733
+ this.popoverIndex = popoverIds++;
1734
+ this.coreDelegate = CoreDelegate();
1735
+ this.inline = false;
1736
+ this.focusDescendantOnPresent = false;
1737
+ this.presented = false;
1738
+ /** @internal */
1739
+ this.hasController = false;
1740
+ /**
1741
+ * If `true`, the keyboard will be automatically dismissed when the overlay is presented.
1742
+ */
1743
+ this.keyboardClose = true;
1744
+ /**
1745
+ * If `true`, the popover will be dismissed when the backdrop is clicked.
1746
+ */
1747
+ this.backdropDismiss = true;
1748
+ /**
1749
+ * If `true`, a backdrop will be displayed behind the popover.
1750
+ * This property controls whether or not the backdrop
1751
+ * darkens the screen when the popover is presented.
1752
+ * It does not control whether or not the backdrop
1753
+ * is active or present in the DOM.
1754
+ */
1755
+ this.showBackdrop = true;
1756
+ /**
1757
+ * If `true`, the popover will be translucent.
1758
+ * Only applies when the mode is `"ios"` and the device supports
1759
+ * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
1760
+ */
1761
+ this.translucent = false;
1762
+ /**
1763
+ * If `true`, the popover will animate.
1764
+ */
1765
+ this.animated = true;
1766
+ /**
1767
+ * Describes what kind of interaction with the trigger that
1768
+ * should cause the popover to open. Does not apply when the `trigger`
1769
+ * property is `undefined`.
1770
+ * If `'click'`, the popover will be presented when the trigger is left clicked.
1771
+ * If `'hover'`, the popover will be presented when a pointer hovers over the trigger.
1772
+ * If `'context-menu'`, the popover will be presented when the trigger is right
1773
+ * clicked on desktop and long pressed on mobile. This will also prevent your
1774
+ * device's normal context menu from appearing.
1775
+ */
1776
+ this.triggerAction = 'click';
1777
+ /**
1778
+ * Describes how to calculate the popover width.
1779
+ * If `'cover'`, the popover width will match the width of the trigger.
1780
+ * If `'auto'`, the popover width will be determined by the content in
1781
+ * the popover.
1782
+ */
1783
+ this.size = 'auto';
1784
+ /**
1785
+ * If `true`, the popover will be automatically
1786
+ * dismissed when the content has been clicked.
1787
+ */
1788
+ this.dismissOnSelect = false;
1789
+ /**
1790
+ * Describes what to position the popover relative to.
1791
+ * If `'trigger'`, the popover will be positioned relative
1792
+ * to the trigger button. If passing in an event, this is
1793
+ * determined via event.target.
1794
+ * If `'event'`, the popover will be positioned relative
1795
+ * to the x/y coordinates of the trigger action. If passing
1796
+ * in an event, this is determined via event.clientX and event.clientY.
1797
+ */
1798
+ this.reference = 'trigger';
1799
+ /**
1800
+ * Describes which side of the `reference` point to position
1801
+ * the popover on. The `'start'` and `'end'` values are RTL-aware,
1802
+ * and the `'left'` and `'right'` values are not.
1803
+ */
1804
+ this.side = 'bottom';
1805
+ /**
1806
+ * If `true`, the popover will display an arrow that points at the
1807
+ * `reference` when running in `ios` mode. Does not apply in `md` mode.
1808
+ */
1809
+ this.arrow = true;
1810
+ /**
1811
+ * If `true`, the popover will open. If `false`, the popover will close.
1812
+ * Use this if you need finer grained control over presentation, otherwise
1813
+ * just use the popoverController or the `trigger` property.
1814
+ * Note: `isOpen` will not automatically be set back to `false` when
1815
+ * the popover dismisses. You will need to do that in your code.
1816
+ */
1817
+ this.isOpen = false;
1818
+ /**
1819
+ * @internal
1820
+ *
1821
+ * If `true` the popover will not register its own keyboard event handlers.
1822
+ * This allows the contents of the popover to handle their own keyboard interactions.
1823
+ *
1824
+ * If `false`, the popover will register its own keyboard event handlers for
1825
+ * navigating `ion-list` items within a popover (up/down/home/end/etc.).
1826
+ * This will also cancel browser keyboard event bindings to prevent scroll
1827
+ * behavior in a popover using a list of items.
1828
+ */
1829
+ this.keyboardEvents = false;
1830
+ /**
1831
+ * If `true`, the component passed into `ion-popover` will
1832
+ * automatically be mounted when the popover is created. The
1833
+ * component will remain mounted even when the popover is dismissed.
1834
+ * However, the component will be destroyed when the popover is
1835
+ * destroyed. This property is not reactive and should only be
1836
+ * used when initially creating a popover.
1837
+ *
1838
+ * Note: This feature only applies to inline popovers in JavaScript
1839
+ * frameworks such as Angular, React, and Vue.
1840
+ */
1841
+ this.keepContentsMounted = false;
1842
+ this.onBackdropTap = () => {
1843
+ this.dismiss(undefined, BACKDROP);
1844
+ };
1845
+ this.onLifecycle = (modalEvent) => {
1846
+ const el = this.usersElement;
1847
+ const name = LIFECYCLE_MAP[modalEvent.type];
1848
+ if (el && name) {
1849
+ const event = new CustomEvent(name, {
1850
+ bubbles: false,
1851
+ cancelable: false,
1852
+ detail: modalEvent.detail,
1853
+ });
1854
+ el.dispatchEvent(event);
1855
+ }
1856
+ };
1857
+ this.configureTriggerInteraction = () => {
1858
+ const { trigger, triggerAction, el, destroyTriggerInteraction } = this;
1859
+ if (destroyTriggerInteraction) {
1860
+ destroyTriggerInteraction();
1861
+ }
1862
+ const triggerEl = (this.triggerEl = trigger !== undefined ? document.getElementById(trigger) : null);
1863
+ if (!triggerEl) {
1864
+ return;
1865
+ }
1866
+ this.destroyTriggerInteraction = configureTriggerInteraction(triggerEl, triggerAction, el);
1867
+ };
1868
+ this.configureKeyboardInteraction = () => {
1869
+ const { destroyKeyboardInteraction, el } = this;
1870
+ if (destroyKeyboardInteraction) {
1871
+ destroyKeyboardInteraction();
1872
+ }
1873
+ this.destroyKeyboardInteraction = configureKeyboardInteraction(el);
1874
+ };
1875
+ this.configureDismissInteraction = () => {
1876
+ const { destroyDismissInteraction, parentPopover, triggerAction, triggerEl, el } = this;
1877
+ if (!parentPopover || !triggerEl) {
1878
+ return;
1879
+ }
1880
+ if (destroyDismissInteraction) {
1881
+ destroyDismissInteraction();
1882
+ }
1883
+ this.destroyDismissInteraction = configureDismissInteraction(triggerEl, triggerAction, el, parentPopover);
1884
+ };
1885
+ }
1886
+ onTriggerChange() {
1887
+ this.configureTriggerInteraction();
1888
+ }
1889
+ onIsOpenChange(newValue, oldValue) {
1890
+ if (newValue === true && oldValue === false) {
1891
+ this.present();
1892
+ }
1893
+ else if (newValue === false && oldValue === true) {
1894
+ this.dismiss();
1895
+ }
1896
+ }
1897
+ connectedCallback() {
1898
+ prepareOverlay(this.el);
1899
+ }
1900
+ componentWillLoad() {
1901
+ /**
1902
+ * If user has custom ID set then we should
1903
+ * not assign the default incrementing ID.
1904
+ */
1905
+ this.popoverId = this.el.hasAttribute('id') ? this.el.getAttribute('id') : `ion-popover-${this.popoverIndex}`;
1906
+ this.parentPopover = this.el.closest(`ion-popover:not(#${this.popoverId})`);
1907
+ if (this.alignment === undefined) {
1908
+ this.alignment = getIonMode(this) === 'ios' ? 'center' : 'start';
1909
+ }
1910
+ }
1911
+ componentDidLoad() {
1912
+ const { parentPopover, isOpen } = this;
1913
+ /**
1914
+ * If popover was rendered with isOpen="true"
1915
+ * then we should open popover immediately.
1916
+ */
1917
+ if (isOpen === true) {
1918
+ raf(() => this.present());
1919
+ }
1920
+ if (parentPopover) {
1921
+ addEventListener(parentPopover, 'ionPopoverWillDismiss', () => {
1922
+ this.dismiss(undefined, undefined, false);
1923
+ });
1924
+ }
1925
+ this.configureTriggerInteraction();
1926
+ }
1927
+ /**
1928
+ * When opening a popover from a trigger, we should not be
1929
+ * modifying the `event` prop from inside the component.
1930
+ * Additionally, when pressing the "Right" arrow key, we need
1931
+ * to shift focus to the first descendant in the newly presented
1932
+ * popover.
1933
+ *
1934
+ * @internal
1935
+ */
1936
+ async presentFromTrigger(event, focusDescendant = false) {
1937
+ this.focusDescendantOnPresent = focusDescendant;
1938
+ await this.present(event);
1939
+ this.focusDescendantOnPresent = false;
1940
+ }
1941
+ /**
1942
+ * Determines whether or not an overlay
1943
+ * is being used inline or via a controller/JS
1944
+ * and returns the correct delegate.
1945
+ * By default, subsequent calls to getDelegate
1946
+ * will use a cached version of the delegate.
1947
+ * This is useful for calling dismiss after
1948
+ * present so that the correct delegate is given.
1949
+ */
1950
+ getDelegate(force = false) {
1951
+ if (this.workingDelegate && !force) {
1952
+ return {
1953
+ delegate: this.workingDelegate,
1954
+ inline: this.inline,
1955
+ };
1956
+ }
1957
+ /**
1958
+ * If using overlay inline
1959
+ * we potentially need to use the coreDelegate
1960
+ * so that this works in vanilla JS apps.
1961
+ * If a developer has presented this component
1962
+ * via a controller, then we can assume
1963
+ * the component is already in the
1964
+ * correct place.
1965
+ */
1966
+ const parentEl = this.el.parentNode;
1967
+ const inline = (this.inline = parentEl !== null && !this.hasController);
1968
+ const delegate = (this.workingDelegate = inline ? this.delegate || this.coreDelegate : this.delegate);
1969
+ return { inline, delegate };
1970
+ }
1971
+ /**
1972
+ * Present the popover overlay after it has been created.
1973
+ * Developers can pass a mouse, touch, or pointer event
1974
+ * to position the popover relative to where that event
1975
+ * was dispatched.
1976
+ */
1977
+ async present(event) {
1978
+ if (this.presented) {
1979
+ return;
1980
+ }
1981
+ /**
1982
+ * When using an inline popover
1983
+ * and dismissing a popover it is possible to
1984
+ * quickly present the popover while it is
1985
+ * dismissing. We need to await any current
1986
+ * transition to allow the dismiss to finish
1987
+ * before presenting again.
1988
+ */
1989
+ if (this.currentTransition !== undefined) {
1990
+ await this.currentTransition;
1991
+ }
1992
+ const data = Object.assign(Object.assign({}, this.componentProps), { popover: this.el });
1993
+ const { inline, delegate } = this.getDelegate(true);
1994
+ this.usersElement = await attachComponent(delegate, this.el, this.component, ['popover-viewport'], data, inline);
1995
+ await deepReady(this.usersElement);
1996
+ if (!this.keyboardEvents) {
1997
+ this.configureKeyboardInteraction();
1998
+ }
1999
+ this.configureDismissInteraction();
2000
+ this.currentTransition = present(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, {
2001
+ event: event || this.event,
2002
+ size: this.size,
2003
+ trigger: this.triggerEl,
2004
+ reference: this.reference,
2005
+ side: this.side,
2006
+ align: this.alignment,
2007
+ });
2008
+ await this.currentTransition;
2009
+ this.currentTransition = undefined;
2010
+ /**
2011
+ * If popover is nested and was
2012
+ * presented using the "Right" arrow key,
2013
+ * we need to move focus to the first
2014
+ * descendant inside of the popover.
2015
+ */
2016
+ if (this.focusDescendantOnPresent) {
2017
+ focusFirstDescendant(this.el, this.el);
2018
+ }
2019
+ }
2020
+ /**
2021
+ * Dismiss the popover overlay after it has been presented.
2022
+ *
2023
+ * @param data Any data to emit in the dismiss events.
2024
+ * @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
2025
+ * @param dismissParentPopover If `true`, dismissing this popover will also dismiss
2026
+ * a parent popover if this popover is nested. Defaults to `true`.
2027
+ */
2028
+ async dismiss(data, role, dismissParentPopover = true) {
2029
+ /**
2030
+ * When using an inline popover
2031
+ * and presenting a popover it is possible to
2032
+ * quickly dismiss the popover while it is
2033
+ * presenting. We need to await any current
2034
+ * transition to allow the present to finish
2035
+ * before dismissing again.
2036
+ */
2037
+ if (this.currentTransition !== undefined) {
2038
+ await this.currentTransition;
2039
+ }
2040
+ const { destroyKeyboardInteraction, destroyDismissInteraction } = this;
2041
+ if (dismissParentPopover && this.parentPopover) {
2042
+ this.parentPopover.dismiss(data, role, dismissParentPopover);
2043
+ }
2044
+ this.currentTransition = dismiss(this, data, role, 'popoverLeave', iosLeaveAnimation, mdLeaveAnimation, this.event);
2045
+ const shouldDismiss = await this.currentTransition;
2046
+ if (shouldDismiss) {
2047
+ if (destroyKeyboardInteraction) {
2048
+ destroyKeyboardInteraction();
2049
+ this.destroyKeyboardInteraction = undefined;
2050
+ }
2051
+ if (destroyDismissInteraction) {
2052
+ destroyDismissInteraction();
2053
+ this.destroyDismissInteraction = undefined;
2054
+ }
2055
+ /**
2056
+ * If using popover inline
2057
+ * we potentially need to use the coreDelegate
2058
+ * so that this works in vanilla JS apps
2059
+ */
2060
+ const { delegate } = this.getDelegate();
2061
+ await detachComponent(delegate, this.usersElement);
2062
+ }
2063
+ this.currentTransition = undefined;
2064
+ return shouldDismiss;
2065
+ }
2066
+ /**
2067
+ * @internal
2068
+ */
2069
+ async getParentPopover() {
2070
+ return this.parentPopover;
2071
+ }
2072
+ /**
2073
+ * Returns a promise that resolves when the popover did dismiss.
2074
+ */
2075
+ onDidDismiss() {
2076
+ return eventMethod(this.el, 'ionPopoverDidDismiss');
2077
+ }
2078
+ /**
2079
+ * Returns a promise that resolves when the popover will dismiss.
2080
+ */
2081
+ onWillDismiss() {
2082
+ return eventMethod(this.el, 'ionPopoverWillDismiss');
2083
+ }
2084
+ render() {
2085
+ const mode = getIonMode(this);
2086
+ const { onLifecycle, popoverId, parentPopover, dismissOnSelect, side, arrow, htmlAttributes } = this;
2087
+ const desktop = isPlatform('desktop');
2088
+ const enableArrow = arrow && !parentPopover;
2089
+ return (h(Host, Object.assign({ "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
2090
+ zIndex: `${20000 + this.overlayIndex}`,
2091
+ }, id: popoverId, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { class: "popover-arrow", part: "arrow" }), h("div", { class: "popover-content", part: "content" }, h("slot", null)))));
2092
+ }
2093
+ get el() { return getElement(this); }
2094
+ static get watchers() { return {
2095
+ "trigger": ["onTriggerChange"],
2096
+ "triggerAction": ["onTriggerChange"],
2097
+ "isOpen": ["onIsOpenChange"]
2098
+ }; }
2099
+ };
2100
+ const LIFECYCLE_MAP = {
2101
+ ionPopoverDidPresent: 'ionViewDidEnter',
2102
+ ionPopoverWillPresent: 'ionViewWillEnter',
2103
+ ionPopoverWillDismiss: 'ionViewWillLeave',
2104
+ ionPopoverDidDismiss: 'ionViewDidLeave',
2105
+ };
2106
+ let popoverIds = 0;
2107
+ Popover.style = {
2108
+ ios: popoverIosCss,
2109
+ md: popoverMdCss
2110
+ };
2111
+
2112
+ /*!
2113
+ * (C) Ionic http://ionicframework.com - MIT License
2114
+ */
2115
+ const watchForOptions = (containerEl, tagName, onChange) => {
2116
+ if (typeof MutationObserver === 'undefined') {
2117
+ return;
2118
+ }
2119
+ const mutation = new MutationObserver((mutationList) => {
2120
+ onChange(getSelectedOption(mutationList, tagName));
2121
+ });
2122
+ mutation.observe(containerEl, {
2123
+ childList: true,
2124
+ subtree: true,
2125
+ });
2126
+ return mutation;
2127
+ };
2128
+ const getSelectedOption = (mutationList, tagName) => {
2129
+ let newOption;
2130
+ mutationList.forEach((mut) => {
2131
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
2132
+ for (let i = 0; i < mut.addedNodes.length; i++) {
2133
+ newOption = findCheckedOption(mut.addedNodes[i], tagName) || newOption;
2134
+ }
2135
+ });
2136
+ return newOption;
2137
+ };
2138
+ const findCheckedOption = (el, tagName) => {
2139
+ if (el.nodeType !== 1) {
2140
+ return undefined;
2141
+ }
2142
+ const options = el.tagName === tagName.toUpperCase() ? [el] : Array.from(el.querySelectorAll(tagName));
2143
+ return options.find((o) => o.value === el.value);
2144
+ };
2145
+
2146
+ const selectIosCss = ":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:flex;position:relative;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:20px}.select-icon{width:12px;height:18px;opacity:0.33}";
2147
+
2148
+ const selectMdCss = ":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:flex;position:relative;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:0;--padding-bottom:10px;--padding-start:16px}.select-icon{width:19px;height:19px;transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:0.55}:host-context(.item-label-stacked) .select-icon,:host-context(.item-label-floating:not(.item-fill-outline)) .select-icon,:host-context(.item-label-floating.item-fill-outline){transform:translate3d(0, -9px, 0)}:host-context(.item-has-focus) .select-icon{transform:rotate(180deg)}:host-context(.item-has-focus.item-label-stacked) .select-icon,:host-context(.item-has-focus.item-label-floating:not(.item-fill-outline)) .select-icon{transform:translate3d(0, -9px, 0) rotate(180deg)}:host-context(ion-item.ion-focused) .select-icon,:host-context(.item-has-focus) .select-icon{color:var(--highlight-color-focused);opacity:1}";
2149
+
2150
+ const Select = class {
2151
+ constructor(hostRef) {
2152
+ registerInstance(this, hostRef);
2153
+ this.ionChange = createEvent(this, "ionChange", 7);
2154
+ this.ionCancel = createEvent(this, "ionCancel", 7);
2155
+ this.ionDismiss = createEvent(this, "ionDismiss", 7);
2156
+ this.ionFocus = createEvent(this, "ionFocus", 7);
2157
+ this.ionBlur = createEvent(this, "ionBlur", 7);
2158
+ this.ionStyle = createEvent(this, "ionStyle", 7);
2159
+ this.inputId = `ion-sel-${selectIds++}`;
2160
+ this.didInit = false;
2161
+ this.isExpanded = false;
2162
+ /**
2163
+ * If `true`, the user cannot interact with the select.
2164
+ */
2165
+ this.disabled = false;
2166
+ /**
2167
+ * The text to display on the cancel button.
2168
+ */
2169
+ this.cancelText = 'Cancel';
2170
+ /**
2171
+ * The text to display on the ok button.
2172
+ */
2173
+ this.okText = 'OK';
2174
+ /**
2175
+ * The name of the control, which is submitted with the form data.
2176
+ */
2177
+ this.name = this.inputId;
2178
+ /**
2179
+ * If `true`, the select can accept multiple values.
2180
+ */
2181
+ this.multiple = false;
2182
+ /**
2183
+ * The interface the select should use: `action-sheet`, `popover` or `alert`.
2184
+ */
2185
+ this.interface = 'alert';
2186
+ /**
2187
+ * Any additional options that the `alert`, `action-sheet` or `popover` interface
2188
+ * can take. See the [ion-alert docs](./alert), the
2189
+ * [ion-action-sheet docs](./action-sheet) and the
2190
+ * [ion-popover docs](./popover) for the
2191
+ * create options for each interface.
2192
+ *
2193
+ * Note: `interfaceOptions` will not override `inputs` or `buttons` with the `alert` interface.
2194
+ */
2195
+ this.interfaceOptions = {};
2196
+ this.onClick = (ev) => {
2197
+ this.setFocus();
2198
+ this.open(ev);
2199
+ };
2200
+ this.onFocus = () => {
2201
+ this.ionFocus.emit();
2202
+ };
2203
+ this.onBlur = () => {
2204
+ this.ionBlur.emit();
2205
+ };
2206
+ }
2207
+ styleChanged() {
2208
+ this.emitStyle();
2209
+ }
2210
+ valueChanged() {
2211
+ this.emitStyle();
2212
+ // TODO: FW-1160 - Remove the `didInit` property when ionChange behavior is changed in v7.
2213
+ if (this.didInit) {
2214
+ this.ionChange.emit({
2215
+ value: this.value,
2216
+ });
2217
+ }
2218
+ }
2219
+ async connectedCallback() {
2220
+ this.updateOverlayOptions();
2221
+ this.emitStyle();
2222
+ this.mutationO = watchForOptions(this.el, 'ion-select-option', async () => {
2223
+ this.updateOverlayOptions();
2224
+ });
2225
+ }
2226
+ disconnectedCallback() {
2227
+ if (this.mutationO) {
2228
+ this.mutationO.disconnect();
2229
+ this.mutationO = undefined;
2230
+ }
2231
+ }
2232
+ componentDidLoad() {
2233
+ this.didInit = true;
2234
+ }
2235
+ /**
2236
+ * Open the select overlay. The overlay is either an alert, action sheet, or popover,
2237
+ * depending on the `interface` property on the `ion-select`.
2238
+ *
2239
+ * @param event The user interface event that called the open.
2240
+ */
2241
+ async open(event) {
2242
+ if (this.disabled || this.isExpanded) {
2243
+ return undefined;
2244
+ }
2245
+ this.isExpanded = true;
2246
+ const overlay = (this.overlay = await this.createOverlay(event));
2247
+ overlay.onDidDismiss().then(() => {
2248
+ this.overlay = undefined;
2249
+ this.isExpanded = false;
2250
+ this.ionDismiss.emit();
2251
+ this.setFocus();
2252
+ });
2253
+ await overlay.present();
2254
+ // focus selected option for popovers
2255
+ if (this.interface === 'popover') {
2256
+ let indexOfSelected = this.childOpts.map((o) => o.value).indexOf(this.value);
2257
+ indexOfSelected = indexOfSelected > -1 ? indexOfSelected : 0; // default to first option if nothing selected
2258
+ const selectedEl = overlay.querySelector(`.select-interface-option:nth-child(${indexOfSelected + 1})`);
2259
+ if (selectedEl) {
2260
+ focusElement(selectedEl);
2261
+ }
2262
+ }
2263
+ return overlay;
2264
+ }
2265
+ createOverlay(ev) {
2266
+ let selectInterface = this.interface;
2267
+ if (selectInterface === 'action-sheet' && this.multiple) {
2268
+ console.warn(`Select interface cannot be "${selectInterface}" with a multi-value select. Using the "alert" interface instead.`);
2269
+ selectInterface = 'alert';
2270
+ }
2271
+ if (selectInterface === 'popover' && !ev) {
2272
+ console.warn(`Select interface cannot be a "${selectInterface}" without passing an event. Using the "alert" interface instead.`);
2273
+ selectInterface = 'alert';
2274
+ }
2275
+ if (selectInterface === 'action-sheet') {
2276
+ return this.openActionSheet();
2277
+ }
2278
+ if (selectInterface === 'popover') {
2279
+ return this.openPopover(ev);
2280
+ }
2281
+ return this.openAlert();
2282
+ }
2283
+ updateOverlayOptions() {
2284
+ const overlay = this.overlay;
2285
+ if (!overlay) {
2286
+ return;
2287
+ }
2288
+ const childOpts = this.childOpts;
2289
+ const value = this.value;
2290
+ switch (this.interface) {
2291
+ case 'action-sheet':
2292
+ overlay.buttons = this.createActionSheetButtons(childOpts, value);
2293
+ break;
2294
+ case 'popover':
2295
+ const popover = overlay.querySelector('ion-select-popover');
2296
+ if (popover) {
2297
+ popover.options = this.createPopoverOptions(childOpts, value);
2298
+ }
2299
+ break;
2300
+ case 'alert':
2301
+ const inputType = this.multiple ? 'checkbox' : 'radio';
2302
+ overlay.inputs = this.createAlertInputs(childOpts, inputType, value);
2303
+ break;
2304
+ }
2305
+ }
2306
+ createActionSheetButtons(data, selectValue) {
2307
+ const actionSheetButtons = data.map((option) => {
2308
+ const value = getOptionValue(option);
2309
+ // Remove hydrated before copying over classes
2310
+ const copyClasses = Array.from(option.classList)
2311
+ .filter((cls) => cls !== 'hydrated')
2312
+ .join(' ');
2313
+ const optClass = `${OPTION_CLASS} ${copyClasses}`;
2314
+ return {
2315
+ role: isOptionSelected(selectValue, value, this.compareWith) ? 'selected' : '',
2316
+ text: option.textContent,
2317
+ cssClass: optClass,
2318
+ handler: () => {
2319
+ this.value = value;
2320
+ },
2321
+ };
2322
+ });
2323
+ // Add "cancel" button
2324
+ actionSheetButtons.push({
2325
+ text: this.cancelText,
2326
+ role: 'cancel',
2327
+ handler: () => {
2328
+ this.ionCancel.emit();
2329
+ },
2330
+ });
2331
+ return actionSheetButtons;
2332
+ }
2333
+ createAlertInputs(data, inputType, selectValue) {
2334
+ const alertInputs = data.map((option) => {
2335
+ const value = getOptionValue(option);
2336
+ // Remove hydrated before copying over classes
2337
+ const copyClasses = Array.from(option.classList)
2338
+ .filter((cls) => cls !== 'hydrated')
2339
+ .join(' ');
2340
+ const optClass = `${OPTION_CLASS} ${copyClasses}`;
2341
+ return {
2342
+ type: inputType,
2343
+ cssClass: optClass,
2344
+ label: option.textContent || '',
2345
+ value,
2346
+ checked: isOptionSelected(selectValue, value, this.compareWith),
2347
+ disabled: option.disabled,
2348
+ };
2349
+ });
2350
+ return alertInputs;
2351
+ }
2352
+ createPopoverOptions(data, selectValue) {
2353
+ const popoverOptions = data.map((option) => {
2354
+ const value = getOptionValue(option);
2355
+ // Remove hydrated before copying over classes
2356
+ const copyClasses = Array.from(option.classList)
2357
+ .filter((cls) => cls !== 'hydrated')
2358
+ .join(' ');
2359
+ const optClass = `${OPTION_CLASS} ${copyClasses}`;
2360
+ return {
2361
+ text: option.textContent || '',
2362
+ cssClass: optClass,
2363
+ value,
2364
+ checked: isOptionSelected(selectValue, value, this.compareWith),
2365
+ disabled: option.disabled,
2366
+ handler: (selected) => {
2367
+ this.value = selected;
2368
+ if (!this.multiple) {
2369
+ this.close();
2370
+ }
2371
+ },
2372
+ };
2373
+ });
2374
+ return popoverOptions;
2375
+ }
2376
+ async openPopover(ev) {
2377
+ const interfaceOptions = this.interfaceOptions;
2378
+ const mode = getIonMode(this);
2379
+ const showBackdrop = mode === 'md' ? false : true;
2380
+ const multiple = this.multiple;
2381
+ const value = this.value;
2382
+ let event = ev;
2383
+ let size = 'auto';
2384
+ const item = this.el.closest('ion-item');
2385
+ // If the select is inside of an item containing a floating
2386
+ // or stacked label then the popover should take up the
2387
+ // full width of the item when it presents
2388
+ if (item && (item.classList.contains('item-label-floating') || item.classList.contains('item-label-stacked'))) {
2389
+ event = Object.assign(Object.assign({}, ev), { detail: {
2390
+ ionShadowTarget: item,
2391
+ } });
2392
+ size = 'cover';
2393
+ }
2394
+ const popoverOpts = Object.assign(Object.assign({ mode,
2395
+ event, alignment: 'center', size,
2396
+ showBackdrop }, interfaceOptions), { component: 'ion-select-popover', cssClass: ['select-popover', interfaceOptions.cssClass], componentProps: {
2397
+ header: interfaceOptions.header,
2398
+ subHeader: interfaceOptions.subHeader,
2399
+ message: interfaceOptions.message,
2400
+ multiple,
2401
+ value,
2402
+ options: this.createPopoverOptions(this.childOpts, value),
2403
+ } });
2404
+ return popoverController.create(popoverOpts);
2405
+ }
2406
+ async openActionSheet() {
2407
+ const mode = getIonMode(this);
2408
+ const interfaceOptions = this.interfaceOptions;
2409
+ const actionSheetOpts = Object.assign(Object.assign({ mode }, interfaceOptions), { buttons: this.createActionSheetButtons(this.childOpts, this.value), cssClass: ['select-action-sheet', interfaceOptions.cssClass] });
2410
+ return actionSheetController.create(actionSheetOpts);
2411
+ }
2412
+ async openAlert() {
2413
+ const label = this.getLabel();
2414
+ const labelText = label ? label.textContent : null;
2415
+ const interfaceOptions = this.interfaceOptions;
2416
+ const inputType = this.multiple ? 'checkbox' : 'radio';
2417
+ const mode = getIonMode(this);
2418
+ const alertOpts = Object.assign(Object.assign({ mode }, interfaceOptions), { header: interfaceOptions.header ? interfaceOptions.header : labelText, inputs: this.createAlertInputs(this.childOpts, inputType, this.value), buttons: [
2419
+ {
2420
+ text: this.cancelText,
2421
+ role: 'cancel',
2422
+ handler: () => {
2423
+ this.ionCancel.emit();
2424
+ },
2425
+ },
2426
+ {
2427
+ text: this.okText,
2428
+ handler: (selectedValues) => {
2429
+ this.value = selectedValues;
2430
+ },
2431
+ },
2432
+ ], cssClass: [
2433
+ 'select-alert',
2434
+ interfaceOptions.cssClass,
2435
+ this.multiple ? 'multiple-select-alert' : 'single-select-alert',
2436
+ ] });
2437
+ return alertController.create(alertOpts);
2438
+ }
2439
+ /**
2440
+ * Close the select interface.
2441
+ */
2442
+ close() {
2443
+ // TODO check !this.overlay || !this.isFocus()
2444
+ if (!this.overlay) {
2445
+ return Promise.resolve(false);
2446
+ }
2447
+ return this.overlay.dismiss();
2448
+ }
2449
+ getLabel() {
2450
+ return findItemLabel(this.el);
2451
+ }
2452
+ hasValue() {
2453
+ return this.getText() !== '';
2454
+ }
2455
+ get childOpts() {
2456
+ return Array.from(this.el.querySelectorAll('ion-select-option'));
2457
+ }
2458
+ getText() {
2459
+ const selectedText = this.selectedText;
2460
+ if (selectedText != null && selectedText !== '') {
2461
+ return selectedText;
2462
+ }
2463
+ return generateText(this.childOpts, this.value, this.compareWith);
2464
+ }
2465
+ setFocus() {
2466
+ if (this.focusEl) {
2467
+ this.focusEl.focus();
2468
+ }
2469
+ }
2470
+ emitStyle() {
2471
+ this.ionStyle.emit({
2472
+ interactive: true,
2473
+ 'interactive-disabled': this.disabled,
2474
+ select: true,
2475
+ 'select-disabled': this.disabled,
2476
+ 'has-placeholder': this.placeholder !== undefined,
2477
+ 'has-value': this.hasValue(),
2478
+ 'has-focus': this.isExpanded,
2479
+ });
2480
+ }
2481
+ render() {
2482
+ const { disabled, el, inputId, isExpanded, name, placeholder, value } = this;
2483
+ const mode = getIonMode(this);
2484
+ const { labelText, labelId } = getAriaLabel(el, inputId);
2485
+ renderHiddenInput(true, el, name, parseValue(value), disabled);
2486
+ const displayValue = this.getText();
2487
+ let addPlaceholderClass = false;
2488
+ let selectText = displayValue;
2489
+ if (selectText === '' && placeholder !== undefined) {
2490
+ selectText = placeholder;
2491
+ addPlaceholderClass = true;
2492
+ }
2493
+ const selectTextClasses = {
2494
+ 'select-text': true,
2495
+ 'select-placeholder': addPlaceholderClass,
2496
+ };
2497
+ const textPart = addPlaceholderClass ? 'placeholder' : 'text';
2498
+ // If there is a label then we need to concatenate it with the
2499
+ // current value (or placeholder) and a comma so it separates
2500
+ // nicely when the screen reader announces it, otherwise just
2501
+ // announce the value / placeholder
2502
+ const displayLabel = labelText !== undefined ? (selectText !== '' ? `${selectText}, ${labelText}` : labelText) : selectText;
2503
+ return (h(Host, { onClick: this.onClick, role: "button", "aria-haspopup": "listbox", "aria-disabled": disabled ? 'true' : null, "aria-label": displayLabel, class: {
2504
+ [mode]: true,
2505
+ 'in-item': hostContext('ion-item', el),
2506
+ 'select-disabled': disabled,
2507
+ 'select-expanded': isExpanded,
2508
+ } }, h("div", { "aria-hidden": "true", class: selectTextClasses, part: textPart }, selectText), h("div", { class: "select-icon", role: "presentation", part: "icon" }, h("div", { class: "select-icon-inner" })), h("label", { id: labelId }, displayLabel), h("button", { type: "button", disabled: disabled, id: inputId, "aria-labelledby": labelId, "aria-haspopup": "listbox", "aria-expanded": `${isExpanded}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) })));
2509
+ }
2510
+ get el() { return getElement(this); }
2511
+ static get watchers() { return {
2512
+ "disabled": ["styleChanged"],
2513
+ "placeholder": ["styleChanged"],
2514
+ "isExpanded": ["styleChanged"],
2515
+ "value": ["valueChanged"]
2516
+ }; }
2517
+ };
2518
+ const isOptionSelected = (currentValue, compareValue, compareWith) => {
2519
+ if (currentValue === undefined) {
2520
+ return false;
2521
+ }
2522
+ if (Array.isArray(currentValue)) {
2523
+ return currentValue.some((val) => compareOptions(val, compareValue, compareWith));
2524
+ }
2525
+ else {
2526
+ return compareOptions(currentValue, compareValue, compareWith);
2527
+ }
2528
+ };
2529
+ const getOptionValue = (el) => {
2530
+ const value = el.value;
2531
+ return value === undefined ? el.textContent || '' : value;
2532
+ };
2533
+ const parseValue = (value) => {
2534
+ if (value == null) {
2535
+ return undefined;
2536
+ }
2537
+ if (Array.isArray(value)) {
2538
+ return value.join(',');
2539
+ }
2540
+ return value.toString();
2541
+ };
2542
+ const compareOptions = (currentValue, compareValue, compareWith) => {
2543
+ if (typeof compareWith === 'function') {
2544
+ return compareWith(currentValue, compareValue);
2545
+ }
2546
+ else if (typeof compareWith === 'string') {
2547
+ return currentValue[compareWith] === compareValue[compareWith];
2548
+ }
2549
+ else {
2550
+ return Array.isArray(compareValue) ? compareValue.includes(currentValue) : currentValue === compareValue;
2551
+ }
2552
+ };
2553
+ const generateText = (opts, value, compareWith) => {
2554
+ if (value === undefined) {
2555
+ return '';
2556
+ }
2557
+ if (Array.isArray(value)) {
2558
+ return value
2559
+ .map((v) => textForValue(opts, v, compareWith))
2560
+ .filter((opt) => opt !== null)
2561
+ .join(', ');
2562
+ }
2563
+ else {
2564
+ return textForValue(opts, value, compareWith) || '';
2565
+ }
2566
+ };
2567
+ const textForValue = (opts, value, compareWith) => {
2568
+ const selectOpt = opts.find((opt) => {
2569
+ return compareOptions(getOptionValue(opt), value, compareWith);
2570
+ });
2571
+ return selectOpt ? selectOpt.textContent : null;
2572
+ };
2573
+ let selectIds = 0;
2574
+ const OPTION_CLASS = 'select-interface-option';
2575
+ Select.style = {
2576
+ ios: selectIosCss,
2577
+ md: selectMdCss
2578
+ };
2579
+
2580
+ const selectOptionCss = ":host{display:none}";
2581
+
2582
+ const SelectOption = class {
2583
+ constructor(hostRef) {
2584
+ registerInstance(this, hostRef);
2585
+ this.inputId = `ion-selopt-${selectOptionIds++}`;
2586
+ /**
2587
+ * If `true`, the user cannot interact with the select option. This property does not apply when `interface="action-sheet"` as `ion-action-sheet` does not allow for disabled buttons.
2588
+ */
2589
+ this.disabled = false;
2590
+ }
2591
+ render() {
2592
+ return h(Host, { role: "option", id: this.inputId, class: getIonMode(this) });
2593
+ }
2594
+ get el() { return getElement(this); }
2595
+ };
2596
+ let selectOptionIds = 0;
2597
+ SelectOption.style = selectOptionCss;
2598
+
2599
+ const selectPopoverIosCss = ".sc-ion-select-popover-ios-h ion-list.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-ios,ion-label.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}";
2600
+
2601
+ const selectPopoverMdCss = ".sc-ion-select-popover-md-h ion-list.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-md,ion-label.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md{opacity:0}ion-item.sc-ion-select-popover-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-popover-md{--background:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08);--background-focused:var(--ion-color-primary, #3880ff);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #3880ff);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-popover-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #3880ff)}";
2602
+
2603
+ const SelectPopover = class {
2604
+ constructor(hostRef) {
2605
+ registerInstance(this, hostRef);
2606
+ /**
2607
+ * An array of options for the popover
2608
+ */
2609
+ this.options = [];
2610
+ }
2611
+ onSelect(ev) {
2612
+ this.setChecked(ev);
2613
+ this.callOptionHandler(ev);
2614
+ }
2615
+ findOptionFromEvent(ev) {
2616
+ const { options } = this;
2617
+ return options.find((o) => o.value === ev.target.value);
2618
+ }
2619
+ /**
2620
+ * When an option is selected we need to get the value(s)
2621
+ * of the selected option(s) and return it in the option
2622
+ * handler
2623
+ */
2624
+ callOptionHandler(ev) {
2625
+ const option = this.findOptionFromEvent(ev);
2626
+ const values = this.getValues(ev);
2627
+ if (option === null || option === void 0 ? void 0 : option.handler) {
2628
+ safeCall(option.handler, values);
2629
+ }
2630
+ }
2631
+ /**
2632
+ * This is required when selecting a radio that is already
2633
+ * selected because it will not trigger the ionChange event
2634
+ * but we still want to close the popover
2635
+ */
2636
+ rbClick(ev) {
2637
+ this.callOptionHandler(ev);
2638
+ }
2639
+ setChecked(ev) {
2640
+ const { multiple } = this;
2641
+ const option = this.findOptionFromEvent(ev);
2642
+ // this is a popover with checkboxes (multiple value select)
2643
+ // we need to set the checked value for this option
2644
+ if (multiple && option) {
2645
+ option.checked = ev.detail.checked;
2646
+ }
2647
+ }
2648
+ getValues(ev) {
2649
+ const { multiple, options } = this;
2650
+ if (multiple) {
2651
+ // this is a popover with checkboxes (multiple value select)
2652
+ // return an array of all the checked values
2653
+ return options.filter((o) => o.checked).map((o) => o.value);
2654
+ }
2655
+ // this is a popover with radio buttons (single value select)
2656
+ // return the value that was clicked, otherwise undefined
2657
+ const option = this.findOptionFromEvent(ev);
2658
+ return option ? option.value : undefined;
2659
+ }
2660
+ renderOptions(options) {
2661
+ const { multiple } = this;
2662
+ switch (multiple) {
2663
+ case true:
2664
+ return this.renderCheckboxOptions(options);
2665
+ default:
2666
+ return this.renderRadioOptions(options);
2667
+ }
2668
+ }
2669
+ renderCheckboxOptions(options) {
2670
+ return options.map((option) => (h("ion-item", { class: getClassMap(option.cssClass) }, h("ion-checkbox", { slot: "start", value: option.value, disabled: option.disabled, checked: option.checked }), h("ion-label", null, option.text))));
2671
+ }
2672
+ renderRadioOptions(options) {
2673
+ const checked = options.filter((o) => o.checked).map((o) => o.value)[0];
2674
+ return (h("ion-radio-group", { value: checked }, options.map((option) => (h("ion-item", { class: getClassMap(option.cssClass) }, h("ion-label", null, option.text), h("ion-radio", { value: option.value, disabled: option.disabled, onClick: (ev) => this.rbClick(ev) }))))));
2675
+ }
2676
+ render() {
2677
+ const { header, message, options, subHeader } = this;
2678
+ const hasSubHeaderOrMessage = subHeader !== undefined || message !== undefined;
2679
+ return (h(Host, { class: getIonMode(this) }, h("ion-list", null, header !== undefined && h("ion-list-header", null, header), hasSubHeaderOrMessage && (h("ion-item", null, h("ion-label", { class: "ion-text-wrap" }, subHeader !== undefined && h("h3", null, subHeader), message !== undefined && h("p", null, message)))), this.renderOptions(options))));
2680
+ }
2681
+ };
2682
+ SelectPopover.style = {
2683
+ ios: selectPopoverIosCss,
2684
+ md: selectPopoverMdCss
2685
+ };
2686
+
2687
+ const textareaIosCss = ".sc-ion-textarea-ios-h{--background:initial;--color:initial;--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--border-radius:0;display:block;position:relative;flex:1;width:100%;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);white-space:pre-wrap;z-index:2;box-sizing:border-box}.ion-color.sc-ion-textarea-ios-h{background:initial}.ion-color.sc-ion-textarea-ios-h{color:var(--ion-color-base)}ion-item.sc-ion-textarea-ios-h,ion-item .sc-ion-textarea-ios-h{align-self:baseline}ion-item.sc-ion-textarea-ios-h:not(.item-label),ion-item:not(.item-label) .sc-ion-textarea-ios-h{--padding-start:0}.textarea-wrapper.sc-ion-textarea-ios{display:grid;min-width:inherit;max-width:inherit;min-height:inherit;max-height:inherit}.textarea-wrapper.sc-ion-textarea-ios::after{white-space:pre-wrap;content:attr(data-replicated-value) \" \";visibility:hidden}.native-textarea.sc-ion-textarea-ios,.textarea-wrapper.sc-ion-textarea-ios::after{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;grid-area:1/1/2/2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.native-textarea.sc-ion-textarea-ios,.textarea-wrapper.sc-ion-textarea-ios::after{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-textarea.sc-ion-textarea-ios{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;box-sizing:border-box;resize:none;appearance:none;overflow:hidden}.native-textarea.sc-ion-textarea-ios::placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea[disabled].sc-ion-textarea-ios{opacity:0.4}.cloned-input.sc-ion-textarea-ios{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-textarea-ios .cloned-input.sc-ion-textarea-ios,[dir=rtl].sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios,[dir=rtl] .sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios{left:unset;right:unset;right:0}[auto-grow].sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios{height:100%}.item-label-floating.item-has-placeholder.sc-ion-textarea-ios-h:not(.item-has-value),.item-label-floating.item-has-placeholder:not(.item-has-value) .sc-ion-textarea-ios-h{opacity:0}.item-label-floating.item-has-placeholder.sc-ion-textarea-ios-h:not(.item-has-value).item-has-focus,.item-label-floating.item-has-placeholder:not(.item-has-value).item-has-focus .sc-ion-textarea-ios-h{transition:opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.sc-ion-textarea-ios-h{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:0;font-size:inherit}.item-label-stacked.sc-ion-textarea-ios-h,.item-label-stacked .sc-ion-textarea-ios-h,.item-label-floating.sc-ion-textarea-ios-h,.item-label-floating .sc-ion-textarea-ios-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0px}";
2688
+
2689
+ const textareaMdCss = ".sc-ion-textarea-md-h{--background:initial;--color:initial;--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--border-radius:0;display:block;position:relative;flex:1;width:100%;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);white-space:pre-wrap;z-index:2;box-sizing:border-box}.ion-color.sc-ion-textarea-md-h{background:initial}.ion-color.sc-ion-textarea-md-h{color:var(--ion-color-base)}ion-item.sc-ion-textarea-md-h,ion-item .sc-ion-textarea-md-h{align-self:baseline}ion-item.sc-ion-textarea-md-h:not(.item-label),ion-item:not(.item-label) .sc-ion-textarea-md-h{--padding-start:0}.textarea-wrapper.sc-ion-textarea-md{display:grid;min-width:inherit;max-width:inherit;min-height:inherit;max-height:inherit}.textarea-wrapper.sc-ion-textarea-md::after{white-space:pre-wrap;content:attr(data-replicated-value) \" \";visibility:hidden}.native-textarea.sc-ion-textarea-md,.textarea-wrapper.sc-ion-textarea-md::after{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;grid-area:1/1/2/2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.native-textarea.sc-ion-textarea-md,.textarea-wrapper.sc-ion-textarea-md::after{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-textarea.sc-ion-textarea-md{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;box-sizing:border-box;resize:none;appearance:none;overflow:hidden}.native-textarea.sc-ion-textarea-md::placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea[disabled].sc-ion-textarea-md{opacity:0.4}.cloned-input.sc-ion-textarea-md{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-textarea-md .cloned-input.sc-ion-textarea-md,[dir=rtl].sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md,[dir=rtl] .sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md{left:unset;right:unset;right:0}[auto-grow].sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md{height:100%}.item-label-floating.item-has-placeholder.sc-ion-textarea-md-h:not(.item-has-value),.item-label-floating.item-has-placeholder:not(.item-has-value) .sc-ion-textarea-md-h{opacity:0}.item-label-floating.item-has-placeholder.sc-ion-textarea-md-h:not(.item-has-value).item-has-focus,.item-label-floating.item-has-placeholder:not(.item-has-value).item-has-focus .sc-ion-textarea-md-h{transition:opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.sc-ion-textarea-md-h{--padding-top:10px;--padding-end:0;--padding-bottom:11px;--padding-start:8px;margin-left:0;margin-right:0;margin-top:8px;margin-bottom:0;font-size:inherit}.item-label-stacked.sc-ion-textarea-md-h,.item-label-stacked .sc-ion-textarea-md-h,.item-label-floating.sc-ion-textarea-md-h,.item-label-floating .sc-ion-textarea-md-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0}";
2690
+
2691
+ const Textarea = class {
2692
+ constructor(hostRef) {
2693
+ registerInstance(this, hostRef);
2694
+ this.ionChange = createEvent(this, "ionChange", 7);
2695
+ this.ionInput = createEvent(this, "ionInput", 7);
2696
+ this.ionStyle = createEvent(this, "ionStyle", 7);
2697
+ this.ionBlur = createEvent(this, "ionBlur", 7);
2698
+ this.ionFocus = createEvent(this, "ionFocus", 7);
2699
+ this.inputId = `ion-textarea-${textareaIds++}`;
2700
+ this.didBlurAfterEdit = false;
2701
+ this.inheritedAttributes = {};
2702
+ /**
2703
+ * This is required for a WebKit bug which requires us to
2704
+ * blur and focus an input to properly focus the input in
2705
+ * an item with delegatesFocus. It will no longer be needed
2706
+ * with iOS 14.
2707
+ *
2708
+ * @internal
2709
+ */
2710
+ this.fireFocusEvents = true;
2711
+ this.hasFocus = false;
2712
+ /**
2713
+ * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
2714
+ * Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
2715
+ */
2716
+ this.autocapitalize = 'none';
2717
+ /**
2718
+ * This Boolean attribute lets you specify that a form control should have input focus when the page loads.
2719
+ */
2720
+ this.autofocus = false;
2721
+ /**
2722
+ * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
2723
+ */
2724
+ this.clearOnEdit = false;
2725
+ /**
2726
+ * Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.
2727
+ */
2728
+ this.debounce = 0;
2729
+ /**
2730
+ * If `true`, the user cannot interact with the textarea.
2731
+ */
2732
+ this.disabled = false;
2733
+ /**
2734
+ * The name of the control, which is submitted with the form data.
2735
+ */
2736
+ this.name = this.inputId;
2737
+ /**
2738
+ * If `true`, the user cannot modify the value.
2739
+ */
2740
+ this.readonly = false;
2741
+ /**
2742
+ * If `true`, the user must fill in a value before submitting a form.
2743
+ */
2744
+ this.required = false;
2745
+ /**
2746
+ * If `true`, the element will have its spelling and grammar checked.
2747
+ */
2748
+ this.spellcheck = false;
2749
+ /**
2750
+ * If `true`, the textarea container will grow and shrink based
2751
+ * on the contents of the textarea.
2752
+ */
2753
+ this.autoGrow = false;
2754
+ /**
2755
+ * The value of the textarea.
2756
+ */
2757
+ this.value = '';
2758
+ this.onInput = (ev) => {
2759
+ if (this.nativeInput) {
2760
+ this.value = this.nativeInput.value;
2761
+ }
2762
+ this.emitStyle();
2763
+ this.ionInput.emit(ev);
2764
+ };
2765
+ this.onFocus = (ev) => {
2766
+ this.hasFocus = true;
2767
+ this.focusChange();
2768
+ if (this.fireFocusEvents) {
2769
+ this.ionFocus.emit(ev);
2770
+ }
2771
+ };
2772
+ this.onBlur = (ev) => {
2773
+ this.hasFocus = false;
2774
+ this.focusChange();
2775
+ if (this.fireFocusEvents) {
2776
+ this.ionBlur.emit(ev);
2777
+ }
2778
+ };
2779
+ this.onKeyDown = () => {
2780
+ this.checkClearOnEdit();
2781
+ };
2782
+ }
2783
+ debounceChanged() {
2784
+ this.ionChange = debounceEvent(this.ionChange, this.debounce);
2785
+ }
2786
+ disabledChanged() {
2787
+ this.emitStyle();
2788
+ }
2789
+ /**
2790
+ * Update the native input element when the value changes
2791
+ */
2792
+ valueChanged() {
2793
+ const nativeInput = this.nativeInput;
2794
+ const value = this.getValue();
2795
+ if (nativeInput && nativeInput.value !== value) {
2796
+ nativeInput.value = value;
2797
+ }
2798
+ this.runAutoGrow();
2799
+ this.emitStyle();
2800
+ this.ionChange.emit({ value });
2801
+ }
2802
+ connectedCallback() {
2803
+ this.emitStyle();
2804
+ this.debounceChanged();
2805
+ {
2806
+ document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
2807
+ detail: this.el,
2808
+ }));
2809
+ }
2810
+ }
2811
+ disconnectedCallback() {
2812
+ {
2813
+ document.dispatchEvent(new CustomEvent('ionInputDidUnload', {
2814
+ detail: this.el,
2815
+ }));
2816
+ }
2817
+ }
2818
+ componentWillLoad() {
2819
+ this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['title']));
2820
+ }
2821
+ componentDidLoad() {
2822
+ this.runAutoGrow();
2823
+ }
2824
+ /**
2825
+ * Sets focus on the native `textarea` in `ion-textarea`. Use this method instead of the global
2826
+ * `textarea.focus()`.
2827
+ */
2828
+ async setFocus() {
2829
+ if (this.nativeInput) {
2830
+ this.nativeInput.focus();
2831
+ }
2832
+ }
2833
+ /**
2834
+ * Sets blur on the native `textarea` in `ion-textarea`. Use this method instead of the global
2835
+ * `textarea.blur()`.
2836
+ * @internal
2837
+ */
2838
+ async setBlur() {
2839
+ if (this.nativeInput) {
2840
+ this.nativeInput.blur();
2841
+ }
2842
+ }
2843
+ /**
2844
+ * Returns the native `<textarea>` element used under the hood.
2845
+ */
2846
+ getInputElement() {
2847
+ return Promise.resolve(this.nativeInput);
2848
+ }
2849
+ emitStyle() {
2850
+ this.ionStyle.emit({
2851
+ interactive: true,
2852
+ textarea: true,
2853
+ input: true,
2854
+ 'interactive-disabled': this.disabled,
2855
+ 'has-placeholder': this.placeholder !== undefined,
2856
+ 'has-value': this.hasValue(),
2857
+ 'has-focus': this.hasFocus,
2858
+ });
2859
+ }
2860
+ runAutoGrow() {
2861
+ if (this.nativeInput && this.autoGrow) {
2862
+ writeTask(() => {
2863
+ var _a;
2864
+ if (this.textareaWrapper) {
2865
+ // Replicated value is an attribute to be used in the stylesheet
2866
+ // to set the inner contents of a pseudo element.
2867
+ this.textareaWrapper.dataset.replicatedValue = (_a = this.value) !== null && _a !== void 0 ? _a : '';
2868
+ }
2869
+ });
2870
+ }
2871
+ }
2872
+ /**
2873
+ * Check if we need to clear the text input if clearOnEdit is enabled
2874
+ */
2875
+ checkClearOnEdit() {
2876
+ if (!this.clearOnEdit) {
2877
+ return;
2878
+ }
2879
+ // Did the input value change after it was blurred and edited?
2880
+ if (this.didBlurAfterEdit && this.hasValue()) {
2881
+ // Clear the input
2882
+ this.value = '';
2883
+ }
2884
+ // Reset the flag
2885
+ this.didBlurAfterEdit = false;
2886
+ }
2887
+ focusChange() {
2888
+ // If clearOnEdit is enabled and the input blurred but has a value, set a flag
2889
+ if (this.clearOnEdit && !this.hasFocus && this.hasValue()) {
2890
+ this.didBlurAfterEdit = true;
2891
+ }
2892
+ this.emitStyle();
2893
+ }
2894
+ hasValue() {
2895
+ return this.getValue() !== '';
2896
+ }
2897
+ getValue() {
2898
+ return this.value || '';
2899
+ }
2900
+ render() {
2901
+ const mode = getIonMode(this);
2902
+ const value = this.getValue();
2903
+ const labelId = this.inputId + '-lbl';
2904
+ const label = findItemLabel(this.el);
2905
+ if (label) {
2906
+ label.id = labelId;
2907
+ }
2908
+ return (h(Host, { "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses(this.color, {
2909
+ [mode]: true,
2910
+ }) }, h("div", { class: "textarea-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ class: "native-textarea", "aria-labelledby": label ? labelId : null, ref: (el) => (this.nativeInput = el), autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, disabled: this.disabled, maxLength: this.maxlength, minLength: this.minlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value))));
2911
+ }
2912
+ get el() { return getElement(this); }
2913
+ static get watchers() { return {
2914
+ "debounce": ["debounceChanged"],
2915
+ "disabled": ["disabledChanged"],
2916
+ "value": ["valueChanged"]
2917
+ }; }
2918
+ };
2919
+ let textareaIds = 0;
2920
+ Textarea.style = {
2921
+ ios: textareaIosCss,
2922
+ md: textareaMdCss
2923
+ };
2924
+
2925
+ export { ActionSheet as ion_action_sheet, Alert as ion_alert, Popover as ion_popover, Select as ion_select, SelectOption as ion_select_option, SelectPopover as ion_select_popover, Textarea as ion_textarea };