@ptcwebops/ptcw-design 6.4.18 → 6.4.19

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 (422) hide show
  1. package/dist/cjs/academic-form-test_10.cjs.entry.js +12557 -0
  2. package/dist/cjs/buying-option-cards-slider.cjs.entry.js +4 -0
  3. package/dist/cjs/event-podcast-slider-example.cjs.entry.js +1 -1
  4. package/dist/cjs/featured-events-slider-example.cjs.entry.js +1 -1
  5. package/dist/cjs/homepage-jumbotron.cjs.entry.js +1 -1
  6. package/dist/cjs/icon-asset.cjs.entry.js +65 -0
  7. package/dist/cjs/interfaces-574e6df7.js +15 -0
  8. package/dist/cjs/list-item.cjs.entry.js +52 -0
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/ptc-background-video.cjs.entry.js +152 -0
  11. package/dist/cjs/ptc-breadcrumb.cjs.entry.js +63 -0
  12. package/dist/cjs/ptc-case-studies-slider.cjs.entry.js +1 -1
  13. package/dist/cjs/ptc-icon-card-slider-example.cjs.entry.js +1 -1
  14. package/dist/cjs/ptc-icon-component.cjs.entry.js +1 -1
  15. package/dist/cjs/ptc-img.cjs.entry.js +136 -0
  16. package/dist/cjs/ptc-jumbotron.cjs.entry.js +184 -0
  17. package/dist/cjs/ptc-multi-select.cjs.entry.js +326 -0
  18. package/dist/cjs/ptc-picture.cjs.entry.js +185 -0
  19. package/dist/cjs/ptc-subnav-v2.cjs.entry.js +595 -0
  20. package/dist/cjs/ptc-tooltip.cjs.entry.js +113 -0
  21. package/dist/cjs/ptcw-design.cjs.js +1 -1
  22. package/dist/cjs/storefront-enhanced-product-list-alt-example.cjs.entry.js +1 -1
  23. package/dist/cjs/storefront-enhanced-product-list-example.cjs.entry.js +1 -1
  24. package/dist/collection/components/buying-option-cards-slider/buying-option-cards-slider.js +4 -0
  25. package/dist/collection/components/organism-bundles/event-podcast-slider-example/event-podcast-slider-example.css +16 -11
  26. package/dist/collection/components/organism-bundles/featured-events-slider-example/featured-events-slider-example.css +16 -11
  27. package/dist/collection/components/organism-bundles/homepage-jumbotron/homepage-jumbotron.css +16 -11
  28. package/dist/collection/components/organism-bundles/ptc-icon-card-slider-example/ptc-icon-card-slider-example.css +16 -11
  29. package/dist/collection/components/organism-bundles/storefront-enhanced-product-list-example/storefront-enhanced-product-list-example.css +16 -11
  30. package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.css +16 -11
  31. package/dist/collection/components/ptc-icon-component/ptc-icon-component.css +16 -11
  32. package/dist/collection/components/ptc-seo-title/ptc-seo-title.js +3 -3
  33. package/dist/custom-elements/index.js +11 -7
  34. package/dist/esm/academic-form-test_10.entry.js +12544 -0
  35. package/dist/esm/author-listing-example.entry.js +1 -1
  36. package/dist/esm/blog-detail-content_2.entry.js +2 -2
  37. package/dist/esm/blog-detail-layout.entry.js +2 -2
  38. package/dist/esm/blogs-search-section.entry.js +2 -2
  39. package/dist/esm/bundle-example.entry.js +1 -1
  40. package/dist/esm/bundle-jumbotron-example.entry.js +1 -1
  41. package/dist/esm/buying-option-card.entry.js +1 -1
  42. package/dist/esm/buying-option-cards-slider.entry.js +5 -1
  43. package/dist/esm/dropdown-item.entry.js +1 -1
  44. package/dist/esm/dynamic-box-bundle.entry.js +1 -1
  45. package/dist/esm/embedded-form.entry.js +1 -1
  46. package/dist/esm/event-jumbotron-example.entry.js +1 -1
  47. package/dist/esm/event-podcast-slider-example.entry.js +2 -2
  48. package/dist/esm/featured-events-slider-example.entry.js +2 -2
  49. package/dist/esm/featured-list.entry.js +1 -1
  50. package/dist/esm/fl-tab-content_3.entry.js +1 -1
  51. package/dist/esm/footer-form.entry.js +1 -1
  52. package/dist/esm/homepage-clickable-tab.entry.js +1 -1
  53. package/dist/esm/homepage-jumbotron.entry.js +3 -3
  54. package/dist/esm/homepage-toggled-content.entry.js +2 -2
  55. package/dist/esm/icon-asset.entry.js +61 -0
  56. package/dist/esm/{index-0bf594c4.js → index-c83db688.js} +1 -1
  57. package/dist/esm/innovator-toggle-container.entry.js +2 -2
  58. package/dist/esm/interfaces-4caedd26.js +12 -0
  59. package/dist/esm/jumbotron-sub-menu.entry.js +1 -1
  60. package/dist/esm/jumbotron-sub-mune.entry.js +1 -1
  61. package/dist/esm/list-item.entry.js +48 -0
  62. package/dist/esm/loader.js +3 -3
  63. package/dist/esm/most-popular-news.entry.js +2 -2
  64. package/dist/esm/my-component.entry.js +2 -2
  65. package/dist/esm/news-search-result.entry.js +1 -1
  66. package/dist/esm/ptc-accordion-item.entry.js +2 -2
  67. package/dist/esm/ptc-accordion.entry.js +1 -1
  68. package/dist/esm/ptc-announcement.entry.js +1 -1
  69. package/dist/esm/ptc-back-to-top.entry.js +1 -1
  70. package/dist/esm/ptc-background-video.entry.js +148 -0
  71. package/dist/esm/ptc-badge.entry.js +1 -1
  72. package/dist/esm/ptc-bio-card.entry.js +1 -1
  73. package/dist/esm/ptc-blue-pill-announcement-bar.entry.js +1 -1
  74. package/dist/esm/ptc-breadcrumb.entry.js +59 -0
  75. package/dist/esm/ptc-brightcov-video.entry.js +1 -1
  76. package/dist/esm/ptc-card-bottom_2.entry.js +1 -1
  77. package/dist/esm/ptc-card-content.entry.js +1 -1
  78. package/dist/esm/ptc-card_2.entry.js +1 -1
  79. package/dist/esm/ptc-case-studies-slider.entry.js +2 -2
  80. package/dist/esm/ptc-checkbox-group.entry.js +1 -1
  81. package/dist/esm/ptc-checkbox.entry.js +1 -1
  82. package/dist/esm/ptc-close-icon_2.entry.js +1 -1
  83. package/dist/esm/ptc-collapse-list.entry.js +2 -2
  84. package/dist/esm/ptc-container.entry.js +1 -1
  85. package/dist/esm/ptc-countdown.entry.js +1 -1
  86. package/dist/esm/ptc-date.entry.js +1 -1
  87. package/dist/esm/ptc-dropdown.entry.js +1 -1
  88. package/dist/esm/ptc-dynamic-card.entry.js +1 -1
  89. package/dist/esm/ptc-ellipsis-dropdown.entry.js +1 -1
  90. package/dist/esm/ptc-embedded-quiz.entry.js +1 -1
  91. package/dist/esm/ptc-enhanced-product-listing-card.entry.js +1 -1
  92. package/dist/esm/ptc-featured-list.entry.js +1 -1
  93. package/dist/esm/ptc-filter-dropdown_4.entry.js +1 -1
  94. package/dist/esm/ptc-filter-level-theater.entry.js +1 -1
  95. package/dist/esm/ptc-filter-tag_2.entry.js +1 -1
  96. package/dist/esm/ptc-footer.entry.js +1 -1
  97. package/dist/esm/ptc-form-radio-button.entry.js +1 -1
  98. package/dist/esm/ptc-form-radio-group.entry.js +1 -1
  99. package/dist/esm/ptc-form.entry.js +1 -1
  100. package/dist/esm/ptc-hero-footer-cta.entry.js +1 -1
  101. package/dist/esm/ptc-hero.entry.js +1 -1
  102. package/dist/esm/ptc-homepage-image-feature.entry.js +2 -2
  103. package/dist/esm/ptc-homepage-video-background.entry.js +2 -2
  104. package/dist/esm/ptc-icon-card-slider-example.entry.js +2 -2
  105. package/dist/esm/ptc-icon-card.entry.js +2 -2
  106. package/dist/esm/ptc-icon-component.entry.js +2 -2
  107. package/dist/esm/ptc-icon-list.entry.js +1 -1
  108. package/dist/esm/ptc-icon-minimize.entry.js +1 -1
  109. package/dist/esm/ptc-image-download-strip.entry.js +1 -1
  110. package/dist/esm/ptc-img.entry.js +132 -0
  111. package/dist/esm/ptc-info-tile.entry.js +1 -1
  112. package/dist/esm/ptc-inline-cta.entry.js +1 -1
  113. package/dist/esm/ptc-jumbotron.entry.js +180 -0
  114. package/dist/esm/ptc-link.entry.js +2 -2
  115. package/dist/esm/ptc-list.entry.js +1 -1
  116. package/dist/esm/ptc-media-card.entry.js +2 -2
  117. package/dist/esm/ptc-minimized-nav.entry.js +1 -1
  118. package/dist/esm/ptc-mobile-select.entry.js +1 -1
  119. package/dist/esm/ptc-modal-quiz.entry.js +1 -1
  120. package/dist/esm/ptc-multi-select.entry.js +322 -0
  121. package/dist/esm/ptc-nav-card.entry.js +1 -1
  122. package/dist/esm/ptc-nav-link.entry.js +1 -1
  123. package/dist/esm/ptc-nav-pills.entry.js +1 -1
  124. package/dist/esm/ptc-nav-skip-to-content.entry.js +1 -1
  125. package/dist/esm/ptc-nav-slider.entry.js +1 -1
  126. package/dist/esm/ptc-nav-submenu.entry.js +1 -1
  127. package/dist/esm/ptc-nav-tile.entry.js +1 -1
  128. package/dist/esm/ptc-news.entry.js +1 -1
  129. package/dist/esm/ptc-office-location-card.entry.js +1 -1
  130. package/dist/esm/ptc-office-locations.entry.js +1 -1
  131. package/dist/esm/ptc-overlay.entry.js +1 -1
  132. package/dist/esm/ptc-picture.entry.js +181 -0
  133. package/dist/esm/ptc-podcast-card.entry.js +1 -1
  134. package/dist/esm/ptc-preferance-center-form.entry.js +1 -1
  135. package/dist/esm/ptc-preloader.entry.js +1 -1
  136. package/dist/esm/ptc-previous-url.entry.js +1 -1
  137. package/dist/esm/ptc-pricing-add-on-card.entry.js +1 -1
  138. package/dist/esm/ptc-pricing-add-on-section.entry.js +1 -1
  139. package/dist/esm/ptc-pricing-block.entry.js +1 -1
  140. package/dist/esm/ptc-pricing-packaging-table.entry.js +2 -2
  141. package/dist/esm/ptc-pricing-tabs.entry.js +2 -2
  142. package/dist/esm/ptc-product-card.entry.js +1 -1
  143. package/dist/esm/ptc-product-category.entry.js +1 -1
  144. package/dist/esm/ptc-product-dropdown.entry.js +1 -1
  145. package/dist/esm/ptc-product-highlight-card.entry.js +1 -1
  146. package/dist/esm/ptc-product-list.entry.js +1 -1
  147. package/dist/esm/ptc-product-sidebar.entry.js +1 -1
  148. package/dist/esm/ptc-progress-bar.entry.js +1 -1
  149. package/dist/esm/ptc-quantity-counter.entry.js +1 -1
  150. package/dist/esm/ptc-quote.entry.js +1 -1
  151. package/dist/esm/ptc-readmore-char.entry.js +1 -1
  152. package/dist/esm/ptc-readmore-new.entry.js +1 -1
  153. package/dist/esm/ptc-readmore-v3.entry.js +1 -1
  154. package/dist/esm/ptc-readmore.entry.js +1 -1
  155. package/dist/esm/ptc-related-card-rail.entry.js +1 -1
  156. package/dist/esm/ptc-responsive-wrapper.entry.js +1 -1
  157. package/dist/esm/ptc-scroll-button.entry.js +1 -1
  158. package/dist/esm/ptc-search-field.entry.js +1 -1
  159. package/dist/esm/ptc-seo-title.entry.js +1 -1
  160. package/dist/esm/ptc-shopping-cart.entry.js +1 -1
  161. package/dist/esm/ptc-showcase-card.entry.js +1 -1
  162. package/dist/esm/ptc-skeleton.entry.js +1 -1
  163. package/dist/esm/ptc-slit-card.entry.js +1 -1
  164. package/dist/esm/ptc-social-icons-footer.entry.js +2 -2
  165. package/dist/esm/ptc-social-icons.entry.js +1 -1
  166. package/dist/esm/ptc-span.entry.js +1 -1
  167. package/dist/esm/ptc-square-card.entry.js +1 -1
  168. package/dist/esm/ptc-sticky-icons.entry.js +1 -1
  169. package/dist/esm/ptc-sticky-section.entry.js +1 -1
  170. package/dist/esm/ptc-sticky-title.entry.js +1 -1
  171. package/dist/esm/ptc-store-card-list.entry.js +1 -1
  172. package/dist/esm/ptc-store-card.entry.js +1 -1
  173. package/dist/esm/ptc-subnav-card.entry.js +1 -1
  174. package/dist/esm/ptc-subnav-v2.entry.js +591 -0
  175. package/dist/esm/ptc-subnav.entry.js +1 -1
  176. package/dist/esm/ptc-svg-btn.entry.js +1 -1
  177. package/dist/esm/ptc-tab-list.entry.js +1 -1
  178. package/dist/esm/ptc-tab.entry.js +1 -1
  179. package/dist/esm/ptc-tabs.entry.js +1 -1
  180. package/dist/esm/ptc-text-copy-with-background.entry.js +1 -1
  181. package/dist/esm/ptc-theater-video-modal.entry.js +1 -1
  182. package/dist/esm/ptc-tooltip-v2.entry.js +1 -1
  183. package/dist/esm/ptc-tooltip-v3.entry.js +1 -1
  184. package/dist/esm/ptc-tooltip.entry.js +109 -0
  185. package/dist/esm/ptc-two-column-media.entry.js +1 -1
  186. package/dist/esm/ptc-value-led-card.entry.js +1 -1
  187. package/dist/esm/ptc-value-led-content-highlight.entry.js +1 -1
  188. package/dist/esm/ptc-value-led-content.entry.js +1 -1
  189. package/dist/esm/ptc-value-led-intro.entry.js +1 -1
  190. package/dist/esm/ptc-value-led-layout.entry.js +1 -1
  191. package/dist/esm/ptc-value-led-speed-bump.entry.js +1 -1
  192. package/dist/esm/ptc-value-prop-card.entry.js +1 -1
  193. package/dist/esm/ptc-video-embed.entry.js +1 -1
  194. package/dist/esm/ptc-white-paper.entry.js +1 -1
  195. package/dist/esm/ptcw-design.js +3 -3
  196. package/dist/esm/sequential-bundle-example.entry.js +1 -1
  197. package/dist/esm/sequential-bundle.entry.js +1 -1
  198. package/dist/esm/storefront-enhanced-product-list-alt-example.entry.js +2 -2
  199. package/dist/esm/storefront-enhanced-product-list-example.entry.js +2 -2
  200. package/dist/esm/tab-content.entry.js +1 -1
  201. package/dist/esm/tab-header.entry.js +1 -1
  202. package/dist/esm/{utils-a64ba942.js → utils-d14265f5.js} +1 -1
  203. package/dist/ptcw-design/{p-ad4f4f33.entry.js → p-00e21489.entry.js} +1 -1
  204. package/dist/ptcw-design/{p-17890eea.entry.js → p-04223295.entry.js} +1 -1
  205. package/dist/ptcw-design/{p-74a845fd.entry.js → p-04aae3f5.entry.js} +1 -1
  206. package/dist/ptcw-design/{p-c9a73ad1.entry.js → p-04f0b1ba.entry.js} +1 -1
  207. package/dist/ptcw-design/p-08f607e5.entry.js +1 -0
  208. package/dist/ptcw-design/p-0a86d91a.entry.js +1 -0
  209. package/dist/ptcw-design/{p-e8b51e7d.entry.js → p-0a9ee6c2.entry.js} +1 -1
  210. package/dist/ptcw-design/p-0b146b4b.entry.js +1 -0
  211. package/dist/ptcw-design/{p-c80265d9.entry.js → p-0c914932.entry.js} +1 -1
  212. package/dist/ptcw-design/{p-f004e5de.entry.js → p-0ddf2a09.entry.js} +1 -1
  213. package/dist/ptcw-design/{p-f9e57052.entry.js → p-136c990d.entry.js} +1 -1
  214. package/dist/ptcw-design/{p-36d6e662.entry.js → p-13e338a5.entry.js} +1 -1
  215. package/dist/ptcw-design/{p-8cdcfb51.entry.js → p-15e36f30.entry.js} +1 -1
  216. package/dist/ptcw-design/{p-f418ef26.entry.js → p-18d699f0.entry.js} +1 -1
  217. package/dist/ptcw-design/p-1a853854.entry.js +1 -0
  218. package/dist/ptcw-design/{p-908ad455.entry.js → p-1c63c812.entry.js} +1 -1
  219. package/dist/ptcw-design/{p-8482f517.entry.js → p-1cb02c28.entry.js} +1 -1
  220. package/dist/ptcw-design/{p-9a07b9e3.entry.js → p-1e1ed5df.entry.js} +1 -1
  221. package/dist/ptcw-design/{p-752159e2.entry.js → p-1f356fcf.entry.js} +1 -1
  222. package/dist/ptcw-design/{p-2fd01953.entry.js → p-21fa5abe.entry.js} +1 -1
  223. package/dist/ptcw-design/{p-c9762c88.entry.js → p-23cb5b5b.entry.js} +1 -1
  224. package/dist/ptcw-design/p-243075b7.entry.js +1 -0
  225. package/dist/ptcw-design/{p-a22d7ae8.entry.js → p-257a68df.entry.js} +1 -1
  226. package/dist/ptcw-design/p-264cd2d3.entry.js +1 -0
  227. package/dist/ptcw-design/p-27e39236.entry.js +1 -0
  228. package/dist/ptcw-design/{p-14c77b5e.entry.js → p-27e47c25.entry.js} +1 -1
  229. package/dist/ptcw-design/{p-f20e4230.entry.js → p-2a22123e.entry.js} +1 -1
  230. package/dist/ptcw-design/{p-f4ae5a99.entry.js → p-2b08a37d.entry.js} +1 -1
  231. package/dist/ptcw-design/{p-315b7885.entry.js → p-2c287230.entry.js} +1 -1
  232. package/dist/ptcw-design/{p-54891548.entry.js → p-2c2f895a.entry.js} +1 -1
  233. package/dist/ptcw-design/p-37f92bb4.entry.js +1 -0
  234. package/dist/ptcw-design/{p-a2710bbf.entry.js → p-3872fce7.entry.js} +1 -1
  235. package/dist/ptcw-design/{p-9050ab76.entry.js → p-3a034cd1.entry.js} +1 -1
  236. package/dist/ptcw-design/p-3a24991d.entry.js +1 -0
  237. package/dist/ptcw-design/p-3ddb6c50.entry.js +1 -0
  238. package/dist/ptcw-design/{p-3c941935.entry.js → p-3e4861a2.entry.js} +1 -1
  239. package/dist/ptcw-design/p-3eccbe24.entry.js +1 -0
  240. package/dist/ptcw-design/p-3ed4a7ed.entry.js +1 -0
  241. package/dist/ptcw-design/{p-3596ce5a.entry.js → p-44eac15a.entry.js} +1 -1
  242. package/dist/ptcw-design/{p-83632220.entry.js → p-45623f8a.entry.js} +1 -1
  243. package/dist/ptcw-design/{p-1e9f25fc.entry.js → p-46f67bec.entry.js} +1 -1
  244. package/dist/ptcw-design/p-4ab3249d.entry.js +1 -0
  245. package/dist/ptcw-design/{p-e2da8109.entry.js → p-4c2ffab9.entry.js} +1 -1
  246. package/dist/ptcw-design/{p-efe8563a.entry.js → p-4d14b3b7.entry.js} +1 -1
  247. package/dist/ptcw-design/{p-a1dc7ae5.entry.js → p-4f3dea53.entry.js} +1 -1
  248. package/dist/ptcw-design/{p-ed5a467e.entry.js → p-4f4f97a6.entry.js} +1 -1
  249. package/dist/ptcw-design/{p-91e5c8d4.entry.js → p-506dac1f.entry.js} +1 -1
  250. package/dist/ptcw-design/{p-9e8e2835.entry.js → p-523141fd.entry.js} +1 -1
  251. package/dist/ptcw-design/{p-bca81995.entry.js → p-560b05a5.entry.js} +1 -1
  252. package/dist/ptcw-design/p-567535fb.entry.js +1 -0
  253. package/dist/ptcw-design/{p-a31f22a1.entry.js → p-571d9690.entry.js} +1 -1
  254. package/dist/ptcw-design/{p-c8de7309.entry.js → p-575861b3.entry.js} +1 -1
  255. package/dist/ptcw-design/{p-ec395ae9.entry.js → p-5877f093.entry.js} +1 -1
  256. package/dist/ptcw-design/{p-07b46e6e.entry.js → p-58909b95.entry.js} +1 -1
  257. package/dist/ptcw-design/{p-cab0274c.entry.js → p-5946d7c9.entry.js} +1 -1
  258. package/dist/ptcw-design/{p-807ad5c4.entry.js → p-5980d65d.entry.js} +1 -1
  259. package/dist/ptcw-design/{p-7c6d6a5e.entry.js → p-5dd538c4.entry.js} +1 -1
  260. package/dist/ptcw-design/p-5e4c1edf.entry.js +1 -0
  261. package/dist/ptcw-design/{p-5fb671ee.entry.js → p-61d28206.entry.js} +1 -1
  262. package/dist/ptcw-design/{p-9220308d.entry.js → p-62c56201.entry.js} +1 -1
  263. package/dist/ptcw-design/p-62dcdd28.entry.js +1 -0
  264. package/dist/ptcw-design/{p-3e13f29c.entry.js → p-66ecd7b9.entry.js} +1 -1
  265. package/dist/ptcw-design/p-6a561487.entry.js +1 -0
  266. package/dist/ptcw-design/{p-575c7fc0.entry.js → p-6aa9ed95.entry.js} +1 -1
  267. package/dist/ptcw-design/p-6abc061b.entry.js +1 -0
  268. package/dist/ptcw-design/{p-32a1c28b.entry.js → p-6d27b5a2.entry.js} +1 -1
  269. package/dist/ptcw-design/p-711bcdad.js +1 -0
  270. package/dist/ptcw-design/{p-c9c55caf.entry.js → p-73fd95da.entry.js} +1 -1
  271. package/dist/ptcw-design/{p-522cb451.entry.js → p-757954b2.entry.js} +1 -1
  272. package/dist/ptcw-design/p-761a31f8.entry.js +1 -0
  273. package/dist/ptcw-design/{p-3e13b735.entry.js → p-76d98c5a.entry.js} +1 -1
  274. package/dist/ptcw-design/{p-2fdd81d4.entry.js → p-7714bbaf.entry.js} +1 -1
  275. package/dist/ptcw-design/{p-af32c90a.entry.js → p-784cae5c.entry.js} +1 -1
  276. package/dist/ptcw-design/{p-ecfc8211.entry.js → p-7a1db471.entry.js} +1 -1
  277. package/dist/ptcw-design/{p-183ba1ca.entry.js → p-7d29a418.entry.js} +1 -1
  278. package/dist/ptcw-design/p-7da19c78.entry.js +1 -0
  279. package/dist/ptcw-design/{p-2fa5814b.entry.js → p-7f4919b7.entry.js} +1 -1
  280. package/dist/ptcw-design/p-80c69354.entry.js +1 -0
  281. package/dist/ptcw-design/{p-a974f98f.entry.js → p-8191928d.entry.js} +1 -1
  282. package/dist/ptcw-design/{p-c1302aea.entry.js → p-8340bed4.entry.js} +1 -1
  283. package/dist/ptcw-design/{p-ff369ed7.entry.js → p-84c15835.entry.js} +1 -1
  284. package/dist/ptcw-design/{p-3c52fabe.entry.js → p-8533988f.entry.js} +1 -1
  285. package/dist/ptcw-design/{p-1ab6201b.entry.js → p-85f32bf5.entry.js} +1 -1
  286. package/dist/ptcw-design/{p-ce39cff2.entry.js → p-88d1894d.entry.js} +1 -1
  287. package/dist/ptcw-design/{p-bf2f9183.entry.js → p-89ba3dfd.entry.js} +1 -1
  288. package/dist/ptcw-design/{p-e2e357e7.entry.js → p-8d4572f7.entry.js} +1 -1
  289. package/dist/ptcw-design/{p-cf0f6559.entry.js → p-927373d4.entry.js} +1 -1
  290. package/dist/ptcw-design/{p-e1bd2c43.entry.js → p-92e76318.entry.js} +1 -1
  291. package/dist/ptcw-design/{p-80c56c81.entry.js → p-931650bb.entry.js} +1 -1
  292. package/dist/ptcw-design/{p-2ba77e9d.entry.js → p-9354b7fd.entry.js} +1 -1
  293. package/dist/ptcw-design/{p-3b481342.entry.js → p-9493dfa0.entry.js} +1 -1
  294. package/dist/ptcw-design/p-97eb1025.entry.js +1 -0
  295. package/dist/ptcw-design/{p-ce125ef2.entry.js → p-98610430.entry.js} +1 -1
  296. package/dist/ptcw-design/p-99daf693.entry.js +1 -0
  297. package/dist/ptcw-design/{p-8eb36507.entry.js → p-9a335b5b.entry.js} +1 -1
  298. package/dist/ptcw-design/{p-0abb6e77.entry.js → p-9ac99185.entry.js} +1 -1
  299. package/dist/ptcw-design/{p-290012e3.entry.js → p-9b26ea67.entry.js} +1 -1
  300. package/dist/ptcw-design/{p-6d628113.entry.js → p-9de963f8.entry.js} +1 -1
  301. package/dist/ptcw-design/{p-6251a6d6.entry.js → p-9e4e21a4.entry.js} +1 -1
  302. package/dist/ptcw-design/p-9efa8199.entry.js +1 -0
  303. package/dist/ptcw-design/{p-5877ab67.entry.js → p-9fc6a83d.entry.js} +1 -1
  304. package/dist/ptcw-design/{p-afb5bdb9.entry.js → p-a04bedc2.entry.js} +1 -1
  305. package/dist/ptcw-design/{p-dadbab48.entry.js → p-a0bf3dd2.entry.js} +1 -1
  306. package/dist/ptcw-design/p-a264f646.entry.js +1 -0
  307. package/dist/ptcw-design/{p-e2e33ddb.entry.js → p-a37c5209.entry.js} +1 -1
  308. package/dist/ptcw-design/{p-b6cc4c2a.entry.js → p-a41c7e39.entry.js} +1 -1
  309. package/dist/ptcw-design/{p-dabb1b70.entry.js → p-a54c6da5.entry.js} +1 -1
  310. package/dist/ptcw-design/{p-6f29592a.entry.js → p-a5efeb04.entry.js} +1 -1
  311. package/dist/ptcw-design/{p-991465fb.entry.js → p-a79f33df.entry.js} +1 -1
  312. package/dist/ptcw-design/{p-7123abad.entry.js → p-a7a41de8.entry.js} +1 -1
  313. package/dist/ptcw-design/{p-be00fb74.entry.js → p-a7cb3851.entry.js} +1 -1
  314. package/dist/ptcw-design/{p-ed53cb3a.entry.js → p-a8304a3e.entry.js} +1 -1
  315. package/dist/ptcw-design/{p-de663192.entry.js → p-a8504f11.entry.js} +1 -1
  316. package/dist/ptcw-design/{p-11e86045.entry.js → p-a9533f9c.entry.js} +1 -1
  317. package/dist/ptcw-design/{p-e50a5a46.entry.js → p-a993c0a6.entry.js} +1 -1
  318. package/dist/ptcw-design/{p-c5417010.entry.js → p-aac082cf.entry.js} +1 -1
  319. package/dist/ptcw-design/{p-87f07d6b.entry.js → p-aadf9416.entry.js} +1 -1
  320. package/dist/ptcw-design/{p-6f1cc5e5.entry.js → p-ab4906a7.entry.js} +1 -1
  321. package/dist/ptcw-design/{p-944c5be8.js → p-ac75c7ad.js} +1 -1
  322. package/dist/ptcw-design/p-ac766cb3.entry.js +1 -0
  323. package/dist/ptcw-design/{p-e249cd90.entry.js → p-ac7b2779.entry.js} +1 -1
  324. package/dist/ptcw-design/{p-b293a0b1.entry.js → p-aea09a70.entry.js} +1 -1
  325. package/dist/ptcw-design/p-af9912b6.entry.js +1 -0
  326. package/dist/ptcw-design/p-afc1e1e9.entry.js +1 -0
  327. package/dist/ptcw-design/{p-b82dd7f9.entry.js → p-b19cda95.entry.js} +1 -1
  328. package/dist/ptcw-design/{p-79762cf6.entry.js → p-b436f56d.entry.js} +1 -1
  329. package/dist/ptcw-design/{p-ca039722.entry.js → p-baeee2b4.entry.js} +1 -1
  330. package/dist/ptcw-design/p-bb9a879f.entry.js +1 -0
  331. package/dist/ptcw-design/{p-73293d32.entry.js → p-bf84ecc0.entry.js} +1 -1
  332. package/dist/ptcw-design/{p-9a28ded2.entry.js → p-bfacfe67.entry.js} +1 -1
  333. package/dist/ptcw-design/{p-fb0c3eeb.entry.js → p-c061b32d.entry.js} +1 -1
  334. package/dist/ptcw-design/{p-5344a1f4.entry.js → p-c4674bc8.entry.js} +1 -1
  335. package/dist/ptcw-design/{p-dd38bf84.entry.js → p-c5f42895.entry.js} +1 -1
  336. package/dist/ptcw-design/{p-61a5012d.entry.js → p-c631608f.entry.js} +1 -1
  337. package/dist/ptcw-design/{p-e87a4ff8.entry.js → p-c68d31c6.entry.js} +1 -1
  338. package/dist/ptcw-design/{p-43756439.entry.js → p-c6a0dd99.entry.js} +1 -1
  339. package/dist/ptcw-design/p-c89030e4.entry.js +1 -0
  340. package/dist/ptcw-design/p-cbbe2bba.entry.js +1 -0
  341. package/dist/ptcw-design/{p-384548ef.entry.js → p-cc652ebe.entry.js} +1 -1
  342. package/dist/ptcw-design/{p-fa045097.entry.js → p-cc92b9ed.entry.js} +1 -1
  343. package/dist/ptcw-design/p-d6ee094b.entry.js +1 -0
  344. package/dist/ptcw-design/{p-75d8b6ec.entry.js → p-d74ccb19.entry.js} +1 -1
  345. package/dist/ptcw-design/{p-81736d6a.entry.js → p-d77531c8.entry.js} +1 -1
  346. package/dist/ptcw-design/p-d8575311.entry.js +1 -0
  347. package/dist/ptcw-design/{p-f5665cfe.entry.js → p-d8b2466d.entry.js} +1 -1
  348. package/dist/ptcw-design/{p-e880b556.entry.js → p-db0fc94d.entry.js} +1 -1
  349. package/dist/ptcw-design/p-e01173ca.entry.js +1 -0
  350. package/dist/ptcw-design/{p-7524411a.entry.js → p-e0d95058.entry.js} +1 -1
  351. package/dist/ptcw-design/p-e0e87d61.entry.js +1 -0
  352. package/dist/ptcw-design/{p-0bb3ea9a.entry.js → p-e235bf27.entry.js} +1 -1
  353. package/dist/ptcw-design/{p-53d2547b.entry.js → p-e3867512.entry.js} +1 -1
  354. package/dist/ptcw-design/{p-d1f57070.entry.js → p-e3bf092e.entry.js} +1 -1
  355. package/dist/ptcw-design/p-e4fe0995.entry.js +1 -0
  356. package/dist/ptcw-design/p-e7220c36.entry.js +1 -0
  357. package/dist/ptcw-design/{p-b1053240.entry.js → p-e73a1a0b.entry.js} +1 -1
  358. package/dist/ptcw-design/{p-b9966f20.entry.js → p-e9684da3.entry.js} +1 -1
  359. package/dist/ptcw-design/p-eb193fd7.entry.js +404 -0
  360. package/dist/ptcw-design/{p-fe56e336.entry.js → p-ee91170c.entry.js} +1 -1
  361. package/dist/ptcw-design/{p-681d26ef.entry.js → p-eeaa2123.entry.js} +1 -1
  362. package/dist/ptcw-design/{p-f2006b03.entry.js → p-f5c97ab2.entry.js} +1 -1
  363. package/dist/ptcw-design/{p-d6271974.entry.js → p-f5d8a3b1.entry.js} +1 -1
  364. package/dist/ptcw-design/{p-fab2fc8d.entry.js → p-fb835c5a.entry.js} +1 -1
  365. package/dist/ptcw-design/{p-0ed4609e.entry.js → p-fb8584e4.entry.js} +1 -1
  366. package/dist/ptcw-design/{p-973c69d8.entry.js → p-fbd9c8fc.entry.js} +1 -1
  367. package/dist/ptcw-design/p-fd7e5935.entry.js +1 -0
  368. package/dist/ptcw-design/{p-e6ebc832.entry.js → p-fdee2cdc.entry.js} +1 -1
  369. package/dist/ptcw-design/{p-22cf00e7.js → p-fe497e4a.js} +1 -1
  370. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  371. package/dist/types/components.d.ts +62 -62
  372. package/package.json +1 -1
  373. package/readme.md +1 -1
  374. package/dist/cjs/academic-form-test.cjs.entry.js +0 -82
  375. package/dist/cjs/component-06dda623.js +0 -4665
  376. package/dist/cjs/component-5b5b6a98.js +0 -1819
  377. package/dist/cjs/icon-asset_14.cjs.entry.js +0 -1982
  378. package/dist/cjs/ptc-data-lookup.cjs.entry.js +0 -675
  379. package/dist/cjs/ptc-form-checkbox_2.cjs.entry.js +0 -4476
  380. package/dist/cjs/ptc-multi-select_2.cjs.entry.js +0 -730
  381. package/dist/esm/academic-form-test.entry.js +0 -78
  382. package/dist/esm/component-274da230.js +0 -4663
  383. package/dist/esm/component-341e4eaa.js +0 -1802
  384. package/dist/esm/icon-asset_14.entry.js +0 -1965
  385. package/dist/esm/ptc-data-lookup.entry.js +0 -671
  386. package/dist/esm/ptc-form-checkbox_2.entry.js +0 -4471
  387. package/dist/esm/ptc-multi-select_2.entry.js +0 -725
  388. package/dist/ptcw-design/p-068b64a1.entry.js +0 -1
  389. package/dist/ptcw-design/p-0824f503.entry.js +0 -1
  390. package/dist/ptcw-design/p-0ec2a26d.entry.js +0 -1
  391. package/dist/ptcw-design/p-1b3394a7.entry.js +0 -1
  392. package/dist/ptcw-design/p-212cdacd.entry.js +0 -1
  393. package/dist/ptcw-design/p-2bc4bf65.entry.js +0 -1
  394. package/dist/ptcw-design/p-2f82de8f.entry.js +0 -1
  395. package/dist/ptcw-design/p-32bbcb5a.entry.js +0 -1
  396. package/dist/ptcw-design/p-39255f59.entry.js +0 -1
  397. package/dist/ptcw-design/p-47aa1583.entry.js +0 -1
  398. package/dist/ptcw-design/p-53e214a6.entry.js +0 -1
  399. package/dist/ptcw-design/p-5bbfd7b3.entry.js +0 -1
  400. package/dist/ptcw-design/p-7815e38b.entry.js +0 -1
  401. package/dist/ptcw-design/p-79a6e764.entry.js +0 -1
  402. package/dist/ptcw-design/p-7b89a8e1.entry.js +0 -1
  403. package/dist/ptcw-design/p-83c3d6c9.entry.js +0 -1
  404. package/dist/ptcw-design/p-87a9a028.entry.js +0 -1
  405. package/dist/ptcw-design/p-87e4c337.entry.js +0 -1
  406. package/dist/ptcw-design/p-89da867f.entry.js +0 -1
  407. package/dist/ptcw-design/p-9461c4eb.entry.js +0 -1
  408. package/dist/ptcw-design/p-973b06d1.entry.js +0 -1
  409. package/dist/ptcw-design/p-9d8a9a72.entry.js +0 -1
  410. package/dist/ptcw-design/p-bdb2e42c.entry.js +0 -1
  411. package/dist/ptcw-design/p-be533f0d.js +0 -134
  412. package/dist/ptcw-design/p-bf15988f.entry.js +0 -68
  413. package/dist/ptcw-design/p-c1513c3f.js +0 -203
  414. package/dist/ptcw-design/p-c33fd408.entry.js +0 -1
  415. package/dist/ptcw-design/p-c389eb7d.entry.js +0 -1
  416. package/dist/ptcw-design/p-d428ba40.entry.js +0 -1
  417. package/dist/ptcw-design/p-d8c1a14a.entry.js +0 -1
  418. package/dist/ptcw-design/p-e1373325.entry.js +0 -1
  419. package/dist/ptcw-design/p-e51bb274.entry.js +0 -1
  420. package/dist/ptcw-design/p-eabf87be.entry.js +0 -1
  421. package/dist/ptcw-design/p-edaf241d.entry.js +0 -1
  422. package/dist/ptcw-design/p-fef688c2.entry.js +0 -1
@@ -1,4471 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-0bf594c4.js';
2
- import { V as ValidationMessages } from './validation-messages-1379b825.js';
3
- import { k as getLanguageFromURL } from './utils-a64ba942.js';
4
- import { _ as __extends, a as __assign, M as MDCFoundation, n as getCorrectEventName, h as MDCRipple, o as applyPassive, m as matches, i as MDCRippleFoundation, f as __values, e as MDCComponent, k as MDCLineRipple, j as MDCFloatingLabel, l as MDCNotchedOutline } from './component-341e4eaa.js';
5
- import { c as createCommonjsModule } from './_commonjsHelpers-9943807e.js';
6
-
7
- /**
8
- * @license
9
- * Copyright 2016 Google Inc.
10
- *
11
- * Permission is hereby granted, free of charge, to any person obtaining a copy
12
- * of this software and associated documentation files (the "Software"), to deal
13
- * in the Software without restriction, including without limitation the rights
14
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- * copies of the Software, and to permit persons to whom the Software is
16
- * furnished to do so, subject to the following conditions:
17
- *
18
- * The above copyright notice and this permission notice shall be included in
19
- * all copies or substantial portions of the Software.
20
- *
21
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
- * THE SOFTWARE.
28
- */
29
- var cssClasses$5 = {
30
- ANIM_CHECKED_INDETERMINATE: 'mdc-checkbox--anim-checked-indeterminate',
31
- ANIM_CHECKED_UNCHECKED: 'mdc-checkbox--anim-checked-unchecked',
32
- ANIM_INDETERMINATE_CHECKED: 'mdc-checkbox--anim-indeterminate-checked',
33
- ANIM_INDETERMINATE_UNCHECKED: 'mdc-checkbox--anim-indeterminate-unchecked',
34
- ANIM_UNCHECKED_CHECKED: 'mdc-checkbox--anim-unchecked-checked',
35
- ANIM_UNCHECKED_INDETERMINATE: 'mdc-checkbox--anim-unchecked-indeterminate',
36
- BACKGROUND: 'mdc-checkbox__background',
37
- CHECKED: 'mdc-checkbox--checked',
38
- CHECKMARK: 'mdc-checkbox__checkmark',
39
- CHECKMARK_PATH: 'mdc-checkbox__checkmark-path',
40
- DISABLED: 'mdc-checkbox--disabled',
41
- INDETERMINATE: 'mdc-checkbox--indeterminate',
42
- MIXEDMARK: 'mdc-checkbox__mixedmark',
43
- NATIVE_CONTROL: 'mdc-checkbox__native-control',
44
- ROOT: 'mdc-checkbox',
45
- SELECTED: 'mdc-checkbox--selected',
46
- UPGRADED: 'mdc-checkbox--upgraded',
47
- };
48
- var strings$5 = {
49
- ARIA_CHECKED_ATTR: 'aria-checked',
50
- ARIA_CHECKED_INDETERMINATE_VALUE: 'mixed',
51
- DATA_INDETERMINATE_ATTR: 'data-indeterminate',
52
- NATIVE_CONTROL_SELECTOR: '.mdc-checkbox__native-control',
53
- TRANSITION_STATE_CHECKED: 'checked',
54
- TRANSITION_STATE_INDETERMINATE: 'indeterminate',
55
- TRANSITION_STATE_INIT: 'init',
56
- TRANSITION_STATE_UNCHECKED: 'unchecked',
57
- };
58
- var numbers$1 = {
59
- ANIM_END_LATCH_MS: 250,
60
- };
61
-
62
- /**
63
- * @license
64
- * Copyright 2016 Google Inc.
65
- *
66
- * Permission is hereby granted, free of charge, to any person obtaining a copy
67
- * of this software and associated documentation files (the "Software"), to deal
68
- * in the Software without restriction, including without limitation the rights
69
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
70
- * copies of the Software, and to permit persons to whom the Software is
71
- * furnished to do so, subject to the following conditions:
72
- *
73
- * The above copyright notice and this permission notice shall be included in
74
- * all copies or substantial portions of the Software.
75
- *
76
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
77
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
78
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
79
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
80
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
81
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
82
- * THE SOFTWARE.
83
- */
84
- var MDCCheckboxFoundation = /** @class */ (function (_super) {
85
- __extends(MDCCheckboxFoundation, _super);
86
- function MDCCheckboxFoundation(adapter) {
87
- var _this = _super.call(this, __assign(__assign({}, MDCCheckboxFoundation.defaultAdapter), adapter)) || this;
88
- _this.currentCheckState = strings$5.TRANSITION_STATE_INIT;
89
- _this.currentAnimationClass = '';
90
- _this.animEndLatchTimer = 0;
91
- _this.enableAnimationEndHandler = false;
92
- return _this;
93
- }
94
- Object.defineProperty(MDCCheckboxFoundation, "cssClasses", {
95
- get: function () {
96
- return cssClasses$5;
97
- },
98
- enumerable: false,
99
- configurable: true
100
- });
101
- Object.defineProperty(MDCCheckboxFoundation, "strings", {
102
- get: function () {
103
- return strings$5;
104
- },
105
- enumerable: false,
106
- configurable: true
107
- });
108
- Object.defineProperty(MDCCheckboxFoundation, "numbers", {
109
- get: function () {
110
- return numbers$1;
111
- },
112
- enumerable: false,
113
- configurable: true
114
- });
115
- Object.defineProperty(MDCCheckboxFoundation, "defaultAdapter", {
116
- get: function () {
117
- return {
118
- addClass: function () { return undefined; },
119
- forceLayout: function () { return undefined; },
120
- hasNativeControl: function () { return false; },
121
- isAttachedToDOM: function () { return false; },
122
- isChecked: function () { return false; },
123
- isIndeterminate: function () { return false; },
124
- removeClass: function () { return undefined; },
125
- removeNativeControlAttr: function () { return undefined; },
126
- setNativeControlAttr: function () { return undefined; },
127
- setNativeControlDisabled: function () { return undefined; },
128
- };
129
- },
130
- enumerable: false,
131
- configurable: true
132
- });
133
- MDCCheckboxFoundation.prototype.init = function () {
134
- this.currentCheckState = this.determineCheckState();
135
- this.updateAriaChecked();
136
- this.adapter.addClass(cssClasses$5.UPGRADED);
137
- };
138
- MDCCheckboxFoundation.prototype.destroy = function () {
139
- clearTimeout(this.animEndLatchTimer);
140
- };
141
- MDCCheckboxFoundation.prototype.setDisabled = function (disabled) {
142
- this.adapter.setNativeControlDisabled(disabled);
143
- if (disabled) {
144
- this.adapter.addClass(cssClasses$5.DISABLED);
145
- }
146
- else {
147
- this.adapter.removeClass(cssClasses$5.DISABLED);
148
- }
149
- };
150
- /**
151
- * Handles the animationend event for the checkbox
152
- */
153
- MDCCheckboxFoundation.prototype.handleAnimationEnd = function () {
154
- var _this = this;
155
- if (!this.enableAnimationEndHandler) {
156
- return;
157
- }
158
- clearTimeout(this.animEndLatchTimer);
159
- this.animEndLatchTimer = setTimeout(function () {
160
- _this.adapter.removeClass(_this.currentAnimationClass);
161
- _this.enableAnimationEndHandler = false;
162
- }, numbers$1.ANIM_END_LATCH_MS);
163
- };
164
- /**
165
- * Handles the change event for the checkbox
166
- */
167
- MDCCheckboxFoundation.prototype.handleChange = function () {
168
- this.transitionCheckState();
169
- };
170
- MDCCheckboxFoundation.prototype.transitionCheckState = function () {
171
- if (!this.adapter.hasNativeControl()) {
172
- return;
173
- }
174
- var oldState = this.currentCheckState;
175
- var newState = this.determineCheckState();
176
- if (oldState === newState) {
177
- return;
178
- }
179
- this.updateAriaChecked();
180
- var TRANSITION_STATE_UNCHECKED = strings$5.TRANSITION_STATE_UNCHECKED;
181
- var SELECTED = cssClasses$5.SELECTED;
182
- if (newState === TRANSITION_STATE_UNCHECKED) {
183
- this.adapter.removeClass(SELECTED);
184
- }
185
- else {
186
- this.adapter.addClass(SELECTED);
187
- }
188
- // Check to ensure that there isn't a previously existing animation class, in case for example
189
- // the user interacted with the checkbox before the animation was finished.
190
- if (this.currentAnimationClass.length > 0) {
191
- clearTimeout(this.animEndLatchTimer);
192
- this.adapter.forceLayout();
193
- this.adapter.removeClass(this.currentAnimationClass);
194
- }
195
- this.currentAnimationClass =
196
- this.getTransitionAnimationClass(oldState, newState);
197
- this.currentCheckState = newState;
198
- // Check for parentNode so that animations are only run when the element is attached
199
- // to the DOM.
200
- if (this.adapter.isAttachedToDOM() &&
201
- this.currentAnimationClass.length > 0) {
202
- this.adapter.addClass(this.currentAnimationClass);
203
- this.enableAnimationEndHandler = true;
204
- }
205
- };
206
- MDCCheckboxFoundation.prototype.determineCheckState = function () {
207
- var TRANSITION_STATE_INDETERMINATE = strings$5.TRANSITION_STATE_INDETERMINATE, TRANSITION_STATE_CHECKED = strings$5.TRANSITION_STATE_CHECKED, TRANSITION_STATE_UNCHECKED = strings$5.TRANSITION_STATE_UNCHECKED;
208
- if (this.adapter.isIndeterminate()) {
209
- return TRANSITION_STATE_INDETERMINATE;
210
- }
211
- return this.adapter.isChecked() ? TRANSITION_STATE_CHECKED :
212
- TRANSITION_STATE_UNCHECKED;
213
- };
214
- MDCCheckboxFoundation.prototype.getTransitionAnimationClass = function (oldState, newState) {
215
- var TRANSITION_STATE_INIT = strings$5.TRANSITION_STATE_INIT, TRANSITION_STATE_CHECKED = strings$5.TRANSITION_STATE_CHECKED, TRANSITION_STATE_UNCHECKED = strings$5.TRANSITION_STATE_UNCHECKED;
216
- var _a = MDCCheckboxFoundation.cssClasses, ANIM_UNCHECKED_CHECKED = _a.ANIM_UNCHECKED_CHECKED, ANIM_UNCHECKED_INDETERMINATE = _a.ANIM_UNCHECKED_INDETERMINATE, ANIM_CHECKED_UNCHECKED = _a.ANIM_CHECKED_UNCHECKED, ANIM_CHECKED_INDETERMINATE = _a.ANIM_CHECKED_INDETERMINATE, ANIM_INDETERMINATE_CHECKED = _a.ANIM_INDETERMINATE_CHECKED, ANIM_INDETERMINATE_UNCHECKED = _a.ANIM_INDETERMINATE_UNCHECKED;
217
- switch (oldState) {
218
- case TRANSITION_STATE_INIT:
219
- if (newState === TRANSITION_STATE_UNCHECKED) {
220
- return '';
221
- }
222
- return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;
223
- case TRANSITION_STATE_UNCHECKED:
224
- return newState === TRANSITION_STATE_CHECKED ? ANIM_UNCHECKED_CHECKED : ANIM_UNCHECKED_INDETERMINATE;
225
- case TRANSITION_STATE_CHECKED:
226
- return newState === TRANSITION_STATE_UNCHECKED ? ANIM_CHECKED_UNCHECKED : ANIM_CHECKED_INDETERMINATE;
227
- default: // TRANSITION_STATE_INDETERMINATE
228
- return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;
229
- }
230
- };
231
- MDCCheckboxFoundation.prototype.updateAriaChecked = function () {
232
- // Ensure aria-checked is set to mixed if checkbox is in indeterminate state.
233
- if (this.adapter.isIndeterminate()) {
234
- this.adapter.setNativeControlAttr(strings$5.ARIA_CHECKED_ATTR, strings$5.ARIA_CHECKED_INDETERMINATE_VALUE);
235
- }
236
- else {
237
- // The on/off state does not need to keep track of aria-checked, since
238
- // the screenreader uses the checked property on the checkbox element.
239
- this.adapter.removeNativeControlAttr(strings$5.ARIA_CHECKED_ATTR);
240
- }
241
- };
242
- return MDCCheckboxFoundation;
243
- }(MDCFoundation));
244
-
245
- /**
246
- * @license
247
- * Copyright 2016 Google Inc.
248
- *
249
- * Permission is hereby granted, free of charge, to any person obtaining a copy
250
- * of this software and associated documentation files (the "Software"), to deal
251
- * in the Software without restriction, including without limitation the rights
252
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
253
- * copies of the Software, and to permit persons to whom the Software is
254
- * furnished to do so, subject to the following conditions:
255
- *
256
- * The above copyright notice and this permission notice shall be included in
257
- * all copies or substantial portions of the Software.
258
- *
259
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
260
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
261
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
262
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
263
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
264
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
265
- * THE SOFTWARE.
266
- */
267
- var CB_PROTO_PROPS = ['checked', 'indeterminate'];
268
- var MDCCheckbox = /** @class */ (function (_super) {
269
- __extends(MDCCheckbox, _super);
270
- function MDCCheckbox() {
271
- var _this = _super !== null && _super.apply(this, arguments) || this;
272
- _this.rippleSurface = _this.createRipple();
273
- return _this;
274
- }
275
- MDCCheckbox.attachTo = function (root) {
276
- return new MDCCheckbox(root);
277
- };
278
- Object.defineProperty(MDCCheckbox.prototype, "ripple", {
279
- get: function () {
280
- return this.rippleSurface;
281
- },
282
- enumerable: false,
283
- configurable: true
284
- });
285
- Object.defineProperty(MDCCheckbox.prototype, "checked", {
286
- get: function () {
287
- return this.getNativeControl().checked;
288
- },
289
- set: function (checked) {
290
- this.getNativeControl().checked = checked;
291
- },
292
- enumerable: false,
293
- configurable: true
294
- });
295
- Object.defineProperty(MDCCheckbox.prototype, "indeterminate", {
296
- get: function () {
297
- return this.getNativeControl().indeterminate;
298
- },
299
- set: function (indeterminate) {
300
- this.getNativeControl().indeterminate = indeterminate;
301
- },
302
- enumerable: false,
303
- configurable: true
304
- });
305
- Object.defineProperty(MDCCheckbox.prototype, "disabled", {
306
- get: function () {
307
- return this.getNativeControl().disabled;
308
- },
309
- set: function (disabled) {
310
- this.foundation.setDisabled(disabled);
311
- },
312
- enumerable: false,
313
- configurable: true
314
- });
315
- Object.defineProperty(MDCCheckbox.prototype, "value", {
316
- get: function () {
317
- return this.getNativeControl().value;
318
- },
319
- set: function (value) {
320
- this.getNativeControl().value = value;
321
- },
322
- enumerable: false,
323
- configurable: true
324
- });
325
- MDCCheckbox.prototype.initialize = function () {
326
- var DATA_INDETERMINATE_ATTR = strings$5.DATA_INDETERMINATE_ATTR;
327
- this.getNativeControl().indeterminate =
328
- this.getNativeControl().getAttribute(DATA_INDETERMINATE_ATTR) ===
329
- 'true';
330
- this.getNativeControl().removeAttribute(DATA_INDETERMINATE_ATTR);
331
- };
332
- MDCCheckbox.prototype.initialSyncWithDOM = function () {
333
- var _this = this;
334
- this.handleChange = function () {
335
- _this.foundation.handleChange();
336
- };
337
- this.handleAnimationEnd = function () {
338
- _this.foundation.handleAnimationEnd();
339
- };
340
- this.getNativeControl().addEventListener('change', this.handleChange);
341
- this.listen(getCorrectEventName(window, 'animationend'), this.handleAnimationEnd);
342
- this.installPropertyChangeHooks();
343
- };
344
- MDCCheckbox.prototype.destroy = function () {
345
- this.rippleSurface.destroy();
346
- this.getNativeControl().removeEventListener('change', this.handleChange);
347
- this.unlisten(getCorrectEventName(window, 'animationend'), this.handleAnimationEnd);
348
- this.uninstallPropertyChangeHooks();
349
- _super.prototype.destroy.call(this);
350
- };
351
- MDCCheckbox.prototype.getDefaultFoundation = function () {
352
- var _this = this;
353
- // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
354
- // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
355
- var adapter = {
356
- addClass: function (className) { return _this.root.classList.add(className); },
357
- forceLayout: function () { return _this.root.offsetWidth; },
358
- hasNativeControl: function () { return !!_this.getNativeControl(); },
359
- isAttachedToDOM: function () { return Boolean(_this.root.parentNode); },
360
- isChecked: function () { return _this.checked; },
361
- isIndeterminate: function () { return _this.indeterminate; },
362
- removeClass: function (className) {
363
- _this.root.classList.remove(className);
364
- },
365
- removeNativeControlAttr: function (attr) {
366
- _this.getNativeControl().removeAttribute(attr);
367
- },
368
- setNativeControlAttr: function (attr, value) {
369
- _this.getNativeControl().setAttribute(attr, value);
370
- },
371
- setNativeControlDisabled: function (disabled) {
372
- _this.getNativeControl().disabled = disabled;
373
- },
374
- };
375
- return new MDCCheckboxFoundation(adapter);
376
- };
377
- MDCCheckbox.prototype.createRipple = function () {
378
- var _this = this;
379
- // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
380
- // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
381
- var adapter = __assign(__assign({}, MDCRipple.createAdapter(this)), { deregisterInteractionHandler: function (evtType, handler) {
382
- _this.getNativeControl().removeEventListener(evtType, handler, applyPassive());
383
- }, isSurfaceActive: function () { return matches(_this.getNativeControl(), ':active'); }, isUnbounded: function () { return true; }, registerInteractionHandler: function (evtType, handler) {
384
- _this.getNativeControl().addEventListener(evtType, handler, applyPassive());
385
- } });
386
- return new MDCRipple(this.root, new MDCRippleFoundation(adapter));
387
- };
388
- MDCCheckbox.prototype.installPropertyChangeHooks = function () {
389
- var e_1, _a;
390
- var _this = this;
391
- var nativeCb = this.getNativeControl();
392
- var cbProto = Object.getPrototypeOf(nativeCb);
393
- var _loop_1 = function (controlState) {
394
- var desc = Object.getOwnPropertyDescriptor(cbProto, controlState);
395
- // We have to check for this descriptor, since some browsers (Safari) don't support its return.
396
- // See: https://bugs.webkit.org/show_bug.cgi?id=49739
397
- if (!validDescriptor(desc)) {
398
- return { value: void 0 };
399
- }
400
- // Type cast is needed for compatibility with Closure Compiler.
401
- var nativeGetter = desc.get;
402
- var nativeCbDesc = {
403
- configurable: desc.configurable,
404
- enumerable: desc.enumerable,
405
- get: nativeGetter,
406
- set: function (state) {
407
- desc.set.call(nativeCb, state);
408
- _this.foundation.handleChange();
409
- },
410
- };
411
- Object.defineProperty(nativeCb, controlState, nativeCbDesc);
412
- };
413
- try {
414
- for (var CB_PROTO_PROPS_1 = __values(CB_PROTO_PROPS), CB_PROTO_PROPS_1_1 = CB_PROTO_PROPS_1.next(); !CB_PROTO_PROPS_1_1.done; CB_PROTO_PROPS_1_1 = CB_PROTO_PROPS_1.next()) {
415
- var controlState = CB_PROTO_PROPS_1_1.value;
416
- var state_1 = _loop_1(controlState);
417
- if (typeof state_1 === "object")
418
- return state_1.value;
419
- }
420
- }
421
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
422
- finally {
423
- try {
424
- if (CB_PROTO_PROPS_1_1 && !CB_PROTO_PROPS_1_1.done && (_a = CB_PROTO_PROPS_1.return)) _a.call(CB_PROTO_PROPS_1);
425
- }
426
- finally { if (e_1) throw e_1.error; }
427
- }
428
- };
429
- MDCCheckbox.prototype.uninstallPropertyChangeHooks = function () {
430
- var e_2, _a;
431
- var nativeCb = this.getNativeControl();
432
- var cbProto = Object.getPrototypeOf(nativeCb);
433
- try {
434
- for (var CB_PROTO_PROPS_2 = __values(CB_PROTO_PROPS), CB_PROTO_PROPS_2_1 = CB_PROTO_PROPS_2.next(); !CB_PROTO_PROPS_2_1.done; CB_PROTO_PROPS_2_1 = CB_PROTO_PROPS_2.next()) {
435
- var controlState = CB_PROTO_PROPS_2_1.value;
436
- var desc = Object.getOwnPropertyDescriptor(cbProto, controlState);
437
- if (!validDescriptor(desc)) {
438
- return;
439
- }
440
- Object.defineProperty(nativeCb, controlState, desc);
441
- }
442
- }
443
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
444
- finally {
445
- try {
446
- if (CB_PROTO_PROPS_2_1 && !CB_PROTO_PROPS_2_1.done && (_a = CB_PROTO_PROPS_2.return)) _a.call(CB_PROTO_PROPS_2);
447
- }
448
- finally { if (e_2) throw e_2.error; }
449
- }
450
- };
451
- MDCCheckbox.prototype.getNativeControl = function () {
452
- var NATIVE_CONTROL_SELECTOR = strings$5.NATIVE_CONTROL_SELECTOR;
453
- var el = this.root.querySelector(NATIVE_CONTROL_SELECTOR);
454
- if (!el) {
455
- throw new Error("Checkbox component requires a " + NATIVE_CONTROL_SELECTOR + " element");
456
- }
457
- return el;
458
- };
459
- return MDCCheckbox;
460
- }(MDCComponent));
461
- function validDescriptor(inputPropDesc) {
462
- return !!inputPropDesc && typeof inputPropDesc.set === 'function';
463
- }
464
-
465
- /**
466
- * @license
467
- * Copyright 2017 Google Inc.
468
- *
469
- * Permission is hereby granted, free of charge, to any person obtaining a copy
470
- * of this software and associated documentation files (the "Software"), to deal
471
- * in the Software without restriction, including without limitation the rights
472
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
473
- * copies of the Software, and to permit persons to whom the Software is
474
- * furnished to do so, subject to the following conditions:
475
- *
476
- * The above copyright notice and this permission notice shall be included in
477
- * all copies or substantial portions of the Software.
478
- *
479
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
480
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
481
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
482
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
483
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
484
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
485
- * THE SOFTWARE.
486
- */
487
- var cssClasses$4 = {
488
- ROOT: 'mdc-form-field',
489
- };
490
- var strings$4 = {
491
- LABEL_SELECTOR: '.mdc-form-field > label',
492
- };
493
-
494
- /**
495
- * @license
496
- * Copyright 2017 Google Inc.
497
- *
498
- * Permission is hereby granted, free of charge, to any person obtaining a copy
499
- * of this software and associated documentation files (the "Software"), to deal
500
- * in the Software without restriction, including without limitation the rights
501
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
502
- * copies of the Software, and to permit persons to whom the Software is
503
- * furnished to do so, subject to the following conditions:
504
- *
505
- * The above copyright notice and this permission notice shall be included in
506
- * all copies or substantial portions of the Software.
507
- *
508
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
509
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
510
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
511
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
512
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
513
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
514
- * THE SOFTWARE.
515
- */
516
- var MDCFormFieldFoundation = /** @class */ (function (_super) {
517
- __extends(MDCFormFieldFoundation, _super);
518
- function MDCFormFieldFoundation(adapter) {
519
- var _this = _super.call(this, __assign(__assign({}, MDCFormFieldFoundation.defaultAdapter), adapter)) || this;
520
- _this.click = function () {
521
- _this.handleClick();
522
- };
523
- return _this;
524
- }
525
- Object.defineProperty(MDCFormFieldFoundation, "cssClasses", {
526
- get: function () {
527
- return cssClasses$4;
528
- },
529
- enumerable: false,
530
- configurable: true
531
- });
532
- Object.defineProperty(MDCFormFieldFoundation, "strings", {
533
- get: function () {
534
- return strings$4;
535
- },
536
- enumerable: false,
537
- configurable: true
538
- });
539
- Object.defineProperty(MDCFormFieldFoundation, "defaultAdapter", {
540
- get: function () {
541
- return {
542
- activateInputRipple: function () { return undefined; },
543
- deactivateInputRipple: function () { return undefined; },
544
- deregisterInteractionHandler: function () { return undefined; },
545
- registerInteractionHandler: function () { return undefined; },
546
- };
547
- },
548
- enumerable: false,
549
- configurable: true
550
- });
551
- MDCFormFieldFoundation.prototype.init = function () {
552
- this.adapter.registerInteractionHandler('click', this.click);
553
- };
554
- MDCFormFieldFoundation.prototype.destroy = function () {
555
- this.adapter.deregisterInteractionHandler('click', this.click);
556
- };
557
- MDCFormFieldFoundation.prototype.handleClick = function () {
558
- var _this = this;
559
- this.adapter.activateInputRipple();
560
- requestAnimationFrame(function () {
561
- _this.adapter.deactivateInputRipple();
562
- });
563
- };
564
- return MDCFormFieldFoundation;
565
- }(MDCFoundation));
566
-
567
- /**
568
- * @license
569
- * Copyright 2017 Google Inc.
570
- *
571
- * Permission is hereby granted, free of charge, to any person obtaining a copy
572
- * of this software and associated documentation files (the "Software"), to deal
573
- * in the Software without restriction, including without limitation the rights
574
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
575
- * copies of the Software, and to permit persons to whom the Software is
576
- * furnished to do so, subject to the following conditions:
577
- *
578
- * The above copyright notice and this permission notice shall be included in
579
- * all copies or substantial portions of the Software.
580
- *
581
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
582
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
583
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
584
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
585
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
586
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
587
- * THE SOFTWARE.
588
- */
589
- var MDCFormField = /** @class */ (function (_super) {
590
- __extends(MDCFormField, _super);
591
- function MDCFormField() {
592
- return _super !== null && _super.apply(this, arguments) || this;
593
- }
594
- MDCFormField.attachTo = function (root) {
595
- return new MDCFormField(root);
596
- };
597
- MDCFormField.prototype.labelEl = function () {
598
- var LABEL_SELECTOR = MDCFormFieldFoundation.strings.LABEL_SELECTOR;
599
- return this.root.querySelector(LABEL_SELECTOR);
600
- };
601
- MDCFormField.prototype.getDefaultFoundation = function () {
602
- var _this = this;
603
- // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
604
- // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
605
- var adapter = {
606
- activateInputRipple: function () {
607
- if (_this.input && _this.input.ripple) {
608
- _this.input.ripple.activate();
609
- }
610
- },
611
- deactivateInputRipple: function () {
612
- if (_this.input && _this.input.ripple) {
613
- _this.input.ripple.deactivate();
614
- }
615
- },
616
- deregisterInteractionHandler: function (evtType, handler) {
617
- var labelEl = _this.labelEl();
618
- if (labelEl) {
619
- labelEl.removeEventListener(evtType, handler);
620
- }
621
- },
622
- registerInteractionHandler: function (evtType, handler) {
623
- var labelEl = _this.labelEl();
624
- if (labelEl) {
625
- labelEl.addEventListener(evtType, handler);
626
- }
627
- },
628
- };
629
- return new MDCFormFieldFoundation(adapter);
630
- };
631
- return MDCFormField;
632
- }(MDCComponent));
633
-
634
- const ptcFormCheckboxCss = ".mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-checkbox:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-touch-target-size, 40px);height:40px;height:var(--mdc-checkbox-touch-target-size, 40px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}@-webkit-keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}}@-webkit-keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{-webkit-animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786;animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{-webkit-animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786;animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-touch-target-wrapper{display:inline}@-webkit-keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{-webkit-animation-timing-function:cubic-bezier(0, 0, 0.2, 1);animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{-webkit-animation-timing-function:cubic-bezier(0, 0, 0.2, 1);animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@-webkit-keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{-webkit-transform:scaleX(0);transform:scaleX(0)}68.2%{-webkit-animation-timing-function:cubic-bezier(0, 0, 0, 1);animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{-webkit-transform:scaleX(0);transform:scaleX(0)}68.2%{-webkit-animation-timing-function:cubic-bezier(0, 0, 0, 1);animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 1, 1);animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 1, 1);animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@-webkit-keyframes mdc-checkbox-checked-indeterminate-checkmark{from{-webkit-animation-timing-function:cubic-bezier(0, 0, 0.2, 1);animation-timing-function:cubic-bezier(0, 0, 0.2, 1);-webkit-transform:rotate(0deg);transform:rotate(0deg);opacity:1}to{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{-webkit-animation-timing-function:cubic-bezier(0, 0, 0.2, 1);animation-timing-function:cubic-bezier(0, 0, 0.2, 1);-webkit-transform:rotate(0deg);transform:rotate(0deg);opacity:1}to{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}@-webkit-keyframes mdc-checkbox-indeterminate-checked-checkmark{from{-webkit-animation-timing-function:cubic-bezier(0.14, 0, 0, 1);animation-timing-function:cubic-bezier(0.14, 0, 0, 1);-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform:rotate(360deg);transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{-webkit-animation-timing-function:cubic-bezier(0.14, 0, 0, 1);animation-timing-function:cubic-bezier(0.14, 0, 0, 1);-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform:rotate(360deg);transform:rotate(360deg);opacity:1}}@-webkit-keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{-webkit-animation-timing-function:mdc-animation-deceleration-curve-timing-function;animation-timing-function:mdc-animation-deceleration-curve-timing-function;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}to{-webkit-transform:rotate(0deg);transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{-webkit-animation-timing-function:mdc-animation-deceleration-curve-timing-function;animation-timing-function:mdc-animation-deceleration-curve-timing-function;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}to{-webkit-transform:rotate(0deg);transform:rotate(0deg);opacity:1}}@-webkit-keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{-webkit-animation-timing-function:cubic-bezier(0.14, 0, 0, 1);animation-timing-function:cubic-bezier(0.14, 0, 0, 1);-webkit-transform:rotate(0deg);transform:rotate(0deg);opacity:1}to{-webkit-transform:rotate(315deg);transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{-webkit-animation-timing-function:cubic-bezier(0.14, 0, 0, 1);animation-timing-function:cubic-bezier(0.14, 0, 0, 1);-webkit-transform:rotate(0deg);transform:rotate(0deg);opacity:1}to{-webkit-transform:rotate(315deg);transform:rotate(315deg);opacity:0}}@-webkit-keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-transform:scaleX(1);transform:scaleX(1);opacity:1}32.8%,100%{-webkit-transform:scaleX(0);transform:scaleX(0);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-transform:scaleX(1);transform:scaleX(1);opacity:1}32.8%,100%{-webkit-transform:scaleX(0);transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:\"\";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:transparent;pointer-events:none;will-change:background-color, border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;-webkit-transform:scaleX(0) rotate(0deg);transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), -webkit-transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), -webkit-transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{-webkit-animation-duration:180ms;animation-duration:180ms;-webkit-animation-timing-function:linear;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{-webkit-animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{-webkit-animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{-webkit-animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{-webkit-animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{-webkit-animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{-webkit-animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{-webkit-animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{-webkit-animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1), background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((48px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((40px - 48px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((40px - 48px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((40px - 48px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:48px;width:var(--mdc-checkbox-state-layer-size, 48px);height:48px;height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1), transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1), transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{-webkit-transform:scaleX(1) rotate(-45deg);transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), -webkit-transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), -webkit-transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{-webkit-transform:scaleX(1) rotate(0deg);transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-checkbox{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-checkbox .mdc-checkbox__ripple::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-checkbox .mdc-checkbox__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-checkbox.mdc-ripple-upgraded .mdc-checkbox__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale, 1));transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-checkbox.mdc-ripple-upgraded .mdc-checkbox__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-checkbox.mdc-ripple-upgraded--unbounded .mdc-checkbox__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-checkbox.mdc-ripple-upgraded--foreground-activation .mdc-checkbox__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-checkbox.mdc-ripple-upgraded--foreground-deactivation .mdc-checkbox__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-checkbox.mdc-ripple-upgraded .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-upgraded .mdc-checkbox__ripple::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-checkbox.mdc-ripple-upgraded .mdc-checkbox__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-checkbox{z-index:0}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{z-index:-1;z-index:var(--mdc-ripple-z-index, -1)}.mdc-checkbox__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:GrayText;border-color:var(--mdc-checkbox-disabled-unselected-icon-color, GrayText);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:GrayText;background-color:GrayText;background-color:var(--mdc-checkbox-disabled-selected-icon-color, GrayText)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:ButtonText;color:var(--mdc-checkbox-selected-checkmark-color, ButtonText)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:ButtonText;border-color:var(--mdc-checkbox-selected-checkmark-color, ButtonText)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:ButtonFace;color:var(--mdc-checkbox-disabled-selected-checkmark-color, ButtonFace)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:ButtonFace;border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, ButtonFace)}}.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0;}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px;}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto;}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0;}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0;}h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}.ptc-checkbox-field{margin-top:12px;margin-bottom:12px;display:block}.ptc-checkbox-field.invalid-checkbox{position:relative;display:block}.ptc-checkbox-field.invalid-checkbox::before{content:\"\";position:absolute;width:calc(100% + 16px);height:calc(100% + 8px);background:#fef3f3;display:flex;flex-direction:column;justify-content:center;z-index:0;left:50%;top:50%;transform:translate(-50%, -50%)}.mdc-form-field{width:273px;align-items:flex-start;margin-bottom:1px}.mdc-form-field>label{transform:translate(-11px, 7px)}.mdc-form-field>label a{color:var(--color-hyperlink)}.mdc-form-field>label a:hover{color:var(--color-blue-08)}.mdc-form-field>label a:active{color:var(--color-blue-09)}.mdc-checkbox{transform:translateX(-8px);padding:8px;padding:calc((var(--mdc-checkbox-ripple-size, 34px) - 18px) / 2);margin:0px;margin:calc((var(--mdc-checkbox-touch-target-size, 34px) - 34px) / 2)}.mdc-checkbox .mdc-checkbox__background{top:8px;top:calc((var(--mdc-checkbox-ripple-size, 34px) - 18px) / 2);left:8px;left:calc((var(--mdc-checkbox-ripple-size, 34px) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:0px;top:calc((34px - var(--mdc-checkbox-touch-target-size, 34px)) / 2);right:0px;right:calc((34px - var(--mdc-checkbox-touch-target-size, 34px)) / 2);left:0px;left:calc((34px - var(--mdc-checkbox-touch-target-size, 34px)) / 2);width:34px;width:var(--mdc-checkbox-touch-target-size, 34px);height:34px;height:var(--mdc-checkbox-touch-target-size, 34px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background{background-color:var(--color-green-06)}.mdc-checkbox .mdc-checkbox__native-control:focus-visible+.mdc-checkbox__background{transition:none;border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}.label-only .mdc-checkbox{display:none}.label-only>label{padding-left:10px}.checkbox-helper-wrapper{padding-right:16px;padding-left:8px;margin-bottom:32px;display:flex}.checkbox-helper-wrapper p{position:relative;color:#af3231;font-family:Raleway;font-size:var(--ptc-font-size-xx-small);font-style:normal;font-weight:var(--ptc-font-weight-semibold);line-height:var(--ptc-font-size-xx-small);margin-bottom:0px;margin-top:var(--ptc-element-spacing-02)}.checkbox-helper-wrapper p svg{transform:translate(-8px, 3px)}";
635
-
636
- const PtcFormCheckbox = class {
637
- constructor(hostRef) {
638
- registerInstance(this, hostRef);
639
- this.checkboxChanged = createEvent(this, "checkboxChanged", 7);
640
- this.checkboxId = undefined;
641
- this.label = undefined;
642
- this.isRequired = true;
643
- this.isChecked = false;
644
- this.name = undefined;
645
- this.helpertext = "This field is required";
646
- this.hideCheckbox = false;
647
- this.disabled = false;
648
- this.ptcDataEloquaName = undefined;
649
- this.hasError = false;
650
- this.language = "en";
651
- this.ignoreBlindSubmit = false;
652
- }
653
- handleChange(event) {
654
- if (this.disabled) {
655
- event.preventDefault();
656
- }
657
- else {
658
- const isCheckedStatus = event.target.checked;
659
- this.checkboxChanged.emit(isCheckedStatus);
660
- this.isChecked = isCheckedStatus;
661
- this.validateCheckbox();
662
- }
663
- }
664
- componentWillLoad() {
665
- this.language = getLanguageFromURL();
666
- this.helpertext = this.getValidationMessage("required");
667
- }
668
- componentDidLoad() {
669
- this.mdcCheckboxComponent = MDCCheckbox.attachTo(this.mdcCheckbox);
670
- this.mdcFormfieldComponent = MDCFormField.attachTo(this.mdcFormfield);
671
- this.mdcCheckboxComponent.checked = this.isChecked;
672
- this.mdcCheckboxComponent.disabled = this.disabled;
673
- }
674
- async validateCheckbox() {
675
- // this.isCheckboxChecked = !this.isCheckboxChecked; // Toggle checkbox state
676
- if (this.isRequired) {
677
- if (!this.isChecked) {
678
- this.hasError = true; // Set error state to true
679
- if (!this.el.classList.contains("invalid-checkbox")) {
680
- this.el.classList.add("invalid-checkbox");
681
- }
682
- }
683
- else {
684
- this.hasError = false; // Reset error state
685
- if (this.el.classList.contains("invalid-checkbox")) {
686
- this.el.classList.remove("invalid-checkbox");
687
- }
688
- }
689
- }
690
- }
691
- getValidationMessage(type) {
692
- return ValidationMessages[this.language][type];
693
- }
694
- handleKeyDown(event) {
695
- if (this.disabled) {
696
- return;
697
- }
698
- if (event.key === "Enter") {
699
- event.preventDefault();
700
- this.isChecked = !this.isChecked;
701
- this.checkboxChanged.emit(this.isChecked);
702
- if (this.checkboxInput) {
703
- this.checkboxInput.checked = this.isChecked;
704
- }
705
- if (this.mdcCheckboxComponent) {
706
- this.mdcCheckboxComponent.checked = this.isChecked;
707
- }
708
- this.validateCheckbox();
709
- }
710
- }
711
- render() {
712
- return (h(Host, { class: "ptc-checkbox-field" }, [
713
- h("div", { class: `mdc-form-field ${this.hideCheckbox ? "label-only" : ""}`, ref: (mdcFormfield) => {
714
- this.mdcFormfield = mdcFormfield;
715
- }, "aria-labelledby": this.checkboxId }, h("div", { class: "mdc-checkbox", ref: (mdcCheckbox) => {
716
- this.mdcCheckbox = mdcCheckbox;
717
- }, "aria-checked": this.isChecked ? "true" : "false", "aria-disabled": this.disabled ? "true" : "false" }, h("input", Object.assign({ id: this.checkboxId, ref: (checkboxInput) => {
718
- this.checkboxInput = checkboxInput;
719
- }, type: "checkbox" }, (this.isRequired
720
- ? { required: true }
721
- : { required: false }), (this.ignoreBlindSubmit
722
- ? { ignoreBlindSubmit: true }
723
- : null), { "data-eloqua-name": this.ptcDataEloquaName, class: "mdc-checkbox__native-control", onChange: this.handleChange.bind(this), onKeyDown: this.handleKeyDown.bind(this), checked: this.isChecked, disabled: this.disabled, "aria-invalid": this.hasError })), h("div", { class: "mdc-checkbox__background" }, h("svg", { class: "mdc-checkbox__checkmark", viewBox: "0 0 24 24" }, h("path", { class: "mdc-checkbox__checkmark-path", fill: "none", d: "M1.73,12.91 8.1,19.28 22.79,4.59" })), h("div", { class: "mdc-checkbox__mixedmark" })), h("div", { class: "mdc-checkbox__ripple" })), h("label", { htmlFor: this.checkboxId, innerHTML: this.label })),
724
- this.hasError ? (h("div", { class: "checkbox-helper-wrapper" }, h("p", { id: this.name }, h("svg", { class: "select-error-svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { "clip-path": "url(#clip0_12_1424)" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.3156 0L16 4.68444V11.3156L11.3156 16H4.68444L0 11.3156V4.68444L4.68444 0H11.3156ZM8 10.4C7.36 10.4 6.84444 10.9156 6.84444 11.5556C6.84444 12.1956 7.36 12.7111 8 12.7111C8.64 12.7111 9.15556 12.1956 9.15556 11.5556C9.15556 10.9156 8.64 10.4 8 10.4ZM8.88889 3.55556H7.11111V8.88889H8.88889V3.55556Z", fill: "#AF3231" })), h("defs", null, h("clipPath", { id: "clip0_12_1424" }, h("rect", { width: "16", height: "16", fill: "white" })))), this.helpertext))) : null,
725
- ]));
726
- }
727
- get el() { return getElement(this); }
728
- };
729
- PtcFormCheckbox.style = ptcFormCheckboxCss;
730
-
731
- /**
732
- * @license
733
- * Copyright 2019 Google Inc.
734
- *
735
- * Permission is hereby granted, free of charge, to any person obtaining a copy
736
- * of this software and associated documentation files (the "Software"), to deal
737
- * in the Software without restriction, including without limitation the rights
738
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
739
- * copies of the Software, and to permit persons to whom the Software is
740
- * furnished to do so, subject to the following conditions:
741
- *
742
- * The above copyright notice and this permission notice shall be included in
743
- * all copies or substantial portions of the Software.
744
- *
745
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
746
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
747
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
748
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
749
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
750
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
751
- * THE SOFTWARE.
752
- */
753
- var cssClasses$3 = {
754
- ROOT: 'mdc-text-field-character-counter',
755
- };
756
- var strings$3 = {
757
- ROOT_SELECTOR: "." + cssClasses$3.ROOT,
758
- };
759
-
760
- /**
761
- * @license
762
- * Copyright 2019 Google Inc.
763
- *
764
- * Permission is hereby granted, free of charge, to any person obtaining a copy
765
- * of this software and associated documentation files (the "Software"), to deal
766
- * in the Software without restriction, including without limitation the rights
767
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
768
- * copies of the Software, and to permit persons to whom the Software is
769
- * furnished to do so, subject to the following conditions:
770
- *
771
- * The above copyright notice and this permission notice shall be included in
772
- * all copies or substantial portions of the Software.
773
- *
774
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
775
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
776
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
777
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
778
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
779
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
780
- * THE SOFTWARE.
781
- */
782
- var MDCTextFieldCharacterCounterFoundation = /** @class */ (function (_super) {
783
- __extends(MDCTextFieldCharacterCounterFoundation, _super);
784
- function MDCTextFieldCharacterCounterFoundation(adapter) {
785
- return _super.call(this, __assign(__assign({}, MDCTextFieldCharacterCounterFoundation.defaultAdapter), adapter)) || this;
786
- }
787
- Object.defineProperty(MDCTextFieldCharacterCounterFoundation, "cssClasses", {
788
- get: function () {
789
- return cssClasses$3;
790
- },
791
- enumerable: false,
792
- configurable: true
793
- });
794
- Object.defineProperty(MDCTextFieldCharacterCounterFoundation, "strings", {
795
- get: function () {
796
- return strings$3;
797
- },
798
- enumerable: false,
799
- configurable: true
800
- });
801
- Object.defineProperty(MDCTextFieldCharacterCounterFoundation, "defaultAdapter", {
802
- /**
803
- * See {@link MDCTextFieldCharacterCounterAdapter} for typing information on parameters and return types.
804
- */
805
- get: function () {
806
- return {
807
- setContent: function () { return undefined; },
808
- };
809
- },
810
- enumerable: false,
811
- configurable: true
812
- });
813
- MDCTextFieldCharacterCounterFoundation.prototype.setCounterValue = function (currentLength, maxLength) {
814
- currentLength = Math.min(currentLength, maxLength);
815
- this.adapter.setContent(currentLength + " / " + maxLength);
816
- };
817
- return MDCTextFieldCharacterCounterFoundation;
818
- }(MDCFoundation));
819
-
820
- /**
821
- * @license
822
- * Copyright 2019 Google Inc.
823
- *
824
- * Permission is hereby granted, free of charge, to any person obtaining a copy
825
- * of this software and associated documentation files (the "Software"), to deal
826
- * in the Software without restriction, including without limitation the rights
827
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
828
- * copies of the Software, and to permit persons to whom the Software is
829
- * furnished to do so, subject to the following conditions:
830
- *
831
- * The above copyright notice and this permission notice shall be included in
832
- * all copies or substantial portions of the Software.
833
- *
834
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
835
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
836
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
837
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
838
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
839
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
840
- * THE SOFTWARE.
841
- */
842
- var MDCTextFieldCharacterCounter = /** @class */ (function (_super) {
843
- __extends(MDCTextFieldCharacterCounter, _super);
844
- function MDCTextFieldCharacterCounter() {
845
- return _super !== null && _super.apply(this, arguments) || this;
846
- }
847
- MDCTextFieldCharacterCounter.attachTo = function (root) {
848
- return new MDCTextFieldCharacterCounter(root);
849
- };
850
- Object.defineProperty(MDCTextFieldCharacterCounter.prototype, "foundationForTextField", {
851
- // Provided for access by MDCTextField component
852
- get: function () {
853
- return this.foundation;
854
- },
855
- enumerable: false,
856
- configurable: true
857
- });
858
- MDCTextFieldCharacterCounter.prototype.getDefaultFoundation = function () {
859
- var _this = this;
860
- // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
861
- // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
862
- var adapter = {
863
- setContent: function (content) {
864
- _this.root.textContent = content;
865
- },
866
- };
867
- return new MDCTextFieldCharacterCounterFoundation(adapter);
868
- };
869
- return MDCTextFieldCharacterCounter;
870
- }(MDCComponent));
871
-
872
- /**
873
- * @license
874
- * Copyright 2016 Google Inc.
875
- *
876
- * Permission is hereby granted, free of charge, to any person obtaining a copy
877
- * of this software and associated documentation files (the "Software"), to deal
878
- * in the Software without restriction, including without limitation the rights
879
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
880
- * copies of the Software, and to permit persons to whom the Software is
881
- * furnished to do so, subject to the following conditions:
882
- *
883
- * The above copyright notice and this permission notice shall be included in
884
- * all copies or substantial portions of the Software.
885
- *
886
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
887
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
888
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
889
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
890
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
891
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
892
- * THE SOFTWARE.
893
- */
894
- var strings$2 = {
895
- ARIA_CONTROLS: 'aria-controls',
896
- ARIA_DESCRIBEDBY: 'aria-describedby',
897
- INPUT_SELECTOR: '.mdc-text-field__input',
898
- LABEL_SELECTOR: '.mdc-floating-label',
899
- LEADING_ICON_SELECTOR: '.mdc-text-field__icon--leading',
900
- LINE_RIPPLE_SELECTOR: '.mdc-line-ripple',
901
- OUTLINE_SELECTOR: '.mdc-notched-outline',
902
- PREFIX_SELECTOR: '.mdc-text-field__affix--prefix',
903
- SUFFIX_SELECTOR: '.mdc-text-field__affix--suffix',
904
- TRAILING_ICON_SELECTOR: '.mdc-text-field__icon--trailing'
905
- };
906
- var cssClasses$2 = {
907
- DISABLED: 'mdc-text-field--disabled',
908
- FOCUSED: 'mdc-text-field--focused',
909
- HELPER_LINE: 'mdc-text-field-helper-line',
910
- INVALID: 'mdc-text-field--invalid',
911
- LABEL_FLOATING: 'mdc-text-field--label-floating',
912
- NO_LABEL: 'mdc-text-field--no-label',
913
- OUTLINED: 'mdc-text-field--outlined',
914
- ROOT: 'mdc-text-field',
915
- TEXTAREA: 'mdc-text-field--textarea',
916
- WITH_LEADING_ICON: 'mdc-text-field--with-leading-icon',
917
- WITH_TRAILING_ICON: 'mdc-text-field--with-trailing-icon',
918
- WITH_INTERNAL_COUNTER: 'mdc-text-field--with-internal-counter',
919
- };
920
- var numbers = {
921
- LABEL_SCALE: 0.75,
922
- };
923
- /**
924
- * Whitelist based off of
925
- * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation
926
- * under the "Validation-related attributes" section.
927
- */
928
- var VALIDATION_ATTR_WHITELIST = [
929
- 'pattern',
930
- 'min',
931
- 'max',
932
- 'required',
933
- 'step',
934
- 'minlength',
935
- 'maxlength',
936
- ];
937
- /**
938
- * Label should always float for these types as they show some UI even if value
939
- * is empty.
940
- */
941
- var ALWAYS_FLOAT_TYPES = [
942
- 'color',
943
- 'date',
944
- 'datetime-local',
945
- 'month',
946
- 'range',
947
- 'time',
948
- 'week',
949
- ];
950
-
951
- /**
952
- * @license
953
- * Copyright 2016 Google Inc.
954
- *
955
- * Permission is hereby granted, free of charge, to any person obtaining a copy
956
- * of this software and associated documentation files (the "Software"), to deal
957
- * in the Software without restriction, including without limitation the rights
958
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
959
- * copies of the Software, and to permit persons to whom the Software is
960
- * furnished to do so, subject to the following conditions:
961
- *
962
- * The above copyright notice and this permission notice shall be included in
963
- * all copies or substantial portions of the Software.
964
- *
965
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
966
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
967
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
968
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
969
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
970
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
971
- * THE SOFTWARE.
972
- */
973
- var POINTERDOWN_EVENTS = ['mousedown', 'touchstart'];
974
- var INTERACTION_EVENTS$1 = ['click', 'keydown'];
975
- var MDCTextFieldFoundation = /** @class */ (function (_super) {
976
- __extends(MDCTextFieldFoundation, _super);
977
- /**
978
- * @param adapter
979
- * @param foundationMap Map from subcomponent names to their subfoundations.
980
- */
981
- function MDCTextFieldFoundation(adapter, foundationMap) {
982
- if (foundationMap === void 0) { foundationMap = {}; }
983
- var _this = _super.call(this, __assign(__assign({}, MDCTextFieldFoundation.defaultAdapter), adapter)) || this;
984
- _this.isFocused = false;
985
- _this.receivedUserInput = false;
986
- _this.valid = true;
987
- _this.useNativeValidation = true;
988
- _this.validateOnValueChange = true;
989
- _this.helperText = foundationMap.helperText;
990
- _this.characterCounter = foundationMap.characterCounter;
991
- _this.leadingIcon = foundationMap.leadingIcon;
992
- _this.trailingIcon = foundationMap.trailingIcon;
993
- _this.inputFocusHandler = function () {
994
- _this.activateFocus();
995
- };
996
- _this.inputBlurHandler = function () {
997
- _this.deactivateFocus();
998
- };
999
- _this.inputInputHandler = function () {
1000
- _this.handleInput();
1001
- };
1002
- _this.setPointerXOffset = function (evt) {
1003
- _this.setTransformOrigin(evt);
1004
- };
1005
- _this.textFieldInteractionHandler = function () {
1006
- _this.handleTextFieldInteraction();
1007
- };
1008
- _this.validationAttributeChangeHandler = function (attributesList) {
1009
- _this.handleValidationAttributeChange(attributesList);
1010
- };
1011
- return _this;
1012
- }
1013
- Object.defineProperty(MDCTextFieldFoundation, "cssClasses", {
1014
- get: function () {
1015
- return cssClasses$2;
1016
- },
1017
- enumerable: false,
1018
- configurable: true
1019
- });
1020
- Object.defineProperty(MDCTextFieldFoundation, "strings", {
1021
- get: function () {
1022
- return strings$2;
1023
- },
1024
- enumerable: false,
1025
- configurable: true
1026
- });
1027
- Object.defineProperty(MDCTextFieldFoundation, "numbers", {
1028
- get: function () {
1029
- return numbers;
1030
- },
1031
- enumerable: false,
1032
- configurable: true
1033
- });
1034
- Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldAlwaysFloat", {
1035
- get: function () {
1036
- var type = this.getNativeInput().type;
1037
- return ALWAYS_FLOAT_TYPES.indexOf(type) >= 0;
1038
- },
1039
- enumerable: false,
1040
- configurable: true
1041
- });
1042
- Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldFloat", {
1043
- get: function () {
1044
- return this.shouldAlwaysFloat || this.isFocused || !!this.getValue() ||
1045
- this.isBadInput();
1046
- },
1047
- enumerable: false,
1048
- configurable: true
1049
- });
1050
- Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldShake", {
1051
- get: function () {
1052
- return !this.isFocused && !this.isValid() && !!this.getValue();
1053
- },
1054
- enumerable: false,
1055
- configurable: true
1056
- });
1057
- Object.defineProperty(MDCTextFieldFoundation, "defaultAdapter", {
1058
- /**
1059
- * See {@link MDCTextFieldAdapter} for typing information on parameters and
1060
- * return types.
1061
- */
1062
- get: function () {
1063
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
1064
- return {
1065
- addClass: function () { return undefined; },
1066
- removeClass: function () { return undefined; },
1067
- hasClass: function () { return true; },
1068
- setInputAttr: function () { return undefined; },
1069
- removeInputAttr: function () { return undefined; },
1070
- registerTextFieldInteractionHandler: function () { return undefined; },
1071
- deregisterTextFieldInteractionHandler: function () { return undefined; },
1072
- registerInputInteractionHandler: function () { return undefined; },
1073
- deregisterInputInteractionHandler: function () { return undefined; },
1074
- registerValidationAttributeChangeHandler: function () {
1075
- return new MutationObserver(function () { return undefined; });
1076
- },
1077
- deregisterValidationAttributeChangeHandler: function () { return undefined; },
1078
- getNativeInput: function () { return null; },
1079
- isFocused: function () { return false; },
1080
- activateLineRipple: function () { return undefined; },
1081
- deactivateLineRipple: function () { return undefined; },
1082
- setLineRippleTransformOrigin: function () { return undefined; },
1083
- shakeLabel: function () { return undefined; },
1084
- floatLabel: function () { return undefined; },
1085
- setLabelRequired: function () { return undefined; },
1086
- hasLabel: function () { return false; },
1087
- getLabelWidth: function () { return 0; },
1088
- hasOutline: function () { return false; },
1089
- notchOutline: function () { return undefined; },
1090
- closeOutline: function () { return undefined; },
1091
- };
1092
- // tslint:enable:object-literal-sort-keys
1093
- },
1094
- enumerable: false,
1095
- configurable: true
1096
- });
1097
- MDCTextFieldFoundation.prototype.init = function () {
1098
- var e_1, _a, e_2, _b;
1099
- if (this.adapter.hasLabel() && this.getNativeInput().required) {
1100
- this.adapter.setLabelRequired(true);
1101
- }
1102
- if (this.adapter.isFocused()) {
1103
- this.inputFocusHandler();
1104
- }
1105
- else if (this.adapter.hasLabel() && this.shouldFloat) {
1106
- this.notchOutline(true);
1107
- this.adapter.floatLabel(true);
1108
- this.styleFloating(true);
1109
- }
1110
- this.adapter.registerInputInteractionHandler('focus', this.inputFocusHandler);
1111
- this.adapter.registerInputInteractionHandler('blur', this.inputBlurHandler);
1112
- this.adapter.registerInputInteractionHandler('input', this.inputInputHandler);
1113
- try {
1114
- for (var POINTERDOWN_EVENTS_1 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next(); !POINTERDOWN_EVENTS_1_1.done; POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next()) {
1115
- var evtType = POINTERDOWN_EVENTS_1_1.value;
1116
- this.adapter.registerInputInteractionHandler(evtType, this.setPointerXOffset);
1117
- }
1118
- }
1119
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1120
- finally {
1121
- try {
1122
- if (POINTERDOWN_EVENTS_1_1 && !POINTERDOWN_EVENTS_1_1.done && (_a = POINTERDOWN_EVENTS_1.return)) _a.call(POINTERDOWN_EVENTS_1);
1123
- }
1124
- finally { if (e_1) throw e_1.error; }
1125
- }
1126
- try {
1127
- for (var INTERACTION_EVENTS_1 = __values(INTERACTION_EVENTS$1), INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next(); !INTERACTION_EVENTS_1_1.done; INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next()) {
1128
- var evtType = INTERACTION_EVENTS_1_1.value;
1129
- this.adapter.registerTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);
1130
- }
1131
- }
1132
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1133
- finally {
1134
- try {
1135
- if (INTERACTION_EVENTS_1_1 && !INTERACTION_EVENTS_1_1.done && (_b = INTERACTION_EVENTS_1.return)) _b.call(INTERACTION_EVENTS_1);
1136
- }
1137
- finally { if (e_2) throw e_2.error; }
1138
- }
1139
- this.validationObserver =
1140
- this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler);
1141
- this.setcharacterCounter(this.getValue().length);
1142
- };
1143
- MDCTextFieldFoundation.prototype.destroy = function () {
1144
- var e_3, _a, e_4, _b;
1145
- this.adapter.deregisterInputInteractionHandler('focus', this.inputFocusHandler);
1146
- this.adapter.deregisterInputInteractionHandler('blur', this.inputBlurHandler);
1147
- this.adapter.deregisterInputInteractionHandler('input', this.inputInputHandler);
1148
- try {
1149
- for (var POINTERDOWN_EVENTS_2 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next(); !POINTERDOWN_EVENTS_2_1.done; POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next()) {
1150
- var evtType = POINTERDOWN_EVENTS_2_1.value;
1151
- this.adapter.deregisterInputInteractionHandler(evtType, this.setPointerXOffset);
1152
- }
1153
- }
1154
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
1155
- finally {
1156
- try {
1157
- if (POINTERDOWN_EVENTS_2_1 && !POINTERDOWN_EVENTS_2_1.done && (_a = POINTERDOWN_EVENTS_2.return)) _a.call(POINTERDOWN_EVENTS_2);
1158
- }
1159
- finally { if (e_3) throw e_3.error; }
1160
- }
1161
- try {
1162
- for (var INTERACTION_EVENTS_2 = __values(INTERACTION_EVENTS$1), INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next(); !INTERACTION_EVENTS_2_1.done; INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next()) {
1163
- var evtType = INTERACTION_EVENTS_2_1.value;
1164
- this.adapter.deregisterTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);
1165
- }
1166
- }
1167
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
1168
- finally {
1169
- try {
1170
- if (INTERACTION_EVENTS_2_1 && !INTERACTION_EVENTS_2_1.done && (_b = INTERACTION_EVENTS_2.return)) _b.call(INTERACTION_EVENTS_2);
1171
- }
1172
- finally { if (e_4) throw e_4.error; }
1173
- }
1174
- this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver);
1175
- };
1176
- /**
1177
- * Handles user interactions with the Text Field.
1178
- */
1179
- MDCTextFieldFoundation.prototype.handleTextFieldInteraction = function () {
1180
- var nativeInput = this.adapter.getNativeInput();
1181
- if (nativeInput && nativeInput.disabled) {
1182
- return;
1183
- }
1184
- this.receivedUserInput = true;
1185
- };
1186
- /**
1187
- * Handles validation attribute changes
1188
- */
1189
- MDCTextFieldFoundation.prototype.handleValidationAttributeChange = function (attributesList) {
1190
- var _this = this;
1191
- attributesList.some(function (attributeName) {
1192
- if (VALIDATION_ATTR_WHITELIST.indexOf(attributeName) > -1) {
1193
- _this.styleValidity(true);
1194
- _this.adapter.setLabelRequired(_this.getNativeInput().required);
1195
- return true;
1196
- }
1197
- return false;
1198
- });
1199
- if (attributesList.indexOf('maxlength') > -1) {
1200
- this.setcharacterCounter(this.getValue().length);
1201
- }
1202
- };
1203
- /**
1204
- * Opens/closes the notched outline.
1205
- */
1206
- MDCTextFieldFoundation.prototype.notchOutline = function (openNotch) {
1207
- if (!this.adapter.hasOutline() || !this.adapter.hasLabel()) {
1208
- return;
1209
- }
1210
- if (openNotch) {
1211
- var labelWidth = this.adapter.getLabelWidth() * numbers.LABEL_SCALE;
1212
- this.adapter.notchOutline(labelWidth);
1213
- }
1214
- else {
1215
- this.adapter.closeOutline();
1216
- }
1217
- };
1218
- /**
1219
- * Activates the text field focus state.
1220
- */
1221
- MDCTextFieldFoundation.prototype.activateFocus = function () {
1222
- this.isFocused = true;
1223
- this.styleFocused(this.isFocused);
1224
- this.adapter.activateLineRipple();
1225
- if (this.adapter.hasLabel()) {
1226
- this.notchOutline(this.shouldFloat);
1227
- this.adapter.floatLabel(this.shouldFloat);
1228
- this.styleFloating(this.shouldFloat);
1229
- this.adapter.shakeLabel(this.shouldShake);
1230
- }
1231
- if (this.helperText &&
1232
- (this.helperText.isPersistent() || !this.helperText.isValidation() ||
1233
- !this.valid)) {
1234
- this.helperText.showToScreenReader();
1235
- }
1236
- };
1237
- /**
1238
- * Sets the line ripple's transform origin, so that the line ripple activate
1239
- * animation will animate out from the user's click location.
1240
- */
1241
- MDCTextFieldFoundation.prototype.setTransformOrigin = function (evt) {
1242
- if (this.isDisabled() || this.adapter.hasOutline()) {
1243
- return;
1244
- }
1245
- var touches = evt.touches;
1246
- var targetEvent = touches ? touches[0] : evt;
1247
- var targetClientRect = targetEvent.target.getBoundingClientRect();
1248
- var normalizedX = targetEvent.clientX - targetClientRect.left;
1249
- this.adapter.setLineRippleTransformOrigin(normalizedX);
1250
- };
1251
- /**
1252
- * Handles input change of text input and text area.
1253
- */
1254
- MDCTextFieldFoundation.prototype.handleInput = function () {
1255
- this.autoCompleteFocus();
1256
- this.setcharacterCounter(this.getValue().length);
1257
- };
1258
- /**
1259
- * Activates the Text Field's focus state in cases when the input value
1260
- * changes without user input (e.g. programmatically).
1261
- */
1262
- MDCTextFieldFoundation.prototype.autoCompleteFocus = function () {
1263
- if (!this.receivedUserInput) {
1264
- this.activateFocus();
1265
- }
1266
- };
1267
- /**
1268
- * Deactivates the Text Field's focus state.
1269
- */
1270
- MDCTextFieldFoundation.prototype.deactivateFocus = function () {
1271
- this.isFocused = false;
1272
- this.adapter.deactivateLineRipple();
1273
- var isValid = this.isValid();
1274
- this.styleValidity(isValid);
1275
- this.styleFocused(this.isFocused);
1276
- if (this.adapter.hasLabel()) {
1277
- this.notchOutline(this.shouldFloat);
1278
- this.adapter.floatLabel(this.shouldFloat);
1279
- this.styleFloating(this.shouldFloat);
1280
- this.adapter.shakeLabel(this.shouldShake);
1281
- }
1282
- if (!this.shouldFloat) {
1283
- this.receivedUserInput = false;
1284
- }
1285
- };
1286
- MDCTextFieldFoundation.prototype.getValue = function () {
1287
- return this.getNativeInput().value;
1288
- };
1289
- /**
1290
- * @param value The value to set on the input Element.
1291
- */
1292
- MDCTextFieldFoundation.prototype.setValue = function (value) {
1293
- // Prevent Safari from moving the caret to the end of the input when the
1294
- // value has not changed.
1295
- if (this.getValue() !== value) {
1296
- this.getNativeInput().value = value;
1297
- }
1298
- this.setcharacterCounter(value.length);
1299
- if (this.validateOnValueChange) {
1300
- var isValid = this.isValid();
1301
- this.styleValidity(isValid);
1302
- }
1303
- if (this.adapter.hasLabel()) {
1304
- this.notchOutline(this.shouldFloat);
1305
- this.adapter.floatLabel(this.shouldFloat);
1306
- this.styleFloating(this.shouldFloat);
1307
- if (this.validateOnValueChange) {
1308
- this.adapter.shakeLabel(this.shouldShake);
1309
- }
1310
- }
1311
- };
1312
- /**
1313
- * @return The custom validity state, if set; otherwise, the result of a
1314
- * native validity check.
1315
- */
1316
- MDCTextFieldFoundation.prototype.isValid = function () {
1317
- return this.useNativeValidation ? this.isNativeInputValid() : this.valid;
1318
- };
1319
- /**
1320
- * @param isValid Sets the custom validity state of the Text Field.
1321
- */
1322
- MDCTextFieldFoundation.prototype.setValid = function (isValid) {
1323
- this.valid = isValid;
1324
- this.styleValidity(isValid);
1325
- var shouldShake = !isValid && !this.isFocused && !!this.getValue();
1326
- if (this.adapter.hasLabel()) {
1327
- this.adapter.shakeLabel(shouldShake);
1328
- }
1329
- };
1330
- /**
1331
- * @param shouldValidate Whether or not validity should be updated on
1332
- * value change.
1333
- */
1334
- MDCTextFieldFoundation.prototype.setValidateOnValueChange = function (shouldValidate) {
1335
- this.validateOnValueChange = shouldValidate;
1336
- };
1337
- /**
1338
- * @return Whether or not validity should be updated on value change. `true`
1339
- * by default.
1340
- */
1341
- MDCTextFieldFoundation.prototype.getValidateOnValueChange = function () {
1342
- return this.validateOnValueChange;
1343
- };
1344
- /**
1345
- * Enables or disables the use of native validation. Use this for custom
1346
- * validation.
1347
- * @param useNativeValidation Set this to false to ignore native input
1348
- * validation.
1349
- */
1350
- MDCTextFieldFoundation.prototype.setUseNativeValidation = function (useNativeValidation) {
1351
- this.useNativeValidation = useNativeValidation;
1352
- };
1353
- MDCTextFieldFoundation.prototype.isDisabled = function () {
1354
- return this.getNativeInput().disabled;
1355
- };
1356
- /**
1357
- * @param disabled Sets the text-field disabled or enabled.
1358
- */
1359
- MDCTextFieldFoundation.prototype.setDisabled = function (disabled) {
1360
- this.getNativeInput().disabled = disabled;
1361
- this.styleDisabled(disabled);
1362
- };
1363
- /**
1364
- * @param content Sets the content of the helper text.
1365
- */
1366
- MDCTextFieldFoundation.prototype.setHelperTextContent = function (content) {
1367
- if (this.helperText) {
1368
- this.helperText.setContent(content);
1369
- }
1370
- };
1371
- /**
1372
- * Sets the aria label of the leading icon.
1373
- */
1374
- MDCTextFieldFoundation.prototype.setLeadingIconAriaLabel = function (label) {
1375
- if (this.leadingIcon) {
1376
- this.leadingIcon.setAriaLabel(label);
1377
- }
1378
- };
1379
- /**
1380
- * Sets the text content of the leading icon.
1381
- */
1382
- MDCTextFieldFoundation.prototype.setLeadingIconContent = function (content) {
1383
- if (this.leadingIcon) {
1384
- this.leadingIcon.setContent(content);
1385
- }
1386
- };
1387
- /**
1388
- * Sets the aria label of the trailing icon.
1389
- */
1390
- MDCTextFieldFoundation.prototype.setTrailingIconAriaLabel = function (label) {
1391
- if (this.trailingIcon) {
1392
- this.trailingIcon.setAriaLabel(label);
1393
- }
1394
- };
1395
- /**
1396
- * Sets the text content of the trailing icon.
1397
- */
1398
- MDCTextFieldFoundation.prototype.setTrailingIconContent = function (content) {
1399
- if (this.trailingIcon) {
1400
- this.trailingIcon.setContent(content);
1401
- }
1402
- };
1403
- /**
1404
- * Sets character counter values that shows characters used and the total
1405
- * character limit.
1406
- */
1407
- MDCTextFieldFoundation.prototype.setcharacterCounter = function (currentLength) {
1408
- if (!this.characterCounter) {
1409
- return;
1410
- }
1411
- var maxLength = this.getNativeInput().maxLength;
1412
- if (maxLength === -1) {
1413
- throw new Error('MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.');
1414
- }
1415
- this.characterCounter.setCounterValue(currentLength, maxLength);
1416
- };
1417
- /**
1418
- * @return True if the Text Field input fails in converting the user-supplied
1419
- * value.
1420
- */
1421
- MDCTextFieldFoundation.prototype.isBadInput = function () {
1422
- // The badInput property is not supported in IE 11 💩.
1423
- return this.getNativeInput().validity.badInput || false;
1424
- };
1425
- /**
1426
- * @return The result of native validity checking (ValidityState.valid).
1427
- */
1428
- MDCTextFieldFoundation.prototype.isNativeInputValid = function () {
1429
- return this.getNativeInput().validity.valid;
1430
- };
1431
- /**
1432
- * Styles the component based on the validity state.
1433
- */
1434
- MDCTextFieldFoundation.prototype.styleValidity = function (isValid) {
1435
- var INVALID = MDCTextFieldFoundation.cssClasses.INVALID;
1436
- if (isValid) {
1437
- this.adapter.removeClass(INVALID);
1438
- }
1439
- else {
1440
- this.adapter.addClass(INVALID);
1441
- }
1442
- if (this.helperText) {
1443
- this.helperText.setValidity(isValid);
1444
- // We dynamically set or unset aria-describedby for validation helper text
1445
- // only, based on whether the field is valid
1446
- var helperTextValidation = this.helperText.isValidation();
1447
- if (!helperTextValidation) {
1448
- return;
1449
- }
1450
- var helperTextVisible = this.helperText.isVisible();
1451
- var helperTextId = this.helperText.getId();
1452
- if (helperTextVisible && helperTextId) {
1453
- this.adapter.setInputAttr(strings$2.ARIA_DESCRIBEDBY, helperTextId);
1454
- }
1455
- else {
1456
- this.adapter.removeInputAttr(strings$2.ARIA_DESCRIBEDBY);
1457
- }
1458
- }
1459
- };
1460
- /**
1461
- * Styles the component based on the focused state.
1462
- */
1463
- MDCTextFieldFoundation.prototype.styleFocused = function (isFocused) {
1464
- var FOCUSED = MDCTextFieldFoundation.cssClasses.FOCUSED;
1465
- if (isFocused) {
1466
- this.adapter.addClass(FOCUSED);
1467
- }
1468
- else {
1469
- this.adapter.removeClass(FOCUSED);
1470
- }
1471
- };
1472
- /**
1473
- * Styles the component based on the disabled state.
1474
- */
1475
- MDCTextFieldFoundation.prototype.styleDisabled = function (isDisabled) {
1476
- var _a = MDCTextFieldFoundation.cssClasses, DISABLED = _a.DISABLED, INVALID = _a.INVALID;
1477
- if (isDisabled) {
1478
- this.adapter.addClass(DISABLED);
1479
- this.adapter.removeClass(INVALID);
1480
- }
1481
- else {
1482
- this.adapter.removeClass(DISABLED);
1483
- }
1484
- if (this.leadingIcon) {
1485
- this.leadingIcon.setDisabled(isDisabled);
1486
- }
1487
- if (this.trailingIcon) {
1488
- this.trailingIcon.setDisabled(isDisabled);
1489
- }
1490
- };
1491
- /**
1492
- * Styles the component based on the label floating state.
1493
- */
1494
- MDCTextFieldFoundation.prototype.styleFloating = function (isFloating) {
1495
- var LABEL_FLOATING = MDCTextFieldFoundation.cssClasses.LABEL_FLOATING;
1496
- if (isFloating) {
1497
- this.adapter.addClass(LABEL_FLOATING);
1498
- }
1499
- else {
1500
- this.adapter.removeClass(LABEL_FLOATING);
1501
- }
1502
- };
1503
- /**
1504
- * @return The native text input element from the host environment, or an
1505
- * object with the same shape for unit tests.
1506
- */
1507
- MDCTextFieldFoundation.prototype.getNativeInput = function () {
1508
- // this.adapter may be undefined in foundation unit tests. This happens when
1509
- // testdouble is creating a mock object and invokes the
1510
- // shouldShake/shouldFloat getters (which in turn call getValue(), which
1511
- // calls this method) before init() has been called from the MDCTextField
1512
- // constructor. To work around that issue, we return a dummy object.
1513
- var nativeInput = this.adapter ? this.adapter.getNativeInput() : null;
1514
- return nativeInput || {
1515
- disabled: false,
1516
- maxLength: -1,
1517
- required: false,
1518
- type: 'input',
1519
- validity: {
1520
- badInput: false,
1521
- valid: true,
1522
- },
1523
- value: '',
1524
- };
1525
- };
1526
- return MDCTextFieldFoundation;
1527
- }(MDCFoundation));
1528
-
1529
- /**
1530
- * @license
1531
- * Copyright 2016 Google Inc.
1532
- *
1533
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1534
- * of this software and associated documentation files (the "Software"), to deal
1535
- * in the Software without restriction, including without limitation the rights
1536
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1537
- * copies of the Software, and to permit persons to whom the Software is
1538
- * furnished to do so, subject to the following conditions:
1539
- *
1540
- * The above copyright notice and this permission notice shall be included in
1541
- * all copies or substantial portions of the Software.
1542
- *
1543
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1544
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1545
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1546
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1547
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1548
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1549
- * THE SOFTWARE.
1550
- */
1551
- var cssClasses$1 = {
1552
- HELPER_TEXT_PERSISTENT: 'mdc-text-field-helper-text--persistent',
1553
- HELPER_TEXT_VALIDATION_MSG: 'mdc-text-field-helper-text--validation-msg',
1554
- ROOT: 'mdc-text-field-helper-text',
1555
- };
1556
- var strings$1 = {
1557
- ARIA_HIDDEN: 'aria-hidden',
1558
- ROLE: 'role',
1559
- ROOT_SELECTOR: "." + cssClasses$1.ROOT,
1560
- };
1561
-
1562
- /**
1563
- * @license
1564
- * Copyright 2017 Google Inc.
1565
- *
1566
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1567
- * of this software and associated documentation files (the "Software"), to deal
1568
- * in the Software without restriction, including without limitation the rights
1569
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1570
- * copies of the Software, and to permit persons to whom the Software is
1571
- * furnished to do so, subject to the following conditions:
1572
- *
1573
- * The above copyright notice and this permission notice shall be included in
1574
- * all copies or substantial portions of the Software.
1575
- *
1576
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1577
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1578
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1579
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1580
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1581
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1582
- * THE SOFTWARE.
1583
- */
1584
- var MDCTextFieldHelperTextFoundation = /** @class */ (function (_super) {
1585
- __extends(MDCTextFieldHelperTextFoundation, _super);
1586
- function MDCTextFieldHelperTextFoundation(adapter) {
1587
- return _super.call(this, __assign(__assign({}, MDCTextFieldHelperTextFoundation.defaultAdapter), adapter)) || this;
1588
- }
1589
- Object.defineProperty(MDCTextFieldHelperTextFoundation, "cssClasses", {
1590
- get: function () {
1591
- return cssClasses$1;
1592
- },
1593
- enumerable: false,
1594
- configurable: true
1595
- });
1596
- Object.defineProperty(MDCTextFieldHelperTextFoundation, "strings", {
1597
- get: function () {
1598
- return strings$1;
1599
- },
1600
- enumerable: false,
1601
- configurable: true
1602
- });
1603
- Object.defineProperty(MDCTextFieldHelperTextFoundation, "defaultAdapter", {
1604
- /**
1605
- * See {@link MDCTextFieldHelperTextAdapter} for typing information on parameters and return types.
1606
- */
1607
- get: function () {
1608
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
1609
- return {
1610
- addClass: function () { return undefined; },
1611
- removeClass: function () { return undefined; },
1612
- hasClass: function () { return false; },
1613
- getAttr: function () { return null; },
1614
- setAttr: function () { return undefined; },
1615
- removeAttr: function () { return undefined; },
1616
- setContent: function () { return undefined; },
1617
- };
1618
- // tslint:enable:object-literal-sort-keys
1619
- },
1620
- enumerable: false,
1621
- configurable: true
1622
- });
1623
- MDCTextFieldHelperTextFoundation.prototype.getId = function () {
1624
- return this.adapter.getAttr('id');
1625
- };
1626
- MDCTextFieldHelperTextFoundation.prototype.isVisible = function () {
1627
- return this.adapter.getAttr(strings$1.ARIA_HIDDEN) !== 'true';
1628
- };
1629
- /**
1630
- * Sets the content of the helper text field.
1631
- */
1632
- MDCTextFieldHelperTextFoundation.prototype.setContent = function (content) {
1633
- this.adapter.setContent(content);
1634
- };
1635
- MDCTextFieldHelperTextFoundation.prototype.isPersistent = function () {
1636
- return this.adapter.hasClass(cssClasses$1.HELPER_TEXT_PERSISTENT);
1637
- };
1638
- /**
1639
- * @param isPersistent Sets the persistency of the helper text.
1640
- */
1641
- MDCTextFieldHelperTextFoundation.prototype.setPersistent = function (isPersistent) {
1642
- if (isPersistent) {
1643
- this.adapter.addClass(cssClasses$1.HELPER_TEXT_PERSISTENT);
1644
- }
1645
- else {
1646
- this.adapter.removeClass(cssClasses$1.HELPER_TEXT_PERSISTENT);
1647
- }
1648
- };
1649
- /**
1650
- * @return whether the helper text acts as an error validation message.
1651
- */
1652
- MDCTextFieldHelperTextFoundation.prototype.isValidation = function () {
1653
- return this.adapter.hasClass(cssClasses$1.HELPER_TEXT_VALIDATION_MSG);
1654
- };
1655
- /**
1656
- * @param isValidation True to make the helper text act as an error validation message.
1657
- */
1658
- MDCTextFieldHelperTextFoundation.prototype.setValidation = function (isValidation) {
1659
- if (isValidation) {
1660
- this.adapter.addClass(cssClasses$1.HELPER_TEXT_VALIDATION_MSG);
1661
- }
1662
- else {
1663
- this.adapter.removeClass(cssClasses$1.HELPER_TEXT_VALIDATION_MSG);
1664
- }
1665
- };
1666
- /**
1667
- * Makes the helper text visible to the screen reader.
1668
- */
1669
- MDCTextFieldHelperTextFoundation.prototype.showToScreenReader = function () {
1670
- this.adapter.removeAttr(strings$1.ARIA_HIDDEN);
1671
- };
1672
- /**
1673
- * Sets the validity of the helper text based on the input validity.
1674
- */
1675
- MDCTextFieldHelperTextFoundation.prototype.setValidity = function (inputIsValid) {
1676
- var helperTextIsPersistent = this.adapter.hasClass(cssClasses$1.HELPER_TEXT_PERSISTENT);
1677
- var helperTextIsValidationMsg = this.adapter.hasClass(cssClasses$1.HELPER_TEXT_VALIDATION_MSG);
1678
- var validationMsgNeedsDisplay = helperTextIsValidationMsg && !inputIsValid;
1679
- if (validationMsgNeedsDisplay) {
1680
- this.showToScreenReader();
1681
- // If role is already alert, refresh it to trigger another announcement
1682
- // from screenreader.
1683
- if (this.adapter.getAttr(strings$1.ROLE) === 'alert') {
1684
- this.refreshAlertRole();
1685
- }
1686
- else {
1687
- this.adapter.setAttr(strings$1.ROLE, 'alert');
1688
- }
1689
- }
1690
- else {
1691
- this.adapter.removeAttr(strings$1.ROLE);
1692
- }
1693
- if (!helperTextIsPersistent && !validationMsgNeedsDisplay) {
1694
- this.hide();
1695
- }
1696
- };
1697
- /**
1698
- * Hides the help text from screen readers.
1699
- */
1700
- MDCTextFieldHelperTextFoundation.prototype.hide = function () {
1701
- this.adapter.setAttr(strings$1.ARIA_HIDDEN, 'true');
1702
- };
1703
- MDCTextFieldHelperTextFoundation.prototype.refreshAlertRole = function () {
1704
- var _this = this;
1705
- this.adapter.removeAttr(strings$1.ROLE);
1706
- requestAnimationFrame(function () {
1707
- _this.adapter.setAttr(strings$1.ROLE, 'alert');
1708
- });
1709
- };
1710
- return MDCTextFieldHelperTextFoundation;
1711
- }(MDCFoundation));
1712
-
1713
- /**
1714
- * @license
1715
- * Copyright 2017 Google Inc.
1716
- *
1717
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1718
- * of this software and associated documentation files (the "Software"), to deal
1719
- * in the Software without restriction, including without limitation the rights
1720
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1721
- * copies of the Software, and to permit persons to whom the Software is
1722
- * furnished to do so, subject to the following conditions:
1723
- *
1724
- * The above copyright notice and this permission notice shall be included in
1725
- * all copies or substantial portions of the Software.
1726
- *
1727
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1728
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1729
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1730
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1731
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1732
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1733
- * THE SOFTWARE.
1734
- */
1735
- var MDCTextFieldHelperText = /** @class */ (function (_super) {
1736
- __extends(MDCTextFieldHelperText, _super);
1737
- function MDCTextFieldHelperText() {
1738
- return _super !== null && _super.apply(this, arguments) || this;
1739
- }
1740
- MDCTextFieldHelperText.attachTo = function (root) {
1741
- return new MDCTextFieldHelperText(root);
1742
- };
1743
- Object.defineProperty(MDCTextFieldHelperText.prototype, "foundationForTextField", {
1744
- // Provided for access by MDCTextField component
1745
- get: function () {
1746
- return this.foundation;
1747
- },
1748
- enumerable: false,
1749
- configurable: true
1750
- });
1751
- MDCTextFieldHelperText.prototype.getDefaultFoundation = function () {
1752
- var _this = this;
1753
- // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
1754
- // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
1755
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
1756
- var adapter = {
1757
- addClass: function (className) { return _this.root.classList.add(className); },
1758
- removeClass: function (className) { return _this.root.classList.remove(className); },
1759
- hasClass: function (className) { return _this.root.classList.contains(className); },
1760
- getAttr: function (attr) { return _this.root.getAttribute(attr); },
1761
- setAttr: function (attr, value) { return _this.root.setAttribute(attr, value); },
1762
- removeAttr: function (attr) { return _this.root.removeAttribute(attr); },
1763
- setContent: function (content) {
1764
- _this.root.textContent = content;
1765
- },
1766
- };
1767
- // tslint:enable:object-literal-sort-keys
1768
- return new MDCTextFieldHelperTextFoundation(adapter);
1769
- };
1770
- return MDCTextFieldHelperText;
1771
- }(MDCComponent));
1772
-
1773
- /**
1774
- * @license
1775
- * Copyright 2016 Google Inc.
1776
- *
1777
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1778
- * of this software and associated documentation files (the "Software"), to deal
1779
- * in the Software without restriction, including without limitation the rights
1780
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1781
- * copies of the Software, and to permit persons to whom the Software is
1782
- * furnished to do so, subject to the following conditions:
1783
- *
1784
- * The above copyright notice and this permission notice shall be included in
1785
- * all copies or substantial portions of the Software.
1786
- *
1787
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1788
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1789
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1790
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1791
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1792
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1793
- * THE SOFTWARE.
1794
- */
1795
- var strings = {
1796
- ICON_EVENT: 'MDCTextField:icon',
1797
- ICON_ROLE: 'button',
1798
- };
1799
- var cssClasses = {
1800
- ROOT: 'mdc-text-field__icon',
1801
- };
1802
-
1803
- /**
1804
- * @license
1805
- * Copyright 2017 Google Inc.
1806
- *
1807
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1808
- * of this software and associated documentation files (the "Software"), to deal
1809
- * in the Software without restriction, including without limitation the rights
1810
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1811
- * copies of the Software, and to permit persons to whom the Software is
1812
- * furnished to do so, subject to the following conditions:
1813
- *
1814
- * The above copyright notice and this permission notice shall be included in
1815
- * all copies or substantial portions of the Software.
1816
- *
1817
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1818
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1819
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1820
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1821
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1822
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1823
- * THE SOFTWARE.
1824
- */
1825
- var INTERACTION_EVENTS = ['click', 'keydown'];
1826
- var MDCTextFieldIconFoundation = /** @class */ (function (_super) {
1827
- __extends(MDCTextFieldIconFoundation, _super);
1828
- function MDCTextFieldIconFoundation(adapter) {
1829
- var _this = _super.call(this, __assign(__assign({}, MDCTextFieldIconFoundation.defaultAdapter), adapter)) || this;
1830
- _this.savedTabIndex = null;
1831
- _this.interactionHandler = function (evt) {
1832
- _this.handleInteraction(evt);
1833
- };
1834
- return _this;
1835
- }
1836
- Object.defineProperty(MDCTextFieldIconFoundation, "strings", {
1837
- get: function () {
1838
- return strings;
1839
- },
1840
- enumerable: false,
1841
- configurable: true
1842
- });
1843
- Object.defineProperty(MDCTextFieldIconFoundation, "cssClasses", {
1844
- get: function () {
1845
- return cssClasses;
1846
- },
1847
- enumerable: false,
1848
- configurable: true
1849
- });
1850
- Object.defineProperty(MDCTextFieldIconFoundation, "defaultAdapter", {
1851
- /**
1852
- * See {@link MDCTextFieldIconAdapter} for typing information on parameters and return types.
1853
- */
1854
- get: function () {
1855
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
1856
- return {
1857
- getAttr: function () { return null; },
1858
- setAttr: function () { return undefined; },
1859
- removeAttr: function () { return undefined; },
1860
- setContent: function () { return undefined; },
1861
- registerInteractionHandler: function () { return undefined; },
1862
- deregisterInteractionHandler: function () { return undefined; },
1863
- notifyIconAction: function () { return undefined; },
1864
- };
1865
- // tslint:enable:object-literal-sort-keys
1866
- },
1867
- enumerable: false,
1868
- configurable: true
1869
- });
1870
- MDCTextFieldIconFoundation.prototype.init = function () {
1871
- var e_1, _a;
1872
- this.savedTabIndex = this.adapter.getAttr('tabindex');
1873
- try {
1874
- for (var INTERACTION_EVENTS_1 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next(); !INTERACTION_EVENTS_1_1.done; INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next()) {
1875
- var evtType = INTERACTION_EVENTS_1_1.value;
1876
- this.adapter.registerInteractionHandler(evtType, this.interactionHandler);
1877
- }
1878
- }
1879
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1880
- finally {
1881
- try {
1882
- if (INTERACTION_EVENTS_1_1 && !INTERACTION_EVENTS_1_1.done && (_a = INTERACTION_EVENTS_1.return)) _a.call(INTERACTION_EVENTS_1);
1883
- }
1884
- finally { if (e_1) throw e_1.error; }
1885
- }
1886
- };
1887
- MDCTextFieldIconFoundation.prototype.destroy = function () {
1888
- var e_2, _a;
1889
- try {
1890
- for (var INTERACTION_EVENTS_2 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next(); !INTERACTION_EVENTS_2_1.done; INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next()) {
1891
- var evtType = INTERACTION_EVENTS_2_1.value;
1892
- this.adapter.deregisterInteractionHandler(evtType, this.interactionHandler);
1893
- }
1894
- }
1895
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1896
- finally {
1897
- try {
1898
- if (INTERACTION_EVENTS_2_1 && !INTERACTION_EVENTS_2_1.done && (_a = INTERACTION_EVENTS_2.return)) _a.call(INTERACTION_EVENTS_2);
1899
- }
1900
- finally { if (e_2) throw e_2.error; }
1901
- }
1902
- };
1903
- MDCTextFieldIconFoundation.prototype.setDisabled = function (disabled) {
1904
- if (!this.savedTabIndex) {
1905
- return;
1906
- }
1907
- if (disabled) {
1908
- this.adapter.setAttr('tabindex', '-1');
1909
- this.adapter.removeAttr('role');
1910
- }
1911
- else {
1912
- this.adapter.setAttr('tabindex', this.savedTabIndex);
1913
- this.adapter.setAttr('role', strings.ICON_ROLE);
1914
- }
1915
- };
1916
- MDCTextFieldIconFoundation.prototype.setAriaLabel = function (label) {
1917
- this.adapter.setAttr('aria-label', label);
1918
- };
1919
- MDCTextFieldIconFoundation.prototype.setContent = function (content) {
1920
- this.adapter.setContent(content);
1921
- };
1922
- MDCTextFieldIconFoundation.prototype.handleInteraction = function (evt) {
1923
- var isEnterKey = evt.key === 'Enter' || evt.keyCode === 13;
1924
- if (evt.type === 'click' || isEnterKey) {
1925
- evt.preventDefault(); // stop click from causing host label to focus
1926
- // input
1927
- this.adapter.notifyIconAction();
1928
- }
1929
- };
1930
- return MDCTextFieldIconFoundation;
1931
- }(MDCFoundation));
1932
-
1933
- /**
1934
- * @license
1935
- * Copyright 2017 Google Inc.
1936
- *
1937
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1938
- * of this software and associated documentation files (the "Software"), to deal
1939
- * in the Software without restriction, including without limitation the rights
1940
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1941
- * copies of the Software, and to permit persons to whom the Software is
1942
- * furnished to do so, subject to the following conditions:
1943
- *
1944
- * The above copyright notice and this permission notice shall be included in
1945
- * all copies or substantial portions of the Software.
1946
- *
1947
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1948
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1949
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1950
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1951
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1952
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1953
- * THE SOFTWARE.
1954
- */
1955
- var MDCTextFieldIcon = /** @class */ (function (_super) {
1956
- __extends(MDCTextFieldIcon, _super);
1957
- function MDCTextFieldIcon() {
1958
- return _super !== null && _super.apply(this, arguments) || this;
1959
- }
1960
- MDCTextFieldIcon.attachTo = function (root) {
1961
- return new MDCTextFieldIcon(root);
1962
- };
1963
- Object.defineProperty(MDCTextFieldIcon.prototype, "foundationForTextField", {
1964
- // Provided for access by MDCTextField component
1965
- get: function () {
1966
- return this.foundation;
1967
- },
1968
- enumerable: false,
1969
- configurable: true
1970
- });
1971
- MDCTextFieldIcon.prototype.getDefaultFoundation = function () {
1972
- var _this = this;
1973
- // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
1974
- // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
1975
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
1976
- var adapter = {
1977
- getAttr: function (attr) { return _this.root.getAttribute(attr); },
1978
- setAttr: function (attr, value) { return _this.root.setAttribute(attr, value); },
1979
- removeAttr: function (attr) { return _this.root.removeAttribute(attr); },
1980
- setContent: function (content) {
1981
- _this.root.textContent = content;
1982
- },
1983
- registerInteractionHandler: function (evtType, handler) { return _this.listen(evtType, handler); },
1984
- deregisterInteractionHandler: function (evtType, handler) { return _this.unlisten(evtType, handler); },
1985
- notifyIconAction: function () { return _this.emit(MDCTextFieldIconFoundation.strings.ICON_EVENT, {} /* evtData */, true /* shouldBubble */); },
1986
- };
1987
- // tslint:enable:object-literal-sort-keys
1988
- return new MDCTextFieldIconFoundation(adapter);
1989
- };
1990
- return MDCTextFieldIcon;
1991
- }(MDCComponent));
1992
-
1993
- /**
1994
- * @license
1995
- * Copyright 2016 Google Inc.
1996
- *
1997
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1998
- * of this software and associated documentation files (the "Software"), to deal
1999
- * in the Software without restriction, including without limitation the rights
2000
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2001
- * copies of the Software, and to permit persons to whom the Software is
2002
- * furnished to do so, subject to the following conditions:
2003
- *
2004
- * The above copyright notice and this permission notice shall be included in
2005
- * all copies or substantial portions of the Software.
2006
- *
2007
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2008
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2009
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2010
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2011
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2012
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2013
- * THE SOFTWARE.
2014
- */
2015
- var MDCTextField = /** @class */ (function (_super) {
2016
- __extends(MDCTextField, _super);
2017
- function MDCTextField() {
2018
- return _super !== null && _super.apply(this, arguments) || this;
2019
- }
2020
- MDCTextField.attachTo = function (root) {
2021
- return new MDCTextField(root);
2022
- };
2023
- MDCTextField.prototype.initialize = function (rippleFactory, lineRippleFactory, helperTextFactory, characterCounterFactory, iconFactory, labelFactory, outlineFactory) {
2024
- if (rippleFactory === void 0) { rippleFactory = function (el, foundation) { return new MDCRipple(el, foundation); }; }
2025
- if (lineRippleFactory === void 0) { lineRippleFactory = function (el) { return new MDCLineRipple(el); }; }
2026
- if (helperTextFactory === void 0) { helperTextFactory = function (el) {
2027
- return new MDCTextFieldHelperText(el);
2028
- }; }
2029
- if (characterCounterFactory === void 0) { characterCounterFactory = function (el) {
2030
- return new MDCTextFieldCharacterCounter(el);
2031
- }; }
2032
- if (iconFactory === void 0) { iconFactory = function (el) { return new MDCTextFieldIcon(el); }; }
2033
- if (labelFactory === void 0) { labelFactory = function (el) { return new MDCFloatingLabel(el); }; }
2034
- if (outlineFactory === void 0) { outlineFactory = function (el) { return new MDCNotchedOutline(el); }; }
2035
- this.input =
2036
- this.root.querySelector(strings$2.INPUT_SELECTOR);
2037
- var labelElement = this.root.querySelector(strings$2.LABEL_SELECTOR);
2038
- this.label = labelElement ? labelFactory(labelElement) : null;
2039
- var lineRippleElement = this.root.querySelector(strings$2.LINE_RIPPLE_SELECTOR);
2040
- this.lineRipple =
2041
- lineRippleElement ? lineRippleFactory(lineRippleElement) : null;
2042
- var outlineElement = this.root.querySelector(strings$2.OUTLINE_SELECTOR);
2043
- this.outline = outlineElement ? outlineFactory(outlineElement) : null;
2044
- // Helper text
2045
- var helperTextStrings = MDCTextFieldHelperTextFoundation.strings;
2046
- var nextElementSibling = this.root.nextElementSibling;
2047
- var hasHelperLine = (nextElementSibling && nextElementSibling.classList.contains(cssClasses$2.HELPER_LINE));
2048
- var helperTextEl = hasHelperLine && nextElementSibling && nextElementSibling.querySelector(helperTextStrings.ROOT_SELECTOR);
2049
- this.helperText = helperTextEl ? helperTextFactory(helperTextEl) : null;
2050
- // Character counter
2051
- var characterCounterStrings = MDCTextFieldCharacterCounterFoundation.strings;
2052
- var characterCounterEl = this.root.querySelector(characterCounterStrings.ROOT_SELECTOR);
2053
- // If character counter is not found in root element search in sibling element.
2054
- if (!characterCounterEl && hasHelperLine && nextElementSibling) {
2055
- characterCounterEl = nextElementSibling.querySelector(characterCounterStrings.ROOT_SELECTOR);
2056
- }
2057
- this.characterCounter =
2058
- characterCounterEl ? characterCounterFactory(characterCounterEl) : null;
2059
- // Leading icon
2060
- var leadingIconEl = this.root.querySelector(strings$2.LEADING_ICON_SELECTOR);
2061
- this.leadingIcon = leadingIconEl ? iconFactory(leadingIconEl) : null;
2062
- // Trailing icon
2063
- var trailingIconEl = this.root.querySelector(strings$2.TRAILING_ICON_SELECTOR);
2064
- this.trailingIcon = trailingIconEl ? iconFactory(trailingIconEl) : null;
2065
- // Prefix and Suffix
2066
- this.prefix = this.root.querySelector(strings$2.PREFIX_SELECTOR);
2067
- this.suffix = this.root.querySelector(strings$2.SUFFIX_SELECTOR);
2068
- this.ripple = this.createRipple(rippleFactory);
2069
- };
2070
- MDCTextField.prototype.destroy = function () {
2071
- if (this.ripple) {
2072
- this.ripple.destroy();
2073
- }
2074
- if (this.lineRipple) {
2075
- this.lineRipple.destroy();
2076
- }
2077
- if (this.helperText) {
2078
- this.helperText.destroy();
2079
- }
2080
- if (this.characterCounter) {
2081
- this.characterCounter.destroy();
2082
- }
2083
- if (this.leadingIcon) {
2084
- this.leadingIcon.destroy();
2085
- }
2086
- if (this.trailingIcon) {
2087
- this.trailingIcon.destroy();
2088
- }
2089
- if (this.label) {
2090
- this.label.destroy();
2091
- }
2092
- if (this.outline) {
2093
- this.outline.destroy();
2094
- }
2095
- _super.prototype.destroy.call(this);
2096
- };
2097
- /**
2098
- * Initializes the Text Field's internal state based on the environment's
2099
- * state.
2100
- */
2101
- MDCTextField.prototype.initialSyncWithDOM = function () {
2102
- this.disabled = this.input.disabled;
2103
- };
2104
- Object.defineProperty(MDCTextField.prototype, "value", {
2105
- get: function () {
2106
- return this.foundation.getValue();
2107
- },
2108
- /**
2109
- * @param value The value to set on the input.
2110
- */
2111
- set: function (value) {
2112
- this.foundation.setValue(value);
2113
- },
2114
- enumerable: false,
2115
- configurable: true
2116
- });
2117
- Object.defineProperty(MDCTextField.prototype, "disabled", {
2118
- get: function () {
2119
- return this.foundation.isDisabled();
2120
- },
2121
- /**
2122
- * @param disabled Sets the Text Field disabled or enabled.
2123
- */
2124
- set: function (disabled) {
2125
- this.foundation.setDisabled(disabled);
2126
- },
2127
- enumerable: false,
2128
- configurable: true
2129
- });
2130
- Object.defineProperty(MDCTextField.prototype, "valid", {
2131
- get: function () {
2132
- return this.foundation.isValid();
2133
- },
2134
- /**
2135
- * @param valid Sets the Text Field valid or invalid.
2136
- */
2137
- set: function (valid) {
2138
- this.foundation.setValid(valid);
2139
- },
2140
- enumerable: false,
2141
- configurable: true
2142
- });
2143
- Object.defineProperty(MDCTextField.prototype, "required", {
2144
- get: function () {
2145
- return this.input.required;
2146
- },
2147
- /**
2148
- * @param required Sets the Text Field to required.
2149
- */
2150
- set: function (required) {
2151
- this.input.required = required;
2152
- },
2153
- enumerable: false,
2154
- configurable: true
2155
- });
2156
- Object.defineProperty(MDCTextField.prototype, "pattern", {
2157
- get: function () {
2158
- return this.input.pattern;
2159
- },
2160
- /**
2161
- * @param pattern Sets the input element's validation pattern.
2162
- */
2163
- set: function (pattern) {
2164
- this.input.pattern = pattern;
2165
- },
2166
- enumerable: false,
2167
- configurable: true
2168
- });
2169
- Object.defineProperty(MDCTextField.prototype, "minLength", {
2170
- get: function () {
2171
- return this.input.minLength;
2172
- },
2173
- /**
2174
- * @param minLength Sets the input element's minLength.
2175
- */
2176
- set: function (minLength) {
2177
- this.input.minLength = minLength;
2178
- },
2179
- enumerable: false,
2180
- configurable: true
2181
- });
2182
- Object.defineProperty(MDCTextField.prototype, "maxLength", {
2183
- get: function () {
2184
- return this.input.maxLength;
2185
- },
2186
- /**
2187
- * @param maxLength Sets the input element's maxLength.
2188
- */
2189
- set: function (maxLength) {
2190
- // Chrome throws exception if maxLength is set to a value less than zero
2191
- if (maxLength < 0) {
2192
- this.input.removeAttribute('maxLength');
2193
- }
2194
- else {
2195
- this.input.maxLength = maxLength;
2196
- }
2197
- },
2198
- enumerable: false,
2199
- configurable: true
2200
- });
2201
- Object.defineProperty(MDCTextField.prototype, "min", {
2202
- get: function () {
2203
- return this.input.min;
2204
- },
2205
- /**
2206
- * @param min Sets the input element's min.
2207
- */
2208
- set: function (min) {
2209
- this.input.min = min;
2210
- },
2211
- enumerable: false,
2212
- configurable: true
2213
- });
2214
- Object.defineProperty(MDCTextField.prototype, "max", {
2215
- get: function () {
2216
- return this.input.max;
2217
- },
2218
- /**
2219
- * @param max Sets the input element's max.
2220
- */
2221
- set: function (max) {
2222
- this.input.max = max;
2223
- },
2224
- enumerable: false,
2225
- configurable: true
2226
- });
2227
- Object.defineProperty(MDCTextField.prototype, "step", {
2228
- get: function () {
2229
- return this.input.step;
2230
- },
2231
- /**
2232
- * @param step Sets the input element's step.
2233
- */
2234
- set: function (step) {
2235
- this.input.step = step;
2236
- },
2237
- enumerable: false,
2238
- configurable: true
2239
- });
2240
- Object.defineProperty(MDCTextField.prototype, "helperTextContent", {
2241
- /**
2242
- * Sets the helper text element content.
2243
- */
2244
- set: function (content) {
2245
- this.foundation.setHelperTextContent(content);
2246
- },
2247
- enumerable: false,
2248
- configurable: true
2249
- });
2250
- Object.defineProperty(MDCTextField.prototype, "leadingIconAriaLabel", {
2251
- /**
2252
- * Sets the aria label of the leading icon.
2253
- */
2254
- set: function (label) {
2255
- this.foundation.setLeadingIconAriaLabel(label);
2256
- },
2257
- enumerable: false,
2258
- configurable: true
2259
- });
2260
- Object.defineProperty(MDCTextField.prototype, "leadingIconContent", {
2261
- /**
2262
- * Sets the text content of the leading icon.
2263
- */
2264
- set: function (content) {
2265
- this.foundation.setLeadingIconContent(content);
2266
- },
2267
- enumerable: false,
2268
- configurable: true
2269
- });
2270
- Object.defineProperty(MDCTextField.prototype, "trailingIconAriaLabel", {
2271
- /**
2272
- * Sets the aria label of the trailing icon.
2273
- */
2274
- set: function (label) {
2275
- this.foundation.setTrailingIconAriaLabel(label);
2276
- },
2277
- enumerable: false,
2278
- configurable: true
2279
- });
2280
- Object.defineProperty(MDCTextField.prototype, "trailingIconContent", {
2281
- /**
2282
- * Sets the text content of the trailing icon.
2283
- */
2284
- set: function (content) {
2285
- this.foundation.setTrailingIconContent(content);
2286
- },
2287
- enumerable: false,
2288
- configurable: true
2289
- });
2290
- Object.defineProperty(MDCTextField.prototype, "useNativeValidation", {
2291
- /**
2292
- * Enables or disables the use of native validation. Use this for custom validation.
2293
- * @param useNativeValidation Set this to false to ignore native input validation.
2294
- */
2295
- set: function (useNativeValidation) {
2296
- this.foundation.setUseNativeValidation(useNativeValidation);
2297
- },
2298
- enumerable: false,
2299
- configurable: true
2300
- });
2301
- Object.defineProperty(MDCTextField.prototype, "prefixText", {
2302
- /**
2303
- * Gets the text content of the prefix, or null if it does not exist.
2304
- */
2305
- get: function () {
2306
- return this.prefix ? this.prefix.textContent : null;
2307
- },
2308
- /**
2309
- * Sets the text content of the prefix, if it exists.
2310
- */
2311
- set: function (prefixText) {
2312
- if (this.prefix) {
2313
- this.prefix.textContent = prefixText;
2314
- }
2315
- },
2316
- enumerable: false,
2317
- configurable: true
2318
- });
2319
- Object.defineProperty(MDCTextField.prototype, "suffixText", {
2320
- /**
2321
- * Gets the text content of the suffix, or null if it does not exist.
2322
- */
2323
- get: function () {
2324
- return this.suffix ? this.suffix.textContent : null;
2325
- },
2326
- /**
2327
- * Sets the text content of the suffix, if it exists.
2328
- */
2329
- set: function (suffixText) {
2330
- if (this.suffix) {
2331
- this.suffix.textContent = suffixText;
2332
- }
2333
- },
2334
- enumerable: false,
2335
- configurable: true
2336
- });
2337
- /**
2338
- * Focuses the input element.
2339
- */
2340
- MDCTextField.prototype.focus = function () {
2341
- this.input.focus();
2342
- };
2343
- /**
2344
- * Recomputes the outline SVG path for the outline element.
2345
- */
2346
- MDCTextField.prototype.layout = function () {
2347
- var openNotch = this.foundation.shouldFloat;
2348
- this.foundation.notchOutline(openNotch);
2349
- };
2350
- MDCTextField.prototype.getDefaultFoundation = function () {
2351
- // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
2352
- // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
2353
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
2354
- var adapter = __assign(__assign(__assign(__assign(__assign({}, this.getRootAdapterMethods()), this.getInputAdapterMethods()), this.getLabelAdapterMethods()), this.getLineRippleAdapterMethods()), this.getOutlineAdapterMethods());
2355
- // tslint:enable:object-literal-sort-keys
2356
- return new MDCTextFieldFoundation(adapter, this.getFoundationMap());
2357
- };
2358
- MDCTextField.prototype.getRootAdapterMethods = function () {
2359
- var _this = this;
2360
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
2361
- return {
2362
- addClass: function (className) { return _this.root.classList.add(className); },
2363
- removeClass: function (className) { return _this.root.classList.remove(className); },
2364
- hasClass: function (className) { return _this.root.classList.contains(className); },
2365
- registerTextFieldInteractionHandler: function (evtType, handler) {
2366
- _this.listen(evtType, handler);
2367
- },
2368
- deregisterTextFieldInteractionHandler: function (evtType, handler) {
2369
- _this.unlisten(evtType, handler);
2370
- },
2371
- registerValidationAttributeChangeHandler: function (handler) {
2372
- var getAttributesList = function (mutationsList) {
2373
- return mutationsList
2374
- .map(function (mutation) { return mutation.attributeName; })
2375
- .filter(function (attributeName) { return attributeName; });
2376
- };
2377
- var observer = new MutationObserver(function (mutationsList) { return handler(getAttributesList(mutationsList)); });
2378
- var config = { attributes: true };
2379
- observer.observe(_this.input, config);
2380
- return observer;
2381
- },
2382
- deregisterValidationAttributeChangeHandler: function (observer) {
2383
- observer.disconnect();
2384
- },
2385
- };
2386
- // tslint:enable:object-literal-sort-keys
2387
- };
2388
- MDCTextField.prototype.getInputAdapterMethods = function () {
2389
- var _this = this;
2390
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
2391
- return {
2392
- getNativeInput: function () { return _this.input; },
2393
- setInputAttr: function (attr, value) {
2394
- _this.input.setAttribute(attr, value);
2395
- },
2396
- removeInputAttr: function (attr) {
2397
- _this.input.removeAttribute(attr);
2398
- },
2399
- isFocused: function () { return document.activeElement === _this.input; },
2400
- registerInputInteractionHandler: function (evtType, handler) {
2401
- _this.input.addEventListener(evtType, handler, applyPassive());
2402
- },
2403
- deregisterInputInteractionHandler: function (evtType, handler) {
2404
- _this.input.removeEventListener(evtType, handler, applyPassive());
2405
- },
2406
- };
2407
- // tslint:enable:object-literal-sort-keys
2408
- };
2409
- MDCTextField.prototype.getLabelAdapterMethods = function () {
2410
- var _this = this;
2411
- return {
2412
- floatLabel: function (shouldFloat) {
2413
- _this.label && _this.label.float(shouldFloat);
2414
- },
2415
- getLabelWidth: function () { return _this.label ? _this.label.getWidth() : 0; },
2416
- hasLabel: function () { return Boolean(_this.label); },
2417
- shakeLabel: function (shouldShake) {
2418
- _this.label && _this.label.shake(shouldShake);
2419
- },
2420
- setLabelRequired: function (isRequired) {
2421
- _this.label && _this.label.setRequired(isRequired);
2422
- },
2423
- };
2424
- };
2425
- MDCTextField.prototype.getLineRippleAdapterMethods = function () {
2426
- var _this = this;
2427
- return {
2428
- activateLineRipple: function () {
2429
- if (_this.lineRipple) {
2430
- _this.lineRipple.activate();
2431
- }
2432
- },
2433
- deactivateLineRipple: function () {
2434
- if (_this.lineRipple) {
2435
- _this.lineRipple.deactivate();
2436
- }
2437
- },
2438
- setLineRippleTransformOrigin: function (normalizedX) {
2439
- if (_this.lineRipple) {
2440
- _this.lineRipple.setRippleCenter(normalizedX);
2441
- }
2442
- },
2443
- };
2444
- };
2445
- MDCTextField.prototype.getOutlineAdapterMethods = function () {
2446
- var _this = this;
2447
- return {
2448
- closeOutline: function () {
2449
- _this.outline && _this.outline.closeNotch();
2450
- },
2451
- hasOutline: function () { return Boolean(_this.outline); },
2452
- notchOutline: function (labelWidth) {
2453
- _this.outline && _this.outline.notch(labelWidth);
2454
- },
2455
- };
2456
- };
2457
- /**
2458
- * @return A map of all subcomponents to subfoundations.
2459
- */
2460
- MDCTextField.prototype.getFoundationMap = function () {
2461
- return {
2462
- characterCounter: this.characterCounter ?
2463
- this.characterCounter.foundationForTextField :
2464
- undefined,
2465
- helperText: this.helperText ? this.helperText.foundationForTextField :
2466
- undefined,
2467
- leadingIcon: this.leadingIcon ? this.leadingIcon.foundationForTextField :
2468
- undefined,
2469
- trailingIcon: this.trailingIcon ?
2470
- this.trailingIcon.foundationForTextField :
2471
- undefined,
2472
- };
2473
- };
2474
- MDCTextField.prototype.createRipple = function (rippleFactory) {
2475
- var _this = this;
2476
- var isTextArea = this.root.classList.contains(cssClasses$2.TEXTAREA);
2477
- var isOutlined = this.root.classList.contains(cssClasses$2.OUTLINED);
2478
- if (isTextArea || isOutlined) {
2479
- return null;
2480
- }
2481
- // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
2482
- // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
2483
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
2484
- var adapter = __assign(__assign({}, MDCRipple.createAdapter(this)), { isSurfaceActive: function () { return matches(_this.input, ':active'); }, registerInteractionHandler: function (evtType, handler) {
2485
- _this.input.addEventListener(evtType, handler, applyPassive());
2486
- }, deregisterInteractionHandler: function (evtType, handler) {
2487
- _this.input.removeEventListener(evtType, handler, applyPassive());
2488
- } });
2489
- // tslint:enable:object-literal-sort-keys
2490
- return rippleFactory(this.root, new MDCRippleFoundation(adapter));
2491
- };
2492
- return MDCTextField;
2493
- }(MDCComponent));
2494
-
2495
- var intlTelInput$1 = createCommonjsModule(function (module) {
2496
- /*
2497
- * International Telephone Input v18.5.3
2498
- * https://github.com/jackocnr/intl-tel-input.git
2499
- * Licensed under the MIT license
2500
- */
2501
-
2502
- // wrap in UMD
2503
- (function(factory) {
2504
- if (module.exports) module.exports = factory(); else window.intlTelInput = factory();
2505
- })(function(undefined$1) {
2506
- return function() {
2507
- // Array of country objects for the flag dropdown.
2508
- // Here is the criteria for the plugin to support a given country/territory
2509
- // - It has an iso2 code: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
2510
- // - It has it's own country calling code (it is not a sub-region of another country): https://en.wikipedia.org/wiki/List_of_country_calling_codes
2511
- // - It has a flag in the region-flags project: https://github.com/behdad/region-flags/tree/gh-pages/png
2512
- // - It is supported by libphonenumber (it must be listed on this page): https://github.com/googlei18n/libphonenumber/blob/master/resources/ShortNumberMetadata.xml
2513
- // Each country array has the following information:
2514
- // [
2515
- // Country name,
2516
- // iso2 code,
2517
- // International dial code,
2518
- // Order (if >1 country with same dial code),
2519
- // Area codes
2520
- // ]
2521
- var allCountries = [ [ "Afghanistan", "af", "93" ], [ "Albania", "al", "355" ], [ "Algeria", "dz", "213" ], [ "American Samoa", "as", "1", 5, [ "684" ] ], [ "Andorra", "ad", "376" ], [ "Angola", "ao", "244" ], [ "Anguilla", "ai", "1", 6, [ "264" ] ], [ "Antigua & Barbuda", "ag", "1", 7, [ "268" ] ], [ "Argentina", "ar", "54" ], [ "Armenia", "am", "374" ], [ "Aruba", "aw", "297" ], [ "Ascension Island", "ac", "247" ], [ "Australia", "au", "61", 0 ], [ "Austria", "at", "43" ], [ "Azerbaijan", "az", "994" ], [ "Bahamas", "bs", "1", 8, [ "242" ] ], [ "Bahrain", "bh", "973" ], [ "Bangladesh", "bd", "880" ], [ "Barbados", "bb", "1", 9, [ "246" ] ], [ "Belarus", "by", "375" ], [ "Belgium", "be", "32" ], [ "Belize", "bz", "501" ], [ "Benin", "bj", "229" ], [ "Bermuda", "bm", "1", 10, [ "441" ] ], [ "Bhutan", "bt", "975" ], [ "Bolivia", "bo", "591" ], [ "Bosnia & Herzegovina", "ba", "387" ], [ "Botswana", "bw", "267" ], [ "Brazil", "br", "55" ], [ "British Indian Ocean Territory", "io", "246" ], [ "British Virgin Islands", "vg", "1", 11, [ "284" ] ], [ "Brunei", "bn", "673" ], [ "Bulgaria", "bg", "359" ], [ "Burkina Faso", "bf", "226" ], [ "Burundi", "bi", "257" ], [ "Cambodia", "kh", "855" ], [ "Cameroon", "cm", "237" ], [ "Canada", "ca", "1", 1, [ "204", "226", "236", "249", "250", "263", "289", "306", "343", "354", "365", "367", "368", "382", "387", "403", "416", "418", "428", "431", "437", "438", "450", "584", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905" ] ], [ "Cape Verde", "cv", "238" ], [ "Caribbean Netherlands", "bq", "599", 1, [ "3", "4", "7" ] ], [ "Cayman Islands", "ky", "1", 12, [ "345" ] ], [ "Central African Republic", "cf", "236" ], [ "Chad", "td", "235" ], [ "Chile", "cl", "56" ], [ "China", "cn", "86" ], [ "Christmas Island", "cx", "61", 2, [ "89164" ] ], [ "Cocos (Keeling) Islands", "cc", "61", 1, [ "89162" ] ], [ "Colombia", "co", "57" ], [ "Comoros", "km", "269" ], [ "Congo - Brazzaville", "cg", "242" ], [ "Congo - Kinshasa", "cd", "243" ], [ "Cook Islands", "ck", "682" ], [ "Costa Rica", "cr", "506" ], [ "Côte d’Ivoire", "ci", "225" ], [ "Croatia", "hr", "385" ], [ "Cuba", "cu", "53" ], [ "Curaçao", "cw", "599", 0 ], [ "Cyprus", "cy", "357" ], [ "Czech Republic", "cz", "420" ], [ "Denmark", "dk", "45" ], [ "Djibouti", "dj", "253" ], [ "Dominica", "dm", "1", 13, [ "767" ] ], [ "Dominican Republic", "do", "1", 2, [ "809", "829", "849" ] ], [ "Ecuador", "ec", "593" ], [ "Egypt", "eg", "20" ], [ "El Salvador", "sv", "503" ], [ "Equatorial Guinea", "gq", "240" ], [ "Eritrea", "er", "291" ], [ "Estonia", "ee", "372" ], [ "Eswatini", "sz", "268" ], [ "Ethiopia", "et", "251" ], [ "Falkland Islands", "fk", "500" ], [ "Faroe Islands", "fo", "298" ], [ "Fiji", "fj", "679" ], [ "Finland", "fi", "358", 0 ], [ "France", "fr", "33" ], [ "French Guiana", "gf", "594" ], [ "French Polynesia", "pf", "689" ], [ "Gabon", "ga", "241" ], [ "Gambia", "gm", "220" ], [ "Georgia", "ge", "995" ], [ "Germany", "de", "49" ], [ "Ghana", "gh", "233" ], [ "Gibraltar", "gi", "350" ], [ "Greece", "gr", "30" ], [ "Greenland", "gl", "299" ], [ "Grenada", "gd", "1", 14, [ "473" ] ], [ "Guadeloupe", "gp", "590", 0 ], [ "Guam", "gu", "1", 15, [ "671" ] ], [ "Guatemala", "gt", "502" ], [ "Guernsey", "gg", "44", 1, [ "1481", "7781", "7839", "7911" ] ], [ "Guinea", "gn", "224" ], [ "Guinea-Bissau", "gw", "245" ], [ "Guyana", "gy", "592" ], [ "Haiti", "ht", "509" ], [ "Honduras", "hn", "504" ], [ "Hong Kong", "hk", "852" ], [ "Hungary", "hu", "36" ], [ "Iceland", "is", "354" ], [ "India", "in", "91" ], [ "Indonesia", "id", "62" ], [ "Iran", "ir", "98" ], [ "Iraq", "iq", "964" ], [ "Ireland", "ie", "353" ], [ "Isle of Man", "im", "44", 2, [ "1624", "74576", "7524", "7924", "7624" ] ], [ "Israel", "il", "972" ], [ "Italy", "it", "39", 0 ], [ "Jamaica", "jm", "1", 4, [ "876", "658" ] ], [ "Japan", "jp", "81" ], [ "Jersey", "je", "44", 3, [ "1534", "7509", "7700", "7797", "7829", "7937" ] ], [ "Jordan", "jo", "962" ], [ "Kazakhstan", "kz", "7", 1, [ "33", "7" ] ], [ "Kenya", "ke", "254" ], [ "Kiribati", "ki", "686" ], [ "Kosovo", "xk", "383" ], [ "Kuwait", "kw", "965" ], [ "Kyrgyzstan", "kg", "996" ], [ "Laos", "la", "856" ], [ "Latvia", "lv", "371" ], [ "Lebanon", "lb", "961" ], [ "Lesotho", "ls", "266" ], [ "Liberia", "lr", "231" ], [ "Libya", "ly", "218" ], [ "Liechtenstein", "li", "423" ], [ "Lithuania", "lt", "370" ], [ "Luxembourg", "lu", "352" ], [ "Macau", "mo", "853" ], [ "Madagascar", "mg", "261" ], [ "Malawi", "mw", "265" ], [ "Malaysia", "my", "60" ], [ "Maldives", "mv", "960" ], [ "Mali", "ml", "223" ], [ "Malta", "mt", "356" ], [ "Marshall Islands", "mh", "692" ], [ "Martinique", "mq", "596" ], [ "Mauritania", "mr", "222" ], [ "Mauritius", "mu", "230" ], [ "Mayotte", "yt", "262", 1, [ "269", "639" ] ], [ "Mexico", "mx", "52" ], [ "Micronesia", "fm", "691" ], [ "Moldova", "md", "373" ], [ "Monaco", "mc", "377" ], [ "Mongolia", "mn", "976" ], [ "Montenegro", "me", "382" ], [ "Montserrat", "ms", "1", 16, [ "664" ] ], [ "Morocco", "ma", "212", 0 ], [ "Mozambique", "mz", "258" ], [ "Myanmar (Burma)", "mm", "95" ], [ "Namibia", "na", "264" ], [ "Nauru", "nr", "674" ], [ "Nepal", "np", "977" ], [ "Netherlands", "nl", "31" ], [ "New Caledonia", "nc", "687" ], [ "New Zealand", "nz", "64" ], [ "Nicaragua", "ni", "505" ], [ "Niger", "ne", "227" ], [ "Nigeria", "ng", "234" ], [ "Niue", "nu", "683" ], [ "Norfolk Island", "nf", "672" ], [ "North Korea", "kp", "850" ], [ "North Macedonia", "mk", "389" ], [ "Northern Mariana Islands", "mp", "1", 17, [ "670" ] ], [ "Norway", "no", "47", 0 ], [ "Oman", "om", "968" ], [ "Pakistan", "pk", "92" ], [ "Palau", "pw", "680" ], [ "Palestine", "ps", "970" ], [ "Panama", "pa", "507" ], [ "Papua New Guinea", "pg", "675" ], [ "Paraguay", "py", "595" ], [ "Peru", "pe", "51" ], [ "Philippines", "ph", "63" ], [ "Poland", "pl", "48" ], [ "Portugal", "pt", "351" ], [ "Puerto Rico", "pr", "1", 3, [ "787", "939" ] ], [ "Qatar", "qa", "974" ], [ "Réunion", "re", "262", 0 ], [ "Romania", "ro", "40" ], [ "Russia", "ru", "7", 0 ], [ "Rwanda", "rw", "250" ], [ "Samoa", "ws", "685" ], [ "San Marino", "sm", "378" ], [ "São Tomé & Príncipe", "st", "239" ], [ "Saudi Arabia", "sa", "966" ], [ "Senegal", "sn", "221" ], [ "Serbia", "rs", "381" ], [ "Seychelles", "sc", "248" ], [ "Sierra Leone", "sl", "232" ], [ "Singapore", "sg", "65" ], [ "Sint Maarten", "sx", "1", 21, [ "721" ] ], [ "Slovakia", "sk", "421" ], [ "Slovenia", "si", "386" ], [ "Solomon Islands", "sb", "677" ], [ "Somalia", "so", "252" ], [ "South Africa", "za", "27" ], [ "South Korea", "kr", "82" ], [ "South Sudan", "ss", "211" ], [ "Spain", "es", "34" ], [ "Sri Lanka", "lk", "94" ], [ "St Barthélemy", "bl", "590", 1 ], [ "St Helena", "sh", "290" ], [ "St Kitts & Nevis", "kn", "1", 18, [ "869" ] ], [ "St Lucia", "lc", "1", 19, [ "758" ] ], [ "St Martin", "mf", "590", 2 ], [ "St Pierre & Miquelon", "pm", "508" ], [ "St Vincent & Grenadines", "vc", "1", 20, [ "784" ] ], [ "Sudan", "sd", "249" ], [ "Suriname", "sr", "597" ], [ "Svalbard & Jan Mayen", "sj", "47", 1, [ "79" ] ], [ "Sweden", "se", "46" ], [ "Switzerland", "ch", "41" ], [ "Syria", "sy", "963" ], [ "Taiwan", "tw", "886" ], [ "Tajikistan", "tj", "992" ], [ "Tanzania", "tz", "255" ], [ "Thailand", "th", "66" ], [ "Timor-Leste", "tl", "670" ], [ "Togo", "tg", "228" ], [ "Tokelau", "tk", "690" ], [ "Tonga", "to", "676" ], [ "Trinidad & Tobago", "tt", "1", 22, [ "868" ] ], [ "Tunisia", "tn", "216" ], [ "Turkey", "tr", "90" ], [ "Turkmenistan", "tm", "993" ], [ "Turks & Caicos Islands", "tc", "1", 23, [ "649" ] ], [ "Tuvalu", "tv", "688" ], [ "Uganda", "ug", "256" ], [ "Ukraine", "ua", "380" ], [ "United Arab Emirates", "ae", "971" ], [ "United Kingdom", "gb", "44", 0 ], [ "United States", "us", "1", 0 ], [ "Uruguay", "uy", "598" ], [ "US Virgin Islands", "vi", "1", 24, [ "340" ] ], [ "Uzbekistan", "uz", "998" ], [ "Vanuatu", "vu", "678" ], [ "Vatican City", "va", "39", 1, [ "06698" ] ], [ "Venezuela", "ve", "58" ], [ "Vietnam", "vn", "84" ], [ "Wallis & Futuna", "wf", "681" ], [ "Western Sahara", "eh", "212", 1, [ "5288", "5289" ] ], [ "Yemen", "ye", "967" ], [ "Zambia", "zm", "260" ], [ "Zimbabwe", "zw", "263" ], [ "Åland Islands", "ax", "358", 1, [ "18" ] ] ];
2522
- // loop over all of the countries above, restructuring the data to be objects with named keys
2523
- for (var i = 0; i < allCountries.length; i++) {
2524
- var c = allCountries[i];
2525
- allCountries[i] = {
2526
- name: c[0],
2527
- iso2: c[1],
2528
- dialCode: c[2],
2529
- priority: c[3] || 0,
2530
- areaCodes: c[4] || null
2531
- };
2532
- }
2533
- function _objectSpread(target) {
2534
- for (var i = 1; i < arguments.length; i++) {
2535
- var source = arguments[i] != null ? Object(arguments[i]) : {};
2536
- var ownKeys = Object.keys(source);
2537
- if (typeof Object.getOwnPropertySymbols === "function") {
2538
- ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function(sym) {
2539
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2540
- }));
2541
- }
2542
- ownKeys.forEach(function(key) {
2543
- _defineProperty(target, key, source[key]);
2544
- });
2545
- }
2546
- return target;
2547
- }
2548
- function _defineProperty(obj, key, value) {
2549
- key = _toPropertyKey(key);
2550
- if (key in obj) {
2551
- Object.defineProperty(obj, key, {
2552
- value: value,
2553
- enumerable: true,
2554
- configurable: true,
2555
- writable: true
2556
- });
2557
- } else {
2558
- obj[key] = value;
2559
- }
2560
- return obj;
2561
- }
2562
- function _classCallCheck(instance, Constructor) {
2563
- if (!(instance instanceof Constructor)) {
2564
- throw new TypeError("Cannot call a class as a function");
2565
- }
2566
- }
2567
- function _defineProperties(target, props) {
2568
- for (var i = 0; i < props.length; i++) {
2569
- var descriptor = props[i];
2570
- descriptor.enumerable = descriptor.enumerable || false;
2571
- descriptor.configurable = true;
2572
- if ("value" in descriptor) descriptor.writable = true;
2573
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
2574
- }
2575
- }
2576
- function _createClass(Constructor, protoProps, staticProps) {
2577
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
2578
- if (staticProps) _defineProperties(Constructor, staticProps);
2579
- Object.defineProperty(Constructor, "prototype", {
2580
- writable: false
2581
- });
2582
- return Constructor;
2583
- }
2584
- function _toPropertyKey(arg) {
2585
- var key = _toPrimitive(arg, "string");
2586
- return typeof key === "symbol" ? key : String(key);
2587
- }
2588
- function _toPrimitive(input, hint) {
2589
- if (typeof input !== "object" || input === null) return input;
2590
- var prim = input[Symbol.toPrimitive];
2591
- if (prim !== undefined$1) {
2592
- var res = prim.call(input, hint || "default");
2593
- if (typeof res !== "object") return res;
2594
- throw new TypeError("@@toPrimitive must return a primitive value.");
2595
- }
2596
- return (hint === "string" ? String : Number)(input);
2597
- }
2598
- var intlTelInputGlobals = {
2599
- getInstance: function getInstance(input) {
2600
- var id = input.getAttribute("data-intl-tel-input-id");
2601
- return window.intlTelInputGlobals.instances[id];
2602
- },
2603
- instances: {},
2604
- // using a global like this allows us to mock it in the tests
2605
- documentReady: function documentReady() {
2606
- return document.readyState === "complete";
2607
- }
2608
- };
2609
- if (typeof window === "object") {
2610
- window.intlTelInputGlobals = intlTelInputGlobals;
2611
- }
2612
- // these vars persist through all instances of the plugin
2613
- var id = 0;
2614
- var defaults = {
2615
- // whether or not to allow the dropdown
2616
- allowDropdown: true,
2617
- // auto insert dial code (A) on init, (B) on user selecting a country, (C) on calling setCountry
2618
- // also listen for blur/submit and auto remove dial code if that's all there is
2619
- autoInsertDialCode: false,
2620
- // add a placeholder in the input with an example number for the selected country
2621
- autoPlaceholder: "polite",
2622
- // add a country search input at the top of the dropdown
2623
- countrySearch: false,
2624
- // modify the parentClass
2625
- customContainer: "",
2626
- // modify the auto placeholder
2627
- customPlaceholder: null,
2628
- // append menu to specified element
2629
- dropdownContainer: null,
2630
- // don't display these countries
2631
- excludeCountries: [],
2632
- // fix the dropdown width to the input width (rather than being as wide as the longest country name)
2633
- fixDropdownWidth: false,
2634
- // format the input value during initialisation and on setNumber
2635
- formatOnDisplay: true,
2636
- // geoIp lookup function
2637
- geoIpLookup: null,
2638
- // inject a hidden input with this name, and on submit, populate it with the result of getNumber
2639
- hiddenInput: "",
2640
- // initial country
2641
- initialCountry: "",
2642
- // localized country names e.g. { 'de': 'Deutschland' }
2643
- localizedCountries: null,
2644
- // national vs international formatting for numbers e.g. placeholders and displaying existing numbers
2645
- nationalMode: true,
2646
- // display only these countries
2647
- onlyCountries: [],
2648
- // number type to use for placeholders
2649
- placeholderNumberType: "MOBILE",
2650
- // the countries at the top of the list. defaults to united states and united kingdom
2651
- preferredCountries: [ "us", "gb" ],
2652
- // display the country dial code next to the selected flag
2653
- separateDialCode: false,
2654
- // option to hide the flags - must be used with separateDialCode, or allowDropdown=false
2655
- showFlags: true,
2656
- // use full screen popup instead of dropdown for country list
2657
- useFullscreenPopup: typeof navigator !== "undefined" && typeof window !== "undefined" ? // we cannot just test screen size as some smartphones/website meta tags will report desktop
2658
- // resolutions
2659
- // Note: to target Android Mobiles (and not Tablets), we must find 'Android' and 'Mobile'
2660
- /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 500 : false,
2661
- // specify the path to the libphonenumber script to enable validation/formatting
2662
- utilsScript: ""
2663
- };
2664
- // https://en.wikipedia.org/wiki/List_of_North_American_Numbering_Plan_area_codes#Non-geographic_area_codes
2665
- var regionlessNanpNumbers = [ "800", "822", "833", "844", "855", "866", "877", "880", "881", "882", "883", "884", "885", "886", "887", "888", "889" ];
2666
- // utility function to iterate over an object. can't use Object.entries or native forEach because
2667
- // of IE11
2668
- var forEachProp = function forEachProp(obj, callback) {
2669
- var keys = Object.keys(obj);
2670
- for (var i = 0; i < keys.length; i++) {
2671
- callback(keys[i], obj[keys[i]]);
2672
- }
2673
- };
2674
- // run a method on each instance of the plugin
2675
- var forEachInstance = function forEachInstance(method) {
2676
- forEachProp(window.intlTelInputGlobals.instances, function(key) {
2677
- window.intlTelInputGlobals.instances[key][method]();
2678
- });
2679
- };
2680
- // this is our plugin class that we will create an instance of
2681
- // eslint-disable-next-line no-unused-vars
2682
- var Iti = /*#__PURE__*/ function() {
2683
- function Iti(input, options) {
2684
- var _this = this;
2685
- _classCallCheck(this, Iti);
2686
- this.id = id++;
2687
- this.telInput = input;
2688
- this.activeItem = null;
2689
- this.highlightedItem = null;
2690
- // process specified options / defaults
2691
- // alternative to Object.assign, which isn't supported by IE11
2692
- var customOptions = options || {};
2693
- this.options = {};
2694
- forEachProp(defaults, function(key, value) {
2695
- _this.options[key] = customOptions.hasOwnProperty(key) ? customOptions[key] : value;
2696
- });
2697
- this.hadInitialPlaceholder = Boolean(input.getAttribute("placeholder"));
2698
- }
2699
- _createClass(Iti, [ {
2700
- key: "_init",
2701
- value: function _init() {
2702
- var _this2 = this;
2703
- // if showing fullscreen popup, do not fix the width
2704
- if (this.options.useFullscreenPopup) {
2705
- this.options.fixDropdownWidth = false;
2706
- }
2707
- // when search enabled, we must fix the width else it would change with different results
2708
- if (this.options.countrySearch && !this.options.useFullscreenPopup) {
2709
- this.options.fixDropdownWidth = true;
2710
- }
2711
- // if in nationalMode, do not insert dial codes
2712
- if (this.options.nationalMode) {
2713
- this.options.autoInsertDialCode = false;
2714
- }
2715
- // if separateDialCode enabled, do not insert dial codes
2716
- if (this.options.separateDialCode) {
2717
- this.options.autoInsertDialCode = false;
2718
- }
2719
- // force showFlags=true if there's a dropdown and we're not displaying the dial code,
2720
- // as otherwise you just have a down arrow on it's own which doesn't make sense
2721
- var forceShowFlags = this.options.allowDropdown && !this.options.separateDialCode;
2722
- if (!this.options.showFlags && forceShowFlags) {
2723
- this.options.showFlags = true;
2724
- }
2725
- // on mobile, we want a full screen dropdown, so we must append it to the body
2726
- if (this.options.useFullscreenPopup && !this.options.dropdownContainer) {
2727
- this.options.dropdownContainer = document.body;
2728
- }
2729
- // check if input has one parent with RTL
2730
- this.isRTL = !!this.telInput.closest("[dir=rtl]");
2731
- // these promises get resolved when their individual requests complete
2732
- // this way the dev can do something like iti.promise.then(...) to know when all requests are
2733
- // complete
2734
- if (typeof Promise !== "undefined") {
2735
- var autoCountryPromise = new Promise(function(resolve, reject) {
2736
- _this2.resolveAutoCountryPromise = resolve;
2737
- _this2.rejectAutoCountryPromise = reject;
2738
- });
2739
- var utilsScriptPromise = new Promise(function(resolve, reject) {
2740
- _this2.resolveUtilsScriptPromise = resolve;
2741
- _this2.rejectUtilsScriptPromise = reject;
2742
- });
2743
- this.promise = Promise.all([ autoCountryPromise, utilsScriptPromise ]);
2744
- } else {
2745
- // prevent errors when Promise doesn't exist
2746
- this.resolveAutoCountryPromise = this.rejectAutoCountryPromise = function() {};
2747
- this.resolveUtilsScriptPromise = this.rejectUtilsScriptPromise = function() {};
2748
- }
2749
- // in various situations there could be no country selected initially, but we need to be able
2750
- // to assume this variable exists
2751
- this.selectedCountryData = {};
2752
- // process all the data: onlyCountries, excludeCountries, preferredCountries etc
2753
- this._processCountryData();
2754
- // generate the markup
2755
- this._generateMarkup();
2756
- // set the initial state of the input value and the selected flag
2757
- this._setInitialState();
2758
- // start all of the event listeners: autoInsertDialCode, input keydown, selectedFlag click
2759
- this._initListeners();
2760
- // utils script, and auto country
2761
- this._initRequests();
2762
- }
2763
- }, {
2764
- key: "_processCountryData",
2765
- value: function _processCountryData() {
2766
- // process onlyCountries or excludeCountries array if present
2767
- this._processAllCountries();
2768
- // process the countryCodes map
2769
- this._processCountryCodes();
2770
- // process the preferredCountries
2771
- this._processPreferredCountries();
2772
- // translate countries according to localizedCountries option
2773
- if (this.options.localizedCountries) {
2774
- this._translateCountriesByLocale();
2775
- }
2776
- // sort countries by name
2777
- if (this.options.onlyCountries.length || this.options.localizedCountries) {
2778
- this.countries.sort(this._countryNameSort);
2779
- }
2780
- }
2781
- }, {
2782
- key: "_addCountryCode",
2783
- value: function _addCountryCode(iso2, countryCode, priority) {
2784
- if (countryCode.length > this.countryCodeMaxLen) {
2785
- this.countryCodeMaxLen = countryCode.length;
2786
- }
2787
- if (!this.countryCodes.hasOwnProperty(countryCode)) {
2788
- this.countryCodes[countryCode] = [];
2789
- }
2790
- // bail if we already have this country for this countryCode
2791
- for (var i = 0; i < this.countryCodes[countryCode].length; i++) {
2792
- if (this.countryCodes[countryCode][i] === iso2) {
2793
- return;
2794
- }
2795
- }
2796
- // check for undefined as 0 is falsy
2797
- var index = priority !== undefined$1 ? priority : this.countryCodes[countryCode].length;
2798
- this.countryCodes[countryCode][index] = iso2;
2799
- }
2800
- }, {
2801
- key: "_processAllCountries",
2802
- value: function _processAllCountries() {
2803
- if (this.options.onlyCountries.length) {
2804
- var lowerCaseOnlyCountries = this.options.onlyCountries.map(function(country) {
2805
- return country.toLowerCase();
2806
- });
2807
- this.countries = allCountries.filter(function(country) {
2808
- return lowerCaseOnlyCountries.indexOf(country.iso2) > -1;
2809
- });
2810
- } else if (this.options.excludeCountries.length) {
2811
- var lowerCaseExcludeCountries = this.options.excludeCountries.map(function(country) {
2812
- return country.toLowerCase();
2813
- });
2814
- this.countries = allCountries.filter(function(country) {
2815
- return lowerCaseExcludeCountries.indexOf(country.iso2) === -1;
2816
- });
2817
- } else {
2818
- this.countries = allCountries;
2819
- }
2820
- }
2821
- }, {
2822
- key: "_translateCountriesByLocale",
2823
- value: function _translateCountriesByLocale() {
2824
- for (var i = 0; i < this.countries.length; i++) {
2825
- var iso = this.countries[i].iso2.toLowerCase();
2826
- if (this.options.localizedCountries.hasOwnProperty(iso)) {
2827
- this.countries[i].name = this.options.localizedCountries[iso];
2828
- }
2829
- }
2830
- }
2831
- }, {
2832
- key: "_countryNameSort",
2833
- value: function _countryNameSort(a, b) {
2834
- if (a.name < b.name) {
2835
- return -1;
2836
- }
2837
- if (a.name > b.name) {
2838
- return 1;
2839
- }
2840
- return 0;
2841
- }
2842
- }, {
2843
- key: "_processCountryCodes",
2844
- value: function _processCountryCodes() {
2845
- this.countryCodeMaxLen = 0;
2846
- // here we store just dial codes
2847
- this.dialCodes = {};
2848
- // here we store "country codes" (both dial codes and their area codes)
2849
- this.countryCodes = {};
2850
- // first: add dial codes
2851
- for (var i = 0; i < this.countries.length; i++) {
2852
- var c = this.countries[i];
2853
- if (!this.dialCodes[c.dialCode]) {
2854
- this.dialCodes[c.dialCode] = true;
2855
- }
2856
- this._addCountryCode(c.iso2, c.dialCode, c.priority);
2857
- }
2858
- // next: add area codes
2859
- // this is a second loop over countries, to make sure we have all of the "root" countries
2860
- // already in the map, so that we can access them, as each time we add an area code substring
2861
- // to the map, we also need to include the "root" country's code, as that also matches
2862
- for (var _i = 0; _i < this.countries.length; _i++) {
2863
- var _c = this.countries[_i];
2864
- // area codes
2865
- if (_c.areaCodes) {
2866
- var rootCountryCode = this.countryCodes[_c.dialCode][0];
2867
- // for each area code
2868
- for (var j = 0; j < _c.areaCodes.length; j++) {
2869
- var areaCode = _c.areaCodes[j];
2870
- // for each digit in the area code to add all partial matches as well
2871
- for (var k = 1; k < areaCode.length; k++) {
2872
- var partialDialCode = _c.dialCode + areaCode.substr(0, k);
2873
- // start with the root country, as that also matches this dial code
2874
- this._addCountryCode(rootCountryCode, partialDialCode);
2875
- this._addCountryCode(_c.iso2, partialDialCode);
2876
- }
2877
- // add the full area code
2878
- this._addCountryCode(_c.iso2, _c.dialCode + areaCode);
2879
- }
2880
- }
2881
- }
2882
- }
2883
- }, {
2884
- key: "_processPreferredCountries",
2885
- value: function _processPreferredCountries() {
2886
- this.preferredCountries = [];
2887
- for (var i = 0; i < this.options.preferredCountries.length; i++) {
2888
- var countryCode = this.options.preferredCountries[i].toLowerCase();
2889
- var countryData = this._getCountryData(countryCode, false, true);
2890
- if (countryData) {
2891
- this.preferredCountries.push(countryData);
2892
- }
2893
- }
2894
- }
2895
- }, {
2896
- key: "_createEl",
2897
- value: function _createEl(name, attrs, container) {
2898
- var el = document.createElement(name);
2899
- if (attrs) {
2900
- forEachProp(attrs, function(key, value) {
2901
- return el.setAttribute(key, value);
2902
- });
2903
- }
2904
- if (container) {
2905
- container.appendChild(el);
2906
- }
2907
- return el;
2908
- }
2909
- }, {
2910
- key: "_generateMarkup",
2911
- value: function _generateMarkup() {
2912
- this.telInput.classList.add("iti__tel-input");
2913
- // if autocomplete does not exist on the element and its form, then
2914
- // prevent autocomplete as there's no safe, cross-browser event we can react to, so it can
2915
- // easily put the plugin in an inconsistent state e.g. the wrong flag selected for the
2916
- // autocompleted number, which on submit could mean wrong number is saved
2917
- if (!this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete"))) {
2918
- this.telInput.setAttribute("autocomplete", "off");
2919
- }
2920
- var _this$options = this.options, allowDropdown = _this$options.allowDropdown, separateDialCode = _this$options.separateDialCode, showFlags = _this$options.showFlags, customContainer = _this$options.customContainer, hiddenInput = _this$options.hiddenInput, dropdownContainer = _this$options.dropdownContainer, fixDropdownWidth = _this$options.fixDropdownWidth, useFullscreenPopup = _this$options.useFullscreenPopup, countrySearch = _this$options.countrySearch;
2921
- // containers (mostly for positioning)
2922
- var parentClass = "iti";
2923
- if (allowDropdown) {
2924
- parentClass += " iti--allow-dropdown";
2925
- }
2926
- if (separateDialCode) {
2927
- parentClass += " iti--separate-dial-code";
2928
- }
2929
- if (showFlags) {
2930
- parentClass += " iti--show-flags";
2931
- }
2932
- if (customContainer) {
2933
- parentClass += " ".concat(customContainer);
2934
- }
2935
- var wrapper = this._createEl("div", {
2936
- "class": parentClass
2937
- });
2938
- this.telInput.parentNode.insertBefore(wrapper, this.telInput);
2939
- // only hide the flagsContainer if allowDropdown, showFlags and separateDialCode are all false
2940
- var showFlagsContainer = allowDropdown || showFlags || separateDialCode;
2941
- if (showFlagsContainer) {
2942
- this.flagsContainer = this._createEl("div", {
2943
- "class": "iti__flag-container"
2944
- }, wrapper);
2945
- }
2946
- wrapper.appendChild(this.telInput);
2947
- // selected flag (displayed to left of input)
2948
- // using Aria tags for "Select-Only Combobox Example"
2949
- // https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
2950
- if (showFlagsContainer) {
2951
- this.selectedFlag = this._createEl("div", _objectSpread({
2952
- "class": "iti__selected-flag"
2953
- }, allowDropdown && {
2954
- role: "combobox",
2955
- "aria-haspopup": "listbox",
2956
- "aria-controls": "iti-".concat(this.id, "__country-listbox"),
2957
- "aria-expanded": "false",
2958
- "aria-label": "Telephone country code"
2959
- }), this.flagsContainer);
2960
- }
2961
- if (showFlags) {
2962
- this.selectedFlagInner = this._createEl("div", {
2963
- "class": "iti__flag"
2964
- }, this.selectedFlag);
2965
- }
2966
- if (this.selectedFlag && this.telInput.disabled) {
2967
- this.selectedFlag.setAttribute("aria-disabled", "true");
2968
- }
2969
- if (separateDialCode) {
2970
- this.selectedDialCode = this._createEl("div", {
2971
- "class": "iti__selected-dial-code"
2972
- }, this.selectedFlag);
2973
- }
2974
- if (allowDropdown) {
2975
- if (!this.telInput.disabled) {
2976
- // make element focusable and tab navigable
2977
- this.selectedFlag.setAttribute("tabindex", "0");
2978
- }
2979
- this.dropdownArrow = this._createEl("div", {
2980
- "class": "iti__arrow"
2981
- }, this.selectedFlag);
2982
- var extraClasses = fixDropdownWidth ? "" : "iti--flexible-dropdown-width";
2983
- this.dropdownContent = this._createEl("div", {
2984
- "class": "iti__dropdown-content iti__hide ".concat(extraClasses)
2985
- });
2986
- if (countrySearch) {
2987
- this.searchInput = this._createEl("input", {
2988
- type: "text",
2989
- "class": "iti__search-input",
2990
- placeholder: "Search"
2991
- }, this.dropdownContent);
2992
- }
2993
- // country list: preferred countries, then divider, then all countries
2994
- this.countryList = this._createEl("ul", {
2995
- "class": "iti__country-list",
2996
- id: "iti-".concat(this.id, "__country-listbox"),
2997
- role: "listbox",
2998
- "aria-label": "List of countries"
2999
- }, this.dropdownContent);
3000
- if (this.preferredCountries.length && !countrySearch) {
3001
- this._appendListItems(this.preferredCountries, "iti__preferred", true);
3002
- this._createEl("li", {
3003
- "class": "iti__divider",
3004
- "aria-hidden": "true"
3005
- }, this.countryList);
3006
- }
3007
- this._appendListItems(this.countries, "iti__standard");
3008
- // create dropdownContainer markup
3009
- if (dropdownContainer) {
3010
- var dropdownClasses = "iti iti--container";
3011
- if (useFullscreenPopup) {
3012
- dropdownClasses += " iti--fullscreen-popup";
3013
- }
3014
- if (countrySearch) {
3015
- dropdownClasses += " iti--country-search";
3016
- }
3017
- this.dropdown = this._createEl("div", {
3018
- "class": dropdownClasses
3019
- });
3020
- this.dropdown.appendChild(this.dropdownContent);
3021
- } else {
3022
- this.flagsContainer.appendChild(this.dropdownContent);
3023
- }
3024
- }
3025
- if (hiddenInput) {
3026
- var hiddenInputName = hiddenInput;
3027
- var name = this.telInput.getAttribute("name");
3028
- if (name) {
3029
- var i = name.lastIndexOf("[");
3030
- // if input name contains square brackets, then give the hidden input the same name,
3031
- // replacing the contents of the last set of brackets with the given hiddenInput name
3032
- if (i !== -1) {
3033
- hiddenInputName = "".concat(name.substr(0, i), "[").concat(hiddenInputName, "]");
3034
- }
3035
- }
3036
- this.hiddenInput = this._createEl("input", {
3037
- type: "hidden",
3038
- name: hiddenInputName
3039
- });
3040
- wrapper.appendChild(this.hiddenInput);
3041
- }
3042
- }
3043
- }, {
3044
- key: "_appendListItems",
3045
- value: function _appendListItems(countries, className, preferred) {
3046
- for (var i = 0; i < countries.length; i++) {
3047
- var c = countries[i];
3048
- var idSuffix = preferred ? "-preferred" : "";
3049
- var listItem = this._createEl("li", {
3050
- id: "iti-".concat(this.id, "__item-").concat(c.iso2).concat(idSuffix),
3051
- "class": "iti__country ".concat(className),
3052
- tabindex: "-1",
3053
- role: "option",
3054
- "data-dial-code": c.dialCode,
3055
- "data-country-code": c.iso2,
3056
- "aria-selected": "false"
3057
- }, this.countryList);
3058
- // store this for later use e.g. country search filtering
3059
- c.node = listItem;
3060
- var content = "";
3061
- // add the flag
3062
- if (this.options.showFlags) {
3063
- content += "<div class='iti__flag-box'><div class='iti__flag iti__".concat(c.iso2, "'></div></div>");
3064
- }
3065
- // and the country name and dial code
3066
- content += "<span class='iti__country-name'>".concat(c.name, "</span>");
3067
- content += "<span class='iti__dial-code'>+".concat(c.dialCode, "</span>");
3068
- listItem.insertAdjacentHTML("beforeend", content);
3069
- }
3070
- }
3071
- }, {
3072
- key: "_setInitialState",
3073
- value: function _setInitialState() {
3074
- // fix firefox bug: when first load page (with input with value set to number with intl dial
3075
- // code) and initialising plugin removes the dial code from the input, then refresh page,
3076
- // and we try to init plugin again but this time on number without dial code so get grey flag
3077
- var attributeValue = this.telInput.getAttribute("value");
3078
- var inputValue = this.telInput.value;
3079
- var useAttribute = attributeValue && attributeValue.charAt(0) === "+" && (!inputValue || inputValue.charAt(0) !== "+");
3080
- var val = useAttribute ? attributeValue : inputValue;
3081
- var dialCode = this._getDialCode(val);
3082
- var isRegionlessNanp = this._isRegionlessNanp(val);
3083
- var _this$options2 = this.options, initialCountry = _this$options2.initialCountry, autoInsertDialCode = _this$options2.autoInsertDialCode;
3084
- // if we already have a dial code, and it's not a regionlessNanp, we can go ahead and set the
3085
- // flag, else fall back to the default country
3086
- if (dialCode && !isRegionlessNanp) {
3087
- this._updateFlagFromNumber(val);
3088
- } else if (initialCountry !== "auto") {
3089
- var isValidInitialCountry = initialCountry && this._getCountryData(initialCountry, false, true);
3090
- // see if we should select a flag
3091
- if (isValidInitialCountry) {
3092
- this._setFlag(initialCountry.toLowerCase());
3093
- } else {
3094
- if (dialCode && isRegionlessNanp) {
3095
- // has intl dial code, is regionless nanp, and no initialCountry, so default to US
3096
- this._setFlag("us");
3097
- } else {
3098
- // no dial code and no initialCountry, so default to first in list
3099
- this.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0].iso2 : this.countries[0].iso2;
3100
- if (!val) {
3101
- this._setFlag(this.defaultCountry);
3102
- }
3103
- }
3104
- }
3105
- // if empty and autoInsertDialCode then insert the dial code
3106
- if (!val && autoInsertDialCode) {
3107
- this.telInput.value = "+".concat(this.selectedCountryData.dialCode);
3108
- }
3109
- }
3110
- // NOTE: if initialCountry is set to auto, that will be handled separately
3111
- // format - note this wont be run after _updateDialCode as that's only called if no val
3112
- if (val) {
3113
- this._updateValFromNumber(val);
3114
- }
3115
- }
3116
- }, {
3117
- key: "_initListeners",
3118
- value: function _initListeners() {
3119
- this._initKeyListeners();
3120
- if (this.options.autoInsertDialCode) {
3121
- this._initBlurListeners();
3122
- }
3123
- if (this.options.allowDropdown) {
3124
- this._initDropdownListeners();
3125
- }
3126
- if (this.hiddenInput) {
3127
- this._initHiddenInputListener();
3128
- }
3129
- }
3130
- }, {
3131
- key: "_initHiddenInputListener",
3132
- value: function _initHiddenInputListener() {
3133
- var _this3 = this;
3134
- this._handleHiddenInputSubmit = function() {
3135
- _this3.hiddenInput.value = _this3.getNumber();
3136
- };
3137
- if (this.telInput.form) {
3138
- this.telInput.form.addEventListener("submit", this._handleHiddenInputSubmit);
3139
- }
3140
- }
3141
- }, {
3142
- key: "_getClosestLabel",
3143
- value: function _getClosestLabel() {
3144
- var el = this.telInput;
3145
- while (el && el.tagName !== "LABEL") {
3146
- el = el.parentNode;
3147
- }
3148
- return el;
3149
- }
3150
- }, {
3151
- key: "_initDropdownListeners",
3152
- value: function _initDropdownListeners() {
3153
- var _this4 = this;
3154
- // hack for input nested inside label (which is valid markup): clicking the selected-flag to
3155
- // open the dropdown would then automatically trigger a 2nd click on the input which would
3156
- // close it again
3157
- this._handleLabelClick = function(e) {
3158
- // if the dropdown is closed, then focus the input, else ignore the click
3159
- if (_this4.dropdownContent.classList.contains("iti__hide")) {
3160
- _this4.telInput.focus();
3161
- } else {
3162
- e.preventDefault();
3163
- }
3164
- };
3165
- var label = this._getClosestLabel();
3166
- if (label) {
3167
- label.addEventListener("click", this._handleLabelClick);
3168
- }
3169
- // toggle country dropdown on click
3170
- this._handleClickSelectedFlag = function() {
3171
- // only intercept this event if we're opening the dropdown
3172
- // else let it bubble up to the top ("click-off-to-close" listener)
3173
- // we cannot just stopPropagation as it may be needed to close another instance
3174
- if (_this4.dropdownContent.classList.contains("iti__hide") && !_this4.telInput.disabled && !_this4.telInput.readOnly) {
3175
- _this4._showDropdown();
3176
- }
3177
- };
3178
- this.selectedFlag.addEventListener("click", this._handleClickSelectedFlag);
3179
- // open dropdown if selected flag is focused and they press up/down/space/enter
3180
- this._handleFlagsContainerKeydown = function(e) {
3181
- var isDropdownHidden = _this4.dropdownContent.classList.contains("iti__hide");
3182
- if (isDropdownHidden && [ "ArrowUp", "ArrowDown", " ", "Enter" ].includes(e.key)) {
3183
- // prevent form from being submitted if "ENTER" was pressed
3184
- e.preventDefault();
3185
- // prevent event from being handled again by document
3186
- e.stopPropagation();
3187
- _this4._showDropdown();
3188
- }
3189
- // allow navigation from dropdown to input on TAB
3190
- if (e.key === "Tab") {
3191
- _this4._closeDropdown();
3192
- }
3193
- };
3194
- this.flagsContainer.addEventListener("keydown", this._handleFlagsContainerKeydown);
3195
- }
3196
- }, {
3197
- key: "_initRequests",
3198
- value: function _initRequests() {
3199
- var _this5 = this;
3200
- // if the user has specified the path to the utils script, fetch it on window.load, else resolve
3201
- if (this.options.utilsScript && !window.intlTelInputUtils) {
3202
- // if the plugin is being initialised after the window.load event has already been fired
3203
- if (window.intlTelInputGlobals.documentReady()) {
3204
- window.intlTelInputGlobals.loadUtils(this.options.utilsScript);
3205
- } else {
3206
- // wait until the load event so we don't block any other requests e.g. the flags image
3207
- window.addEventListener("load", function() {
3208
- window.intlTelInputGlobals.loadUtils(_this5.options.utilsScript);
3209
- });
3210
- }
3211
- } else {
3212
- this.resolveUtilsScriptPromise();
3213
- }
3214
- if (this.options.initialCountry === "auto") {
3215
- this._loadAutoCountry();
3216
- } else {
3217
- this.resolveAutoCountryPromise();
3218
- }
3219
- }
3220
- }, {
3221
- key: "_loadAutoCountry",
3222
- value: function _loadAutoCountry() {
3223
- // 3 options:
3224
- // 1) already loaded (we're done)
3225
- // 2) not already started loading (start)
3226
- // 3) already started loading (do nothing - just wait for loading callback to fire)
3227
- if (window.intlTelInputGlobals.autoCountry) {
3228
- this.handleAutoCountry();
3229
- } else if (!window.intlTelInputGlobals.startedLoadingAutoCountry) {
3230
- // don't do this twice!
3231
- window.intlTelInputGlobals.startedLoadingAutoCountry = true;
3232
- if (typeof this.options.geoIpLookup === "function") {
3233
- this.options.geoIpLookup(function(countryCode) {
3234
- window.intlTelInputGlobals.autoCountry = countryCode.toLowerCase();
3235
- // tell all instances the auto country is ready
3236
- // TODO: this should just be the current instances
3237
- // UPDATE: use setTimeout in case their geoIpLookup function calls this callback straight
3238
- // away (e.g. if they have already done the geo ip lookup somewhere else). Using
3239
- // setTimeout means that the current thread of execution will finish before executing
3240
- // this, which allows the plugin to finish initialising.
3241
- setTimeout(function() {
3242
- return forEachInstance("handleAutoCountry");
3243
- });
3244
- }, function() {
3245
- return forEachInstance("rejectAutoCountryPromise");
3246
- });
3247
- }
3248
- }
3249
- }
3250
- }, {
3251
- key: "_initKeyListeners",
3252
- value: function _initKeyListeners() {
3253
- var _this6 = this;
3254
- // update flag on keyup
3255
- this._handleKeyupEvent = function() {
3256
- if (_this6._updateFlagFromNumber(_this6.telInput.value)) {
3257
- _this6._triggerCountryChange();
3258
- }
3259
- };
3260
- this.telInput.addEventListener("keyup", this._handleKeyupEvent);
3261
- // update flag on cut/paste events (now supported in all major browsers)
3262
- this._handleClipboardEvent = function() {
3263
- // hack because "paste" event is fired before input is updated
3264
- setTimeout(_this6._handleKeyupEvent);
3265
- };
3266
- this.telInput.addEventListener("cut", this._handleClipboardEvent);
3267
- this.telInput.addEventListener("paste", this._handleClipboardEvent);
3268
- }
3269
- }, {
3270
- key: "_cap",
3271
- value: function _cap(number) {
3272
- var max = this.telInput.getAttribute("maxlength");
3273
- return max && number.length > max ? number.substr(0, max) : number;
3274
- }
3275
- }, {
3276
- key: "_initBlurListeners",
3277
- value: function _initBlurListeners() {
3278
- var _this7 = this;
3279
- // on blur or form submit: if just a dial code then remove it
3280
- this._handleSubmitOrBlurEvent = function() {
3281
- _this7._removeEmptyDialCode();
3282
- };
3283
- if (this.telInput.form) {
3284
- this.telInput.form.addEventListener("submit", this._handleSubmitOrBlurEvent);
3285
- }
3286
- this.telInput.addEventListener("blur", this._handleSubmitOrBlurEvent);
3287
- }
3288
- }, {
3289
- key: "_removeEmptyDialCode",
3290
- value: function _removeEmptyDialCode() {
3291
- if (this.telInput.value.charAt(0) === "+") {
3292
- var numeric = this._getNumeric(this.telInput.value);
3293
- // if just a plus, or if just a dial code
3294
- if (!numeric || this.selectedCountryData.dialCode === numeric) {
3295
- this.telInput.value = "";
3296
- }
3297
- }
3298
- }
3299
- }, {
3300
- key: "_getNumeric",
3301
- value: function _getNumeric(s) {
3302
- return s.replace(/\D/g, "");
3303
- }
3304
- }, {
3305
- key: "_trigger",
3306
- value: function _trigger(name) {
3307
- // have to use old school document.createEvent as IE11 doesn't support `new Event()` syntax
3308
- var e = document.createEvent("Event");
3309
- e.initEvent(name, true, true);
3310
- // can bubble, and is cancellable
3311
- this.telInput.dispatchEvent(e);
3312
- }
3313
- }, {
3314
- key: "_showDropdown",
3315
- value: function _showDropdown() {
3316
- if (this.options.fixDropdownWidth) {
3317
- this.dropdownContent.style.width = "".concat(this.telInput.offsetWidth, "px");
3318
- }
3319
- this.dropdownContent.classList.remove("iti__hide");
3320
- this.selectedFlag.setAttribute("aria-expanded", "true");
3321
- this._setDropdownPosition();
3322
- if (this.options.countrySearch) {
3323
- // start by highlighting the first item in the list
3324
- this._highlightListItem(this.countryList.firstElementChild, false);
3325
- this.searchInput.focus();
3326
- } else if (this.activeItem) {
3327
- // update highlighting and scroll to active list item
3328
- this._highlightListItem(this.activeItem, false);
3329
- this._scrollTo(this.activeItem, true);
3330
- }
3331
- // bind all the dropdown-related listeners: mouseover, click, click-off, keydown
3332
- this._bindDropdownListeners();
3333
- // update the arrow
3334
- this.dropdownArrow.classList.add("iti__arrow--up");
3335
- this._trigger("open:countrydropdown");
3336
- }
3337
- }, {
3338
- key: "_toggleClass",
3339
- value: function _toggleClass(el, className, shouldHaveClass) {
3340
- if (shouldHaveClass && !el.classList.contains(className)) {
3341
- el.classList.add(className);
3342
- } else if (!shouldHaveClass && el.classList.contains(className)) {
3343
- el.classList.remove(className);
3344
- }
3345
- }
3346
- }, {
3347
- key: "_setDropdownPosition",
3348
- value: function _setDropdownPosition() {
3349
- var _this8 = this;
3350
- if (this.options.dropdownContainer) {
3351
- this.options.dropdownContainer.appendChild(this.dropdown);
3352
- }
3353
- if (!this.options.useFullscreenPopup) {
3354
- var pos = this.telInput.getBoundingClientRect();
3355
- // windowTop from https://stackoverflow.com/a/14384091/217866
3356
- var windowTop = window.pageYOffset || document.documentElement.scrollTop;
3357
- var inputTop = pos.top + windowTop;
3358
- var dropdownHeight = this.dropdownContent.offsetHeight;
3359
- // dropdownFitsBelow = (dropdownBottom < windowBottom)
3360
- var dropdownFitsBelow = inputTop + this.telInput.offsetHeight + dropdownHeight < windowTop + window.innerHeight;
3361
- var dropdownFitsAbove = inputTop - dropdownHeight > windowTop;
3362
- // dont allow positioning above when country search enabled as the search box jumps around as you filter countries
3363
- var positionDropdownAboveInput = !this.options.countrySearch && !dropdownFitsBelow && dropdownFitsAbove;
3364
- // by default, the dropdown will be below the input. If we want to position it above the
3365
- // input, we add the dropup class.
3366
- this._toggleClass(this.dropdownContent, "iti__dropdown-content--dropup", positionDropdownAboveInput);
3367
- // if dropdownContainer is enabled, calculate postion
3368
- if (this.options.dropdownContainer) {
3369
- // by default the dropdown will be directly over the input because it's not in the flow.
3370
- // If we want to position it below, we need to add some extra top value.
3371
- var extraTop = positionDropdownAboveInput ? 0 : this.telInput.offsetHeight;
3372
- // calculate placement
3373
- this.dropdown.style.top = "".concat(inputTop + extraTop, "px");
3374
- this.dropdown.style.left = "".concat(pos.left + document.body.scrollLeft, "px");
3375
- // close menu on window scroll
3376
- this._handleWindowScroll = function() {
3377
- return _this8._closeDropdown();
3378
- };
3379
- window.addEventListener("scroll", this._handleWindowScroll);
3380
- }
3381
- }
3382
- }
3383
- }, {
3384
- key: "_getClosestListItem",
3385
- value: function _getClosestListItem(target) {
3386
- var el = target;
3387
- while (el && el !== this.countryList && !el.classList.contains("iti__country")) {
3388
- el = el.parentNode;
3389
- }
3390
- // if we reached the countryList element, then return null
3391
- return el === this.countryList ? null : el;
3392
- }
3393
- }, {
3394
- key: "_bindDropdownListeners",
3395
- value: function _bindDropdownListeners() {
3396
- var _this9 = this;
3397
- // when mouse over a list item, just highlight that one
3398
- // we add the class "highlight", so if they hit "enter" we know which one to select
3399
- this._handleMouseoverCountryList = function(e) {
3400
- // handle event delegation, as we're listening for this event on the countryList
3401
- var listItem = _this9._getClosestListItem(e.target);
3402
- if (listItem) {
3403
- _this9._highlightListItem(listItem, false);
3404
- }
3405
- };
3406
- this.countryList.addEventListener("mouseover", this._handleMouseoverCountryList);
3407
- // listen for country selection
3408
- this._handleClickCountryList = function(e) {
3409
- var listItem = _this9._getClosestListItem(e.target);
3410
- if (listItem) {
3411
- _this9._selectListItem(listItem);
3412
- }
3413
- };
3414
- this.countryList.addEventListener("click", this._handleClickCountryList);
3415
- // click off to close
3416
- // (except when this initial opening click is bubbling up)
3417
- // we cannot just stopPropagation as it may be needed to close another instance
3418
- var isOpening = true;
3419
- this._handleClickOffToClose = function() {
3420
- if (!isOpening) {
3421
- _this9._closeDropdown();
3422
- }
3423
- isOpening = false;
3424
- };
3425
- document.documentElement.addEventListener("click", this._handleClickOffToClose);
3426
- // listen for up/down scrolling, enter to select, or escape to close
3427
- // use keydown as keypress doesn't fire for non-char keys and we want to catch if they
3428
- // just hit down and hold it to scroll down (no keyup event).
3429
- // listen on the document because that's where key events are triggered if no input has focus
3430
- var query = "";
3431
- var queryTimer = null;
3432
- this._handleKeydownOnDropdown = function(e) {
3433
- // prevent down key from scrolling the whole page,
3434
- // and enter key from submitting a form etc
3435
- if ([ "ArrowUp", "ArrowDown", "Enter", "Escape" ].includes(e.key)) {
3436
- e.preventDefault();
3437
- e.stopPropagation();
3438
- // up and down to navigate
3439
- if (e.key === "ArrowUp" || e.key === "ArrowDown") {
3440
- _this9._handleUpDownKey(e.key);
3441
- } else if (e.key === "Enter") {
3442
- _this9._handleEnterKey();
3443
- } else if (e.key === "Escape") {
3444
- _this9._closeDropdown();
3445
- }
3446
- }
3447
- // alpha chars to perform search
3448
- // regex allows one latin alpha char or space, based on https://stackoverflow.com/a/26900132/217866)
3449
- if (!_this9.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(e.key)) {
3450
- e.stopPropagation();
3451
- // jump to countries that start with the query string
3452
- if (queryTimer) {
3453
- clearTimeout(queryTimer);
3454
- }
3455
- query += e.key.toLowerCase();
3456
- _this9._searchForCountry(query);
3457
- // if the timer hits 1 second, reset the query
3458
- queryTimer = setTimeout(function() {
3459
- query = "";
3460
- }, 1e3);
3461
- }
3462
- };
3463
- document.addEventListener("keydown", this._handleKeydownOnDropdown);
3464
- if (this.options.countrySearch) {
3465
- var doFilter = function doFilter() {
3466
- var inputQuery = _this9.searchInput.value.trim();
3467
- if (inputQuery) {
3468
- _this9._filterCountries(inputQuery.toLowerCase());
3469
- } else {
3470
- _this9._filterCountries(null, true);
3471
- }
3472
- };
3473
- var keyupTimer = null;
3474
- this._handleSearchChange = function() {
3475
- // filtering country nodes is expensive (lots of DOM manipulation), so rate limit it
3476
- if (keyupTimer) {
3477
- clearTimeout(keyupTimer);
3478
- }
3479
- keyupTimer = setTimeout(function() {
3480
- doFilter();
3481
- keyupTimer = null;
3482
- }, 100);
3483
- };
3484
- this.searchInput.addEventListener("input", this._handleSearchChange);
3485
- // stop propagation on search input click, so doesn't trigger click-off-to-close listener
3486
- this.searchInput.addEventListener("click", function(e) {
3487
- return e.stopPropagation();
3488
- });
3489
- }
3490
- }
3491
- }, {
3492
- key: "_filterCountries",
3493
- value: function _filterCountries(query) {
3494
- var isReset = arguments.length > 1 && arguments[1] !== undefined$1 ? arguments[1] : false;
3495
- var isFirst = true;
3496
- this.countryList.innerHTML = "";
3497
- for (var i = 0; i < this.countries.length; i++) {
3498
- var c = this.countries[i];
3499
- var nameLower = c.name.toLowerCase();
3500
- var fullDialCode = "+".concat(c.dialCode);
3501
- if (isReset || nameLower.includes(query) || fullDialCode.includes(query)) {
3502
- this.countryList.appendChild(c.node);
3503
- // highlight the first item
3504
- if (isFirst) {
3505
- this._highlightListItem(c.node, false);
3506
- isFirst = false;
3507
- }
3508
- }
3509
- }
3510
- }
3511
- }, {
3512
- key: "_handleUpDownKey",
3513
- value: function _handleUpDownKey(key) {
3514
- var next = key === "ArrowUp" ? this.highlightedItem.previousElementSibling : this.highlightedItem.nextElementSibling;
3515
- if (next) {
3516
- // skip the divider
3517
- if (next.classList.contains("iti__divider")) {
3518
- next = key === "ArrowUp" ? next.previousElementSibling : next.nextElementSibling;
3519
- }
3520
- } else if (this.countryList.childElementCount > 1) {
3521
- // otherwise, we must be at the end, so loop round again
3522
- next = key === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild;
3523
- }
3524
- if (next) {
3525
- // if country search enabled, dont lose focus from the search input on up/down
3526
- var doFocus = !this.options.countrySearch;
3527
- this._highlightListItem(next, doFocus);
3528
- if (this.options.countrySearch) {
3529
- this._scrollTo(next, false);
3530
- }
3531
- }
3532
- }
3533
- }, {
3534
- key: "_handleEnterKey",
3535
- value: function _handleEnterKey() {
3536
- if (this.highlightedItem) {
3537
- this._selectListItem(this.highlightedItem);
3538
- }
3539
- }
3540
- }, {
3541
- key: "_searchForCountry",
3542
- value: function _searchForCountry(query) {
3543
- for (var i = 0; i < this.countries.length; i++) {
3544
- if (this._startsWith(this.countries[i].name, query)) {
3545
- var listItem = this.countries[i].node;
3546
- // update highlighting and scroll
3547
- this._highlightListItem(listItem, false);
3548
- this._scrollTo(listItem, true);
3549
- break;
3550
- }
3551
- }
3552
- }
3553
- }, {
3554
- key: "_startsWith",
3555
- value: function _startsWith(a, b) {
3556
- return a.substr(0, b.length).toLowerCase() === b;
3557
- }
3558
- }, {
3559
- key: "_updateValFromNumber",
3560
- value: function _updateValFromNumber(fullNumber) {
3561
- var number = fullNumber;
3562
- if (this.options.formatOnDisplay && window.intlTelInputUtils && this.selectedCountryData) {
3563
- var useNational = this.options.nationalMode || number.charAt(0) !== "+" && !this.options.separateDialCode;
3564
- var _intlTelInputUtils$nu = intlTelInputUtils.numberFormat, NATIONAL = _intlTelInputUtils$nu.NATIONAL, INTERNATIONAL = _intlTelInputUtils$nu.INTERNATIONAL;
3565
- var format = useNational ? NATIONAL : INTERNATIONAL;
3566
- number = intlTelInputUtils.formatNumber(number, this.selectedCountryData.iso2, format);
3567
- }
3568
- number = this._beforeSetNumber(number);
3569
- this.telInput.value = number;
3570
- }
3571
- }, {
3572
- key: "_updateFlagFromNumber",
3573
- value: function _updateFlagFromNumber(fullNumber) {
3574
- var plusIndex = fullNumber.indexOf("+");
3575
- // if it contains a plus, discard any chars before it e.g. accidental space char.
3576
- // this keeps the selected country auto-updating correctly, which we want as
3577
- // libphonenumber's validation/getNumber methods will ignore these chars anyway
3578
- var number = plusIndex ? fullNumber.substring(plusIndex) : fullNumber;
3579
- // if we already have US/Canada selected, make sure the number starts
3580
- // with a +1 so _getDialCode will be able to extract the area code
3581
- // update: if we dont yet have selectedCountryData, but we're here (trying to update the flag
3582
- // from the number), that means we're initialising the plugin with a number that already has a
3583
- // dial code, so fine to ignore this bit
3584
- var selectedDialCode = this.selectedCountryData.dialCode;
3585
- var isNanp = selectedDialCode === "1";
3586
- if (number && isNanp && number.charAt(0) !== "+") {
3587
- if (number.charAt(0) !== "1") {
3588
- number = "1".concat(number);
3589
- }
3590
- number = "+".concat(number);
3591
- }
3592
- // if separateDialCode enabled, then consider the selected dial code to be part of the number
3593
- if (this.options.separateDialCode && selectedDialCode && number.charAt(0) !== "+") {
3594
- number = "+".concat(selectedDialCode).concat(number);
3595
- }
3596
- // try and extract valid dial code from input
3597
- var dialCode = this._getDialCode(number, true);
3598
- var numeric = this._getNumeric(number);
3599
- var countryCode = null;
3600
- if (dialCode) {
3601
- var countryCodes = this.countryCodes[this._getNumeric(dialCode)];
3602
- // check if the right country is already selected. this should be false if the number is
3603
- // longer than the matched dial code because in this case we need to make sure that if
3604
- // there are multiple country matches, that the first one is selected (note: we could
3605
- // just check that here, but it requires the same loop that we already have later)
3606
- var alreadySelected = countryCodes.indexOf(this.selectedCountryData.iso2) !== -1 && numeric.length <= dialCode.length - 1;
3607
- var isRegionlessNanpNumber = selectedDialCode === "1" && this._isRegionlessNanp(numeric);
3608
- // only update the flag if:
3609
- // A) NOT (we currently have a NANP flag selected, and the number is a regionlessNanp)
3610
- // AND
3611
- // B) the right country is not already selected
3612
- if (!isRegionlessNanpNumber && !alreadySelected) {
3613
- // if using onlyCountries option, countryCodes[0] may be empty, so we must find the first
3614
- // non-empty index
3615
- for (var j = 0; j < countryCodes.length; j++) {
3616
- if (countryCodes[j]) {
3617
- countryCode = countryCodes[j];
3618
- break;
3619
- }
3620
- }
3621
- }
3622
- } else if (number.charAt(0) === "+" && numeric.length) {
3623
- // invalid dial code, so empty
3624
- // Note: use getNumeric here because the number has not been formatted yet, so could contain
3625
- // bad chars
3626
- countryCode = "";
3627
- } else if (!number || number === "+") {
3628
- // empty, or just a plus, so default
3629
- countryCode = this.defaultCountry;
3630
- }
3631
- if (countryCode !== null) {
3632
- return this._setFlag(countryCode);
3633
- }
3634
- return false;
3635
- }
3636
- }, {
3637
- key: "_isRegionlessNanp",
3638
- value: function _isRegionlessNanp(number) {
3639
- var numeric = this._getNumeric(number);
3640
- if (numeric.charAt(0) === "1") {
3641
- var areaCode = numeric.substr(1, 3);
3642
- return regionlessNanpNumbers.indexOf(areaCode) !== -1;
3643
- }
3644
- return false;
3645
- }
3646
- }, {
3647
- key: "_highlightListItem",
3648
- value: function _highlightListItem(listItem, shouldFocus) {
3649
- var prevItem = this.highlightedItem;
3650
- if (prevItem) {
3651
- prevItem.classList.remove("iti__highlight");
3652
- }
3653
- this.highlightedItem = listItem;
3654
- this.highlightedItem.classList.add("iti__highlight");
3655
- this.selectedFlag.setAttribute("aria-activedescendant", listItem.getAttribute("id"));
3656
- if (shouldFocus) {
3657
- this.highlightedItem.focus();
3658
- }
3659
- }
3660
- }, {
3661
- key: "_getCountryData",
3662
- value: function _getCountryData(countryCode, ignoreOnlyCountriesOption, allowFail) {
3663
- var countryList = ignoreOnlyCountriesOption ? allCountries : this.countries;
3664
- for (var i = 0; i < countryList.length; i++) {
3665
- if (countryList[i].iso2 === countryCode) {
3666
- return countryList[i];
3667
- }
3668
- }
3669
- if (allowFail) {
3670
- return null;
3671
- }
3672
- throw new Error("No country data for '".concat(countryCode, "'"));
3673
- }
3674
- }, {
3675
- key: "_setFlag",
3676
- value: function _setFlag(countryCode) {
3677
- var _this$options3 = this.options, allowDropdown = _this$options3.allowDropdown, separateDialCode = _this$options3.separateDialCode, showFlags = _this$options3.showFlags;
3678
- var prevCountry = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
3679
- // do this first as it will throw an error and stop if countryCode is invalid
3680
- this.selectedCountryData = countryCode ? this._getCountryData(countryCode, false, false) : {};
3681
- // update the defaultCountry - we only need the iso2 from now on, so just store that
3682
- if (this.selectedCountryData.iso2) {
3683
- this.defaultCountry = this.selectedCountryData.iso2;
3684
- }
3685
- if (showFlags) {
3686
- this.selectedFlagInner.setAttribute("class", "iti__flag iti__".concat(countryCode));
3687
- }
3688
- this._setSelectedCountryFlagTitleAttribute(countryCode, separateDialCode);
3689
- if (separateDialCode) {
3690
- var dialCode = this.selectedCountryData.dialCode ? "+".concat(this.selectedCountryData.dialCode) : "";
3691
- this.selectedDialCode.innerHTML = dialCode;
3692
- // offsetWidth is zero if input is in a hidden container during initialisation
3693
- var selectedFlagWidth = this.selectedFlag.offsetWidth || this._getHiddenSelectedFlagWidth();
3694
- // add 6px of padding after the grey selected-dial-code box, as this is what we use in the css
3695
- if (this.isRTL) {
3696
- this.telInput.style.paddingRight = "".concat(selectedFlagWidth + 6, "px");
3697
- } else {
3698
- this.telInput.style.paddingLeft = "".concat(selectedFlagWidth + 6, "px");
3699
- }
3700
- }
3701
- // and the input's placeholder
3702
- this._updatePlaceholder();
3703
- // update the active list item
3704
- if (allowDropdown) {
3705
- var prevItem = this.activeItem;
3706
- if (prevItem) {
3707
- prevItem.classList.remove("iti__active");
3708
- prevItem.setAttribute("aria-selected", "false");
3709
- }
3710
- if (countryCode) {
3711
- // check if there is a preferred item first, else fall back to standard
3712
- var nextItem = this.countryList.querySelector("#iti-".concat(this.id, "__item-").concat(countryCode, "-preferred")) || this.countryList.querySelector("#iti-".concat(this.id, "__item-").concat(countryCode));
3713
- nextItem.setAttribute("aria-selected", "true");
3714
- nextItem.classList.add("iti__active");
3715
- this.activeItem = nextItem;
3716
- }
3717
- }
3718
- // return if the flag has changed or not
3719
- return prevCountry.iso2 !== countryCode;
3720
- }
3721
- }, {
3722
- key: "_setSelectedCountryFlagTitleAttribute",
3723
- value: function _setSelectedCountryFlagTitleAttribute(countryCode, separateDialCode) {
3724
- if (!this.selectedFlag) {
3725
- return;
3726
- }
3727
- var title;
3728
- if (countryCode && !separateDialCode) {
3729
- title = "".concat(this.selectedCountryData.name, ": +").concat(this.selectedCountryData.dialCode);
3730
- } else if (countryCode) {
3731
- // For screen reader output, we don't want to include the dial code in the reader output twice
3732
- // so just use the selected country name here:
3733
- title = this.selectedCountryData.name;
3734
- } else {
3735
- title = "Unknown";
3736
- }
3737
- this.selectedFlag.setAttribute("title", title);
3738
- }
3739
- }, {
3740
- key: "_getHiddenSelectedFlagWidth",
3741
- value: function _getHiddenSelectedFlagWidth() {
3742
- // to get the right styling to apply, all we need is a shallow clone of the container,
3743
- // and then to inject a deep clone of the selectedFlag element
3744
- var containerClone = this.telInput.parentNode.cloneNode();
3745
- containerClone.style.visibility = "hidden";
3746
- document.body.appendChild(containerClone);
3747
- var flagsContainerClone = this.flagsContainer.cloneNode();
3748
- containerClone.appendChild(flagsContainerClone);
3749
- var selectedFlagClone = this.selectedFlag.cloneNode(true);
3750
- flagsContainerClone.appendChild(selectedFlagClone);
3751
- var width = selectedFlagClone.offsetWidth;
3752
- containerClone.parentNode.removeChild(containerClone);
3753
- return width;
3754
- }
3755
- }, {
3756
- key: "_updatePlaceholder",
3757
- value: function _updatePlaceholder() {
3758
- var shouldSetPlaceholder = this.options.autoPlaceholder === "aggressive" || !this.hadInitialPlaceholder && this.options.autoPlaceholder === "polite";
3759
- if (window.intlTelInputUtils && shouldSetPlaceholder) {
3760
- var numberType = intlTelInputUtils.numberType[this.options.placeholderNumberType];
3761
- var placeholder = this.selectedCountryData.iso2 ? intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2, this.options.nationalMode, numberType) : "";
3762
- placeholder = this._beforeSetNumber(placeholder);
3763
- if (typeof this.options.customPlaceholder === "function") {
3764
- placeholder = this.options.customPlaceholder(placeholder, this.selectedCountryData);
3765
- }
3766
- this.telInput.setAttribute("placeholder", placeholder);
3767
- }
3768
- }
3769
- }, {
3770
- key: "_selectListItem",
3771
- value: function _selectListItem(listItem) {
3772
- // update selected flag and active list item
3773
- var flagChanged = this._setFlag(listItem.getAttribute("data-country-code"));
3774
- this._closeDropdown();
3775
- this._updateDialCode(listItem.getAttribute("data-dial-code"));
3776
- // focus the input
3777
- this.telInput.focus();
3778
- // put cursor at end - this fix is required for FF and IE11 (with auto inserting dial code),
3779
- // who try to put the cursor at the beginning the first time
3780
- var len = this.telInput.value.length;
3781
- this.telInput.setSelectionRange(len, len);
3782
- if (flagChanged) {
3783
- this._triggerCountryChange();
3784
- }
3785
- }
3786
- }, {
3787
- key: "_closeDropdown",
3788
- value: function _closeDropdown() {
3789
- this.dropdownContent.classList.add("iti__hide");
3790
- this.selectedFlag.setAttribute("aria-expanded", "false");
3791
- this.selectedFlag.removeAttribute("aria-activedescendant");
3792
- // update the arrow
3793
- this.dropdownArrow.classList.remove("iti__arrow--up");
3794
- // unbind key events
3795
- document.removeEventListener("keydown", this._handleKeydownOnDropdown);
3796
- if (this.options.countrySearch) {
3797
- this.searchInput.removeEventListener("input", this._handleSearchChange);
3798
- }
3799
- document.documentElement.removeEventListener("click", this._handleClickOffToClose);
3800
- this.countryList.removeEventListener("mouseover", this._handleMouseoverCountryList);
3801
- this.countryList.removeEventListener("click", this._handleClickCountryList);
3802
- // remove menu from container
3803
- if (this.options.dropdownContainer) {
3804
- if (!this.options.useFullscreenPopup) {
3805
- window.removeEventListener("scroll", this._handleWindowScroll);
3806
- }
3807
- if (this.dropdown.parentNode) {
3808
- this.dropdown.parentNode.removeChild(this.dropdown);
3809
- }
3810
- }
3811
- this._trigger("close:countrydropdown");
3812
- }
3813
- }, {
3814
- key: "_scrollTo",
3815
- value: function _scrollTo(element, middle) {
3816
- var container = this.dropdownContent;
3817
- // windowTop from https://stackoverflow.com/a/14384091/217866
3818
- var windowTop = window.pageYOffset || document.documentElement.scrollTop;
3819
- var containerHeight = container.offsetHeight;
3820
- var containerTop = container.getBoundingClientRect().top + windowTop;
3821
- var containerBottom = containerTop + containerHeight;
3822
- var elementHeight = element.offsetHeight;
3823
- var elementTop = element.getBoundingClientRect().top + windowTop;
3824
- var elementBottom = elementTop + elementHeight;
3825
- var newScrollTop = elementTop - containerTop + container.scrollTop;
3826
- var middleOffset = containerHeight / 2 - elementHeight / 2;
3827
- if (elementTop < containerTop) {
3828
- // scroll up
3829
- if (middle) {
3830
- newScrollTop -= middleOffset;
3831
- }
3832
- container.scrollTop = newScrollTop;
3833
- } else if (elementBottom > containerBottom) {
3834
- // scroll down
3835
- if (middle) {
3836
- newScrollTop += middleOffset;
3837
- }
3838
- var heightDifference = containerHeight - elementHeight;
3839
- container.scrollTop = newScrollTop - heightDifference;
3840
- }
3841
- }
3842
- }, {
3843
- key: "_updateDialCode",
3844
- value: function _updateDialCode(newDialCodeBare) {
3845
- var inputVal = this.telInput.value;
3846
- // save having to pass this every time
3847
- var newDialCode = "+".concat(newDialCodeBare);
3848
- var newNumber;
3849
- if (inputVal.charAt(0) === "+") {
3850
- // there's a plus so we're dealing with a replacement
3851
- var prevDialCode = this._getDialCode(inputVal);
3852
- if (prevDialCode) {
3853
- // current number contains a valid dial code, so replace it
3854
- newNumber = inputVal.replace(prevDialCode, newDialCode);
3855
- } else {
3856
- // current number contains an invalid dial code, so ditch it
3857
- // (no way to determine where the invalid dial code ends and the rest of the number begins)
3858
- newNumber = newDialCode;
3859
- }
3860
- this.telInput.value = newNumber;
3861
- } else if (this.options.autoInsertDialCode) {
3862
- if (inputVal) {
3863
- // there is an existing value with no dial code: prefix the new dial code
3864
- newNumber = newDialCode + inputVal;
3865
- } else {
3866
- newNumber = newDialCode;
3867
- }
3868
- this.telInput.value = newNumber;
3869
- }
3870
- }
3871
- }, {
3872
- key: "_getDialCode",
3873
- value: function _getDialCode(number, includeAreaCode) {
3874
- var dialCode = "";
3875
- // only interested in international numbers (starting with a plus)
3876
- if (number.charAt(0) === "+") {
3877
- var numericChars = "";
3878
- // iterate over chars
3879
- for (var i = 0; i < number.length; i++) {
3880
- var c = number.charAt(i);
3881
- // if char is number (https://stackoverflow.com/a/8935649/217866)
3882
- if (!isNaN(parseInt(c, 10))) {
3883
- numericChars += c;
3884
- // if current numericChars make a valid dial code
3885
- if (includeAreaCode) {
3886
- if (this.countryCodes[numericChars]) {
3887
- // store the actual raw string (useful for matching later)
3888
- dialCode = number.substr(0, i + 1);
3889
- }
3890
- } else {
3891
- if (this.dialCodes[numericChars]) {
3892
- dialCode = number.substr(0, i + 1);
3893
- // if we're just looking for a dial code, we can break as soon as we find one
3894
- break;
3895
- }
3896
- }
3897
- // stop searching as soon as we can - in this case when we hit max len
3898
- if (numericChars.length === this.countryCodeMaxLen) {
3899
- break;
3900
- }
3901
- }
3902
- }
3903
- }
3904
- return dialCode;
3905
- }
3906
- }, {
3907
- key: "_getFullNumber",
3908
- value: function _getFullNumber() {
3909
- var val = this.telInput.value.trim();
3910
- var dialCode = this.selectedCountryData.dialCode;
3911
- var prefix;
3912
- var numericVal = this._getNumeric(val);
3913
- if (this.options.separateDialCode && val.charAt(0) !== "+" && dialCode && numericVal) {
3914
- // when using separateDialCode, it is visible so is effectively part of the typed number
3915
- prefix = "+".concat(dialCode);
3916
- } else {
3917
- prefix = "";
3918
- }
3919
- return prefix + val;
3920
- }
3921
- }, {
3922
- key: "_beforeSetNumber",
3923
- value: function _beforeSetNumber(fullNumber) {
3924
- var number = fullNumber;
3925
- if (this.options.separateDialCode) {
3926
- var dialCode = this._getDialCode(number);
3927
- // if there is a valid dial code
3928
- if (dialCode) {
3929
- // in case _getDialCode returned an area code as well
3930
- dialCode = "+".concat(this.selectedCountryData.dialCode);
3931
- // a lot of numbers will have a space separating the dial code and the main number, and
3932
- // some NANP numbers will have a hyphen e.g. +1 684-733-1234 - in both cases we want to get
3933
- // rid of it
3934
- // NOTE: don't just trim all non-numerics as may want to preserve an open parenthesis etc
3935
- var start = number[dialCode.length] === " " || number[dialCode.length] === "-" ? dialCode.length + 1 : dialCode.length;
3936
- number = number.substr(start);
3937
- }
3938
- }
3939
- return this._cap(number);
3940
- }
3941
- }, {
3942
- key: "_triggerCountryChange",
3943
- value: function _triggerCountryChange() {
3944
- this._trigger("countrychange");
3945
- }
3946
- }, {
3947
- key: "handleAutoCountry",
3948
- value: function handleAutoCountry() {
3949
- if (this.options.initialCountry === "auto") {
3950
- // we must set this even if there is an initial val in the input: in case the initial val is
3951
- // invalid and they delete it - they should see their auto country
3952
- this.defaultCountry = window.intlTelInputGlobals.autoCountry;
3953
- // if there's no initial value in the input, then update the flag
3954
- if (!this.telInput.value) {
3955
- this.setCountry(this.defaultCountry);
3956
- }
3957
- this.resolveAutoCountryPromise();
3958
- }
3959
- }
3960
- }, {
3961
- key: "handleUtils",
3962
- value: function handleUtils() {
3963
- // if the request was successful
3964
- if (window.intlTelInputUtils) {
3965
- // if there's an initial value in the input, then format it
3966
- if (this.telInput.value) {
3967
- this._updateValFromNumber(this.telInput.value);
3968
- }
3969
- this._updatePlaceholder();
3970
- }
3971
- this.resolveUtilsScriptPromise();
3972
- }
3973
- }, {
3974
- key: "destroy",
3975
- value: function destroy() {
3976
- var form = this.telInput.form;
3977
- if (this.options.allowDropdown) {
3978
- // make sure the dropdown is closed (and unbind listeners)
3979
- this._closeDropdown();
3980
- this.selectedFlag.removeEventListener("click", this._handleClickSelectedFlag);
3981
- this.flagsContainer.removeEventListener("keydown", this._handleFlagsContainerKeydown);
3982
- // label click hack
3983
- var label = this._getClosestLabel();
3984
- if (label) {
3985
- label.removeEventListener("click", this._handleLabelClick);
3986
- }
3987
- }
3988
- // unbind hiddenInput listeners
3989
- if (this.hiddenInput && form) {
3990
- form.removeEventListener("submit", this._handleHiddenInputSubmit);
3991
- }
3992
- // unbind autoInsertDialCode listeners
3993
- if (this.options.autoInsertDialCode) {
3994
- if (form) {
3995
- form.removeEventListener("submit", this._handleSubmitOrBlurEvent);
3996
- }
3997
- this.telInput.removeEventListener("blur", this._handleSubmitOrBlurEvent);
3998
- }
3999
- // unbind key events, and cut/paste events
4000
- this.telInput.removeEventListener("keyup", this._handleKeyupEvent);
4001
- this.telInput.removeEventListener("cut", this._handleClipboardEvent);
4002
- this.telInput.removeEventListener("paste", this._handleClipboardEvent);
4003
- // remove attribute of id instance: data-intl-tel-input-id
4004
- this.telInput.removeAttribute("data-intl-tel-input-id");
4005
- // remove markup (but leave the original input)
4006
- var wrapper = this.telInput.parentNode;
4007
- wrapper.parentNode.insertBefore(this.telInput, wrapper);
4008
- wrapper.parentNode.removeChild(wrapper);
4009
- delete window.intlTelInputGlobals.instances[this.id];
4010
- }
4011
- }, {
4012
- key: "getExtension",
4013
- value: function getExtension() {
4014
- if (window.intlTelInputUtils) {
4015
- return intlTelInputUtils.getExtension(this._getFullNumber(), this.selectedCountryData.iso2);
4016
- }
4017
- return "";
4018
- }
4019
- }, {
4020
- key: "getNumber",
4021
- value: function getNumber(format) {
4022
- if (window.intlTelInputUtils) {
4023
- var iso2 = this.selectedCountryData.iso2;
4024
- return intlTelInputUtils.formatNumber(this._getFullNumber(), iso2, format);
4025
- }
4026
- return "";
4027
- }
4028
- }, {
4029
- key: "getNumberType",
4030
- value: function getNumberType() {
4031
- if (window.intlTelInputUtils) {
4032
- return intlTelInputUtils.getNumberType(this._getFullNumber(), this.selectedCountryData.iso2);
4033
- }
4034
- return -99;
4035
- }
4036
- }, {
4037
- key: "getSelectedCountryData",
4038
- value: function getSelectedCountryData() {
4039
- return this.selectedCountryData;
4040
- }
4041
- }, {
4042
- key: "getValidationError",
4043
- value: function getValidationError() {
4044
- if (window.intlTelInputUtils) {
4045
- var iso2 = this.selectedCountryData.iso2;
4046
- return intlTelInputUtils.getValidationError(this._getFullNumber(), iso2);
4047
- }
4048
- return -99;
4049
- }
4050
- }, {
4051
- key: "isValidNumber",
4052
- value: function isValidNumber() {
4053
- var val = this._getFullNumber().trim();
4054
- return window.intlTelInputUtils ? intlTelInputUtils.isValidNumber(val, this.selectedCountryData.iso2) : null;
4055
- }
4056
- }, {
4057
- key: "isPossibleNumber",
4058
- value: function isPossibleNumber() {
4059
- var val = this._getFullNumber().trim();
4060
- return window.intlTelInputUtils ? intlTelInputUtils.isPossibleNumber(val, this.selectedCountryData.iso2) : null;
4061
- }
4062
- }, {
4063
- key: "setCountry",
4064
- value: function setCountry(originalCountryCode) {
4065
- var countryCode = originalCountryCode.toLowerCase();
4066
- // check if already selected
4067
- if (this.selectedCountryData.iso2 !== countryCode) {
4068
- this._setFlag(countryCode);
4069
- this._updateDialCode(this.selectedCountryData.dialCode);
4070
- this._triggerCountryChange();
4071
- }
4072
- }
4073
- }, {
4074
- key: "setNumber",
4075
- value: function setNumber(number) {
4076
- // we must update the flag first, which updates this.selectedCountryData, which is used for
4077
- // formatting the number before displaying it
4078
- var flagChanged = this._updateFlagFromNumber(number);
4079
- this._updateValFromNumber(number);
4080
- if (flagChanged) {
4081
- this._triggerCountryChange();
4082
- }
4083
- }
4084
- }, {
4085
- key: "setPlaceholderNumberType",
4086
- value: function setPlaceholderNumberType(type) {
4087
- this.options.placeholderNumberType = type;
4088
- this._updatePlaceholder();
4089
- }
4090
- } ]);
4091
- return Iti;
4092
- }();
4093
- /********************
4094
- * STATIC METHODS
4095
- ********************/
4096
- // get the country data object
4097
- intlTelInputGlobals.getCountryData = function() {
4098
- return allCountries;
4099
- };
4100
- // inject a <script> element to load utils.js
4101
- var injectScript = function injectScript(path, handleSuccess, handleFailure) {
4102
- // inject a new script element into the page
4103
- var script = document.createElement("script");
4104
- script.onload = function() {
4105
- forEachInstance("handleUtils");
4106
- if (handleSuccess) {
4107
- handleSuccess();
4108
- }
4109
- };
4110
- script.onerror = function() {
4111
- forEachInstance("rejectUtilsScriptPromise");
4112
- if (handleFailure) {
4113
- handleFailure();
4114
- }
4115
- };
4116
- script.className = "iti-load-utils";
4117
- script.async = true;
4118
- script.src = path;
4119
- document.body.appendChild(script);
4120
- };
4121
- // load the utils script
4122
- intlTelInputGlobals.loadUtils = function(path) {
4123
- // 2 options:
4124
- // 1) not already started loading (start)
4125
- // 2) already started loading (do nothing - just wait for the onload callback to fire, which will
4126
- // trigger handleUtils on all instances, invoking their resolveUtilsScriptPromise functions)
4127
- if (!window.intlTelInputUtils && !window.intlTelInputGlobals.startedLoadingUtilsScript) {
4128
- // only do this once
4129
- window.intlTelInputGlobals.startedLoadingUtilsScript = true;
4130
- // if we have promises, then return a promise
4131
- if (typeof Promise !== "undefined") {
4132
- return new Promise(function(resolve, reject) {
4133
- return injectScript(path, resolve, reject);
4134
- });
4135
- }
4136
- injectScript(path);
4137
- }
4138
- return null;
4139
- };
4140
- // default options
4141
- intlTelInputGlobals.defaults = defaults;
4142
- // version
4143
- intlTelInputGlobals.version = "18.5.3";
4144
- // convenience wrapper
4145
- return function(input, options) {
4146
- var iti = new Iti(input, options);
4147
- iti._init();
4148
- input.setAttribute("data-intl-tel-input-id", iti.id);
4149
- window.intlTelInputGlobals.instances[iti.id] = iti;
4150
- return iti;
4151
- };
4152
- }();
4153
- });
4154
- });
4155
-
4156
- /**
4157
- * Exposing intl-tel-input as a component
4158
- */
4159
- var intlTelInput = intlTelInput$1;
4160
-
4161
- const ptcTextfieldCss = ".mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right;}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:\"*\"}[dir=rtl] .mdc-floating-label--required,.mdc-floating-label--required[dir=rtl]{}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{-webkit-transform:translateY(-106%) scale(0.75);transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{-webkit-animation:mdc-floating-label-shake-float-above-standard 250ms 1;animation:mdc-floating-label-shake-float-above-standard 250ms 1}@-webkit-keyframes mdc-floating-label-shake-float-above-standard{0%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-floating-label-shake-float-above-standard{0%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:\"\"}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{-webkit-transform:scaleX(0);transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{-webkit-transform:scaleX(1);transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right;}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid;}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none;}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0;}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale, 1));transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity, transform, color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}.mdc-text-field__input::-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports (-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0;}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0;}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px;}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px;}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:\"\";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px;}.mdc-text-field--filled .mdc-floating-label--float-above{-webkit-transform:translateY(-106%) scale(0.75);transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports (-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{-webkit-transform:translateY(-37.25px) scale(1);transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:0.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{-webkit-transform:translateY(-34.75px) scale(0.75);transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{-webkit-animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1;animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@-webkit-keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0;}@supports (top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports (top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px);}@supports (top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports (top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports (top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports (top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports (top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0;}@supports (top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports (top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;}@supports (top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{background-color:transparent;background-color:var(--mdc-ripple-color, transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px;}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){-webkit-transform:none;transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{-webkit-transform:translateY(-10.25px) scale(0.75);transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{-webkit-animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1;animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@-webkit-keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{-webkit-transform:translateY(-27.25px) scale(1);transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:0.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{-webkit-transform:translateY(-24.75px) scale(0.75);transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{-webkit-animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1;animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@-webkit-keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75);transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:\"\";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{-webkit-transform:translateY(-1px);transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{-webkit-transform:translateY(1px);transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{-webkit-transform:translateX(-1px) translateY(-1px);transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{-webkit-transform:translateX(1px) translateY(-1px);transform:translateX(1px) translateY(-1px);}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{-webkit-transform:translateX(1px) translateY(1px);transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{-webkit-transform:translateX(-1px) translateY(1px);transform:translateX(-1px) translateY(1px);}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0;}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px;}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px;}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{-webkit-transform:translateY(-37.25px) translateX(-32px) scale(1);transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{-webkit-transform:translateY(-37.25px) translateX(32px) scale(1);transform:translateY(-37.25px) translateX(32px) scale(1);}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:0.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{-webkit-transform:translateY(-34.75px) translateX(-32px) scale(0.75);transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{-webkit-transform:translateY(-34.75px) translateX(32px) scale(0.75);transform:translateY(-34.75px) translateX(32px) scale(0.75);}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{-webkit-animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1;animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@-webkit-keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{-webkit-transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{-webkit-transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl]{}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{-webkit-animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1;animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@-webkit-keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{-webkit-transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{-webkit-transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{-webkit-animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);-webkit-transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{-webkit-animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);-webkit-transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{-webkit-transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75);transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px;}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::-webkit-input-placeholder{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__input::-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::-webkit-input-placeholder{color:GrayText}.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}.mdc-text-field--disabled .mdc-text-field__input::-ms-input-placeholder{color:GrayText}.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left;}[dir=rtl] .mdc-text-field--ltr-text,.mdc-text-field--ltr-text[dir=rtl]{}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl]{}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:\"\";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:\"\";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto;}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px;}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex=\"-1\"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px;}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px;}.iti{position:relative;display:inline-block}.iti *{box-sizing:border-box}.iti__hide{display:none}.iti__v-hide{visibility:hidden}.iti input.iti__tel-input,.iti input.iti__tel-input[type=text],.iti input.iti__tel-input[type=tel]{position:relative;z-index:0;margin-top:0 !important;margin-bottom:0 !important;padding-right:36px;margin-right:0}.iti__flag-container{position:absolute;top:0;bottom:0;right:0;padding:1px}.iti__selected-flag{z-index:1;position:relative;display:flex;align-items:center;height:100%;padding:0 6px 0 8px}.iti__arrow{margin-left:6px;width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid #555}[dir=rtl] .iti__arrow{margin-right:6px;margin-left:0}.iti__arrow--up{border-top:none;border-bottom:4px solid #555}.iti__dropdown-content{position:absolute;z-index:2;margin-left:-1px;box-shadow:1px 1px 4px rgba(0, 0, 0, 0.2);background-color:white;border:1px solid #ccc;max-height:200px;overflow-y:scroll;-webkit-overflow-scrolling:touch}.iti__dropdown-content--dropup{bottom:100%;margin-bottom:-1px}.iti__search-input{width:100%;border-width:0}.iti__country-list{list-style:none;padding:0;margin:0}.iti--flexible-dropdown-width .iti__country-list{white-space:nowrap}@media (max-width: 500px){.iti--flexible-dropdown-width .iti__country-list{white-space:normal}}.iti__flag-box{display:inline-block;width:20px}.iti__divider{padding-bottom:5px;margin-bottom:5px;border-bottom:1px solid #ccc}.iti__country{display:flex;align-items:center;padding:5px 10px;outline:none}.iti__dial-code{color:#999}.iti__country.iti__highlight{background-color:rgba(0, 0, 0, 0.05)}.iti__flag-box,.iti__country-name{margin-right:6px}[dir=rtl] .iti__flag-box,[dir=rtl] .iti__country-name{margin-right:0;margin-left:6px}.iti--allow-dropdown input.iti__tel-input,.iti--allow-dropdown input.iti__tel-input[type=text],.iti--allow-dropdown input.iti__tel-input[type=tel],.iti--separate-dial-code input.iti__tel-input,.iti--separate-dial-code input.iti__tel-input[type=text],.iti--separate-dial-code input.iti__tel-input[type=tel]{padding-right:6px;padding-left:52px;margin-left:0}[dir=rtl] .iti--allow-dropdown input.iti__tel-input,[dir=rtl] .iti--allow-dropdown input.iti__tel-input[type=text],[dir=rtl] .iti--allow-dropdown input.iti__tel-input[type=tel],[dir=rtl] .iti--separate-dial-code input.iti__tel-input,[dir=rtl] .iti--separate-dial-code input.iti__tel-input[type=text],[dir=rtl] .iti--separate-dial-code input.iti__tel-input[type=tel]{padding-right:52px;padding-left:6px;margin-right:0}.iti--allow-dropdown .iti__flag-container,.iti--separate-dial-code .iti__flag-container{right:auto;left:0}[dir=rtl] .iti--allow-dropdown .iti__flag-container,[dir=rtl] .iti--separate-dial-code .iti__flag-container{right:0;left:auto}.iti--allow-dropdown .iti__flag-container:hover{cursor:pointer}.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag{background-color:rgba(0, 0, 0, 0.05)}.iti--allow-dropdown .iti__flag-container:has(+input[disabled]):hover,.iti--allow-dropdown .iti__flag-container:has(+input[readonly]):hover{cursor:default}.iti--allow-dropdown .iti__flag-container:has(+input[disabled]):hover .iti__selected-flag,.iti--allow-dropdown .iti__flag-container:has(+input[readonly]):hover .iti__selected-flag{background-color:transparent}.iti--separate-dial-code .iti__selected-flag{background-color:rgba(0, 0, 0, 0.05)}.iti--separate-dial-code.iti--show-flags .iti__selected-dial-code{margin-left:6px}[dir=rtl] .iti--separate-dial-code.iti--show-flags .iti__selected-dial-code{margin-left:0;margin-right:6px}.iti--container{position:absolute;top:-1000px;left:-1000px;z-index:1060;padding:1px}.iti--container:hover{cursor:pointer}.iti--fullscreen-popup.iti--container{background-color:rgba(0, 0, 0, 0.5);top:0;bottom:0;left:0;right:0;position:fixed;padding:30px;display:flex;flex-direction:column;justify-content:center}.iti--fullscreen-popup.iti--container.iti--country-search{justify-content:flex-start}.iti--fullscreen-popup .iti__dropdown-content{max-height:100%;position:relative}.iti--fullscreen-popup .iti__country{padding:10px 10px;line-height:1.5em}.iti__flag{width:20px}.iti__flag.iti__be{width:18px}.iti__flag.iti__ch{width:15px}.iti__flag.iti__mc{width:19px}.iti__flag.iti__ne{width:18px}.iti__flag.iti__np{width:13px}.iti__flag.iti__va{width:15px}@media (min-resolution: 2x){.iti__flag{background-size:5762px 15px}}.iti__flag.iti__ac{height:10px;background-position:0px 0px}.iti__flag.iti__ad{height:14px;background-position:-22px 0px}.iti__flag.iti__ae{height:10px;background-position:-44px 0px}.iti__flag.iti__af{height:14px;background-position:-66px 0px}.iti__flag.iti__ag{height:14px;background-position:-88px 0px}.iti__flag.iti__ai{height:10px;background-position:-110px 0px}.iti__flag.iti__al{height:15px;background-position:-132px 0px}.iti__flag.iti__am{height:10px;background-position:-154px 0px}.iti__flag.iti__ao{height:14px;background-position:-176px 0px}.iti__flag.iti__aq{height:14px;background-position:-198px 0px}.iti__flag.iti__ar{height:13px;background-position:-220px 0px}.iti__flag.iti__as{height:10px;background-position:-242px 0px}.iti__flag.iti__at{height:14px;background-position:-264px 0px}.iti__flag.iti__au{height:10px;background-position:-286px 0px}.iti__flag.iti__aw{height:14px;background-position:-308px 0px}.iti__flag.iti__ax{height:13px;background-position:-330px 0px}.iti__flag.iti__az{height:10px;background-position:-352px 0px}.iti__flag.iti__ba{height:10px;background-position:-374px 0px}.iti__flag.iti__bb{height:14px;background-position:-396px 0px}.iti__flag.iti__bd{height:12px;background-position:-418px 0px}.iti__flag.iti__be{height:15px;background-position:-440px 0px}.iti__flag.iti__bf{height:14px;background-position:-460px 0px}.iti__flag.iti__bg{height:12px;background-position:-482px 0px}.iti__flag.iti__bh{height:12px;background-position:-504px 0px}.iti__flag.iti__bi{height:12px;background-position:-526px 0px}.iti__flag.iti__bj{height:14px;background-position:-548px 0px}.iti__flag.iti__bl{height:14px;background-position:-570px 0px}.iti__flag.iti__bm{height:10px;background-position:-592px 0px}.iti__flag.iti__bn{height:10px;background-position:-614px 0px}.iti__flag.iti__bo{height:14px;background-position:-636px 0px}.iti__flag.iti__bq{height:14px;background-position:-658px 0px}.iti__flag.iti__br{height:14px;background-position:-680px 0px}.iti__flag.iti__bs{height:10px;background-position:-702px 0px}.iti__flag.iti__bt{height:14px;background-position:-724px 0px}.iti__flag.iti__bv{height:15px;background-position:-746px 0px}.iti__flag.iti__bw{height:14px;background-position:-768px 0px}.iti__flag.iti__by{height:10px;background-position:-790px 0px}.iti__flag.iti__bz{height:12px;background-position:-812px 0px}.iti__flag.iti__ca{height:10px;background-position:-834px 0px}.iti__flag.iti__cc{height:10px;background-position:-856px 0px}.iti__flag.iti__cd{height:15px;background-position:-878px 0px}.iti__flag.iti__cf{height:14px;background-position:-900px 0px}.iti__flag.iti__cg{height:14px;background-position:-922px 0px}.iti__flag.iti__ch{height:15px;background-position:-944px 0px}.iti__flag.iti__ci{height:14px;background-position:-961px 0px}.iti__flag.iti__ck{height:10px;background-position:-983px 0px}.iti__flag.iti__cl{height:14px;background-position:-1005px 0px}.iti__flag.iti__cm{height:14px;background-position:-1027px 0px}.iti__flag.iti__cn{height:14px;background-position:-1049px 0px}.iti__flag.iti__co{height:14px;background-position:-1071px 0px}.iti__flag.iti__cp{height:14px;background-position:-1093px 0px}.iti__flag.iti__cq{height:12px;background-position:-1115px 0px}.iti__flag.iti__cr{height:12px;background-position:-1137px 0px}.iti__flag.iti__cu{height:10px;background-position:-1159px 0px}.iti__flag.iti__cv{height:12px;background-position:-1181px 0px}.iti__flag.iti__cw{height:14px;background-position:-1203px 0px}.iti__flag.iti__cx{height:10px;background-position:-1225px 0px}.iti__flag.iti__cy{height:14px;background-position:-1247px 0px}.iti__flag.iti__cz{height:14px;background-position:-1269px 0px}.iti__flag.iti__de{height:12px;background-position:-1291px 0px}.iti__flag.iti__dg{height:10px;background-position:-1313px 0px}.iti__flag.iti__dj{height:14px;background-position:-1335px 0px}.iti__flag.iti__dk{height:15px;background-position:-1357px 0px}.iti__flag.iti__dm{height:10px;background-position:-1379px 0px}.iti__flag.iti__do{height:14px;background-position:-1401px 0px}.iti__flag.iti__dz{height:14px;background-position:-1423px 0px}.iti__flag.iti__ea{height:14px;background-position:-1445px 0px}.iti__flag.iti__ec{height:14px;background-position:-1467px 0px}.iti__flag.iti__ee{height:13px;background-position:-1489px 0px}.iti__flag.iti__eg{height:14px;background-position:-1511px 0px}.iti__flag.iti__eh{height:10px;background-position:-1533px 0px}.iti__flag.iti__er{height:10px;background-position:-1555px 0px}.iti__flag.iti__es{height:14px;background-position:-1577px 0px}.iti__flag.iti__et{height:10px;background-position:-1599px 0px}.iti__flag.iti__eu{height:14px;background-position:-1621px 0px}.iti__flag.iti__ez{height:14px;background-position:-1643px 0px}.iti__flag.iti__fi{height:12px;background-position:-1665px 0px}.iti__flag.iti__fj{height:10px;background-position:-1687px 0px}.iti__flag.iti__fk{height:10px;background-position:-1709px 0px}.iti__flag.iti__fm{height:11px;background-position:-1731px 0px}.iti__flag.iti__fo{height:15px;background-position:-1753px 0px}.iti__flag.iti__fr{height:14px;background-position:-1775px 0px}.iti__flag.iti__fx{height:14px;background-position:-1797px 0px}.iti__flag.iti__ga{height:15px;background-position:-1819px 0px}.iti__flag.iti__gb{height:10px;background-position:-1841px 0px}.iti__flag.iti__gd{height:12px;background-position:-1863px 0px}.iti__flag.iti__ge{height:14px;background-position:-1885px 0px}.iti__flag.iti__gf{height:14px;background-position:-1907px 0px}.iti__flag.iti__gg{height:14px;background-position:-1929px 0px}.iti__flag.iti__gh{height:14px;background-position:-1951px 0px}.iti__flag.iti__gi{height:10px;background-position:-1973px 0px}.iti__flag.iti__gl{height:14px;background-position:-1995px 0px}.iti__flag.iti__gm{height:14px;background-position:-2017px 0px}.iti__flag.iti__gn{height:14px;background-position:-2039px 0px}.iti__flag.iti__gp{height:14px;background-position:-2061px 0px}.iti__flag.iti__gq{height:14px;background-position:-2083px 0px}.iti__flag.iti__gr{height:14px;background-position:-2105px 0px}.iti__flag.iti__gs{height:10px;background-position:-2127px 0px}.iti__flag.iti__gt{height:13px;background-position:-2149px 0px}.iti__flag.iti__gu{height:11px;background-position:-2171px 0px}.iti__flag.iti__gw{height:10px;background-position:-2193px 0px}.iti__flag.iti__gy{height:12px;background-position:-2215px 0px}.iti__flag.iti__hk{height:14px;background-position:-2237px 0px}.iti__flag.iti__hm{height:10px;background-position:-2259px 0px}.iti__flag.iti__hn{height:10px;background-position:-2281px 0px}.iti__flag.iti__hr{height:10px;background-position:-2303px 0px}.iti__flag.iti__ht{height:12px;background-position:-2325px 0px}.iti__flag.iti__hu{height:10px;background-position:-2347px 0px}.iti__flag.iti__ic{height:14px;background-position:-2369px 0px}.iti__flag.iti__id{height:14px;background-position:-2391px 0px}.iti__flag.iti__ie{height:10px;background-position:-2413px 0px}.iti__flag.iti__il{height:15px;background-position:-2435px 0px}.iti__flag.iti__im{height:10px;background-position:-2457px 0px}.iti__flag.iti__in{height:14px;background-position:-2479px 0px}.iti__flag.iti__io{height:10px;background-position:-2501px 0px}.iti__flag.iti__iq{height:14px;background-position:-2523px 0px}.iti__flag.iti__ir{height:12px;background-position:-2545px 0px}.iti__flag.iti__is{height:15px;background-position:-2567px 0px}.iti__flag.iti__it{height:14px;background-position:-2589px 0px}.iti__flag.iti__je{height:12px;background-position:-2611px 0px}.iti__flag.iti__jm{height:10px;background-position:-2633px 0px}.iti__flag.iti__jo{height:10px;background-position:-2655px 0px}.iti__flag.iti__jp{height:14px;background-position:-2677px 0px}.iti__flag.iti__ke{height:14px;background-position:-2699px 0px}.iti__flag.iti__kg{height:12px;background-position:-2721px 0px}.iti__flag.iti__kh{height:13px;background-position:-2743px 0px}.iti__flag.iti__ki{height:10px;background-position:-2765px 0px}.iti__flag.iti__km{height:12px;background-position:-2787px 0px}.iti__flag.iti__kn{height:14px;background-position:-2809px 0px}.iti__flag.iti__kp{height:10px;background-position:-2831px 0px}.iti__flag.iti__kr{height:14px;background-position:-2853px 0px}.iti__flag.iti__kw{height:10px;background-position:-2875px 0px}.iti__flag.iti__ky{height:10px;background-position:-2897px 0px}.iti__flag.iti__kz{height:10px;background-position:-2919px 0px}.iti__flag.iti__la{height:14px;background-position:-2941px 0px}.iti__flag.iti__lb{height:14px;background-position:-2963px 0px}.iti__flag.iti__lc{height:10px;background-position:-2985px 0px}.iti__flag.iti__li{height:12px;background-position:-3007px 0px}.iti__flag.iti__lk{height:10px;background-position:-3029px 0px}.iti__flag.iti__lr{height:11px;background-position:-3051px 0px}.iti__flag.iti__ls{height:14px;background-position:-3073px 0px}.iti__flag.iti__lt{height:12px;background-position:-3095px 0px}.iti__flag.iti__lu{height:12px;background-position:-3117px 0px}.iti__flag.iti__lv{height:10px;background-position:-3139px 0px}.iti__flag.iti__ly{height:10px;background-position:-3161px 0px}.iti__flag.iti__ma{height:14px;background-position:-3183px 0px}.iti__flag.iti__mc{height:15px;background-position:-3205px 0px}.iti__flag.iti__md{height:10px;background-position:-3226px 0px}.iti__flag.iti__me{height:10px;background-position:-3248px 0px}.iti__flag.iti__mf{height:14px;background-position:-3270px 0px}.iti__flag.iti__mg{height:14px;background-position:-3292px 0px}.iti__flag.iti__mh{height:11px;background-position:-3314px 0px}.iti__flag.iti__mk{height:10px;background-position:-3336px 0px}.iti__flag.iti__ml{height:14px;background-position:-3358px 0px}.iti__flag.iti__mm{height:14px;background-position:-3380px 0px}.iti__flag.iti__mn{height:10px;background-position:-3402px 0px}.iti__flag.iti__mo{height:14px;background-position:-3424px 0px}.iti__flag.iti__mp{height:10px;background-position:-3446px 0px}.iti__flag.iti__mq{height:14px;background-position:-3468px 0px}.iti__flag.iti__mr{height:14px;background-position:-3490px 0px}.iti__flag.iti__ms{height:10px;background-position:-3512px 0px}.iti__flag.iti__mt{height:14px;background-position:-3534px 0px}.iti__flag.iti__mu{height:14px;background-position:-3556px 0px}.iti__flag.iti__mv{height:14px;background-position:-3578px 0px}.iti__flag.iti__mw{height:14px;background-position:-3600px 0px}.iti__flag.iti__mx{height:12px;background-position:-3622px 0px}.iti__flag.iti__my{height:10px;background-position:-3644px 0px}.iti__flag.iti__mz{height:14px;background-position:-3666px 0px}.iti__flag.iti__na{height:14px;background-position:-3688px 0px}.iti__flag.iti__nc{height:10px;background-position:-3710px 0px}.iti__flag.iti__ne{height:15px;background-position:-3732px 0px}.iti__flag.iti__nf{height:10px;background-position:-3752px 0px}.iti__flag.iti__ng{height:10px;background-position:-3774px 0px}.iti__flag.iti__ni{height:12px;background-position:-3796px 0px}.iti__flag.iti__nl{height:14px;background-position:-3818px 0px}.iti__flag.iti__no{height:15px;background-position:-3840px 0px}.iti__flag.iti__np{height:15px;background-position:-3862px 0px}.iti__flag.iti__nr{height:10px;background-position:-3877px 0px}.iti__flag.iti__nu{height:10px;background-position:-3899px 0px}.iti__flag.iti__nz{height:10px;background-position:-3921px 0px}.iti__flag.iti__om{height:10px;background-position:-3943px 0px}.iti__flag.iti__pa{height:14px;background-position:-3965px 0px}.iti__flag.iti__pe{height:14px;background-position:-3987px 0px}.iti__flag.iti__pf{height:14px;background-position:-4009px 0px}.iti__flag.iti__pg{height:15px;background-position:-4031px 0px}.iti__flag.iti__ph{height:10px;background-position:-4053px 0px}.iti__flag.iti__pk{height:14px;background-position:-4075px 0px}.iti__flag.iti__pl{height:13px;background-position:-4097px 0px}.iti__flag.iti__pm{height:14px;background-position:-4119px 0px}.iti__flag.iti__pn{height:10px;background-position:-4141px 0px}.iti__flag.iti__pr{height:14px;background-position:-4163px 0px}.iti__flag.iti__ps{height:10px;background-position:-4185px 0px}.iti__flag.iti__pt{height:14px;background-position:-4207px 0px}.iti__flag.iti__pw{height:13px;background-position:-4229px 0px}.iti__flag.iti__py{height:11px;background-position:-4251px 0px}.iti__flag.iti__qa{height:8px;background-position:-4273px 0px}.iti__flag.iti__re{height:14px;background-position:-4295px 0px}.iti__flag.iti__ro{height:14px;background-position:-4317px 0px}.iti__flag.iti__rs{height:14px;background-position:-4339px 0px}.iti__flag.iti__ru{height:14px;background-position:-4361px 0px}.iti__flag.iti__rw{height:14px;background-position:-4383px 0px}.iti__flag.iti__sa{height:14px;background-position:-4405px 0px}.iti__flag.iti__sb{height:10px;background-position:-4427px 0px}.iti__flag.iti__sc{height:10px;background-position:-4449px 0px}.iti__flag.iti__sd{height:10px;background-position:-4471px 0px}.iti__flag.iti__se{height:13px;background-position:-4493px 0px}.iti__flag.iti__sg{height:14px;background-position:-4515px 0px}.iti__flag.iti__sh{height:10px;background-position:-4537px 0px}.iti__flag.iti__si{height:10px;background-position:-4559px 0px}.iti__flag.iti__sj{height:15px;background-position:-4581px 0px}.iti__flag.iti__sk{height:14px;background-position:-4603px 0px}.iti__flag.iti__sl{height:14px;background-position:-4625px 0px}.iti__flag.iti__sm{height:15px;background-position:-4647px 0px}.iti__flag.iti__sn{height:14px;background-position:-4669px 0px}.iti__flag.iti__so{height:14px;background-position:-4691px 0px}.iti__flag.iti__sr{height:14px;background-position:-4713px 0px}.iti__flag.iti__ss{height:10px;background-position:-4735px 0px}.iti__flag.iti__st{height:10px;background-position:-4757px 0px}.iti__flag.iti__su{height:10px;background-position:-4779px 0px}.iti__flag.iti__sv{height:12px;background-position:-4801px 0px}.iti__flag.iti__sx{height:14px;background-position:-4823px 0px}.iti__flag.iti__sy{height:14px;background-position:-4845px 0px}.iti__flag.iti__sz{height:14px;background-position:-4867px 0px}.iti__flag.iti__ta{height:10px;background-position:-4889px 0px}.iti__flag.iti__tc{height:10px;background-position:-4911px 0px}.iti__flag.iti__td{height:14px;background-position:-4933px 0px}.iti__flag.iti__tf{height:14px;background-position:-4955px 0px}.iti__flag.iti__tg{height:13px;background-position:-4977px 0px}.iti__flag.iti__th{height:14px;background-position:-4999px 0px}.iti__flag.iti__tj{height:10px;background-position:-5021px 0px}.iti__flag.iti__tk{height:10px;background-position:-5043px 0px}.iti__flag.iti__tl{height:10px;background-position:-5065px 0px}.iti__flag.iti__tm{height:14px;background-position:-5087px 0px}.iti__flag.iti__tn{height:14px;background-position:-5109px 0px}.iti__flag.iti__to{height:10px;background-position:-5131px 0px}.iti__flag.iti__tr{height:14px;background-position:-5153px 0px}.iti__flag.iti__tt{height:12px;background-position:-5175px 0px}.iti__flag.iti__tv{height:10px;background-position:-5197px 0px}.iti__flag.iti__tw{height:14px;background-position:-5219px 0px}.iti__flag.iti__tz{height:14px;background-position:-5241px 0px}.iti__flag.iti__ua{height:14px;background-position:-5263px 0px}.iti__flag.iti__ug{height:14px;background-position:-5285px 0px}.iti__flag.iti__uk{height:10px;background-position:-5307px 0px}.iti__flag.iti__um{height:11px;background-position:-5329px 0px}.iti__flag.iti__un{height:14px;background-position:-5351px 0px}.iti__flag.iti__us{height:11px;background-position:-5373px 0px}.iti__flag.iti__uy{height:14px;background-position:-5395px 0px}.iti__flag.iti__uz{height:10px;background-position:-5417px 0px}.iti__flag.iti__va{height:15px;background-position:-5439px 0px}.iti__flag.iti__vc{height:14px;background-position:-5456px 0px}.iti__flag.iti__ve{height:14px;background-position:-5478px 0px}.iti__flag.iti__vg{height:10px;background-position:-5500px 0px}.iti__flag.iti__vi{height:14px;background-position:-5522px 0px}.iti__flag.iti__vn{height:14px;background-position:-5544px 0px}.iti__flag.iti__vu{height:12px;background-position:-5566px 0px}.iti__flag.iti__wf{height:14px;background-position:-5588px 0px}.iti__flag.iti__ws{height:10px;background-position:-5610px 0px}.iti__flag.iti__xk{height:15px;background-position:-5632px 0px}.iti__flag.iti__ye{height:14px;background-position:-5654px 0px}.iti__flag.iti__yt{height:14px;background-position:-5676px 0px}.iti__flag.iti__za{height:14px;background-position:-5698px 0px}.iti__flag.iti__zm{height:14px;background-position:-5720px 0px}.iti__flag.iti__zw{height:10px;background-position:-5742px 0px}.iti__flag{height:15px;box-shadow:0px 0px 1px 0px #888;background-image:url(\"../img/flags.png?1\");background-repeat:no-repeat;background-color:#dbdbdb;background-position:20px 0}@media (min-resolution: 2x){.iti__flag{background-image:url(\"../img/flags@2x.png?1\")}}.iti__flag.iti__np{background-color:transparent}h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}.ptc-text-field{display:block;margin-bottom:var(--ptc-element-spacing-04)}.ptc-text-field.invalid-field{position:relative}.ptc-text-field.invalid-field::before{content:\"\";position:absolute;width:calc(100% + 16px);height:calc(100% + 8px);background:#fef3f3;display:flex;flex-direction:column;justify-content:center;z-index:0;left:50%;top:50%;transform:translate(-50%, -50%)}.ptc-text-field.textfield-hidden{margin-bottom:0px}.ptc-text-field .phone-field-style{z-index:3}.ptc-text-field form{width:273px;display:flex;flex-direction:column;justify-content:center;align-items:center}.ptc-text-field .ptc-label{display:block;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-semibold);line-height:normal;margin-bottom:var(--ptc-element-spacing-01);position:relative;z-index:1;color:var(--color-gray-13)}.ptc-text-field .mdc-text-field-helper-line{display:flex;flex-direction:column;height:0}.ptc-text-field .mdc-text-field+.mdc-text-field-helper-line{padding-left:8px}.ptc-text-field .mdc-text-field-helper-text{color:var(--color-gray-13);font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-xx-small);font-style:normal;font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-densest);max-width:240px;opacity:0;margin-top:var(--ptc-element-spacing-02)}.ptc-text-field .mdc-text-field--invalid+.mdc-text-field-helper-line{height:auto}.ptc-text-field .mdc-text-field--invalid+.mdc-text-field-helper-line .input-error-svg{transform:translate(-8px, 3px)}.ptc-text-field .mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text{opacity:1}.ptc-text-field .field-with-counter{position:relative}.ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.mouse-focus .mdc-notched-outline__leading,.ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.mouse-focus .mdc-notched-outline__notch,.ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.mouse-focus .mdc-notched-outline__trailing,.ptc-text-field .mdc-text-field--outlined.mouse-focus .mdc-notched-outline__leading,.ptc-text-field .mdc-text-field--outlined.mouse-focus .mdc-notched-outline__notch,.ptc-text-field .mdc-text-field--outlined.mouse-focus .mdc-notched-outline__trailing{border-color:var(--color-blue-07)}.ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.keyboard-focus .mdc-notched-outline__leading,.ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.keyboard-focus .mdc-notched-outline__notch,.ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.keyboard-focus .mdc-notched-outline__trailing,.ptc-text-field .mdc-text-field--outlined.keyboard-focus .mdc-notched-outline__leading,.ptc-text-field .mdc-text-field--outlined.keyboard-focus .mdc-notched-outline__notch,.ptc-text-field .mdc-text-field--outlined.keyboard-focus .mdc-notched-outline__trailing{border-color:var(--keyboard-nav-outline);border-width:5px}.ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.keyboard-focus .mdc-notched-outline__leading,.ptc-text-field .mdc-text-field--outlined.keyboard-focus .mdc-notched-outline__leading{border-top-left-radius:var(--ptc-border-radius-standard) !important;border-bottom-left-radius:var(--ptc-border-radius-standard) !important}.ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.keyboard-focus .mdc-notched-outline__trailing,.ptc-text-field .mdc-text-field--outlined.keyboard-focus .mdc-notched-outline__trailing{border-top-right-radius:var(--ptc-border-radius-standard) !important;border-bottom-right-radius:var(--ptc-border-radius-standard) !important}.ptc-text-field .mdc-text-field--outlined{height:34px;width:273px;padding-left:8px;padding-right:8px}.ptc-text-field .mdc-text-field--outlined .mdc-notched-outline__trailing{border-radius:0px !important}.ptc-text-field .mdc-text-field--outlined .mdc-notched-outline__leading{border-radius:0px !important}.ptc-text-field .ptc-textfield-outline{background-color:var(--color-white)}.ptc-text-field .mdc-text-field-helper-text--validation-msg{color:#af3231 !important;font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-semibold) !important;line-height:var(--ptc-line-height-densest);max-width:240px}.ptc-text-field .ptc-text-field-alert-line{position:relative;z-index:2}.ptc-text-field .mdc-text-field-helper-text--alert-msg{color:var(--color-hyperlink) !important;font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-semibold) !important;line-height:var(--ptc-line-height-densest);max-width:240px}.ptc-text-field .mdc-text-field-helper-text--alert-msg .alert-msg-svg{margin-right:var(--ptc-element-spacing-02);transform:translateY(3px)}.ptc-text-field .mdc-text-field-helper-text--alert-content-msg{color:#40434a;font-feature-settings:\"clig\" off, \"liga\" off;font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-xx-small);font-style:normal;font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-densest);padding-left:var(--ptc-element-spacing-06)}.ptc-text-field .mdc-text-field-helper-text--info-msg{transform:translateX(16px)}.ptc-text-field .mdc-text-field__input{z-index:2;color:var(--color-gray-12) !important;font-family:\"Open Sans\", Arial, sans-serif;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-regular);line-height:24px}.ptc-text-field .mdc-text-field--with-internal-counter{padding-right:56px}.ptc-text-field .mdc-text-field-character-counter{position:absolute;right:16px;top:0px;transform:translateY(-150%);font-family:\"Open Sans\", Arial, sans-serif;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-regular);line-height:var(--ptc-font-size-xx-small)}.ptc-text-field .iti{height:35px;z-index:3}.ptc-text-field .iti__flag{background-image:url(\"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/18.2.1/img/flags.png\")}@media (min-resolution: 192dpi){.ptc-text-field .iti__flag{background-image:url(\"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/18.2.1/img/flags@2x.png\")}}.ptc-text-field .intl-phone-adjustments{padding-left:0px;z-index:3}.ptc-text-field .intl-phone-adjustments .iti__selected-flag:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline);outline-offset:-4px}.ptc-text-field .intl-phone-adjustments ul{width:273px}.ptc-text-field .mdc-text-field--focused:not(.mdc-text-field--invalid)+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:0}.ptc-text-field .mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:var(--color-gray-13)}.ptc-text-field .mdc-text-field__input::-moz-placeholder{font-family:\"Open Sans\", Arial, sans-serif;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-regular);line-height:24px}.ptc-text-field .mdc-text-field__input::placeholder{font-family:\"Open Sans\", Arial, sans-serif;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-regular);line-height:24px}.ptc-text-field.email-signup{margin-bottom:0;width:100%;height:51px}.ptc-text-field.email-signup::before{background-color:transparent}.ptc-text-field.email-signup .mdc-text-field--outlined{height:100%;width:100%}.ptc-text-field.email-signup .mdc-text-field--outlined .mdc-notched-outline__trailing,.ptc-text-field.email-signup .mdc-text-field--outlined .mdc-notched-outline__leading{border-color:transparent}.ptc-text-field.email-signup .mdc-text-field--outlined .mdc-notched-outline__leading{border-top-left-radius:var(--ptc-border-radius-standard) !important;border-bottom-left-radius:var(--ptc-border-radius-standard) !important}.ptc-text-field.email-signup .mdc-text-field--outlined.mdc-text-field--invalid .mdc-notched-outline__trailing,.ptc-text-field.email-signup .mdc-text-field--outlined.mdc-text-field--invalid .mdc-notched-outline__leading{border-color:var(--color-red-08)}.ptc-text-field.email-signup .ptc-textfield-outline{border-top-left-radius:var(--ptc-border-radius-standard);border-bottom-left-radius:var(--ptc-border-radius-standard)}.ptc-text-field.email-signup .mdc-text-field-helper-line{position:absolute;position:absolute;bottom:-37px;width:auto;left:-4px;width:-moz-max-content;width:max-content}.ptc-text-field.email-signup .mdc-text-field-helper-line .mdc-text-field-helper-text{background-color:var(--color-white);padding:4px 8px 4px 16px;box-sizing:border-box;margin:0}.ptc-text-field.email-signup .mdc-text-field__input{padding:12px 8px;font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-regular);color:var(--color-gray-10)}.ptc-text-field.email-signup .mdc-text-field__input::-moz-placeholder{font-size:var(--ptc-font-size-small)}.ptc-text-field.email-signup .mdc-text-field__input::placeholder{font-size:var(--ptc-font-size-small)}.ptc-text-field textarea.mdc-text-field__input{min-height:56px;max-height:200px;overflow-y:auto;font-size:var(--ptc-font-size-xx-small);width:100%;box-sizing:border-box;resize:vertical;display:block;margin:0;position:static;padding-right:8px;padding-top:8px;padding-bottom:8px;line-height:var(--ptc-font-size-small)}.ptc-text-field .mdc-text-field--outlined{height:34px;width:273px;padding-left:8px;padding-right:8px}.ptc-text-field .mdc-text-field--outlined .mdc-notched-outline__trailing{border-radius:0px !important}.ptc-text-field .mdc-text-field--outlined .mdc-notched-outline__leading{border-radius:0px !important}.ptc-text-field .mdc-text-field--outlined:has(textarea.mdc-text-field__input){min-height:34px;height:auto;display:flex;flex-direction:column;align-items:stretch}.ptc-text-field .mdc-text-field:has(textarea.mdc-text-field__input){padding-right:8px;padding-top:2px;padding-bottom:8px}.ptc-text-field .mdc-text-field--with-internal-counter textarea.mdc-text-field__input{padding-bottom:32px;overflow-y:auto;word-break:break-word}.ptc-text-field .textarea-wrapper{position:relative;z-index:9;padding-bottom:20px}.ptc-text-field .textarea-wrapper .mdc-text-field-character-counter{position:absolute;top:unset;bottom:-28px;right:0;z-index:9}";
4162
-
4163
- const PtcTextfield = class {
4164
- constructor(hostRef) {
4165
- registerInstance(this, hostRef);
4166
- this.lastInteraction = "mouse";
4167
- this.phoneValidity = "validating";
4168
- this.matchStatus = true;
4169
- this.fieldId = undefined;
4170
- this.type = "text";
4171
- this.required = true;
4172
- this.ptcMaxLength = undefined;
4173
- this.labelText = "Email";
4174
- this.helpertext = "";
4175
- this.infoText = undefined;
4176
- this.alertText = undefined;
4177
- this.alertTextContent = undefined;
4178
- this.disabled = false;
4179
- this.fieldName = "email";
4180
- this.ptcDataEloquaName = undefined;
4181
- this.ptcDataTargetEloquaName = undefined;
4182
- this.inputValue = "";
4183
- this.customValidation = undefined;
4184
- this.language = "en";
4185
- this.ignoreBlindSubmit = false;
4186
- this.placeholderText = undefined;
4187
- this.styles = undefined;
4188
- this.textfieldForm = "default";
4189
- }
4190
- handleInput(event) {
4191
- this.inputValue = event.target.value;
4192
- if (this.customInput.id === "confirm-email") {
4193
- const emailInput = document.getElementById("contact-email");
4194
- if (emailInput.value === this.customInput.value) {
4195
- this.customInput.setCustomValidity("");
4196
- this.matchStatus = true;
4197
- }
4198
- else if (this.customInput.value &&
4199
- emailInput.value !== this.customInput.value) {
4200
- this.customInput.setCustomValidity("Email addresses must match.");
4201
- this.matchStatus = false;
4202
- }
4203
- }
4204
- }
4205
- handleFocus(event) {
4206
- const target = event.target;
4207
- if (target.tagName === "INPUT") {
4208
- this.inputValue = event.target.value;
4209
- this.setHelperText();
4210
- }
4211
- }
4212
- inputBlurHandler() {
4213
- this.validateTextField();
4214
- }
4215
- async syncCountry(countryCode) {
4216
- this.iti.setCountry(countryCode);
4217
- }
4218
- async validateTextField() {
4219
- if (this.customInput) {
4220
- if (this.customValidation) {
4221
- let message = this.customValidation(this.customInput);
4222
- this.customInput.setCustomValidity(message);
4223
- this.customInput.checkValidity();
4224
- this.infoText = message;
4225
- this.setErrorBackground();
4226
- this.setHelperText();
4227
- }
4228
- else {
4229
- this.setErrorBackground();
4230
- this.setHelperText();
4231
- setTimeout(() => {
4232
- this.getPhoneValidation();
4233
- }, 100);
4234
- }
4235
- this.mdcTextfieldComponent.valid = this.customInput.checkValidity();
4236
- }
4237
- }
4238
- async getValidationMessage(type) {
4239
- return ValidationMessages[this.language][type];
4240
- }
4241
- componentWillLoad() {
4242
- this.language = getLanguageFromURL();
4243
- }
4244
- componentDidLoad() {
4245
- if (this.type !== "hidden") {
4246
- this.mdcTextfieldComponent = MDCTextField.attachTo(this.mdcTextfield);
4247
- }
4248
- if (this.fieldId === "contact-phone" && this.fieldName === "phone") {
4249
- this.iti = intlTelInput(this.customInput, {
4250
- separateDialCode: true,
4251
- initialCountry: "auto",
4252
- nationalMode: true,
4253
- geoIpLookup: (callback) => {
4254
- fetch("https://ipapi.co/json")
4255
- .then((res) => res.json())
4256
- .then((data) => callback(data.country_code))
4257
- .catch(() => callback("us"));
4258
- },
4259
- utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/18.2.1/js/utils.min.js", // Required for formatting/validation
4260
- });
4261
- }
4262
- this.setupFocusHandlers();
4263
- }
4264
- getPhoneValidation() {
4265
- if (this.fieldId === "contact-phone" && this.fieldName === "phone") {
4266
- if (!this.required && this.inputValue === "") {
4267
- if (this.mdcTextfield.classList.contains("mdc-text-field--invalid")) {
4268
- this.mdcTextfield.classList.remove("mdc-text-field--invalid");
4269
- }
4270
- if (this.el.classList.contains("invalid-field")) {
4271
- this.el.classList.remove("invalid-field");
4272
- }
4273
- }
4274
- else {
4275
- if (this.iti.isValidNumber()) {
4276
- if (this.mdcTextfield.classList.contains("mdc-text-field--invalid")) {
4277
- this.mdcTextfield.classList.remove("mdc-text-field--invalid");
4278
- }
4279
- if (this.el.classList.contains("invalid-field")) {
4280
- this.el.classList.remove("invalid-field");
4281
- }
4282
- this.inputValue = this.iti.getNumber();
4283
- }
4284
- else if (!this.iti.isValidNumber()) {
4285
- if (!this.mdcTextfield.classList.contains("mdc-text-field--invalid")) {
4286
- this.mdcTextfield.classList.add("mdc-text-field--invalid");
4287
- }
4288
- if (!this.el.classList.contains("invalid-field")) {
4289
- this.el.classList.add("invalid-field");
4290
- }
4291
- }
4292
- }
4293
- }
4294
- }
4295
- setErrorBackground() {
4296
- if (this.customInput.checkValidity()) {
4297
- if (this.el.classList.contains("invalid-field")) {
4298
- this.el.classList.remove("invalid-field");
4299
- }
4300
- }
4301
- else if (!this.customInput.checkValidity()) {
4302
- if (!this.el.classList.contains("invalid-field")) {
4303
- this.el.classList.add("invalid-field");
4304
- }
4305
- }
4306
- }
4307
- getInputClassName() {
4308
- let className = "mdc-text-field__input";
4309
- if (this.type === "tel" && this.fieldName === "phone") {
4310
- className = `${className} intl-tel-input`;
4311
- }
4312
- else if (this.type === "text" && this.ptcMaxLength) {
4313
- className = `${className} mdc-text-field--with-internal-counter`;
4314
- }
4315
- return className;
4316
- }
4317
- getValidationPattern() {
4318
- let validationPattern = "";
4319
- if ((this.type === "email" && this.fieldName === "email") ||
4320
- (this.type === "email" && this.fieldName === "companyemail")) {
4321
- validationPattern =
4322
- "[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.(?!.*\\..*\\.)[a-zA-Z]{2,15}$"; //updated TLD character limit from 7 to 15
4323
- }
4324
- if (this.fieldName === "firstname" || this.fieldName === "lastname") {
4325
- validationPattern = "^[^!*@&$¥£€>#^~+=<>%]+$";
4326
- }
4327
- return validationPattern;
4328
- }
4329
- async setHelperText() {
4330
- this.helpertext = await this.getValidationMessage("required");
4331
- if ((this.type === "email" && this.fieldName === "email") ||
4332
- (this.type === "email" && this.fieldName === "companyemail")) {
4333
- if (this.customInput.validity.valueMissing) {
4334
- this.helpertext = await this.getValidationMessage("email");
4335
- }
4336
- else if (!this.customInput.validity.valid) {
4337
- this.helpertext = await this.getValidationMessage("validemail");
4338
- }
4339
- else if (this.customInput.validity.valid) {
4340
- this.helpertext = "";
4341
- }
4342
- }
4343
- else if (this.fieldName === "firstname") {
4344
- if (this.customInput.validity.valueMissing) {
4345
- this.helpertext = await this.getValidationMessage("required");
4346
- }
4347
- else if (this.customInput.validity.patternMismatch) {
4348
- this.helpertext = await this.getValidationMessage("firstname");
4349
- }
4350
- }
4351
- else if (this.fieldName === "lastname") {
4352
- if (this.customInput.validity.valueMissing) {
4353
- this.helpertext = await this.getValidationMessage("required");
4354
- }
4355
- else if (this.customInput.validity.patternMismatch) {
4356
- this.helpertext = await this.getValidationMessage("lastname");
4357
- }
4358
- }
4359
- else if (this.fieldId === "contact-phone") {
4360
- if (this.iti) {
4361
- if (this.inputValue === "" && this.required) {
4362
- this.helpertext = await this.getValidationMessage("tel");
4363
- }
4364
- else if (!this.iti.isValidNumber()) {
4365
- this.helpertext =
4366
- await this.getValidationMessage("validtel");
4367
- }
4368
- }
4369
- }
4370
- else if (this.fieldId === "confirm-email") {
4371
- if (!this.matchStatus && !!this.customInput.value) {
4372
- this.helpertext =
4373
- await this.getValidationMessage("confirmemail");
4374
- }
4375
- }
4376
- }
4377
- setupFocusHandlers() {
4378
- // Track the last interaction type
4379
- document.addEventListener("mousedown", () => {
4380
- this.lastInteraction = "mouse";
4381
- });
4382
- document.addEventListener("keydown", (e) => {
4383
- if (e.key === "Tab") {
4384
- this.lastInteraction = "keyboard";
4385
- }
4386
- });
4387
- // Select all elements with the class `mdc-text-field`
4388
- const textFields = document.querySelectorAll(".mdc-text-field");
4389
- textFields.forEach((textField) => {
4390
- const input = textField.querySelector("input");
4391
- const textArea = textField.querySelector("textarea");
4392
- if (input) {
4393
- input.addEventListener("focus", () => {
4394
- if (this.lastInteraction === "keyboard") {
4395
- textField.classList.add("keyboard-focus");
4396
- textField.classList.remove("mouse-focus");
4397
- }
4398
- else {
4399
- textField.classList.add("mouse-focus");
4400
- textField.classList.remove("keyboard-focus");
4401
- }
4402
- });
4403
- input.addEventListener("blur", () => {
4404
- textField.classList.remove("keyboard-focus", "mouse-focus");
4405
- });
4406
- }
4407
- if (textArea) {
4408
- textArea.addEventListener("focus", () => {
4409
- if (this.lastInteraction === "keyboard") {
4410
- textField.classList.add("keyboard-focus");
4411
- textField.classList.remove("mouse-focus");
4412
- }
4413
- else {
4414
- textField.classList.add("mouse-focus");
4415
- textField.classList.remove("keyboard-focus");
4416
- }
4417
- });
4418
- textArea.addEventListener("blur", () => {
4419
- textField.classList.remove("keyboard-focus", "mouse-focus");
4420
- });
4421
- }
4422
- });
4423
- }
4424
- render() {
4425
- return (h(Host, { class: `ptc-text-field ${this.textfieldForm}
4426
- ${this.fieldId === "contact-phone" ? "phone-field-style" : ""}
4427
- ${this.type === "hidden" ? "textfield-hidden" : ""}` }, this.styles && h("style", null, this.styles), this.type !== "hidden" ? ([
4428
- this.labelText ? (h("label", { class: "ptc-label" }, this.labelText)) : null,
4429
- h("div", { class: `mdc-text-field mdc-text-field--outlined mdc-text-field--no-label
4430
- ${this.fieldId === "contact-phone" ? "intl-phone-adjustments" : ""}`, ref: (mdcTextfield) => {
4431
- this.mdcTextfield = mdcTextfield;
4432
- } }, h("span", { class: "mdc-notched-outline ptc-textfield-outline" }, h("span", { class: "mdc-notched-outline__leading" }), h("span", { class: "mdc-notched-outline__trailing" })), this.type === "textarea" ? (h("div", { class: "textarea-wrapper" }, h("textarea", Object.assign({ ref: (customInput) => {
4433
- this.customInput =
4434
- customInput;
4435
- }, id: this.fieldId, class: this.getInputClassName() }, (this.required
4436
- ? { required: true }
4437
- : null), (this.ptcMaxLength
4438
- ? { maxLength: this.ptcMaxLength }
4439
- : null), { "aria-controls": this.fieldName, "aria-describedby": this.fieldName, "data-eloqua-name": this.ptcDataEloquaName, "data-target-eloqua-name": this.ptcDataTargetEloquaName, value: this.inputValue, name: this.fieldName, placeholder: this.placeholderText }, (this.getValidationPattern()
4440
- ? {
4441
- pattern: this.getValidationPattern(),
4442
- }
4443
- : null), (this.ignoreBlindSubmit
4444
- ? { ignoreBlindSubmit: true }
4445
- : null), { onInput: (e) => this.handleInput(e) })), this.ptcMaxLength ? (h("div", { class: "mdc-text-field-character-counter" }, this.inputValue.length, " /", " ", this.ptcMaxLength)) : null)) : (h("input", Object.assign({ ref: (customInput) => {
4446
- this.customInput =
4447
- customInput;
4448
- }, id: this.fieldId }, (this.getInputClassName()
4449
- ? { class: this.getInputClassName() }
4450
- : null), { type: this.type }, (this.required
4451
- ? { required: true }
4452
- : null), (this.ptcMaxLength
4453
- ? { maxLength: this.ptcMaxLength }
4454
- : null), { "aria-controls": this.fieldName, "aria-describedby": this.fieldName, "data-eloqua-name": this.ptcDataEloquaName, "data-target-eloqua-name": this.ptcDataTargetEloquaName, value: this.inputValue, name: this.fieldName }, (this.getValidationPattern()
4455
- ? {
4456
- pattern: this.getValidationPattern(),
4457
- }
4458
- : null), (this.ignoreBlindSubmit
4459
- ? { ignoreBlindSubmit: true }
4460
- : null), { placeholder: this.placeholderText })))),
4461
- h("div", { class: `mdc-text-field-helper-line
4462
- ${!!this.ptcMaxLength ? "field-with-counter" : ""}` }, h("div", { class: "mdc-text-field-helper-text mdc-text-field-helper-text--validation-msg", id: this.fieldName }, h("svg", { class: "input-error-svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { "clip-path": "url(#clip0_12_1424)" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.3156 0L16 4.68444V11.3156L11.3156 16H4.68444L0 11.3156V4.68444L4.68444 0H11.3156ZM8 10.4C7.36 10.4 6.84444 10.9156 6.84444 11.5556C6.84444 12.1956 7.36 12.7111 8 12.7111C8.64 12.7111 9.15556 12.1956 9.15556 11.5556C9.15556 10.9156 8.64 10.4 8 10.4ZM8.88889 3.55556H7.11111V8.88889H8.88889V3.55556Z", fill: "#AF3231" })), h("defs", null, h("clipPath", { id: "clip0_12_1424" }, h("rect", { width: "16", height: "16", fill: "white" })))), this.helpertext), this.infoText ? (h("div", { class: "mdc-text-field-helper-text mdc-text-field-helper-text--info-msg" }, this.infoText)) : null, this.ptcMaxLength && this.type === "text" ? (h("div", { class: "mdc-text-field-character-counter" }, this.inputValue.length, " /", " ", this.ptcMaxLength)) : null),
4463
- /* Alert message */
4464
- h("div", { class: "ptc-text-field-alert-line" }, !!this.alertText ? (h("div", { class: "mdc-text-field-helper-text--alert-msg" }, h("svg", { class: "alert-msg-svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { id: "Info", "clip-path": "url(#clip0_227_7670)" }, h("path", { id: "Vector", "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM9 6V13H7V6H9ZM8 5C8.55229 5 9 4.55228 9 4C9 3.44772 8.55229 3 8 3C7.44772 3 7 3.44772 7 4C7 4.55228 7.44772 5 8 5Z", fill: "#197BC0" })), h("defs", null, h("clipPath", { id: "clip0_227_7670" }, h("rect", { width: "16", height: "16", fill: "white" })))), this.alertText)) : null, !!this.alertText && this.alertTextContent ? (h("div", { class: "mdc-text-field-helper-text--alert-content-msg" }, this.alertTextContent)) : null),
4465
- ]) : (h("input", { id: this.fieldId, name: this.fieldName, type: "hidden", "data-eloqua-name": this.ptcDataEloquaName, value: this.inputValue }))));
4466
- }
4467
- get el() { return getElement(this); }
4468
- };
4469
- PtcTextfield.style = ptcTextfieldCss;
4470
-
4471
- export { PtcFormCheckbox as ptc_form_checkbox, PtcTextfield as ptc_textfield };